summaryrefslogtreecommitdiff
path: root/libopie2/opienet
Side-by-side diff
Diffstat (limited to 'libopie2/opienet') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opienet/802_11_user.h1
-rw-r--r--libopie2/opienet/dhcp.h2
-rw-r--r--libopie2/opienet/odebugmapper.cpp10
-rw-r--r--libopie2/opienet/odebugmapper.h10
-rw-r--r--libopie2/opienet/omanufacturerdb.cpp7
-rw-r--r--libopie2/opienet/omanufacturerdb.h8
-rw-r--r--libopie2/opienet/onetutils.cpp9
-rw-r--r--libopie2/opienet/onetutils.h15
-rw-r--r--libopie2/opienet/onetwork.cpp9
-rw-r--r--libopie2/opienet/onetwork.h31
-rw-r--r--libopie2/opienet/opcap.cpp8
-rw-r--r--libopie2/opienet/opcap.h52
-rw-r--r--libopie2/opienet/ostation.cpp8
-rw-r--r--libopie2/opienet/ostation.h9
14 files changed, 176 insertions, 3 deletions
diff --git a/libopie2/opienet/802_11_user.h b/libopie2/opienet/802_11_user.h
index 7ae27c5..1a9a7a0 100644
--- a/libopie2/opienet/802_11_user.h
+++ b/libopie2/opienet/802_11_user.h
@@ -456,3 +456,4 @@ struct ctrl_end_ack_t {
#define IV_KEYID(iv) (((iv) >> 30) & 0x03)
+
#endif
diff --git a/libopie2/opienet/dhcp.h b/libopie2/opienet/dhcp.h
index 368e375..6ba4c53 100644
--- a/libopie2/opienet/dhcp.h
+++ b/libopie2/opienet/dhcp.h
@@ -43,4 +43,5 @@
#define DHCP_H
+
#define DHCP_UDP_OVERHEAD (14 + /* Ethernet header */ \
20 + /* IP header */ \
@@ -198,4 +199,5 @@ struct dhcp_packet {
#define FQDN_SUBOPTION_COUNT 8
+
#endif
diff --git a/libopie2/opienet/odebugmapper.cpp b/libopie2/opienet/odebugmapper.cpp
index 7e4ab2b..f679afb 100644
--- a/libopie2/opienet/odebugmapper.cpp
+++ b/libopie2/opienet/odebugmapper.cpp
@@ -8,4 +8,10 @@
#include "odebugmapper.h"
+using namespace Opie::Core;
+
+namespace Opie {
+namespace Net {
+namespace Private {
+
DebugMapper::DebugMapper()
{
@@ -213,3 +219,5 @@ const QString& DebugMapper::map( int value ) const
}
-
+}
+}
+}
diff --git a/libopie2/opienet/odebugmapper.h b/libopie2/opienet/odebugmapper.h
index 66b331d..f47db47 100644
--- a/libopie2/opienet/odebugmapper.h
+++ b/libopie2/opienet/odebugmapper.h
@@ -10,4 +10,8 @@
#include <qintdict.h>
+namespace Opie {
+namespace Net {
+namespace Private {
+
typedef QIntDict<QString> IntStringMap;
@@ -21,6 +25,12 @@ class DebugMapper
private:
IntStringMap _map;
+ class Private;
+ Private *d;
};
+}
+}
+}
+
#endif
diff --git a/libopie2/opienet/omanufacturerdb.cpp b/libopie2/opienet/omanufacturerdb.cpp
index b93b752..209ec94 100644
--- a/libopie2/opienet/omanufacturerdb.cpp
+++ b/libopie2/opienet/omanufacturerdb.cpp
@@ -44,4 +44,8 @@
#include <qtextstream.h>
+using namespace Opie::Core;
+namespace Opie {
+namespace Net {
+
OManufacturerDB* OManufacturerDB::_instance = 0;
@@ -134,2 +138,5 @@ const QString& OManufacturerDB::lookupExt( const QString& macaddr ) const
}
+}
+}
+
diff --git a/libopie2/opienet/omanufacturerdb.h b/libopie2/opienet/omanufacturerdb.h
index c2712e5..5c1940e 100644
--- a/libopie2/opienet/omanufacturerdb.h
+++ b/libopie2/opienet/omanufacturerdb.h
@@ -34,4 +34,7 @@
#include <qmap.h>
+namespace Opie {
+namespace Net {
+
/**
* @brief A Ethernet card vendor database.
@@ -64,6 +67,11 @@ class OManufacturerDB
QMap<QString, QString> manufacturersExt;
static OManufacturerDB* _instance;
+ class Private;
+ Private *d;
};
+}
+}
+
#endif
diff --git a/libopie2/opienet/onetutils.cpp b/libopie2/opienet/onetutils.cpp
index 48cfa43..7794334 100644
--- a/libopie2/opienet/onetutils.cpp
+++ b/libopie2/opienet/onetutils.cpp
@@ -38,4 +38,7 @@
#include <stdio.h>
+namespace Opie {
+namespace Net {
+
/*======================================================================================
* OMacAddress
@@ -186,4 +189,7 @@ void OPrivateIOCTL::setParameter( int num, u_int32_t value )
}
+
+
+namespace Private {
/*======================================================================================
* assorted functions
@@ -231,2 +237,5 @@ QString modeToString( int mode )
}
}
+}
+}
+}
diff --git a/libopie2/opienet/onetutils.h b/libopie2/opienet/onetutils.h
index bddfab9..ca6815d 100644
--- a/libopie2/opienet/onetutils.h
+++ b/libopie2/opienet/onetutils.h
@@ -42,4 +42,8 @@
struct ifreq;
+
+namespace Opie {
+namespace Net {
+
class OWirelessNetworkInterface;
@@ -73,4 +77,6 @@ class OMacAddress
friend bool operator==( const OMacAddress &m1, const OMacAddress &m2 );
+ class Private;
+ Private *d;
};
@@ -89,4 +95,7 @@ class OHostAddress : public QHostAddress
~OHostAddress();
*/
+ private:
+ class Private;
+ Private *d;
};
@@ -116,4 +125,6 @@ class OPrivateIOCTL : public QObject
u_int16_t _setargs;
+ class Private;
+ Private *d;
};
@@ -122,7 +133,11 @@ class OPrivateIOCTL : public QObject
*======================================================================================*/
+namespace Private {
void dumpBytes( const unsigned char* data, int num );
QString modeToString( int );
int stringToMode( const QString& );
+}
+}
+}
#define IW_PRIV_TYPE_MASK 0x7000
diff --git a/libopie2/opienet/onetwork.cpp b/libopie2/opienet/onetwork.cpp
index e5b091f..ab3e77f 100644
--- a/libopie2/opienet/onetwork.cpp
+++ b/libopie2/opienet/onetwork.cpp
@@ -58,4 +58,8 @@
#ifndef NODEBUG
#include <opie2/odebugmapper.h>
+
+
+using namespace Opie::Core;
+using namespace Opie::Net::Private;
DebugMapper* debugmapper = new DebugMapper();
#endif
@@ -65,4 +69,6 @@ DebugMapper* debugmapper = new DebugMapper();
*======================================================================================*/
+namespace Opie {
+namespace Net {
ONetwork* ONetwork::_instance = 0;
@@ -1238,2 +1244,5 @@ QString OOrinocoMonitoringInterface::name() const
return "orinoco";
}
+
+}
+}
diff --git a/libopie2/opienet/onetwork.h b/libopie2/opienet/onetwork.h
index 93b129f..a953296 100644
--- a/libopie2/opienet/onetwork.h
+++ b/libopie2/opienet/onetwork.h
@@ -57,4 +57,7 @@
#include <qhostaddress.h>
+namespace Opie {
+namespace Net {
+
class ONetworkInterface;
class OWirelessNetworkInterface;
@@ -124,4 +127,6 @@ class ONetwork : public QObject
static ONetwork* _instance;
InterfaceMap _interfaces;
+ class Private;
+ Private *d;
};
@@ -235,4 +240,7 @@ class ONetworkInterface : public QObject
bool ioctl( int call ) const;
bool ioctl( int call, struct ifreq& ) const;
+ private:
+ class Private;
+ Private *d;
};
@@ -297,4 +305,6 @@ class OChannelHopper : public QObject
QValueList<int> _channels;
QValueList<int>::Iterator _channel;
+ class Private;
+ Private *d;
};
@@ -456,4 +466,6 @@ class OWirelessNetworkInterface : public ONetworkInterface
private:
OChannelHopper* _hopper;
+ class Private;
+ Private *d;
};
@@ -480,4 +492,7 @@ class OMonitoringInterface
OWirelessNetworkInterface* _if;
bool _prismHeader;
+ private:
+ class Private;
+ Private *d;
};
@@ -498,4 +513,7 @@ class OCiscoMonitoringInterface : public OMonitoringInterface
virtual QString name() const;
virtual void setChannel( int );
+ private:
+ class Private;
+ Private *d;
};
@@ -517,4 +535,7 @@ class OWlanNGMonitoringInterface : public OMonitoringInterface
virtual QString name() const;
virtual void setChannel( int );
+ private:
+ class Private;
+ Private *d;
};
@@ -535,4 +556,8 @@ class OHostAPMonitoringInterface : public OMonitoringInterface
virtual void setEnabled( bool );
virtual QString name() const;
+
+ private:
+ class Private;
+ Private *d;
};
@@ -554,6 +579,12 @@ class OOrinocoMonitoringInterface : public OMonitoringInterface
virtual QString name() const;
+ private:
+ class Private;
+ Private *d;
};
+}
+}
+
#endif // ONETWORK_H
diff --git a/libopie2/opienet/opcap.cpp b/libopie2/opienet/opcap.cpp
index fdd519c..4081d4f 100644
--- a/libopie2/opienet/opcap.cpp
+++ b/libopie2/opienet/opcap.cpp
@@ -46,4 +46,9 @@
#include "udp_ports.h"
+using namespace Opie::Core;
+
+namespace Opie {
+namespace Net {
+
/*======================================================================================
* OPacket
@@ -1345,3 +1350,4 @@ QString OPacketCapturer::version() const
}
-
+}
+}
diff --git a/libopie2/opienet/opcap.h b/libopie2/opienet/opcap.h
index b873b49..dc609a3 100644
--- a/libopie2/opienet/opcap.h
+++ b/libopie2/opienet/opcap.h
@@ -65,6 +65,8 @@ typedef struct pcap_pkthdr packetheaderstruct;
/* FORWARDS */
-class OPacketCapturer;
class QSocketNotifier;
+namespace Opie {
+namespace Net {
+class OPacketCapturer;
/*======================================================================================
@@ -142,4 +144,7 @@ class OPacket : public QObject
const unsigned char* _data; // pcap packet data
const unsigned char* _end; // end of pcap packet data
+ private:
+ class Private;
+ Private *d;
};
@@ -164,4 +169,7 @@ class OEthernetPacket : public QObject
private:
const struct ether_header* _ether;
+ private:
+ class Private;
+ Private *d;
};
@@ -182,4 +190,6 @@ class OPrismHeaderPacket : public QObject
private:
const struct prism_hdr* _header;
+ class Private;
+ Private *d;
};
@@ -211,4 +221,6 @@ class OWaveLanPacket : public QObject
private:
const struct ieee_802_11_header* _wlanhdr;
+ class Private;
+ Private *d;
};
@@ -240,4 +252,6 @@ class OWaveLanManagementPacket : public QObject
const struct ieee_802_11_mgmt_header* _header;
const struct ieee_802_11_mgmt_body* _body;
+ class Private;
+ Private *d;
};
@@ -259,4 +273,6 @@ class OWaveLanManagementSSID : public QObject
private:
const struct ssid_t* _data;
+ class Private;
+ Private *d;
};
@@ -275,4 +291,6 @@ class OWaveLanManagementRates : public QObject
private:
const struct rates_t* _data;
+ class Private;
+ Private *d;
};
@@ -291,4 +309,6 @@ class OWaveLanManagementCF : public QObject
private:
const struct cf_t* _data;
+ class Private;
+ Private *d;
};
@@ -307,4 +327,6 @@ class OWaveLanManagementFH : public QObject
private:
const struct fh_t* _data;
+ class Private;
+ Private *d;
};
@@ -325,4 +347,6 @@ class OWaveLanManagementDS : public QObject
private:
const struct ds_t* _data;
+ class Private;
+ Private *d;
};
@@ -341,4 +365,6 @@ class OWaveLanManagementTim : public QObject
private:
const struct tim_t* _data;
+ class Private;
+ Private *d;
};
@@ -357,4 +383,6 @@ class OWaveLanManagementIBSS : public QObject
private:
const struct ibss_t* _data;
+ class Private;
+ Private *d;
};
@@ -373,4 +401,6 @@ class OWaveLanManagementChallenge : public QObject
private:
const struct challenge_t* _data;
+ class Private;
+ Private *d;
};
@@ -389,4 +419,6 @@ class OWaveLanDataPacket : public QObject
private:
const struct ieee_802_11_data_header* _header;
+ class Private;
+ Private *d;
};
@@ -407,4 +439,6 @@ class OWaveLanControlPacket : public QObject
private:
const struct ieee_802_11_control_header* _header;
+ class Private;
+ Private *d;
};
@@ -423,4 +457,6 @@ class OLLCPacket : public QObject
private:
const struct ieee_802_11_802_2_header* _header;
+ class Private;
+ Private *d;
};
@@ -450,4 +486,6 @@ class OIPPacket : public QObject
private:
const struct iphdr* _iphdr;
+ class Private;
+ Private *d;
};
@@ -474,4 +512,6 @@ class OARPPacket : public QObject
private:
const struct myarphdr* _arphdr;
+ class Private;
+ Private *d;
};
@@ -495,4 +535,6 @@ class OUDPPacket : public QObject
private:
const struct udphdr* _udphdr;
+ class Private;
+ Private *d;
};
@@ -523,4 +565,6 @@ class ODHCPPacket : public QObject
const struct dhcp_packet* _dhcphdr;
unsigned char _type;
+ class Private;
+ Private *d;
};
@@ -546,4 +590,6 @@ class OTCPPacket : public QObject
private:
const struct tcphdr* _tcphdr;
+ class Private;
+ Private *d;
};
@@ -666,5 +712,9 @@ class OPacketCapturer : public QObject
mutable char _errbuf[PCAP_ERRBUF_SIZE]; // holds error strings from libpcap
QMap<QString, int> _stats; // statistics;
+ class Private; // Private Forward declaration
+ Private *d; // if we need to add data
};
+}
+}
#endif // OPCAP_H
diff --git a/libopie2/opienet/ostation.cpp b/libopie2/opienet/ostation.cpp
index 8c989d8..140b924 100644
--- a/libopie2/opienet/ostation.cpp
+++ b/libopie2/opienet/ostation.cpp
@@ -32,4 +32,9 @@
#include <opie2/odebug.h>
+
+using namespace Opie::Core;
+
+namespace Opie {
+namespace Net {
/*======================================================================================
* OStation
@@ -63,2 +68,5 @@ void OStation::dump()
qDebug( "ip: %s", (const char*) ipAddress.toString() );
}
+
+}
+} \ No newline at end of file
diff --git a/libopie2/opienet/ostation.h b/libopie2/opienet/ostation.h
index 1e7366d..68f1114 100644
--- a/libopie2/opienet/ostation.h
+++ b/libopie2/opienet/ostation.h
@@ -41,6 +41,10 @@
#include <sys/types.h>
+namespace Opie {
+namespace Net {
+
class OStation;
+
typedef QList<OStation> OStationList;
@@ -67,6 +71,11 @@ class OStation
int channel;
bool encrypted;
+ private:
+ class Private;
+ Private *d;
};
+}
+}
#endif // OSTATION_H