author | mickeyl <mickeyl> | 2003-04-04 10:31:26 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-04-04 10:31:26 (UTC) |
commit | 089385bb8ab768fbf6f394f326e565e3589163fc (patch) (side-by-side diff) | |
tree | 23891b81b11310186c43179612531bc92e52ae65 /libopie2/opienet/onetwork.h | |
parent | 7da7e9cbfb52988ce801310f66b1336e0809db28 (diff) | |
download | opie-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.
-rw-r--r-- | libopie2/opienet/onetwork.h | 19 |
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 @@ -74,9 +74,2 @@ 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; - /*====================================================================================== @@ -138,3 +131,3 @@ class ONetworkInterface : public QObject const int _sfd; - mutable ifreqstruct _ifr; + mutable ifreq _ifr; OMonitoringInterface* _mon; @@ -142,6 +135,6 @@ class ONetworkInterface : public QObject 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; }; @@ -224,8 +217,8 @@ class OWirelessNetworkInterface : public ONetworkInterface 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; |