diff options
author | pdw <> | 2010-03-01 22:13:32 +0000 |
---|---|---|
committer | pdw <> | 2010-03-01 22:13:32 +0000 |
commit | ae7a11d202d331d4884e6e5234c4b1246252ab86 (patch) | |
tree | caf71319dd1bc713fae5d1d61c4f97286c2f89c4 | |
parent | cc31a604f302b58723f29ff74df3ef9ae7a75629 (diff) | |
download | iftop-ae7a11d202d331d4884e6e5234c4b1246252ab86.zip |
Made DLT_PFLOG code conditional to avoid compilation problems on other
platforms.
-rw-r--r-- | iftop.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -302,6 +302,7 @@ static void handle_raw_packet(unsigned char* args, const struct pcap_pkthdr* pkt handle_ip_packet((struct ip*)packet, -1); } +#ifdef DLT_PFLOG static void handle_pflog_packet(unsigned char* args, const struct pcap_pkthdr* pkthdr, const unsigned char* packet) { register u_int length = pkthdr->len; @@ -314,6 +315,7 @@ static void handle_pflog_packet(unsigned char* args, const struct pcap_pkthdr* p packet += hdrlen; handle_ip_packet((struct ip*)packet, length); } +#endif static void handle_llc_packet(const struct llc* llc, int dir) { @@ -533,9 +535,11 @@ void packet_init() { if(dlt == DLT_EN10MB) { packet_handler = handle_eth_packet; } +#ifdef DLT_PFLOG else if (dlt == DLT_PFLOG) { packet_handler = handle_pflog_packet; } +#endif else if(dlt == DLT_RAW || dlt == DLT_NULL) { packet_handler = handle_raw_packet; } |