- 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.
119 lines
4.9 KiB
C
119 lines
4.9 KiB
C
/*
|
|
* SPDX-License-Identifier: LicenseRef-CSSL-1.0
|
|
*/
|
|
|
|
/*****************************************************************************
|
|
Source emm_sap.c
|
|
|
|
Version 0.1
|
|
|
|
Date 2012/10/01
|
|
|
|
Product NAS stack
|
|
|
|
Subsystem EPS Mobility Management
|
|
|
|
Description Defines the EMM Service Access Points at which the EPS
|
|
Mobility Management sublayer provides procedures for the
|
|
control of security and mobility when the User Equipment
|
|
is using the Evolved UTRA Network.
|
|
|
|
*****************************************************************************/
|
|
|
|
#include "emm_sap.h"
|
|
#include "commonDef.h"
|
|
#include "nas_log.h"
|
|
|
|
#include "emm_reg.h"
|
|
#include "emm_esm.h"
|
|
#include "emm_as.h"
|
|
#include "user_defs.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: emm_sap_initialize() **
|
|
** **
|
|
** Description: Initializes the EMM Service Access Points **
|
|
** **
|
|
** Inputs: None **
|
|
** Others: None **
|
|
** **
|
|
** Outputs: None **
|
|
** Return: None **
|
|
** Others: NONE **
|
|
** **
|
|
***************************************************************************/
|
|
void emm_sap_initialize(nas_user_t *user)
|
|
{
|
|
LOG_FUNC_IN;
|
|
|
|
emm_reg_initialize(user);
|
|
emm_esm_initialize();
|
|
emm_as_initialize(user);
|
|
|
|
LOG_FUNC_OUT;
|
|
}
|
|
|
|
/****************************************************************************
|
|
** **
|
|
** Name: emm_sap_send() **
|
|
** **
|
|
** Description: Processes the EMM Service Access Point primitive **
|
|
** **
|
|
** Inputs: msg: The EMM-SAP primitive to process **
|
|
** Others: None **
|
|
** **
|
|
** Outputs: msg: The EMM-SAP primitive to process **
|
|
** Return: RETURNok, RETURNerror **
|
|
** Others: None **
|
|
** **
|
|
***************************************************************************/
|
|
int emm_sap_send(nas_user_t *user, emm_sap_t *msg)
|
|
{
|
|
int rc = RETURNerror;
|
|
|
|
emm_primitive_t primitive = msg->primitive;
|
|
|
|
LOG_FUNC_IN;
|
|
|
|
/* Check the EMM-SAP primitive */
|
|
if ( (primitive > (emm_primitive_t)EMMREG_PRIMITIVE_MIN) &&
|
|
(primitive < (emm_primitive_t)EMMREG_PRIMITIVE_MAX) ) {
|
|
/* Forward to the EMMREG-SAP */
|
|
msg->u.emm_reg.primitive = (emm_reg_primitive_t) primitive;
|
|
rc = emm_reg_send(user, &msg->u.emm_reg);
|
|
} else if ( (primitive > (emm_primitive_t)EMMESM_PRIMITIVE_MIN) &&
|
|
(primitive < (emm_primitive_t)EMMESM_PRIMITIVE_MAX) ) {
|
|
/* Forward to the EMMESM-SAP */
|
|
msg->u.emm_esm.primitive = (emm_esm_primitive_t) primitive;
|
|
rc = emm_esm_send(user, &msg->u.emm_esm);
|
|
} else if ( (primitive > (emm_primitive_t)EMMAS_PRIMITIVE_MIN) &&
|
|
(primitive < (emm_primitive_t)EMMAS_PRIMITIVE_MAX) ) {
|
|
/* Forward to the EMMAS-SAP */
|
|
msg->u.emm_as.primitive = (emm_as_primitive_t) primitive;
|
|
rc = emm_as_send(user, &msg->u.emm_as);
|
|
}
|
|
else {
|
|
LOG_TRACE(WARNING, "EMM-SAP - Out of range primitive (%d)", primitive);
|
|
}
|
|
|
|
LOG_FUNC_RETURN (rc);
|
|
}
|
|
|
|
/****************************************************************************/
|
|
/********************* L O C A L F U N C T I O N S *********************/
|
|
/****************************************************************************/
|
|
|