Commit 50c9d469 authored by nepes's avatar nepes

Remote UE Report extensions based on Release 14 for RAN

parent ed72ec9e
...@@ -436,6 +436,7 @@ set(esm_SRC ...@@ -436,6 +436,7 @@ set(esm_SRC
${OPENAIR_NAS_DIR}/UE/ESM/EsmStatusHdl.c ${OPENAIR_NAS_DIR}/UE/ESM/EsmStatusHdl.c
${OPENAIR_NAS_DIR}/UE/ESM/PdnConnectivity.c ${OPENAIR_NAS_DIR}/UE/ESM/PdnConnectivity.c
${OPENAIR_NAS_DIR}/UE/ESM/PdnDisconnect.c ${OPENAIR_NAS_DIR}/UE/ESM/PdnDisconnect.c
${OPENAIR_NAS_DIR}/UE/ESM/RemoteUeReport.c
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextAccept.c ${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextAccept.c
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextReject.c ${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextReject.c
...@@ -469,6 +470,7 @@ set(esm_SRC ...@@ -469,6 +470,7 @@ set(esm_SRC
set(esm_HDR set(esm_HDR
${OPENAIR_TARGETS}/COMMON/openairinterface5g_limits.h ${OPENAIR_TARGETS}/COMMON/openairinterface5g_limits.h
${OPENAIR_NAS_DIR}/UE/ESM/esm_main.h ${OPENAIR_NAS_DIR}/UE/ESM/esm_main.h
${OPENAIR_NAS_DIR}/UE/ESM/PdnConnectivity.h
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextAccept.h ${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextAccept.h
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextReject.h ${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextReject.h
${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextRequest.h ${OPENAIR_NAS_DIR}/COMMON/ESM/MSG/ActivateDedicatedEpsBearerContextRequest.h
......
...@@ -31,7 +31,6 @@ if ((decoded_result = decode_pkmf_address(&remoteuereport->pkmfaddress, 0, buffe ...@@ -31,7 +31,6 @@ if ((decoded_result = decode_pkmf_address(&remoteuereport->pkmfaddress, 0, buffe
return decoded; return decoded;
} }
int encode_remote_ue_report(remote_ue_report_msg *remoteuereport, uint8_t *buffer, uint32_t len) int encode_remote_ue_report(remote_ue_report_msg *remoteuereport, uint8_t *buffer, uint32_t len)
{ {
int encoded = 0; int encoded = 0;
......
...@@ -201,11 +201,11 @@ int esm_msg_decode(ESM_msg *msg, uint8_t *buffer, uint32_t len) ...@@ -201,11 +201,11 @@ int esm_msg_decode(ESM_msg *msg, uint8_t *buffer, uint32_t len)
break; break;
case REMOTE_UE_REPORT: case REMOTE_UE_REPORT:
decode_result = decode_esm_status(&msg->remote_ue_report, buffer, len); decode_result = decode_remote_ue_report(&msg->remote_ue_report, buffer, len);
break; break;
case REMOTE_UE_REPORT_RESPONSE: case REMOTE_UE_REPORT_RESPONSE:
decode_result = decode_esm_status(&msg->remote_ue_report_response, buffer, len); decode_result = decode_remote_ue_report_response(&msg->remote_ue_report_response, buffer, len);
break; break;
default: default:
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>
#include "PKMFAddress.h" #include "PKMFAddress.h"
#include "TLVDecoder.h"
//static int encode_pkmf_address(pkmf_address_t *pkmfaddress, uint8_t iei, uint8_t *buffer, uint32_t len); //static int encode_pkmf_address(pkmf_address_t *pkmfaddress, uint8_t iei, uint8_t *buffer, uint32_t len);
......
...@@ -87,7 +87,7 @@ static int _pdn_connectivity_update(esm_data_t *esm_data, int pid, const OctetSt ...@@ -87,7 +87,7 @@ static int _pdn_connectivity_update(esm_data_t *esm_data, int pid, const OctetSt
esm_proc_pdn_type_t pdn_type, const OctetString *pdn_addr, int esm_cause); esm_proc_pdn_type_t pdn_type, const OctetString *pdn_addr, int esm_cause);
static int _pdn_connectivity_delete(esm_data_t *esm_data, int pid); static int _pdn_connectivity_delete(esm_data_t *esm_data, int pid);
static int _pdn_connectivity_set_pti(esm_data_t *esm_data, int pid, int pti); int _pdn_connectivity_set_pti(esm_data_t *esm_data, int pid, int pti);
static int _pdn_connectivity_find_apn(esm_data_t *esm_data, const OctetString *apn); static int _pdn_connectivity_find_apn(esm_data_t *esm_data, const OctetString *apn);
static int _pdn_connectivity_find_pdn(esm_data_t * esm_data, const OctetString *apn, static int _pdn_connectivity_find_pdn(esm_data_t * esm_data, const OctetString *apn,
esm_proc_pdn_type_t pdn_type); esm_proc_pdn_type_t pdn_type);
...@@ -98,6 +98,7 @@ static int _pdn_connectivity_find_pdn(esm_data_t * esm_data, const OctetString * ...@@ -98,6 +98,7 @@ static int _pdn_connectivity_find_pdn(esm_data_t * esm_data, const OctetString *
static void *_pdn_connectivity_t3482_handler(void *); static void *_pdn_connectivity_t3482_handler(void *);
/* Maximum value of the PDN connectivity request retransmission counter */ /* Maximum value of the PDN connectivity request retransmission counter */
#define ESM_PDN_CONNECTIVITY_COUNTER_MAX 5 #define ESM_PDN_CONNECTIVITY_COUNTER_MAX 5
...@@ -358,7 +359,7 @@ int esm_proc_pdn_connectivity_accept(nas_user_t *user, int pti, esm_proc_pdn_typ ...@@ -358,7 +359,7 @@ int esm_proc_pdn_connectivity_accept(nas_user_t *user, int pti, esm_proc_pdn_typ
int pid = RETURNerror; int pid = RETURNerror;
char apn_first_char[4]; char apn_first_char[4];
LOG_VAR(char, str[128]); LOG_VAR(char,str[128]);
if (isprint(apn->value[0])) { if (isprint(apn->value[0])) {
apn_first_char[0] = '\0'; apn_first_char[0] = '\0';
...@@ -914,7 +915,7 @@ static int _pdn_connectivity_delete(esm_data_t *esm_data, int pid) ...@@ -914,7 +915,7 @@ static int _pdn_connectivity_delete(esm_data_t *esm_data, int pid)
** Return: RETURNok, RETURNerror ** ** Return: RETURNok, RETURNerror **
** ** ** **
***************************************************************************/ ***************************************************************************/
static int _pdn_connectivity_set_pti(esm_data_t *esm_data, int pid, int pti) int _pdn_connectivity_set_pti(esm_data_t *esm_data, int pid, int pti)
{ {
if (pid < ESM_DATA_PDN_MAX) { if (pid < ESM_DATA_PDN_MAX) {
if (pid != esm_data->pdn[pid].pid) { if (pid != esm_data->pdn[pid].pid) {
......
...@@ -43,10 +43,11 @@ Description ...@@ -43,10 +43,11 @@ Description
#include "esm_proc.h" #include "esm_proc.h"
#include "commonDef.h" #include "commonDef.h"
#include "nas_log.h" #include "nas_log.h"
#include "PdnConnectivity.c"
#include "esmData.h" #include "esmData.h"
#include "esm_cause.h" #include "esm_cause.h"
#include "esm_pt.h" #include "esm_pt.h"
#include "PdnConnectivity.h"
#include "emm_sap.h" #include "emm_sap.h"
...@@ -73,6 +74,8 @@ Description ...@@ -73,6 +74,8 @@ Description
/****************** E X P O R T E D F U N C T I O N S ******************/ /****************** E X P O R T E D F U N C T I O N S ******************/
/****************************************************************************/ /****************************************************************************/
//int _pdn_connectivity_set_pti(esm_data_t *esm_data, int pid, int pti);
int esm_proc_remote_ue_report(nas_user_t *user,int cid, unsigned int *pti) int esm_proc_remote_ue_report(nas_user_t *user,int cid, unsigned int *pti)
{ {
LOG_FUNC_IN; LOG_FUNC_IN;
...@@ -91,8 +94,8 @@ int esm_proc_remote_ue_report(nas_user_t *user,int cid, unsigned int *pti) ...@@ -91,8 +94,8 @@ int esm_proc_remote_ue_report(nas_user_t *user,int cid, unsigned int *pti)
} }
//static int _pdn_connectivity_set_pti(esm_data_t *esm_data, int pid, int pti); //static int _pdn_connectivity_set_pti(esm_data_t *esm_data, int pid, int pti);
/* Update the PDN connection data */ /* Update the PDN connection data */
rc = _pdn_connectivity_set_pti(esm_data, pid, *pti);
rc = _pdn_connectivity_set_pti(esm_data, pid, *pti);
if (rc != RETURNok) { if (rc != RETURNok) {
LOG_TRACE(WARNING, "ESM-PROC - Failed to update PDN connection"); LOG_TRACE(WARNING, "ESM-PROC - Failed to update PDN connection");
} }
......
...@@ -772,12 +772,12 @@ static int _esm_sap_send(nas_user_t *user, int msg_type, int is_standalone, ...@@ -772,12 +772,12 @@ static int _esm_sap_send(nas_user_t *user, int msg_type, int is_standalone,
break; break;
case REMOTE_UE_REPORT: case REMOTE_UE_REPORT:
rc = esm_proc_remote_ue_report(user, pti, &esm_msg.remote_ue_report); rc = esm_send_remote_ue_report(ebi, &esm_msg.remote_ue_report);
//#error "TODO"// //#error "TODO"//
break; break;
default: default:
LOG_TRACE(WARNING, "ESM-SAP - Send unexpected ESM message 0x%x", LOG_TRACE(WARNING, "ESM-SAP - Send unexpected ESM message 0x%x",
msg_type); msg_type);
break; break;
} }
......
...@@ -456,6 +456,46 @@ int esm_send_deactivate_eps_bearer_context_accept(int ebi, ...@@ -456,6 +456,46 @@ int esm_send_deactivate_eps_bearer_context_accept(int ebi,
LOG_FUNC_RETURN(RETURNok); LOG_FUNC_RETURN(RETURNok);
} }
/****************************************************************************
** **
** Name: esm_send_remote_ue_report() **
** **
** Description: Builds sends Remote UE Report message **
** **
** The Remote UE Report message is sent **
** by the UE to to send information about a mew remote UE. **
** **
** **
** Inputs: ebi: EPS bearer identity **
** Others: None **
** **
** Outputs: msg: The ESM message to be sent **
** Return: RETURNok, RETURNerror **
** Others: None **
** **
***************************************************************************/
int esm_send_remote_ue_report(int ebi,
remote_ue_report_msg *msg)
{
LOG_FUNC_IN;
/* Mandatory - ESM message header */
msg->protocoldiscriminator = EPS_SESSION_MANAGEMENT_MESSAGE;
msg->epsbeareridentity = ebi;
//msg->messagetype = DEACTIVATE_EPS_BEARER_CONTEXT_ACCEPT;
msg->proceduretransactionidentity = PROCEDURE_TRANSACTION_IDENTITY_UNASSIGNED;
/* Optional IEs */
msg->pkmfaddress.pkmfipv4address = 0;
LOG_TRACE(INFO, "ESM-SAP - Send Remote UE Report message"
" message (pti=%d, ebi=%d)",
msg->proceduretransactionidentity, msg->epsbeareridentity);
LOG_FUNC_RETURN(RETURNok);
}
/****************************************************************************/ /****************************************************************************/
/********************* L O C A L F U N C T I O N S *********************/ /********************* L O C A L F U N C T I O N S *********************/
......
...@@ -55,6 +55,7 @@ Description Defines functions executed at the ESM Service Access ...@@ -55,6 +55,7 @@ Description Defines functions executed at the ESM Service Access
#include "ModifyEpsBearerContextAccept.h" #include "ModifyEpsBearerContextAccept.h"
#include "ModifyEpsBearerContextReject.h" #include "ModifyEpsBearerContextReject.h"
#include "DeactivateEpsBearerContextAccept.h" #include "DeactivateEpsBearerContextAccept.h"
#include "RemoteUEReport.h"
#include "EsmInformationResponse.h" #include "EsmInformationResponse.h"
...@@ -92,6 +93,7 @@ int esm_send_status(int pti, int ebi, esm_status_msg *msg, int esm_cause); ...@@ -92,6 +93,7 @@ int esm_send_status(int pti, int ebi, esm_status_msg *msg, int esm_cause);
*/ */
int esm_send_pdn_connectivity_request(int pti, int is_emergency, int pdn_type, int esm_send_pdn_connectivity_request(int pti, int is_emergency, int pdn_type,
const char *apn, pdn_connectivity_request_msg *msg); const char *apn, pdn_connectivity_request_msg *msg);
int esm_send_pdn_disconnect_request(int pti, int ebi, int esm_send_pdn_disconnect_request(int pti, int ebi,
pdn_disconnect_request_msg *msg); pdn_disconnect_request_msg *msg);
...@@ -101,16 +103,21 @@ int esm_send_pdn_disconnect_request(int pti, int ebi, ...@@ -101,16 +103,21 @@ int esm_send_pdn_disconnect_request(int pti, int ebi,
*/ */
int esm_send_activate_default_eps_bearer_context_accept(int ebi, int esm_send_activate_default_eps_bearer_context_accept(int ebi,
activate_default_eps_bearer_context_accept_msg *msg); activate_default_eps_bearer_context_accept_msg *msg);
int esm_send_activate_default_eps_bearer_context_reject(int ebi, int esm_send_activate_default_eps_bearer_context_reject(int ebi,
activate_default_eps_bearer_context_reject_msg *msg, int esm_cause); activate_default_eps_bearer_context_reject_msg *msg, int esm_cause);
int esm_send_activate_dedicated_eps_bearer_context_accept(int ebi, int esm_send_activate_dedicated_eps_bearer_context_accept(int ebi,
activate_dedicated_eps_bearer_context_accept_msg *msg); activate_dedicated_eps_bearer_context_accept_msg *msg);
int esm_send_activate_dedicated_eps_bearer_context_reject(int ebi, int esm_send_activate_dedicated_eps_bearer_context_reject(int ebi,
activate_dedicated_eps_bearer_context_reject_msg *msg, int esm_cause); activate_dedicated_eps_bearer_context_reject_msg *msg, int esm_cause);
int esm_send_deactivate_eps_bearer_context_accept(int ebi, int esm_send_deactivate_eps_bearer_context_accept(int ebi,
deactivate_eps_bearer_context_accept_msg *msg); deactivate_eps_bearer_context_accept_msg *msg);
int esm_send_remote_ue_report(int ebi,
remote_ue_report_msg *msg);
#endif /* __ESM_SEND_H__*/ #endif /* __ESM_SEND_H__*/
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
#include "s1ap_eNB_nas_procedures.h" #include "s1ap_eNB_nas_procedures.h"
#include "s1ap_eNB_management_procedures.h" #include "s1ap_eNB_management_procedures.h"
#include "msc.h" #include "msc.h"
#include "S1AP_ProtocolIE-Field.h"
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
int s1ap_eNB_handle_nas_first_req( int s1ap_eNB_handle_nas_first_req(
...@@ -321,7 +322,7 @@ int s1ap_eNB_handle_nas_first_req( ...@@ -321,7 +322,7 @@ int s1ap_eNB_handle_nas_first_req(
ie->id = S1AP_ProtocolIE_ID_id_RelayNode_Indicator; ie->id = S1AP_ProtocolIE_ID_id_RelayNode_Indicator;
ie->criticality = S1AP_Criticality_ignore; ie->criticality = S1AP_Criticality_ignore;
ie->value.present = S1AP_InitialUEMessage_IEs__value_PR_RelayNode_Indicator; ie->value.present = S1AP_InitialUEMessage_IEs__value_PR_RelayNode_Indicator;
//ie->value.choice.RelayNode_Indicator = S1AP_RelayNode_Indicator_t; //ie->value.choice.RelayNode_Indicator = S1AP_InitialUEMessage_IEs_t.value.choice.S1AP_RelayNode_Indicator_t;
ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie);
} }
......
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