Diffstat (limited to 'noncore/settings/networksettings/wlan/wextensions.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/networksettings/wlan/wextensions.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/noncore/settings/networksettings/wlan/wextensions.cpp b/noncore/settings/networksettings/wlan/wextensions.cpp index 9c64323..fe21f02 100644 --- a/noncore/settings/networksettings/wlan/wextensions.cpp +++ b/noncore/settings/networksettings/wlan/wextensions.cpp | |||
@@ -1,27 +1,34 @@ | |||
1 | #include "wextensions.h" | 1 | #include "wextensions.h" |
2 | 2 | ||
3 | /* OPIE */ | ||
4 | #include <opie2/odebug.h> | ||
5 | using namespace Opie::Core; | ||
6 | |||
7 | /* QT */ | ||
3 | #include <qfile.h> | 8 | #include <qfile.h> |
4 | #include <qtextstream.h> | 9 | #include <qtextstream.h> |
5 | 10 | ||
11 | /* STD */ | ||
6 | #include <arpa/inet.h> | 12 | #include <arpa/inet.h> |
7 | #include <sys/socket.h> | 13 | #include <sys/socket.h> |
8 | #include <sys/ioctl.h> | 14 | #include <sys/ioctl.h> |
9 | |||
10 | #include <math.h> | 15 | #include <math.h> |
11 | 16 | ||
12 | #define PROCNETWIRELESS "/proc/net/wireless" | 17 | #define PROCNETWIRELESS "/proc/net/wireless" |
13 | #define IW_LOWER 0 | 18 | #define IW_LOWER 0 |
14 | #define IW_UPPER 256 | 19 | #define IW_UPPER 256 |
15 | 20 | ||
21 | #warning This is duplicated code. Use libopienet2! | ||
22 | |||
16 | /** | 23 | /** |
17 | * Constructor. Sets hasWirelessExtensions | 24 | * Constructor. Sets hasWirelessExtensions |
18 | */ | 25 | */ |
19 | WExtensions::WExtensions(QString interfaceName): hasWirelessExtensions(false), interface(interfaceName) { | 26 | WExtensions::WExtensions(QString interfaceName): hasWirelessExtensions(false), interface(interfaceName) { |
20 | fd = socket( AF_INET, SOCK_DGRAM, 0 ); | 27 | fd = socket( AF_INET, SOCK_DGRAM, 0 ); |
21 | if(fd == -1) | 28 | if(fd == -1) |
22 | return; | 29 | return; |
23 | 30 | ||
24 | const char* buffer[200]; | 31 | const char* buffer[200]; |
25 | memset( &iwr, 0, sizeof( iwr ) ); | 32 | memset( &iwr, 0, sizeof( iwr ) ); |
26 | iwr.u.essid.pointer = (caddr_t) buffer; | 33 | iwr.u.essid.pointer = (caddr_t) buffer; |
27 | iwr.u.essid.length = IW_ESSID_MAX_SIZE; | 34 | iwr.u.essid.length = IW_ESSID_MAX_SIZE; |