2 This file is part of Wi-viz (http://wiviz.natetrue.com).
4 Wi-viz is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License v2 as published by
6 the Free Software Foundation.
8 Wi-viz is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
13 You should have received a copy of the GNU General Public License
14 along with Wi-viz; if not, write to the Free Software
15 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 //wl_access.h - functions for accessing broadcom crap
19 #define WL_DEVICE "eth1"
21 typedef unsigned int uint32
;
22 typedef unsigned char uchar
;
25 typedef struct ether_addr
{
29 typedef struct wlc_ssid
{
33 /* For ioctls that take a list of MAC addresses */
34 typedef struct maclist
{
35 uint count
; /* number of MAC addresses */
36 struct ether_addr ea
[1]; /* variable length array of MAC addresses */
38 /* Linux network driver ioctl encoding */
39 typedef struct wl_ioctl
{
40 uint cmd
; /* common ioctl definition */
41 void *buf
; /* pointer to user buffer */
42 uint len
; /* length of user buffer */
43 bool set
; /* get or set request (optional) */
44 uint used
; /* bytes read or written (optional) */
45 uint needed
; /* bytes needed (optional) */
47 /* channel encoding */
48 typedef struct channel_info
{
53 /* RSSI info for sta */
54 typedef struct sta_rssi
{
57 u_short zero_ex_forty_one
;
59 /* check this magic number */
60 #define WLC_IOCTL_MAGIC 0x14e46c77
62 #define WLC_GET_MAGIC 0
63 #define WLC_GET_BSSID 23
64 #define WLC_SET_BSSID 24
65 #define WLC_GET_SSID 25
66 #define WLC_SET_SSID 26
67 #define WLC_GET_CHANNEL 29
68 #define WLC_SET_CHANNEL 30
69 #define WLC_GET_MONITOR 107 /* discovered by nbd */
70 #define WLC_SET_MONITOR 108 /* discovered by nbd */
71 #define WLC_GET_AP 117
72 #define WLC_SET_AP 118
73 #define WLC_GET_RSSI 127
74 #define WLC_GET_ASSOCLIST 159
77 int wl_ioctl(char *name
, int cmd
, void *buf
, int len
);