MFC: An off-by-one malloc size was corrupting the installer's memory,
[dragonfly.git] / contrib / wpa_supplicant-0.5.8 / mlme.h
blob9f6f5eb2acd53b617324ad0c105a7b3784f3546c
1 /*
2 * WPA Supplicant - Client mode MLME
3 * Copyright (c) 2003-2006, Jouni Malinen <j@w1.fi>
4 * Copyright (c) 2004, Instant802 Networks, Inc.
5 * Copyright (c) 2005-2006, Devicescape Software, Inc.
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License version 2 as
9 * published by the Free Software Foundation.
11 * Alternatively, this software may be distributed under the terms of BSD
12 * license.
14 * See README and COPYING for more details.
17 #ifndef MLME_H
18 #define MLME_H
20 #ifdef CONFIG_CLIENT_MLME
22 int ieee80211_sta_init(struct wpa_supplicant *wpa_s);
23 void ieee80211_sta_deinit(struct wpa_supplicant *wpa_s);
24 int ieee80211_sta_req_scan(struct wpa_supplicant *wpa_s, const u8 *ssid,
25 size_t ssid_len);
26 int ieee80211_sta_deauthenticate(struct wpa_supplicant *wpa_s, u16 reason);
27 int ieee80211_sta_disassociate(struct wpa_supplicant *wpa_s, u16 reason);
28 int ieee80211_sta_associate(struct wpa_supplicant *wpa_s,
29 struct wpa_driver_associate_params *params);
30 int ieee80211_sta_get_ssid(struct wpa_supplicant *wpa_s, u8 *ssid,
31 size_t *len);
32 void ieee80211_sta_free_hw_features(struct wpa_hw_modes *hw_features,
33 size_t num_hw_features);
34 void ieee80211_sta_rx(struct wpa_supplicant *wpa_s, const u8 *buf, size_t len,
35 struct ieee80211_rx_status *rx_status);
36 int ieee80211_sta_get_scan_results(struct wpa_supplicant *wpa_s,
37 struct wpa_scan_result *results,
38 size_t max_size);
40 #else /* CONFIG_CLIENT_MLME */
42 static inline int ieee80211_sta_init(struct wpa_supplicant *wpa_s)
44 return 0;
47 static inline void ieee80211_sta_deinit(struct wpa_supplicant *wpa_s)
51 static inline int ieee80211_sta_req_scan(struct wpa_supplicant *wpa_s,
52 const u8 *ssid, size_t ssid_len)
54 return -1;
57 static inline int ieee80211_sta_deauthenticate(struct wpa_supplicant *wpa_s,
58 u16 reason)
60 return -1;
63 static inline int ieee80211_sta_disassociate(struct wpa_supplicant *wpa_s,
64 u16 reason)
66 return -1;
69 static inline int
70 ieee80211_sta_associate(struct wpa_supplicant *wpa_s,
71 struct wpa_driver_associate_params *params)
73 return -1;
76 static inline int ieee80211_sta_get_ssid(struct wpa_supplicant *wpa_s,
77 u8 *ssid, size_t *len)
79 return -1;
82 static inline void
83 ieee80211_sta_free_hw_features(struct wpa_hw_modes *hw_features,
84 size_t num_hw_features)
88 static inline void
89 ieee80211_sta_rx(struct wpa_supplicant *wpa_s, const u8 *buf, size_t len,
90 struct ieee80211_rx_status *rx_status)
94 static inline int
95 ieee80211_sta_get_scan_results(struct wpa_supplicant *wpa_s,
96 struct wpa_scan_result *results,
97 size_t max_size)
99 return -1;
102 #endif /* CONFIG_CLIENT_MLME */
104 #endif /* MLME_H */