hostapd: remove version tag from directory
[dragonfly.git] / contrib / hostapd / prism54.h
blobcb0a9a19ba8b5f090fcc1083ed67397ab4510695
1 #ifndef PRISM54_H
2 #define PRISM54_H
4 struct ieee802_3_hdr_s {
5 unsigned char da[6];
6 unsigned char sa[6];
7 unsigned short type;
8 } __attribute__ ((packed));
10 typedef struct ieee802_3_hdr_s ieee802_3_hdr;
12 #define PIMOP_GET 0
13 #define PIMOP_SET 1
14 #define PIMOP_RESPONSE 2
15 #define PIMOP_ERROR 3
16 #define PIMOP_TRAP 4
18 struct pimdev_hdr_s {
19 int op;
20 unsigned long oid;
21 } __attribute__ ((packed));
23 typedef struct pimdev_hdr_s pimdev_hdr;
25 #define DOT11_OID_ATTACHMENT 0x19000003
27 /* really need to check */
28 #define DOT11_PKT_BEACON 0x80
29 #define DOT11_PKT_ASSOC_RESP 0x10
30 #define DOT11_PKT_REASSOC_RESP 0x30
31 #define DOT11_PKT_PROBE_RESP 0x50
33 struct obj_attachment_hdr {
34 char type;
35 char reserved;
36 short id;
37 short size;
38 } __attribute__ ((packed));
40 struct obj_attachment {
41 char type;
42 char reserved;
43 short id;
44 short size;
45 char data[1];
46 } __attribute__ ((packed));
48 #define DOT11_OID_MLMEAUTOLEVEL 0x19000001
49 #define DOT11_MLME_AUTO 0
50 #define DOT11_MLME_INTERMEDIATE 0x01000000
51 #define DOT11_MLME_EXTENDED 0x02000000
53 #define DOT11_OID_DEAUTHENTICATE 0x18000000
54 #define DOT11_OID_AUTHENTICATE 0x18000001
55 #define DOT11_OID_DISASSOCIATE 0x18000002
56 #define DOT11_OID_ASSOCIATE 0x18000003
57 #define DOT11_OID_BEACON 0x18000005
58 #define DOT11_OID_PROBE 0x18000006
59 #define DOT11_OID_REASSOCIATE 0x1800000b
61 struct obj_mlme {
62 char address[6];
63 short id;
64 short state;
65 short code;
66 } __attribute__ ((packed));
68 #define DOT11_OID_DEAUTHENTICATEEX 0x18000007
69 #define DOT11_OID_AUTHENTICATEEX 0x18000008
70 #define DOT11_OID_DISASSOCIATEEX 0x18000009
71 #define DOT11_OID_ASSOCIATEEX 0x1800000a
72 #define DOT11_OID_REASSOCIATEEX 0x1800000c
74 struct obj_mlmeex {
75 char address[6];
76 short id;
77 short state;
78 short code;
79 short size;
80 char data[1];
81 } __attribute__ ((packed));
83 #define DOT11_OID_STAKEY 0x12000008
85 #define DOT11_PRIV_WEP 0
86 #define DOT11_PRIV_TKIP 1
88 /* endian reversed to bigger endian */
89 #define DOT11_STAKEY_OPTION_DEFAULTKEY 0x100
91 struct obj_stakey {
92 char address[6];
93 char keyid;
94 char reserved;
95 short options;
96 char type;
97 char length;
98 char key[32];
99 } __attribute__ ((packed));
101 #define DOT11_OID_DEFKEYID 0x12000003
102 #define DOT11_OID_DEFKEY1 0x12000004
103 #define DOT11_OID_DEFKEY2 0x12000005
104 #define DOT11_OID_DEFKEY3 0x12000006
105 #define DOT11_OID_DEFKEY4 0x12000007
107 struct obj_key {
108 char type;
109 char length;
110 char key[32];
111 } __attribute__ ((packed));
113 #define DOT11_OID_STASC 0x1200000a
115 struct obj_stasc {
116 char address[6];
117 char keyid;
118 char tx_sc;
119 unsigned long sc_high;
120 unsigned short sc_low;
121 } __attribute__ ((packed));
123 #define DOT11_OID_CLIENTS 0x15000001
124 #define DOT11_OID_CLIENTSASSOCIATED 0x15000002
125 #define DOT11_OID_CLIENTST 0x15000003
126 #define DOT11_OID_CLIENTEND 0x150007d9
127 #define DOT11_OID_CLIENTFIND 0x150007db
129 #define DOT11_NODE_UNKNOWN
130 #define DOT11_NODE_CLIENT
131 #define DOT11_NODE_AP
133 /* endian reversed to bigger endian */
134 #define DOT11_STATE_NONE 0
135 #define DOT11_STATE_AUTHING 0x100
136 #define DOT11_STATE_AUTH 0x200
137 #define DOT11_STATE_ASSOCING 0x300
138 #define DOT11_STATE_REASSOCING 0x400
139 #define DOT11_STATE_ASSOC 0x500
140 #define DOT11_STATE_WDS 0x600
142 struct obj_sta {
143 char address[6];
144 char pad[2];
145 char state;
146 char node;
147 short age;
148 char reserved1;
149 char rssi;
150 char rate;
151 char reserved2;
152 } __attribute__ ((packed));
154 #define DOT11_OID_SSID 0x10000002
155 #define DOT11_OID_SSIDOVERRIDE 0x10000006
157 struct obj_ssid {
158 char length;
159 char octets[33];
160 } __attribute__ ((packed));
162 #define DOT11_OID_EAPAUTHSTA 0x150007de
163 #define DOT11_OID_EAPUNAUTHSTA 0x150007df
164 /* not in 38801 datasheet??? */
165 #define DOT11_OID_DOT1XENABLE 0x150007e0
166 #define DOT11_OID_MICFAILURE 0x150007e1
167 #define DOT11_OID_AUTHENABLE 0x12000000
168 #define DOT11_OID_PRIVACYINVOKED 0x12000001
169 #define DOT11_OID_EXUNENCRYPTED 0x12000002
171 #define DOT11_AUTH_OS 0x01000000
172 #define DOT11_AUTH_SK 0x02000000
173 #define DOT11_AUTH_BOTH 0x03000000
175 #define DOT11_BOOL_TRUE 0x01000000
177 #endif /* PRISM54_H */