summaryrefslogtreecommitdiff
path: root/libopie2/opienet/onetutils.cpp
authormickeyl <mickeyl>2003-11-08 20:39:38 (UTC)
committer mickeyl <mickeyl>2003-11-08 20:39:38 (UTC)
commiteb26b0413c269b898a24deb30d5602ac0c142a56 (patch) (unidiff)
tree4e9b24ce6a9e8811eb9e62d8537b452921d4564d /libopie2/opienet/onetutils.cpp
parent33d86bb19d4e21b95504ba3b16789d08b4820313 (diff)
downloadopie-eb26b0413c269b898a24deb30d5602ac0c142a56.zip
opie-eb26b0413c269b898a24deb30d5602ac0c142a56.tar.gz
opie-eb26b0413c269b898a24deb30d5602ac0c142a56.tar.bz2
refactor the debug mapper and make it more secure
Diffstat (limited to 'libopie2/opienet/onetutils.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opienet/onetutils.cpp15
1 files changed, 2 insertions, 13 deletions
diff --git a/libopie2/opienet/onetutils.cpp b/libopie2/opienet/onetutils.cpp
index ce147c5..e3eb327 100644
--- a/libopie2/opienet/onetutils.cpp
+++ b/libopie2/opienet/onetutils.cpp
@@ -21,45 +21,34 @@
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>
37#include <cassert> 37#include <assert.h>
38#include <cstdio> 38#include <stdio.h>
39using namespace std;
40
41#define IW_PRIV_TYPE_MASK 0x7000
42#define IW_PRIV_TYPE_NONE 0x0000
43#define IW_PRIV_TYPE_BYTE 0x1000
44#define IW_PRIV_TYPE_CHAR 0x2000
45#define IW_PRIV_TYPE_INT 0x4000
46#define IW_PRIV_TYPE_FLOAT 0x5000
47#define IW_PRIV_TYPE_ADDR 0x6000
48#define IW_PRIV_SIZE_FIXED 0x0800
49#define IW_PRIV_SIZE_MASK 0x07FF
50 39
51/*====================================================================================== 40/*======================================================================================
52 * OMacAddress 41 * OMacAddress
53 *======================================================================================*/ 42 *======================================================================================*/
54 43
55// static initializer for broadcast and unknown MAC Adresses 44// static initializer for broadcast and unknown MAC Adresses
56const unsigned char __broadcast[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; 45const unsigned char __broadcast[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
57const OMacAddress& OMacAddress::broadcast = OMacAddress( __broadcast ); 46const OMacAddress& OMacAddress::broadcast = OMacAddress( __broadcast );
58const unsigned char __unknown[6] = { 0x44, 0x44, 0x44, 0x44, 0x44, 0x44 }; 47const unsigned char __unknown[6] = { 0x44, 0x44, 0x44, 0x44, 0x44, 0x44 };
59const OMacAddress& OMacAddress::unknown = OMacAddress( __unknown ); 48const OMacAddress& OMacAddress::unknown = OMacAddress( __unknown );
60 49
61//TODO: Incorporate Ethernet Manufacturer database here! (inline or so) 50//TODO: Incorporate Ethernet Manufacturer database here! (inline or so)
62 51
63OMacAddress::OMacAddress() 52OMacAddress::OMacAddress()
64{ 53{
65 memcpy( _bytes, __unknown, 6 ); 54 memcpy( _bytes, __unknown, 6 );