aboutsummaryrefslogtreecommitdiff
path: root/hostapd/pmksa_cache.h
diff options
context:
space:
mode:
authorSam Leffler <sam@FreeBSD.org>2009-03-01 22:10:07 +0000
committerSam Leffler <sam@FreeBSD.org>2009-03-01 22:10:07 +0000
commitb2cbddbd4361766d55c5f9dae81f71f44577bb6a (patch)
tree372b16f9e6ccba7284b53135005cc85cc6545185 /hostapd/pmksa_cache.h
parent514fff2b7c1f2e25e5c0611b598797f32aff1042 (diff)
parent22188e6ab4f02f981de3b9f228a40b1e8f98e6a1 (diff)
import wpa_supplicant+hostapd 0.6.8vendor/wpa/0.6.8
Notes
Notes: svn path=/vendor/wpa/dist/; revision=189251 svn path=/vendor/wpa/0.6.8/; revision=189252; tag=vendor/wpa/0.6.8
Diffstat (limited to 'hostapd/pmksa_cache.h')
-rw-r--r--hostapd/pmksa_cache.h62
1 files changed, 62 insertions, 0 deletions
diff --git a/hostapd/pmksa_cache.h b/hostapd/pmksa_cache.h
new file mode 100644
index 000000000000..6ba2da6073eb
--- /dev/null
+++ b/hostapd/pmksa_cache.h
@@ -0,0 +1,62 @@
+/*
+ * hostapd - PMKSA cache for IEEE 802.11i RSN
+ * Copyright (c) 2004-2008, Jouni Malinen <j@w1.fi>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Alternatively, this software may be distributed under the terms of BSD
+ * license.
+ *
+ * See README and COPYING for more details.
+ */
+
+#ifndef PMKSA_CACHE_H
+#define PMKSA_CACHE_H
+
+/**
+ * struct rsn_pmksa_cache_entry - PMKSA cache entry
+ */
+struct rsn_pmksa_cache_entry {
+ struct rsn_pmksa_cache_entry *next, *hnext;
+ u8 pmkid[PMKID_LEN];
+ u8 pmk[PMK_LEN];
+ size_t pmk_len;
+ os_time_t expiration;
+ int akmp; /* WPA_KEY_MGMT_* */
+ u8 spa[ETH_ALEN];
+
+ u8 *identity;
+ size_t identity_len;
+ struct radius_class_data radius_class;
+ u8 eap_type_authsrv;
+ int vlan_id;
+ int opportunistic;
+};
+
+struct rsn_pmksa_cache;
+
+struct rsn_pmksa_cache *
+pmksa_cache_init(void (*free_cb)(struct rsn_pmksa_cache_entry *entry,
+ void *ctx), void *ctx);
+void pmksa_cache_deinit(struct rsn_pmksa_cache *pmksa);
+struct rsn_pmksa_cache_entry * pmksa_cache_get(struct rsn_pmksa_cache *pmksa,
+ const u8 *spa, const u8 *pmkid);
+struct rsn_pmksa_cache_entry * pmksa_cache_get_okc(
+ struct rsn_pmksa_cache *pmksa, const u8 *spa, const u8 *aa,
+ const u8 *pmkid);
+struct rsn_pmksa_cache_entry *
+pmksa_cache_add(struct rsn_pmksa_cache *pmksa, const u8 *pmk, size_t pmk_len,
+ const u8 *aa, const u8 *spa, int session_timeout,
+ struct eapol_state_machine *eapol, int akmp);
+struct rsn_pmksa_cache_entry *
+pmksa_cache_add_okc(struct rsn_pmksa_cache *pmksa,
+ const struct rsn_pmksa_cache_entry *old_entry,
+ const u8 *aa, const u8 *pmkid);
+void pmksa_cache_to_eapol_data(struct rsn_pmksa_cache_entry *entry,
+ struct eapol_state_machine *eapol);
+void rsn_pmkid(const u8 *pmk, size_t pmk_len, const u8 *aa, const u8 *spa,
+ u8 *pmkid, int use_sha256);
+
+#endif /* PMKSA_CACHE_H */