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.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/libopie2/opienet/onetwork.cpp b/libopie2/opienet/onetwork.cpp
index 25c70e0..998b50e 100644
--- a/libopie2/opienet/onetwork.cpp
+++ b/libopie2/opienet/onetwork.cpp
@@ -42,24 +42,25 @@
/* UNIX */
#include <arpa/inet.h>
#include <cerrno>
#include <cstring>
#include <cstdlib>
#include <math.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <unistd.h>
+#include <linux/sockios.h>
#include <linux/wireless.h>
using namespace std;
/*======================================================================================
* ONetwork
*======================================================================================*/
ONetwork* ONetwork::_instance = 0;
ONetwork::ONetwork()
{
@@ -716,25 +717,25 @@ OHostAPMonitoringInterface::~OHostAPMonitoringInterface()
{
}
void OHostAPMonitoringInterface::setEnabled( bool b )
{
// IW_MODE_MONITOR was introduced in Wireless Extensions Version 15
// Wireless Extensions < Version 15 need iwpriv commandos for monitoring
#if WIRELESS_EXT > 14
_if->_iwr.u.mode = IW_MODE_MONITOR;
_if->wioctl( SIOCSIWMODE );
#else
- int* args = (int*) &_if._iwr.u.name;
+ int* args = (int*) &_if->_iwr.u.name;
args[0] = 2;
args[1] = 0;
_if->wioctl( SIOCDEVPRIVATE );
#endif
OMonitoringInterface::setEnabled( b );
}
QString OHostAPMonitoringInterface::name() const
{
return "hostap";