Commit c67aafd2 authored by Cedric Roux's avatar Cedric Roux

- Fixed origin task id of sctp date req message

- Unified structures names
- Added nas ul data ind between S1AP and NAS
- Fixed indentation of NAS files

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4554 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent f355cc61
......@@ -5,7 +5,8 @@ MESSAGE_DEF(NAS_CONNECTION_ESTABLISHMENT_IND, MESSAGE_PRIORITY_MED, nas_conn_est
MESSAGE_DEF(NAS_CONNECTION_ESTABLISHMENT_RSP, MESSAGE_PRIORITY_MED, nas_conn_est_rsp_t, nas_conn_est_rsp)
MESSAGE_DEF(NAS_CONNECTION_RELEASE_IND, MESSAGE_PRIORITY_MED, nas_conn_rel_ind_t, nas_conn_rel_ind)
MESSAGE_DEF(NAS_UPLINK_DATA_IND, MESSAGE_PRIORITY_MED, nas_ul_data_ind_t, nas_ul_data_ind)
MESSAGE_DEF(NAS_DOWNLINK_DATA_IND, MESSAGE_PRIORITY_MED, nas_dl_data_ind_t, nas_dl_data_ind)
MESSAGE_DEF(NAS_DOWNLINK_DATA_REQ, MESSAGE_PRIORITY_MED, nas_dl_data_req_t, nas_dl_data_req)
MESSAGE_DEF(NAS_DOWNLINK_DATA_CNF, MESSAGE_PRIORITY_MED, nas_dl_data_cnf_t, nas_dl_data_cnf)
MESSAGE_DEF(NAS_NON_DELIVERY_IND, MESSAGE_PRIORITY_MED, nas_non_del_ind_t, nas_non_del_ind)
MESSAGE_DEF(NAS_RAB_ESTABLISHMENT_REQ, MESSAGE_PRIORITY_MED, nas_rab_est_req_t, nas_rab_est_req)
MESSAGE_DEF(NAS_RAB_ESTABLISHMENT_RESP, MESSAGE_PRIORITY_MED, nas_rab_est_rsp_t, nas_rab_est_rsp)
......
......@@ -3,6 +3,10 @@
#ifndef NAS_MESSAGES_TYPES_H_
#define NAS_MESSAGES_TYPES_H_
#define NAS_UL_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.nas_ul_data_ind
#define NAS_DL_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.nas_dl_data_req
#define NAS_DL_DATA_CNF(mSGpTR) (mSGpTR)->ittiMsg.nas_dl_data_cnf
typedef struct {
} nas_paging_ind_t;
......@@ -24,11 +28,10 @@ typedef struct {
} nas_conn_rel_ind_t;
typedef struct {
} nas_ul_data_ind_t;
typedef ul_info_transfer_ind_t nas_ul_data_ind_t;
typedef dl_info_transfer_req_t nas_dl_data_ind_t;
typedef dl_info_transfer_req_t nas_dl_data_req_t;
typedef dl_info_transfer_cnf_t nas_dl_data_cnf_t;
typedef struct {
......
//WARNING: Do not include this header directly. Use intertask_interface.h instead.
MESSAGE_DEF(S1AP_SCTP_NEW_MESSAGE_IND, MESSAGE_PRIORITY_MED, s1ap_sctp_new_msg_ind_t, s1ap_sctp_new_msg_ind)
MESSAGE_DEF(S1AP_UE_CAPABILITIES_IND, MESSAGE_PRIORITY_MED, s1ap_ue_cap_ind_t, s1ap_ue_cap_ind)
#ifndef S1AP_MESSAGES_TYPES_H_
#define S1AP_MESSAGES_TYPES_H_
typedef struct {
uint8_t *buffer; ///< SCTP buffer
uint32_t buf_length; ///< SCTP buffer length
int32_t assoc_id; ///< SCTP physical association ID
uint8_t stream; ///< Stream number on which data had been received
uint16_t instreams; ///< Number of input streams for the SCTP connection between peers
uint16_t outstreams; ///< Number of output streams for the SCTP connection between peers
} s1ap_sctp_new_msg_ind_t;
typedef struct s1ap_initial_ue_message_s {
unsigned eNB_ue_s1ap_id:24;
uint32_t mme_ue_s1ap_id;
......
//WARNING: Do not include this header directly. Use intertask_interface.h instead.
MESSAGE_DEF(SCTP_INIT_MSG, MESSAGE_PRIORITY_MED, SctpInit, sctpInit)
MESSAGE_DEF(SCTP_NEW_DATA_REQ, MESSAGE_PRIORITY_MED, SctpNewDataReq, sctpNewDataReq)
MESSAGE_DEF(SCTP_DATA_REQ, MESSAGE_PRIORITY_MED, sctp_data_req_t, sctp_data_req)
MESSAGE_DEF(SCTP_DATA_IND, MESSAGE_PRIORITY_MED, sctp_data_ind_t, sctp_data_ind)
MESSAGE_DEF(SCTP_NEW_ASSOCIATION, MESSAGE_PRIORITY_MAX, sctp_new_peer_t, sctp_new_peer)
MESSAGE_DEF(SCTP_CLOSE_ASSOCIATION, MESSAGE_PRIORITY_MAX, sctp_close_association_t, sctp_close_association)
#ifndef SCTP_MESSAGES_TYPES_H_
#define SCTP_MESSAGES_TYPES_H_
typedef struct {
#define SCTP_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.sctp_data_ind
#define SCTP_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.sctp_data_req
#define SCTP_INIT(mSGpTR) (mSGpTR)->ittiMsg.sctpInit
#define SCTP_CLOSE_ASSOCIATION(mSGpTR) (mSGpTR)->ittiMsg.sctp_close_association
typedef struct sctp_data_req_s {
uint8_t *buffer;
uint32_t bufLen;
uint32_t assocId;
uint16_t stream;
} SctpNewDataReq;
} sctp_data_req_t;
typedef struct sctp_data_ind_s {
uint8_t *buffer; ///< SCTP buffer
uint32_t buf_length; ///< SCTP buffer length
int32_t assoc_id; ///< SCTP physical association ID
uint8_t stream; ///< Stream number on which data had been received
uint16_t instreams; ///< Number of input streams for the SCTP connection between peers
uint16_t outstreams; ///< Number of output streams for the SCTP connection between peers
} sctp_data_ind_t;
typedef struct {
typedef struct sctp_init_s {
/* Request usage of ipv4 */
unsigned ipv4:1;
/* Request usage of ipv6 */
......@@ -21,11 +35,11 @@ typedef struct {
uint32_t ppid;
} SctpInit;
typedef struct {
typedef struct sctp_close_association_s {
uint32_t assoc_id;
} sctp_close_association_t;
typedef struct {
typedef struct sctp_new_peer_s {
uint32_t instreams;
uint32_t outstreams;
uint32_t assoc_id;
......
ACLOCAL_AMFLAGS = -I m4
AM_CFLAGS = @ADD_CFLAGS@ \
-I$(top_srcdir)/COMMON \
-I$(top_srcdir)/UTILS \
-I$(top_srcdir)/NAS/EURECOM-NAS/src/api/network \
AM_CFLAGS = @ADD_CFLAGS@ \
-I$(top_srcdir)/COMMON \
-I$(top_srcdir)/UTILS \
-I$(top_srcdir)/NAS/EURECOM-NAS/src/api/network \
-I$(top_srcdir)/NAS/EURECOM-NAS/src/include \
-I$(top_srcdir)/INTERTASK_INTERFACE
......@@ -12,52 +12,54 @@ BUILT_SOURCES = \
messages.xml \
messages_xml.h
messages_hdr = \
messages_hdr = \
$(top_srcdir)/INTERTASK_INTERFACE/intertask_messages_def.h \
$(top_srcdir)/INTERTASK_INTERFACE/timer_messages_def.h \
$(top_srcdir)/INTERTASK_INTERFACE/timer_messages_types.h \
$(top_srcdir)/COMMON/tasks_def.h \
$(top_srcdir)/COMMON/messages_def.h \
$(top_srcdir)/COMMON/messages_types.h \
$(top_srcdir)/COMMON/gtpv1_u_messages_def.h \
$(top_srcdir)/COMMON/gtpv1_u_messages_types.h \
$(top_srcdir)/COMMON/nas_messages_def.h \
$(top_srcdir)/COMMON/nas_messages_types.h \
$(top_srcdir)/COMMON/s11_messages_def.h \
$(top_srcdir)/COMMON/s11_messages_types.h \
$(top_srcdir)/COMMON/s1ap_messages_def.h \
$(top_srcdir)/COMMON/s1ap_messages_types.h \
$(top_srcdir)/COMMON/s6a_messages_def.h \
$(top_srcdir)/COMMON/s6a_messages_types.h \
$(top_srcdir)/COMMON/sgw_lite_def.h \
$(top_srcdir)/COMMON/sgw_lite_messages_types.h \
$(top_srcdir)/COMMON/sctp_messages_def.h \
$(top_srcdir)/COMMON/sctp_messages_types.h \
$(top_srcdir)/COMMON/udp_messages_def.h \
$(top_srcdir)/COMMON/tasks_def.h \
$(top_srcdir)/COMMON/messages_def.h \
$(top_srcdir)/COMMON/messages_types.h \
$(top_srcdir)/COMMON/gtpv1_u_messages_def.h \
$(top_srcdir)/COMMON/gtpv1_u_messages_types.h \
$(top_srcdir)/COMMON/nas_messages_def.h \
$(top_srcdir)/COMMON/nas_messages_types.h \
$(top_srcdir)/COMMON/s11_messages_def.h \
$(top_srcdir)/COMMON/s11_messages_types.h \
$(top_srcdir)/COMMON/s1ap_messages_def.h \
$(top_srcdir)/COMMON/s1ap_messages_types.h \
$(top_srcdir)/COMMON/s6a_messages_def.h \
$(top_srcdir)/COMMON/s6a_messages_types.h \
$(top_srcdir)/COMMON/sgw_lite_def.h \
$(top_srcdir)/COMMON/sgw_lite_messages_types.h \
$(top_srcdir)/COMMON/sctp_messages_def.h \
$(top_srcdir)/COMMON/sctp_messages_types.h \
$(top_srcdir)/COMMON/udp_messages_def.h \
$(top_srcdir)/COMMON/udp_messages_types.h
messages.xml: $(top_srcdir)/INTERTASK_INTERFACE/intertask_interface_types.h $(messages_hdr)
gccxml $(AM_CFLAGS) $< -fxml=$(top_builddir)/$@
@echo "Generating $<"
@gccxml $(AM_CFLAGS) $< -fxml=$(top_builddir)/$@
messages_xml.h: messages.xml
sed -e 's/[ ]*//' -e 's/"/\\"/g' -e 's/^/"/' -e 's/$$/"/' messages.xml > messages_xml.h
@echo "Generating $<"
@sed -e 's/[ ]*//' -e 's/"/\\"/g' -e 's/^/"/' -e 's/$$/"/' messages.xml > messages_xml.h
endif
SUBDIRS = \
. \
. \
GTPV1-U \
GTPV2-C \
INTERTASK_INTERFACE \
SGI \
NAS \
INTERTASK_INTERFACE \
SGI \
NAS \
SCTP \
S11 \
S11 \
S1AP \
S6A \
SECU \
SGW-LITE \
UTILS \
UDP \
UDP \
MME_APP \
TEST \
OAISIM_MME \
......
This diff is collapsed.
This diff is collapsed.
......@@ -413,7 +413,7 @@ int emm_proc_lowerlayer_release(void)
/****************************************************************************
** **
** Name: emm_as_set_security_data() **
** Name: emm_as_set_security_data() **
** **
** Description: Setup security data according to the given EPS security **
** context when data transfer to lower layers is requested **
......
/*****************************************************************************
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Source EmmCommonProcedureInitiated.c
Source EmmCommonProcedureInitiated.c
Version 0.1
Version 0.1
Date 2012/10/03
Date 2012/10/03
Product NAS stack
Product NAS stack
Subsystem EPS Mobility Management
Subsystem EPS Mobility Management
Author Frederic Maurel
Author Frederic Maurel
Description Implements the EPS Mobility Management procedures executed
when the EMM-SAP is in EMM-COMMON-PROCEDURE-INITIATED state.
Description Implements the EPS Mobility Management procedures executed
when the EMM-SAP is in EMM-COMMON-PROCEDURE-INITIATED state.
In EMM-COMMON-PROCEDURE-INITIATED state, the MME has started
a common EMM procedure and is waiting for a response from the
UE.
In EMM-COMMON-PROCEDURE-INITIATED state, the MME has started
a common EMM procedure and is waiting for a response from the
UE.
*****************************************************************************/
......@@ -47,102 +47,102 @@ Description Implements the EPS Mobility Management procedures executed
/****************************************************************************
** **
** Name: EmmCommonProcedureInitiated() **
** Name: EmmCommonProcedureInitiated() **
** **
** Description: Handles the behaviour of the MME while the EMM-SAP is in **
** EMM_COMMON_PROCEDURE_INITIATED state. **
** EMM_COMMON_PROCEDURE_INITIATED state. **
** **
** 3GPP TS 24.301, section 5.1.3.4.2 **
** **
** Inputs: evt: The received EMM-SAP event **
** Others: emm_fsm_status **
** Inputs: evt: The received EMM-SAP event **
** Others: emm_fsm_status **
** **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: emm_fsm_status **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: emm_fsm_status **
** **
***************************************************************************/
int EmmCommonProcedureInitiated(const emm_reg_t* evt)
int EmmCommonProcedureInitiated(const emm_reg_t *evt)
{
int rc = RETURNerror;
LOG_FUNC_IN;
assert(emm_fsm_get_status(evt->ueid, evt->ctx) == EMM_COMMON_PROCEDURE_INITIATED);
switch (evt->primitive)
{
case _EMMREG_PROC_ABORT:
/*
* The EMM procedure that initiated EMM common procedure aborted
*/
rc = emm_proc_common_abort(evt->ueid);
break;
case _EMMREG_COMMON_PROC_CNF:
/*
* An EMM common procedure successfully completed;
*/
if (evt->u.common.is_attached) {
assert(emm_fsm_get_status(evt->ueid,
evt->ctx) == EMM_COMMON_PROCEDURE_INITIATED);
switch (evt->primitive) {
case _EMMREG_PROC_ABORT:
/*
* The EMM procedure that initiated EMM common procedure aborted
*/
rc = emm_proc_common_abort(evt->ueid);
break;
case _EMMREG_COMMON_PROC_CNF:
/*
* An EMM common procedure successfully completed;
*/
if (evt->u.common.is_attached) {
rc = emm_fsm_set_status(evt->ueid, evt->ctx, EMM_REGISTERED);
} else {
} else {
rc = emm_fsm_set_status(evt->ueid, evt->ctx, EMM_DEREGISTERED);
}
if (rc != RETURNerror) {
rc = emm_proc_common_success(evt->ueid);
}
break;
case _EMMREG_COMMON_PROC_REJ:
/*
* An EMM common procedure failed;
* enter state EMM-DEREGISTERED.
*/
}
if (rc != RETURNerror) {
rc = emm_proc_common_success(evt->ueid);
}
break;
case _EMMREG_COMMON_PROC_REJ:
/*
* An EMM common procedure failed;
* enter state EMM-DEREGISTERED.
*/
rc = emm_fsm_set_status(evt->ueid, evt->ctx, EMM_DEREGISTERED);
if (rc != RETURNerror) {
rc = emm_proc_common_reject(evt->ueid);
}
break;
case _EMMREG_ATTACH_CNF:
/*
* Attach procedure successful and default EPS bearer
* context activated;
* enter state EMM-REGISTERED.
*/
if (rc != RETURNerror) {
rc = emm_proc_common_reject(evt->ueid);
}
break;
case _EMMREG_ATTACH_CNF:
/*
* Attach procedure successful and default EPS bearer
* context activated;
* enter state EMM-REGISTERED.
*/
rc = emm_fsm_set_status(evt->ueid, evt->ctx, EMM_REGISTERED);
break;
break;
case _EMMREG_ATTACH_REJ:
/*
* Attach procedure failed;
* enter state EMM-DEREGISTERED.
*/
case _EMMREG_ATTACH_REJ:
/*
* Attach procedure failed;
* enter state EMM-DEREGISTERED.
*/
rc = emm_fsm_set_status(evt->ueid, evt->ctx, EMM_DEREGISTERED);
break;
case _EMMREG_LOWERLAYER_SUCCESS:
/*
* Data successfully delivered to the network
*/
rc = RETURNok;
break;
case _EMMREG_LOWERLAYER_FAILURE:
/*
* Transmission failure occurred before the EMM common
* procedure being completed
*/
rc = emm_proc_common_failure(evt->ueid);
if (rc != RETURNerror) {
break;
case _EMMREG_LOWERLAYER_SUCCESS:
/*
* Data successfully delivered to the network
*/
rc = RETURNok;
break;
case _EMMREG_LOWERLAYER_FAILURE:
/*
* Transmission failure occurred before the EMM common
* procedure being completed
*/
rc = emm_proc_common_failure(evt->ueid);
if (rc != RETURNerror) {
rc = emm_fsm_set_status(evt->ueid, evt->ctx, EMM_DEREGISTERED);
}
break;
}
break;
default:
LOG_TRACE(ERROR, "EMM-FSM - Primitive is not valid (%d)",
evt->primitive);
break;
default:
LOG_TRACE(ERROR, "EMM-FSM - Primitive is not valid (%d)",
evt->primitive);
break;
}
LOG_FUNC_RETURN (rc);
......
/*****************************************************************************
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Source EmmDeregistered.c
Source EmmDeregistered.c
Version 0.1
Version 0.1
Date 2012/10/03
Date 2012/10/03
Product NAS stack
Product NAS stack
Subsystem EPS Mobility Management
Subsystem EPS Mobility Management
Author Frederic Maurel
Author Frederic Maurel
Description Implements the EPS Mobility Management procedures executed
when the EMM-SAP is in EMM-DEREGISTERED state.
Description Implements the EPS Mobility Management procedures executed
when the EMM-SAP is in EMM-DEREGISTERED state.
In EMM-DEREGISTERED state, no EMM context has been established
or the EMM context is marked as detached.
The UE shall start the attach or combined attach procedure to
establish an EMM context.
In EMM-DEREGISTERED state, no EMM context has been established
or the EMM context is marked as detached.
The UE shall start the attach or combined attach procedure to
establish an EMM context.
The MME may answer to an attach or a combined attach procedure
initiated by the UE. It may also answer to a tracking area
updating procedure or combined tracking area updating procedure
initiated by a UE if the EMM context is marked as detached.
The MME may answer to an attach or a combined attach procedure
initiated by the UE. It may also answer to a tracking area
updating procedure or combined tracking area updating procedure
initiated by a UE if the EMM context is marked as detached.
*****************************************************************************/
......@@ -52,22 +52,22 @@ Description Implements the EPS Mobility Management procedures executed
/****************************************************************************
** **
** Name: EmmDeregistered() **
** Name: EmmDeregistered() **
** **
** Description: Handles the behaviour of the UE and the MME while the **
** EMM-SAP is in EMM-DEREGISTERED state. **
** EMM-SAP is in EMM-DEREGISTERED state. **
** **
** 3GPP TS 24.301, section 5.2.2.2 **
** **
** Inputs: evt: The received EMM-SAP event **
** Others: emm_fsm_status **
** Inputs: evt: The received EMM-SAP event **
** Others: emm_fsm_status **
** **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: emm_fsm_status **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: emm_fsm_status **
** **
***************************************************************************/
int EmmDeregistered(const emm_reg_t* evt)
int EmmDeregistered(const emm_reg_t *evt)
{
LOG_FUNC_IN;
......@@ -84,7 +84,7 @@ int EmmDeregistered(const emm_reg_t* evt)
/* Delete the authentication data RAND and RES */
rc = emm_proc_authentication_delete();
if (rc != RETURNok) {
LOG_FUNC_RETURN (rc);
LOG_FUNC_RETURN (rc);
}
/* TODO: 3GPP TS 24.301, section 4.4.2.1
* The UE shall store the current native EPS security context as specified
......@@ -94,94 +94,93 @@ int EmmDeregistered(const emm_reg_t* evt)
*/
#endif
switch (evt->primitive)
{
switch (evt->primitive) {
#ifdef NAS_UE
case _EMMREG_NO_IMSI:
/*
* The UE was powered on without a valid USIM application present
*/
rc = emm_fsm_set_status(EMM_DEREGISTERED_NO_IMSI);
break;
case _EMMREG_REGISTER_REQ:
/*
* The default EMM primary substate when the UE is switched on
* with valid USIM application shall be PLMN-SEARCH
*/
rc = emm_fsm_set_status(EMM_DEREGISTERED_PLMN_SEARCH);
if (rc != RETURNerror) {
/* Process the network registration request */
rc = emm_fsm_process(evt);
}
break;
case _EMMREG_ATTACH_INIT:
/*
* Attach procedure has to be restarted (timers T3402 or T3411
* expired) while the UE locally detached from the network
*/
/* Move to the corresponding initial EMM state */
if (evt->u.attach.is_emergency) {
rc = emm_fsm_set_status(EMM_DEREGISTERED_LIMITED_SERVICE);
} else {
rc = emm_fsm_set_status(EMM_DEREGISTERED_NORMAL_SERVICE);
}
if (rc != RETURNerror) {
/* Restart the attach procedure */
rc = emm_proc_attach_restart();
}
break;
case _EMMREG_NO_IMSI:
/*
* The UE was powered on without a valid USIM application present
*/
rc = emm_fsm_set_status(EMM_DEREGISTERED_NO_IMSI);
break;
case _EMMREG_REGISTER_REQ:
/*
* The default EMM primary substate when the UE is switched on
* with valid USIM application shall be PLMN-SEARCH
*/
rc = emm_fsm_set_status(EMM_DEREGISTERED_PLMN_SEARCH);
if (rc != RETURNerror) {
/* Process the network registration request */
rc = emm_fsm_process(evt);
}
break;
case _EMMREG_ATTACH_INIT:
/*
* Attach procedure has to be restarted (timers T3402 or T3411
* expired) while the UE locally detached from the network
*/
/* Move to the corresponding initial EMM state */
if (evt->u.attach.is_emergency) {
rc = emm_fsm_set_status(EMM_DEREGISTERED_LIMITED_SERVICE);
} else {
rc = emm_fsm_set_status(EMM_DEREGISTERED_NORMAL_SERVICE);
}
if (rc != RETURNerror) {
/* Restart the attach procedure */
rc = emm_proc_attach_restart();
}
break;
#endif
#ifdef NAS_MME
case _EMMREG_PROC_ABORT:
/*
* Ongoing EMM procedure aborted
*/
rc = RETURNok;
break;
case _EMMREG_COMMON_PROC_REQ:
/*
* An EMM common procedure has been initiated;
* enter state EMM-COMMON-PROCEDURE-INITIATED.
*/
case _EMMREG_PROC_ABORT:
/*
* Ongoing EMM procedure aborted
*/
rc = RETURNok;
break;
case _EMMREG_COMMON_PROC_REQ:
/*
* An EMM common procedure has been initiated;
* enter state EMM-COMMON-PROCEDURE-INITIATED.
*/
rc = emm_fsm_set_status(evt->ueid, evt->ctx, EMM_COMMON_PROCEDURE_INITIATED);
break;
case _EMMREG_ATTACH_CNF:
/*
* Attach procedure successful and default EPS bearer
* context activated;
* enter state EMM-REGISTERED.
*/
break;
case _EMMREG_ATTACH_CNF:
/*
* Attach procedure successful and default EPS bearer
* context activated;
* enter state EMM-REGISTERED.
*/
rc = emm_fsm_set_status(evt->ueid, evt->ctx, EMM_REGISTERED);
break;
break;
#endif
case _EMMREG_LOWERLAYER_SUCCESS:
/*
* Data successfully delivered to the network
*/
rc = RETURNok;
break;
case _EMMREG_LOWERLAYER_FAILURE:
/*
* Data failed to be delivered to the network
*/
rc = RETURNok;
break;
default:
LOG_TRACE(ERROR, "EMM-FSM - Primitive is not valid (%d)",
evt->primitive);
break;
case _EMMREG_LOWERLAYER_SUCCESS:
/*
* Data successfully delivered to the network
*/
rc = RETURNok;
break;
case _EMMREG_LOWERLAYER_FAILURE:
/*
* Data failed to be delivered to the network
*/
rc = RETURNok;
break;
default:
LOG_TRACE(ERROR, "EMM-FSM - Primitive is not valid (%d)",
evt->primitive);
break;
}
#ifdef NAS_UE
......
/*****************************************************************************
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Source EmmDeregisteredAttachNeeded.c
Source EmmDeregisteredAttachNeeded.c
Version 0.1
Version 0.1
Date 2012/10/03
Date 2012/10/03
Product NAS stack
Product NAS stack
Subsystem EPS Mobility Management
Subsystem EPS Mobility Management
Author Frederic Maurel
Author Frederic Maurel
Description Implements the EPS Mobility Management procedures executed
when the EMM-SAP is in EMM-DEREGISTERED.ATTACH-NEEDED state.
Description Implements the EPS Mobility Management procedures executed
when the EMM-SAP is in EMM-DEREGISTERED.ATTACH-NEEDED state.
In EMM-DEREGISTERED.ATTACH-NEEDED state, Valid subscriber
data are available for the UE and for some reason an attach
must be performed as soon as possible. The access class may
be blocked due to access class control, or the network rejec-
ted the NAS signalling connection establishment.
In EMM-DEREGISTERED.ATTACH-NEEDED state, Valid subscriber
data are available for the UE and for some reason an attach
must be performed as soon as possible. The access class may
be blocked due to access class control, or the network rejec-
ted the NAS signalling connection establishment.
*****************************************************************************/
......@@ -47,20 +47,20 @@ Description Implements the EPS Mobility Management procedures executed
/****************************************************************************
** **
** Name: EmmDeregisteredAttachNeeded() **
** Name: EmmDeregisteredAttachNeeded() **
** **
** Description: Handles the behaviour of the UE while the EMM-SAP is in **
** EMM-DEREGISTERED.ATTACH-NEEDED state. **
** EMM-DEREGISTERED.ATTACH-NEEDED state. **
** **
** Inputs: evt: The received EMM-SAP event **
** Others: emm_fsm_status **
** Inputs: evt: The received EMM-SAP event **
** Others: emm_fsm_status **
** **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: emm_fsm_status **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: emm_fsm_status **
** **
***************************************************************************/
int EmmDeregisteredAttachNeeded(const emm_reg_t* evt)
int EmmDeregisteredAttachNeeded(const emm_reg_t *evt)
{
LOG_FUNC_IN;
......
/*****************************************************************************
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Source EmmDeregisteredAttemptingToAttach.c
Source EmmDeregisteredAttemptingToAttach.c
Version 0.1
Version 0.1
Date 2012/10/03
Date 2012/10/03
Product NAS stack
Product NAS stack
Subsystem EPS Mobility Management
Subsystem EPS Mobility Management
Author Frederic Maurel
Author Frederic Maurel
Description Implements the EPS Mobility Management procedures executed
when the EMM-SAP is in EMM-DEREGISTERED.ATTEMPTING-TO-ATTACH
state.
Description Implements the EPS Mobility Management procedures executed
when the EMM-SAP is in EMM-DEREGISTERED.ATTEMPTING-TO-ATTACH
state.
In EMM-DEREGISTERED.ATTEMPTING-TO-ATTACH state, the EPS update
status is EU2, and a previous attach was not successful.
In EMM-DEREGISTERED.ATTEMPTING-TO-ATTACH state, the EPS update
status is EU2, and a previous attach was not successful.
*****************************************************************************/
......@@ -47,22 +47,22 @@ Description Implements the EPS Mobility Management procedures executed
/****************************************************************************
** **
** Name: EmmDeregisteredAttemptingToAttach() **
** Name: EmmDeregisteredAttemptingToAttach() **
** **
** Description: Handles the behaviour of the UE while the EMM-SAP is in **
** EMM-DEREGISTERED.ATTEMPTING-TO-ATTACH state. **
** EMM-DEREGISTERED.ATTEMPTING-TO-ATTACH state. **
** **
** 3GPP TS 24.301, section 5.2.2.3.3 **
** **
** Inputs: evt: The received EMM-SAP event **
** Others: emm_fsm_status **
** Inputs: evt: The received EMM-SAP event **
** Others: emm_fsm_status **
** **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: emm_fsm_status **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: emm_fsm_status **
** **
***************************************************************************/
int EmmDeregisteredAttemptingToAttach(const emm_reg_t* evt)
int EmmDeregisteredAttemptingToAttach(const emm_reg_t *evt)
{
LOG_FUNC_IN;
......@@ -70,44 +70,43 @@ int EmmDeregisteredAttemptingToAttach(const emm_reg_t* evt)
assert(emm_fsm_get_status() == EMM_DEREGISTERED_ATTEMPTING_TO_ATTACH);
switch (evt->primitive)
{
case _EMMREG_ATTACH_INIT:
/*
* Attach procedure has to be restarted (timers T3402 or T3411
* expired)
*/
/* Move to the corresponding initial EMM state */
if (evt->u.attach.is_emergency) {
rc = emm_fsm_set_status(EMM_DEREGISTERED_LIMITED_SERVICE);
} else {
rc = emm_fsm_set_status(EMM_DEREGISTERED_NORMAL_SERVICE);
}
if (rc != RETURNerror) {
/* Restart the attach procedure */
rc = emm_proc_attach_restart();
}
break;
case _EMMREG_LOWERLAYER_SUCCESS:
/*
* Data successfully delivered to the network
*/
rc = emm_proc_lowerlayer_success();
break;
case _EMMREG_LOWERLAYER_FAILURE:
/*
* Data failed to be delivered to the network
*/
rc = emm_proc_lowerlayer_failure(FALSE);
break;
default:
LOG_TRACE(ERROR, "EMM-FSM - Primitive is not valid (%d)",
evt->primitive);
break;
switch (evt->primitive) {
case _EMMREG_ATTACH_INIT:
/*
* Attach procedure has to be restarted (timers T3402 or T3411
* expired)
*/
/* Move to the corresponding initial EMM state */
if (evt->u.attach.is_emergency) {
rc = emm_fsm_set_status(EMM_DEREGISTERED_LIMITED_SERVICE);
} else {
rc = emm_fsm_set_status(EMM_DEREGISTERED_NORMAL_SERVICE);
}
if (rc != RETURNerror) {
/* Restart the attach procedure */
rc = emm_proc_attach_restart();
}
break;
case _EMMREG_LOWERLAYER_SUCCESS:
/*
* Data successfully delivered to the network
*/
rc = emm_proc_lowerlayer_success();
break;
case _EMMREG_LOWERLAYER_FAILURE:
/*
* Data failed to be delivered to the network
*/
rc = emm_proc_lowerlayer_failure(FALSE);
break;
default:
LOG_TRACE(ERROR, "EMM-FSM - Primitive is not valid (%d)",
evt->primitive);
break;
}
LOG_FUNC_RETURN (rc);
......
/*****************************************************************************
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Source EmmDeregisteredInitiated.c
Source EmmDeregisteredInitiated.c
Version 0.1
Version 0.1
Date 2012/10/03
Date 2012/10/03
Product NAS stack
Product NAS stack
Subsystem EPS Mobility Management
Subsystem EPS Mobility Management
Author Frederic Maurel
Author Frederic Maurel
Description Implements the EPS Mobility Management procedures executed
when the EMM-SAP is in EMM-DEREGISTERED-INITIATED state.
Description Implements the EPS Mobility Management procedures executed
when the EMM-SAP is in EMM-DEREGISTERED-INITIATED state.
In EMM-DEREGISTERED-INITIATED state, the UE has requested
release of the EMM context by starting the detach or combined
detach procedure and is waiting for a response from the MME.
The MME has started a detach procedure and is waiting for a
response from the UE.
In EMM-DEREGISTERED-INITIATED state, the UE has requested
release of the EMM context by starting the detach or combined
detach procedure and is waiting for a response from the MME.
The MME has started a detach procedure and is waiting for a
response from the UE.
*****************************************************************************/
......@@ -47,20 +47,20 @@ Description Implements the EPS Mobility Management procedures executed
/****************************************************************************
** **
** Name: EmmDeregisteredInitiated() **
** Name: EmmDeregisteredInitiated() **
** **
** Description: Handles the behaviour of the UE and the MME while the **
** EMM-SAP is in EMM-DEREGISTERED-INITIATED state. **
** EMM-SAP is in EMM-DEREGISTERED-INITIATED state. **
** **
** Inputs: evt: The received EMM-SAP event **
** Others: emm_fsm_status **
** Inputs: evt: The received EMM-SAP event **
** Others: emm_fsm_status **
** **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: emm_fsm_status **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: emm_fsm_status **
** **
***************************************************************************/
int EmmDeregisteredInitiated(const emm_reg_t* evt)
int EmmDeregisteredInitiated(const emm_reg_t *evt)
{
LOG_FUNC_IN;
......@@ -73,50 +73,49 @@ int EmmDeregisteredInitiated(const emm_reg_t* evt)
assert(emm_fsm_get_status(evt->ueid, evt->ctx) == EMM_DEREGISTERED_INITIATED);
#endif
switch (evt->primitive)
{
switch (evt->primitive) {
#ifdef NAS_UE
case _EMMREG_DETACH_CNF:
/*
* The UE explicitly detached from the network (all EPS
* bearer contexts have been deactivated as UE initiated
* detach procedure successfully completed)
*/
rc = emm_fsm_set_status(EMM_DEREGISTERED);
break;
case _EMMREG_DETACH_FAILED:
/*
* The detach procedure failed
*/
if (evt->u.detach.type == EMM_DETACH_TYPE_IMSI) {
rc = emm_fsm_set_status(EMM_REGISTERED_NORMAL_SERVICE);
} else {
rc = emm_fsm_set_status(EMM_DEREGISTERED);
}
break;
case _EMMREG_LOWERLAYER_SUCCESS:
/*
* Ignore Detach Request message successful retransmission
*/
rc = RETURNok;
break;
case _EMMREG_LOWERLAYER_FAILURE:
case _EMMREG_LOWERLAYER_RELEASE:
/*
* Lower layer failure or release of the NAS signalling connection
* before the Detach Accept is received
*/
rc = emm_proc_lowerlayer_release();
break;
case _EMMREG_DETACH_CNF:
/*
* The UE explicitly detached from the network (all EPS
* bearer contexts have been deactivated as UE initiated
* detach procedure successfully completed)
*/
rc = emm_fsm_set_status(EMM_DEREGISTERED);
break;
case _EMMREG_DETACH_FAILED:
/*
* The detach procedure failed
*/
if (evt->u.detach.type == EMM_DETACH_TYPE_IMSI) {
rc = emm_fsm_set_status(EMM_REGISTERED_NORMAL_SERVICE);
} else {
rc = emm_fsm_set_status(EMM_DEREGISTERED);
}
break;
case _EMMREG_LOWERLAYER_SUCCESS:
/*
* Ignore Detach Request message successful retransmission
*/
rc = RETURNok;
break;
case _EMMREG_LOWERLAYER_FAILURE:
case _EMMREG_LOWERLAYER_RELEASE:
/*
* Lower layer failure or release of the NAS signalling connection
* before the Detach Accept is received
*/
rc = emm_proc_lowerlayer_release();
break;
#endif
default:
LOG_TRACE(ERROR, "EMM-FSM - Primitive is not valid (%d)",
evt->primitive);
break;
default:
LOG_TRACE(ERROR, "EMM-FSM - Primitive is not valid (%d)",
evt->primitive);
break;
}
LOG_FUNC_RETURN (rc);
......
/*****************************************************************************
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Source EmmDeregisteredLimitedService.c
Source EmmDeregisteredLimitedService.c
Version 0.1
Version 0.1
Date 2012/10/03
Date 2012/10/03
Product NAS stack
Product NAS stack
Subsystem EPS Mobility Management
Subsystem EPS Mobility Management
Author Frederic Maurel
Author Frederic Maurel
Description Implements the EPS Mobility Management procedures executed
when the EMM-SAP is in EMM-DEREGISTERED.LIMITED-SERVICE state.
Description Implements the EPS Mobility Management procedures executed
when the EMM-SAP is in EMM-DEREGISTERED.LIMITED-SERVICE state.
In EMM-DEREGISTERED.LIMITED-SERVICE state, the EPS update
status is EU3, and it is known that a selected cell is unable
to provide normal service.
In EMM-DEREGISTERED.LIMITED-SERVICE state, the EPS update
status is EU3, and it is known that a selected cell is unable
to provide normal service.
*****************************************************************************/
......@@ -48,25 +48,25 @@ Description Implements the EPS Mobility Management procedures executed
/****************************************************************************
** **
** Name: EmmDeregisteredLimitedService() **
** Name: EmmDeregisteredLimitedService() **
** **
** Description: Handles the behaviour of the UE while the EMM-SAP is in **
** EMM-DEREGISTERED.LIMITED-SERVICE state. **
** EMM-DEREGISTERED.LIMITED-SERVICE state. **
** **
** 3GPP TS 24.301, section 5.2.2.3.2 **
** The UE shall initiate an attach or combined attach proce- **
** dure when entering a cell which provides normal service. **
** It may initiate attach for emergency bearer services. **
** The UE shall initiate an attach or combined attach proce- **
** dure when entering a cell which provides normal service. **
** It may initiate attach for emergency bearer services. **
** **
** Inputs: evt: The received EMM-SAP event **
** Others: emm_fsm_status **
** Inputs: evt: The received EMM-SAP event **
** Others: emm_fsm_status **
** **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: emm_fsm_status **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: emm_fsm_status **
** **
***************************************************************************/
int EmmDeregisteredLimitedService(const emm_reg_t* evt)
int EmmDeregisteredLimitedService(const emm_reg_t *evt)
{
LOG_FUNC_IN;
......@@ -74,61 +74,60 @@ int EmmDeregisteredLimitedService(const emm_reg_t* evt)
assert(emm_fsm_get_status() == EMM_DEREGISTERED_LIMITED_SERVICE);
switch (evt->primitive)
{
case _EMMREG_REGISTER_REQ:
/*
* The user manually re-selected a PLMN to register to
*/
rc = emm_fsm_set_status(EMM_DEREGISTERED_PLMN_SEARCH);
if (rc != RETURNerror) {
/* Process the network registration request */
rc = emm_fsm_process(evt);
}
break;
case _EMMREG_ATTACH_INIT:
/*
* Initiate attach procedure for emergency bearer services
*/
rc = emm_proc_attach(EMM_ATTACH_TYPE_EMERGENCY);
break;
case _EMMREG_ATTACH_REQ:
/*
* An attach for bearer emergency services has been requested
* (Attach Request message successfully delivered to the network);
* enter state EMM-REGISTERED-INITIATED
*/
rc = emm_fsm_set_status(EMM_REGISTERED_INITIATED);
break;
case _EMMREG_LOWERLAYER_SUCCESS:
/*
* Initial NAS message has been successfully delivered
* to the network
*/
rc = emm_proc_lowerlayer_success();
break;
case _EMMREG_LOWERLAYER_FAILURE:
/*
* Initial NAS message failed to be delivered to the network
*/
rc = emm_proc_lowerlayer_failure(TRUE);
break;
case _EMMREG_LOWERLAYER_RELEASE:
/*
* NAS signalling connection has been released
*/
rc = emm_proc_lowerlayer_release();
break;
default:
LOG_TRACE(ERROR, "EMM-FSM - Primitive is not valid (%d)",
evt->primitive);
break;
switch (evt->primitive) {
case _EMMREG_REGISTER_REQ:
/*
* The user manually re-selected a PLMN to register to
*/
rc = emm_fsm_set_status(EMM_DEREGISTERED_PLMN_SEARCH);
if (rc != RETURNerror) {
/* Process the network registration request */
rc = emm_fsm_process(evt);
}
break;
case _EMMREG_ATTACH_INIT:
/*
* Initiate attach procedure for emergency bearer services
*/
rc = emm_proc_attach(EMM_ATTACH_TYPE_EMERGENCY);
break;
case _EMMREG_ATTACH_REQ:
/*
* An attach for bearer emergency services has been requested
* (Attach Request message successfully delivered to the network);
* enter state EMM-REGISTERED-INITIATED
*/
rc = emm_fsm_set_status(EMM_REGISTERED_INITIATED);
break;
case _EMMREG_LOWERLAYER_SUCCESS:
/*
* Initial NAS message has been successfully delivered
* to the network
*/
rc = emm_proc_lowerlayer_success();
break;
case _EMMREG_LOWERLAYER_FAILURE:
/*
* Initial NAS message failed to be delivered to the network
*/
rc = emm_proc_lowerlayer_failure(TRUE);
break;
case _EMMREG_LOWERLAYER_RELEASE:
/*
* NAS signalling connection has been released
*/
rc = emm_proc_lowerlayer_release();
break;
default:
LOG_TRACE(ERROR, "EMM-FSM - Primitive is not valid (%d)",
evt->primitive);
break;
}
LOG_FUNC_RETURN (rc);
......
/*****************************************************************************
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Source EmmDeregisteredNoCellAvailable.c
Source EmmDeregisteredNoCellAvailable.c
Version 0.1
Version 0.1
Date 2012/10/03
Date 2012/10/03
Product NAS stack
Product NAS stack
Subsystem EPS Mobility Management
Subsystem EPS Mobility Management
Author Frederic Maurel
Author Frederic Maurel
Description Implements the EPS Mobility Management procedures executed
when the EMM-SAP is in EMM-DEREGISTERED.NO-CELL-AVAILABLE
state.
Description Implements the EPS Mobility Management procedures executed
when the EMM-SAP is in EMM-DEREGISTERED.NO-CELL-AVAILABLE
state.
In EMM-DEREGISTERED.NO-CELL-AVAILABLE state, no E-UTRAN cell
can be selected. A first intensive search failed when in
substate EMM_DEREGISTERED.PLMN-SEARCH. Cells are searched for
at a low rhythm. No EPS services are offered.
In EMM-DEREGISTERED.NO-CELL-AVAILABLE state, no E-UTRAN cell
can be selected. A first intensive search failed when in
substate EMM_DEREGISTERED.PLMN-SEARCH. Cells are searched for
at a low rhythm. No EPS services are offered.
*****************************************************************************/
......@@ -50,24 +50,24 @@ Description Implements the EPS Mobility Management procedures executed
/****************************************************************************
** **
** Name: EmmDeregisteredNoCellAvailable() **
** Name: EmmDeregisteredNoCellAvailable() **
** **
** Description: Handles the behaviour of the UE while the EMM-SAP is in **
** EMM-DEREGISTERED.NO-CELL-AVAILABLE state. **
** EMM-DEREGISTERED.NO-CELL-AVAILABLE state. **
** **
** 3GPP TS 24.301, section 5.2.2.3.7 **
** The UE shall perform cell selection and choose an appro- **
** priate substate when a cell is found. **
** The UE shall perform cell selection and choose an appro- **
** priate substate when a cell is found. **
** **
** Inputs: evt: The received EMM-SAP event **
** Others: emm_fsm_status **
** Inputs: evt: The received EMM-SAP event **
** Others: emm_fsm_status **
** **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: emm_fsm_status **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: emm_fsm_status **
** **
***************************************************************************/
int EmmDeregisteredNoCellAvailable(const emm_reg_t* evt)
int EmmDeregisteredNoCellAvailable(const emm_reg_t *evt)
{
LOG_FUNC_IN;
......@@ -75,39 +75,38 @@ int EmmDeregisteredNoCellAvailable(const emm_reg_t* evt)
assert(emm_fsm_get_status() == EMM_DEREGISTERED_NO_CELL_AVAILABLE);
switch (evt->primitive)
{
/* TODO: network re-selection is not allowed when in No Cell
* Available substate. The AS should search for a suitable cell
* and notify the NAS when such a cell is found (TS 24.008 section
* 4.2.4.1.2) */
case _EMMREG_REGISTER_REQ:
/*
* The user manually re-selected a PLMN to register to
*/
rc = emm_fsm_set_status(EMM_DEREGISTERED_PLMN_SEARCH);
if (rc != RETURNerror) {
/*
* Notify EMM that the MT is currently searching an operator
* to register to
*/
rc = emm_proc_registration_notify(NET_REG_STATE_ON);
if (rc != RETURNok) {
LOG_TRACE(WARNING, "EMM-FSM - "
"Failed to notify registration update");
}
/*
* Perform network re-selection procedure
*/
rc = emm_proc_plmn_selection(evt->u.regist.index);
}
break;
default:
LOG_TRACE(ERROR, "EMM-FSM - Primitive is not valid (%d)",
evt->primitive);
break;
switch (evt->primitive) {
/* TODO: network re-selection is not allowed when in No Cell
* Available substate. The AS should search for a suitable cell
* and notify the NAS when such a cell is found (TS 24.008 section
* 4.2.4.1.2) */
case _EMMREG_REGISTER_REQ:
/*
* The user manually re-selected a PLMN to register to
*/
rc = emm_fsm_set_status(EMM_DEREGISTERED_PLMN_SEARCH);
if (rc != RETURNerror) {
/*
* Notify EMM that the MT is currently searching an operator
* to register to
*/
rc = emm_proc_registration_notify(NET_REG_STATE_ON);
if (rc != RETURNok) {
LOG_TRACE(WARNING, "EMM-FSM - "
"Failed to notify registration update");
}
/*
* Perform network re-selection procedure
*/
rc = emm_proc_plmn_selection(evt->u.regist.index);
}
break;
default:
LOG_TRACE(ERROR, "EMM-FSM - Primitive is not valid (%d)",
evt->primitive);
break;
}
LOG_FUNC_RETURN (rc);
......
/*****************************************************************************
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Source EmmDeregisteredNoImsi.c
Source EmmDeregisteredNoImsi.c
Version 0.1
Version 0.1
Date 2012/10/03
Date 2012/10/03
Product NAS stack
Product NAS stack
Subsystem EPS Mobility Management
Subsystem EPS Mobility Management
Author Frederic Maurel
Author Frederic Maurel
Description Implements the EPS Mobility Management procedures executed
when the EMM-SAP is in EMM-DEREGISTERED.NO-IMSI state.
Description Implements the EPS Mobility Management procedures executed
when the EMM-SAP is in EMM-DEREGISTERED.NO-IMSI state.
In EMM-DEREGISTERED.NO-IMSI state, the UE is switched on
without a valid USIM inserted.
In EMM-DEREGISTERED.NO-IMSI state, the UE is switched on
without a valid USIM inserted.
*****************************************************************************/
......@@ -44,24 +44,24 @@ Description Implements the EPS Mobility Management procedures executed
/****************************************************************************
** **
** Name: EmmDeregisteredNoImsi() **
** Name: EmmDeregisteredNoImsi() **
** **
** Description: Handles the behaviour of the UE while the EMM-SAP is in **
** EMM-DEREGISTERED.NO-IMSI state. **
** EMM-DEREGISTERED.NO-IMSI state. **
** **
** 3GPP TS 24.301, section 5.2.2.3.5 **
** The UE shall perform cell selection and may initiate **
** attach for emergency bearer services. **
** The UE shall perform cell selection and may initiate **
** attach for emergency bearer services. **
** **
** Inputs: evt: The received EMM-SAP event **
** Others: emm_fsm_status **
** Inputs: evt: The received EMM-SAP event **
** Others: emm_fsm_status **
** **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: emm_fsm_status **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: emm_fsm_status **
** **
***************************************************************************/
int EmmDeregisteredNoImsi(const emm_reg_t* evt)
int EmmDeregisteredNoImsi(const emm_reg_t *evt)
{
LOG_FUNC_IN;
......
/*****************************************************************************
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Source EmmDeregisteredNormalService.c
Source EmmDeregisteredNormalService.c
Version 0.1
Version 0.1
Date 2012/10/03
Date 2012/10/03
Product NAS stack
Product NAS stack
Subsystem EPS Mobility Management
Subsystem EPS Mobility Management
Author Frederic Maurel
Author Frederic Maurel
Description Implements the EPS Mobility Management procedures executed
when the EMM-SAP is in EMM-DEREGISTERED.NORMAL-SERVICE state.
Description Implements the EPS Mobility Management procedures executed
when the EMM-SAP is in EMM-DEREGISTERED.NORMAL-SERVICE state.
In EMM-DEREGISTERED.NORMAL-SERVICE state, the EPS update
status is EU1 or EU2, in the meantime a suitable cell has
been found and the PLMN or tracking area is not in the
forbidden list.
In EMM-DEREGISTERED.NORMAL-SERVICE state, the EPS update
status is EU1 or EU2, in the meantime a suitable cell has
been found and the PLMN or tracking area is not in the
forbidden list.
*****************************************************************************/
......@@ -49,24 +49,24 @@ Description Implements the EPS Mobility Management procedures executed
/****************************************************************************
** **
** Name: EmmDeregisteredNormalService() **
** Name: EmmDeregisteredNormalService() **
** **
** Description: Handles the behaviour of the UE while the EMM-SAP is in **
** EMM-DEREGISTERED.NORMAL-SERVICE state. **
** EMM-DEREGISTERED.NORMAL-SERVICE state. **
** **
** 3GPP TS 24.301, section 5.2.2.3.1 **
** The UE shall initiate an attach or combined attach proce- **
** dure. **
** The UE shall initiate an attach or combined attach proce- **
** dure. **
** **
** Inputs: evt: The received EMM-SAP event **
** Others: emm_fsm_status **
** Inputs: evt: The received EMM-SAP event **
** Others: emm_fsm_status **
** **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: emm_fsm_status **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: emm_fsm_status **
** **
***************************************************************************/
int EmmDeregisteredNormalService(const emm_reg_t* evt)
int EmmDeregisteredNormalService(const emm_reg_t *evt)
{
LOG_FUNC_IN;
......@@ -74,56 +74,55 @@ int EmmDeregisteredNormalService(const emm_reg_t* evt)
assert(emm_fsm_get_status() == EMM_DEREGISTERED_NORMAL_SERVICE);
switch (evt->primitive)
{
case _EMMREG_REGISTER_REQ:
/*
* The user manually re-selected a PLMN to register to
*/
rc = emm_fsm_set_status(EMM_DEREGISTERED_PLMN_SEARCH);
if (rc != RETURNerror) {
/* Process the network registration request */
rc = emm_fsm_process(evt);
}
break;
case _EMMREG_ATTACH_INIT:
/*
* Initiate the attach procedure for EPS services
*/
rc = emm_proc_attach(EMM_ATTACH_TYPE_EPS);
break;
case _EMMREG_ATTACH_REQ:
/*
* An EPS network attach has been requested (Attach Request
* message successfully delivered to the network);
* enter state EMM-REGISTERED-INITIATED
*/
rc = emm_fsm_set_status(EMM_REGISTERED_INITIATED);
break;
case _EMMREG_LOWERLAYER_SUCCESS:
/*
* Initial NAS message has been successfully delivered
* to the network
*/
rc = emm_proc_lowerlayer_success();
break;
case _EMMREG_LOWERLAYER_FAILURE:
/*
* Initial NAS message failed to be delivered to the network
*/
rc = emm_proc_lowerlayer_failure(TRUE);
break;
case _EMMREG_LOWERLAYER_RELEASE:
/*
* NAS signalling connection has been released
*/
rc = emm_proc_lowerlayer_release();
break;
switch (evt->primitive) {
case _EMMREG_REGISTER_REQ:
/*
* The user manually re-selected a PLMN to register to
*/
rc = emm_fsm_set_status(EMM_DEREGISTERED_PLMN_SEARCH);
if (rc != RETURNerror) {
/* Process the network registration request */
rc = emm_fsm_process(evt);
}
break;
case _EMMREG_ATTACH_INIT:
/*
* Initiate the attach procedure for EPS services
*/
rc = emm_proc_attach(EMM_ATTACH_TYPE_EPS);
break;
case _EMMREG_ATTACH_REQ:
/*
* An EPS network attach has been requested (Attach Request
* message successfully delivered to the network);
* enter state EMM-REGISTERED-INITIATED
*/
rc = emm_fsm_set_status(EMM_REGISTERED_INITIATED);
break;
case _EMMREG_LOWERLAYER_SUCCESS:
/*
* Initial NAS message has been successfully delivered
* to the network
*/
rc = emm_proc_lowerlayer_success();
break;
case _EMMREG_LOWERLAYER_FAILURE:
/*
* Initial NAS message failed to be delivered to the network
*/
rc = emm_proc_lowerlayer_failure(TRUE);
break;
case _EMMREG_LOWERLAYER_RELEASE:
/*
* NAS signalling connection has been released
*/
rc = emm_proc_lowerlayer_release();
break;
case _EMMREG_ATTACH_CNF:
/*
......@@ -134,10 +133,10 @@ int EmmDeregisteredNormalService(const emm_reg_t* evt)
rc = emm_fsm_set_status(EMM_REGISTERED);
break;
default:
LOG_TRACE(ERROR, "EMM-FSM - Primitive is not valid (%d)",
evt->primitive);
break;
default:
LOG_TRACE(ERROR, "EMM-FSM - Primitive is not valid (%d)",
evt->primitive);
break;
}
LOG_FUNC_RETURN (rc);
......
/*****************************************************************************
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Source EmmDeregisteredPlmnSearch.c
Source EmmDeregisteredPlmnSearch.c
Version 0.1
Version 0.1
Date 2012/10/03
Date 2012/10/03
Product NAS stack
Product NAS stack
Subsystem EPS Mobility Management
Subsystem EPS Mobility Management
Author Frederic Maurel
Author Frederic Maurel
Description Implements the EPS Mobility Management procedures executed
when the EMM-SAP is in EMM-DEREGISTERED.PLMN-SEARCH state.
Description Implements the EPS Mobility Management procedures executed
when the EMM-SAP is in EMM-DEREGISTERED.PLMN-SEARCH state.
In EMM-DEREGISTERED.PLMN-SEARCH state, the UE with a valid
USIM is switched on.
In EMM-DEREGISTERED.PLMN-SEARCH state, the UE with a valid
USIM is switched on.
*****************************************************************************/
......@@ -47,25 +47,25 @@ Description Implements the EPS Mobility Management procedures executed
/****************************************************************************
** **
** Name: EmmDeregisteredPlmnSearch() **
** Name: EmmDeregisteredPlmnSearch() **
** **
** Description: Handles the behaviour of the UE while the EMM-SAP is in **
** EMM-DEREGISTERED.PLMN-SEARCH state. **
** EMM-DEREGISTERED.PLMN-SEARCH state. **
** **
** 3GPP TS 24.301, section 5.2.2.3.4 **
** The UE shall perform PLMN selection. If a new PLMN is **
** selected, the UE shall reset the attach attempt counter **
** and initiate the attach or combined attach procedure. **
** The UE shall perform PLMN selection. If a new PLMN is **
** selected, the UE shall reset the attach attempt counter **
** and initiate the attach or combined attach procedure. **
** **
** Inputs: evt: The received EMM-SAP event **
** Others: emm_fsm_status **
** Inputs: evt: The received EMM-SAP event **
** Others: emm_fsm_status **
** **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: emm_fsm_status **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: emm_fsm_status **
** **
***************************************************************************/
int EmmDeregisteredPlmnSearch(const emm_reg_t* evt)
int EmmDeregisteredPlmnSearch(const emm_reg_t *evt)
{
LOG_FUNC_IN;
......@@ -73,57 +73,56 @@ int EmmDeregisteredPlmnSearch(const emm_reg_t* evt)
assert(emm_fsm_get_status() == EMM_DEREGISTERED_PLMN_SEARCH);
switch (evt->primitive)
{
case _EMMREG_NO_CELL:
/*
* No suitable cell of the selected PLMN has been found to camp on
*/
rc = emm_proc_registration_notify(NET_REG_STATE_DENIED);
if (rc != RETURNok) {
LOG_TRACE(WARNING, "EMM-FSM - "
"Failed to notify registration update");
}
rc = emm_fsm_set_status(EMM_DEREGISTERED_NO_CELL_AVAILABLE);
break;
case _EMMREG_REGISTER_REQ:
/*
* The UE has been switched on and is currently searching an
* operator to register to. The particular PLMN to be contacted
* may be selected either automatically or manually.
* Or the user manually re-selected a PLMN to register to.
*/
rc = emm_proc_registration_notify(NET_REG_STATE_ON);
if (rc != RETURNok) {
LOG_TRACE(WARNING, "EMM-FSM - "
"Failed to notify registration update");
}
/*
* Perform network selection procedure
*/
rc = emm_proc_plmn_selection(evt->u.regist.index);
break;
case _EMMREG_REGISTER_REJ:
/*
* The selected cell is known not to be able to provide normal
* service
*/
rc = emm_fsm_set_status(EMM_DEREGISTERED_LIMITED_SERVICE);
break;
case _EMMREG_REGISTER_CNF:
/*
* A suitable cell of the selected PLMN has been found to camp on
*/
rc = emm_fsm_set_status(EMM_DEREGISTERED_NORMAL_SERVICE);
break;
default:
LOG_TRACE(ERROR, "EMM-FSM - Primitive is not valid (%d)",
evt->primitive);
break;
switch (evt->primitive) {
case _EMMREG_NO_CELL:
/*
* No suitable cell of the selected PLMN has been found to camp on
*/
rc = emm_proc_registration_notify(NET_REG_STATE_DENIED);
if (rc != RETURNok) {
LOG_TRACE(WARNING, "EMM-FSM - "
"Failed to notify registration update");
}
rc = emm_fsm_set_status(EMM_DEREGISTERED_NO_CELL_AVAILABLE);
break;
case _EMMREG_REGISTER_REQ:
/*
* The UE has been switched on and is currently searching an
* operator to register to. The particular PLMN to be contacted
* may be selected either automatically or manually.
* Or the user manually re-selected a PLMN to register to.
*/
rc = emm_proc_registration_notify(NET_REG_STATE_ON);
if (rc != RETURNok) {
LOG_TRACE(WARNING, "EMM-FSM - "
"Failed to notify registration update");
}
/*
* Perform network selection procedure
*/
rc = emm_proc_plmn_selection(evt->u.regist.index);
break;
case _EMMREG_REGISTER_REJ:
/*
* The selected cell is known not to be able to provide normal
* service
*/
rc = emm_fsm_set_status(EMM_DEREGISTERED_LIMITED_SERVICE);
break;
case _EMMREG_REGISTER_CNF:
/*
* A suitable cell of the selected PLMN has been found to camp on
*/
rc = emm_fsm_set_status(EMM_DEREGISTERED_NORMAL_SERVICE);
break;
default:
LOG_TRACE(ERROR, "EMM-FSM - Primitive is not valid (%d)",
evt->primitive);
break;
}
LOG_FUNC_RETURN (rc);
......
/*****************************************************************************
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Source EmmNull.c
Source EmmNull.c
Version 0.1
Version 0.1
Date 2012/10/03
Date 2012/10/03
Product NAS stack
Product NAS stack
Subsystem EPS Mobility Management
Subsystem EPS Mobility Management
Author Frederic Maurel
Author Frederic Maurel
Description Implements the EPS Mobility Management procedures executed
when the EMM-SAP is in EMM-NULL state.
Description Implements the EPS Mobility Management procedures executed
when the EMM-SAP is in EMM-NULL state.
In EMM-NULL state, the EPS capability is disabled in the UE.
No EPS mobility management function shall be performed.
In EMM-NULL state, the EPS capability is disabled in the UE.
No EPS mobility management function shall be performed.
*****************************************************************************/
......@@ -46,20 +46,20 @@ Description Implements the EPS Mobility Management procedures executed
/****************************************************************************
** **
** Name: EmmNull() **
** Name: EmmNull() **
** **
** Description: Handles the behaviour of the UE while the EMM-SAP is in **
** EMM-NULL state. **
** EMM-NULL state. **
** **
** Inputs: evt: The received EMM-SAP event **
** Others: emm_fsm_status **
** Inputs: evt: The received EMM-SAP event **
** Others: emm_fsm_status **
** **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: emm_fsm_status **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: emm_fsm_status **
** **
***************************************************************************/
int EmmNull(const emm_reg_t* evt)
int EmmNull(const emm_reg_t *evt)
{
LOG_FUNC_IN;
......@@ -70,34 +70,33 @@ int EmmNull(const emm_reg_t* evt)
/* Delete the authentication data RAND and RES */
rc = emm_proc_authentication_delete();
if (rc != RETURNok) {
LOG_FUNC_RETURN (rc);
LOG_FUNC_RETURN (rc);
}
switch (evt->primitive)
{
case _EMMREG_S1_ENABLED:
/*
* The EPS capability has been enabled in the UE:
* Move to the DEREGISTERED state;
*/
rc = emm_fsm_set_status(EMM_DEREGISTERED);
/*
* And initialize the EMM procedure call manager in order to
* establish an EMM context and make the UE reachable by an MME.
*/
if (rc != RETURNerror) {
rc = emm_proc_initialize();
}
break;
default:
rc = RETURNerror;
LOG_TRACE(ERROR, "EMM-FSM - Primitive is not valid (%d)",
evt->primitive);
LOG_TRACE(WARNING, "EMM-FSM - Set phone functionnality to "
"enable EPS capability (+cfun=1)");
break;
switch (evt->primitive) {
case _EMMREG_S1_ENABLED:
/*
* The EPS capability has been enabled in the UE:
* Move to the DEREGISTERED state;
*/
rc = emm_fsm_set_status(EMM_DEREGISTERED);
/*
* And initialize the EMM procedure call manager in order to
* establish an EMM context and make the UE reachable by an MME.
*/
if (rc != RETURNerror) {
rc = emm_proc_initialize();
}
break;
default:
rc = RETURNerror;
LOG_TRACE(ERROR, "EMM-FSM - Primitive is not valid (%d)",
evt->primitive);
LOG_TRACE(WARNING, "EMM-FSM - Set phone functionnality to "
"enable EPS capability (+cfun=1)");
break;
}
LOG_FUNC_RETURN (rc);
......
/*****************************************************************************
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Source EmmRegistered.c
Source EmmRegistered.c
Version 0.1
Version 0.1
Date 2012/10/03
Date 2012/10/03
Product NAS stack
Product NAS stack
Subsystem EPS Mobility Management
Subsystem EPS Mobility Management
Author Frederic Maurel
Author Frederic Maurel
Description Implements the EPS Mobility Management procedures executed
when the EMM-SAP is in EMM-REGISTERED state.
Description Implements the EPS Mobility Management procedures executed
when the EMM-SAP is in EMM-REGISTERED state.
In EMM-REGISTERED state, an EMM context has been established
and a default EPS bearer context has been activated in the UE
and the MME.
The UE may initiate sending and receiving user data and signal-
ling information and reply to paging. Additionally, tracking
area updating or combined tracking area updating procedure is
performed.
In EMM-REGISTERED state, an EMM context has been established
and a default EPS bearer context has been activated in the UE
and the MME.
The UE may initiate sending and receiving user data and signal-
ling information and reply to paging. Additionally, tracking
area updating or combined tracking area updating procedure is
performed.
*****************************************************************************/
......@@ -50,20 +50,20 @@ Description Implements the EPS Mobility Management procedures executed
/****************************************************************************
** **
** Name: EmmRegistered() **
** Name: EmmRegistered() **
** **
** Description: Handles the behaviour of the UE and the MME while the **
** EMM-SAP is in EMM-REGISTERED state. **
** EMM-SAP is in EMM-REGISTERED state. **
** **
** Inputs: evt: The received EMM-SAP event **
** Others: emm_fsm_status **
** Inputs: evt: The received EMM-SAP event **
** Others: emm_fsm_status **
** **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: emm_fsm_status **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: emm_fsm_status **
** **
***************************************************************************/
int EmmRegistered(const emm_reg_t* evt)
int EmmRegistered(const emm_reg_t *evt)
{
LOG_FUNC_IN;
......@@ -76,115 +76,114 @@ int EmmRegistered(const emm_reg_t* evt)
assert(emm_fsm_get_status(evt->ueid, evt->ctx) == EMM_REGISTERED);
#endif
switch (evt->primitive)
{
switch (evt->primitive) {
#ifdef NAS_UE
case _EMMREG_DETACH_INIT:
/*
* Initiate detach procedure for EPS services
*/
rc = emm_proc_detach(EMM_DETACH_TYPE_EPS, evt->u.detach.switch_off);
break;
case _EMMREG_DETACH_REQ:
/*
* Network detach has been requested (Detach Request
* message successfully delivered to the network);
* enter state EMM-DEREGISTERED-INITIATED
*/
rc = emm_fsm_set_status(EMM_DEREGISTERED_INITIATED);
break;
case _EMMREG_DETACH_CNF:
/*
* The UE implicitly detached from the network (all EPS
* bearer contexts may have been deactivated)
*/
rc = emm_fsm_set_status(EMM_DEREGISTERED);
break;
case _EMMREG_TAU_REQ:
/*
* TODO: Tracking Area Update has been requested
*/
LOG_TRACE(ERROR, "EMM-FSM - Tracking Area Update procedure "
"is not implemented");
break;
case _EMMREG_SERVICE_REQ:
/*
* TODO: Service Request has been requested
*/
LOG_TRACE(ERROR, "EMM-FSM - Service Request procedure "
"is not implemented");
break;
case _EMMREG_LOWERLAYER_SUCCESS:
/*
* Data transfer message has been successfully delivered
*/
rc = emm_proc_lowerlayer_success();
break;
case _EMMREG_LOWERLAYER_FAILURE:
/*
* Data transfer message failed to be delivered
*/
rc = emm_proc_lowerlayer_failure(FALSE);
break;
case _EMMREG_LOWERLAYER_RELEASE:
/*
* NAS signalling connection has been released
*/
rc = emm_proc_lowerlayer_release();
break;
case _EMMREG_DETACH_INIT:
/*
* Initiate detach procedure for EPS services
*/
rc = emm_proc_detach(EMM_DETACH_TYPE_EPS, evt->u.detach.switch_off);
break;
case _EMMREG_DETACH_REQ:
/*
* Network detach has been requested (Detach Request
* message successfully delivered to the network);
* enter state EMM-DEREGISTERED-INITIATED
*/
rc = emm_fsm_set_status(EMM_DEREGISTERED_INITIATED);
break;
case _EMMREG_DETACH_CNF:
/*
* The UE implicitly detached from the network (all EPS
* bearer contexts may have been deactivated)
*/
rc = emm_fsm_set_status(EMM_DEREGISTERED);
break;
case _EMMREG_TAU_REQ:
/*
* TODO: Tracking Area Update has been requested
*/
LOG_TRACE(ERROR, "EMM-FSM - Tracking Area Update procedure "
"is not implemented");
break;
case _EMMREG_SERVICE_REQ:
/*
* TODO: Service Request has been requested
*/
LOG_TRACE(ERROR, "EMM-FSM - Service Request procedure "
"is not implemented");
break;
case _EMMREG_LOWERLAYER_SUCCESS:
/*
* Data transfer message has been successfully delivered
*/
rc = emm_proc_lowerlayer_success();
break;
case _EMMREG_LOWERLAYER_FAILURE:
/*
* Data transfer message failed to be delivered
*/
rc = emm_proc_lowerlayer_failure(FALSE);
break;
case _EMMREG_LOWERLAYER_RELEASE:
/*
* NAS signalling connection has been released
*/
rc = emm_proc_lowerlayer_release();
break;
#endif
#ifdef NAS_MME
case _EMMREG_DETACH_REQ:
/*
* Network detach has been requested (implicit detach);
* enter state EMM-DEREGISTERED
*/
case _EMMREG_DETACH_REQ:
/*
* Network detach has been requested (implicit detach);
* enter state EMM-DEREGISTERED
*/
rc = emm_fsm_set_status(evt->ueid, evt->ctx, EMM_DEREGISTERED);
break;
break;
case _EMMREG_COMMON_PROC_REQ:
/*
* An EMM common procedure has been initiated;
* enter state EMM-COMMON-PROCEDURE-INITIATED.
*/
case _EMMREG_COMMON_PROC_REQ:
/*
* An EMM common procedure has been initiated;
* enter state EMM-COMMON-PROCEDURE-INITIATED.
*/
rc = emm_fsm_set_status(evt->ueid, evt->ctx, EMM_COMMON_PROCEDURE_INITIATED);
break;
case _EMMREG_TAU_REJ:
/*
* TODO: Tracking Area Update has been rejected
*/
LOG_TRACE(ERROR, "EMM-FSM - Tracking Area Update procedure "
"is not implemented");
break;
case _EMMREG_LOWERLAYER_SUCCESS:
/*
* Data successfully delivered to the network
*/
rc = RETURNok;
break;
case _EMMREG_LOWERLAYER_FAILURE:
/*
* Data failed to be delivered to the network
*/
rc = RETURNok;
break;
break;
case _EMMREG_TAU_REJ:
/*
* TODO: Tracking Area Update has been rejected
*/
LOG_TRACE(ERROR, "EMM-FSM - Tracking Area Update procedure "
"is not implemented");
break;
case _EMMREG_LOWERLAYER_SUCCESS:
/*
* Data successfully delivered to the network
*/
rc = RETURNok;
break;
case _EMMREG_LOWERLAYER_FAILURE:
/*
* Data failed to be delivered to the network
*/
rc = RETURNok;
break;
#endif
default:
LOG_TRACE(ERROR, "EMM-FSM - Primitive is not valid (%d)",
evt->primitive);
break;
default:
LOG_TRACE(ERROR, "EMM-FSM - Primitive is not valid (%d)",
evt->primitive);
break;
}
LOG_FUNC_RETURN (rc);
......
/*****************************************************************************
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Source EmmRegisteredAttemptingToUpdate.c
Source EmmRegisteredAttemptingToUpdate.c
Version 0.1
Version 0.1
Date 2012/10/03
Date 2012/10/03
Product NAS stack
Product NAS stack
Subsystem EPS Mobility Management
Subsystem EPS Mobility Management
Author Frederic Maurel
Author Frederic Maurel
Description Implements the EPS Mobility Management procedures executed
when the EMM-SAP is in EMM-REGISTERED.ATTEMPTING-TO-UPDATE
state.
Description Implements the EPS Mobility Management procedures executed
when the EMM-SAP is in EMM-REGISTERED.ATTEMPTING-TO-UPDATE
state.
In EMM-REGISTERED.ATTEMPTING-TO-UPDATE state, the tracking
area updating or combined tracking area updating procedure
failed due to a missing response from the network.
No EMM procedure except the tracking area updating or com-
bined tracking area updating procedure shall be initiated
by the UE in this substate. No data shall be sent or received.
In EMM-REGISTERED.ATTEMPTING-TO-UPDATE state, the tracking
area updating or combined tracking area updating procedure
failed due to a missing response from the network.
No EMM procedure except the tracking area updating or com-
bined tracking area updating procedure shall be initiated
by the UE in this substate. No data shall be sent or received.
*****************************************************************************/
......@@ -49,20 +49,20 @@ Description Implements the EPS Mobility Management procedures executed
/****************************************************************************
** **
** Name: EmmRegisteredAttemptingToUpdate() **
** Name: EmmRegisteredAttemptingToUpdate() **
** **
** Description: Handles the behaviour of the UE while the EMM-SAP is in **
** EMM-REGISTERED.ATTEMPTING-TO-UPDATE state. **
** EMM-REGISTERED.ATTEMPTING-TO-UPDATE state. **
** **
** Inputs: evt: The received EMM-SAP event **
** Others: emm_fsm_status **
** Inputs: evt: The received EMM-SAP event **
** Others: emm_fsm_status **
** **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: emm_fsm_status **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: emm_fsm_status **
** **
***************************************************************************/
int EmmRegisteredAttemptingToUpdate(const emm_reg_t* evt)
int EmmRegisteredAttemptingToUpdate(const emm_reg_t *evt)
{
LOG_FUNC_IN;
......
/*****************************************************************************
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Source EmmRegisteredImsiDetachInitiated.c
Source EmmRegisteredImsiDetachInitiated.c
Version 0.1
Version 0.1
Date 2012/10/03
Date 2012/10/03
Product NAS stack
Product NAS stack
Subsystem EPS Mobility Management
Subsystem EPS Mobility Management
Author Frederic Maurel
Author Frederic Maurel
Description Implements the EPS Mobility Management procedures executed
when the EMM-SAP is in EMM-REGISTERED.IMSI-DETACH-INITIATED
state.
Description Implements the EPS Mobility Management procedures executed
when the EMM-SAP is in EMM-REGISTERED.IMSI-DETACH-INITIATED
state.
In EMM-REGISTERED.IMSI-DETACH-INITIATED state, the UE performs
a combined detach procedure for non-EPS services only.
The UE was attached for EPS and non-EPS services and wants to
detach for non-EPS services only. User data and signalling
information may be sent and received.
In EMM-REGISTERED.IMSI-DETACH-INITIATED state, the UE performs
a combined detach procedure for non-EPS services only.
The UE was attached for EPS and non-EPS services and wants to
detach for non-EPS services only. User data and signalling
information may be sent and received.
*****************************************************************************/
......@@ -48,20 +48,20 @@ Description Implements the EPS Mobility Management procedures executed
/****************************************************************************
** **
** Name: EmmRegisteredImsiDetachInitiated() **
** Name: EmmRegisteredImsiDetachInitiated() **
** **
** Description: Handles the behaviour of the UE while the EMM-SAP is in **
** EMM-REGISTERED.IMSI-DETACH-INITIATED state. **
** EMM-REGISTERED.IMSI-DETACH-INITIATED state. **
** **
** Inputs: evt: The received EMM-SAP event **
** Others: emm_fsm_status **
** Inputs: evt: The received EMM-SAP event **
** Others: emm_fsm_status **
** **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: emm_fsm_status **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: emm_fsm_status **
** **
***************************************************************************/
int EmmRegisteredImsiDetachInitiated(const emm_reg_t* evt)
int EmmRegisteredImsiDetachInitiated(const emm_reg_t *evt)
{
LOG_FUNC_IN;
......
/*****************************************************************************
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Source EmmRegisteredLimitedService.c
Source EmmRegisteredLimitedService.c
Version 0.1
Version 0.1
Date 2012/10/03
Date 2012/10/03
Product NAS stack
Product NAS stack
Subsystem EPS Mobility Management
Subsystem EPS Mobility Management
Author Frederic Maurel
Author Frederic Maurel
Description Implements the EPS Mobility Management procedures executed
when the EMM-SAP is in EMM-REGISTERED.LIMITED-SERVICE state.
Description Implements the EPS Mobility Management procedures executed
when the EMM-SAP is in EMM-REGISTERED.LIMITED-SERVICE state.
In EMM-REGISTERED.LIMITED-SERVICE state, the cell the UE
selected is known not to be able to provide normal service.
In EMM-REGISTERED.LIMITED-SERVICE state, the cell the UE
selected is known not to be able to provide normal service.
*****************************************************************************/
......@@ -44,20 +44,20 @@ Description Implements the EPS Mobility Management procedures executed
/****************************************************************************
** **
** Name: EmmRegisteredLimitedService() **
** Name: EmmRegisteredLimitedService() **
** **
** Description: Handles the behaviour of the UE while the EMM-SAP is in **
** EMM-REGISTERED.LIMITED-SERVICE state. **
** EMM-REGISTERED.LIMITED-SERVICE state. **
** **
** Inputs: evt: The received EMM-SAP event **
** Others: emm_fsm_status **
** Inputs: evt: The received EMM-SAP event **
** Others: emm_fsm_status **
** **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: emm_fsm_status **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: emm_fsm_status **
** **
***************************************************************************/
int EmmRegisteredLimitedService(const emm_reg_t* evt)
int EmmRegisteredLimitedService(const emm_reg_t *evt)
{
LOG_FUNC_IN;
......
/*****************************************************************************
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Source EmmRegisteredNoCellAvailable.c
Source EmmRegisteredNoCellAvailable.c
Version 0.1
Version 0.1
Date 2012/10/03
Date 2012/10/03
Product NAS stack
Product NAS stack
Subsystem EPS Mobility Management
Subsystem EPS Mobility Management
Author Frederic Maurel
Author Frederic Maurel
Description Implements the EPS Mobility Management procedures executed
when the EMM-SAP is in EMM-REGISTERED.NO-CELL-AVAILABLE state.
Description Implements the EPS Mobility Management procedures executed
when the EMM-SAP is in EMM-REGISTERED.NO-CELL-AVAILABLE state.
In EMM-REGISTERED.NO-CELL-AVAILABLE state, E-UTRAN coverage
has been lost. The UE shall not initiate any EMM procedures
except for cell and PLMN reselection.
In EMM-REGISTERED.NO-CELL-AVAILABLE state, E-UTRAN coverage
has been lost. The UE shall not initiate any EMM procedures
except for cell and PLMN reselection.
*****************************************************************************/
......@@ -45,20 +45,20 @@ Description Implements the EPS Mobility Management procedures executed
/****************************************************************************
** **
** Name: EmmRegisteredNoCellAvailable() **
** Name: EmmRegisteredNoCellAvailable() **
** **
** Description: Handles the behaviour of the UE while the EMM-SAP is in **
** EMM-REGISTERED.NO-CELL-AVAILABLE state. **
** EMM-REGISTERED.NO-CELL-AVAILABLE state. **
** **
** Inputs: evt: The received EMM-SAP event **
** Others: emm_fsm_status **
** Inputs: evt: The received EMM-SAP event **
** Others: emm_fsm_status **
** **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: emm_fsm_status **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: emm_fsm_status **
** **
***************************************************************************/
int EmmRegisteredNoCellAvailable(const emm_reg_t* evt)
int EmmRegisteredNoCellAvailable(const emm_reg_t *evt)
{
LOG_FUNC_IN;
......
/*****************************************************************************
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Source EmmRegisteredNormalService.c
Source EmmRegisteredNormalService.c
Version 0.1
Version 0.1
Date 2012/10/03
Date 2012/10/03
Product NAS stack
Product NAS stack
Subsystem EPS Mobility Management
Subsystem EPS Mobility Management
Author Frederic Maurel
Author Frederic Maurel
Description Implements the EPS Mobility Management procedures executed
when the EMM-SAP is in EMM-REGISTERED.NORMAL-SERVICE state.
Description Implements the EPS Mobility Management procedures executed
when the EMM-SAP is in EMM-REGISTERED.NORMAL-SERVICE state.
The EMM-REGISTERED.NORMAL-SERVICE state is the primary
substate choosen when the UE enters the state EMM-REGISTERED.
The EMM-REGISTERED.NORMAL-SERVICE state is the primary
substate choosen when the UE enters the state EMM-REGISTERED.
*****************************************************************************/
......@@ -44,20 +44,20 @@ Description Implements the EPS Mobility Management procedures executed
/****************************************************************************
** **
** Name: EmmRegisteredNormalService() **
** Name: EmmRegisteredNormalService() **
** **
** Description: Handles the behaviour of the UE while the EMM-SAP is in **
** EMM-REGISTERED.NORMAL-SERVICE state. **
** EMM-REGISTERED.NORMAL-SERVICE state. **
** **
** Inputs: evt: The received EMM-SAP event **
** Others: emm_fsm_status **
** Inputs: evt: The received EMM-SAP event **
** Others: emm_fsm_status **
** **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: emm_fsm_status **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: emm_fsm_status **
** **
***************************************************************************/
int EmmRegisteredNormalService(const emm_reg_t* evt)
int EmmRegisteredNormalService(const emm_reg_t *evt)
{
LOG_FUNC_IN;
......
/*****************************************************************************
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Source EmmRegisteredPlmnSearch.c
Source EmmRegisteredPlmnSearch.c
Version 0.1
Version 0.1
Date 2012/10/03
Date 2012/10/03
Product NAS stack
Product NAS stack
Subsystem EPS Mobility Management
Subsystem EPS Mobility Management
Author Frederic Maurel
Author Frederic Maurel
Description Implements the EPS Mobility Management procedures executed
when the EMM-SAP is in EMM-REGISTERED.PLMN-SEARCH state.
Description Implements the EPS Mobility Management procedures executed
when the EMM-SAP is in EMM-REGISTERED.PLMN-SEARCH state.
In EMM-REGISTERED.PLMN-SEARCH state, the UE is searching
for PLMNs.
In EMM-REGISTERED.PLMN-SEARCH state, the UE is searching
for PLMNs.
*****************************************************************************/
......@@ -44,20 +44,20 @@ Description Implements the EPS Mobility Management procedures executed
/****************************************************************************
** **
** Name: EmmRegisteredPlmnSearch() **
** Name: EmmRegisteredPlmnSearch() **
** **
** Description: Handles the behaviour of the UE while the EMM-SAP is in **
** EMM-REGISTERED.PLMN-SEARCH state. **
** EMM-REGISTERED.PLMN-SEARCH state. **
** **
** Inputs: evt: The received EMM-SAP event **
** Others: emm_fsm_status **
** Inputs: evt: The received EMM-SAP event **
** Others: emm_fsm_status **
** **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: emm_fsm_status **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: emm_fsm_status **
** **
***************************************************************************/
int EmmRegisteredPlmnSearch(const emm_reg_t* evt)
int EmmRegisteredPlmnSearch(const emm_reg_t *evt)
{
LOG_FUNC_IN;
......@@ -71,20 +71,20 @@ int EmmRegisteredPlmnSearch(const emm_reg_t* evt)
#if 0
/****************************************************************************
** **
** Name: EmmRegisteredPlmnSearch_xxx() **
** Name: EmmRegisteredPlmnSearch_xxx() **
** **
** Description: Procedure executed when xxx **
** while the EMM-SAP is in EMM-REGISTERED.PLMN-SEARCH state. **
** while the EMM-SAP is in EMM-REGISTERED.PLMN-SEARCH state. **
** **
** Inputs: evt: The received EMM-SAP event **
** Others: emm_fsm_status **
** Inputs: evt: The received EMM-SAP event **
** Others: emm_fsm_status **
** **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: emm_fsm_status **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: emm_fsm_status **
** **
***************************************************************************/
int EmmRegisteredPlmnSearch_xxx(const emm_reg_t* evt)
int EmmRegisteredPlmnSearch_xxx(const emm_reg_t *evt)
{
LOG_FUNC_IN;
......
/*****************************************************************************
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Source EmmRegisteredUpdateNeeded.c
Source EmmRegisteredUpdateNeeded.c
Version 0.1
Version 0.1
Date 2012/10/03
Date 2012/10/03
Product NAS stack
Product NAS stack
Subsystem EPS Mobility Management
Subsystem EPS Mobility Management
Author Frederic Maurel
Author Frederic Maurel
Description Implements the EPS Mobility Management procedures executed
when the EMM-SAP is in EMM-REGISTERED.UPDATE-NEEDED state.
Description Implements the EPS Mobility Management procedures executed
when the EMM-SAP is in EMM-REGISTERED.UPDATE-NEEDED state.
In EMM-REGISTERED.UPDATE-NEEDED state, the UE has to perform
a tracking area updating or combined tracking area updating
procedure, but access to the current cell is barred. The access
class may be blocked due to access class control, or the
network rejected the NAS signalling connection establishment.
No EMM procedure except tracking area updating or combined
tracking area updating or service request as a response to
paging shall be initiated by the UE in this substate.
In EMM-REGISTERED.UPDATE-NEEDED state, the UE has to perform
a tracking area updating or combined tracking area updating
procedure, but access to the current cell is barred. The access
class may be blocked due to access class control, or the
network rejected the NAS signalling connection establishment.
No EMM procedure except tracking area updating or combined
tracking area updating or service request as a response to
paging shall be initiated by the UE in this substate.
*****************************************************************************/
......@@ -50,20 +50,20 @@ Description Implements the EPS Mobility Management procedures executed
/****************************************************************************
** **
** Name: EmmRegisteredUpdateNeeded() **
** Name: EmmRegisteredUpdateNeeded() **
** **
** Description: Handles the behaviour of the UE while the EMM-SAP is in **
** EMM-REGISTERED.UPDATE-NEEDED state. **
** EMM-REGISTERED.UPDATE-NEEDED state. **
** **
** Inputs: evt: The received EMM-SAP event **
** Others: emm_fsm_status **
** Inputs: evt: The received EMM-SAP event **
** Others: emm_fsm_status **
** **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: emm_fsm_status **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: emm_fsm_status **
** **
***************************************************************************/
int EmmRegisteredUpdateNeeded(const emm_reg_t* evt)
int EmmRegisteredUpdateNeeded(const emm_reg_t *evt)
{
LOG_FUNC_IN;
......
/*****************************************************************************
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Source EmmServiceRequestInitiated.c
Source EmmServiceRequestInitiated.c
Version 0.1
Version 0.1
Date 2012/10/03
Date 2012/10/03
Product NAS stack
Product NAS stack
Subsystem EPS Mobility Management
Subsystem EPS Mobility Management
Author Frederic Maurel
Author Frederic Maurel
Description Implements the EPS Mobility Management procedures executed
when the EMM-SAP is in EMM-SERVICE-REQUEST-INITIATED
state.
Description Implements the EPS Mobility Management procedures executed
when the EMM-SAP is in EMM-SERVICE-REQUEST-INITIATED
state.
In EMM-SERVICE-REQUEST-INITIATED state, the UE has started
the service request procedure and is waiting for a response
from the MME.
In EMM-SERVICE-REQUEST-INITIATED state, the UE has started
the service request procedure and is waiting for a response
from the MME.
*****************************************************************************/
......@@ -46,20 +46,20 @@ Description Implements the EPS Mobility Management procedures executed
/****************************************************************************
** **
** Name: EmmServiceRequestInitiated() **
** Name: EmmServiceRequestInitiated() **
** **
** Description: Handles the behaviour of the UE while the EMM-SAP is in **
** EMM-SERVICE-REQUEST-INITIATED state. **
** EMM-SERVICE-REQUEST-INITIATED state. **
** **
** Inputs: evt: The received EMM-SAP event **
** Others: emm_fsm_status **
** Inputs: evt: The received EMM-SAP event **
** Others: emm_fsm_status **
** **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: emm_fsm_status **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: emm_fsm_status **
** **
***************************************************************************/
int EmmServiceRequestInitiated(const emm_reg_t* evt)
int EmmServiceRequestInitiated(const emm_reg_t *evt)
{
LOG_FUNC_IN;
......
/*****************************************************************************
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Source EmmTrackingAreaUpdatingInitiated.c
Source EmmTrackingAreaUpdatingInitiated.c
Version 0.1
Version 0.1
Date 2012/10/03
Date 2012/10/03
Product NAS stack
Product NAS stack
Subsystem EPS Mobility Management
Subsystem EPS Mobility Management
Author Frederic Maurel
Author Frederic Maurel
Description Implements the EPS Mobility Management procedures executed
when the EMM-SAP is in EMM-TRACKING-AREA-UPDATING-INITIATED
state.
Description Implements the EPS Mobility Management procedures executed
when the EMM-SAP is in EMM-TRACKING-AREA-UPDATING-INITIATED
state.
In EMM-TRACKING-AREA-UPDATING-INITIATED state, the UE has
started the tracking area updating or combined tracking area
updating procedure and is waiting for a response from the MME.
In EMM-TRACKING-AREA-UPDATING-INITIATED state, the UE has
started the tracking area updating or combined tracking area
updating procedure and is waiting for a response from the MME.
*****************************************************************************/
......@@ -46,20 +46,20 @@ Description Implements the EPS Mobility Management procedures executed
/****************************************************************************
** **
** Name: EmmTrackingAreaUpdatingInitiated() **
** Name: EmmTrackingAreaUpdatingInitiated() **
** **
** Description: Handles the behaviour of the UE while the EMM-SAP is in **
** EMM-TRACKING-AREA-UPDATING-INITIATED state. **
** EMM-TRACKING-AREA-UPDATING-INITIATED state. **
** **
** Inputs: evt: The received EMM-SAP event **
** Others: emm_fsm_status **
** Inputs: evt: The received EMM-SAP event **
** Others: emm_fsm_status **
** **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: emm_fsm_status **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: emm_fsm_status **
** **
***************************************************************************/
int EmmTrackingAreaUpdatingInitiated(const emm_reg_t* evt)
int EmmTrackingAreaUpdatingInitiated(const emm_reg_t *evt)
{
LOG_FUNC_IN;
......
/*****************************************************************************
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Source emm_as.h
Source emm_as.h
Version 0.1
Version 0.1
Date 2012/10/16
Date 2012/10/16
Product NAS stack
Product NAS stack
Subsystem EPS Mobility Management
Subsystem EPS Mobility Management
Author Frederic Maurel
Author Frederic Maurel
Description Defines the EMMAS Service Access Point that provides
services to the EPS Mobility Management for NAS message
transfer to/from the Access Stratum sublayer.
Description Defines the EMMAS Service Access Point that provides
services to the EPS Mobility Management for NAS message
transfer to/from the Access Stratum sublayer.
*****************************************************************************/
#ifndef __EMM_AS_H__
......@@ -42,6 +42,6 @@ Description Defines the EMMAS Service Access Point that provides
void emm_as_initialize(void);
int emm_as_send(const emm_as_t* msg);
int emm_as_send(const emm_as_t *msg);
#endif /* __EMM_AS_H__*/
/*****************************************************************************
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Source emm_esm.c
Source emm_esm.c
Version 0.1
Version 0.1
Date 2012/10/16
Date 2012/10/16
Product NAS stack
Product NAS stack
Subsystem EPS Mobility Management
Subsystem EPS Mobility Management
Author Frederic Maurel
Author Frederic Maurel
Description Defines the EMMESM Service Access Point that provides
interlayer services to the EPS Session Management sublayer
for service registration and activate/deactivate PDN
connections.
Description Defines the EMMESM Service Access Point that provides
interlayer services to the EPS Session Management sublayer
for service registration and activate/deactivate PDN
connections.
*****************************************************************************/
......@@ -42,7 +42,7 @@ Description Defines the EMMESM Service Access Point that provides
/*
* String representation of EMMESM-SAP primitives
*/
static const char* _emm_esm_primitive_str[] = {
static const char *_emm_esm_primitive_str[] = {
#ifdef NAS_UE
"EMMESM_ESTABLISH_REQ",
"EMMESM_ESTABLISH_CNF",
......@@ -59,16 +59,16 @@ static const char* _emm_esm_primitive_str[] = {
/****************************************************************************
** **
** Name: emm_esm_initialize() **
** Name: emm_esm_initialize() **
** **
** Description: Initializes the EMMESM Service Access Point **
** **
** Inputs: None **
** Others: None **
** Inputs: None **
** Others: None **
** **
** Outputs: None **
** Return: None **
** Others: NONE **
** Outputs: None **
** Return: None **
** Others: NONE **
** **
***************************************************************************/
void emm_esm_initialize(void)
......@@ -82,19 +82,19 @@ void emm_esm_initialize(void)
/****************************************************************************
** **
** Name: emm_esm_send() **
** Name: emm_esm_send() **
** **
** Description: Processes the EMMESM Service Access Point primitive **
** **
** Inputs: msg: The EMMESM-SAP primitive to process **
** Others: None **
** Inputs: msg: The EMMESM-SAP primitive to process **
** Others: None **
** **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: None **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: None **
** **
***************************************************************************/
int emm_esm_send(const emm_esm_t* msg)
int emm_esm_send(const emm_esm_t *msg)
{
LOG_FUNC_IN;
......@@ -102,51 +102,49 @@ int emm_esm_send(const emm_esm_t* msg)
emm_esm_primitive_t primitive = msg->primitive;
LOG_TRACE(INFO, "EMMESM-SAP - Received primitive %s (%d)",
_emm_esm_primitive_str[primitive - _EMMESM_START - 1], primitive);
_emm_esm_primitive_str[primitive - _EMMESM_START - 1], primitive);
switch (primitive)
{
switch (primitive) {
#ifdef NAS_UE
case _EMMESM_ESTABLISH_REQ:
/* ESM requests EMM to initiate an attach procedure before
* requesting subsequent connectivity to additional PDNs */
rc = emm_proc_attach_restart();
break;
case _EMMESM_ESTABLISH_CNF:
/* ESM notifies EMM that PDN connectivity procedure successfully
* processed */
if (msg->u.establish.is_attached) {
if (msg->u.establish.is_emergency) {
/* Consider the UE attached for emergency bearer services
* only */
rc = emm_proc_attach_set_emergency();
}
}
else {
/* Consider the UE locally detached from the network */
rc = emm_proc_attach_set_detach();
}
break;
case _EMMESM_ESTABLISH_REJ:
/* ESM notifies EMM that PDN connectivity procedure failed */
break;
case _EMMESM_ESTABLISH_REQ:
/* ESM requests EMM to initiate an attach procedure before
* requesting subsequent connectivity to additional PDNs */
rc = emm_proc_attach_restart();
break;
case _EMMESM_ESTABLISH_CNF:
/* ESM notifies EMM that PDN connectivity procedure successfully
* processed */
if (msg->u.establish.is_attached) {
if (msg->u.establish.is_emergency) {
/* Consider the UE attached for emergency bearer services
* only */
rc = emm_proc_attach_set_emergency();
}
} else {
/* Consider the UE locally detached from the network */
rc = emm_proc_attach_set_detach();
}
break;
case _EMMESM_ESTABLISH_REJ:
/* ESM notifies EMM that PDN connectivity procedure failed */
break;
#endif
case _EMMESM_UNITDATA_REQ:
/* ESM requests EMM to transfer ESM data unit to lower layer */
rc = lowerlayer_data_req(msg->ueid, &msg->u.data.msg);
break;
case _EMMESM_UNITDATA_REQ:
/* ESM requests EMM to transfer ESM data unit to lower layer */
rc = lowerlayer_data_req(msg->ueid, &msg->u.data.msg);
break;
default:
break;
default:
break;
}
if (rc != RETURNok) {
LOG_TRACE(WARNING, "EMMESM-SAP - Failed to process primitive %s (%d)",
_emm_esm_primitive_str[primitive - _EMMESM_START - 1],
primitive);
LOG_TRACE(WARNING, "EMMESM-SAP - Failed to process primitive %s (%d)",
_emm_esm_primitive_str[primitive - _EMMESM_START - 1],
primitive);
}
LOG_FUNC_RETURN (rc);
......
/*****************************************************************************
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Source emm_esm.h
Source emm_esm.h
Version 0.1
Version 0.1
Date 2012/10/16
Date 2012/10/16
Product NAS stack
Product NAS stack
Subsystem EPS Mobility Management
Subsystem EPS Mobility Management
Author Frederic Maurel
Author Frederic Maurel
Description Defines the EMMESM Service Access Point that provides
interlayer services to the EPS Session Management sublayer
for service registration and activate/deactivate PDP context.
Description Defines the EMMESM Service Access Point that provides
interlayer services to the EPS Session Management sublayer
for service registration and activate/deactivate PDP context.
*****************************************************************************/
#ifndef __EMM_ESM_H__
......@@ -42,6 +42,6 @@ Description Defines the EMMESM Service Access Point that provides
void emm_esm_initialize(void);
int emm_esm_send(const emm_esm_t* msg);
int emm_esm_send(const emm_esm_t *msg);
#endif /* __EMM_ESM_H__*/
/*****************************************************************************
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Source emm_esmDef.h
Source emm_esmDef.h
Version 0.1
Version 0.1
Date 2012/10/16
Date 2012/10/16
Product NAS stack
Product NAS stack
Subsystem EPS Mobility Management
Subsystem EPS Mobility Management
Author Frederic Maurel
Author Frederic Maurel
Description Defines the EMMESM Service Access Point that provides
interlayer services to the EPS Session Management sublayer
for service registration and activate/deactivate PDN
connections.
Description Defines the EMMESM Service Access Point that provides
interlayer services to the EPS Session Management sublayer
for service registration and activate/deactivate PDN
connections.
*****************************************************************************/
#ifndef __EMM_ESMDEF_H__
......@@ -54,10 +54,10 @@ typedef enum {
* ---------------------------------------------
*/
typedef struct {
int is_emergency; /* Indicates whether the PDN connection is established
* for emergency bearer services only */
int is_attached; /* Indicates whether the UE remains attached to the
* network */
int is_emergency; /* Indicates whether the PDN connection is established
* for emergency bearer services only */
int is_attached; /* Indicates whether the UE remains attached to the
* network */
} emm_esm_establish_t;
/*
......@@ -65,7 +65,7 @@ typedef struct {
* ----------------------------------
*/
typedef struct {
OctetString msg; /* ESM message to be transfered */
OctetString msg; /* ESM message to be transfered */
} emm_esm_data_t;
/*
......@@ -77,8 +77,8 @@ typedef struct {
emm_esm_primitive_t primitive;
unsigned int ueid;
union {
emm_esm_establish_t establish;
emm_esm_data_t data;
emm_esm_establish_t establish;
emm_esm_data_t data;
} u;
/* TODO: complete emm_esm_t structure definition */
} emm_esm_t;
......
/*****************************************************************************
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Source emm_fsm.h
Source emm_fsm.h
Version 0.1
Version 0.1
Date 2012/10/03
Date 2012/10/03
Product NAS stack
Product NAS stack
Subsystem EPS Mobility Management
Subsystem EPS Mobility Management
Author Frederic Maurel
Author Frederic Maurel
Description Defines the EPS Mobility Management procedures executed at
the EMMREG Service Access Point.
Description Defines the EPS Mobility Management procedures executed at
the EMMREG Service Access Point.
*****************************************************************************/
#ifndef __EMM_FSM_H__
......@@ -90,6 +90,6 @@ int emm_fsm_set_status(unsigned int ueid, void *ctx, emm_fsm_state_t status);
emm_fsm_state_t emm_fsm_get_status(unsigned int ueid, void *ctx);
#endif
int emm_fsm_process(const emm_reg_t* evt);
int emm_fsm_process(const emm_reg_t *evt);
#endif /* __EMM_FSM_H__*/
/*****************************************************************************
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Eurecom OpenAirInterface 3
Copyright(c) 2012 Eurecom
Source emm_reg.h
Source emm_reg.h
Version 0.1
Version 0.1
Date 2012/10/16
Date 2012/10/16
Product NAS stack
Product NAS stack
Subsystem EPS Mobility Management
Subsystem EPS Mobility Management
Author Frederic Maurel
Author Frederic Maurel
Description Defines the EMMREG Service Access Point that provides
registration services for location updating and attach/detach
procedures.
Description Defines the EMMREG Service Access Point that provides
registration services for location updating and attach/detach
procedures.
*****************************************************************************/
#ifndef __EMM_REG_H__
......@@ -42,6 +42,6 @@ Description Defines the EMMREG Service Access Point that provides
void emm_reg_initialize(void);
int emm_reg_send(const emm_reg_t* msg);
int emm_reg_send(const emm_reg_t *msg);
#endif /* __EMM_REG_H__*/
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -31,5 +31,6 @@ else
include Makefile.inc
libnas_la_SOURCES = \
nas_main.c \
nas_itti_messaging.c nas_itti_messaging.h \
$(libnas_SRCS)
endif
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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