author | mickeyl <mickeyl> | 2003-11-08 20:39:38 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-11-08 20:39:38 (UTC) |
commit | eb26b0413c269b898a24deb30d5602ac0c142a56 (patch) (side-by-side diff) | |
tree | 4e9b24ce6a9e8811eb9e62d8537b452921d4564d /libopie2/opienet/onetutils.cpp | |
parent | 33d86bb19d4e21b95504ba3b16789d08b4820313 (diff) | |
download | opie-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.cpp | 15 |
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 @@ -5,77 +5,66 @@ =. .=l. .>+-= _;:, .> :=|. This program is free software; you can .> <`_, > . <= redistribute it and/or modify it under :`=1 )Y*s>-.-- : the terms of the GNU Library General Public .="- .-=="i, .._ License as published by the Free Software - . .-<_> .<> Foundation; either version 2 of the License, ._= =} : or (at your option) any later version. .%`+i> _;_. .i_,=:_. -<s. This program is distributed in the hope that + . -:. = it will be useful, but WITHOUT ANY WARRANTY; : .. .:, . . . without even the implied warranty of =_ + =;=|` MERCHANTABILITY or FITNESS FOR A _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU ..}^=.= = ; Library General Public License for more ++= -. .` .: details. : = ...= . :.=- -. .:....=;==+<; You should have received a copy of the GNU -_. . . )=. = Library General Public License along with -- :-=` this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include <opie2/onetutils.h> #include <opie2/onetwork.h> #include <opie2/omanufacturerdb.h> #include <net/if.h> -#include <cassert> -#include <cstdio> -using namespace std; - -#define IW_PRIV_TYPE_MASK 0x7000 -#define IW_PRIV_TYPE_NONE 0x0000 -#define IW_PRIV_TYPE_BYTE 0x1000 -#define IW_PRIV_TYPE_CHAR 0x2000 -#define IW_PRIV_TYPE_INT 0x4000 -#define IW_PRIV_TYPE_FLOAT 0x5000 -#define IW_PRIV_TYPE_ADDR 0x6000 -#define IW_PRIV_SIZE_FIXED 0x0800 -#define IW_PRIV_SIZE_MASK 0x07FF +#include <assert.h> +#include <stdio.h> /*====================================================================================== * OMacAddress *======================================================================================*/ // static initializer for broadcast and unknown MAC Adresses const unsigned char __broadcast[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; const OMacAddress& OMacAddress::broadcast = OMacAddress( __broadcast ); const unsigned char __unknown[6] = { 0x44, 0x44, 0x44, 0x44, 0x44, 0x44 }; const OMacAddress& OMacAddress::unknown = OMacAddress( __unknown ); //TODO: Incorporate Ethernet Manufacturer database here! (inline or so) OMacAddress::OMacAddress() { memcpy( _bytes, __unknown, 6 ); } OMacAddress::OMacAddress( unsigned char* p ) { memcpy( _bytes, p, 6 ); } OMacAddress::OMacAddress( const unsigned char* p ) { memcpy( _bytes, p, 6 ); } OMacAddress::OMacAddress( struct ifreq& ifr ) |