Sync usage with man page.
[netbsd-mini2440.git] / dist / wpa / hostapd / ieee802_11.h
blob9f2a4d82dd7d228906754430e52b1770d497dc2e
1 /*
2 * hostapd / IEEE 802.11 Management
3 * Copyright (c) 2002-2006, Jouni Malinen <j@w1.fi>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
9 * Alternatively, this software may be distributed under the terms of BSD
10 * license.
12 * See README and COPYING for more details.
15 #ifndef IEEE802_11_H
16 #define IEEE802_11_H
18 #include "ieee802_11_defs.h"
20 /* Parsed Information Elements */
21 struct ieee802_11_elems {
22 u8 *ssid;
23 u8 ssid_len;
24 u8 *supp_rates;
25 u8 supp_rates_len;
26 u8 *fh_params;
27 u8 fh_params_len;
28 u8 *ds_params;
29 u8 ds_params_len;
30 u8 *cf_params;
31 u8 cf_params_len;
32 u8 *tim;
33 u8 tim_len;
34 u8 *ibss_params;
35 u8 ibss_params_len;
36 u8 *challenge;
37 u8 challenge_len;
38 u8 *erp_info;
39 u8 erp_info_len;
40 u8 *ext_supp_rates;
41 u8 ext_supp_rates_len;
42 u8 *wpa_ie;
43 u8 wpa_ie_len;
44 u8 *rsn_ie;
45 u8 rsn_ie_len;
46 u8 *wme;
47 u8 wme_len;
48 u8 *wme_tspec;
49 u8 wme_tspec_len;
50 u8 *power_cap;
51 u8 power_cap_len;
52 u8 *supp_channels;
53 u8 supp_channels_len;
54 u8 *mdie;
55 u8 mdie_len;
56 u8 *ftie;
57 u8 ftie_len;
60 typedef enum { ParseOK = 0, ParseUnknown = 1, ParseFailed = -1 } ParseRes;
63 struct hostapd_frame_info {
64 u32 phytype;
65 u32 channel;
66 u32 datarate;
67 u32 ssi_signal;
69 unsigned int passive_scan:1;
72 struct hostapd_data;
73 struct sta_info;
75 void ieee802_11_send_deauth(struct hostapd_data *hapd, u8 *addr, u16 reason);
76 void ieee802_11_mgmt(struct hostapd_data *hapd, u8 *buf, size_t len,
77 u16 stype, struct hostapd_frame_info *fi);
78 void ieee802_11_mgmt_cb(struct hostapd_data *hapd, u8 *buf, size_t len,
79 u16 stype, int ok);
80 ParseRes ieee802_11_parse_elems(struct hostapd_data *hapd, u8 *start,
81 size_t len,
82 struct ieee802_11_elems *elems,
83 int show_errors);
84 void ieee802_11_print_ssid(char *buf, const u8 *ssid, u8 len);
85 void ieee80211_michael_mic_failure(struct hostapd_data *hapd, const u8 *addr,
86 int local);
87 int ieee802_11_get_mib(struct hostapd_data *hapd, char *buf, size_t buflen);
88 int ieee802_11_get_mib_sta(struct hostapd_data *hapd, struct sta_info *sta,
89 char *buf, size_t buflen);
90 u16 hostapd_own_capab_info(struct hostapd_data *hapd, struct sta_info *sta,
91 int probe);
92 u8 * hostapd_eid_supp_rates(struct hostapd_data *hapd, u8 *eid);
93 u8 * hostapd_eid_ext_supp_rates(struct hostapd_data *hapd, u8 *eid);
95 #endif /* IEEE802_11_H */