diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2004-05-19 15:28:36 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2004-05-19 15:28:36 +0000 |
commit | b8266795f0feff415261179120d70d0e6910cdfb (patch) | |
tree | 1686850eb0db7cb1d67fea645a5b53ee40c01e1f /perl-install/c/stuff.xs.pl | |
parent | b653de526b0a1cb7556ad744facae34b42c645e7 (diff) | |
download | drakx-b8266795f0feff415261179120d70d0e6910cdfb.tar drakx-b8266795f0feff415261179120d70d0e6910cdfb.tar.gz drakx-b8266795f0feff415261179120d70d0e6910cdfb.tar.bz2 drakx-b8266795f0feff415261179120d70d0e6910cdfb.tar.xz drakx-b8266795f0feff415261179120d70d0e6910cdfb.zip |
forward better LAN vs wireless filtering
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 26e6ce413..d30aff57f 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> @@ -405,6 +407,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, IFNAMSIZ); + RETVAL = ioctl(s, SIOCGIWNAME, &ifr) != -1; + close(s); + OUTPUT: + RETVAL + + + char* getNetDriver(char* device) ALIAS: |