1 #include "ieee80211_radiotap.h" 2 3 // -----ieee80211_radiotap_iterator from cfg80211.h ----- // 4 /** 5 * struct ieee80211_radiotap_iterator - tracks walk thru present radiotap args 6 * @this_arg_index: index of current arg, valid after each successful call 7 * to ieee80211_radiotap_iterator_next() 8 * @this_arg: pointer to current radiotap arg; it is valid after each 9 * call to ieee80211_radiotap_iterator_next() but also after 10 * ieee80211_radiotap_iterator_init() where it will point to 11 * the beginning of the actual data portion 12 * @this_arg_size: length of the current arg, for convenience 13 * @current_namespace: pointer to the current namespace definition 14 * (or internally %NULL if the current namespace is unknown) 15 * @is_radiotap_ns: indicates whether the current namespace is the default 16 * radiotap namespace or not 17 * 18 * @_rtheader: pointer to the radiotap header we are walking through 19 * @_max_length: length of radiotap header in cpu byte ordering 20 * @_arg_index: next argument index 21 * @_arg: next argument pointer 22 * @_next_bitmap: internal pointer to next present u32 23 * @_bitmap_shifter: internal shifter for curr u32 bitmap, b0 set == arg present 24 * @_vns: vendor namespace definitions 25 * @_next_ns_data: beginning of the next namespace's data 26 * @_reset_on_ext: internal; reset the arg index to 0 when going to the 27 * next bitmap word 28 * 29 * Describes the radiotap parser state. Fields prefixed with an underscore 30 * must not be used by users of the parser, only by the parser internally. 31 */ 32 33 struct ieee80211_radiotap_iterator { 34 struct ieee80211_radiotap_header *_rtheader; 35 const struct ieee80211_radiotap_vendor_namespaces *_vns; 36 const struct ieee80211_radiotap_namespace *current_namespace; 37 38 unsigned char *_arg, *_next_ns_data; 39 __le32 *_next_bitmap; 40 41 unsigned char *this_arg; 42 int this_arg_index; 43 int this_arg_size; 44 45 int is_radiotap_ns; 46 47 int _max_length; 48 int _arg_index; 49 uint32_t _bitmap_shifter; 50 int _reset_on_ext; 51 }; 52 53 extern int ieee80211_radiotap_iterator_init( 54 struct ieee80211_radiotap_iterator *iterator, 55 struct ieee80211_radiotap_header *radiotap_header, 56 int max_length, const struct ieee80211_radiotap_vendor_namespaces *vns); 57 58 extern int ieee80211_radiotap_iterator_next( 59 struct ieee80211_radiotap_iterator *iterator); 60 61