u_int32_t *presentp, *last_presentp;
enum ieee80211_radiotap_type bit;
int bit0;
- const u_char *iter;
u_int len;
u_int8_t flags;
int pad;
printf("[|802.11]");
return caplen;
}
+ cpack_init(&cpacker, (u_int8_t *)hdr, len); /* align against header start */
+ cpack_advance(&cpacker, sizeof(*hdr)); /* includes the 1st bitmap */
for (last_presentp = &hdr->it_present;
IS_EXTENDED(last_presentp) &&
(u_char*)(last_presentp + 1) <= p + len;
- last_presentp++);
+ last_presentp++)
+ cpack_advance(&cpacker, sizeof(hdr->it_present)); /* more bitmaps */
/* are there more bitmap extensions than bytes in header? */
if (IS_EXTENDED(last_presentp)) {
return caplen;
}
- iter = (u_char*)(last_presentp + 1);
-
- if (cpack_init(&cpacker, (u_int8_t*)iter, len - (iter - p)) != 0) {
- /* XXX */
- printf("[|802.11]");
- return caplen;
- }
-
/* Assume no flags */
flags = 0;
/* Assume no Atheros padding between 802.11 header and body */