From 7a7683d435cfbb4fa2d6ed99fd4a94d388402aec Mon Sep 17 00:00:00 2001 From: mickeyl Date: Mon, 01 Dec 2003 22:44:38 +0000 Subject: slowly start to refactor & cleanup libopie2 before merging it with libopie1 --- (limited to 'libopie2/opienet') 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 @@ -197,4 +197,5 @@ struct dhcp_packet { #define FQDN_FQDN 8 #define FQDN_SUBOPTION_COUNT 8 -#endif \ No newline at end of file +#endif + 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 @@ -4,8 +4,8 @@ Priority: optional Section: opie/system Maintainer: Opie Team Architecture: arm -Version: 1.8.1-$SUB_VERSION.2 -Depends: libqpe1, libopiecore2 (1.8.1) +Version: 1.8.2-$SUB_VERSION.2 +Depends: libopiecore2 (1.8.2) Provides: libopienet2 Description: Opie library 2.0 NET 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 @@ -3,11 +3,13 @@ * debug value mapper - generated by regen.py - (C) Michael 'Mickey' Lauer */ +#include + #include "odebugmapper.h" DebugMapper::DebugMapper() { - qDebug( "DebugMapper::DebugMapper()" ); + odebug << "DebugMapper::DebugMapper()" << oendl; _map.insert( 0x8902, new QString("SIOCSPGRP") ); @@ -191,7 +193,7 @@ DebugMapper::DebugMapper() DebugMapper::~DebugMapper() { - qDebug( "DebugMapper::~DebugMapper()" ); + odebug << "DebugMapper::~DebugMapper()" << oendl; } @@ -201,7 +203,7 @@ const QString& DebugMapper::map( int value ) const if ( !result ) { - qDebug( "DebugMapper::map() - value not found." ); + owarn << "DebugMapper::map() - value " << value << " is not found." << oendl; return QString::null; } else 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,20 +1,38 @@ -/********************************************************************** -** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. -** -** This file is part of Opie Environment. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -**********************************************************************/ +/* +                 This file is part of the Opie Project +              (C) 2003 Michael 'Mickey' Lauer + =. + .=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_,=:_.      -`: 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 "omanufacturerdb.h" +/* OPIE CORE */ +#include + /* QT */ #include #include @@ -26,7 +44,7 @@ OManufacturerDB* OManufacturerDB::instance() { if ( !OManufacturerDB::_instance ) { - qDebug( "OManufacturerDB::instance(): creating OManufacturerDB..." ); + odebug << "OManufacturerDB::instance(): creating OManufacturerDB..." << oendl; _instance = new OManufacturerDB(); } return _instance; @@ -36,15 +54,15 @@ OManufacturerDB* OManufacturerDB::instance() OManufacturerDB::OManufacturerDB() { QString filename( "/etc/manufacturers" ); - qDebug( "OManufacturerDB: trying to read '%s'...", (const char*) filename ); + odebug << "OManufacturerDB: trying to read " << filename << oendl; if ( !QFile::exists( filename ) ) { filename = "/opt/QtPalmtop/etc/manufacturers"; - qDebug( "OManufacturerDB: trying to read '%s'...", (const char*) filename ); + odebug << "OManufacturerDB: trying to read " << filename << oendl; if ( !QFile::exists( filename ) ) { filename = "/usr/share/wellenreiter/manufacturers"; - qDebug( "OManufacturerDB: trying to read '%s'...", (const char*) filename ); + odebug << "OManufacturerDB: trying to read " << filename << oendl; } } @@ -52,11 +70,11 @@ OManufacturerDB::OManufacturerDB() bool hasFile = file.open( IO_ReadOnly ); if (!hasFile) { - qWarning( "OManufacturerDB: no valid manufacturer list found.", (const char*) filename ); + owarn << "OManufacturerDB: no valid manufacturer list found." << oendl; } else { - qDebug( "OManufacturerDB: found manufacturer list in '%s'...", (const char*) filename ); + odebug << "OManufacturerDB: found manufacturer list in " << filename << oendl; QTextStream s( &file ); QString addr; QString manu; @@ -81,18 +99,13 @@ OManufacturerDB::OManufacturerDB() { s.skipWhiteSpace(); extManu = s.readLine(); - #ifdef DEBUG - qDebug( "OManufacturerDB: read '%s' as extended manufacturer string", (const char*) extManu ); - #endif + odebug << "OManufacturerDB: read " << extManu << " as extended manufacturer string" << oendl; manufacturersExt.insert( addr, extManu ); } else s.readLine(); - #ifdef DEBUG - qDebug( "ManufacturerDB: read tuple %s, %s", (const char*) addr, (const char*) manu ); - #endif + odebug << "OManufacturerDB: read tuple " << addr << ", " << manu << oendl; manufacturers.insert( addr, manu ); - } } 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,17 +1,32 @@ -/********************************************************************** -** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. -** -** This file is part of Opie Environment. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -**********************************************************************/ +/* +                 This file is part of the Opie Project +              (C) 2003 Michael 'Mickey' Lauer + =. + .=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_,=:_.      -`: 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. + +*/ #ifndef OMANUFACTURERDB_H #define OMANUFACTURERDB_H 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,7 +1,7 @@ /*                 This file is part of the Opie Project -              (C) 2003 Michael 'Mickey' Lauer +              (C) 2003 Michael 'Mickey' Lauer =. .=l.            .>+-= 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,9 +1,6 @@ /*                 This file is part of the Opie Project -              Copyright (C) 2003 by the Wellenreiter team: - Martin J. Muench - Max Moser +              Copyright (C) 2003 by Michael 'Mickey' Lauer =. .=l.            .>+-= @@ -950,6 +947,7 @@ OStationList* OWirelessNetworkInterface::scanNetwork() offset += we->len; we = (struct iw_event*) &buffer[offset]; } + return stations; return stations; 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,9 +1,6 @@ /*                 This file is part of the Opie Project -              Copyright (C) 2003 by the Wellenreiter team: - Martin J. Muench - Max Moser +              Copyright (C) 2003 by Michael 'Mickey' Lauer =. .=l.            .>+-= 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,9 +1,6 @@ /*                 This file is part of the Opie Project -              Copyright (C) 2003 by the Wellenreiter team: - Martin J. Muench - Max Moser +              Copyright (C) 2003 by Michael 'Mickey' Lauer =. .=l.            .>+-= 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,9 +1,6 @@ /*                 This file is part of the Opie Project -              Copyright (C) 2003 by the Wellenreiter team: - Martin J. Muench - Max Moser +              Copyright (C) 2003 by Michael 'Mickey' Lauer =. .=l.            .>+-= 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 @@ -19,7 +19,7 @@ SOURCES = odebugmapper.cpp \ ostation.cpp INTERFACES = TARGET = opienet2 -VERSION = 1.8.1 +VERSION = 1.8.2 INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include LIBS += -lpcap 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,7 +1,6 @@ /*                 This file is part of the Opie Project - -              (C) 2003 Michael 'Mickey' Lauer +              Copyright (C) 2003 by Michael 'Mickey' Lauer =. .=l.            .>+-= 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,7 +1,6 @@ /*                 This file is part of the Opie Project - -              (C) 2003 Michael 'Mickey' Lauer +              Copyright (C) 2003 by Michael 'Mickey' Lauer =. .=l.            .>+-= 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 @@ -2,7 +2,7 @@ * This file has been generated by doing * find . -name "*"|xargs grep -h '#define UDP_PORT' > udp_ports.h * in the root directory of Ethereal 0.9.15. Cudos to the Ethereal Team. - * -- Michael 'Mickey' Lauer + * -- Michael 'Mickey' Lauer */ #define UDP_PORT_AODV 654 -- cgit v0.9.0.2