wps_supplicant.h
Go to the documentation of this file.
00001 /*
00002  * wpa_supplicant / WPS integration
00003  * Copyright (c) 2008-2009, Jouni Malinen <j@w1.fi>
00004  *
00005  * This program is free software; you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License version 2 as
00007  * published by the Free Software Foundation.
00008  *
00009  * Alternatively, this software may be distributed under the terms of BSD
00010  * license.
00011  *
00012  * See README and COPYING for more details.
00013  */
00014 
00015 #ifndef WPS_SUPPLICANT_H
00016 #define WPS_SUPPLICANT_H
00017 
00018 struct wpa_scan_res;
00019 
00020 #ifdef CONFIG_WPS
00021 
00022 #include "wps/wps.h"
00023 #include "wps/wps_defs.h"
00024 
00025 struct wpa_bss;
00026 
00027 struct wps_new_ap_settings {
00028         const char *ssid_hex;
00029         const char *auth;
00030         const char *encr;
00031         const char *key_hex;
00032 };
00033 
00034 int wpas_wps_init(struct wpa_supplicant *wpa_s);
00035 void wpas_wps_deinit(struct wpa_supplicant *wpa_s);
00036 int wpas_wps_eapol_cb(struct wpa_supplicant *wpa_s);
00037 enum wps_request_type wpas_wps_get_req_type(struct wpa_ssid *ssid);
00038 int wpas_wps_start_pbc(struct wpa_supplicant *wpa_s, const u8 *bssid);
00039 int wpas_wps_start_pin(struct wpa_supplicant *wpa_s, const u8 *bssid,
00040                        const char *pin);
00041 int wpas_wps_start_oob(struct wpa_supplicant *wpa_s, char *device_type,
00042                        char *path, char *method, char *name);
00043 int wpas_wps_start_reg(struct wpa_supplicant *wpa_s, const u8 *bssid,
00044                        const char *pin, struct wps_new_ap_settings *settings);
00045 int wpas_wps_ssid_bss_match(struct wpa_supplicant *wpa_s,
00046                             struct wpa_ssid *ssid, struct wpa_scan_res *bss);
00047 int wpas_wps_ssid_wildcard_ok(struct wpa_supplicant *wpa_s,
00048                               struct wpa_ssid *ssid, struct wpa_scan_res *bss);
00049 int wpas_wps_scan_pbc_overlap(struct wpa_supplicant *wpa_s,
00050                               struct wpa_bss *selected, struct wpa_ssid *ssid);
00051 void wpas_wps_notify_scan_results(struct wpa_supplicant *wpa_s);
00052 int wpas_wps_searching(struct wpa_supplicant *wpa_s);
00053 int wpas_wps_scan_result_text(const u8 *ies, size_t ies_len, char *pos,
00054                               char *end);
00055 int wpas_wps_er_start(struct wpa_supplicant *wpa_s);
00056 int wpas_wps_er_stop(struct wpa_supplicant *wpa_s);
00057 int wpas_wps_er_add_pin(struct wpa_supplicant *wpa_s, const char *uuid,
00058                         const char *pin);
00059 int wpas_wps_er_pbc(struct wpa_supplicant *wpa_s, const char *uuid);
00060 int wpas_wps_er_learn(struct wpa_supplicant *wpa_s, const char *uuid,
00061                       const char *pin);
00062 int wpas_wps_terminate_pending(struct wpa_supplicant *wpa_s);
00063 
00064 #else /* CONFIG_WPS */
00065 
00066 static inline int wpas_wps_init(struct wpa_supplicant *wpa_s)
00067 {
00068         return 0;
00069 }
00070 
00071 static inline void wpas_wps_deinit(struct wpa_supplicant *wpa_s)
00072 {
00073 }
00074 
00075 static inline int wpas_wps_eapol_cb(struct wpa_supplicant *wpa_s)
00076 {
00077         return 0;
00078 }
00079 
00080 static inline u8 wpas_wps_get_req_type(struct wpa_ssid *ssid)
00081 {
00082         return 0;
00083 }
00084 
00085 static inline int wpas_wps_ssid_bss_match(struct wpa_supplicant *wpa_s,
00086                                           struct wpa_ssid *ssid,
00087                                           struct wpa_scan_res *bss)
00088 {
00089         return -1;
00090 }
00091 
00092 static inline int wpas_wps_ssid_wildcard_ok(struct wpa_supplicant *wpa_s,
00093                                             struct wpa_ssid *ssid,
00094                                             struct wpa_scan_res *bss)
00095 {
00096         return 0;
00097 }
00098 
00099 static inline int wpas_wps_scan_pbc_overlap(struct wpa_supplicant *wpa_s,
00100                                             struct wpa_bss *selected,
00101                                             struct wpa_ssid *ssid)
00102 {
00103         return 0;
00104 }
00105 
00106 static inline void wpas_wps_notify_scan_results(struct wpa_supplicant *wpa_s)
00107 {
00108 }
00109 
00110 static inline int wpas_wps_searching(struct wpa_supplicant *wpa_s)
00111 {
00112         return 0;
00113 }
00114 
00115 #endif /* CONFIG_WPS */
00116 
00117 #endif /* WPS_SUPPLICANT_H */


wpa_supplicant_node
Author(s): Package maintained by Blaise Gassend
autogenerated on Thu Apr 24 2014 15:33:22