blob: 8dff30382b60559e5d9527877886476ce5f0428b [file] [log] [blame]
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -07001/*
2 * WPA Supplicant - privilege separation commands
3 * Copyright (c) 2007-2009, Jouni Malinen <j@w1.fi>
4 *
Dmitry Shmidtc5ec7f52012-03-06 16:33:24 -08005 * This software may be distributed under the terms of the BSD license.
6 * See README for more details.
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -07007 */
8
9#ifndef PRIVSEP_COMMANDS_H
10#define PRIVSEP_COMMANDS_H
11
Dmitry Shmidt9d9e6022015-04-23 10:34:55 -070012#include "common/ieee802_11_defs.h"
13
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070014enum 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,
Dmitry Shmidtd80a4012015-11-05 16:35:40 -080029 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 */
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070048};
49
50struct privsep_cmd_associate
51{
52 u8 bssid[ETH_ALEN];
Dmitry Shmidt9d9e6022015-04-23 10:34:55 -070053 u8 ssid[SSID_MAX_LEN];
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070054 size_t ssid_len;
Dmitry Shmidt6c0da2b2015-01-05 13:08:17 -080055 int hwmode;
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070056 int freq;
Dmitry Shmidt6c0da2b2015-01-05 13:08:17 -080057 int channel;
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -070058 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,
Dmitry Shmidtd80a4012015-11-05 16:35:40 -080090 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 */
Dmitry Shmidt8d520ff2011-05-09 14:06:53 -0700102};
103
104#endif /* PRIVSEP_COMMANDS_H */