Commit ae7a11d2 authored by pdw's avatar pdw

Made DLT_PFLOG code conditional to avoid compilation problems on other

platforms.
parent cc31a604
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment