summaryrefslogtreecommitdiff
path: root/libopie2/examples
authormickeyl <mickeyl>2003-04-07 18:07:38 (UTC)
committer mickeyl <mickeyl>2003-04-07 18:07:38 (UTC)
commitcac6a08e456a057a19cc1fc56824fc98ff4f0bc1 (patch) (unidiff)
treeb17fa559629bcb9f49d685d3ec8b8dddc6a20f46 /libopie2/examples
parent75f029f87d4c84b37ccfe1c81ef205a6cd5fca79 (diff)
downloadopie-cac6a08e456a057a19cc1fc56824fc98ff4f0bc1.zip
opie-cac6a08e456a057a19cc1fc56824fc98ff4f0bc1.tar.gz
opie-cac6a08e456a057a19cc1fc56824fc98ff4f0bc1.tar.bz2
- add OManufacturerDB
- API extensions for OMacAddress - add data packet recognition for miniwellenreiter
Diffstat (limited to 'libopie2/examples') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp63
-rw-r--r--libopie2/examples/opienet/onetworkdemo/onetworkdemo.cpp1
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:
85 85
86 /*
87
88 // ifconfig down the interface - this enable more crash-proof
89 // scanning with drivers like spectrum_cs...
90 if ( wiface->isUp() )
91 {
92 printf( "Interface status is up... switching to down... " );
93 wiface->setUp( false );
94 if ( wiface->isUp() )
95 {
96 printf( "failed (%s). Exiting.\n", strerror( errno ) );
97 exit( -1 );
98 }
99 else
100 {
101 printf( "ok.\n" );
102 }
103 }
104 else
105 printf( "Interface status is already down - good.\n" );
106
107 */
108
109 // ifconfig +promisc the interface to receive all packets 86 // ifconfig +promisc the interface to receive all packets
@@ -171,3 +148,2 @@ public slots:
171 OWaveLanManagementPacket* beacon = (OWaveLanManagementPacket*) p->child( "802.11 Management" ); 148 OWaveLanManagementPacket* beacon = (OWaveLanManagementPacket*) p->child( "802.11 Management" );
172
173 if ( beacon ) 149 if ( beacon )
@@ -185,2 +161,41 @@ public slots:
185 } 161 }
162 return;
163 }
164
165 OWaveLanDataPacket* data = (OWaveLanDataPacket*) p->child( "802.11 Data" );
166 if ( data )
167 {
168 OWaveLanPacket* wlan = (OWaveLanPacket*) p->child( "802.11" );
169 if ( wlan->fromDS() && !wlan->toDS() )
170 {
171 printf( "FromDS: '%s' -> '%s' via '%s'\n",
172 (const char*) wlan->macAddress3().toString(true),
173 (const char*) wlan->macAddress1().toString(true),
174 (const char*) wlan->macAddress2().toString(true) );
175 }
176 else
177 if ( !wlan->fromDS() && wlan->toDS() )
178 {
179 printf( "ToDS: '%s' -> '%s' via '%s'\n",
180 (const char*) wlan->macAddress2().toString(true),
181 (const char*) wlan->macAddress3().toString(true),
182 (const char*) wlan->macAddress1().toString(true) );
183 }
184 else
185 if ( wlan->fromDS() && wlan->toDS() )
186 {
187 printf( "WSD(bridge): '%s' -> '%s' via '%s' and '%s'\n",
188 (const char*) wlan->macAddress4().toString(true),
189 (const char*) wlan->macAddress3().toString(true),
190 (const char*) wlan->macAddress1().toString(true),
191 (const char*) wlan->macAddress2().toString(true) );
192 }
193 else
194 {
195 printf( "IBSS(AdHoc): '%s' -> '%s' (Cell: '%s')'\n",
196 (const char*) wlan->macAddress2().toString(true),
197 (const char*) wlan->macAddress1().toString(true),
198 (const char*) wlan->macAddress3().toString(true) );
199 }
200 return;
186 } 201 }
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 )
14 qDebug( "DEMO: MAC Address is '%s'", (const char*) it.current()->macAddress().toString() ); 14 qDebug( "DEMO: MAC Address is '%s'", (const char*) it.current()->macAddress().toString() );
15 qDebug( "DEMO: MAC Address is '%s'", (const char*) it.current()->macAddress().toString(true) );
15 qDebug( "Demo: IPv4 Address is '%s'", (const char*) it.current()->ipV4Address() ); 16 qDebug( "Demo: IPv4 Address is '%s'", (const char*) it.current()->ipV4Address() );