summaryrefslogtreecommitdiff
path: root/libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp
Unidiff
Diffstat (limited to 'libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/examples/opienet/miniwellenreiter/miniwellenreiter.cpp63
1 files changed, 39 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 }