Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

mlme.h 3.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. /*
  2. * WPA Supplicant - Client mode MLME
  3. * Copyright (c) 2003-2007, Jouni Malinen <j@w1.fi>
  4. * Copyright (c) 2004, Instant802 Networks, Inc.
  5. * Copyright (c) 2005-2006, Devicescape Software, Inc.
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as
  9. * published by the Free Software Foundation.
  10. *
  11. * Alternatively, this software may be distributed under the terms of BSD
  12. * license.
  13. *
  14. * See README and COPYING for more details.
  15. */
  16. #ifndef MLME_H
  17. #define MLME_H
  18. struct wpa_supplicant;
  19. struct ieee80211_rx_status {
  20. int freq;
  21. int channel;
  22. int ssi;
  23. };
  24. #ifdef CONFIG_CLIENT_MLME
  25. int ieee80211_sta_init(struct wpa_supplicant *wpa_s);
  26. void ieee80211_sta_deinit(struct wpa_supplicant *wpa_s);
  27. int ieee80211_sta_req_scan(struct wpa_supplicant *wpa_s,
  28. struct wpa_driver_scan_params *params);
  29. int ieee80211_sta_deauthenticate(struct wpa_supplicant *wpa_s, u16 reason);
  30. int ieee80211_sta_disassociate(struct wpa_supplicant *wpa_s, u16 reason);
  31. int ieee80211_sta_associate(struct wpa_supplicant *wpa_s,
  32. struct wpa_driver_associate_params *params);
  33. int ieee80211_sta_get_ssid(struct wpa_supplicant *wpa_s, u8 *ssid,
  34. size_t *len);
  35. void ieee80211_sta_rx(struct wpa_supplicant *wpa_s, const u8 *buf, size_t len,
  36. struct ieee80211_rx_status *rx_status);
  37. struct wpa_scan_results *
  38. ieee80211_sta_get_scan_results(struct wpa_supplicant *wpa_s);
  39. int ieee80211_sta_update_ft_ies(struct wpa_supplicant *wpa_s, const u8 *md,
  40. const u8 *ies, size_t ies_len);
  41. int ieee80211_sta_send_ft_action(struct wpa_supplicant *wpa_s, u8 action,
  42. const u8 *target_ap,
  43. const u8 *ies, size_t ies_len);
  44. #else /* CONFIG_CLIENT_MLME */
  45. static inline int ieee80211_sta_init(struct wpa_supplicant *wpa_s)
  46. {
  47. return 0;
  48. }
  49. static inline void ieee80211_sta_deinit(struct wpa_supplicant *wpa_s)
  50. {
  51. }
  52. static inline int ieee80211_sta_req_scan(struct wpa_supplicant *wpa_s,
  53. struct wpa_driver_scan_params *params)
  54. {
  55. return -1;
  56. }
  57. static inline int ieee80211_sta_deauthenticate(struct wpa_supplicant *wpa_s,
  58. u16 reason)
  59. {
  60. return -1;
  61. }
  62. static inline int ieee80211_sta_disassociate(struct wpa_supplicant *wpa_s,
  63. u16 reason)
  64. {
  65. return -1;
  66. }
  67. static inline int
  68. ieee80211_sta_associate(struct wpa_supplicant *wpa_s,
  69. struct wpa_driver_associate_params *params)
  70. {
  71. return -1;
  72. }
  73. static inline int ieee80211_sta_get_ssid(struct wpa_supplicant *wpa_s,
  74. u8 *ssid, size_t *len)
  75. {
  76. return -1;
  77. }
  78. static inline void
  79. ieee80211_sta_rx(struct wpa_supplicant *wpa_s, const u8 *buf, size_t len,
  80. struct ieee80211_rx_status *rx_status)
  81. {
  82. }
  83. static inline struct wpa_scan_results *
  84. ieee80211_sta_get_scan_results(struct wpa_supplicant *wpa_s)
  85. {
  86. return NULL;
  87. }
  88. static inline int
  89. ieee80211_sta_update_ft_ies(struct wpa_supplicant *wpa_s, const u8 *md,
  90. const u8 *ies, size_t ies_len)
  91. {
  92. return -1;
  93. }
  94. static inline int
  95. ieee80211_sta_send_ft_action(struct wpa_supplicant *wpa_s, u8 action,
  96. const u8 *target_ap,
  97. const u8 *ies, size_t ies_len)
  98. {
  99. return -1;
  100. }
  101. #endif /* CONFIG_CLIENT_MLME */
  102. #endif /* MLME_H */