Commit 9fa89151 authored by Sakthivel Velumani's avatar Sakthivel Velumani

Bearer context release decoder and encoder

parent 7011cb51
......@@ -152,8 +152,8 @@ typedef struct pdu_session_to_setup_s {
} pdu_session_to_setup_t;
typedef struct e1ap_bearer_setup_req_s {
uint64_t gNB_cu_cp_ue_id;
uint64_t gNB_cu_up_ue_id;
uint32_t gNB_cu_cp_ue_id;
uint32_t gNB_cu_up_ue_id;
rnti_t rnti;
uint64_t cipheringAlgorithm;
uint64_t integrityProtectionAlgorithm;
......@@ -170,6 +170,13 @@ typedef struct e1ap_bearer_setup_req_s {
pdu_session_to_setup_t pduSessionMod[E1AP_MAX_NUM_PDU_SESSIONS];
} e1ap_bearer_setup_req_t;
typedef struct e1ap_bearer_release_cmd_s {
uint32_t gNB_cu_cp_ue_id;
uint32_t gNB_cu_up_ue_id;
long cause_type;
long cause;
} e1ap_bearer_release_cmd_t;
typedef struct drb_setup_s {
int drbId;
in_addr_t tlAddress;
......
This diff is collapsed.
......@@ -54,6 +54,14 @@ int e1apCUUP_handle_BEARER_CONTEXT_MODIFICATION_REQUEST(instance_t instance,
void e1apCUUP_send_BEARER_CONTEXT_SETUP_RESPONSE(instance_t instance,
e1ap_bearer_setup_resp_t *const resp);
int e1apCUUP_handle_BEARER_CONTEXT_RELEASE_COMMAND(instance_t instance,
const E1AP_E1AP_PDU_t *pdu);
int e1apCUCP_handle_BEARER_CONTEXT_RELEASE_COMPLETE(instance_t instance,
const E1AP_E1AP_PDU_t *pdu);
int e1apCUUP_send_BEARER_CONTEXT_RELEASE_COMPLETE(instance_t instance, e1ap_bearer_release_cmd_t *const cmd);
void *E1AP_CUUP_task(void *arg);
void *E1AP_CUCP_task(void *arg);
......@@ -199,3 +199,12 @@ void CUUP_process_bearer_context_mod_req(e1ap_bearer_setup_req_t *const req, ins
// TODO: send bearer cxt mod response
}
void CUUP_process_bearer_release_command(e1ap_bearer_release_cmd_t *const cmd, instance_t instance) {
instance_t gtpInst = getCxtE1(UPtype, instance)->gtpInstN3;
newGtpuDeleteAllTunnels(gtpInst, cmd->gNB_cu_up_ue_id);
gtpInst = getCxtE1(UPtype, instance)->gtpInstF1U;
newGtpuDeleteAllTunnels(gtpInst, cmd->gNB_cu_up_ue_id);
e1apCUUP_send_BEARER_CONTEXT_RELEASE_COMPLETE(instance, cmd);
}
......@@ -31,4 +31,5 @@ void CUUP_process_e1_bearer_context_setup_req(e1ap_bearer_setup_req_t *const req
void CUUP_process_bearer_context_mod_req(e1ap_bearer_setup_req_t *const req, instance_t instance);
void CUUP_process_bearer_release_command(e1ap_bearer_release_cmd_t *const cmd, instance_t instance);
#endif
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