diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2005-08-29 11:30:35 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2005-08-29 11:30:35 +0000 |
commit | 35015fbd8d07398f9633a096e69f1dadb9a4c389 (patch) | |
tree | c83c02bec0dc98cc7d7f2287c1be5733ec238dae /package/wiviz/src/wl_access.h | |
parent | 70ad6e4277e5f7dd548aabcd823f18b1b73f5711 (diff) |
add Wi-viz
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@1785 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/wiviz/src/wl_access.h')
-rw-r--r-- | package/wiviz/src/wl_access.h | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/package/wiviz/src/wl_access.h b/package/wiviz/src/wl_access.h new file mode 100644 index 0000000000..96f239d9b7 --- /dev/null +++ b/package/wiviz/src/wl_access.h @@ -0,0 +1,77 @@ +/* +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 +*/ +//wl_access.h - functions for accessing broadcom crap + +#define WL_DEVICE "eth1" + +typedef unsigned int uint32; +typedef unsigned char uchar; +typedef int bool; + +typedef struct ether_addr { + uchar addr[6]; +} ether_addr_t; + +typedef struct wlc_ssid { + uint32 SSID_len; + uchar SSID[32]; +} wlc_ssid_t; +/* For ioctls that take a list of MAC addresses */ +typedef struct maclist { + uint count; /* number of MAC addresses */ + struct ether_addr ea[1]; /* variable length array of MAC addresses */ +} maclist_t; +/* Linux network driver ioctl encoding */ +typedef struct wl_ioctl { + uint cmd; /* common ioctl definition */ + void *buf; /* pointer to user buffer */ + uint len; /* length of user buffer */ + bool set; /* get or set request (optional) */ + uint used; /* bytes read or written (optional) */ + uint needed; /* bytes needed (optional) */ +} wl_ioctl_t; +/* channel encoding */ +typedef struct channel_info { + int hw_channel; + int target_channel; + int scan_channel; +} channel_info_t; +/* RSSI info for sta */ +typedef struct sta_rssi { + int RSSI; + char mac[6]; + u_short zero_ex_forty_one; + } sta_rssi_t; +/* check this magic number */ +#define WLC_IOCTL_MAGIC 0x14e46c77 + +#define WLC_GET_MAGIC 0 +#define WLC_GET_BSSID 23 +#define WLC_SET_BSSID 24 +#define WLC_GET_SSID 25 +#define WLC_SET_SSID 26 +#define WLC_GET_CHANNEL 29 +#define WLC_SET_CHANNEL 30 +#define WLC_GET_MONITOR 107 /* discovered by nbd */ +#define WLC_SET_MONITOR 108 /* discovered by nbd */ +#define WLC_GET_AP 117 +#define WLC_SET_AP 118 +#define WLC_GET_RSSI 127 +#define WLC_GET_ASSOCLIST 159 + + +int wl_ioctl(char *name, int cmd, void *buf, int len); |