be94fb81047521ae6438c454600a16e493f28ebe
[libeap.git] / src / common / privsep_commands.h
1 /*
2  * WPA Supplicant - privilege separation commands
3  * Copyright (c) 2007, Jouni Malinen <j@w1.fi>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation.
8  *
9  * Alternatively, this software may be distributed under the terms of BSD
10  * license.
11  *
12  * See README and COPYING for more details.
13  */
14
15 #ifndef PRIVSEP_COMMANDS_H
16 #define PRIVSEP_COMMANDS_H
17
18 enum privsep_cmd {
19         PRIVSEP_CMD_REGISTER,
20         PRIVSEP_CMD_UNREGISTER,
21         PRIVSEP_CMD_SET_WPA,
22         PRIVSEP_CMD_SCAN,
23         PRIVSEP_CMD_GET_SCAN_RESULTS,
24         PRIVSEP_CMD_ASSOCIATE,
25         PRIVSEP_CMD_GET_BSSID,
26         PRIVSEP_CMD_GET_SSID,
27         PRIVSEP_CMD_SET_KEY,
28         PRIVSEP_CMD_GET_CAPA,
29         PRIVSEP_CMD_L2_REGISTER,
30         PRIVSEP_CMD_L2_UNREGISTER,
31         PRIVSEP_CMD_L2_NOTIFY_AUTH_START,
32         PRIVSEP_CMD_L2_SEND,
33         PRIVSEP_CMD_SET_MODE,
34 };
35
36 struct privsep_cmd_associate
37 {
38         u8 bssid[ETH_ALEN];
39         u8 ssid[32];
40         size_t ssid_len;
41         int freq;
42         int pairwise_suite;
43         int group_suite;
44         int key_mgmt_suite;
45         int auth_alg;
46         int mode;
47         size_t wpa_ie_len;
48         /* followed by wpa_ie_len bytes of wpa_ie */
49 };
50
51 struct privsep_cmd_set_key
52 {
53         int alg;
54         u8 addr[ETH_ALEN];
55         int key_idx;
56         int set_tx;
57         u8 seq[8];
58         size_t seq_len;
59         u8 key[32];
60         size_t key_len;
61 };
62
63 enum privsep_event {
64         PRIVSEP_EVENT_SCAN_RESULTS,
65         PRIVSEP_EVENT_ASSOC,
66         PRIVSEP_EVENT_DISASSOC,
67         PRIVSEP_EVENT_ASSOCINFO,
68         PRIVSEP_EVENT_MICHAEL_MIC_FAILURE,
69         PRIVSEP_EVENT_INTERFACE_STATUS,
70         PRIVSEP_EVENT_PMKID_CANDIDATE,
71         PRIVSEP_EVENT_STKSTART,
72         PRIVSEP_EVENT_FT_RESPONSE,
73         PRIVSEP_EVENT_RX_EAPOL,
74 };
75
76 #endif /* PRIVSEP_COMMANDS_H */