Commit f355cc61 authored by Cedric Roux's avatar Cedric Roux

- Formatted some NAS files

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4553 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 0fdd3f09
......@@ -200,6 +200,7 @@ static void* _nas_user_mngr(void* args)
int exit_loop = FALSE;
int nb_command;
int bytes;
int i;
int *fd = (int*) args;
......@@ -227,7 +228,7 @@ static void* _nas_user_mngr(void* args)
/* Decode the user data message */
nb_command = user_api_decode_data (bytes);
for (int i = 0; i < nb_command; i++)
for (i = 0; i < nb_command; i++)
{
/* Get the user data to be processed */
const void* data = user_api_get_data (i);
......
This diff is collapsed.
......@@ -46,7 +46,7 @@ Description Defines the detach related EMM procedure executed by the
/****************************************************************************/
/* String representation of the detach type */
static const char* _emm_detach_type_str[] = {
static const char *_emm_detach_type_str[] = {
"EPS", "IMSI", "EPS/IMSI",
"RE-ATTACH REQUIRED", "RE-ATTACH NOT REQUIRED", "RESERVED"
};
......@@ -60,7 +60,7 @@ static const char* _emm_detach_type_str[] = {
/*
* Timer handlers
*/
void* _emm_detach_t3421_handler(void*);
void *_emm_detach_t3421_handler(void *);
/*
* Abnormal case detach procedures
......@@ -187,7 +187,7 @@ int emm_proc_detach(emm_proc_detach_type_t type, int switch_off)
** Others: T3421 **
** **
***************************************************************************/
int emm_proc_detach_request(void* args)
int emm_proc_detach_request(void *args)
{
LOG_FUNC_IN;
......@@ -281,7 +281,7 @@ int emm_proc_detach_accept(void)
** Others: None **
** **
***************************************************************************/
int emm_proc_detach_failure(int is_initial, void* args)
int emm_proc_detach_failure(int is_initial, void *args)
{
LOG_FUNC_IN;
......@@ -325,7 +325,7 @@ int emm_proc_detach_failure(int is_initial, void* args)
** Others: None **
** **
***************************************************************************/
int emm_proc_detach_release(void* args)
int emm_proc_detach_release(void *args)
{
LOG_FUNC_IN;
......@@ -419,12 +419,12 @@ int emm_proc_detach(unsigned int ueid, emm_proc_detach_type_t type)
***************************************************************************/
int emm_proc_detach_request(unsigned int ueid, emm_proc_detach_type_t type,
int switch_off, int native_ksi, int ksi,
GUTI_t* guti, imsi_t* imsi, imei_t* imei)
GUTI_t *guti, imsi_t *imsi, imei_t *imei)
{
LOG_FUNC_IN;
int rc;
emm_data_context_t* emm_ctx = NULL;
emm_data_context_t *emm_ctx = NULL;
LOG_TRACE(INFO, "EMM-PROC - Detach type = %s (%d) requested (ueid=%u)",
_emm_detach_type_str[type], type, ueid);
......@@ -445,19 +445,32 @@ int emm_proc_detach_request(unsigned int ueid, emm_proc_detach_type_t type,
LOG_FUNC_RETURN(RETURNok);
}
if (switch_off)
{
if (switch_off) {
/* The UE is switched off */
if (emm_ctx->guti) free(emm_ctx->guti);
if (emm_ctx->imsi) free(emm_ctx->imsi);
if (emm_ctx->imei) free(emm_ctx->imei);
if (emm_ctx->esm_msg.length > 0) free(emm_ctx->esm_msg.value);
if (emm_ctx->guti) {
free(emm_ctx->guti);
}
if (emm_ctx->imsi) {
free(emm_ctx->imsi);
}
if (emm_ctx->imei) {
free(emm_ctx->imei);
}
if (emm_ctx->esm_msg.length > 0) {
free(emm_ctx->esm_msg.value);
}
/* Release NAS security context */
if (emm_ctx->security) {
emm_security_context_t* security = emm_ctx->security;
if (security->kasme.value) free(security->kasme.value);
if (security->knas_enc.value) free(security->knas_enc.value);
if (security->knas_int.value) free(security->knas_int.value);
emm_security_context_t *security = emm_ctx->security;
if (security->kasme.value) {
free(security->kasme.value);
}
if (security->knas_enc.value) {
free(security->knas_enc.value);
}
if (security->knas_int.value) {
free(security->knas_int.value);
}
free(emm_ctx->security);
}
/* Release the EMM context */
......@@ -469,8 +482,7 @@ int emm_proc_detach_request(unsigned int ueid, emm_proc_detach_type_t type,
_emm_data.ctx[ueid] = NULL;
#endif
rc = RETURNok;
}
else {
} else {
/* Normal detach without UE switch-off */
emm_sap_t emm_sap;
emm_as_data_t *emm_as = &emm_sap.u.emm_as.u.data;
......@@ -549,7 +561,7 @@ int emm_proc_detach_request(unsigned int ueid, emm_proc_detach_type_t type,
** Others: None **
** **
***************************************************************************/
void* _emm_detach_t3421_handler(void* args)
void *_emm_detach_t3421_handler(void *args)
{
LOG_FUNC_IN;
......@@ -561,8 +573,7 @@ void* _emm_detach_t3421_handler(void* args)
LOG_TRACE(WARNING, "EMM-PROC - T3421 timer expired, "
"retransmission counter = %d", _emm_detach_data.count);
if (_emm_detach_data.count < EMM_DETACH_COUNTER_MAX)
{
if (_emm_detach_data.count < EMM_DETACH_COUNTER_MAX) {
/* Retransmit the Detach Request message */
emm_sap_t emm_sap;
emm_as_data_t *emm_as = &emm_sap.u.emm_as.u.data;
......@@ -598,8 +609,7 @@ void* _emm_detach_t3421_handler(void* args)
LOG_TRACE(INFO, "EMM-PROC - Timer T3421 (%d) expires in %ld "
"seconds", T3421.id, T3421.sec);
}
}
else {
} else {
/* Abort the detach procedure */
rc = _emm_detach_abort(_emm_detach_data.type);
}
......
......@@ -63,7 +63,7 @@ typedef struct emm_common_data_s {
emm_common_reject_callback_t reject;
emm_common_failure_callback_t failure;
emm_common_abort_callback_t abort;
void* args;
void *args;
#if defined(EPC_BUILD)
RB_ENTRY(emm_common_data_s) entries;
......@@ -117,7 +117,7 @@ struct emm_common_data_s *emm_common_data_context_get(
return RB_FIND(emm_common_data_map, &root->emm_common_data_root, &reference);
}
#else
static emm_common_data_t* _emm_common_data[EMM_DATA_NB_UE_MAX];
static emm_common_data_t *_emm_common_data[EMM_DATA_NB_UE_MAX];
#endif
/****************************************************************************/
......@@ -153,7 +153,7 @@ int emm_proc_common_initialize(unsigned int ueid,
emm_common_reject_callback_t _reject,
emm_common_failure_callback_t _failure,
emm_common_abort_callback_t _abort,
void* args)
void *args)
{
struct emm_common_data_s *emm_common_data_ctx = NULL;
LOG_FUNC_IN;
......@@ -166,7 +166,7 @@ int emm_proc_common_initialize(unsigned int ueid,
#endif
if (emm_common_data_ctx == NULL) {
emm_common_data_ctx = (emm_common_data_t*)malloc(sizeof(emm_common_data_t));
emm_common_data_ctx = (emm_common_data_t *)malloc(sizeof(emm_common_data_t));
emm_common_data_ctx->ueid = ueid;
#if defined(EPC_BUILD)
RB_INSERT(emm_common_data_map, &emm_common_data_head.emm_common_data_root,
......@@ -416,7 +416,7 @@ int emm_proc_common_abort(unsigned int ueid)
** Others: None **
** **
***************************************************************************/
void* emm_proc_common_get_args(unsigned int ueid)
void *emm_proc_common_get_args(unsigned int ueid)
{
emm_common_data_t *emm_common_data_ctx = NULL;
LOG_FUNC_IN;
......
......@@ -47,9 +47,9 @@ Description Defines callback functions executed within EMM common procedures
* - The EMM common procedure failed or is rejected
* - Lower layer failure occured before the EMM common procedure completion
*/
typedef int (*emm_common_success_callback_t)(void*);
typedef int (*emm_common_reject_callback_t) (void*);
typedef int (*emm_common_failure_callback_t)(void*);
typedef int (*emm_common_success_callback_t)(void *);
typedef int (*emm_common_reject_callback_t) (void *);
typedef int (*emm_common_failure_callback_t)(void *);
/*
* Type of EMM common procedure callback function
......@@ -57,7 +57,7 @@ typedef int (*emm_common_failure_callback_t)(void*);
* EMM common procedure to be executed when the ongoing EMM procedure is
* aborted.
*/
typedef int (*emm_common_abort_callback_t)(void*);
typedef int (*emm_common_abort_callback_t)(void *);
/****************************************************************************/
/******************** G L O B A L V A R I A B L E S ********************/
......@@ -72,13 +72,13 @@ int emm_proc_common_initialize(unsigned int ueid,
emm_common_reject_callback_t reject,
emm_common_failure_callback_t failure,
emm_common_abort_callback_t abort,
void* args);
void *args);
int emm_proc_common_success(unsigned int ueid);
int emm_proc_common_reject(unsigned int ueid);
int emm_proc_common_failure(unsigned int ueid);
int emm_proc_common_abort(unsigned int ueid);
void* emm_proc_common_get_args(unsigned int ueid);
void *emm_proc_common_get_args(unsigned int ueid);
#endif /* __EMM_COMMON_H__*/
......@@ -43,7 +43,7 @@ Description Defines the identification EMM procedure executed by the
/****************************************************************************/
/* String representation of the requested identity type */
static const char* _emm_identity_type_str[] = {
static const char *_emm_identity_type_str[] = {
"NOT AVAILABLE", "IMSI", "IMEI", "IMEISV", "TMSI"
};
......@@ -64,14 +64,14 @@ static const char* _emm_identity_type_str[] = {
/*
* Timer handlers
*/
static void* _identification_t3470_handler(void*);
static void *_identification_t3470_handler(void *);
/*
* Function executed whenever the ongoing EMM procedure that initiated
* the identification procedure is aborted or the maximum value of the
* retransmission timer counter is exceed
*/
static int _identification_abort(void*);
static int _identification_abort(void *);
/*
* Internal data used for identification procedure
......@@ -86,7 +86,7 @@ typedef struct {
* to the ongoing EMM procedure */
} identification_data_t;
static int _identification_request(identification_data_t* data);
static int _identification_request(identification_data_t *data);
#endif // NAS_MME
/****************************************************************************/
......@@ -140,8 +140,7 @@ int emm_proc_identification_request(emm_proc_identity_type_t type)
emm_sap.u.emm_as.u.security.identType = EMM_IDENT_TYPE_NOT_AVAILABLE;
switch (type)
{
switch (type) {
case EMM_IDENT_TYPE_IMSI:
/* International Mobile Subscriber Identity is requested */
if (_emm_data.imsi) {
......@@ -238,8 +237,8 @@ int emm_proc_identification(unsigned int ueid,
_emm_identity_type_str[type], type);
/* Allocate parameters of the retransmission timer callback */
identification_data_t* data =
(identification_data_t*)malloc(sizeof(identification_data_t));
identification_data_t *data =
(identification_data_t *)malloc(sizeof(identification_data_t));
if (data != NULL) {
/* Setup ongoing EMM procedure callback functions */
......@@ -297,13 +296,13 @@ int emm_proc_identification(unsigned int ueid,
** Others: _emm_data, T3470 **
** **
***************************************************************************/
int emm_proc_identification_complete(unsigned int ueid, const imsi_t* imsi,
const imei_t* imei, UInt32_t* tmsi)
int emm_proc_identification_complete(unsigned int ueid, const imsi_t *imsi,
const imei_t *imei, UInt32_t *tmsi)
{
int rc = RETURNerror;
emm_sap_t emm_sap;
emm_data_context_t* emm_ctx = NULL;
emm_data_context_t *emm_ctx = NULL;
LOG_FUNC_IN;
......@@ -314,9 +313,11 @@ int emm_proc_identification_complete(unsigned int ueid, const imsi_t* imsi,
T3470.id = nas_timer_stop(T3470.id);
/* Release retransmission timer paramaters */
identification_data_t* data =
(identification_data_t*)(emm_proc_common_get_args(ueid));
if (data) free(data);
identification_data_t *data =
(identification_data_t *)(emm_proc_common_get_args(ueid));
if (data) {
free(data);
}
/* Get the UE context */
#if defined(EPC_BUILD)
......@@ -333,25 +334,23 @@ int emm_proc_identification_complete(unsigned int ueid, const imsi_t* imsi,
if (imsi) {
/* Update the IMSI */
if (emm_ctx->imsi == NULL) {
emm_ctx->imsi = (imsi_t*)malloc(sizeof(imsi_t));
emm_ctx->imsi = (imsi_t *)malloc(sizeof(imsi_t));
}
if (emm_ctx->imsi) {
memcpy(emm_ctx->imsi, imsi, sizeof(imsi_t));
}
}
else if (imei) {
} else if (imei) {
/* Update the IMEI */
if (emm_ctx->imei == NULL) {
emm_ctx->imei = (imei_t*)malloc(sizeof(imei_t));
emm_ctx->imei = (imei_t *)malloc(sizeof(imei_t));
}
if (emm_ctx->imei) {
memcpy(emm_ctx->imei, imei, sizeof(imei_t));
}
}
else if (tmsi) {
} else if (tmsi) {
/* Update the GUTI */
if (emm_ctx->guti == NULL) {
emm_ctx->guti = (GUTI_t*)malloc(sizeof(GUTI_t));
emm_ctx->guti = (GUTI_t *)malloc(sizeof(GUTI_t));
}
if (emm_ctx->guti) {
memcpy(&emm_ctx->guti->gummei,
......@@ -365,8 +364,7 @@ int emm_proc_identification_complete(unsigned int ueid, const imsi_t* imsi,
emm_sap.primitive = EMMREG_COMMON_PROC_CNF;
emm_sap.u.emm_reg.ueid = ueid;
emm_sap.u.emm_reg.u.common.is_attached = emm_ctx->is_attached;
}
else {
} else {
LOG_TRACE(ERROR, "EMM-PROC - No EMM context exists");
/*
* Notify EMM that the identification procedure failed
......@@ -413,13 +411,13 @@ int emm_proc_identification_complete(unsigned int ueid, const imsi_t* imsi,
** Others: None **
** **
***************************************************************************/
static void* _identification_t3470_handler(void* args)
static void *_identification_t3470_handler(void *args)
{
LOG_FUNC_IN;
int rc;
identification_data_t* data = (identification_data_t*)(args);
identification_data_t *data = (identification_data_t *)(args);
/* Increment the retransmission counter */
data->retransmission_count += 1;
......@@ -430,8 +428,7 @@ static void* _identification_t3470_handler(void* args)
if (data->retransmission_count < IDENTIFICATION_COUNTER_MAX) {
/* Send identity request message to the UE */
rc = _identification_request(data);
}
else {
} else {
/* Set the failure notification indicator */
data->notify_failure = TRUE;
/* Abort the identification procedure */
......@@ -461,7 +458,7 @@ static void* _identification_t3470_handler(void* args)
** Others: T3470 **
** **
***************************************************************************/
int _identification_request(identification_data_t* data)
int _identification_request(identification_data_t *data)
{
emm_sap_t emm_sap;
int rc;
......@@ -524,16 +521,15 @@ int _identification_request(identification_data_t* data)
** Others: T3470 **
** **
***************************************************************************/
static int _identification_abort(void* args)
static int _identification_abort(void *args)
{
LOG_FUNC_IN;
int rc = RETURNerror;
identification_data_t* data = (identification_data_t*)(args);
identification_data_t *data = (identification_data_t *)(args);
if (data)
{
if (data) {
unsigned int ueid = data->ueid;
int notify_failure = data->notify_failure;
......
......@@ -51,12 +51,14 @@ int IdleMode_get_splmn_index(void);
int IdleMode_update_plmn_list(int index);
const char* IdleMode_get_plmn_fullname(const plmn_t* plmn, int index, size_t* len);
const char* IdleMode_get_plmn_shortname(const plmn_t* plmn, int index, size_t* len);
const char* IdleMode_get_plmn_id(const plmn_t* plmn, int index, size_t* len);
int IdleMode_get_plmn_fullname_index(const char* plmn);
int IdleMode_get_plmn_shortname_index(const char* plmn);
int IdleMode_get_plmn_id_index(const char* plmn);
const char *IdleMode_get_plmn_fullname(const plmn_t *plmn, int index,
size_t *len);
const char *IdleMode_get_plmn_shortname(const plmn_t *plmn, int index,
size_t *len);
const char *IdleMode_get_plmn_id(const plmn_t *plmn, int index, size_t *len);
int IdleMode_get_plmn_fullname_index(const char *plmn);
int IdleMode_get_plmn_shortname_index(const char *plmn);
int IdleMode_get_plmn_id_index(const char *plmn);
#endif /* __IDLEMODE_H__*/
......@@ -50,7 +50,7 @@ static struct {
lowerlayer_success_callback_t success; /* Successful data delivery */
lowerlayer_failure_callback_t failure; /* Lower layer failure */
lowerlayer_release_callback_t release; /* NAS signalling release */
void* args; /* EMM procedure argument parameters */
void *args; /* EMM procedure argument parameters */
} _lowerlayer_data;
#endif
......@@ -200,7 +200,7 @@ int lowerlayer_release(int cause)
** Others: None **
** **
***************************************************************************/
int lowerlayer_data_ind(unsigned int ueid, const OctetString* data)
int lowerlayer_data_ind(unsigned int ueid, const OctetString *data)
{
LOG_FUNC_IN;
......@@ -232,7 +232,7 @@ int lowerlayer_data_ind(unsigned int ueid, const OctetString* data)
** Others: None **
** **
***************************************************************************/
int lowerlayer_data_req(unsigned int ueid, const OctetString* data)
int lowerlayer_data_req(unsigned int ueid, const OctetString *data)
{
LOG_FUNC_IN;
......@@ -303,7 +303,7 @@ int lowerlayer_data_req(unsigned int ueid, const OctetString* data)
int emm_proc_lowerlayer_initialize(lowerlayer_success_callback_t success,
lowerlayer_failure_callback_t failure,
lowerlayer_release_callback_t release,
void* args)
void *args)
{
LOG_FUNC_IN;
......@@ -430,12 +430,12 @@ int emm_proc_lowerlayer_release(void)
** Others: None **
** **
***************************************************************************/
void emm_as_set_security_data(emm_as_security_data_t* data, const void* args,
void emm_as_set_security_data(emm_as_security_data_t *data, const void *args,
int is_new, int is_ciphered)
{
LOG_FUNC_IN;
const emm_security_context_t* context = (emm_security_context_t*)(args);
const emm_security_context_t *context = (emm_security_context_t *)(args);
memset(data, 0, sizeof(emm_as_security_data_t));
......@@ -448,7 +448,7 @@ void emm_as_set_security_data(emm_as_security_data_t* data, const void* args,
data->is_new = is_new;
data->ksi = context->eksi;
data->sqn = context->ul_count.seq_num;
data->count = *(UInt32_t*)(&context->ul_count);
data->count = *(UInt32_t *)(&context->ul_count);
/* NAS integrity and cyphering keys may not be available if the
* current security context is a partial EPS security context
* and not a full native EPS security context */
......@@ -463,8 +463,7 @@ void emm_as_set_security_data(emm_as_security_data_t* data, const void* args,
* protected and unciphered */
data->k_enc = &context->knas_enc;
}
}
else {
} else {
/* No valid EPS security context exists */
data->ksi = EMM_AS_NO_KEY_AVAILABLE;
}
......
......@@ -35,19 +35,19 @@ Description Defines EMM procedures executed by the Non-Access Stratum
* Type of EMM procedure callback function executed whenever data are
* successfully delivered to the network
*/
typedef int (*lowerlayer_success_callback_t)(void*);
typedef int (*lowerlayer_success_callback_t)(void *);
/*
* Type of EMM procedure callback function executed when data are not
* delivered to the network because a lower layer failure occurred
*/
typedef int (*lowerlayer_failure_callback_t)(int, void*);
typedef int (*lowerlayer_failure_callback_t)(int, void *);
/*
* Type of EMM procedure callback function executed when NAS signalling
* connection is released
*/
typedef int (*lowerlayer_release_callback_t)(void*);
typedef int (*lowerlayer_release_callback_t)(void *);
#endif
/****************************************************************************/
......@@ -67,7 +67,7 @@ int lowerlayer_failure(unsigned int ueid);
int lowerlayer_establish(void);
int lowerlayer_release(int cause);
int lowerlayer_data_ind(unsigned int ueid, const OctetString* data);
int lowerlayer_data_req(unsigned int ueid, const OctetString* data);
int lowerlayer_data_ind(unsigned int ueid, const OctetString *data);
int lowerlayer_data_req(unsigned int ueid, const OctetString *data);
#endif /* __LOWERLAYER_H__*/
......@@ -53,7 +53,7 @@ Description Defines the service request EMM procedure executed by the
/*
* Timer handlers
*/
void* _emm_service_t3417_handler(void*);
void *_emm_service_t3417_handler(void *);
#endif // NAS_UE
/*
......@@ -95,7 +95,7 @@ void* _emm_service_t3417_handler(void*);
** Others: None **
** **
***************************************************************************/
void* _emm_service_t3417_handler(void* args)
void *_emm_service_t3417_handler(void *args)
{
LOG_FUNC_IN;
......
......@@ -50,7 +50,7 @@ Description Defines the tracking area update EMM procedure executed by the
/*
* Timer handlers
*/
void* _emm_tau_t3430_handler(void*);
void *_emm_tau_t3430_handler(void *);
#endif // NAS_UE
/*
......@@ -92,7 +92,7 @@ void* _emm_tau_t3430_handler(void*);
** Others: None **
** **
***************************************************************************/
void* _emm_tau_t3430_handler(void* args)
void *_emm_tau_t3430_handler(void *args)
{
LOG_FUNC_IN;
......
......@@ -302,8 +302,8 @@ typedef struct {
* EPS NAS security context
* ------------------------
*/
emm_security_context_t* security; /* current security context */
emm_security_context_t* non_current; /* non-current security context */
emm_security_context_t *security; /* current security context */
emm_security_context_t *non_current; /* non-current security context */
} emm_data_t;
......@@ -325,11 +325,11 @@ typedef struct emm_data_context_s {
int is_attached; /* Attachment indicator */
int is_emergency; /* Emergency bearer services indicator */
imsi_t* imsi; /* The IMSI provided by the UE or the MME */
imei_t* imei; /* The IMEI provided by the UE */
imsi_t *imsi; /* The IMSI provided by the UE or the MME */
imei_t *imei; /* The IMEI provided by the UE */
int guti_is_new; /* New GUTI indicator */
GUTI_t* guti; /* The GUTI assigned to the UE */
GUTI_t* old_guti; /* The old GUTI */
GUTI_t *guti; /* The GUTI assigned to the UE */
GUTI_t *old_guti; /* The old GUTI */
int n_tacs; /* Number of concecutive tracking areas the UE is
* registered to */
tac_t tac; /* Code of the first tracking area the UE is
......@@ -339,7 +339,7 @@ typedef struct emm_data_context_s {
int eea; /* EPS encryption algorithms supported by the UE */
int eia; /* EPS integrity algorithms supported by the UE */
auth_vector_t vector; /* EPS authentication vector */
emm_security_context_t* security; /* Current EPS NAS security context */
emm_security_context_t *security; /* Current EPS NAS security context */
OctetString esm_msg; /* ESM message contained within the initial request */
int emm_cause; /* EMM failure cause code */
......@@ -369,14 +369,14 @@ typedef struct {
RB_HEAD(emm_data_context_map, emm_data_context_s) ctx_map;
# else
# define EMM_DATA_NB_UE_MAX (MME_API_NB_UE_MAX + 1)
emm_data_context_t* ctx [EMM_DATA_NB_UE_MAX];
emm_data_context_t *ctx [EMM_DATA_NB_UE_MAX];
# endif
} emm_data_t;
struct emm_data_context_s *emm_data_context_get(
emm_data_t *_emm_data, unsigned int _ueid);
struct emm_data_context_s * emm_data_context_remove(
struct emm_data_context_s *emm_data_context_remove(
emm_data_t *_emm_data, struct emm_data_context_s *elm);
void emm_data_context_add(emm_data_t *emm_data, struct emm_data_context_s *elm);
......
......@@ -45,7 +45,7 @@ struct emm_data_context_s *emm_data_context_get(
return RB_FIND(emm_data_context_map, &emm_data->ctx_map, &reference);
}
struct emm_data_context_s * emm_data_context_remove(
struct emm_data_context_s *emm_data_context_remove(
emm_data_t *emm_data, struct emm_data_context_s *elm)
{
return RB_REMOVE(emm_data_context_map, &emm_data->ctx_map, elm);
......
......@@ -41,7 +41,7 @@ Description Defines the EPS Mobility Management procedure call manager,
/****************************************************************************/
#ifdef NAS_UE
void emm_main_initialize(emm_indication_callback_t cb, const char* imei);
void emm_main_initialize(emm_indication_callback_t cb, const char *imei);
#endif
#ifdef NAS_MME
void emm_main_initialize(void);
......@@ -51,24 +51,24 @@ void emm_main_cleanup(void);
#ifdef NAS_UE
/* User's getter of UE's identity */
const imsi_t* emm_main_get_imsi(void);
const imsi_t *emm_main_get_imsi(void);
/* User's getter of the subscriber dialing number */
const msisdn_t* emm_main_get_msisdn(void);
const msisdn_t *emm_main_get_msisdn(void);
/* User's getter/setter for network selection */
int emm_main_set_plmn_selection_mode(int mode, int format,
const network_plmn_t* plmn, int rat);
const network_plmn_t *plmn, int rat);
int emm_main_get_plmn_selection_mode(void);
int emm_main_get_plmn_list(const char** plist);
const char* emm_main_get_selected_plmn(network_plmn_t* plmn, int format);
int emm_main_get_plmn_list(const char **plist);
const char *emm_main_get_selected_plmn(network_plmn_t *plmn, int format);
/* User's getter for network registration */
Stat_t emm_main_get_plmn_status(void);
tac_t emm_main_get_plmn_tac(void);
ci_t emm_main_get_plmn_ci(void);
AcT_t emm_main_get_plmn_rat(void);
const char* emm_main_get_registered_plmn(network_plmn_t* plmn, int format);
const char *emm_main_get_registered_plmn(network_plmn_t *plmn, int format);
/* User's getter for network attachment */
int emm_main_is_attached(void);
......
......@@ -93,7 +93,7 @@ int emm_proc_status(unsigned int ueid, int emm_cause);
int emm_proc_lowerlayer_initialize(lowerlayer_success_callback_t success,
lowerlayer_failure_callback_t failure,
lowerlayer_release_callback_t release,
void* args);
void *args);
int emm_proc_lowerlayer_success(void);
int emm_proc_lowerlayer_failure(int is_initial);
int emm_proc_lowerlayer_release(void);
......@@ -117,12 +117,14 @@ int emm_proc_plmn_selection_end(int found, tac_t tac, ci_t ci, AcT_t rat);
*/
#ifdef NAS_UE
int emm_proc_attach(emm_proc_attach_type_t type);
int emm_proc_attach_request(void* args);
int emm_proc_attach_accept(long T3412, long T3402, long T3423, int n_tais, tai_t* tai, GUTI_t* guti, int n_eplmns, plmn_t* eplmn, const OctetString* esm_msg);
int emm_proc_attach_reject(int emm_cause, const OctetString* esm_msg);
int emm_proc_attach_complete(void* args);
int emm_proc_attach_failure(int is_initial, void* args);
int emm_proc_attach_release(void* args);
int emm_proc_attach_request(void *args);
int emm_proc_attach_accept(long T3412, long T3402, long T3423, int n_tais,
tai_t *tai, GUTI_t *guti, int n_eplmns, plmn_t *eplmn,
const OctetString *esm_msg);
int emm_proc_attach_reject(int emm_cause, const OctetString *esm_msg);
int emm_proc_attach_complete(void *args);
int emm_proc_attach_failure(int is_initial, void *args);
int emm_proc_attach_release(void *args);
int emm_proc_attach_restart(void);
int emm_proc_attach_set_emergency(void);
......@@ -130,9 +132,11 @@ int emm_proc_attach_set_detach(void);
#endif
#ifdef NAS_MME
int emm_proc_attach_request(unsigned int ueid, emm_proc_attach_type_t type, int native_ksi, int ksi, int native_guti, GUTI_t* guti, imsi_t* imsi, imei_t* imei, tai_t* tai, int eea, int eia, const OctetString* esm_msg);
int emm_proc_attach_request(unsigned int ueid, emm_proc_attach_type_t type,
int native_ksi, int ksi, int native_guti, GUTI_t *guti, imsi_t *imsi,
imei_t *imei, tai_t *tai, int eea, int eia, const OctetString *esm_msg);
int emm_proc_attach_reject(unsigned int ueid, int emm_cause);
int emm_proc_attach_complete(unsigned int ueid, const OctetString* esm_msg);
int emm_proc_attach_complete(unsigned int ueid, const OctetString *esm_msg);
#endif
/*
......@@ -142,15 +146,17 @@ int emm_proc_attach_complete(unsigned int ueid, const OctetString* esm_msg);
*/
#ifdef NAS_UE
int emm_proc_detach(emm_proc_detach_type_t type, int switch_off);
int emm_proc_detach_request(void* args);
int emm_proc_detach_request(void *args);
int emm_proc_detach_accept(void);
int emm_proc_detach_failure(int is_initial, void* args);
int emm_proc_detach_release(void* args);
int emm_proc_detach_failure(int is_initial, void *args);
int emm_proc_detach_release(void *args);
#endif
#ifdef NAS_MME
int emm_proc_detach(unsigned int ueid, emm_proc_detach_type_t type);
int emm_proc_detach_request(unsigned int ueid, emm_proc_detach_type_t type, int switch_off, int native_ksi, int ksi, GUTI_t* guti, imsi_t* imsi, imei_t* imei);
int emm_proc_detach_request(unsigned int ueid, emm_proc_detach_type_t type,
int switch_off, int native_ksi, int ksi, GUTI_t *guti, imsi_t *imsi,
imei_t *imei);
#endif
/*
......@@ -169,7 +175,8 @@ int emm_proc_identification(unsigned int ueid,
emm_common_success_callback_t success,
emm_common_reject_callback_t reject,
emm_common_failure_callback_t failure);
int emm_proc_identification_complete(unsigned int ueid, const imsi_t* imsi, const imei_t* imei, UInt32_t* tmsi);
int emm_proc_identification_complete(unsigned int ueid, const imsi_t *imsi,
const imei_t *imei, UInt32_t *tmsi);
#endif
/*
......@@ -178,18 +185,20 @@ int emm_proc_identification_complete(unsigned int ueid, const imsi_t* imsi, cons
* --------------------------------------------------------------------------
*/
#ifdef NAS_UE
int emm_proc_authentication_request(int native_ksi, int ksi, const OctetString* rand, const OctetString* autn);
int emm_proc_authentication_request(int native_ksi, int ksi,
const OctetString *rand, const OctetString *autn);
int emm_proc_authentication_reject(void);
int emm_proc_authentication_delete(void);
#endif
#ifdef NAS_MME
int emm_proc_authentication(unsigned int ueid, int ksi,
const OctetString* rand, const OctetString* autn,
const OctetString *rand, const OctetString *autn,
emm_common_success_callback_t success,
emm_common_reject_callback_t reject,
emm_common_failure_callback_t failure);
int emm_proc_authentication_complete(unsigned int ueid, int emm_cause, const OctetString* res);
int emm_proc_authentication_complete(unsigned int ueid, int emm_cause,
const OctetString *res);
#endif
/*
......@@ -198,7 +207,8 @@ int emm_proc_authentication_complete(unsigned int ueid, int emm_cause, const Oct
* --------------------------------------------------------------------------
*/
#ifdef NAS_UE
int emm_proc_security_mode_command(int native_ksi, int ksi, int seea, int seia, int reea, int reia);
int emm_proc_security_mode_command(int native_ksi, int ksi, int seea, int seia,
int reea, int reia);
#endif
#ifdef NAS_MME
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment