diff options
author | pdw <> | 2011-10-03 20:28:10 +0000 |
---|---|---|
committer | pdw <> | 2011-10-03 20:28:10 +0000 |
commit | 5612fba5e44e4b6542402bbde6354a4ef77109dd (patch) | |
tree | 13f07603303a274805d503e5915a886e23d7b738 | |
parent | f6f4b68a07a953f321af869de8a4012f1b14e42e (diff) | |
download | iftop-5612fba5e44e4b6542402bbde6354a4ef77109dd.zip |
Support for DLT_NULL - Scott Bertilson.
-rw-r--r-- | iftop.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -449,7 +449,7 @@ static void handle_pflog_packet(unsigned char* args, const struct pcap_pkthdr* p } #endif -static void handle_loopback_packet(unsigned char* args, const struct pcap_pkthdr* pkthdr, const unsigned char* packet) +static void handle_null_packet(unsigned char* args, const struct pcap_pkthdr* pkthdr, const unsigned char* packet) { handle_ip_packet((struct ip*)(packet + 4), -1); } @@ -691,8 +691,13 @@ void packet_init() { packet_handler = handle_raw_packet; } else if(dlt == DLT_NULL) { - packet_handler = handle_loopback_packet; + packet_handler = handle_null_packet; } +#ifdef DLT_LOOP + else if(dlt == DLT_LOOP) { + packet_handler = handle_null_packet; + } +#endif else if(dlt == DLT_IEEE802) { packet_handler = handle_tokenring_packet; } |