Commit 0a22f997 authored by Victor Souza's avatar Victor Souza

added bhinfo to uluptnlInformation_ToBeSetup_List

parent 8a924cd0
......@@ -283,10 +283,34 @@ typedef struct f1ap_ul_rrc_message_s {
int rrc_container_length;
} f1ap_ul_rrc_message_t;
/* [IAB] related structs */
typedef struct f1ap_bAPRoutingID_s{
uint16_t bAPAddress;
uint16_t bAPPathID;
}f1ap_bAPRoutingID_t;
typedef struct f1ap_EgressBHRLCCHItem_s{
uint16_t nextHopBAPAddress;
uint16_t bHRLCChannelID;
}f1ap_EgressBHRLCCHItem_t;
typedef struct f1ap_bHInfo_s{
f1ap_bAPRoutingID_t bAProutingID;
bool is_bAProutingID_set;
f1ap_EgressBHRLCCHItem_t *egressBHRLCCHList;
int egressList_length;
}f1ap_bHInfo_t;
/* [IAB] end*/
typedef struct f1ap_up_tnl_s {
in_addr_t tl_address; // currently only IPv4 supported
teid_t teid;
uint16_t port;
// [IAB] info
f1ap_bHInfo_t bh_info;
bool is_bh_info_set;
// ----------
} f1ap_up_tnl_t;
typedef enum preemption_capability_e {
......@@ -373,23 +397,6 @@ typedef struct f1ap_iPHeaderInformation_s{
uint32_t iPv6FlowLabel;
}f1ap_iPHeaderInformation_t;
typedef struct f1ap_bAPRoutingID_s{
uint16_t bAPAddress;
uint16_t bAPPathID;
}f1ap_bAPRoutingID_t;
typedef struct f1ap_EgressBHRLCCHItem_s{
uint16_t nextHopBAPAddress;
uint16_t bHRLCChannelID;
}f1ap_EgressBHRLCCHItem_t;
typedef struct f1ap_bHInfo_s{
f1ap_bAPRoutingID_t bAProutingID;
bool is_bAProutingID_set;
f1ap_EgressBHRLCCHItem_t *egressBHRLCCHList;
int egressList_length;
}f1ap_bHInfo_t;
typedef struct f1ap_iPtolayer2TrafficMappingInfo_Item_s{
uint32_t mappingInformationIndex;
f1ap_iPHeaderInformation_t iPHeaderInformation;
......
......@@ -53,6 +53,7 @@
#include "F1AP_MappingInformationIndex.h"
#include "F1AP_MappingInformationtoRemove.h"
#include "F1AP_BAPlayerBHRLCchannelMappingInfoList.h"
#include "F1AP_ProtocolExtensionContainer.h"
static void setQos(F1AP_NonDynamic5QIDescriptor_t **toFill)
{
......@@ -1457,12 +1458,36 @@ int CU_send_UE_CONTEXT_MODIFICATION_REQUEST(sctp_assoc_t assoc_id, f1ap_ue_conte
uLUPTNLInformation_ToBeSetup_Item->uLUPTNLInformation.present = F1AP_UPTransportLayerInformation_PR_gTPTunnel;
asn1cCalloc( uLUPTNLInformation_ToBeSetup_Item->uLUPTNLInformation.choice.gTPTunnel,
gTPTunnel);
/* 12.3.1.1.1 transportLayerAddress */
/* 12.1.3.1.1.1 transportLayerAddress */
TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING(f1ap_ue_context_modification_req->drbs_to_be_setup[i].up_ul_tnl[j].tl_address,
&gTPTunnel->transportLayerAddress);
/* 12.3.1.1.2 gTP_TEID */
/* 12.1.3.1.1.2 gTP_TEID */
INT32_TO_OCTET_STRING(f1ap_ue_context_modification_req->drbs_to_be_setup[i].up_ul_tnl[j].teid,
&gTPTunnel->gTP_TEID);
/* 12.1.3.2 BHInfo [IAB] */
if(f1ap_ue_context_modification_req->drbs_to_be_setup[i].up_ul_tnl[j].is_bh_info_set){
f1ap_bHInfo_t *bh_info = &f1ap_ue_context_modification_req->drbs_to_be_setup[i].up_ul_tnl[j].bh_info;
asn1cSequenceAdd(uLUPTNLInformation_ToBeSetup_Item->iE_Extensions, F1AP_ULUPTNLInformation_ToBeSetup_ItemExtIEs_t, ulupinfo_ie);
ulupinfo_ie->id = F1AP_ProtocolIE_ID_id_BHInfo;
ulupinfo_ie->criticality = F1AP_Criticality_ignore;
ulupinfo_ie->extensionValue.present = F1AP_ULUPTNLInformation_ToBeSetup_ItemExtIEs__extensionValue_PR_BHInfo;
F1AP_BHInfo_t *Bhinfo = &ulupinfo_ie->extensionValue.choice.BHInfo;
if(bh_info->is_bAProutingID_set){
Bhinfo->bAProutingID = calloc(1, sizeof(F1AP_BAPRoutingID_t));
NR_BAPADDRESS_TO_BIT_STRING(bh_info->bAProutingID.bAPAddress, &Bhinfo->bAProutingID->bAPAddress);
NR_BAPPATHID_TO_BIT_STRING(bh_info->bAProutingID.bAPPathID, &Bhinfo->bAProutingID->bAPPathID);
}
if(bh_info->egressList_length > 0){
Bhinfo->egressBHRLCCHList = calloc(bh_info->egressList_length, sizeof(F1AP_EgressBHRLCCHItem_t));
for(int k = 0; k < bh_info->egressList_length; k++){
asn1cSequenceAdd(Bhinfo->egressBHRLCCHList->list, F1AP_EgressBHRLCCHItem_t, egressLink);
NR_BAPADDRESS_TO_BIT_STRING(bh_info->egressBHRLCCHList[k].nextHopBAPAddress, &egressLink->nextHopBAPAddress);
NR_BHRLCCHANNELID_TO_BIT_STRING(bh_info->egressBHRLCCHList[k].bHRLCChannelID, &egressLink->bHRLCChannelID);
}
}
}
}
/* 12.1.4 rLCMode */
/* TODO use rlc_mode from f1ap_drb_to_be_setup */
......
......@@ -1545,11 +1545,34 @@ static int handle_rrcSetupComplete(const protocol_ctxt_t *const ctxt_pP,
if (setup_complete_ies->nonCriticalExtension != NULL){
if (*setup_complete_ies->nonCriticalExtension->iab_NodeIndication_r16 == NR_RRCSetupComplete_v1610_IEs__iab_NodeIndication_r16_true){
LOG_I(NR_RRC, "IAB Node Indication received and set to true\n");
UE->is_iab_mt = true;
UE->is_iab_mt = true; // not used
// Call UE Context modification request.
gNB_RRC_INST *rrc = RC.nrrrc[0];
f1_ue_data_t ue_data = cu_get_f1_ue_data(UE->rrc_ue_id);
RETURN_IF_INVALID_ASSOC_ID(ue_data);
f1ap_ue_context_modif_req_t ue_context_modif_req = {
.gNB_CU_ue_id = UE->rrc_ue_id,
.gNB_DU_ue_id = ue_data.secondary_ue,
.plmn.mcc = rrc->configuration.mcc[0],
.plmn.mnc = rrc->configuration.mnc[0],
.plmn.mnc_digit_length = rrc->configuration.mnc_digit_length[0],
.nr_cellid = rrc->nr_cellid,
.servCellId = 0, /* TODO: correct value? */
};
rrc->mac_rrc.ue_context_modification_request(ue_data.du_assoc_id, &ue_context_modif_req);
/* if we did not receive any UE Capabilities, let's do that now. It should
* only happen on the first time a reconfiguration arrives. Afterwards, we
* should have them. If the UE does not give us anything, we will re-request
* the capabilities after each reconfiguration, which is a finite number
if (UE->ue_cap_buffer.len == 0) {
rrc_gNB_generate_UECapabilityEnquiry(ctxt_pP, ue_context_p);
}
*/
} else{
UE->is_iab_mt = false;
UE->is_iab_mt = false; // not used
}
}
// -------------------
......
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