diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2004-05-19 15:13:52 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2004-05-19 15:13:52 +0000 |
commit | b2b482c7034e5ff2df798920b54b2cb46b70a0a2 (patch) | |
tree | 705e1a1090ff8c77a95571420e8580423076491c /perl-install | |
parent | 5dbf6451b7e6b26aacf22a222b4e2c2ebedec692 (diff) | |
download | drakx-backup-do-not-use-b2b482c7034e5ff2df798920b54b2cb46b70a0a2.tar drakx-backup-do-not-use-b2b482c7034e5ff2df798920b54b2cb46b70a0a2.tar.gz drakx-backup-do-not-use-b2b482c7034e5ff2df798920b54b2cb46b70a0a2.tar.bz2 drakx-backup-do-not-use-b2b482c7034e5ff2df798920b54b2cb46b70a0a2.tar.xz drakx-backup-do-not-use-b2b482c7034e5ff2df798920b54b2cb46b70a0a2.zip |
(isNetDeviceWirelessAware) introduce it in order to detect whether a
network interface support wireless extensions or not
Diffstat (limited to 'perl-install')
-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: |