channel-switch: use sys/ioctl.h instead of stropts.h
[rofl0r-MacGeiger.git] / wireless-lite.h
blob90730f23011c5c84433e3fc997326c60824351ef
1 #ifndef WIRELESS_LITE_H
2 #define WIRELESS_LITE_H
4 /* cleaned up from linux/wireless.h */
6 #include <net/if.h>
8 #define SIOCSIWFREQ 0x8B04
9 #define SIOCSIWMODE 0x8B06
10 #define SIOCGIWMODE 0x8B07
12 #define IW_FREQ_FIXED 0x01
14 #define IW_MODE_AUTO 0
15 #define IW_MODE_ADHOC 1
16 #define IW_MODE_INFRA 2
17 #define IW_MODE_MASTER 3
18 #define IW_MODE_REPEAT 4
19 #define IW_MODE_SECOND 5
20 #define IW_MODE_MONITOR 6
21 #define IW_MODE_MESH 7
23 struct iw_quality {
24 unsigned char qual;
25 unsigned char level;
26 unsigned char noise;
27 unsigned char updated;
30 struct iw_param {
31 int value;
32 unsigned char fixed;
33 unsigned char disabled;
34 unsigned short flags;
37 struct iw_point {
38 void *pointer;
39 unsigned short length;
40 unsigned short flags;
43 struct iw_freq {
44 int m;
45 short e;
46 unsigned char i;
47 unsigned char flags;
50 union iwreq_data {
51 char name[IFNAMSIZ];
52 struct iw_point essid;
53 struct iw_param nwid;
54 struct iw_freq freq;
55 struct iw_param sens;
56 struct iw_param bitrate;
57 struct iw_param txpower;
58 struct iw_param rts;
59 struct iw_param frag;
60 unsigned mode;
61 struct iw_param retry;
62 struct iw_point encoding;
63 struct iw_param power;
64 struct iw_quality qual;
65 struct sockaddr ap_addr;
66 struct sockaddr addr;
67 struct iw_param param;
68 struct iw_point data;
71 struct iwreq {
72 union {
73 char ifrn_name[IFNAMSIZ];
74 } ifr_ifrn;
75 union iwreq_data u;
78 #define IEEE80211_FCTL_VERS 0x0003
79 #define IEEE80211_FCTL_FTYPE 0x000c
80 #define IEEE80211_FCTL_STYPE 0x00f0
81 #define IEEE80211_FCTL_TODS 0x0100
82 #define IEEE80211_FCTL_FROMDS 0x0200
83 #define IEEE80211_FCTL_MOREFRAGS 0x0400
84 #define IEEE80211_FCTL_RETRY 0x0800
85 #define IEEE80211_FCTL_PM 0x1000
86 #define IEEE80211_FCTL_MOREDATA 0x2000
87 #define IEEE80211_FCTL_PROTECTED 0x4000
88 #define IEEE80211_FCTL_ORDER 0x8000
90 #define IEEE80211_SCTL_FRAG 0x000F
91 #define IEEE80211_SCTL_SEQ 0xFFF0
93 #define IEEE80211_FTYPE_MGMT 0x0000
94 #define IEEE80211_FTYPE_CTL 0x0004
95 #define IEEE80211_FTYPE_DATA 0x0008
97 #define IEEE80211_STYPE_ASSOC_REQ 0x0000
98 #define IEEE80211_STYPE_ASSOC_RESP 0x0010
99 #define IEEE80211_STYPE_REASSOC_REQ 0x0020
100 #define IEEE80211_STYPE_REASSOC_RESP 0x0030
101 #define IEEE80211_STYPE_PROBE_REQ 0x0040
102 #define IEEE80211_STYPE_PROBE_RESP 0x0050
103 #define IEEE80211_STYPE_BEACON 0x0080
104 #define IEEE80211_STYPE_ATIM 0x0090
105 #define IEEE80211_STYPE_DISASSOC 0x00A0
106 #define IEEE80211_STYPE_AUTH 0x00B0
107 #define IEEE80211_STYPE_DEAUTH 0x00C0
108 #define IEEE80211_STYPE_ACTION 0x00D0
110 #define IEEE80211_STYPE_BACK_REQ 0x0080
111 #define IEEE80211_STYPE_BACK 0x0090
112 #define IEEE80211_STYPE_PSPOLL 0x00A0
113 #define IEEE80211_STYPE_RTS 0x00B0
114 #define IEEE80211_STYPE_CTS 0x00C0
115 #define IEEE80211_STYPE_ACK 0x00D0
116 #define IEEE80211_STYPE_CFEND 0x00E0
117 #define IEEE80211_STYPE_CFENDACK 0x00F0
119 #define IEEE80211_STYPE_DATA 0x0000
120 #define IEEE80211_STYPE_DATA_CFACK 0x0010
121 #define IEEE80211_STYPE_DATA_CFPOLL 0x0020
122 #define IEEE80211_STYPE_DATA_CFACKPOLL 0x0030
123 #define IEEE80211_STYPE_NULLFUNC 0x0040
124 #define IEEE80211_STYPE_CFACK 0x0050
125 #define IEEE80211_STYPE_CFPOLL 0x0060
126 #define IEEE80211_STYPE_CFACKPOLL 0x0070
127 #define IEEE80211_STYPE_QOS_DATA 0x0080
128 #define IEEE80211_STYPE_QOS_DATA_CFACK 0x0090
129 #define IEEE80211_STYPE_QOS_DATA_CFPOLL 0x00A0
130 #define IEEE80211_STYPE_QOS_DATA_CFACKPOLL 0x00B0
131 #define IEEE80211_STYPE_QOS_NULLFUNC 0x00C0
132 #define IEEE80211_STYPE_QOS_CFACK 0x00D0
133 #define IEEE80211_STYPE_QOS_CFPOLL 0x00E0
134 #define IEEE80211_STYPE_QOS_CFACKPOLL 0x00F0
136 #endif