From 877bc5c756d94db71a745596dd7e48104a2ec9a1 Mon Sep 17 00:00:00 2001 From: mickeyl Date: Tue, 28 Oct 2003 16:38:55 +0000 Subject: - remove deprecated setMonitorMode() API. Use setMode( "monitor" ) now. - monitor mode now tries to use the standard IW_MODE_MONITOR first. If that doesn't work, it falls back to using proprietary iwpriv commands --- (limited to 'libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp') 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 @@ -2,6 +2,8 @@ #include #include +#include + int main( int argc, char** argv ) { qDebug( "OPIE Network Demo" ); @@ -13,6 +15,7 @@ int main( int argc, char** argv ) while ( it.current() ) { 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) ); qDebug( "DEMO: MAC Manufacturer seems to be '%s'", (const char*) it.current()->macAddress().manufacturer() ); @@ -28,9 +31,11 @@ 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() ); iface->setNickName( "MyNickName" ); @@ -39,6 +44,8 @@ int main( int argc, char** argv ) else qDebug( "DEMO: Nickname change successful." ); + /* + // operation mode qDebug( "DEMO: Current OperationMode is '%s'", (const char*) iface->mode() ); iface->setMode( "adhoc" ); @@ -57,6 +64,10 @@ int main( int argc, char** argv ) iface->setMode( "managed" ); + */ + + /* + // network scan OStationList* stations = iface->scanNetwork(); @@ -97,6 +108,30 @@ 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() );*/ } ++it; -- cgit v0.9.0.2