eap_tlv.c File Reference

EAP peer method: EAP-TLV (draft-josefsson-pppext-eap-tls-eap-07.txt). More...

#include "includes.h"
#include "common.h"
#include "eap_i.h"
#include "eap_tlv.h"

Include dependency graph for eap_tlv.c:

Go to the source code of this file.

Functions

u8 * eap_tlv_build_nak (int id, u16 nak_type, size_t *resp_len)
 Build EAP-TLV NAK message.
u8 * eap_tlv_build_result (int id, u16 status, size_t *resp_len)
 Build EAP-TLV Result message.
int eap_tlv_process (struct eap_sm *sm, struct eap_method_ret *ret, const struct eap_hdr *hdr, u8 **resp, size_t *resp_len)
 Process a received EAP-TLV message and generate a response.


Detailed Description

EAP peer method: EAP-TLV (draft-josefsson-pppext-eap-tls-eap-07.txt).

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_tlv.c.


Function Documentation

u8* eap_tlv_build_nak int  id,
u16  nak_type,
size_t *  resp_len
 

Build EAP-TLV NAK message.

Parameters:
id EAP identifier for the header
nak_type TLV type (EAP_TLV_*)
resp_len Buffer for returning the response length
Returns:
Buffer to the allocated EAP-TLV NAK message or NULL on failure
This funtion builds an EAP-TLV NAK message. The caller is responsible for freeing the returned buffer.

Definition at line 34 of file eap_tlv.c.

Here is the call graph for this function:

u8* eap_tlv_build_result int  id,
u16  status,
size_t *  resp_len
 

Build EAP-TLV Result message.

Parameters:
id EAP identifier for the header
status Status (EAP_TLV_RESULT_SUCCESS or EAP_TLV_RESULT_FAILURE)
resp_len Buffer for returning the response length
Returns:
Buffer to the allocated EAP-TLV Result message or NULL on failure
This funtion builds an EAP-TLV Result message. The caller is responsible for freeing the returned buffer.

Definition at line 72 of file eap_tlv.c.

Here is the call graph for this function:

int eap_tlv_process struct eap_sm sm,
struct eap_method_ret ret,
const struct eap_hdr *  hdr,
u8 **  resp,
size_t *  resp_len
 

Process a received EAP-TLV message and generate a response.

Parameters:
sm Pointer to EAP state machine allocated with eap_sm_init()
ret Return values from EAP request validation and processing
hdr EAP-TLV request to be processed. The caller must have validated that the buffer is large enough to contain full request (hdr->length bytes) and that the EAP type is EAP_TYPE_TLV.
resp Buffer to return a pointer to the allocated response message. This field should be initialized to NULL before the call. The value will be updated if a response message is generated. The caller is responsible for freeing the allocated message.
resp_len Buffer for returning the response length
Returns:
0 on success, -1 on failure

Definition at line 109 of file eap_tlv.c.

Here is the call graph for this function:


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