summaryrefslogtreecommitdiff
path: root/libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp
Side-by-side diff
Diffstat (limited to 'libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp37
1 files changed, 36 insertions, 1 deletions
diff --git a/libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp b/libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp
index 21026e1..06b8b19 100644
--- a/libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp
+++ b/libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp
@@ -3,4 +3,6 @@
#include <opie2/omanufacturerdb.h>
+#include <unistd.h>
+
int main( int argc, char** argv )
{
@@ -14,4 +16,5 @@ int main( int argc, char** argv )
{
qDebug( "DEMO: ONetwork contains Interface '%s'", (const char*) it.current()->name() );
+ qDebug( "DEMO: Datalink code is '%d'", it.current()->dataLinkType() );
qDebug( "DEMO: MAC Address is '%s'", (const char*) it.current()->macAddress().toString() );
qDebug( "DEMO: MAC Address is '%s'", (const char*) it.current()->macAddress().toString(true) );
@@ -29,7 +32,9 @@ int main( int argc, char** argv )
//if ( iface->mode() == OWirelessNetworkInterface::adhoc )
//{
- qDebug( "DEMO: Associated AP has MAC Address '%s'", (const char*) iface->associatedAP().toString() );
+ //qDebug( "DEMO: Associated AP has MAC Address '%s'", (const char*) iface->associatedAP().toString() );
//}
+ /*
+
// nickname
qDebug( "DEMO: Current NickName is '%s'", (const char*) iface->nickName() );
@@ -40,4 +45,6 @@ int main( int argc, char** argv )
qDebug( "DEMO: Nickname change successful." );
+ /*
+
// operation mode
qDebug( "DEMO: Current OperationMode is '%s'", (const char*) iface->mode() );
@@ -58,4 +65,8 @@ int main( int argc, char** argv )
iface->setMode( "managed" );
+ */
+
+ /*
+
// network scan
@@ -98,4 +109,28 @@ int main( int argc, char** argv )
*/
+ // monitor test
+
+ /*
+
+ qDebug( "DEMO: current interface mode is '%s'", (const char*) iface->mode() );
+ iface->setMode( "monitor" );
+ qDebug( "DEMO: current interface mode is '%s'", (const char*) iface->mode() );
+
+ sleep( 1 ); */
+
+ iface->setMode( "master" );
+
+ //sleep( 1 );
+ qDebug( "DEMO: current interface mode is '%s'", (const char*) iface->mode() );
+
+ /*iface->setMode( "adhoc" );
+ sleep( 1 );
+ qDebug( "DEMO: current interface mode is '%s'", (const char*) iface->mode() );
+ iface->setMode( "managed" );
+ sleep( 1 );
+ qDebug( "DEMO: current interface mode is '%s'", (const char*) iface->mode() );
+ iface->setMode( "master" );
+ sleep( 1 );
+ qDebug( "DEMO: current interface mode is '%s'", (const char*) iface->mode() );*/
}