From d58a09110ccfa95f06c983fe796806f2e035c9d2 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sat, 7 Oct 2006 11:57:20 +0000 Subject: move old kamikaze out of trunk - will put buildroot-ng in there as soon as all the developers are ready SVN-Revision: 4944 --- openwrt/package/wiviz/src/wl_access.c | 73 ----------------------------------- 1 file changed, 73 deletions(-) delete mode 100644 openwrt/package/wiviz/src/wl_access.c (limited to 'openwrt/package/wiviz/src/wl_access.c') diff --git a/openwrt/package/wiviz/src/wl_access.c b/openwrt/package/wiviz/src/wl_access.c deleted file mode 100644 index a5172c3665..0000000000 --- a/openwrt/package/wiviz/src/wl_access.c +++ /dev/null @@ -1,73 +0,0 @@ -/* -This file is part of Wi-viz (http://wiviz.natetrue.com). - -Wi-viz is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License v2 as published by -the Free Software Foundation. - -Wi-viz is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with Wi-viz; if not, write to the Free Software -Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ -#include -#include -#include -#include -#include -#include - -#include "wl_access.h" - -int wl_ioctl(char *name, int cmd, void *buf, int len) -{ - struct ifreq ifr; - wl_ioctl_t ioc; - int ret = 0; - int s; - - /* open socket to kernel */ - if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { - perror("socket"); - return errno; - } - - /* do it */ - ioc.cmd = cmd; - ioc.buf = buf; - ioc.len = len; - strncpy(ifr.ifr_name, name, IFNAMSIZ); - ifr.ifr_data = (caddr_t) &ioc; - ret = ioctl(s, SIOCDEVPRIVATE, &ifr); - - /* cleanup */ - close(s); - return ret; -} - -int get_mac(char *name, void *buf) -{ - struct ifreq ifr; - int ret = 0; - int s; - - /* open socket to kernel */ - if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) { - perror("socket"); - return errno; - } - - strncpy(ifr.ifr_name, name, IFNAMSIZ); - //ifr.ifr_data = (caddr_t) buf; - if ((ret = ioctl(s, SIOCGIFHWADDR, &ifr)) < 0) - perror(ifr.ifr_name); - - /* cleanup */ - close(s); - memcpy(buf, &ifr.ifr_hwaddr.sa_data, 6); - return ret; -} -- cgit v1.2.3