radiotap_iter.h 1.2 KB

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