1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-25 11:41:35 +01:00

Updated the examples to work with the new Sniffer constructor using the SnifferConfiguration object.

This commit is contained in:
Santiago Alessandri
2014-08-29 18:20:15 -07:00
parent 49f451ecd1
commit 039b41cb76
9 changed files with 38 additions and 17 deletions

View File

@@ -117,7 +117,9 @@ void scan(int argc, char *argv[]) {
cout << "Sniffing on interface: " << iface.name() << endl;
// 300 bytes are enough to receive SYNs and RSTs.
Sniffer sniffer(iface.name(), 300);
SnifferConfiguration config;
config.set_snap_len(300);
Sniffer sniffer(iface.name(), config);
sniffer_data data(&sniffer, argv[1]);
pthread_t thread;
// Launch our sniff thread.