summaryrefslogtreecommitdiff
path: root/libopie2/opienet/onetwork.h
authormickeyl <mickeyl>2003-04-04 10:31:26 (UTC)
committer mickeyl <mickeyl>2003-04-04 10:31:26 (UTC)
commit089385bb8ab768fbf6f394f326e565e3589163fc (patch) (side-by-side diff)
tree23891b81b11310186c43179612531bc92e52ae65 /libopie2/opienet/onetwork.h
parent7da7e9cbfb52988ce801310f66b1336e0809db28 (diff)
downloadopie-089385bb8ab768fbf6f394f326e565e3589163fc.zip
opie-089385bb8ab768fbf6f394f326e565e3589163fc.tar.gz
opie-089385bb8ab768fbf6f394f326e565e3589163fc.tar.bz2
low-level network programming is sick. some wlan-drivers don't honor struct sizes
and simply write bytes _after_ the struct... this patch makes calling SIOCGIWRANGE more failure-proof.
Diffstat (limited to 'libopie2/opienet/onetwork.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opienet/onetwork.h19
1 files changed, 6 insertions, 13 deletions
diff --git a/libopie2/opienet/onetwork.h b/libopie2/opienet/onetwork.h
index 7c70873..509c3db 100644
--- a/libopie2/opienet/onetwork.h
+++ b/libopie2/opienet/onetwork.h
@@ -72,13 +72,6 @@ class OWirelessNetworkInterface;
class OChannelHopper;
class OMonitoringInterface;
-typedef struct ifreq ifreqstruct;
-typedef struct iwreq iwreqstruct;
-typedef struct iw_event iweventstruct;
-typedef struct iw_freq iwfreqstruct;
-typedef struct iw_priv_args iwprivargsstruct;
-typedef struct iw_range iwrangestruct;
-
/*======================================================================================
* ONetwork
*======================================================================================*/
@@ -136,14 +129,14 @@ class ONetworkInterface : public QObject
protected:
const int _sfd;
- mutable ifreqstruct _ifr;
+ mutable ifreq _ifr;
OMonitoringInterface* _mon;
protected:
- ifreqstruct& ifr() const;
+ struct ifreq& ifr() const;
virtual void init();
bool ioctl( int call ) const;
- bool ioctl( int call, ifreqstruct& ) const;
+ bool ioctl( int call, struct ifreq& ) const;
};
/*======================================================================================
@@ -222,12 +215,12 @@ class OWirelessNetworkInterface : public ONetworkInterface
void buildChannelList();
void buildPrivateList();
virtual void init();
- iwreqstruct& iwr() const;
+ struct iwreq& iwr() const;
bool wioctl( int call ) const;
- bool wioctl( int call, iwreqstruct& ) const;
+ bool wioctl( int call, struct iwreq& ) const;
protected:
- mutable iwreqstruct _iwr;
+ mutable struct iwreq _iwr;
QMap<int,int> _channels;
private: