privsep_commands.h revision 302408
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 "common/ieee802_11_defs.h"
13
14enum privsep_cmd {
15	PRIVSEP_CMD_REGISTER,
16	PRIVSEP_CMD_UNREGISTER,
17	PRIVSEP_CMD_SCAN,
18	PRIVSEP_CMD_GET_SCAN_RESULTS,
19	PRIVSEP_CMD_ASSOCIATE,
20	PRIVSEP_CMD_GET_BSSID,
21	PRIVSEP_CMD_GET_SSID,
22	PRIVSEP_CMD_SET_KEY,
23	PRIVSEP_CMD_GET_CAPA,
24	PRIVSEP_CMD_L2_REGISTER,
25	PRIVSEP_CMD_L2_UNREGISTER,
26	PRIVSEP_CMD_L2_NOTIFY_AUTH_START,
27	PRIVSEP_CMD_L2_SEND,
28	PRIVSEP_CMD_SET_COUNTRY,
29	PRIVSEP_CMD_AUTHENTICATE,
30};
31
32struct privsep_cmd_authenticate
33{
34	int freq;
35	u8 bssid[ETH_ALEN];
36	u8 ssid[SSID_MAX_LEN];
37	size_t ssid_len;
38	int auth_alg;
39	size_t ie_len;
40	u8 wep_key[4][16];
41	size_t wep_key_len[4];
42	int wep_tx_keyidx;
43	int local_state_change;
44	int p2p;
45	size_t sae_data_len;
46	/* followed by ie_len bytes of ie */
47	/* followed by sae_data_len bytes of sae_data */
48};
49
50struct privsep_cmd_associate
51{
52	u8 bssid[ETH_ALEN];
53	u8 ssid[SSID_MAX_LEN];
54	size_t ssid_len;
55	int hwmode;
56	int freq;
57	int channel;
58	int pairwise_suite;
59	int group_suite;
60	int key_mgmt_suite;
61	int auth_alg;
62	int mode;
63	size_t wpa_ie_len;
64	/* followed by wpa_ie_len bytes of wpa_ie */
65};
66
67struct privsep_cmd_set_key
68{
69	int alg;
70	u8 addr[ETH_ALEN];
71	int key_idx;
72	int set_tx;
73	u8 seq[8];
74	size_t seq_len;
75	u8 key[32];
76	size_t key_len;
77};
78
79enum privsep_event {
80	PRIVSEP_EVENT_SCAN_RESULTS,
81	PRIVSEP_EVENT_ASSOC,
82	PRIVSEP_EVENT_DISASSOC,
83	PRIVSEP_EVENT_ASSOCINFO,
84	PRIVSEP_EVENT_MICHAEL_MIC_FAILURE,
85	PRIVSEP_EVENT_INTERFACE_STATUS,
86	PRIVSEP_EVENT_PMKID_CANDIDATE,
87	PRIVSEP_EVENT_STKSTART,
88	PRIVSEP_EVENT_FT_RESPONSE,
89	PRIVSEP_EVENT_RX_EAPOL,
90	PRIVSEP_EVENT_SCAN_STARTED,
91	PRIVSEP_EVENT_AUTH,
92};
93
94struct privsep_event_auth {
95	u8 peer[ETH_ALEN];
96	u8 bssid[ETH_ALEN];
97	u16 auth_type;
98	u16 auth_transaction;
99	u16 status_code;
100	size_t ies_len;
101	/* followed by ies_len bytes of ies */
102};
103
104#endif /* PRIVSEP_COMMANDS_H */
105