summaryrefslogtreecommitdiff
path: root/examples
authormickeyl <mickeyl>2005-05-19 12:03:37 (UTC)
committer mickeyl <mickeyl>2005-05-19 12:03:37 (UTC)
commit743204c7f71fe785a1876d95c5d880cfdff44592 (patch) (unidiff)
tree62d207b30da8b3c4589e2a9b9a3fba640aa4f421 /examples
parent50cc0698e54f1f69591cc89be34ffcb7e309380a (diff)
downloadopie-743204c7f71fe785a1876d95c5d880cfdff44592.zip
opie-743204c7f71fe785a1876d95c5d880cfdff44592.tar.gz
opie-743204c7f71fe785a1876d95c5d880cfdff44592.tar.bz2
print out OPacketCapturer version
Diffstat (limited to 'examples') (more/less context) (ignore whitespace changes)
-rw-r--r--examples/opienet/miniwellenreiter/miniwellenreiter.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/opienet/miniwellenreiter/miniwellenreiter.cpp b/examples/opienet/miniwellenreiter/miniwellenreiter.cpp
index ba9d2ca..284b35a 100644
--- a/examples/opienet/miniwellenreiter/miniwellenreiter.cpp
+++ b/examples/opienet/miniwellenreiter/miniwellenreiter.cpp
@@ -55,15 +55,15 @@ public:
55 } 55 }
56 ++it; 56 ++it;
57 } 57 }
58 exit( -1 ); 58 exit( -1 );
59 } 59 }
60 60
61 printf( "*******************************************************************\n" ); 61 printf( "************************************************************************\n" );
62 printf( "* Wellenreiter mini edition 1.0.0 (C) 2003 Michael 'Mickey' Lauer *\n" ); 62 printf( "* Wellenreiter mini edition 1.0.0 (C) 2003-2005 Michael 'Mickey' Lauer *\n" );
63 printf( "*******************************************************************\n" ); 63 printf( "************************************************************************\n" );
64 printf( "\n\n" ); 64 printf( "\n\n" );
65 65
66 QString interface( argv[1] ); 66 QString interface( argv[1] );
67 QString driver( argv[2] ); 67 QString driver( argv[2] );
68 68
69 printf( "Trying to use '%s' as %s-controlled device...\n", (const char*) interface, (const char*) driver ); 69 printf( "Trying to use '%s' as %s-controlled device...\n", (const char*) interface, (const char*) driver );
@@ -121,12 +121,13 @@ public:
121 // enable monitoring mode 121 // enable monitoring mode
122 printf( "Enabling monitor mode...\n" ); 122 printf( "Enabling monitor mode...\n" );
123 wiface->setMode( "monitor" ); 123 wiface->setMode( "monitor" );
124 124
125 // open a packet capturer 125 // open a packet capturer
126 cap = new OPacketCapturer(); 126 cap = new OPacketCapturer();
127 printf( "OPacketCapturer using libpcap %s", (const char*) cap->version() );
127 cap->open( interface ); 128 cap->open( interface );
128 if ( !cap->isOpen() ) 129 if ( !cap->isOpen() )
129 { 130 {
130 printf( "Unable to open libpcap (%s). Exiting.\n", strerror( errno ) ); 131 printf( "Unable to open libpcap (%s). Exiting.\n", strerror( errno ) );
131 exit( -1 ); 132 exit( -1 );
132 } 133 }