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, |
| 29 | }; |
| 30 | |
| 31 | struct privsep_cmd_associate |
| 32 | { |
| 33 | u8 bssid[ETH_ALEN]; |
Dmitry Shmidt | 9d9e602 | 2015-04-23 10:34:55 -0700 | [diff] [blame] | 34 | u8 ssid[SSID_MAX_LEN]; |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 35 | size_t ssid_len; |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 36 | int hwmode; |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 37 | int freq; |
Dmitry Shmidt | 6c0da2b | 2015-01-05 13:08:17 -0800 | [diff] [blame] | 38 | int channel; |
Dmitry Shmidt | 8d520ff | 2011-05-09 14:06:53 -0700 | [diff] [blame] | 39 | int pairwise_suite; |
| 40 | int group_suite; |
| 41 | int key_mgmt_suite; |
| 42 | int auth_alg; |
| 43 | int mode; |
| 44 | size_t wpa_ie_len; |
| 45 | /* followed by wpa_ie_len bytes of wpa_ie */ |
| 46 | }; |
| 47 | |
| 48 | struct privsep_cmd_set_key |
| 49 | { |
| 50 | int alg; |
| 51 | u8 addr[ETH_ALEN]; |
| 52 | int key_idx; |
| 53 | int set_tx; |
| 54 | u8 seq[8]; |
| 55 | size_t seq_len; |
| 56 | u8 key[32]; |
| 57 | size_t key_len; |
| 58 | }; |
| 59 | |
| 60 | enum privsep_event { |
| 61 | PRIVSEP_EVENT_SCAN_RESULTS, |
| 62 | PRIVSEP_EVENT_ASSOC, |
| 63 | PRIVSEP_EVENT_DISASSOC, |
| 64 | PRIVSEP_EVENT_ASSOCINFO, |
| 65 | PRIVSEP_EVENT_MICHAEL_MIC_FAILURE, |
| 66 | PRIVSEP_EVENT_INTERFACE_STATUS, |
| 67 | PRIVSEP_EVENT_PMKID_CANDIDATE, |
| 68 | PRIVSEP_EVENT_STKSTART, |
| 69 | PRIVSEP_EVENT_FT_RESPONSE, |
| 70 | PRIVSEP_EVENT_RX_EAPOL, |
| 71 | }; |
| 72 | |
| 73 | #endif /* PRIVSEP_COMMANDS_H */ |