Refactor NGAP cause
* new struct definition including both NGAP cause group and value * add encoding function, temporarily in ngap_common.c (in the long term to be place in a enc/dec NGAP library) * extend Radio Network cause enum values * add cause member to Setup Failure
This commit is contained in:
@@ -336,19 +336,21 @@ typedef struct pdusession_modify_s {
|
||||
qos_flow_tobe_modified_t qos[QOSFLOW_MAX_VALUE];
|
||||
} pdusession_modify_t;
|
||||
|
||||
typedef enum ngap_Cause_e {
|
||||
NGAP_CAUSE_NOTHING, /* No components present */
|
||||
/* Cause (9.3.1.2 of 3GPP TS 38.413) */
|
||||
typedef enum ngap_cause_group_e {
|
||||
NGAP_CAUSE_NOTHING, /* No components present */
|
||||
NGAP_CAUSE_RADIO_NETWORK,
|
||||
NGAP_CAUSE_TRANSPORT,
|
||||
NGAP_CAUSE_NAS,
|
||||
NGAP_CAUSE_PROTOCOL,
|
||||
NGAP_CAUSE_MISC,
|
||||
NGAP_Cause_PR_choice_ExtensionS,
|
||||
//Evilish manual duplicate of asn.1 grammar
|
||||
//because it is human work, whereas it can be generated by machine
|
||||
//and because humans manual copy creates bugs
|
||||
//and we create multiple names for the same thing, that is a source of confusion
|
||||
} ngap_Cause_t;
|
||||
} ngap_cause_group_t;
|
||||
|
||||
/* Cause (9.3.1.2 of 3GPP TS 38.413) */
|
||||
typedef struct ngap_cause_s {
|
||||
ngap_cause_group_t type;
|
||||
uint8_t value;
|
||||
} ngap_cause_t;
|
||||
|
||||
typedef enum ngap_Cause_radio_network_e {
|
||||
NGAP_CAUSE_RADIO_NETWORK_UNSPECIFIED,
|
||||
@@ -378,7 +380,7 @@ typedef enum ngap_Cause_radio_network_e {
|
||||
NGAP_CAUSE_RADIO_NETWORK_FAILURE_IN_RADIO_INTERFACE_PROCEDURE,
|
||||
NGAP_CAUSE_RADIO_NETWORK_INTERACTION_WITH_OTHER_PROCEDURE,
|
||||
NGAP_CAUSE_RADIO_NETWORK_UNKNOWN_PDU_SESSION_ID,
|
||||
NGAP_CAUSE_RADIO_NETWORK_UNKOWN_QOS_FLOW_ID,
|
||||
NGAP_CAUSE_RADIO_NETWORK_UNKNOWN_QOS_FLOW_ID,
|
||||
NGAP_CAUSE_RADIO_NETWORK_MULTIPLE_PDU_SESSION_ID_INSTANCES,
|
||||
NGAP_CAUSE_RADIO_NETWORK_MULTIPLE_QOS_FLOW_ID_INSTANCES,
|
||||
NGAP_CAUSE_RADIO_NETWORK_ENCRYPTION_AND_OR_INTEGRITY_PROTECTION_ALGORITHMS_NOT_SUPPORTED,
|
||||
@@ -398,8 +400,12 @@ typedef enum ngap_Cause_radio_network_e {
|
||||
NGAP_CAUSE_RADIO_NETWORK_RELEASE_DUE_TO_CN_DETECTED_MOBILITY,
|
||||
NGAP_CAUSE_RADIO_NETWORK_N26_INTERFACE_NOT_AVAILABLE,
|
||||
NGAP_CAUSE_RADIO_NETWORK_RELEASE_DUE_TO_PRE_EMPTION,
|
||||
NGAP_CAUSE_RADIO_NETWORK_MULTIPLE_LOCATION_REPORTING_REFERENCE_ID_INSTANCES
|
||||
} ngap_Cause_radio_network_t;
|
||||
NGAP_CAUSE_RADIO_NETWORK_MULTIPLE_LOCATION_REPORTING_REFERENCE_ID_INSTANCES,
|
||||
NGAP_CAUSE_RADIO_NETWORK_RSN_NOT_AVAILABLE_FOR_THE_UP,
|
||||
NGAP_CAUSE_RADIO_NETWORK_NPN_ACCESS_DENIED,
|
||||
NGAP_CAUSE_RADIO_NETWORK_CAG_ONLY_ACCESS_DENIED,
|
||||
NGAP_CAUSE_RADIO_NETWORK_INSUFFICIENT_UE_CAPABILITIES
|
||||
} ngap_cause_radio_network_t;
|
||||
|
||||
/**
|
||||
* NGAP protocol cause values as per 9.3.1.2 `Cause` section in 3GPP TS 38.413.
|
||||
@@ -418,8 +424,7 @@ typedef struct pdusession_failed_s {
|
||||
/* Unique pdusession_id for the UE. */
|
||||
uint8_t pdusession_id;
|
||||
/* Cause of the failure */
|
||||
ngap_Cause_t cause;
|
||||
uint8_t cause_value;
|
||||
ngap_cause_t cause;
|
||||
} pdusession_failed_t;
|
||||
|
||||
typedef enum ngap_ue_ctxt_modification_present_s {
|
||||
@@ -557,8 +562,7 @@ typedef struct ngap_initial_context_setup_fail_s {
|
||||
|
||||
uint64_t amf_ue_ngap_id;
|
||||
|
||||
ngap_Cause_t cause;
|
||||
long cause_value;
|
||||
ngap_cause_t cause;
|
||||
} ngap_initial_context_setup_fail_t, ngap_ue_ctxt_modification_fail_t, ngap_pdusession_setup_req_fail_t;
|
||||
|
||||
typedef struct ngap_nas_non_delivery_ind_s {
|
||||
@@ -803,8 +807,7 @@ typedef struct ngap_ue_release_req_s {
|
||||
uint8_t nb_of_pdusessions;
|
||||
/* list of pdusession resource by RRC layers */
|
||||
pdusession_release_t pdusessions[NGAP_MAX_PDUSESSION];
|
||||
ngap_Cause_t cause;
|
||||
long cause_value;
|
||||
ngap_cause_t cause;
|
||||
} ngap_ue_release_req_t, ngap_ue_release_resp_t;
|
||||
|
||||
typedef struct ngap_pdusession_modify_req_s {
|
||||
|
||||
Reference in New Issue
Block a user