summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2003-04-10 17:26:35 (UTC)
committer mickeyl <mickeyl>2003-04-10 17:26:35 (UTC)
commit61eb255cc85160f7bb35602bbc10771be4da8708 (patch) (unidiff)
treeb66826f283d0ba41d3e27a44b8a0d63a7abc1238
parent1064aea74c5dd7b3d4f87e483bd85f3fac0cf03c (diff)
downloadopie-61eb255cc85160f7bb35602bbc10771be4da8708.zip
opie-61eb255cc85160f7bb35602bbc10771be4da8708.tar.gz
opie-61eb255cc85160f7bb35602bbc10771be4da8708.tar.bz2
New Feature: Write a capture file for later dissection with tcpdump-compatible tools!
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/configbase.ui512
-rw-r--r--noncore/net/wellenreiter/gui/configwindow.cpp16
-rw-r--r--noncore/net/wellenreiter/gui/configwindow.h1
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.cpp17
4 files changed, 331 insertions, 215 deletions
diff --git a/noncore/net/wellenreiter/gui/configbase.ui b/noncore/net/wellenreiter/gui/configbase.ui
index 3ece270..ba4de32 100644
--- a/noncore/net/wellenreiter/gui/configbase.ui
+++ b/noncore/net/wellenreiter/gui/configbase.ui
@@ -1,53 +1,53 @@
1<!DOCTYPE UI><UI> 1<!DOCTYPE UI><UI>
2<class>WellenreiterConfigBase</class> 2<class>WellenreiterConfigBase</class>
3<widget> 3<widget>
4 <class>QDialog</class> 4 <class>QDialog</class>
5 <property stdset="1"> 5 <property stdset="1">
6 <name>name</name> 6 <name>name</name>
7 <cstring>WellenreiterConfigBase</cstring> 7 <cstring>WellenreiterConfigBase</cstring>
8 </property> 8 </property>
9 <property stdset="1"> 9 <property stdset="1">
10 <name>geometry</name> 10 <name>geometry</name>
11 <rect> 11 <rect>
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>220</width> 14 <width>236</width>
15 <height>306</height> 15 <height>342</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
18 <property stdset="1"> 18 <property stdset="1">
19 <name>caption</name> 19 <name>caption</name>
20 <string>Form1</string> 20 <string>Form1</string>
21 </property> 21 </property>
22 <property> 22 <property>
23 <name>layoutMargin</name> 23 <name>layoutMargin</name>
24 </property> 24 </property>
25 <property> 25 <property>
26 <name>layoutSpacing</name> 26 <name>layoutSpacing</name>
27 </property> 27 </property>
28 <vbox> 28 <grid>
29 <property stdset="1"> 29 <property stdset="1">
30 <name>margin</name> 30 <name>margin</name>
31 <number>3</number> 31 <number>6</number>
32 </property> 32 </property>
33 <property stdset="1"> 33 <property stdset="1">
34 <name>spacing</name> 34 <name>spacing</name>
35 <number>1</number> 35 <number>5</number>
36 </property> 36 </property>
37 <widget> 37 <widget row="0" column="0" rowspan="1" colspan="3" >
38 <class>QLayoutWidget</class> 38 <class>QLayoutWidget</class>
39 <property stdset="1"> 39 <property stdset="1">
40 <name>name</name> 40 <name>name</name>
41 <cstring>Layout5</cstring> 41 <cstring>Layout5</cstring>
42 </property> 42 </property>
43 <property> 43 <property>
44 <name>layoutSpacing</name> 44 <name>layoutSpacing</name>
45 </property> 45 </property>
46 <hbox> 46 <hbox>
47 <property stdset="1"> 47 <property stdset="1">
48 <name>margin</name> 48 <name>margin</name>
49 <number>0</number> 49 <number>0</number>
50 </property> 50 </property>
51 <property stdset="1"> 51 <property stdset="1">
52 <name>spacing</name> 52 <name>spacing</name>
53 <number>2</number> 53 <number>2</number>
@@ -70,231 +70,370 @@
70 <string>Sniffer</string> 70 <string>Sniffer</string>
71 </property> 71 </property>
72 </widget> 72 </widget>
73 <widget> 73 <widget>
74 <class>Line</class> 74 <class>Line</class>
75 <property stdset="1"> 75 <property stdset="1">
76 <name>name</name> 76 <name>name</name>
77 <cstring>Line9</cstring> 77 <cstring>Line9</cstring>
78 </property> 78 </property>
79 <property stdset="1"> 79 <property stdset="1">
80 <name>orientation</name> 80 <name>orientation</name>
81 <enum>Horizontal</enum> 81 <enum>Horizontal</enum>
82 </property> 82 </property>
83 </widget> 83 </widget>
84 </hbox> 84 </hbox>
85 </widget> 85 </widget>
86 <widget> 86 <widget row="1" column="0" rowspan="1" colspan="2" >
87 <class>QLayoutWidget</class> 87 <class>QComboBox</class>
88 <property stdset="1"> 88 <property stdset="1">
89 <name>name</name> 89 <name>name</name>
90 <cstring>Layout7</cstring> 90 <cstring>interfaceName</cstring>
91 </property>
92 <property stdset="1">
93 <name>enabled</name>
94 <bool>true</bool>
91 </property> 95 </property>
92 <property> 96 <property>
93 <name>layoutSpacing</name> 97 <name>whatsThis</name>
98 <string>Choose the interface used for sniffing.</string>
99 </property>
100 </widget>
101 <widget row="2" column="0" rowspan="1" colspan="2" >
102 <class>QComboBox</class>
103 <item>
104 <property>
105 <name>text</name>
106 <string>&lt;select&gt;</string>
107 </property>
108 </item>
109 <item>
110 <property>
111 <name>text</name>
112 <string>cisco</string>
113 </property>
114 </item>
115 <item>
116 <property>
117 <name>text</name>
118 <string>wlan-ng</string>
119 </property>
120 </item>
121 <item>
122 <property>
123 <name>text</name>
124 <string>hostap</string>
125 </property>
126 </item>
127 <item>
128 <property>
129 <name>text</name>
130 <string>orinoco</string>
131 </property>
132 </item>
133 <item>
134 <property>
135 <name>text</name>
136 <string>&lt;manual&gt;</string>
137 </property>
138 </item>
139 <item>
140 <property>
141 <name>text</name>
142 <string>&lt;file&gt;</string>
143 </property>
144 </item>
145 <property stdset="1">
146 <name>name</name>
147 <cstring>deviceType</cstring>
148 </property>
149 <property stdset="1">
150 <name>enabled</name>
151 <bool>true</bool>
152 </property>
153 <property>
154 <name>whatsThis</name>
155 <string>Choose the type of driver used for sniffing.</string>
156 </property>
157 </widget>
158 <widget row="3" column="0" rowspan="1" colspan="2" >
159 <class>QSpinBox</class>
160 <property stdset="1">
161 <name>name</name>
162 <cstring>hopInterval</cstring>
163 </property>
164 <property stdset="1">
165 <name>enabled</name>
166 <bool>true</bool>
167 </property>
168 <property stdset="1">
169 <name>suffix</name>
170 <string> ms</string>
171 </property>
172 <property stdset="1">
173 <name>maxValue</name>
174 <number>2000</number>
175 </property>
176 <property stdset="1">
177 <name>minValue</name>
178 <number>100</number>
179 </property>
180 <property stdset="1">
181 <name>lineStep</name>
182 <number>100</number>
183 </property>
184 <property>
185 <name>whatsThis</name>
186 <string>Choose the channel hop interval.</string>
187 </property>
188 </widget>
189 <widget row="3" column="2" >
190 <class>QLabel</class>
191 <property stdset="1">
192 <name>name</name>
193 <cstring>TextLabel3_3</cstring>
194 </property>
195 <property stdset="1">
196 <name>enabled</name>
197 <bool>true</bool>
198 </property>
199 <property stdset="1">
200 <name>text</name>
201 <string>Hop Interval</string>
202 </property>
203 </widget>
204 <widget row="2" column="2" >
205 <class>QLabel</class>
206 <property stdset="1">
207 <name>name</name>
208 <cstring>TextLabel2_3</cstring>
209 </property>
210 <property stdset="1">
211 <name>enabled</name>
212 <bool>true</bool>
213 </property>
214 <property stdset="1">
215 <name>text</name>
216 <string>Device Type</string>
217 </property>
218 </widget>
219 <widget row="1" column="2" >
220 <class>QLabel</class>
221 <property stdset="1">
222 <name>name</name>
223 <cstring>TextLabel1_2</cstring>
224 </property>
225 <property stdset="1">
226 <name>enabled</name>
227 <bool>true</bool>
228 </property>
229 <property stdset="1">
230 <name>text</name>
231 <string>Interface Name</string>
232 </property>
233 </widget>
234 <widget row="5" column="0" >
235 <class>QLabel</class>
236 <property stdset="1">
237 <name>name</name>
238 <cstring>TextLabel1_5</cstring>
239 </property>
240 <property stdset="1">
241 <name>text</name>
242 <string>Fake MAC:</string>
243 </property>
244 </widget>
245 <widget row="5" column="1" rowspan="1" colspan="2" >
246 <class>QLineEdit</class>
247 <property stdset="1">
248 <name>name</name>
249 <cstring>MAC</cstring>
250 </property>
251 <property stdset="1">
252 <name>enabled</name>
253 <bool>false</bool>
254 </property>
255 <property stdset="1">
256 <name>text</name>
257 <string>44:44:44:44:44:44</string>
258 </property>
259 </widget>
260 <widget row="4" column="0" rowspan="1" colspan="3" >
261 <class>QCheckBox</class>
262 <property stdset="1">
263 <name>name</name>
264 <cstring>activeScanning</cstring>
265 </property>
266 <property stdset="1">
267 <name>enabled</name>
268 <bool>false</bool>
269 </property>
270 <property stdset="1">
271 <name>text</name>
272 <string>Active Scanning (caution!)</string>
273 </property>
274 </widget>
275 <widget row="10" column="0" rowspan="1" colspan="3" >
276 <class>QLayoutWidget</class>
277 <property stdset="1">
278 <name>name</name>
279 <cstring>Layout5</cstring>
94 </property> 280 </property>
95 <grid> 281 <grid>
96 <property stdset="1"> 282 <property stdset="1">
97 <name>margin</name> 283 <name>margin</name>
98 <number>0</number> 284 <number>0</number>
99 </property> 285 </property>
100 <property stdset="1"> 286 <property stdset="1">
101 <name>spacing</name> 287 <name>spacing</name>
102 <number>2</number> 288 <number>6</number>
103 </property> 289 </property>
104 <widget row="0" column="0" > 290 <widget row="0" column="1" >
105 <class>QComboBox</class> 291 <class>QLabel</class>
106 <property stdset="1">
107 <name>name</name>
108 <cstring>interfaceName</cstring>
109 </property>
110 <property stdset="1">
111 <name>enabled</name>
112 <bool>true</bool>
113 </property>
114 <property>
115 <name>whatsThis</name>
116 <string>Choose the interface used for sniffing.</string>
117 </property>
118 </widget>
119 <widget row="4" column="0" rowspan="1" colspan="2" >
120 <class>QCheckBox</class>
121 <property stdset="1"> 292 <property stdset="1">
122 <name>name</name> 293 <name>name</name>
123 <cstring>activeScanning</cstring> 294 <cstring>TextLabel1</cstring>
124 </property>
125 <property stdset="1">
126 <name>enabled</name>
127 <bool>false</bool>
128 </property> 295 </property>
129 <property stdset="1"> 296 <property stdset="1">
130 <name>text</name> 297 <name>text</name>
131 <string>Active Scanning (caution!)</string> 298 <string>sound on new net</string>
132 </property> 299 </property>
133 </widget> 300 </widget>
134 <widget row="1" column="0" > 301 <widget row="1" column="0" >
135 <class>QComboBox</class> 302 <class>QComboBox</class>
136 <item> 303 <item>
137 <property> 304 <property>
138 <name>text</name> 305 <name>text</name>
139 <string>&lt;select&gt;</string> 306 <string>Ignore</string>
140 </property> 307 </property>
141 </item> 308 </item>
142 <item> 309 <item>
143 <property> 310 <property>
144 <name>text</name> 311 <name>text</name>
145 <string>cisco</string> 312 <string>Touch</string>
146 </property> 313 </property>
147 </item> 314 </item>
148 <item> 315 <item>
149 <property> 316 <property>
150 <name>text</name> 317 <name>text</name>
151 <string>wlan-ng</string> 318 <string>Key</string>
152 </property> 319 </property>
153 </item> 320 </item>
154 <item> 321 <item>
155 <property> 322 <property>
156 <name>text</name> 323 <name>text</name>
157 <string>hostap</string> 324 <string>Alarm</string>
158 </property> 325 </property>
159 </item> 326 </item>
327 <property stdset="1">
328 <name>name</name>
329 <cstring>beaconSound</cstring>
330 </property>
331 </widget>
332 <widget row="0" column="0" >
333 <class>QComboBox</class>
160 <item> 334 <item>
161 <property> 335 <property>
162 <name>text</name> 336 <name>text</name>
163 <string>orinoco</string> 337 <string>Ignore</string>
164 </property> 338 </property>
165 </item> 339 </item>
166 <item> 340 <item>
167 <property> 341 <property>
168 <name>text</name> 342 <name>text</name>
169 <string>&lt;manual&gt;</string> 343 <string>Touch</string>
170 </property> 344 </property>
171 </item> 345 </item>
172 <item> 346 <item>
173 <property> 347 <property>
174 <name>text</name> 348 <name>text</name>
175 <string>&lt;file&gt;</string> 349 <string>Key</string>
350 </property>
351 </item>
352 <item>
353 <property>
354 <name>text</name>
355 <string>Alarm</string>
176 </property> 356 </property>
177 </item> 357 </item>
178 <property stdset="1"> 358 <property stdset="1">
179 <name>name</name> 359 <name>name</name>
180 <cstring>deviceType</cstring> 360 <cstring>netSound</cstring>
181 </property>
182 <property stdset="1">
183 <name>enabled</name>
184 <bool>true</bool>
185 </property>
186 <property>
187 <name>whatsThis</name>
188 <string>Choose the type of driver used for sniffing.</string>
189 </property>
190 </widget>
191 <widget row="3" column="0" rowspan="1" colspan="2" >
192 <class>QCheckBox</class>
193 <property stdset="1">
194 <name>name</name>
195 <cstring>additionalInfo</cstring>
196 </property>
197 <property stdset="1">
198 <name>enabled</name>
199 <bool>false</bool>
200 </property>
201 <property stdset="1">
202 <name>text</name>
203 <string>Gather Additional Info</string>
204 </property>
205 </widget>
206 <widget row="2" column="0" >
207 <class>QSpinBox</class>
208 <property stdset="1">
209 <name>name</name>
210 <cstring>hopInterval</cstring>
211 </property>
212 <property stdset="1">
213 <name>enabled</name>
214 <bool>true</bool>
215 </property>
216 <property stdset="1">
217 <name>suffix</name>
218 <string> ms</string>
219 </property>
220 <property stdset="1">
221 <name>maxValue</name>
222 <number>2000</number>
223 </property>
224 <property stdset="1">
225 <name>minValue</name>
226 <number>100</number>
227 </property>
228 <property stdset="1">
229 <name>lineStep</name>
230 <number>100</number>
231 </property>
232 <property>
233 <name>whatsThis</name>
234 <string>Choose the channel hop interval.</string>
235 </property> 361 </property>
236 </widget> 362 </widget>
237 <widget row="2" column="1" > 363 <widget row="1" column="1" >
238 <class>QLabel</class> 364 <class>QLabel</class>
239 <property stdset="1"> 365 <property stdset="1">
240 <name>name</name> 366 <name>name</name>
241 <cstring>TextLabel3_3</cstring> 367 <cstring>TextLabel1_3</cstring>
242 </property>
243 <property stdset="1">
244 <name>enabled</name>
245 <bool>true</bool>
246 </property> 368 </property>
247 <property stdset="1"> 369 <property stdset="1">
248 <name>text</name> 370 <name>text</name>
249 <string>Hop Interval</string> 371 <string>sound on beacon</string>
250 </property> 372 </property>
251 </widget> 373 </widget>
252 <widget row="1" column="1" > 374 </grid>
253 <class>QLabel</class> 375 </widget>
376 <widget row="8" column="0" rowspan="1" colspan="3" >
377 <class>QLayoutWidget</class>
378 <property stdset="1">
379 <name>name</name>
380 <cstring>Layout7</cstring>
381 </property>
382 <hbox>
383 <property stdset="1">
384 <name>margin</name>
385 <number>0</number>
386 </property>
387 <property stdset="1">
388 <name>spacing</name>
389 <number>6</number>
390 </property>
391 <widget>
392 <class>QCheckBox</class>
254 <property stdset="1"> 393 <property stdset="1">
255 <name>name</name> 394 <name>name</name>
256 <cstring>TextLabel2_3</cstring> 395 <cstring>writeCaptureFile</cstring>
257 </property> 396 </property>
258 <property stdset="1"> 397 <property stdset="1">
259 <name>enabled</name> 398 <name>enabled</name>
260 <bool>true</bool> 399 <bool>true</bool>
261 </property> 400 </property>
262 <property stdset="1"> 401 <property stdset="1">
263 <name>text</name> 402 <name>text</name>
264 <string>Device Type</string> 403 <string>Write Capture File</string>
265 </property> 404 </property>
266 </widget> 405 </widget>
267 <widget row="0" column="1" > 406 <widget>
268 <class>QLabel</class> 407 <class>QToolButton</class>
269 <property stdset="1"> 408 <property stdset="1">
270 <name>name</name> 409 <name>name</name>
271 <cstring>TextLabel1_2</cstring> 410 <cstring>getCaptureFileName</cstring>
272 </property> 411 </property>
273 <property stdset="1"> 412 <property stdset="1">
274 <name>enabled</name> 413 <name>enabled</name>
275 <bool>true</bool> 414 <bool>false</bool>
276 </property> 415 </property>
277 <property stdset="1"> 416 <property stdset="1">
278 <name>text</name> 417 <name>text</name>
279 <string>Interface Name</string> 418 <string>...</string>
280 </property> 419 </property>
281 </widget> 420 </widget>
282 </grid> 421 </hbox>
283 </widget> 422 </widget>
284 <widget> 423 <widget row="7" column="0" rowspan="1" colspan="3" >
285 <class>QLayoutWidget</class> 424 <class>QLayoutWidget</class>
286 <property stdset="1"> 425 <property stdset="1">
287 <name>name</name> 426 <name>name</name>
288 <cstring>Layout6</cstring> 427 <cstring>Layout6</cstring>
289 </property> 428 </property>
290 <property> 429 <property>
291 <name>layoutSpacing</name> 430 <name>layoutSpacing</name>
292 </property> 431 </property>
293 <hbox> 432 <hbox>
294 <property stdset="1"> 433 <property stdset="1">
295 <name>margin</name> 434 <name>margin</name>
296 <number>0</number> 435 <number>0</number>
297 </property> 436 </property>
298 <property stdset="1"> 437 <property stdset="1">
299 <name>spacing</name> 438 <name>spacing</name>
300 <number>2</number> 439 <number>2</number>
@@ -317,150 +456,99 @@
317 <string>GUI</string> 456 <string>GUI</string>
318 </property> 457 </property>
319 </widget> 458 </widget>
320 <widget> 459 <widget>
321 <class>Line</class> 460 <class>Line</class>
322 <property stdset="1"> 461 <property stdset="1">
323 <name>name</name> 462 <name>name</name>
324 <cstring>Line9_2</cstring> 463 <cstring>Line9_2</cstring>
325 </property> 464 </property>
326 <property stdset="1"> 465 <property stdset="1">
327 <name>orientation</name> 466 <name>orientation</name>
328 <enum>Horizontal</enum> 467 <enum>Horizontal</enum>
329 </property> 468 </property>
330 </widget> 469 </widget>
331 </hbox> 470 </hbox>
332 </widget> 471 </widget>
333 <widget> 472 <spacer row="6" column="2" >
334 <class>QCheckBox</class> 473 <property>
335 <property stdset="1">
336 <name>name</name> 474 <name>name</name>
337 <cstring>groupNetworks</cstring> 475 <cstring>Spacer1</cstring>
338 </property>
339 <property stdset="1">
340 <name>enabled</name>
341 <bool>false</bool>
342 </property> 476 </property>
343 <property stdset="1"> 477 <property stdset="1">
344 <name>text</name> 478 <name>orientation</name>
345 <string>Group Detected Networks</string> 479 <enum>Vertical</enum>
346 </property> 480 </property>
347 </widget>
348 <widget>
349 <class>QCheckBox</class>
350 <property stdset="1"> 481 <property stdset="1">
351 <name>name</name> 482 <name>sizeType</name>
352 <cstring>enableActivity</cstring> 483 <enum>Expanding</enum>
353 </property> 484 </property>
354 <property stdset="1"> 485 <property>
355 <name>enabled</name> 486 <name>sizeHint</name>
356 <bool>false</bool> 487 <size>
357 </property> 488 <width>20</width>
358 <property stdset="1"> 489 <height>20</height>
359 <name>text</name> 490 </size>
360 <string>Enable Activity Display</string>
361 </property> 491 </property>
362 </widget> 492 </spacer>
363 <widget> 493 <widget row="9" column="0" rowspan="1" colspan="3" >
364 <class>QLayoutWidget</class> 494 <class>QLayoutWidget</class>
365 <property stdset="1"> 495 <property stdset="1">
366 <name>name</name> 496 <name>name</name>
367 <cstring>Layout5</cstring> 497 <cstring>Layout7</cstring>
368 </property> 498 </property>
369 <grid> 499 <hbox>
370 <property stdset="1"> 500 <property stdset="1">
371 <name>margin</name> 501 <name>margin</name>
372 <number>0</number> 502 <number>0</number>
373 </property> 503 </property>
374 <property stdset="1"> 504 <property stdset="1">
375 <name>spacing</name> 505 <name>spacing</name>
376 <number>6</number> 506 <number>6</number>
377 </property> 507 </property>
378 <widget row="0" column="1" > 508 <widget>
379 <class>QLabel</class> 509 <class>QLabel</class>
380 <property stdset="1"> 510 <property stdset="1">
381 <name>name</name> 511 <name>name</name>
382 <cstring>TextLabel1</cstring> 512 <cstring>TextLabel1_4</cstring>
383 </property> 513 </property>
384 <property stdset="1"> 514 <property stdset="1">
385 <name>text</name> 515 <name>text</name>
386 <string>sound on new net</string> 516 <string>CaptureFile:</string>
387 </property>
388 </widget>
389 <widget row="1" column="0" >
390 <class>QComboBox</class>
391 <item>
392 <property>
393 <name>text</name>
394 <string>Ignore</string>
395 </property>
396 </item>
397 <item>
398 <property>
399 <name>text</name>
400 <string>Touch</string>
401 </property>
402 </item>
403 <item>
404 <property>
405 <name>text</name>
406 <string>Key</string>
407 </property>
408 </item>
409 <item>
410 <property>
411 <name>text</name>
412 <string>Alarm</string>
413 </property>
414 </item>
415 <property stdset="1">
416 <name>name</name>
417 <cstring>beaconSound</cstring>
418 </property>
419 </widget>
420 <widget row="0" column="0" >
421 <class>QComboBox</class>
422 <item>
423 <property>
424 <name>text</name>
425 <string>Ignore</string>
426 </property>
427 </item>
428 <item>
429 <property>
430 <name>text</name>
431 <string>Touch</string>
432 </property>
433 </item>
434 <item>
435 <property>
436 <name>text</name>
437 <string>Key</string>
438 </property>
439 </item>
440 <item>
441 <property>
442 <name>text</name>
443 <string>Alarm</string>
444 </property>
445 </item>
446 <property stdset="1">
447 <name>name</name>
448 <cstring>netSound</cstring>
449 </property> 517 </property>
450 </widget> 518 </widget>
451 <widget row="1" column="1" > 519 <widget>
452 <class>QLabel</class> 520 <class>QLineEdit</class>
453 <property stdset="1"> 521 <property stdset="1">
454 <name>name</name> 522 <name>name</name>
455 <cstring>TextLabel1_3</cstring> 523 <cstring>captureFileName</cstring>
456 </property> 524 </property>
457 <property stdset="1"> 525 <property stdset="1">
458 <name>text</name> 526 <name>enabled</name>
459 <string>sound on beacon</string> 527 <bool>false</bool>
460 </property> 528 </property>
461 </widget> 529 </widget>
462 </grid> 530 </hbox>
463 </widget> 531 </widget>
464 </vbox> 532 </grid>
465</widget> 533</widget>
534<connections>
535 <connection>
536 <sender>writeCaptureFile</sender>
537 <signal>toggled(bool)</signal>
538 <receiver>getCaptureFileName</receiver>
539 <slot>setEnabled(bool)</slot>
540 </connection>
541 <connection>
542 <sender>activeScanning</sender>
543 <signal>toggled(bool)</signal>
544 <receiver>MAC</receiver>
545 <slot>setEnabled(bool)</slot>
546 </connection>
547 <connection>
548 <sender>writeCaptureFile</sender>
549 <signal>toggled(bool)</signal>
550 <receiver>captureFileName</receiver>
551 <slot>setEnabled(bool)</slot>
552 </connection>
553</connections>
466</UI> 554</UI>
diff --git a/noncore/net/wellenreiter/gui/configwindow.cpp b/noncore/net/wellenreiter/gui/configwindow.cpp
index 4aca526..716618e 100644
--- a/noncore/net/wellenreiter/gui/configwindow.cpp
+++ b/noncore/net/wellenreiter/gui/configwindow.cpp
@@ -8,35 +8,37 @@
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
10** 10**
11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 11** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 12** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13** 13**
14**********************************************************************/ 14**********************************************************************/
15 15
16/* LOCAL */ 16/* LOCAL */
17#include "configwindow.h" 17#include "configwindow.h"
18#include "mainwindow.h" 18#include "mainwindow.h"
19 19
20/* QT */ 20/* QT */
21#include <qapplication.h> 21#include <qapplication.h>
22#include <qcombobox.h> 22#include <qcombobox.h>
23#include <qfile.h> 23#include <qfile.h>
24#include <qlineedit.h>
24#include <qlayout.h> 25#include <qlayout.h>
25#include <qmap.h> 26#include <qmap.h>
26#include <qpushbutton.h> 27#include <qpushbutton.h>
28#include <qtoolbutton.h>
27#include <qspinbox.h> 29#include <qspinbox.h>
28#include <qtextstream.h> 30#include <qtextstream.h>
29 31
30/* OPIE */ 32/* OPIE */
31#include <opie2/onetwork.h> 33#include <opie2/onetwork.h>
32 34
33WellenreiterConfigWindow* WellenreiterConfigWindow::_instance = 0; 35WellenreiterConfigWindow* WellenreiterConfigWindow::_instance = 0;
34 36
35WellenreiterConfigWindow::WellenreiterConfigWindow( QWidget * parent, const char * name, WFlags f ) 37WellenreiterConfigWindow::WellenreiterConfigWindow( QWidget * parent, const char * name, WFlags f )
36 :WellenreiterConfigBase( parent, name, true, f ) 38 :WellenreiterConfigBase( parent, name, true, f )
37{ 39{
38 _devicetype[ "cisco" ] = DEVTYPE_CISCO; 40 _devicetype[ "cisco" ] = DEVTYPE_CISCO;
39 _devicetype[ "wlan-ng" ] = DEVTYPE_WLAN_NG; 41 _devicetype[ "wlan-ng" ] = DEVTYPE_WLAN_NG;
40 _devicetype[ "hostap" ] = DEVTYPE_HOSTAP; 42 _devicetype[ "hostap" ] = DEVTYPE_HOSTAP;
41 _devicetype[ "orinoco" ] = DEVTYPE_ORINOCO; 43 _devicetype[ "orinoco" ] = DEVTYPE_ORINOCO;
42 _devicetype[ "<manual>" ] = DEVTYPE_MANUAL; 44 _devicetype[ "<manual>" ] = DEVTYPE_MANUAL;
@@ -72,55 +74,67 @@ WellenreiterConfigWindow::WellenreiterConfigWindow( QWidget * parent, const char
72 deviceType->setCurrentItem( devicetype ); 74 deviceType->setCurrentItem( devicetype );
73 _guess = devicetype; 75 _guess = devicetype;
74 qDebug( "Wellenreiter: guessed device type to be #%d", devicetype ); 76 qDebug( "Wellenreiter: guessed device type to be #%d", devicetype );
75 } 77 }
76 } 78 }
77 79
78 #ifdef Q_WS_X11 // We're on X11: adding an Ok-Button for the Dialog here 80 #ifdef Q_WS_X11 // We're on X11: adding an Ok-Button for the Dialog here
79 QPushButton* okButton = new QPushButton( "ok", this ); 81 QPushButton* okButton = new QPushButton( "ok", this );
80 okButton->show(); 82 okButton->show();
81 Layout5_2->addWidget( okButton, 0, 3 ); //FIXME: rename this in configbase.ui 83 Layout5_2->addWidget( okButton, 0, 3 ); //FIXME: rename this in configbase.ui
82 connect( okButton, SIGNAL( clicked() ), this, SLOT( accept() ) ); 84 connect( okButton, SIGNAL( clicked() ), this, SLOT( accept() ) );
83 #endif 85 #endif
84 86
85 WellenreiterConfigWindow::_instance = this; 87 WellenreiterConfigWindow::_instance = this;
86 88
87 connect( deviceType, SIGNAL( activated(int) ), this, SLOT( changedDeviceType(int) ) ); 89 connect( deviceType, SIGNAL( activated(int) ), this, SLOT( changedDeviceType(int) ) );
90 connect( getCaptureFileName, SIGNAL( clicked() ), this, SLOT( getCaptureFileNameClicked() ) );
88}; 91};
89 92
90 93
91int WellenreiterConfigWindow::daemonDeviceType() 94int WellenreiterConfigWindow::daemonDeviceType()
92{ 95{
93 QString name = deviceType->currentText(); 96 QString name = deviceType->currentText();
94 if ( _devicetype.contains( name ) ) 97 if ( _devicetype.contains( name ) )
95 { 98 {
96 return _devicetype[name]; 99 return _devicetype[name];
97 } 100 }
98 else 101 else
99 { 102 {
100 return 0; 103 return 0;
101 } 104 }
102}; 105};
103 106
104 107
105int WellenreiterConfigWindow::daemonHopInterval() 108int WellenreiterConfigWindow::daemonHopInterval()
106{ 109{
107 return hopInterval->cleanText().toInt(); 110 return hopInterval->cleanText().toInt();
108} 111}
109 112
110 113
111void WellenreiterConfigWindow::changedDeviceType(int t) 114void WellenreiterConfigWindow::changedDeviceType(int t)
112{ 115{
113 if ( t != DEVTYPE_FILE ) return; 116 if ( t != DEVTYPE_FILE ) return;
114 QString name = ( (WellenreiterMainWindow*) qApp->mainWidget() )->getFileName(false); 117 QString name = ( (WellenreiterMainWindow*) qApp->mainWidget() )->getFileName(false);
115 if ( !name.isNull() && QFile::exists( name ) ) 118 if ( !name.isEmpty() && QFile::exists( name ) )
116 { 119 {
117 interfaceName->insertItem( name ); 120 interfaceName->insertItem( name );
118 interfaceName->setCurrentItem( interfaceName->count()-1 ); 121 interfaceName->setCurrentItem( interfaceName->count()-1 );
119 } 122 }
120 else 123 else
121 { 124 {
122 deviceType->setCurrentItem( _guess ); 125 deviceType->setCurrentItem( _guess );
123 } 126 }
124 127
125} 128}
126 129
130
131void WellenreiterConfigWindow::getCaptureFileNameClicked()
132{
133 QString name = ( (WellenreiterMainWindow*) qApp->mainWidget() )->getFileName(true);
134 qDebug( "name = %s", (const char*) name );
135 if ( !name.isEmpty() )
136 {
137 captureFileName->setText( name );
138 }
139}
140
diff --git a/noncore/net/wellenreiter/gui/configwindow.h b/noncore/net/wellenreiter/gui/configwindow.h
index 7df1a80..c7c70a6 100644
--- a/noncore/net/wellenreiter/gui/configwindow.h
+++ b/noncore/net/wellenreiter/gui/configwindow.h
@@ -32,25 +32,26 @@ const int DEVTYPE_FILE = 6;
32class WellenreiterConfigWindow; 32class WellenreiterConfigWindow;
33 33
34class WellenreiterConfigWindow : public WellenreiterConfigBase 34class WellenreiterConfigWindow : public WellenreiterConfigBase
35{ 35{
36 Q_OBJECT 36 Q_OBJECT
37 37
38 public: 38 public:
39 WellenreiterConfigWindow( QWidget * parent = 0, const char * name = "WellenreiterConfigWindow", WFlags f = 0 ); 39 WellenreiterConfigWindow( QWidget * parent = 0, const char * name = "WellenreiterConfigWindow", WFlags f = 0 );
40 int daemonDeviceType(); 40 int daemonDeviceType();
41 int daemonHopInterval(); 41 int daemonHopInterval();
42 const QString soundOnNetwork() const { return netSound->currentText(); }; 42 const QString soundOnNetwork() const { return netSound->currentText(); };
43 const QString soundOnBeacon() const { return beaconSound->currentText(); }; 43 const QString soundOnBeacon() const { return beaconSound->currentText(); };
44 static WellenreiterConfigWindow* instance() { return _instance; }; 44 static WellenreiterConfigWindow* instance() { return _instance; };
45 45
46 public slots: 46 public slots:
47 void changedDeviceType(int); 47 void changedDeviceType(int);
48 void getCaptureFileNameClicked();
48 49
49 protected: 50 protected:
50 QMap<QString, int> _devicetype; 51 QMap<QString, int> _devicetype;
51 static WellenreiterConfigWindow* _instance; 52 static WellenreiterConfigWindow* _instance;
52 int _guess; 53 int _guess;
53 54
54}; 55};
55 56
56#endif 57#endif
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp
index 5c10c3b..be2a86e 100644
--- a/noncore/net/wellenreiter/gui/wellenreiter.cpp
+++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp
@@ -17,35 +17,37 @@
17 17
18#ifdef QWS 18#ifdef QWS
19#include <opie/odevice.h> 19#include <opie/odevice.h>
20using namespace Opie; 20using namespace Opie;
21#endif 21#endif
22 22
23#ifdef QWS 23#ifdef QWS
24#include <opie2/oapplication.h> 24#include <opie2/oapplication.h>
25#else 25#else
26#include <qapplication.h> 26#include <qapplication.h>
27#endif 27#endif
28#include <opie2/onetwork.h> 28#include <opie2/onetwork.h>
29#include <opie2/opcap.h> 29#include <opie2/opcap.h>
30 30
31// Qt 31// Qt
32 32
33#include <qcheckbox.h>
34#include <qcombobox.h>
33#include <qpushbutton.h> 35#include <qpushbutton.h>
36#include <qlineedit.h>
34#include <qmessagebox.h> 37#include <qmessagebox.h>
35#include <qcombobox.h>
36#include <qspinbox.h> 38#include <qspinbox.h>
37#include <qtoolbutton.h> 39#include <qtoolbutton.h>
38#include <qmainwindow.h> 40#include <qmainwindow.h>
39 41
40// Standard 42// Standard
41 43
42#include <assert.h> 44#include <assert.h>
43#include <errno.h> 45#include <errno.h>
44#include <unistd.h> 46#include <unistd.h>
45#include <string.h> 47#include <string.h>
46#include <sys/types.h> 48#include <sys/types.h>
47#include <stdlib.h> 49#include <stdlib.h>
48 50
49// Local 51// Local
50 52
51#include "wellenreiter.h" 53#include "wellenreiter.h"
@@ -307,35 +309,46 @@ void Wellenreiter::startClicked()
307 } 309 }
308 310
309 // switch device into monitor mode 311 // switch device into monitor mode
310 if ( cardtype < DEVTYPE_FILE ) 312 if ( cardtype < DEVTYPE_FILE )
311 { 313 {
312 if ( cardtype != DEVTYPE_MANUAL ) 314 if ( cardtype != DEVTYPE_MANUAL )
313 iface->setMonitorMode( true ); 315 iface->setMonitorMode( true );
314 if ( !iface->monitorMode() ) 316 if ( !iface->monitorMode() )
315 { 317 {
316 QMessageBox::warning( this, "Wellenreiter II", "Can't set device into monitor mode." ); 318 QMessageBox::warning( this, "Wellenreiter II", "Can't set device into monitor mode." );
317 return; 319 return;
318 } 320 }
319 } 321 }
320 322
321 // open pcap and start sniffing 323 // open pcap and start sniffing
322 if ( cardtype != DEVTYPE_FILE ) 324 if ( cardtype != DEVTYPE_FILE )
323 pcap->open( interface ); 325 {
326 if ( configwindow->writeCaptureFile->isEnabled() )
327 {
328 pcap->open( interface, configwindow->captureFileName->text() );
329 }
330 else
331 {
332 pcap->open( interface );
333 }
334 }
324 else 335 else
336 {
325 pcap->open( QFile( interface ) ); 337 pcap->open( QFile( interface ) );
338 }
326 339
327 if ( !pcap->isOpen() ) 340 if ( !pcap->isOpen() )
328 { 341 {
329 QMessageBox::warning( this, "Wellenreiter II", "Can't open packet capturer:\n" + QString(strerror( errno ) )); 342 QMessageBox::warning( this, "Wellenreiter II", "Can't open packet capturer:\n" + QString(strerror( errno ) ));
330 return; 343 return;
331 } 344 }
332 345
333 // set capturer to non-blocking mode 346 // set capturer to non-blocking mode
334 pcap->setBlocking( false ); 347 pcap->setBlocking( false );
335 348
336 // start channel hopper 349 // start channel hopper
337 if ( cardtype != DEVTYPE_FILE ) 350 if ( cardtype != DEVTYPE_FILE )
338 iface->setChannelHopping( 1000 ); //use interval from config window 351 iface->setChannelHopping( 1000 ); //use interval from config window
339 352
340 if ( cardtype != DEVTYPE_FILE ) 353 if ( cardtype != DEVTYPE_FILE )
341 { 354 {