Commit 9ff6bb7a authored by Navid Nikaein's avatar Navid Nikaein

Protocol implementation for dedicated E-RABSetup.

Test of dedicated bearer setup in both control and data plane.
parent 8c9c7833
......@@ -42,6 +42,8 @@ set (OPENAIR_BIN_DIR ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY})
project (OpenAirInterface)
#add_definitions("-DEMIT_ASN_DEBUG=1")
###########################################
# macros to define options as there is numerous options in oai
################################################
......@@ -196,7 +198,7 @@ add_definitions("-DPACKAGE_BUGREPORT=\"OpenAirInterface web site\"")
add_boolean_option(MSG_PRINT False "print debug messages")
add_boolean_option(DISABLE_XER_PRINT False "print XER Format")
add_boolean_option(XER_PRINT False "print XER Format")
add_boolean_option(RRC_MSG_PRINT False "print RRC messages")
add_boolean_option(RRC_MSG_PRINT Flase "print RRC messages")
add_boolean_option(PDCP_MSG_PRINT False "print PDCP messages to /tmp/pdcp.log")
add_boolean_option(DEBUG_PDCP_PAYLOAD False "print PDCP PDU to stdout") # if true, make sure that global and PDCP log levels are trace
add_boolean_option(DEBUG_MAC_INTERFACE False "print MAC-RLC PDU exchange to stdout") # if true, make sure that global and PDCP log levels are trace
......
......@@ -39,6 +39,8 @@ MESSAGE_DEF(S1AP_UE_CONTEXT_RELEASE_REQ_LOG, MESSAGE_PRIORITY_MED, IttiMsgText
MESSAGE_DEF(S1AP_UE_CONTEXT_RELEASE_COMMAND_LOG, MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_ue_context_release_command_log)
MESSAGE_DEF(S1AP_UE_CONTEXT_RELEASE_COMPLETE_LOG, MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_ue_context_release_complete_log)
MESSAGE_DEF(S1AP_UE_CONTEXT_RELEASE_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_ue_context_release_log)
MESSAGE_DEF(S1AP_E_RAB_SETUP_REQUEST_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_e_rab_setup_request_log)
MESSAGE_DEF(S1AP_E_RAB_SETUP_RESPONSE_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_e_rab_setup_response_log)
/* eNB application layer -> S1AP messages */
MESSAGE_DEF(S1AP_REGISTER_ENB_REQ , MESSAGE_PRIORITY_MED, s1ap_register_enb_req_t , s1ap_register_enb_req)
......
......@@ -1104,12 +1104,12 @@ schedule_ue_spec(
post_padding);
//#ifdef DEBUG_eNB_SCHEDULER
if (ta_update) {
// if (ta_update) {
LOG_I(MAC,
"[eNB %d][DLSCH] Frame %d Generate header for UE_id %d on CC_id %d: sdu_length_total %d, num_sdus %d, sdu_lengths[0] %d, sdu_lcids[0] %d => payload offset %d,timing advance value : %d, padding %d,post_padding %d,(mcs %d, TBS %d, nb_rb %d),header_dcch %d, header_dtch %d\n",
module_idP,frameP, UE_id, CC_id, sdu_length_total,num_sdus,sdu_lengths[0],sdu_lcids[0],offset,
"[eNB %d][DLSCH] Frame %d Generate header for UE_id %d on CC_id %d LCID %d: sdu_length_total %d, num_sdus %d, sdu_lengths[0] %d, sdu_lcids[0] %d => payload offset %d,timing advance value : %d, padding %d,post_padding %d,(mcs %d, TBS %d, nb_rb %d),header_dcch %d, header_dtch %d\n",
module_idP,frameP, UE_id, CC_id, sdu_lcids[0], sdu_length_total,num_sdus,sdu_lengths[0],sdu_lcids[0],offset,
ta_update,padding,post_padding,mcs,TBS,nb_rb,header_len_dcch,header_len_dtch);
}
// }
//#endif
#ifdef DEBUG_eNB_SCHEDULER
......
......@@ -309,7 +309,7 @@ void rx_sdu(const module_id_t enb_mod_idP,
} /* UE_id != -1 */
} else if ((rx_lcids[i] < NB_RB_MAX) && (rx_lcids[i] > DCCH1 )) {
LOG_D(MAC,"[eNB %d] CC_id %d Frame %d : ULSCH -> UL-DTCH%d, received %d bytes form UE %d \n",
LOG_I(MAC,"[eNB %d] CC_id %d Frame %d : ULSCH -> UL-DTCH%d, received %d bytes form UE %d \n",
enb_mod_idP,CC_idP,frameP, rx_lcids[i], rx_lengths[i], UE_id);
#if defined(ENABLE_MAC_PAYLOAD_DEBUG)
......
......@@ -1085,30 +1085,33 @@ rrc_eNB_generate_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t* co
DedicatedInfoNAS_t *dedicatedInfoNas = NULL;
long *logicalchannelgroup, *logicalchannelgroup_drb;
int drb_Identity_index;
int drb_identity_index=0;
// Configure DRB
//*DRB_configList = CALLOC(1, sizeof(*DRB_configList));
*DRB_configList = CALLOC(1, sizeof(**DRB_configList));
dedicatedInfoNASList = CALLOC(1, sizeof(struct RRCConnectionReconfiguration_r8_IEs__dedicatedInfoNASList));
for ( i = 0 ;
i < ue_context_pP->ue_context.nb_of_e_rabs;
i < ue_context_pP->ue_context.setup_e_rabs ;
i++){
// bypass the already configured erabs
if (ue_context_pP->ue_context.e_rab[i].status == E_RAB_STATUS_DONE) {
//drb_identiy_index++;
if (ue_context_pP->ue_context.e_rab[i].status == E_RAB_STATUS_ESTABLISHED) {
drb_identity_index++;
continue;
}
DRB_config = CALLOC(1, sizeof(*DRB_config));
DRB_config->eps_BearerIdentity = CALLOC(1, sizeof(long));
*(DRB_config->eps_BearerIdentity) = 5L;
*(DRB_config->eps_BearerIdentity) = ue_context_pP->ue_context.e_rab[i].param.e_rab_id;
DRB_config->drb_Identity = (DRB_Identity_t) ue_context_pP->ue_context.e_rab[i].param.e_rab_id;
DRB_config->drb_Identity = 1 + drb_identity_index;// (DRB_Identity_t) ue_context_pP->ue_context.e_rab[i].param.e_rab_id;
// 1 + drb_identiy_index;
DRB_config->logicalChannelIdentity = CALLOC(1, sizeof(long));
*(DRB_config->logicalChannelIdentity) = (long) (ue_context_pP->ue_context.e_rab[i].param.e_rab_id + 2); // value : x+2
*(DRB_config->logicalChannelIdentity) = DRB_config->drb_Identity + 2; //(long) (ue_context_pP->ue_context.e_rab[i].param.e_rab_id + 2); // value : x+2
DRB_rlc_config = CALLOC(1, sizeof(*DRB_rlc_config));
DRB_config->rlc_Config = DRB_rlc_config;
......@@ -1174,13 +1177,20 @@ rrc_eNB_generate_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t* co
LogicalChannelConfig__ul_SpecificParameters__bucketSizeDuration_ms50;
logicalchannelgroup_drb = CALLOC(1, sizeof(long));
*logicalchannelgroup_drb = (i+1) % 3;
*logicalchannelgroup_drb = 1;//(i+1) % 3;
DRB_ul_SpecificParameters->logicalChannelGroup = logicalchannelgroup_drb;
ASN_SEQUENCE_ADD(&(*DRB_configList)->list, DRB_config);
#if defined(ENABLE_ITTI)
LOG_I(RRC,"EPS ID %d, DRB ID %d (index %d), QCI %d, priority %d, LCID %d LCGID %d \n",
*DRB_config->eps_BearerIdentity,
DRB_config->drb_Identity, i,
ue_context_pP->ue_context.e_rab[i].param.qos.qci,
DRB_ul_SpecificParameters->priority,
*(DRB_config->logicalChannelIdentity),
DRB_ul_SpecificParameters->logicalChannelGroup
);
if (ue_context_pP->ue_context.e_rab[i].param.nas_pdu.buffer != NULL) {
dedicatedInfoNas = CALLOC(1, sizeof(DedicatedInfoNAS_t));
memset(dedicatedInfoNas, 0, sizeof(OCTET_STRING_t));
......@@ -1188,7 +1198,7 @@ rrc_eNB_generate_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t* co
(char*)ue_context_pP->ue_context.e_rab[i].param.nas_pdu.buffer,
ue_context_pP->ue_context.e_rab[i].param.nas_pdu.length);
ASN_SEQUENCE_ADD(&dedicatedInfoNASList->list, dedicatedInfoNas);
}
}
/* TODO parameters yet to process ... */
{
// ue_context_pP->ue_context.e_rab[i].param.qos;
......@@ -1201,7 +1211,6 @@ rrc_eNB_generate_dedicatedRRCConnectionReconfiguration(const protocol_ctxt_t* co
free(dedicatedInfoNASList);
dedicatedInfoNASList = NULL;
}
#endif
ue_context_pP->ue_context.e_rab[i].status = E_RAB_STATUS_DONE;
......@@ -1788,7 +1797,8 @@ rrc_eNB_generate_defaultRRCConnectionReconfiguration(const protocol_ctxt_t* cons
if (ue_context_pP->ue_context.e_rab[i].param.nas_pdu.buffer != NULL) {
dedicatedInfoNas = CALLOC(1, sizeof(DedicatedInfoNAS_t));
memset(dedicatedInfoNas, 0, sizeof(OCTET_STRING_t));
OCTET_STRING_fromBuf(dedicatedInfoNas, (char*)ue_context_pP->ue_context.e_rab[i].param.nas_pdu.buffer,
OCTET_STRING_fromBuf(dedicatedInfoNas,
(char*)ue_context_pP->ue_context.e_rab[i].param.nas_pdu.buffer,
ue_context_pP->ue_context.e_rab[i].param.nas_pdu.length);
ASN_SEQUENCE_ADD(&dedicatedInfoNASList->list, dedicatedInfoNas);
}
......
......@@ -68,14 +68,19 @@ rrc_eNB_process_GTPV1U_CREATE_TUNNEL_RESP(
ctxt_pP->rnti);
for (i = 0; i < create_tunnel_resp_pP->num_tunnels; i++) {
LOG_D(RRC, PROTOCOL_RRC_CTXT_UE_FMT" rrc_eNB_process_GTPV1U_CREATE_TUNNEL_RESP tunnel %u bearer index %u id %u\n",
ue_context_p->ue_context.enb_gtp_teid[i+ue_context_p->ue_context.setup_e_rabs] = create_tunnel_resp_pP->enb_S1u_teid[i];
ue_context_p->ue_context.enb_gtp_addrs[i+ue_context_p->ue_context.setup_e_rabs] = create_tunnel_resp_pP->enb_addr;
ue_context_p->ue_context.enb_gtp_ebi[i+ue_context_p->ue_context.setup_e_rabs] = create_tunnel_resp_pP->eps_bearer_id[i];
LOG_I(RRC, PROTOCOL_RRC_CTXT_UE_FMT" rrc_eNB_process_GTPV1U_CREATE_TUNNEL_RESP tunnel (%u, %u) bearer UE context index %u, msg index %u, id %u, gtp addr len %d \n",
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
create_tunnel_resp_pP->enb_S1u_teid[i],
i,
create_tunnel_resp_pP->eps_bearer_id[i]);
ue_context_p->ue_context.enb_gtp_teid[i] = create_tunnel_resp_pP->enb_S1u_teid[i];
ue_context_p->ue_context.enb_gtp_addrs[i] = create_tunnel_resp_pP->enb_addr;
ue_context_p->ue_context.enb_gtp_ebi[i] = create_tunnel_resp_pP->eps_bearer_id[i];
ue_context_p->ue_context.enb_gtp_teid[i+ue_context_p->ue_context.setup_e_rabs],
i+ue_context_p->ue_context.setup_e_rabs,
i,
create_tunnel_resp_pP->eps_bearer_id[i],
create_tunnel_resp_pP->enb_addr.length);
}
MSC_LOG_RX_MESSAGE(
MSC_RRC_ENB,
......
This diff is collapsed.
......@@ -29,8 +29,9 @@
/*! \file s1ap_common.c
* \brief s1ap procedures for both eNB and MME
* \author Sebastien ROUX <sebastien.roux@eurecom.fr>
* \date 2012
* \author Sebastien ROUX and Navid Nikaein
* \email navid.nikaein@eurecom.fr
* \date 2012-2015
* \version 0.1
*/
......
......@@ -26,6 +26,15 @@
Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France.
*******************************************************************************/
/*! \file s1ap_eNB.c
* \brief S1AP eNB task
* \author S. Roux and Navid Nikaein
* \date 2010 - 2015
* \email: navid.nikaein@eurecom.fr
* \version 1.0
* @ingroup _s1ap
*/
#include <pthread.h>
#include <stdio.h>
......
......@@ -26,7 +26,14 @@
Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France.
*******************************************************************************/
/*! \file s1ap_eNB_context_management_procedures.c
* \brief S1AP context management procedures
* \author S. Roux and Navid Nikaein
* \date 2010 - 2015
* \email: navid.nikaein@eurecom.fr
* \version 1.0
* @ingroup _s1ap
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
......
......@@ -29,8 +29,9 @@
/*! \file s1ap_eNB_decoder.c
* \brief s1ap pdu decode procedures for eNB
* \author Sebastien ROUX <sebastien.roux@eurecom.fr>
* \date 2013
* \author Sebastien ROUX and Navid Nikaein
* \email navid.nikaein@eurecom.fr
* \date 2013 - 2015
* \version 0.1
*/
......@@ -123,11 +124,25 @@ static int s1ap_eNB_decode_initiating_message(s1ap_message *message,
case S1ap_ProcedureCode_id_E_RABSetup:
ret = s1ap_decode_s1ap_e_rabsetuprequesties(
&message->msg.s1ap_E_RABSetupRequestIEs, &initiating_p->value);
s1ap_xer_print_s1ap_paging(s1ap_xer__print2sp, message_string, message);
//message_id = S1AP_E_RABSETUP_REQ_LOG;
S1AP_ERROR("TODO E_RABSetup initiating message\n");
s1ap_xer_print_s1ap_e_rabsetuprequest(s1ap_xer__print2sp, message_string, message);
message_id = S1AP_E_RAB_SETUP_REQUEST_LOG;
message_string_size = strlen(message_string);
message_p = itti_alloc_new_message_sized(TASK_S1AP,
message_id,
message_string_size + sizeof (IttiMsgText));
message_p->ittiMsg.s1ap_e_rab_setup_request_log.size = message_string_size;
memcpy(&message_p->ittiMsg.s1ap_e_rab_setup_request_log.text, message_string, message_string_size);
itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p);
free(message_string);
S1AP_INFO("E_RABSetup initiating message\n");
break;
case S1ap_ProcedureCode_id_E_RABRelease:
ret = s1ap_decode_s1ap_e_rabreleasecommandies(&message->msg.s1ap_E_RABReleaseCommandIEs,
&initiating_p->value);
s1ap_xer_print_s1ap_e_rabsetuprequest(s1ap_xer__print2sp, message_string, message);
S1AP_ERROR("TODO E_RABReleas initiating message\n");
free(message_string);
default:
S1AP_ERROR("Unknown procedure ID (%d) for initiating message\n",
(int)initiating_p->procedureCode);
......
......@@ -29,8 +29,9 @@
/*! \file s1ap_eNB_encoder.c
* \brief s1ap pdu encode procedures for eNB
* \author Sebastien ROUX <sebastien.roux@eurecom.fr>
* \date 2013
* \author Sebastien ROUX and Navid Nikaein
* \email navid.nikaein@eurecom.fr
* \date 2013 - 2015
* \version 0.1
*/
......@@ -38,6 +39,8 @@
#include <string.h>
#include <stdint.h>
#include "assertions.h"
#include "conversions.h"
#include "intertask_interface.h"
......@@ -100,6 +103,11 @@ int s1ap_eNB_encode_ue_context_release_request(
uint8_t **buffer,
uint32_t *length);
static inline
int s1ap_eNB_encode_e_rab_setup_response(S1ap_E_RABSetupResponseIEs_t *E_RABSetupResponseIEs,
uint8_t **buffer,
uint32_t *length);
int s1ap_eNB_encode_pdu(s1ap_message *message, uint8_t **buffer, uint32_t *len)
{
DevAssert(message != NULL);
......@@ -251,8 +259,21 @@ int s1ap_eNB_encode_successfull_outcome(s1ap_message *s1ap_message_p,
free(message_string);
break;
case S1ap_ProcedureCode_id_E_RABSetup:
ret = s1ap_eNB_encode_e_rab_setup_response (
&s1ap_message_p->msg.s1ap_E_RABSetupResponseIEs, buffer, len);
//s1ap_xer_print_s1ap_e_rabsetupresponse (s1ap_xer__print2sp, message_string, s1ap_message_p);
message_id = S1AP_E_RAB_SETUP_RESPONSE_LOG ;
message_p = itti_alloc_new_message_sized(TASK_S1AP, message_id, message_string_size + sizeof (IttiMsgText));
message_p->ittiMsg.s1ap_e_rab_setup_response_log.size = message_string_size;
memcpy(&message_p->ittiMsg.s1ap_e_rab_setup_response_log.text, message_string, message_string_size);
itti_send_msg_to_task(TASK_UNKNOWN, INSTANCE_DEFAULT, message_p);
free(message_string);
S1AP_INFO("E_RABSetup successful message\n");
break;
default:
S1AP_DEBUG("Unknown procedure ID (%d) for successfull outcome message\n",
S1AP_WARN("Unknown procedure ID (%d) for successfull outcome message\n",
(int)s1ap_message_p->procedureCode);
return ret;
break;
......@@ -528,3 +549,25 @@ int s1ap_eNB_encode_ue_context_release_request(
ue_context_release_request_p);
}
static inline
int s1ap_eNB_encode_e_rab_setup_response(S1ap_E_RABSetupResponseIEs_t *s1ap_E_RABSetupResponseIEs,
uint8_t **buffer,
uint32_t *length)
{
S1ap_E_RABSetupResponse_t e_rab_setup_response;
S1ap_E_RABSetupResponse_t *e_rab_setup_response_p = &e_rab_setup_response;
memset((void *)e_rab_setup_response_p, 0,
sizeof(e_rab_setup_response));
if (s1ap_encode_s1ap_e_rabsetupresponseies (e_rab_setup_response_p, s1ap_E_RABSetupResponseIEs) < 0) {
return -1;
}
return s1ap_generate_successfull_outcome(buffer,
length,
S1ap_ProcedureCode_id_E_RABSetup,
S1ap_Criticality_reject,
&asn_DEF_S1ap_E_RABSetupResponse,
e_rab_setup_response_p);
}
......@@ -29,8 +29,9 @@
/*! \file s1ap_eNB_handlers.c
* \brief s1ap messages handlers for eNB part
* \author Sebastien ROUX <sebastien.roux@eurecom.fr>
* \date 2013
* \author Sebastien ROUX and Navid Nikaein
* \email navid.nikaein@eurecom.fr
* \date 2013 - 2015
* \version 0.1
*/
......@@ -963,6 +964,11 @@ int s1ap_eNB_handle_e_rab_setup_request(uint32_t assoc_id,
S1AP_E_RAB_SETUP_REQ(message_p).e_rab_setup_params[i].sgw_addr.length =
item_p->transportLayerAddress.size * 8 - item_p->transportLayerAddress.bits_unused;
/* S1AP_INFO("sgw addr %s len: %d (size %d, index %d)\n",
S1AP_E_RAB_SETUP_REQ(message_p).e_rab_setup_params[i].sgw_addr.buffer,
S1AP_E_RAB_SETUP_REQ(message_p).e_rab_setup_params[i].sgw_addr.length,
item_p->transportLayerAddress.size, i);
*/
/* GTP tunnel endpoint ID */
OCTET_STRING_TO_INT32(&item_p->gTP_TEID, S1AP_E_RAB_SETUP_REQ(message_p).e_rab_setup_params[i].gtp_teid);
......
......@@ -26,7 +26,14 @@
Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France.
*******************************************************************************/
/*! \file s1ap_eNB_nas_procedures.c
* \brief S1AP eNb NAS procedure handler
* \author S. Roux and Navid Nikaein
* \date 2010 - 2015
* \email: navid.nikaein@eurecom.fr
* \version 1.0
* @ingroup _s1ap
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
......@@ -579,6 +586,14 @@ int s1ap_eNB_initial_ctxt_resp(
new_item->transportLayerAddress.size = initial_ctxt_resp_p->e_rabs[i].eNB_addr.length;
new_item->transportLayerAddress.bits_unused = 0;
S1AP_DEBUG("initial_ctxt_resp_p: e_rab ID %d, enb_addr %d.%d.%d.%d, SIZE %d \n",
new_item->e_RAB_ID,
new_item->transportLayerAddress.buf[0],
new_item->transportLayerAddress.buf[1],
new_item->transportLayerAddress.buf[2],
new_item->transportLayerAddress.buf[3],
new_item->transportLayerAddress.size);
ASN_SEQUENCE_ADD(&initial_ies_p->e_RABSetupListCtxtSURes.s1ap_E_RABSetupItemCtxtSURes,
new_item);
}
......@@ -695,7 +710,7 @@ int s1ap_eNB_e_rab_setup_resp(instance_t instance,
struct s1ap_eNB_ue_context_s *ue_context_p = NULL;
S1ap_E_RABSetupResponseIEs_t *initial_ies_p = NULL;
s1ap_message message;
uint8_t *buffer = NULL;
......@@ -727,39 +742,85 @@ int s1ap_eNB_e_rab_setup_resp(instance_t instance,
e_rab_setup_resp_p->eNB_ue_s1ap_id, ue_context_p->ue_state);
return -1;
}
/* Prepare the S1AP message to encode */
memset(&message, 0, sizeof(s1ap_message));
message.direction = S1AP_PDU_PR_successfulOutcome;
message.procedureCode = S1ap_ProcedureCode_id_E_RABSetup;
message.criticality = S1ap_Criticality_reject;
initial_ies_p = &message.msg.s1ap_E_RABSetupResponseIEs;
initial_ies_p->eNB_UE_S1AP_ID = e_rab_setup_resp_p->eNB_ue_s1ap_id;
initial_ies_p->mme_ue_s1ap_id = ue_context_p->mme_ue_s1ap_id;
for (i = 0; i < e_rab_setup_resp_p->nb_of_e_rabs; i++) {
if ( e_rab_setup_resp_p->nb_of_e_rabs >= 1 )
initial_ies_p->presenceMask |= S1AP_E_RABSETUPRESPONSEIES_E_RABSETUPLISTBEARERSURES_PRESENT;
for (i = 0; i < e_rab_setup_resp_p->nb_of_e_rabs; i++) {
S1ap_E_RABSetupItemBearerSURes_t *new_item;
new_item = calloc(1, sizeof(S1ap_E_RABSetupItemBearerSURes_t));
new_item->e_RAB_ID = e_rab_setup_resp_p->e_rabs[i].e_rab_id;
GTP_TEID_TO_ASN1(e_rab_setup_resp_p->e_rabs[i].gtp_teid, &new_item->gTP_TEID);
new_item->transportLayerAddress.buf = e_rab_setup_resp_p->e_rabs[i].eNB_addr.buffer;
/*
new_item->transportLayerAddress.buf = MALLOC(e_rab_setup_resp_p->e_rabs[i].eNB_addr.length);
memcpy (new_item->transportLayerAddress.buf,
e_rab_setup_resp_p->e_rabs[i].eNB_addr.buffer,
e_rab_setup_resp_p->e_rabs[i].eNB_addr.length);
*/
/*
new_item->transportLayerAddress.buf[0] = e_rab_setup_resp_p->e_rabs[i].eNB_addr.buffer[0];
new_item->transportLayerAddress.buf[1] = e_rab_setup_resp_p->e_rabs[i].eNB_addr.buffer[1];
new_item->transportLayerAddress.buf[2] = e_rab_setup_resp_p->e_rabs[i].eNB_addr.buffer[2];
new_item->transportLayerAddress.buf[3] = e_rab_setup_resp_p->e_rabs[i].eNB_addr.buffer[3];
*/
new_item->transportLayerAddress.buf = e_rab_setup_resp_p->e_rabs[i].eNB_addr.buffer;
new_item->transportLayerAddress.size = e_rab_setup_resp_p->e_rabs[i].eNB_addr.length;
new_item->transportLayerAddress.bits_unused = 0;
S1AP_DEBUG("e_rab_setup_resp: e_rab ID %d, teid %u, enb_addr %d.%d.%d.%d, SIZE %d\n",
new_item->e_RAB_ID,
e_rab_setup_resp_p->e_rabs[i].gtp_teid,
new_item->transportLayerAddress.buf[0],
new_item->transportLayerAddress.buf[1],
new_item->transportLayerAddress.buf[2],
new_item->transportLayerAddress.buf[3],
new_item->transportLayerAddress.size);
S1ap_IE_t *ie = s1ap_new_ie(S1ap_ProtocolIE_ID_id_E_RABSetupItemBearerSURes,
S1ap_Criticality_ignore,
&asn_DEF_S1ap_E_RABSetupItemBearerSURes,
new_item);
/*
S1ap_IE_t *ie = s1ap_new_ie(S1ap_ProtocolIE_ID_id_E_RABSetupListBearerSURes,
S1ap_Criticality_ignore,
&asn_DEF_S1ap_E_RABSetupListBearerSURes,
new_item);
*/
ASN_SEQUENCE_ADD(&initial_ies_p->e_RABSetupListBearerSURes.s1ap_E_RABSetupItemBearerSURes,
new_item);
ie);
}
/* S1ap_E_RABSetupListBearerSURes_t e_RABSetupListBearerSURes;
memset(&e_RABSetupListBearerSURes, 0, sizeof(S1ap_E_RABSetupListBearerSURes_t));
if (s1ap_encode_s1ap_e_rabsetuplistbearersures(&e_RABSetupListBearerSURes, &initial_ies_p->e_RABSetupListBearerSURes.s1ap_E_RABSetupItemBearerSURes) < 0 )
return -1;
ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_S1ap_E_RABSetupListBearerSURes, &e_RABSetupListBearerSURes);
*/
fprintf(stderr, "start encode\n");
if (s1ap_eNB_encode_pdu(&message, &buffer, &length) < 0) {
S1AP_ERROR("Failed to encode uplink NAS transport\n");
S1AP_ERROR("Failed to encode uplink transport\n");
/* Encode procedure has failed... */
return -1;
}
MSC_LOG_TX_MESSAGE(
MSC_S1AP_ENB,
MSC_S1AP_MME,
......
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