summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opienet/onetwork.cpp31
-rw-r--r--libopie2/opienet/onetwork.h11
-rw-r--r--libopie2/opienet/opcap.cpp2
3 files changed, 25 insertions, 19 deletions
diff --git a/libopie2/opienet/onetwork.cpp b/libopie2/opienet/onetwork.cpp
index 2dfff1d..6cef5cf 100644
--- a/libopie2/opienet/onetwork.cpp
+++ b/libopie2/opienet/onetwork.cpp
@@ -811,4 +811,4 @@ bool OWirelessNetworkInterface::wioctl( int call ) const
-OMonitoringInterface::OMonitoringInterface( ONetworkInterface* iface )
- :_if( static_cast<OWirelessNetworkInterface*>( iface ) )
+OMonitoringInterface::OMonitoringInterface( ONetworkInterface* iface, bool prismHeader )
+ :_if( static_cast<OWirelessNetworkInterface*>( iface ) ), _prismHeader( prismHeader )
{
@@ -847,4 +847,4 @@ void OMonitoringInterface::setEnabled( bool b )
-OCiscoMonitoringInterface::OCiscoMonitoringInterface( ONetworkInterface* iface )
- :OMonitoringInterface( iface )
+OCiscoMonitoringInterface::OCiscoMonitoringInterface( ONetworkInterface* iface, bool prismHeader )
+ :OMonitoringInterface( iface, prismHeader )
{
@@ -895,4 +895,4 @@ void OCiscoMonitoringInterface::setChannel( int )
-OWlanNGMonitoringInterface::OWlanNGMonitoringInterface( ONetworkInterface* iface )
- :OMonitoringInterface( iface )
+OWlanNGMonitoringInterface::OWlanNGMonitoringInterface( ONetworkInterface* iface, bool prismHeader )
+ :OMonitoringInterface( iface, prismHeader )
{
@@ -912,4 +912,6 @@ void OWlanNGMonitoringInterface::setEnabled( bool b )
QString enable = b ? "true" : "false";
+ QString prism = _prismHeader ? "true" : "false";
QString cmd;
- cmd.sprintf( "$(which wlanctl-ng) %s lnxreq_wlansniff channel=%d enable=%s", (const char*) _if->name(), 1, (const char*) enable );
+ cmd.sprintf( "$(which wlanctl-ng) %s lnxreq_wlansniff channel=%d enable=%s prismheader=%s",
+ (const char*) _if->name(), 1, (const char*) enable, (const char*) prism );
system( cmd );
@@ -934,4 +936,4 @@ void OWlanNGMonitoringInterface::setChannel( int )
-OHostAPMonitoringInterface::OHostAPMonitoringInterface( ONetworkInterface* iface )
- :OMonitoringInterface( iface )
+OHostAPMonitoringInterface::OHostAPMonitoringInterface( ONetworkInterface* iface, bool prismHeader )
+ :OMonitoringInterface( iface, prismHeader )
{
@@ -952,5 +954,7 @@ void OHostAPMonitoringInterface::setEnabled( bool b )
+ int monitorCode = _prismHeader ? 1 : 2;
+
if ( b )
{
- _if->setPrivate( "monitor", 1, 2 );
+ _if->setPrivate( "monitor", 1, monitorCode );
}
@@ -973,4 +977,4 @@ QString OHostAPMonitoringInterface::name() const
-OOrinocoMonitoringInterface::OOrinocoMonitoringInterface( ONetworkInterface* iface )
- :OMonitoringInterface( iface )
+OOrinocoMonitoringInterface::OOrinocoMonitoringInterface( ONetworkInterface* iface, bool prismHeader )
+ :OMonitoringInterface( iface, prismHeader )
{
@@ -987,3 +991,4 @@ void OOrinocoMonitoringInterface::setChannel( int c )
{
- _if->setPrivate( "monitor", 2, 1, c );
+ int monitorCode = _prismHeader ? 1 : 2;
+ _if->setPrivate( "monitor", 2, monitorCode, c );
}
diff --git a/libopie2/opienet/onetwork.h b/libopie2/opienet/onetwork.h
index 1b38d02..eb9d506 100644
--- a/libopie2/opienet/onetwork.h
+++ b/libopie2/opienet/onetwork.h
@@ -454,3 +454,3 @@ class OMonitoringInterface
OMonitoringInterface();
- OMonitoringInterface( ONetworkInterface* );
+ OMonitoringInterface( ONetworkInterface*, bool _prismHeader );
virtual ~OMonitoringInterface();
@@ -466,2 +466,3 @@ class OMonitoringInterface
OWirelessNetworkInterface* _if;
+ bool _prismHeader;
@@ -478,3 +479,3 @@ class OCiscoMonitoringInterface : public OMonitoringInterface
public:
- OCiscoMonitoringInterface( ONetworkInterface* );
+ OCiscoMonitoringInterface( ONetworkInterface*, bool _prismHeader );
virtual ~OCiscoMonitoringInterface();
@@ -494,3 +495,3 @@ class OWlanNGMonitoringInterface : public OMonitoringInterface
public:
- OWlanNGMonitoringInterface( ONetworkInterface* );
+ OWlanNGMonitoringInterface( ONetworkInterface*, bool _prismHeader );
virtual ~OWlanNGMonitoringInterface();
@@ -511,3 +512,3 @@ class OHostAPMonitoringInterface : public OMonitoringInterface
public:
- OHostAPMonitoringInterface( ONetworkInterface* );
+ OHostAPMonitoringInterface( ONetworkInterface*, bool _prismHeader );
virtual ~OHostAPMonitoringInterface();
@@ -526,3 +527,3 @@ class OOrinocoMonitoringInterface : public OMonitoringInterface
public:
- OOrinocoMonitoringInterface( ONetworkInterface* );
+ OOrinocoMonitoringInterface( ONetworkInterface*, bool _prismHeader );
virtual ~OOrinocoMonitoringInterface();
diff --git a/libopie2/opienet/opcap.cpp b/libopie2/opienet/opcap.cpp
index e2ab6d7..f6d05ea 100644
--- a/libopie2/opienet/opcap.cpp
+++ b/libopie2/opienet/opcap.cpp
@@ -73,3 +73,3 @@ OPacket::OPacket( int datalink, packetheaderstruct header, const unsigned char*
default:
- qWarning( "OPacket::OPacket(): Received Packet over unsupported datalink '%s'!", datalink );
+ qWarning( "OPacket::OPacket(): Received Packet over unsupported datalink (type %d)!", datalink );
}