ap_config.h 17 KB

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