ap_config.h 16 KB

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