• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * hostapd / WPS integration
3  * Copyright (c) 2008-2010, 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,
15 		     struct hostapd_bss_config *conf);
16 int hostapd_init_wps_complete(struct hostapd_data *hapd);
17 void hostapd_deinit_wps(struct hostapd_data *hapd);
18 void hostapd_update_wps(struct hostapd_data *hapd);
19 int hostapd_wps_add_pin(struct hostapd_data *hapd, const u8 *addr,
20 			const char *uuid, const char *pin, int timeout);
21 int hostapd_wps_button_pushed(struct hostapd_data *hapd,
22 			      const u8 *p2p_dev_addr);
23 int hostapd_wps_start_oob(struct hostapd_data *hapd, char *device_type,
24 			  char *path, char *method, char *name);
25 int hostapd_wps_get_mib_sta(struct hostapd_data *hapd, const u8 *addr,
26 			    char *buf, size_t buflen);
27 void hostapd_wps_ap_pin_disable(struct hostapd_data *hapd);
28 const char * hostapd_wps_ap_pin_random(struct hostapd_data *hapd, int timeout);
29 const char * hostapd_wps_ap_pin_get(struct hostapd_data *hapd);
30 int hostapd_wps_ap_pin_set(struct hostapd_data *hapd, const char *pin,
31 			   int timeout);
32 void hostapd_wps_update_ie(struct hostapd_data *hapd);
33 int hostapd_wps_config_ap(struct hostapd_data *hapd, const char *ssid,
34 			  const char *auth, const char *encr, const char *key);
35 
36 #else /* CONFIG_WPS */
37 
hostapd_init_wps(struct hostapd_data * hapd,struct hostapd_bss_config * conf)38 static inline int hostapd_init_wps(struct hostapd_data *hapd,
39 				   struct hostapd_bss_config *conf)
40 {
41 	return 0;
42 }
43 
hostapd_deinit_wps(struct hostapd_data * hapd)44 static inline void hostapd_deinit_wps(struct hostapd_data *hapd)
45 {
46 }
47 
hostapd_init_wps_complete(struct hostapd_data * hapd)48 static inline int hostapd_init_wps_complete(struct hostapd_data *hapd)
49 {
50     return 0;
51 }
52 
hostapd_update_wps(struct hostapd_data * hapd)53 static inline void hostapd_update_wps(struct hostapd_data *hapd)
54 {
55 }
56 
hostapd_wps_get_mib_sta(struct hostapd_data * hapd,const u8 * addr,char * buf,size_t buflen)57 static inline int hostapd_wps_get_mib_sta(struct hostapd_data *hapd,
58 					  const u8 *addr,
59 					  char *buf, size_t buflen)
60 {
61 	return 0;
62 }
63 
hostapd_wps_button_pushed(struct hostapd_data * hapd,const u8 * p2p_dev_addr)64 static inline int hostapd_wps_button_pushed(struct hostapd_data *hapd,
65 					    const u8 *p2p_dev_addr)
66 {
67 	return 0;
68 }
69 
70 #endif /* CONFIG_WPS */
71 
72 #endif /* WPS_HOSTAPD_H */
73