2 * hostapd - PMKSA cache for IEEE 802.11i RSN
3 * Copyright (c) 2004-2008, 2012, Jouni Malinen <j@w1.fi>
5 * This software may be distributed under the terms of the BSD license.
6 * See README for more details.
12 #include "radius/radius.h"
15 * struct rsn_pmksa_cache_entry - PMKSA cache entry
17 struct rsn_pmksa_cache_entry {
18 struct rsn_pmksa_cache_entry *next, *hnext;
23 int akmp; /* WPA_KEY_MGMT_* */
29 struct radius_class_data radius_class;
31 struct vlan_description *vlan_desc;
34 u64 acct_multi_session_id;
37 struct rsn_pmksa_cache;
39 struct rsn_pmksa_cache *
40 pmksa_cache_auth_init(void (*free_cb)(struct rsn_pmksa_cache_entry *entry,
41 void *ctx), void *ctx);
42 void pmksa_cache_auth_deinit(struct rsn_pmksa_cache *pmksa);
43 struct rsn_pmksa_cache_entry *
44 pmksa_cache_auth_get(struct rsn_pmksa_cache *pmksa,
45 const u8 *spa, const u8 *pmkid);
46 struct rsn_pmksa_cache_entry * pmksa_cache_get_okc(
47 struct rsn_pmksa_cache *pmksa, const u8 *spa, const u8 *aa,
49 struct rsn_pmksa_cache_entry *
50 pmksa_cache_auth_add(struct rsn_pmksa_cache *pmksa,
51 const u8 *pmk, size_t pmk_len, const u8 *pmkid,
52 const u8 *kck, size_t kck_len,
53 const u8 *aa, const u8 *spa, int session_timeout,
54 struct eapol_state_machine *eapol, int akmp);
55 struct rsn_pmksa_cache_entry *
56 pmksa_cache_add_okc(struct rsn_pmksa_cache *pmksa,
57 const struct rsn_pmksa_cache_entry *old_entry,
58 const u8 *aa, const u8 *pmkid);
59 void pmksa_cache_to_eapol_data(struct hostapd_data *hapd,
60 struct rsn_pmksa_cache_entry *entry,
61 struct eapol_state_machine *eapol);
62 void pmksa_cache_free_entry(struct rsn_pmksa_cache *pmksa,
63 struct rsn_pmksa_cache_entry *entry);
64 int pmksa_cache_auth_radius_das_disconnect(struct rsn_pmksa_cache *pmksa,
65 struct radius_das_attrs *attr);
66 int pmksa_cache_auth_list(struct rsn_pmksa_cache *pmksa, char *buf, size_t len);
67 void pmksa_cache_auth_flush(struct rsn_pmksa_cache *pmksa);
69 #endif /* PMKSA_CACHE_H */