Merge branch 'vendor/MDOCML'
[dragonfly.git] / contrib / hostapd / hostapd / radiotap_iter.h
1 #ifndef __RADIOTAP_ITER_H
2 #define __RADIOTAP_ITER_H
3
4 #include "radiotap.h"
5
6 /* Radiotap header iteration
7  *   implemented in radiotap.c
8  */
9 /**
10  * struct ieee80211_radiotap_iterator - tracks walk thru present radiotap args
11  * @rtheader: pointer to the radiotap header we are walking through
12  * @max_length: length of radiotap header in cpu byte ordering
13  * @this_arg_index: IEEE80211_RADIOTAP_... index of current arg
14  * @this_arg: pointer to current radiotap arg
15  * @arg_index: internal next argument index
16  * @arg: internal next argument pointer
17  * @next_bitmap: internal pointer to next present u32
18  * @bitmap_shifter: internal shifter for curr u32 bitmap, b0 set == arg present
19  */
20
21 struct ieee80211_radiotap_iterator {
22         struct ieee80211_radiotap_header *rtheader;
23         int max_length;
24         int this_arg_index;
25         unsigned char *this_arg;
26
27         int arg_index;
28         unsigned char *arg;
29         uint32_t *next_bitmap;
30         uint32_t bitmap_shifter;
31 };
32
33 extern int ieee80211_radiotap_iterator_init(
34    struct ieee80211_radiotap_iterator *iterator,
35    struct ieee80211_radiotap_header *radiotap_header,
36    int max_length);
37
38 extern int ieee80211_radiotap_iterator_next(
39    struct ieee80211_radiotap_iterator *iterator);
40
41 #endif /* __RADIOTAP_ITER_H */