wps_supplicant.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. /*
  2. * wpa_supplicant / WPS integration
  3. * Copyright (c) 2008, 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_SUPPLICANT_H
  15. #define WPS_SUPPLICANT_H
  16. #ifdef CONFIG_WPS
  17. #include "wps/wps.h"
  18. #include "wps/wps_defs.h"
  19. int wpas_wps_init(struct wpa_supplicant *wpa_s);
  20. void wpas_wps_deinit(struct wpa_supplicant *wpa_s);
  21. int wpas_wps_eapol_cb(struct wpa_supplicant *wpa_s);
  22. enum wps_request_type wpas_wps_get_req_type(struct wpa_ssid *ssid);
  23. int wpas_wps_start_pbc(struct wpa_supplicant *wpa_s, const u8 *bssid);
  24. int wpas_wps_start_pin(struct wpa_supplicant *wpa_s, const u8 *bssid,
  25. const char *pin);
  26. int wpas_wps_start_reg(struct wpa_supplicant *wpa_s, const u8 *bssid,
  27. const char *pin);
  28. int wpas_wps_ssid_bss_match(struct wpa_supplicant *wpa_s,
  29. struct wpa_ssid *ssid, struct wpa_scan_res *bss);
  30. int wpas_wps_ssid_wildcard_ok(struct wpa_supplicant *wpa_s,
  31. struct wpa_ssid *ssid, struct wpa_scan_res *bss);
  32. int wpas_wps_scan_pbc_overlap(struct wpa_supplicant *wpa_s,
  33. struct wpa_scan_res *selected,
  34. struct wpa_ssid *ssid);
  35. void wpas_wps_notify_scan_results(struct wpa_supplicant *wpa_s);
  36. int wpas_wps_searching(struct wpa_supplicant *wpa_s);
  37. #else /* CONFIG_WPS */
  38. static inline int wpas_wps_init(struct wpa_supplicant *wpa_s)
  39. {
  40. return 0;
  41. }
  42. static inline void wpas_wps_deinit(struct wpa_supplicant *wpa_s)
  43. {
  44. }
  45. static inline int wpas_wps_eapol_cb(struct wpa_supplicant *wpa_s)
  46. {
  47. return 0;
  48. }
  49. static inline u8 wpas_wps_get_req_type(struct wpa_ssid *ssid)
  50. {
  51. return 0;
  52. }
  53. static inline int wpas_wps_ssid_bss_match(struct wpa_supplicant *wpa_s,
  54. struct wpa_ssid *ssid,
  55. struct wpa_scan_res *bss)
  56. {
  57. return -1;
  58. }
  59. static inline int wpas_wps_ssid_wildcard_ok(struct wpa_supplicant *wpa_s,
  60. struct wpa_ssid *ssid,
  61. struct wpa_scan_res *bss)
  62. {
  63. return 0;
  64. }
  65. static inline int wpas_wps_scan_pbc_overlap(struct wpa_supplicant *wpa_s,
  66. struct wpa_scan_res *selected,
  67. struct wpa_ssid *ssid)
  68. {
  69. return 0;
  70. }
  71. static inline void wpas_wps_notify_scan_results(struct wpa_supplicant *wpa_s)
  72. {
  73. }
  74. static inline int wpas_wps_searching(struct wpa_supplicant *wpa_s)
  75. {
  76. return 0;
  77. }
  78. #endif /* CONFIG_WPS */
  79. #endif /* WPS_SUPPLICANT_H */