moved eap_from_string() fomr libcharon to libstrongswan to make it available in starter
This commit is contained in:
@@ -15,38 +15,6 @@
|
||||
|
||||
#include "eap_method.h"
|
||||
|
||||
/*
|
||||
* See header
|
||||
*/
|
||||
eap_type_t eap_type_from_string(char *name)
|
||||
{
|
||||
int i;
|
||||
static struct {
|
||||
char *name;
|
||||
eap_type_t type;
|
||||
} types[] = {
|
||||
{"identity", EAP_IDENTITY},
|
||||
{"md5", EAP_MD5},
|
||||
{"otp", EAP_OTP},
|
||||
{"gtc", EAP_GTC},
|
||||
{"tls", EAP_TLS},
|
||||
{"ttls", EAP_TTLS},
|
||||
{"sim", EAP_SIM},
|
||||
{"aka", EAP_AKA},
|
||||
{"mschapv2", EAP_MSCHAPV2},
|
||||
{"radius", EAP_RADIUS},
|
||||
};
|
||||
|
||||
for (i = 0; i < countof(types); i++)
|
||||
{
|
||||
if (strcaseeq(name, types[i].name))
|
||||
{
|
||||
return types[i].type;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
ENUM(eap_code_names, EAP_REQUEST, EAP_FAILURE,
|
||||
"EAP_REQUEST",
|
||||
"EAP_RESPONSE",
|
||||
@@ -66,6 +34,3 @@ ENUM(eap_role_names, EAP_SERVER, EAP_PEER,
|
||||
"EAP_PEER",
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -41,14 +41,6 @@ enum eap_role_t {
|
||||
*/
|
||||
extern enum_name_t *eap_role_names;
|
||||
|
||||
/**
|
||||
* Lookup the EAP method type from a string.
|
||||
*
|
||||
* @param name EAP method name (such as "md5", "aka")
|
||||
* @return method type, 0 if unkown
|
||||
*/
|
||||
eap_type_t eap_type_from_string(char *name);
|
||||
|
||||
/**
|
||||
* EAP code, type of an EAP message
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user