Jouni Malinen | cd4e3c3 | 2015-10-29 12:39:56 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Sigma Control API DUT (station/AP) |
| 3 | * Copyright (c) 2010-2011, Atheros Communications, Inc. |
Amarnath Hullur Subramanyam | 9c381f5 | 2017-03-17 00:04:41 -0700 | [diff] [blame] | 4 | * Copyright (c) 2011-2017, Qualcomm Atheros, Inc. |
Jouni Malinen | cd4e3c3 | 2015-10-29 12:39:56 +0200 | [diff] [blame] | 5 | * All Rights Reserved. |
| 6 | * Licensed under the Clear BSD license. See README for more details. |
| 7 | */ |
| 8 | |
| 9 | #ifndef SIGMA_DUT_H |
| 10 | #define SIGMA_DUT_H |
| 11 | |
Lior David | 9981b51 | 2017-01-20 13:16:40 +0200 | [diff] [blame] | 12 | #ifdef __GNUC__ |
| 13 | #define _GNU_SOURCE 1 |
| 14 | #endif |
| 15 | |
Jouni Malinen | cd4e3c3 | 2015-10-29 12:39:56 +0200 | [diff] [blame] | 16 | #include <stdlib.h> |
| 17 | #include <stdio.h> |
| 18 | #include <stdarg.h> |
| 19 | #include <string.h> |
| 20 | #include <errno.h> |
| 21 | #include <unistd.h> |
| 22 | #include <time.h> |
| 23 | #include <sys/time.h> |
Jouni Malinen | 3d972ba | 2017-03-15 20:52:20 +0200 | [diff] [blame] | 24 | #include <sys/types.h> |
Jouni Malinen | cd4e3c3 | 2015-10-29 12:39:56 +0200 | [diff] [blame] | 25 | #include <sys/socket.h> |
| 26 | #include <net/if.h> |
| 27 | #ifdef __QNXNTO__ |
| 28 | #include <sys/select.h> |
| 29 | #include <net/if_ether.h> |
| 30 | #endif /* __QNXNTO__ */ |
| 31 | #include <netinet/in.h> |
| 32 | #include <arpa/inet.h> |
| 33 | #ifdef CONFIG_TRAFFIC_AGENT |
| 34 | #include <pthread.h> |
| 35 | #endif /* CONFIG_TRAFFIC_AGENT */ |
| 36 | |
| 37 | |
| 38 | #ifdef __GNUC__ |
| 39 | #define PRINTF_FORMAT(a,b) __attribute__ ((format (printf, (a), (b)))) |
| 40 | #else |
| 41 | #define PRINTF_FORMAT(a,b) |
| 42 | #endif |
| 43 | |
| 44 | #ifndef SIGMA_TMPDIR |
| 45 | #define SIGMA_TMPDIR "/tmp" |
| 46 | #endif /* SIGMA_TMPDIR */ |
| 47 | |
| 48 | #ifndef SIGMA_DUT_VER |
| 49 | #define SIGMA_DUT_VER "(unknown)" |
| 50 | #endif /* SIGMA_DUT_VER */ |
| 51 | |
| 52 | #ifndef ETH_ALEN |
| 53 | #define ETH_ALEN 6 |
| 54 | #endif |
| 55 | |
| 56 | #ifndef ETH_P_ARP |
| 57 | #define ETH_P_ARP 0x0806 |
| 58 | #endif |
| 59 | |
| 60 | struct sigma_dut; |
| 61 | |
| 62 | #define MAX_PARAMS 100 |
| 63 | #define MAX_RADIO 2 |
| 64 | |
| 65 | /* Set default operating channel width 80 MHz */ |
| 66 | #define VHT_DEFAULT_OPER_CHWIDTH AP_80_VHT_OPER_CHWIDTH |
| 67 | |
| 68 | typedef unsigned int u32; |
| 69 | typedef unsigned char u8; |
| 70 | |
| 71 | #define WPA_GET_BE32(a) ((((u32) (a)[0]) << 24) | (((u32) (a)[1]) << 16) | \ |
| 72 | (((u32) (a)[2]) << 8) | ((u32) (a)[3])) |
| 73 | #define WPA_PUT_BE32(a, val) \ |
| 74 | do { \ |
| 75 | (a)[0] = (u8) ((((u32) (val)) >> 24) & 0xff); \ |
| 76 | (a)[1] = (u8) ((((u32) (val)) >> 16) & 0xff); \ |
| 77 | (a)[2] = (u8) ((((u32) (val)) >> 8) & 0xff); \ |
| 78 | (a)[3] = (u8) (((u32) (val)) & 0xff); \ |
| 79 | } while (0) |
| 80 | |
| 81 | struct sigma_cmd { |
| 82 | char *params[MAX_PARAMS]; |
| 83 | char *values[MAX_PARAMS]; |
| 84 | int count; |
| 85 | }; |
| 86 | |
| 87 | #define MAX_CMD_LEN 2048 |
| 88 | |
| 89 | struct sigma_conn { |
| 90 | int s; |
| 91 | struct sockaddr_in addr; |
| 92 | socklen_t addrlen; |
| 93 | char buf[MAX_CMD_LEN + 5]; |
| 94 | int pos; |
| 95 | int waiting_completion; |
| 96 | }; |
| 97 | |
| 98 | #define SIGMA_DUT_ERROR_CALLER_SEND_STATUS -2 |
| 99 | #define SIGMA_DUT_INVALID_CALLER_SEND_STATUS -1 |
| 100 | #define SIGMA_DUT_SUCCESS_STATUS_SENT 0 |
| 101 | #define SIGMA_DUT_SUCCESS_CALLER_SEND_STATUS 1 |
| 102 | |
| 103 | struct sigma_cmd_handler { |
| 104 | struct sigma_cmd_handler *next; |
| 105 | char *cmd; |
| 106 | int (*validate)(struct sigma_cmd *cmd); |
| 107 | /* process return value: |
| 108 | * -2 = failed, caller will send status,ERROR |
| 109 | * -1 = failed, caller will send status,INVALID |
| 110 | * 0 = success, response already sent |
| 111 | * 1 = success, caller will send status,COMPLETE |
| 112 | */ |
| 113 | int (*process)(struct sigma_dut *dut, struct sigma_conn *conn, |
| 114 | struct sigma_cmd *cmd); |
| 115 | }; |
| 116 | |
| 117 | #define P2P_GRP_ID_LEN 128 |
| 118 | #define IP_ADDR_STR_LEN 16 |
| 119 | |
| 120 | struct wfa_cs_p2p_group { |
| 121 | struct wfa_cs_p2p_group *next; |
| 122 | char ifname[IFNAMSIZ]; |
| 123 | int go; |
| 124 | char grpid[P2P_GRP_ID_LEN]; |
| 125 | char ssid[33]; |
| 126 | }; |
| 127 | |
| 128 | #ifdef CONFIG_TRAFFIC_AGENT |
| 129 | |
| 130 | #define MAX_SIGMA_STREAMS 16 |
| 131 | #define MAX_SIGMA_STATS 6000 |
| 132 | |
| 133 | struct sigma_frame_stats { |
| 134 | unsigned int seqnum; |
| 135 | unsigned int local_sec; |
| 136 | unsigned int local_usec; |
| 137 | unsigned int remote_sec; |
| 138 | unsigned int remote_usec; |
| 139 | }; |
| 140 | |
| 141 | struct sigma_stream { |
| 142 | enum sigma_stream_profile { |
| 143 | SIGMA_PROFILE_FILE_TRANSFER, |
| 144 | SIGMA_PROFILE_MULTICAST, |
| 145 | SIGMA_PROFILE_IPTV, |
| 146 | SIGMA_PROFILE_TRANSACTION, |
| 147 | SIGMA_PROFILE_START_SYNC, |
| 148 | SIGMA_PROFILE_UAPSD |
| 149 | } profile; |
| 150 | int sender; |
| 151 | struct in_addr dst; |
| 152 | int dst_port; |
| 153 | struct in_addr src; |
| 154 | int src_port; |
| 155 | int frame_rate; |
| 156 | int duration; |
Jouni Malinen | c2493f8 | 2016-06-05 18:01:33 +0300 | [diff] [blame] | 157 | unsigned int payload_size; |
Jouni Malinen | cd4e3c3 | 2015-10-29 12:39:56 +0200 | [diff] [blame] | 158 | int start_delay; |
| 159 | int max_cnt; |
| 160 | enum sigma_traffic_class { |
| 161 | SIGMA_TC_VOICE, |
| 162 | SIGMA_TC_VIDEO, |
| 163 | SIGMA_TC_BACKGROUND, |
| 164 | SIGMA_TC_BEST_EFFORT |
| 165 | } tc; |
| 166 | int user_priority; |
| 167 | int user_priority_set; |
| 168 | int started; |
| 169 | int no_timestamps; |
| 170 | |
| 171 | int sock; |
| 172 | pthread_t thr; |
| 173 | int stop; |
| 174 | int ta_send_in_progress; |
| 175 | int trans_proto; |
| 176 | |
| 177 | /* Statistics */ |
| 178 | int tx_act_frames; /* |
| 179 | * Number of frames generated by the traffic |
| 180 | * generator application. The name is defined in the |
| 181 | * Sigma CAPI spec. |
| 182 | */ |
| 183 | int tx_frames; |
| 184 | int rx_frames; |
| 185 | unsigned long long tx_payload_bytes; |
| 186 | unsigned long long rx_payload_bytes; |
| 187 | int out_of_seq_frames; |
| 188 | struct sigma_frame_stats *stats; |
| 189 | unsigned int num_stats; |
| 190 | unsigned int stream_id; |
| 191 | |
| 192 | /* U-APSD */ |
| 193 | unsigned int sta_id; |
| 194 | unsigned int rx_cookie; |
| 195 | unsigned int uapsd_sta_tc; |
| 196 | unsigned int uapsd_rx_state; |
| 197 | unsigned int uapsd_tx_state; |
| 198 | unsigned int tx_stop_cnt; |
| 199 | unsigned int tx_hello_cnt; |
| 200 | pthread_t uapsd_send_thr; |
| 201 | pthread_cond_t tx_thr_cond; |
| 202 | pthread_mutex_t tx_thr_mutex; |
| 203 | int reset_rx; |
| 204 | int num_retry; |
| 205 | char ifname[IFNAMSIZ]; /* ifname from the command */ |
| 206 | struct sigma_dut *dut; /* for traffic agent thread to access context */ |
Pradeep Reddy POTTETI | 7959404 | 2015-11-23 12:59:12 +0530 | [diff] [blame] | 207 | /* console */ |
| 208 | char test_name[9]; /* test case name */ |
| 209 | int can_quit; |
| 210 | int reset; |
Jouni Malinen | cd4e3c3 | 2015-10-29 12:39:56 +0200 | [diff] [blame] | 211 | }; |
| 212 | |
| 213 | #endif /* CONFIG_TRAFFIC_AGENT */ |
| 214 | |
| 215 | |
| 216 | #define NUM_AP_AC 4 |
| 217 | #define AP_AC_BE 0 |
| 218 | #define AP_AC_BK 1 |
| 219 | #define AP_AC_VI 2 |
| 220 | #define AP_AC_VO 3 |
| 221 | |
Adil Saeed Musthafa | b7b297f | 2017-04-10 23:13:31 -0700 | [diff] [blame] | 222 | #define MAX_WLAN_TAGS 3 |
Adil Saeed Musthafa | 6906372 | 2017-04-10 23:13:40 -0700 | [diff] [blame] | 223 | #define MBO_MAX_PREF_BSSIDS 10 |
Adil Saeed Musthafa | 4ec61bd | 2017-04-10 23:13:41 -0700 | [diff] [blame] | 224 | #define MAX_FT_BSS_LIST 10 |
Adil Saeed Musthafa | b7b297f | 2017-04-10 23:13:31 -0700 | [diff] [blame] | 225 | |
Jouni Malinen | 57fa3d8 | 2016-11-30 12:51:43 +0200 | [diff] [blame] | 226 | enum value_not_set_enabled_disabled { |
| 227 | VALUE_NOT_SET, |
| 228 | VALUE_ENABLED, |
| 229 | VALUE_DISABLED |
| 230 | }; |
| 231 | |
Pradeep Reddy Potteti | 4b0cdee | 2017-03-15 12:37:33 +0530 | [diff] [blame] | 232 | enum sec_ch_offset { |
| 233 | SEC_CH_NO, |
| 234 | SEC_CH_40ABOVE, |
| 235 | SEC_CH_40BELOW |
| 236 | }; |
| 237 | |
Adil Saeed Musthafa | 6906372 | 2017-04-10 23:13:40 -0700 | [diff] [blame] | 238 | struct mbo_pref_ap { |
| 239 | int ap_ne_class; |
| 240 | int ap_ne_op_ch; |
| 241 | int ap_ne_pref; |
| 242 | unsigned char mac_addr[ETH_ALEN]; |
| 243 | }; |
| 244 | |
Jouni Malinen | cd4e3c3 | 2015-10-29 12:39:56 +0200 | [diff] [blame] | 245 | struct sigma_dut { |
| 246 | int s; /* server TCP socket */ |
| 247 | int debug_level; |
| 248 | int stdout_debug; |
| 249 | struct sigma_cmd_handler *cmds; |
| 250 | |
| 251 | /* Default timeout value (seconds) for commands */ |
| 252 | unsigned int default_timeout; |
| 253 | |
| 254 | int next_streamid; |
| 255 | |
| 256 | const char *bridge; /* bridge interface to use in AP mode */ |
| 257 | |
| 258 | enum sigma_mode { |
| 259 | SIGMA_MODE_UNKNOWN, |
| 260 | SIGMA_MODE_STATION, |
| 261 | SIGMA_MODE_AP, |
| 262 | SIGMA_MODE_SNIFFER |
| 263 | } mode; |
| 264 | |
| 265 | /* |
| 266 | * Local cached values to handle API that does not provide all the |
| 267 | * needed information with commands that actually trigger some |
| 268 | * operations. |
| 269 | */ |
| 270 | int listen_chn; |
| 271 | int persistent; |
| 272 | int intra_bss; |
| 273 | int noa_duration; |
| 274 | int noa_interval; |
| 275 | int noa_count; |
| 276 | enum wfa_cs_wps_method { |
| 277 | WFA_CS_WPS_NOT_READY, |
| 278 | WFA_CS_WPS_PBC, |
| 279 | WFA_CS_WPS_PIN_DISPLAY, |
| 280 | WFA_CS_WPS_PIN_LABEL, |
| 281 | WFA_CS_WPS_PIN_KEYPAD |
| 282 | } wps_method; |
| 283 | char wps_pin[9]; |
| 284 | |
| 285 | struct wfa_cs_p2p_group *groups; |
| 286 | |
| 287 | char infra_ssid[33]; |
| 288 | int infra_network_id; |
| 289 | |
| 290 | enum p2p_mode { |
| 291 | P2P_IDLE, P2P_DISCOVER, P2P_LISTEN, P2P_DISABLE |
| 292 | } p2p_mode; |
| 293 | |
| 294 | int go; |
| 295 | int p2p_client; |
Purushottam Kushwaha | 091e253 | 2016-08-23 11:52:21 +0530 | [diff] [blame] | 296 | char *p2p_ifname; |
Jouni Malinen | cd4e3c3 | 2015-10-29 12:39:56 +0200 | [diff] [blame] | 297 | |
| 298 | int client_uapsd; |
| 299 | |
| 300 | char arp_ipaddr[IP_ADDR_STR_LEN]; |
| 301 | char arp_ifname[IFNAMSIZ + 1]; |
| 302 | |
| 303 | enum sta_pmf { |
| 304 | STA_PMF_DISABLED, |
| 305 | STA_PMF_OPTIONAL, |
| 306 | STA_PMF_REQUIRED |
| 307 | } sta_pmf; |
| 308 | |
| 309 | int no_tpk_expiration; |
| 310 | |
| 311 | int er_oper_performed; |
| 312 | char er_oper_bssid[20]; |
| 313 | int amsdu_size; |
| 314 | int back_rcv_buf; |
| 315 | |
| 316 | int testbed_flag_txsp; |
| 317 | int testbed_flag_rxsp; |
| 318 | int chwidth; |
| 319 | |
| 320 | /* AP configuration */ |
| 321 | char ap_ssid[33]; |
Adil Saeed Musthafa | b7b297f | 2017-04-10 23:13:31 -0700 | [diff] [blame] | 322 | /* |
| 323 | * WLAN-TAG of 1 will use 'ap_' variables; |
| 324 | * tag higher than 1 will use 'ap_tag_' variables. |
| 325 | */ |
| 326 | char ap_tag_ssid[MAX_WLAN_TAGS - 1][33]; |
Jouni Malinen | cd4e3c3 | 2015-10-29 12:39:56 +0200 | [diff] [blame] | 327 | enum ap_mode { |
| 328 | AP_11a, |
| 329 | AP_11g, |
| 330 | AP_11b, |
| 331 | AP_11na, |
| 332 | AP_11ng, |
| 333 | AP_11ac, |
| 334 | AP_inval |
| 335 | } ap_mode; |
| 336 | int ap_channel; |
| 337 | int ap_rts; |
| 338 | int ap_frgmnt; |
| 339 | int ap_bcnint; |
| 340 | struct qos_params { |
| 341 | int ac; |
| 342 | int cwmin; |
| 343 | int cwmax; |
| 344 | int aifs; |
| 345 | int txop; |
| 346 | int acm; |
| 347 | } ap_qos[NUM_AP_AC], ap_sta_qos[NUM_AP_AC]; |
Jouni Malinen | 57fa3d8 | 2016-11-30 12:51:43 +0200 | [diff] [blame] | 348 | enum value_not_set_enabled_disabled ap_noack; |
| 349 | enum value_not_set_enabled_disabled ap_ampdu; |
| 350 | enum value_not_set_enabled_disabled ap_amsdu; |
| 351 | enum value_not_set_enabled_disabled ap_rx_amsdu; |
Jouni Malinen | cd4e3c3 | 2015-10-29 12:39:56 +0200 | [diff] [blame] | 352 | int ap_ampdu_exp; |
Jouni Malinen | 57fa3d8 | 2016-11-30 12:51:43 +0200 | [diff] [blame] | 353 | enum value_not_set_enabled_disabled ap_addba_reject; |
Jouni Malinen | cd4e3c3 | 2015-10-29 12:39:56 +0200 | [diff] [blame] | 354 | int ap_fixed_rate; |
| 355 | int ap_mcs; |
| 356 | int ap_rx_streams; |
| 357 | int ap_tx_streams; |
| 358 | unsigned int ap_vhtmcs_map; |
Jouni Malinen | 57fa3d8 | 2016-11-30 12:51:43 +0200 | [diff] [blame] | 359 | enum value_not_set_enabled_disabled ap_ldpc; |
| 360 | enum value_not_set_enabled_disabled ap_sig_rts; |
Jouni Malinen | cd4e3c3 | 2015-10-29 12:39:56 +0200 | [diff] [blame] | 361 | enum ap_chwidth { |
| 362 | AP_20, |
| 363 | AP_40, |
| 364 | AP_80, |
| 365 | AP_160, |
| 366 | AP_AUTO |
| 367 | } ap_chwidth; |
Pradeep Reddy Potteti | bf8af29 | 2017-02-15 15:28:39 +0530 | [diff] [blame] | 368 | enum ap_chwidth default_11na_ap_chwidth; |
| 369 | enum ap_chwidth default_11ng_ap_chwidth; |
Jouni Malinen | cd4e3c3 | 2015-10-29 12:39:56 +0200 | [diff] [blame] | 370 | int ap_tx_stbc; |
Jouni Malinen | 57fa3d8 | 2016-11-30 12:51:43 +0200 | [diff] [blame] | 371 | enum value_not_set_enabled_disabled ap_dyn_bw_sig; |
Jouni Malinen | cd4e3c3 | 2015-10-29 12:39:56 +0200 | [diff] [blame] | 372 | int ap_sgi80; |
| 373 | int ap_p2p_mgmt; |
| 374 | enum ap_key_mgmt { |
| 375 | AP_OPEN, |
| 376 | AP_WPA2_PSK, |
| 377 | AP_WPA_PSK, |
| 378 | AP_WPA2_EAP, |
| 379 | AP_WPA_EAP, |
| 380 | AP_WPA2_EAP_MIXED, |
Jouni Malinen | 30824df | 2017-08-22 21:21:38 +0300 | [diff] [blame] | 381 | AP_WPA2_PSK_MIXED, |
| 382 | AP_WPA2_SAE, |
| 383 | AP_WPA2_PSK_SAE, |
Jouni Malinen | ad395a2 | 2017-09-01 21:13:46 +0300 | [diff] [blame] | 384 | AP_SUITEB, |
Jouni Malinen | 147b3c3 | 2017-10-09 16:51:54 +0300 | [diff] [blame] | 385 | AP_WPA2_OWE, |
Jouni Malinen | cd4e3c3 | 2015-10-29 12:39:56 +0200 | [diff] [blame] | 386 | } ap_key_mgmt; |
Adil Saeed Musthafa | b7b297f | 2017-04-10 23:13:31 -0700 | [diff] [blame] | 387 | enum ap_tag_key_mgmt { |
Jouni Malinen | cd4e3c3 | 2015-10-29 12:39:56 +0200 | [diff] [blame] | 388 | AP2_OPEN, |
Adil Saeed Musthafa | b7b297f | 2017-04-10 23:13:31 -0700 | [diff] [blame] | 389 | AP2_OSEN, |
| 390 | AP2_WPA2_PSK |
| 391 | } ap_tag_key_mgmt[MAX_WLAN_TAGS - 1]; |
Jouni Malinen | cd4e3c3 | 2015-10-29 12:39:56 +0200 | [diff] [blame] | 392 | int ap_add_sha256; |
Sarvepalli, Rajesh Babu | 24dc7e4 | 2016-03-18 21:27:26 +0530 | [diff] [blame] | 393 | int ap_rsn_preauth; |
Jouni Malinen | cd4e3c3 | 2015-10-29 12:39:56 +0200 | [diff] [blame] | 394 | enum ap_pmf { |
| 395 | AP_PMF_DISABLED, |
| 396 | AP_PMF_OPTIONAL, |
| 397 | AP_PMF_REQUIRED |
| 398 | } ap_pmf; |
| 399 | enum ap_cipher { |
| 400 | AP_CCMP, |
| 401 | AP_TKIP, |
| 402 | AP_WEP, |
| 403 | AP_PLAIN, |
Jouni Malinen | ad395a2 | 2017-09-01 21:13:46 +0300 | [diff] [blame] | 404 | AP_CCMP_TKIP, |
| 405 | AP_GCMP_256, |
Jouni Malinen | 3d633da | 2017-09-14 22:19:21 +0300 | [diff] [blame] | 406 | AP_GCMP_128, |
| 407 | AP_CCMP_256, |
Jouni Malinen | cd4e3c3 | 2015-10-29 12:39:56 +0200 | [diff] [blame] | 408 | } ap_cipher; |
Jouni Malinen | 3d633da | 2017-09-14 22:19:21 +0300 | [diff] [blame] | 409 | enum ap_group_mgmt_cipher { |
| 410 | AP_NO_GROUP_MGMT_CIPHER_SET, |
| 411 | AP_BIP_GMAC_256, |
| 412 | AP_BIP_CMAC_256, |
| 413 | AP_BIP_GMAC_128, |
| 414 | AP_BIP_CMAC_128, |
| 415 | } ap_group_mgmt_cipher; |
Jouni Malinen | ed670f4 | 2017-08-31 01:39:28 +0300 | [diff] [blame] | 416 | char *ap_sae_groups; |
Jouni Malinen | 2f524ce | 2017-08-31 01:43:29 +0300 | [diff] [blame] | 417 | int sae_anti_clogging_threshold; |
Jouni Malinen | b347db0 | 2017-09-02 01:36:03 +0300 | [diff] [blame] | 418 | int sae_reflection; |
Jouni Malinen | cd4e3c3 | 2015-10-29 12:39:56 +0200 | [diff] [blame] | 419 | char ap_passphrase[65]; |
| 420 | char ap_wepkey[27]; |
| 421 | char ap_radius_ipaddr[20]; |
| 422 | int ap_radius_port; |
| 423 | char ap_radius_password[200]; |
| 424 | char ap2_radius_ipaddr[20]; |
| 425 | int ap2_radius_port; |
| 426 | char ap2_radius_password[200]; |
| 427 | int ap_tdls_prohibit; |
| 428 | int ap_tdls_prohibit_chswitch; |
| 429 | int ap_hs2; |
| 430 | int ap_dgaf_disable; |
| 431 | int ap_p2p_cross_connect; |
| 432 | int ap_oper_name; |
| 433 | int ap_wan_metrics; |
| 434 | int ap_conn_capab; |
| 435 | int ap_oper_class; |
| 436 | |
| 437 | int ap_interworking; |
| 438 | int ap_access_net_type; |
| 439 | int ap_internet; |
| 440 | int ap_venue_group; |
| 441 | int ap_venue_type; |
| 442 | char ap_hessid[20]; |
| 443 | char ap_roaming_cons[100]; |
| 444 | int ap_venue_name; |
| 445 | int ap_net_auth_type; |
| 446 | int ap_nai_realm_list; |
| 447 | char ap_domain_name_list[1000]; |
| 448 | int ap_ip_addr_type_avail; |
| 449 | char ap_plmn_mcc[10][4]; |
| 450 | char ap_plmn_mnc[10][4]; |
| 451 | int ap_gas_cb_delay; |
| 452 | int ap_proxy_arp; |
| 453 | int ap2_proxy_arp; |
| 454 | int ap_l2tif; |
| 455 | int ap_anqpserver; |
| 456 | int ap_anqpserver_on; |
| 457 | int ap_osu_provider_list; |
| 458 | int ap_qos_map_set; |
| 459 | int ap_bss_load; |
| 460 | char ap_osu_server_uri[10][256]; |
| 461 | char ap_osu_ssid[33]; |
| 462 | int ap_osu_method[10]; |
| 463 | int ap_osu_icon_tag; |
| 464 | |
| 465 | int ap_fake_pkhash; |
| 466 | int ap_disable_protection; |
| 467 | int ap_allow_vht_wep; |
| 468 | int ap_allow_vht_tkip; |
| 469 | |
| 470 | enum ap_vht_chwidth { |
| 471 | AP_20_40_VHT_OPER_CHWIDTH, |
| 472 | AP_80_VHT_OPER_CHWIDTH, |
| 473 | AP_160_VHT_OPER_CHWIDTH |
| 474 | } ap_vht_chwidth; |
| 475 | int ap_txBF; |
| 476 | int ap_mu_txBF; |
Pradeep Reddy POTTETI | fba27db | 2015-11-20 16:42:22 +0530 | [diff] [blame] | 477 | enum ap_regulatory_mode { |
| 478 | AP_80211D_MODE_DISABLED, |
| 479 | AP_80211D_MODE_ENABLED, |
| 480 | } ap_regulatory_mode; |
| 481 | enum ap_dfs_mode { |
| 482 | AP_DFS_MODE_DISABLED, |
| 483 | AP_DFS_MODE_ENABLED, |
| 484 | } ap_dfs_mode; |
priyadharshini gowthaman | 264d544 | 2016-02-25 15:52:22 -0800 | [diff] [blame] | 485 | int ap_ndpa_frame; |
Jouni Malinen | cd4e3c3 | 2015-10-29 12:39:56 +0200 | [diff] [blame] | 486 | |
priyadharshini gowthaman | 8e26ff4 | 2016-06-22 22:47:14 -0700 | [diff] [blame] | 487 | int ap_lci; |
| 488 | char ap_val_lci[33]; |
priyadharshini gowthaman | c2357bd | 2016-06-22 22:47:14 -0700 | [diff] [blame] | 489 | char ap_infoz[17]; |
priyadharshini gowthaman | 8e26ff4 | 2016-06-22 22:47:14 -0700 | [diff] [blame] | 490 | int ap_lcr; |
| 491 | char ap_val_lcr[400]; |
| 492 | int ap_rrm; |
| 493 | int ap_rtt; |
| 494 | int ap_neighap; /* number of configured neighbor APs */ |
| 495 | unsigned char ap_val_neighap[3][6]; |
| 496 | int ap_opchannel; /* number of oper channels */ |
| 497 | int ap_val_opchannel[3]; |
| 498 | int ap_scan; |
priyadharshini gowthaman | c2357bd | 2016-06-22 22:47:14 -0700 | [diff] [blame] | 499 | int ap_fqdn_held; |
| 500 | int ap_fqdn_supl; |
priyadharshini gowthaman | a27b5b6 | 2016-06-22 22:47:14 -0700 | [diff] [blame] | 501 | int ap_msnt_type; |
| 502 | |
priyadharshini gowthaman | b4e05fc | 2016-10-13 15:02:35 -0700 | [diff] [blame] | 503 | int ap_mbo; |
| 504 | int ap_ne_class; |
| 505 | int ap_ne_op_ch; |
| 506 | int ap_set_bssidpref; |
| 507 | int ap_btmreq_disassoc_imnt; |
| 508 | int ap_btmreq_term_bit; |
Adil Saeed Musthafa | 7d9ae38 | 2017-04-10 23:13:33 -0700 | [diff] [blame] | 509 | int ap_disassoc_timer; |
| 510 | int ap_btmreq_bss_term_dur; |
Adil Saeed Musthafa | 604c826 | 2017-04-10 23:13:31 -0700 | [diff] [blame] | 511 | enum reg_domain { |
| 512 | REG_DOMAIN_NOT_SET, |
| 513 | REG_DOMAIN_LOCAL, |
| 514 | REG_DOMAIN_GLOBAL |
| 515 | } ap_reg_domain; |
Adil Saeed Musthafa | cf752fa | 2017-04-10 23:13:32 -0700 | [diff] [blame] | 516 | char ap_mobility_domain[10]; |
Adil Saeed Musthafa | 023108a | 2017-04-10 23:13:37 -0700 | [diff] [blame] | 517 | unsigned char ap_cell_cap_pref; |
Adil Saeed Musthafa | 4ec61bd | 2017-04-10 23:13:41 -0700 | [diff] [blame] | 518 | int ap_ft_oa; |
| 519 | int ap_name; |
| 520 | |
Adil Saeed Musthafa | 6906372 | 2017-04-10 23:13:40 -0700 | [diff] [blame] | 521 | struct mbo_pref_ap mbo_pref_aps[MBO_MAX_PREF_BSSIDS]; |
| 522 | struct mbo_pref_ap mbo_self_ap_tuple; |
| 523 | int mbo_pref_ap_cnt; |
Adil Saeed Musthafa | 4ec61bd | 2017-04-10 23:13:41 -0700 | [diff] [blame] | 524 | unsigned char ft_bss_mac_list[MAX_FT_BSS_LIST][ETH_ALEN]; |
| 525 | int ft_bss_mac_cnt; |
priyadharshini gowthaman | b4e05fc | 2016-10-13 15:02:35 -0700 | [diff] [blame] | 526 | |
Jouni Malinen | cd4e3c3 | 2015-10-29 12:39:56 +0200 | [diff] [blame] | 527 | const char *hostapd_debug_log; |
| 528 | |
| 529 | #ifdef CONFIG_TRAFFIC_AGENT |
| 530 | /* Traffic Agent */ |
| 531 | struct sigma_stream streams[MAX_SIGMA_STREAMS]; |
| 532 | int stream_id; |
| 533 | int num_streams; |
| 534 | pthread_t thr; |
| 535 | #endif /* CONFIG_TRAFFIC_AGENT */ |
| 536 | |
Jouni Malinen | c2493f8 | 2016-06-05 18:01:33 +0300 | [diff] [blame] | 537 | unsigned int throughput_pktsize; /* If non-zero, override pktsize for |
| 538 | * throughput tests */ |
Jouni Malinen | cd4e3c3 | 2015-10-29 12:39:56 +0200 | [diff] [blame] | 539 | int no_timestamps; |
| 540 | |
| 541 | const char *sniffer_ifname; |
| 542 | const char *set_macaddr; |
| 543 | int tmp_mac_addr; |
| 544 | int ap_is_dual; |
| 545 | enum ap_mode ap_mode_1; |
| 546 | enum ap_chwidth ap_chwidth_1; |
| 547 | int ap_channel_1; |
| 548 | char ap_countrycode[3]; |
| 549 | |
| 550 | int ap_wpsnfc; |
| 551 | |
Pradeep Reddy POTTETI | 0d3db63 | 2016-03-11 15:21:11 +0530 | [diff] [blame] | 552 | enum ap_wme { |
| 553 | AP_WME_OFF, |
| 554 | AP_WME_ON, |
| 555 | } ap_wme; |
| 556 | |
Mohammed Shafi Shajakhan | 02e3b82 | 2017-02-23 04:15:02 +0530 | [diff] [blame] | 557 | enum ap_wmmps { |
| 558 | AP_WMMPS_OFF, |
| 559 | AP_WMMPS_ON, |
| 560 | } ap_wmmps; |
| 561 | |
Pradeep Reddy Potteti | 4b0cdee | 2017-03-15 12:37:33 +0530 | [diff] [blame] | 562 | enum sec_ch_offset ap_chwidth_offset; |
| 563 | |
Jouni Malinen | cd4e3c3 | 2015-10-29 12:39:56 +0200 | [diff] [blame] | 564 | #ifdef CONFIG_SNIFFER |
| 565 | pid_t sniffer_pid; |
| 566 | char sniffer_filename[200]; |
| 567 | #endif /* CONFIG_SNIFFER */ |
| 568 | |
| 569 | int last_set_ip_config_ipv6; |
Amarnath Hullur Subramanyam | 9c381f5 | 2017-03-17 00:04:41 -0700 | [diff] [blame] | 570 | #ifdef MIRACAST |
| 571 | pthread_t rtsp_thread_handle; |
| 572 | int wfd_device_type; /* 0 for source, 1 for sink */ |
| 573 | char peer_mac_address[32]; |
| 574 | void *miracast_lib; |
| 575 | const char *miracast_lib_path; |
| 576 | char mdns_instance_name[64]; |
| 577 | #endif /* MIRACAST */ |
Jouni Malinen | cd4e3c3 | 2015-10-29 12:39:56 +0200 | [diff] [blame] | 578 | |
| 579 | int tid_to_handle[8]; /* Mapping of TID to handle */ |
| 580 | int dialog_token; /* Used for generating unique handle for an addTs */ |
| 581 | |
| 582 | enum sigma_program { |
| 583 | PROGRAM_UNKNOWN = 0, |
| 584 | PROGRAM_TDLS, |
| 585 | PROGRAM_HS2, |
| 586 | PROGRAM_HS2_R2, |
| 587 | PROGRAM_WFD, |
Amarnath Hullur Subramanyam | 659a34c | 2017-03-17 00:04:41 -0700 | [diff] [blame] | 588 | PROGRAM_DISPLAYR2, |
Jouni Malinen | cd4e3c3 | 2015-10-29 12:39:56 +0200 | [diff] [blame] | 589 | PROGRAM_PMF, |
| 590 | PROGRAM_WPS, |
| 591 | PROGRAM_60GHZ, |
| 592 | PROGRAM_HT, |
| 593 | PROGRAM_VHT, |
| 594 | PROGRAM_NAN, |
priyadharshini gowthaman | 12dd414 | 2016-06-22 22:47:14 -0700 | [diff] [blame] | 595 | PROGRAM_LOC, |
Adil Saeed Musthafa | 33ea287 | 2017-04-10 23:13:24 -0700 | [diff] [blame] | 596 | PROGRAM_MBO, |
Jouni Malinen | 5c3813a | 2017-08-26 13:30:39 +0300 | [diff] [blame] | 597 | PROGRAM_IOTLP, |
| 598 | PROGRAM_DPP, |
Jouni Malinen | cd4e3c3 | 2015-10-29 12:39:56 +0200 | [diff] [blame] | 599 | } program; |
| 600 | |
| 601 | enum device_type { |
| 602 | device_type_unknown, |
| 603 | AP_unknown, |
| 604 | AP_testbed, |
| 605 | AP_dut, |
| 606 | STA_unknown, |
| 607 | STA_testbed, |
| 608 | STA_dut |
| 609 | } device_type; |
| 610 | |
| 611 | enum { |
| 612 | DEVROLE_UNKNOWN = 0, |
| 613 | DEVROLE_STA, |
| 614 | DEVROLE_PCP, |
| 615 | } dev_role; |
| 616 | |
| 617 | const char *version; |
| 618 | int no_ip_addr_set; |
| 619 | int sta_channel; |
| 620 | |
| 621 | const char *summary_log; |
| 622 | const char *hostapd_entropy_log; |
| 623 | |
| 624 | int iface_down_on_reset; |
| 625 | int write_stats; /* traffic stream e2e*.txt files */ |
Bala Krishna Bhamidipati | 73d7af0 | 2016-03-24 12:27:56 +0530 | [diff] [blame] | 626 | int sim_no_username; /* do not set SIM username to use real SIM */ |
Jouni Malinen | 5db3b10 | 2016-08-04 12:27:18 +0300 | [diff] [blame] | 627 | |
| 628 | const char *vendor_name; /* device_get_info vendor override */ |
| 629 | const char *model_name; /* device_get_info model override */ |
| 630 | const char *version_name; /* device_get_info version override */ |
Rakesh Sunki | 7d37f41 | 2017-03-30 14:47:55 -0700 | [diff] [blame] | 631 | |
Rakesh Sunki | 14cfcd2 | 2017-03-30 14:47:55 -0700 | [diff] [blame] | 632 | int ndp_enable; /* Flag which is set once the NDP is setup */ |
| 633 | |
Rakesh Sunki | 7d37f41 | 2017-03-30 14:47:55 -0700 | [diff] [blame] | 634 | /* Length of nan_pmk in octets */ |
| 635 | u8 nan_pmk_len; |
| 636 | |
| 637 | /* |
| 638 | * PMK: Info is optional in Discovery phase. PMK info can |
| 639 | * be passed during the NDP session. |
| 640 | */ |
| 641 | u8 nan_pmk[32]; |
Adil Saeed Musthafa | 33ea287 | 2017-04-10 23:13:24 -0700 | [diff] [blame] | 642 | |
| 643 | enum value_not_set_enabled_disabled wnm_bss_max_feature; |
| 644 | int wnm_bss_max_idle_time; |
| 645 | enum value_not_set_enabled_disabled wnm_bss_max_protection; |
Ashwini Patil | 0040258 | 2017-04-13 12:29:39 +0530 | [diff] [blame] | 646 | |
| 647 | char *non_pref_ch_list; /* MBO: non-preferred channel report */ |
Ashwini Patil | 5acd738 | 2017-04-13 15:55:04 +0530 | [diff] [blame] | 648 | char *btm_query_cand_list; /* Candidate list for BTM Query */ |
Jouni Malinen | 3c367e8 | 2017-06-23 17:01:47 +0300 | [diff] [blame] | 649 | |
Jouni Malinen | 6814313 | 2017-09-02 02:34:08 +0300 | [diff] [blame] | 650 | char *sae_commit_override; |
Jouni Malinen | 3c367e8 | 2017-06-23 17:01:47 +0300 | [diff] [blame] | 651 | char *rsne_override; |
Jouni Malinen | d6bf1b4 | 2017-06-23 17:51:01 +0300 | [diff] [blame] | 652 | const char *hostapd_bin; |
| 653 | int use_hostapd_pid_file; |
| 654 | const char *hostapd_ifname; |
Jouni Malinen | d86e582 | 2017-08-29 03:55:32 +0300 | [diff] [blame] | 655 | int hostapd_running; |
| 656 | |
| 657 | int dpp_peer_bootstrap; |
| 658 | int dpp_local_bootstrap; |
| 659 | int dpp_conf_id; |
Jouni Malinen | cd4e3c3 | 2015-10-29 12:39:56 +0200 | [diff] [blame] | 660 | }; |
| 661 | |
| 662 | |
| 663 | enum sigma_dut_print_level { |
| 664 | DUT_MSG_DEBUG, DUT_MSG_INFO, DUT_MSG_ERROR |
| 665 | }; |
| 666 | |
| 667 | void sigma_dut_print(struct sigma_dut *dut, int level, const char *fmt, ...) |
| 668 | PRINTF_FORMAT(3, 4); |
| 669 | |
| 670 | void sigma_dut_summary(struct sigma_dut *dut, const char *fmt, ...) |
| 671 | PRINTF_FORMAT(2, 3); |
| 672 | |
| 673 | |
| 674 | enum sigma_status { |
| 675 | SIGMA_RUNNING, SIGMA_INVALID, SIGMA_ERROR, SIGMA_COMPLETE |
| 676 | }; |
| 677 | |
| 678 | void send_resp(struct sigma_dut *dut, struct sigma_conn *conn, |
Jouni Malinen | 76401f5 | 2017-03-18 01:04:55 +0200 | [diff] [blame] | 679 | enum sigma_status status, const char *buf); |
Jouni Malinen | cd4e3c3 | 2015-10-29 12:39:56 +0200 | [diff] [blame] | 680 | |
| 681 | const char * get_param(struct sigma_cmd *cmd, const char *name); |
| 682 | |
| 683 | int sigma_dut_reg_cmd(const char *cmd, |
| 684 | int (*validate)(struct sigma_cmd *cmd), |
| 685 | int (*process)(struct sigma_dut *dut, |
| 686 | struct sigma_conn *conn, |
| 687 | struct sigma_cmd *cmd)); |
| 688 | |
| 689 | void sigma_dut_register_cmds(void); |
| 690 | |
| 691 | int cmd_sta_send_frame(struct sigma_dut *dut, struct sigma_conn *conn, |
| 692 | struct sigma_cmd *cmd); |
| 693 | int cmd_sta_set_parameter(struct sigma_dut *dut, struct sigma_conn *conn, |
| 694 | struct sigma_cmd *cmd); |
| 695 | int cmd_ap_send_frame(struct sigma_dut *dut, struct sigma_conn *conn, |
| 696 | struct sigma_cmd *cmd); |
| 697 | int cmd_wlantest_send_frame(struct sigma_dut *dut, struct sigma_conn *conn, |
| 698 | struct sigma_cmd *cmd); |
| 699 | |
| 700 | enum driver_type { |
| 701 | DRIVER_NOT_SET, |
| 702 | DRIVER_ATHEROS, |
| 703 | DRIVER_WCN, |
| 704 | DRIVER_MAC80211, |
| 705 | DRIVER_AR6003, |
| 706 | DRIVER_WIL6210, |
| 707 | DRIVER_QNXNTO, |
Sreelakshmi Konamki | b692f10 | 2016-04-26 19:47:00 +0530 | [diff] [blame] | 708 | DRIVER_OPENWRT, |
| 709 | DRIVER_LINUX_WCN, |
Jouni Malinen | cd4e3c3 | 2015-10-29 12:39:56 +0200 | [diff] [blame] | 710 | }; |
| 711 | |
| 712 | enum openwrt_driver_type { |
| 713 | OPENWRT_DRIVER_NOT_SET, |
| 714 | OPENWRT_DRIVER_ATHEROS |
| 715 | }; |
| 716 | |
| 717 | #define DRIVER_NAME_60G "wil6210" |
| 718 | |
| 719 | int set_wifi_chip(const char *chip_type); |
| 720 | enum driver_type get_driver_type(void); |
| 721 | enum openwrt_driver_type get_openwrt_driver_type(void); |
| 722 | int file_exists(const char *fname); |
| 723 | |
| 724 | struct wpa_ctrl; |
| 725 | |
| 726 | int wps_connection_event(struct sigma_dut *dut, struct sigma_conn *conn, |
| 727 | struct wpa_ctrl *ctrl, const char *intf, int p2p_resp); |
| 728 | int ascii2hexstr(const char *str, char *hex); |
| 729 | void disconnect_station(struct sigma_dut *dut); |
| 730 | void nfc_status(struct sigma_dut *dut, const char *state, const char *oper); |
| 731 | int get_ip_config(struct sigma_dut *dut, const char *ifname, char *buf, |
| 732 | size_t buf_len); |
| 733 | int ath6kl_client_uapsd(struct sigma_dut *dut, const char *intf, int uapsd); |
| 734 | int is_ip_addr(const char *str); |
| 735 | int run_system(struct sigma_dut *dut, const char *cmd); |
Adil Saeed Musthafa | 5f793f0 | 2017-04-10 23:13:30 -0700 | [diff] [blame] | 736 | int run_system_wrapper(struct sigma_dut *dut, const char *cmd, ...); |
Jouni Malinen | cd4e3c3 | 2015-10-29 12:39:56 +0200 | [diff] [blame] | 737 | int cmd_wlantest_set_channel(struct sigma_dut *dut, struct sigma_conn *conn, |
| 738 | struct sigma_cmd *cmd); |
| 739 | void sniffer_close(struct sigma_dut *dut); |
| 740 | |
| 741 | /* ap.c */ |
| 742 | void ath_disable_txbf(struct sigma_dut *dut, const char *intf); |
Priyadharshini Gowthaman | 818afef | 2015-11-09 13:28:15 -0800 | [diff] [blame] | 743 | void ath_config_dyn_bw_sig(struct sigma_dut *dut, const char *ifname, |
| 744 | const char *val); |
priyadharshini gowthaman | e5e2517 | 2015-12-08 14:53:48 -0800 | [diff] [blame] | 745 | void novap_reset(struct sigma_dut *dut, const char *ifname); |
Jouni Malinen | 2e6ccc2 | 2017-09-04 13:43:16 +0300 | [diff] [blame] | 746 | int get_hwaddr(const char *ifname, unsigned char *hwaddr); |
Jouni Malinen | a326d7b | 2017-09-04 13:46:02 +0300 | [diff] [blame] | 747 | int cmd_ap_config_commit(struct sigma_dut *dut, struct sigma_conn *conn, |
| 748 | struct sigma_cmd *cmd); |
Jouni Malinen | cd4e3c3 | 2015-10-29 12:39:56 +0200 | [diff] [blame] | 749 | |
| 750 | /* sta.c */ |
| 751 | int set_ps(const char *intf, struct sigma_dut *dut, int enabled); |
| 752 | void ath_set_zero_crc(struct sigma_dut *dut, const char *val); |
| 753 | void ath_set_cts_width(struct sigma_dut *dut, const char *ifname, |
| 754 | const char *val); |
| 755 | int ath_set_width(struct sigma_dut *dut, struct sigma_conn *conn, |
| 756 | const char *intf, const char *val); |
Lior David | 0fe101e | 2017-03-09 16:09:50 +0200 | [diff] [blame] | 757 | int wil6210_send_frame_60g(struct sigma_dut *dut, struct sigma_conn *conn, |
| 758 | struct sigma_cmd *cmd); |
Jouni Malinen | cd4e3c3 | 2015-10-29 12:39:56 +0200 | [diff] [blame] | 759 | |
| 760 | /* p2p.c */ |
| 761 | int p2p_cmd_sta_get_parameter(struct sigma_dut *dut, struct sigma_conn *conn, |
| 762 | struct sigma_cmd *cmd); |
Purushottam Kushwaha | 091e253 | 2016-08-23 11:52:21 +0530 | [diff] [blame] | 763 | void p2p_create_event_thread(struct sigma_dut *dut); |
| 764 | void stop_event_thread(void); |
Amarnath Hullur Subramanyam | 89b37cd | 2017-03-17 00:04:41 -0700 | [diff] [blame] | 765 | void start_dhcp(struct sigma_dut *dut, const char *group_ifname, int go); |
| 766 | void stop_dhcp(struct sigma_dut *dut, const char *group_ifname, int go); |
| 767 | int p2p_discover_peer(struct sigma_dut *dut, const char *ifname, |
| 768 | const char *peer, int full); |
Jouni Malinen | cd4e3c3 | 2015-10-29 12:39:56 +0200 | [diff] [blame] | 769 | |
priyadharshini gowthaman | 72462ef | 2016-06-22 22:47:14 -0700 | [diff] [blame] | 770 | /* utils.c */ |
Jouni Malinen | cd4e3c3 | 2015-10-29 12:39:56 +0200 | [diff] [blame] | 771 | enum sigma_program sigma_program_to_enum(const char *prog); |
Jouni Malinen | 08cf231 | 2017-09-04 13:39:47 +0300 | [diff] [blame] | 772 | int parse_hexstr(const char *hex, unsigned char *buf, size_t buflen); |
priyadharshini gowthaman | 72462ef | 2016-06-22 22:47:14 -0700 | [diff] [blame] | 773 | int parse_mac_address(struct sigma_dut *dut, const char *arg, |
| 774 | unsigned char *addr); |
Rakesh Sunki | 7192dc4 | 2017-03-30 14:47:55 -0700 | [diff] [blame] | 775 | unsigned int channel_to_freq(unsigned int channel); |
| 776 | unsigned int freq_to_channel(unsigned int freq); |
Rakesh Sunki | 8f8e74b | 2017-05-16 15:42:12 -0700 | [diff] [blame] | 777 | void convert_mac_addr_to_ipv6_lladdr(u8 *mac_addr, char *ipv6_buf, |
| 778 | size_t buf_len); |
Jouni Malinen | cd4e3c3 | 2015-10-29 12:39:56 +0200 | [diff] [blame] | 779 | |
Peng Xu | 769731a | 2017-05-10 17:27:28 -0700 | [diff] [blame] | 780 | #ifndef ANDROID |
| 781 | size_t strlcpy(char *dest, const char *src, size_t siz); |
| 782 | size_t strlcat(char *dst, const char *str, size_t size); |
| 783 | #endif /* ANDROID */ |
| 784 | |
| 785 | |
Jouni Malinen | cd4e3c3 | 2015-10-29 12:39:56 +0200 | [diff] [blame] | 786 | /* uapsd_stream.c */ |
| 787 | void receive_uapsd(struct sigma_stream *s); |
Pradeep Reddy POTTETI | 7959404 | 2015-11-23 12:59:12 +0530 | [diff] [blame] | 788 | void send_uapsd_console(struct sigma_stream *s); |
Jouni Malinen | cd4e3c3 | 2015-10-29 12:39:56 +0200 | [diff] [blame] | 789 | |
| 790 | /* nan.c */ |
| 791 | int nan_preset_testparameters(struct sigma_dut *dut, struct sigma_conn *conn, |
| 792 | struct sigma_cmd *cmd); |
| 793 | int nan_cmd_sta_get_parameter(struct sigma_dut *dut, struct sigma_conn *conn, |
| 794 | struct sigma_cmd *cmd); |
| 795 | int nan_cmd_sta_exec_action(struct sigma_dut *dut, struct sigma_conn *conn, |
| 796 | struct sigma_cmd *cmd); |
| 797 | int nan_cmd_sta_get_events(struct sigma_dut *dut, struct sigma_conn *conn, |
| 798 | struct sigma_cmd *cmd); |
| 799 | int nan_cmd_sta_transmit_followup(struct sigma_dut *dut, |
| 800 | struct sigma_conn *conn, |
| 801 | struct sigma_cmd *cmd); |
| 802 | void nan_cmd_sta_reset_default(struct sigma_dut *dut, struct sigma_conn *conn, |
| 803 | struct sigma_cmd *cmd); |
| 804 | int nan_cmd_sta_preset_testparameters(struct sigma_dut *dut, |
| 805 | struct sigma_conn *conn, |
| 806 | struct sigma_cmd *cmd); |
| 807 | |
priyadharshini gowthaman | d66913a | 2016-07-29 15:11:17 -0700 | [diff] [blame] | 808 | /* ftm.c */ |
| 809 | int loc_cmd_sta_exec_action(struct sigma_dut *dut, struct sigma_conn *conn, |
| 810 | struct sigma_cmd *cmd); |
| 811 | int loc_cmd_sta_send_frame(struct sigma_dut *dut, struct sigma_conn *conn, |
| 812 | struct sigma_cmd *cmd); |
| 813 | int loc_cmd_sta_preset_testparameters(struct sigma_dut *dut, |
| 814 | struct sigma_conn *conn, |
| 815 | struct sigma_cmd *cmd); |
| 816 | |
Jouni Malinen | d86e582 | 2017-08-29 03:55:32 +0300 | [diff] [blame] | 817 | /* dpp.c */ |
| 818 | int dpp_dev_exec_action(struct sigma_dut *dut, struct sigma_conn *conn, |
| 819 | struct sigma_cmd *cmd); |
| 820 | |
| 821 | |
Jouni Malinen | cd4e3c3 | 2015-10-29 12:39:56 +0200 | [diff] [blame] | 822 | #endif /* SIGMA_DUT_H */ |