forked from qca/sigma-dut
-
Notifications
You must be signed in to change notification settings - Fork 0
/
sigma_dut.h
1302 lines (1142 loc) · 32.2 KB
/
sigma_dut.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* Sigma Control API DUT (station/AP)
* Copyright (c) 2010-2011, Atheros Communications, Inc.
* Copyright (c) 2011-2017, Qualcomm Atheros, Inc.
* Copyright (c) 2018-2019, The Linux Foundation
* All Rights Reserved.
* Licensed under the Clear BSD license. See README for more details.
*/
#ifndef SIGMA_DUT_H
#define SIGMA_DUT_H
#ifdef __GNUC__
#define _GNU_SOURCE 1
#endif
#include <stdlib.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <time.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <net/if.h>
#ifdef __QNXNTO__
#include <sys/select.h>
#include <net/if_ether.h>
#endif /* __QNXNTO__ */
#include <netinet/in.h>
#include <arpa/inet.h>
#include <pthread.h>
#ifdef NL80211_SUPPORT
#include <netlink/genl/family.h>
#include <netlink/genl/ctrl.h>
#include <netlink/genl/genl.h>
#include "qca-vendor_copy.h"
#include "nl80211_copy.h"
#endif /* NL80211_SUPPORT */
#ifdef ANDROID_WIFI_HAL
/* avoid duplicate definitions from wifi_hal.h causing issues */
#define u32 wifi_hal_u32
#define u16 wifi_hal_u16
#define u8 wifi_hal_u8
#include "wifi_hal.h"
#undef u32
#undef u16
#undef u8
#endif /*ANDROID_WIFI_HAL*/
#ifdef NL80211_SUPPORT
#ifndef NL_CAPABILITY_VERSION_3_5_0
#define nla_nest_start(msg, attrtype) \
nla_nest_start(msg, NLA_F_NESTED | (attrtype))
#endif
#endif
#ifdef __GNUC__
#define PRINTF_FORMAT(a,b) __attribute__ ((format (printf, (a), (b))))
#else
#define PRINTF_FORMAT(a,b)
#endif
#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
#ifndef SIGMA_TMPDIR
#define SIGMA_TMPDIR "/tmp"
#endif /* SIGMA_TMPDIR */
#ifndef SIGMA_DUT_VER
#define SIGMA_DUT_VER "(unknown)"
#endif /* SIGMA_DUT_VER */
#ifndef ETH_ALEN
#define ETH_ALEN 6
#endif
#ifndef BIT_ULL
#define BIT_ULL(nr) (1ULL << (nr))
#endif
#ifndef ETH_P_ARP
#define ETH_P_ARP 0x0806
#endif
#define IPV6_ADDR_LEN 16
struct sigma_dut;
#define MAX_PARAMS 100
#define MAX_RADIO 3
#define NAN_AWARE_IFACE "wifi-aware0"
/* Set default operating channel width 80 MHz */
#define VHT_DEFAULT_OPER_CHWIDTH AP_80_VHT_OPER_CHWIDTH
typedef unsigned int u32;
typedef uint16_t u16;
typedef unsigned char u8;
struct ieee80211_hdr_3addr {
uint16_t frame_control;
uint16_t duration_id;
uint8_t addr1[ETH_ALEN];
uint8_t addr2[ETH_ALEN];
uint8_t addr3[ETH_ALEN];
uint16_t seq_ctrl;
} __attribute__((packed));
struct wfa_p2p_attribute {
uint8_t id;
uint16_t len;
uint8_t variable[0];
} __attribute__((packed));
struct dut_hw_modes {
u16 ht_capab;
u8 mcs_set[16];
u8 ampdu_params;
u32 vht_capab;
u8 vht_mcs_set[8];
};
#define WPA_GET_BE32(a) ((((u32) (a)[0]) << 24) | (((u32) (a)[1]) << 16) | \
(((u32) (a)[2]) << 8) | ((u32) (a)[3]))
#define WPA_PUT_BE32(a, val) \
do { \
(a)[0] = (u8) ((((u32) (val)) >> 24) & 0xff); \
(a)[1] = (u8) ((((u32) (val)) >> 16) & 0xff); \
(a)[2] = (u8) ((((u32) (val)) >> 8) & 0xff); \
(a)[3] = (u8) (((u32) (val)) & 0xff); \
} while (0)
struct sigma_cmd {
char *params[MAX_PARAMS];
char *values[MAX_PARAMS];
int count;
};
#define MAX_CMD_LEN 4096
struct sigma_conn {
int s;
struct sockaddr_in addr;
socklen_t addrlen;
char buf[MAX_CMD_LEN + 5];
int pos;
int waiting_completion;
};
enum sigma_cmd_result {
STATUS_SENT_ERROR = -3,
ERROR_SEND_STATUS = -2,
INVALID_SEND_STATUS = -1,
STATUS_SENT = 0,
SUCCESS_SEND_STATUS = 1
};
struct sigma_cmd_handler {
struct sigma_cmd_handler *next;
char *cmd;
int (*validate)(struct sigma_cmd *cmd);
/* process return value:
* -2 = failed, caller will send status,ERROR
* -1 = failed, caller will send status,INVALID
* 0 = response already sent
* 1 = success, caller will send status,COMPLETE
*/
enum sigma_cmd_result (*process)(struct sigma_dut *dut,
struct sigma_conn *conn,
struct sigma_cmd *cmd);
};
#define P2P_GRP_ID_LEN 128
#define IP_ADDR_STR_LEN 16
struct wfa_cs_p2p_group {
struct wfa_cs_p2p_group *next;
char ifname[IFNAMSIZ];
int go;
char grpid[P2P_GRP_ID_LEN];
char ssid[33];
};
#ifdef CONFIG_TRAFFIC_AGENT
#define MAX_SIGMA_STREAMS 16
#define MAX_SIGMA_STATS 6000
struct sigma_frame_stats {
unsigned int seqnum;
unsigned int local_sec;
unsigned int local_usec;
unsigned int remote_sec;
unsigned int remote_usec;
};
struct sigma_stream {
enum sigma_stream_profile {
SIGMA_PROFILE_FILE_TRANSFER,
SIGMA_PROFILE_MULTICAST,
SIGMA_PROFILE_IPTV,
SIGMA_PROFILE_TRANSACTION,
SIGMA_PROFILE_START_SYNC,
SIGMA_PROFILE_UAPSD
} profile;
int sender;
struct in_addr dst;
int dst_port;
struct in_addr src;
int src_port;
int frame_rate;
int duration;
unsigned int payload_size;
int start_delay;
int max_cnt;
enum sigma_traffic_class {
SIGMA_TC_VOICE,
SIGMA_TC_VIDEO,
SIGMA_TC_BACKGROUND,
SIGMA_TC_BEST_EFFORT
} tc;
int user_priority;
int user_priority_set;
int started;
int no_timestamps;
int sock;
pthread_t thr;
int stop;
int ta_send_in_progress;
int trans_proto;
/* Statistics */
int tx_act_frames; /*
* Number of frames generated by the traffic
* generator application. The name is defined in the
* Sigma CAPI spec.
*/
int tx_frames;
int rx_frames;
unsigned long long tx_payload_bytes;
unsigned long long rx_payload_bytes;
int out_of_seq_frames;
struct sigma_frame_stats *stats;
unsigned int num_stats;
unsigned int stream_id;
/* U-APSD */
unsigned int sta_id;
unsigned int rx_cookie;
unsigned int uapsd_sta_tc;
unsigned int uapsd_rx_state;
unsigned int uapsd_tx_state;
unsigned int tx_stop_cnt;
unsigned int tx_hello_cnt;
pthread_t uapsd_send_thr;
pthread_cond_t tx_thr_cond;
pthread_mutex_t tx_thr_mutex;
int reset_rx;
int num_retry;
char ifname[IFNAMSIZ]; /* ifname from the command */
struct sigma_dut *dut; /* for traffic agent thread to access context */
/* console */
char test_name[9]; /* test case name */
int can_quit;
int reset;
};
#endif /* CONFIG_TRAFFIC_AGENT */
/* extended scheduling test */
enum sigma_ese_type {
ESE_CBAP,
ESE_SP,
};
struct sigma_ese_alloc {
unsigned int percent_bi;
enum sigma_ese_type type;
unsigned int src_aid, dst_aid;
};
#define ESE_BCAST_AID 255
#define MAX_ESE_ALLOCS 4
#define NUM_AP_AC 4
#define AP_AC_BE 0
#define AP_AC_BK 1
#define AP_AC_VI 2
#define AP_AC_VO 3
#define MAX_WLAN_TAGS 3
#define MBO_MAX_PREF_BSSIDS 10
#define MAX_FT_BSS_LIST 10
#define TRANSPORT_PROTO_TYPE_TCP 0x06
#define TRANSPORT_PROTO_TYPE_UDP 0x11
#define NAN_TRANSPORT_PORT_DEFAULT 7000
#define NAN_TRANSPORT_PROTOCOL_DEFAULT TRANSPORT_PROTO_TYPE_TCP
enum value_not_set_enabled_disabled {
VALUE_NOT_SET,
VALUE_ENABLED,
VALUE_DISABLED
};
enum sec_ch_offset {
SEC_CH_NO,
SEC_CH_40ABOVE,
SEC_CH_40BELOW
};
struct mbo_pref_ap {
int ap_ne_class;
int ap_ne_op_ch;
int ap_ne_pref;
unsigned char mac_addr[ETH_ALEN];
};
#ifdef NL80211_SUPPORT
#define SOCK_BUF_SIZE (32 * 1024)
struct nl80211_ctx {
struct nl_sock *sock;
int netlink_familyid;
int nlctrl_familyid;
size_t sock_buf_size;
struct nl_sock *event_sock;
};
#endif /* NL80211_SUPPORT */
/* hardcoded long WSC IE values to force fragmentation */
#define WPS_LONG_DEVICE_NAME "Qti1234511adtest1234567890123456"
#define WPS_LONG_MANUFACTURER "Qti1234511adQti1234511adQti1234511adQti1234511adQti1234511ad"
#define WPS_LONG_MODEL_NAME "Qti1234511adtest1234567890123456"
#define WPS_LONG_MODEL_NUMBER "11111111111111111111111111111111"
#define WPS_LONG_SERIAL_NUMBER "22222222222222222222222222222222"
enum akm_suite_values {
AKM_WPA_EAP = 1,
AKM_WPA_PSK = 2,
AKM_FT_EAP = 3,
AKM_FT_PSK = 4,
AKM_EAP_SHA256 = 5,
AKM_PSK_SHA256 = 6,
AKM_SAE = 8,
AKM_FT_SAE = 9,
AKM_SUITE_B = 12,
AKM_FT_SUITE_B = 13,
AKM_FILS_SHA256 = 14,
AKM_FILS_SHA384 = 15,
AKM_FT_FILS_SHA256 = 16,
AKM_FT_FILS_SHA384 = 17,
};
enum ip_version {
DEFAULT_IP_VERSION = 0,
IPV4 = 4,
IPV6 = 6,
};
enum ip_protocol {
DEFAULT_PROTOCOL = 0,
PROTOCOL_UDP = 17,
PROTOCOL_TCP = 6,
PROTOCOL_ESP = 50,
};
#define DSCP_POLICY_SUCCESS 0
#define DSCP_POLICY_REJECT 1
struct dscp_policy_status {
int id;
int status;
};
struct dscp_policy_data {
char domain_name[250];
int policy_id;
enum ip_version ip_version;
char src_ip[INET6_ADDRSTRLEN];
char dst_ip[INET6_ADDRSTRLEN];
int src_port;
int dst_port;
int start_port;
int end_port;
enum ip_protocol protocol;
int dscp;
struct dscp_policy_data *next;
};
struct sigma_dut {
const char *main_ifname;
char *main_ifname_2g;
char *main_ifname_5g;
const char *station_ifname;
char *station_ifname_2g;
char *station_ifname_5g;
char *p2p_ifname_buf;
int use_5g;
int ap_band_6g;
int sta_2g_started;
int sta_5g_started;
int s; /* server TCP socket */
int debug_level;
int stdout_debug;
struct sigma_cmd_handler *cmds;
int response_sent;
const char *sigma_tmpdir;
/* Default timeout value (seconds) for commands */
unsigned int default_timeout;
unsigned int user_config_timeout;
int next_streamid;
const char *bridge; /* bridge interface to use in AP mode */
enum sigma_mode {
SIGMA_MODE_UNKNOWN,
SIGMA_MODE_STATION,
SIGMA_MODE_AP,
SIGMA_MODE_SNIFFER
} mode;
/*
* Local cached values to handle API that does not provide all the
* needed information with commands that actually trigger some
* operations.
*/
int listen_chn;
int persistent;
int intra_bss;
int noa_duration;
int noa_interval;
int noa_count;
enum wfa_cs_wps_method {
WFA_CS_WPS_NOT_READY,
WFA_CS_WPS_PBC,
WFA_CS_WPS_PIN_DISPLAY,
WFA_CS_WPS_PIN_LABEL,
WFA_CS_WPS_PIN_KEYPAD
} wps_method;
char wps_pin[9];
struct wfa_cs_p2p_group *groups;
char infra_ssid[33];
int infra_network_id;
enum p2p_mode {
P2P_IDLE, P2P_DISCOVER, P2P_LISTEN, P2P_DISABLE
} p2p_mode;
int go;
int p2p_client;
const char *p2p_ifname;
int client_uapsd;
char arp_ipaddr[IP_ADDR_STR_LEN];
char arp_ifname[IFNAMSIZ + 1];
enum sta_pmf {
STA_PMF_DISABLED,
STA_PMF_OPTIONAL,
STA_PMF_REQUIRED
} sta_pmf;
int sta_ft_ds;
int no_tpk_expiration;
int er_oper_performed;
char er_oper_bssid[20];
int amsdu_size;
int back_rcv_buf;
int testbed_flag_txsp;
int testbed_flag_rxsp;
int chwidth;
unsigned int akm_values;
/* AP configuration */
char ap_ssid[33];
/*
* WLAN-TAG of 1 will use 'ap_' variables;
* tag higher than 1 will use 'ap_tag_' variables.
*/
char ap_tag_ssid[MAX_WLAN_TAGS - 1][33];
enum ap_mode {
AP_11a,
AP_11g,
AP_11b,
AP_11na,
AP_11ng,
AP_11ac,
AP_11ad,
AP_11ax,
AP_inval
} ap_mode;
int ap_channel;
int ap_rts;
int ap_frgmnt;
int ap_bcnint;
int ap_start_disabled;
struct qos_params {
int ac;
int cwmin;
int cwmax;
int aifs;
int txop;
int acm;
} ap_qos[NUM_AP_AC], ap_sta_qos[NUM_AP_AC];
enum value_not_set_enabled_disabled ap_noack;
enum value_not_set_enabled_disabled ap_ampdu;
enum value_not_set_enabled_disabled ap_amsdu;
enum value_not_set_enabled_disabled ap_rx_amsdu;
int ap_ampdu_exp;
int ap_max_mpdu_len;
enum value_not_set_enabled_disabled ap_addba_reject;
int ap_fixed_rate;
int ap_mcs;
int ap_rx_streams;
int ap_tx_streams;
unsigned int ap_vhtmcs_map;
enum value_not_set_enabled_disabled ap_ldpc;
enum value_not_set_enabled_disabled ap_sig_rts;
enum ap_chwidth {
AP_20,
AP_40,
AP_80,
AP_160,
AP_80_80,
AP_AUTO
} ap_chwidth;
enum ap_chwidth default_11na_ap_chwidth;
enum ap_chwidth default_11ng_ap_chwidth;
int ap_tx_stbc;
enum value_not_set_enabled_disabled ap_dyn_bw_sig;
int ap_sgi80;
int ap_p2p_mgmt;
enum ap_key_mgmt {
AP_OPEN,
AP_WPA2_PSK,
AP_WPA_PSK,
AP_WPA2_EAP,
AP_WPA_EAP,
AP_WPA2_EAP_MIXED,
AP_WPA2_PSK_MIXED,
AP_WPA2_SAE,
AP_WPA2_PSK_SAE,
AP_SUITEB,
AP_WPA2_OWE,
AP_WPA2_EAP_OSEN,
AP_WPA2_FT_EAP,
AP_WPA2_FT_PSK,
AP_WPA2_EAP_SHA256,
AP_WPA2_PSK_SHA256,
AP_WPA2_ENT_FT_EAP,
AP_OSEN,
} ap_key_mgmt;
enum ap_tag_key_mgmt {
AP2_OPEN,
AP2_OSEN,
AP2_WPA2_PSK,
AP2_WPA2_OWE,
} ap_tag_key_mgmt[MAX_WLAN_TAGS - 1];
int ap_add_sha256;
int ap_add_sha384;
int ap_rsn_preauth;
enum ap_pmf {
AP_PMF_DISABLED,
AP_PMF_OPTIONAL,
AP_PMF_REQUIRED
} ap_pmf;
enum ap_cipher {
AP_NO_GROUP_CIPHER_SET,
AP_CCMP,
AP_TKIP,
AP_WEP,
AP_PLAIN,
AP_CCMP_TKIP,
AP_GCMP_256,
AP_GCMP_128,
AP_CCMP_256,
AP_CCMP_128_GCMP_256,
} ap_cipher, ap_group_cipher;
enum ap_group_mgmt_cipher {
AP_NO_GROUP_MGMT_CIPHER_SET,
AP_BIP_GMAC_256,
AP_BIP_CMAC_256,
AP_BIP_GMAC_128,
AP_BIP_CMAC_128,
} ap_group_mgmt_cipher;
char *ap_sae_groups;
int sae_anti_clogging_threshold;
int sae_reflection;
int ap_sae_commit_status;
int ap_sae_pk_omit;
int sae_confirm_immediate;
char ap_passphrase[101];
char ap_psk[65];
char *ap_sae_passwords;
char *ap_sae_pk_modifier;
char *ap_sae_pk_keypair;
char *ap_sae_pk_keypair_sig;
int ap_sae_pk;
char ap_wepkey[27];
char ap_radius_ipaddr[20];
int ap_radius_port;
char ap_radius_password[200];
char ap2_radius_ipaddr[20];
int ap2_radius_port;
char ap2_radius_password[200];
int ap_tdls_prohibit;
int ap_tdls_prohibit_chswitch;
int ap_hs2;
int ap_dgaf_disable;
int ap_p2p_cross_connect;
int ap_oper_name;
int ap_wan_metrics;
int ap_conn_capab;
int ap_oper_class;
int ap_interworking;
int ap_access_net_type;
int ap_internet;
int ap_venue_group;
int ap_venue_type;
char ap_hessid[20];
char ap_roaming_cons[100];
int ap_venue_name;
int ap_net_auth_type;
int ap_nai_realm_list;
char ap_domain_name_list[1000];
int ap_ip_addr_type_avail;
char ap_plmn_mcc[10][4];
char ap_plmn_mnc[10][4];
int ap_gas_cb_delay;
int ap_proxy_arp;
int ap2_proxy_arp;
int ap2_osu;
int ap_l2tif;
int ap_anqpserver;
int ap_anqpserver_on;
int ap_osu_provider_list;
int ap_osu_provider_nai_list;
int ap_qos_map_set;
int ap_bss_load;
char ap_osu_server_uri[10][256];
char ap_osu_ssid[33];
int ap_osu_method[10];
int ap_osu_icon_tag;
int ap_venue_url;
int ap_advice_of_charge;
int ap_oper_icon_metadata;
int ap_tnc_file_name;
unsigned int ap_tnc_time_stamp;
int ap_fake_pkhash;
int ap_disable_protection;
int ap_allow_vht_wep;
int ap_allow_vht_tkip;
enum ap_vht_chwidth {
AP_20_40_VHT_OPER_CHWIDTH,
AP_80_VHT_OPER_CHWIDTH,
AP_160_VHT_OPER_CHWIDTH
} ap_vht_chwidth;
int ap_txBF;
int ap_mu_txBF;
enum ap_regulatory_mode {
AP_80211D_MODE_DISABLED,
AP_80211D_MODE_ENABLED,
} ap_regulatory_mode;
enum ap_dfs_mode {
AP_DFS_MODE_DISABLED,
AP_DFS_MODE_ENABLED,
} ap_dfs_mode;
int ap_ndpa_frame;
int ap_lci;
char ap_val_lci[33];
char ap_infoz[17];
int ap_lcr;
char ap_val_lcr[400];
int ap_rrm;
int ap_rtt;
int ap_neighap; /* number of configured neighbor APs */
unsigned char ap_val_neighap[3][6];
int ap_opchannel; /* number of oper channels */
int ap_val_opchannel[3];
int ap_scan;
int ap_fqdn_held;
int ap_fqdn_supl;
int ap_msnt_type;
int ap_mbo;
int ap_ne_class;
int ap_ne_op_ch;
int ap_set_bssidpref;
int ap_btmreq_disassoc_imnt;
int ap_btmreq_term_bit;
int ap_disassoc_timer;
int ap_btmreq_bss_term_dur;
enum reg_domain {
REG_DOMAIN_NOT_SET,
REG_DOMAIN_LOCAL,
REG_DOMAIN_GLOBAL
} ap_reg_domain;
char ap_mobility_domain[10];
unsigned char ap_cell_cap_pref;
int ap_ft_oa;
enum value_not_set_enabled_disabled ap_ft_ds;
int ap_name;
int ap_interface_5g;
int ap_interface_2g;
int ap_assoc_delay;
int ap_btmreq_bss_term_tsf;
int ap_fils_dscv_int;
int ap_nairealm_int;
char ap_nairealm[33];
int ap_blechanutil;
int ap_ble_admit_cap;
int ap_datappdudura;
int ap_airtimefract;
char ap_dhcpserv_ipaddr[20];
int ap_dhcp_stop;
int ap_bawinsize;
int ap_blestacnt;
int ap_ul_availcap;
int ap_dl_availcap;
int ap_akm;
unsigned int ap_akm_values;
int ap_pmksa;
int ap_pmksa_caching;
int ap_beacon_prot;
u8 ap_transition_disable;
int ap_80plus80;
int ap_oper_chn;
struct mbo_pref_ap mbo_pref_aps[MBO_MAX_PREF_BSSIDS];
struct mbo_pref_ap mbo_self_ap_tuple;
int mbo_pref_ap_cnt;
unsigned char ft_bss_mac_list[MAX_FT_BSS_LIST][ETH_ALEN];
int ft_bss_mac_cnt;
char *ar_ltf;
int ap_numsounddim;
unsigned int he_mcsnssmap;
int he_ul_mcs;
int he_mmss;
int he_srctrl_allow;
int ap_ocvc;
enum value_not_set_enabled_disabled ap_oce;
enum value_not_set_enabled_disabled ap_filsdscv;
enum value_not_set_enabled_disabled ap_filshlp;
enum value_not_set_enabled_disabled ap_broadcast_ssid;
enum value_not_set_enabled_disabled ap_rnr;
enum value_not_set_enabled_disabled ap_esp;
enum value_not_set_enabled_disabled ap_he_ulofdma;
enum value_not_set_enabled_disabled ap_he_dlofdma;
enum value_not_set_enabled_disabled ap_bcc;
enum value_not_set_enabled_disabled ap_he_frag;
enum value_not_set_enabled_disabled ap_mu_edca;
enum value_not_set_enabled_disabled ap_he_rtsthrshld;
enum value_not_set_enabled_disabled ap_mbssid;
enum value_not_set_enabled_disabled ap_twtresp;
enum value_not_set_enabled_disabled he_sounding;
enum value_not_set_enabled_disabled he_set_sta_1x1;
enum ppdu {
PPDU_NOT_SET,
PPDU_MU,
PPDU_SU,
PPDU_ER,
PPDU_TB,
PPDU_HESU,
} ap_he_ppdu;
enum bufsize {
BA_BUFSIZE_NOT_SET,
BA_BUFSIZE_64,
BA_BUFSIZE_256,
} ap_ba_bufsize;
enum mimo {
MIMO_NOT_SET,
MIMO_DL,
MIMO_UL,
} ap_he_mimo;
struct sigma_ese_alloc ap_ese_allocs[MAX_ESE_ALLOCS];
int ap_num_ese_allocs;
const char *hostapd_debug_log;
const char *wpa_supplicant_debug_log;
#ifdef CONFIG_TRAFFIC_AGENT
/* Traffic Agent */
struct sigma_stream streams[MAX_SIGMA_STREAMS];
int stream_id;
int num_streams;
pthread_t thr;
#endif /* CONFIG_TRAFFIC_AGENT */
unsigned int throughput_pktsize; /* If non-zero, override pktsize for
* throughput tests */
int no_timestamps;
const char *sniffer_ifname;
const char *set_macaddr;
int tmp_mac_addr;
int ap_is_dual;
enum ap_mode ap_mode_1;
enum ap_chwidth ap_chwidth_1;
int ap_channel_1;
char ap_countrycode[3];
int ap_wpsnfc;
enum ap_wme {
AP_WME_OFF,
AP_WME_ON,
} ap_wme;
enum ap_wmmps {
AP_WMMPS_OFF,
AP_WMMPS_ON,
} ap_wmmps;
enum sec_ch_offset ap_chwidth_offset;
char *ap_dpp_conf_addr;
char *ap_dpp_conf_pkhash;
#ifdef CONFIG_SNIFFER
pid_t sniffer_pid;
char sniffer_filename[200];
#endif /* CONFIG_SNIFFER */
int last_set_ip_config_ipv6;
#ifdef MIRACAST
pthread_t rtsp_thread_handle;
int wfd_device_type; /* 0 for source, 1 for sink */
char peer_mac_address[32];
char modified_peer_mac_address[32];
void *miracast_lib;
const char *miracast_lib_path;
char mdns_instance_name[64];
#endif /* MIRACAST */
int tid_to_handle[8]; /* Mapping of TID to handle */
int dialog_token; /* Used for generating unique handle for an addTs */
enum sigma_program {
PROGRAM_UNKNOWN = 0,
PROGRAM_TDLS,
PROGRAM_HS2,
PROGRAM_HS2_R2,
PROGRAM_WFD,
PROGRAM_DISPLAYR2,
PROGRAM_PMF,
PROGRAM_WPS,
PROGRAM_60GHZ,
PROGRAM_HT,
PROGRAM_VHT,
PROGRAM_NAN,
PROGRAM_LOC,
PROGRAM_MBO,
PROGRAM_IOTLP,
PROGRAM_DPP,
PROGRAM_OCE,
PROGRAM_WPA3,
PROGRAM_HE,
PROGRAM_HS2_R3,
PROGRAM_QM,
} program;
enum device_type {
device_type_unknown,
AP_unknown,
AP_testbed,
AP_dut,
STA_unknown,
STA_testbed,
STA_dut
} device_type;
enum {
DEVROLE_UNKNOWN = 0,
DEVROLE_STA,
DEVROLE_PCP,
DEVROLE_STA_CFON,
DEVROLE_AP,
} dev_role;
enum wps_band {
WPS_BAND_NON_60G = 0,
WPS_BAND_60G,
} band;
int wps_disable; /* Used for 60G to disable PCP from sending WPS IE */
int wsc_fragment; /* simulate WSC IE fragmentation */
int eap_fragment; /* simulate EAP fragmentation */
int wps_forced_version; /* Used to force reported WPS version */
enum {
/* no change */
FORCE_RSN_IE_NONE = 0,
/* if exists, remove and clear privacy bit */
FORCE_RSN_IE_REMOVE,
/* if not exists, add and set privacy bit */
FORCE_RSN_IE_ADD,
} force_rsn_ie; /* override RSN IE in association request */
const char *version;
int no_ip_addr_set;
int sta_channel;
const char *summary_log;
const char *hostapd_entropy_log;
int iface_down_on_reset;
int write_stats; /* traffic stream e2e*.txt files */
int sim_no_username; /* do not set SIM username to use real SIM */
const char *vendor_name; /* device_get_info vendor override */
const char *model_name; /* device_get_info model override */
const char *version_name; /* device_get_info version override */
const char *log_file_dir; /* Directory to generate log file */
FILE *log_file_fd; /* Pointer to log file */
int ndp_enable; /* Flag which is set once the NDP is setup */
int ndpe; /* Flag indicating NDPE is supported */
u16 trans_port; /* transport port number for TCP/UDP connection */
u8 trans_proto; /* transport protocol, 0x06: TCP, 0x11: UDP */
u8 nan_ipv6_addr[IPV6_ADDR_LEN]; /* NAN IPv6 address */
u8 nan_ipv6_len; /* NAN IPv6 address length */
/* Length of nan_pmk in octets */
u8 nan_pmk_len;
/*
* PMK: Info is optional in Discovery phase. PMK info can
* be passed during the NDP session.
*/
u8 nan_pmk[32];
enum value_not_set_enabled_disabled wnm_bss_max_feature;
int wnm_bss_max_idle_time;
enum value_not_set_enabled_disabled wnm_bss_max_protection;
char *non_pref_ch_list; /* MBO: non-preferred channel report */
char *btm_query_cand_list; /* Candidate list for BTM Query */
char *sae_commit_override;
char *rsne_override;
char *rsnxe_override_eapol;
int sta_associate_wait_connect;
char server_cert_hash[65];
int server_cert_tod;
int sta_tod_policy;
const char *hostapd_bin;
int use_hostapd_pid_file;
const char *hostapd_ifname;
int hostapd_running;
char *dpp_peer_uri;
int dpp_local_bootstrap;
int dpp_conf_id;
int dpp_network_id;
u8 fils_hlp;
pthread_t hlp_thread;
#ifdef NL80211_SUPPORT
struct nl80211_ctx *nl_ctx;
int config_rsnie;
#endif /* NL80211_SUPPORT */
int sta_nss;
int sta_async_twt_supp; /* Asynchronous TWT response event support */
#ifdef ANDROID
int nanservicediscoveryinprogress;