4 #include "config_types.h"
6 typedef u8 macaddr
[ETH_ALEN
];
8 struct hostapd_radius_servers
;
11 struct hostapd_wpa_psk
{
12 struct hostapd_wpa_psk
*next
;
18 #define EAP_USER_MAX_METHODS 8
19 struct hostapd_eap_user
{
20 struct hostapd_eap_user
*next
;
23 u8 methods
[EAP_USER_MAX_METHODS
];
30 struct hostapd_config
{
31 char iface
[IFNAMSIZ
+ 1];
32 char bridge
[IFNAMSIZ
+ 1];
34 const struct driver_ops
*driver
;
37 HOSTAPD_LEVEL_DEBUG_VERBOSE
= 0,
38 HOSTAPD_LEVEL_DEBUG
= 1,
39 HOSTAPD_LEVEL_INFO
= 2,
40 HOSTAPD_LEVEL_NOTICE
= 3,
41 HOSTAPD_LEVEL_WARNING
= 4
42 } logger_syslog_level
, logger_stdout_level
;
44 #define HOSTAPD_MODULE_IEEE80211 BIT(0)
45 #define HOSTAPD_MODULE_IEEE8021X BIT(1)
46 #define HOSTAPD_MODULE_RADIUS BIT(2)
47 #define HOSTAPD_MODULE_WPA BIT(3)
48 #define HOSTAPD_MODULE_DRIVER BIT(4)
49 #define HOSTAPD_MODULE_IAPP BIT(5)
50 unsigned int logger_syslog
; /* module bitfield */
51 unsigned int logger_stdout
; /* module bitfield */
53 enum { HOSTAPD_DEBUG_NO
= 0, HOSTAPD_DEBUG_MINIMAL
= 1,
54 HOSTAPD_DEBUG_VERBOSE
= 2,
55 HOSTAPD_DEBUG_MSGDUMPS
= 3,
56 HOSTAPD_DEBUG_EXCESSIVE
= 4 } debug
; /* debug verbosity level */
57 char *dump_log_name
; /* file name for state dump (SIGUSR1) */
59 int ieee802_1x
; /* use IEEE 802.1X */
61 int eap_server
; /* Use internal EAP server instead of external
63 struct hostapd_eap_user
*eap_user
;
65 struct hostapd_ip_addr own_ip_addr
;
67 struct hostapd_radius_servers
*radius
;
69 #define HOSTAPD_SSID_LEN 32
70 char ssid
[HOSTAPD_SSID_LEN
+ 1];
73 char *eap_req_id_text
; /* optional displayable message sent with
74 * EAP Request-Identity */
75 size_t eap_req_id_text_len
;
76 int eapol_key_index_workaround
;
78 size_t default_wep_key_len
;
79 int individual_wep_key_len
;
80 int wep_rekeying_period
;
81 int eap_reauth_period
;
83 int ieee802_11f
; /* use IEEE 802.11f (IAPP) */
84 char iapp_iface
[IFNAMSIZ
+ 1]; /* interface used with IAPP broadcast
87 u8 assoc_ap_addr
[ETH_ALEN
];
88 int assoc_ap
; /* whether assoc_ap_addr is set */
91 ACCEPT_UNLESS_DENIED
= 0,
92 DENY_UNLESS_ACCEPTED
= 1,
93 USE_EXTERNAL_RADIUS_AUTH
= 2
100 #define HOSTAPD_AUTH_OPEN BIT(0)
101 #define HOSTAPD_AUTH_SHARED_KEY BIT(1)
102 int auth_algs
; /* bitfield of allowed IEEE 802.11 authentication
105 #define HOSTAPD_WPA_VERSION_WPA BIT(0)
106 #define HOSTAPD_WPA_VERSION_WPA2 BIT(1)
108 struct hostapd_wpa_psk
*wpa_psk
;
109 char *wpa_passphrase
;
111 #define WPA_KEY_MGMT_IEEE8021X BIT(0)
112 #define WPA_KEY_MGMT_PSK BIT(1)
114 #define WPA_CIPHER_NONE BIT(0)
115 #define WPA_CIPHER_WEP40 BIT(1)
116 #define WPA_CIPHER_WEP104 BIT(2)
117 #define WPA_CIPHER_TKIP BIT(3)
118 #define WPA_CIPHER_CCMP BIT(4)
122 int wpa_strict_rekey
;
125 char *rsn_preauth_interfaces
;
127 char *ctrl_interface
; /* directory for UNIX domain sockets */
128 gid_t ctrl_interface_gid
;
129 int ctrl_interface_gid_set
;
134 char *private_key_passwd
;
137 char *radius_server_clients
;
138 int radius_server_auth_port
;
139 int radius_server_ipv6
;
141 char *test_socket
; /* UNIX domain socket path for driver_test */
143 int use_pae_group_addr
; /* Whether to send EAPOL frames to PAE group
144 * address instead of individual address
145 * (for driver_wired.c).
150 struct hostapd_config
* hostapd_config_read(const char *fname
);
151 void hostapd_config_free(struct hostapd_config
*conf
);
152 int hostapd_maclist_found(macaddr
*list
, int num_entries
, u8
*addr
);
153 const u8
* hostapd_get_psk(const struct hostapd_config
*conf
, const u8
*addr
,
155 int hostapd_setup_wpa_psk(struct hostapd_config
*conf
);
156 const struct hostapd_eap_user
*
157 hostapd_get_eap_user(const struct hostapd_config
*conf
, const u8
*identity
,
158 size_t identity_len
, int phase2
);
160 #endif /* CONFIG_H */