]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/wpa/src/common/privsep_commands.h
Update hostapd/wpa_supplicant to 2.8 to fix multiple vulnerabilities.
[FreeBSD/FreeBSD.git] / contrib / wpa / src / common / privsep_commands.h
1 /*
2  * WPA Supplicant - privilege separation commands
3  * Copyright (c) 2007-2009, Jouni Malinen <j@w1.fi>
4  *
5  * This software may be distributed under the terms of the BSD license.
6  * See README for more details.
7  */
8
9 #ifndef PRIVSEP_COMMANDS_H
10 #define PRIVSEP_COMMANDS_H
11
12 #include "drivers/driver.h"
13 #include "common/ieee802_11_defs.h"
14
15 enum privsep_cmd {
16         PRIVSEP_CMD_REGISTER,
17         PRIVSEP_CMD_UNREGISTER,
18         PRIVSEP_CMD_SCAN,
19         PRIVSEP_CMD_GET_SCAN_RESULTS,
20         PRIVSEP_CMD_ASSOCIATE,
21         PRIVSEP_CMD_GET_BSSID,
22         PRIVSEP_CMD_GET_SSID,
23         PRIVSEP_CMD_SET_KEY,
24         PRIVSEP_CMD_GET_CAPA,
25         PRIVSEP_CMD_L2_REGISTER,
26         PRIVSEP_CMD_L2_UNREGISTER,
27         PRIVSEP_CMD_L2_NOTIFY_AUTH_START,
28         PRIVSEP_CMD_L2_SEND,
29         PRIVSEP_CMD_SET_COUNTRY,
30         PRIVSEP_CMD_AUTHENTICATE,
31 };
32
33 #define PRIVSEP_MAX_SCAN_FREQS 50
34
35 struct privsep_cmd_scan {
36         unsigned int num_ssids;
37         u8 ssids[WPAS_MAX_SCAN_SSIDS][32];
38         u8 ssid_lens[WPAS_MAX_SCAN_SSIDS];
39         unsigned int num_freqs;
40         u16 freqs[PRIVSEP_MAX_SCAN_FREQS];
41 };
42
43 struct privsep_cmd_authenticate {
44         int freq;
45         u8 bssid[ETH_ALEN];
46         u8 ssid[SSID_MAX_LEN];
47         size_t ssid_len;
48         int auth_alg;
49         size_t ie_len;
50         u8 wep_key[4][16];
51         size_t wep_key_len[4];
52         int wep_tx_keyidx;
53         int local_state_change;
54         int p2p;
55         size_t auth_data_len;
56         /* followed by ie_len bytes of ie */
57         /* followed by auth_data_len bytes of auth_data */
58 };
59
60 struct privsep_cmd_associate {
61         u8 bssid[ETH_ALEN];
62         u8 ssid[SSID_MAX_LEN];
63         size_t ssid_len;
64         int hwmode;
65         int freq;
66         int channel;
67         int pairwise_suite;
68         int group_suite;
69         int key_mgmt_suite;
70         int auth_alg;
71         int mode;
72         size_t wpa_ie_len;
73         /* followed by wpa_ie_len bytes of wpa_ie */
74 };
75
76 struct privsep_cmd_set_key {
77         int alg;
78         u8 addr[ETH_ALEN];
79         int key_idx;
80         int set_tx;
81         u8 seq[8];
82         size_t seq_len;
83         u8 key[32];
84         size_t key_len;
85 };
86
87 enum privsep_event {
88         PRIVSEP_EVENT_SCAN_RESULTS,
89         PRIVSEP_EVENT_ASSOC,
90         PRIVSEP_EVENT_DISASSOC,
91         PRIVSEP_EVENT_ASSOCINFO,
92         PRIVSEP_EVENT_MICHAEL_MIC_FAILURE,
93         PRIVSEP_EVENT_INTERFACE_STATUS,
94         PRIVSEP_EVENT_PMKID_CANDIDATE,
95         PRIVSEP_EVENT_FT_RESPONSE,
96         PRIVSEP_EVENT_RX_EAPOL,
97         PRIVSEP_EVENT_SCAN_STARTED,
98         PRIVSEP_EVENT_AUTH,
99 };
100
101 struct privsep_event_auth {
102         u8 peer[ETH_ALEN];
103         u8 bssid[ETH_ALEN];
104         u16 auth_type;
105         u16 auth_transaction;
106         u16 status_code;
107         size_t ies_len;
108         /* followed by ies_len bytes of ies */
109 };
110
111 #endif /* PRIVSEP_COMMANDS_H */