2008-11-23 18:34:26 +01:00
|
|
|
/*
|
|
|
|
* hostapd / WPS integration
|
2012-06-27 19:54:56 +02:00
|
|
|
* Copyright (c) 2008-2012, Jouni Malinen <j@w1.fi>
|
2008-11-23 18:34:26 +01:00
|
|
|
*
|
2012-02-11 15:46:35 +01:00
|
|
|
* This software may be distributed under the terms of the BSD license.
|
|
|
|
* See README for more details.
|
2008-11-23 18:34:26 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef WPS_HOSTAPD_H
|
|
|
|
#define WPS_HOSTAPD_H
|
|
|
|
|
|
|
|
#ifdef CONFIG_WPS
|
|
|
|
|
|
|
|
int hostapd_init_wps(struct hostapd_data *hapd,
|
|
|
|
struct hostapd_bss_config *conf);
|
2011-05-19 11:55:47 +02:00
|
|
|
int hostapd_init_wps_complete(struct hostapd_data *hapd);
|
2008-11-23 18:34:26 +01:00
|
|
|
void hostapd_deinit_wps(struct hostapd_data *hapd);
|
2010-05-02 10:21:19 +02:00
|
|
|
void hostapd_update_wps(struct hostapd_data *hapd);
|
2013-11-29 15:52:44 +01:00
|
|
|
void hostapd_wps_eap_completed(struct hostapd_data *hapd);
|
2009-12-12 15:40:10 +01:00
|
|
|
int hostapd_wps_add_pin(struct hostapd_data *hapd, const u8 *addr,
|
|
|
|
const char *uuid, const char *pin, int timeout);
|
2011-02-07 17:28:36 +01:00
|
|
|
int hostapd_wps_button_pushed(struct hostapd_data *hapd,
|
|
|
|
const u8 *p2p_dev_addr);
|
2012-03-19 07:23:31 +01:00
|
|
|
int hostapd_wps_cancel(struct hostapd_data *hapd);
|
2009-09-07 21:09:13 +02:00
|
|
|
int hostapd_wps_get_mib_sta(struct hostapd_data *hapd, const u8 *addr,
|
|
|
|
char *buf, size_t buflen);
|
2010-08-24 15:35:37 +02:00
|
|
|
void hostapd_wps_ap_pin_disable(struct hostapd_data *hapd);
|
|
|
|
const char * hostapd_wps_ap_pin_random(struct hostapd_data *hapd, int timeout);
|
|
|
|
const char * hostapd_wps_ap_pin_get(struct hostapd_data *hapd);
|
|
|
|
int hostapd_wps_ap_pin_set(struct hostapd_data *hapd, const char *pin,
|
|
|
|
int timeout);
|
2010-10-19 18:57:01 +02:00
|
|
|
void hostapd_wps_update_ie(struct hostapd_data *hapd);
|
2010-10-21 15:49:41 +02:00
|
|
|
int hostapd_wps_config_ap(struct hostapd_data *hapd, const char *ssid,
|
|
|
|
const char *auth, const char *encr, const char *key);
|
2012-06-27 19:54:56 +02:00
|
|
|
int hostapd_wps_nfc_tag_read(struct hostapd_data *hapd,
|
|
|
|
const struct wpabuf *data);
|
2012-06-28 12:25:48 +02:00
|
|
|
struct wpabuf * hostapd_wps_nfc_config_token(struct hostapd_data *hapd,
|
|
|
|
int ndef);
|
2013-02-10 16:12:55 +01:00
|
|
|
struct wpabuf * hostapd_wps_nfc_hs_cr(struct hostapd_data *hapd, int ndef);
|
2013-04-02 17:30:58 +02:00
|
|
|
int hostapd_wps_nfc_report_handover(struct hostapd_data *hapd,
|
|
|
|
const struct wpabuf *req,
|
|
|
|
const struct wpabuf *sel);
|
2012-06-28 18:43:29 +02:00
|
|
|
struct wpabuf * hostapd_wps_nfc_token_gen(struct hostapd_data *hapd, int ndef);
|
|
|
|
int hostapd_wps_nfc_token_enable(struct hostapd_data *hapd);
|
|
|
|
void hostapd_wps_nfc_token_disable(struct hostapd_data *hapd);
|
2008-11-23 18:34:26 +01:00
|
|
|
|
|
|
|
#else /* CONFIG_WPS */
|
|
|
|
|
|
|
|
static inline int hostapd_init_wps(struct hostapd_data *hapd,
|
|
|
|
struct hostapd_bss_config *conf)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void hostapd_deinit_wps(struct hostapd_data *hapd)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2011-05-19 11:55:47 +02:00
|
|
|
static inline int hostapd_init_wps_complete(struct hostapd_data *hapd)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2010-05-02 10:21:19 +02:00
|
|
|
static inline void hostapd_update_wps(struct hostapd_data *hapd)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2013-11-29 15:52:44 +01:00
|
|
|
static inline void hostapd_wps_eap_completed(struct hostapd_data *hapd)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2009-09-07 21:09:13 +02:00
|
|
|
static inline int hostapd_wps_get_mib_sta(struct hostapd_data *hapd,
|
|
|
|
const u8 *addr,
|
|
|
|
char *buf, size_t buflen)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2011-02-07 17:28:36 +01:00
|
|
|
static inline int hostapd_wps_button_pushed(struct hostapd_data *hapd,
|
|
|
|
const u8 *p2p_dev_addr)
|
2009-12-03 23:29:10 +01:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2012-03-19 07:23:31 +01:00
|
|
|
static inline int hostapd_wps_cancel(struct hostapd_data *hapd)
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2008-11-23 18:34:26 +01:00
|
|
|
#endif /* CONFIG_WPS */
|
|
|
|
|
|
|
|
#endif /* WPS_HOSTAPD_H */
|