ieee802_11.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*
  2. * hostapd / IEEE 802.11 Management
  3. * Copyright (c) 2002-2009, Jouni Malinen <j@w1.fi>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License version 2 as
  7. * published by the Free Software Foundation.
  8. *
  9. * Alternatively, this software may be distributed under the terms of BSD
  10. * license.
  11. *
  12. * See README and COPYING for more details.
  13. */
  14. #ifndef IEEE802_11_H
  15. #define IEEE802_11_H
  16. struct hostapd_iface;
  17. struct hostapd_data;
  18. struct sta_info;
  19. struct hostapd_frame_info;
  20. struct ieee80211_ht_capabilities;
  21. void ieee802_11_mgmt(struct hostapd_data *hapd, const u8 *buf, size_t len,
  22. struct hostapd_frame_info *fi);
  23. void ieee802_11_mgmt_cb(struct hostapd_data *hapd, const u8 *buf, size_t len,
  24. u16 stype, int ok);
  25. void ieee802_11_print_ssid(char *buf, const u8 *ssid, u8 len);
  26. #ifdef NEED_AP_MLME
  27. int ieee802_11_get_mib(struct hostapd_data *hapd, char *buf, size_t buflen);
  28. int ieee802_11_get_mib_sta(struct hostapd_data *hapd, struct sta_info *sta,
  29. char *buf, size_t buflen);
  30. #else /* NEED_AP_MLME */
  31. static inline int ieee802_11_get_mib(struct hostapd_data *hapd, char *buf,
  32. size_t buflen)
  33. {
  34. return 0;
  35. }
  36. static inline int ieee802_11_get_mib_sta(struct hostapd_data *hapd,
  37. struct sta_info *sta,
  38. char *buf, size_t buflen)
  39. {
  40. return 0;
  41. }
  42. #endif /* NEED_AP_MLME */
  43. u16 hostapd_own_capab_info(struct hostapd_data *hapd, struct sta_info *sta,
  44. int probe);
  45. u8 * hostapd_eid_ext_capab(struct hostapd_data *hapd, u8 *eid);
  46. u8 * hostapd_eid_supp_rates(struct hostapd_data *hapd, u8 *eid);
  47. u8 * hostapd_eid_ext_supp_rates(struct hostapd_data *hapd, u8 *eid);
  48. u8 * hostapd_eid_ht_capabilities(struct hostapd_data *hapd, u8 *eid);
  49. u8 * hostapd_eid_ht_operation(struct hostapd_data *hapd, u8 *eid);
  50. int hostapd_ht_operation_update(struct hostapd_iface *iface);
  51. void ieee802_11_send_sa_query_req(struct hostapd_data *hapd,
  52. const u8 *addr, const u8 *trans_id);
  53. void hostapd_get_ht_capab(struct hostapd_data *hapd,
  54. struct ieee80211_ht_capabilities *ht_cap,
  55. struct ieee80211_ht_capabilities *neg_ht_cap);
  56. u16 copy_sta_ht_capab(struct hostapd_data *hapd, struct sta_info *sta,
  57. const u8 *ht_capab, size_t ht_capab_len);
  58. void update_ht_state(struct hostapd_data *hapd, struct sta_info *sta);
  59. void hostapd_tx_status(struct hostapd_data *hapd, const u8 *addr,
  60. const u8 *buf, size_t len, int ack);
  61. void ieee802_11_rx_from_unknown(struct hostapd_data *hapd, const u8 *src,
  62. int wds);
  63. #endif /* IEEE802_11_H */