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
@@ -352,25 +352,25 @@ class OWirelessNetworkInterface : public ONetworkInterface
352 virtual QString mode() const; 352 virtual QString mode() const;
353 /** 353 /**
354 * Setting the monitor mode on a wireless network interface enables 354 * Setting the monitor mode on a wireless network interface enables
355 * listening to IEEE 802.11 data and management frames which normally 355 * listening to IEEE 802.11 data and management frames which normally
356 * are handled by the device firmware. This can be used to detect 356 * are handled by the device firmware. This can be used to detect
357 * other wireless network devices, e.g. Access Points or Ad-hoc stations. 357 * other wireless network devices, e.g. Access Points or Ad-hoc stations.
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.
371 * @see OChannelHopper 371 * @see OChannelHopper
372 */ 372 */
373 virtual void setChannelHopping( int interval = 0 ); 373 virtual void setChannelHopping( int interval = 0 );
374 /** 374 /**
375 * @returns the channel hopping interval or 0, if channel hopping is disabled. 375 * @returns the channel hopping interval or 0, if channel hopping is disabled.
376 */ 376 */
@@ -388,53 +388,62 @@ class OWirelessNetworkInterface : public ONetworkInterface
388 */ 388 */
389 virtual QString nickName() const; 389 virtual QString nickName() const;
390 /** 390 /**
391 * Invoke the private IOCTL @a command with a @number of parameters on the network interface. 391 * Invoke the private IOCTL @a command with a @number of parameters on the network interface.
392 * @see OPrivateIOCTL 392 * @see OPrivateIOCTL
393 */ 393 */
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
435/*====================================================================================== 444/*======================================================================================
436 * OMonitoringInterface 445 * OMonitoringInterface
437 *======================================================================================*/ 446 *======================================================================================*/
438 447
439 448
440class OMonitoringInterface 449class OMonitoringInterface
@@ -466,60 +475,66 @@ class OMonitoringInterface
466class OCiscoMonitoringInterface : public OMonitoringInterface 475class OCiscoMonitoringInterface : public OMonitoringInterface
467{ 476{
468 public: 477 public:
469 OCiscoMonitoringInterface( ONetworkInterface*, bool _prismHeader ); 478 OCiscoMonitoringInterface( ONetworkInterface*, bool _prismHeader );
470 virtual ~OCiscoMonitoringInterface(); 479 virtual ~OCiscoMonitoringInterface();
471 480
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
488 public: 499 public:
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
520 public: 535 public:
521 virtual void setChannel( int ); 536 virtual void setChannel( int );
522 virtual void setEnabled( bool ); 537 virtual void setEnabled( bool );
523 virtual QString name() const; 538 virtual QString name() const;
524 539
525}; 540};