Commit 105e9b5f authored by Guido Casati's avatar Guido Casati

Handling Bearer Context Status Change IE in Bearer Context Modification Request

- E1 encoding /decoding
- new enum for E1 Bearer Status Change

see 9.2.2.4 BEARER CONTEXT MODIFICATION REQUEST of 3GPP TS 38.463
parent 2c2b7416
......@@ -55,6 +55,12 @@
typedef net_ip_address_t e1ap_net_ip_address_t;
typedef enum BEARER_CONTEXT_STATUS_e {
BEARER_ACTIVE = 0,
BEARER_SUSPEND,
BEARER_RESUME,
} BEARER_CONTEXT_STATUS_t;
typedef struct PLMN_ID_s {
int mcc;
int mnc;
......@@ -240,6 +246,7 @@ typedef struct e1ap_bearer_setup_req_s {
char integrityProtectionKey[128];
long ueDlAggMaxBitRate;
PLMN_ID_t servingPLMNid;
BEARER_CONTEXT_STATUS_t bearerContextStatus;
long activityNotificationLevel;
int numPDUSessions;
pdu_session_to_setup_t pduSession[E1AP_MAX_NUM_PDU_SESSIONS];
......
......@@ -1192,7 +1192,7 @@ static int fill_BEARER_CONTEXT_MODIFICATION_REQUEST(e1ap_bearer_setup_req_t *con
ieC2->value.present = E1AP_BearerContextModificationRequestIEs__value_PR_GNB_CU_UP_UE_E1AP_ID;
ieC2->value.choice.GNB_CU_UP_UE_E1AP_ID = bearerCxt->gNB_cu_up_ue_id;
/* optional */
/* */
/* c3. E1AP_ProtocolIE_ID_id_System_BearerContextModificationRequest */
asn1cSequenceAdd(out->protocolIEs.list, E1AP_BearerContextModificationRequestIEs_t, ieC3);
ieC3->id = E1AP_ProtocolIE_ID_id_System_BearerContextModificationRequest;
ieC3->criticality = E1AP_Criticality_reject;
......@@ -1230,6 +1230,15 @@ static int fill_BEARER_CONTEXT_MODIFICATION_REQUEST(e1ap_bearer_setup_req_t *con
}
}
}
/* c4. E1AP_ProtocolIE_ID_id_BearerContextStatusChange */
if (bearerCxt->bearerContextStatus == BEARER_SUSPEND) {
asn1cSequenceAdd(out->protocolIEs.list, E1AP_BearerContextModificationRequestIEs_t, ieC4);
ieC4->id = E1AP_ProtocolIE_ID_id_BearerContextStatusChange;
ieC4->criticality = E1AP_Criticality_reject;
ieC4->value.present = E1AP_BearerContextModificationRequestIEs__value_PR_BearerContextStatusChange;
/* Bearer Context Status Change */
ieC4->value.choice.BearerContextStatusChange = E1AP_BearerContextStatusChange_suspend;
}
return 0;
}
......@@ -1390,6 +1399,13 @@ static void extract_BEARER_CONTEXT_MODIFICATION_REQUEST(const E1AP_E1AP_PDU_t *p
}
break;
case E1AP_ProtocolIE_ID_id_BearerContextStatusChange:
/* Bearer Context Status Change */
DevAssert(ie->criticality == E1AP_Criticality_reject);
DevAssert(ie->value.present == E1AP_BearerContextModificationRequestIEs__value_PR_BearerContextStatusChange);
bearerCxt->bearerContextStatus = (ie->value.choice.BearerContextStatusChange == E1AP_BearerContextStatusChange_suspend) ? BEARER_SUSPEND : BEARER_ACTIVE;
break;
default:
LOG_E(E1AP, "Handle for this IE is not implemented (or) invalid IE detected\n");
break;
......
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