2009-03-26 16:08:17 +02:00
|
|
|
/*
|
|
|
|
* WPA Supplicant - Basic AP mode support routines
|
|
|
|
* Copyright (c) 2003-2009, Jouni Malinen <j@w1.fi>
|
|
|
|
* Copyright (c) 2009, Atheros Communications
|
|
|
|
*
|
2012-02-11 16:46:35 +02:00
|
|
|
* This software may be distributed under the terms of the BSD license.
|
|
|
|
* See README for more details.
|
2009-03-26 16:08:17 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef AP_H
|
|
|
|
#define AP_H
|
|
|
|
|
2009-03-26 20:37:05 +02:00
|
|
|
int wpa_supplicant_create_ap(struct wpa_supplicant *wpa_s,
|
|
|
|
struct wpa_ssid *ssid);
|
|
|
|
void wpa_supplicant_ap_deinit(struct wpa_supplicant *wpa_s);
|
2009-04-20 16:27:45 +03:00
|
|
|
void wpa_supplicant_ap_rx_eapol(struct wpa_supplicant *wpa_s,
|
|
|
|
const u8 *src_addr, const u8 *buf, size_t len);
|
2011-02-07 18:28:36 +02:00
|
|
|
int wpa_supplicant_ap_wps_pbc(struct wpa_supplicant *wpa_s, const u8 *bssid,
|
|
|
|
const u8 *p2p_dev_addr);
|
2009-04-21 16:45:16 +03:00
|
|
|
int wpa_supplicant_ap_wps_pin(struct wpa_supplicant *wpa_s, const u8 *bssid,
|
2012-10-10 17:22:35 +03:00
|
|
|
const char *pin, char *buf, size_t buflen,
|
|
|
|
int timeout);
|
2010-09-06 20:51:06 +03:00
|
|
|
int wpa_supplicant_ap_wps_cancel(struct wpa_supplicant *wpa_s);
|
2010-11-17 16:46:55 +02:00
|
|
|
void wpas_wps_ap_pin_disable(struct wpa_supplicant *wpa_s);
|
|
|
|
const char * wpas_wps_ap_pin_random(struct wpa_supplicant *wpa_s, int timeout);
|
|
|
|
const char * wpas_wps_ap_pin_get(struct wpa_supplicant *wpa_s);
|
|
|
|
int wpas_wps_ap_pin_set(struct wpa_supplicant *wpa_s, const char *pin,
|
|
|
|
int timeout);
|
2009-09-08 12:58:02 +03:00
|
|
|
int ap_ctrl_iface_sta_first(struct wpa_supplicant *wpa_s,
|
|
|
|
char *buf, size_t buflen);
|
|
|
|
int ap_ctrl_iface_sta(struct wpa_supplicant *wpa_s, const char *txtaddr,
|
|
|
|
char *buf, size_t buflen);
|
|
|
|
int ap_ctrl_iface_sta_next(struct wpa_supplicant *wpa_s, const char *txtaddr,
|
|
|
|
char *buf, size_t buflen);
|
2012-02-25 17:22:48 +02:00
|
|
|
int ap_ctrl_iface_sta_deauthenticate(struct wpa_supplicant *wpa_s,
|
|
|
|
const char *txtaddr);
|
|
|
|
int ap_ctrl_iface_sta_disassociate(struct wpa_supplicant *wpa_s,
|
|
|
|
const char *txtaddr);
|
2009-10-16 18:35:45 +03:00
|
|
|
int ap_ctrl_iface_wpa_get_status(struct wpa_supplicant *wpa_s, char *buf,
|
|
|
|
size_t buflen, int verbose);
|
2009-12-13 23:05:39 +02:00
|
|
|
void ap_tx_status(void *ctx, const u8 *addr,
|
|
|
|
const u8 *buf, size_t len, int ack);
|
2011-11-19 13:00:30 +02:00
|
|
|
void ap_eapol_tx_status(void *ctx, const u8 *dst,
|
|
|
|
const u8 *data, size_t len, int ack);
|
2011-10-20 21:03:08 +03:00
|
|
|
void ap_client_poll_ok(void *ctx, const u8 *addr);
|
2011-10-20 21:51:32 +03:00
|
|
|
void ap_rx_from_unknown_sta(void *ctx, const u8 *addr, int wds);
|
2010-01-03 12:37:02 +02:00
|
|
|
void ap_mgmt_rx(void *ctx, struct rx_mgmt *rx_mgmt);
|
2009-12-13 23:05:39 +02:00
|
|
|
void ap_mgmt_tx_cb(void *ctx, const u8 *buf, size_t len, u16 stype, int ok);
|
2010-07-18 14:30:25 -07:00
|
|
|
int wpa_supplicant_ap_update_beacon(struct wpa_supplicant *wpa_s);
|
2010-04-11 20:08:00 +03:00
|
|
|
int wpa_supplicant_ap_mac_addr_filter(struct wpa_supplicant *wpa_s,
|
|
|
|
const u8 *addr);
|
2010-11-17 16:46:55 +02:00
|
|
|
void wpa_supplicant_ap_pwd_auth_fail(struct wpa_supplicant *wpa_s);
|
2013-11-14 12:28:31 +02:00
|
|
|
int ap_switch_channel(struct wpa_supplicant *wpa_s,
|
|
|
|
struct csa_settings *settings);
|
2013-11-14 12:28:32 +02:00
|
|
|
int ap_ctrl_iface_chanswitch(struct wpa_supplicant *wpa_s, const char *txtaddr);
|
2012-06-25 14:45:14 +03:00
|
|
|
void wpas_ap_ch_switch(struct wpa_supplicant *wpa_s, int freq, int ht,
|
2013-11-25 20:16:12 +01:00
|
|
|
int offset, int width, int cf1, int cf2);
|
2013-02-15 11:45:29 +02:00
|
|
|
struct wpabuf * wpas_ap_wps_nfc_config_token(struct wpa_supplicant *wpa_s,
|
|
|
|
int ndef);
|
2013-09-03 11:27:24 +03:00
|
|
|
#ifdef CONFIG_AP
|
2013-02-15 12:34:55 +02:00
|
|
|
struct wpabuf * wpas_ap_wps_nfc_handover_sel(struct wpa_supplicant *wpa_s,
|
|
|
|
int ndef);
|
2013-09-03 11:27:24 +03:00
|
|
|
#else /* CONFIG_AP */
|
|
|
|
static inline struct wpabuf *
|
|
|
|
wpas_ap_wps_nfc_handover_sel(struct wpa_supplicant *wpa_s,
|
|
|
|
int ndef)
|
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
#endif /* CONFIG_AP */
|
2009-03-26 16:08:17 +02:00
|
|
|
|
2013-04-04 16:43:12 +03:00
|
|
|
int wpas_ap_wps_nfc_report_handover(struct wpa_supplicant *wpa_s,
|
|
|
|
const struct wpabuf *req,
|
|
|
|
const struct wpabuf *sel);
|
2013-04-27 18:50:14 +03:00
|
|
|
int wpas_ap_wps_add_nfc_pw(struct wpa_supplicant *wpa_s, u16 pw_id,
|
|
|
|
const struct wpabuf *pw, const u8 *pubkey_hash);
|
2013-04-04 16:43:12 +03:00
|
|
|
|
2014-09-01 00:23:36 -04:00
|
|
|
struct hostapd_config;
|
2015-09-08 12:46:16 +03:00
|
|
|
int wpa_supplicant_conf_ap_ht(struct wpa_supplicant *wpa_s,
|
|
|
|
struct wpa_ssid *ssid,
|
|
|
|
struct hostapd_config *conf);
|
2014-09-01 00:23:36 -04:00
|
|
|
|
2015-02-08 12:16:13 +02:00
|
|
|
int wpas_ap_stop_ap(struct wpa_supplicant *wpa_s);
|
|
|
|
|
2016-03-09 18:16:12 +09:00
|
|
|
int wpas_ap_pmksa_cache_list(struct wpa_supplicant *wpa_s, char *buf,
|
|
|
|
size_t len);
|
2016-03-09 18:16:13 +09:00
|
|
|
void wpas_ap_pmksa_cache_flush(struct wpa_supplicant *wpa_s);
|
2017-01-02 19:32:07 +09:00
|
|
|
int wpas_ap_pmksa_cache_list_mesh(struct wpa_supplicant *wpa_s, const u8 *addr,
|
|
|
|
char *buf, size_t len);
|
|
|
|
int wpas_ap_pmksa_cache_add_external(struct wpa_supplicant *wpa_s, char *cmd);
|
2016-03-09 18:16:12 +09:00
|
|
|
|
2018-04-04 23:44:07 +03:00
|
|
|
void wpas_ap_event_dfs_radar_detected(struct wpa_supplicant *wpa_s,
|
|
|
|
struct dfs_event *radar);
|
|
|
|
void wpas_ap_event_dfs_cac_started(struct wpa_supplicant *wpa_s,
|
2015-03-04 18:03:39 -08:00
|
|
|
struct dfs_event *radar);
|
2018-04-04 23:44:07 +03:00
|
|
|
void wpas_ap_event_dfs_cac_finished(struct wpa_supplicant *wpa_s,
|
|
|
|
struct dfs_event *radar);
|
|
|
|
void wpas_ap_event_dfs_cac_aborted(struct wpa_supplicant *wpa_s,
|
|
|
|
struct dfs_event *radar);
|
|
|
|
void wpas_ap_event_dfs_cac_nop_finished(struct wpa_supplicant *wpa_s,
|
|
|
|
struct dfs_event *radar);
|
2015-03-04 18:03:39 -08:00
|
|
|
|
2015-07-20 13:33:30 +03:00
|
|
|
void ap_periodic(struct wpa_supplicant *wpa_s);
|
|
|
|
|
2009-03-26 16:08:17 +02:00
|
|
|
#endif /* AP_H */
|