Commit 3058d2fc authored by Sakthivel Velumani's avatar Sakthivel Velumani

Bearer context setup response message

parent b911e9db
This diff is collapsed.
...@@ -77,3 +77,42 @@ E1AP_TransactionID_t E1AP_get_next_transaction_identifier() { ...@@ -77,3 +77,42 @@ E1AP_TransactionID_t E1AP_get_next_transaction_identifier() {
return genTransacId; return genTransacId;
} }
int e1ap_decode_pdu(E1AP_E1AP_PDU_t *pdu, const uint8_t *const buffer, uint32_t length) {
asn_dec_rval_t dec_ret;
DevAssert(buffer != NULL);
dec_ret = aper_decode(NULL,
&asn_DEF_F1AP_F1AP_PDU,
(void **)&pdu,
buffer,
length,
0,
0);
if (asn1_decoder_xer_print) {
LOG_E(F1AP, "----------------- ASN1 DECODER PRINT START----------------- \n");
xer_fprint(stdout, &asn_DEF_E1AP_E1AP_PDU, pdu);
LOG_E(F1AP, "----------------- ASN1 DECODER PRINT END ----------------- \n");
}
if (dec_ret.code != RC_OK) {
AssertFatal(1==0,"Failed to decode pdu\n");
return -1;
}
switch(pdu->present) {
case E1AP_E1AP_PDU_PR_initiatingMessage:
return e1ap_decode_initiating_message(pdu);
case E1AP_E1AP_PDU_PR_successfulOutcome:
return e1ap_decode_successful_outcome(pdu);
case E1AP_E1AP_PDU_PR_unsuccessfulOutcome:
return e1ap_decode_unsuccessful_outcome(pdu);
default:
LOG_E(E1AP, "Unknown presence (%d) or not implemented\n", (int)pdu->present);
break;
}
return -1;
}
...@@ -40,7 +40,9 @@ typedef int (*e1ap_message_processing_t)( ...@@ -40,7 +40,9 @@ typedef int (*e1ap_message_processing_t)(
}; };
typedef struct PLMN_ID_s { typedef struct PLMN_ID_s {
int id; int mcc;
int mnc;
int mnc_digit_length;
} PLMN_ID_t; } PLMN_ID_t;
typedef struct e1ap_setup_req_s { typedef struct e1ap_setup_req_s {
...@@ -55,8 +57,13 @@ typedef struct e1ap_setup_req_s { ...@@ -55,8 +57,13 @@ typedef struct e1ap_setup_req_s {
uint16_t default_sctp_stream_id; uint16_t default_sctp_stream_id;
f1ap_net_ip_address_t CUUP_e1_ip_address; f1ap_net_ip_address_t CUUP_e1_ip_address;
f1ap_net_ip_address_t CUCP_e1_ip_address; f1ap_net_ip_address_t CUCP_e1_ip_address;
E1AP_CNSupport_t cn_support;
} e1ap_setup_req_t; } e1ap_setup_req_t;
typedef struct e1ap_setup_resp_s {
long transac_id;
} e1ap_setup_resp_t;
typedef struct cell_group_s { typedef struct cell_group_s {
long id; long id;
} cell_group_t; } cell_group_t;
...@@ -83,6 +90,9 @@ typedef struct qos_flow_to_setup_s { ...@@ -83,6 +90,9 @@ typedef struct qos_flow_to_setup_s {
long packetDelayBudget; long packetDelayBudget;
long packetError_scalar; long packetError_scalar;
long packetError_exponent; long packetError_exponent;
E1AP_PriorityLevel_t priorityLevel;
E1AP_Pre_emptionCapability_t pre_emptionCapability;
E1AP_Pre_emptionVulnerability_t pre_emptionVulnerability;
} qos_flow_to_setup_t; } qos_flow_to_setup_t;
typedef struct DRB_nGRAN_to_setup_s { typedef struct DRB_nGRAN_to_setup_s {
...@@ -94,9 +104,6 @@ typedef struct DRB_nGRAN_to_setup_s { ...@@ -94,9 +104,6 @@ typedef struct DRB_nGRAN_to_setup_s {
cell_group_t cellGroupList[MAX_NUM_CELL_GROUPS]; cell_group_t cellGroupList[MAX_NUM_CELL_GROUPS];
int numQosFlowSetup; int numQosFlowSetup;
qos_flow_to_setup_t qosFlows[MAX_NUM_QOS_FLOWS]; qos_flow_to_setup_t qosFlows[MAX_NUM_QOS_FLOWS];
E1AP_PriorityLevel_t priorityLevel;
E1AP_Pre_emptionCapability_t pre_emptionCapability;
E1AP_Pre_emptionVulnerability_t pre_emptionVulnerability;
} DRB_nGRAN_to_setup_t; } DRB_nGRAN_to_setup_t;
typedef struct pdu_session_to_setup_s { typedef struct pdu_session_to_setup_s {
...@@ -123,10 +130,61 @@ typedef struct e1ap_bearer_setup_req_s { ...@@ -123,10 +130,61 @@ typedef struct e1ap_bearer_setup_req_s {
pdu_session_to_setup_t pduSession[MAX_NUM_PDU_SESSIONS]; pdu_session_to_setup_t pduSession[MAX_NUM_PDU_SESSIONS];
} e1ap_bearer_setup_req_t; } e1ap_bearer_setup_req_t;
typedef struct up_params_s {
in_addr_t tlAddress;
long teId;
} up_params_t;
typedef struct drb_setup_s {
int drbId;
in_addr_t tlAddress;
ling teId;
int numUpParam;
up_params_t UpParamList[MAX_NUM_UP_PARAM];
} drb_setup_t;
typedef struct qos_flow_setup_s {
long id;
} qos_flow_setup_t;
typedef struct DRB_nGRAN_setup_s {
long id;
int numUpParam;
up_params_t UpParamList[MAX_NUM_UP_PARAM];
int numQosFlowSetup;
qos_flow_setup_t qosFlows[MAX_NUM_QOS_FLOWS];
} DRB_nGRAN_setup_t;
typedef struct DRB_nGRAN_failed_s {
long id;
long cause_type;
long cause;
} DRB_nGRAN_failed_t;
typedef struct pdu_session_setup_s {
long id;
in_addr_t tlAddress;
long teId;
int numDRBSetup;
DRB_nGRAN_setup_t DRBnGRanList[MAX_NUM_NGRAN_DRB];
int numDRBFailed;
DRB_nGRAN_failed_t DRBnGRanFailedList[MAX_NUM_NGRAN_DRB];
} pdu_session_setup_t;
typedef struct e1ap_bearer_setup_resp_s {
uint64_t gNB_cu_cp_ue_id;
uint64_t gNB_cu_up_ue_id;
int numDRBs;
drb_setup_t DRBList[MAX_NUM_DRBS];
int numPDUSessions;
} e1ap_bearer_setup_resp_t;
typedef struct e1ap_upcp_inst_s { typedef struct e1ap_upcp_inst_s {
uint32_t assoc_id; uint32_t assoc_id;
e1ap_setup_req_t setupReq; e1ap_setup_req_t setupReq;
e1ap_bearer_setup_req_t bearerSetupReq; e1ap_bearer_setup_req_t bearerSetupReq;
e1ap_bearer_setup_resp_t bearerSetupResp;
} e1ap_upcp_inst_t; } e1ap_upcp_inst_t;
typedef enum { typedef enum {
......
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