2008-02-28 02:34:43 +01:00
|
|
|
/*
|
|
|
|
* WPA Supplicant - privilege separation commands
|
2009-02-07 09:30:32 +01:00
|
|
|
* Copyright (c) 2007-2009, Jouni Malinen <j@w1.fi>
|
2008-02-28 02:34:43 +01:00
|
|
|
*
|
2012-02-11 15:46:35 +01:00
|
|
|
* This software may be distributed under the terms of the BSD license.
|
|
|
|
* See README for more details.
|
2008-02-28 02:34:43 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef PRIVSEP_COMMANDS_H
|
|
|
|
#define PRIVSEP_COMMANDS_H
|
|
|
|
|
2016-12-03 17:17:28 +01:00
|
|
|
#include "drivers/driver.h"
|
2015-04-07 11:00:13 +02:00
|
|
|
#include "common/ieee802_11_defs.h"
|
|
|
|
|
2008-02-28 02:34:43 +01:00
|
|
|
enum privsep_cmd {
|
|
|
|
PRIVSEP_CMD_REGISTER,
|
|
|
|
PRIVSEP_CMD_UNREGISTER,
|
|
|
|
PRIVSEP_CMD_SCAN,
|
|
|
|
PRIVSEP_CMD_GET_SCAN_RESULTS,
|
|
|
|
PRIVSEP_CMD_ASSOCIATE,
|
|
|
|
PRIVSEP_CMD_GET_BSSID,
|
|
|
|
PRIVSEP_CMD_GET_SSID,
|
|
|
|
PRIVSEP_CMD_SET_KEY,
|
|
|
|
PRIVSEP_CMD_GET_CAPA,
|
|
|
|
PRIVSEP_CMD_L2_REGISTER,
|
|
|
|
PRIVSEP_CMD_L2_UNREGISTER,
|
|
|
|
PRIVSEP_CMD_L2_NOTIFY_AUTH_START,
|
|
|
|
PRIVSEP_CMD_L2_SEND,
|
2009-02-15 13:13:27 +01:00
|
|
|
PRIVSEP_CMD_SET_COUNTRY,
|
2015-09-05 12:21:17 +02:00
|
|
|
PRIVSEP_CMD_AUTHENTICATE,
|
|
|
|
};
|
|
|
|
|
2016-12-03 17:27:16 +01:00
|
|
|
#define PRIVSEP_MAX_SCAN_FREQS 50
|
|
|
|
|
2016-12-03 17:17:28 +01:00
|
|
|
struct privsep_cmd_scan {
|
|
|
|
unsigned int num_ssids;
|
|
|
|
u8 ssids[WPAS_MAX_SCAN_SSIDS][32];
|
|
|
|
u8 ssid_lens[WPAS_MAX_SCAN_SSIDS];
|
2016-12-03 17:27:16 +01:00
|
|
|
unsigned int num_freqs;
|
|
|
|
u16 freqs[PRIVSEP_MAX_SCAN_FREQS];
|
2016-12-03 17:17:28 +01:00
|
|
|
};
|
|
|
|
|
2016-12-03 17:05:33 +01:00
|
|
|
struct privsep_cmd_authenticate {
|
2015-09-05 12:21:17 +02:00
|
|
|
int freq;
|
|
|
|
u8 bssid[ETH_ALEN];
|
|
|
|
u8 ssid[SSID_MAX_LEN];
|
|
|
|
size_t ssid_len;
|
|
|
|
int auth_alg;
|
|
|
|
size_t ie_len;
|
|
|
|
u8 wep_key[4][16];
|
|
|
|
size_t wep_key_len[4];
|
|
|
|
int wep_tx_keyidx;
|
|
|
|
int local_state_change;
|
|
|
|
int p2p;
|
2016-10-22 16:11:11 +02:00
|
|
|
size_t auth_data_len;
|
2015-09-05 12:21:17 +02:00
|
|
|
/* followed by ie_len bytes of ie */
|
2016-10-22 16:11:11 +02:00
|
|
|
/* followed by auth_data_len bytes of auth_data */
|
2008-02-28 02:34:43 +01:00
|
|
|
};
|
|
|
|
|
2016-12-03 17:05:33 +01:00
|
|
|
struct privsep_cmd_associate {
|
2008-02-28 02:34:43 +01:00
|
|
|
u8 bssid[ETH_ALEN];
|
2015-04-07 11:00:13 +02:00
|
|
|
u8 ssid[SSID_MAX_LEN];
|
2008-02-28 02:34:43 +01:00
|
|
|
size_t ssid_len;
|
2014-12-24 19:10:23 +01:00
|
|
|
int hwmode;
|
2008-02-28 02:34:43 +01:00
|
|
|
int freq;
|
2014-12-24 19:10:23 +01:00
|
|
|
int channel;
|
2008-02-28 02:34:43 +01:00
|
|
|
int pairwise_suite;
|
|
|
|
int group_suite;
|
|
|
|
int key_mgmt_suite;
|
|
|
|
int auth_alg;
|
|
|
|
int mode;
|
|
|
|
size_t wpa_ie_len;
|
|
|
|
/* followed by wpa_ie_len bytes of wpa_ie */
|
|
|
|
};
|
|
|
|
|
2016-12-03 17:05:33 +01:00
|
|
|
struct privsep_cmd_set_key {
|
2008-02-28 02:34:43 +01:00
|
|
|
int alg;
|
|
|
|
u8 addr[ETH_ALEN];
|
|
|
|
int key_idx;
|
|
|
|
int set_tx;
|
|
|
|
u8 seq[8];
|
|
|
|
size_t seq_len;
|
|
|
|
u8 key[32];
|
|
|
|
size_t key_len;
|
|
|
|
};
|
|
|
|
|
|
|
|
enum privsep_event {
|
|
|
|
PRIVSEP_EVENT_SCAN_RESULTS,
|
|
|
|
PRIVSEP_EVENT_ASSOC,
|
|
|
|
PRIVSEP_EVENT_DISASSOC,
|
|
|
|
PRIVSEP_EVENT_ASSOCINFO,
|
|
|
|
PRIVSEP_EVENT_MICHAEL_MIC_FAILURE,
|
|
|
|
PRIVSEP_EVENT_INTERFACE_STATUS,
|
|
|
|
PRIVSEP_EVENT_PMKID_CANDIDATE,
|
|
|
|
PRIVSEP_EVENT_FT_RESPONSE,
|
|
|
|
PRIVSEP_EVENT_RX_EAPOL,
|
2015-09-05 11:39:11 +02:00
|
|
|
PRIVSEP_EVENT_SCAN_STARTED,
|
2015-09-05 12:21:17 +02:00
|
|
|
PRIVSEP_EVENT_AUTH,
|
|
|
|
};
|
|
|
|
|
|
|
|
struct privsep_event_auth {
|
|
|
|
u8 peer[ETH_ALEN];
|
|
|
|
u8 bssid[ETH_ALEN];
|
|
|
|
u16 auth_type;
|
|
|
|
u16 auth_transaction;
|
|
|
|
u16 status_code;
|
|
|
|
size_t ies_len;
|
|
|
|
/* followed by ies_len bytes of ies */
|
2008-02-28 02:34:43 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* PRIVSEP_COMMANDS_H */
|