Commit a53a73c7 authored by SreeshmaShiv's avatar SreeshmaShiv

changes 29-01

parent f5930839
......@@ -143,6 +143,9 @@
#include "common/ran_context.h"
#include "conversions.h"
#include "cmake_targets/ran_build/build/openair2/RRC/NR/MESSAGES/NR_HandoverPreparationInformation.h"
#include "cmake_targets/ran_build/build/openair2/RRC/NR/MESSAGES/NR_HandoverPreparationInformation-IEs.h"
#include "cmake_targets/ran_build/build/openair2/RRC/NR/MESSAGES/NR_UE-CapabilityRAT-Container.h"
//#define XER_PRINT
typedef struct xer_sprint_string_s {
......@@ -1231,3 +1234,43 @@ uint8_t do_NR_Paging(uint8_t Mod_id, uint8_t *buffer, uint32_t tmsi) {
return((enc_rval.encoded+7)/8);
}
int do_NRHandoverPreparation(char *ho_buf, int ho_size, NR_UE_NR_Capability_t *ue_nr_cap, int rrc_size) {
asn_enc_rval_t enc_rval;
NR_HandoverPreparationInformation_t ho;
NR_HandoverPreparationInformation_IEs_t *ho_info;
NR_UE_CapabilityRAT_Container_t *ue_cap_rat_container;
char rrc_buf[rrc_size];
memset(rrc_buf, 0, rrc_size);
enc_rval = uper_encode_to_buffer(&asn_DEF_NR_UE_NR_Capability,
NULL,
ue_nr_cap,
rrc_buf,
rrc_size);
/* TODO: free the OCTET_STRING */
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
enc_rval.failed_type->name, enc_rval.encoded);
memset(&ho, 0, sizeof(ho));
ho.criticalExtensions.present = NR_HandoverPreparationInformation__criticalExtensions_PR_c1;
ho.criticalExtensions.choice.c1->present = NR_HandoverPreparationInformation__criticalExtensions__c1_PR_handoverPreparationInformation;
ho_info = &ho.criticalExtensions.choice.c1->choice.handoverPreparationInformation;
{
ue_cap_rat_container = (NR_UE_CapabilityRAT_Container_t *)calloc(1,sizeof(NR_UE_CapabilityRAT_Container_t));
ue_cap_rat_container->rat_Type = NR_RAT_Type_nr;
AssertFatal (OCTET_STRING_fromBuf(
&ue_cap_rat_container->ue_CapabilityRAT_Container,
rrc_buf, rrc_size) != -1, "fatal: OCTET_STRING_fromBuf failed\n");
asn1cSeqAdd(&ho_info->ue_CapabilityRAT_List.list, ue_cap_rat_container);
}
enc_rval = uper_encode_to_buffer(&asn_DEF_NR_HandoverPreparationInformation,
NULL,
&ho,
ho_buf,
ho_size);
/* TODO: free the OCTET_STRING */
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %lu)!\n",
enc_rval.failed_type->name, enc_rval.encoded);
return((enc_rval.encoded+7)/8);
}
This diff is collapsed.
......@@ -39,6 +39,7 @@
#include "XNAP_QoSFlowsToBeSetup-Item.h"
#include "XNAP_NRModeInfoFDD.h"
#include "XNAP_NRModeInfoTDD.h"
#include "openair2/RRC/NR/nr_rrc_defs.h"
int xnap_gNB_generate_xn_setup_request(sctp_assoc_t assoc_id, xnap_setup_req_t *req)
{
......@@ -888,8 +889,21 @@ int xnap_gNB_generate_xn_handover_request (instance_t instance,
return -1;
}
// xnap_gNB_itti_send_sctp_data_req(assoc_id, buffer, len, 0); /////where do you get the assoc id from??
xnap_gNB_itti_send_sctp_data_req(assoc_id, buffer, len, 0); /////where do you get the assoc id from??
return ret;
}
void rrc_gNB_process_HandoverPreparationInformation(//// why is this here? should be in RRC
rrc_gNB_ue_context_t ue_context_p,
uint8_t *buffer,
int *size)
{
memset(buffer, 0, 8192);
char *ho_buf = (char *) buffer;
int ho_size;
ho_size = do_NRHandoverPreparation(ho_buf, 8192, ue_context_p.ue_context.UE_Capability_nr, ue_context_p.ue_context.UE_Capability_size);
*size = ho_size;
}
......@@ -182,11 +182,11 @@ gNBs =
NETWORK_INTERFACES :
{
GNB_INTERFACE_NAME_FOR_NG_AMF = "enp3s0";
GNB_IPV4_ADDRESS_FOR_NG_AMF = "10.33.42.213";
GNB_IPV4_ADDRESS_FOR_NG_AMF = "10.33.42.214";
GNB_INTERFACE_NAME_FOR_NGU = "enp3s0";
GNB_IPV4_ADDRESS_FOR_NGU = "10.33.42.213";
GNB_IPV4_ADDRESS_FOR_NGU = "10.33.42.214";
GNB_PORT_FOR_S1U = 2152; # Spec 2152
GNB_IPV4_ADDRESS_FOR_XNC = "10.33.42.213";
GNB_IPV4_ADDRESS_FOR_XNC = "10.33.42.214";
GNB_PORT_FOR_XNC = 38422; # Spec 36422
};
......
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