diff options
author | Andy Green <andy@warmcat.com> | 2007-07-10 13:29:38 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2007-07-12 16:07:24 -0400 |
commit | 179f831bc33104d14deb54a52b7a8b43433f8ccc (patch) | |
tree | 8834c628a493fbd4aff1e09dc77b334154c6a050 /include/net/cfg80211.h | |
parent | 08d1f2155cd5b21bb3848f46d9747afb1ccd249d (diff) |
[PATCH] cfg80211: Radiotap parser
Generic code to walk through the fields in a radiotap header, accounting
for nasties like extended "field present" bitfields and alignment rules
Signed-off-by: Andy Green <andy@warmcat.com>
Signed-off-by: Jiri Benc <jbenc@suse.cz>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include/net/cfg80211.h')
-rw-r--r-- | include/net/cfg80211.h | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 88171f8ce58a..7edaef6b29d6 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -11,6 +11,44 @@ | |||
11 | * Copyright 2006 Johannes Berg <johannes@sipsolutions.net> | 11 | * Copyright 2006 Johannes Berg <johannes@sipsolutions.net> |
12 | */ | 12 | */ |
13 | 13 | ||
14 | |||
15 | /* Radiotap header iteration | ||
16 | * implemented in net/wireless/radiotap.c | ||
17 | * docs in Documentation/networking/radiotap-headers.txt | ||
18 | */ | ||
19 | /** | ||
20 | * struct ieee80211_radiotap_iterator - tracks walk thru present radiotap args | ||
21 | * @rtheader: pointer to the radiotap header we are walking through | ||
22 | * @max_length: length of radiotap header in cpu byte ordering | ||
23 | * @this_arg_index: IEEE80211_RADIOTAP_... index of current arg | ||
24 | * @this_arg: pointer to current radiotap arg | ||
25 | * @arg_index: internal next argument index | ||
26 | * @arg: internal next argument pointer | ||
27 | * @next_bitmap: internal pointer to next present u32 | ||
28 | * @bitmap_shifter: internal shifter for curr u32 bitmap, b0 set == arg present | ||
29 | */ | ||
30 | |||
31 | struct ieee80211_radiotap_iterator { | ||
32 | struct ieee80211_radiotap_header *rtheader; | ||
33 | int max_length; | ||
34 | int this_arg_index; | ||
35 | u8 *this_arg; | ||
36 | |||
37 | int arg_index; | ||
38 | u8 *arg; | ||
39 | __le32 *next_bitmap; | ||
40 | u32 bitmap_shifter; | ||
41 | }; | ||
42 | |||
43 | extern int ieee80211_radiotap_iterator_init( | ||
44 | struct ieee80211_radiotap_iterator *iterator, | ||
45 | struct ieee80211_radiotap_header *radiotap_header, | ||
46 | int max_length); | ||
47 | |||
48 | extern int ieee80211_radiotap_iterator_next( | ||
49 | struct ieee80211_radiotap_iterator *iterator); | ||
50 | |||
51 | |||
14 | /* from net/wireless.h */ | 52 | /* from net/wireless.h */ |
15 | struct wiphy; | 53 | struct wiphy; |
16 | 54 | ||