9 #ifndef HOSTAPD_CONFIG_H 10 #define HOSTAPD_CONFIG_H 12 #include "common/defs.h" 13 #include "utils/list.h" 15 #include "common/wpa_common.h" 16 #include "common/ieee802_11_defs.h" 17 #include "common/ieee802_11_common.h" 40 #define MESH_CONF_SEC_NONE BIT(0) 41 #define MESH_CONF_SEC_AUTH BIT(1) 42 #define MESH_CONF_SEC_AMPE BIT(2) 43 unsigned int security;
44 enum mfp_options ieee80211w;
45 unsigned int pairwise_cipher;
46 unsigned int group_cipher;
47 unsigned int mgmt_group_cipher;
48 int dot11MeshMaxRetries;
49 int dot11MeshRetryTimeout;
50 int dot11MeshConfirmTimeout;
51 int dot11MeshHoldingTimeout;
54 #define MAX_STA_COUNT 2007 55 #define MAX_VLAN_ID 4094 57 typedef u8 macaddr[ETH_ALEN];
68 #define NUM_WEP_KEYS 4 71 u8 *key[NUM_WEP_KEYS];
72 size_t len[NUM_WEP_KEYS];
77 typedef enum hostap_security_policy {
78 SECURITY_PLAINTEXT = 0,
79 SECURITY_STATIC_WEP = 1,
80 SECURITY_IEEE_802_1X = 2,
87 u8 ssid[SSID_MAX_LEN];
89 unsigned int ssid_set:1;
90 unsigned int utf8_ssid:1;
91 unsigned int wpa_passphrase_set:1;
92 unsigned int wpa_psk_set:1;
94 char vlan[IFNAMSIZ + 1];
95 secpolicy security_policy;
103 #define DYNAMIC_VLAN_DISABLED 0 104 #define DYNAMIC_VLAN_OPTIONAL 1 105 #define DYNAMIC_VLAN_REQUIRED 2 107 #define DYNAMIC_VLAN_NAMING_WITHOUT_DEVICE 0 108 #define DYNAMIC_VLAN_NAMING_WITH_DEVICE 1 109 #define DYNAMIC_VLAN_NAMING_END 2 112 #ifdef CONFIG_FULL_DYNAMIC_VLAN 113 char *vlan_tagged_interface;
118 #define VLAN_ID_WILDCARD -1 124 char ifname[IFNAMSIZ + 1];
127 #ifdef CONFIG_FULL_DYNAMIC_VLAN 129 #define DVLAN_CLEAN_WLAN_PORT 0x8 135 #define MIN_PASSPHRASE_LEN 8 136 #define MAX_PASSPHRASE_LEN 63 139 unsigned int is_passphrase:1;
141 char passphrase[MAX_PASSPHRASE_LEN + 1];
150 u8 p2p_dev_addr[ETH_ALEN];
160 } methods[EAP_MAX_METHODS];
165 unsigned int wildcard_prefix:1;
166 unsigned int password_hash:1;
168 unsigned int remediation:1;
169 unsigned int macacl:1;
181 #define NUM_TX_QUEUES 4 191 #define MAX_ROAMING_CONSORTIUM_LEN 15 195 u8 oi[MAX_ROAMING_CONSORTIUM_LEN];
204 #define MAX_NAI_REALMS 10 205 #define MAX_NAI_REALMLEN 255 206 #define MAX_NAI_EAP_METHODS 5 207 #define MAX_NAI_AUTH_TYPES 4 210 char realm_buf[MAX_NAI_REALMLEN + 1];
211 char *realm[MAX_NAI_REALMS];
216 u8 auth_id[MAX_NAI_AUTH_TYPES];
217 u8 auth_val[MAX_NAI_AUTH_TYPES];
238 char iface[IFNAMSIZ + 1];
239 char bridge[IFNAMSIZ + 1];
240 char vlan_bridge[IFNAMSIZ + 1];
241 char wds_bridge[IFNAMSIZ + 1];
243 enum hostapd_logger_level logger_syslog_level, logger_stdout_level;
245 unsigned int logger_syslog;
246 unsigned int logger_stdout;
251 int bss_load_update_period;
258 char *eap_user_sqlite;
260 unsigned int eap_sim_db_timeout;
263 char *nas_identifier;
265 int acct_interim_interval;
266 int radius_request_cui;
270 unsigned int radius_das_time_window;
271 int radius_das_require_event_timestamp;
272 int radius_das_require_message_authenticator;
274 u8 *radius_das_shared_secret;
275 size_t radius_das_shared_secret_len;
279 char *eap_req_id_text;
281 size_t eap_req_id_text_len;
282 int eapol_key_index_workaround;
284 size_t default_wep_key_len;
285 int individual_wep_key_len;
286 int wep_rekeying_period;
287 int broadcast_key_idx_min, broadcast_key_idx_max;
288 int eap_reauth_period;
289 int erp_send_reauth_start;
293 char iapp_iface[IFNAMSIZ + 1];
297 ACCEPT_UNLESS_DENIED = 0,
298 DENY_UNLESS_ACCEPTED = 1,
299 USE_EXTERNAL_RADIUS_AUTH = 2
314 #ifdef CONFIG_IEEE80211W 315 enum mfp_options ieee80211w;
316 int group_mgmt_cipher;
318 unsigned int assoc_sa_query_max_timeout;
320 int assoc_sa_query_retry_timeout;
323 PSK_RADIUS_IGNORED = 0,
324 PSK_RADIUS_ACCEPTED = 1,
325 PSK_RADIUS_REQUIRED = 2
330 int wpa_strict_rekey;
335 char *rsn_preauth_interfaces;
338 #ifdef CONFIG_IEEE80211R_AP 340 u8 mobility_domain[MOBILITY_DOMAIN_ID_LEN];
341 u8 r1_key_holder[FT_R1KH_ID_LEN];
343 u32 reassociation_deadline;
348 int ft_psk_generate_local;
351 char *ctrl_interface;
352 #ifndef CONFIG_NATIVE_WINDOWS 353 gid_t ctrl_interface_gid;
355 int ctrl_interface_gid_set;
360 char *private_key_passwd;
362 unsigned int tls_session_lifetime;
363 char *ocsp_stapling_response;
364 char *ocsp_stapling_response_multi;
366 char *openssl_ciphers;
367 u8 *pac_opaque_encr_key;
369 size_t eap_fast_a_id_len;
370 char *eap_fast_a_id_info;
372 int pac_key_lifetime;
373 int pac_key_refresh_time;
374 int eap_sim_aka_result_ind;
379 char *radius_server_clients;
380 int radius_server_auth_port;
381 int radius_server_acct_port;
382 int radius_server_ipv6;
384 int use_pae_group_addr;
389 int ap_max_inactivity;
390 int ignore_broadcast_ssid;
391 int no_probe_resp_if_max_sta;
405 u16 max_listen_interval;
407 int disable_pmksa_caching;
415 char *wps_pin_requests;
421 u8 device_type[WPS_DEV_TYPE_LEN];
422 char *config_methods;
427 size_t extra_cred_len;
428 int wps_cred_processing;
429 int force_per_enrollee_psk;
431 size_t ap_settings_len;
434 char *manufacturer_url;
435 char *model_description;
438 struct wpabuf *wps_vendor_ext[MAX_WPS_VENDOR_EXTENSIONS];
439 int wps_nfc_pw_from_config;
440 int wps_nfc_dev_pw_id;
441 struct wpabuf *wps_nfc_dh_pubkey;
442 struct wpabuf *wps_nfc_dh_privkey;
443 struct wpabuf *wps_nfc_dev_pw;
448 #define P2P_ENABLED BIT(0) 449 #define P2P_GROUP_OWNER BIT(1) 450 #define P2P_GROUP_FORMATION BIT(2) 451 #define P2P_MANAGE BIT(3) 452 #define P2P_ALLOW_CROSS_CONNECTION BIT(4) 461 int disassoc_low_ack;
462 int skip_inactivity_poll;
464 #define TDLS_PROHIBIT BIT(0) 465 #define TDLS_PROHIBIT_CHAN_SWITCH BIT(1) 471 int time_advertisement;
478 int access_network_type;
489 unsigned int roaming_consortium_count;
493 unsigned int venue_name_count;
497 u8 *network_auth_type;
498 size_t network_auth_type_len;
501 u8 ipaddr_type_availability;
502 u8 ipaddr_type_configured;
505 u8 *anqp_3gpp_cell_net;
506 size_t anqp_3gpp_cell_net_len;
510 size_t domain_name_len;
512 unsigned int nai_realm_count;
517 u16 gas_comeback_delay;
518 size_t gas_frag_limit;
521 u8 qos_map_set[16 + 2 * 21];
522 unsigned int qos_map_set_len;
526 int na_mcast_to_ucast;
531 unsigned int hs20_oper_friendly_name_count;
533 u8 *hs20_wan_metrics;
534 u8 *hs20_connection_capability;
535 size_t hs20_connection_capability_len;
536 u8 *hs20_operating_class;
537 u8 hs20_operating_class_len;
546 size_t hs20_icons_count;
547 u8 osu_ssid[SSID_MAX_LEN];
549 struct hs20_osu_provider {
550 unsigned int friendly_name_count;
557 unsigned int service_desc_count;
559 } *hs20_osu_providers, *last_osu;
560 size_t hs20_osu_providers_count;
561 unsigned int hs20_deauth_req_timeout;
562 char *subscr_remediation_url;
563 u8 subscr_remediation_method;
568 #ifdef CONFIG_RADIUS_TEST 572 struct wpabuf *vendor_elements;
573 struct wpabuf *assocresp_elements;
575 unsigned int sae_anti_clogging_threshold;
580 #ifdef CONFIG_TESTING_OPTIONS 582 u8 bss_load_test_set;
583 struct wpabuf *own_ie_override;
586 #define MESH_ENABLED BIT(0) 589 u8 radio_measurements[RRM_CAPABILITIES_IE_LEN];
594 char *no_probe_resp_if_seen_on;
595 char *no_auth_if_seen_on;
607 u8 fils_cache_id[FILS_CACHE_ID_LEN];
608 int fils_cache_id_set;
612 int multicast_to_unicast;
626 u8 send_probe_response;
630 enum hostapd_hw_mode hw_mode;
636 int *supported_rates;
638 unsigned int beacon_rate;
639 enum beacon_rate_type rate_type;
644 int ap_table_max_size;
645 int ap_table_expiration_time;
647 unsigned int track_sta_max_num;
648 unsigned int track_sta_max_age;
666 int local_pwr_constraint;
669 int spectrum_mgmt_required;
682 int ht_op_mode_fixed;
685 int secondary_channel;
686 int no_pri_sec_switch;
693 u8 vht_oper_centr_freq_seg0_idx;
694 u8 vht_oper_centr_freq_seg1_idx;
697 u8 use_driver_iface_addr;
700 struct fst_iface_cfg fst_cfg;
707 #ifdef CONFIG_TESTING_OPTIONS 708 double ignore_probe_probability;
709 double ignore_auth_probability;
710 double ignore_assoc_probability;
711 double ignore_reassoc_probability;
712 double corrupt_gtk_rekey_mic_probability;
717 unsigned int acs_num_scans;
722 unsigned int num_acs_chan_bias;
731 int hostapd_mac_comp(
const void *a,
const void *b);
739 int hostapd_maclist_found(
struct mac_acl_entry *list,
int num_entries,
741 int hostapd_rate_found(
int *list,
int rate);
743 const u8 *addr,
const u8 *p2p_dev_addr,
748 const char * hostapd_get_vlan_id_ifname(
struct hostapd_vlan *vlan,
752 int hostapd_config_check(
struct hostapd_config *conf,
int full_config);
Definition: ap_config.h:145
Definition: ap_config.h:208
struct hostapd_radius_servers - RADIUS servers for RADIUS client
Definition: radius_client.h:120
Definition: ap_config.h:227
Definition: ap_config.h:69
Definition: ap_config.h:174
Definition: ap_config.h:120
Definition: ap_config.h:137
Definition: ap_config.h:221
Definition: ap_config.h:86
struct dl_list - Doubly-linked list
Definition: list.h:15
Definition: wpa_auth.h:130
Definition: wpa_auth.h:121
struct wpa_driver_ops - Driver interface API definition
Definition: driver.h:1843
Definition: ap_config.h:59
Definition: ap_config.h:213
struct hostapd_bss_config - Per-BSS configuration
Definition: ap_config.h:237
Definition: ap_config.h:183
Definition: ap_config.h:198
Definition: ieee802_11_common.h:138
Definition: ap_config.h:193
mesh_conf - local MBSS state and settings
Definition: ap_config.h:25
Definition: ap_config.h:153
Definition: wpa_auth_i.h:152
struct hostapd_config - Per-radio interface configuration
Definition: ap_config.h:619
struct eap_method - EAP method interface This structure defines the EAP method interface.
Definition: eap_i.h:64