mirror of
https://github.com/mfontanini/libtins
synced 2026-01-23 10:45:57 +01:00
Updated the examples to work with the new Sniffer constructor using the SnifferConfiguration object.
This commit is contained in:
@@ -87,10 +87,14 @@ int main(int argc, char *argv[])
|
||||
return 1;
|
||||
}
|
||||
arp_monitor monitor;
|
||||
// Sniffer configuration
|
||||
SnifferConfiguration config;
|
||||
config.set_promisc_mode(true);
|
||||
config.set_filter("arp");
|
||||
|
||||
// Sniff on the provided interface in promiscuous mode
|
||||
Sniffer sniffer(argv[1], Sniffer::PROMISC);
|
||||
Sniffer sniffer(argv[1], config);
|
||||
|
||||
// Only capture arp packets
|
||||
sniffer.set_filter("arp");
|
||||
monitor.run(sniffer);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user