2010-11-13 17:38:19 +01:00
|
|
|
/*
|
|
|
|
* wlantest control interface
|
2013-11-17 20:11:35 +01:00
|
|
|
* Copyright (c) 2010-2013, Jouni Malinen <j@w1.fi>
|
2010-11-13 17:38:19 +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.
|
2010-11-13 17:38:19 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef WLANTEST_CTRL_H
|
|
|
|
#define WLANTEST_CTRL_H
|
|
|
|
|
|
|
|
#define WLANTEST_SOCK_NAME "w1.fi.wlantest"
|
|
|
|
#define WLANTEST_CTRL_MAX_CMD_LEN 1000
|
|
|
|
#define WLANTEST_CTRL_MAX_RESP_LEN 1000
|
|
|
|
|
|
|
|
enum wlantest_ctrl_cmd {
|
|
|
|
WLANTEST_CTRL_SUCCESS,
|
|
|
|
WLANTEST_CTRL_FAILURE,
|
2010-11-18 16:17:18 +01:00
|
|
|
WLANTEST_CTRL_INVALID_CMD,
|
2010-11-13 17:38:19 +01:00
|
|
|
WLANTEST_CTRL_UNKNOWN_CMD,
|
|
|
|
WLANTEST_CTRL_PING,
|
|
|
|
WLANTEST_CTRL_TERMINATE,
|
2010-11-18 16:17:18 +01:00
|
|
|
WLANTEST_CTRL_LIST_BSS,
|
|
|
|
WLANTEST_CTRL_LIST_STA,
|
2010-11-18 16:36:08 +01:00
|
|
|
WLANTEST_CTRL_FLUSH,
|
2010-11-18 18:05:29 +01:00
|
|
|
WLANTEST_CTRL_CLEAR_STA_COUNTERS,
|
|
|
|
WLANTEST_CTRL_CLEAR_BSS_COUNTERS,
|
|
|
|
WLANTEST_CTRL_GET_STA_COUNTER,
|
|
|
|
WLANTEST_CTRL_GET_BSS_COUNTER,
|
2010-11-18 23:35:13 +01:00
|
|
|
WLANTEST_CTRL_INJECT,
|
2010-11-19 16:45:19 +01:00
|
|
|
WLANTEST_CTRL_VERSION,
|
2010-11-19 18:31:55 +01:00
|
|
|
WLANTEST_CTRL_ADD_PASSPHRASE,
|
2010-11-21 17:01:18 +01:00
|
|
|
WLANTEST_CTRL_INFO_STA,
|
|
|
|
WLANTEST_CTRL_INFO_BSS,
|
2010-12-16 15:11:54 +01:00
|
|
|
WLANTEST_CTRL_SEND,
|
2010-12-16 18:08:49 +01:00
|
|
|
WLANTEST_CTRL_CLEAR_TDLS_COUNTERS,
|
|
|
|
WLANTEST_CTRL_GET_TDLS_COUNTER,
|
2013-11-17 20:11:35 +01:00
|
|
|
WLANTEST_CTRL_RELOG,
|
2013-12-24 19:21:27 +01:00
|
|
|
WLANTEST_CTRL_GET_TX_TID,
|
|
|
|
WLANTEST_CTRL_GET_RX_TID,
|
2010-11-18 16:17:18 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
enum wlantest_ctrl_attr {
|
|
|
|
WLANTEST_ATTR_BSSID,
|
|
|
|
WLANTEST_ATTR_STA_ADDR,
|
2010-11-18 18:05:29 +01:00
|
|
|
WLANTEST_ATTR_STA_COUNTER,
|
|
|
|
WLANTEST_ATTR_BSS_COUNTER,
|
|
|
|
WLANTEST_ATTR_COUNTER,
|
2010-11-18 23:35:13 +01:00
|
|
|
WLANTEST_ATTR_INJECT_FRAME,
|
|
|
|
WLANTEST_ATTR_INJECT_SENDER_AP,
|
|
|
|
WLANTEST_ATTR_INJECT_PROTECTION,
|
2010-11-19 16:45:19 +01:00
|
|
|
WLANTEST_ATTR_VERSION,
|
2010-11-19 18:31:55 +01:00
|
|
|
WLANTEST_ATTR_PASSPHRASE,
|
2010-11-21 17:01:18 +01:00
|
|
|
WLANTEST_ATTR_STA_INFO,
|
|
|
|
WLANTEST_ATTR_BSS_INFO,
|
|
|
|
WLANTEST_ATTR_INFO,
|
2010-12-16 15:11:54 +01:00
|
|
|
WLANTEST_ATTR_FRAME,
|
2010-12-16 18:08:49 +01:00
|
|
|
WLANTEST_ATTR_TDLS_COUNTER,
|
|
|
|
WLANTEST_ATTR_STA2_ADDR,
|
2011-01-28 12:33:21 +01:00
|
|
|
WLANTEST_ATTR_WEPKEY,
|
2013-12-24 19:21:27 +01:00
|
|
|
WLANTEST_ATTR_TID,
|
2010-11-18 18:05:29 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
enum wlantest_bss_counter {
|
|
|
|
WLANTEST_BSS_COUNTER_VALID_BIP_MMIE,
|
|
|
|
WLANTEST_BSS_COUNTER_INVALID_BIP_MMIE,
|
|
|
|
WLANTEST_BSS_COUNTER_MISSING_BIP_MMIE,
|
2010-11-21 20:50:28 +01:00
|
|
|
WLANTEST_BSS_COUNTER_BIP_DEAUTH,
|
|
|
|
WLANTEST_BSS_COUNTER_BIP_DISASSOC,
|
2013-12-25 17:37:33 +01:00
|
|
|
WLANTEST_BSS_COUNTER_PROBE_RESPONSE,
|
2010-11-18 18:05:29 +01:00
|
|
|
NUM_WLANTEST_BSS_COUNTER
|
|
|
|
};
|
|
|
|
|
|
|
|
enum wlantest_sta_counter {
|
|
|
|
WLANTEST_STA_COUNTER_AUTH_TX,
|
|
|
|
WLANTEST_STA_COUNTER_AUTH_RX,
|
|
|
|
WLANTEST_STA_COUNTER_ASSOCREQ_TX,
|
|
|
|
WLANTEST_STA_COUNTER_REASSOCREQ_TX,
|
|
|
|
WLANTEST_STA_COUNTER_PTK_LEARNED,
|
|
|
|
WLANTEST_STA_COUNTER_VALID_DEAUTH_TX,
|
|
|
|
WLANTEST_STA_COUNTER_VALID_DEAUTH_RX,
|
|
|
|
WLANTEST_STA_COUNTER_INVALID_DEAUTH_TX,
|
|
|
|
WLANTEST_STA_COUNTER_INVALID_DEAUTH_RX,
|
|
|
|
WLANTEST_STA_COUNTER_VALID_DISASSOC_TX,
|
|
|
|
WLANTEST_STA_COUNTER_VALID_DISASSOC_RX,
|
|
|
|
WLANTEST_STA_COUNTER_INVALID_DISASSOC_TX,
|
|
|
|
WLANTEST_STA_COUNTER_INVALID_DISASSOC_RX,
|
|
|
|
WLANTEST_STA_COUNTER_VALID_SAQUERYREQ_TX,
|
|
|
|
WLANTEST_STA_COUNTER_VALID_SAQUERYREQ_RX,
|
|
|
|
WLANTEST_STA_COUNTER_INVALID_SAQUERYREQ_TX,
|
|
|
|
WLANTEST_STA_COUNTER_INVALID_SAQUERYREQ_RX,
|
|
|
|
WLANTEST_STA_COUNTER_VALID_SAQUERYRESP_TX,
|
|
|
|
WLANTEST_STA_COUNTER_VALID_SAQUERYRESP_RX,
|
|
|
|
WLANTEST_STA_COUNTER_INVALID_SAQUERYRESP_TX,
|
|
|
|
WLANTEST_STA_COUNTER_INVALID_SAQUERYRESP_RX,
|
2010-11-20 21:34:42 +01:00
|
|
|
WLANTEST_STA_COUNTER_PING_OK,
|
2010-11-21 20:24:20 +01:00
|
|
|
WLANTEST_STA_COUNTER_ASSOCRESP_COMEBACK,
|
|
|
|
WLANTEST_STA_COUNTER_REASSOCRESP_COMEBACK,
|
2011-01-03 15:54:14 +01:00
|
|
|
WLANTEST_STA_COUNTER_PING_OK_FIRST_ASSOC,
|
2011-01-03 18:28:40 +01:00
|
|
|
WLANTEST_STA_COUNTER_VALID_DEAUTH_RX_ACK,
|
|
|
|
WLANTEST_STA_COUNTER_VALID_DISASSOC_RX_ACK,
|
|
|
|
WLANTEST_STA_COUNTER_INVALID_DEAUTH_RX_ACK,
|
|
|
|
WLANTEST_STA_COUNTER_INVALID_DISASSOC_RX_ACK,
|
2011-01-07 15:52:56 +01:00
|
|
|
WLANTEST_STA_COUNTER_DEAUTH_RX_ASLEEP,
|
|
|
|
WLANTEST_STA_COUNTER_DEAUTH_RX_AWAKE,
|
|
|
|
WLANTEST_STA_COUNTER_DISASSOC_RX_ASLEEP,
|
|
|
|
WLANTEST_STA_COUNTER_DISASSOC_RX_AWAKE,
|
2011-01-07 16:09:09 +01:00
|
|
|
WLANTEST_STA_COUNTER_PROT_DATA_TX,
|
2011-10-25 23:06:06 +02:00
|
|
|
WLANTEST_STA_COUNTER_DEAUTH_RX_RC6,
|
|
|
|
WLANTEST_STA_COUNTER_DEAUTH_RX_RC7,
|
|
|
|
WLANTEST_STA_COUNTER_DISASSOC_RX_RC6,
|
|
|
|
WLANTEST_STA_COUNTER_DISASSOC_RX_RC7,
|
2010-11-18 18:05:29 +01:00
|
|
|
NUM_WLANTEST_STA_COUNTER
|
2010-11-13 17:38:19 +01:00
|
|
|
};
|
|
|
|
|
2010-12-16 18:08:49 +01:00
|
|
|
enum wlantest_tdls_counter {
|
|
|
|
WLANTEST_TDLS_COUNTER_VALID_DIRECT_LINK,
|
|
|
|
WLANTEST_TDLS_COUNTER_INVALID_DIRECT_LINK,
|
|
|
|
WLANTEST_TDLS_COUNTER_VALID_AP_PATH,
|
|
|
|
WLANTEST_TDLS_COUNTER_INVALID_AP_PATH,
|
2011-01-24 13:03:03 +01:00
|
|
|
WLANTEST_TDLS_COUNTER_SETUP_REQ,
|
|
|
|
WLANTEST_TDLS_COUNTER_SETUP_RESP_OK,
|
|
|
|
WLANTEST_TDLS_COUNTER_SETUP_RESP_FAIL,
|
|
|
|
WLANTEST_TDLS_COUNTER_SETUP_CONF_OK,
|
|
|
|
WLANTEST_TDLS_COUNTER_SETUP_CONF_FAIL,
|
2011-01-24 16:00:28 +01:00
|
|
|
WLANTEST_TDLS_COUNTER_TEARDOWN,
|
2010-12-16 18:08:49 +01:00
|
|
|
NUM_WLANTEST_TDLS_COUNTER
|
|
|
|
};
|
|
|
|
|
2010-11-18 23:35:13 +01:00
|
|
|
enum wlantest_inject_frame {
|
|
|
|
WLANTEST_FRAME_AUTH,
|
|
|
|
WLANTEST_FRAME_ASSOCREQ,
|
|
|
|
WLANTEST_FRAME_REASSOCREQ,
|
|
|
|
WLANTEST_FRAME_DEAUTH,
|
|
|
|
WLANTEST_FRAME_DISASSOC,
|
|
|
|
WLANTEST_FRAME_SAQUERYREQ,
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* enum wlantest_inject_protection - WLANTEST_CTRL_INJECT protection
|
|
|
|
* @WLANTEST_INJECT_NORMAL: Use normal rules (protect if key is set)
|
|
|
|
* @WLANTEST_INJECT_PROTECTED: Force protection (fail if not possible)
|
|
|
|
* @WLANTEST_INJECT_UNPROTECTED: Force unprotected
|
|
|
|
* @WLANTEST_INJECT_INCORRECT_KEY: Force protection with incorrect key
|
|
|
|
*/
|
|
|
|
enum wlantest_inject_protection {
|
|
|
|
WLANTEST_INJECT_NORMAL,
|
|
|
|
WLANTEST_INJECT_PROTECTED,
|
|
|
|
WLANTEST_INJECT_UNPROTECTED,
|
|
|
|
WLANTEST_INJECT_INCORRECT_KEY,
|
|
|
|
};
|
|
|
|
|
2010-11-21 17:01:18 +01:00
|
|
|
enum wlantest_sta_info {
|
|
|
|
WLANTEST_STA_INFO_PROTO,
|
|
|
|
WLANTEST_STA_INFO_PAIRWISE,
|
|
|
|
WLANTEST_STA_INFO_KEY_MGMT,
|
|
|
|
WLANTEST_STA_INFO_RSN_CAPAB,
|
|
|
|
WLANTEST_STA_INFO_STATE,
|
2011-12-22 15:59:25 +01:00
|
|
|
WLANTEST_STA_INFO_GTK,
|
2010-11-21 17:01:18 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
enum wlantest_bss_info {
|
|
|
|
WLANTEST_BSS_INFO_PROTO,
|
|
|
|
WLANTEST_BSS_INFO_PAIRWISE,
|
|
|
|
WLANTEST_BSS_INFO_GROUP,
|
|
|
|
WLANTEST_BSS_INFO_GROUP_MGMT,
|
|
|
|
WLANTEST_BSS_INFO_KEY_MGMT,
|
|
|
|
WLANTEST_BSS_INFO_RSN_CAPAB,
|
|
|
|
};
|
|
|
|
|
2010-11-13 17:38:19 +01:00
|
|
|
#endif /* WLANTEST_CTRL_H */
|