eap_methods.c File Reference

hostapd / EAP method registration More...

#include "includes.h"
#include "hostapd.h"
#include "eap_i.h"
#include "eap_methods.h"

Include dependency graph for eap_methods.c:

Go to the source code of this file.


const struct eap_methodeap_sm_get_eap_methods (int vendor, EapType method)
 Get EAP method based on type number.
EapType eap_get_type (const char *name, int *vendor)
 Get EAP type for the given EAP method name.
eap_methodeap_server_method_alloc (int version, int vendor, EapType method, const char *name)
 Allocate EAP server method structure.
void eap_server_method_free (struct eap_method *method)
 Free EAP server method structure.
int eap_server_method_register (struct eap_method *method)
 Register an EAP server method.
int eap_server_register_methods (void)
 Register statically linked EAP server methods.
void eap_server_unregister_methods (void)
 Unregister EAP server methods.

Detailed Description

hostapd / EAP method registration

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

Function Documentation

EapType eap_get_type const char *  name,
int *  vendor

Get EAP type for the given EAP method name.

name EAP method name, e.g., TLS
vendor Buffer for returning EAP Vendor-Id
EAP method type or EAP_TYPE_NONE if not found
This function maps EAP type names into EAP type numbers based on the list of EAP methods included in the build.

Definition at line 54 of file eap_methods.c.

struct eap_method* eap_server_method_alloc int  version,
int  vendor,
EapType  method,
const char *  name

Allocate EAP server method structure.

version Version of the EAP server method interface (set to EAP_SERVER_METHOD_INTERFACE_VERSION)
vendor EAP Vendor-ID (EAP_VENDOR_*) (0 = IETF)
method EAP type number (EAP_TYPE_*) name: Name of the method (e.g., "TLS")
Allocated EAP method structure or NULL on failure
The returned structure should be freed with eap_server_method_free() when it is not needed anymore.

Definition at line 81 of file eap_methods.c.

void eap_server_method_free struct eap_method method  ) 

Free EAP server method structure.

method Method structure allocated with eap_server_method_alloc()

Definition at line 101 of file eap_methods.c.

int eap_server_method_register struct eap_method method  ) 

Register an EAP server method.

method EAP method to register
0 on success, -1 on invalid method, or -2 if a matching EAP method has already been registered
Each EAP server method needs to call this function to register itself as a supported EAP method.

Definition at line 117 of file eap_methods.c.

int eap_server_register_methods void   ) 

Register statically linked EAP server methods.

0 on success, -1 on failure
This function is called at program initialization to register all EAP server methods that were linked in statically.

Definition at line 150 of file eap_methods.c.

void eap_server_unregister_methods void   ) 

Unregister EAP server methods.

This function is called at program termination to unregister all EAP server methods.

Definition at line 268 of file eap_methods.c.

Here is the call graph for this function:

const struct eap_method* eap_sm_get_eap_methods int  vendor,
EapType  method

Get EAP method based on type number.

vendor EAP Vendor-Id (0 = IETF)
method EAP type number
Pointer to EAP method or NULL if not found

Definition at line 33 of file eap_methods.c.

Generated on Sun Dec 31 13:44:18 2006 for hostapd by  doxygen 1.4.2