Commit d89dbb48 authored by Cedric Roux's avatar Cedric Roux

Merge remote-tracking branch 'origin/feature-s1ap-r14-based-on-new-asn1c' into...

Merge remote-tracking branch 'origin/feature-s1ap-r14-based-on-new-asn1c' into develop_integration_2018_w29

 Conflicts:
	targets/SIMU/PROC/channel_sim_proc.c
	targets/SIMU/USER/oaisim_pad.c
parents 87f21854 a3e9c480
This diff is collapsed.
......@@ -680,8 +680,11 @@ install_asn1c_from_source(){
echo_info "\nInstalling ASN1. The log file for ASN1 installation is here: $asn1_install_log "
(
$SUDO rm -rf /tmp/asn1c
GIT_SSL_NO_VERIFY=true git clone https://gitlab.eurecom.fr/oai/asn1c.git /tmp/asn1c
# GIT_SSL_NO_VERIFY=true git clone https://gitlab.eurecom.fr/oai/asn1c.git /tmp/asn1c
git clone https://github.com/brchiu/asn1c /tmp/asn1c
cd /tmp/asn1c
git checkout velichkov_s1ap_plus_option_group
autoreconf -iv
./configure
make -j`nproc`
$SUDO make install
......
......@@ -22,7 +22,7 @@
#ifndef GTPV1_U_MESSAGES_TYPES_H_
#define GTPV1_U_MESSAGES_TYPES_H_
#include "asn1_constants.h"
#include "asn_constant.h"
#define GTPV1U_MAX_BEARERS_PER_UE max_val_DRB_Identity
......
......@@ -29,9 +29,9 @@
***************************************************************************/
#ifdef CMAKER
#include "asn1_constants.h"
#include "asn_constant.h"
#else
#include "RRC/LITE/MESSAGES/asn1_constants.h"
#include "RRC/LTE/MESSAGES/asn1_constants.h"
#endif
#ifndef __PLATFORM_CONSTANTS_H__
......
......@@ -21,7 +21,7 @@
#ifndef RAL_MESSAGES_TYPES_H_
#define RAL_MESSAGES_TYPES_H_
#include "asn1_constants.h"
#include "asn_constant.h"
#include "platform_types.h"
#include "commonDef.h"
/* 802.21 mappings with the RRC protocol :
......
......@@ -35,7 +35,7 @@
#ifdef CMAKER
#include "SystemInformationBlockType2.h"
#else
#include "RRC/LITE/MESSAGES/SystemInformationBlockType2.h"
#include "RRC/LTE/MESSAGES/SystemInformationBlockType2.h"
#endif
#include "SL-OffsetIndicator-r12.h"
#include "SubframeBitmapSL-r12.h"
......
......@@ -38,7 +38,7 @@ MESSAGE_DEF(S1AP_E_RAB_MODIFY_RESPONSE_LOG , MESSAGE_PRIORITY_MED, IttiMsgTex
MESSAGE_DEF(S1AP_PAGING_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_paging_log)
MESSAGE_DEF(S1AP_E_RAB_RELEASE_REQUEST_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_e_rab_release_request_log)
MESSAGE_DEF(S1AP_E_RAB_RELEASE_RESPONSE_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_e_rab_release_response_log)
MESSAGE_DEF(S1AP_E_RAB_ERROR_INDICATION_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_error_indication_log)
MESSAGE_DEF(S1AP_ERROR_INDICATION_LOG , MESSAGE_PRIORITY_MED, IttiMsgText , s1ap_error_indication_log)
/* eNB application layer -> S1AP messages */
MESSAGE_DEF(S1AP_REGISTER_ENB_REQ , MESSAGE_PRIORITY_MED, s1ap_register_enb_req_t , s1ap_register_enb_req)
......
......@@ -44,7 +44,7 @@
#include "SystemInformationBlockType2.h"
#include "rrc_messages_types.h"
#else
#include "RRC/LITE/MESSAGES/SystemInformationBlockType2.h"
#include "RRC/LTE/MESSAGES/SystemInformationBlockType2.h"
#endif
#include "intertask_interface_types.h"
#include "RRC/LTE/rrc_defs.h"
......
......@@ -500,8 +500,8 @@ rnti_t pdcp_UE_UE_module_id_to_rnti[MAX_MOBILES_PER_ENB];
rnti_t pdcp_eNB_UE_instance_to_rnti[MAX_MOBILES_PER_ENB]; // for noS1 mode
unsigned int pdcp_eNB_UE_instance_to_rnti_index;
#if (RRC_VERSION >= MAKE_VERSION(10, 0, 0))
pdcp_mbms_t pdcp_mbms_array_ue[MAX_MOBILES_PER_ENB][maxServiceCount][maxSessionPerPMCH]; // some constants from openair2/RRC/LITE/MESSAGES/asn1_constants.h
pdcp_mbms_t pdcp_mbms_array_eNB[NUMBER_OF_eNB_MAX][maxServiceCount][maxSessionPerPMCH]; // some constants from openair2/RRC/LITE/MESSAGES/asn1_constants.h
pdcp_mbms_t pdcp_mbms_array_ue[MAX_MOBILES_PER_ENB][maxServiceCount][maxSessionPerPMCH]; // some constants from openair2/RRC/LTE/MESSAGES/asn1_constants.h
pdcp_mbms_t pdcp_mbms_array_eNB[NUMBER_OF_eNB_MAX][maxServiceCount][maxSessionPerPMCH]; // some constants from openair2/RRC/LTE/MESSAGES/asn1_constants.h
#endif
sdu_size_t pdcp_output_sdu_bytes_to_write;
sdu_size_t pdcp_output_header_bytes_to_write;
......
......@@ -44,7 +44,7 @@
# include "rlc_am_structs.h"
# include "rlc_tm_structs.h"
# include "rlc_um_structs.h"
# include "asn1_constants.h"
# include "asn_constant.h"
# include "UTIL/LOG/log.h"
# include "mem_block.h"
//# include "PHY/defs.h"
......@@ -193,10 +193,10 @@ typedef struct rlc_mbms_id_s {
# define maxSessionPerPMCH 1
# endif
#endif
//rlc_mbms_t rlc_mbms_array_ue[MAX_MOBILES_PER_ENB][maxServiceCount][maxSessionPerPMCH]; // some constants from openair2/RRC/LITE/MESSAGES/asn1_constants.h
//rlc_mbms_t rlc_mbms_array_eNB[NUMBER_OF_eNB_MAX][maxServiceCount][maxSessionPerPMCH]; // some constants from openair2/RRC/LITE/MESSAGES/asn1_constants.h
rlc_mbms_id_t rlc_mbms_lcid2service_session_id_ue[MAX_MOBILES_PER_ENB][RLC_MAX_MBMS_LC]; // some constants from openair2/RRC/LITE/MESSAGES/asn1_constants.h
rlc_mbms_id_t rlc_mbms_lcid2service_session_id_eNB[MAX_eNB][RLC_MAX_MBMS_LC]; // some constants from openair2/RRC/LITE/MESSAGES/asn1_constants.h
//rlc_mbms_t rlc_mbms_array_ue[MAX_MOBILES_PER_ENB][maxServiceCount][maxSessionPerPMCH]; // some constants from openair2/RRC/LTE/MESSAGES/asn1_constants.h
//rlc_mbms_t rlc_mbms_array_eNB[NUMBER_OF_eNB_MAX][maxServiceCount][maxSessionPerPMCH]; // some constants from openair2/RRC/LTE/MESSAGES/asn1_constants.h
rlc_mbms_id_t rlc_mbms_lcid2service_session_id_ue[MAX_MOBILES_PER_ENB][RLC_MAX_MBMS_LC]; // some constants from openair2/RRC/LTE/MESSAGES/asn1_constants.h
rlc_mbms_id_t rlc_mbms_lcid2service_session_id_eNB[MAX_eNB][RLC_MAX_MBMS_LC]; // some constants from openair2/RRC/LTE/MESSAGES/asn1_constants.h
#define rlc_mbms_enb_get_lcid_by_rb_id(Enb_mOD,rB_iD) rlc_mbms_rbid2lcid_eNB[Enb_mOD][rB_iD]
;
......
......@@ -99,15 +99,29 @@ void *ue_ip_interrupt(void)
}
#endif //NETLINK
//---------------------------------------------------------------------------
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0))
void ue_ip_timer(struct timer_list *t)
#else
void ue_ip_timer(unsigned long dataP)
#endif
{
//---------------------------------------------------------------------------
ue_ip_priv_t *priv_p=(ue_ip_priv_t *)dataP;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0))
ue_ip_priv_t *priv_p = from_timer(priv_p, t, timer);
#else
ue_ip_priv_t *priv_p = (ue_ip_priv_t *)dataP;
#endif
spin_lock(&priv_p->lock);
(priv_p->timer).function=ue_ip_timer;
(priv_p->timer).expires=jiffies+UE_IP_TIMER_TICK;
(priv_p->timer).data=dataP;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0))
mod_timer(&priv_p->timer, jiffies + UE_IP_TIMER_TICK);
#else
(priv_p->timer).function = ue_ip_timer;
(priv_p->timer).expires = jiffies + UE_IP_TIMER_TICK;
(priv_p->timer).data = dataP;
add_timer(&priv_p->timer);
#endif
spin_unlock(&priv_p->lock);
return;
// add_timer(&gpriv->timer);
......@@ -137,10 +151,15 @@ int ue_ip_open(struct net_device *dev_pP)
netif_wake_queue(dev_pP);
}
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0))
timer_setup(&(priv_p->timer), ue_ip_timer, 0);
(priv_p->timer).expires = jiffies+UE_IP_TIMER_TICK;
#else
init_timer(&priv_p->timer);
(priv_p->timer).expires = jiffies+UE_IP_TIMER_TICK;
(priv_p->timer).data = (unsigned long)priv_p;
(priv_p->timer).function = ue_ip_timer;
#endif
//add_timer(&priv_p->timer);
printk("[UE_IP_DRV][%s] name = %s\n", __FUNCTION__, dev_pP->name);
......
......@@ -38,7 +38,7 @@
#ifdef CELLULAR
#include "rrc_L2_proto.h"
#else
#include "RRC/LITE/defs.h"
#include "RRC/LTE/defs.h"
#endif //CELLULAR
#include "COMMON/mac_rrc_primitives.h"
#include "openair_rrc_L2_interface.h"
......
......@@ -131,6 +131,7 @@ mac_rrc_data_req(
mib->message.systemFrameNumber.buf = &sfn;
enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_BCH_Message,
NULL,
(void*)mib,
carrier->MIB,
24);
......
......@@ -241,6 +241,7 @@ uint8_t do_MIB(rrc_eNB_carrier_data_t *carrier, uint32_t N_RB_DL, uint32_t phich
#endif
enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_BCH_Message,
NULL,
(void*)mib,
carrier->MIB,
24);
......@@ -320,6 +321,7 @@ uint8_t do_MIB_SL(const protocol_ctxt_t* const ctxt_pP, const uint8_t eNB_index,
enc_rval = uper_encode_to_buffer(&asn_DEF_SBCCH_SL_BCH_Message,
NULL,
(void*)mib_sl,
UE_rrc_inst[ctxt_pP->module_id].MIB,
24);
......@@ -509,6 +511,7 @@ uint8_t do_SIB1(rrc_eNB_carrier_data_t *carrier,
xer_fprint(stdout, &asn_DEF_BCCH_DL_SCH_Message, (void*)bcch_message);
#endif
enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_DL_SCH_Message,
NULL,
(void*)bcch_message,
buffer,
100);
......@@ -1354,6 +1357,7 @@ uint8_t do_SIB23(uint8_t Mod_id,
xer_fprint(stdout, &asn_DEF_BCCH_DL_SCH_Message, (void*)bcch_message);
#endif
enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_DL_SCH_Message,
NULL,
(void*)bcch_message,
buffer,
900);
......@@ -1442,6 +1446,7 @@ uint8_t do_RRCConnectionRequest(uint8_t Mod_id, uint8_t *buffer,uint8_t *rv)
enc_rval = uper_encode_to_buffer(&asn_DEF_UL_CCCH_Message,
NULL,
(void*)&ul_ccch_msg,
buffer,
100);
......@@ -1609,6 +1614,7 @@ uint8_t do_SidelinkUEInformation(uint8_t Mod_id, uint8_t *buffer, SL_Destinatio
enc_rval = uper_encode_to_buffer(&asn_DEF_UL_DCCH_Message,
NULL,
(void*)&ul_dcch_msg,
buffer,
100);
......@@ -1693,6 +1699,7 @@ uint8_t do_RRCConnectionSetupComplete(uint8_t Mod_id, uint8_t *buffer, const uin
*/
enc_rval = uper_encode_to_buffer(&asn_DEF_UL_DCCH_Message,
NULL,
(void*)&ul_dcch_msg,
buffer,
100);
......@@ -1753,6 +1760,7 @@ do_RRCConnectionReconfigurationComplete(
rrcConnectionReconfigurationComplete->criticalExtensions.choice.rrcConnectionReconfigurationComplete_r8.nonCriticalExtension=NULL;
enc_rval = uper_encode_to_buffer(&asn_DEF_UL_DCCH_Message,
NULL,
(void*)&ul_dcch_msg,
buffer,
100);
......@@ -2163,6 +2171,7 @@ do_RRCConnectionSetup(
xer_fprint(stdout, &asn_DEF_DL_CCCH_Message, (void*)&dl_ccch_msg);
#endif
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message,
NULL,
(void*)&dl_ccch_msg,
buffer,
100);
......@@ -2237,6 +2246,7 @@ do_SecurityModeCommand(
xer_fprint(stdout, &asn_DEF_DL_DCCH_Message, (void*)&dl_dcch_msg);
#endif
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_DCCH_Message,
NULL,
(void*)&dl_dcch_msg,
buffer,
100);
......@@ -2316,6 +2326,7 @@ do_UECapabilityEnquiry(
xer_fprint(stdout, &asn_DEF_DL_DCCH_Message, (void*)&dl_dcch_msg);
#endif
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_DCCH_Message,
NULL,
(void*)&dl_dcch_msg,
buffer,
100);
......@@ -2520,6 +2531,7 @@ do_RRCConnectionReconfiguration(
}
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_DCCH_Message,
NULL,
(void*)&dl_dcch_msg,
buffer,
RRC_BUF_SIZE);
......@@ -2736,6 +2748,7 @@ do_RRCConnectionReestablishment(
xer_fprint(stdout, &asn_DEF_DL_CCCH_Message, (void*)&dl_ccch_msg);
#endif
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message,
NULL,
(void*)&dl_ccch_msg,
buffer,
100);
......@@ -2797,6 +2810,7 @@ do_RRCConnectionReestablishmentReject(
xer_fprint(stdout, &asn_DEF_DL_CCCH_Message, (void*)&dl_ccch_msg);
#endif
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message,
NULL,
(void*)&dl_ccch_msg,
buffer,
100);
......@@ -2859,6 +2873,7 @@ do_RRCConnectionReject(
xer_fprint(stdout, &asn_DEF_DL_CCCH_Message, (void*)&dl_ccch_msg);
#endif
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message,
NULL,
(void*)&dl_ccch_msg,
buffer,
100);
......@@ -2924,6 +2939,7 @@ uint8_t do_RRCConnectionRelease(
sizeof(*rrcConnectionRelease->criticalExtensions.choice.c1.choice.rrcConnectionRelease_r8.nonCriticalExtension));
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_DCCH_Message,
NULL,
(void*)&dl_dcch_msg,
buffer,
RRC_BUF_SIZE);
......@@ -3051,6 +3067,7 @@ uint8_t do_MBSFNAreaConfig(uint8_t Mod_id,
xer_fprint(stdout,&asn_DEF_MCCH_Message,(void*)mcch_message);
#endif
enc_rval = uper_encode_to_buffer(&asn_DEF_MCCH_Message,
NULL,
(void*)mcch_message,
buffer,
100);
......@@ -3183,6 +3200,7 @@ uint8_t do_MeasurementReport(uint8_t Mod_id, uint8_t *buffer,int measid,int phy_
measurementReport->criticalExtensions.choice.c1.choice.measurementReport_r8.measResults.measResultNeighCells->choice.measResultListEUTRA=*(measResultListEUTRA2);
enc_rval = uper_encode_to_buffer(&asn_DEF_UL_DCCH_Message,
NULL,
(void*)&ul_dcch_msg,
buffer,
100);
......@@ -3316,7 +3334,7 @@ uint8_t do_Paging(uint8_t Mod_id, uint8_t *buffer, ue_paging_identity_t ue_pagin
LOG_D(RRC, "[eNB %d] do_Paging paging_record: cn_Domain %ld, ue_paging_identity.presenceMask %d, PagingRecordList.count %d\n",
Mod_id, paging_record_p->cn_Domain, ue_paging_identity.presenceMask, pcch_msg.message.choice.c1.choice.paging.pagingRecordList->list.count);
enc_rval = uper_encode_to_buffer(&asn_DEF_PCCH_Message, (void*)&pcch_msg, buffer, RRC_BUF_SIZE);
enc_rval = uper_encode_to_buffer(&asn_DEF_PCCH_Message, NULL, (void*)&pcch_msg, buffer, RRC_BUF_SIZE);
if(enc_rval.encoded == -1)
{
LOG_I(RRC, "[eNB AssertFatal]ASN1 message encoding failed (%s, %lu)!\n",
......@@ -3492,6 +3510,7 @@ OAI_UECapability_t *fill_ue_capability(char *UE_EUTRA_Capability_xer_fname)
xer_fprint(stdout,&asn_DEF_UE_EUTRA_Capability,(void *)UE_EUTRA_Capability);
#endif
enc_rval = uper_encode_to_buffer(&asn_DEF_UE_EUTRA_Capability,
NULL,
(void*)UE_EUTRA_Capability,
&UECapability.sdu[0],
MAX_UE_CAPABILITY_SIZE);
......
......@@ -131,6 +131,7 @@ uint8_t do_MIB_NB_IoT(
(uint32_t)hsfn_LSB);
enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_BCH_Message_NB,
NULL,
(void*)mib_NB_IoT,
carrier->MIB_NB_IoT,
100);
......@@ -387,6 +388,7 @@ uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, int CC_id,
enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_DL_SCH_Message_NB,
NULL,
(void*)bcch_message,
carrier->SIB1_NB_IoT,
100);
......@@ -669,6 +671,7 @@ uint8_t do_SIB23_NB_IoT(uint8_t Mod_id,
xer_fprint(stdout, &asn_DEF_BCCH_DL_SCH_Message_NB, (void*)bcch_message);
#endif
enc_rval = uper_encode_to_buffer(&asn_DEF_BCCH_DL_SCH_Message_NB,
NULL,
(void*)bcch_message,
carrier->SIB23_NB_IoT,
900);
......@@ -888,6 +891,7 @@ uint8_t do_RRCConnectionSetup_NB_IoT(
xer_fprint(stdout, &asn_DEF_DL_CCCH_Message, (void*)&dl_ccch_msg);
#endif
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message_NB,
NULL,
(void*)&dl_ccch_msg_NB_IoT,
buffer,
100);
......@@ -939,6 +943,7 @@ uint8_t do_SecurityModeCommand_NB_IoT(
xer_fprint(stdout, &asn_DEF_DL_DCCH_Message_NB, (void*)&dl_dcch_msg_NB_IoT);
#endif
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_DCCH_Message_NB,
NULL,
(void*)&dl_dcch_msg_NB_IoT,
buffer,
100);
......@@ -1000,6 +1005,7 @@ uint8_t do_UECapabilityEnquiry_NB_IoT(
xer_fprint(stdout, &asn_DEF_DL_DCCH_Message_NB, (void*)&dl_dcch_msg_NB_IoT);
#endif
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_DCCH_Message_NB,
NULL,
(void*)&dl_dcch_msg_NB_IoT,
buffer,
100);
......@@ -1094,6 +1100,7 @@ uint16_t do_RRCConnectionReconfiguration_NB_IoT(
rrcConnectionReconfiguration_NB->criticalExtensions.choice.c1.choice.rrcConnectionReconfiguration_r13.fullConfig_r13 = NULL;
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_DCCH_Message_NB,
NULL,
(void*)&dl_dcch_msg_NB_IoT,
buffer,
RRC_BUF_SIZE);
......@@ -1140,6 +1147,7 @@ uint8_t do_RRCConnectionReestablishmentReject_NB_IoT(
xer_fprint(stdout, &asn_DEF_DL_CCCH_Message_NB, (void*)&dl_ccch_msg_NB_IoT);
#endif
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message_NB,
NULL,
(void*)&dl_ccch_msg_NB_IoT,
buffer,
100);
......@@ -1210,6 +1218,7 @@ uint8_t do_RRCConnectionReject_NB_IoT(
xer_fprint(stdout, &asn_DEF_DL_CCCH_Message_NB, (void*)&dl_ccch_msg);
#endif
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message_NB,
NULL,
(void*)&dl_ccch_msg_NB_IoT,
buffer,
100);
......@@ -1336,6 +1345,7 @@ uint8_t do_RRCConnectionReestablishment_NB_IoT(
rrcConnectionReestablishment_NB_IoT->criticalExtensions.choice.c1.choice.rrcConnectionReestablishment_r13.nextHopChainingCount_r13=0;
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_CCCH_Message_NB,
NULL,
(void*)&dl_ccch_msg_NB_IoT,
buffer,
RRC_BUF_SIZE);
......@@ -1405,6 +1415,7 @@ uint8_t do_RRCConnectionRelease_NB_IoT(
sizeof(*rrcConnectionRelease_NB_IoT->criticalExtensions.choice.c1.choice.rrcConnectionRelease_r13.nonCriticalExtension));
enc_rval = uper_encode_to_buffer(&asn_DEF_DL_DCCH_Message_NB,
NULL,
(void*)&dl_dcch_msg_NB_IoT,
buffer,
RRC_BUF_SIZE);//check
......
......@@ -44,7 +44,7 @@
#include <asn_internal.h> /* for _ASN_DEFAULT_STACK_MAX */
#include "RRC/LITE/defs_NB_IoT.h"
#include "RRC/LTE/defs_NB_IoT.h"
/*
* The variant of the above function which dumps the BASIC-XER (XER_F_BASIC)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -18,7 +18,7 @@
* contact@openairinterface.org
*/
/*! \file RRC/LITE/defs_NB_IoT.h
/*! \file RRC/LTE/defs_NB_IoT.h
* \brief NB-IoT RRC struct definitions and function prototypes
* \author Navid Nikaein, Raymond Knopp and Michele Paffetti
* \date 2010 - 2014, 2017
......
......@@ -1926,6 +1926,7 @@ rrc_ue_process_securityModeCommand(
ctxt_pP->module_id,ctxt_pP->frame, ctxt_pP->subframe, eNB_index, securityModeCommand->rrc_TransactionIdentifier);
enc_rval = uper_encode_to_buffer(&asn_DEF_UL_DCCH_Message,
NULL,
(void*)&ul_dcch_msg,
buffer,
100);
......@@ -2039,7 +2040,7 @@ rrc_ue_process_ueCapabilityEnquiry(
&ul_dcch_msg.message.choice.c1.choice.ueCapabilityInformation.criticalExtensions.choice.c1.choice.ueCapabilityInformation_r8.ue_CapabilityRAT_ContainerList.list,
&ue_CapabilityRAT_Container);
enc_rval = uper_encode_to_buffer(&asn_DEF_UL_DCCH_Message, (void*) &ul_dcch_msg, buffer, 100);
enc_rval = uper_encode_to_buffer(&asn_DEF_UL_DCCH_Message, NULL, (void*) &ul_dcch_msg, buffer, 100);
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %jd)!\n",
enc_rval.failed_type->name, enc_rval.encoded);
......
......@@ -33,8 +33,8 @@
#include "rrc_UE_ral.h"
#include "assertions.h"
#include "collection/hashtable/obj_hashtable.h"
#include "RRC/LITE/defs.h"
#include "RRC/LITE/extern.h"
#include "RRC/LTE/defs.h"
#include "RRC/LTE/extern.h"
//-----------------------------------------------------------------------------
......
......@@ -7145,8 +7145,8 @@ if (ue_context_p->ue_context.nb_of_modify_e_rabs > 0) {
LOG_I(RRC, "got UE capabilities for UE %x\n", ctxt_pP->rnti);
if (ue_context_p->ue_context.UE_Capability) {
LOG_I(RRC, "freeing old UE capabilities for UE %x\n", ctxt_pP->rnti);
asn_DEF_UE_EUTRA_Capability.free_struct(&asn_DEF_UE_EUTRA_Capability,
ue_context_p->ue_context.UE_Capability, 0);
ASN_STRUCT_FREE(asn_DEF_UE_EUTRA_Capability,
ue_context_p->ue_context.UE_Capability);
ue_context_p->ue_context.UE_Capability = 0;
}
dec_rval = uper_decode(NULL,
......@@ -7166,8 +7166,8 @@ if (ue_context_p->ue_context.nb_of_modify_e_rabs > 0) {
LOG_E(RRC, PROTOCOL_RRC_CTXT_UE_FMT" Failed to decode UE capabilities (%zu bytes)\n",
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP),
dec_rval.consumed);
asn_DEF_UE_EUTRA_Capability.free_struct(&asn_DEF_UE_EUTRA_Capability,
ue_context_p->ue_context.UE_Capability, 0);
ASN_STRUCT_FREE(asn_DEF_UE_EUTRA_Capability,
ue_context_p->ue_context.UE_Capability);
ue_context_p->ue_context.UE_Capability = 0;
}
......
......@@ -58,7 +58,7 @@
#include "RRC/LTE/rrc_eNB_GTPV1U.h"
#include "TLVDecoder.h"
#include "S1ap-NAS-PDU.h"
#include "S1AP_NAS-PDU.h"
#include "flexran_agent_common_internal.h"
extern RAN_CONTEXT_t RC;
......@@ -678,7 +678,8 @@ void rrc_eNB_send_S1AP_UE_CAPABILITIES_IND(
return;
}
asn_enc_rval_t ret = uper_encode_to_buffer(&asn_DEF_UECapabilityInformation, ueCapabilityInformation, buf, 4096);
asn_enc_rval_t ret = uper_encode_to_buffer(&asn_DEF_UECapabilityInformation, NULL, ueCapabilityInformation, buf, 4096);
if (ret.encoded == -1) abort();
memset(&rac, 0, sizeof(UERadioAccessCapabilityInformation_t));
......@@ -692,7 +693,9 @@ void rrc_eNB_send_S1AP_UE_CAPABILITIES_IND(
/* 8192 is arbitrary, should be big enough */
buf2 = malloc16(8192);
if (buf2 == NULL) abort();
ret = uper_encode_to_buffer(&asn_DEF_UERadioAccessCapabilityInformation, &rac, buf2, 8192);
ret = uper_encode_to_buffer(&asn_DEF_UERadioAccessCapabilityInformation, NULL, &rac, buf2, 8192);
if (ret.encoded == -1) abort();
MessageDef *msg_p;
......
......@@ -33,8 +33,8 @@
#include "rrc_eNB_ral.h"
#include "assertions.h"
#include "collection/hashtable/obj_hashtable.h"
#include "RRC/LITE/defs.h"
#include "RRC/LITE/extern.h"
#include "RRC/LTE/defs.h"
#include "RRC/LTE/extern.h"
//-----------------------------------------------------------------------------
......
include Makefile.inc
OBJS=$(addprefix MESSAGES/,${ASN_MODULE_SOURCES:.c=.o})
CFLAGS += -DEMIT_ASN_DEBUG=1
CFLAGS += -Wall
CFLAGS += -g
OBJS += x2ap_decoder.o
OBJS += x2ap_encoder.o
OBJS += x2ap_common.o
#X2AP_SERVER_SRC = sctp_primitives_server.c
#X2AP_SERVER_SRC += x2ap_server_main.c
#X2AP_SERVER_OBJS = $(X2AP_SERVER_SRC:.c=.o)
X2AP_CLIENT_SRC = sctp_primitives_client.c
X2AP_CLIENT_SRC += x2ap_client_main.c
X2AP_CLIENT_OBJS = $(X2AP_CLIENT_SRC:.c=.o)
libx2ap_messages.a:$(OBJS)
$(AR) rcsv libx2ap_messages.a $(OBJS)
asn1fromtool:
asn1c -gen-PER -fnative-types -fskeletons-copy X2AP-CommonDataTypes.asn X2AP-Constants.asn X2AP-IEs.asn \
X2AP-PDU.asn
asn1fromscript:
python ../asn1tostruct.py -f X2AP-PDU-Contents.asn -d
all: server x2ap_client_main
server: server.o libx2ap_messages.a generating_messages.o sctp_primitives_client.o x2ap_pdu_decoder.o
$(CC) $(CFLAGS) $(LDFLAGS) $(LIBS) -o $@ $^ -lsctp -lpthread libx2ap_messages.a
$(OBJS): %.o : %.c
$(CC) $(CFLAGS) -I. -o $@ -c $<
$(X2AP_SERVER_OBJS): %.o : %.c
$(CC) -c $(CFLAGS) -I. $< -o $@
$(X2AP_CLIENT_OBJS): %.o : %.c
$(CC) -c $(CFLAGS) $< -o $@
x2ap_server_main.o: x2ap_server_main.c
$(CC) $(CFLAGS) -I. $^ -o $@ -lsctp \
-lpthread
x2ap_client_main: $(X2AP_CLIENT_OBJS)
$(CC) $(CFLAGS) $^ -o $@ -lsctp \
-lpthread
server.o: server.c
$(CC) $(CFLAGS) -I. $^ -o $@ -lsctp \
-lpthread
x2ap_pdu_decoder.o: x2ap_pdu_decoder.c
$(CC) $(CFLAGS) -I. -o $@ -c $<
x2ap_pdu_encoder.o: x2ap_pdu_encoder.c
$(CC) $(CFLAGS) -I. -o $@ -c $<
sctp_primitives_server.o: sctp_primitives_server.c
$(CC) $(CFLAGS) -o $@ -c $<
generating_messages.o: generating_messages.c
$(CC) $(CFLAGS) -I. -o $@ -c $<
clean:
rm -f $(OBJS)
This diff is collapsed.
-- **************************************************************
--
-- Common definitions
--
-- **************************************************************
X2AP-CommonDataTypes {
itu-t (0) identified-organization (4) etsi (0) mobileDomain (0)
eps-Access (21) modules (3) x2ap (2) version1 (1) x2ap-CommonDataTypes (3) }
DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
-- **************************************************************
--
-- Extension constants
--
-- **************************************************************
maxPrivateIEs INTEGER ::= 65535
maxProtocolExtensions INTEGER ::= 65535
maxProtocolIEs INTEGER ::= 65535
-- **************************************************************
--
-- Common Data Types
--
-- **************************************************************