preauth.h

Go to the documentation of this file.
00001 
00016 #ifndef PREAUTH_H
00017 #define PREAUTH_H
00018 
00019 struct wpa_scan_result;
00020 
00021 #ifndef CONFIG_NO_WPA
00022 
00023 void pmksa_cache_free(struct wpa_sm *sm);
00024 struct rsn_pmksa_cache * pmksa_cache_get(struct wpa_sm *sm,
00025                                          const u8 *aa, const u8 *pmkid);
00026 int pmksa_cache_list(struct wpa_sm *sm, char *buf, size_t len);
00027 void pmksa_candidate_free(struct wpa_sm *sm);
00028 struct rsn_pmksa_cache *
00029 pmksa_cache_add(struct wpa_sm *sm, const u8 *pmk,
00030                 size_t pmk_len, const u8 *aa, const u8 *spa,
00031                 struct wpa_ssid *ssid);
00032 void pmksa_cache_notify_reconfig(struct wpa_sm *sm);
00033 struct rsn_pmksa_cache * pmksa_cache_get_current(struct wpa_sm *sm);
00034 void pmksa_cache_clear_current(struct wpa_sm *sm);
00035 int pmksa_cache_set_current(struct wpa_sm *sm, const u8 *pmkid,
00036                             const u8 *bssid, struct wpa_ssid *ssid,
00037                             int try_opportunistic);
00038 
00039 #else /* CONFIG_NO_WPA */
00040 
00041 static inline void pmksa_cache_free(struct wpa_sm *sm)
00042 {
00043 }
00044 
00045 static inline void pmksa_candidate_free(struct wpa_sm *sm)
00046 {
00047 }
00048 
00049 static inline void pmksa_cache_notify_reconfig(struct wpa_sm *sm)
00050 {
00051 }
00052 
00053 static inline struct rsn_pmksa_cache *
00054 pmksa_cache_get_current(struct wpa_sm *sm)
00055 {
00056         return NULL;
00057 }
00058 
00059 static inline int pmksa_cache_list(struct wpa_sm *sm, char *buf, size_t len)
00060 {
00061         return -1;
00062 }
00063 
00064 static inline void pmksa_cache_clear_current(struct wpa_sm *sm)
00065 {
00066 }
00067 
00068 static inline int pmksa_cache_set_current(struct wpa_sm *sm, const u8 *pmkid,
00069                                           const u8 *bssid,
00070                                           struct wpa_ssid *ssid,
00071                                           int try_opportunistic)
00072 {
00073         return -1;
00074 }
00075 
00076 #endif /* CONFIG_NO_WPA */
00077 
00078 
00079 #if defined(IEEE8021X_EAPOL) && !defined(CONFIG_NO_WPA)
00080 
00081 int rsn_preauth_init(struct wpa_sm *sm, const u8 *dst,
00082                      struct wpa_ssid *config);
00083 void rsn_preauth_deinit(struct wpa_sm *sm);
00084 void rsn_preauth_scan_results(struct wpa_sm *sm,
00085                               struct wpa_scan_result *results, int count);
00086 void pmksa_candidate_add(struct wpa_sm *sm, const u8 *bssid,
00087                          int prio, int preauth);
00088 void rsn_preauth_candidate_process(struct wpa_sm *sm);
00089 int rsn_preauth_get_status(struct wpa_sm *sm, char *buf, size_t buflen,
00090                            int verbose);
00091 int rsn_preauth_in_progress(struct wpa_sm *sm);
00092 
00093 #else /* IEEE8021X_EAPOL and !CONFIG_NO_WPA */
00094 
00095 static inline void rsn_preauth_candidate_process(struct wpa_sm *sm)
00096 {
00097 }
00098 
00099 static inline int rsn_preauth_init(struct wpa_sm *sm, const u8 *dst,
00100                                    struct wpa_ssid *config)
00101 {
00102         return -1;
00103 }
00104 
00105 static inline void rsn_preauth_deinit(struct wpa_sm *sm)
00106 {
00107 }
00108 static inline void rsn_preauth_scan_results(struct wpa_sm *sm,
00109                                             struct wpa_scan_result *results,
00110                                             int count)
00111 {
00112 }
00113 
00114 static inline void pmksa_candidate_add(struct wpa_sm *sm,
00115                                        const u8 *bssid,
00116                                        int prio, int preauth)
00117 {
00118 }
00119 
00120 static inline int rsn_preauth_get_status(struct wpa_sm *sm, char *buf,
00121                                          size_t buflen, int verbose)
00122 {
00123         return 0;
00124 }
00125 
00126 static inline int rsn_preauth_in_progress(struct wpa_sm *sm)
00127 {
00128         return 0;
00129 }
00130 
00131 #endif /* IEEE8021X_EAPOL and !CONFIG_NO_WPA */
00132 
00133 #endif /* PREAUTH_H */
00134 

Generated on Sat May 6 21:13:37 2006 for wpa_supplicant by  doxygen 1.4.2