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:
@@ -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;
|
||||
});
|
||||
|
||||
@@ -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;
|
||||
});
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <functional>
|
||||
#include <tins/tins.h>
|
||||
|
||||
using std::string;
|
||||
|
||||
Reference in New Issue
Block a user