Commit 4259e606 authored by Navid Nikaein's avatar Navid Nikaein

x2 setup messages and fix the compilation issues

parent 2eb2f992
......@@ -351,7 +351,9 @@ add_library(S1AP_ENB
# Same limitation as described in RRC/S1AP: unknown generated file list
# so we generate it at cmake time
##############
if (${ENABLE_X2_IF})
if (${ENABLE_USE_X2})
message("-- X2AP = enabled")
add_list1_option(X2AP_VERSION R11 "X2AP Asn.1 grammar version" R10 R11)
set(X2AP_DIR ${OPENAIR2_DIR}/X2AP)
......@@ -412,6 +414,7 @@ add_library(X2AP_ENB_LIB
${X2AP_DIR}/x2ap_eNB_generate_messages.c
)
set(X2AP_ENB X2AP_ENB_LIB)
endif()
# Hardware dependant options
......@@ -613,7 +616,7 @@ add_boolean_option(RRC_DEFAULT_RAB_IS_AM False "Otherwise it is UM, confi
##########################
# X2AP LAYER OPTIONS
##########################
add_boolean_option(ENABLE_X2_IF False "Enable X2 interface for X2 hanodover")
add_boolean_option(ENABLE_USE_X2 False "Enable X2 interface for X2 hanodover")
##########################
# PROJECTS (IST, FRENCH COLL., etc)
......
#!/bin/sh
echo "building ctags for openair1 and openair2 ..."
ctags -e -R --exclude=openair1/DOCS/ --exclude=openair2/DOCS/ --exclude=openair2/RRC/CELLULAR/ --exclude=openair2/NAS/DRIVER/CELLULAR/ --exclude=openair2/SIMULATION/ --exclude=targets/DOCS/ --exclude=targets/PROJECTS/ openair1 openair2 targets
ctags -e -R --exclude=openair1/DOCS/ --exclude=openair2/DOCS/ --exclude=openair2/RRC/CELLULAR/ --exclude=openair2/NAS/DRIVER/CELLULAR/ --exclude=openair2/SIMULATION/ --exclude=targets/DOCS/ --exclude=targets/PROJECTS/ openair1 openair2 openair3 targets cmake_targets
......@@ -57,7 +57,7 @@
# include "gtpv1u_eNB_task.h"
# endif
# if defined(ENABLE_USE_X2)
# include "x2ap.h"
# include "x2ap_eNB.h"
//# include "sctp_eNB_task.h"
//# include "gtpv1u_eNB_task.h"
#endif
......
......@@ -270,7 +270,7 @@ static void enb_config_display(void)
int i,j;
printf( "\n----------------------------------------------------------------------\n");
printf( " ENB CONFIG FILE CONTENT LOADED (TBC):\n");
printf( " ENB CONFIG FILE CONTENT LOADED for %d eNBs (TBC):\n",enb_properties.number);
printf( "----------------------------------------------------------------------\n");
for (i = 0; i < enb_properties.number; i++) {
......
......@@ -75,21 +75,6 @@ void x2ap_eNB_handle_sctp_association_resp(instance_t instance,
sctp_new_association_resp_t *sctp_new_association_resp);
static
int x2ap_eNB_generate_x2_setup_request(x2ap_eNB_instance_t *instance_p,
x2ap_eNB_data_t *x2ap_enb_data_p);
static
int x2ap_eNB_generate_x2_setup_response(x2ap_eNB_instance_t *instance_p,
x2ap_eNB_data_t *x2ap_enb_data_p);
static
int x2ap_eNB_generate_x2_setup_failure(x2ap_eNB_instance_t *instance_p,
x2ap_eNB_data_t *x2ap_enb_data_p);
static
void x2ap_eNB_handle_sctp_data_ind(instance_t instance,
sctp_data_ind_t *sctp_data_ind) {
......@@ -122,7 +107,7 @@ void x2ap_eNB_handle_sctp_association_resp(instance_t instance, sctp_new_associa
DevAssert(x2ap_enb_data_p != NULL);
if (sctp_new_association_resp->sctp_state != SCTP_STATE_ESTABLISHED) {
S1AP_WARN("Received unsuccessful result for SCTP association (%u), instance %d, cnx_id %u\n",
X2AP_WARN("Received unsuccessful result for SCTP association (%u), instance %d, cnx_id %u\n",
sctp_new_association_resp->sctp_state,
instance,
sctp_new_association_resp->ulp_cnx_id);
......@@ -255,7 +240,6 @@ void x2ap_eNB_handle_register_eNB(instance_t instance,
DevAssert(new_instance != NULL);
RB_INIT(&new_instance->x2ap_enb_head);
//RB_INIT(&new_instance->x2ap_ue_head);
/* Copy usefull parameters */
new_instance->instance = instance;
......@@ -314,7 +298,7 @@ void *x2ap_task(void *arg)
X2AP_DEBUG("Starting X2AP layer\n");
x2ap_prepare_internal_data();
x2ap_eNB_prepare_internal_data();
itti_mark_task_ready(TASK_X2AP);
......
......@@ -120,7 +120,7 @@ x2ap_eNB_decode_initiating(x2ap_message *x2ap_message_p, X2ap_InitiatingMessage_
x2ap_xer_print_x2setuprequest_(x2ap_xer__print2sp,message_string,message);
message_id = X2AP_SETUP_REQUEST_LOG;
message_string_size = strlen(message_string);
message = itti_alloc_new_message_sized(TASK_S1AP,
message = itti_alloc_new_message_sized(TASK_X2AP,
message_id,
message_string_size + sizeof (IttiMsgText));
message->ittiMsg.x2ap_setup_request_log.size = message_string_size;
......
......@@ -51,15 +51,16 @@ typedef enum {
/* The eNB is successfully connected to another eNB. */
X2AP_ENB_STATE_CONNECTED = 0x2,
/* X2AP is ready, and the eNB is successfully connected to another eNB. */
X2AP_ENB_STATE_READY = 0x3,
/*
*/
X2AP_ENB_STATE_OVERLOAD = 0x3,
X2AP_ENB_STATE_OVERLOAD = 0x4,
X2AP_ENB_STATE_RESETTING = 0x4,
X2AP_ENB_STATE_RESETTING = 0x5,
X2AP_ENB_STATE_READY = 0x5,
/* Max number of states available */
X2AP_ENB_STATE_MAX,
} x2ap_eNB_state_t;
......@@ -122,7 +123,7 @@ typedef struct x2ap_eNB_data_s {
} x2ap_eNB_data_t;
typedef struct x2ap_eNB_instance_s {
/* used in simulation to store multiple eNB instances*/
STAILQ_ENTRY(x2ap_eNB_instance_s) x2ap_eNB_entries;
/* Number of target eNBs requested by eNB (tree size) */
......@@ -149,7 +150,7 @@ typedef struct x2ap_eNB_instance_s {
*/
uint32_t eNB_id;
/* The type of the cell */
enum cell_type_e cell_type;
cell_type_t cell_type;
/* Tracking area code */
uint16_t tac;
......@@ -179,8 +180,7 @@ typedef struct {
int x2ap_eNB_compare_assoc_id(struct x2ap_eNB_data_s *p1, struct x2ap_eNB_data_s *p2);
/* Generate the tree management functions */
RB_PROTOTYPE(x2ap_eNB_map, x2ap_eNB_data_s, 0entry,
x2ap_eNB_compare_assoc_id);
RB_PROTOTYPE(x2ap_eNB_map, x2ap_eNB_data_s, entry, x2ap_eNB_compare_assoc_id);
#endif /* X2AP_ENB_DEFS_H_ */
This diff is collapsed.
......@@ -29,6 +29,9 @@
#ifndef X2AP_ENB_GENERATE_MESSAGES_H_
#define X2AP_ENB_GENERATE_MESSAGES_H_
#include "x2ap_eNB_defs.h"
#include "x2ap_ies_defs.h"
int x2ap_eNB_generate_x2_setup_request(x2ap_eNB_instance_t *instance_p,
x2ap_eNB_data_t *x2ap_enb_data_p);
......
This diff is collapsed.
......@@ -26,6 +26,13 @@
Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France.
*******************************************************************************/
/*! \file x2ap_eNB_itti_messaging.c
* \brief itti interface between x2ap and sctp
* \author Navid Nikaein
* \date 2016
* \version 0.1
*/
#include "intertask_interface.h"
#include "x2ap_eNB_itti_messaging.h"
......
......@@ -27,6 +27,13 @@
*******************************************************************************/
/*! \file x2ap_eNB_management_procedures.c
* \brief x2ap eNb management procedures
* \author Navid Nikaein
* \date 2016
* \version 0.1
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
......@@ -48,8 +55,6 @@
# define X2AP_eNB_LIST_OUT(x, args...)
#endif
STAILQ_HEAD (x2ap_eNB_list_s, x2ap_eNB_data_s)
x2ap_eNB_list_head;
static int indent = 0;
......@@ -150,34 +155,42 @@ x2ap_eNB_instance_t *x2ap_eNB_get_instance(instance_t instance)
void
x2ap_dump_eNB_list (void) {
x2ap_eNB_data_t *eNB_ref;
x2ap_eNB_instance_t *inst = NULL;
struct x2ap_eNB_data_s *found = NULL;
struct x2ap_eNB_data_s *temp = NULL;
STAILQ_FOREACH (eNB_ref, &x2ap_eNB_list_head, x2ap_eNB_entries) {
x2ap_dump_eNB (eNB_ref);
memset(&temp, 0, sizeof(struct x2ap_eNB_data_s));
STAILQ_FOREACH (inst, &x2ap_eNB_internal_data.x2ap_eNB_instances_head, x2ap_eNB_entries) {
found = RB_FIND(x2ap_enb_map, &inst->x2ap_enb_head, &temp);
x2ap_dump_eNB (found);
}
}
void x2ap_dump_eNB ( x2ap_eNB_data_t * eNB_ref)
{
void x2ap_dump_eNB (x2ap_eNB_data_t * eNB_ref) {
if (eNB_ref == NULL) {
return;
}
eNB_LIST_OUT ("");
eNB_LIST_OUT ("eNB name: %s", eNB_ref->eNB_name == NULL ? "not present" : eNB_ref->eNB_name);
eNB_LIST_OUT ("eNB STATE: %07x", eNB_ref->state);
eNB_LIST_OUT ("eNB ID: %07x", eNB_ref->eNB_id);
indent++;
eNB_LIST_OUT ("SCTP cnx id: %d", eNB_ref->cnx_id);
eNB_LIST_OUT ("SCTP assoc id: %d", eNB_ref->assoc_id);
eNB_LIST_OUT ("SCTP instreams: %d", eNB_ref->instreams);
eNB_LIST_OUT ("SCTP outstreams: %d", eNB_ref->outstreams);
eNB_LIST_OUT ("SCTP instreams: %d", eNB_ref->in_streams);
eNB_LIST_OUT ("SCTP outstreams: %d", eNB_ref->out_streams);
indent--;
}
x2ap_eNB_data_t * x2ap_is_eNB_id_in_list (const uint32_t eNB_id)
{
x2ap_eNB_data_t *eNB_ref;
x2ap_eNB_instance_t *eNB_ref;
STAILQ_FOREACH (eNB_ref, &x2ap_eNB_list_head, x2ap_eNB_entries) {
STAILQ_FOREACH (eNB_ref, &x2ap_eNB_internal_data.x2ap_eNB_instances_head, x2ap_eNB_entries) {
if (eNB_ref->eNB_id == eNB_id) {
return eNB_ref;
......@@ -188,12 +201,17 @@ x2ap_eNB_data_t * x2ap_is_eNB_id_in_list (const uint32_t eNB_id)
x2ap_eNB_data_t * x2ap_is_eNB_assoc_id_in_list (const uint32_t sctp_assoc_id)
{
x2ap_eNB_data_t *eNB_ref;
STAILQ_FOREACH (eNB_ref, &x2ap_eNB_list_head, x2ap_eNB_entries) {
if (eNB_ref->sctp_assoc_id == sctp_assoc_id) {
return eNB_ref;
x2ap_eNB_instance_t *inst = NULL;
struct x2ap_eNB_data_s *found = NULL;
struct x2ap_eNB_data_s *temp = NULL;
STAILQ_FOREACH (inst, &x2ap_eNB_internal_data.x2ap_eNB_instances_head, x2ap_eNB_entries) {
found = RB_FIND(x2ap_enb_map, &inst->x2ap_enb_head, &temp);
if (found != NULL){
if (found->assoc_id == sctp_assoc_id) {
return found;
}
}
}
return NULL;
......
Active_eNBs = ( "eNB_Eurecom_LTEBox");
Active_eNBs = ( "eNB_X2_HO1","eNB_X2_HO2");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
......@@ -10,7 +10,7 @@ eNBs =
cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB_Eurecom_LTEBox";
eNB_name = "eNB_X2_HO1";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1";
......@@ -142,7 +142,7 @@ eNBs =
///X2
target_enb_x2_ip_address = ( { ipv4 = "10.0.1.1";
target_enb_x2_ip_address = ( { ipv4 = "127.0.0.1";
ipv6 = "192:168:30::17";
active = "yes";
preference = "ipv4";
......@@ -158,8 +158,189 @@ eNBs =
ENB_IPV4_ADDRESS_FOR_S1U = "10.0.1.100/24";
ENB_PORT_FOR_S1U = 2152; # Spec 2152
ENB_INTERFACE_NAME_FOR_X2C = "eth0";
ENB_IPV4_ADDRESS_FOR_X2C = "10.0.1.100/24";
ENB_INTERFACE_NAME_FOR_X2C = "lo";
ENB_IPV4_ADDRESS_FOR_X2C = "127.0.0.1/24";
ENB_PORT_FOR_X2C = 1234; # Spec ?
ENB_INTERFACE_NAME_FOR_X2U = "eth0";
ENB_IPV4_ADDRESS_FOR_X2U = "10.0.1.100/24";
ENB_PORT_FOR_X2U = 1234; # Spec ?
};
log_config :
{
global_log_level ="info";
global_log_verbosity ="medium";
hw_log_level ="info";
hw_log_verbosity ="medium";
phy_log_level ="info";
phy_log_verbosity ="medium";
mac_log_level ="info";
mac_log_verbosity ="high";
rlc_log_level ="info";
rlc_log_verbosity ="medium";
pdcp_log_level ="info";
pdcp_log_verbosity ="medium";
rrc_log_level ="info";
rrc_log_verbosity ="medium";
};
},
{
////////// Identification parameters:
eNB_ID = 0xe10;
cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB_X2_HO2";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1";
mobile_country_code = "208";
mobile_network_code = "92";
////////// Physical parameters:
component_carriers = (
{
frame_type = "FDD";
tdd_config = 3;
tdd_config_s = 0;
prefix_type = "NORMAL";
eutra_band = 7;
downlink_frequency = 2680000000L;
uplink_frequency_offset = -120000000;
Nid_cell = 0;
N_RB_DL = 25;
Nid_cell_mbsfn = 0;
nb_antennas_tx = 1;
nb_antennas_rx = 1;
tx_gain = 90;
rx_gain = 120;
prach_root = 0;
prach_config_index = 0;
prach_high_speed = "DISABLE";
prach_zero_correlation = 1;
prach_freq_offset = 2;
pucch_delta_shift = 1;
pucch_nRB_CQI = 1;
pucch_nCS_AN = 0;
pucch_n1_AN = 32;
pdsch_referenceSignalPower = -29;
pdsch_p_b = 0;
pusch_n_SB = 1;
pusch_enable64QAM = "DISABLE";
pusch_hoppingMode = "interSubFrame";
pusch_hoppingOffset = 0;
pusch_groupHoppingEnabled = "ENABLE";
pusch_groupAssignment = 0;
pusch_sequenceHoppingEnabled = "DISABLE";
pusch_nDMRS1 = 1;
phich_duration = "NORMAL";
phich_resource = "ONESIXTH";
srs_enable = "DISABLE";
/* srs_BandwidthConfig =;
srs_SubframeConfig =;
srs_ackNackST =;
srs_MaxUpPts =;*/
pusch_p0_Nominal = -90;
pusch_alpha = "AL1";
pucch_p0_Nominal = -96;
msg3_delta_Preamble = 6;
pucch_deltaF_Format1 = "deltaF2";
pucch_deltaF_Format1b = "deltaF3";
pucch_deltaF_Format2 = "deltaF0";
pucch_deltaF_Format2a = "deltaF0";
pucch_deltaF_Format2b = "deltaF0";
rach_numberOfRA_Preambles = 64;
rach_preamblesGroupAConfig = "DISABLE";
/*
rach_sizeOfRA_PreamblesGroupA = ;
rach_messageSizeGroupA = ;
rach_messagePowerOffsetGroupB = ;
*/
rach_powerRampingStep = 4;
rach_preambleInitialReceivedTargetPower = -108;
rach_preambleTransMax = 10;
rach_raResponseWindowSize = 10;
rach_macContentionResolutionTimer = 48;
rach_maxHARQ_Msg3Tx = 4;
pcch_default_PagingCycle = 128;
pcch_nB = "oneT";
bcch_modificationPeriodCoeff = 2;
ue_TimersAndConstants_t300 = 1000;
ue_TimersAndConstants_t301 = 1000;
ue_TimersAndConstants_t310 = 1000;
ue_TimersAndConstants_t311 = 10000;
ue_TimersAndConstants_n310 = 20;
ue_TimersAndConstants_n311 = 1;
}
);
srb1_parameters :
{
# timer_poll_retransmit = (ms) [5, 10, 15, 20,... 250, 300, 350, ... 500]
timer_poll_retransmit = 80;
# timer_reordering = (ms) [0,5, ... 100, 110, 120, ... ,200]
timer_reordering = 35;
# timer_reordering = (ms) [0,5, ... 250, 300, 350, ... ,500]
timer_status_prohibit = 0;
# poll_pdu = [4, 8, 16, 32 , 64, 128, 256, infinity(>10000)]
poll_pdu = 4;
# poll_byte = (kB) [25,50,75,100,125,250,375,500,750,1000,1250,1500,2000,3000,infinity(>10000)]
poll_byte = 99999;
# max_retx_threshold = [1, 2, 3, 4 , 6, 8, 16, 32]
max_retx_threshold = 4;
}
# ------- SCTP definitions
SCTP :
{
# Number of streams to use in input/output
SCTP_INSTREAMS = 2;
SCTP_OUTSTREAMS = 2;
};
////////// MME parameters:
mme_ip_address = ( { ipv4 = "10.0.1.1";
ipv6 = "192:168:30::17";
active = "yes";
preference = "ipv4";
}
);
///X2
target_enb_x2_ip_address = ( { ipv4 = "127.0.0.1";
ipv6 = "192:168:30::17";
active = "no";
preference = "ipv4";
}
);
NETWORK_INTERFACES :
{
ENB_INTERFACE_NAME_FOR_S1_MME = "eth0";
ENB_IPV4_ADDRESS_FOR_S1_MME = "10.0.1.100/24";
ENB_INTERFACE_NAME_FOR_S1U = "eth0";
ENB_IPV4_ADDRESS_FOR_S1U = "10.0.1.100/24";
ENB_PORT_FOR_S1U = 2152; # Spec 2152
ENB_INTERFACE_NAME_FOR_X2C = "lo";
ENB_IPV4_ADDRESS_FOR_X2C = "127.0.0.1/24";
ENB_PORT_FOR_X2C = 1234; # Spec ?
ENB_INTERFACE_NAME_FOR_X2U = "eth0";
......
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