]> git.ipfire.org Git - thirdparty/hostap.git/blame - wpa_supplicant/ap.h
IEEE 802.1X authenticator: Coding style cleanup
[thirdparty/hostap.git] / wpa_supplicant / ap.h
CommitLineData
1f1b62a0
JM
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 *
0f3d578e
JM
6 * This software may be distributed under the terms of the BSD license.
7 * See README for more details.
1f1b62a0
JM
8 */
9
10#ifndef AP_H
11#define AP_H
12
2d5b792d
JM
13int wpa_supplicant_create_ap(struct wpa_supplicant *wpa_s,
14 struct wpa_ssid *ssid);
15void wpa_supplicant_ap_deinit(struct wpa_supplicant *wpa_s);
db149ac9
JM
16void wpa_supplicant_ap_rx_eapol(struct wpa_supplicant *wpa_s,
17 const u8 *src_addr, const u8 *buf, size_t len);
d601247c
JM
18int wpa_supplicant_ap_wps_pbc(struct wpa_supplicant *wpa_s, const u8 *bssid,
19 const u8 *p2p_dev_addr);
3ec97afe 20int wpa_supplicant_ap_wps_pin(struct wpa_supplicant *wpa_s, const u8 *bssid,
c423708f
JM
21 const char *pin, char *buf, size_t buflen,
22 int timeout);
2f9929ff 23int wpa_supplicant_ap_wps_cancel(struct wpa_supplicant *wpa_s);
70d84f11
JM
24void wpas_wps_ap_pin_disable(struct wpa_supplicant *wpa_s);
25const char * wpas_wps_ap_pin_random(struct wpa_supplicant *wpa_s, int timeout);
26const char * wpas_wps_ap_pin_get(struct wpa_supplicant *wpa_s);
27int wpas_wps_ap_pin_set(struct wpa_supplicant *wpa_s, const char *pin,
28 int timeout);
e653b622
JM
29int ap_ctrl_iface_sta_first(struct wpa_supplicant *wpa_s,
30 char *buf, size_t buflen);
31int ap_ctrl_iface_sta(struct wpa_supplicant *wpa_s, const char *txtaddr,
32 char *buf, size_t buflen);
33int ap_ctrl_iface_sta_next(struct wpa_supplicant *wpa_s, const char *txtaddr,
34 char *buf, size_t buflen);
e60b2951
JJ
35int ap_ctrl_iface_sta_deauthenticate(struct wpa_supplicant *wpa_s,
36 const char *txtaddr);
37int ap_ctrl_iface_sta_disassociate(struct wpa_supplicant *wpa_s,
38 const char *txtaddr);
43fb5297
JM
39int ap_ctrl_iface_wpa_get_status(struct wpa_supplicant *wpa_s, char *buf,
40 size_t buflen, int verbose);
f8b1f695
JM
41void ap_tx_status(void *ctx, const u8 *addr,
42 const u8 *buf, size_t len, int ack);
dd840f79
JB
43void ap_eapol_tx_status(void *ctx, const u8 *dst,
44 const u8 *data, size_t len, int ack);
bcf24348 45void ap_client_poll_ok(void *ctx, const u8 *addr);
9b90955e 46void ap_rx_from_unknown_sta(void *ctx, const u8 *addr, int wds);
2a8b7416 47void ap_mgmt_rx(void *ctx, struct rx_mgmt *rx_mgmt);
f8b1f695 48void ap_mgmt_tx_cb(void *ctx, const u8 *buf, size_t len, u16 stype, int ok);
b22128ef 49int wpa_supplicant_ap_update_beacon(struct wpa_supplicant *wpa_s);
f90ceeaa
JM
50int wpa_supplicant_ap_mac_addr_filter(struct wpa_supplicant *wpa_s,
51 const u8 *addr);
70d84f11 52void wpa_supplicant_ap_pwd_auth_fail(struct wpa_supplicant *wpa_s);
bf281c12
AO
53int ap_switch_channel(struct wpa_supplicant *wpa_s,
54 struct csa_settings *settings);
334bf36a 55int ap_ctrl_iface_chanswitch(struct wpa_supplicant *wpa_s, const char *txtaddr);
1b487b8b 56void wpas_ap_ch_switch(struct wpa_supplicant *wpa_s, int freq, int ht,
95f556f3 57 int offset, int width, int cf1, int cf2, int finished);
bbf41865
JM
58struct wpabuf * wpas_ap_wps_nfc_config_token(struct wpa_supplicant *wpa_s,
59 int ndef);
61971697 60#ifdef CONFIG_AP
5ab9a6a5
JM
61struct wpabuf * wpas_ap_wps_nfc_handover_sel(struct wpa_supplicant *wpa_s,
62 int ndef);
61971697
JM
63#else /* CONFIG_AP */
64static inline struct wpabuf *
65wpas_ap_wps_nfc_handover_sel(struct wpa_supplicant *wpa_s,
66 int ndef)
67{
68 return NULL;
69}
70#endif /* CONFIG_AP */
1f1b62a0 71
d9507936
JM
72int wpas_ap_wps_nfc_report_handover(struct wpa_supplicant *wpa_s,
73 const struct wpabuf *req,
74 const struct wpabuf *sel);
db6ae69e
JM
75int wpas_ap_wps_add_nfc_pw(struct wpa_supplicant *wpa_s, u16 pw_id,
76 const struct wpabuf *pw, const u8 *pubkey_hash);
d9507936 77
5cfb672d 78struct hostapd_config;
73afc20d
AO
79int wpa_supplicant_conf_ap_ht(struct wpa_supplicant *wpa_s,
80 struct wpa_ssid *ssid,
81 struct hostapd_config *conf);
5cfb672d 82
99650cad
JM
83int wpas_ap_stop_ap(struct wpa_supplicant *wpa_s);
84
b8daac18
MH
85int wpas_ap_pmksa_cache_list(struct wpa_supplicant *wpa_s, char *buf,
86 size_t len);
4c522c77 87void wpas_ap_pmksa_cache_flush(struct wpa_supplicant *wpa_s);
4d77d80e
MH
88int wpas_ap_pmksa_cache_list_mesh(struct wpa_supplicant *wpa_s, const u8 *addr,
89 char *buf, size_t len);
90int wpas_ap_pmksa_cache_add_external(struct wpa_supplicant *wpa_s, char *cmd);
b8daac18 91
2dd5fbbf
DL
92void wpas_ap_event_dfs_radar_detected(struct wpa_supplicant *wpa_s,
93 struct dfs_event *radar);
94void wpas_ap_event_dfs_cac_started(struct wpa_supplicant *wpa_s,
bd0f68c4 95 struct dfs_event *radar);
2dd5fbbf
DL
96void wpas_ap_event_dfs_cac_finished(struct wpa_supplicant *wpa_s,
97 struct dfs_event *radar);
98void wpas_ap_event_dfs_cac_aborted(struct wpa_supplicant *wpa_s,
99 struct dfs_event *radar);
100void wpas_ap_event_dfs_cac_nop_finished(struct wpa_supplicant *wpa_s,
101 struct dfs_event *radar);
bd0f68c4 102
3188aaba
JM
103void ap_periodic(struct wpa_supplicant *wpa_s);
104
1f1b62a0 105#endif /* AP_H */