summaryrefslogtreecommitdiff
path: root/libopie2/opienet/onetwork.h
authormickeyl <mickeyl>2003-10-11 23:54:03 (UTC)
committer mickeyl <mickeyl>2003-10-11 23:54:03 (UTC)
commita8fe3ba1544ca2a2ad2559e3094acbb284cc7783 (patch) (unidiff)
treeef60fa83b396d16580f5ce7ab2b5c147fbceeabf /libopie2/opienet/onetwork.h
parente6273e146d3ef3f9387fbc3b6a214f9b3d08221e (diff)
downloadopie-a8fe3ba1544ca2a2ad2559e3094acbb284cc7783.zip
opie-a8fe3ba1544ca2a2ad2559e3094acbb284cc7783.tar.gz
opie-a8fe3ba1544ca2a2ad2559e3094acbb284cc7783.tar.bz2
add scanning skeleton (wip)
Diffstat (limited to 'libopie2/opienet/onetwork.h') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opienet/onetwork.h29
1 files changed, 22 insertions, 7 deletions
diff --git a/libopie2/opienet/onetwork.h b/libopie2/opienet/onetwork.h
index b170ea2..e1545dd 100644
--- a/libopie2/opienet/onetwork.h
+++ b/libopie2/opienet/onetwork.h
@@ -358,13 +358,13 @@ class OWirelessNetworkInterface : public ONetworkInterface
358 * @warning Standard wireless network drives don't support the monitor mode. 358 * @warning Standard wireless network drives don't support the monitor mode.
359 * @warning You need a patched driver for this to work. 359 * @warning You need a patched driver for this to work.
360 * @note Enabling the monitor mode is highly driver dependent and requires 360 * @note Enabling the monitor mode is highly driver dependent and requires
361 * the proper @ref OMonitoringInterface to be associated with the interface. 361 * the proper @ref OMonitoringInterface to be associated with the interface.
362 * @see OMonitoringInterface 362 * @see OMonitoringInterface
363 */ 363 */
364 virtual void setMonitorMode( bool ); //FIXME: ==> setMode( "monitor" ); 364 virtual void setMonitorMode( bool ); //FIXME: ==> setMode( "monitor" ); Use IW_MONITOR first, if this doesn't work, then use iwpriv!
365 /** 365 /**
366 * @returns true if the device is listening in IEEE 802.11 monitor mode 366 * @returns true if the device is listening in IEEE 802.11 monitor mode
367 */ 367 */
368 virtual bool monitorMode() const; //FIXME: ==> mode() 368 virtual bool monitorMode() const; //FIXME: ==> mode()
369 /** 369 /**
370 * Set the channel hopping @a interval. An @a interval of 0 disables channel hopping. 370 * Set the channel hopping @a interval. An @a interval of 0 disables channel hopping.
@@ -394,41 +394,50 @@ class OWirelessNetworkInterface : public ONetworkInterface
394 virtual void setPrivate( const QString& command, int number, ... ); 394 virtual void setPrivate( const QString& command, int number, ... );
395 /** 395 /**
396 * @returns true if the interface is featuring the private IOCTL @command. 396 * @returns true if the interface is featuring the private IOCTL @command.
397 */ 397 */
398 virtual bool hasPrivate( const QString& command ); 398 virtual bool hasPrivate( const QString& command );
399 virtual void getPrivate( const QString& command ); //FIXME: Implement and document this 399 virtual void getPrivate( const QString& command ); //FIXME: Implement and document this
400
401 virtual bool isAssociated() const {}; //FIXME: Implement and document this
402 /** 400 /**
403 * @returns the MAC address of the Access Point if the 401 * @returns true if the interface is associated to an access point
404 * device is in infrastructure mode. @returns a (more or less random) CELL 402 * @note: This information is only valid if the interface is in managed mode.
405 * address if the device is in adhoc mode. 403 */
404 virtual bool isAssociated() const;
405 /**
406 * @returns the MAC address of the Access Point if the device is in infrastructure mode.
407 * @returns a (more or less random) cell ID address if the device is in adhoc mode.
406 */ 408 */
407 virtual QString associatedAP() const; 409 virtual QString associatedAP() const;
408 /** 410 /**
409 * Set the @a ssid (Service Set ID) string. This is used to decide 411 * Set the @a ssid (Service Set ID) string. This is used to decide
410 * which network to associate with (use "any" to let the driver decide). 412 * which network to associate with (use "any" to let the driver decide).
411 */ 413 */
412 virtual void setSSID( const QString& ssid ); 414 virtual void setSSID( const QString& ssid );
413 /** 415 /**
414 * @returns the current SSID (Service Set ID). 416 * @returns the current SSID (Service Set ID).
415 */ 417 */
416 virtual QString SSID() const; 418 virtual QString SSID() const;
419 /**
420 * Perform scanning the wireless network neighbourhood.
421 * @note: UNSTABLE API - UNDER CONSTRUCTION - DON'T USE!
422 */
423 virtual int scanNetwork();
417 424
418 protected: 425 protected:
419 void buildChannelList(); 426 void buildInformation();
420 void buildPrivateList(); 427 void buildPrivateList();
428 void dumpInformation() const;
421 virtual void init(); 429 virtual void init();
422 struct iwreq& iwr() const; 430 struct iwreq& iwr() const;
423 bool wioctl( int call ) const; 431 bool wioctl( int call ) const;
424 bool wioctl( int call, struct iwreq& ) const; 432 bool wioctl( int call, struct iwreq& ) const;
425 433
426 protected: 434 protected:
427 mutable struct iwreq _iwr; 435 mutable struct iwreq _iwr;
428 QMap<int,int> _channels; 436 QMap<int,int> _channels;
437 struct iw_range _range;
429 438
430 private: 439 private:
431 OChannelHopper* _hopper; 440 OChannelHopper* _hopper;
432}; 441};
433 442
434 443
@@ -472,16 +481,18 @@ class OCiscoMonitoringInterface : public OMonitoringInterface
472 virtual void setEnabled( bool ); 481 virtual void setEnabled( bool );
473 virtual QString name() const; 482 virtual QString name() const;
474 virtual void setChannel( int ); 483 virtual void setChannel( int );
475 484
476}; 485};
477 486
487
478/*====================================================================================== 488/*======================================================================================
479 * OWlanNGMonitoringInterface 489 * OWlanNGMonitoringInterface
480 *======================================================================================*/ 490 *======================================================================================*/
481 491
492
482class OWlanNGMonitoringInterface : public OMonitoringInterface 493class OWlanNGMonitoringInterface : public OMonitoringInterface
483{ 494{
484 public: 495 public:
485 OWlanNGMonitoringInterface( ONetworkInterface*, bool _prismHeader ); 496 OWlanNGMonitoringInterface( ONetworkInterface*, bool _prismHeader );
486 virtual ~OWlanNGMonitoringInterface(); 497 virtual ~OWlanNGMonitoringInterface();
487 498
@@ -489,31 +500,35 @@ class OWlanNGMonitoringInterface : public OMonitoringInterface
489 virtual void setEnabled( bool ); 500 virtual void setEnabled( bool );
490 virtual QString name() const; 501 virtual QString name() const;
491 virtual void setChannel( int ); 502 virtual void setChannel( int );
492 503
493}; 504};
494 505
506
495/*====================================================================================== 507/*======================================================================================
496 * OHostAPMonitoringInterface 508 * OHostAPMonitoringInterface
497 *======================================================================================*/ 509 *======================================================================================*/
498 510
511
499class OHostAPMonitoringInterface : public OMonitoringInterface 512class OHostAPMonitoringInterface : public OMonitoringInterface
500{ 513{
501 public: 514 public:
502 OHostAPMonitoringInterface( ONetworkInterface*, bool _prismHeader ); 515 OHostAPMonitoringInterface( ONetworkInterface*, bool _prismHeader );
503 virtual ~OHostAPMonitoringInterface(); 516 virtual ~OHostAPMonitoringInterface();
504 517
505 public: 518 public:
506 virtual void setEnabled( bool ); 519 virtual void setEnabled( bool );
507 virtual QString name() const; 520 virtual QString name() const;
508 }; 521 };
509 522
523
510/*====================================================================================== 524/*======================================================================================
511 * OOrinocoMonitoringInterface 525 * OOrinocoMonitoringInterface
512 *======================================================================================*/ 526 *======================================================================================*/
513 527
528
514class OOrinocoMonitoringInterface : public OMonitoringInterface 529class OOrinocoMonitoringInterface : public OMonitoringInterface
515{ 530{
516 public: 531 public:
517 OOrinocoMonitoringInterface( ONetworkInterface*, bool _prismHeader ); 532 OOrinocoMonitoringInterface( ONetworkInterface*, bool _prismHeader );
518 virtual ~OOrinocoMonitoringInterface(); 533 virtual ~OOrinocoMonitoringInterface();
519 534