ap.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. /*
  2. * WPA Supplicant - Basic AP mode support routines
  3. * Copyright (c) 2003-2009, Jouni Malinen <j@w1.fi>
  4. * Copyright (c) 2009, Atheros Communications
  5. *
  6. * This software may be distributed under the terms of the BSD license.
  7. * See README for more details.
  8. */
  9. #ifndef AP_H
  10. #define AP_H
  11. int wpa_supplicant_create_ap(struct wpa_supplicant *wpa_s,
  12. struct wpa_ssid *ssid);
  13. void wpa_supplicant_ap_deinit(struct wpa_supplicant *wpa_s);
  14. void wpa_supplicant_ap_rx_eapol(struct wpa_supplicant *wpa_s,
  15. const u8 *src_addr, const u8 *buf, size_t len);
  16. int wpa_supplicant_ap_wps_pbc(struct wpa_supplicant *wpa_s, const u8 *bssid,
  17. const u8 *p2p_dev_addr);
  18. int wpa_supplicant_ap_wps_pin(struct wpa_supplicant *wpa_s, const u8 *bssid,
  19. const char *pin, char *buf, size_t buflen,
  20. int timeout);
  21. int wpa_supplicant_ap_wps_cancel(struct wpa_supplicant *wpa_s);
  22. void wpas_wps_ap_pin_disable(struct wpa_supplicant *wpa_s);
  23. const char * wpas_wps_ap_pin_random(struct wpa_supplicant *wpa_s, int timeout);
  24. const char * wpas_wps_ap_pin_get(struct wpa_supplicant *wpa_s);
  25. int wpas_wps_ap_pin_set(struct wpa_supplicant *wpa_s, const char *pin,
  26. int timeout);
  27. int ap_ctrl_iface_sta_first(struct wpa_supplicant *wpa_s,
  28. char *buf, size_t buflen);
  29. int ap_ctrl_iface_sta(struct wpa_supplicant *wpa_s, const char *txtaddr,
  30. char *buf, size_t buflen);
  31. int ap_ctrl_iface_sta_next(struct wpa_supplicant *wpa_s, const char *txtaddr,
  32. char *buf, size_t buflen);
  33. int ap_ctrl_iface_sta_deauthenticate(struct wpa_supplicant *wpa_s,
  34. const char *txtaddr);
  35. int ap_ctrl_iface_sta_disassociate(struct wpa_supplicant *wpa_s,
  36. const char *txtaddr);
  37. int ap_ctrl_iface_wpa_get_status(struct wpa_supplicant *wpa_s, char *buf,
  38. size_t buflen, int verbose);
  39. void ap_tx_status(void *ctx, const u8 *addr,
  40. const u8 *buf, size_t len, int ack);
  41. void ap_eapol_tx_status(void *ctx, const u8 *dst,
  42. const u8 *data, size_t len, int ack);
  43. void ap_client_poll_ok(void *ctx, const u8 *addr);
  44. void ap_rx_from_unknown_sta(void *ctx, const u8 *addr, int wds);
  45. void ap_mgmt_rx(void *ctx, struct rx_mgmt *rx_mgmt);
  46. void ap_mgmt_tx_cb(void *ctx, const u8 *buf, size_t len, u16 stype, int ok);
  47. int wpa_supplicant_ap_update_beacon(struct wpa_supplicant *wpa_s);
  48. int wpa_supplicant_ap_mac_addr_filter(struct wpa_supplicant *wpa_s,
  49. const u8 *addr);
  50. void wpa_supplicant_ap_pwd_auth_fail(struct wpa_supplicant *wpa_s);
  51. int ap_switch_channel(struct wpa_supplicant *wpa_s,
  52. struct csa_settings *settings);
  53. int ap_ctrl_iface_chanswitch(struct wpa_supplicant *wpa_s, const char *txtaddr);
  54. void wpas_ap_ch_switch(struct wpa_supplicant *wpa_s, int freq, int ht,
  55. int offset, int width, int cf1, int cf2);
  56. struct wpabuf * wpas_ap_wps_nfc_config_token(struct wpa_supplicant *wpa_s,
  57. int ndef);
  58. #ifdef CONFIG_AP
  59. struct wpabuf * wpas_ap_wps_nfc_handover_sel(struct wpa_supplicant *wpa_s,
  60. int ndef);
  61. #else /* CONFIG_AP */
  62. static inline struct wpabuf *
  63. wpas_ap_wps_nfc_handover_sel(struct wpa_supplicant *wpa_s,
  64. int ndef)
  65. {
  66. return NULL;
  67. }
  68. #endif /* CONFIG_AP */
  69. int wpas_ap_wps_nfc_report_handover(struct wpa_supplicant *wpa_s,
  70. const struct wpabuf *req,
  71. const struct wpabuf *sel);
  72. int wpas_ap_wps_add_nfc_pw(struct wpa_supplicant *wpa_s, u16 pw_id,
  73. const struct wpabuf *pw, const u8 *pubkey_hash);
  74. struct hostapd_config;
  75. int wpa_supplicant_conf_ap_ht(struct wpa_supplicant *wpa_s,
  76. struct wpa_ssid *ssid,
  77. struct hostapd_config *conf);
  78. int wpas_ap_stop_ap(struct wpa_supplicant *wpa_s);
  79. int wpas_ap_pmksa_cache_list(struct wpa_supplicant *wpa_s, char *buf,
  80. size_t len);
  81. void wpas_ap_pmksa_cache_flush(struct wpa_supplicant *wpa_s);
  82. int wpas_ap_pmksa_cache_list_mesh(struct wpa_supplicant *wpa_s, const u8 *addr,
  83. char *buf, size_t len);
  84. int wpas_ap_pmksa_cache_add_external(struct wpa_supplicant *wpa_s, char *cmd);
  85. void wpas_event_dfs_radar_detected(struct wpa_supplicant *wpa_s,
  86. struct dfs_event *radar);
  87. void wpas_event_dfs_cac_started(struct wpa_supplicant *wpa_s,
  88. struct dfs_event *radar);
  89. void wpas_event_dfs_cac_finished(struct wpa_supplicant *wpa_s,
  90. struct dfs_event *radar);
  91. void wpas_event_dfs_cac_aborted(struct wpa_supplicant *wpa_s,
  92. struct dfs_event *radar);
  93. void wpas_event_dfs_cac_nop_finished(struct wpa_supplicant *wpa_s,
  94. struct dfs_event *radar);
  95. void ap_periodic(struct wpa_supplicant *wpa_s);
  96. #endif /* AP_H */