summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2005-05-10 17:27:42 (UTC)
committer mickeyl <mickeyl>2005-05-10 17:27:42 (UTC)
commit7ef3deff5f0023f0e73ad805b13cbd2b12bc1395 (patch) (unidiff)
tree17e209a557b79fd47a82301dae8982a3d16a4cdf
parente31f22952f47aeb54b206349f1e469704a6a6e8f (diff)
downloadopie-7ef3deff5f0023f0e73ad805b13cbd2b12bc1395.zip
opie-7ef3deff5f0023f0e73ad805b13cbd2b12bc1395.tar.gz
opie-7ef3deff5f0023f0e73ad805b13cbd2b12bc1395.tar.bz2
Remove joining networks from Wellenreiter. It never really fit into the
philosophy of this application and with OpieStumbler there is an application that does it better (active scan).
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--ChangeLog1
-rw-r--r--noncore/net/wellenreiter/gui/gui.pro2
-rw-r--r--noncore/net/wellenreiter/gui/scanlist.cpp11
-rw-r--r--noncore/net/wellenreiter/gui/scanlist.h1
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.cpp39
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.h2
-rw-r--r--noncore/net/wellenreiter/wellenreiter.pro2
7 files changed, 5 insertions, 53 deletions
diff --git a/ChangeLog b/ChangeLog
index d560127..04a585a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,286 +1,287 @@
1 2005-??-??Opie 1.2.1 1 2005-??-??Opie 1.2.1
2 2
3 3
4 New Features 4 New Features
5 ------------ 5 ------------
6 * OpieStumbler: Scans WiFi networks using the wireless extension scanning (skyhusker) 6 * OpieStumbler: Scans WiFi networks using the wireless extension scanning (skyhusker)
7 * Opie-Reader: Support for document formats ArriereGo and Reb, add flite output (tim,pohly) 7 * Opie-Reader: Support for document formats ArriereGo and Reb, add flite output (tim,pohly)
8 * Opie-Networksettings: Add support for wlan-ng devices and improve WEP handling (Dirk Opfer) 8 * Opie-Networksettings: Add support for wlan-ng devices and improve WEP handling (Dirk Opfer)
9 * Wellenreiter: Remove Joining networks - use OpieStumbler for that (mickeyl)
9 10
10 Fixed Bugs 11 Fixed Bugs
11 ---------- 12 ----------
12 * #1476 - Wrong order of application entries in the O-menu (skyhusker) 13 * #1476 - Wrong order of application entries in the O-menu (skyhusker)
13 * #1535- Missing line break and unnecessary location shown with Today-Calendar plugin (deller) 14 * #1535- Missing line break and unnecessary location shown with Today-Calendar plugin (deller)
14 * #1565 - crash-fix in odevice.cpp while scanning the distribution table (deller) 15 * #1565 - crash-fix in odevice.cpp while scanning the distribution table (deller)
15 * #1614 - Make Opie-console start in $HOME instead of / (skyhusker) 16 * #1614 - Make Opie-console start in $HOME instead of / (skyhusker)
16 * n.a.- always show volume and wireless applet popups inside visible screen (deller) 17 * n.a.- always show volume and wireless applet popups inside visible screen (deller)
17 * n.a. - scale O-Menu-Applets appropriately (mickeyl) 18 * n.a. - scale O-Menu-Applets appropriately (mickeyl)
18 * n.a.- libopienet: fix bugs in wireless scanning and setting SSID (skyhusker) 19 * n.a.- libopienet: fix bugs in wireless scanning and setting SSID (skyhusker)
19 * n.a.- Wellenreiter: relax WE version matching test a bit (mickeyl) 20 * n.a.- Wellenreiter: relax WE version matching test a bit (mickeyl)
20 * n.a.- scale BluezApplet appropriately and use larger icons (mickeyl) 21 * n.a.- scale BluezApplet appropriately and use larger icons (mickeyl)
21 * n.a.- memoryapplet: fix crash in memoryapplet on kernels without swap support (seneca cunningham) 22 * n.a.- memoryapplet: fix crash in memoryapplet on kernels without swap support (seneca cunningham)
22 * n.a. - networksettings: ignore hostap control interfaces wifi* (mickeyl) 23 * n.a. - networksettings: ignore hostap control interfaces wifi* (mickeyl)
23 24
24 Internal 25 Internal
25 -------- 26 --------
26 * Make BluezApplet use OTaskbarApplet (mickeyl) 27 * Make BluezApplet use OTaskbarApplet (mickeyl)
27 * Rewrite OFileNotification to use the upcoming inotify interface instead of the deprecated dnotify (mickeyl) 28 * Rewrite OFileNotification to use the upcoming inotify interface instead of the deprecated dnotify (mickeyl)
28 * libopienet: Skip hostap control interfaces 'wifi' and improve robustness in ONetworkInterface (mickeyl) 29 * libopienet: Skip hostap control interfaces 'wifi' and improve robustness in ONetworkInterface (mickeyl)
29 30
30 2005-03-25Opie 1.2.0 31 2005-03-25Opie 1.2.0
31 32
32 Fixed Bugs 33 Fixed Bugs
33 ---------- 34 ----------
34 * #1613 - AdvancedFM - scale toolbar icons appropriately (drw) 35 * #1613 - AdvancedFM - scale toolbar icons appropriately (drw)
35 * #1620 - OFileSelector - show the button on press and not on press on hold (alwin) 36 * #1620 - OFileSelector - show the button on press and not on press on hold (alwin)
36 * #1473 - Opie-Eye - Same as #1620 but we lack a common FileSystem Button class (zecke) 37 * #1473 - Opie-Eye - Same as #1620 but we lack a common FileSystem Button class (zecke)
37 * n.a. - PackageManager - fix bug where messages show up multiple times in install dialog (drw) 38 * n.a. - PackageManager - fix bug where messages show up multiple times in install dialog (drw)
38 * n.a.- make qpeglobal.h include qglobal.h (zecke) 39 * n.a.- make qpeglobal.h include qglobal.h (zecke)
39 40
40 2005-03-20Opie 1.2.0-rc1 41 2005-03-20Opie 1.2.0-rc1
41 42
42 43
43 New Features 44 New Features
44 ------------ 45 ------------
45 * Launcher: Support a static background pixmap (mickeyl) 46 * Launcher: Support a static background pixmap (mickeyl)
46 * LauncherSettings: Choose whether to have a static background pixmap (mickeyl) 47 * LauncherSettings: Choose whether to have a static background pixmap (mickeyl)
47 * PackageManager supports the 'lists_dir' ipkg configuration option (drw) 48 * PackageManager supports the 'lists_dir' ipkg configuration option (drw)
48 * Added hi-res inline images for large resolution devices (drw) 49 * Added hi-res inline images for large resolution devices (drw)
49 * Improved launcher icons for consistency (ar) 50 * Improved launcher icons for consistency (ar)
50 * Datebook: Added plugin system to datebook so holidays and birthdays from contacts may displayed in datebook (alwin) 51 * Datebook: Added plugin system to datebook so holidays and birthdays from contacts may displayed in datebook (alwin)
51 52
52 Fixed Bugs 53 Fixed Bugs
53 ---------- 54 ----------
54 * #1236 - VCards contained empty home and work address entries causing Palms to crash (eilers) 55 * #1236 - VCards contained empty home and work address entries causing Palms to crash (eilers)
55 * #1412 - Launcher Settings - fixed default settings for background in Edit tab dialog (drw) 56 * #1412 - Launcher Settings - fixed default settings for background in Edit tab dialog (drw)
56 * #1472 - Opie textedit now check for unsaved changes on ESC key (ljp) 57 * #1472 - Opie textedit now check for unsaved changes on ESC key (ljp)
57 * #1474 - Implement GUI for Scrollbars on the Left in Appearance (zecke) 58 * #1474 - Implement GUI for Scrollbars on the Left in Appearance (zecke)
58 * #1482 - Fix double '/' in paths (zecke) 59 * #1482 - Fix double '/' in paths (zecke)
59 * #1536 - Autosave of custom locations in opie backup (ar) 60 * #1536 - Autosave of custom locations in opie backup (ar)
60 * #1539 - Fixed displaying too long path in the delete dialog in opie-eye (zecke) 61 * #1539 - Fixed displaying too long path in the delete dialog in opie-eye (zecke)
61 * #1540 - Implemented deletion of DocLnks in opie-eye (zecke) 62 * #1540 - Implemented deletion of DocLnks in opie-eye (zecke)
62 * #1542 - Fixed Todo crash when priority < 1 or > 5 (drw) 63 * #1542 - Fixed Todo crash when priority < 1 or > 5 (drw)
63 * #1550 - Browse for alarm sound start in QPEDIR/sounds/ (zecke) 64 * #1550 - Browse for alarm sound start in QPEDIR/sounds/ (zecke)
64 * #1554 - Fixed Opie-Console name in .desktop file (mickeyl) 65 * #1554 - Fixed Opie-Console name in .desktop file (mickeyl)
65 * #1556 - Start to look for sound files in /opt/QtPalmtop/sounds (zecke) 66 * #1556 - Start to look for sound files in /opt/QtPalmtop/sounds (zecke)
66 * #1558 - Fixed opie-login breaking opie startup (mickeyl) 67 * #1558 - Fixed opie-login breaking opie startup (mickeyl)
67 * #1560 - Fixed Opie-Console picking up the wrong shell (bluelightning) 68 * #1560 - Fixed Opie-Console picking up the wrong shell (bluelightning)
68 * #1570 - Confirmation needed befor Restore a backup and overwrite local data (ar) 69 * #1570 - Confirmation needed befor Restore a backup and overwrite local data (ar)
69 * #1591 - Addressbook sortorder changed by clicking on column 0 (eilers) 70 * #1591 - Addressbook sortorder changed by clicking on column 0 (eilers)
70 * #1599 - Security - change recommendation for opie-multiauth to opie-securityplugin (gints) 71 * #1599 - Security - change recommendation for opie-multiauth to opie-securityplugin (gints)
71 * #1604 - Checkbook crashed on startup (drw) 72 * #1604 - Checkbook crashed on startup (drw)
72 * #1608 - Addressbook crashed after search, which may caused by not initialzed member variable (eilers) 73 * #1608 - Addressbook crashed after search, which may caused by not initialzed member variable (eilers)
73 * #1608 - QueryByExampe-Datediff on SQL database did not worked properly (eilers) 74 * #1608 - QueryByExampe-Datediff on SQL database did not worked properly (eilers)
74 * n.a. - Netsystemtime - fixed UI to prevent error dialog from displaying when it shouldn't, get rid of some compiler warnings (drw) 75 * n.a. - Netsystemtime - fixed UI to prevent error dialog from displaying when it shouldn't, get rid of some compiler warnings (drw)
75 * n.a. - PackageManager - fixed where last package in status file was not shown as installed when it should be (drw) 76 * n.a. - PackageManager - fixed where last package in status file was not shown as installed when it should be (drw)
76 * n.a. - PackageManager - fixed bug where lists_dir was not being honored at startup (drw) 77 * n.a. - PackageManager - fixed bug where lists_dir was not being honored at startup (drw)
77 * n.a. - PackageManager - provided default value for lists_dir when none is entered in configuration dialog (drw) 78 * n.a. - PackageManager - provided default value for lists_dir when none is entered in configuration dialog (drw)
78 * n.a. - OTabWidget - fixed scroll buttons, fix display position of tabs (drw) 79 * n.a. - OTabWidget - fixed scroll buttons, fix display position of tabs (drw)
79 * n.a. - AddressBook - fixed sorting by 'File As' name (drw) 80 * n.a. - AddressBook - fixed sorting by 'File As' name (drw)
80 * n.a. - AddressBook - fixed category handling for 'All' and 'Unfiled' (eilers) 81 * n.a. - AddressBook - fixed category handling for 'All' and 'Unfiled' (eilers)
81 * n.a. - AddressBook - fixed letter picker record selection and sort records afterwards (drw) 82 * n.a. - AddressBook - fixed letter picker record selection and sort records afterwards (drw)
82 83
83 Internal 84 Internal
84 -------- 85 --------
85 * Worked around bug in Qt/Embedded 2.3.10: qt_version() returns 231 (mickeyl) 86 * Worked around bug in Qt/Embedded 2.3.10: qt_version() returns 231 (mickeyl)
86 * Killed the need for weak symbols in QtE (zecke) 87 * Killed the need for weak symbols in QtE (zecke)
87 * Added optional building libqpe without inline images (mickeyl) 88 * Added optional building libqpe without inline images (mickeyl)
88 * OColorButton - fixed so does not emit a colorSelected signal inside of resizeEvent (drw) 89 * OColorButton - fixed so does not emit a colorSelected signal inside of resizeEvent (drw)
89 90
90 2005-02-03Opie 1.1.9 91 2005-02-03Opie 1.1.9
91 92
92 New Features 93 New Features
93 ------------ 94 ------------
94 * Number of icon columns in Launcher is customizable through Launcher.conf (hrw,zecke,mickeyl) 95 * Number of icon columns in Launcher is customizable through Launcher.conf (hrw,zecke,mickeyl)
95 * Number of icon columns in Launcher is customizable through LauncherSettings (mickeyl) 96 * Number of icon columns in Launcher is customizable through LauncherSettings (mickeyl)
96 * Usability enhancements in OpieIRC (skyhusker) 97 * Usability enhancements in OpieIRC (skyhusker)
97 98
98 Fixed Bugs 99 Fixed Bugs
99 ---------- 100 ----------
100 * #1501 - Fixed bug in todo sql backend (eilers) 101 * #1501 - Fixed bug in todo sql backend (eilers)
101 * #1505 - Added more Swap sizes in memoryapplet (mickeyl) 102 * #1505 - Added more Swap sizes in memoryapplet (mickeyl)
102 * #1525 - Hopefully fixed double alarms and not removing alarms set with the Clock application (zecke) 103 * #1525 - Hopefully fixed double alarms and not removing alarms set with the Clock application (zecke)
103 * #1533 - Security Owner Dialog (shown in case of unsuccessfull authentiacation) wasn't able to display information in non latin1 encoding (zecke) 104 * #1533 - Security Owner Dialog (shown in case of unsuccessfull authentiacation) wasn't able to display information in non latin1 encoding (zecke)
104 * n.a. - Removed hard coded font sizes in a couple of inputmethods (mickeyl) 105 * n.a. - Removed hard coded font sizes in a couple of inputmethods (mickeyl)
105 * n.a. - Removed MediumDlg appearing prior to FirstUsage wizard (i.e. calibration) (mickeyl) 106 * n.a. - Removed MediumDlg appearing prior to FirstUsage wizard (i.e. calibration) (mickeyl)
106 * n.a. - Fixed numerous buglets in OpieIRC (skyhusker) 107 * n.a. - Fixed numerous buglets in OpieIRC (skyhusker)
107 108
108 Internal 109 Internal
109 -------- 110 --------
110 * Added the Qtopia 1.7 SDK macros for quick-apps to easa compilation of 3rd party apps against our headers (mickeyl) 111 * Added the Qtopia 1.7 SDK macros for quick-apps to easa compilation of 3rd party apps against our headers (mickeyl)
111 * You can now use the Opie build system in combination with a OpenEmbedded staging area which makes a nice cross development environment (mickeyl) 112 * You can now use the Opie build system in combination with a OpenEmbedded staging area which makes a nice cross development environment (mickeyl)
112 * Made Opie compilable with Qt/Embedded 2.3.10 (ar) 113 * Made Opie compilable with Qt/Embedded 2.3.10 (ar)
113 * Changed Launcher to get default orientation from ODevice w/ QWS_DISPLAY overriding (mickeyl) 114 * Changed Launcher to get default orientation from ODevice w/ QWS_DISPLAY overriding (mickeyl)
114 * Build tree cleanups (mickeyl) 115 * Build tree cleanups (mickeyl)
115 116
116 2004-11-26Opie 1.1.8 117 2004-11-26Opie 1.1.8
117 118
118 New Features 119 New Features
119 ------------ 120 ------------
120 * PackageManager supports installation of local ipkg files (drw) 121 * PackageManager supports installation of local ipkg files (drw)
121 * PackageManager supports linking of applications to root (drw) 122 * PackageManager supports linking of applications to root (drw)
122 * PackageManager supports src/gz feeds (drw,wimpie) 123 * PackageManager supports src/gz feeds (drw,wimpie)
123 * Added a syslog information tab to sysinfo (mickeyl) 124 * Added a syslog information tab to sysinfo (mickeyl)
124 * Added new, more consistent, PIM icons + a GIMP teplate (ar) 125 * Added new, more consistent, PIM icons + a GIMP teplate (ar)
125 126
126 Fixed Bugs 127 Fixed Bugs
127 ---------- 128 ----------
128 * #1017 - Tetrix doesn't display correctly for high resolution screens (drw) 129 * #1017 - Tetrix doesn't display correctly for high resolution screens (drw)
129 * #1269 - VCards were imported into personal area if it was activated (eilers) 130 * #1269 - VCards were imported into personal area if it was activated (eilers)
130 * #1464 - Packagemanager dont set active filter after install a package (drw) 131 * #1464 - Packagemanager dont set active filter after install a package (drw)
131 * #1479 - Improved VCard-Parser to import VCards created by Evolution 2 and Apple Addressbook (eilers) 132 * #1479 - Improved VCard-Parser to import VCards created by Evolution 2 and Apple Addressbook (eilers)
132 * #1493 - Fixed one column layout bug of the launcher (hrw) 133 * #1493 - Fixed one column layout bug of the launcher (hrw)
133 * n.a. - PackageManager - (Minor UI tweak) in filter dialog, when option is enabled, set focus to widget that corresponds to that option (drw) 134 * n.a. - PackageManager - (Minor UI tweak) in filter dialog, when option is enabled, set focus to widget that corresponds to that option (drw)
134 * n.a. - PackageManager - (Minor UI tweak) fix double entry in source feed configuration when adding a new feed (drw) 135 * n.a. - PackageManager - (Minor UI tweak) fix double entry in source feed configuration when adding a new feed (drw)
135 * n.a. - Battery Applet - fix sizing of battery info popup (drw,mickeyl) 136 * n.a. - Battery Applet - fix sizing of battery info popup (drw,mickeyl)
136 137
137 Internal 138 Internal
138 -------- 139 --------
139 * Moved libopie1 to unsupported (mickeyl) 140 * Moved libopie1 to unsupported (mickeyl)
140 * Implemented generic queryByExample() with incremental searching. A lot of internal changes of the Pim2-library (eilers) 141 * Implemented generic queryByExample() with incremental searching. A lot of internal changes of the Pim2-library (eilers)
141 * Added fast and full featured and incremental sorted() for SQL addressbook backend (eilers) 142 * Added fast and full featured and incremental sorted() for SQL addressbook backend (eilers)
142 143
143 2004-11-14Opie 1.1.7 144 2004-11-14Opie 1.1.7
144 145
145 New Features 146 New Features
146 ------------ 147 ------------
147 * libOpieDB now uses SQLite V3 instead V2. Remember to upgrade your database files! (eilers) 148 * libOpieDB now uses SQLite V3 instead V2. Remember to upgrade your database files! (eilers)
148 * Backup now uses the busy indicator when backing up and restore (ar) 149 * Backup now uses the busy indicator when backing up and restore (ar)
149 * OpiePlayer2 gained adding of Directories to the playlist (zecke) 150 * OpiePlayer2 gained adding of Directories to the playlist (zecke)
150 * OpiePlayer2 better error handling (zecke) 151 * OpiePlayer2 better error handling (zecke)
151 * OpiePlayer2 progress indication while streaming (zecke) 152 * OpiePlayer2 progress indication while streaming (zecke)
152 * OpiePlayer2 ported to use libxine 1.0.0-rc6a (brad,zecke) 153 * OpiePlayer2 ported to use libxine 1.0.0-rc6a (brad,zecke)
153 * Ported brightnessapplet from Qtopia 1.7 (mickeyl) 154 * Ported brightnessapplet from Qtopia 1.7 (mickeyl)
154 * Opie-Eye got a Digital Camera File Backend (alwin,zecke) 155 * Opie-Eye got a Digital Camera File Backend (alwin,zecke)
155 * Support for Tuxpad1 of Tradesquare.NL (mickeyl,zecke) 156 * Support for Tuxpad1 of Tradesquare.NL (mickeyl,zecke)
156 * Opie-Console use Custom Font and Size in a Profile (harlekin) 157 * Opie-Console use Custom Font and Size in a Profile (harlekin)
157 * Opie-Console transparently log the Output and Input to a file (harlekin) 158 * Opie-Console transparently log the Output and Input to a file (harlekin)
158 * Added new O-menu icon to lock the PDA immediately: opie-lockapplet (clem) 159 * Added new O-menu icon to lock the PDA immediately: opie-lockapplet (clem)
159 * Opie-Security now hides the plugin-based authentication tabs if no auth. plugin package is installed (clem) 160 * Opie-Security now hides the plugin-based authentication tabs if no auth. plugin package is installed (clem)
160 * Opie-Security gained a 'test authentication' button (clem) 161 * Opie-Security gained a 'test authentication' button (clem)
161 * Opie-Eye got a more unique layout (menubar), a slideshow, user can setup some defaults 162 * Opie-Eye got a more unique layout (menubar), a slideshow, user can setup some defaults
162 * Opie-Mail improve the handling of POP mail boxes (alwin) 163 * Opie-Mail improve the handling of POP mail boxes (alwin)
163 * Both Opie-Eye and Opie-Mail were greatly improved due the hard work of Rajko Albrecht(alwin) 164 * Both Opie-Eye and Opie-Mail were greatly improved due the hard work of Rajko Albrecht(alwin)
164 * Opie IRC - backports of the 'NeIRC fork' (zecke) 165 * Opie IRC - backports of the 'NeIRC fork' (zecke)
165 166
166 Fixed Bugs 167 Fixed Bugs
167 ---------- 168 ----------
168 * #501 - Pickboard is able to show 'Umlaute' (TT,zecke) 169 * #501 - Pickboard is able to show 'Umlaute' (TT,zecke)
169 * #608 - Make Opie usable for left handed users (zecke) 170 * #608 - Make Opie usable for left handed users (zecke)
170 * #957 - Import of VCards/VTodos/VEvents with BASE64 encoding (ljp,zecke) 171 * #957 - Import of VCards/VTodos/VEvents with BASE64 encoding (ljp,zecke)
171 * #1245 - Opie-Go 'paused' (zecke) 172 * #1245 - Opie-Go 'paused' (zecke)
172 * #1358 - DocTab didn't show any MimeTypes (was fixed earlier) (zecke) 173 * #1358 - DocTab didn't show any MimeTypes (was fixed earlier) (zecke)
173 * #1380 - QDateBookAccess::remove() doesn't remove entries (eilers, zecke) 174 * #1380 - QDateBookAccess::remove() doesn't remove entries (eilers, zecke)
174 * #1395 - Build VNC Backend with gcc3.4 175 * #1395 - Build VNC Backend with gcc3.4
175 * #1440 - The icon of opie-mobilemsg is missing (CoreDump) 176 * #1440 - The icon of opie-mobilemsg is missing (CoreDump)
176 * #1426 - Add missing opie-bartender Icon (CoreDump) 177 * #1426 - Add missing opie-bartender Icon (CoreDump)
177 * #1445 - Opie-Sheet Has No Icon (CoreDump) 178 * #1445 - Opie-Sheet Has No Icon (CoreDump)
178 * #1448 - Brightness Applet added (mickeyl) 179 * #1448 - Brightness Applet added (mickeyl)
179 * #1450 - ZSame didn't clear the bonus item after winning a game (zecke) 180 * #1450 - ZSame didn't clear the bonus item after winning a game (zecke)
180 * #1482 - Fix OFileSelector to be able to sort by size (zecke) 181 * #1482 - Fix OFileSelector to be able to sort by size (zecke)
181 * n.a. - Opie-mail: fixed some crasher, some layout-problems 182 * n.a. - Opie-mail: fixed some crasher, some layout-problems
182 * n.a. - Converted applications to not hardcode /opt/QtPalmtop but to use QPEApplication::qpeDir (zecke) 183 * n.a. - Converted applications to not hardcode /opt/QtPalmtop but to use QPEApplication::qpeDir (zecke)
183 * n.a. - Converted usage of qpeDir() not to include a '/' as first charachter of the string (zecke) 184 * n.a. - Converted usage of qpeDir() not to include a '/' as first charachter of the string (zecke)
184 * n.a. - Build system: Enable distcc and ccache when crosscompiling too, and use them everywhere we can (clem) 185 * n.a. - Build system: Enable distcc and ccache when crosscompiling too, and use them everywhere we can (clem)
185 * n.a. - Build system: Fix deps in several config.in (and fix scripts/deps.pl too) to stop breaking builds, especially with make -j highNumber (clem) 186 * n.a. - Build system: Fix deps in several config.in (and fix scripts/deps.pl too) to stop breaking builds, especially with make -j highNumber (clem)
186 * n.a. - Removed hardcoded icon size in a couple of applets (mickeyl) 187 * n.a. - Removed hardcoded icon size in a couple of applets (mickeyl)
187 188
188 Internal 189 Internal
189 -------- 190 --------
190 * Opie-Qashmoney has been moved to unsupported (mickeyl) 191 * Opie-Qashmoney has been moved to unsupported (mickeyl)
191 * Opie-Ubrowser has been moved to unsupported (mickeyl) 192 * Opie-Ubrowser has been moved to unsupported (mickeyl)
192 193
193 2004-09-17Opie 1.1.6 194 2004-09-17Opie 1.1.6
194 195
195 New Features 196 New Features
196 ------------ 197 ------------
197 * Fifteen gained configurable number of items (zecke) 198 * Fifteen gained configurable number of items (zecke)
198 * Fifteen can have custom background images (zecke) 199 * Fifteen can have custom background images (zecke)
199 * Added daemonizing capabilities to QWS Server [via Qt/Embedded] (mickeyl) 200 * Added daemonizing capabilities to QWS Server [via Qt/Embedded] (mickeyl)
200 * Integrated the new security framework into libopie2 (zecke,clem) 201 * Integrated the new security framework into libopie2 (zecke,clem)
201 * Converted the launcher to use the new security framework (zecke) 202 * Converted the launcher to use the new security framework (zecke)
202 * Backup can now handle custom locations for backup and restore (ar) 203 * Backup can now handle custom locations for backup and restore (ar)
203 * Implemented right-on-hold feedback (wimpie,zecke) 204 * Implemented right-on-hold feedback (wimpie,zecke)
204 * Lots of new features in opie-reader (tim,pohly) 205 * Lots of new features in opie-reader (tim,pohly)
205 * Build system cleanups (schurig) 206 * Build system cleanups (schurig)
206 207
207 Fixed Bugs 208 Fixed Bugs
208 -------- 209 --------
209 * #1005 - Fixed backup to CompactFlash (ar) 210 * #1005 - Fixed backup to CompactFlash (ar)
210 * #1167 - Fixed Opie write crashing on more text than one page (ar) 211 * #1167 - Fixed Opie write crashing on more text than one page (ar)
211 * #1225 - Fixed repeated light flashing on Zaurus with keyz (mickeyl) 212 * #1225 - Fixed repeated light flashing on Zaurus with keyz (mickeyl)
212 * #1359 - Fixed bookmarks in Gutenbrowser (ljp) 213 * #1359 - Fixed bookmarks in Gutenbrowser (ljp)
213 * #1361 - Fixed auto upercase in Opie-Addressbook (eilers) 214 * #1361 - Fixed auto upercase in Opie-Addressbook (eilers)
214 * #1370 - Pimconverter now reacts on cancel key (eilers) 215 * #1370 - Pimconverter now reacts on cancel key (eilers)
215 * #1376 - Bring back the capslock/numlock display (zecke) 216 * #1376 - Bring back the capslock/numlock display (zecke)
216 * #1383 - Language settings now warns about losing open apps (Markus Litz) 217 * #1383 - Language settings now warns about losing open apps (Markus Litz)
217 * #1393 - Fixed line wrap issues in opie-console for the default profile (mickeyl) 218 * #1393 - Fixed line wrap issues in opie-console for the default profile (mickeyl)
218 * #1394 - Fixed oversized headline in opie-login (coredump) 219 * #1394 - Fixed oversized headline in opie-login (coredump)
219 * #1396 - Opie-console captures the escape key and vim is working (zecke) 220 * #1396 - Opie-console captures the escape key and vim is working (zecke)
220 * #1401 - Scrollbar is now only visible if necessary in DocTab (mickeyl) 221 * #1401 - Scrollbar is now only visible if necessary in DocTab (mickeyl)
221 222
222 2004-07-06Opie 1.1.4 223 2004-07-06Opie 1.1.4
223 224
224 New Features 225 New Features
225 ------------ 226 ------------
226 * Added four themes courtesy Robert Griebl (http://www.softforge.de/zstyle) 227 * Added four themes courtesy Robert Griebl (http://www.softforge.de/zstyle)
227 * Added Conversion tool for pim-data (eilers) 228 * Added Conversion tool for pim-data (eilers)
228 * Introduced new OPimAccessFactory and OBackendFactory which simplyfies database access (eilers) 229 * Introduced new OPimAccessFactory and OBackendFactory which simplyfies database access (eilers)
229 * Modified the PIM API for providing generic use of OPimRecords (eilers) 230 * Modified the PIM API for providing generic use of OPimRecords (eilers)
230 * Clicking on the application symbol now iterates over the application's top level widgets if already raised (zecke) 231 * Clicking on the application symbol now iterates over the application's top level widgets if already raised (zecke)
231 232
232 Fixed Bugs 233 Fixed Bugs
233 -------- 234 --------
234 * #1068 - Country Drop Down Box Off Screen 235 * #1068 - Country Drop Down Box Off Screen
235 * #1291 - Opie tinykate does not open .desktop files (ar) 236 * #1291 - Opie tinykate does not open .desktop files (ar)
236 * #1291 - Opie sheet not saving correctly (ar) 237 * #1291 - Opie sheet not saving correctly (ar)
237 * #1294 - Opie does not know about British Summer Time 238 * #1294 - Opie does not know about British Summer Time
238 * #1314 - Drawpad initialization (mickeyl) 239 * #1314 - Drawpad initialization (mickeyl)
239 * #1317 - Packagemanager crashes on hold-down or install (chicken) 240 * #1317 - Packagemanager crashes on hold-down or install (chicken)
240 * #1321 - Batteryapplet graphic glitch (harlekin) 241 * #1321 - Batteryapplet graphic glitch (harlekin)
241 * #1324 - ZSafe not starting up (mickeyl) 242 * #1324 - ZSafe not starting up (mickeyl)
242 * #1328 - Personal Home Address fields is trimmed to 1char (eilers) 243 * #1328 - Personal Home Address fields is trimmed to 1char (eilers)
243 * #1327 - Opie-mail ipk does not depend on libopiedb2 (chicken) 244 * #1327 - Opie-mail ipk does not depend on libopiedb2 (chicken)
244 * #1345 - Networksettingsplugin wlan plugin dependency on libpcap0 (mickeyl) 245 * #1345 - Networksettingsplugin wlan plugin dependency on libpcap0 (mickeyl)
245 * #1348 - Datebook dependency on libopiedb2 (chicken) 246 * #1348 - Datebook dependency on libopiedb2 (chicken)
246 * #1328 - Switched SQLDatabase and VCards char encoding from latin1 to unicode (eilers) 247 * #1328 - Switched SQLDatabase and VCards char encoding from latin1 to unicode (eilers)
247 248
248 2004-04-25Opie 1.1.3 249 2004-04-25Opie 1.1.3
249 250
250 * Introduced first implementation of SQL-Support using SQLite (eilers) 251 * Introduced first implementation of SQL-Support using SQLite (eilers)
251 * Added a new Gutenberg Project reader app - opie-gutenbrowser (ljp) 252 * Added a new Gutenberg Project reader app - opie-gutenbrowser (ljp)
252 * Added a real system graffiti character set (brad) 253 * Added a real system graffiti character set (brad)
253 * Added Generic Keyconfig Widget (zecke) 254 * Added Generic Keyconfig Widget (zecke)
254 * Improved Screenshotapplet and Drawpad integration. You can now open a screenshot in drawpad and take notes (zecke) 255 * Improved Screenshotapplet and Drawpad integration. You can now open a screenshot in drawpad and take notes (zecke)
255 * Added new Bible reader app - opie-dagger (drw) 256 * Added new Bible reader app - opie-dagger (drw)
256 * Added a new Image Viewer. Work is ongoing (zecke,alwin) 257 * Added a new Image Viewer. Work is ongoing (zecke,alwin)
257 * Added namespace usage in libopie2 and everywhere (zecke,alwin) 258 * Added namespace usage in libopie2 and everywhere (zecke,alwin)
258 * Enabled the possibility to pass command line arguments to applications (mickeyl) 259 * Enabled the possibility to pass command line arguments to applications (mickeyl)
259 * Added an about applet showing some credits and information about Opie (mickeyl) 260 * Added an about applet showing some credits and information about Opie (mickeyl)
260 * Added benchmarking functionality to sysinfo (mickeyl) 261 * Added benchmarking functionality to sysinfo (mickeyl)
261 * Added applet and configuration application for switching hardware keyboard layouts (alwin) 262 * Added applet and configuration application for switching hardware keyboard layouts (alwin)
262 * Ported applications from libopie1 to libopie2* (drw,ar,alwin) 263 * Ported applications from libopie1 to libopie2* (drw,ar,alwin)
263 * Imported fullscreen and font improvements from the Qkonsole fork to embeddedkonsole (waspe) 264 * Imported fullscreen and font improvements from the Qkonsole fork to embeddedkonsole (waspe)
264 * Clean-up of package information in control files (drw) 265 * Clean-up of package information in control files (drw)
265 * Repaired mediummount which was broken since integrating the quicklauncher (alwin) 266 * Repaired mediummount which was broken since integrating the quicklauncher (alwin)
266 * Improved big-screen support (zecke,ar) 267 * Improved big-screen support (zecke,ar)
267 * Improved multikeyboard support, added keyboard layout switching applet (mouse) 268 * Improved multikeyboard support, added keyboard layout switching applet (mouse)
268 * Added a new mail client based on libetpan (harlekin,alwin,jgf) 269 * Added a new mail client based on libetpan (harlekin,alwin,jgf)
269 * Added new package manager - opie-packagemanager (drw) 270 * Added new package manager - opie-packagemanager (drw)
270 * Improved light-n-power for C7x0 (mickeyl) 271 * Improved light-n-power for C7x0 (mickeyl)
271 * Added automatic rotation support for C7x0 (treke) 272 * Added automatic rotation support for C7x0 (treke)
272 * Split libopie1 up into a set of smaller - functionally grouped - libraries (mickeyl) 273 * Split libopie1 up into a set of smaller - functionally grouped - libraries (mickeyl)
273 * Added scanning the wireless network neighbourhood to networksettings (mickeyl) 274 * Added scanning the wireless network neighbourhood to networksettings (mickeyl)
274 275
275 2003-11-29Opie 1.0.3 276 2003-11-29Opie 1.0.3
276 277
277 * Released as Version 1.0.3 278 * Released as Version 1.0.3
278 * Improved i18n (various contributors) 279 * Improved i18n (various contributors)
279 * Reduced application startup time by integrating the TT quicklauncher (zecke,harlekin) 280 * Reduced application startup time by integrating the TT quicklauncher (zecke,harlekin)
280 * Made the Documents Tab optional (mickeyl) 281 * Made the Documents Tab optional (mickeyl)
281 * Integrated basic support for HP iPAQ 54xx and the Jornada 5xx (chicken) 282 * Integrated basic support for HP iPAQ 54xx and the Jornada 5xx (chicken)
282 283
283 2003-08-04Opie 1.0.0 284 2003-08-04Opie 1.0.0
284 285
285 * Released as Version 1.0.0 286 * Released as Version 1.0.0
286 * Including a PPP module for easy dial up (tille,harlekin,zecke) 287 * Including a PPP module for easy dial up (tille,harlekin,zecke)
diff --git a/noncore/net/wellenreiter/gui/gui.pro b/noncore/net/wellenreiter/gui/gui.pro
index faedd1b..544c2af 100644
--- a/noncore/net/wellenreiter/gui/gui.pro
+++ b/noncore/net/wellenreiter/gui/gui.pro
@@ -1,58 +1,58 @@
1DESTDIR = $(OPIEDIR)/bin 1DESTDIR = $(OPIEDIR)/bin
2TEMPLATE = app 2TEMPLATE = app
3CONFIG = qt warn_on 3CONFIG = qt warn_on
4 4
5HEADERS = wellenreiterbase.h \ 5HEADERS = wellenreiterbase.h \
6 mainwindow.h \ 6 mainwindow.h \
7 wellenreiter.h \ 7 wellenreiter.h \
8 scanlist.h \ 8 scanlist.h \
9 logwindow.h \ 9 logwindow.h \
10 hexwindow.h \ 10 hexwindow.h \
11 statwindow.h \ 11 statwindow.h \
12 configwindow.h \ 12 configwindow.h \
13 graphwindow.h \ 13 graphwindow.h \
14 packetview.h \ 14 packetview.h \
15 protolistview.h \ 15 protolistview.h \
16 gps.h 16 gps.h
17 17
18SOURCES = main.cpp \ 18SOURCES = main.cpp \
19 mainwindow.cpp \ 19 mainwindow.cpp \
20 wellenreiterbase.cpp \ 20 wellenreiterbase.cpp \
21 wellenreiter.cpp \ 21 wellenreiter.cpp \
22 scanlist.cpp \ 22 scanlist.cpp \
23 logwindow.cpp \ 23 logwindow.cpp \
24 hexwindow.cpp \ 24 hexwindow.cpp \
25 statwindow.cpp \ 25 statwindow.cpp \
26 configwindow.cpp \ 26 configwindow.cpp \
27 graphwindow.cpp \ 27 graphwindow.cpp \
28 packetview.cpp \ 28 packetview.cpp \
29 protolistview.cpp \ 29 protolistview.cpp \
30 gps.cpp 30 gps.cpp
31 31
32INCLUDEPATH += $(OPIEDIR)/include 32INCLUDEPATH += $(OPIEDIR)/include
33DEPENDPATH += $(OPIEDIR)/include 33DEPENDPATH += $(OPIEDIR)/include
34INTERFACES = configbase.ui 34INTERFACES = configbase.ui
35TARGET = wellenreiter 35TARGET = wellenreiter
36VERSION = 1.0.5 36VERSION = 1.0.6
37 37
38DEFINES += WELLENREITER_VERSION='"$$VERSION (GPL) Opie"' 38DEFINES += WELLENREITER_VERSION='"$$VERSION (GPL) Opie"'
39 39
40!contains( platform, x11 ) { 40!contains( platform, x11 ) {
41 message( qws ) 41 message( qws )
42 include( $(OPIEDIR)/include.pro ) 42 include( $(OPIEDIR)/include.pro )
43 LIBS += -lqpe -lopiecore2 -lopieui2 -lopienet2 43 LIBS += -lqpe -lopiecore2 -lopieui2 -lopienet2
44} 44}
45 45
46contains( platform, x11 ) { 46contains( platform, x11 ) {
47 LIBS += -L$(OPIEDIR)/output/lib -Wl,-rpath,$(OPIEDIR)/output/lib -Wl,-rpath,/usr/local/lib -lwellenreiter 47 LIBS += -L$(OPIEDIR)/output/lib -Wl,-rpath,$(OPIEDIR)/output/lib -Wl,-rpath,/usr/local/lib -lwellenreiter
48 SOURCES += resource.cpp 48 SOURCES += resource.cpp
49 HEADERS += resource.h 49 HEADERS += resource.h
50 DESTDIR = $(OPIEDIR)/output/bin 50 DESTDIR = $(OPIEDIR)/output/bin
51} 51}
52 52
53!isEmpty( LIBPCAP_INC_DIR ) { 53!isEmpty( LIBPCAP_INC_DIR ) {
54 INCLUDEPATH = $$LIBPCAP_INC_DIR $$INCLUDEPATH 54 INCLUDEPATH = $$LIBPCAP_INC_DIR $$INCLUDEPATH
55} 55}
56!isEmpty( LIBPCAP_LIB_DIR ) { 56!isEmpty( LIBPCAP_LIB_DIR ) {
57 LIBS = -L$$LIBPCAP_LIB_DIR $$LIBS 57 LIBS = -L$$LIBPCAP_LIB_DIR $$LIBS
58} 58}
diff --git a/noncore/net/wellenreiter/gui/scanlist.cpp b/noncore/net/wellenreiter/gui/scanlist.cpp
index f24e09f..587faad 100644
--- a/noncore/net/wellenreiter/gui/scanlist.cpp
+++ b/noncore/net/wellenreiter/gui/scanlist.cpp
@@ -21,570 +21,563 @@
21#ifdef QWS 21#ifdef QWS
22#include <opie2/odebug.h> 22#include <opie2/odebug.h>
23#include <qpe/qpeapplication.h> 23#include <qpe/qpeapplication.h>
24#include <qpe/resource.h> 24#include <qpe/resource.h>
25#else 25#else
26#include "resource.h" 26#include "resource.h"
27#endif 27#endif
28 28
29 29
30/* QT */ 30/* QT */
31#include <qcursor.h> 31#include <qcursor.h>
32#include <qdatetime.h> 32#include <qdatetime.h>
33#include <qpopupmenu.h> 33#include <qpopupmenu.h>
34#include <qcheckbox.h> 34#include <qcheckbox.h>
35 35
36/* STD */ 36/* STD */
37#include <assert.h> 37#include <assert.h>
38 38
39using namespace Opie::Core; 39using namespace Opie::Core;
40using namespace Opie::Ui; 40using namespace Opie::Ui;
41using namespace Opie::Net; 41using namespace Opie::Net;
42 42
43const int col_type = 0; 43const int col_type = 0;
44const int col_essid = 0; 44const int col_essid = 0;
45const int col_sig = 1; 45const int col_sig = 1;
46const int col_ap = 2; 46const int col_ap = 2;
47const int col_channel = 3; 47const int col_channel = 3;
48const int col_wep = 4; 48const int col_wep = 4;
49const int col_traffic = 5; 49const int col_traffic = 5;
50const int col_ip = 6; 50const int col_ip = 6;
51const int col_manuf = 7; 51const int col_manuf = 7;
52const int col_firstseen = 8; 52const int col_firstseen = 8;
53const int col_lastseen = 9; 53const int col_lastseen = 9;
54const int col_location = 10; 54const int col_location = 10;
55 55
56#define DEBUG 56#define DEBUG
57 57
58MScanListView::MScanListView( QWidget* parent, const char* name ) 58MScanListView::MScanListView( QWidget* parent, const char* name )
59 :OListView( parent, name ) 59 :OListView( parent, name )
60{ 60{
61 setFrameShape( QListView::StyledPanel ); 61 setFrameShape( QListView::StyledPanel );
62 setFrameShadow( QListView::Sunken ); 62 setFrameShadow( QListView::Sunken );
63 63
64 addColumn( tr( "Net/Station" ) ); 64 addColumn( tr( "Net/Station" ) );
65 setColumnAlignment( col_essid, AlignLeft || AlignVCenter ); 65 setColumnAlignment( col_essid, AlignLeft || AlignVCenter );
66 addColumn( tr( "#" ) ); 66 addColumn( tr( "#" ) );
67 setColumnAlignment( col_sig, AlignCenter ); 67 setColumnAlignment( col_sig, AlignCenter );
68 addColumn( tr( "MAC" ) ); 68 addColumn( tr( "MAC" ) );
69 setColumnAlignment( col_ap, AlignCenter ); 69 setColumnAlignment( col_ap, AlignCenter );
70 addColumn( tr( "Chn" ) ); 70 addColumn( tr( "Chn" ) );
71 setColumnAlignment( col_channel, AlignCenter ); 71 setColumnAlignment( col_channel, AlignCenter );
72 addColumn( tr( "W" ) ); 72 addColumn( tr( "W" ) );
73 setColumnAlignment( col_wep, AlignCenter ); 73 setColumnAlignment( col_wep, AlignCenter );
74 addColumn( tr( "T" ) ); 74 addColumn( tr( "T" ) );
75 setColumnAlignment( col_traffic, AlignCenter ); 75 setColumnAlignment( col_traffic, AlignCenter );
76 addColumn( tr( "IP" ) ); 76 addColumn( tr( "IP" ) );
77 setColumnAlignment( col_ip, AlignCenter ); 77 setColumnAlignment( col_ip, AlignCenter );
78 addColumn( tr( "Manufacturer" ) ); 78 addColumn( tr( "Manufacturer" ) );
79 setColumnAlignment( col_manuf, AlignCenter ); 79 setColumnAlignment( col_manuf, AlignCenter );
80 addColumn( tr( "First Seen" ) ); 80 addColumn( tr( "First Seen" ) );
81 setColumnAlignment( col_firstseen, AlignCenter ); 81 setColumnAlignment( col_firstseen, AlignCenter );
82 addColumn( tr( "Last Seen" ) ); 82 addColumn( tr( "Last Seen" ) );
83 setColumnAlignment( col_lastseen, AlignCenter ); 83 setColumnAlignment( col_lastseen, AlignCenter );
84 addColumn( tr( "Location" ) ); 84 addColumn( tr( "Location" ) );
85 setColumnAlignment( col_location, AlignCenter ); 85 setColumnAlignment( col_location, AlignCenter );
86 setRootIsDecorated( true ); 86 setRootIsDecorated( true );
87 setAllColumnsShowFocus( true ); 87 setAllColumnsShowFocus( true );
88 88
89 connect( this, SIGNAL( rightButtonPressed(QListViewItem*,const QPoint&,int) ), 89 connect( this, SIGNAL( rightButtonPressed(QListViewItem*,const QPoint&,int) ),
90 this, SLOT( contextMenuRequested(QListViewItem*,const QPoint&,int) ) ); 90 this, SLOT( contextMenuRequested(QListViewItem*,const QPoint&,int) ) );
91 91
92 #ifdef QWS 92 #ifdef QWS
93 QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold ); 93 QPEApplication::setStylusOperation( viewport(), QPEApplication::RightOnHold );
94 #endif 94 #endif
95 95
96}; 96};
97 97
98 98
99MScanListView::~MScanListView() 99MScanListView::~MScanListView()
100{ 100{
101}; 101};
102 102
103 103
104OListViewItem* MScanListView::childFactory() 104OListViewItem* MScanListView::childFactory()
105{ 105{
106 return new MScanListItem( this ); 106 return new MScanListItem( this );
107} 107}
108 108
109 109
110void MScanListView::serializeTo( QDataStream& s) const 110void MScanListView::serializeTo( QDataStream& s) const
111{ 111{
112 odebug << "serializing MScanListView" << oendl; 112 odebug << "serializing MScanListView" << oendl;
113 OListView::serializeTo( s ); 113 OListView::serializeTo( s );
114} 114}
115 115
116 116
117void MScanListView::serializeFrom( QDataStream& s) 117void MScanListView::serializeFrom( QDataStream& s)
118{ 118{
119 odebug << "serializing MScanListView" << oendl; 119 odebug << "serializing MScanListView" << oendl;
120 OListView::serializeFrom( s ); 120 OListView::serializeFrom( s );
121} 121}
122 122
123 123
124void MScanListView::addNewItem( const QString& type, 124void MScanListView::addNewItem( const QString& type,
125 const QString& essid, 125 const QString& essid,
126 const OMacAddress& mac, 126 const OMacAddress& mac,
127 bool wep, 127 bool wep,
128 int channel, 128 int channel,
129 int signal, 129 int signal,
130 const GpsLocation& loc, 130 const GpsLocation& loc,
131 bool probe ) 131 bool probe )
132{ 132{
133 QString macaddr = mac.toString(true); 133 QString macaddr = mac.toString(true);
134 134
135 #ifdef DEBUG 135 #ifdef DEBUG
136 odebug << "MScanList::addNewItem( " << type << " / " 136 odebug << "MScanList::addNewItem( " << type << " / "
137 << essid << " / " << macaddr 137 << essid << " / " << macaddr
138 << " [" << channel << "]" << oendl; 138 << " [" << channel << "]" << oendl;
139 #endif 139 #endif
140 140
141 // search, if we already have seen this net 141 // search, if we already have seen this net
142 142
143 QString s; 143 QString s;
144 MScanListItem* network; 144 MScanListItem* network;
145 MScanListItem* item = static_cast<MScanListItem*> ( firstChild() ); 145 MScanListItem* item = static_cast<MScanListItem*> ( firstChild() );
146 146
147 while ( item && ( item->text( col_essid ) != essid ) ) 147 while ( item && ( item->text( col_essid ) != essid ) )
148 { 148 {
149 #ifdef DEBUG 149 #ifdef DEBUG
150 odebug << "itemtext: " << item->text( col_essid ) << "" << oendl; 150 odebug << "itemtext: " << item->text( col_essid ) << "" << oendl;
151 #endif 151 #endif
152 item = static_cast<MScanListItem*> ( item->nextSibling() ); 152 item = static_cast<MScanListItem*> ( item->nextSibling() );
153 } 153 }
154 if ( item ) 154 if ( item )
155 { 155 {
156 // we have already seen this net, check all childs if MAC exists 156 // we have already seen this net, check all childs if MAC exists
157 157
158 network = item; 158 network = item;
159 159
160 item = static_cast<MScanListItem*> ( item->firstChild() ); 160 item = static_cast<MScanListItem*> ( item->firstChild() );
161 assert( item ); // this shouldn't fail 161 assert( item ); // this shouldn't fail
162 162
163 while ( item && ( item->text( col_ap ) != macaddr ) ) 163 while ( item && ( item->text( col_ap ) != macaddr ) )
164 { 164 {
165 #ifdef DEBUG 165 #ifdef DEBUG
166 odebug << "subitemtext: " << item->text( col_ap ) << "" << oendl; 166 odebug << "subitemtext: " << item->text( col_ap ) << "" << oendl;
167 #endif 167 #endif
168 item = static_cast<MScanListItem*> ( item->nextSibling() ); 168 item = static_cast<MScanListItem*> ( item->nextSibling() );
169 } 169 }
170 170
171 if ( item ) 171 if ( item )
172 { 172 {
173 // we have already seen this item, it's a dupe 173 // we have already seen this item, it's a dupe
174 #ifdef DEBUG 174 #ifdef DEBUG
175 odebug << "" << macaddr << " is a dupe - ignoring..." << oendl; 175 odebug << "" << macaddr << " is a dupe - ignoring..." << oendl;
176 #endif 176 #endif
177 item->receivedBeacon(); 177 item->receivedBeacon();
178 return; 178 return;
179 } 179 }
180 } 180 }
181 else 181 else
182 { 182 {
183 s = QString( "(i) New network: ESSID '%1'" ).arg( essid ); 183 s = QString( "(i) New network: ESSID '%1'" ).arg( essid );
184 MLogWindow::logwindow()->log( s ); 184 MLogWindow::logwindow()->log( s );
185 network = new MScanListItem( this, "network", essid, QString::null, 0, 0, 0, probe ); 185 network = new MScanListItem( this, "network", essid, QString::null, 0, 0, 0, probe );
186 } 186 }
187 187
188 188
189 // insert new station as child from network 189 // insert new station as child from network
190 // no essid to reduce clutter, maybe later we have a nick or stationname to display!? 190 // no essid to reduce clutter, maybe later we have a nick or stationname to display!?
191 191
192 #ifdef DEBUG 192 #ifdef DEBUG
193 odebug << "inserting new station " << macaddr << "" << oendl; 193 odebug << "inserting new station " << macaddr << "" << oendl;
194 #endif 194 #endif
195 195
196 MScanListItem* station = new MScanListItem( network, type, "", macaddr, wep, channel, signal ); 196 MScanListItem* station = new MScanListItem( network, type, "", macaddr, wep, channel, signal );
197 station->setManufacturer( mac.manufacturer() ); 197 station->setManufacturer( mac.manufacturer() );
198 station->setLocation( loc.dmsPosition() ); 198 station->setLocation( loc.dmsPosition() );
199 199
200 if ( type == "managed" ) 200 if ( type == "managed" )
201 { 201 {
202 s = QString( "(i) New Access Point in '%1' [%2]" ).arg( essid ).arg( channel ); 202 s = QString( "(i) New Access Point in '%1' [%2]" ).arg( essid ).arg( channel );
203 } 203 }
204 else 204 else
205 { 205 {
206 s = QString( "(i) New AdHoc station in '%1' [%2]" ).arg( essid ).arg( channel ); 206 s = QString( "(i) New AdHoc station in '%1' [%2]" ).arg( essid ).arg( channel );
207 } 207 }
208 MLogWindow::logwindow()->log( s ); 208 MLogWindow::logwindow()->log( s );
209} 209}
210 210
211 211
212void MScanListView::addIfNotExisting( MScanListItem* network, const OMacAddress& addr, const QString& type ) 212void MScanListView::addIfNotExisting( MScanListItem* network, const OMacAddress& addr, const QString& type )
213{ 213{
214 MScanListItem* subitem = static_cast<MScanListItem*>( network->firstChild() ); 214 MScanListItem* subitem = static_cast<MScanListItem*>( network->firstChild() );
215 215
216 while ( subitem && ( subitem->text( col_ap ) != addr.toString(true) ) ) 216 while ( subitem && ( subitem->text( col_ap ) != addr.toString(true) ) )
217 { 217 {
218 #ifdef DEBUG 218 #ifdef DEBUG
219 odebug << "subitemtext: " << subitem->text( col_ap ) << "" << oendl; 219 odebug << "subitemtext: " << subitem->text( col_ap ) << "" << oendl;
220 #endif 220 #endif
221 subitem = static_cast<MScanListItem*> ( subitem->nextSibling() ); 221 subitem = static_cast<MScanListItem*> ( subitem->nextSibling() );
222 } 222 }
223 223
224 if ( subitem ) 224 if ( subitem )
225 { 225 {
226 // we have already seen this item, it's a dupe 226 // we have already seen this item, it's a dupe
227 #ifdef DEBUG 227 #ifdef DEBUG
228 odebug << "" << addr.toString(true) << " is a dupe - ignoring..." << oendl; 228 odebug << "" << addr.toString(true) << " is a dupe - ignoring..." << oendl;
229 #endif 229 #endif
230 subitem->receivedBeacon(); //FIXME: sent data bit 230 subitem->receivedBeacon(); //FIXME: sent data bit
231 return; 231 return;
232 } 232 }
233 233
234 // Hey, it seems to be a new item :-D 234 // Hey, it seems to be a new item :-D
235 MScanListItem* station = new MScanListItem( network, type, /* network->text( col_essid ) */ "", addr.toString(true), false, -1, -1 ); 235 MScanListItem* station = new MScanListItem( network, type, /* network->text( col_essid ) */ "", addr.toString(true), false, -1, -1 );
236 station->setManufacturer( addr.manufacturer() ); 236 station->setManufacturer( addr.manufacturer() );
237 237
238 QString s; 238 QString s;
239 if ( type == "station" ) 239 if ( type == "station" )
240 { 240 {
241 s = QString( "(i) New Station in '%1' [xx]" ).arg( network->text( col_essid ) ); 241 s = QString( "(i) New Station in '%1' [xx]" ).arg( network->text( col_essid ) );
242 } 242 }
243 else 243 else
244 { 244 {
245 s = QString( "(i) New Wireless Station in '%1' [xx]" ).arg( network->text( col_essid ) ); 245 s = QString( "(i) New Wireless Station in '%1' [xx]" ).arg( network->text( col_essid ) );
246 } 246 }
247 MLogWindow::logwindow()->log( s ); 247 MLogWindow::logwindow()->log( s );
248} 248}
249 249
250 250
251void MScanListView::WDStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& viaFrom, const OMacAddress& viaTo ) 251void MScanListView::WDStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& viaFrom, const OMacAddress& viaTo )
252{ 252{
253 odebug << "WDSTraffic: " << viaFrom.toString() << " and " << viaTo.toString() << " seem to form a WDS" << oendl; 253 odebug << "WDSTraffic: " << viaFrom.toString() << " and " << viaTo.toString() << " seem to form a WDS" << oendl;
254 QString s; 254 QString s;
255// MScanListItem* network; 255// MScanListItem* network;
256 256
257 QListViewItemIterator it( this ); 257 QListViewItemIterator it( this );
258 while ( it.current() && 258 while ( it.current() &&
259 it.current()->text( col_ap ) != viaFrom.toString(true) && 259 it.current()->text( col_ap ) != viaFrom.toString(true) &&
260 it.current()->text( col_ap ) != viaTo.toString(true) ) ++it; 260 it.current()->text( col_ap ) != viaTo.toString(true) ) ++it;
261 261
262 MScanListItem* item = static_cast<MScanListItem*>( it.current() ); 262 MScanListItem* item = static_cast<MScanListItem*>( it.current() );
263 263
264 if ( item ) // Either viaFrom or viaTo AP has shown up yet, so just add our two new stations 264 if ( item ) // Either viaFrom or viaTo AP has shown up yet, so just add our two new stations
265 { 265 {
266 addIfNotExisting( static_cast<MScanListItem*>(item->parent()), from ); 266 addIfNotExisting( static_cast<MScanListItem*>(item->parent()), from );
267 addIfNotExisting( static_cast<MScanListItem*>(item->parent()), to ); 267 addIfNotExisting( static_cast<MScanListItem*>(item->parent()), to );
268 } 268 }
269 else 269 else
270 { 270 {
271 odebug << "D'Oh! Stations without AP... ignoring for now... will handle this in 1.1 version :-D" << oendl; 271 odebug << "D'Oh! Stations without AP... ignoring for now... will handle this in 1.1 version :-D" << oendl;
272 MLogWindow::logwindow()->log( "WARNING: Unhandled WSD traffic!" ); 272 MLogWindow::logwindow()->log( "WARNING: Unhandled WSD traffic!" );
273 } 273 }
274} 274}
275 275
276 276
277void MScanListView::toDStraffic( const OMacAddress& from, const OMacAddress& /*to*/, const OMacAddress& via ) 277void MScanListView::toDStraffic( const OMacAddress& from, const OMacAddress& /*to*/, const OMacAddress& via )
278{ 278{
279 QString s; 279 QString s;
280// MScanListItem* network; 280// MScanListItem* network;
281 281
282 QListViewItemIterator it( this ); 282 QListViewItemIterator it( this );
283 while ( it.current() && it.current()->text( col_ap ) != via.toString(true) ) ++it; 283 while ( it.current() && it.current()->text( col_ap ) != via.toString(true) ) ++it;
284 284
285 MScanListItem* item = static_cast<MScanListItem*>( it.current() ); 285 MScanListItem* item = static_cast<MScanListItem*>( it.current() );
286 286
287 if ( item ) // AP has shown up yet, so just add our new "from" - station 287 if ( item ) // AP has shown up yet, so just add our new "from" - station
288 { 288 {
289 addIfNotExisting( static_cast<MScanListItem*>(item->parent()), from, "adhoc" ); 289 addIfNotExisting( static_cast<MScanListItem*>(item->parent()), from, "adhoc" );
290 } 290 }
291 else 291 else
292 { 292 {
293 odebug << "D'Oh! Station without AP... ignoring for now... will handle this in 1.1 :-D" << oendl; 293 odebug << "D'Oh! Station without AP... ignoring for now... will handle this in 1.1 :-D" << oendl;
294 MLogWindow::logwindow()->log( "WARNING: Unhandled toDS traffic!" ); 294 MLogWindow::logwindow()->log( "WARNING: Unhandled toDS traffic!" );
295 295
296 } 296 }
297} 297}
298 298
299 299
300void MScanListView::fromDStraffic( const OMacAddress& from, const OMacAddress& /*to*/, const OMacAddress& via ) 300void MScanListView::fromDStraffic( const OMacAddress& from, const OMacAddress& /*to*/, const OMacAddress& via )
301{ 301{
302 QString s; 302 QString s;
303// MScanListItem* network; 303// MScanListItem* network;
304 304
305 QListViewItemIterator it( this ); 305 QListViewItemIterator it( this );
306 while ( it.current() && it.current()->text( col_ap ) != via.toString(true) ) ++it; 306 while ( it.current() && it.current()->text( col_ap ) != via.toString(true) ) ++it;
307 307
308 MScanListItem* item = static_cast<MScanListItem*>( it.current() ); 308 MScanListItem* item = static_cast<MScanListItem*>( it.current() );
309 309
310 if ( item ) // AP has shown up yet, so just add our new "from" - station 310 if ( item ) // AP has shown up yet, so just add our new "from" - station
311 { 311 {
312 addIfNotExisting( static_cast<MScanListItem*>(item->parent()), from, "station" ); 312 addIfNotExisting( static_cast<MScanListItem*>(item->parent()), from, "station" );
313 } 313 }
314 else 314 else
315 { 315 {
316 odebug << "D'Oh! Station without AP... ignoring for now... will handle this in 1.1 :-D" << oendl; 316 odebug << "D'Oh! Station without AP... ignoring for now... will handle this in 1.1 :-D" << oendl;
317 MLogWindow::logwindow()->log( "WARNING: Unhandled fromDS traffic!" ); 317 MLogWindow::logwindow()->log( "WARNING: Unhandled fromDS traffic!" );
318 } 318 }
319} 319}
320 320
321 321
322void MScanListView::IBSStraffic( const OMacAddress& /*from*/, const OMacAddress& /*to*/, const OMacAddress& /*via*/ ) 322void MScanListView::IBSStraffic( const OMacAddress& /*from*/, const OMacAddress& /*to*/, const OMacAddress& /*via*/ )
323{ 323{
324 owarn << "D'oh! Not yet implemented..." << oendl; 324 owarn << "D'oh! Not yet implemented..." << oendl;
325 MLogWindow::logwindow()->log( "WARNING: Unhandled IBSS traffic!" ); 325 MLogWindow::logwindow()->log( "WARNING: Unhandled IBSS traffic!" );
326} 326}
327 327
328 328
329void MScanListView::identify( const OMacAddress& macaddr, const QString& ip ) 329void MScanListView::identify( const OMacAddress& macaddr, const QString& ip )
330{ 330{
331 odebug << "identify " << macaddr.toString() << " = " << ip << "" << oendl; 331 odebug << "identify " << macaddr.toString() << " = " << ip << "" << oendl;
332 332
333 QListViewItemIterator it( this ); 333 QListViewItemIterator it( this );
334 for ( ; it.current(); ++it ) 334 for ( ; it.current(); ++it )
335 { 335 {
336 if ( it.current()->text( col_ap ) == macaddr.toString(true) ) 336 if ( it.current()->text( col_ap ) == macaddr.toString(true) )
337 { 337 {
338 it.current()->setText( col_ip, ip ); 338 it.current()->setText( col_ip, ip );
339 return; 339 return;
340 } 340 }
341 } 341 }
342 odebug << "D'oh! Received identification, but item not yet in list... ==> Handle this!" << oendl; 342 odebug << "D'oh! Received identification, but item not yet in list... ==> Handle this!" << oendl;
343 MLogWindow::logwindow()->log( QString( "WARNING: Unhandled identification %1 = %2!" ) 343 MLogWindow::logwindow()->log( QString( "WARNING: Unhandled identification %1 = %2!" )
344 .arg( macaddr.toString() ).arg( ip ) ); 344 .arg( macaddr.toString() ).arg( ip ) );
345} 345}
346 346
347 347
348void MScanListView::addService( const QString& name, const OMacAddress& macaddr, const QString& ip ) 348void MScanListView::addService( const QString& name, const OMacAddress& macaddr, const QString& ip )
349{ 349{
350 odebug << "addService '" << name << "', Server = " << macaddr.toString() << " = " << ip << "" << oendl; 350 odebug << "addService '" << name << "', Server = " << macaddr.toString() << " = " << ip << "" << oendl;
351 351
352 //TODO: Refactor that out, we need it all over the place. 352 //TODO: Refactor that out, we need it all over the place.
353 // Best to do it in a more comfortable abstraction in OListView 353 // Best to do it in a more comfortable abstraction in OListView
354 // (Hmm, didn't I already start something in this direction?) 354 // (Hmm, didn't I already start something in this direction?)
355 355
356 QListViewItemIterator it( this ); 356 QListViewItemIterator it( this );
357 for ( ; it.current(); ++it ) 357 for ( ; it.current(); ++it )
358 { 358 {
359 if ( it.current()->text( col_ap ) == macaddr.toString(true) ) 359 if ( it.current()->text( col_ap ) == macaddr.toString(true) )
360 { 360 {
361 361
362 MScanListItem* subitem = static_cast<MScanListItem*>( it.current()->firstChild() ); 362 MScanListItem* subitem = static_cast<MScanListItem*>( it.current()->firstChild() );
363 363
364 while ( subitem && ( subitem->text( col_essid ) != name ) ) 364 while ( subitem && ( subitem->text( col_essid ) != name ) )
365 { 365 {
366 #ifdef DEBUG 366 #ifdef DEBUG
367 odebug << "subitemtext: " << subitem->text( col_essid ) << "" << oendl; 367 odebug << "subitemtext: " << subitem->text( col_essid ) << "" << oendl;
368 #endif 368 #endif
369 subitem = static_cast<MScanListItem*> ( subitem->nextSibling() ); 369 subitem = static_cast<MScanListItem*> ( subitem->nextSibling() );
370 } 370 }
371 371
372 if ( subitem ) 372 if ( subitem )
373 { 373 {
374 // we have already seen this item, it's a dupe 374 // we have already seen this item, it's a dupe
375 #ifdef DEBUG 375 #ifdef DEBUG
376 odebug << "" << name << " is a dupe - ignoring..." << oendl; 376 odebug << "" << name << " is a dupe - ignoring..." << oendl;
377 #endif 377 #endif
378 subitem->receivedBeacon(); //FIXME: sent data bit 378 subitem->receivedBeacon(); //FIXME: sent data bit
379 return; 379 return;
380 } 380 }
381 381
382 // never seen that - add new item 382 // never seen that - add new item
383 383
384 MScanListItem* item = new MScanListItem( it.current(), "service", "N/A", " ", false, -1, -1 ); 384 MScanListItem* item = new MScanListItem( it.current(), "service", "N/A", " ", false, -1, -1 );
385 item->setText( col_essid, name ); 385 item->setText( col_essid, name );
386 386
387 return; 387 return;
388 } 388 }
389 } 389 }
390 odebug << "D'oh! Received identification, but item not yet in list... ==> Handle this!" << oendl; 390 odebug << "D'oh! Received identification, but item not yet in list... ==> Handle this!" << oendl;
391 MLogWindow::logwindow()->log( QString("WARNING: Unhandled service addition %s = %s!") 391 MLogWindow::logwindow()->log( QString("WARNING: Unhandled service addition %s = %s!")
392 .arg( macaddr.toString() ).arg( ip ) ); 392 .arg( macaddr.toString() ).arg( ip ) );
393} 393}
394 394
395 395
396void MScanListView::contextMenuRequested( QListViewItem* item, const QPoint&, int col ) 396void MScanListView::contextMenuRequested( QListViewItem* item, const QPoint&, int col )
397{ 397{
398 if ( !item ) return; 398 if ( !item ) return;
399 399
400 MScanListItem* itm = static_cast<MScanListItem*>( item ); 400 MScanListItem* itm = static_cast<MScanListItem*>( item );
401 401
402 odebug << "contextMenuRequested on item '" << itm->text(0) << "' (" 402 odebug << "contextMenuRequested on item '" << itm->text(0) << "' ("
403 << itm->type << ") in column: '" << col << "'" << oendl; 403 << itm->type << ") in column: '" << col << "'" << oendl;
404 404
405 if ( itm->type == "adhoc" || itm->type == "managed" ) 405 /* do something meaningful */
406 {
407 QString entry = QString( "&Join %1 Net '%2'..." ).arg( itm->type ).arg( itm->essid() );
408 406
409 QPopupMenu m( this ); 407 return;
410 m.insertItem( entry, 37773, 0 );
411 int result = m.exec( QCursor::pos() );
412 if ( result == 37773 )
413 emit joinNetwork( itm->type, itm->essid(), itm->channel(), itm->macaddr() );
414 }
415} 408}
416 409
417//============================================================ 410//============================================================
418// MScanListItem 411// MScanListItem
419//============================================================ 412//============================================================
420 413
421MScanListItem::MScanListItem( QListView* parent, const QString& type, const QString& essid, const QString& macaddr, 414MScanListItem::MScanListItem( QListView* parent, const QString& type, const QString& essid, const QString& macaddr,
422 bool wep, int channel, int signal, bool probed ) 415 bool wep, int channel, int signal, bool probed )
423 :OListViewItem( parent, essid, QString::null, macaddr, QString::null, QString::null ), 416 :OListViewItem( parent, essid, QString::null, macaddr, QString::null, QString::null ),
424 _type( type ), _essid( essid ), _macaddr( macaddr ), _wep( wep ), 417 _type( type ), _essid( essid ), _macaddr( macaddr ), _wep( wep ),
425 _channel( channel ), _signal( signal ), _beacons( 1 ) 418 _channel( channel ), _signal( signal ), _beacons( 1 )
426{ 419{
427 #ifdef DEBUG 420 #ifdef DEBUG
428 odebug << "creating scanlist item" << oendl; 421 odebug << "creating scanlist item" << oendl;
429 #endif 422 #endif
430 423
431 if ( WellenreiterConfigWindow::instance() ) 424 if ( WellenreiterConfigWindow::instance() )
432 WellenreiterConfigWindow::instance()->performAction( type, essid, macaddr, wep, channel, signal ); // better use signal/slot combination here 425 WellenreiterConfigWindow::instance()->performAction( type, essid, macaddr, wep, channel, signal ); // better use signal/slot combination here
433 426
434 decorateItem( type, essid, macaddr, wep, channel, signal, probed ); 427 decorateItem( type, essid, macaddr, wep, channel, signal, probed );
435} 428}
436 429
437MScanListItem::MScanListItem( QListViewItem* parent, const QString& type, const QString& essid, const QString& macaddr, 430MScanListItem::MScanListItem( QListViewItem* parent, const QString& type, const QString& essid, const QString& macaddr,
438 bool wep, int channel, int signal ) 431 bool wep, int channel, int signal )
439 :OListViewItem( parent, essid, QString::null, macaddr, QString::null, QString::null ) 432 :OListViewItem( parent, essid, QString::null, macaddr, QString::null, QString::null )
440{ 433{
441 #ifdef DEBUG 434 #ifdef DEBUG
442 odebug << "creating scanlist item" << oendl; 435 odebug << "creating scanlist item" << oendl;
443 #endif 436 #endif
444 if ( WellenreiterConfigWindow::instance() ) 437 if ( WellenreiterConfigWindow::instance() )
445 WellenreiterConfigWindow::instance()->performAction( type, essid, macaddr, wep, channel, signal ); // better use signal/slot combination here 438 WellenreiterConfigWindow::instance()->performAction( type, essid, macaddr, wep, channel, signal ); // better use signal/slot combination here
446 439
447 decorateItem( type, essid, macaddr, wep, channel, signal, false ); 440 decorateItem( type, essid, macaddr, wep, channel, signal, false );
448} 441}
449 442
450const QString& MScanListItem::essid() const 443const QString& MScanListItem::essid() const
451{ 444{
452 if ( type == "network" ) 445 if ( type == "network" )
453 return _essid; 446 return _essid;
454 else 447 else
455 return ( (MScanListItem*) parent() )->essid(); 448 return ( (MScanListItem*) parent() )->essid();
456} 449}
457 450
458OListViewItem* MScanListItem::childFactory() 451OListViewItem* MScanListItem::childFactory()
459{ 452{
460 return new MScanListItem( this ); 453 return new MScanListItem( this );
461} 454}
462 455
463void MScanListItem::serializeTo( QDataStream& s ) const 456void MScanListItem::serializeTo( QDataStream& s ) const
464{ 457{
465 #ifdef DEBUG 458 #ifdef DEBUG
466 odebug << "serializing MScanListItem" << oendl; 459 odebug << "serializing MScanListItem" << oendl;
467 #endif 460 #endif
468 OListViewItem::serializeTo( s ); 461 OListViewItem::serializeTo( s );
469 462
470 s << _type; 463 s << _type;
471 s << (Q_UINT8) ( _wep ? 'y' : 'n' ); 464 s << (Q_UINT8) ( _wep ? 'y' : 'n' );
472} 465}
473 466
474void MScanListItem::serializeFrom( QDataStream& s ) 467void MScanListItem::serializeFrom( QDataStream& s )
475{ 468{
476 #ifdef DEBUG 469 #ifdef DEBUG
477 odebug << "serializing MScanListItem" << oendl; 470 odebug << "serializing MScanListItem" << oendl;
478 #endif 471 #endif
479 OListViewItem::serializeFrom( s ); 472 OListViewItem::serializeFrom( s );
480 473
481 Q_UINT8 wep; 474 Q_UINT8 wep;
482 s >> _type; 475 s >> _type;
483 s >> wep; 476 s >> wep;
484 _wep = (wep == 'y'); 477 _wep = (wep == 'y');
485 478
486 QString name = QString( "wellenreiter/"+ _type ); 479 QString name = QString( "wellenreiter/"+ _type );
487 setPixmap( col_type, Resource::loadPixmap( name ) ); 480 setPixmap( col_type, Resource::loadPixmap( name ) );
488 if ( _wep ) 481 if ( _wep )
489 setPixmap( col_wep, Resource::loadPixmap( "wellenreiter/cracked" ) ); //FIXME: rename the pixmap! 482 setPixmap( col_wep, Resource::loadPixmap( "wellenreiter/cracked" ) ); //FIXME: rename the pixmap!
490 listView()->triggerUpdate(); 483 listView()->triggerUpdate();
491} 484}
492 485
493void MScanListItem::decorateItem( QString type, QString essid, QString macaddr, bool wep, int channel, int signal, bool probed ) 486void MScanListItem::decorateItem( QString type, QString essid, QString macaddr, bool wep, int channel, int signal, bool probed )
494{ 487{
495 #ifdef DEBUG 488 #ifdef DEBUG
496 odebug << "decorating scanlist item " << type << " / " 489 odebug << "decorating scanlist item " << type << " / "
497 << essid << " / " << macaddr 490 << essid << " / " << macaddr
498 << "[" << channel << "]" << oendl; 491 << "[" << channel << "]" << oendl;
499 #endif 492 #endif
500 493
501 // set icon for managed or adhoc mode 494 // set icon for managed or adhoc mode
502 QString name; 495 QString name;
503 name.sprintf( "wellenreiter/"+ type ); 496 name.sprintf( "wellenreiter/"+ type );
504 setPixmap( col_type, Resource::loadPixmap( name ) ); 497 setPixmap( col_type, Resource::loadPixmap( name ) );
505 498
506 // special case for probed networks FIXME: This is ugly at present 499 // special case for probed networks FIXME: This is ugly at present
507 if ( type == "network" && probed ) 500 if ( type == "network" && probed )
508 { 501 {
509 setPixmap( col_type, Resource::loadPixmap( "wellenreiter/network-probed.png" ) ); 502 setPixmap( col_type, Resource::loadPixmap( "wellenreiter/network-probed.png" ) );
510 } 503 }
511 504
512 // set icon for wep (wireless encryption protocol) 505 // set icon for wep (wireless encryption protocol)
513 if ( wep ) 506 if ( wep )
514 setPixmap( col_wep, Resource::loadPixmap( "wellenreiter/cracked" ) ); //FIXME: rename the pixmap! 507 setPixmap( col_wep, Resource::loadPixmap( "wellenreiter/cracked" ) ); //FIXME: rename the pixmap!
515 508
516 // set channel and signal text 509 // set channel and signal text
517 510
518 if ( signal != -1 ) 511 if ( signal != -1 )
519 setText( col_sig, QString::number( signal ) ); 512 setText( col_sig, QString::number( signal ) );
520 if ( channel != -1 ) 513 if ( channel != -1 )
521 setText( col_channel, QString::number( channel ) ); 514 setText( col_channel, QString::number( channel ) );
522 515
523 setText( col_firstseen, QTime::currentTime().toString() ); 516 setText( col_firstseen, QTime::currentTime().toString() );
524 //setText( col_lastseen, QTime::currentTime().toString() ); 517 //setText( col_lastseen, QTime::currentTime().toString() );
525 518
526 listView()->triggerUpdate(); 519 listView()->triggerUpdate();
527 520
528 this->type = type; 521 this->type = type;
529 _type = type; 522 _type = type;
530 _essid = essid; 523 _essid = essid;
531 _macaddr = macaddr; 524 _macaddr = macaddr;
532 _channel = channel; 525 _channel = channel;
533 _beacons = 1; 526 _beacons = 1;
534 _signal = 0; 527 _signal = 0;
535 528
536 if ( WellenreiterConfigWindow::instance()->openTree->isChecked() ) 529 if ( WellenreiterConfigWindow::instance()->openTree->isChecked() )
537 { 530 {
538 listView()->ensureItemVisible( this ); 531 listView()->ensureItemVisible( this );
539 } 532 }
540 533
541} 534}
542 535
543 536
544void MScanListItem::setManufacturer( const QString& manufacturer ) 537void MScanListItem::setManufacturer( const QString& manufacturer )
545{ 538{
546 setText( col_manuf, manufacturer ); 539 setText( col_manuf, manufacturer );
547} 540}
548 541
549 542
550void MScanListItem::setLocation( const QString& location ) 543void MScanListItem::setLocation( const QString& location )
551{ 544{
552 setText( col_location, location ); 545 setText( col_location, location );
553} 546}
554 547
555 548
556void MScanListItem::receivedBeacon() 549void MScanListItem::receivedBeacon()
557{ 550{
558 _beacons++; 551 _beacons++;
559 #ifdef DEBUG 552 #ifdef DEBUG
560 odebug << "MScanListItem " << _macaddr << ": received beacon #" << _beacons << "" << oendl; 553 odebug << "MScanListItem " << _macaddr << ": received beacon #" << _beacons << "" << oendl;
561 #endif 554 #endif
562 setText( col_sig, QString::number( _beacons ) ); 555 setText( col_sig, QString::number( _beacons ) );
563 setText( col_lastseen, QTime::currentTime().toString() ); 556 setText( col_lastseen, QTime::currentTime().toString() );
564 557
565 MScanListItem* p = (MScanListItem*) parent(); 558 MScanListItem* p = (MScanListItem*) parent();
566 if ( p ) p->receivedBeacon(); 559 if ( p ) p->receivedBeacon();
567 560
568} 561}
569 562
570QString MScanListItem::key( int id, bool b )const { 563QString MScanListItem::key( int id, bool b )const {
571 QString str; 564 QString str;
572 565
573 /* 566 /*
574 * Pad the amount of received packages, number 567 * Pad the amount of received packages, number
575 * of the channel. 568 * of the channel.
576 */ 569 */
577 switch( id ) { 570 switch( id ) {
578 case col_sig: 571 case col_sig:
579 str = text(col_sig).rightJustify( 20, '0' ); 572 str = text(col_sig).rightJustify( 20, '0' );
580 break; 573 break;
581 case col_channel: 574 case col_channel:
582 str = text(col_channel).rightJustify( 2, '0' ); 575 str = text(col_channel).rightJustify( 2, '0' );
583 break; 576 break;
584 default: 577 default:
585 str = Opie::Ui::OListViewItem::key( id, b ); 578 str = Opie::Ui::OListViewItem::key( id, b );
586 break; 579 break;
587 } 580 }
588 581
589 return str; 582 return str;
590} 583}
diff --git a/noncore/net/wellenreiter/gui/scanlist.h b/noncore/net/wellenreiter/gui/scanlist.h
index 8b3814a..eec51af 100644
--- a/noncore/net/wellenreiter/gui/scanlist.h
+++ b/noncore/net/wellenreiter/gui/scanlist.h
@@ -1,142 +1,141 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. 2** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved.
3** 3**
4** This file is part of Wellenreiter II. 4** This file is part of Wellenreiter II.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
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#ifndef SCANLIST_H 16#ifndef SCANLIST_H
17#define SCANLIST_H 17#define SCANLIST_H
18 18
19#include "gps.h" 19#include "gps.h"
20 20
21/* OPIE */ 21/* OPIE */
22#include <opie2/olistview.h> 22#include <opie2/olistview.h>
23#include <opie2/onetutils.h> 23#include <opie2/onetutils.h>
24 24
25/* QT */ 25/* QT */
26#include <qtextstream.h> 26#include <qtextstream.h>
27 27
28class QString; 28class QString;
29class MScanListItem; 29class MScanListItem;
30 30
31class MScanListView: public Opie::Ui::OListView 31class MScanListView: public Opie::Ui::OListView
32{ 32{
33 Q_OBJECT 33 Q_OBJECT
34 34
35 public: 35 public:
36 MScanListView( QWidget* parent = 0, const char* name = 0 ); 36 MScanListView( QWidget* parent = 0, const char* name = 0 );
37 virtual ~MScanListView(); 37 virtual ~MScanListView();
38 38
39 virtual Opie::Ui::OListViewItem* childFactory(); 39 virtual Opie::Ui::OListViewItem* childFactory();
40 virtual void serializeTo( QDataStream& s ) const; 40 virtual void serializeTo( QDataStream& s ) const;
41 virtual void serializeFrom( QDataStream& s ); 41 virtual void serializeFrom( QDataStream& s );
42 42
43 public slots: 43 public slots:
44 void addNewItem( const QString& type, const QString&, const Opie::Net::OMacAddress&, bool, int, int, const GpsLocation&, bool = false ); 44 void addNewItem( const QString& type, const QString&, const Opie::Net::OMacAddress&, bool, int, int, const GpsLocation&, bool = false );
45 void addService( const QString& name, const Opie::Net::OMacAddress& macaddr, const QString& ip ); 45 void addService( const QString& name, const Opie::Net::OMacAddress& macaddr, const QString& ip );
46 46
47 void fromDStraffic( const Opie::Net::OMacAddress& from, const Opie::Net::OMacAddress& to, const Opie::Net::OMacAddress& via ); 47 void fromDStraffic( const Opie::Net::OMacAddress& from, const Opie::Net::OMacAddress& to, const Opie::Net::OMacAddress& via );
48 void toDStraffic( const Opie::Net::OMacAddress& from, const Opie::Net::OMacAddress& to, const Opie::Net::OMacAddress& via ); 48 void toDStraffic( const Opie::Net::OMacAddress& from, const Opie::Net::OMacAddress& to, const Opie::Net::OMacAddress& via );
49 void WDStraffic( const Opie::Net::OMacAddress& from, const Opie::Net::OMacAddress& to, const Opie::Net::OMacAddress& viaFrom, const Opie::Net::OMacAddress& viaTo ); 49 void WDStraffic( const Opie::Net::OMacAddress& from, const Opie::Net::OMacAddress& to, const Opie::Net::OMacAddress& viaFrom, const Opie::Net::OMacAddress& viaTo );
50 void IBSStraffic( const Opie::Net::OMacAddress& from, const Opie::Net::OMacAddress& to, const Opie::Net::OMacAddress& via ); 50 void IBSStraffic( const Opie::Net::OMacAddress& from, const Opie::Net::OMacAddress& to, const Opie::Net::OMacAddress& via );
51 51
52 void identify( const Opie::Net::OMacAddress&, const QString& ipaddr ); 52 void identify( const Opie::Net::OMacAddress&, const QString& ipaddr );
53 53
54 void contextMenuRequested( QListViewItem* item, const QPoint&, int ); 54 void contextMenuRequested( QListViewItem* item, const QPoint&, int );
55 55
56 signals: 56 signals:
57 void rightButtonClicked(QListViewItem*,const QPoint&,int); 57 void rightButtonClicked(QListViewItem*,const QPoint&,int);
58 void joinNetwork( const QString&, const QString&, int, const QString& );
59 58
60 protected: 59 protected:
61 void addIfNotExisting( MScanListItem* parent, const Opie::Net::OMacAddress& addr, const QString& type = "station" ); 60 void addIfNotExisting( MScanListItem* parent, const Opie::Net::OMacAddress& addr, const QString& type = "station" );
62 61
63}; 62};
64 63
65//****************************** MScanListItem **************************************************************** 64//****************************** MScanListItem ****************************************************************
66 65
67class MScanListItem: public Opie::Ui::OListViewItem 66class MScanListItem: public Opie::Ui::OListViewItem
68{ 67{
69 public: 68 public:
70 MScanListItem::MScanListItem( QListView* parent, 69 MScanListItem::MScanListItem( QListView* parent,
71 const QString& type = "unknown", 70 const QString& type = "unknown",
72 const QString& essid = "unknown", 71 const QString& essid = "unknown",
73 const QString& macaddr = "unknown", 72 const QString& macaddr = "unknown",
74 bool wep = false, 73 bool wep = false,
75 int channel = 0, 74 int channel = 0,
76 int signal = 0, 75 int signal = 0,
77 bool probed = false ); 76 bool probed = false );
78 77
79 MScanListItem::MScanListItem( QListViewItem* parent, 78 MScanListItem::MScanListItem( QListViewItem* parent,
80 const QString& type = "unknown", 79 const QString& type = "unknown",
81 const QString& essid = "unknown", 80 const QString& essid = "unknown",
82 const QString& macaddr = "unknown", 81 const QString& macaddr = "unknown",
83 bool wep = false, 82 bool wep = false,
84 int channel = 0, 83 int channel = 0,
85 int signal = 0 ); 84 int signal = 0 );
86 85
87 86
88 protected: 87 protected:
89 virtual void decorateItem( QString type, QString essid, QString macaddr, bool wep, int channel, int signal, bool probed ); 88 virtual void decorateItem( QString type, QString essid, QString macaddr, bool wep, int channel, int signal, bool probed );
90 89
91 public: 90 public:
92 QString type; 91 QString type;
93 92
94 public: 93 public:
95 //const QString& type() { return _type; }; 94 //const QString& type() { return _type; };
96 const QString& essid() const; 95 const QString& essid() const;
97 const QString& macaddr() { return _macaddr; }; 96 const QString& macaddr() { return _macaddr; };
98 bool wep() { return _wep; }; 97 bool wep() { return _wep; };
99 int channel() { return _channel; }; 98 int channel() { return _channel; };
100 int signal() { return _signal; }; 99 int signal() { return _signal; };
101 int beacons() { return _beacons; }; 100 int beacons() { return _beacons; };
102 101
103 void setSignal( int signal ) { /* TODO */ }; 102 void setSignal( int signal ) { /* TODO */ };
104 void receivedBeacon(); 103 void receivedBeacon();
105 104
106 void setManufacturer( const QString& manufacturer ); 105 void setManufacturer( const QString& manufacturer );
107 void setLocation( const QString& location ); 106 void setLocation( const QString& location );
108 107
109 virtual Opie::Ui::OListViewItem* childFactory(); 108 virtual Opie::Ui::OListViewItem* childFactory();
110 virtual void serializeTo( QDataStream& s ) const; 109 virtual void serializeTo( QDataStream& s ) const;
111 virtual void serializeFrom( QDataStream& s ); 110 virtual void serializeFrom( QDataStream& s );
112 111
113 virtual QString key( int id, bool )const; 112 virtual QString key( int id, bool )const;
114 113
115 private: 114 private:
116 QString _type; 115 QString _type;
117 QString _essid; 116 QString _essid;
118 QString _macaddr; 117 QString _macaddr;
119 bool _wep; 118 bool _wep;
120 int _channel; 119 int _channel;
121 int _signal; 120 int _signal;
122 int _beacons; 121 int _beacons;
123 122
124}; 123};
125 124
126//****************************** MScanListViewFactory **************************************************************** 125//****************************** MScanListViewFactory ****************************************************************
127 126
128/* 127/*
129 128
130class MScanListViewFactory : public Opie::Ui::OListViewFactory 129class MScanListViewFactory : public Opie::Ui::OListViewFactory
131{ 130{
132public: 131public:
133 virtual QListView* listViewFactory(); 132 virtual QListView* listViewFactory();
134 virtual QListViewItem* listViewItemFactory( QListView* lv ); 133 virtual QListViewItem* listViewItemFactory( QListView* lv );
135 virtual QListViewItem* listViewItemFactory( QListViewItem* lvi ); 134 virtual QListViewItem* listViewItemFactory( QListViewItem* lvi );
136 virtual void setColumnText( int depth, QListViewItem* lvi, int column, const QString& text ); 135 virtual void setColumnText( int depth, QListViewItem* lvi, int column, const QString& text );
137 virtual void setCustomData( int depth, QListViewItem* lvi, const QString& text ); 136 virtual void setCustomData( int depth, QListViewItem* lvi, const QString& text );
138} 137}
139*/ 138*/
140 139
141#endif 140#endif
142 141
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp
index 8cabf0d..c4e6f02 100644
--- a/noncore/net/wellenreiter/gui/wellenreiter.cpp
+++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp
@@ -1,779 +1,740 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. 2** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved.
3** 3**
4** This file may be distributed and/or modified under the terms of the 4** This file may be distributed and/or modified under the terms of the
5** GNU General Public License version 2 as published by the Free Software 5** GNU General Public License version 2 as published by the Free Software
6** Foundation and appearing in the file LICENSE.GPL included in the 6** Foundation and appearing in the file LICENSE.GPL included in the
7** packaging of this file. 7** packaging of this file.
8** 8**
9** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 9** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
10** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 10** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
11** 11**
12***********************************************************************/ 12***********************************************************************/
13 13
14#include "gps.h" 14#include "gps.h"
15#include "wellenreiter.h" 15#include "wellenreiter.h"
16#include "scanlist.h" 16#include "scanlist.h"
17#include "logwindow.h" 17#include "logwindow.h"
18#include "packetview.h" 18#include "packetview.h"
19#include "configwindow.h" 19#include "configwindow.h"
20#include "statwindow.h" 20#include "statwindow.h"
21#include "graphwindow.h" 21#include "graphwindow.h"
22#include "protolistview.h" 22#include "protolistview.h"
23 23
24/* OPIE */ 24/* OPIE */
25#ifdef QWS 25#ifdef QWS
26#include <opie2/oapplication.h> 26#include <opie2/oapplication.h>
27#include <opie2/odebug.h> 27#include <opie2/odebug.h>
28#include <opie2/odevice.h> 28#include <opie2/odevice.h>
29#else 29#else
30#include <qapplication.h> 30#include <qapplication.h>
31#endif 31#endif
32#include <opie2/omanufacturerdb.h> 32#include <opie2/omanufacturerdb.h>
33#include <opie2/onetwork.h> 33#include <opie2/onetwork.h>
34#include <opie2/opcap.h> 34#include <opie2/opcap.h>
35#include <qpe/qcopenvelope_qws.h> 35#include <qpe/qcopenvelope_qws.h>
36 36
37/* QT */ 37/* QT */
38#include <qcheckbox.h> 38#include <qcheckbox.h>
39#include <qcombobox.h> 39#include <qcombobox.h>
40#include <qdatetime.h> 40#include <qdatetime.h>
41#include <qpushbutton.h> 41#include <qpushbutton.h>
42#include <qlineedit.h> 42#include <qlineedit.h>
43#include <qmessagebox.h> 43#include <qmessagebox.h>
44#include <qobjectlist.h> 44#include <qobjectlist.h>
45#include <qregexp.h> 45#include <qregexp.h>
46#include <qspinbox.h> 46#include <qspinbox.h>
47#include <qtimer.h> 47#include <qtimer.h>
48#include <qtoolbutton.h> 48#include <qtoolbutton.h>
49#include <qmainwindow.h> 49#include <qmainwindow.h>
50 50
51/* STD */ 51/* STD */
52#include <assert.h> 52#include <assert.h>
53#include <errno.h> 53#include <errno.h>
54#include <unistd.h> 54#include <unistd.h>
55#include <string.h> 55#include <string.h>
56#include <sys/types.h> 56#include <sys/types.h>
57#include <stdlib.h> 57#include <stdlib.h>
58#include <signal.h> 58#include <signal.h>
59 59
60 60
61using namespace Opie::Core; 61using namespace Opie::Core;
62using namespace Opie::Net; 62using namespace Opie::Net;
63using namespace Opie::Ui; 63using namespace Opie::Ui;
64 64
65Wellenreiter* Wellenreiter::instance = 0; 65Wellenreiter* Wellenreiter::instance = 0;
66 66
67Wellenreiter::Wellenreiter( QWidget* parent ) 67Wellenreiter::Wellenreiter( QWidget* parent )
68 : WellenreiterBase( parent, 0, 0 ), 68 : WellenreiterBase( parent, 0, 0 ),
69 sniffing( false ), iface( 0 ), configwindow( 0 ) 69 sniffing( false ), iface( 0 ), configwindow( 0 )
70{ 70{
71 71
72 logwindow->log( "(i) Wellenreiter has been started." ); 72 logwindow->log( "(i) Wellenreiter has been started." );
73 73
74 // 74 //
75 // detect operating system 75 // detect operating system
76 // 76 //
77 77
78 #ifdef QWS 78 #ifdef QWS
79 QString sys = QString( "(i) Running on '%1'.").arg( ODevice::inst()->systemString() ); 79 QString sys = QString( "(i) Running on '%1'.").arg( ODevice::inst()->systemString() );
80 _system = ODevice::inst()->system(); 80 _system = ODevice::inst()->system();
81 logwindow->log( sys ); 81 logwindow->log( sys );
82 #endif 82 #endif
83 83
84 netview->setColumnWidthMode( 1, QListView::Manual ); 84 netview->setColumnWidthMode( 1, QListView::Manual );
85 connect( netview, SIGNAL( joinNetwork(const QString&,const QString&,int,const QString&) ),
86 this, SLOT( joinNetwork(const QString&,const QString&,int,const QString&) ) );
87 pcap = new OPacketCapturer(); 85 pcap = new OPacketCapturer();
88 pcap->setAutoDelete( false ); 86 pcap->setAutoDelete( false );
89 87
90 gps = new GPS( this ); 88 gps = new GPS( this );
91 89
92 QTimer::singleShot( 1000, this, SLOT( initialTimer() ) ); 90 QTimer::singleShot( 1000, this, SLOT( initialTimer() ) );
93 91
94 registerSignalHandler(); 92 registerSignalHandler();
95} 93}
96 94
97 95
98Wellenreiter::~Wellenreiter() 96Wellenreiter::~Wellenreiter()
99{ 97{
100 delete pcap; 98 delete pcap;
101 //unregisterSignalHandler(); 99 //unregisterSignalHandler();
102} 100}
103 101
104 102
105void Wellenreiter::initialTimer() 103void Wellenreiter::initialTimer()
106{ 104{
107 odebug << "preloading manufacturer database..." << oendl; 105 odebug << "preloading manufacturer database..." << oendl;
108 OManufacturerDB::instance(); 106 OManufacturerDB::instance();
109} 107}
110 108
111 109
112void Wellenreiter::signalHandler( int sig ) 110void Wellenreiter::signalHandler( int sig )
113{ 111{
114 Q_UNUSED( sig ) 112 Q_UNUSED( sig )
115 oerr << "Aye! Received SIGSEGV or SIGBUS! Trying to exit gracefully..." << oendl; 113 oerr << "Aye! Received SIGSEGV or SIGBUS! Trying to exit gracefully..." << oendl;
116 if ( Wellenreiter::instance->sniffing ) 114 if ( Wellenreiter::instance->sniffing )
117 { 115 {
118 Wellenreiter::instance->pcap->closeDumpFile(); 116 Wellenreiter::instance->pcap->closeDumpFile();
119 Wellenreiter::instance->pcap->close(); 117 Wellenreiter::instance->pcap->close();
120 Wellenreiter::instance->stopClicked(); 118 Wellenreiter::instance->stopClicked();
121 } 119 }
122 oerr << "Phew. Seemed to work." << oendl; 120 oerr << "Phew. Seemed to work." << oendl;
123 ::exit( -1 ); 121 ::exit( -1 );
124} 122}
125 123
126 124
127void Wellenreiter::registerSignalHandler() 125void Wellenreiter::registerSignalHandler()
128{ 126{
129 Wellenreiter::instance = this; 127 Wellenreiter::instance = this;
130 struct sigaction action; 128 struct sigaction action;
131 129
132 action.sa_handler = Wellenreiter::signalHandler; 130 action.sa_handler = Wellenreiter::signalHandler;
133 if (sigemptyset(&action.sa_mask)) 131 if (sigemptyset(&action.sa_mask))
134 oerr << "sigemptyset() failure:" << strerror( errno ) << oendl; 132 oerr << "sigemptyset() failure:" << strerror( errno ) << oendl;
135 if (sigaction(SIGSEGV, &action, NULL)) 133 if (sigaction(SIGSEGV, &action, NULL))
136 oerr << "can't set up a signal handler for SIGSEGV:" << strerror( errno ) << oendl; 134 oerr << "can't set up a signal handler for SIGSEGV:" << strerror( errno ) << oendl;
137 if (sigaction(SIGBUS, &action, NULL)) 135 if (sigaction(SIGBUS, &action, NULL))
138 oerr << "can't set up a signal handler for SIGBUS:" << strerror( errno ) << oendl; 136 oerr << "can't set up a signal handler for SIGBUS:" << strerror( errno ) << oendl;
139 odebug << "signal handlers setup." << oendl; 137 odebug << "signal handlers setup." << oendl;
140} 138}
141 139
142 140
143void Wellenreiter::setConfigWindow( WellenreiterConfigWindow* cw ) 141void Wellenreiter::setConfigWindow( WellenreiterConfigWindow* cw )
144{ 142{
145 configwindow = cw; 143 configwindow = cw;
146} 144}
147 145
148 146
149void Wellenreiter::channelHopped(int c) 147void Wellenreiter::channelHopped(int c)
150{ 148{
151 QString title = "Wellenreiter II -scan- ["; 149 QString title = "Wellenreiter II -scan- [";
152 QString left; 150 QString left;
153 if ( c > 1 ) left.fill( '.', c-1 ); 151 if ( c > 1 ) left.fill( '.', c-1 );
154 title.append( left ); 152 title.append( left );
155 title.append( '|' ); 153 title.append( '|' );
156 if ( c < iface->channels() ) 154 if ( c < iface->channels() )
157 { 155 {
158 QString right; 156 QString right;
159 right.fill( '.', iface->channels()-c ); 157 right.fill( '.', iface->channels()-c );
160 title.append( right ); 158 title.append( right );
161 } 159 }
162 title.append( "]" ); 160 title.append( "]" );
163 //title.append( QString().sprintf( " %02d", c ) ); 161 //title.append( QString().sprintf( " %02d", c ) );
164 assert( parent() ); 162 assert( parent() );
165 ( (QMainWindow*) parent() )->setCaption( title ); 163 ( (QMainWindow*) parent() )->setCaption( title );
166} 164}
167 165
168 166
169void Wellenreiter::handleNotification( OPacket* p ) 167void Wellenreiter::handleNotification( OPacket* p )
170{ 168{
171 QObjectList* l = p->queryList(); 169 QObjectList* l = p->queryList();
172 QObjectListIt it( *l ); 170 QObjectListIt it( *l );
173 QObject* o; 171 QObject* o;
174 172
175 while ( (o = it.current()) != 0 ) 173 while ( (o = it.current()) != 0 )
176 { 174 {
177 QString name = it.current()->name(); 175 QString name = it.current()->name();
178 if ( configwindow->parsePackets->isProtocolChecked( name ) ) 176 if ( configwindow->parsePackets->isProtocolChecked( name ) )
179 { 177 {
180 QString action = configwindow->parsePackets->protocolAction( name ); 178 QString action = configwindow->parsePackets->protocolAction( name );
181 odebug << "parsePacket-action for '" << name << "' seems to be '" << action << "'" << oendl; 179 odebug << "parsePacket-action for '" << name << "' seems to be '" << action << "'" << oendl;
182 doAction( action, name, p ); 180 doAction( action, name, p );
183 } 181 }
184 else 182 else
185 { 183 {
186 odebug << "protocol '" << name << "' not checked in parsePackets." << oendl; 184 odebug << "protocol '" << name << "' not checked in parsePackets." << oendl;
187 } 185 }
188 ++it; 186 ++it;
189 } 187 }
190} 188}
191 189
192 190
193void Wellenreiter::handleManagementFrame( OPacket* p, OWaveLanManagementPacket* manage ) 191void Wellenreiter::handleManagementFrame( OPacket* p, OWaveLanManagementPacket* manage )
194{ 192{
195 if ( manage->managementType() == "Beacon" ) handleManagementFrameBeacon( p, manage ); 193 if ( manage->managementType() == "Beacon" ) handleManagementFrameBeacon( p, manage );
196 else if ( manage->managementType() == "ProbeRequest" ) handleManagementFrameProbeRequest( p, manage ); 194 else if ( manage->managementType() == "ProbeRequest" ) handleManagementFrameProbeRequest( p, manage );
197 else if ( manage->managementType() == "ProbeResponse" ) handleManagementFrameProbeResponse( p, manage ); 195 else if ( manage->managementType() == "ProbeResponse" ) handleManagementFrameProbeResponse( p, manage );
198 else owarn << "Wellenreiter::handleManagementFrame(): '" << manage->managementType() << "' - please handle me!" << oendl; 196 else owarn << "Wellenreiter::handleManagementFrame(): '" << manage->managementType() << "' - please handle me!" << oendl;
199} 197}
200 198
201 199
202void Wellenreiter::handleManagementFrameProbeRequest( OPacket* p, OWaveLanManagementPacket* /* request */ ) 200void Wellenreiter::handleManagementFrameProbeRequest( OPacket* p, OWaveLanManagementPacket* /* request */ )
203{ 201{
204 OWaveLanManagementSSID* ssid = static_cast<OWaveLanManagementSSID*>( p->child( "802.11 SSID" ) ); 202 OWaveLanManagementSSID* ssid = static_cast<OWaveLanManagementSSID*>( p->child( "802.11 SSID" ) );
205 QString essid = ssid ? ssid->ID( true /* decloak */ ) : QString("<unknown>"); 203 QString essid = ssid ? ssid->ID( true /* decloak */ ) : QString("<unknown>");
206// OWaveLanManagementDS* ds = static_cast<OWaveLanManagementDS*>( p->child( "802.11 DS" ) ); 204// OWaveLanManagementDS* ds = static_cast<OWaveLanManagementDS*>( p->child( "802.11 DS" ) );
207// int channel = ds ? ds->channel() : -1; 205// int channel = ds ? ds->channel() : -1;
208 OWaveLanPacket* header = static_cast<OWaveLanPacket*>( p->child( "802.11" ) ); 206 OWaveLanPacket* header = static_cast<OWaveLanPacket*>( p->child( "802.11" ) );
209 207
210 GpsLocation loc( -111, -111 ); 208 GpsLocation loc( -111, -111 );
211 if ( configwindow->enableGPS->isChecked() ) 209 if ( configwindow->enableGPS->isChecked() )
212 { 210 {
213 // TODO: add check if GPS is working!? 211 // TODO: add check if GPS is working!?
214 odebug << "Wellenreiter::gathering GPS data..." << oendl; 212 odebug << "Wellenreiter::gathering GPS data..." << oendl;
215 loc = gps->position(); 213 loc = gps->position();
216 odebug << "Wellenreiter::GPS data received is ( " << loc.latitude() << " , " << loc.longitude() << " ) - dms string = '" << loc.dmsPosition().latin1() << "'" << oendl; 214 odebug << "Wellenreiter::GPS data received is ( " << loc.latitude() << " , " << loc.longitude() << " ) - dms string = '" << loc.dmsPosition().latin1() << "'" << oendl;
217 } 215 }
218 216
219 if ( essid.length() ) 217 if ( essid.length() )
220 netView()->addNewItem( "adhoc", essid, header->macAddress2(), false /* should check FrameControl field */, -1, 0, loc, true /* only probed */ ); 218 netView()->addNewItem( "adhoc", essid, header->macAddress2(), false /* should check FrameControl field */, -1, 0, loc, true /* only probed */ );
221 odebug << "Wellenreiter::invalid frame [possibly noise] detected!" << oendl; 219 odebug << "Wellenreiter::invalid frame [possibly noise] detected!" << oendl;
222} 220}
223 221
224 222
225void Wellenreiter::handleManagementFrameProbeResponse( OPacket* /* p */, OWaveLanManagementPacket* /* response */ ) 223void Wellenreiter::handleManagementFrameProbeResponse( OPacket* /* p */, OWaveLanManagementPacket* /* response */ )
226{ 224{
227} 225}
228 226
229 227
230void Wellenreiter::handleManagementFrameBeacon( OPacket* p, OWaveLanManagementPacket* beacon ) 228void Wellenreiter::handleManagementFrameBeacon( OPacket* p, OWaveLanManagementPacket* beacon )
231{ 229{
232 QString type; 230 QString type;
233 if ( beacon->canIBSS() ) 231 if ( beacon->canIBSS() )
234 { 232 {
235 type = "adhoc"; 233 type = "adhoc";
236 } 234 }
237 else if ( beacon->canESS() ) 235 else if ( beacon->canESS() )
238 { 236 {
239 type = "managed"; 237 type = "managed";
240 } 238 }
241 else 239 else
242 { 240 {
243 owarn << "Wellenreiter::invalid frame [possibly noise] detected!" << oendl; 241 owarn << "Wellenreiter::invalid frame [possibly noise] detected!" << oendl;
244 return; 242 return;
245 } 243 }
246 244
247 OWaveLanManagementSSID* ssid = static_cast<OWaveLanManagementSSID*>( p->child( "802.11 SSID" ) ); 245 OWaveLanManagementSSID* ssid = static_cast<OWaveLanManagementSSID*>( p->child( "802.11 SSID" ) );
248 QString essid = ssid ? ssid->ID( true /* decloak */ ) : QString("<unknown>"); 246 QString essid = ssid ? ssid->ID( true /* decloak */ ) : QString("<unknown>");
249 OWaveLanManagementDS* ds = static_cast<OWaveLanManagementDS*>( p->child( "802.11 DS" ) ); 247 OWaveLanManagementDS* ds = static_cast<OWaveLanManagementDS*>( p->child( "802.11 DS" ) );
250 int channel = ds ? ds->channel() : -1; 248 int channel = ds ? ds->channel() : -1;
251 249
252 OWaveLanPacket* header = static_cast<OWaveLanPacket*>( p->child( "802.11" ) ); 250 OWaveLanPacket* header = static_cast<OWaveLanPacket*>( p->child( "802.11" ) );
253 251
254 GpsLocation loc( -111, -111 ); 252 GpsLocation loc( -111, -111 );
255 if ( configwindow->enableGPS->isChecked() ) 253 if ( configwindow->enableGPS->isChecked() )
256 { 254 {
257 // TODO: add check if GPS is working!? 255 // TODO: add check if GPS is working!?
258 odebug << "Wellenreiter::gathering GPS data..." << oendl; 256 odebug << "Wellenreiter::gathering GPS data..." << oendl;
259 loc = gps->position(); 257 loc = gps->position();
260 odebug << "Wellenreiter::GPS data received is ( " << loc.latitude() << " , " << loc.longitude() << " ) - dms string = '" << loc.dmsPosition().latin1() << "'" << oendl; 258 odebug << "Wellenreiter::GPS data received is ( " << loc.latitude() << " , " << loc.longitude() << " ) - dms string = '" << loc.dmsPosition().latin1() << "'" << oendl;
261 } 259 }
262 260
263 netView()->addNewItem( type, essid, header->macAddress2(), beacon->canPrivacy(), channel, 0, loc ); 261 netView()->addNewItem( type, essid, header->macAddress2(), beacon->canPrivacy(), channel, 0, loc );
264 262
265 // update graph window 263 // update graph window
266 if ( ds ) 264 if ( ds )
267 { 265 {
268 OPrismHeaderPacket* prism = static_cast<OPrismHeaderPacket*>( p->child( "Prism" ) ); 266 OPrismHeaderPacket* prism = static_cast<OPrismHeaderPacket*>( p->child( "Prism" ) );
269 if ( prism ) 267 if ( prism )
270 graphwindow->traffic( ds->channel(), prism->signalStrength() ); 268 graphwindow->traffic( ds->channel(), prism->signalStrength() );
271 else 269 else
272 graphwindow->traffic( ds->channel(), 95 ); 270 graphwindow->traffic( ds->channel(), 95 );
273 } 271 }
274} 272}
275 273
276 274
277void Wellenreiter::handleControlFrame( OPacket* p, OWaveLanControlPacket* control ) 275void Wellenreiter::handleControlFrame( OPacket* p, OWaveLanControlPacket* control )
278{ 276{
279 OWaveLanPacket* header = static_cast<OWaveLanPacket*>( p->child( "802.11" ) ); 277 OWaveLanPacket* header = static_cast<OWaveLanPacket*>( p->child( "802.11" ) );
280 278
281 if ( control->controlType() == "Acknowledge" ) 279 if ( control->controlType() == "Acknowledge" )
282 { 280 {
283 netView()->addNewItem( "adhoc", "<unknown>", header->macAddress1(), false, -1, 0, GpsLocation( -111, -111 ) ); 281 netView()->addNewItem( "adhoc", "<unknown>", header->macAddress1(), false, -1, 0, GpsLocation( -111, -111 ) );
284 } 282 }
285 else 283 else
286 { 284 {
287 odebug << "Wellenreiter::handleControlFrame - please handle " << control->controlType() << " in a future version! :D" << oendl; 285 odebug << "Wellenreiter::handleControlFrame - please handle " << control->controlType() << " in a future version! :D" << oendl;
288 } 286 }
289} 287}
290 288
291 289
292void Wellenreiter::handleWlanData( OPacket* p, OWaveLanDataPacket* /* data */ , OMacAddress& from, OMacAddress& to ) 290void Wellenreiter::handleWlanData( OPacket* p, OWaveLanDataPacket* /* data */ , OMacAddress& from, OMacAddress& to )
293{ 291{
294 OWaveLanPacket* wlan = (OWaveLanPacket*) p->child( "802.11" ); 292 OWaveLanPacket* wlan = (OWaveLanPacket*) p->child( "802.11" );
295 if ( wlan->fromDS() && !wlan->toDS() ) 293 if ( wlan->fromDS() && !wlan->toDS() )
296 { 294 {
297 netView()->fromDStraffic( wlan->macAddress3(), wlan->macAddress1(), wlan->macAddress2() ); 295 netView()->fromDStraffic( wlan->macAddress3(), wlan->macAddress1(), wlan->macAddress2() );
298 from = wlan->macAddress3(); 296 from = wlan->macAddress3();
299 to = wlan->macAddress2(); 297 to = wlan->macAddress2();
300 } 298 }
301 else if ( !wlan->fromDS() && wlan->toDS() ) 299 else if ( !wlan->fromDS() && wlan->toDS() )
302 { 300 {
303 netView()->toDStraffic( wlan->macAddress2(), wlan->macAddress3(), wlan->macAddress1() ); 301 netView()->toDStraffic( wlan->macAddress2(), wlan->macAddress3(), wlan->macAddress1() );
304 from = wlan->macAddress2(); 302 from = wlan->macAddress2();
305 to = wlan->macAddress3(); 303 to = wlan->macAddress3();
306 } 304 }
307 else if ( wlan->fromDS() && wlan->toDS() ) 305 else if ( wlan->fromDS() && wlan->toDS() )
308 { 306 {
309 netView()->WDStraffic( wlan->macAddress4(), wlan->macAddress3(), wlan->macAddress1(), wlan->macAddress2() ); 307 netView()->WDStraffic( wlan->macAddress4(), wlan->macAddress3(), wlan->macAddress1(), wlan->macAddress2() );
310 from = wlan->macAddress4(); 308 from = wlan->macAddress4();
311 to = wlan->macAddress3(); 309 to = wlan->macAddress3();
312 } 310 }
313 else 311 else
314 { 312 {
315 netView()->IBSStraffic( wlan->macAddress2(), wlan->macAddress1(), wlan->macAddress3() ); 313 netView()->IBSStraffic( wlan->macAddress2(), wlan->macAddress1(), wlan->macAddress3() );
316 from = wlan->macAddress2(); 314 from = wlan->macAddress2();
317 to = wlan->macAddress1(); 315 to = wlan->macAddress1();
318 } 316 }
319} 317}
320 318
321 319
322void Wellenreiter::handleEthernetData( OPacket* /* p */, OEthernetPacket* data, OMacAddress& from, OMacAddress& to ) 320void Wellenreiter::handleEthernetData( OPacket* /* p */, OEthernetPacket* data, OMacAddress& from, OMacAddress& to )
323{ 321{
324 from = data->sourceAddress(); 322 from = data->sourceAddress();
325 to = data->destinationAddress(); 323 to = data->destinationAddress();
326 324
327 netView()->addNewItem( "station", "<wired>", from, false, -1, 0, GpsLocation( -111, -111 ) ); 325 netView()->addNewItem( "station", "<wired>", from, false, -1, 0, GpsLocation( -111, -111 ) );
328} 326}
329 327
330 328
331void Wellenreiter::handleARPData( OPacket* p, OARPPacket*, OMacAddress& /* source */, OMacAddress& /* dest */ ) 329void Wellenreiter::handleARPData( OPacket* p, OARPPacket*, OMacAddress& /* source */, OMacAddress& /* dest */ )
332{ 330{
333 OARPPacket* arp = (OARPPacket*) p->child( "ARP" ); 331 OARPPacket* arp = (OARPPacket*) p->child( "ARP" );
334 if ( arp ) 332 if ( arp )
335 { 333 {
336 odebug << "Received ARP traffic (type '" << arp->type() << "'): " << oendl; 334 odebug << "Received ARP traffic (type '" << arp->type() << "'): " << oendl;
337 if ( arp->type() == "REQUEST" ) 335 if ( arp->type() == "REQUEST" )
338 { 336 {
339 netView()->identify( arp->senderMacAddress(), arp->senderIPV4Address().toString() ); 337 netView()->identify( arp->senderMacAddress(), arp->senderIPV4Address().toString() );
340 } 338 }
341 else if ( arp->type() == "REPLY" ) 339 else if ( arp->type() == "REPLY" )
342 { 340 {
343 netView()->identify( arp->senderMacAddress(), arp->senderIPV4Address().toString() ); 341 netView()->identify( arp->senderMacAddress(), arp->senderIPV4Address().toString() );
344 netView()->identify( arp->targetMacAddress(), arp->targetIPV4Address().toString() ); 342 netView()->identify( arp->targetMacAddress(), arp->targetIPV4Address().toString() );
345 } 343 }
346 } 344 }
347} 345}
348 346
349 347
350void Wellenreiter::handleIPData( OPacket* p, OIPPacket* /* ip */, OMacAddress& source, OMacAddress& /* dest */ ) 348void Wellenreiter::handleIPData( OPacket* p, OIPPacket* /* ip */, OMacAddress& source, OMacAddress& /* dest */ )
351{ 349{
352 //TODO: Implement more IP based protocols 350 //TODO: Implement more IP based protocols
353 351
354 ODHCPPacket* dhcp = (ODHCPPacket*) p->child( "DHCP" ); 352 ODHCPPacket* dhcp = (ODHCPPacket*) p->child( "DHCP" );
355 if ( dhcp ) 353 if ( dhcp )
356 { 354 {
357 odebug << "Received DHCP '" << dhcp->type() << "' packet" << oendl; 355 odebug << "Received DHCP '" << dhcp->type() << "' packet" << oendl;
358 if ( dhcp->type() == "OFFER" ) 356 if ( dhcp->type() == "OFFER" )
359 { 357 {
360 odebug << "DHCP: '" << source.toString() << "' ('" << dhcp->serverAddress().toString() << "') seems to be a DHCP server." << oendl; 358 odebug << "DHCP: '" << source.toString() << "' ('" << dhcp->serverAddress().toString() << "') seems to be a DHCP server." << oendl;
361 netView()->identify( source, dhcp->serverAddress().toString() ); 359 netView()->identify( source, dhcp->serverAddress().toString() );
362 netView()->addService( "DHCP", source, dhcp->serverAddress().toString() ); 360 netView()->addService( "DHCP", source, dhcp->serverAddress().toString() );
363 } 361 }
364 else if ( dhcp->type() == "ACK" ) 362 else if ( dhcp->type() == "ACK" )
365 { 363 {
366 odebug << "DHCP: '" << dhcp->clientMacAddress().toString() << "' ('" << dhcp->yourAddress().toString() << "') accepted the offered DHCP address." << oendl; 364 odebug << "DHCP: '" << dhcp->clientMacAddress().toString() << "' ('" << dhcp->yourAddress().toString() << "') accepted the offered DHCP address." << oendl;
367 netView()->identify( dhcp->clientMacAddress(), dhcp->yourAddress().toString() ); 365 netView()->identify( dhcp->clientMacAddress(), dhcp->yourAddress().toString() );
368 } 366 }
369 } 367 }
370} 368}
371 369
372 370
373QObject* Wellenreiter::childIfToParse( OPacket* p, const QString& protocol ) 371QObject* Wellenreiter::childIfToParse( OPacket* p, const QString& protocol )
374{ 372{
375 if ( configwindow->parsePackets->isProtocolChecked( protocol ) ) 373 if ( configwindow->parsePackets->isProtocolChecked( protocol ) )
376 if ( configwindow->parsePackets->protocolAction( protocol ) == "Discard!" ) 374 if ( configwindow->parsePackets->protocolAction( protocol ) == "Discard!" )
377 return 0; 375 return 0;
378 376
379 return p->child( protocol ); 377 return p->child( protocol );
380} 378}
381 379
382 380
383bool Wellenreiter::checkDumpPacket( OPacket* p ) 381bool Wellenreiter::checkDumpPacket( OPacket* p )
384{ 382{
385 // go through all child packets and see if one is inside the child hierarchy for p 383 // go through all child packets and see if one is inside the child hierarchy for p
386 // if so, do what the user requested (protocolAction), e.g. pass or discard 384 // if so, do what the user requested (protocolAction), e.g. pass or discard
387 if ( !configwindow->writeCaptureFile->isChecked() ) 385 if ( !configwindow->writeCaptureFile->isChecked() )
388 return true; // semantic change - we're logging anyway now to /tmp/wellenreiter 386 return true; // semantic change - we're logging anyway now to /tmp/wellenreiter
389 387
390 QObjectList* l = p->queryList(); 388 QObjectList* l = p->queryList();
391 QObjectListIt it( *l ); 389 QObjectListIt it( *l );
392 QObject* o; 390 QObject* o;
393 391
394 while ( (o = it.current()) != 0 ) 392 while ( (o = it.current()) != 0 )
395 { 393 {
396 QString name = it.current()->name(); 394 QString name = it.current()->name();
397 if ( configwindow->capturePackets->isProtocolChecked( name ) ) 395 if ( configwindow->capturePackets->isProtocolChecked( name ) )
398 { 396 {
399 QString action = configwindow->capturePackets->protocolAction( name ); 397 QString action = configwindow->capturePackets->protocolAction( name );
400 odebug << "capturePackets-action for '" << name << "' seems to be '" << action << "'" << oendl; 398 odebug << "capturePackets-action for '" << name << "' seems to be '" << action << "'" << oendl;
401 if ( action == "Discard" ) 399 if ( action == "Discard" )
402 { 400 {
403 logwindow->log( QString("(i) dump-discarding of '%1' packet requested." ).arg( name ) ); 401 logwindow->log( QString("(i) dump-discarding of '%1' packet requested." ).arg( name ) );
404 return false; 402 return false;
405 } 403 }
406 } 404 }
407 else 405 else
408 { 406 {
409 odebug << "protocol '" << name << "' not checked in capturePackets." << oendl; 407 odebug << "protocol '" << name << "' not checked in capturePackets." << oendl;
410 } 408 }
411 ++it; 409 ++it;
412 } 410 }
413 return true; 411 return true;
414} 412}
415 413
416 414
417void Wellenreiter::receivePacket( OPacket* p ) 415void Wellenreiter::receivePacket( OPacket* p )
418{ 416{
419 hexWindow()->add( p, configwindow->hexViewBuffer() ); 417 hexWindow()->add( p, configwindow->hexViewBuffer() );
420 418
421 if ( checkDumpPacket( p ) ) 419 if ( checkDumpPacket( p ) )
422 { 420 {
423 pcap->dump( p ); 421 pcap->dump( p );
424 } 422 }
425 423
426 // check for a management frame 424 // check for a management frame
427 OWaveLanManagementPacket* manage = static_cast<OWaveLanManagementPacket*>( childIfToParse( p, "802.11 Management" ) ); 425 OWaveLanManagementPacket* manage = static_cast<OWaveLanManagementPacket*>( childIfToParse( p, "802.11 Management" ) );
428 if ( manage ) 426 if ( manage )
429 { 427 {
430 handleManagementFrame( p, manage ); 428 handleManagementFrame( p, manage );
431 return; 429 return;
432 } 430 }
433 431
434 // check for a control frame 432 // check for a control frame
435 OWaveLanControlPacket* control = static_cast<OWaveLanControlPacket*>( childIfToParse( p, "802.11 Control" ) ); 433 OWaveLanControlPacket* control = static_cast<OWaveLanControlPacket*>( childIfToParse( p, "802.11 Control" ) );
436 if ( control ) 434 if ( control )
437 { 435 {
438 handleControlFrame( p, control ); 436 handleControlFrame( p, control );
439 return; 437 return;
440 } 438 }
441 439
442 OMacAddress source; 440 OMacAddress source;
443 OMacAddress dest; 441 OMacAddress dest;
444 442
445 //TODO: WEP check here 443 //TODO: WEP check here
446 444
447 // check for a wireless data frame 445 // check for a wireless data frame
448 OWaveLanDataPacket* wlan = static_cast<OWaveLanDataPacket*>( childIfToParse( p, "802.11 Data" ) ); 446 OWaveLanDataPacket* wlan = static_cast<OWaveLanDataPacket*>( childIfToParse( p, "802.11 Data" ) );
449 if ( wlan ) 447 if ( wlan )
450 { 448 {
451 handleWlanData( p, wlan, source, dest ); 449 handleWlanData( p, wlan, source, dest );
452 } 450 }
453 451
454 // check for a wired data frame 452 // check for a wired data frame
455 OEthernetPacket* eth = static_cast<OEthernetPacket*>( childIfToParse( p, "Ethernet" ) ); 453 OEthernetPacket* eth = static_cast<OEthernetPacket*>( childIfToParse( p, "Ethernet" ) );
456 if ( eth ) 454 if ( eth )
457 { 455 {
458 handleEthernetData( p, eth, source, dest ); 456 handleEthernetData( p, eth, source, dest );
459 } 457 }
460 458
461 // check for an arp frame since arp frames come in two flavours: 459 // check for an arp frame since arp frames come in two flavours:
462 // 802.11 encapsulates ARP data within IP packets while wired ethernet doesn't. 460 // 802.11 encapsulates ARP data within IP packets while wired ethernet doesn't.
463 OARPPacket* arp = static_cast<OARPPacket*>( childIfToParse( p, "ARP" ) ); 461 OARPPacket* arp = static_cast<OARPPacket*>( childIfToParse( p, "ARP" ) );
464 if ( arp ) 462 if ( arp )
465 { 463 {
466 handleARPData( p, arp, source, dest ); 464 handleARPData( p, arp, source, dest );
467 } 465 }
468 466
469 // check for a ip frame 467 // check for a ip frame
470 OIPPacket* ip = static_cast<OIPPacket*>( childIfToParse( p, "IP" ) ); 468 OIPPacket* ip = static_cast<OIPPacket*>( childIfToParse( p, "IP" ) );
471 if ( ip ) 469 if ( ip )
472 { 470 {
473 handleIPData( p, ip, source, dest ); 471 handleIPData( p, ip, source, dest );
474 } 472 }
475 473
476 //handleNotification( p ); 474 //handleNotification( p );
477 475
478} 476}
479 477
480 478
481void Wellenreiter::stopClicked() 479void Wellenreiter::stopClicked()
482{ 480{
483 if ( iface ) 481 if ( iface )
484 { 482 {
485 disconnect( SIGNAL( receivedPacket(Opie::Net::OPacket*) ), this, SLOT( receivePacket(Opie::Net::OPacket*) ) ); 483 disconnect( SIGNAL( receivedPacket(Opie::Net::OPacket*) ), this, SLOT( receivePacket(Opie::Net::OPacket*) ) );
486 disconnect( SIGNAL( hopped(int) ), this, SLOT( channelHopped(int) ) ); 484 disconnect( SIGNAL( hopped(int) ), this, SLOT( channelHopped(int) ) );
487 iface->setChannelHopping(); // stop hopping channels 485 iface->setChannelHopping(); // stop hopping channels
488 } 486 }
489 else 487 else
490 killTimers(); 488 killTimers();
491 489
492 pcap->close(); 490 pcap->close();
493 sniffing = false; 491 sniffing = false;
494 492
495 if ( iface ) 493 if ( iface )
496 { 494 {
497 // switch off monitor mode 495 // switch off monitor mode
498 iface->setMode( "managed" ); 496 iface->setMode( "managed" );
499 // switch off promisc flag 497 // switch off promisc flag
500 iface->setPromiscuousMode( false ); 498 iface->setPromiscuousMode( false );
501 499
502 system( "cardctl reset; sleep 1" ); //FIXME: Use OProcess 500 system( "cardctl reset; sleep 1" ); //FIXME: Use OProcess
503 } 501 }
504 502
505 logwindow->log( "(i) Stopped Scanning." ); 503 logwindow->log( "(i) Stopped Scanning." );
506 assert( parent() ); 504 assert( parent() );
507 ( (QMainWindow*) parent() )->setCaption( "Wellenreiter II" ); 505 ( (QMainWindow*) parent() )->setCaption( "Wellenreiter II" );
508 506
509 // message the user 507 // message the user
510 QMessageBox::information( this, "Wellenreiter II", 508 QMessageBox::information( this, "Wellenreiter II",
511 tr( "Your wireless card\nshould now be usable again." ) ); 509 tr( "Your wireless card\nshould now be usable again." ) );
512 510
513 sniffing = false; 511 sniffing = false;
514 emit( stoppedSniffing() ); 512 emit( stoppedSniffing() );
515 513
516 #ifdef QWS 514 #ifdef QWS
517 if ( WellenreiterConfigWindow::instance()->disablePM->isChecked() ) 515 if ( WellenreiterConfigWindow::instance()->disablePM->isChecked() )
518 { 516 {
519 QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Enable; 517 QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Enable;
520 } 518 }
521 #else 519 #else
522 #warning FIXME: setScreenSaverMode is not operational on the X11 build 520 #warning FIXME: setScreenSaverMode is not operational on the X11 build
523 #endif 521 #endif
524 522
525 updateStatistics(); 523 updateStatistics();
526} 524}
527 525
528 526
529void Wellenreiter::startClicked() 527void Wellenreiter::startClicked()
530{ 528{
531 // get configuration from config window 529 // get configuration from config window
532 530
533 const QString& interface = configwindow->interfaceName->currentText(); 531 const QString& interface = configwindow->interfaceName->currentText();
534 const int cardtype = configwindow->driverType(); 532 const int cardtype = configwindow->driverType();
535// const int interval = configwindow->hoppingInterval(); 533// const int interval = configwindow->hoppingInterval();
536 534
537 if ( ( interface == "" ) || ( cardtype == 0 ) ) 535 if ( ( interface == "" ) || ( cardtype == 0 ) )
538 { 536 {
539 QMessageBox::information( this, "Wellenreiter II", 537 QMessageBox::information( this, "Wellenreiter II",
540 tr( "No device configured.\nPlease reconfigure!" ) ); 538 tr( "No device configured.\nPlease reconfigure!" ) );
541 return; 539 return;
542 } 540 }
543 541
544 // configure device 542 // configure device
545 ONetwork* net = ONetwork::instance(); 543 ONetwork* net = ONetwork::instance();
546 544
547 // TODO: check if interface is wireless and support sniffing for non-wireless interfaces 545 // TODO: check if interface is wireless and support sniffing for non-wireless interfaces
548 546
549 if ( cardtype != DEVTYPE_FILE ) 547 if ( cardtype != DEVTYPE_FILE )
550 { 548 {
551 549
552 if ( !net->isPresent( interface ) ) 550 if ( !net->isPresent( interface ) )
553 { 551 {
554 QMessageBox::information( this, "Wellenreiter II", 552 QMessageBox::information( this, "Wellenreiter II",
555 tr( "The configured device (%1)\nis not available on this system\n. Please reconfigure!" ).arg( interface ) ); 553 tr( "The configured device (%1)\nis not available on this system\n. Please reconfigure!" ).arg( interface ) );
556 return; 554 return;
557 } 555 }
558 556
559 iface = static_cast<OWirelessNetworkInterface*>(net->interface( interface )); // fails if network is not wireless! 557 iface = static_cast<OWirelessNetworkInterface*>(net->interface( interface )); // fails if network is not wireless!
560 assert( iface ); 558 assert( iface );
561 559
562 // bring device UP 560 // bring device UP
563 iface->setUp( true ); 561 iface->setUp( true );
564 if ( !iface->isUp() ) 562 if ( !iface->isUp() )
565 { 563 {
566 QMessageBox::warning( this, "Wellenreiter II", 564 QMessageBox::warning( this, "Wellenreiter II",
567 tr( "Can't bring interface '%1' up:\n" ).arg( iface->name() ) + strerror( errno ) ); 565 tr( "Can't bring interface '%1' up:\n" ).arg( iface->name() ) + strerror( errno ) );
568 return; 566 return;
569 } 567 }
570 568
571 // check if wireless extension version matches 569 // check if wireless extension version matches
572 if ( ONetwork::wirelessExtensionCompileVersion() != iface->wirelessExtensionDriverVersion() 570 if ( ONetwork::wirelessExtensionCompileVersion() != iface->wirelessExtensionDriverVersion()
573 && ( ONetwork::wirelessExtensionCompileVersion() <= 15 || iface->wirelessExtensionDriverVersion() <= 15 ) ) 571 && ( ONetwork::wirelessExtensionCompileVersion() <= 15 || iface->wirelessExtensionDriverVersion() <= 15 ) )
574 { 572 {
575 QMessageBox::critical( this, "Wellenreiter II", tr( "<p>The Wireless Extension Versions<br>do not match!<p>" 573 QMessageBox::critical( this, "Wellenreiter II", tr( "<p>The Wireless Extension Versions<br>do not match!<p>"
576 " Wellenreiter II : WE V%1<br>Interface driver: WE V%2" ) 574 " Wellenreiter II : WE V%1<br>Interface driver: WE V%2" )
577 .arg( QString::number( ONetwork::wirelessExtensionCompileVersion() ) ) 575 .arg( QString::number( ONetwork::wirelessExtensionCompileVersion() ) )
578 .arg( QString::number( iface->wirelessExtensionDriverVersion() ) ) ); 576 .arg( QString::number( iface->wirelessExtensionDriverVersion() ) ) );
579 return; 577 return;
580 } 578 }
581 } 579 }
582 // set monitor mode 580 // set monitor mode
583 bool usePrism = configwindow->usePrismHeader(); 581 bool usePrism = configwindow->usePrismHeader();
584 582
585 switch ( cardtype ) 583 switch ( cardtype )
586 { 584 {
587 case DEVTYPE_CISCO: iface->setMonitoring( new OCiscoMonitoringInterface( iface, usePrism ) ); break; 585 case DEVTYPE_CISCO: iface->setMonitoring( new OCiscoMonitoringInterface( iface, usePrism ) ); break;
588 case DEVTYPE_WLAN_NG: iface->setMonitoring( new OWlanNGMonitoringInterface( iface, usePrism ) ); break; 586 case DEVTYPE_WLAN_NG: iface->setMonitoring( new OWlanNGMonitoringInterface( iface, usePrism ) ); break;
589 case DEVTYPE_HOSTAP: iface->setMonitoring( new OHostAPMonitoringInterface( iface, usePrism ) ); break; 587 case DEVTYPE_HOSTAP: iface->setMonitoring( new OHostAPMonitoringInterface( iface, usePrism ) ); break;
590 case DEVTYPE_ORINOCO: iface->setMonitoring( new OOrinocoMonitoringInterface( iface, usePrism ) ); break; 588 case DEVTYPE_ORINOCO: iface->setMonitoring( new OOrinocoMonitoringInterface( iface, usePrism ) ); break;
591 case DEVTYPE_MANUAL: QMessageBox::information( this, "Wellenreiter II", tr( "Bring your device into\nmonitor mode now." ) ); break; 589 case DEVTYPE_MANUAL: QMessageBox::information( this, "Wellenreiter II", tr( "Bring your device into\nmonitor mode now." ) ); break;
592 case DEVTYPE_FILE: odebug << "Wellenreiter: Capturing from file '" << interface << "'" << oendl; break; 590 case DEVTYPE_FILE: odebug << "Wellenreiter: Capturing from file '" << interface << "'" << oendl; break;
593 default: assert( 0 ); // shouldn't reach this 591 default: assert( 0 ); // shouldn't reach this
594 } 592 }
595 593
596 // switch device into monitor mode 594 // switch device into monitor mode
597 if ( cardtype < DEVTYPE_FILE ) 595 if ( cardtype < DEVTYPE_FILE )
598 { 596 {
599 if ( cardtype != DEVTYPE_MANUAL ) 597 if ( cardtype != DEVTYPE_MANUAL )
600 iface->setMode( "monitor" ); 598 iface->setMode( "monitor" );
601 if ( iface->mode() != "monitor" ) 599 if ( iface->mode() != "monitor" )
602 { 600 {
603 if ( QMessageBox::warning( this, "Wellenreiter II", 601 if ( QMessageBox::warning( this, "Wellenreiter II",
604 tr( "Can't set interface '%1'\ninto monitor mode:\n" ).arg( iface->name() ) + strerror( errno ) + 602 tr( "Can't set interface '%1'\ninto monitor mode:\n" ).arg( iface->name() ) + strerror( errno ) +
605 tr( "\nContinue with limited functionality?" ), QMessageBox::Yes, QMessageBox::No ) == QMessageBox::No ) 603 tr( "\nContinue with limited functionality?" ), QMessageBox::Yes, QMessageBox::No ) == QMessageBox::No )
606 return; 604 return;
607 } 605 }
608 } 606 }
609 607
610 // open GPS device 608 // open GPS device
611 if ( configwindow->enableGPS->isChecked() ) 609 if ( configwindow->enableGPS->isChecked() )
612 { 610 {
613 odebug << "Wellenreiter:GPS enabled @ " << configwindow->gpsdHost->currentText() << ":" << configwindow->gpsdPort->value() << "" << oendl; 611 odebug << "Wellenreiter:GPS enabled @ " << configwindow->gpsdHost->currentText() << ":" << configwindow->gpsdPort->value() << "" << oendl;
614 gps->open( configwindow->gpsdHost->currentText(), configwindow->gpsdPort->value() ); 612 gps->open( configwindow->gpsdHost->currentText(), configwindow->gpsdPort->value() );
615 } 613 }
616 614
617 // open pcap and start sniffing 615 // open pcap and start sniffing
618 616
619 if ( configwindow->writeCaptureFile->isChecked() ) // write to a user specified capture file? 617 if ( configwindow->writeCaptureFile->isChecked() ) // write to a user specified capture file?
620 { 618 {
621 dumpname = configwindow->captureFileName->text(); 619 dumpname = configwindow->captureFileName->text();
622 if ( dumpname.isEmpty() ) dumpname = "captureFile"; 620 if ( dumpname.isEmpty() ) dumpname = "captureFile";
623 dumpname.append( '-' ); 621 dumpname.append( '-' );
624 dumpname.append( QTime::currentTime().toString().replace( QRegExp( ":" ), "-" ) ); 622 dumpname.append( QTime::currentTime().toString().replace( QRegExp( ":" ), "-" ) );
625 dumpname.append( ".wellenreiter" ); 623 dumpname.append( ".wellenreiter" );
626 } 624 }
627 625
628 if ( cardtype != DEVTYPE_FILE ) 626 if ( cardtype != DEVTYPE_FILE )
629 pcap->open( interface ); 627 pcap->open( interface );
630 else 628 else
631 pcap->openCaptureFile( interface ); 629 pcap->openCaptureFile( interface );
632 630
633 if ( configwindow->writeCaptureFile->isChecked() ) 631 if ( configwindow->writeCaptureFile->isChecked() )
634 { 632 {
635 odebug << "Wellenreiter:: dumping to " << dumpname << oendl; 633 odebug << "Wellenreiter:: dumping to " << dumpname << oendl;
636 pcap->openDumpFile( dumpname ); 634 pcap->openDumpFile( dumpname );
637 } 635 }
638 636
639 if ( !pcap->isOpen() ) 637 if ( !pcap->isOpen() )
640 { 638 {
641 QMessageBox::warning( this, "Wellenreiter II", tr( "Can't open packet capturer for\n'%1':\n" ).arg( 639 QMessageBox::warning( this, "Wellenreiter II", tr( "Can't open packet capturer for\n'%1':\n" ).arg(
642 cardtype == DEVTYPE_FILE ? (const char*) interface : iface->name() ) + QString(strerror( errno ) )); 640 cardtype == DEVTYPE_FILE ? (const char*) interface : iface->name() ) + QString(strerror( errno ) ));
643 return; 641 return;
644 } 642 }
645 643
646 // set capturer to non-blocking mode 644 // set capturer to non-blocking mode
647 pcap->setBlocking( false ); 645 pcap->setBlocking( false );
648 646
649 // start channel hopper 647 // start channel hopper
650 if ( cardtype != DEVTYPE_FILE ) 648 if ( cardtype != DEVTYPE_FILE )
651 { 649 {
652 logwindow->log( QString().sprintf( "(i) Starting channel hopper (d=%d ms)", configwindow->hopInterval->value() ) ); 650 logwindow->log( QString().sprintf( "(i) Starting channel hopper (d=%d ms)", configwindow->hopInterval->value() ) );
653 iface->setChannelHopping( configwindow->hopInterval->value() ); //use interval from config window 651 iface->setChannelHopping( configwindow->hopInterval->value() ); //use interval from config window
654 } 652 }
655 653
656 if ( cardtype != DEVTYPE_FILE ) 654 if ( cardtype != DEVTYPE_FILE )
657 { 655 {
658 // connect socket notifier and start channel hopper 656 // connect socket notifier and start channel hopper
659 connect( pcap, SIGNAL( receivedPacket(Opie::Net::OPacket*) ), this, SLOT( receivePacket(Opie::Net::OPacket*) ) ); 657 connect( pcap, SIGNAL( receivedPacket(Opie::Net::OPacket*) ), this, SLOT( receivePacket(Opie::Net::OPacket*) ) );
660 connect( iface->channelHopper(), SIGNAL( hopped(int) ), this, SLOT( channelHopped(int) ) ); 658 connect( iface->channelHopper(), SIGNAL( hopped(int) ), this, SLOT( channelHopped(int) ) );
661 } 659 }
662 else 660 else
663 { 661 {
664 // start timer for reading packets 662 // start timer for reading packets
665 startTimer( 100 ); 663 startTimer( 100 );
666 } 664 }
667 665
668 logwindow->log( "(i) Started Scanning." ); 666 logwindow->log( "(i) Started Scanning." );
669 sniffing = true; 667 sniffing = true;
670 668
671 #ifdef QWS 669 #ifdef QWS
672 if ( WellenreiterConfigWindow::instance()->disablePM->isChecked() ) 670 if ( WellenreiterConfigWindow::instance()->disablePM->isChecked() )
673 { 671 {
674 QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Disable; 672 QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Disable;
675 } 673 }
676 #else 674 #else
677 #warning FIXME: setScreenSaverMode is not operational on the X11 build 675 #warning FIXME: setScreenSaverMode is not operational on the X11 build
678 #endif 676 #endif
679 677
680 emit( startedSniffing() ); 678 emit( startedSniffing() );
681 if ( cardtype != DEVTYPE_FILE ) channelHopped( 6 ); // set title 679 if ( cardtype != DEVTYPE_FILE ) channelHopped( 6 ); // set title
682 else 680 else
683 { 681 {
684 assert( parent() ); 682 assert( parent() );
685 ( (QMainWindow*) parent() )->setCaption( tr( "Wellenreiter II - replaying capture file..." ) ); 683 ( (QMainWindow*) parent() )->setCaption( tr( "Wellenreiter II - replaying capture file..." ) );
686 } 684 }
687} 685}
688 686
689 687
690void Wellenreiter::timerEvent( QTimerEvent* ) 688void Wellenreiter::timerEvent( QTimerEvent* )
691{ 689{
692 odebug << "Wellenreiter::timerEvent()" << oendl; 690 odebug << "Wellenreiter::timerEvent()" << oendl;
693 OPacket* p = pcap->next(); 691 OPacket* p = pcap->next();
694 if ( !p ) // no more packets available 692 if ( !p ) // no more packets available
695 { 693 {
696 stopClicked(); 694 stopClicked();
697 } 695 }
698 else 696 else
699 { 697 {
700 receivePacket( p ); 698 receivePacket( p );
701 // We no longer delete packets here. Ownership of the packets is 699 // We no longer delete packets here. Ownership of the packets is
702 // transferred to the PacketView. 700 // transferred to the PacketView.
703 //delete p; 701 //delete p;
704 } 702 }
705} 703}
706 704
707 705
708void Wellenreiter::doAction( const QString& action, const QString& protocol, OPacket* /* p */ ) 706void Wellenreiter::doAction( const QString& action, const QString& protocol, OPacket* /* p */ )
709{ 707{
710 #ifdef QWS 708 #ifdef QWS
711 if ( action == "TouchSound" ) 709 if ( action == "TouchSound" )
712 ODevice::inst()->playTouchSound(); 710 ODevice::inst()->playTouchSound();
713 else if ( action == "AlarmSound" ) 711 else if ( action == "AlarmSound" )
714 ODevice::inst()->playAlarmSound(); 712 ODevice::inst()->playAlarmSound();
715 else if ( action == "KeySound" ) 713 else if ( action == "KeySound" )
716 ODevice::inst()->playKeySound(); 714 ODevice::inst()->playKeySound();
717 else if ( action == "LedOn" ) 715 else if ( action == "LedOn" )
718 ODevice::inst()->setLedState( Led_Mail, Led_On ); 716 ODevice::inst()->setLedState( Led_Mail, Led_On );
719 else if ( action == "LedOff" ) 717 else if ( action == "LedOff" )
720 ODevice::inst()->setLedState( Led_Mail, Led_Off ); 718 ODevice::inst()->setLedState( Led_Mail, Led_Off );
721 else if ( action == "LogMessage" ) 719 else if ( action == "LogMessage" )
722 logwindow->log( QString(tr("Got packet with protocol '%1'","Protocol Name" ) ).arg( protocol ) ); 720 logwindow->log( QString(tr("Got packet with protocol '%1'","Protocol Name" ) ).arg( protocol ) );
723 else if ( action == "MessageBox" ) 721 else if ( action == "MessageBox" )
724 QMessageBox::information( this, "Notification!", 722 QMessageBox::information( this, "Notification!",
725 QString(tr( "Got packet with protocol '%1'", "Protocol Name" ) ).arg( protocol ) ); 723 QString(tr( "Got packet with protocol '%1'", "Protocol Name" ) ).arg( protocol ) );
726 #else 724 #else
727 #warning Actions do not work with Qt/X11 yet 725 #warning Actions do not work with Qt/X11 yet
728 #endif 726 #endif
729} 727}
730 728
731void Wellenreiter::joinNetwork(const QString& type, const QString& essid, int channel, const QString& macaddr)
732{
733 #ifdef QWS
734 if ( !iface )
735 {
736 QMessageBox::warning( this, tr( "Can't do that!" ), tr( "No wireless\ninterface available." ) );
737 return;
738 }
739
740 if ( sniffing )
741 {
742 QMessageBox::warning( this, tr( "Can't do that!" ), tr( "Stop sniffing before\njoining a net." ) );
743 return;
744 }
745
746 odebug << "joinNetwork() with Interface " << iface->name()
747 << ": " << type << ", " << essid
748 << ", " << channel << ", " << macaddr << oendl;
749
750 QCopEnvelope msg( "QPE/Application/networksettings", "wlan(QString,QString,QString)" );
751 int count = 3;
752 odebug << "sending " << count << " messages" << oendl;
753 msg << QString("count") << QString::number(count);
754 odebug << "msg >" << iface->name() << "< Mode >" << type.latin1() << "<" << oendl;
755 msg << QString(iface->name()) << QString("Mode") << type;
756 odebug << "msg >" << iface->name() << "< essid >" << essid.latin1() << "<" << oendl;
757 msg << QString(iface->name()) << QString("ESSID") << essid;
758 odebug << "msg >" << iface->name() << "< channel >" << channel << "<" << oendl;
759 msg << QString(iface->name()) << QString("Channel") << channel;
760// odebug << "msg >" << iface->name() << "< mac >" << macaddr << "<" << oendl;
761// msg << QString(iface->name()) << QString("MacAddr") << macaddr;
762 #else
763 QMessageBox::warning( this, tr( "Can't do that!" ), tr( "Function only available on Embedded build" ) );
764 #endif
765
766}
767
768void Wellenreiter::updateStatistics() 729void Wellenreiter::updateStatistics()
769{ 730{
770 // print out statistics 731 // print out statistics
771 for( QMap<QString,int>::ConstIterator it = pcap->statistics().begin(); it != pcap->statistics().end(); ++it ) 732 for( QMap<QString,int>::ConstIterator it = pcap->statistics().begin(); it != pcap->statistics().end(); ++it )
772 statwindow->updateCounter( it.key(), it.data() ); 733 statwindow->updateCounter( it.key(), it.data() );
773} 734}
774 735
775void Wellenreiter::slotTabChanged( QWidget* wid ) 736void Wellenreiter::slotTabChanged( QWidget* wid )
776{ 737{
777 if ( wid == statwindow ) 738 if ( wid == statwindow )
778 updateStatistics(); 739 updateStatistics();
779} 740}
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.h b/noncore/net/wellenreiter/gui/wellenreiter.h
index 5ac389e..1c9633d 100644
--- a/noncore/net/wellenreiter/gui/wellenreiter.h
+++ b/noncore/net/wellenreiter/gui/wellenreiter.h
@@ -1,117 +1,115 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. 2** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved.
3** 3**
4** This file may be distributed and/or modified under the terms of the 4** This file may be distributed and/or modified under the terms of the
5** GNU General Public License version 2 as published by the Free Software 5** GNU General Public License version 2 as published by the Free Software
6** Foundation and appearing in the file LICENSE.GPL included in the 6** Foundation and appearing in the file LICENSE.GPL included in the
7** packaging of this file. 7** packaging of this file.
8** 8**
9** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 9** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
10** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 10** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
11** 11**
12**********************************************************************/ 12**********************************************************************/
13 13
14#ifndef WELLENREITER_H 14#ifndef WELLENREITER_H
15#define WELLENREITER_H 15#define WELLENREITER_H
16 16
17#include "wellenreiterbase.h" 17#include "wellenreiterbase.h"
18 18
19#ifdef QWS 19#ifdef QWS
20#include <opie2/odevice.h> 20#include <opie2/odevice.h>
21#endif 21#endif
22 22
23#include <signal.h> 23#include <signal.h>
24 24
25class QTimerEvent; 25class QTimerEvent;
26class QPixmap; 26class QPixmap;
27namespace Opie {namespace Net {class OPacket;}} 27namespace Opie {namespace Net {class OPacket;}}
28namespace Opie {namespace Net {class OWaveLanManagementPacket;}} 28namespace Opie {namespace Net {class OWaveLanManagementPacket;}}
29namespace Opie {namespace Net {class OWaveLanControlPacket;}} 29namespace Opie {namespace Net {class OWaveLanControlPacket;}}
30namespace Opie {namespace Net {class OWaveLanDataPacket;}} 30namespace Opie {namespace Net {class OWaveLanDataPacket;}}
31namespace Opie {namespace Net {class OEthernetPacket;}} 31namespace Opie {namespace Net {class OEthernetPacket;}}
32namespace Opie {namespace Net {class OARPPacket;}} 32namespace Opie {namespace Net {class OARPPacket;}}
33namespace Opie {namespace Net {class OMacAddress;}} 33namespace Opie {namespace Net {class OMacAddress;}}
34namespace Opie {namespace Net {class OIPPacket;}} 34namespace Opie {namespace Net {class OIPPacket;}}
35namespace Opie {namespace Net {class OPacket;}} 35namespace Opie {namespace Net {class OPacket;}}
36namespace Opie {namespace Net {class OWirelessNetworkInterface;}} 36namespace Opie {namespace Net {class OWirelessNetworkInterface;}}
37namespace Opie {namespace Net {class OPacketCapturer;}} 37namespace Opie {namespace Net {class OPacketCapturer;}}
38class PacketView; 38class PacketView;
39class WellenreiterConfigWindow; 39class WellenreiterConfigWindow;
40class MLogWindow; 40class MLogWindow;
41class GPS; 41class GPS;
42 42
43class Wellenreiter : public WellenreiterBase { 43class Wellenreiter : public WellenreiterBase {
44 Q_OBJECT 44 Q_OBJECT
45 45
46 public: 46 public:
47 Wellenreiter( QWidget* parent = 0 ); 47 Wellenreiter( QWidget* parent = 0 );
48 ~Wellenreiter(); 48 ~Wellenreiter();
49 49
50 void setConfigWindow( WellenreiterConfigWindow* cw ); 50 void setConfigWindow( WellenreiterConfigWindow* cw );
51 MScanListView* netView() const { return netview; }; 51 MScanListView* netView() const { return netview; };
52 MLogWindow* logWindow() const { return logwindow; }; 52 MLogWindow* logWindow() const { return logwindow; };
53 PacketView* hexWindow() const { return hexwindow; }; 53 PacketView* hexWindow() const { return hexwindow; };
54 bool isDaemonRunning() const { return sniffing; }; 54 bool isDaemonRunning() const { return sniffing; };
55 QString captureFileName() const { return dumpname; }; 55 QString captureFileName() const { return dumpname; };
56 56
57 public: 57 public:
58 QString dumpname; 58 QString dumpname;
59 bool sniffing; 59 bool sniffing;
60 static Wellenreiter* instance; 60 static Wellenreiter* instance;
61 static void signalHandler( int sig ); 61 static void signalHandler( int sig );
62 62
63 protected: 63 protected:
64 virtual void timerEvent( QTimerEvent* ); 64 virtual void timerEvent( QTimerEvent* );
65 65
66 public slots: 66 public slots:
67 void initialTimer(); 67 void initialTimer();
68 68
69 void channelHopped(int); 69 void channelHopped(int);
70 void receivePacket(Opie::Net::OPacket*); 70 void receivePacket(Opie::Net::OPacket*);
71 void startClicked(); 71 void startClicked();
72 void stopClicked(); 72 void stopClicked();
73 73
74 void joinNetwork(const QString&,const QString&,int,const QString&);
75
76 signals: 74 signals:
77 void startedSniffing(); 75 void startedSniffing();
78 void stoppedSniffing(); 76 void stoppedSniffing();
79 77
80 private: 78 private:
81 void handleManagementFrame( Opie::Net::OPacket* p, Opie::Net::OWaveLanManagementPacket* ); 79 void handleManagementFrame( Opie::Net::OPacket* p, Opie::Net::OWaveLanManagementPacket* );
82 void handleManagementFrameBeacon( Opie::Net::OPacket* p, Opie::Net::OWaveLanManagementPacket* ); 80 void handleManagementFrameBeacon( Opie::Net::OPacket* p, Opie::Net::OWaveLanManagementPacket* );
83 void handleManagementFrameProbeRequest( Opie::Net::OPacket* p, Opie::Net::OWaveLanManagementPacket* ); 81 void handleManagementFrameProbeRequest( Opie::Net::OPacket* p, Opie::Net::OWaveLanManagementPacket* );
84 void handleManagementFrameProbeResponse( Opie::Net::OPacket* p, Opie::Net::OWaveLanManagementPacket* ); 82 void handleManagementFrameProbeResponse( Opie::Net::OPacket* p, Opie::Net::OWaveLanManagementPacket* );
85 void handleControlFrame( Opie::Net::OPacket* p, Opie::Net::OWaveLanControlPacket* control ); 83 void handleControlFrame( Opie::Net::OPacket* p, Opie::Net::OWaveLanControlPacket* control );
86 void handleWlanData( Opie::Net::OPacket* p, Opie::Net::OWaveLanDataPacket* data, Opie::Net::OMacAddress& from, Opie::Net::OMacAddress& to ); 84 void handleWlanData( Opie::Net::OPacket* p, Opie::Net::OWaveLanDataPacket* data, Opie::Net::OMacAddress& from, Opie::Net::OMacAddress& to );
87 void handleEthernetData( Opie::Net::OPacket* p, Opie::Net::OEthernetPacket* data, Opie::Net::OMacAddress& from, Opie::Net::OMacAddress& to ); 85 void handleEthernetData( Opie::Net::OPacket* p, Opie::Net::OEthernetPacket* data, Opie::Net::OMacAddress& from, Opie::Net::OMacAddress& to );
88 void handleARPData( Opie::Net::OPacket* p, Opie::Net::OARPPacket* arp, Opie::Net::OMacAddress& from, Opie::Net::OMacAddress& to ); 86 void handleARPData( Opie::Net::OPacket* p, Opie::Net::OARPPacket* arp, Opie::Net::OMacAddress& from, Opie::Net::OMacAddress& to );
89 void handleIPData( Opie::Net::OPacket* p, Opie::Net::OIPPacket* ip, Opie::Net::OMacAddress& from, Opie::Net::OMacAddress& to ); 87 void handleIPData( Opie::Net::OPacket* p, Opie::Net::OIPPacket* ip, Opie::Net::OMacAddress& from, Opie::Net::OMacAddress& to );
90 void handleNotification( Opie::Net::OPacket* p ); 88 void handleNotification( Opie::Net::OPacket* p );
91 void doAction( const QString& action, const QString& protocol, Opie::Net::OPacket* p ); 89 void doAction( const QString& action, const QString& protocol, Opie::Net::OPacket* p );
92 QObject* childIfToParse( Opie::Net::OPacket* p, const QString& protocol ); 90 QObject* childIfToParse( Opie::Net::OPacket* p, const QString& protocol );
93 bool checkDumpPacket( Opie::Net::OPacket* p ); 91 bool checkDumpPacket( Opie::Net::OPacket* p );
94 void registerSignalHandler(); 92 void registerSignalHandler();
95 93
96 private slots: 94 private slots:
97 void slotTabChanged( QWidget* ); 95 void slotTabChanged( QWidget* );
98 96
99 private: 97 private:
100 void updateStatistics(); 98 void updateStatistics();
101 99
102 #ifdef QWS 100 #ifdef QWS
103 Opie::Core::OSystem _system; // Opie Operating System identifier 101 Opie::Core::OSystem _system; // Opie Operating System identifier
104 #endif 102 #endif
105 103
106 Opie::Net::OWirelessNetworkInterface* iface; 104 Opie::Net::OWirelessNetworkInterface* iface;
107 Opie::Net::OPacketCapturer* pcap; 105 Opie::Net::OPacketCapturer* pcap;
108 WellenreiterConfigWindow* configwindow; 106 WellenreiterConfigWindow* configwindow;
109 GPS* gps; 107 GPS* gps;
110 108
111 //void readConfig(); 109 //void readConfig();
112 //void writeConfig(); 110 //void writeConfig();
113}; 111};
114 112
115 113
116 114
117#endif 115#endif
diff --git a/noncore/net/wellenreiter/wellenreiter.pro b/noncore/net/wellenreiter/wellenreiter.pro
index e995db9..673868f 100644
--- a/noncore/net/wellenreiter/wellenreiter.pro
+++ b/noncore/net/wellenreiter/wellenreiter.pro
@@ -1,15 +1,15 @@
1TEMPLATE = subdirs 1TEMPLATE = subdirs
2VERSION = 1.0.3-cvs 2VERSION = 1.0.5-cvs
3 3
4!contains( platform, x11 ) { 4!contains( platform, x11 ) {
5 message( Configuring Wellenreiter for build on Opie ) 5 message( Configuring Wellenreiter for build on Opie )
6 SUBDIRS = gui 6 SUBDIRS = gui
7 include( $(OPIEDIR)/include.pro ) 7 include( $(OPIEDIR)/include.pro )
8} 8}
9 9
10contains( platform, x11 ) { 10contains( platform, x11 ) {
11 message( Configuring Wellenreiter for build on Qt/X11 ) 11 message( Configuring Wellenreiter for build on Qt/X11 )
12 SUBDIRS = lib gui 12 SUBDIRS = lib gui
13 system( mkdir -p $OPIEDIR/lib $OPIEDIR/bin $OPIEDIR/share/pics ) 13 system( mkdir -p $OPIEDIR/lib $OPIEDIR/bin $OPIEDIR/share/pics )
14} 14}
15 15