1e5b75505Sopenharmony_ci/* 2e5b75505Sopenharmony_ci * WPA Supplicant - privilege separation commands 3e5b75505Sopenharmony_ci * Copyright (c) 2007-2009, Jouni Malinen <j@w1.fi> 4e5b75505Sopenharmony_ci * 5e5b75505Sopenharmony_ci * This software may be distributed under the terms of the BSD license. 6e5b75505Sopenharmony_ci * See README for more details. 7e5b75505Sopenharmony_ci */ 8e5b75505Sopenharmony_ci 9e5b75505Sopenharmony_ci#ifndef PRIVSEP_COMMANDS_H 10e5b75505Sopenharmony_ci#define PRIVSEP_COMMANDS_H 11e5b75505Sopenharmony_ci 12e5b75505Sopenharmony_ci#include "drivers/driver.h" 13e5b75505Sopenharmony_ci#include "common/ieee802_11_defs.h" 14e5b75505Sopenharmony_ci 15e5b75505Sopenharmony_cienum privsep_cmd { 16e5b75505Sopenharmony_ci PRIVSEP_CMD_REGISTER, 17e5b75505Sopenharmony_ci PRIVSEP_CMD_UNREGISTER, 18e5b75505Sopenharmony_ci PRIVSEP_CMD_SCAN, 19e5b75505Sopenharmony_ci PRIVSEP_CMD_GET_SCAN_RESULTS, 20e5b75505Sopenharmony_ci PRIVSEP_CMD_ASSOCIATE, 21e5b75505Sopenharmony_ci PRIVSEP_CMD_GET_BSSID, 22e5b75505Sopenharmony_ci PRIVSEP_CMD_GET_SSID, 23e5b75505Sopenharmony_ci PRIVSEP_CMD_SET_KEY, 24e5b75505Sopenharmony_ci PRIVSEP_CMD_GET_CAPA, 25e5b75505Sopenharmony_ci PRIVSEP_CMD_L2_REGISTER, 26e5b75505Sopenharmony_ci PRIVSEP_CMD_L2_UNREGISTER, 27e5b75505Sopenharmony_ci PRIVSEP_CMD_L2_NOTIFY_AUTH_START, 28e5b75505Sopenharmony_ci PRIVSEP_CMD_L2_SEND, 29e5b75505Sopenharmony_ci PRIVSEP_CMD_SET_COUNTRY, 30e5b75505Sopenharmony_ci PRIVSEP_CMD_AUTHENTICATE, 31e5b75505Sopenharmony_ci}; 32e5b75505Sopenharmony_ci 33e5b75505Sopenharmony_ci#define PRIVSEP_MAX_SCAN_FREQS 50 34e5b75505Sopenharmony_ci 35e5b75505Sopenharmony_cistruct privsep_cmd_scan { 36e5b75505Sopenharmony_ci unsigned int num_ssids; 37e5b75505Sopenharmony_ci u8 ssids[WPAS_MAX_SCAN_SSIDS][32]; 38e5b75505Sopenharmony_ci u8 ssid_lens[WPAS_MAX_SCAN_SSIDS]; 39e5b75505Sopenharmony_ci unsigned int num_freqs; 40e5b75505Sopenharmony_ci u16 freqs[PRIVSEP_MAX_SCAN_FREQS]; 41e5b75505Sopenharmony_ci}; 42e5b75505Sopenharmony_ci 43e5b75505Sopenharmony_cistruct privsep_cmd_authenticate { 44e5b75505Sopenharmony_ci int freq; 45e5b75505Sopenharmony_ci u8 bssid[ETH_ALEN]; 46e5b75505Sopenharmony_ci u8 ssid[SSID_MAX_LEN]; 47e5b75505Sopenharmony_ci size_t ssid_len; 48e5b75505Sopenharmony_ci int auth_alg; 49e5b75505Sopenharmony_ci size_t ie_len; 50e5b75505Sopenharmony_ci u8 wep_key[4][16]; 51e5b75505Sopenharmony_ci size_t wep_key_len[4]; 52e5b75505Sopenharmony_ci int wep_tx_keyidx; 53e5b75505Sopenharmony_ci int local_state_change; 54e5b75505Sopenharmony_ci int p2p; 55e5b75505Sopenharmony_ci size_t auth_data_len; 56e5b75505Sopenharmony_ci /* followed by ie_len bytes of ie */ 57e5b75505Sopenharmony_ci /* followed by auth_data_len bytes of auth_data */ 58e5b75505Sopenharmony_ci}; 59e5b75505Sopenharmony_ci 60e5b75505Sopenharmony_cistruct privsep_cmd_associate { 61e5b75505Sopenharmony_ci u8 bssid[ETH_ALEN]; 62e5b75505Sopenharmony_ci u8 ssid[SSID_MAX_LEN]; 63e5b75505Sopenharmony_ci size_t ssid_len; 64e5b75505Sopenharmony_ci int hwmode; 65e5b75505Sopenharmony_ci int freq; 66e5b75505Sopenharmony_ci int channel; 67e5b75505Sopenharmony_ci int pairwise_suite; 68e5b75505Sopenharmony_ci int group_suite; 69e5b75505Sopenharmony_ci int key_mgmt_suite; 70e5b75505Sopenharmony_ci int auth_alg; 71e5b75505Sopenharmony_ci int mode; 72e5b75505Sopenharmony_ci size_t wpa_ie_len; 73e5b75505Sopenharmony_ci /* followed by wpa_ie_len bytes of wpa_ie */ 74e5b75505Sopenharmony_ci}; 75e5b75505Sopenharmony_ci 76e5b75505Sopenharmony_cistruct privsep_cmd_set_key { 77e5b75505Sopenharmony_ci int alg; 78e5b75505Sopenharmony_ci u8 addr[ETH_ALEN]; 79e5b75505Sopenharmony_ci int key_idx; 80e5b75505Sopenharmony_ci int set_tx; 81e5b75505Sopenharmony_ci u8 seq[8]; 82e5b75505Sopenharmony_ci size_t seq_len; 83e5b75505Sopenharmony_ci u8 key[32]; 84e5b75505Sopenharmony_ci size_t key_len; 85e5b75505Sopenharmony_ci}; 86e5b75505Sopenharmony_ci 87e5b75505Sopenharmony_cienum privsep_event { 88e5b75505Sopenharmony_ci PRIVSEP_EVENT_SCAN_RESULTS, 89e5b75505Sopenharmony_ci PRIVSEP_EVENT_ASSOC, 90e5b75505Sopenharmony_ci PRIVSEP_EVENT_DISASSOC, 91e5b75505Sopenharmony_ci PRIVSEP_EVENT_ASSOCINFO, 92e5b75505Sopenharmony_ci PRIVSEP_EVENT_MICHAEL_MIC_FAILURE, 93e5b75505Sopenharmony_ci PRIVSEP_EVENT_INTERFACE_STATUS, 94e5b75505Sopenharmony_ci PRIVSEP_EVENT_PMKID_CANDIDATE, 95e5b75505Sopenharmony_ci PRIVSEP_EVENT_FT_RESPONSE, 96e5b75505Sopenharmony_ci PRIVSEP_EVENT_RX_EAPOL, 97e5b75505Sopenharmony_ci PRIVSEP_EVENT_SCAN_STARTED, 98e5b75505Sopenharmony_ci PRIVSEP_EVENT_AUTH, 99e5b75505Sopenharmony_ci}; 100e5b75505Sopenharmony_ci 101e5b75505Sopenharmony_cistruct privsep_event_auth { 102e5b75505Sopenharmony_ci u8 peer[ETH_ALEN]; 103e5b75505Sopenharmony_ci u8 bssid[ETH_ALEN]; 104e5b75505Sopenharmony_ci u16 auth_type; 105e5b75505Sopenharmony_ci u16 auth_transaction; 106e5b75505Sopenharmony_ci u16 status_code; 107e5b75505Sopenharmony_ci size_t ies_len; 108e5b75505Sopenharmony_ci /* followed by ies_len bytes of ies */ 109e5b75505Sopenharmony_ci}; 110e5b75505Sopenharmony_ci 111e5b75505Sopenharmony_ci#endif /* PRIVSEP_COMMANDS_H */ 112