cfg80211.h 2.5 KB

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