mirror of
https://github.com/mfontanini/libtins
synced 2026-01-23 02:35:57 +01:00
Updated the examples to work with the new Sniffer constructor using the SnifferConfiguration object.
This commit is contained in:
@@ -47,10 +47,12 @@ public:
|
||||
|
||||
result_type trace() {
|
||||
// ICMPs that aren't sent from us.
|
||||
Sniffer sniffer(
|
||||
iface.name(), 500, false,
|
||||
"ip proto \\icmp and not src host " + iface.addresses().ip_addr.to_string()
|
||||
);
|
||||
SnifferConfiguration config;
|
||||
config.set_snap_len(500);
|
||||
config.set_promisc_mode(false);
|
||||
config.set_filter(
|
||||
"ip proto \\icmp and not src host " + iface.addresses().ip_addr.to_string());
|
||||
Sniffer sniffer(iface.name(), config);
|
||||
|
||||
PacketSender sender;
|
||||
// Create our handler
|
||||
|
||||
Reference in New Issue
Block a user