author | mickeyl <mickeyl> | 2003-04-03 14:17:03 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-04-03 14:17:03 (UTC) |
commit | f62005c53c93148eaa13eac50ea6814a41afb216 (patch) (side-by-side diff) | |
tree | 93e7e626205fd9d06b5ac7c29e78be52ce749e5d /libopie2/opienet/onetwork.h | |
parent | e9eeb493c75bfe6078f40952e85e859fb71fe970 (diff) | |
download | opie-f62005c53c93148eaa13eac50ea6814a41afb216.zip opie-f62005c53c93148eaa13eac50ea6814a41afb216.tar.gz opie-f62005c53c93148eaa13eac50ea6814a41afb216.tar.bz2 |
- ONetworkInterfaces are now QObjects
- add support for private IOCTLS
- make buildChannelList() more safe in case of faulty drivers
-rw-r--r-- | libopie2/opienet/onetwork.h | 21 |
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 @@ -50,4 +50,7 @@ #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 @@ -109,5 +112,5 @@ class ONetwork : public QObject *======================================================================================*/ -class ONetworkInterface +class ONetworkInterface : public QObject { friend class OMonitoringInterface; @@ -118,8 +121,7 @@ class ONetworkInterface public: - ONetworkInterface( const QString& name ); + ONetworkInterface( QObject* parent, const char* name ); virtual ~ONetworkInterface(); - const QString& name() const; void setMonitoring( OMonitoringInterface* ); OMonitoringInterface* monitoring() const; @@ -134,5 +136,4 @@ class ONetworkInterface protected: - const QString _name; const int _sfd; mutable ifreqstruct _ifr; @@ -186,5 +187,5 @@ class OWirelessNetworkInterface : public ONetworkInterface enum Mode { AdHoc, Managed, Monitor }; - OWirelessNetworkInterface( const QString& name ); + OWirelessNetworkInterface( QObject* parent, const char* name ); virtual ~OWirelessNetworkInterface(); @@ -214,8 +215,6 @@ class OWirelessNetworkInterface : public ONetworkInterface protected: - mutable iwreqstruct _iwr; - QMap<int,int> _channels; - - protected: + void buildChannelList(); + void buildPrivateList(); virtual void init(); iwreqstruct& iwr() const; @@ -223,4 +222,8 @@ class OWirelessNetworkInterface : public ONetworkInterface bool wioctl( int call, iwreqstruct& ) const; + protected: + mutable iwreqstruct _iwr; + QMap<int,int> _channels; + private: OChannelHopper* _hopper; |