Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 1 | /* |
| 2 | * WPA Supplicant - privilege separation commands |
| 3 | * Copyright (c) 2007-2009, Jouni Malinen <j@w1.fi> |
| 4 | * |
Dmitry Shmidt | c5ec7f5 | 2012-03-06 16:33:24 -0800 | [diff] [blame] | 5 | * This software may be distributed under the terms of the BSD license. |
| 6 | * See README for more details. |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 7 | */ |
| 8 | |
| 9 | #ifndef PRIVSEP_COMMANDS_H |
| 10 | #define PRIVSEP_COMMANDS_H |
| 11 | |
Dmitry Shmidt | 9d9e602 | 2015-04-23 10:34:55 -0700 | [diff] [blame] | 12 | #include "common/ieee802_11_defs.h" |
| 13 | |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 14 | enum 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 Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame^] | 29 | PRIVSEP_CMD_AUTHENTICATE, |
| 30 | }; |
| 31 | |
| 32 | struct 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 Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 48 | }; |
| 49 | |
| 50 | struct privsep_cmd_associate |
| 51 | { |
| 52 | u8 bssid[ETH_ALEN]; |
Dmitry Shmidt | 9d9e602 | 2015-04-23 10:34:55 -0700 | [diff] [blame] | 53 | u8 ssid[SSID_MAX_LEN]; |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 54 | size_t ssid_len; |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 55 | int hwmode; |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 56 | int freq; |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 57 | int channel; |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 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 | |
| 67 | struct 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 | |
| 79 | enum 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 Shmidt | d80a401 | 2015-11-05 16:35:40 -0800 | [diff] [blame^] | 90 | PRIVSEP_EVENT_SCAN_STARTED, |
| 91 | PRIVSEP_EVENT_AUTH, |
| 92 | }; |
| 93 | |
| 94 | struct 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 Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 102 | }; |
| 103 | |
| 104 | #endif /* PRIVSEP_COMMANDS_H */ |