]> git.ipfire.org Git - thirdparty/hostap.git/blame - src/ap/pmksa_cache_auth.h
Remove the GPL notification from files contributed by Jouni Malinen
[thirdparty/hostap.git] / src / ap / pmksa_cache_auth.h
CommitLineData
6fc6879b
JM
1/*
2 * hostapd - PMKSA cache for IEEE 802.11i RSN
56586197 3 * Copyright (c) 2004-2008, Jouni Malinen <j@w1.fi>
6fc6879b 4 *
0f3d578e
JM
5 * This software may be distributed under the terms of the BSD license.
6 * See README for more details.
6fc6879b
JM
7 */
8
9#ifndef PMKSA_CACHE_H
10#define PMKSA_CACHE_H
11
e0e14a7b
JM
12#include "radius/radius.h"
13
6fc6879b
JM
14/**
15 * struct rsn_pmksa_cache_entry - PMKSA cache entry
16 */
17struct rsn_pmksa_cache_entry {
18 struct rsn_pmksa_cache_entry *next, *hnext;
19 u8 pmkid[PMKID_LEN];
20 u8 pmk[PMK_LEN];
21 size_t pmk_len;
22 os_time_t expiration;
23 int akmp; /* WPA_KEY_MGMT_* */
24 u8 spa[ETH_ALEN];
25
26 u8 *identity;
27 size_t identity_len;
28 struct radius_class_data radius_class;
29 u8 eap_type_authsrv;
30 int vlan_id;
bf98f7f3 31 int opportunistic;
6fc6879b
JM
32};
33
34struct rsn_pmksa_cache;
35
36struct rsn_pmksa_cache *
4bb081f1
JM
37pmksa_cache_auth_init(void (*free_cb)(struct rsn_pmksa_cache_entry *entry,
38 void *ctx), void *ctx);
39void pmksa_cache_auth_deinit(struct rsn_pmksa_cache *pmksa);
40struct rsn_pmksa_cache_entry *
41pmksa_cache_auth_get(struct rsn_pmksa_cache *pmksa,
42 const u8 *spa, const u8 *pmkid);
bf98f7f3
JM
43struct rsn_pmksa_cache_entry * pmksa_cache_get_okc(
44 struct rsn_pmksa_cache *pmksa, const u8 *spa, const u8 *aa,
45 const u8 *pmkid);
6fc6879b 46struct rsn_pmksa_cache_entry *
4bb081f1
JM
47pmksa_cache_auth_add(struct rsn_pmksa_cache *pmksa,
48 const u8 *pmk, size_t pmk_len,
49 const u8 *aa, const u8 *spa, int session_timeout,
50 struct eapol_state_machine *eapol, int akmp);
bf98f7f3
JM
51struct rsn_pmksa_cache_entry *
52pmksa_cache_add_okc(struct rsn_pmksa_cache *pmksa,
53 const struct rsn_pmksa_cache_entry *old_entry,
54 const u8 *aa, const u8 *pmkid);
6fc6879b
JM
55void pmksa_cache_to_eapol_data(struct rsn_pmksa_cache_entry *entry,
56 struct eapol_state_machine *eapol);
6fc6879b
JM
57
58#endif /* PMKSA_CACHE_H */