summaryrefslogtreecommitdiff
path: root/libopie2/opienet/onetwork.h
Unidiff
Diffstat (limited to 'libopie2/opienet/onetwork.h') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opienet/onetwork.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/libopie2/opienet/onetwork.h b/libopie2/opienet/onetwork.h
index 10f52b8..d2cc25d 100644
--- a/libopie2/opienet/onetwork.h
+++ b/libopie2/opienet/onetwork.h
@@ -206,57 +206,62 @@ class ONetworkInterface : public QObject
206 OMonitoringInterface* _mon; 206 OMonitoringInterface* _mon;
207 207
208 protected: 208 protected:
209 struct ifreq& ifr() const; 209 struct ifreq& ifr() const;
210 virtual void init(); 210 virtual void init();
211 bool ioctl( int call ) const; 211 bool ioctl( int call ) const;
212 bool ioctl( int call, struct ifreq& ) const; 212 bool ioctl( int call, struct ifreq& ) const;
213}; 213};
214 214
215/*====================================================================================== 215/*======================================================================================
216 * OChannelHopper 216 * OChannelHopper
217 *======================================================================================*/ 217 *======================================================================================*/
218 218
219/** 219/**
220 * @brief A radio frequency channel hopper. 220 * @brief A radio frequency channel hopper.
221 * 221 *
222 * This class provides a channel hopper for radio frequencies. A channel hopper frequently 222 * This class provides a channel hopper for radio frequencies. A channel hopper frequently
223 * changes the radio frequency channel of its associated @ref OWirelessNetworkInterface. 223 * changes the radio frequency channel of its associated @ref OWirelessNetworkInterface.
224 * This is necessary when in monitoring mode and scanning for other devices, because 224 * This is necessary when in monitoring mode and scanning for other devices, because
225 * the radio frequency hardware can only detect packets sent on the same frequency. 225 * the radio frequency hardware can only detect packets sent on the same frequency.
226 * @author Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> 226 * @author Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de>
227 */ 227 */
228class OChannelHopper : public QObject 228class OChannelHopper : public QObject
229{ 229{
230 Q_OBJECT
231
230 public: 232 public:
231 OChannelHopper( OWirelessNetworkInterface* ); 233 OChannelHopper( OWirelessNetworkInterface* );
232 virtual ~OChannelHopper(); 234 virtual ~OChannelHopper();
233 bool isActive() const; 235 bool isActive() const;
234 int channel() const; 236 int channel() const;
235 virtual void timerEvent( QTimerEvent* ); 237 virtual void timerEvent( QTimerEvent* );
236 void setInterval( int ); 238 void setInterval( int );
237 int interval() const; 239 int interval() const;
238 240
241 signals:
242 void hopped( int );
243
239 private: 244 private:
240 OWirelessNetworkInterface* _iface; 245 OWirelessNetworkInterface* _iface;
241 int _interval; 246 int _interval;
242 int _tid; 247 int _tid;
243 QValueList<int> _channels; 248 QValueList<int> _channels;
244 QValueList<int>::Iterator _channel; 249 QValueList<int>::Iterator _channel;
245}; 250};
246 251
247 252
248/*====================================================================================== 253/*======================================================================================
249 * OWirelessNetworkInterface 254 * OWirelessNetworkInterface
250 *======================================================================================*/ 255 *======================================================================================*/
251 256
252/** 257/**
253 * @brief A network interface wrapper for interfaces supporting the wireless extensions protocol. 258 * @brief A network interface wrapper for interfaces supporting the wireless extensions protocol.
254 * 259 *
255 * This class provides a high-level encapsulation of the Linux wireless extension API. 260 * This class provides a high-level encapsulation of the Linux wireless extension API.
256 */ 261 */
257class OWirelessNetworkInterface : public ONetworkInterface 262class OWirelessNetworkInterface : public ONetworkInterface
258{ 263{
259 friend class OMonitoringInterface; 264 friend class OMonitoringInterface;
260 friend class OCiscoMonitoringInterface; 265 friend class OCiscoMonitoringInterface;
261 friend class OWlanNGMonitoringInterface; 266 friend class OWlanNGMonitoringInterface;
262 friend class OHostAPMonitoringInterface; 267 friend class OHostAPMonitoringInterface;
@@ -304,48 +309,52 @@ class OWirelessNetworkInterface : public ONetworkInterface
304 * listening to IEEE 802.11 data and management frames which normally 309 * listening to IEEE 802.11 data and management frames which normally
305 * are handled by the device firmware. This can be used to detect 310 * are handled by the device firmware. This can be used to detect
306 * other wireless network devices, e.g. Access Points or Ad-hoc stations. 311 * other wireless network devices, e.g. Access Points or Ad-hoc stations.
307 * @warning Standard wireless network drives don't support the monitor mode. 312 * @warning Standard wireless network drives don't support the monitor mode.
308 * @warning You need a patched driver for this to work. 313 * @warning You need a patched driver for this to work.
309 * @note Enabling the monitor mode is highly driver dependent and requires 314 * @note Enabling the monitor mode is highly driver dependent and requires
310 * the proper @ref OMonitoringInterface to be associated with the interface. 315 * the proper @ref OMonitoringInterface to be associated with the interface.
311 * @see OMonitoringInterface 316 * @see OMonitoringInterface
312 */ 317 */
313 virtual void setMonitorMode( bool ); 318 virtual void setMonitorMode( bool );
314 /** 319 /**
315 * @returns true if the device is listening in IEEE 802.11 monitor mode 320 * @returns true if the device is listening in IEEE 802.11 monitor mode
316 */ 321 */
317 virtual bool monitorMode() const; 322 virtual bool monitorMode() const;
318 /** 323 /**
319 * Set the channel hopping @a interval. An @a interval of 0 disables channel hopping. 324 * Set the channel hopping @a interval. An @a interval of 0 disables channel hopping.
320 * @see OChannelHopper 325 * @see OChannelHopper
321 */ 326 */
322 virtual void setChannelHopping( int interval = 0 ); 327 virtual void setChannelHopping( int interval = 0 );
323 /** 328 /**
324 * @returns the channel hopping interval or 0, if channel hopping is disabled. 329 * @returns the channel hopping interval or 0, if channel hopping is disabled.
325 */ 330 */
326 virtual int channelHopping() const; 331 virtual int channelHopping() const;
327 /** 332 /**
333 * @returns the @ref OChannelHopper of this interface or 0, if channel hopping has not been activated before
334 */
335 virtual OChannelHopper* channelHopper() const;
336 /**
328 * Set the station @a nickname. 337 * Set the station @a nickname.
329 */ 338 */
330 virtual void setNickName( const QString& nickname ) {}; //FIXME: Implement this 339 virtual void setNickName( const QString& nickname ) {}; //FIXME: Implement this
331 /** 340 /**
332 * @returns the current station nickname. 341 * @returns the current station nickname.
333 */ 342 */
334 virtual QString nickName() const; 343 virtual QString nickName() const;
335 /** 344 /**
336 * Invoke the private IOCTL @a command with a @number of parameters on the network interface. 345 * Invoke the private IOCTL @a command with a @number of parameters on the network interface.
337 * @see OPrivateIOCTL 346 * @see OPrivateIOCTL
338 */ 347 */
339 virtual void setPrivate( const QString& command, int number, ... ); 348 virtual void setPrivate( const QString& command, int number, ... );
340 /** 349 /**
341 * @returns true if the interface is featuring the private IOCTL @command. 350 * @returns true if the interface is featuring the private IOCTL @command.
342 */ 351 */
343 virtual bool hasPrivate( const QString& command ); 352 virtual bool hasPrivate( const QString& command );
344 virtual void getPrivate( const QString& command ); //FIXME: Implement and document this 353 virtual void getPrivate( const QString& command ); //FIXME: Implement and document this
345 354
346 virtual bool isAssociated() const {}; //FIXME: Implement and document this 355 virtual bool isAssociated() const {}; //FIXME: Implement and document this
347 virtual QString associatedAP() const; //FIXME: Implement and document this 356 virtual QString associatedAP() const; //FIXME: Implement and document this
348 357
349 virtual void setSSID( const QString& ); 358 virtual void setSSID( const QString& );
350 virtual QString SSID() const; 359 virtual QString SSID() const;
351 360