wpa_supplicant / hostapd 2.0

wps_supplicant.h

Go to the documentation of this file.
00001 
00010 #ifndef WPS_SUPPLICANT_H
00011 #define WPS_SUPPLICANT_H
00012 
00013 struct wpa_scan_res;
00014 
00015 #ifdef CONFIG_WPS
00016 
00017 #include "wps/wps.h"
00018 #include "wps/wps_defs.h"
00019 
00020 struct wpa_bss;
00021 
00022 struct wps_new_ap_settings {
00023         const char *ssid_hex;
00024         const char *auth;
00025         const char *encr;
00026         const char *key_hex;
00027 };
00028 
00029 int wpas_wps_init(struct wpa_supplicant *wpa_s);
00030 void wpas_wps_deinit(struct wpa_supplicant *wpa_s);
00031 int wpas_wps_eapol_cb(struct wpa_supplicant *wpa_s);
00032 enum wps_request_type wpas_wps_get_req_type(struct wpa_ssid *ssid);
00033 int wpas_wps_start_pbc(struct wpa_supplicant *wpa_s, const u8 *bssid,
00034                        int p2p_group);
00035 int wpas_wps_start_pin(struct wpa_supplicant *wpa_s, const u8 *bssid,
00036                        const char *pin, int p2p_group, u16 dev_pw_id);
00037 int wpas_wps_cancel(struct wpa_supplicant *wpa_s);
00038 int wpas_wps_start_oob(struct wpa_supplicant *wpa_s, char *device_type,
00039                        char *path, char *method, char *name);
00040 int wpas_wps_start_reg(struct wpa_supplicant *wpa_s, const u8 *bssid,
00041                        const char *pin, struct wps_new_ap_settings *settings);
00042 int wpas_wps_ssid_bss_match(struct wpa_supplicant *wpa_s,
00043                             struct wpa_ssid *ssid, struct wpa_scan_res *bss);
00044 int wpas_wps_ssid_wildcard_ok(struct wpa_supplicant *wpa_s,
00045                               struct wpa_ssid *ssid, struct wpa_scan_res *bss);
00046 int wpas_wps_scan_pbc_overlap(struct wpa_supplicant *wpa_s,
00047                               struct wpa_bss *selected, struct wpa_ssid *ssid);
00048 void wpas_wps_notify_scan_results(struct wpa_supplicant *wpa_s);
00049 int wpas_wps_searching(struct wpa_supplicant *wpa_s);
00050 int wpas_wps_scan_result_text(const u8 *ies, size_t ies_len, char *pos,
00051                               char *end);
00052 int wpas_wps_er_start(struct wpa_supplicant *wpa_s, const char *filter);
00053 int wpas_wps_er_stop(struct wpa_supplicant *wpa_s);
00054 int wpas_wps_er_add_pin(struct wpa_supplicant *wpa_s, const u8 *addr,
00055                         const char *uuid, const char *pin);
00056 int wpas_wps_er_pbc(struct wpa_supplicant *wpa_s, const char *uuid);
00057 int wpas_wps_er_learn(struct wpa_supplicant *wpa_s, const char *uuid,
00058                       const char *pin);
00059 int wpas_wps_er_set_config(struct wpa_supplicant *wpa_s, const char *uuid,
00060                            int id);
00061 int wpas_wps_er_config(struct wpa_supplicant *wpa_s, const char *uuid,
00062                        const char *pin, struct wps_new_ap_settings *settings);
00063 int wpas_wps_terminate_pending(struct wpa_supplicant *wpa_s);
00064 int wpas_wps_in_progress(struct wpa_supplicant *wpa_s);
00065 void wpas_wps_update_config(struct wpa_supplicant *wpa_s);
00066 
00067 #else /* CONFIG_WPS */
00068 
00069 static inline int wpas_wps_init(struct wpa_supplicant *wpa_s)
00070 {
00071         return 0;
00072 }
00073 
00074 static inline void wpas_wps_deinit(struct wpa_supplicant *wpa_s)
00075 {
00076 }
00077 
00078 static inline int wpas_wps_eapol_cb(struct wpa_supplicant *wpa_s)
00079 {
00080         return 0;
00081 }
00082 
00083 static inline u8 wpas_wps_get_req_type(struct wpa_ssid *ssid)
00084 {
00085         return 0;
00086 }
00087 
00088 static inline int wpas_wps_ssid_bss_match(struct wpa_supplicant *wpa_s,
00089                                           struct wpa_ssid *ssid,
00090                                           struct wpa_scan_res *bss)
00091 {
00092         return -1;
00093 }
00094 
00095 static inline int wpas_wps_ssid_wildcard_ok(struct wpa_supplicant *wpa_s,
00096                                             struct wpa_ssid *ssid,
00097                                             struct wpa_scan_res *bss)
00098 {
00099         return 0;
00100 }
00101 
00102 static inline int wpas_wps_scan_pbc_overlap(struct wpa_supplicant *wpa_s,
00103                                             struct wpa_bss *selected,
00104                                             struct wpa_ssid *ssid)
00105 {
00106         return 0;
00107 }
00108 
00109 static inline void wpas_wps_notify_scan_results(struct wpa_supplicant *wpa_s)
00110 {
00111 }
00112 
00113 static inline int wpas_wps_searching(struct wpa_supplicant *wpa_s)
00114 {
00115         return 0;
00116 }
00117 
00118 #endif /* CONFIG_WPS */
00119 
00120 #endif /* WPS_SUPPLICANT_H */
00121 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines