eap_i.h File Reference

EAP peer state machines internal structures (RFC 4137). More...

#include "eap.h"

Include dependency graph for eap_i.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define EAP_PEER_METHOD_INTERFACE_VERSION   1

Enumerations

enum  EapDecision { DECISION_FAIL, DECISION_COND_SUCC, DECISION_UNCOND_SUCC }
enum  EapMethodState {
  METHOD_NONE, METHOD_INIT, METHOD_CONT, METHOD_MAY_CONT,
  METHOD_DONE
}

Functions

const u8 * eap_hdr_validate (int vendor, EapType eap_type, const u8 *msg, size_t msglen, size_t *plen)
 Validate EAP header.
const u8 * eap_get_config_identity (struct eap_sm *sm, size_t *len)
 Get identity from the network configuration.
const u8 * eap_get_config_password (struct eap_sm *sm, size_t *len)
 Get password from the network configuration.
const u8 * eap_get_config_new_password (struct eap_sm *sm, size_t *len)
 Get new password from network configuration.
const u8 * eap_get_config_otp (struct eap_sm *sm, size_t *len)
 Get one-time password from the network configuration.
void eap_clear_config_otp (struct eap_sm *sm)
 Clear used one-time password.
wpa_ssideap_get_config (struct eap_sm *sm)
 Get current network configuration.
void eap_set_config_blob (struct eap_sm *sm, struct wpa_config_blob *blob)
 Set or add a named configuration blob.
const struct wpa_config_blobeap_get_config_blob (struct eap_sm *sm, const char *name)
 Get a named configuration blob.
eap_hdr * eap_msg_alloc (int vendor, EapType type, size_t *len, size_t payload_len, u8 code, u8 identifier, u8 **payload)
 Allocate a buffer for an EAP message.
void eap_notify_pending (struct eap_sm *sm)
 Notify that EAP method is ready to re-process a request.


Detailed Description

EAP peer state machines internal structures (RFC 4137).

Copyright
Copyright (c) 2004-2006, Jouni Malinen <[email protected]>
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.

Definition in file eap_i.h.


Function Documentation

void eap_clear_config_otp struct eap_sm sm  ) 
 

Clear used one-time password.

Parameters:
sm Pointer to EAP state machine allocated with eap_sm_init()
This function clears a used one-time password (OTP) from the current network configuration. This should be called when the OTP has been used and is not needed anymore.

Definition at line 1824 of file eap.c.

Here is the call graph for this function:

struct wpa_ssid* eap_get_config struct eap_sm sm  ) 
 

Get current network configuration.

Parameters:
sm Pointer to EAP state machine allocated with eap_sm_init()
Returns:
Pointer to the current network configuration or NULL if not found
EAP peer methods should avoid using this function if they can use other access functions, like eap_get_config_identity() and eap_get_config_password(), that do not require direct access to struct wpa_ssid.

Definition at line 1741 of file eap.c.

const struct wpa_config_blob* eap_get_config_blob struct eap_sm sm,
const char *  name
 

Get a named configuration blob.

Parameters:
sm Pointer to EAP state machine allocated with eap_sm_init()
name Name of the blob
Returns:
Pointer to blob data or NULL if not found

Definition at line 2059 of file eap.c.

const u8* eap_get_config_identity struct eap_sm sm,
size_t *  len
 

Get identity from the network configuration.

Parameters:
sm Pointer to EAP state machine allocated with eap_sm_init()
len Buffer for the length of the identity
Returns:
Pointer to the identity or NULL if not found

Definition at line 1754 of file eap.c.

Here is the call graph for this function:

const u8* eap_get_config_new_password struct eap_sm sm,
size_t *  len
 

Get new password from network configuration.

Parameters:
sm Pointer to EAP state machine allocated with eap_sm_init()
len Buffer for the length of the new password
Returns:
Pointer to the new password or NULL if not found

Definition at line 1788 of file eap.c.

Here is the call graph for this function:

const u8* eap_get_config_otp struct eap_sm sm,
size_t *  len
 

Get one-time password from the network configuration.

Parameters:
sm Pointer to EAP state machine allocated with eap_sm_init()
len Buffer for the length of the one-time password
Returns:
Pointer to the one-time password or NULL if not found

Definition at line 1805 of file eap.c.

Here is the call graph for this function:

const u8* eap_get_config_password struct eap_sm sm,
size_t *  len
 

Get password from the network configuration.

Parameters:
sm Pointer to EAP state machine allocated with eap_sm_init()
len Buffer for the length of the password
Returns:
Pointer to the password or NULL if not found

Definition at line 1771 of file eap.c.

Here is the call graph for this function:

const u8* eap_hdr_validate int  vendor,
EapType  eap_type,
const u8 *  msg,
size_t  msglen,
size_t *  plen
 

Validate EAP header.

Parameters:
vendor Expected EAP Vendor-Id (0 = IETF)
eap_type Expected EAP type number
msg EAP frame (starting with EAP header)
msglen Length of msg
plen Pointer to variable to contain the returned payload length
Returns:
Pointer to EAP payload (after type field), or NULL on failure
This is a helper function for EAP method implementations. This is usually called in the beginning of struct eap_method::process() function to verify that the received EAP request packet has a valid header. This function is able to process both legacy and expanded EAP headers and in most cases, the caller can just use the returned payload pointer (into *plen) for processing the payload regardless of whether the packet used the expanded EAP header or not.

Definition at line 1983 of file eap.c.

Here is the call graph for this function:

struct eap_hdr* eap_msg_alloc int  vendor,
EapType  type,
size_t *  len,
size_t  payload_len,
u8  code,
u8  identifier,
u8 **  payload
 

Allocate a buffer for an EAP message.

Parameters:
vendor Vendor-Id (0 = IETF)
type EAP type
len Buffer for returning message length
payload_len Payload length in bytes (data after Type)
code Message Code (EAP_CODE_*)
identifier Identifier
payload Pointer to payload pointer that will be set to point to the beginning of the payload or NULL if payload pointer is not needed
Returns:
Pointer to the allocated message buffer or NULL on error
This function can be used to allocate a buffer for an EAP message and fill in the EAP header. This function is automatically using expanded EAP header if the selected Vendor-Id is not IETF. In other words, most EAP methods do not need to separately select which header type to use when using this function to allocate the message buffers.

Definition at line 2100 of file eap.c.

void eap_notify_pending struct eap_sm sm  ) 
 

Notify that EAP method is ready to re-process a request.

Parameters:
sm Pointer to EAP state machine allocated with eap_sm_init()
An EAP method can perform a pending operation (e.g., to get a response from an external process). Once the response is available, this function can be used to request EAPOL state machine to retry delivering the previously received (and still unanswered) EAP request to EAP state machine.

Definition at line 2142 of file eap.c.

void eap_set_config_blob struct eap_sm sm,
struct wpa_config_blob blob
 

Set or add a named configuration blob.

Parameters:
sm Pointer to EAP state machine allocated with eap_sm_init()
blob New value for the blob
Adds a new configuration blob or replaces the current value of an existing blob.

Definition at line 2046 of file eap.c.


Generated on Sun Dec 31 13:51:24 2006 for wpa_supplicant by  doxygen 1.4.2