17 #include <sys/ioctl.h>
23 #define IWINFO_BUFSIZE 24 * 1024
24 #define IWINFO_ESSID_MAX_SIZE 32
26 #define IWINFO_80211_A (1 << 0)
27 #define IWINFO_80211_B (1 << 1)
28 #define IWINFO_80211_G (1 << 2)
29 #define IWINFO_80211_N (1 << 3)
31 #define IWINFO_CIPHER_NONE (1 << 0)
32 #define IWINFO_CIPHER_WEP40 (1 << 1)
33 #define IWINFO_CIPHER_TKIP (1 << 2)
34 #define IWINFO_CIPHER_WRAP (1 << 3)
35 #define IWINFO_CIPHER_CCMP (1 << 4)
36 #define IWINFO_CIPHER_WEP104 (1 << 5)
37 #define IWINFO_CIPHER_AESOCB (1 << 6)
38 #define IWINFO_CIPHER_CKIP (1 << 7)
40 #define IWINFO_KMGMT_NONE (1 << 0)
41 #define IWINFO_KMGMT_8021x (1 << 1)
42 #define IWINFO_KMGMT_PSK (1 << 2)
44 #define IWINFO_AUTH_OPEN (1 << 0)
45 #define IWINFO_AUTH_SHARED (1 << 1)
47 extern const char *IWINFO_CIPHER_NAMES
[];
48 extern const char *IWINFO_KMGMT_NAMES
[];
49 extern const char *IWINFO_AUTH_NAMES
[];
52 struct iwinfo_rate_entry
{
56 uint8_t is_short_gi
:1;
59 struct iwinfo_assoclist_entry
{
66 struct iwinfo_rate_entry rx_rate
;
67 struct iwinfo_rate_entry tx_rate
;
70 struct iwinfo_txpwrlist_entry
{
75 struct iwinfo_freqlist_entry
{
81 struct iwinfo_crypto_entry
{
84 uint8_t group_ciphers
;
90 struct iwinfo_scanlist_entry
{
92 uint8_t ssid
[IWINFO_ESSID_MAX_SIZE
+1];
98 struct iwinfo_crypto_entry crypto
;
101 struct iwinfo_country_entry
{
106 struct iwinfo_iso3166_label
{
111 struct iwinfo_hardware_id
{
114 uint16_t subsystem_vendor_id
;
115 uint16_t subsystem_device_id
;
118 struct iwinfo_hardware_entry
{
119 const char *vendor_name
;
120 const char *device_name
;
123 uint16_t subsystem_vendor_id
;
124 uint16_t subsystem_device_id
;
125 int16_t txpower_offset
;
126 int16_t frequency_offset
;
129 extern const struct iwinfo_iso3166_label IWINFO_ISO3166_NAMES
[];
130 extern const struct iwinfo_hardware_entry IWINFO_HARDWARE_ENTRIES
[];
134 int (*channel
)(const char *, int *);
135 int (*frequency
)(const char *, int *);
136 int (*frequency_offset
)(const char *, int *);
137 int (*txpower
)(const char *, int *);
138 int (*txpower_offset
)(const char *, int *);
139 int (*bitrate
)(const char *, int *);
140 int (*signal
)(const char *, int *);
141 int (*noise
)(const char *, int *);
142 int (*quality
)(const char *, int *);
143 int (*quality_max
)(const char *, int *);
144 int (*mbssid_support
)(const char *, int *);
145 int (*hwmodelist
)(const char *, int *);
146 int (*mode
)(const char *, char *);
147 int (*ssid
)(const char *, char *);
148 int (*bssid
)(const char *, char *);
149 int (*country
)(const char *, char *);
150 int (*hardware_id
)(const char *, char *);
151 int (*hardware_name
)(const char *, char *);
152 int (*encryption
)(const char *, char *);
153 int (*assoclist
)(const char *, char *, int *);
154 int (*txpwrlist
)(const char *, char *, int *);
155 int (*scanlist
)(const char *, char *, int *);
156 int (*freqlist
)(const char *, char *, int *);
157 int (*countrylist
)(const char *, char *, int *);
161 const char * iwinfo_type(const char *ifname
);
162 const struct iwinfo_ops
* iwinfo_backend(const char *ifname
);
163 void iwinfo_finish(void);
165 #include "iwinfo/wext.h"
168 #include "iwinfo/wl.h"
172 #include "iwinfo/madwifi.h"
176 #include "iwinfo/nl80211.h"