ap_config.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726
  1. /*
  2. * hostapd / Configuration definitions and helpers functions
  3. * Copyright (c) 2003-2015, 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. #ifndef HOSTAPD_CONFIG_H
  9. #define HOSTAPD_CONFIG_H
  10. #include "common/defs.h"
  11. #include "utils/list.h"
  12. #include "ip_addr.h"
  13. #include "common/wpa_common.h"
  14. #include "common/ieee802_11_defs.h"
  15. #include "common/ieee802_11_common.h"
  16. #include "wps/wps.h"
  17. #include "fst/fst.h"
  18. #include "vlan.h"
  19. /**
  20. * mesh_conf - local MBSS state and settings
  21. */
  22. struct mesh_conf {
  23. u8 meshid[32];
  24. u8 meshid_len;
  25. /* Active Path Selection Protocol Identifier */
  26. u8 mesh_pp_id;
  27. /* Active Path Selection Metric Identifier */
  28. u8 mesh_pm_id;
  29. /* Congestion Control Mode Identifier */
  30. u8 mesh_cc_id;
  31. /* Synchronization Protocol Identifier */
  32. u8 mesh_sp_id;
  33. /* Authentication Protocol Identifier */
  34. u8 mesh_auth_id;
  35. u8 *rsn_ie;
  36. int rsn_ie_len;
  37. #define MESH_CONF_SEC_NONE BIT(0)
  38. #define MESH_CONF_SEC_AUTH BIT(1)
  39. #define MESH_CONF_SEC_AMPE BIT(2)
  40. unsigned int security;
  41. int dot11MeshMaxRetries;
  42. int dot11MeshRetryTimeout; /* msec */
  43. int dot11MeshConfirmTimeout; /* msec */
  44. int dot11MeshHoldingTimeout; /* msec */
  45. };
  46. #define MAX_STA_COUNT 2007
  47. #define MAX_VLAN_ID 4094
  48. typedef u8 macaddr[ETH_ALEN];
  49. struct mac_acl_entry {
  50. macaddr addr;
  51. struct vlan_description vlan_id;
  52. };
  53. struct hostapd_radius_servers;
  54. struct ft_remote_r0kh;
  55. struct ft_remote_r1kh;
  56. #define NUM_WEP_KEYS 4
  57. struct hostapd_wep_keys {
  58. u8 idx;
  59. u8 *key[NUM_WEP_KEYS];
  60. size_t len[NUM_WEP_KEYS];
  61. int keys_set;
  62. size_t default_len; /* key length used for dynamic key generation */
  63. };
  64. typedef enum hostap_security_policy {
  65. SECURITY_PLAINTEXT = 0,
  66. SECURITY_STATIC_WEP = 1,
  67. SECURITY_IEEE_802_1X = 2,
  68. SECURITY_WPA_PSK = 3,
  69. SECURITY_WPA = 4,
  70. SECURITY_OSEN = 5
  71. } secpolicy;
  72. struct hostapd_ssid {
  73. u8 ssid[SSID_MAX_LEN];
  74. size_t ssid_len;
  75. unsigned int ssid_set:1;
  76. unsigned int utf8_ssid:1;
  77. unsigned int wpa_passphrase_set:1;
  78. unsigned int wpa_psk_set:1;
  79. char vlan[IFNAMSIZ + 1];
  80. secpolicy security_policy;
  81. struct hostapd_wpa_psk *wpa_psk;
  82. char *wpa_passphrase;
  83. char *wpa_psk_file;
  84. struct hostapd_wep_keys wep;
  85. #define DYNAMIC_VLAN_DISABLED 0
  86. #define DYNAMIC_VLAN_OPTIONAL 1
  87. #define DYNAMIC_VLAN_REQUIRED 2
  88. int dynamic_vlan;
  89. #define DYNAMIC_VLAN_NAMING_WITHOUT_DEVICE 0
  90. #define DYNAMIC_VLAN_NAMING_WITH_DEVICE 1
  91. #define DYNAMIC_VLAN_NAMING_END 2
  92. int vlan_naming;
  93. int per_sta_vif;
  94. #ifdef CONFIG_FULL_DYNAMIC_VLAN
  95. char *vlan_tagged_interface;
  96. #endif /* CONFIG_FULL_DYNAMIC_VLAN */
  97. };
  98. #define VLAN_ID_WILDCARD -1
  99. struct hostapd_vlan {
  100. struct hostapd_vlan *next;
  101. int vlan_id; /* VLAN ID or -1 (VLAN_ID_WILDCARD) for wildcard entry */
  102. struct vlan_description vlan_desc;
  103. char ifname[IFNAMSIZ + 1];
  104. int configured;
  105. int dynamic_vlan;
  106. #ifdef CONFIG_FULL_DYNAMIC_VLAN
  107. #define DVLAN_CLEAN_WLAN_PORT 0x8
  108. int clean;
  109. #endif /* CONFIG_FULL_DYNAMIC_VLAN */
  110. };
  111. #define PMK_LEN 32
  112. #define MIN_PASSPHRASE_LEN 8
  113. #define MAX_PASSPHRASE_LEN 63
  114. struct hostapd_sta_wpa_psk_short {
  115. struct hostapd_sta_wpa_psk_short *next;
  116. unsigned int is_passphrase:1;
  117. u8 psk[PMK_LEN];
  118. char passphrase[MAX_PASSPHRASE_LEN + 1];
  119. int ref; /* (number of references held) - 1 */
  120. };
  121. struct hostapd_wpa_psk {
  122. struct hostapd_wpa_psk *next;
  123. int group;
  124. u8 psk[PMK_LEN];
  125. u8 addr[ETH_ALEN];
  126. u8 p2p_dev_addr[ETH_ALEN];
  127. };
  128. struct hostapd_eap_user {
  129. struct hostapd_eap_user *next;
  130. u8 *identity;
  131. size_t identity_len;
  132. struct {
  133. int vendor;
  134. u32 method;
  135. } methods[EAP_MAX_METHODS];
  136. u8 *password;
  137. size_t password_len;
  138. int phase2;
  139. int force_version;
  140. unsigned int wildcard_prefix:1;
  141. unsigned int password_hash:1; /* whether password is hashed with
  142. * nt_password_hash() */
  143. unsigned int remediation:1;
  144. unsigned int macacl:1;
  145. int ttls_auth; /* EAP_TTLS_AUTH_* bitfield */
  146. struct hostapd_radius_attr *accept_attr;
  147. };
  148. struct hostapd_radius_attr {
  149. u8 type;
  150. struct wpabuf *val;
  151. struct hostapd_radius_attr *next;
  152. };
  153. #define NUM_TX_QUEUES 4
  154. struct hostapd_tx_queue_params {
  155. int aifs;
  156. int cwmin;
  157. int cwmax;
  158. int burst; /* maximum burst time in 0.1 ms, i.e., 10 = 1 ms */
  159. };
  160. #define MAX_ROAMING_CONSORTIUM_LEN 15
  161. struct hostapd_roaming_consortium {
  162. u8 len;
  163. u8 oi[MAX_ROAMING_CONSORTIUM_LEN];
  164. };
  165. struct hostapd_lang_string {
  166. u8 lang[3];
  167. u8 name_len;
  168. u8 name[252];
  169. };
  170. #define MAX_NAI_REALMS 10
  171. #define MAX_NAI_REALMLEN 255
  172. #define MAX_NAI_EAP_METHODS 5
  173. #define MAX_NAI_AUTH_TYPES 4
  174. struct hostapd_nai_realm_data {
  175. u8 encoding;
  176. char realm_buf[MAX_NAI_REALMLEN + 1];
  177. char *realm[MAX_NAI_REALMS];
  178. u8 eap_method_count;
  179. struct hostapd_nai_realm_eap {
  180. u8 eap_method;
  181. u8 num_auths;
  182. u8 auth_id[MAX_NAI_AUTH_TYPES];
  183. u8 auth_val[MAX_NAI_AUTH_TYPES];
  184. } eap_method[MAX_NAI_EAP_METHODS];
  185. };
  186. struct anqp_element {
  187. struct dl_list list;
  188. u16 infoid;
  189. struct wpabuf *payload;
  190. };
  191. /**
  192. * struct hostapd_bss_config - Per-BSS configuration
  193. */
  194. struct hostapd_bss_config {
  195. char iface[IFNAMSIZ + 1];
  196. char bridge[IFNAMSIZ + 1];
  197. char vlan_bridge[IFNAMSIZ + 1];
  198. char wds_bridge[IFNAMSIZ + 1];
  199. enum hostapd_logger_level logger_syslog_level, logger_stdout_level;
  200. unsigned int logger_syslog; /* module bitfield */
  201. unsigned int logger_stdout; /* module bitfield */
  202. int max_num_sta; /* maximum number of STAs in station table */
  203. int dtim_period;
  204. int bss_load_update_period;
  205. int ieee802_1x; /* use IEEE 802.1X */
  206. int eapol_version;
  207. int eap_server; /* Use internal EAP server instead of external
  208. * RADIUS server */
  209. struct hostapd_eap_user *eap_user;
  210. char *eap_user_sqlite;
  211. char *eap_sim_db;
  212. unsigned int eap_sim_db_timeout;
  213. int eap_server_erp; /* Whether ERP is enabled on internal EAP server */
  214. struct hostapd_ip_addr own_ip_addr;
  215. char *nas_identifier;
  216. struct hostapd_radius_servers *radius;
  217. int acct_interim_interval;
  218. int radius_request_cui;
  219. struct hostapd_radius_attr *radius_auth_req_attr;
  220. struct hostapd_radius_attr *radius_acct_req_attr;
  221. int radius_das_port;
  222. unsigned int radius_das_time_window;
  223. int radius_das_require_event_timestamp;
  224. struct hostapd_ip_addr radius_das_client_addr;
  225. u8 *radius_das_shared_secret;
  226. size_t radius_das_shared_secret_len;
  227. struct hostapd_ssid ssid;
  228. char *eap_req_id_text; /* optional displayable message sent with
  229. * EAP Request-Identity */
  230. size_t eap_req_id_text_len;
  231. int eapol_key_index_workaround;
  232. size_t default_wep_key_len;
  233. int individual_wep_key_len;
  234. int wep_rekeying_period;
  235. int broadcast_key_idx_min, broadcast_key_idx_max;
  236. int eap_reauth_period;
  237. int erp_send_reauth_start;
  238. char *erp_domain;
  239. int ieee802_11f; /* use IEEE 802.11f (IAPP) */
  240. char iapp_iface[IFNAMSIZ + 1]; /* interface used with IAPP broadcast
  241. * frames */
  242. enum {
  243. ACCEPT_UNLESS_DENIED = 0,
  244. DENY_UNLESS_ACCEPTED = 1,
  245. USE_EXTERNAL_RADIUS_AUTH = 2
  246. } macaddr_acl;
  247. struct mac_acl_entry *accept_mac;
  248. int num_accept_mac;
  249. struct mac_acl_entry *deny_mac;
  250. int num_deny_mac;
  251. int wds_sta;
  252. int isolate;
  253. int start_disabled;
  254. int auth_algs; /* bitfield of allowed IEEE 802.11 authentication
  255. * algorithms, WPA_AUTH_ALG_{OPEN,SHARED,LEAP} */
  256. int wpa; /* bitfield of WPA_PROTO_WPA, WPA_PROTO_RSN */
  257. int wpa_key_mgmt;
  258. #ifdef CONFIG_IEEE80211W
  259. enum mfp_options ieee80211w;
  260. int group_mgmt_cipher;
  261. /* dot11AssociationSAQueryMaximumTimeout (in TUs) */
  262. unsigned int assoc_sa_query_max_timeout;
  263. /* dot11AssociationSAQueryRetryTimeout (in TUs) */
  264. int assoc_sa_query_retry_timeout;
  265. #endif /* CONFIG_IEEE80211W */
  266. enum {
  267. PSK_RADIUS_IGNORED = 0,
  268. PSK_RADIUS_ACCEPTED = 1,
  269. PSK_RADIUS_REQUIRED = 2
  270. } wpa_psk_radius;
  271. int wpa_pairwise;
  272. int wpa_group;
  273. int wpa_group_rekey;
  274. int wpa_strict_rekey;
  275. int wpa_gmk_rekey;
  276. int wpa_ptk_rekey;
  277. int rsn_pairwise;
  278. int rsn_preauth;
  279. char *rsn_preauth_interfaces;
  280. int peerkey;
  281. #ifdef CONFIG_IEEE80211R
  282. /* IEEE 802.11r - Fast BSS Transition */
  283. u8 mobility_domain[MOBILITY_DOMAIN_ID_LEN];
  284. u8 r1_key_holder[FT_R1KH_ID_LEN];
  285. u32 r0_key_lifetime;
  286. u32 reassociation_deadline;
  287. struct ft_remote_r0kh *r0kh_list;
  288. struct ft_remote_r1kh *r1kh_list;
  289. int pmk_r1_push;
  290. int ft_over_ds;
  291. #endif /* CONFIG_IEEE80211R */
  292. char *ctrl_interface; /* directory for UNIX domain sockets */
  293. #ifndef CONFIG_NATIVE_WINDOWS
  294. gid_t ctrl_interface_gid;
  295. #endif /* CONFIG_NATIVE_WINDOWS */
  296. int ctrl_interface_gid_set;
  297. char *ca_cert;
  298. char *server_cert;
  299. char *private_key;
  300. char *private_key_passwd;
  301. int check_crl;
  302. unsigned int tls_session_lifetime;
  303. char *ocsp_stapling_response;
  304. char *ocsp_stapling_response_multi;
  305. char *dh_file;
  306. char *openssl_ciphers;
  307. u8 *pac_opaque_encr_key;
  308. u8 *eap_fast_a_id;
  309. size_t eap_fast_a_id_len;
  310. char *eap_fast_a_id_info;
  311. int eap_fast_prov;
  312. int pac_key_lifetime;
  313. int pac_key_refresh_time;
  314. int eap_sim_aka_result_ind;
  315. int tnc;
  316. int fragment_size;
  317. u16 pwd_group;
  318. char *radius_server_clients;
  319. int radius_server_auth_port;
  320. int radius_server_acct_port;
  321. int radius_server_ipv6;
  322. int use_pae_group_addr; /* Whether to send EAPOL frames to PAE group
  323. * address instead of individual address
  324. * (for driver_wired.c).
  325. */
  326. int ap_max_inactivity;
  327. int ignore_broadcast_ssid;
  328. int no_probe_resp_if_max_sta;
  329. int wmm_enabled;
  330. int wmm_uapsd;
  331. struct hostapd_vlan *vlan;
  332. macaddr bssid;
  333. /*
  334. * Maximum listen interval that STAs can use when associating with this
  335. * BSS. If a STA tries to use larger value, the association will be
  336. * denied with status code 51.
  337. */
  338. u16 max_listen_interval;
  339. int disable_pmksa_caching;
  340. int okc; /* Opportunistic Key Caching */
  341. int wps_state;
  342. #ifdef CONFIG_WPS
  343. int wps_independent;
  344. int ap_setup_locked;
  345. u8 uuid[16];
  346. char *wps_pin_requests;
  347. char *device_name;
  348. char *manufacturer;
  349. char *model_name;
  350. char *model_number;
  351. char *serial_number;
  352. u8 device_type[WPS_DEV_TYPE_LEN];
  353. char *config_methods;
  354. u8 os_version[4];
  355. char *ap_pin;
  356. int skip_cred_build;
  357. u8 *extra_cred;
  358. size_t extra_cred_len;
  359. int wps_cred_processing;
  360. int force_per_enrollee_psk;
  361. u8 *ap_settings;
  362. size_t ap_settings_len;
  363. char *upnp_iface;
  364. char *friendly_name;
  365. char *manufacturer_url;
  366. char *model_description;
  367. char *model_url;
  368. char *upc;
  369. struct wpabuf *wps_vendor_ext[MAX_WPS_VENDOR_EXTENSIONS];
  370. int wps_nfc_pw_from_config;
  371. int wps_nfc_dev_pw_id;
  372. struct wpabuf *wps_nfc_dh_pubkey;
  373. struct wpabuf *wps_nfc_dh_privkey;
  374. struct wpabuf *wps_nfc_dev_pw;
  375. #endif /* CONFIG_WPS */
  376. int pbc_in_m1;
  377. char *server_id;
  378. #define P2P_ENABLED BIT(0)
  379. #define P2P_GROUP_OWNER BIT(1)
  380. #define P2P_GROUP_FORMATION BIT(2)
  381. #define P2P_MANAGE BIT(3)
  382. #define P2P_ALLOW_CROSS_CONNECTION BIT(4)
  383. int p2p;
  384. #ifdef CONFIG_P2P
  385. u8 ip_addr_go[4];
  386. u8 ip_addr_mask[4];
  387. u8 ip_addr_start[4];
  388. u8 ip_addr_end[4];
  389. #endif /* CONFIG_P2P */
  390. int disassoc_low_ack;
  391. int skip_inactivity_poll;
  392. #define TDLS_PROHIBIT BIT(0)
  393. #define TDLS_PROHIBIT_CHAN_SWITCH BIT(1)
  394. int tdls;
  395. int disable_11n;
  396. int disable_11ac;
  397. /* IEEE 802.11v */
  398. int time_advertisement;
  399. char *time_zone;
  400. int wnm_sleep_mode;
  401. int bss_transition;
  402. /* IEEE 802.11u - Interworking */
  403. int interworking;
  404. int access_network_type;
  405. int internet;
  406. int asra;
  407. int esr;
  408. int uesa;
  409. int venue_info_set;
  410. u8 venue_group;
  411. u8 venue_type;
  412. u8 hessid[ETH_ALEN];
  413. /* IEEE 802.11u - Roaming Consortium list */
  414. unsigned int roaming_consortium_count;
  415. struct hostapd_roaming_consortium *roaming_consortium;
  416. /* IEEE 802.11u - Venue Name duples */
  417. unsigned int venue_name_count;
  418. struct hostapd_lang_string *venue_name;
  419. /* IEEE 802.11u - Network Authentication Type */
  420. u8 *network_auth_type;
  421. size_t network_auth_type_len;
  422. /* IEEE 802.11u - IP Address Type Availability */
  423. u8 ipaddr_type_availability;
  424. u8 ipaddr_type_configured;
  425. /* IEEE 802.11u - 3GPP Cellular Network */
  426. u8 *anqp_3gpp_cell_net;
  427. size_t anqp_3gpp_cell_net_len;
  428. /* IEEE 802.11u - Domain Name */
  429. u8 *domain_name;
  430. size_t domain_name_len;
  431. unsigned int nai_realm_count;
  432. struct hostapd_nai_realm_data *nai_realm_data;
  433. struct dl_list anqp_elem; /* list of struct anqp_element */
  434. u16 gas_comeback_delay;
  435. int gas_frag_limit;
  436. u8 qos_map_set[16 + 2 * 21];
  437. unsigned int qos_map_set_len;
  438. int osen;
  439. int proxy_arp;
  440. int na_mcast_to_ucast;
  441. #ifdef CONFIG_HS20
  442. int hs20;
  443. int disable_dgaf;
  444. u16 anqp_domain_id;
  445. unsigned int hs20_oper_friendly_name_count;
  446. struct hostapd_lang_string *hs20_oper_friendly_name;
  447. u8 *hs20_wan_metrics;
  448. u8 *hs20_connection_capability;
  449. size_t hs20_connection_capability_len;
  450. u8 *hs20_operating_class;
  451. u8 hs20_operating_class_len;
  452. struct hs20_icon {
  453. u16 width;
  454. u16 height;
  455. char language[3];
  456. char type[256];
  457. char name[256];
  458. char file[256];
  459. } *hs20_icons;
  460. size_t hs20_icons_count;
  461. u8 osu_ssid[SSID_MAX_LEN];
  462. size_t osu_ssid_len;
  463. struct hs20_osu_provider {
  464. unsigned int friendly_name_count;
  465. struct hostapd_lang_string *friendly_name;
  466. char *server_uri;
  467. int *method_list;
  468. char **icons;
  469. size_t icons_count;
  470. char *osu_nai;
  471. unsigned int service_desc_count;
  472. struct hostapd_lang_string *service_desc;
  473. } *hs20_osu_providers, *last_osu;
  474. size_t hs20_osu_providers_count;
  475. unsigned int hs20_deauth_req_timeout;
  476. char *subscr_remediation_url;
  477. u8 subscr_remediation_method;
  478. #endif /* CONFIG_HS20 */
  479. u8 wps_rf_bands; /* RF bands for WPS (WPS_RF_*) */
  480. #ifdef CONFIG_RADIUS_TEST
  481. char *dump_msk_file;
  482. #endif /* CONFIG_RADIUS_TEST */
  483. struct wpabuf *vendor_elements;
  484. unsigned int sae_anti_clogging_threshold;
  485. int *sae_groups;
  486. char *wowlan_triggers; /* Wake-on-WLAN triggers */
  487. #ifdef CONFIG_TESTING_OPTIONS
  488. u8 bss_load_test[5];
  489. u8 bss_load_test_set;
  490. struct wpabuf *own_ie_override;
  491. #endif /* CONFIG_TESTING_OPTIONS */
  492. #define MESH_ENABLED BIT(0)
  493. int mesh;
  494. int radio_measurements;
  495. int vendor_vht;
  496. char *no_probe_resp_if_seen_on;
  497. char *no_auth_if_seen_on;
  498. int pbss;
  499. #ifdef CONFIG_MBO
  500. int mbo_enabled;
  501. #endif /* CONFIG_MBO */
  502. };
  503. /**
  504. * struct hostapd_config - Per-radio interface configuration
  505. */
  506. struct hostapd_config {
  507. struct hostapd_bss_config **bss, *last_bss;
  508. size_t num_bss;
  509. u16 beacon_int;
  510. int rts_threshold;
  511. int fragm_threshold;
  512. u8 send_probe_response;
  513. u8 channel;
  514. u8 acs;
  515. struct wpa_freq_range_list acs_ch_list;
  516. enum hostapd_hw_mode hw_mode; /* HOSTAPD_MODE_IEEE80211A, .. */
  517. enum {
  518. LONG_PREAMBLE = 0,
  519. SHORT_PREAMBLE = 1
  520. } preamble;
  521. int *supported_rates;
  522. int *basic_rates;
  523. const struct wpa_driver_ops *driver;
  524. char *driver_params;
  525. int ap_table_max_size;
  526. int ap_table_expiration_time;
  527. unsigned int track_sta_max_num;
  528. unsigned int track_sta_max_age;
  529. char country[3]; /* first two octets: country code as described in
  530. * ISO/IEC 3166-1. Third octet:
  531. * ' ' (ascii 32): all environments
  532. * 'O': Outdoor environemnt only
  533. * 'I': Indoor environment only
  534. */
  535. int ieee80211d;
  536. int ieee80211h; /* DFS */
  537. /*
  538. * Local power constraint is an octet encoded as an unsigned integer in
  539. * units of decibels. Invalid value -1 indicates that Power Constraint
  540. * element will not be added.
  541. */
  542. int local_pwr_constraint;
  543. /* Control Spectrum Management bit */
  544. int spectrum_mgmt_required;
  545. struct hostapd_tx_queue_params tx_queue[NUM_TX_QUEUES];
  546. /*
  547. * WMM AC parameters, in same order as 802.1D, i.e.
  548. * 0 = BE (best effort)
  549. * 1 = BK (background)
  550. * 2 = VI (video)
  551. * 3 = VO (voice)
  552. */
  553. struct hostapd_wmm_ac_params wmm_ac_params[4];
  554. int ht_op_mode_fixed;
  555. u16 ht_capab;
  556. int ieee80211n;
  557. int secondary_channel;
  558. int no_pri_sec_switch;
  559. int require_ht;
  560. int obss_interval;
  561. u32 vht_capab;
  562. int ieee80211ac;
  563. int require_vht;
  564. u8 vht_oper_chwidth;
  565. u8 vht_oper_centr_freq_seg0_idx;
  566. u8 vht_oper_centr_freq_seg1_idx;
  567. /* Use driver-generated interface addresses when adding multiple BSSs */
  568. u8 use_driver_iface_addr;
  569. #ifdef CONFIG_FST
  570. struct fst_iface_cfg fst_cfg;
  571. #endif /* CONFIG_FST */
  572. #ifdef CONFIG_P2P
  573. u8 p2p_go_ctwindow;
  574. #endif /* CONFIG_P2P */
  575. #ifdef CONFIG_TESTING_OPTIONS
  576. double ignore_probe_probability;
  577. double ignore_auth_probability;
  578. double ignore_assoc_probability;
  579. double ignore_reassoc_probability;
  580. double corrupt_gtk_rekey_mic_probability;
  581. int ecsa_ie_only;
  582. #endif /* CONFIG_TESTING_OPTIONS */
  583. #ifdef CONFIG_ACS
  584. unsigned int acs_num_scans;
  585. struct acs_bias {
  586. int channel;
  587. double bias;
  588. } *acs_chan_bias;
  589. unsigned int num_acs_chan_bias;
  590. #endif /* CONFIG_ACS */
  591. struct wpabuf *lci;
  592. struct wpabuf *civic;
  593. };
  594. int hostapd_mac_comp(const void *a, const void *b);
  595. struct hostapd_config * hostapd_config_defaults(void);
  596. void hostapd_config_defaults_bss(struct hostapd_bss_config *bss);
  597. void hostapd_config_free_eap_user(struct hostapd_eap_user *user);
  598. void hostapd_config_clear_wpa_psk(struct hostapd_wpa_psk **p);
  599. void hostapd_config_free_bss(struct hostapd_bss_config *conf);
  600. void hostapd_config_free(struct hostapd_config *conf);
  601. int hostapd_maclist_found(struct mac_acl_entry *list, int num_entries,
  602. const u8 *addr, struct vlan_description *vlan_id);
  603. int hostapd_rate_found(int *list, int rate);
  604. const u8 * hostapd_get_psk(const struct hostapd_bss_config *conf,
  605. const u8 *addr, const u8 *p2p_dev_addr,
  606. const u8 *prev_psk);
  607. int hostapd_setup_wpa_psk(struct hostapd_bss_config *conf);
  608. int hostapd_vlan_valid(struct hostapd_vlan *vlan,
  609. struct vlan_description *vlan_desc);
  610. const char * hostapd_get_vlan_id_ifname(struct hostapd_vlan *vlan,
  611. int vlan_id);
  612. struct hostapd_radius_attr *
  613. hostapd_config_get_radius_attr(struct hostapd_radius_attr *attr, u8 type);
  614. int hostapd_config_check(struct hostapd_config *conf, int full_config);
  615. void hostapd_set_security_params(struct hostapd_bss_config *bss,
  616. int full_config);
  617. #endif /* HOSTAPD_CONFIG_H */