1 /*
2 * hostapd / WPS integration
3 * Copyright (c) 2008-2012, Jouni Malinen <j@w1.fi>
4 *
5 * This software may be distributed under the terms of the BSD license.
6 * See README for more details.
7 */
8
9 #ifndef WPS_HOSTAPD_H
10 #define WPS_HOSTAPD_H
11
12 #ifdef CONFIG_WPS
13
14 int hostapd_init_wps(struct hostapd_data *hapd, struct wps_data *wps_data, struct wps_context *wps);
15 int hostapd_init_wps_complete(struct hostapd_data *hapd);
16 void hostapd_deinit_wps(struct hostapd_data *hapd);
17 void hostapd_update_wps(struct hostapd_data *hapd);
18 void hostapd_wps_eap_completed(struct hostapd_data *hapd);
19 int hostapd_wps_add_pin(struct hostapd_data *hapd, const u8 *pin);
20 int hostapd_wps_button_pushed(struct hostapd_data *hapd,
21 const u8 *p2p_dev_addr);
22 int hostapd_wps_cancel(struct hostapd_data *hapd);
23 int hostapd_wps_get_mib_sta(struct hostapd_data *hapd, const u8 *addr,
24 char *buf, size_t buflen);
25 void hostapd_wps_ap_pin_disable(struct hostapd_data *hapd);
26 const char * hostapd_wps_ap_pin_random(struct hostapd_data *hapd, int timeout);
27 const char * hostapd_wps_ap_pin_get(struct hostapd_data *hapd);
28 int hostapd_wps_ap_pin_set(struct hostapd_data *hapd, const char *pin,
29 int timeout);
30 void hostapd_wps_update_ie(struct hostapd_data *hapd);
31 int hostapd_wps_config_ap(struct hostapd_data *hapd, struct wps_data *wps_data);
32 int hostapd_wps_nfc_tag_read(struct hostapd_data *hapd,
33 const struct wpabuf *data);
34 #else /* CONFIG_WPS */
35
hostapd_init_wps(struct hostapd_data * hapd,struct wps_data * wps_data,struct wps_context * wps)36 static inline int hostapd_init_wps(struct hostapd_data *hapd, struct wps_data *wps_data, struct wps_context *wps)
37 {
38 return 0;
39 }
40
hostapd_deinit_wps(struct hostapd_data * hapd)41 static inline void hostapd_deinit_wps(struct hostapd_data *hapd)
42 {
43 }
44
hostapd_init_wps_complete(struct hostapd_data * hapd)45 static inline int hostapd_init_wps_complete(struct hostapd_data *hapd)
46 {
47 return 0;
48 }
49
hostapd_update_wps(struct hostapd_data * hapd)50 static inline void hostapd_update_wps(struct hostapd_data *hapd)
51 {
52 }
53
hostapd_wps_eap_completed(struct hostapd_data * hapd)54 static inline void hostapd_wps_eap_completed(struct hostapd_data *hapd)
55 {
56 }
57
hostapd_wps_get_mib_sta(struct hostapd_data * hapd,const u8 * addr,char * buf,size_t buflen)58 static inline int hostapd_wps_get_mib_sta(struct hostapd_data *hapd,
59 const u8 *addr,
60 char *buf, size_t buflen)
61 {
62 return 0;
63 }
64
hostapd_wps_button_pushed(struct hostapd_data * hapd,const u8 * p2p_dev_addr)65 static inline int hostapd_wps_button_pushed(struct hostapd_data *hapd,
66 const u8 *p2p_dev_addr)
67 {
68 return 0;
69 }
70
hostapd_wps_cancel(struct hostapd_data * hapd)71 static inline int hostapd_wps_cancel(struct hostapd_data *hapd)
72 {
73 return 0;
74 }
75
76 #endif /* CONFIG_WPS */
77
78 #endif /* WPS_HOSTAPD_H */
79