author | mickeyl <mickeyl> | 2003-03-30 01:41:56 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-03-30 01:41:56 (UTC) |
commit | 99899abc80a8aa05044eeecd8a061b0a8efaa713 (patch) (unidiff) | |
tree | 45db7a60f17d00ae72d0e8d6b986d5be10232c6c /libopie2/opienet/opcap.h | |
parent | 340cb7e64fb898966996b00b93c03ca05a347aa5 (diff) | |
download | opie-99899abc80a8aa05044eeecd8a061b0a8efaa713.zip opie-99899abc80a8aa05044eeecd8a061b0a8efaa713.tar.gz opie-99899abc80a8aa05044eeecd8a061b0a8efaa713.tar.bz2 |
- add classes for 802.11 tagged values
- adjust miniwellenreiter accordingly
-rw-r--r-- | libopie2/opienet/opcap.h | 160 |
1 files changed, 151 insertions, 9 deletions
diff --git a/libopie2/opienet/opcap.h b/libopie2/opienet/opcap.h index 65c550c..0b06572 100644 --- a/libopie2/opienet/opcap.h +++ b/libopie2/opienet/opcap.h | |||
@@ -62,2 +62,3 @@ typedef struct pcap_pkthdr packetheaderstruct; | |||
62 | class OPacketCapturer; | 62 | class OPacketCapturer; |
63 | class QSocketNotifier; | ||
63 | 64 | ||
@@ -86,2 +87,3 @@ class OPacket : public QObject | |||
86 | const unsigned char* _data; // pcap packet data | 87 | const unsigned char* _data; // pcap packet data |
88 | const unsigned char* _end; // end of pcap packet data | ||
87 | }; | 89 | }; |
@@ -97,3 +99,3 @@ class OEthernetPacket : public QObject | |||
97 | public: | 99 | public: |
98 | OEthernetPacket( const struct ether_header*, QObject* parent = 0 ); | 100 | OEthernetPacket( const unsigned char*, const struct ether_header*, QObject* parent = 0 ); |
99 | virtual ~OEthernetPacket(); | 101 | virtual ~OEthernetPacket(); |
@@ -118,3 +120,3 @@ class OWaveLanPacket : public QObject | |||
118 | public: | 120 | public: |
119 | OWaveLanPacket( const struct ieee_802_11_header*, QObject* parent = 0 ); | 121 | OWaveLanPacket( const unsigned char*, const struct ieee_802_11_header*, QObject* parent = 0 ); |
120 | virtual ~OWaveLanPacket(); | 122 | virtual ~OWaveLanPacket(); |
@@ -148,6 +150,13 @@ class OWaveLanManagementPacket : public QObject | |||
148 | public: | 150 | public: |
149 | OWaveLanManagementPacket( const struct ieee_802_11_mgmt_header*, OWaveLanPacket* parent = 0 ); | 151 | OWaveLanManagementPacket( const unsigned char*, const struct ieee_802_11_mgmt_header*, OWaveLanPacket* parent = 0 ); |
150 | virtual ~OWaveLanManagementPacket(); | 152 | virtual ~OWaveLanManagementPacket(); |
151 | 153 | ||
152 | QString SSID() const; | 154 | int beaconInterval() const; |
155 | int capabilities() const; // generic | ||
156 | |||
157 | bool canESS() const; | ||
158 | bool canIBSS() const; | ||
159 | bool canCFP() const; | ||
160 | bool canCFP_REQ() const; | ||
161 | bool canPrivacy() const; | ||
153 | 162 | ||
@@ -160,2 +169,134 @@ class OWaveLanManagementPacket : public QObject | |||
160 | /*====================================================================================== | 169 | /*====================================================================================== |
170 | * OWaveLanManagementSSID | ||
171 | *======================================================================================*/ | ||
172 | |||
173 | class OWaveLanManagementSSID : public QObject | ||
174 | { | ||
175 | Q_OBJECT | ||
176 | |||
177 | public: | ||
178 | OWaveLanManagementSSID( const unsigned char*, const struct ssid_t*, QObject* parent = 0 ); | ||
179 | virtual ~OWaveLanManagementSSID(); | ||
180 | |||
181 | QString ID() const; | ||
182 | |||
183 | private: | ||
184 | const struct ssid_t* _data; | ||
185 | }; | ||
186 | |||
187 | /*====================================================================================== | ||
188 | * OWaveLanManagementRates | ||
189 | *======================================================================================*/ | ||
190 | |||
191 | class OWaveLanManagementRates : public QObject | ||
192 | { | ||
193 | Q_OBJECT | ||
194 | |||
195 | public: | ||
196 | OWaveLanManagementRates( const unsigned char*, const struct rates_t*, QObject* parent = 0 ); | ||
197 | virtual ~OWaveLanManagementRates(); | ||
198 | |||
199 | private: | ||
200 | const struct rates_t* _data; | ||
201 | }; | ||
202 | |||
203 | /*====================================================================================== | ||
204 | * OWaveLanManagementCF | ||
205 | *======================================================================================*/ | ||
206 | |||
207 | class OWaveLanManagementCF : public QObject | ||
208 | { | ||
209 | Q_OBJECT | ||
210 | |||
211 | public: | ||
212 | OWaveLanManagementCF( const unsigned char*, const struct cf_t*, QObject* parent = 0 ); | ||
213 | virtual ~OWaveLanManagementCF(); | ||
214 | |||
215 | private: | ||
216 | const struct cf_t* _data; | ||
217 | }; | ||
218 | |||
219 | /*====================================================================================== | ||
220 | * OWaveLanManagementFH | ||
221 | *======================================================================================*/ | ||
222 | |||
223 | class OWaveLanManagementFH : public QObject | ||
224 | { | ||
225 | Q_OBJECT | ||
226 | |||
227 | public: | ||
228 | OWaveLanManagementFH( const unsigned char*, const struct fh_t*, QObject* parent = 0 ); | ||
229 | virtual ~OWaveLanManagementFH(); | ||
230 | |||
231 | private: | ||
232 | const struct fh_t* _data; | ||
233 | }; | ||
234 | |||
235 | /*====================================================================================== | ||
236 | * OWaveLanManagementDS | ||
237 | *======================================================================================*/ | ||
238 | |||
239 | class OWaveLanManagementDS : public QObject | ||
240 | { | ||
241 | Q_OBJECT | ||
242 | |||
243 | public: | ||
244 | OWaveLanManagementDS( const unsigned char*, const struct ds_t*, QObject* parent = 0 ); | ||
245 | virtual ~OWaveLanManagementDS(); | ||
246 | |||
247 | int channel() const; | ||
248 | |||
249 | private: | ||
250 | const struct ds_t* _data; | ||
251 | }; | ||
252 | |||
253 | /*====================================================================================== | ||
254 | * OWaveLanManagementTim | ||
255 | *======================================================================================*/ | ||
256 | |||
257 | class OWaveLanManagementTim : public QObject | ||
258 | { | ||
259 | Q_OBJECT | ||
260 | |||
261 | public: | ||
262 | OWaveLanManagementTim( const unsigned char*, const struct tim_t*, QObject* parent = 0 ); | ||
263 | virtual ~OWaveLanManagementTim(); | ||
264 | |||
265 | private: | ||
266 | const struct tim_t* _data; | ||
267 | }; | ||
268 | |||
269 | /*====================================================================================== | ||
270 | * OWaveLanManagementIBSS | ||
271 | *======================================================================================*/ | ||
272 | |||
273 | class OWaveLanManagementIBSS : public QObject | ||
274 | { | ||
275 | Q_OBJECT | ||
276 | |||
277 | public: | ||
278 | OWaveLanManagementIBSS( const unsigned char*, const struct ibss_t*, QObject* parent = 0 ); | ||
279 | virtual ~OWaveLanManagementIBSS(); | ||
280 | |||
281 | private: | ||
282 | const struct ibss_t* _data; | ||
283 | }; | ||
284 | |||
285 | /*====================================================================================== | ||
286 | * OWaveLanManagementChallenge | ||
287 | *======================================================================================*/ | ||
288 | |||
289 | class OWaveLanManagementChallenge : public QObject | ||
290 | { | ||
291 | Q_OBJECT | ||
292 | |||
293 | public: | ||
294 | OWaveLanManagementChallenge( const unsigned char*, const struct challenge_t*, QObject* parent = 0 ); | ||
295 | virtual ~OWaveLanManagementChallenge(); | ||
296 | |||
297 | private: | ||
298 | const struct challenge_t* _data; | ||
299 | }; | ||
300 | |||
301 | /*====================================================================================== | ||
161 | * OWaveLanDataPacket - type: data (T_DATA) | 302 | * OWaveLanDataPacket - type: data (T_DATA) |
@@ -168,3 +309,3 @@ class OWaveLanDataPacket : public QObject | |||
168 | public: | 309 | public: |
169 | OWaveLanDataPacket( const struct ieee_802_11_data_header*, OWaveLanPacket* parent = 0 ); | 310 | OWaveLanDataPacket( const unsigned char*, const struct ieee_802_11_data_header*, OWaveLanPacket* parent = 0 ); |
170 | virtual ~OWaveLanDataPacket(); | 311 | virtual ~OWaveLanDataPacket(); |
@@ -184,3 +325,3 @@ class OLLCPacket : public QObject | |||
184 | public: | 325 | public: |
185 | OLLCPacket( const struct ieee_802_11_802_2_header* data, QObject* parent = 0 ); | 326 | OLLCPacket( const unsigned char*, const struct ieee_802_11_802_2_header* data, QObject* parent = 0 ); |
186 | virtual ~OLLCPacket(); | 327 | virtual ~OLLCPacket(); |
@@ -200,3 +341,3 @@ class OIPPacket : public QObject | |||
200 | public: | 341 | public: |
201 | OIPPacket( const struct iphdr*, QObject* parent = 0 ); | 342 | OIPPacket( const unsigned char*, const struct iphdr*, QObject* parent = 0 ); |
202 | virtual ~OIPPacket(); | 343 | virtual ~OIPPacket(); |
@@ -227,3 +368,3 @@ class OUDPPacket : public QObject | |||
227 | public: | 368 | public: |
228 | OUDPPacket( const struct udphdr*, QObject* parent = 0 ); | 369 | OUDPPacket( const unsigned char*, const struct udphdr*, QObject* parent = 0 ); |
229 | virtual ~OUDPPacket(); | 370 | virtual ~OUDPPacket(); |
@@ -246,3 +387,3 @@ class OTCPPacket : public QObject | |||
246 | public: | 387 | public: |
247 | OTCPPacket( const struct tcphdr*, QObject* parent = 0 ); | 388 | OTCPPacket( const unsigned char*, const struct tcphdr*, QObject* parent = 0 ); |
248 | virtual ~OTCPPacket(); | 389 | virtual ~OTCPPacket(); |
@@ -289,2 +430,3 @@ class OPacketCapturer : public QObject | |||
289 | pcap_t* _pch; // pcap library handle | 430 | pcap_t* _pch; // pcap library handle |
431 | QSocketNotifier* _sn; // socket notifier for main loop | ||
290 | mutable char _errbuf[PCAP_ERRBUF_SIZE]; | 432 | mutable char _errbuf[PCAP_ERRBUF_SIZE]; |