wps_hostapd.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*
  2. * hostapd / WPS integration
  3. * Copyright (c) 2008-2010, Jouni Malinen <j@w1.fi>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License version 2 as
  7. * published by the Free Software Foundation.
  8. *
  9. * Alternatively, this software may be distributed under the terms of BSD
  10. * license.
  11. *
  12. * See README and COPYING for more details.
  13. */
  14. #ifndef WPS_HOSTAPD_H
  15. #define WPS_HOSTAPD_H
  16. #ifdef CONFIG_WPS
  17. int hostapd_init_wps(struct hostapd_data *hapd,
  18. struct hostapd_bss_config *conf);
  19. void hostapd_deinit_wps(struct hostapd_data *hapd);
  20. void hostapd_update_wps(struct hostapd_data *hapd);
  21. int hostapd_wps_add_pin(struct hostapd_data *hapd, const u8 *addr,
  22. const char *uuid, const char *pin, int timeout);
  23. int hostapd_wps_button_pushed(struct hostapd_data *hapd);
  24. int hostapd_wps_start_oob(struct hostapd_data *hapd, char *device_type,
  25. char *path, char *method, char *name);
  26. int hostapd_wps_get_mib_sta(struct hostapd_data *hapd, const u8 *addr,
  27. char *buf, size_t buflen);
  28. void hostapd_wps_ap_pin_disable(struct hostapd_data *hapd);
  29. const char * hostapd_wps_ap_pin_random(struct hostapd_data *hapd, int timeout);
  30. const char * hostapd_wps_ap_pin_get(struct hostapd_data *hapd);
  31. int hostapd_wps_ap_pin_set(struct hostapd_data *hapd, const char *pin,
  32. int timeout);
  33. void hostapd_wps_update_ie(struct hostapd_data *hapd);
  34. int hostapd_wps_config_ap(struct hostapd_data *hapd, const char *ssid,
  35. const char *auth, const char *encr, const char *key);
  36. #else /* CONFIG_WPS */
  37. static inline int hostapd_init_wps(struct hostapd_data *hapd,
  38. struct hostapd_bss_config *conf)
  39. {
  40. return 0;
  41. }
  42. static inline void hostapd_deinit_wps(struct hostapd_data *hapd)
  43. {
  44. }
  45. static inline void hostapd_update_wps(struct hostapd_data *hapd)
  46. {
  47. }
  48. static inline int hostapd_wps_get_mib_sta(struct hostapd_data *hapd,
  49. const u8 *addr,
  50. char *buf, size_t buflen)
  51. {
  52. return 0;
  53. }
  54. static inline int hostapd_wps_button_pushed(struct hostapd_data *hapd)
  55. {
  56. return 0;
  57. }
  58. #endif /* CONFIG_WPS */
  59. #endif /* WPS_HOSTAPD_H */