-rw-r--r-- | libopie2/opienet/opcap.h | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/libopie2/opienet/opcap.h b/libopie2/opienet/opcap.h index 04d22ff..ddef278 100644 --- a/libopie2/opienet/opcap.h +++ b/libopie2/opienet/opcap.h | |||
@@ -62,31 +62,29 @@ typedef struct pcap_pkthdr packetheaderstruct; | |||
62 | class OPacketCapturer; | 62 | class OPacketCapturer; |
63 | class QSocketNotifier; | 63 | class QSocketNotifier; |
64 | 64 | ||
65 | /*====================================================================================== | 65 | /*====================================================================================== |
66 | * OPacket - A frame on the wire | 66 | * OPacket - A frame on the wire |
67 | *======================================================================================*/ | 67 | *======================================================================================*/ |
68 | 68 | ||
69 | class OPacket : public QObject | 69 | class OPacket : public QObject |
70 | { | 70 | { |
71 | Q_OBJECT | 71 | Q_OBJECT |
72 | 72 | ||
73 | public: | 73 | public: |
74 | OPacket( packetheaderstruct, const unsigned char*, QObject* parent ); | 74 | OPacket( int datalink, packetheaderstruct, const unsigned char*, QObject* parent ); |
75 | virtual ~OPacket(); | 75 | virtual ~OPacket(); |
76 | 76 | ||
77 | timevalstruct timeval() const; | 77 | timevalstruct timeval() const; |
78 | 78 | ||
79 | OPacketCapturer* packetCapturer() const; | ||
80 | |||
81 | int caplen() const; | 79 | int caplen() const; |
82 | int len() const; | 80 | int len() const; |
83 | QString dump( int = 32 ) const; | 81 | QString dump( int = 32 ) const; |
84 | 82 | ||
85 | private: | 83 | private: |
86 | const packetheaderstruct _hdr; // pcap packet header | 84 | const packetheaderstruct _hdr; // pcap packet header |
87 | const unsigned char* _data; // pcap packet data | 85 | const unsigned char* _data; // pcap packet data |
88 | const unsigned char* _end; // end of pcap packet data | 86 | const unsigned char* _end; // end of pcap packet data |
89 | }; | 87 | }; |
90 | 88 | ||
91 | /*====================================================================================== | 89 | /*====================================================================================== |
92 | * OEthernetPacket - DLT_EN10MB frame | 90 | * OEthernetPacket - DLT_EN10MB frame |
@@ -142,24 +140,26 @@ class OWaveLanPacket : public QObject | |||
142 | /*====================================================================================== | 140 | /*====================================================================================== |
143 | * OWaveLanManagementPacket - type: management (T_MGMT) | 141 | * OWaveLanManagementPacket - type: management (T_MGMT) |
144 | *======================================================================================*/ | 142 | *======================================================================================*/ |
145 | 143 | ||
146 | class OWaveLanManagementPacket : public QObject | 144 | class OWaveLanManagementPacket : public QObject |
147 | { | 145 | { |
148 | Q_OBJECT | 146 | Q_OBJECT |
149 | 147 | ||
150 | public: | 148 | public: |
151 | OWaveLanManagementPacket( const unsigned char*, const struct ieee_802_11_mgmt_header*, OWaveLanPacket* parent = 0 ); | 149 | OWaveLanManagementPacket( const unsigned char*, const struct ieee_802_11_mgmt_header*, OWaveLanPacket* parent = 0 ); |
152 | virtual ~OWaveLanManagementPacket(); | 150 | virtual ~OWaveLanManagementPacket(); |
153 | 151 | ||
152 | QString managementType() const; | ||
153 | |||
154 | int beaconInterval() const; | 154 | int beaconInterval() const; |
155 | int capabilities() const; // generic | 155 | int capabilities() const; // generic |
156 | 156 | ||
157 | bool canESS() const; | 157 | bool canESS() const; |
158 | bool canIBSS() const; | 158 | bool canIBSS() const; |
159 | bool canCFP() const; | 159 | bool canCFP() const; |
160 | bool canCFP_REQ() const; | 160 | bool canCFP_REQ() const; |
161 | bool canPrivacy() const; | 161 | bool canPrivacy() const; |
162 | 162 | ||
163 | private: | 163 | private: |
164 | const struct ieee_802_11_mgmt_header* _header; | 164 | const struct ieee_802_11_mgmt_header* _header; |
165 | const struct ieee_802_11_mgmt_body* _body; | 165 | const struct ieee_802_11_mgmt_body* _body; |
@@ -306,24 +306,40 @@ class OWaveLanDataPacket : public QObject | |||
306 | { | 306 | { |
307 | Q_OBJECT | 307 | Q_OBJECT |
308 | 308 | ||
309 | public: | 309 | public: |
310 | OWaveLanDataPacket( const unsigned char*, 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 ); |
311 | virtual ~OWaveLanDataPacket(); | 311 | virtual ~OWaveLanDataPacket(); |
312 | 312 | ||
313 | private: | 313 | private: |
314 | const struct ieee_802_11_data_header* _header; | 314 | const struct ieee_802_11_data_header* _header; |
315 | }; | 315 | }; |
316 | 316 | ||
317 | /*====================================================================================== | 317 | /*====================================================================================== |
318 | * OWaveLanControlPacket - type: control (T_CTRL) | ||
319 | *======================================================================================*/ | ||
320 | |||
321 | class OWaveLanControlPacket : public QObject | ||
322 | { | ||
323 | Q_OBJECT | ||
324 | |||
325 | public: | ||
326 | OWaveLanControlPacket( const unsigned char*, const struct ieee_802_11_control_header*, OWaveLanPacket* parent = 0 ); | ||
327 | virtual ~OWaveLanControlPacket(); | ||
328 | |||
329 | private: | ||
330 | const struct ieee_802_11_control_header* _header; | ||
331 | }; | ||
332 | |||
333 | /*====================================================================================== | ||
318 | * OLLCPacket - IEEE 802.2 Link Level Control | 334 | * OLLCPacket - IEEE 802.2 Link Level Control |
319 | *======================================================================================*/ | 335 | *======================================================================================*/ |
320 | 336 | ||
321 | class OLLCPacket : public QObject | 337 | class OLLCPacket : public QObject |
322 | { | 338 | { |
323 | Q_OBJECT | 339 | Q_OBJECT |
324 | 340 | ||
325 | public: | 341 | public: |
326 | OLLCPacket( const unsigned char*, const struct ieee_802_11_802_2_header* data, QObject* parent = 0 ); | 342 | OLLCPacket( const unsigned char*, const struct ieee_802_11_802_2_header* data, QObject* parent = 0 ); |
327 | virtual ~OLLCPacket(); | 343 | virtual ~OLLCPacket(); |
328 | 344 | ||
329 | private: | 345 | private: |