iwinfo_nl80211.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*
  2. * iwinfo - Wireless Information Library - NL80211 Headers
  3. *
  4. * Copyright (C) 2010 Jo-Philipp Wich <xm@subsignal.org>
  5. *
  6. * The iwinfo library is free software: you can redistribute it and/or
  7. * modify it under the terms of the GNU General Public License version 2
  8. * as published by the Free Software Foundation.
  9. *
  10. * The iwinfo library is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. * See the GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License along
  16. * with the iwinfo library. If not, see http://www.gnu.org/licenses/.
  17. */
  18. #ifndef __IWINFO_NL80211_H_
  19. #define __IWINFO_NL80211_H_
  20. #include <errno.h>
  21. #include <fcntl.h>
  22. #include <unistd.h>
  23. #include <string.h>
  24. #include <dirent.h>
  25. #include <signal.h>
  26. #include <sys/un.h>
  27. #include <netlink/netlink.h>
  28. #include <netlink/genl/genl.h>
  29. #include <netlink/genl/family.h>
  30. #include <netlink/genl/ctrl.h>
  31. #include "iwinfo.h"
  32. #include "iwinfo/utils.h"
  33. #include "api/nl80211.h"
  34. struct nl80211_state {
  35. struct nl_sock *nl_sock;
  36. struct nl_cache *nl_cache;
  37. struct genl_family *nl80211;
  38. struct genl_family *nlctrl;
  39. };
  40. struct nl80211_msg_conveyor {
  41. struct nl_msg *msg;
  42. struct nl_cb *cb;
  43. };
  44. struct nl80211_event_conveyor {
  45. int wait;
  46. int recv;
  47. };
  48. struct nl80211_group_conveyor {
  49. const char *name;
  50. int id;
  51. };
  52. struct nl80211_rssi_rate {
  53. int16_t rate;
  54. int8_t rssi;
  55. };
  56. struct nl80211_array_buf {
  57. void *buf;
  58. int count;
  59. };
  60. #endif