summaryrefslogtreecommitdiff
path: root/libopie2/opienet/onetwork.h
authormickeyl <mickeyl>2004-05-01 16:13:43 (UTC)
committer mickeyl <mickeyl>2004-05-01 16:13:43 (UTC)
commitd5abd7878f553f5ac0a41966b27f4c09389d3cfd (patch) (unidiff)
tree3140d1d1fe012c03c6c26bc587faeea5501f0b28 /libopie2/opienet/onetwork.h
parent5a64ec5a21bb254c0e6a57e379cd1afc25259f19 (diff)
downloadopie-d5abd7878f553f5ac0a41966b27f4c09389d3cfd.zip
opie-d5abd7878f553f5ac0a41966b27f4c09389d3cfd.tar.gz
opie-d5abd7878f553f5ac0a41966b27f4c09389d3cfd.tar.bz2
- fix off-by-one bug in OChannelHopper
- fix bug in OPacket which broke everything using it - expose both wireless extension versions (runtime + compile time) through API
Diffstat (limited to 'libopie2/opienet/onetwork.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opienet/onetwork.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/libopie2/opienet/onetwork.h b/libopie2/opienet/onetwork.h
index f5fbe1d..a49c8fb 100644
--- a/libopie2/opienet/onetwork.h
+++ b/libopie2/opienet/onetwork.h
@@ -104,49 +104,49 @@ class ONetwork : public QObject
104 */ 104 */
105 InterfaceIterator iterator() const; 105 InterfaceIterator iterator() const;
106 /** 106 /**
107 * @returns true, if the @a interface is present. 107 * @returns true, if the @a interface is present.
108 */ 108 */
109 bool isPresent( const char* interface ) const; 109 bool isPresent( const char* interface ) const;
110 /** 110 /**
111 * @returns true, if the @a interface supports the wireless extension protocol. 111 * @returns true, if the @a interface supports the wireless extension protocol.
112 */ 112 */
113 bool isWirelessInterface( const char* interface ) const; 113 bool isWirelessInterface( const char* interface ) const;
114 /** 114 /**
115 * @returns a pointer to the @ref ONetworkInterface object for the specified @a interface or 0, if not found. 115 * @returns a pointer to the @ref ONetworkInterface object for the specified @a interface or 0, if not found.
116 * @see ONetworkInterface 116 * @see ONetworkInterface
117 */ 117 */
118 ONetworkInterface* interface( const QString& interface ) const; 118 ONetworkInterface* interface( const QString& interface ) const;
119 /** 119 /**
120 * @internal Rebuild the internal interface database 120 * @internal Rebuild the internal interface database
121 * @note Sometimes it might be useful to call this from client code, 121 * @note Sometimes it might be useful to call this from client code,
122 * e.g. after issuing a cardctl insert 122 * e.g. after issuing a cardctl insert
123 */ 123 */
124 void synchronize(); 124 void synchronize();
125 /** 125 /**
126 * @returns the wireless extension version used at compile time. 126 * @returns the wireless extension version used at compile time.
127 **/ 127 **/
128 static short wirelessExtensionVersion(); 128 static short wirelessExtensionCompileVersion();
129 129
130 protected: 130 protected:
131 ONetwork(); 131 ONetwork();
132 132
133 private: 133 private:
134 static ONetwork* _instance; 134 static ONetwork* _instance;
135 InterfaceMap _interfaces; 135 InterfaceMap _interfaces;
136 class Private; 136 class Private;
137 Private *d; 137 Private *d;
138}; 138};
139 139
140 140
141/*====================================================================================== 141/*======================================================================================
142 * ONetworkInterface 142 * ONetworkInterface
143 *======================================================================================*/ 143 *======================================================================================*/
144 144
145/** 145/**
146 * @brief A network interface wrapper. 146 * @brief A network interface wrapper.
147 * 147 *
148 * This class provides a wrapper for a network interface. All the cumbersume details of 148 * This class provides a wrapper for a network interface. All the cumbersume details of
149 * Linux ioctls are hidden under a convenient high-level interface. 149 * Linux ioctls are hidden under a convenient high-level interface.
150 * @warning Most of the setting methods contained in this class require the appropriate 150 * @warning Most of the setting methods contained in this class require the appropriate
151 * process permissions to work. 151 * process permissions to work.
152 * 152 *
@@ -430,50 +430,54 @@ class OWirelessNetworkInterface : public ONetworkInterface
430 * @returns the MAC address of the Access Point if the device is in infrastructure mode. 430 * @returns the MAC address of the Access Point if the device is in infrastructure mode.
431 * @returns a (more or less random) cell ID address if the device is in adhoc mode. 431 * @returns a (more or less random) cell ID address if the device is in adhoc mode.
432 */ 432 */
433 virtual OMacAddress associatedAP() const; 433 virtual OMacAddress associatedAP() const;
434 /** 434 /**
435 * Set the @a ssid (Service Set ID) string. This is used to decide 435 * Set the @a ssid (Service Set ID) string. This is used to decide
436 * which network to associate with (use "any" to let the driver decide). 436 * which network to associate with (use "any" to let the driver decide).
437 */ 437 */
438 virtual void setSSID( const QString& ssid ); 438 virtual void setSSID( const QString& ssid );
439 /** 439 /**
440 * @returns the current SSID (Service Set ID). 440 * @returns the current SSID (Service Set ID).
441 */ 441 */
442 virtual QString SSID() const; 442 virtual QString SSID() const;
443 /** 443 /**
444 * Perform scanning the wireless network neighbourhood. 444 * Perform scanning the wireless network neighbourhood.
445 * @note: UNSTABLE API - UNDER CONSTRUCTION - DON'T USE! 445 * @note: UNSTABLE API - UNDER CONSTRUCTION - DON'T USE!
446 */ 446 */
447 virtual OStationList* scanNetwork(); 447 virtual OStationList* scanNetwork();
448 /** 448 /**
449 * @return signal strength to associated neighbour (in percent). 449 * @return signal strength to associated neighbour (in percent).
450 * In infrastructure mode, this is the signal strength of the Access Point. 450 * In infrastructure mode, this is the signal strength of the Access Point.
451 * In other modes the result is driver dependent. 451 * In other modes the result is driver dependent.
452 */ 452 */
453 virtual int signalStrength() const; 453 virtual int signalStrength() const;
454 /** @internal commit pending changes to the driver 454 /**
455 * 455 * @returns the wireless extension version used by the interface driver.
456 **/
457 short wirelessExtensionDriverVersion() const;
458 /**
459 * @internal commit pending changes to the driver
456 */ 460 */
457 void commit() const; 461 void commit() const;
458 462
459 protected: 463 protected:
460 void buildInformation(); 464 void buildInformation();
461 void buildPrivateList(); 465 void buildPrivateList();
462 void dumpInformation() const; 466 void dumpInformation() const;
463 virtual void init(); 467 virtual void init();
464 struct iwreq& iwr() const; 468 struct iwreq& iwr() const;
465 bool wioctl( int call ) const; 469 bool wioctl( int call ) const;
466 bool wioctl( int call, struct iwreq& ) const; 470 bool wioctl( int call, struct iwreq& ) const;
467 471
468 protected: 472 protected:
469 mutable struct iwreq _iwr; 473 mutable struct iwreq _iwr;
470 QMap<int,int> _channels; 474 QMap<int,int> _channels;
471 struct iw_range _range; 475 struct iw_range _range;
472 476
473 private: 477 private:
474 OChannelHopper* _hopper; 478 OChannelHopper* _hopper;
475 class Private; 479 class Private;
476 Private *d; 480 Private *d;
477}; 481};
478 482
479 483