cfg80211.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. #ifndef __NET_CFG80211_H
  2. #define __NET_CFG80211_H
  3. #include <linux/netlink.h>
  4. #include <linux/skbuff.h>
  5. #include <net/genetlink.h>
  6. /*
  7. * 802.11 configuration in-kernel interface
  8. *
  9. * Copyright 2006 Johannes Berg <johannes@sipsolutions.net>
  10. */
  11. /* Radiotap header iteration
  12. * implemented in net/wireless/radiotap.c
  13. * docs in Documentation/networking/radiotap-headers.txt
  14. */
  15. /**
  16. * struct ieee80211_radiotap_iterator - tracks walk thru present radiotap args
  17. * @rtheader: pointer to the radiotap header we are walking through
  18. * @max_length: length of radiotap header in cpu byte ordering
  19. * @this_arg_index: IEEE80211_RADIOTAP_... index of current arg
  20. * @this_arg: pointer to current radiotap arg
  21. * @arg_index: internal next argument index
  22. * @arg: internal next argument pointer
  23. * @next_bitmap: internal pointer to next present u32
  24. * @bitmap_shifter: internal shifter for curr u32 bitmap, b0 set == arg present
  25. */
  26. struct ieee80211_radiotap_iterator {
  27. struct ieee80211_radiotap_header *rtheader;
  28. int max_length;
  29. int this_arg_index;
  30. u8 *this_arg;
  31. int arg_index;
  32. u8 *arg;
  33. __le32 *next_bitmap;
  34. u32 bitmap_shifter;
  35. };
  36. extern int ieee80211_radiotap_iterator_init(
  37. struct ieee80211_radiotap_iterator *iterator,
  38. struct ieee80211_radiotap_header *radiotap_header,
  39. int max_length);
  40. extern int ieee80211_radiotap_iterator_next(
  41. struct ieee80211_radiotap_iterator *iterator);
  42. /* from net/wireless.h */
  43. struct wiphy;
  44. /**
  45. * struct cfg80211_ops - backend description for wireless configuration
  46. *
  47. * This struct is registered by fullmac card drivers and/or wireless stacks
  48. * in order to handle configuration requests on their interfaces.
  49. *
  50. * All callbacks except where otherwise noted should return 0
  51. * on success or a negative error code.
  52. *
  53. * All operations are currently invoked under rtnl for consistency with the
  54. * wireless extensions but this is subject to reevaluation as soon as this
  55. * code is used more widely and we have a first user without wext.
  56. *
  57. * @add_virtual_intf: create a new virtual interface with the given name
  58. *
  59. * @del_virtual_intf: remove the virtual interface determined by ifindex.
  60. */
  61. struct cfg80211_ops {
  62. int (*add_virtual_intf)(struct wiphy *wiphy, char *name,
  63. unsigned int type);
  64. int (*del_virtual_intf)(struct wiphy *wiphy, int ifindex);
  65. };
  66. #endif /* __NET_CFG80211_H */