1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-23 02:35:57 +01:00

Fix examples to make them work on Windows

This commit is contained in:
Matias Fontanini
2016-02-20 11:13:04 -08:00
parent 745071af65
commit dae25b3381
3 changed files with 5 additions and 4 deletions

View File

@@ -43,7 +43,7 @@ using std::exception;
using boost::regex;
using boost::match_results;
using Tins::Packet;
using Tins::PDU;
using Tins::Sniffer;
using Tins::SnifferConfiguration;
using Tins::TCPIP::Stream;
@@ -133,7 +133,7 @@ int main(int argc, char* argv[]) {
follower.new_stream_callback(&on_new_connection);
// Now start capturing. Every time there's a new packet, call
// follower.process_packet
sniffer.sniff_loop([&](Packet& packet) {
sniffer.sniff_loop([&](PDU& packet) {
follower.process_packet(packet);
return true;
});

View File

@@ -46,7 +46,7 @@ using std::exception;
using Tins::Sniffer;
using Tins::SnifferConfiguration;
using Tins::Packet;
using Tins::PDU;
using Tins::TCPIP::StreamFollower;
using Tins::TCPIP::Stream;
@@ -150,7 +150,7 @@ int main(int argc, char* argv[]) {
follower.new_stream_callback(&on_new_connection);
// Now start capturing. Every time there's a new packet, call
// follower.process_packet
sniffer.sniff_loop([&](Packet& packet) {
sniffer.sniff_loop([&](PDU& packet) {
follower.process_packet(packet);
return true;
});

View File

@@ -29,6 +29,7 @@
#include <iostream>
#include <string>
#include <functional>
#include <tins/tins.h>
using std::string;