All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions | Variables
eapcommon.c File Reference
#include <freeradius-devel/libradius.h>
#include <freeradius-devel/rad_assert.h>
#include "eap_types.h"
#include "../eap.h"
+ Include dependency graph for eapcommon.c:

Go to the source code of this file.

Functions

void eap_add_reply (REQUEST *request, char const *name, uint8_t const *value, int len)
 
int eap_basic_compose (RADIUS_PACKET *packet, eap_packet_t *reply)
 
eap_type_t eap_name2type (char const *name)
 Return an EAP-Type for a particular name. More...
 
VALUE_PAIReap_packet2vp (RADIUS_PACKET *packet, eap_packet_raw_t const *eap)
 
char const * eap_type2name (eap_type_t method)
 Return an EAP-name for a particular type. More...
 
rlm_rcode_t eap_virtual_server (REQUEST *request, REQUEST *fake, eap_session_t *eap_session, char const *virtual_server)
 Send a fake request to a virtual server, managing the eap_session_t of the child. More...
 
eap_packet_raw_teap_vp2packet (TALLOC_CTX *ctx, VALUE_PAIR *vps)
 
int eap_wireformat (eap_packet_t *reply)
 

Variables

const FR_NAME_NUMBER eap_rcode_table []
 

Function Documentation

void eap_add_reply ( REQUEST request,
char const *  name,
uint8_t const *  value,
int  len 
)

Definition at line 388 of file eapcommon.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int eap_basic_compose ( RADIUS_PACKET packet,
eap_packet_t reply 
)

Definition at line 191 of file eapcommon.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

eap_type_t eap_name2type ( char const *  name)

Return an EAP-Type for a particular name.

Converts a name into an IANA EAP type.

Parameters
nameto convert.
Returns
  • IANA EAP type.
  • PW_EAP_INVALID if the name doesn't match any known types.

Definition at line 88 of file eapcommon.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

VALUE_PAIR* eap_packet2vp ( RADIUS_PACKET packet,
eap_packet_raw_t const *  eap 
)

Definition at line 251 of file eapcommon.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

char const* eap_type2name ( eap_type_t  method)

Return an EAP-name for a particular type.

Resolve

Definition at line 104 of file eapcommon.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

rlm_rcode_t eap_virtual_server ( REQUEST request,
REQUEST fake,
eap_session_t eap_session,
char const *  virtual_server 
)

Send a fake request to a virtual server, managing the eap_session_t of the child.

If eap_session_t has a child, inject that into the fake request.

If after the request has run, the child eap_session_t is no longer present, we assume it has been freed, and fixup the parent eap_session_t.

If the eap_session_t pointer changes, this is considered a fatal error.

Parameters
requestthe current (real) request.
eap_sessionrepresenting the outer eap method.
fakerequest we're going to send.
virtual_serverThe default virtual server to send the request to.
Returns
the rcode of the last executed section in the virtual server.

Definition at line 418 of file eapcommon.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

eap_packet_raw_t* eap_vp2packet ( TALLOC_CTX *  ctx,
VALUE_PAIR vps 
)

Definition at line 297 of file eapcommon.c.

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int eap_wireformat ( eap_packet_t reply)

Definition at line 128 of file eapcommon.c.

+ Here is the caller graph for this function:

Variable Documentation

const FR_NAME_NUMBER eap_rcode_table[]
Initial value:
= {
{ "notfound", EAP_NOTFOUND },
{ "found", EAP_OK },
{ "ok", EAP_FAIL },
{ "fail", EAP_NOOP },
{ "noop", EAP_INVALID },
{ "invalid", EAP_VALID },
{ "valid", EAP_MAX_RCODES },
{ NULL , -1 }
}
Ok, continue.
Definition: eap_types.h:109
Invalid, don't reply.
Definition: eap_types.h:112
Failed, don't reply.
Definition: eap_types.h:110
Valid, continue.
Definition: eap_types.h:113
EAP eap_session data not found.
Definition: eap_types.h:107
Succeeded without doing anything.
Definition: eap_types.h:111

Definition at line 67 of file eapcommon.c.