2 * hostapd - PMKSA cache for IEEE 802.11i RSN
3 * Copyright (c) 2004-2008, Jouni Malinen <j@w1.fi>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 2 as
7 * published by the Free Software Foundation.
9 * Alternatively, this software may be distributed under the terms of BSD
12 * See README and COPYING for more details.
19 * struct rsn_pmksa_cache_entry - PMKSA cache entry
21 struct rsn_pmksa_cache_entry {
22 struct rsn_pmksa_cache_entry *next, *hnext;
27 int akmp; /* WPA_KEY_MGMT_* */
32 struct radius_class_data radius_class;
38 struct rsn_pmksa_cache;
40 struct rsn_pmksa_cache *
41 pmksa_cache_auth_init(void (*free_cb)(struct rsn_pmksa_cache_entry *entry,
42 void *ctx), void *ctx);
43 void pmksa_cache_auth_deinit(struct rsn_pmksa_cache *pmksa);
44 struct rsn_pmksa_cache_entry *
45 pmksa_cache_auth_get(struct rsn_pmksa_cache *pmksa,
46 const u8 *spa, const u8 *pmkid);
47 struct rsn_pmksa_cache_entry * pmksa_cache_get_okc(
48 struct rsn_pmksa_cache *pmksa, const u8 *spa, const u8 *aa,
50 struct rsn_pmksa_cache_entry *
51 pmksa_cache_auth_add(struct rsn_pmksa_cache *pmksa,
52 const u8 *pmk, size_t pmk_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 rsn_pmksa_cache_entry *entry,
60 struct eapol_state_machine *eapol);
62 #endif /* PMKSA_CACHE_H */