diff --git a/openair2/F1AP/MESSAGES/ASN1/R15.2.1/F1AP-Constants.asn b/openair2/F1AP/MESSAGES/ASN1/R15.2.1/F1AP-Constants.asn index de34aa8f43..8b43af6348 100644 --- a/openair2/F1AP/MESSAGES/ASN1/R15.2.1/F1AP-Constants.asn +++ b/openair2/F1AP/MESSAGES/ASN1/R15.2.1/F1AP-Constants.asn @@ -89,8 +89,10 @@ maxnoofPagingCells INTEGER ::= 512 maxnoofTNLAssociations INTEGER ::= 32 maxnoofQoSFlows INTEGER ::= 64 maxnoofSliceItems INTEGER ::= 1024 -maxCellineNB INTEGER ::= 256 - +maxCellineNB INTEGER ::= 256 +maxnoofTLAs INTEGER ::= 16 +maxnoofGTPTLAs INTEGER ::= 16 +maxnoofExtSliceItems INTEGER ::= 65535 -- ************************************************************** -- @@ -252,5 +254,12 @@ id-PWS-Failed-NR-CGI-List ProtocolIE-ID ::= 154 id-PWS-Failed-NR-CGI-Item ProtocolIE-ID ::= 155 id-ConfirmedUEID ProtocolIE-ID ::= 156 id-Cancel-all-Warning-Messages-Indicator ProtocolIE-ID ::= 157 - +id-GNB-DU-RRC-Version ProtocolIE-ID ::= 171 +id-latest-RRC-Version-Enhanced ProtocolIE-ID ::= 199 +id-Transport-Layer-Address-Info ProtocolIE-ID ::= 254 +id-BAPAddress ProtocolIE-ID ::= 281 +id-NPNSupportInfo ProtocolIE-ID ::= 384 +id-NID ProtocolIE-ID ::= 385 +id-ExtendedTAISliceSupportList ProtocolIE-ID ::= 390 +id-Extended-GNB-DU-Name ProtocolIE-ID ::= 426 END diff --git a/openair2/F1AP/MESSAGES/ASN1/R15.2.1/F1AP-IEs.asn b/openair2/F1AP/MESSAGES/ASN1/R15.2.1/F1AP-IEs.asn index aa92b8d3f8..f91960a814 100644 --- a/openair2/F1AP/MESSAGES/ASN1/R15.2.1/F1AP-IEs.asn +++ b/openair2/F1AP/MESSAGES/ASN1/R15.2.1/F1AP-IEs.asn @@ -17,6 +17,8 @@ IMPORTS id-HandoverPreparationInformation, id-TAISliceSupportList, id-RANAC, + id-NPNSupportInfo, + id-ExtendedTAISliceSupportList, maxNRARFCN, maxnoofErrors, maxnoofBPLMNs, @@ -26,7 +28,11 @@ IMPORTS maxnoofQoSFlows, maxnoofSliceItems, maxnoofSIBTypes, - maxCellineNB + maxCellineNB, + id-latest-RRC-Version-Enhanced, + maxnoofTLAs, + maxnoofExtSliceItems, + maxnoofGTPTLAs FROM F1AP-Constants @@ -83,10 +89,13 @@ BroadcastPLMNs-Item ::= SEQUENCE { } BroadcastPLMNs-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { -{ ID id-TAISliceSupportList CRITICALITY ignore EXTENSION SliceSupportList PRESENCE optional }, +{ ID id-TAISliceSupportList CRITICALITY ignore EXTENSION SliceSupportList PRESENCE optional }| +{ ID id-NPNSupportInfo CRITICALITY reject EXTENSION NPNSupportInfo PRESENCE optional }| +{ ID id-ExtendedTAISliceSupportList CRITICALITY reject EXTENSION ExtendedSliceSupportList PRESENCE optional }, ... } +BAPAddress ::= BIT STRING (SIZE(10)) -- C @@ -566,6 +575,8 @@ Dynamic5QIDescriptor-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { -- E +ExtendedSliceSupportList ::= SEQUENCE (SIZE(1.. maxnoofExtSliceItems)) OF SliceSupportItem + Endpoint-IP-address-and-port ::=SEQUENCE { endpointIPAddress TransportLayerAddress, iE-Extensions ProtocolExtensionContainer { { Endpoint-IP-address-and-port-ExtIEs} } OPTIONAL @@ -620,6 +631,20 @@ EUTRA-TDD-Info-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { ... } +Extended-GNB-DU-Name ::= SEQUENCE { + gNB-DU-NameVisibleString GNB-DU-NameVisibleString OPTIONAL, + gNB-DU-NameUTF8String GNB-DU-NameUTF8String OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { Extended-GNB-DU-Name-ExtIEs } } OPTIONAL, + ... +} + +Extended-GNB-DU-Name-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +GNB-DU-NameVisibleString ::= VisibleString(SIZE(1..150,...)) +GNB-DU-NameUTF8String ::= UTF8String(SIZE(1..150,...)) + -- F FDD-Info ::= SEQUENCE { @@ -798,6 +823,26 @@ GTPTunnel-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { ... } +GTPTLAs ::= SEQUENCE (SIZE(1.. maxnoofGTPTLAs)) OF GTPTLA-Item + +GTPTLA-Item ::= SEQUENCE { + gTPTransportLayerAddress TransportLayerAddress, + iE-Extensions ProtocolExtensionContainer { { GTPTLA-Item-ExtIEs } } OPTIONAL +} + +GTPTLA-Item-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +RRC-Version ::= SEQUENCE { + latest-RRC-Version BIT STRING (SIZE(3)), + iE-Extensions ProtocolExtensionContainer { { RRC-Version-ExtIEs } } OPTIONAL} + +RRC-Version-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + {ID id-latest-RRC-Version-Enhanced CRITICALITY ignore EXTENSION OCTET STRING (SIZE(3)) PRESENCE optional }, + ... +} + -- H HandoverPreparationInformation ::= OCTET STRING @@ -917,6 +962,17 @@ NumberOfBroadcasts ::= INTEGER (0..65535) NumberofBroadcastRequest ::= INTEGER (0..65535) +NID ::= BIT STRING (SIZE(44)) + +NPNSupportInfo ::= CHOICE { + sNPN-Information NID, + choice-extension ProtocolIE-SingleContainer { { NPNSupportInfo-ExtIEs } } +} + +NPNSupportInfo-ExtIEs F1AP-PROTOCOL-IES ::= { + ... +} + -- O OffsetToPointA ::= INTEGER (0..2199,...) @@ -1378,6 +1434,40 @@ TypeOfError ::= ENUMERATED { ... } +Transport-UP-Layer-Address-Info-To-Add-List ::= SEQUENCE (SIZE(1.. maxnoofTLAs)) OF Transport-UP-Layer-Address-Info-To-Add-Item + +Transport-UP-Layer-Address-Info-To-Add-Item ::= SEQUENCE { + iP-SecTransportLayerAddress TransportLayerAddress, + gTPTransportLayerAddressToAdd GTPTLAs OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { Transport-UP-Layer-Address-Info-To-Add-ItemExtIEs } } OPTIONAL +} + +Transport-UP-Layer-Address-Info-To-Add-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Transport-UP-Layer-Address-Info-To-Remove-List ::= SEQUENCE (SIZE(1.. maxnoofTLAs)) OF Transport-UP-Layer-Address-Info-To-Remove-Item + +Transport-UP-Layer-Address-Info-To-Remove-Item ::= SEQUENCE { + iP-SecTransportLayerAddress TransportLayerAddress, + gTPTransportLayerAddressToRemove GTPTLAs OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { Transport-UP-Layer-Address-Info-To-Remove-ItemExtIEs } } OPTIONAL +} + +Transport-UP-Layer-Address-Info-To-Remove-ItemExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + +Transport-Layer-Address-Info ::= SEQUENCE { + transport-UP-Layer-Address-Info-To-Add-List Transport-UP-Layer-Address-Info-To-Add-List OPTIONAL, + transport-UP-Layer-Address-Info-To-Remove-List Transport-UP-Layer-Address-Info-To-Remove-List OPTIONAL, + iE-Extensions ProtocolExtensionContainer { { Transport-Layer-Address-Info-ExtIEs } } OPTIONAL +} + +Transport-Layer-Address-Info-ExtIEs F1AP-PROTOCOL-EXTENSION ::= { + ... +} + -- U UE-associatedLogicalF1-ConnectionItem ::= SEQUENCE { diff --git a/openair2/F1AP/MESSAGES/ASN1/R15.2.1/F1AP-PDU-Contents.asn b/openair2/F1AP/MESSAGES/ASN1/R15.2.1/F1AP-PDU-Contents.asn index ec6e3733b1..b0f44aa082 100644 --- a/openair2/F1AP/MESSAGES/ASN1/R15.2.1/F1AP-PDU-Contents.asn +++ b/openair2/F1AP/MESSAGES/ASN1/R15.2.1/F1AP-PDU-Contents.asn @@ -118,7 +118,13 @@ IMPORTS EUTRA-NR-CellResourceCoordinationReqAck-Container, ListofEUTRACellsinGNBDUCoordination, SpectrumSharingGroupID, - RequestType + RequestType, + RRC-Version, + Transport-Layer-Address-Info, + TransportLayerAddress, + BAPAddress, + Extended-GNB-DU-Name, + NID FROM F1AP-IEs @@ -292,7 +298,11 @@ FROM F1AP-Containers maxnoofSRBs, maxnoofPagingCells, maxnoofTNLAssociations, - maxCellineNB + maxCellineNB, + id-GNB-DU-RRC-Version, + id-Transport-Layer-Address-Info, + id-BAPAddress, + id-Extended-GNB-DU-Name FROM F1AP-Constants; @@ -413,7 +423,11 @@ F1SetupRequestIEs F1AP-PROTOCOL-IES ::= { { ID id-TransactionID CRITICALITY reject TYPE TransactionID PRESENCE mandatory }| { ID id-gNB-DU-ID CRITICALITY reject TYPE GNB-DU-ID PRESENCE mandatory }| { ID id-gNB-DU-Name CRITICALITY ignore TYPE GNB-DU-Name PRESENCE optional }| - { ID id-gNB-DU-Served-Cells-List CRITICALITY reject TYPE GNB-DU-Served-Cells-List PRESENCE mandatory }, + { ID id-gNB-DU-Served-Cells-List CRITICALITY reject TYPE GNB-DU-Served-Cells-List PRESENCE mandatory }| + { ID id-GNB-DU-RRC-Version CRITICALITY reject TYPE RRC-Version PRESENCE optional }| + { ID id-Transport-Layer-Address-Info CRITICALITY ignore TYPE Transport-Layer-Address-Info PRESENCE optional }| + { ID id-BAPAddress CRITICALITY ignore TYPE BAPAddress PRESENCE optional }| + { ID id-Extended-GNB-DU-Name CRITICALITY ignore TYPE Extended-GNB-DU-Name PRESENCE optional }, ... } diff --git a/openair2/F1AP/f1ap_cu_interface_management.c b/openair2/F1AP/f1ap_cu_interface_management.c index 48c5c2de11..adb6ee22e9 100644 --- a/openair2/F1AP/f1ap_cu_interface_management.c +++ b/openair2/F1AP/f1ap_cu_interface_management.c @@ -79,6 +79,10 @@ int CU_send_ERROR_INDICATION(instance_t instance, F1AP_ErrorIndication_t *ErrorI /* F1 Setup */ + +void *g_cuF1SetupReq; +uint32_t g_cuF1SetupReqSize; + int CU_handle_F1_SETUP_REQUEST(instance_t instance, uint32_t assoc_id, uint32_t stream, @@ -94,8 +98,18 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance, DevAssert(pdu != NULL); + /* Create */ + g_cuF1SetupReq = malloc(sizeof(F1AP_F1SetupRequest_t)); + memset(g_cuF1SetupReq, 0, sizeof(F1AP_F1SetupRequest_t)); + g_cuF1SetupReqSize = sizeof(F1AP_F1SetupRequest_t); + container = &pdu->choice.initiatingMessage->value.choice.F1SetupRequest; + /*copying to global buffer for E2Cell Info to be sent during E2SetupReq */ + memcpy(g_cuF1SetupReq, container, sizeof(F1AP_F1SetupRequest_t)); + LOG_I(F1AP, "++ CU Received F1SetupReq for E2Cell Info copied ++\n"); + + /* F1 Setup Request == Non UE-related procedure -> stream 0 */ if (stream != 0) { LOG_W(F1AP, "[SCTP %d] Received f1 setup request on stream != 0 (%d)\n", @@ -254,8 +268,12 @@ int CU_handle_F1_SETUP_REQUEST(instance_t instance, return 0; } +void *g_cuF1SetupResp; +int32_t g_cuF1SetupRespSize; + int CU_send_F1_SETUP_RESPONSE(instance_t instance, - f1ap_setup_resp_t *f1ap_setup_resp) { + f1ap_setup_resp_t *f1ap_setup_resp) +{ module_id_t enb_mod_idP; module_id_t cu_mod_idP; @@ -273,6 +291,10 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance, int i = 0; /* Create */ + g_cuF1SetupResp = malloc(sizeof(F1AP_F1SetupResponse_t)); + memset(g_cuF1SetupResp, 0, sizeof(F1AP_F1SetupResponse_t)); + g_cuF1SetupRespSize = sizeof(F1AP_F1SetupResponse_t); + /* 0. Message Type */ memset(&pdu, 0, sizeof(pdu)); pdu.present = F1AP_F1AP_PDU_PR_successfulOutcome; @@ -381,6 +403,11 @@ int CU_send_F1_SETUP_RESPONSE(instance_t instance, } ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); + /*copying to global buffer for E2Cell Info to be sent during E2SetupReq */ + memcpy(g_cuF1SetupResp, out, sizeof(F1AP_F1SetupResponse_t)); + LOG_I(F1AP, "++ CU F1SetupResp for E2Cell Info copied ++\n"); + + /* encode */ if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { LOG_E(F1AP, "Failed to encode F1 setup request\n"); diff --git a/openair2/F1AP/f1ap_du_interface_management.c b/openair2/F1AP/f1ap_du_interface_management.c index 341c050f55..b4a1917abe 100644 --- a/openair2/F1AP/f1ap_du_interface_management.c +++ b/openair2/F1AP/f1ap_du_interface_management.c @@ -83,8 +83,12 @@ int DU_handle_ERROR_INDICATION(instance_t instance, F1 Setup */ +void *g_f1SetupReq; +uint32_t g_f1SetupReqSize; + // SETUP REQUEST -int DU_send_F1_SETUP_REQUEST(instance_t instance) { +int DU_send_F1_SETUP_REQUEST(instance_t instance) +{ module_id_t enb_mod_idP=0; module_id_t du_mod_idP=0; @@ -98,6 +102,10 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) { int j = 0; /* Create */ + //g_f1SetupReq = malloc(sizeof(F1AP_F1AP_PDU_t)); + //memset(g_f1SetupReq, 0, sizeof(F1AP_F1AP_PDU_t)); + //g_f1SetupReqSize = sizeof(F1AP_F1AP_PDU_t); + /* 0. pdu Type */ memset(&pdu, 0, sizeof(pdu)); pdu.present = F1AP_F1AP_PDU_PR_initiatingMessage; @@ -171,11 +179,11 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) { F1AP_NRCGI_t nRCGI; memset(&nRCGI, 0, sizeof(F1AP_NRCGI_t)); MCC_MNC_TO_PLMNID(f1ap_du_data->mcc[i], f1ap_du_data->mnc[i], f1ap_du_data->mnc_digit_length[i], &nRCGI.pLMN_Identity); - LOG_D(F1AP, "plmn: (%d,%d)\n",f1ap_du_data->mcc[i],f1ap_du_data->mnc[i]); + LOG_I(F1AP, "plmn: (%d,%d)\n",f1ap_du_data->mcc[i],f1ap_du_data->mnc[i]); //MCC_MNC_TO_PLMNID(208, 95, 2, &nRCGI.pLMN_Identity); NR_CELL_ID_TO_BIT_STRING(f1ap_du_data->nr_cellid[i], &nRCGI.nRCellIdentity); - LOG_D(F1AP, "nRCellIdentity (%llx): %x.%x.%x.%x.%x\n", + LOG_I(F1AP, "nRCellIdentity (%llx): %x.%x.%x.%x.%x\n", (long long unsigned int)f1ap_du_data->nr_cellid[i], nRCGI.nRCellIdentity.buf[0], nRCGI.nRCellIdentity.buf[1], @@ -399,12 +407,43 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) { } ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); +#if 1 + /* RRC Version */ + /* gNB-DU RRC version (BIT STRING) */ + ie = (F1AP_F1SetupRequestIEs_t *)calloc(1, sizeof(F1AP_F1SetupRequestIEs_t)); + ie->id = F1AP_ProtocolIE_ID_id_GNB_DU_RRC_Version; + ie->criticality = F1AP_Criticality_reject; + ie->value.present = F1AP_F1SetupRequestIEs__value_PR_RRC_Version; + //asn_int642INTEGER(&ie->value.choice.GNB_DU_ID, f1ap_du_data->gNB_DU_id); + ie->value.choice.RRC_Version.latest_RRC_Version.buf = calloc(1, sizeof(uint8_t)); + ie->value.choice.RRC_Version.latest_RRC_Version.buf[0] = 0; + //ie->value.choice.RRC_Version.latest_RRC_Version.buf[1] = 0; + //ie->value.choice.RRC_Version.latest_RRC_Version.buf[2] = 0; + ie->value.choice.RRC_Version.latest_RRC_Version.size = 1; + ie->value.choice.RRC_Version.latest_RRC_Version.bits_unused = 5; + + ASN_SEQUENCE_ADD(&out->protocolIEs.list, ie); +#endif + + /*copying to global buffer for E2Cell Info to be sent during E2SetupReq */ + //memcpy(g_f1SetupReq, &pdu, sizeof(F1AP_F1AP_PDU_t)); + //LOG_I(F1AP, "++ F1SetupReq for E2Cell Info copied PCI:%u ++\n",f1ap_du_data->nr_pci[0]); + /* encode */ if (f1ap_encode_pdu(&pdu, &buffer, &len) < 0) { LOG_E(F1AP, "Failed to encode F1 setup request\n"); return -1; } + /* Create */ + g_f1SetupReq = malloc(len); + memset(g_f1SetupReq, 0, len); + g_f1SetupReqSize = len; + + /*copying to global buffer for E2Cell Info to be sent during E2SetupReq */ + memcpy(g_f1SetupReq, buffer, len); + LOG_I(F1AP, "++ F1SetupReq for E2Cell Info copied PCI:%u ++\n",f1ap_du_data->nr_pci[0]); + MSC_LOG_TX_MESSAGE( MSC_F1AP_DU, MSC_F1AP_CU, @@ -419,6 +458,8 @@ int DU_send_F1_SETUP_REQUEST(instance_t instance) { return 0; } +void *g_f1SetupResp; +uint32_t g_f1SetupRespSize; int DU_handle_F1_SETUP_RESPONSE(instance_t instance, uint32_t assoc_id, uint32_t stream, @@ -438,6 +479,13 @@ int DU_handle_F1_SETUP_RESPONSE(instance_t instance, F1AP_F1SetupResponse_t *in = &pdu->choice.successfulOutcome->value.choice.F1SetupResponse; + g_f1SetupResp = malloc(sizeof(F1AP_F1SetupResponse_t)); + memset(g_f1SetupResp, 0, sizeof(F1AP_F1SetupResponse_t)); + g_f1SetupRespSize = sizeof(F1AP_F1SetupResponse_t); + + /*copying to global buffer for E2Cell Info to be sent during E2SetupResp */ + memcpy(g_f1SetupResp, in, sizeof(F1AP_F1SetupResponse_t)); + LOG_I(F1AP, "++ F1SetupResp for E2Cell Info copied ++\n"); F1AP_F1SetupResponseIEs_t *ie; int TransactionId = -1; diff --git a/openair2/F1AP/f1ap_encoder.c b/openair2/F1AP/f1ap_encoder.c index e448690139..1dbfd707c0 100644 --- a/openair2/F1AP/f1ap_encoder.c +++ b/openair2/F1AP/f1ap_encoder.c @@ -33,7 +33,7 @@ #include "f1ap_common.h" #include "f1ap_encoder.h" -int asn1_encoder_xer_print = 0; +int asn1_encoder_xer_print = 1; /* static inline int f1ap_encode_initiating(f1ap_message *message, diff --git a/openair2/RIC_AGENT/E2AP/e2ap_generate_messages.c b/openair2/RIC_AGENT/E2AP/e2ap_generate_messages.c index 5cc9210f9b..dc787428ce 100644 --- a/openair2/RIC_AGENT/E2AP/e2ap_generate_messages.c +++ b/openair2/RIC_AGENT/E2AP/e2ap_generate_messages.c @@ -48,6 +48,14 @@ extern int global_e2_node_id(ranid_t ranid, E2AP_GlobalE2node_ID_t* node_id); extern unsigned int ran_functions_len; extern ric_ran_function_t **ran_functions; +extern void *g_f1SetupReq; +extern void *g_cuF1SetupReq; +extern uint32_t g_f1SetupReqSize; +extern uint32_t g_cuF1SetupReqSize; +extern void *g_f1SetupResp; +extern void *g_cuF1SetupResp; +extern uint32_t g_f1SetupRespSize; +extern uint32_t g_cuF1SetupRespSize; int e2ap_generate_e2_setup_request(ranid_t ranid, uint8_t **buffer,uint32_t *len, @@ -128,7 +136,6 @@ int e2ap_generate_e2_setup_request(ranid_t ranid, //ie->value.present = E2AP_E2setupRequestIEs__value_PR_NOTHING; ie->value.present = E2AP_E2setupRequestIEs__value_PR_E2nodeComponentConfigAddition_List; -#if 1 e2node_comp_cfg_update_ie = (E2AP_E2nodeComponentConfigAddition_ItemIEs_t *)calloc(1,sizeof(*e2node_comp_cfg_update_ie)); e2node_comp_cfg_update_ie->id = E2AP_ProtocolIE_ID_id_E2nodeComponentConfigAddition_Item; e2node_comp_cfg_update_ie->criticality = E2AP_Criticality_reject; @@ -138,31 +145,61 @@ int e2ap_generate_e2_setup_request(ranid_t ranid, if (e2node_type == E2NODE_TYPE_ENB_CU) { - e2node_comp_cfg_update_ie->value.choice.E2nodeComponentConfigAddition_Item.e2nodeComponentInterfaceType = E2AP_E2nodeComponentInterfaceType_e1; //E2AP_E2nodeComponentType_ng_eNB_CU - e2NodeCompId->present = E2AP_E2nodeComponentID_PR_e2nodeComponentInterfaceTypeE1; + e2node_comp_cfg_update_ie->value.choice.E2nodeComponentConfigAddition_Item.e2nodeComponentInterfaceType = E2AP_E2nodeComponentInterfaceType_f1; + e2NodeCompId->present = E2AP_E2nodeComponentID_PR_e2nodeComponentInterfaceTypeF1; + if (asn_umax2INTEGER(&e2NodeCompId->choice.e2nodeComponentInterfaceTypeE1.gNB_CU_CP_ID, 100) != 0) RIC_AGENT_ERROR("gNB_CU_UP_ID encoding failed\n"); - //e2NodeCompId->choice.e2nodeComponentTypeGNB_CU_UP.gNB_CU_UP_ID.size = strlen("100");//sizeof(uint64_t); - //e2NodeCompId->choice.e2nodeComponentTypeGNB_CU_UP.gNB_CU_UP_ID.buf = (uint8_t *)strdup("100"); + + e2node_comp_cfg_update_ie->value.choice.E2nodeComponentConfigAddition_Item.e2nodeComponentConfiguration.e2nodeComponentRequestPart.size = + g_cuF1SetupReqSize;//strlen("100"); + e2node_comp_cfg_update_ie->value.choice.E2nodeComponentConfigAddition_Item.e2nodeComponentConfiguration.e2nodeComponentRequestPart.buf = + (uint8_t *) malloc(g_cuF1SetupReqSize);//(uint8_t *)strdup("100"); + + memcpy(e2node_comp_cfg_update_ie->value.choice.E2nodeComponentConfigAddition_Item.e2nodeComponentConfiguration.e2nodeComponentRequestPart.buf, + g_cuF1SetupReq, + g_cuF1SetupReqSize); + + e2node_comp_cfg_update_ie->value.choice.E2nodeComponentConfigAddition_Item.e2nodeComponentConfiguration.e2nodeComponentResponsePart.size = + g_cuF1SetupRespSize;//strlen("200"); + e2node_comp_cfg_update_ie->value.choice.E2nodeComponentConfigAddition_Item.e2nodeComponentConfiguration.e2nodeComponentResponsePart.buf = + (uint8_t *) malloc(g_cuF1SetupRespSize);//(uint8_t *)strdup("200"); + memcpy(e2node_comp_cfg_update_ie->value.choice.E2nodeComponentConfigAddition_Item.e2nodeComponentConfiguration.e2nodeComponentResponsePart.buf, + g_cuF1SetupResp, + g_cuF1SetupRespSize); } else if (e2node_type == E2NODE_TYPE_ENB_DU) { - e2node_comp_cfg_update_ie->value.choice.E2nodeComponentConfigAddition_Item.e2nodeComponentInterfaceType = E2AP_E2nodeComponentInterfaceType_f1; //E2AP_E2nodeComponentType_ng_eNB_DU + e2node_comp_cfg_update_ie->value.choice.E2nodeComponentConfigAddition_Item.e2nodeComponentInterfaceType = E2AP_E2nodeComponentInterfaceType_f1; e2NodeCompId->present = E2AP_E2nodeComponentID_PR_e2nodeComponentInterfaceTypeF1; + if (asn_umax2INTEGER(&e2NodeCompId->choice.e2nodeComponentInterfaceTypeF1.gNB_DU_ID, 200) != 0) RIC_AGENT_ERROR("gNB_DU_ID encoding failed\n"); - //e2NodeCompId->choice.e2nodeComponentTypeGNB_DU.gNB_DU_ID.size = strlen("200"); - //e2NodeCompId->choice.e2nodeComponentTypeGNB_DU.gNB_DU_ID.buf = (uint8_t *)strdup("200"); + + e2node_comp_cfg_update_ie->value.choice.E2nodeComponentConfigAddition_Item.e2nodeComponentConfiguration.e2nodeComponentRequestPart.size = + g_f1SetupReqSize; + e2node_comp_cfg_update_ie->value.choice.E2nodeComponentConfigAddition_Item.e2nodeComponentConfiguration.e2nodeComponentRequestPart.buf = + (uint8_t *) malloc(g_f1SetupReqSize); + memcpy(e2node_comp_cfg_update_ie->value.choice.E2nodeComponentConfigAddition_Item.e2nodeComponentConfiguration.e2nodeComponentRequestPart.buf, + g_f1SetupReq, + g_f1SetupReqSize); + + e2node_comp_cfg_update_ie->value.choice.E2nodeComponentConfigAddition_Item.e2nodeComponentConfiguration.e2nodeComponentResponsePart.size = + g_f1SetupRespSize; + e2node_comp_cfg_update_ie->value.choice.E2nodeComponentConfigAddition_Item.e2nodeComponentConfiguration.e2nodeComponentResponsePart.buf = + (uint8_t *) malloc(g_f1SetupRespSize); + memcpy(e2node_comp_cfg_update_ie->value.choice.E2nodeComponentConfigAddition_Item.e2nodeComponentConfiguration.e2nodeComponentResponsePart.buf, + g_f1SetupResp, + g_f1SetupRespSize); } - e2node_comp_cfg_update_ie->value.choice.E2nodeComponentConfigAddition_Item.e2nodeComponentConfiguration.e2nodeComponentRequestPart.size = strlen("100"); - e2node_comp_cfg_update_ie->value.choice.E2nodeComponentConfigAddition_Item.e2nodeComponentConfiguration.e2nodeComponentRequestPart.buf = (uint8_t *)strdup("100"); - e2node_comp_cfg_update_ie->value.choice.E2nodeComponentConfigAddition_Item.e2nodeComponentConfiguration.e2nodeComponentResponsePart.size = strlen("200"); - e2node_comp_cfg_update_ie->value.choice.E2nodeComponentConfigAddition_Item.e2nodeComponentConfiguration.e2nodeComponentResponsePart.buf = (uint8_t *)strdup("200"); + //e2node_comp_cfg_update_ie->value.choice.E2nodeComponentConfigAddition_Item.e2nodeComponentConfiguration.e2nodeComponentRequestPart.size = strlen("100"); + //e2node_comp_cfg_update_ie->value.choice.E2nodeComponentConfigAddition_Item.e2nodeComponentConfiguration.e2nodeComponentRequestPart.buf = (uint8_t *)strdup("100"); + //e2node_comp_cfg_update_ie->value.choice.E2nodeComponentConfigAddition_Item.e2nodeComponentConfiguration.e2nodeComponentResponsePart.size = strlen("200"); + //e2node_comp_cfg_update_ie->value.choice.E2nodeComponentConfigAddition_Item.e2nodeComponentConfiguration.e2nodeComponentResponsePart.buf = (uint8_t *)strdup("200"); ASN_SEQUENCE_ADD(&ie->value.choice.E2nodeComponentConfigAddition_List.list, e2node_comp_cfg_update_ie); -#endif ASN_SEQUENCE_ADD(&req->protocolIEs.list,ie); if (e2ap_encode_pdu(&pdu,buffer,len) < 0) {