Added --capture-direction (issue #265)

This commit is contained in:
Luca Deri 2016-01-28 11:22:59 +01:00
parent b8c72acaed
commit ae22da5136
5 changed files with 42 additions and 10 deletions

View file

@ -85,6 +85,9 @@ PcapInterface::PcapInterface(const char *name) : NetworkInterface(name) {
ntop->getTrace()->traceEvent(TRACE_NORMAL, "Reading packets from interface %s...", ifname);
read_pkts_from_pcap_dump = false;
pcap_datalink_type = pcap_datalink(pcap_handle);
if(pcap_setdirection(pcap_handle, ntop->getPrefs()->getCaptureDirection()) != 0)
ntop->getTrace()->traceEvent(TRACE_WARNING, "Unable to set packet capture direction");
}
}