From: David Young <dyoung-e+AXbWqSrlAAvxtiuMwx3w@public.gmane.org>
To: radiotap-eZodSLrBbDpBDgjK7y7TUQ@public.gmane.org
Subject: rfc: "canonical" radiotap parser
Date: Thu, 6 Dec 2007 22:55:45 -0600 [thread overview]
Message-ID: <20071207045545.GO3568@che.ojctech.com> (raw)
At <http://svn.cuwireless.net/svn/cuw/trunk/src/radiotap/> is the radiotap
parser that I mentioned the other day. I believe the parser captures
all of the essential ideas of radiotap. It is also a somewhat useful
program that uses libpcap to listen on the interface you specify on the
command line for radiotap frames (DLT_IEEE802_11_RADIO). I have tried
to make it just as portable and self-contained C99 code as I can.
The parser is table-driven: adding new fields is a matter of adding
entries to the tables field_spec[] and field_info[]. The first table,
field_spec[], contains the Minimal Specification for a field. The Minimal
Specification is the field's alignment and its width. The alignment
must be a power-of-two, whole number of bytes. The width must be a
non-negative, whole number of bytes. Every radiotap interpreter needs to
know the minimal specification of fields 0..n in order to skip past those
fields to a field of interest, field n+1. The second table, field_info[],
tells each field's name (long and short form) and units. I use some macro
magic to link each entry in field_info[] to its Minimal Specification.
Call the information in field_info[] and in field_spec[] for each field,
that field's Complete Specification. An interpreter such as tcpdump or
wireshark needs a field's Complete Specification in order to render the
field for you and I to read it.
I have included all of these fields in the parser,
IEEE80211_RADIOTAP_RX_FLAGS
IEEE80211_RADIOTAP_TX_FLAGS
IEEE80211_RADIOTAP_RTS_RETRIES
IEEE80211_RADIOTAP_DATA_RETRIES
IEEE80211_RADIOTAP_XCHANNEL
Dave
--
David Young OJC Technologies
dyoung-eZodSLrBbDpBDgjK7y7TUQ@public.gmane.org Urbana, IL * (217) 278-3933 ext 24
next reply other threads:[~2007-12-07 4:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-07 4:55 David Young [this message]
[not found] ` <20071207045545.GO3568-eZ+MEZF6i8Dc+919tysfdA@public.gmane.org>
2007-12-08 10:39 ` rfc: "canonical" radiotap parser Johannes Berg
[not found] ` <1197110397.4171.46.camel-YfaajirXv214zXjbi5bjpg@public.gmane.org>
2007-12-08 21:06 ` David Young
[not found] ` <20071208210645.GX3568-eZ+MEZF6i8Dc+919tysfdA@public.gmane.org>
2007-12-10 12:37 ` Johannes Berg
[not found] ` <1197290250.6035.69.camel-YfaajirXv214zXjbi5bjpg@public.gmane.org>
2007-12-10 19:18 ` David Young
[not found] ` <20071210191815.GE3568-eZ+MEZF6i8Dc+919tysfdA@public.gmane.org>
2007-12-11 13:32 ` Johannes Berg
2007-12-11 21:38 ` Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071207045545.GO3568@che.ojctech.com \
--to=dyoung-e+axbwqsrlaavxtiumwx3w@public.gmane.org \
--cc=radiotap-eZodSLrBbDpBDgjK7y7TUQ@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).