1 /* 2 * wlantest control interface 3 * Copyright (c) 2010-2013, Jouni Malinen <j@w1.fi> 4 * 5 * This software may be distributed under the terms of the BSD license. 6 * See README for more details. 7 */ 8 9 #ifndef WLANTEST_CTRL_H 10 #define WLANTEST_CTRL_H 11 12 #define WLANTEST_SOCK_NAME "w1.fi.wlantest" 13 #define WLANTEST_CTRL_MAX_CMD_LEN 1000 14 #define WLANTEST_CTRL_MAX_RESP_LEN 1000 15 16 enum wlantest_ctrl_cmd { 17 WLANTEST_CTRL_SUCCESS, 18 WLANTEST_CTRL_FAILURE, 19 WLANTEST_CTRL_INVALID_CMD, 20 WLANTEST_CTRL_UNKNOWN_CMD, 21 WLANTEST_CTRL_PING, 22 WLANTEST_CTRL_TERMINATE, 23 WLANTEST_CTRL_LIST_BSS, 24 WLANTEST_CTRL_LIST_STA, 25 WLANTEST_CTRL_FLUSH, 26 WLANTEST_CTRL_CLEAR_STA_COUNTERS, 27 WLANTEST_CTRL_CLEAR_BSS_COUNTERS, 28 WLANTEST_CTRL_GET_STA_COUNTER, 29 WLANTEST_CTRL_GET_BSS_COUNTER, 30 WLANTEST_CTRL_INJECT, 31 WLANTEST_CTRL_VERSION, 32 WLANTEST_CTRL_ADD_PASSPHRASE, 33 WLANTEST_CTRL_INFO_STA, 34 WLANTEST_CTRL_INFO_BSS, 35 WLANTEST_CTRL_SEND, 36 WLANTEST_CTRL_CLEAR_TDLS_COUNTERS, 37 WLANTEST_CTRL_GET_TDLS_COUNTER, 38 WLANTEST_CTRL_RELOG, 39 WLANTEST_CTRL_GET_TX_TID, 40 WLANTEST_CTRL_GET_RX_TID, 41 }; 42 43 enum wlantest_ctrl_attr { 44 WLANTEST_ATTR_BSSID, 45 WLANTEST_ATTR_STA_ADDR, 46 WLANTEST_ATTR_STA_COUNTER, 47 WLANTEST_ATTR_BSS_COUNTER, 48 WLANTEST_ATTR_COUNTER, 49 WLANTEST_ATTR_INJECT_FRAME, 50 WLANTEST_ATTR_INJECT_SENDER_AP, 51 WLANTEST_ATTR_INJECT_PROTECTION, 52 WLANTEST_ATTR_VERSION, 53 WLANTEST_ATTR_PASSPHRASE, 54 WLANTEST_ATTR_STA_INFO, 55 WLANTEST_ATTR_BSS_INFO, 56 WLANTEST_ATTR_INFO, 57 WLANTEST_ATTR_FRAME, 58 WLANTEST_ATTR_TDLS_COUNTER, 59 WLANTEST_ATTR_STA2_ADDR, 60 WLANTEST_ATTR_WEPKEY, 61 WLANTEST_ATTR_TID, 62 }; 63 64 enum wlantest_bss_counter { 65 WLANTEST_BSS_COUNTER_VALID_BIP_MMIE, 66 WLANTEST_BSS_COUNTER_INVALID_BIP_MMIE, 67 WLANTEST_BSS_COUNTER_MISSING_BIP_MMIE, 68 WLANTEST_BSS_COUNTER_BIP_DEAUTH, 69 WLANTEST_BSS_COUNTER_BIP_DISASSOC, 70 WLANTEST_BSS_COUNTER_PROBE_RESPONSE, 71 NUM_WLANTEST_BSS_COUNTER 72 }; 73 74 enum wlantest_sta_counter { 75 WLANTEST_STA_COUNTER_AUTH_TX, 76 WLANTEST_STA_COUNTER_AUTH_RX, 77 WLANTEST_STA_COUNTER_ASSOCREQ_TX, 78 WLANTEST_STA_COUNTER_REASSOCREQ_TX, 79 WLANTEST_STA_COUNTER_PTK_LEARNED, 80 WLANTEST_STA_COUNTER_VALID_DEAUTH_TX, 81 WLANTEST_STA_COUNTER_VALID_DEAUTH_RX, 82 WLANTEST_STA_COUNTER_INVALID_DEAUTH_TX, 83 WLANTEST_STA_COUNTER_INVALID_DEAUTH_RX, 84 WLANTEST_STA_COUNTER_VALID_DISASSOC_TX, 85 WLANTEST_STA_COUNTER_VALID_DISASSOC_RX, 86 WLANTEST_STA_COUNTER_INVALID_DISASSOC_TX, 87 WLANTEST_STA_COUNTER_INVALID_DISASSOC_RX, 88 WLANTEST_STA_COUNTER_VALID_SAQUERYREQ_TX, 89 WLANTEST_STA_COUNTER_VALID_SAQUERYREQ_RX, 90 WLANTEST_STA_COUNTER_INVALID_SAQUERYREQ_TX, 91 WLANTEST_STA_COUNTER_INVALID_SAQUERYREQ_RX, 92 WLANTEST_STA_COUNTER_VALID_SAQUERYRESP_TX, 93 WLANTEST_STA_COUNTER_VALID_SAQUERYRESP_RX, 94 WLANTEST_STA_COUNTER_INVALID_SAQUERYRESP_TX, 95 WLANTEST_STA_COUNTER_INVALID_SAQUERYRESP_RX, 96 WLANTEST_STA_COUNTER_PING_OK, 97 WLANTEST_STA_COUNTER_ASSOCRESP_COMEBACK, 98 WLANTEST_STA_COUNTER_REASSOCRESP_COMEBACK, 99 WLANTEST_STA_COUNTER_PING_OK_FIRST_ASSOC, 100 WLANTEST_STA_COUNTER_VALID_DEAUTH_RX_ACK, 101 WLANTEST_STA_COUNTER_VALID_DISASSOC_RX_ACK, 102 WLANTEST_STA_COUNTER_INVALID_DEAUTH_RX_ACK, 103 WLANTEST_STA_COUNTER_INVALID_DISASSOC_RX_ACK, 104 WLANTEST_STA_COUNTER_DEAUTH_RX_ASLEEP, 105 WLANTEST_STA_COUNTER_DEAUTH_RX_AWAKE, 106 WLANTEST_STA_COUNTER_DISASSOC_RX_ASLEEP, 107 WLANTEST_STA_COUNTER_DISASSOC_RX_AWAKE, 108 WLANTEST_STA_COUNTER_PROT_DATA_TX, 109 WLANTEST_STA_COUNTER_DEAUTH_RX_RC6, 110 WLANTEST_STA_COUNTER_DEAUTH_RX_RC7, 111 WLANTEST_STA_COUNTER_DISASSOC_RX_RC6, 112 WLANTEST_STA_COUNTER_DISASSOC_RX_RC7, 113 NUM_WLANTEST_STA_COUNTER 114 }; 115 116 enum wlantest_tdls_counter { 117 WLANTEST_TDLS_COUNTER_VALID_DIRECT_LINK, 118 WLANTEST_TDLS_COUNTER_INVALID_DIRECT_LINK, 119 WLANTEST_TDLS_COUNTER_VALID_AP_PATH, 120 WLANTEST_TDLS_COUNTER_INVALID_AP_PATH, 121 WLANTEST_TDLS_COUNTER_SETUP_REQ, 122 WLANTEST_TDLS_COUNTER_SETUP_RESP_OK, 123 WLANTEST_TDLS_COUNTER_SETUP_RESP_FAIL, 124 WLANTEST_TDLS_COUNTER_SETUP_CONF_OK, 125 WLANTEST_TDLS_COUNTER_SETUP_CONF_FAIL, 126 WLANTEST_TDLS_COUNTER_TEARDOWN, 127 NUM_WLANTEST_TDLS_COUNTER 128 }; 129 130 enum wlantest_inject_frame { 131 WLANTEST_FRAME_AUTH, 132 WLANTEST_FRAME_ASSOCREQ, 133 WLANTEST_FRAME_REASSOCREQ, 134 WLANTEST_FRAME_DEAUTH, 135 WLANTEST_FRAME_DISASSOC, 136 WLANTEST_FRAME_SAQUERYREQ, 137 }; 138 139 /** 140 * enum wlantest_inject_protection - WLANTEST_CTRL_INJECT protection 141 * @WLANTEST_INJECT_NORMAL: Use normal rules (protect if key is set) 142 * @WLANTEST_INJECT_PROTECTED: Force protection (fail if not possible) 143 * @WLANTEST_INJECT_UNPROTECTED: Force unprotected 144 * @WLANTEST_INJECT_INCORRECT_KEY: Force protection with incorrect key 145 */ 146 enum wlantest_inject_protection { 147 WLANTEST_INJECT_NORMAL, 148 WLANTEST_INJECT_PROTECTED, 149 WLANTEST_INJECT_UNPROTECTED, 150 WLANTEST_INJECT_INCORRECT_KEY, 151 }; 152 153 enum wlantest_sta_info { 154 WLANTEST_STA_INFO_PROTO, 155 WLANTEST_STA_INFO_PAIRWISE, 156 WLANTEST_STA_INFO_KEY_MGMT, 157 WLANTEST_STA_INFO_RSN_CAPAB, 158 WLANTEST_STA_INFO_STATE, 159 WLANTEST_STA_INFO_GTK, 160 }; 161 162 enum wlantest_bss_info { 163 WLANTEST_BSS_INFO_PROTO, 164 WLANTEST_BSS_INFO_PAIRWISE, 165 WLANTEST_BSS_INFO_GROUP, 166 WLANTEST_BSS_INFO_GROUP_MGMT, 167 WLANTEST_BSS_INFO_KEY_MGMT, 168 WLANTEST_BSS_INFO_RSN_CAPAB, 169 }; 170 171 #endif /* WLANTEST_CTRL_H */ 172