summaryrefslogtreecommitdiff
path: root/libopie2/opienet/opcap.cpp
authormickeyl <mickeyl>2004-05-02 18:14:46 (UTC)
committer mickeyl <mickeyl>2004-05-02 18:14:46 (UTC)
commit3e8fab5fddb3a38d93eaca1a8d69d8f668c7cd99 (patch) (unidiff)
tree4ea10a8f334f5af1133c9e762462701fb38b4f76 /libopie2/opienet/opcap.cpp
parent1ddcf3566b3339bb649b07b64bd5802b735f37ba (diff)
downloadopie-3e8fab5fddb3a38d93eaca1a8d69d8f668c7cd99.zip
opie-3e8fab5fddb3a38d93eaca1a8d69d8f668c7cd99.tar.gz
opie-3e8fab5fddb3a38d93eaca1a8d69d8f668c7cd99.tar.bz2
fix one odebug warning
Diffstat (limited to 'libopie2/opienet/opcap.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opienet/opcap.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libopie2/opienet/opcap.cpp b/libopie2/opienet/opcap.cpp
index a9dc577..8ec4f47 100644
--- a/libopie2/opienet/opcap.cpp
+++ b/libopie2/opienet/opcap.cpp
@@ -182,50 +182,50 @@ QString OPacket::dump( int bpl ) const
182 return str; 182 return str;
183} 183}
184 184
185 185
186int OPacket::len() const 186int OPacket::len() const
187{ 187{
188 return _hdr.len; 188 return _hdr.len;
189} 189}
190 190
191 191
192QTextStream& operator<<( QTextStream& s, const OPacket& p ) 192QTextStream& operator<<( QTextStream& s, const OPacket& p )
193{ 193{
194 s << p.dumpStructure(); 194 s << p.dumpStructure();
195} 195}
196 196
197 197
198/*====================================================================================== 198/*======================================================================================
199 * OEthernetPacket 199 * OEthernetPacket
200 *======================================================================================*/ 200 *======================================================================================*/
201 201
202OEthernetPacket::OEthernetPacket( const unsigned char* end, const struct ether_header* data, QObject* parent ) 202OEthernetPacket::OEthernetPacket( const unsigned char* end, const struct ether_header* data, QObject* parent )
203 :QObject( parent, "Ethernet" ), _ether( data ) 203 :QObject( parent, "Ethernet" ), _ether( data )
204{ 204{
205 205
206 odebug << "Source = " << sourceAddress().toString(); 206 odebug << "Source = " << sourceAddress().toString() << oendl;
207 odebug << "Destination = " << destinationAddress().toString(); 207 odebug << "Destination = " << destinationAddress().toString() << oendl;
208 208
209 if ( sourceAddress() == OMacAddress::broadcast ) 209 if ( sourceAddress() == OMacAddress::broadcast )
210 odebug << "Source is broadcast address" << oendl; 210 odebug << "Source is broadcast address" << oendl;
211 if ( destinationAddress() == OMacAddress::broadcast ) 211 if ( destinationAddress() == OMacAddress::broadcast )
212 odebug << "Destination is broadcast address" << oendl; 212 odebug << "Destination is broadcast address" << oendl;
213 213
214 switch ( type() ) 214 switch ( type() )
215 { 215 {
216 case ETHERTYPE_IP: new OIPPacket( end, (const struct iphdr*) (data+1), this ); break; 216 case ETHERTYPE_IP: new OIPPacket( end, (const struct iphdr*) (data+1), this ); break;
217 case ETHERTYPE_ARP: new OARPPacket( end, (const struct myarphdr*) (data+1), this ); break; 217 case ETHERTYPE_ARP: new OARPPacket( end, (const struct myarphdr*) (data+1), this ); break;
218 case ETHERTYPE_REVARP: { odebug << "OPacket::OPacket(): Received Ethernet Packet : Type = RARP" << oendl; break; } 218 case ETHERTYPE_REVARP: { odebug << "OPacket::OPacket(): Received Ethernet Packet : Type = RARP" << oendl; break; }
219 default: odebug << "OPacket::OPacket(): Received Ethernet Packet : Type = UNKNOWN" << oendl; 219 default: odebug << "OPacket::OPacket(): Received Ethernet Packet : Type = UNKNOWN" << oendl;
220 } 220 }
221 221
222} 222}
223 223
224 224
225OEthernetPacket::~OEthernetPacket() 225OEthernetPacket::~OEthernetPacket()
226{ 226{
227} 227}
228 228
229 229
230OMacAddress OEthernetPacket::sourceAddress() const 230OMacAddress OEthernetPacket::sourceAddress() const
231{ 231{