-rw-r--r-- | libopie2/opienet/opcap.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libopie2/opienet/opcap.h b/libopie2/opienet/opcap.h index a031dd1..f0d1d81 100644 --- a/libopie2/opienet/opcap.h +++ b/libopie2/opienet/opcap.h | |||
@@ -112,48 +112,53 @@ class QSocketNotifier; | |||
112 | * OIPPacket* ip = (OIPPacket*) p->child( "IP" ); // returns 0, if no such child exists | 112 | * OIPPacket* ip = (OIPPacket*) p->child( "IP" ); // returns 0, if no such child exists |
113 | * odebug << "got ip packet from " << ip->fromIPAddress().toString() << " to " << ip->toIPAddress().toString() << oendl; | 113 | * odebug << "got ip packet from " << ip->fromIPAddress().toString() << " to " << ip->toIPAddress().toString() << oendl; |
114 | * | 114 | * |
115 | */ | 115 | */ |
116 | 116 | ||
117 | class OPacket : public QObject | 117 | class OPacket : public QObject |
118 | { | 118 | { |
119 | Q_OBJECT | 119 | Q_OBJECT |
120 | 120 | ||
121 | friend class OPacketCapturer; | 121 | friend class OPacketCapturer; |
122 | 122 | ||
123 | public: | 123 | public: |
124 | OPacket( int datalink, packetheaderstruct, const unsigned char*, QObject* parent ); | 124 | OPacket( int datalink, packetheaderstruct, const unsigned char*, QObject* parent ); |
125 | virtual ~OPacket(); | 125 | virtual ~OPacket(); |
126 | 126 | ||
127 | timevalstruct timeval() const; | 127 | timevalstruct timeval() const; |
128 | 128 | ||
129 | int caplen() const; | 129 | int caplen() const; |
130 | int len() const; | 130 | int len() const; |
131 | QString dump( int = 32 ) const; | 131 | QString dump( int = 32 ) const; |
132 | 132 | ||
133 | void updateStats( QMap<QString,int>&, QObjectList* ); | 133 | void updateStats( QMap<QString,int>&, QObjectList* ); |
134 | 134 | ||
135 | private: | 135 | private: |
136 | |||
137 | void dumpStructure( QObjectList* ); | ||
138 | QString _dumpStructure( QObjectList* ); | ||
139 | |||
140 | private: | ||
136 | const packetheaderstruct _hdr; // pcap packet header | 141 | const packetheaderstruct _hdr; // pcap packet header |
137 | const unsigned char* _data; // pcap packet data | 142 | const unsigned char* _data; // pcap packet data |
138 | const unsigned char* _end; // end of pcap packet data | 143 | const unsigned char* _end; // end of pcap packet data |
139 | }; | 144 | }; |
140 | 145 | ||
141 | /*====================================================================================== | 146 | /*====================================================================================== |
142 | * OEthernetPacket - DLT_EN10MB frame | 147 | * OEthernetPacket - DLT_EN10MB frame |
143 | *======================================================================================*/ | 148 | *======================================================================================*/ |
144 | 149 | ||
145 | class OEthernetPacket : public QObject | 150 | class OEthernetPacket : public QObject |
146 | { | 151 | { |
147 | Q_OBJECT | 152 | Q_OBJECT |
148 | 153 | ||
149 | public: | 154 | public: |
150 | OEthernetPacket( const unsigned char*, const struct ether_header*, QObject* parent = 0 ); | 155 | OEthernetPacket( const unsigned char*, const struct ether_header*, QObject* parent = 0 ); |
151 | virtual ~OEthernetPacket(); | 156 | virtual ~OEthernetPacket(); |
152 | 157 | ||
153 | OMacAddress sourceAddress() const; | 158 | OMacAddress sourceAddress() const; |
154 | OMacAddress destinationAddress() const; | 159 | OMacAddress destinationAddress() const; |
155 | int type() const; | 160 | int type() const; |
156 | 161 | ||
157 | private: | 162 | private: |
158 | const struct ether_header* _ether; | 163 | const struct ether_header* _ether; |
159 | }; | 164 | }; |