]> git.ipfire.org Git - thirdparty/hostap.git/blame - src/ap/pmksa_cache_auth.h
Generate BIGTK and rekey it with IGTK
[thirdparty/hostap.git] / src / ap / pmksa_cache_auth.h
CommitLineData
6fc6879b
JM
1/*
2 * hostapd - PMKSA cache for IEEE 802.11i RSN
182748e4 3 * Copyright (c) 2004-2008, 2012, 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];
207976f0 20 u8 pmk[PMK_LEN_MAX];
6fc6879b
JM
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;
182748e4 28 struct wpabuf *cui;
6fc6879b
JM
29 struct radius_class_data radius_class;
30 u8 eap_type_authsrv;
1889af2e 31 struct vlan_description *vlan_desc;
bf98f7f3 32 int opportunistic;
fcc306e3 33
d72a0053 34 u64 acct_multi_session_id;
6fc6879b
JM
35};
36
37struct rsn_pmksa_cache;
d90f10fa 38struct radius_das_attrs;
6fc6879b
JM
39
40struct rsn_pmksa_cache *
4bb081f1
JM
41pmksa_cache_auth_init(void (*free_cb)(struct rsn_pmksa_cache_entry *entry,
42 void *ctx), void *ctx);
43void pmksa_cache_auth_deinit(struct rsn_pmksa_cache *pmksa);
44struct rsn_pmksa_cache_entry *
45pmksa_cache_auth_get(struct rsn_pmksa_cache *pmksa,
46 const u8 *spa, const u8 *pmkid);
bf98f7f3
JM
47struct rsn_pmksa_cache_entry * pmksa_cache_get_okc(
48 struct rsn_pmksa_cache *pmksa, const u8 *spa, const u8 *aa,
49 const u8 *pmkid);
6fc6879b 50struct rsn_pmksa_cache_entry *
4bb081f1 51pmksa_cache_auth_add(struct rsn_pmksa_cache *pmksa,
70c93963 52 const u8 *pmk, size_t pmk_len, const u8 *pmkid,
087a1f4e 53 const u8 *kck, size_t kck_len,
4bb081f1
JM
54 const u8 *aa, const u8 *spa, int session_timeout,
55 struct eapol_state_machine *eapol, int akmp);
bf98f7f3 56struct rsn_pmksa_cache_entry *
4d77d80e
MH
57pmksa_cache_auth_create_entry(const u8 *pmk, size_t pmk_len, const u8 *pmkid,
58 const u8 *kck, size_t kck_len, const u8 *aa,
59 const u8 *spa, int session_timeout,
60 struct eapol_state_machine *eapol, int akmp);
61int pmksa_cache_auth_add_entry(struct rsn_pmksa_cache *pmksa,
62 struct rsn_pmksa_cache_entry *entry);
63struct rsn_pmksa_cache_entry *
bf98f7f3
JM
64pmksa_cache_add_okc(struct rsn_pmksa_cache *pmksa,
65 const struct rsn_pmksa_cache_entry *old_entry,
66 const u8 *aa, const u8 *pmkid);
1889af2e
MB
67void pmksa_cache_to_eapol_data(struct hostapd_data *hapd,
68 struct rsn_pmksa_cache_entry *entry,
6fc6879b 69 struct eapol_state_machine *eapol);
901d1fe1
JM
70void pmksa_cache_free_entry(struct rsn_pmksa_cache *pmksa,
71 struct rsn_pmksa_cache_entry *entry);
cbc210de
JM
72int pmksa_cache_auth_radius_das_disconnect(struct rsn_pmksa_cache *pmksa,
73 struct radius_das_attrs *attr);
b8daac18 74int pmksa_cache_auth_list(struct rsn_pmksa_cache *pmksa, char *buf, size_t len);
4c522c77 75void pmksa_cache_auth_flush(struct rsn_pmksa_cache *pmksa);
4d77d80e
MH
76int pmksa_cache_auth_list_mesh(struct rsn_pmksa_cache *pmksa, const u8 *addr,
77 char *buf, size_t len);
6fc6879b
JM
78
79#endif /* PMKSA_CACHE_H */