28 RCSID(
"$Id: e0bf27f2f3786e19679fa86f82a6d29b1dea2d79 $")
30 #include <freeradius-devel/eap/base.h>
31 #include <freeradius-devel/eap_aka_sim/attrs.h>
32 #include <freeradius-devel/eap_aka_sim/base.h>
33 #include <freeradius-devel/eap_aka_sim/module.h>
34 #include <freeradius-devel/server/virtual_servers.h>
35 #include <freeradius-devel/unlang/module.h>
36 #include <freeradius-devel/util/rand.h>
37 #include <freeradius-devel/util/debug.h>
56 eap_session->
opaque = mod_session;
59 return eap_session->
process(p_result, mctx, request);
75 if (!
inst->aka.send_at_bidding_prefer_prime_is_set) {
81 cf_log_debug(
conf,
"Setting 'prefer_aka_prime = yes', as EAP-AKA-Prime is enabled");
82 inst->aka.send_at_bidding_prefer_prime =
true;
83 inst->aka.send_at_bidding_prefer_prime_is_set =
true;
125 .inst_type =
"eap_aka_sim_module_conf_t",
unlang_action_t
Returned by unlang_op_t calls, determine the next action of the interpreter.
#define CONF_PARSER_TERMINATOR
#define FR_CONF_OFFSET_IS_SET(_name, _type, _flags, _struct, _field)
conf_parser_t which parses a single CONF_PAIR, writing the result to a field in a struct,...
#define FR_CONF_OFFSET_TYPE_FLAGS(_name, _type, _flags, _struct, _field)
conf_parser_t which parses a single CONF_PAIR, writing the result to a field in a struct
Defines a CONF_PAIR to C data type mapping.
Configuration AVP similar to a fr_pair_t.
A section grouping multiple CONF_PAIR.
char const * cf_pair_value(CONF_PAIR const *pair)
Return the value of a CONF_PAIR.
CONF_SECTION * cf_item_to_section(CONF_ITEM const *ci)
Cast a CONF_ITEM to a CONF_SECTION.
CONF_PAIR * cf_pair_find_next(CONF_SECTION const *cs, CONF_PAIR const *prev, char const *attr)
Find a pair with a name matching attr, after specified pair.
#define cf_log_debug(_cf, _fmt,...)
#define MODULE_MAGIC_INIT
Stop people using different module/library/server versions together.
int fr_aka_sim_xlat_func_register(void)
EVP_MD const * hmac_md
HMAC digest algorithm, usually EVP_sha1().
EVP_MD const * checkcode_md
HMAC we use for calculating the checkcode.
void fr_aka_sim_xlat_func_unregister(void)
uint8_t id
Last ID used, monotonically increments.
Structure used to track session state at the module level.
void * opaque
Opaque data used by EAP methods.
module_method_t process
Callback that should be used to process the next round.
static eap_session_t * eap_session_get(request_t *request)
Tracks the progress of a single session of any EAP method.
fr_dict_t const * dict_eap_aka_sim
void fr_aka_sim_free(void)
int fr_aka_sim_init(void)
eap_type_t fr_aka_sim_id_to_eap_type(char const *id, size_t len)
Determine if a given identity is a 3gpp identity, and return the EAP method hinted.
@ FR_TYPE_BOOL
A truth value.
module_instance_t * mi
Instance of the module being instantiated.
Temporary structure to hold arguments for module calls.
Temporary structure to hold arguments for instantiation calls.
static const conf_parser_t config[]
uint32_t fr_rand(void)
Return a 32-bit random number.
rlm_rcode_t
Return codes indicating the result of the module call.
static int mod_load(void)
static void mod_unload(void)
static conf_parser_t submodule_config[]
static int mod_instantiate(module_inst_ctx_t const *mctx)
rlm_eap_submodule_t rlm_eap_aka
static eap_type_t mod_type_identity(UNUSED void *instance, char const *id, size_t len)
static unlang_action_t mod_session_init(rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request)
static int instantiate(module_inst_ctx_t const *mctx)
CONF_SECTION * conf
Module's instance configuration.
void * data
Module's instance data.
unlang_action_t eap_aka_sim_process(rlm_rcode_t *p_result, module_ctx_t const *mctx, request_t *request)
Decode EAP session data into attribute.
MEM(pair_append_request(&vp, attr_eap_aka_sim_identity) >=0)
eap_aka_sim_process_conf_t * inst
eap_type_t type
The preferred EAP-Type of this instance of the EAP-SIM/AKA/AKA' state machine.
module_t common
Common fields provided by all modules.
eap_type_t provides[MAX_PROVIDED_METHODS]
Allow the module to register itself for more than one EAP-Method.
Interface exported by EAP submodules.
int virtual_server_cf_parse(UNUSED TALLOC_CTX *ctx, void *out, UNUSED void *parent, CONF_ITEM *ci, UNUSED conf_parser_t const *rule)
Wrapper for the config parser to allow pass1 resolution of virtual servers.