wps_hostapd.h revision 214734
1219820Sjeff/* 2219820Sjeff * hostapd / WPS integration 3219820Sjeff * Copyright (c) 2008-2010, Jouni Malinen <j@w1.fi> 4219820Sjeff * 5219820Sjeff * This program is free software; you can redistribute it and/or modify 6219820Sjeff * it under the terms of the GNU General Public License version 2 as 7219820Sjeff * published by the Free Software Foundation. 8219820Sjeff * 9219820Sjeff * Alternatively, this software may be distributed under the terms of BSD 10219820Sjeff * license. 11219820Sjeff * 12219820Sjeff * See README and COPYING for more details. 13219820Sjeff */ 14219820Sjeff 15219820Sjeff#ifndef WPS_HOSTAPD_H 16219820Sjeff#define WPS_HOSTAPD_H 17219820Sjeff 18219820Sjeff#ifdef CONFIG_WPS 19219820Sjeff 20219820Sjeffint hostapd_init_wps(struct hostapd_data *hapd, 21219820Sjeff struct hostapd_bss_config *conf); 22219820Sjeffvoid hostapd_deinit_wps(struct hostapd_data *hapd); 23219820Sjeffvoid hostapd_update_wps(struct hostapd_data *hapd); 24219820Sjeffint hostapd_wps_add_pin(struct hostapd_data *hapd, const char *uuid, 25219820Sjeff const char *pin, int timeout); 26219820Sjeffint hostapd_wps_button_pushed(struct hostapd_data *hapd); 27219820Sjeffint hostapd_wps_start_oob(struct hostapd_data *hapd, char *device_type, 28219820Sjeff char *path, char *method, char *name); 29219820Sjeffint hostapd_wps_get_mib_sta(struct hostapd_data *hapd, const u8 *addr, 30219820Sjeff char *buf, size_t buflen); 31219820Sjeffvoid hostapd_wps_ap_pin_disable(struct hostapd_data *hapd); 32219820Sjeffconst char * hostapd_wps_ap_pin_random(struct hostapd_data *hapd, int timeout); 33219820Sjeffconst char * hostapd_wps_ap_pin_get(struct hostapd_data *hapd); 34219820Sjeffint hostapd_wps_ap_pin_set(struct hostapd_data *hapd, const char *pin, 35219820Sjeff int timeout); 36219820Sjeff 37219820Sjeff#else /* CONFIG_WPS */ 38219820Sjeff 39219820Sjeffstatic inline int hostapd_init_wps(struct hostapd_data *hapd, 40219820Sjeff struct hostapd_bss_config *conf) 41219820Sjeff{ 42219820Sjeff return 0; 43219820Sjeff} 44219820Sjeff 45219820Sjeffstatic inline void hostapd_deinit_wps(struct hostapd_data *hapd) 46219820Sjeff{ 47219820Sjeff} 48219820Sjeff 49219820Sjeffstatic inline void hostapd_update_wps(struct hostapd_data *hapd) 50219820Sjeff{ 51219820Sjeff} 52219820Sjeff 53219820Sjeffstatic inline int hostapd_wps_get_mib_sta(struct hostapd_data *hapd, 54219820Sjeff const u8 *addr, 55219820Sjeff char *buf, size_t buflen) 56219820Sjeff{ 57219820Sjeff return 0; 58219820Sjeff} 59219820Sjeff 60219820Sjeffstatic inline int hostapd_wps_button_pushed(struct hostapd_data *hapd) 61219820Sjeff{ 62219820Sjeff return 0; 63219820Sjeff} 64219820Sjeff 65219820Sjeff#endif /* CONFIG_WPS */ 66219820Sjeff 67219820Sjeff#endif /* WPS_HOSTAPD_H */ 68219820Sjeff