wps_hostapd.h revision fb79edc9df1f20461e90e478363d207348213d35
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 14int hostapd_init_wps(struct hostapd_data *hapd, 15 struct hostapd_bss_config *conf); 16int hostapd_init_wps_complete(struct hostapd_data *hapd); 17void hostapd_deinit_wps(struct hostapd_data *hapd); 18void hostapd_update_wps(struct hostapd_data *hapd); 19void hostapd_wps_eap_completed(struct hostapd_data *hapd); 20int hostapd_wps_add_pin(struct hostapd_data *hapd, const u8 *addr, 21 const char *uuid, const char *pin, int timeout); 22int hostapd_wps_button_pushed(struct hostapd_data *hapd, 23 const u8 *p2p_dev_addr); 24int hostapd_wps_cancel(struct hostapd_data *hapd); 25int hostapd_wps_get_mib_sta(struct hostapd_data *hapd, const u8 *addr, 26 char *buf, size_t buflen); 27void hostapd_wps_ap_pin_disable(struct hostapd_data *hapd); 28const char * hostapd_wps_ap_pin_random(struct hostapd_data *hapd, int timeout); 29const char * hostapd_wps_ap_pin_get(struct hostapd_data *hapd); 30int hostapd_wps_ap_pin_set(struct hostapd_data *hapd, const char *pin, 31 int timeout); 32void hostapd_wps_update_ie(struct hostapd_data *hapd); 33int hostapd_wps_config_ap(struct hostapd_data *hapd, const char *ssid, 34 const char *auth, const char *encr, const char *key); 35int hostapd_wps_nfc_tag_read(struct hostapd_data *hapd, 36 const struct wpabuf *data); 37struct wpabuf * hostapd_wps_nfc_config_token(struct hostapd_data *hapd, 38 int ndef); 39struct wpabuf * hostapd_wps_nfc_hs_cr(struct hostapd_data *hapd, int ndef); 40struct wpabuf * hostapd_wps_nfc_token_gen(struct hostapd_data *hapd, int ndef); 41int hostapd_wps_nfc_token_enable(struct hostapd_data *hapd); 42void hostapd_wps_nfc_token_disable(struct hostapd_data *hapd); 43 44#else /* CONFIG_WPS */ 45 46static inline int hostapd_init_wps(struct hostapd_data *hapd, 47 struct hostapd_bss_config *conf) 48{ 49 return 0; 50} 51 52static inline void hostapd_deinit_wps(struct hostapd_data *hapd) 53{ 54} 55 56static inline int hostapd_init_wps_complete(struct hostapd_data *hapd) 57{ 58 return 0; 59} 60 61static inline void hostapd_update_wps(struct hostapd_data *hapd) 62{ 63} 64 65static inline void hostapd_wps_eap_completed(struct hostapd_data *hapd) 66{ 67} 68 69static inline int hostapd_wps_get_mib_sta(struct hostapd_data *hapd, 70 const u8 *addr, 71 char *buf, size_t buflen) 72{ 73 return 0; 74} 75 76static inline int hostapd_wps_button_pushed(struct hostapd_data *hapd, 77 const u8 *p2p_dev_addr) 78{ 79 return 0; 80} 81 82static inline int hostapd_wps_cancel(struct hostapd_data *hapd) 83{ 84 return 0; 85} 86 87#endif /* CONFIG_WPS */ 88 89#endif /* WPS_HOSTAPD_H */ 90