summaryrefslogtreecommitdiff
path: root/libopie2/opienet/opcap.cpp
Unidiff
Diffstat (limited to 'libopie2/opienet/opcap.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opienet/opcap.cpp21
1 files changed, 12 insertions, 9 deletions
diff --git a/libopie2/opienet/opcap.cpp b/libopie2/opienet/opcap.cpp
index 7463320..fdd519c 100644
--- a/libopie2/opienet/opcap.cpp
+++ b/libopie2/opienet/opcap.cpp
@@ -112,6 +112,5 @@ void OPacket::updateStats( QMap<QString,int>& stats, QObjectList* l )
112 112
113void OPacket::dumpStructure( QObjectList* l ) 113QString OPacket::dumpStructure() const
114{ 114{
115 QString packetString( "[ |" + _dumpStructure( l ) + " ]" ); 115 return "[ |" + _dumpStructure( const_cast<QObjectList*>( this->children() ) ) + " ]";
116 odebug << "OPacket::dumpStructure: " << packetString << oendl;
117} 116}
@@ -119,3 +118,3 @@ void OPacket::dumpStructure( QObjectList* l )
119 118
120QString OPacket::_dumpStructure( QObjectList* l ) 119QString OPacket::_dumpStructure( QObjectList* l ) const
121{ 120{
@@ -181,2 +180,8 @@ int OPacket::len() const
181 180
181QTextStream& operator<<( QTextStream& s, const OPacket& p )
182{
183 s << p.dumpStructure();
184}
185
186
182/*====================================================================================== 187/*======================================================================================
@@ -731,3 +736,3 @@ OWaveLanManagementPacket::OWaveLanManagementPacket( const unsigned char* end, co
731 const unsigned char* ptr = managementType() == "Beacon" ? (const unsigned char*) (_body+1) : (const unsigned char*) (_header+1); 736 const unsigned char* ptr = managementType() == "Beacon" ? (const unsigned char*) (_body+1) : (const unsigned char*) (_header+1);
732 737
733 while (ptr < end) 738 while (ptr < end)
@@ -1190,5 +1195,3 @@ OPacket* OPacketCapturer::next()
1190 p->updateStats( _stats, const_cast<QObjectList*>( p->children() ) ); 1195 p->updateStats( _stats, const_cast<QObjectList*>( p->children() ) );
1191 #ifndef NODEBUG 1196 odebug << "OPacket::dumpStructure: " << p->dumpStructure() << oendl;
1192 p->dumpStructure( const_cast<QObjectList*>( p->children() ) );
1193 #endif
1194 return p; 1197 return p;
@@ -1340,3 +1343,3 @@ QString OPacketCapturer::version() const
1340{ 1343{
1341 return QString().sprintf( "%s.%s", pcap_major_version( _pch ), pcap_minor_version( _pch ) ); 1344 return QString().sprintf( "%d.%d", pcap_major_version( _pch ), pcap_minor_version( _pch ) );
1342} 1345}