1 /* 2 * hostapd / IEEE 802.11 authentication (ACL) 3 * Copyright (c) 2003-2022, 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 9 #ifndef IEEE802_11_AUTH_H 10 #define IEEE802_11_AUTH_H 11 12 enum { 13 HOSTAPD_ACL_REJECT = 0, 14 HOSTAPD_ACL_ACCEPT = 1, 15 HOSTAPD_ACL_PENDING = 2, 16 HOSTAPD_ACL_ACCEPT_TIMEOUT = 3 17 }; 18 19 struct radius_sta { 20 u32 session_timeout; 21 u32 acct_interim_interval; 22 struct vlan_description vlan_id; 23 struct hostapd_sta_wpa_psk_short *psk; 24 char *identity; 25 char *radius_cui; 26 }; 27 28 int hostapd_check_acl(struct hostapd_data *hapd, const u8 *addr, 29 struct vlan_description *vlan_id); 30 int hostapd_allowed_address(struct hostapd_data *hapd, const u8 *addr, 31 const u8 *msg, size_t len, struct radius_sta *out, 32 int is_probe_req); 33 int hostapd_acl_init(struct hostapd_data *hapd); 34 void hostapd_acl_deinit(struct hostapd_data *hapd); 35 void hostapd_free_psk_list(struct hostapd_sta_wpa_psk_short *psk); 36 void hostapd_acl_expire(struct hostapd_data *hapd); 37 void hostapd_copy_psk_list(struct hostapd_sta_wpa_psk_short **psk, 38 struct hostapd_sta_wpa_psk_short *src); 39 void hostapd_acl_req_radius_psk(struct hostapd_data *hapd, const u8 *addr, 40 int key_mgmt, const u8 *anonce, 41 const u8 *eapol, size_t eapol_len); 42 43 #endif /* IEEE802_11_AUTH_H */ 44