author | mickeyl <mickeyl> | 2003-04-30 18:42:07 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-04-30 18:42:07 (UTC) |
commit | 027458b66cffbfaf07c394a1a622a1f01970e11c (patch) (unidiff) | |
tree | 9cfbbfcebf60c2515719c0e9e2957cc18271dbe5 /libopie2/opienet | |
parent | 30aac378ab13a7dffbd3b6a0978cabc0372cd530 (diff) | |
download | opie-027458b66cffbfaf07c394a1a622a1f01970e11c.zip opie-027458b66cffbfaf07c394a1a622a1f01970e11c.tar.gz opie-027458b66cffbfaf07c394a1a622a1f01970e11c.tar.bz2 |
add some more documentation
-rw-r--r-- | libopie2/opienet/onetwork.h | 30 | ||||
-rw-r--r-- | libopie2/opienet/opcap.h | 5 |
2 files changed, 28 insertions, 7 deletions
diff --git a/libopie2/opienet/onetwork.h b/libopie2/opienet/onetwork.h index 2348bbc..f052317 100644 --- a/libopie2/opienet/onetwork.h +++ b/libopie2/opienet/onetwork.h | |||
@@ -108,17 +108,17 @@ class ONetwork : public QObject | |||
108 | * @returns a pointer to the @ref ONetworkInterface object for the specified @p interface or 0, if not found | 108 | * @returns a pointer to the @ref ONetworkInterface object for the specified @p interface or 0, if not found |
109 | * @see ONetworkInterface | 109 | * @see ONetworkInterface |
110 | */ | 110 | */ |
111 | // FIXME: const QString& is prefered over QString!!! -zecke | 111 | // FIXME: const QString& is prefered over QString!!! -zecke |
112 | ONetworkInterface* interface( const QString& interface ) const; | 112 | ONetworkInterface* interface( const QString& interface ) const; |
113 | /** | 113 | /** |
114 | * @internal Rebuild the internal interface database | 114 | * @internal Rebuild the internal interface database |
115 | * @note Sometimes it might be useful to call this from client code, | 115 | * @note Sometimes it might be useful to call this from client code, |
116 | * e.g. after cardctl insert | 116 | * e.g. after issuing a cardctl insert |
117 | */ | 117 | */ |
118 | void synchronize(); | 118 | void synchronize(); |
119 | 119 | ||
120 | protected: | 120 | protected: |
121 | ONetwork(); | 121 | ONetwork(); |
122 | 122 | ||
123 | private: | 123 | private: |
124 | static ONetwork* _instance; | 124 | static ONetwork* _instance; |
@@ -248,27 +248,51 @@ class ONetworkInterface : public QObject | |||
248 | * the radio frequency hardware can only detect packets sent on the same frequency. | 248 | * the radio frequency hardware can only detect packets sent on the same frequency. |
249 | * @author Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> | 249 | * @author Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de> |
250 | */ | 250 | */ |
251 | class OChannelHopper : public QObject | 251 | class OChannelHopper : public QObject |
252 | { | 252 | { |
253 | Q_OBJECT | 253 | Q_OBJECT |
254 | 254 | ||
255 | public: | 255 | public: |
256 | /** | ||
257 | * Constructor. | ||
258 | */ | ||
256 | OChannelHopper( OWirelessNetworkInterface* ); | 259 | OChannelHopper( OWirelessNetworkInterface* ); |
260 | /** | ||
261 | * Destructor. | ||
262 | */ | ||
257 | virtual ~OChannelHopper(); | 263 | virtual ~OChannelHopper(); |
264 | /** | ||
265 | * @returns true, if the channel hopper is hopping channels | ||
266 | */ | ||
258 | bool isActive() const; | 267 | bool isActive() const; |
268 | /** | ||
269 | * @returns the last hopped channel | ||
270 | */ | ||
259 | int channel() const; | 271 | int channel() const; |
260 | virtual void timerEvent( QTimerEvent* ); | 272 | /** |
261 | void setInterval( int ); | 273 | * Set the channel hopping @a interval. |
274 | * An interval of 0 deactivates the channel hopper. | ||
275 | */ | ||
276 | void setInterval( int interval ); | ||
277 | /** | ||
278 | * @returns the channel hopping interval | ||
279 | */ | ||
262 | int interval() const; | 280 | int interval() const; |
263 | 281 | ||
264 | signals: | 282 | signals: |
283 | /** | ||
284 | * This signal is emitted right after the channel hopper performed a hop | ||
285 | */ | ||
265 | void hopped( int ); | 286 | void hopped( int ); |
266 | 287 | ||
288 | protected: | ||
289 | virtual void timerEvent( QTimerEvent* ); | ||
290 | |||
267 | private: | 291 | private: |
268 | OWirelessNetworkInterface* _iface; | 292 | OWirelessNetworkInterface* _iface; |
269 | int _interval; | 293 | int _interval; |
270 | int _tid; | 294 | int _tid; |
271 | QValueList<int> _channels; | 295 | QValueList<int> _channels; |
272 | QValueList<int>::Iterator _channel; | 296 | QValueList<int>::Iterator _channel; |
273 | }; | 297 | }; |
274 | 298 | ||
diff --git a/libopie2/opienet/opcap.h b/libopie2/opienet/opcap.h index 83f7115..bee0ca0 100644 --- a/libopie2/opienet/opcap.h +++ b/libopie2/opienet/opcap.h | |||
@@ -148,17 +148,16 @@ class OEthernetPacket : public QObject | |||
148 | OMacAddress sourceAddress() const; | 148 | OMacAddress sourceAddress() const; |
149 | OMacAddress destinationAddress() const; | 149 | OMacAddress destinationAddress() const; |
150 | int type() const; | 150 | int type() const; |
151 | 151 | ||
152 | private: | 152 | private: |
153 | const struct ether_header* _ether; | 153 | const struct ether_header* _ether; |
154 | }; | 154 | }; |
155 | 155 | ||
156 | |||
157 | /*====================================================================================== | 156 | /*====================================================================================== |
158 | * OPrismHeaderPacket - DLT_PRISM_HEADER frame | 157 | * OPrismHeaderPacket - DLT_PRISM_HEADER frame |
159 | *======================================================================================*/ | 158 | *======================================================================================*/ |
160 | 159 | ||
161 | class OPrismHeaderPacket : public QObject | 160 | class OPrismHeaderPacket : public QObject |
162 | { | 161 | { |
163 | Q_OBJECT | 162 | Q_OBJECT |
164 | 163 | ||
@@ -167,17 +166,16 @@ class OPrismHeaderPacket : public QObject | |||
167 | virtual ~OPrismHeaderPacket(); | 166 | virtual ~OPrismHeaderPacket(); |
168 | 167 | ||
169 | unsigned int signalStrength() const; | 168 | unsigned int signalStrength() const; |
170 | 169 | ||
171 | private: | 170 | private: |
172 | const struct prism_hdr* _header; | 171 | const struct prism_hdr* _header; |
173 | }; | 172 | }; |
174 | 173 | ||
175 | |||
176 | /*====================================================================================== | 174 | /*====================================================================================== |
177 | * OWaveLanPacket - DLT_IEEE802_11 frame | 175 | * OWaveLanPacket - DLT_IEEE802_11 frame |
178 | *======================================================================================*/ | 176 | *======================================================================================*/ |
179 | 177 | ||
180 | class OWaveLanPacket : public QObject | 178 | class OWaveLanPacket : public QObject |
181 | { | 179 | { |
182 | Q_OBJECT | 180 | Q_OBJECT |
183 | 181 | ||
@@ -347,33 +345,32 @@ class OWaveLanManagementIBSS : public QObject | |||
347 | private: | 345 | private: |
348 | const struct ibss_t* _data; | 346 | const struct ibss_t* _data; |
349 | }; | 347 | }; |
350 | 348 | ||
351 | /*====================================================================================== | 349 | /*====================================================================================== |
352 | * OWaveLanManagementChallenge | 350 | * OWaveLanManagementChallenge |
353 | *======================================================================================*/ | 351 | *======================================================================================*/ |
354 | 352 | ||
355 | // Qobject do we need that?? | ||
356 | class OWaveLanManagementChallenge : public QObject | 353 | class OWaveLanManagementChallenge : public QObject |
357 | { | 354 | { |
358 | Q_OBJECT | 355 | Q_OBJECT |
359 | 356 | ||
360 | public: | 357 | public: |
361 | OWaveLanManagementChallenge( const unsigned char*, const struct challenge_t*, QObject* parent = 0 ); | 358 | OWaveLanManagementChallenge( const unsigned char*, const struct challenge_t*, QObject* parent = 0 ); |
362 | virtual ~OWaveLanManagementChallenge(); | 359 | virtual ~OWaveLanManagementChallenge(); |
363 | 360 | ||
364 | private: | 361 | private: |
365 | const struct challenge_t* _data; | 362 | const struct challenge_t* _data; |
366 | }; | 363 | }; |
367 | 364 | ||
368 | /*====================================================================================== | 365 | /*====================================================================================== |
369 | * OWaveLanDataPacket - type: data (T_DATA) | 366 | * OWaveLanDataPacket - type: data (T_DATA) |
370 | *======================================================================================*/ | 367 | *======================================================================================*/ |
371 | // Qobject? | 368 | |
372 | class OWaveLanDataPacket : public QObject | 369 | class OWaveLanDataPacket : public QObject |
373 | { | 370 | { |
374 | Q_OBJECT | 371 | Q_OBJECT |
375 | 372 | ||
376 | public: | 373 | public: |
377 | OWaveLanDataPacket( const unsigned char*, const struct ieee_802_11_data_header*, OWaveLanPacket* parent = 0 ); | 374 | OWaveLanDataPacket( const unsigned char*, const struct ieee_802_11_data_header*, OWaveLanPacket* parent = 0 ); |
378 | virtual ~OWaveLanDataPacket(); | 375 | virtual ~OWaveLanDataPacket(); |
379 | 376 | ||