ap_config.h 17 KB

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