summaryrefslogtreecommitdiff
path: root/noncore/net/wellenreiter/gui/wellenreiter.cpp
Side-by-side diff
Diffstat (limited to 'noncore/net/wellenreiter/gui/wellenreiter.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp
index 12b3978..fe8f22d 100644
--- a/noncore/net/wellenreiter/gui/wellenreiter.cpp
+++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp
@@ -368,97 +368,97 @@ void Wellenreiter::handleIPData( OPacket* p, OIPPacket* ip, OMacAddress& source,
QObject* Wellenreiter::childIfToParse( OPacket* p, const QString& protocol )
{
if ( configwindow->parsePackets->isProtocolChecked( protocol ) )
if ( configwindow->parsePackets->protocolAction( protocol ) == "Discard!" )
return 0;
return p->child( protocol );
}
bool Wellenreiter::checkDumpPacket( OPacket* p )
{
// go through all child packets and see if one is inside the child hierarchy for p
// if so, do what the user requested (protocolAction), e.g. pass or discard
if ( !configwindow->writeCaptureFile->isChecked() )
return true; // semantic change - we're logging anyway now to /tmp/wellenreiter
QObjectList* l = p->queryList();
QObjectListIt it( *l );
QObject* o;
while ( (o = it.current()) != 0 )
{
QString name = it.current()->name();
if ( configwindow->capturePackets->isProtocolChecked( name ) )
{
QString action = configwindow->capturePackets->protocolAction( name );
odebug << "capturePackets-action for '" << (const char*) name << "' seems to be '" << action << "'" << oendl;
if ( action == "Discard" )
{
logwindow->log( QString().sprintf( "(i) dump-discarding of '%s' packet requested.", (const char*) name ) );
return false;
}
}
else
{
odebug << "protocol '" << name << "' not checked in capturePackets." << oendl;
}
++it;
}
return true;
}
void Wellenreiter::receivePacket( OPacket* p )
{
- hexWindow()->add( p );
+ hexWindow()->add( p, configwindow->hexViewBuffer() );
if ( checkDumpPacket( p ) )
{
pcap->dump( p );
}
// check for a management frame
OWaveLanManagementPacket* manage = static_cast<OWaveLanManagementPacket*>( childIfToParse( p, "802.11 Management" ) );
if ( manage )
{
handleManagementFrame( p, manage );
return;
}
// check for a control frame
OWaveLanControlPacket* control = static_cast<OWaveLanControlPacket*>( childIfToParse( p, "802.11 Control" ) );
if ( control )
{
handleControlFrame( p, control );
return;
}
OMacAddress source;
OMacAddress dest;
//TODO: WEP check here
// check for a wireless data frame
OWaveLanDataPacket* wlan = static_cast<OWaveLanDataPacket*>( childIfToParse( p, "802.11 Data" ) );
if ( wlan )
{
handleWlanData( p, wlan, source, dest );
}
// check for a wired data frame
OEthernetPacket* eth = static_cast<OEthernetPacket*>( childIfToParse( p, "Ethernet" ) );
if ( eth )
{
handleEthernetData( p, eth, source, dest );
}
// check for an arp frame since arp frames come in two flavours:
// 802.11 encapsulates ARP data within IP packets while wired ethernet doesn't.
OARPPacket* arp = static_cast<OARPPacket*>( childIfToParse( p, "ARP" ) );
if ( arp )
{
handleARPData( p, arp, source, dest );
}