1e28a4053SRui Paulo /* 2e28a4053SRui Paulo * hostapd / IEEE 802.11 authentication (ACL) 3*a90b9d01SCy Schubert * Copyright (c) 2003-2022, Jouni Malinen <j@w1.fi> 4e28a4053SRui Paulo * 5f05cddf9SRui Paulo * This software may be distributed under the terms of the BSD license. 6f05cddf9SRui Paulo * See README for more details. 7e28a4053SRui Paulo */ 8e28a4053SRui Paulo 9e28a4053SRui Paulo #ifndef IEEE802_11_AUTH_H 10e28a4053SRui Paulo #define IEEE802_11_AUTH_H 11e28a4053SRui Paulo 12e28a4053SRui Paulo enum { 13e28a4053SRui Paulo HOSTAPD_ACL_REJECT = 0, 14e28a4053SRui Paulo HOSTAPD_ACL_ACCEPT = 1, 15e28a4053SRui Paulo HOSTAPD_ACL_PENDING = 2, 16e28a4053SRui Paulo HOSTAPD_ACL_ACCEPT_TIMEOUT = 3 17e28a4053SRui Paulo }; 18e28a4053SRui Paulo 19c1d255d3SCy Schubert struct radius_sta { 20c1d255d3SCy Schubert u32 session_timeout; 21c1d255d3SCy Schubert u32 acct_interim_interval; 22c1d255d3SCy Schubert struct vlan_description vlan_id; 23c1d255d3SCy Schubert struct hostapd_sta_wpa_psk_short *psk; 24c1d255d3SCy Schubert char *identity; 25c1d255d3SCy Schubert char *radius_cui; 26c1d255d3SCy Schubert }; 27c1d255d3SCy Schubert 28780fb4a2SCy Schubert int hostapd_check_acl(struct hostapd_data *hapd, const u8 *addr, 29780fb4a2SCy Schubert struct vlan_description *vlan_id); 30e28a4053SRui Paulo int hostapd_allowed_address(struct hostapd_data *hapd, const u8 *addr, 31c1d255d3SCy Schubert const u8 *msg, size_t len, struct radius_sta *out, 3285732ac8SCy Schubert int is_probe_req); 33e28a4053SRui Paulo int hostapd_acl_init(struct hostapd_data *hapd); 34e28a4053SRui Paulo void hostapd_acl_deinit(struct hostapd_data *hapd); 35f05cddf9SRui Paulo void hostapd_free_psk_list(struct hostapd_sta_wpa_psk_short *psk); 36325151a3SRui Paulo void hostapd_acl_expire(struct hostapd_data *hapd); 37c1d255d3SCy Schubert void hostapd_copy_psk_list(struct hostapd_sta_wpa_psk_short **psk, 38c1d255d3SCy Schubert struct hostapd_sta_wpa_psk_short *src); 39*a90b9d01SCy Schubert void hostapd_acl_req_radius_psk(struct hostapd_data *hapd, const u8 *addr, 40*a90b9d01SCy Schubert int key_mgmt, const u8 *anonce, 41*a90b9d01SCy Schubert const u8 *eapol, size_t eapol_len); 42e28a4053SRui Paulo 43e28a4053SRui Paulo #endif /* IEEE802_11_AUTH_H */ 44