summaryrefslogtreecommitdiff
path: root/libopie2/opienet/onetwork.h
Unidiff
Diffstat (limited to 'libopie2/opienet/onetwork.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opienet/onetwork.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/libopie2/opienet/onetwork.h b/libopie2/opienet/onetwork.h
index 4cadbeb..e249aee 100644
--- a/libopie2/opienet/onetwork.h
+++ b/libopie2/opienet/onetwork.h
@@ -54,28 +54,24 @@
54#endif 54#endif
55 55
56// ML: Yeah, I hate to include kernel headers, but it's necessary here 56// ML: Yeah, I hate to include kernel headers, but it's necessary here
57// ML: Here comes an ugly hack to prevent <linux/wireless.h> including <linux/if.h> 57// ML: Here comes an ugly hack to prevent <linux/wireless.h> including <linux/if.h>
58// ML: which conflicts with the user header <net/if.h> 58// ML: which conflicts with the user header <net/if.h>
59// ML: We really a user header for the Wireless Extensions, something like <net/wireless.h> 59// ML: We really a user header for the Wireless Extensions, something like <net/wireless.h>
60// ML: I will drop Jean an mail on that subject 60// ML: I will drop Jean an mail on that subject
61 61
62#include <net/if.h> 62#include <net/if.h>
63#define _LINUX_IF_H 63#define _LINUX_IF_H
64#include <linux/wireless.h> 64#include <linux/wireless.h>
65 65
66#ifndef SIOCIWFIRSTPRIV
67#define SIOCIWFIRSTPRIV SIOCDEVPRIVATE
68#endif
69
70class ONetworkInterface; 66class ONetworkInterface;
71class OWirelessNetworkInterface; 67class OWirelessNetworkInterface;
72class OChannelHopper; 68class OChannelHopper;
73class OMonitoringInterface; 69class OMonitoringInterface;
74 70
75/*====================================================================================== 71/*======================================================================================
76 * ONetwork 72 * ONetwork
77 *======================================================================================*/ 73 *======================================================================================*/
78 74
79class ONetwork : public QObject 75class ONetwork : public QObject
80{ 76{
81 Q_OBJECT 77 Q_OBJECT
@@ -116,24 +112,25 @@ class ONetworkInterface : public QObject
116 ONetworkInterface( QObject* parent, const char* name ); 112 ONetworkInterface( QObject* parent, const char* name );
117 virtual ~ONetworkInterface(); 113 virtual ~ONetworkInterface();
118 114
119 void setMonitoring( OMonitoringInterface* ); 115 void setMonitoring( OMonitoringInterface* );
120 OMonitoringInterface* monitoring() const; 116 OMonitoringInterface* monitoring() const;
121 bool setPromiscuousMode( bool ); 117 bool setPromiscuousMode( bool );
122 bool promiscuousMode() const; 118 bool promiscuousMode() const;
123 bool setUp( bool ); 119 bool setUp( bool );
124 bool isUp() const; 120 bool isUp() const;
125 bool isLoopback() const; 121 bool isLoopback() const;
126 bool isWireless() const; 122 bool isWireless() const;
127 QString ipV4Address() const; 123 QString ipV4Address() const;
124 void setMacAddress( const OMacAddress& );
128 OMacAddress macAddress() const; 125 OMacAddress macAddress() const;
129 int dataLinkType() const; 126 int dataLinkType() const;
130 127
131 protected: 128 protected:
132 const int _sfd; 129 const int _sfd;
133 mutable ifreq _ifr; 130 mutable ifreq _ifr;
134 OMonitoringInterface* _mon; 131 OMonitoringInterface* _mon;
135 132
136 protected: 133 protected:
137 struct ifreq& ifr() const; 134 struct ifreq& ifr() const;
138 virtual void init(); 135 virtual void init();
139 bool ioctl( int call ) const; 136 bool ioctl( int call ) const;
@@ -195,24 +192,25 @@ class OWirelessNetworkInterface : public ONetworkInterface
195 virtual bool mode() const {}; 192 virtual bool mode() const {};
196 193
197 virtual void setMonitorMode( bool ); 194 virtual void setMonitorMode( bool );
198 virtual bool monitorMode() const; 195 virtual bool monitorMode() const;
199 196
200 virtual void setChannelHopping( int interval = 0 ); 197 virtual void setChannelHopping( int interval = 0 );
201 virtual int channelHopping() const; 198 virtual int channelHopping() const;
202 199
203 virtual void setNickName( const QString& ) {}; 200 virtual void setNickName( const QString& ) {};
204 virtual QString nickName() const; 201 virtual QString nickName() const;
205 202
206 virtual void setPrivate( const QString&, int, ... ); 203 virtual void setPrivate( const QString&, int, ... );
204 virtual bool hasPrivate( const QString& );
207 virtual void getPrivate( const QString& ); 205 virtual void getPrivate( const QString& );
208 206
209 virtual bool isAssociated() const {}; 207 virtual bool isAssociated() const {};
210 virtual QString associatedAP() const; 208 virtual QString associatedAP() const;
211 209
212 virtual void setSSID( const QString& ); 210 virtual void setSSID( const QString& );
213 virtual QString SSID() const; 211 virtual QString SSID() const;
214 212
215 protected: 213 protected:
216 void buildChannelList(); 214 void buildChannelList();
217 void buildPrivateList(); 215 void buildPrivateList();
218 virtual void init(); 216 virtual void init();
@@ -240,25 +238,25 @@ class OMonitoringInterface
240 OMonitoringInterface(); 238 OMonitoringInterface();
241 OMonitoringInterface( ONetworkInterface* ); 239 OMonitoringInterface( ONetworkInterface* );
242 virtual ~OMonitoringInterface(); 240 virtual ~OMonitoringInterface();
243 241
244 public: 242 public:
245 virtual void setEnabled( bool ); 243 virtual void setEnabled( bool );
246 virtual bool enabled() const; 244 virtual bool enabled() const;
247 virtual void setChannel( int ); 245 virtual void setChannel( int );
248 246
249 virtual QString name() const = 0; 247 virtual QString name() const = 0;
250 248
251 protected: 249 protected:
252 const OWirelessNetworkInterface* _if; 250 OWirelessNetworkInterface* _if;
253 251
254}; 252};
255 253
256 254
257/*====================================================================================== 255/*======================================================================================
258 * OCiscoMonitoring 256 * OCiscoMonitoring
259 *======================================================================================*/ 257 *======================================================================================*/
260 258
261 259
262class OCiscoMonitoringInterface : public OMonitoringInterface 260class OCiscoMonitoringInterface : public OMonitoringInterface
263{ 261{
264 public: 262 public: