summaryrefslogtreecommitdiff
path: root/libopie2/opienet/onetwork.cpp
Side-by-side diff
Diffstat (limited to 'libopie2/opienet/onetwork.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opienet/onetwork.cpp31
1 files changed, 18 insertions, 13 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 );
}