mfontanini / libtins

High-level, multiplatform C++ network packet sniffing and crafting library.
http://libtins.github.io/
BSD 2-Clause "Simplified" License
1.91k stars 377 forks source link

Error when create object from Sniffer class. #390

Open BugsBountyHunter opened 4 years ago

BugsBountyHunter commented 4 years ago

I have a problem when creating an object from Sniffer class throw exception this my code

    NetworkInterface iface = NetworkInterface::default_interface();
SnifferConfiguration config;
config.set_promisc_mode(true);
Sniffer sniffer(iface.name()); //this is where it throws Tins::pcap_error
sniffer.sniff_loop(test);

I try this solution but not work

https://groups.google.com/forum/#!searchin/libtins/sniffer|sort:date/libtins/cjsH-CHyeqo/zDKVZsW6BgAJ