-rw-r--r-- | libopie2/opienet/dhcp.h | 3 | ||||
-rw-r--r-- | libopie2/opienet/libopienet2.control | 4 | ||||
-rw-r--r-- | libopie2/opienet/odebugmapper.cpp | 8 | ||||
-rw-r--r-- | libopie2/opienet/omanufacturerdb.cpp | 67 | ||||
-rw-r--r-- | libopie2/opienet/omanufacturerdb.h | 43 | ||||
-rw-r--r-- | libopie2/opienet/onetutils.cpp | 2 | ||||
-rw-r--r-- | libopie2/opienet/onetwork.cpp | 6 | ||||
-rw-r--r-- | libopie2/opienet/onetwork.h | 5 | ||||
-rw-r--r-- | libopie2/opienet/opcap.cpp | 5 | ||||
-rw-r--r-- | libopie2/opienet/opcap.h | 5 | ||||
-rw-r--r-- | libopie2/opienet/opienet.pro | 2 | ||||
-rw-r--r-- | libopie2/opienet/ostation.cpp | 3 | ||||
-rw-r--r-- | libopie2/opienet/ostation.h | 3 | ||||
-rw-r--r-- | libopie2/opienet/udp_ports.h | 2 |
14 files changed, 88 insertions, 70 deletions
diff --git a/libopie2/opienet/dhcp.h b/libopie2/opienet/dhcp.h index 3f2f775..368e375 100644 --- a/libopie2/opienet/dhcp.h +++ b/libopie2/opienet/dhcp.h | |||
@@ -168,33 +168,34 @@ struct dhcp_packet { | |||
168 | immediately and shamelessly break this, so don't count on it | 168 | immediately and shamelessly break this, so don't count on it |
169 | continuing to work. */ | 169 | continuing to work. */ |
170 | #define DHO_AUTHENTICATE 210 | 170 | #define DHO_AUTHENTICATE 210 |
171 | 171 | ||
172 | #define DHO_END 255 | 172 | #define DHO_END 255 |
173 | 173 | ||
174 | /* DHCP message types. */ | 174 | /* DHCP message types. */ |
175 | #define DHCPDISCOVER1 | 175 | #define DHCPDISCOVER1 |
176 | #define DHCPOFFER2 | 176 | #define DHCPOFFER2 |
177 | #define DHCPREQUEST3 | 177 | #define DHCPREQUEST3 |
178 | #define DHCPDECLINE4 | 178 | #define DHCPDECLINE4 |
179 | #define DHCPACK 5 | 179 | #define DHCPACK 5 |
180 | #define DHCPNAK 6 | 180 | #define DHCPNAK 6 |
181 | #define DHCPRELEASE7 | 181 | #define DHCPRELEASE7 |
182 | #define DHCPINFORM8 | 182 | #define DHCPINFORM8 |
183 | 183 | ||
184 | /* Relay Agent Information option subtypes: */ | 184 | /* Relay Agent Information option subtypes: */ |
185 | #define RAI_CIRCUIT_ID1 | 185 | #define RAI_CIRCUIT_ID1 |
186 | #define RAI_REMOTE_ID2 | 186 | #define RAI_REMOTE_ID2 |
187 | #define RAI_AGENT_ID3 | 187 | #define RAI_AGENT_ID3 |
188 | 188 | ||
189 | /* FQDN suboptions: */ | 189 | /* FQDN suboptions: */ |
190 | #define FQDN_NO_CLIENT_UPDATE 1 | 190 | #define FQDN_NO_CLIENT_UPDATE 1 |
191 | #define FQDN_SERVER_UPDATE 2 | 191 | #define FQDN_SERVER_UPDATE 2 |
192 | #define FQDN_ENCODED 3 | 192 | #define FQDN_ENCODED 3 |
193 | #define FQDN_RCODE1 4 | 193 | #define FQDN_RCODE1 4 |
194 | #define FQDN_RCODE2 5 | 194 | #define FQDN_RCODE2 5 |
195 | #define FQDN_HOSTNAME 6 | 195 | #define FQDN_HOSTNAME 6 |
196 | #define FQDN_DOMAINNAME 7 | 196 | #define FQDN_DOMAINNAME 7 |
197 | #define FQDN_FQDN 8 | 197 | #define FQDN_FQDN 8 |
198 | #define FQDN_SUBOPTION_COUNT 8 | 198 | #define FQDN_SUBOPTION_COUNT 8 |
199 | 199 | ||
200 | #endif \ No newline at end of file | 200 | #endif |
201 | |||
diff --git a/libopie2/opienet/libopienet2.control b/libopie2/opienet/libopienet2.control index 65d8464..8eb0704 100644 --- a/libopie2/opienet/libopienet2.control +++ b/libopie2/opienet/libopienet2.control | |||
@@ -1,11 +1,11 @@ | |||
1 | Package: libopienet2 | 1 | Package: libopienet2 |
2 | Files: $OPIEDIR/lib/libopienet2.so.* $OPIEDIR/etc/manufacturers | 2 | Files: $OPIEDIR/lib/libopienet2.so.* $OPIEDIR/etc/manufacturers |
3 | Priority: optional | 3 | Priority: optional |
4 | Section: opie/system | 4 | Section: opie/system |
5 | Maintainer: Opie Team <opie@handhelds.org> | 5 | Maintainer: Opie Team <opie@handhelds.org> |
6 | Architecture: arm | 6 | Architecture: arm |
7 | Version: 1.8.1-$SUB_VERSION.2 | 7 | Version: 1.8.2-$SUB_VERSION.2 |
8 | Depends: libqpe1, libopiecore2 (1.8.1) | 8 | Depends: libopiecore2 (1.8.2) |
9 | Provides: libopienet2 | 9 | Provides: libopienet2 |
10 | Description: Opie library 2.0 NET | 10 | Description: Opie library 2.0 NET |
11 | 11 | ||
diff --git a/libopie2/opienet/odebugmapper.cpp b/libopie2/opienet/odebugmapper.cpp index d62b3ba..7e4ab2b 100644 --- a/libopie2/opienet/odebugmapper.cpp +++ b/libopie2/opienet/odebugmapper.cpp | |||
@@ -1,42 +1,44 @@ | |||
1 | 1 | ||
2 | /* | 2 | /* |
3 | * debug value mapper - generated by regen.py - (C) Michael 'Mickey' Lauer <mickey@vanille.de> | 3 | * debug value mapper - generated by regen.py - (C) Michael 'Mickey' Lauer <mickey@vanille.de> |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #include <opie2/odebug.h> | ||
7 | |||
6 | #include "odebugmapper.h" | 8 | #include "odebugmapper.h" |
7 | 9 | ||
8 | DebugMapper::DebugMapper() | 10 | DebugMapper::DebugMapper() |
9 | { | 11 | { |
10 | qDebug( "DebugMapper::DebugMapper()" ); | 12 | odebug << "DebugMapper::DebugMapper()" << oendl; |
11 | 13 | ||
12 | 14 | ||
13 | _map.insert( 0x8902, new QString("SIOCSPGRP") ); | 15 | _map.insert( 0x8902, new QString("SIOCSPGRP") ); |
14 | _map.insert( 0x8904, new QString("SIOCGPGRP") ); | 16 | _map.insert( 0x8904, new QString("SIOCGPGRP") ); |
15 | _map.insert( 0x8905, new QString("SIOCATMARK") ); | 17 | _map.insert( 0x8905, new QString("SIOCATMARK") ); |
16 | _map.insert( 0x8906, new QString("SIOCGSTAMP") ); | 18 | _map.insert( 0x8906, new QString("SIOCGSTAMP") ); |
17 | _map.insert( 0x890B, new QString("SIOCADDRT") ); | 19 | _map.insert( 0x890B, new QString("SIOCADDRT") ); |
18 | _map.insert( 0x890C, new QString("SIOCDELRT") ); | 20 | _map.insert( 0x890C, new QString("SIOCDELRT") ); |
19 | _map.insert( 0x890D, new QString("SIOCRTMSG") ); | 21 | _map.insert( 0x890D, new QString("SIOCRTMSG") ); |
20 | _map.insert( 0x8910, new QString("SIOCGIFNAME") ); | 22 | _map.insert( 0x8910, new QString("SIOCGIFNAME") ); |
21 | _map.insert( 0x8911, new QString("SIOCSIFLINK") ); | 23 | _map.insert( 0x8911, new QString("SIOCSIFLINK") ); |
22 | _map.insert( 0x8912, new QString("SIOCGIFCONF") ); | 24 | _map.insert( 0x8912, new QString("SIOCGIFCONF") ); |
23 | _map.insert( 0x8913, new QString("SIOCGIFFLAGS") ); | 25 | _map.insert( 0x8913, new QString("SIOCGIFFLAGS") ); |
24 | _map.insert( 0x8914, new QString("SIOCSIFFLAGS") ); | 26 | _map.insert( 0x8914, new QString("SIOCSIFFLAGS") ); |
25 | _map.insert( 0x8915, new QString("SIOCGIFADDR") ); | 27 | _map.insert( 0x8915, new QString("SIOCGIFADDR") ); |
26 | _map.insert( 0x8916, new QString("SIOCSIFADDR") ); | 28 | _map.insert( 0x8916, new QString("SIOCSIFADDR") ); |
27 | _map.insert( 0x8917, new QString("SIOCGIFDSTADDR") ); | 29 | _map.insert( 0x8917, new QString("SIOCGIFDSTADDR") ); |
28 | _map.insert( 0x8918, new QString("SIOCSIFDSTADDR") ); | 30 | _map.insert( 0x8918, new QString("SIOCSIFDSTADDR") ); |
29 | _map.insert( 0x8919, new QString("SIOCGIFBRDADDR") ); | 31 | _map.insert( 0x8919, new QString("SIOCGIFBRDADDR") ); |
30 | _map.insert( 0x891a, new QString("SIOCSIFBRDADDR") ); | 32 | _map.insert( 0x891a, new QString("SIOCSIFBRDADDR") ); |
31 | _map.insert( 0x891b, new QString("SIOCGIFNETMASK") ); | 33 | _map.insert( 0x891b, new QString("SIOCGIFNETMASK") ); |
32 | _map.insert( 0x891c, new QString("SIOCSIFNETMASK") ); | 34 | _map.insert( 0x891c, new QString("SIOCSIFNETMASK") ); |
33 | _map.insert( 0x891d, new QString("SIOCGIFMETRIC") ); | 35 | _map.insert( 0x891d, new QString("SIOCGIFMETRIC") ); |
34 | _map.insert( 0x891e, new QString("SIOCSIFMETRIC") ); | 36 | _map.insert( 0x891e, new QString("SIOCSIFMETRIC") ); |
35 | _map.insert( 0x891f, new QString("SIOCGIFMEM") ); | 37 | _map.insert( 0x891f, new QString("SIOCGIFMEM") ); |
36 | _map.insert( 0x8920, new QString("SIOCSIFMEM") ); | 38 | _map.insert( 0x8920, new QString("SIOCSIFMEM") ); |
37 | _map.insert( 0x8921, new QString("SIOCGIFMTU") ); | 39 | _map.insert( 0x8921, new QString("SIOCGIFMTU") ); |
38 | _map.insert( 0x8922, new QString("SIOCSIFMTU") ); | 40 | _map.insert( 0x8922, new QString("SIOCSIFMTU") ); |
39 | _map.insert( 0x8923, new QString("SIOCSIFNAME") ); | 41 | _map.insert( 0x8923, new QString("SIOCSIFNAME") ); |
40 | _map.insert( 0x8924, new QString("SIOCSIFHWADDR") ); | 42 | _map.insert( 0x8924, new QString("SIOCSIFHWADDR") ); |
41 | _map.insert( 0x8925, new QString("SIOCGIFENCAP") ); | 43 | _map.insert( 0x8925, new QString("SIOCGIFENCAP") ); |
42 | _map.insert( 0x8926, new QString("SIOCSIFENCAP") ); | 44 | _map.insert( 0x8926, new QString("SIOCSIFENCAP") ); |
@@ -162,52 +164,52 @@ DebugMapper::DebugMapper() | |||
162 | _map.insert( 0x8945, new QString("SIOCSIFDIVERT") ); | 164 | _map.insert( 0x8945, new QString("SIOCSIFDIVERT") ); |
163 | _map.insert( 0x8946, new QString("SIOCETHTOOL") ); | 165 | _map.insert( 0x8946, new QString("SIOCETHTOOL") ); |
164 | _map.insert( 0x8947, new QString("SIOCGMIIPHY") ); | 166 | _map.insert( 0x8947, new QString("SIOCGMIIPHY") ); |
165 | _map.insert( 0x8948, new QString("SIOCGMIIREG") ); | 167 | _map.insert( 0x8948, new QString("SIOCGMIIREG") ); |
166 | _map.insert( 0x8949, new QString("SIOCSMIIREG") ); | 168 | _map.insert( 0x8949, new QString("SIOCSMIIREG") ); |
167 | _map.insert( 0x894A, new QString("SIOCWANDEV") ); | 169 | _map.insert( 0x894A, new QString("SIOCWANDEV") ); |
168 | _map.insert( 0x8953, new QString("SIOCDARP") ); | 170 | _map.insert( 0x8953, new QString("SIOCDARP") ); |
169 | _map.insert( 0x8954, new QString("SIOCGARP") ); | 171 | _map.insert( 0x8954, new QString("SIOCGARP") ); |
170 | _map.insert( 0x8955, new QString("SIOCSARP") ); | 172 | _map.insert( 0x8955, new QString("SIOCSARP") ); |
171 | _map.insert( 0x8960, new QString("SIOCDRARP") ); | 173 | _map.insert( 0x8960, new QString("SIOCDRARP") ); |
172 | _map.insert( 0x8961, new QString("SIOCGRARP") ); | 174 | _map.insert( 0x8961, new QString("SIOCGRARP") ); |
173 | _map.insert( 0x8962, new QString("SIOCSRARP") ); | 175 | _map.insert( 0x8962, new QString("SIOCSRARP") ); |
174 | _map.insert( 0x8970, new QString("SIOCGIFMAP") ); | 176 | _map.insert( 0x8970, new QString("SIOCGIFMAP") ); |
175 | _map.insert( 0x8971, new QString("SIOCSIFMAP") ); | 177 | _map.insert( 0x8971, new QString("SIOCSIFMAP") ); |
176 | _map.insert( 0x8980, new QString("SIOCADDDLCI") ); | 178 | _map.insert( 0x8980, new QString("SIOCADDDLCI") ); |
177 | _map.insert( 0x8981, new QString("SIOCDELDLCI") ); | 179 | _map.insert( 0x8981, new QString("SIOCDELDLCI") ); |
178 | _map.insert( 0x8982, new QString("SIOCGIFVLAN") ); | 180 | _map.insert( 0x8982, new QString("SIOCGIFVLAN") ); |
179 | _map.insert( 0x8983, new QString("SIOCSIFVLAN") ); | 181 | _map.insert( 0x8983, new QString("SIOCSIFVLAN") ); |
180 | _map.insert( 0x8990, new QString("SIOCBONDENSLAVE") ); | 182 | _map.insert( 0x8990, new QString("SIOCBONDENSLAVE") ); |
181 | _map.insert( 0x8991, new QString("SIOCBONDRELEASE") ); | 183 | _map.insert( 0x8991, new QString("SIOCBONDRELEASE") ); |
182 | _map.insert( 0x8992, new QString("SIOCBONDSETHWADDR") ); | 184 | _map.insert( 0x8992, new QString("SIOCBONDSETHWADDR") ); |
183 | _map.insert( 0x8993, new QString("SIOCBONDSLAVEINFOQUERY") ); | 185 | _map.insert( 0x8993, new QString("SIOCBONDSLAVEINFOQUERY") ); |
184 | _map.insert( 0x8994, new QString("SIOCBONDINFOQUERY") ); | 186 | _map.insert( 0x8994, new QString("SIOCBONDINFOQUERY") ); |
185 | _map.insert( 0x8995, new QString("SIOCBONDCHANGEACTIVE") ); | 187 | _map.insert( 0x8995, new QString("SIOCBONDCHANGEACTIVE") ); |
186 | _map.insert( 0x89F0, new QString("SIOCDEVPRIVATE") ); | 188 | _map.insert( 0x89F0, new QString("SIOCDEVPRIVATE") ); |
187 | _map.insert( 0x89E0, new QString("SIOCPROTOPRIVATE") ); | 189 | _map.insert( 0x89E0, new QString("SIOCPROTOPRIVATE") ); |
188 | 190 | ||
189 | }; | 191 | }; |
190 | 192 | ||
191 | 193 | ||
192 | DebugMapper::~DebugMapper() | 194 | DebugMapper::~DebugMapper() |
193 | { | 195 | { |
194 | qDebug( "DebugMapper::~DebugMapper()" ); | 196 | odebug << "DebugMapper::~DebugMapper()" << oendl; |
195 | } | 197 | } |
196 | 198 | ||
197 | 199 | ||
198 | const QString& DebugMapper::map( int value ) const | 200 | const QString& DebugMapper::map( int value ) const |
199 | { | 201 | { |
200 | QString* result = _map[ value ]; | 202 | QString* result = _map[ value ]; |
201 | 203 | ||
202 | if ( !result ) | 204 | if ( !result ) |
203 | { | 205 | { |
204 | qDebug( "DebugMapper::map() - value not found." ); | 206 | owarn << "DebugMapper::map() - value " << value << " is not found." << oendl; |
205 | return QString::null; | 207 | return QString::null; |
206 | } | 208 | } |
207 | else | 209 | else |
208 | { | 210 | { |
209 | return *result; | 211 | return *result; |
210 | } | 212 | } |
211 | } | 213 | } |
212 | 214 | ||
213 | 215 | ||
diff --git a/libopie2/opienet/omanufacturerdb.cpp b/libopie2/opienet/omanufacturerdb.cpp index c3c213c..bcce11f 100644 --- a/libopie2/opienet/omanufacturerdb.cpp +++ b/libopie2/opienet/omanufacturerdb.cpp | |||
@@ -1,118 +1,131 @@ | |||
1 | /********************************************************************** | 1 | /* |
2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. | 2 | This file is part of the Opie Project |
3 | ** | 3 | (C) 2003 Michael 'Mickey' Lauer <mickey@Vanille.de> |
4 | ** This file is part of Opie Environment. | 4 | =. |
5 | ** | 5 | .=l. |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | .>+-= |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | _;:, .> :=|. This program is free software; you can |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | .> <`_, > . <= redistribute it and/or modify it under |
9 | ** packaging of this file. | 9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
10 | ** | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ._= =} : or (at your option) any later version. |
13 | ** | 13 | .%`+i> _;_. |
14 | **********************************************************************/ | 14 | .i_,=:_. -<s. This program is distributed in the hope that |
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
16 | : .. .:, . . . without even the implied warranty of | ||
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | ||
19 | ..}^=.= = ; Library General Public License for more | ||
20 | ++= -. .` .: details. | ||
21 | : = ...= . :.=- | ||
22 | -. .:....=;==+<; You should have received a copy of the GNU | ||
23 | -_. . . )=. = Library General Public License along with | ||
24 | -- :-=` this library; see the file COPYING.LIB. | ||
25 | If not, write to the Free Software Foundation, | ||
26 | Inc., 59 Temple Place - Suite 330, | ||
27 | Boston, MA 02111-1307, USA. | ||
28 | |||
29 | */ | ||
15 | 30 | ||
16 | #include "omanufacturerdb.h" | 31 | #include "omanufacturerdb.h" |
17 | 32 | ||
33 | /* OPIE CORE */ | ||
34 | #include <opie2/odebug.h> | ||
35 | |||
18 | /* QT */ | 36 | /* QT */ |
19 | #include <qstring.h> | 37 | #include <qstring.h> |
20 | #include <qfile.h> | 38 | #include <qfile.h> |
21 | #include <qtextstream.h> | 39 | #include <qtextstream.h> |
22 | 40 | ||
23 | OManufacturerDB* OManufacturerDB::_instance = 0; | 41 | OManufacturerDB* OManufacturerDB::_instance = 0; |
24 | 42 | ||
25 | OManufacturerDB* OManufacturerDB::instance() | 43 | OManufacturerDB* OManufacturerDB::instance() |
26 | { | 44 | { |
27 | if ( !OManufacturerDB::_instance ) | 45 | if ( !OManufacturerDB::_instance ) |
28 | { | 46 | { |
29 | qDebug( "OManufacturerDB::instance(): creating OManufacturerDB..." ); | 47 | odebug << "OManufacturerDB::instance(): creating OManufacturerDB..." << oendl; |
30 | _instance = new OManufacturerDB(); | 48 | _instance = new OManufacturerDB(); |
31 | } | 49 | } |
32 | return _instance; | 50 | return _instance; |
33 | } | 51 | } |
34 | 52 | ||
35 | 53 | ||
36 | OManufacturerDB::OManufacturerDB() | 54 | OManufacturerDB::OManufacturerDB() |
37 | { | 55 | { |
38 | QString filename( "/etc/manufacturers" ); | 56 | QString filename( "/etc/manufacturers" ); |
39 | qDebug( "OManufacturerDB: trying to read '%s'...", (const char*) filename ); | 57 | odebug << "OManufacturerDB: trying to read " << filename << oendl; |
40 | if ( !QFile::exists( filename ) ) | 58 | if ( !QFile::exists( filename ) ) |
41 | { | 59 | { |
42 | filename = "/opt/QtPalmtop/etc/manufacturers"; | 60 | filename = "/opt/QtPalmtop/etc/manufacturers"; |
43 | qDebug( "OManufacturerDB: trying to read '%s'...", (const char*) filename ); | 61 | odebug << "OManufacturerDB: trying to read " << filename << oendl; |
44 | if ( !QFile::exists( filename ) ) | 62 | if ( !QFile::exists( filename ) ) |
45 | { | 63 | { |
46 | filename = "/usr/share/wellenreiter/manufacturers"; | 64 | filename = "/usr/share/wellenreiter/manufacturers"; |
47 | qDebug( "OManufacturerDB: trying to read '%s'...", (const char*) filename ); | 65 | odebug << "OManufacturerDB: trying to read " << filename << oendl; |
48 | } | 66 | } |
49 | } | 67 | } |
50 | 68 | ||
51 | QFile file( filename ); | 69 | QFile file( filename ); |
52 | bool hasFile = file.open( IO_ReadOnly ); | 70 | bool hasFile = file.open( IO_ReadOnly ); |
53 | if (!hasFile) | 71 | if (!hasFile) |
54 | { | 72 | { |
55 | qWarning( "OManufacturerDB: no valid manufacturer list found.", (const char*) filename ); | 73 | owarn << "OManufacturerDB: no valid manufacturer list found." << oendl; |
56 | } | 74 | } |
57 | else | 75 | else |
58 | { | 76 | { |
59 | qDebug( "OManufacturerDB: found manufacturer list in '%s'...", (const char*) filename ); | 77 | odebug << "OManufacturerDB: found manufacturer list in " << filename << oendl; |
60 | QTextStream s( &file ); | 78 | QTextStream s( &file ); |
61 | QString addr; | 79 | QString addr; |
62 | QString manu; | 80 | QString manu; |
63 | QString extManu; | 81 | QString extManu; |
64 | while (!s.atEnd()) | 82 | while (!s.atEnd()) |
65 | { | 83 | { |
66 | s >> addr; | 84 | s >> addr; |
67 | if ( !addr ) // read nothing!? | 85 | if ( !addr ) // read nothing!? |
68 | { | 86 | { |
69 | continue; | 87 | continue; |
70 | } | 88 | } |
71 | else | 89 | else |
72 | if ( addr[0] == '#' ) | 90 | if ( addr[0] == '#' ) |
73 | { | 91 | { |
74 | continue; | 92 | continue; |
75 | } | 93 | } |
76 | s.skipWhiteSpace(); | 94 | s.skipWhiteSpace(); |
77 | s >> manu; | 95 | s >> manu; |
78 | s.skipWhiteSpace(); | 96 | s.skipWhiteSpace(); |
79 | s >> extManu; | 97 | s >> extManu; |
80 | if ( extManu[0] == '#' ) // we have an extended manufacturer | 98 | if ( extManu[0] == '#' ) // we have an extended manufacturer |
81 | { | 99 | { |
82 | s.skipWhiteSpace(); | 100 | s.skipWhiteSpace(); |
83 | extManu = s.readLine(); | 101 | extManu = s.readLine(); |
84 | #ifdef DEBUG | 102 | odebug << "OManufacturerDB: read " << extManu << " as extended manufacturer string" << oendl; |
85 | qDebug( "OManufacturerDB: read '%s' as extended manufacturer string", (const char*) extManu ); | ||
86 | #endif | ||
87 | manufacturersExt.insert( addr, extManu ); | 103 | manufacturersExt.insert( addr, extManu ); |
88 | } | 104 | } |
89 | else | 105 | else |
90 | s.readLine(); | 106 | s.readLine(); |
91 | #ifdef DEBUG | 107 | odebug << "OManufacturerDB: read tuple " << addr << ", " << manu << oendl; |
92 | qDebug( "ManufacturerDB: read tuple %s, %s", (const char*) addr, (const char*) manu ); | ||
93 | #endif | ||
94 | manufacturers.insert( addr, manu ); | 108 | manufacturers.insert( addr, manu ); |
95 | |||
96 | } | 109 | } |
97 | } | 110 | } |
98 | 111 | ||
99 | } | 112 | } |
100 | 113 | ||
101 | 114 | ||
102 | OManufacturerDB::~OManufacturerDB() | 115 | OManufacturerDB::~OManufacturerDB() |
103 | { | 116 | { |
104 | } | 117 | } |
105 | 118 | ||
106 | 119 | ||
107 | const QString& OManufacturerDB::lookup( const QString& macaddr ) const | 120 | const QString& OManufacturerDB::lookup( const QString& macaddr ) const |
108 | { | 121 | { |
109 | return manufacturers[macaddr.upper().left(8)]; | 122 | return manufacturers[macaddr.upper().left(8)]; |
110 | } | 123 | } |
111 | 124 | ||
112 | 125 | ||
113 | const QString& OManufacturerDB::lookupExt( const QString& macaddr ) const | 126 | const QString& OManufacturerDB::lookupExt( const QString& macaddr ) const |
114 | { | 127 | { |
115 | QMap<QString,QString>::ConstIterator it = manufacturersExt.find( macaddr.upper().left(8) ); | 128 | QMap<QString,QString>::ConstIterator it = manufacturersExt.find( macaddr.upper().left(8) ); |
116 | return it == manufacturersExt.end() ? lookup( macaddr ) : *it; | 129 | return it == manufacturersExt.end() ? lookup( macaddr ) : *it; |
117 | } | 130 | } |
118 | 131 | ||
diff --git a/libopie2/opienet/omanufacturerdb.h b/libopie2/opienet/omanufacturerdb.h index 651f624..c2712e5 100644 --- a/libopie2/opienet/omanufacturerdb.h +++ b/libopie2/opienet/omanufacturerdb.h | |||
@@ -1,46 +1,61 @@ | |||
1 | /********************************************************************** | 1 | /* |
2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. | 2 | This file is part of the Opie Project |
3 | ** | 3 | (C) 2003 Michael 'Mickey' Lauer <mickey@Vanille.de> |
4 | ** This file is part of Opie Environment. | 4 | =. |
5 | ** | 5 | .=l. |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | .>+-= |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | _;:, .> :=|. This program is free software; you can |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | .> <`_, > . <= redistribute it and/or modify it under |
9 | ** packaging of this file. | 9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
10 | ** | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ._= =} : or (at your option) any later version. |
13 | ** | 13 | .%`+i> _;_. |
14 | **********************************************************************/ | 14 | .i_,=:_. -<s. This program is distributed in the hope that |
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
16 | : .. .:, . . . without even the implied warranty of | ||
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | ||
19 | ..}^=.= = ; Library General Public License for more | ||
20 | ++= -. .` .: details. | ||
21 | : = ...= . :.=- | ||
22 | -. .:....=;==+<; You should have received a copy of the GNU | ||
23 | -_. . . )=. = Library General Public License along with | ||
24 | -- :-=` this library; see the file COPYING.LIB. | ||
25 | If not, write to the Free Software Foundation, | ||
26 | Inc., 59 Temple Place - Suite 330, | ||
27 | Boston, MA 02111-1307, USA. | ||
28 | |||
29 | */ | ||
15 | 30 | ||
16 | #ifndef OMANUFACTURERDB_H | 31 | #ifndef OMANUFACTURERDB_H |
17 | #define OMANUFACTURERDB_H | 32 | #define OMANUFACTURERDB_H |
18 | 33 | ||
19 | #include <qmap.h> | 34 | #include <qmap.h> |
20 | 35 | ||
21 | /** | 36 | /** |
22 | * @brief A Ethernet card vendor database. | 37 | * @brief A Ethernet card vendor database. |
23 | * | 38 | * |
24 | * This class encapsulates the lookup of Ethernet vendor given a | 39 | * This class encapsulates the lookup of Ethernet vendor given a |
25 | * certain Mac Address. Only the first three bytes define the vendor. | 40 | * certain Mac Address. Only the first three bytes define the vendor. |
26 | */ | 41 | */ |
27 | class OManufacturerDB | 42 | class OManufacturerDB |
28 | { | 43 | { |
29 | public: | 44 | public: |
30 | /** | 45 | /** |
31 | * @returns the one-and-only @ref OManufacturerDB instance. | 46 | * @returns the one-and-only @ref OManufacturerDB instance. |
32 | */ | 47 | */ |
33 | static OManufacturerDB* instance(); | 48 | static OManufacturerDB* instance(); |
34 | /** | 49 | /** |
35 | * @returns the short manufacturer string given a @a macaddr. | 50 | * @returns the short manufacturer string given a @a macaddr. |
36 | */ | 51 | */ |
37 | const QString& lookup( const QString& macaddr ) const; | 52 | const QString& lookup( const QString& macaddr ) const; |
38 | /** | 53 | /** |
39 | * @returns the enhanced manufacturer string given a @a macaddr. | 54 | * @returns the enhanced manufacturer string given a @a macaddr. |
40 | */ | 55 | */ |
41 | const QString& lookupExt( const QString& macaddr ) const; | 56 | const QString& lookupExt( const QString& macaddr ) const; |
42 | 57 | ||
43 | protected: | 58 | protected: |
44 | OManufacturerDB(); | 59 | OManufacturerDB(); |
45 | virtual ~OManufacturerDB(); | 60 | virtual ~OManufacturerDB(); |
46 | 61 | ||
diff --git a/libopie2/opienet/onetutils.cpp b/libopie2/opienet/onetutils.cpp index e3eb327..48cfa43 100644 --- a/libopie2/opienet/onetutils.cpp +++ b/libopie2/opienet/onetutils.cpp | |||
@@ -1,36 +1,36 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | 3 | ||
4 | (C) 2003 Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> | 4 | (C) 2003 Michael 'Mickey' Lauer <mickey@Vanille.de> |
5 | =. | 5 | =. |
6 | .=l. | 6 | .=l. |
7 | .>+-= | 7 | .>+-= |
8 | _;:, .> :=|. This program is free software; you can | 8 | _;:, .> :=|. This program is free software; you can |
9 | .> <`_, > . <= redistribute it and/or modify it under | 9 | .> <`_, > . <= redistribute it and/or modify it under |
10 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 10 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
11 | .="- .-=="i, .._ License as published by the Free Software | 11 | .="- .-=="i, .._ License as published by the Free Software |
12 | - . .-<_> .<> Foundation; either version 2 of the License, | 12 | - . .-<_> .<> Foundation; either version 2 of the License, |
13 | ._= =} : or (at your option) any later version. | 13 | ._= =} : or (at your option) any later version. |
14 | .%`+i> _;_. | 14 | .%`+i> _;_. |
15 | .i_,=:_. -<s. This program is distributed in the hope that | 15 | .i_,=:_. -<s. This program is distributed in the hope that |
16 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 16 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
17 | : .. .:, . . . without even the implied warranty of | 17 | : .. .:, . . . without even the implied warranty of |
18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
20 | ..}^=.= = ; Library General Public License for more | 20 | ..}^=.= = ; Library General Public License for more |
21 | ++= -. .` .: details. | 21 | ++= -. .` .: details. |
22 | : = ...= . :.=- | 22 | : = ...= . :.=- |
23 | -. .:....=;==+<; You should have received a copy of the GNU | 23 | -. .:....=;==+<; You should have received a copy of the GNU |
24 | -_. . . )=. = Library General Public License along with | 24 | -_. . . )=. = Library General Public License along with |
25 | -- :-=` this library; see the file COPYING.LIB. | 25 | -- :-=` this library; see the file COPYING.LIB. |
26 | If not, write to the Free Software Foundation, | 26 | If not, write to the Free Software Foundation, |
27 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
28 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
29 | 29 | ||
30 | */ | 30 | */ |
31 | 31 | ||
32 | #include <opie2/onetutils.h> | 32 | #include <opie2/onetutils.h> |
33 | #include <opie2/onetwork.h> | 33 | #include <opie2/onetwork.h> |
34 | #include <opie2/omanufacturerdb.h> | 34 | #include <opie2/omanufacturerdb.h> |
35 | 35 | ||
36 | #include <net/if.h> | 36 | #include <net/if.h> |
diff --git a/libopie2/opienet/onetwork.cpp b/libopie2/opienet/onetwork.cpp index 95c813f..6a9280f 100644 --- a/libopie2/opienet/onetwork.cpp +++ b/libopie2/opienet/onetwork.cpp | |||
@@ -1,38 +1,35 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | Copyright (C) 2003 by the Wellenreiter team: | 3 | Copyright (C) 2003 by Michael 'Mickey' Lauer <mickey@Vanille.de> |
4 | Martin J. Muench <mjm@remote-exploit.org> | ||
5 | Max Moser <mmo@remote-exploit.org | ||
6 | Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> | ||
7 | =. | 4 | =. |
8 | .=l. | 5 | .=l. |
9 | .>+-= | 6 | .>+-= |
10 | _;:, .> :=|. This program is free software; you can | 7 | _;:, .> :=|. This program is free software; you can |
11 | .> <`_, > . <= redistribute it and/or modify it under | 8 | .> <`_, > . <= redistribute it and/or modify it under |
12 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
13 | .="- .-=="i, .._ License as published by the Free Software | 10 | .="- .-=="i, .._ License as published by the Free Software |
14 | - . .-<_> .<> Foundation; either version 2 of the License, | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
15 | ._= =} : or (at your option) any later version. | 12 | ._= =} : or (at your option) any later version. |
16 | .%`+i> _;_. | 13 | .%`+i> _;_. |
17 | .i_,=:_. -<s. This program is distributed in the hope that | 14 | .i_,=:_. -<s. This program is distributed in the hope that |
18 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
19 | : .. .:, . . . without even the implied warranty of | 16 | : .. .:, . . . without even the implied warranty of |
20 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
21 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
22 | ..}^=.= = ; Library General Public License for more | 19 | ..}^=.= = ; Library General Public License for more |
23 | ++= -. .` .: details. | 20 | ++= -. .` .: details. |
24 | : = ...= . :.=- | 21 | : = ...= . :.=- |
25 | -. .:....=;==+<; You should have received a copy of the GNU | 22 | -. .:....=;==+<; You should have received a copy of the GNU |
26 | -_. . . )=. = Library General Public License along with | 23 | -_. . . )=. = Library General Public License along with |
27 | -- :-=` this library; see the file COPYING.LIB. | 24 | -- :-=` this library; see the file COPYING.LIB. |
28 | If not, write to the Free Software Foundation, | 25 | If not, write to the Free Software Foundation, |
29 | Inc., 59 Temple Place - Suite 330, | 26 | Inc., 59 Temple Place - Suite 330, |
30 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
31 | 28 | ||
32 | */ | 29 | */ |
33 | 30 | ||
34 | /* OPIE */ | 31 | /* OPIE */ |
35 | 32 | ||
36 | #include <opie2/onetwork.h> | 33 | #include <opie2/onetwork.h> |
37 | #include <opie2/ostation.h> | 34 | #include <opie2/ostation.h> |
38 | 35 | ||
@@ -921,64 +918,65 @@ OStationList* OWirelessNetworkInterface::scanNetwork() | |||
921 | } | 918 | } |
922 | case SIOCGIWMODE: | 919 | case SIOCGIWMODE: |
923 | { | 920 | { |
924 | qDebug( "SIOCGIWMODE" ); | 921 | qDebug( "SIOCGIWMODE" ); |
925 | stations->last()->type = modeToString( we->u.mode ); | 922 | stations->last()->type = modeToString( we->u.mode ); |
926 | break; | 923 | break; |
927 | } | 924 | } |
928 | case SIOCGIWFREQ: | 925 | case SIOCGIWFREQ: |
929 | { | 926 | { |
930 | qDebug( "SIOCGIWFREQ" ); | 927 | qDebug( "SIOCGIWFREQ" ); |
931 | stations->last()->channel = _channels[ static_cast<int>(double( we->u.freq.m ) * pow( 10.0, we->u.freq.e ) / 1000000) ]; | 928 | stations->last()->channel = _channels[ static_cast<int>(double( we->u.freq.m ) * pow( 10.0, we->u.freq.e ) / 1000000) ]; |
932 | break; | 929 | break; |
933 | } | 930 | } |
934 | case SIOCGIWESSID: | 931 | case SIOCGIWESSID: |
935 | { | 932 | { |
936 | qDebug( "SIOCGIWESSID" ); | 933 | qDebug( "SIOCGIWESSID" ); |
937 | stations->last()->ssid = we->u.essid.pointer; | 934 | stations->last()->ssid = we->u.essid.pointer; |
938 | break; | 935 | break; |
939 | } | 936 | } |
940 | case SIOCGIWSENS: qDebug( "SIOCGIWSENS" ); break; | 937 | case SIOCGIWSENS: qDebug( "SIOCGIWSENS" ); break; |
941 | case SIOCGIWENCODE: qDebug( "SIOCGIWENCODE" ); break; | 938 | case SIOCGIWENCODE: qDebug( "SIOCGIWENCODE" ); break; |
942 | case IWEVTXDROP: qDebug( "IWEVTXDROP" ); break; /* Packet dropped to excessive retry */ | 939 | case IWEVTXDROP: qDebug( "IWEVTXDROP" ); break; /* Packet dropped to excessive retry */ |
943 | case IWEVQUAL: qDebug( "IWEVQUAL" ); break; /* Quality part of statistics (scan) */ | 940 | case IWEVQUAL: qDebug( "IWEVQUAL" ); break; /* Quality part of statistics (scan) */ |
944 | case IWEVCUSTOM: qDebug( "IWEVCUSTOM" ); break; /* Driver specific ascii string */ | 941 | case IWEVCUSTOM: qDebug( "IWEVCUSTOM" ); break; /* Driver specific ascii string */ |
945 | case IWEVREGISTERED: qDebug( "IWEVREGISTERED" ); break; /* Discovered a new node (AP mode) */ | 942 | case IWEVREGISTERED: qDebug( "IWEVREGISTERED" ); break; /* Discovered a new node (AP mode) */ |
946 | case IWEVEXPIRED: qDebug( "IWEVEXPIRED" ); break; /* Expired a node (AP mode) */ | 943 | case IWEVEXPIRED: qDebug( "IWEVEXPIRED" ); break; /* Expired a node (AP mode) */ |
947 | default: qDebug( "unhandled event" ); | 944 | default: qDebug( "unhandled event" ); |
948 | } | 945 | } |
949 | 946 | ||
950 | offset += we->len; | 947 | offset += we->len; |
951 | we = (struct iw_event*) &buffer[offset]; | 948 | we = (struct iw_event*) &buffer[offset]; |
952 | } | 949 | } |
950 | return stations; | ||
953 | 951 | ||
954 | return stations; | 952 | return stations; |
955 | 953 | ||
956 | } | 954 | } |
957 | else | 955 | else |
958 | { | 956 | { |
959 | qDebug( " - no results (timeout) :(" ); | 957 | qDebug( " - no results (timeout) :(" ); |
960 | return stations; | 958 | return stations; |
961 | } | 959 | } |
962 | } | 960 | } |
963 | 961 | ||
964 | 962 | ||
965 | bool OWirelessNetworkInterface::wioctl( int call, struct iwreq& iwreq ) const | 963 | bool OWirelessNetworkInterface::wioctl( int call, struct iwreq& iwreq ) const |
966 | { | 964 | { |
967 | #ifndef NODEBUG | 965 | #ifndef NODEBUG |
968 | int result = ::ioctl( _sfd, call, &iwreq ); | 966 | int result = ::ioctl( _sfd, call, &iwreq ); |
969 | if ( result == -1 ) | 967 | if ( result == -1 ) |
970 | qDebug( "ONetworkInterface::wioctl (%s) call %s (0x%04X) - Status: Failed: %d (%s)", name(), (const char*) debugmapper->map( call ), call, result, strerror( errno ) ); | 968 | qDebug( "ONetworkInterface::wioctl (%s) call %s (0x%04X) - Status: Failed: %d (%s)", name(), (const char*) debugmapper->map( call ), call, result, strerror( errno ) ); |
971 | else | 969 | else |
972 | qDebug( "ONetworkInterface::wioctl (%s) call %s (0x%04X) - Status: Ok.", name(), (const char*) debugmapper->map( call ), call ); | 970 | qDebug( "ONetworkInterface::wioctl (%s) call %s (0x%04X) - Status: Ok.", name(), (const char*) debugmapper->map( call ), call ); |
973 | return ( result != -1 ); | 971 | return ( result != -1 ); |
974 | #else | 972 | #else |
975 | return ::ioctl( _sfd, call, &iwreq ) != -1; | 973 | return ::ioctl( _sfd, call, &iwreq ) != -1; |
976 | #endif | 974 | #endif |
977 | } | 975 | } |
978 | 976 | ||
979 | 977 | ||
980 | bool OWirelessNetworkInterface::wioctl( int call ) const | 978 | bool OWirelessNetworkInterface::wioctl( int call ) const |
981 | { | 979 | { |
982 | strcpy( _iwr.ifr_name, name() ); | 980 | strcpy( _iwr.ifr_name, name() ); |
983 | return wioctl( call, _iwr ); | 981 | return wioctl( call, _iwr ); |
984 | } | 982 | } |
diff --git a/libopie2/opienet/onetwork.h b/libopie2/opienet/onetwork.h index eb6c86e..bc9e299 100644 --- a/libopie2/opienet/onetwork.h +++ b/libopie2/opienet/onetwork.h | |||
@@ -1,38 +1,35 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | Copyright (C) 2003 by the Wellenreiter team: | 3 | Copyright (C) 2003 by Michael 'Mickey' Lauer <mickey@Vanille.de> |
4 | Martin J. Muench <mjm@remote-exploit.org> | ||
5 | Max Moser <mmo@remote-exploit.org | ||
6 | Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> | ||
7 | =. | 4 | =. |
8 | .=l. | 5 | .=l. |
9 | .>+-= | 6 | .>+-= |
10 | _;:, .> :=|. This program is free software; you can | 7 | _;:, .> :=|. This program is free software; you can |
11 | .> <`_, > . <= redistribute it and/or modify it under | 8 | .> <`_, > . <= redistribute it and/or modify it under |
12 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
13 | .="- .-=="i, .._ License as published by the Free Software | 10 | .="- .-=="i, .._ License as published by the Free Software |
14 | - . .-<_> .<> Foundation; either version 2 of the License, | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
15 | ._= =} : or (at your option) any later version. | 12 | ._= =} : or (at your option) any later version. |
16 | .%`+i> _;_. | 13 | .%`+i> _;_. |
17 | .i_,=:_. -<s. This program is distributed in the hope that | 14 | .i_,=:_. -<s. This program is distributed in the hope that |
18 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
19 | : .. .:, . . . without even the implied warranty of | 16 | : .. .:, . . . without even the implied warranty of |
20 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
21 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
22 | ..}^=.= = ; Library General Public License for more | 19 | ..}^=.= = ; Library General Public License for more |
23 | ++= -. .` .: details. | 20 | ++= -. .` .: details. |
24 | : = ...= . :.=- | 21 | : = ...= . :.=- |
25 | -. .:....=;==+<; You should have received a copy of the GNU | 22 | -. .:....=;==+<; You should have received a copy of the GNU |
26 | -_. . . )=. = Library General Public License along with | 23 | -_. . . )=. = Library General Public License along with |
27 | -- :-=` this library; see the file COPYING.LIB. | 24 | -- :-=` this library; see the file COPYING.LIB. |
28 | If not, write to the Free Software Foundation, | 25 | If not, write to the Free Software Foundation, |
29 | Inc., 59 Temple Place - Suite 330, | 26 | Inc., 59 Temple Place - Suite 330, |
30 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
31 | 28 | ||
32 | */ | 29 | */ |
33 | 30 | ||
34 | #ifndef ONETWORK_H | 31 | #ifndef ONETWORK_H |
35 | #define ONETWORK_H | 32 | #define ONETWORK_H |
36 | 33 | ||
37 | #include "wireless.h" | 34 | #include "wireless.h" |
38 | 35 | ||
diff --git a/libopie2/opienet/opcap.cpp b/libopie2/opienet/opcap.cpp index 6331b2d..635224c 100644 --- a/libopie2/opienet/opcap.cpp +++ b/libopie2/opienet/opcap.cpp | |||
@@ -1,38 +1,35 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | Copyright (C) 2003 by the Wellenreiter team: | 3 | Copyright (C) 2003 by Michael 'Mickey' Lauer <mickey@Vanille.de> |
4 | Martin J. Muench <mjm@remote-exploit.org> | ||
5 | Max Moser <mmo@remote-exploit.org | ||
6 | Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> | ||
7 | =. | 4 | =. |
8 | .=l. | 5 | .=l. |
9 | .>+-= | 6 | .>+-= |
10 | _;:, .> :=|. This program is free software; you can | 7 | _;:, .> :=|. This program is free software; you can |
11 | .> <`_, > . <= redistribute it and/or modify it under | 8 | .> <`_, > . <= redistribute it and/or modify it under |
12 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
13 | .="- .-=="i, .._ License as published by the Free Software | 10 | .="- .-=="i, .._ License as published by the Free Software |
14 | - . .-<_> .<> Foundation; either version 2 of the License, | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
15 | ._= =} : or (at your option) any later version. | 12 | ._= =} : or (at your option) any later version. |
16 | .%`+i> _;_. | 13 | .%`+i> _;_. |
17 | .i_,=:_. -<s. This program is distributed in the hope that | 14 | .i_,=:_. -<s. This program is distributed in the hope that |
18 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
19 | : .. .:, . . . without even the implied warranty of | 16 | : .. .:, . . . without even the implied warranty of |
20 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
21 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
22 | ..}^=.= = ; Library General Public License for more | 19 | ..}^=.= = ; Library General Public License for more |
23 | ++= -. .` .: details. | 20 | ++= -. .` .: details. |
24 | : = ...= . :.=- | 21 | : = ...= . :.=- |
25 | -. .:....=;==+<; You should have received a copy of the GNU | 22 | -. .:....=;==+<; You should have received a copy of the GNU |
26 | -_. . . )=. = Library General Public License along with | 23 | -_. . . )=. = Library General Public License along with |
27 | -- :-=` this library; see the file COPYING.LIB. | 24 | -- :-=` this library; see the file COPYING.LIB. |
28 | If not, write to the Free Software Foundation, | 25 | If not, write to the Free Software Foundation, |
29 | Inc., 59 Temple Place - Suite 330, | 26 | Inc., 59 Temple Place - Suite 330, |
30 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
31 | 28 | ||
32 | */ | 29 | */ |
33 | 30 | ||
34 | /* OPIE */ | 31 | /* OPIE */ |
35 | #include <opie2/opcap.h> | 32 | #include <opie2/opcap.h> |
36 | 33 | ||
37 | /* QT */ | 34 | /* QT */ |
38 | #include <qapplication.h> // don't use oapplication here (will decrease reusability in other projects) | 35 | #include <qapplication.h> // don't use oapplication here (will decrease reusability in other projects) |
diff --git a/libopie2/opienet/opcap.h b/libopie2/opienet/opcap.h index 54b256b..497fd6b 100644 --- a/libopie2/opienet/opcap.h +++ b/libopie2/opienet/opcap.h | |||
@@ -1,38 +1,35 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | Copyright (C) 2003 by the Wellenreiter team: | 3 | Copyright (C) 2003 by Michael 'Mickey' Lauer <mickey@Vanille.de> |
4 | Martin J. Muench <mjm@remote-exploit.org> | ||
5 | Max Moser <mmo@remote-exploit.org | ||
6 | Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> | ||
7 | =. | 4 | =. |
8 | .=l. | 5 | .=l. |
9 | .>+-= | 6 | .>+-= |
10 | _;:, .> :=|. This program is free software; you can | 7 | _;:, .> :=|. This program is free software; you can |
11 | .> <`_, > . <= redistribute it and/or modify it under | 8 | .> <`_, > . <= redistribute it and/or modify it under |
12 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
13 | .="- .-=="i, .._ License as published by the Free Software | 10 | .="- .-=="i, .._ License as published by the Free Software |
14 | - . .-<_> .<> Foundation; either version 2 of the License, | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
15 | ._= =} : or (at your option) any later version. | 12 | ._= =} : or (at your option) any later version. |
16 | .%`+i> _;_. | 13 | .%`+i> _;_. |
17 | .i_,=:_. -<s. This program is distributed in the hope that | 14 | .i_,=:_. -<s. This program is distributed in the hope that |
18 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
19 | : .. .:, . . . without even the implied warranty of | 16 | : .. .:, . . . without even the implied warranty of |
20 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
21 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
22 | ..}^=.= = ; Library General Public License for more | 19 | ..}^=.= = ; Library General Public License for more |
23 | ++= -. .` .: details. | 20 | ++= -. .` .: details. |
24 | : = ...= . :.=- | 21 | : = ...= . :.=- |
25 | -. .:....=;==+<; You should have received a copy of the GNU | 22 | -. .:....=;==+<; You should have received a copy of the GNU |
26 | -_. . . )=. = Library General Public License along with | 23 | -_. . . )=. = Library General Public License along with |
27 | -- :-=` this library; see the file COPYING.LIB. | 24 | -- :-=` this library; see the file COPYING.LIB. |
28 | If not, write to the Free Software Foundation, | 25 | If not, write to the Free Software Foundation, |
29 | Inc., 59 Temple Place - Suite 330, | 26 | Inc., 59 Temple Place - Suite 330, |
30 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
31 | 28 | ||
32 | */ | 29 | */ |
33 | 30 | ||
34 | #ifndef OPCAP_H | 31 | #ifndef OPCAP_H |
35 | #define OPCAP_H | 32 | #define OPCAP_H |
36 | 33 | ||
37 | /* LINUX */ | 34 | /* LINUX */ |
38 | extern "C" // work around a bpf/pcap conflict in recent headers | 35 | extern "C" // work around a bpf/pcap conflict in recent headers |
diff --git a/libopie2/opienet/opienet.pro b/libopie2/opienet/opienet.pro index 386c2db..2027481 100644 --- a/libopie2/opienet/opienet.pro +++ b/libopie2/opienet/opienet.pro | |||
@@ -1,34 +1,34 @@ | |||
1 | TEMPLATE = lib | 1 | TEMPLATE = lib |
2 | CONFIG += qt warn_on debug | 2 | CONFIG += qt warn_on debug |
3 | DESTDIR = $(OPIEDIR)/lib | 3 | DESTDIR = $(OPIEDIR)/lib |
4 | HEADERS = 802_11_user.h \ | 4 | HEADERS = 802_11_user.h \ |
5 | dhcp.h \ | 5 | dhcp.h \ |
6 | udp_ports.h \ | 6 | udp_ports.h \ |
7 | wireless.h \ | 7 | wireless.h \ |
8 | odebugmapper.h \ | 8 | odebugmapper.h \ |
9 | omanufacturerdb.h \ | 9 | omanufacturerdb.h \ |
10 | onetutils.h \ | 10 | onetutils.h \ |
11 | onetwork.h \ | 11 | onetwork.h \ |
12 | opcap.h \ | 12 | opcap.h \ |
13 | ostation.h | 13 | ostation.h |
14 | SOURCES = odebugmapper.cpp \ | 14 | SOURCES = odebugmapper.cpp \ |
15 | omanufacturerdb.cpp \ | 15 | omanufacturerdb.cpp \ |
16 | onetutils.cpp \ | 16 | onetutils.cpp \ |
17 | onetwork.cpp \ | 17 | onetwork.cpp \ |
18 | opcap.cpp \ | 18 | opcap.cpp \ |
19 | ostation.cpp | 19 | ostation.cpp |
20 | INTERFACES = | 20 | INTERFACES = |
21 | TARGET = opienet2 | 21 | TARGET = opienet2 |
22 | VERSION = 1.8.1 | 22 | VERSION = 1.8.2 |
23 | INCLUDEPATH += $(OPIEDIR)/include | 23 | INCLUDEPATH += $(OPIEDIR)/include |
24 | DEPENDPATH += $(OPIEDIR)/include | 24 | DEPENDPATH += $(OPIEDIR)/include |
25 | LIBS += -lpcap | 25 | LIBS += -lpcap |
26 | 26 | ||
27 | 27 | ||
28 | !contains( platform, x11 ) { | 28 | !contains( platform, x11 ) { |
29 | include ( $(OPIEDIR)/include.pro ) | 29 | include ( $(OPIEDIR)/include.pro ) |
30 | } | 30 | } |
31 | 31 | ||
32 | contains( platform, x11 ) { | 32 | contains( platform, x11 ) { |
33 | LIBS += -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib | 33 | LIBS += -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib |
34 | } | 34 | } |
diff --git a/libopie2/opienet/ostation.cpp b/libopie2/opienet/ostation.cpp index ba1e4f6..c363f0c 100644 --- a/libopie2/opienet/ostation.cpp +++ b/libopie2/opienet/ostation.cpp | |||
@@ -1,36 +1,35 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | 3 | Copyright (C) 2003 by Michael 'Mickey' Lauer <mickey@Vanille.de> | |
4 | (C) 2003 Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> | ||
5 | =. | 4 | =. |
6 | .=l. | 5 | .=l. |
7 | .>+-= | 6 | .>+-= |
8 | _;:, .> :=|. This program is free software; you can | 7 | _;:, .> :=|. This program is free software; you can |
9 | .> <`_, > . <= redistribute it and/or modify it under | 8 | .> <`_, > . <= redistribute it and/or modify it under |
10 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
11 | .="- .-=="i, .._ License as published by the Free Software | 10 | .="- .-=="i, .._ License as published by the Free Software |
12 | - . .-<_> .<> Foundation; either version 2 of the License, | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
13 | ._= =} : or (at your option) any later version. | 12 | ._= =} : or (at your option) any later version. |
14 | .%`+i> _;_. | 13 | .%`+i> _;_. |
15 | .i_,=:_. -<s. This program is distributed in the hope that | 14 | .i_,=:_. -<s. This program is distributed in the hope that |
16 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
17 | : .. .:, . . . without even the implied warranty of | 16 | : .. .:, . . . without even the implied warranty of |
18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
20 | ..}^=.= = ; Library General Public License for more | 19 | ..}^=.= = ; Library General Public License for more |
21 | ++= -. .` .: details. | 20 | ++= -. .` .: details. |
22 | : = ...= . :.=- | 21 | : = ...= . :.=- |
23 | -. .:....=;==+<; You should have received a copy of the GNU | 22 | -. .:....=;==+<; You should have received a copy of the GNU |
24 | -_. . . )=. = Library General Public License along with | 23 | -_. . . )=. = Library General Public License along with |
25 | -- :-=` this library; see the file COPYING.LIB. | 24 | -- :-=` this library; see the file COPYING.LIB. |
26 | If not, write to the Free Software Foundation, | 25 | If not, write to the Free Software Foundation, |
27 | Inc., 59 Temple Place - Suite 330, | 26 | Inc., 59 Temple Place - Suite 330, |
28 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
29 | 28 | ||
30 | */ | 29 | */ |
31 | 30 | ||
32 | #include <opie2/ostation.h> | 31 | #include <opie2/ostation.h> |
33 | 32 | ||
34 | /*====================================================================================== | 33 | /*====================================================================================== |
35 | * OStation | 34 | * OStation |
36 | *======================================================================================*/ | 35 | *======================================================================================*/ |
diff --git a/libopie2/opienet/ostation.h b/libopie2/opienet/ostation.h index a6956c9..1e7366d 100644 --- a/libopie2/opienet/ostation.h +++ b/libopie2/opienet/ostation.h | |||
@@ -1,36 +1,35 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of the Opie Project | 2 | This file is part of the Opie Project |
3 | 3 | Copyright (C) 2003 by Michael 'Mickey' Lauer <mickey@Vanille.de> | |
4 | (C) 2003 Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> | ||
5 | =. | 4 | =. |
6 | .=l. | 5 | .=l. |
7 | .>+-= | 6 | .>+-= |
8 | _;:, .> :=|. This program is free software; you can | 7 | _;:, .> :=|. This program is free software; you can |
9 | .> <`_, > . <= redistribute it and/or modify it under | 8 | .> <`_, > . <= redistribute it and/or modify it under |
10 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
11 | .="- .-=="i, .._ License as published by the Free Software | 10 | .="- .-=="i, .._ License as published by the Free Software |
12 | - . .-<_> .<> Foundation; either version 2 of the License, | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
13 | ._= =} : or (at your option) any later version. | 12 | ._= =} : or (at your option) any later version. |
14 | .%`+i> _;_. | 13 | .%`+i> _;_. |
15 | .i_,=:_. -<s. This program is distributed in the hope that | 14 | .i_,=:_. -<s. This program is distributed in the hope that |
16 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
17 | : .. .:, . . . without even the implied warranty of | 16 | : .. .:, . . . without even the implied warranty of |
18 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
19 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
20 | ..}^=.= = ; Library General Public License for more | 19 | ..}^=.= = ; Library General Public License for more |
21 | ++= -. .` .: details. | 20 | ++= -. .` .: details. |
22 | : = ...= . :.=- | 21 | : = ...= . :.=- |
23 | -. .:....=;==+<; You should have received a copy of the GNU | 22 | -. .:....=;==+<; You should have received a copy of the GNU |
24 | -_. . . )=. = Library General Public License along with | 23 | -_. . . )=. = Library General Public License along with |
25 | -- :-=` this library; see the file COPYING.LIB. | 24 | -- :-=` this library; see the file COPYING.LIB. |
26 | If not, write to the Free Software Foundation, | 25 | If not, write to the Free Software Foundation, |
27 | Inc., 59 Temple Place - Suite 330, | 26 | Inc., 59 Temple Place - Suite 330, |
28 | Boston, MA 02111-1307, USA. | 27 | Boston, MA 02111-1307, USA. |
29 | 28 | ||
30 | */ | 29 | */ |
31 | 30 | ||
32 | #ifndef OSTATION_H | 31 | #ifndef OSTATION_H |
33 | #define OSTATION_H | 32 | #define OSTATION_H |
34 | 33 | ||
35 | #include <opie2/onetutils.h> | 34 | #include <opie2/onetutils.h> |
36 | 35 | ||
diff --git a/libopie2/opienet/udp_ports.h b/libopie2/opienet/udp_ports.h index 5e92497..3fb1c85 100644 --- a/libopie2/opienet/udp_ports.h +++ b/libopie2/opienet/udp_ports.h | |||
@@ -1,37 +1,37 @@ | |||
1 | /* | 1 | /* |
2 | * This file has been generated by doing | 2 | * This file has been generated by doing |
3 | * find . -name "*"|xargs grep -h '#define UDP_PORT' > udp_ports.h | 3 | * find . -name "*"|xargs grep -h '#define UDP_PORT' > udp_ports.h |
4 | * in the root directory of Ethereal 0.9.15. Cudos to the Ethereal Team. | 4 | * in the root directory of Ethereal 0.9.15. Cudos to the Ethereal Team. |
5 | * -- Michael 'Mickey' Lauer <mickeyl@handhelds.org> | 5 | * -- Michael 'Mickey' Lauer <mickey@Vanille.de> |
6 | */ | 6 | */ |
7 | 7 | ||
8 | #define UDP_PORT_AODV654 | 8 | #define UDP_PORT_AODV654 |
9 | #define UDP_PORT_LENGTH 2 | 9 | #define UDP_PORT_LENGTH 2 |
10 | #define UDP_PORT_OFFSET PARAMETER_VALUE_OFFSET | 10 | #define UDP_PORT_OFFSET PARAMETER_VALUE_OFFSET |
11 | #define UDP_PORT_RAS1 1718 | 11 | #define UDP_PORT_RAS1 1718 |
12 | #define UDP_PORT_RAS2 1719 | 12 | #define UDP_PORT_RAS2 1719 |
13 | #define UDP_PORT_CPHA8116 | 13 | #define UDP_PORT_CPHA8116 |
14 | #define UDP_PORT_DDTP1052 | 14 | #define UDP_PORT_DDTP1052 |
15 | #define UDP_PORT_CUPS631 | 15 | #define UDP_PORT_CUPS631 |
16 | #define UDP_PORT_DLSW 2067 | 16 | #define UDP_PORT_DLSW 2067 |
17 | #define UDP_PORT_ISAKMP500 | 17 | #define UDP_PORT_ISAKMP500 |
18 | #define UDP_PORT_L2TP 1701 | 18 | #define UDP_PORT_L2TP 1701 |
19 | #define UDP_PORT_IAPP 2313 | 19 | #define UDP_PORT_IAPP 2313 |
20 | #define UDP_PORT_HSRP 1985 | 20 | #define UDP_PORT_HSRP 1985 |
21 | #define UDP_PORT_SSDP 1900 | 21 | #define UDP_PORT_SSDP 1900 |
22 | #define UDP_PORT_TACACS49 | 22 | #define UDP_PORT_TACACS49 |
23 | #define UDP_PORT_CLDAP 389 | 23 | #define UDP_PORT_CLDAP 389 |
24 | #define UDP_PORT_VINES573 | 24 | #define UDP_PORT_VINES573 |
25 | #define UDP_PORT_NBNS137 | 25 | #define UDP_PORT_NBNS137 |
26 | #define UDP_PORT_NBDGM138 | 26 | #define UDP_PORT_NBDGM138 |
27 | #define UDP_PORT_XYPLEX 173 | 27 | #define UDP_PORT_XYPLEX 173 |
28 | #define UDP_PORT_PIM_RP_DISC 496 | 28 | #define UDP_PORT_PIM_RP_DISC 496 |
29 | #define UDP_PORT_SLIMP3_V1 1069 | 29 | #define UDP_PORT_SLIMP3_V1 1069 |
30 | #define UDP_PORT_SLIMP3_V2 3483 | 30 | #define UDP_PORT_SLIMP3_V2 3483 |
31 | #define UDP_PORT_RMCP 623 | 31 | #define UDP_PORT_RMCP 623 |
32 | #define UDP_PORT_RMCP_SECURE664 | 32 | #define UDP_PORT_RMCP_SECURE664 |
33 | #define UDP_PORT_SYSLOG 514 | 33 | #define UDP_PORT_SYSLOG 514 |
34 | #define UDP_PORT_SNMP 161 | 34 | #define UDP_PORT_SNMP 161 |
35 | #define UDP_PORT_SNMP_TRAP162 | 35 | #define UDP_PORT_SNMP_TRAP162 |
36 | #define UDP_PORT_TFTP 69 | 36 | #define UDP_PORT_TFTP 69 |
37 | #define UDP_PORT_TIME 37 | 37 | #define UDP_PORT_TIME 37 |