From dae25b338198993d536548093c6d02e50992e188 Mon Sep 17 00:00:00 2001 From: Matias Fontanini Date: Sat, 20 Feb 2016 11:13:04 -0800 Subject: [PATCH] Fix examples to make them work on Windows --- examples/http_requests.cpp | 4 ++-- examples/stream_dump.cpp | 4 ++-- examples/tcp_connection_close.cpp | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/examples/http_requests.cpp b/examples/http_requests.cpp index 047d315..dfa3d3f 100644 --- a/examples/http_requests.cpp +++ b/examples/http_requests.cpp @@ -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; }); diff --git a/examples/stream_dump.cpp b/examples/stream_dump.cpp index 2482cb9..ebb43ef 100644 --- a/examples/stream_dump.cpp +++ b/examples/stream_dump.cpp @@ -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; }); diff --git a/examples/tcp_connection_close.cpp b/examples/tcp_connection_close.cpp index 02ddc16..714a378 100644 --- a/examples/tcp_connection_close.cpp +++ b/examples/tcp_connection_close.cpp @@ -29,6 +29,7 @@ #include #include +#include #include using std::string;