diff options
Diffstat (limited to 'perl-install/c/stuff.xs.pl')
-rw-r--r-- | perl-install/c/stuff.xs.pl | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/perl-install/c/stuff.xs.pl b/perl-install/c/stuff.xs.pl index 4573cdc3f..a80588e6c 100644 --- a/perl-install/c/stuff.xs.pl +++ b/perl-install/c/stuff.xs.pl @@ -23,6 +23,8 @@ print ' #include <sys/stat.h> #include <sys/utsname.h> #include <sys/mount.h> +#undef __USE_MISC +#include <linux/wireless.h> #include <linux/keyboard.h> #include <linux/kd.h> #include <linux/hdreg.h> @@ -422,6 +424,24 @@ hasNetDevice(device) OUTPUT: RETVAL + +int +isNetDeviceWirelessAware(device) + char * device + CODE: + struct iwreq ifr; + + int s = socket(AF_INET, SOCK_DGRAM, 0); + + memset(&ifr, 0, sizeof(ifr)); + strncpy(ifr.ifr_name, device, sizeof(ifr.ifr_name)-1); + RETVAL = ioctl(s, SIOCGIWNAME, &ifr) != -1; + close(s); + OUTPUT: + RETVAL + + + char* getNetDriver(char* device) ALIAS: |