wpa_supplicant / hostapd 2.0
Data Structures | Functions

pmksa_cache_auth.h File Reference

hostapd - PMKSA cache for IEEE 802.11i RSN More...

#include "radius/radius.h"

Go to the source code of this file.

Data Structures

struct  rsn_pmksa_cache_entry
 PMKSA cache entry. More...

Functions

struct rsn_pmksa_cachepmksa_cache_auth_init (void(*free_cb)(struct rsn_pmksa_cache_entry *entry, void *ctx), void *ctx)
 Initialize PMKSA cache.
void pmksa_cache_auth_deinit (struct rsn_pmksa_cache *pmksa)
 Free all entries in PMKSA cache.
struct rsn_pmksa_cache_entrypmksa_cache_auth_get (struct rsn_pmksa_cache *pmksa, const u8 *spa, const u8 *pmkid)
 Fetch a PMKSA cache entry.
struct rsn_pmksa_cache_entrypmksa_cache_get_okc (struct rsn_pmksa_cache *pmksa, const u8 *spa, const u8 *aa, const u8 *pmkid)
 Fetch a PMKSA cache entry using OKC.
struct rsn_pmksa_cache_entrypmksa_cache_auth_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)
 Add a PMKSA cache entry.
struct rsn_pmksa_cache_entrypmksa_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)

Detailed Description

hostapd - PMKSA cache for IEEE 802.11i RSN

Copyright
Copyright (c) 2004-2008, Jouni Malinen <j@w1.fi>

This software may be distributed under the terms of the BSD license. See README for more details.


Function Documentation

struct rsn_pmksa_cache_entry* pmksa_cache_auth_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 
) [read]

Add a PMKSA cache entry.

Parameters:
pmksaPointer to PMKSA cache data from pmksa_cache_auth_init()
pmkThe new pairwise master key
pmk_lenPMK length in bytes, usually PMK_LEN (32)
aaAuthenticator address
spaSupplicant address
session_timeoutSession timeout
eapolPointer to EAPOL state machine data
akmpWPA_KEY_MGMT_* used in key derivation
Returns:
Pointer to the added PMKSA cache entry or NULL on error

This function create a PMKSA entry for a new PMK and adds it to the PMKSA cache. If an old entry is already in the cache for the same Supplicant, this entry will be replaced with the new entry. PMKID will be calculated based on the PMK.

void pmksa_cache_auth_deinit ( struct rsn_pmksa_cache pmksa)

Free all entries in PMKSA cache.

Parameters:
pmksaPointer to PMKSA cache data from pmksa_cache_auth_init()
struct rsn_pmksa_cache_entry* pmksa_cache_auth_get ( struct rsn_pmksa_cache pmksa,
const u8 *  spa,
const u8 *  pmkid 
) [read]

Fetch a PMKSA cache entry.

Parameters:
pmksaPointer to PMKSA cache data from pmksa_cache_auth_init()
spaSupplicant address or NULL to match any
pmkidPMKID or NULL to match any
Returns:
Pointer to PMKSA cache entry or NULL if no match was found
struct rsn_pmksa_cache* pmksa_cache_auth_init ( void(*)(struct rsn_pmksa_cache_entry *entry, void *ctx)  free_cb,
void *  ctx 
) [read]

Initialize PMKSA cache.

Parameters:
free_cbCallback function to be called when a PMKSA cache entry is freed
ctxContext pointer for free_cb function
Returns:
Pointer to PMKSA cache data or NULL on failure
struct rsn_pmksa_cache_entry* pmksa_cache_get_okc ( struct rsn_pmksa_cache pmksa,
const u8 *  aa,
const u8 *  spa,
const u8 *  pmkid 
) [read]

Fetch a PMKSA cache entry using OKC.

Parameters:
pmksaPointer to PMKSA cache data from pmksa_cache_auth_init()
aaAuthenticator address
spaSupplicant address
pmkidPMKID
Returns:
Pointer to PMKSA cache entry or NULL if no match was found

Use opportunistic key caching (OKC) to find a PMK for a supplicant.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines