ap_config.h 17 KB

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