summaryrefslogtreecommitdiff
path: root/libopie2/opienet/onetwork.h
Side-by-side diff
Diffstat (limited to 'libopie2/opienet/onetwork.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opienet/onetwork.h21
1 files changed, 12 insertions, 9 deletions
diff --git a/libopie2/opienet/onetwork.h b/libopie2/opienet/onetwork.h
index b57ac3f..acf2f69 100644
--- a/libopie2/opienet/onetwork.h
+++ b/libopie2/opienet/onetwork.h
@@ -46,12 +46,15 @@
#include <opie2/onetutils.h>
#ifndef IFNAMSIZ
#define IFNAMSIZ 16
#endif
+#ifndef IW_MAX_PRIV_DEF
+#define IW_MAX_PRIV_DEF 128
+#endif
// ML: Yeah, I hate to include kernel headers, but it's necessary here
// ML: Here comes an ugly hack to prevent <linux/wireless.h> including <linux/if.h>
// ML: which conflicts with the user header <net/if.h>
// ML: We really a user header for the Wireless Extensions, something like <net/wireless.h>
// ML: I will drop Jean an mail on that subject
@@ -105,38 +108,36 @@ class ONetwork : public QObject
/*======================================================================================
* ONetworkInterface
*======================================================================================*/
-class ONetworkInterface
+class ONetworkInterface : public QObject
{
friend class OMonitoringInterface;
friend class OCiscoMonitoringInterface;
friend class OWlanNGMonitoringInterface;
friend class OHostAPMonitoringInterface;
friend class OOrinocoMonitoringInterface;
public:
- ONetworkInterface( const QString& name );
+ ONetworkInterface( QObject* parent, const char* name );
virtual ~ONetworkInterface();
- const QString& name() const;
void setMonitoring( OMonitoringInterface* );
OMonitoringInterface* monitoring() const;
bool setPromiscuousMode( bool );
bool promiscuousMode() const;
bool setUp( bool );
bool isUp() const;
bool isLoopback() const;
bool isWireless() const;
QString ipV4Address() const;
OMacAddress macAddress() const;
protected:
- const QString _name;
const int _sfd;
mutable ifreqstruct _ifr;
OMonitoringInterface* _mon;
protected:
ifreqstruct& ifr() const;
@@ -182,13 +183,13 @@ class OWirelessNetworkInterface : public ONetworkInterface
friend class OHostAPMonitoringInterface;
friend class OOrinocoMonitoringInterface;
public:
enum Mode { AdHoc, Managed, Monitor };
- OWirelessNetworkInterface( const QString& name );
+ OWirelessNetworkInterface( QObject* parent, const char* name );
virtual ~OWirelessNetworkInterface();
virtual void setChannel( int ) const;
virtual int channel() const;
virtual double frequency() const;
virtual int channels() const;
@@ -210,21 +211,23 @@ class OWirelessNetworkInterface : public ONetworkInterface
virtual QString associatedAP() const;
virtual void setSSID( const QString& );
virtual QString SSID() const;
protected:
- mutable iwreqstruct _iwr;
- QMap<int,int> _channels;
-
- protected:
+ void buildChannelList();
+ void buildPrivateList();
virtual void init();
iwreqstruct& iwr() const;
bool wioctl( int call ) const;
bool wioctl( int call, iwreqstruct& ) const;
+ protected:
+ mutable iwreqstruct _iwr;
+ QMap<int,int> _channels;
+
private:
OChannelHopper* _hopper;
};
/*======================================================================================