From 58e3a7a687151e5dca9b15f048fea4108f1b423a Mon Sep 17 00:00:00 2001 From: Matias Fontanini Date: Mon, 25 Jan 2016 12:50:29 -0800 Subject: [PATCH] Don't use pcap_setdirection on Windows --- src/sniffer.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sniffer.cpp b/src/sniffer.cpp index 82adcea..64a2606 100644 --- a/src/sniffer.cpp +++ b/src/sniffer.cpp @@ -454,9 +454,12 @@ void SnifferConfiguration::configure_sniffer_post_activation(Sniffer& sniffer) c throw std::runtime_error("Could not set the filter! "); } } + // TODO: see how to actually do this on winpcap + #ifndef _WIN32 if (!sniffer.set_direction(_direction)) { throw std::runtime_error("Could not set the direction! "); } + #endif // _WIN32 } void SnifferConfiguration::set_snap_len(unsigned snap_len)