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.cpp27
1 files changed, 26 insertions, 1 deletions
diff --git a/libopie2/opienet/opcap.cpp b/libopie2/opienet/opcap.cpp
index 7a6f61b..313f5bb 100644
--- a/libopie2/opienet/opcap.cpp
+++ b/libopie2/opienet/opcap.cpp
@@ -110,2 +110,25 @@ void OPacket::updateStats( QMap<QString,int>& stats, QObjectList* l )
110 110
111void OPacket::dumpStructure( QObjectList* l )
112{
113 QString packetString( "[ |" + _dumpStructure( l ) + " ]" );
114 qDebug( "OPacket::dumpStructure: %s", (const char*) packetString );
115}
116
117
118QString OPacket::_dumpStructure( QObjectList* l )
119{
120 if (!l) return QString::null;
121 QObject* o = l->first();
122 QString str(" ");
123
124 while ( o )
125 {
126 str.append( o->name() );
127 str.append( " |" );
128 str += _dumpStructure( const_cast<QObjectList*>( o->children() ) );
129 o = l->next();
130 }
131 return str;
132}
133
111QString OPacket::dump( int bpl ) const 134QString OPacket::dump( int bpl ) const
@@ -1118,3 +1141,5 @@ OPacket* OPacketCapturer::next()
1118 p->updateStats( _stats, const_cast<QObjectList*>( p->children() ) ); 1141 p->updateStats( _stats, const_cast<QObjectList*>( p->children() ) );
1119 1142 #ifndef NODEBUG
1143 p->dumpStructure( const_cast<QObjectList*>( p->children() ) );
1144 #endif
1120 return p; 1145 return p;