1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59 #ifndef _P80211TYPES_H
60 #define _P80211TYPES_H
61
62
63
64
65
66
67 #define P80211_MIB_CAT_DOT11SMT 1
68 #define P80211_MIB_CAT_DOT11MAC 2
69 #define P80211_MIB_CAT_DOT11PHY 3
70
71 #define P80211SEC_DOT11SMT P80211_MIB_CAT_DOT11SMT
72 #define P80211SEC_DOT11MAC P80211_MIB_CAT_DOT11MAC
73 #define P80211SEC_DOT11PHY P80211_MIB_CAT_DOT11PHY
74
75
76 #define P80211_MSG_CAT_DOT11REQ 1
77 #define P80211_MSG_CAT_DOT11IND 2
78
79
80
81
82
83
84
85
86 #define P80211ENUM_truth_false 0
87 #define P80211ENUM_truth_true 1
88 #define P80211ENUM_ifstate_disable 0
89 #define P80211ENUM_ifstate_fwload 1
90 #define P80211ENUM_ifstate_enable 2
91 #define P80211ENUM_bsstype_infrastructure 1
92 #define P80211ENUM_bsstype_independent 2
93 #define P80211ENUM_bsstype_any 3
94 #define P80211ENUM_authalg_opensystem 1
95 #define P80211ENUM_authalg_sharedkey 2
96 #define P80211ENUM_scantype_active 1
97 #define P80211ENUM_resultcode_success 1
98 #define P80211ENUM_resultcode_invalid_parameters 2
99 #define P80211ENUM_resultcode_not_supported 3
100 #define P80211ENUM_resultcode_refused 6
101 #define P80211ENUM_resultcode_cant_set_readonly_mib 10
102 #define P80211ENUM_resultcode_implementation_failure 11
103 #define P80211ENUM_resultcode_cant_get_writeonly_mib 12
104 #define P80211ENUM_status_successful 0
105 #define P80211ENUM_status_unspec_failure 1
106 #define P80211ENUM_status_ap_full 17
107 #define P80211ENUM_msgitem_status_data_ok 0
108 #define P80211ENUM_msgitem_status_no_value 1
109
110
111
112
113 #define MAXLEN_PSTR6 (6)
114 #define MAXLEN_PSTR14 (14)
115 #define MAXLEN_PSTR32 (32)
116 #define MAXLEN_PSTR255 (255)
117 #define MAXLEN_MIBATTRIBUTE (392)
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136 #define P80211DID_LSB_SECTION (0)
137 #define P80211DID_LSB_GROUP (6)
138 #define P80211DID_LSB_ITEM (12)
139 #define P80211DID_LSB_INDEX (18)
140 #define P80211DID_LSB_ISTABLE (26)
141 #define P80211DID_LSB_ACCESS (27)
142
143 #define P80211DID_MASK_SECTION (0x0000003fUL)
144 #define P80211DID_MASK_GROUP (0x0000003fUL)
145 #define P80211DID_MASK_ITEM (0x0000003fUL)
146 #define P80211DID_MASK_INDEX (0x000000ffUL)
147 #define P80211DID_MASK_ISTABLE (0x00000001UL)
148 #define P80211DID_MASK_ACCESS (0x00000003UL)
149
150 #define P80211DID_MK(a, m, l) ((((u32)(a)) & (m)) << (l))
151
152 #define P80211DID_MKSECTION(a) P80211DID_MK(a, \
153 P80211DID_MASK_SECTION, \
154 P80211DID_LSB_SECTION)
155 #define P80211DID_MKGROUP(a) P80211DID_MK(a, \
156 P80211DID_MASK_GROUP, \
157 P80211DID_LSB_GROUP)
158 #define P80211DID_MKITEM(a) P80211DID_MK(a, \
159 P80211DID_MASK_ITEM, \
160 P80211DID_LSB_ITEM)
161 #define P80211DID_MKINDEX(a) P80211DID_MK(a, \
162 P80211DID_MASK_INDEX, \
163 P80211DID_LSB_INDEX)
164 #define P80211DID_MKISTABLE(a) P80211DID_MK(a, \
165 P80211DID_MASK_ISTABLE, \
166 P80211DID_LSB_ISTABLE)
167
168 #define P80211DID_MKID(s, g, i, n, t, a) (P80211DID_MKSECTION(s) | \
169 P80211DID_MKGROUP(g) | \
170 P80211DID_MKITEM(i) | \
171 P80211DID_MKINDEX(n) | \
172 P80211DID_MKISTABLE(t) | \
173 (a))
174
175 #define P80211DID_GET(a, m, l) ((((u32)(a)) >> (l)) & (m))
176
177 #define P80211DID_SECTION(a) P80211DID_GET(a, \
178 P80211DID_MASK_SECTION, \
179 P80211DID_LSB_SECTION)
180 #define P80211DID_GROUP(a) P80211DID_GET(a, \
181 P80211DID_MASK_GROUP, \
182 P80211DID_LSB_GROUP)
183 #define P80211DID_ITEM(a) P80211DID_GET(a, \
184 P80211DID_MASK_ITEM, \
185 P80211DID_LSB_ITEM)
186 #define P80211DID_INDEX(a) P80211DID_GET(a, \
187 P80211DID_MASK_INDEX, \
188 P80211DID_LSB_INDEX)
189 #define P80211DID_ISTABLE(a) P80211DID_GET(a, \
190 P80211DID_MASK_ISTABLE, \
191 P80211DID_LSB_ISTABLE)
192 #define P80211DID_ACCESS(a) P80211DID_GET(a, \
193 P80211DID_MASK_ACCESS, \
194 P80211DID_LSB_ACCESS)
195
196
197
198
199
200
201 struct p80211pstr {
202 u8 len;
203 } __packed;
204
205 struct p80211pstrd {
206 u8 len;
207 u8 data[0];
208 } __packed;
209
210
211 struct p80211pstr255 {
212 u8 len;
213 u8 data[MAXLEN_PSTR255];
214 } __packed;
215
216
217 struct p80211pstr6 {
218 u8 len;
219 u8 data[MAXLEN_PSTR6];
220 } __packed;
221
222
223 struct p80211pstr14 {
224 u8 len;
225 u8 data[MAXLEN_PSTR14];
226 } __packed;
227
228
229 struct p80211pstr32 {
230 u8 len;
231 u8 data[MAXLEN_PSTR32];
232 } __packed;
233
234
235 struct p80211macarray {
236 u32 cnt;
237 u8 data[1][MAXLEN_PSTR6];
238 } __packed;
239
240
241 struct p80211item {
242 u32 did;
243 u16 status;
244 u16 len;
245 } __packed;
246
247
248 struct p80211itemd {
249 u32 did;
250 u16 status;
251 u16 len;
252 u8 data[0];
253 } __packed;
254
255
256 struct p80211item_uint32 {
257 u32 did;
258 u16 status;
259 u16 len;
260 u32 data;
261 } __packed;
262
263
264 struct p80211item_pstr6 {
265 u32 did;
266 u16 status;
267 u16 len;
268 struct p80211pstr6 data;
269 } __packed;
270
271
272 struct p80211item_pstr14 {
273 u32 did;
274 u16 status;
275 u16 len;
276 struct p80211pstr14 data;
277 } __packed;
278
279
280 struct p80211item_pstr32 {
281 u32 did;
282 u16 status;
283 u16 len;
284 struct p80211pstr32 data;
285 } __packed;
286
287
288 struct p80211item_pstr255 {
289 u32 did;
290 u16 status;
291 u16 len;
292 struct p80211pstr255 data;
293 } __packed;
294
295
296 struct p80211item_unk392 {
297 u32 did;
298 u16 status;
299 u16 len;
300 u8 data[MAXLEN_MIBATTRIBUTE];
301 } __packed;
302
303
304 struct p80211item_unk1024 {
305 u32 did;
306 u16 status;
307 u16 len;
308 u8 data[1024];
309 } __packed;
310
311
312 struct p80211item_unk4096 {
313 u32 did;
314 u16 status;
315 u16 len;
316 u8 data[4096];
317 } __packed;
318
319 #endif