Files
openairinterface5g/openair3/NAS/UE/EMM/SAP/EmmNull.c
T
Robert Schmidt 8107939f08 Change OAI license to CSSL v1.0 (and others)
- all RAN code, CI code, configuration files, dockerfiles, in CSSL v1.0
- all deployment code (openshift, charts, ancillary files like shell
  scripts), in MIT
- documentation in CC-BY-4.0
- exceptions might apply and are listed in NOTICE
- there is a new LICENSES folder with all licenses
- CONTRIBUTIONS.md has been updated accordingly

For automated changes based on OAI PL v1.1:

    perl -i~ -0pe 's/\/\*.*Licensed to the OpenAirInterface.*openairinterface.org\n#?/\/*\n * SPDX-License-Identifier: LicenseRef-CSSL-1.0\n/s' **/*.{c,h,cpp}
    perl -i~ -0pe 's/\/\*.*Licensed to the OpenAirInterface.*openairinterface.org\n#?/\/*\n * SPDX-License-Identifier: LicenseRef-CSSL-1.0\n/s' **/*.ts
    perl -i~ -0pe 's/<!--.*Licensed to the OpenAirInterface.*openairinterface.org\n.*-->/<!-- SPDX-License-Identifier: LicenseRef-CSSL-1.0 -->/s' **/*.xml

The rest (cmake, files with missing license, cmake) manually.
2026-03-27 16:36:37 +01:00

110 lines
3.7 KiB
C

/*
* SPDX-License-Identifier: LicenseRef-CSSL-1.0
*/
/*****************************************************************************
Source EmmNull.c
Version 0.1
Date 2012/10/03
Product NAS stack
Subsystem EPS Mobility Management
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.
*****************************************************************************/
#include "emm_fsm.h"
#include "commonDef.h"
#include "nas_log.h"
#include "emm_proc.h"
#include "user_defs.h"
#include <assert.h>
/****************************************************************************/
/**************** E X T E R N A L D E F I N I T I O N S ****************/
/****************************************************************************/
/****************************************************************************/
/******************* L O C A L D E F I N I T I O N S *******************/
/****************************************************************************/
/****************************************************************************/
/****************** E X P O R T E D F U N C T I O N S ******************/
/****************************************************************************/
/****************************************************************************
** **
** Name: EmmNull() **
** **
** Description: Handles the behaviour of the UE while the EMM-SAP is in **
** EMM-NULL state. **
** **
** Inputs: evt: The received EMM-SAP event **
** Others: emm_fsm_status **
** **
** Outputs: None **
** Return: RETURNok, RETURNerror **
** Others: emm_fsm_status **
** **
***************************************************************************/
int EmmNull(nas_user_t *user, const emm_reg_t *evt)
{
LOG_FUNC_IN;
int rc;
assert(emm_fsm_get_status(user) == EMM_NULL);
/* Delete the authentication data RAND and RES */
rc = emm_proc_authentication_delete(user);
if (rc != RETURNok) {
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(user, 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(user);
}
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);
}
/****************************************************************************/
/********************* L O C A L F U N C T I O N S *********************/
/****************************************************************************/