From 73922127f6ec8883dc55a3559c3ee30d97b4e29c Mon Sep 17 00:00:00 2001 From: Andrea Bontempi Date: Thu, 26 Jul 2012 11:08:43 +0200 Subject: [PATCH] Mini fix --- Riddle.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Riddle.cpp b/Riddle.cpp index a8a7181..e668ab6 100644 --- a/Riddle.cpp +++ b/Riddle.cpp @@ -148,15 +148,15 @@ int main ( int argc, char **argv ) { struct bpf_program fp; bpf_u_int32 net; - cerr<<">> Filtering with '"<> Filtering with '" << filter << "'" << endl; if ( pcap_compile ( pcap_handle, &fp, filter.c_str(), 0, net ) == -1 ) { - cerr<< "ERROR >> Couldn't parse filter '"<> Couldn't parse filter '" << filter << "': "<< pcap_geterr ( pcap_handle ) << endl; return ( 2 ); } if ( pcap_setfilter ( pcap_handle, &fp ) == -1 ) { - cerr<< "ERROR >> Couldn't install filter '"<> Couldn't install filter '" << filter << "': "< 0; ) { packet = pcap_next ( pcap_handle, &header ); if ( packet == NULL ) { - cerr<<">> Flow terminated"<> Flow terminated" << endl; break; } dumper ( packet, header ); if ( maxpacket!=numeric_limits::max() ) maxpacket--; } - cerr<<">> I finished the job, goodbye!"<> I finished the job, goodbye!" << endl; pcap_close ( pcap_handle ); return EXIT_SUCCESS;