Lines Matching full:pbody
156 parse_elements(struct mgmt_body_t *pbody, const u_char *p, int offset)
161 pbody->challenge_status = NOT_PRESENT;
162 pbody->ssid_status = NOT_PRESENT;
163 pbody->rates_status = NOT_PRESENT;
164 pbody->ds_status = NOT_PRESENT;
165 pbody->cf_status = NOT_PRESENT;
166 pbody->tim_status = NOT_PRESENT;
174 pbody->ssid_status = TRUNCATED;
177 memcpy(&pbody->ssid, p + offset, 2);
179 if (pbody->ssid.length != 0) {
180 if (pbody->ssid.length >
181 sizeof(pbody->ssid.ssid) - 1)
183 if (!TTEST2(*(p + offset), pbody->ssid.length))
185 memcpy(&pbody->ssid.ssid, p + offset,
186 pbody->ssid.length);
187 offset += pbody->ssid.length;
189 pbody->ssid.ssid[pbody->ssid.length] = '\0';
191 pbody->ssid_status = PRESENT;
195 pbody->challenge_status = TRUNCATED;
198 memcpy(&pbody->challenge, p + offset, 2);
200 if (pbody->challenge.length != 0) {
201 if (pbody->challenge.length >
202 sizeof(pbody->challenge.text) - 1)
204 if (!TTEST2(*(p + offset), pbody->challenge.length))
206 memcpy(&pbody->challenge.text, p + offset,
207 pbody->challenge.length);
208 offset += pbody->challenge.length;
210 pbody->challenge.text[pbody->challenge.length] = '\0';
212 pbody->challenge_status = PRESENT;
216 pbody->rates_status = TRUNCATED;
219 memcpy(&(pbody->rates), p + offset, 2);
221 if (pbody->rates.length != 0) {
222 if (pbody->rates.length > sizeof pbody->rates.rate)
224 if (!TTEST2(*(p + offset), pbody->rates.length))
226 memcpy(&pbody->rates.rate, p + offset,
227 pbody->rates.length);
228 offset += pbody->rates.length;
231 pbody->rates_status = PRESENT;
235 pbody->ds_status = TRUNCATED;
238 memcpy(&pbody->ds, p + offset, 3);
241 pbody->ds_status = PRESENT;
245 pbody->cf_status = TRUNCATED;
248 memcpy(&pbody->cf, p + offset, 8);
251 pbody->cf_status = PRESENT;
255 pbody->tim_status = TRUNCATED;
258 memcpy(&pbody->tim, p + offset, 2);
262 memcpy(&pbody->tim.count, p + offset, 3);
265 if (pbody->tim.length <= 3)
267 if (pbody->tim.length - 3 > sizeof pbody->tim.bitmap)
269 if (!TTEST2(*(p + offset), pbody->tim.length - 3))
271 memcpy(pbody->tim.bitmap, p + (pbody->tim.length - 3),
272 (pbody->tim.length - 3));
273 offset += pbody->tim.length - 3;
275 pbody->tim_status = PRESENT;
299 struct mgmt_body_t pbody;
302 memset(&pbody, 0, sizeof(pbody));
307 memcpy(&pbody.timestamp, p, IEEE802_11_TSTAMP_LEN);
309 pbody.beacon_interval = EXTRACT_LE_16BITS(p+offset);
311 pbody.capability_info = EXTRACT_LE_16BITS(p+offset);
314 parse_elements(&pbody, p, offset);
316 PRINT_SSID(pbody);
317 PRINT_RATES(pbody);
319 CAPABILITY_ESS(pbody.capability_info) ? "ESS" : "IBSS");
320 PRINT_DS_CHANNEL(pbody);
328 struct mgmt_body_t pbody;
331 memset(&pbody, 0, sizeof(pbody));
335 pbody.capability_info = EXTRACT_LE_16BITS(p);
337 pbody.listen_interval = EXTRACT_LE_16BITS(p+offset);
340 parse_elements(&pbody, p, offset);
342 PRINT_SSID(pbody);
343 PRINT_RATES(pbody);
350 struct mgmt_body_t pbody;
353 memset(&pbody, 0, sizeof(pbody));
358 pbody.capability_info = EXTRACT_LE_16BITS(p);
360 pbody.status_code = EXTRACT_LE_16BITS(p+offset);
362 pbody.aid = EXTRACT_LE_16BITS(p+offset);
365 parse_elements(&pbody, p, offset);
367 printf(" AID(%x) :%s: %s", ((u_int16_t)(pbody.aid << 2 )) >> 2 ,
368 CAPABILITY_PRIVACY(pbody.capability_info) ? " PRIVACY " : "",
369 (pbody.status_code < NUM_STATUSES
370 ? status_text[pbody.status_code]
379 struct mgmt_body_t pbody;
382 memset(&pbody, 0, sizeof(pbody));
387 pbody.capability_info = EXTRACT_LE_16BITS(p);
389 pbody.listen_interval = EXTRACT_LE_16BITS(p+offset);
391 memcpy(&pbody.ap, p+offset, IEEE802_11_AP_LEN);
394 parse_elements(&pbody, p, offset);
396 PRINT_SSID(pbody);
397 printf(" AP : %s", etheraddr_string( pbody.ap ));
412 struct mgmt_body_t pbody;
415 memset(&pbody, 0, sizeof(pbody));
417 parse_elements(&pbody, p, offset);
419 PRINT_SSID(pbody);
420 PRINT_RATES(pbody);
428 struct mgmt_body_t pbody;
431 memset(&pbody, 0, sizeof(pbody));
437 memcpy(&pbody.timestamp, p, IEEE802_11_TSTAMP_LEN);
439 pbody.beacon_interval = EXTRACT_LE_16BITS(p+offset);
441 pbody.capability_info = EXTRACT_LE_16BITS(p+offset);
444 parse_elements(&pbody, p, offset);
446 PRINT_SSID(pbody);
447 PRINT_RATES(pbody);
448 PRINT_DS_CHANNEL(pbody);
463 struct mgmt_body_t pbody;
465 memset(&pbody, 0, sizeof(pbody));
469 pbody.reason_code = EXTRACT_LE_16BITS(p);
472 (pbody.reason_code < NUM_REASONS)
473 ? reason_text[pbody.reason_code]
482 struct mgmt_body_t pbody;
485 memset(&pbody, 0, sizeof(pbody));
489 pbody.auth_alg = EXTRACT_LE_16BITS(p);
491 pbody.auth_trans_seq_num = EXTRACT_LE_16BITS(p + offset);
493 pbody.status_code = EXTRACT_LE_16BITS(p + offset);
496 parse_elements(&pbody, p, offset);
498 if ((pbody.auth_alg == 1) &&
499 ((pbody.auth_trans_seq_num == 2) ||
500 (pbody.auth_trans_seq_num == 3))) {
502 (pbody.auth_alg < NUM_AUTH_ALGS)
503 ? auth_alg_text[pbody.auth_alg]
505 pbody.auth_trans_seq_num,
506 ((pbody.auth_trans_seq_num % 2)
507 ? ((pbody.status_code < NUM_STATUSES)
508 ? status_text[pbody.status_code]
513 (pbody.auth_alg < NUM_AUTH_ALGS)
514 ? auth_alg_text[pbody.auth_alg]
516 pbody.auth_trans_seq_num,
517 (pbody.auth_trans_seq_num % 2)
518 ? ((pbody.status_code < NUM_STATUSES)
519 ? status_text[pbody.status_code]
529 struct mgmt_body_t pbody;
533 memset(&pbody, 0, sizeof(pbody));
537 pbody.reason_code = EXTRACT_LE_16BITS(p);
540 reason = (pbody.reason_code < NUM_REASONS)
541 ? reason_text[pbody.reason_code]