mlme.h
Go to the documentation of this file.
00001 /*
00002  * WPA Supplicant - Client mode MLME
00003  * Copyright (c) 2003-2007, Jouni Malinen <j@w1.fi>
00004  * Copyright (c) 2004, Instant802 Networks, Inc.
00005  * Copyright (c) 2005-2006, Devicescape Software, Inc.
00006  *
00007  * This program is free software; you can redistribute it and/or modify
00008  * it under the terms of the GNU General Public License version 2 as
00009  * published by the Free Software Foundation.
00010  *
00011  * Alternatively, this software may be distributed under the terms of BSD
00012  * license.
00013  *
00014  * See README and COPYING for more details.
00015  */
00016 
00017 #ifndef MLME_H
00018 #define MLME_H
00019 
00020 struct wpa_supplicant;
00021 
00022 struct ieee80211_rx_status {
00023         int freq;
00024         int channel;
00025         int ssi;
00026 };
00027 
00028 #ifdef CONFIG_CLIENT_MLME
00029 
00030 int ieee80211_sta_init(struct wpa_supplicant *wpa_s);
00031 void ieee80211_sta_deinit(struct wpa_supplicant *wpa_s);
00032 int ieee80211_sta_req_scan(struct wpa_supplicant *wpa_s,
00033                            struct wpa_driver_scan_params *params);
00034 int ieee80211_sta_deauthenticate(struct wpa_supplicant *wpa_s, u16 reason);
00035 int ieee80211_sta_disassociate(struct wpa_supplicant *wpa_s, u16 reason);
00036 int ieee80211_sta_associate(struct wpa_supplicant *wpa_s,
00037                             struct wpa_driver_associate_params *params);
00038 int ieee80211_sta_get_ssid(struct wpa_supplicant *wpa_s, u8 *ssid,
00039                            size_t *len);
00040 void ieee80211_sta_free_hw_features(struct hostapd_hw_modes *hw_features,
00041                                     size_t num_hw_features);
00042 void ieee80211_sta_rx(struct wpa_supplicant *wpa_s, const u8 *buf, size_t len,
00043                       struct ieee80211_rx_status *rx_status);
00044 struct wpa_scan_results *
00045 ieee80211_sta_get_scan_results(struct wpa_supplicant *wpa_s);
00046 int ieee80211_sta_update_ft_ies(struct wpa_supplicant *wpa_s, const u8 *md,
00047                                 const u8 *ies, size_t ies_len);
00048 int ieee80211_sta_send_ft_action(struct wpa_supplicant *wpa_s, u8 action,
00049                                  const u8 *target_ap,
00050                                  const u8 *ies, size_t ies_len);
00051 
00052 #else /* CONFIG_CLIENT_MLME */
00053 
00054 static inline int ieee80211_sta_init(struct wpa_supplicant *wpa_s)
00055 {
00056         return 0;
00057 }
00058 
00059 static inline void ieee80211_sta_deinit(struct wpa_supplicant *wpa_s)
00060 {
00061 }
00062 
00063 static inline int ieee80211_sta_req_scan(struct wpa_supplicant *wpa_s,
00064                                          struct wpa_driver_scan_params *params)
00065 {
00066         return -1;
00067 }
00068 
00069 static inline int ieee80211_sta_deauthenticate(struct wpa_supplicant *wpa_s,
00070                                                u16 reason)
00071 {
00072         return -1;
00073 }
00074 
00075 static inline int ieee80211_sta_disassociate(struct wpa_supplicant *wpa_s,
00076                                              u16 reason)
00077 {
00078         return -1;
00079 }
00080 
00081 static inline int
00082 ieee80211_sta_associate(struct wpa_supplicant *wpa_s,
00083                         struct wpa_driver_associate_params *params)
00084 {
00085         return -1;
00086 }
00087 
00088 static inline int ieee80211_sta_get_ssid(struct wpa_supplicant *wpa_s,
00089                                          u8 *ssid, size_t *len)
00090 {
00091         return -1;
00092 }
00093 
00094 static inline void
00095 ieee80211_sta_free_hw_features(struct hostapd_hw_modes *hw_features,
00096                                size_t num_hw_features)
00097 {
00098 }
00099 
00100 static inline void
00101 ieee80211_sta_rx(struct wpa_supplicant *wpa_s, const u8 *buf, size_t len,
00102                  struct ieee80211_rx_status *rx_status)
00103 {
00104 }
00105 
00106 static inline struct wpa_scan_results *
00107 ieee80211_sta_get_scan_results(struct wpa_supplicant *wpa_s)
00108 {
00109         return NULL;
00110 }
00111 
00112 static inline int
00113 ieee80211_sta_update_ft_ies(struct wpa_supplicant *wpa_s, const u8 *md,
00114                             const u8 *ies, size_t ies_len)
00115 {
00116         return -1;
00117 }
00118 
00119 static inline int
00120 ieee80211_sta_send_ft_action(struct wpa_supplicant *wpa_s, u8 action,
00121                              const u8 *target_ap,
00122                              const u8 *ies, size_t ies_len)
00123 {
00124         return -1;
00125 }
00126 
00127 #endif /* CONFIG_CLIENT_MLME */
00128 
00129 #endif /* MLME_H */


wpa_supplicant
Author(s): Package maintained by Blaise Gassend
autogenerated on Thu Apr 24 2014 15:34:35