summaryrefslogtreecommitdiff
path: root/noncore/net/wellenreiter
authormickeyl <mickeyl>2003-04-10 17:26:35 (UTC)
committer mickeyl <mickeyl>2003-04-10 17:26:35 (UTC)
commit61eb255cc85160f7bb35602bbc10771be4da8708 (patch) (unidiff)
treeb66826f283d0ba41d3e27a44b8a0d63a7abc1238 /noncore/net/wellenreiter
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 (limited to 'noncore/net/wellenreiter') (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
@@ -11,8 +11,8 @@
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">
@@ -25,16 +25,16 @@
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>
@@ -83,14 +83,200 @@
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">
@@ -99,36 +285,17 @@
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" >
@@ -136,124 +303,96 @@
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>
@@ -261,27 +400,27 @@
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>
@@ -330,43 +469,34 @@
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>
@@ -375,92 +505,50 @@
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
@@ -21,9 +21,11 @@
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
@@ -85,6 +87,7 @@ WellenreiterConfigWindow::WellenreiterConfigWindow( QWidget * parent, const char
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
@@ -112,7 +115,7 @@ void 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 );
@@ -124,3 +127,14 @@ void WellenreiterConfigWindow::changedDeviceType(int t)
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
@@ -45,6 +45,7 @@ class WellenreiterConfigWindow : public WellenreiterConfigBase
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;
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
@@ -30,9 +30,11 @@ using namespace Opie;
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>
@@ -320,9 +322,20 @@ void Wellenreiter::startClicked()
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 {