author | mickeyl <mickeyl> | 2003-04-07 18:07:38 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-04-07 18:07:38 (UTC) |
commit | cac6a08e456a057a19cc1fc56824fc98ff4f0bc1 (patch) (side-by-side diff) | |
tree | b17fa559629bcb9f49d685d3ec8b8dddc6a20f46 /libopie2/examples/opienet | |
parent | 75f029f87d4c84b37ccfe1c81ef205a6cd5fca79 (diff) | |
download | opie-cac6a08e456a057a19cc1fc56824fc98ff4f0bc1.zip opie-cac6a08e456a057a19cc1fc56824fc98ff4f0bc1.tar.gz opie-cac6a08e456a057a19cc1fc56824fc98ff4f0bc1.tar.bz2 |
- add OManufacturerDB
- API extensions for OMacAddress
- add data packet recognition for miniwellenreiter
-rw-r--r-- | libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp | 63 | ||||
-rw-r--r-- | libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp | 1 |
2 files changed, 40 insertions, 24 deletions
diff --git a/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp b/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp index 7581888..f800336 100644 --- a/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp +++ b/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp @@ -85,25 +85,2 @@ public: - /* - - // ifconfig down the interface - this enable more crash-proof - // scanning with drivers like spectrum_cs... - if ( wiface->isUp() ) - { - printf( "Interface status is up... switching to down... " ); - wiface->setUp( false ); - if ( wiface->isUp() ) - { - printf( "failed (%s). Exiting.\n", strerror( errno ) ); - exit( -1 ); - } - else - { - printf( "ok.\n" ); - } - } - else - printf( "Interface status is already down - good.\n" ); - - */ - // ifconfig +promisc the interface to receive all packets @@ -171,3 +148,2 @@ public slots: OWaveLanManagementPacket* beacon = (OWaveLanManagementPacket*) p->child( "802.11 Management" ); - if ( beacon ) @@ -185,2 +161,41 @@ public slots: } + return; + } + + OWaveLanDataPacket* data = (OWaveLanDataPacket*) p->child( "802.11 Data" ); + if ( data ) + { + OWaveLanPacket* wlan = (OWaveLanPacket*) p->child( "802.11" ); + if ( wlan->fromDS() && !wlan->toDS() ) + { + printf( "FromDS: '%s' -> '%s' via '%s'\n", + (const char*) wlan->macAddress3().toString(true), + (const char*) wlan->macAddress1().toString(true), + (const char*) wlan->macAddress2().toString(true) ); + } + else + if ( !wlan->fromDS() && wlan->toDS() ) + { + printf( "ToDS: '%s' -> '%s' via '%s'\n", + (const char*) wlan->macAddress2().toString(true), + (const char*) wlan->macAddress3().toString(true), + (const char*) wlan->macAddress1().toString(true) ); + } + else + if ( wlan->fromDS() && wlan->toDS() ) + { + printf( "WSD(bridge): '%s' -> '%s' via '%s' and '%s'\n", + (const char*) wlan->macAddress4().toString(true), + (const char*) wlan->macAddress3().toString(true), + (const char*) wlan->macAddress1().toString(true), + (const char*) wlan->macAddress2().toString(true) ); + } + else + { + printf( "IBSS(AdHoc): '%s' -> '%s' (Cell: '%s')'\n", + (const char*) wlan->macAddress2().toString(true), + (const char*) wlan->macAddress1().toString(true), + (const char*) wlan->macAddress3().toString(true) ); + } + return; } diff --git a/libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp b/libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp index 020fc23..f801b15 100644 --- a/libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp +++ b/libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp @@ -14,2 +14,3 @@ int main( int argc, char** argv ) 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: IPv4 Address is '%s'", (const char*) it.current()->ipV4Address() ); |