wifipcap.cpp (tcpflow-1.5.0) | : | wifipcap.cpp (tcpflow-1.6.1) | ||
---|---|---|---|---|
skipping to change at line 25 | skipping to change at line 25 | |||
#include <inttypes.h> | #include <inttypes.h> | |||
#include <iostream> | #include <iostream> | |||
#include <cstdlib> | #include <cstdlib> | |||
#include <cstdio> | #include <cstdio> | |||
#include <cstring> | #include <cstring> | |||
#include <stdarg.h> | #include <stdarg.h> | |||
#include <errno.h> | #include <errno.h> | |||
#ifdef HAVE_NET_ETHERNET_H | #ifdef HAVE_NET_ETHERNET_H | |||
#ifdef HAVE_SYS_PARAM_H | ||||
#include <sys/param.h> | ||||
#endif | ||||
#include <net/ethernet.h> | #include <net/ethernet.h> | |||
#endif | #endif | |||
#ifdef HAVE_ARPA_INET_H | #ifdef HAVE_ARPA_INET_H | |||
#include <arpa/inet.h> | #include <arpa/inet.h> | |||
#endif | #endif | |||
#ifdef HAVE_UNISTD_H | #ifdef HAVE_UNISTD_H | |||
#include <unistd.h> | #include <unistd.h> | |||
#endif | #endif | |||
skipping to change at line 1438 | skipping to change at line 1441 | |||
/* are there more bitmap extensions than bytes in header? */ | /* are there more bitmap extensions than bytes in header? */ | |||
if (IS_EXTENDED(last_presentp)) { | if (IS_EXTENDED(last_presentp)) { | |||
//printf("[|802.11]"); | //printf("[|802.11]"); | |||
cbs->HandleRadiotap( *this, NULL, p, caplen); | cbs->HandleRadiotap( *this, NULL, p, caplen); | |||
return;// caplen; | return;// caplen; | |||
} | } | |||
const u_char *iter = (u_char*)(last_presentp + 1); | const u_char *iter = (u_char*)(last_presentp + 1); | |||
struct cpack_state cpacker; | struct cpack_state cpacker; | |||
/* Handle malformed data */ | ||||
if ((ssize_t)(len - (iter - p)) <= 0) { | ||||
cbs->HandleRadiotap( *this, NULL, p, caplen); | ||||
return;// caplen; | ||||
} | ||||
if (cpack_init(&cpacker, (u_int8_t*)iter, len - (iter - p)) != 0) { | if (cpack_init(&cpacker, (u_int8_t*)iter, len - (iter - p)) != 0) { | |||
/* XXX */ | /* XXX */ | |||
//printf("[|802.11]"); | //printf("[|802.11]"); | |||
cbs->HandleRadiotap( *this, NULL, p, caplen); | cbs->HandleRadiotap( *this, NULL, p, caplen); | |||
return;// caplen; | return;// caplen; | |||
} | } | |||
radiotap_hdr ohdr; | radiotap_hdr ohdr; | |||
memset(&ohdr, 0, sizeof(ohdr)); | memset(&ohdr, 0, sizeof(ohdr)); | |||
End of changes. 2 change blocks. | ||||
0 lines changed or deleted | 10 lines changed or added |