integration fix: fix file format (dos2unix)

End of line character has to be unix-style, not dos-style.
This commit is contained in:
Cedric Roux
2018-03-09 16:43:08 +01:00
parent 92bb82eb2b
commit e7cfe377db
6 changed files with 3145 additions and 3145 deletions
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+293 -293
View File
@@ -1,293 +1,293 @@
/* /*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. * this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under * The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file * the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. * except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.openairinterface.org/?page_id=698 * http://www.openairinterface.org/?page_id=698
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*------------------------------------------------------------------------------- *-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance: * For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org * contact@openairinterface.org
*/ */
/*! \file asn1_msg.h /*! \file asn1_msg.h
* \brief primitives to build the asn1 messages * \brief primitives to build the asn1 messages
* \author Raymond Knopp, Navid Nikaein and Michele Paffetti * \author Raymond Knopp, Navid Nikaein and Michele Paffetti
* \date 2011, 2017 * \date 2011, 2017
* \version 1.0 * \version 1.0
* \company Eurecom * \company Eurecom
* \email: raymond.knopp@eurecom.fr ,navid.nikaein@eurecom.fr, michele.paffetti@studio.unibo.it * \email: raymond.knopp@eurecom.fr ,navid.nikaein@eurecom.fr, michele.paffetti@studio.unibo.it
*/ */
#ifdef USER_MODE #ifdef USER_MODE
#include <stdio.h> #include <stdio.h>
#include <sys/types.h> #include <sys/types.h>
#include <stdlib.h> /* for atoi(3) */ #include <stdlib.h> /* for atoi(3) */
#include <unistd.h> /* for getopt(3) */ #include <unistd.h> /* for getopt(3) */
#include <string.h> /* for strerror(3) */ #include <string.h> /* for strerror(3) */
#include <sysexits.h> /* for EX_* exit codes */ #include <sysexits.h> /* for EX_* exit codes */
#include <errno.h> /* for errno */ #include <errno.h> /* for errno */
#else #else
#include <linux/module.h> /* Needed by all modules */ #include <linux/module.h> /* Needed by all modules */
#endif #endif
#include <asn_application.h> #include <asn_application.h>
#include <asn_internal.h> /* for _ASN_DEFAULT_STACK_MAX */ #include <asn_internal.h> /* for _ASN_DEFAULT_STACK_MAX */
#include "RRC/LITE/defs_NB_IoT.h" #include "RRC/LITE/defs_NB_IoT.h"
/* /*
* The variant of the above function which dumps the BASIC-XER (XER_F_BASIC) * The variant of the above function which dumps the BASIC-XER (XER_F_BASIC)
* output into the chosen string buffer. * output into the chosen string buffer.
* RETURN VALUES: * RETURN VALUES:
* 0: The structure is printed. * 0: The structure is printed.
* -1: Problem printing the structure. * -1: Problem printing the structure.
* WARNING: No sensible error value is returned. * WARNING: No sensible error value is returned.
*/ */
/** /**
\brief Generate configuration for SIB1 (eNB). \brief Generate configuration for SIB1 (eNB).
@param carrier pointer to Carrier information @param carrier pointer to Carrier information
@param N_RB_DL Number of downlink PRBs @param N_RB_DL Number of downlink PRBs
@param frame radio frame number @param frame radio frame number
@return size of encoded bit stream in bytes*/ @return size of encoded bit stream in bytes*/
uint8_t do_MIB_NB_IoT( uint8_t do_MIB_NB_IoT(
rrc_eNB_carrier_data_NB_IoT_t *carrier, rrc_eNB_carrier_data_NB_IoT_t *carrier,
uint32_t N_RB_DL, uint32_t N_RB_DL,
uint32_t frame, uint32_t frame,
uint32_t hyper_frame); uint32_t hyper_frame);
/** /**
\brief Generate a default configuration for SIB1-NB (eNB). \brief Generate a default configuration for SIB1-NB (eNB).
@param Mod_id Instance of eNB @param Mod_id Instance of eNB
@param CC_id Component carrier to configure @param CC_id Component carrier to configure
@param carrier pointer to Carrier information @param carrier pointer to Carrier information
@param configuration Pointer Configuration Request structure @param configuration Pointer Configuration Request structure
@return size of encoded bit stream in bytes*/ @return size of encoded bit stream in bytes*/
uint8_t do_SIB1_NB_IoT(uint8_t Mod_id, uint8_t do_SIB1_NB_IoT(uint8_t Mod_id,
int CC_id, int CC_id,
rrc_eNB_carrier_data_NB_IoT_t *carrier, rrc_eNB_carrier_data_NB_IoT_t *carrier,
NbIoTRrcConfigurationReq *configuration, NbIoTRrcConfigurationReq *configuration,
uint32_t frame uint32_t frame
); );
/** /**
\brief Generate a default configuration for SIB2/SIB3-NB in one System Information PDU (eNB). \brief Generate a default configuration for SIB2/SIB3-NB in one System Information PDU (eNB).
@param Mod_id Index of eNB (used to derive some parameters) @param Mod_id Index of eNB (used to derive some parameters)
@param buffer Pointer to PER-encoded ASN.1 description of SI-NB PDU @param buffer Pointer to PER-encoded ASN.1 description of SI-NB PDU
@param systemInformation_NB_IoT Pointer to asn1c C representation of SI-NB PDU @param systemInformation_NB_IoT Pointer to asn1c C representation of SI-NB PDU
@param sib2_NB Pointer (returned) to sib2_NB component withing SI-NB PDU @param sib2_NB Pointer (returned) to sib2_NB component withing SI-NB PDU
@param sib3_NB Pointer (returned) to sib3_NB component withing SI-NB PDU @param sib3_NB Pointer (returned) to sib3_NB component withing SI-NB PDU
@return size of encoded bit stream in bytes*/ @return size of encoded bit stream in bytes*/
uint8_t do_SIB23_NB_IoT(uint8_t Mod_id, uint8_t do_SIB23_NB_IoT(uint8_t Mod_id,
int CC_id, int CC_id,
rrc_eNB_carrier_data_NB_IoT_t *carrier, rrc_eNB_carrier_data_NB_IoT_t *carrier,
NbIoTRrcConfigurationReq *configuration NbIoTRrcConfigurationReq *configuration
); );
/**(UE-SIDE) /**(UE-SIDE)
\brief Generate an RRCConnectionRequest-NB UL-CCCH-Message (UE) based on random string or S-TMSI. This \brief Generate an RRCConnectionRequest-NB UL-CCCH-Message (UE) based on random string or S-TMSI. This
routine only generates an mo-data establishment cause. routine only generates an mo-data establishment cause.
@param buffer Pointer to PER-encoded ASN.1 description of UL-DCCH-Message PDU @param buffer Pointer to PER-encoded ASN.1 description of UL-DCCH-Message PDU
@param rv 5 byte random string or S-TMSI @param rv 5 byte random string or S-TMSI
@param Mod_id @param Mod_id
@returns Size of encoded bit stream in bytes*/ @returns Size of encoded bit stream in bytes*/
uint8_t do_RRCConnectionRequest_NB_IoT(uint8_t Mod_id, uint8_t *buffer,uint8_t *rv); uint8_t do_RRCConnectionRequest_NB_IoT(uint8_t Mod_id, uint8_t *buffer,uint8_t *rv);
/**(UE -SIDE) /**(UE -SIDE)
\brief Generate an RRCConnectionSetupComplete-NB UL-DCCH-Message (UE) \brief Generate an RRCConnectionSetupComplete-NB UL-DCCH-Message (UE)
@param Mod_id @param Mod_id
@param Transaction_id @param Transaction_id
@param dedicatedInfoNASLength @param dedicatedInfoNASLength
@param dedicatedInfoNAS @param dedicatedInfoNAS
@param buffer Pointer to PER-encoded ASN.1 description of UL-DCCH-Message PDU @param buffer Pointer to PER-encoded ASN.1 description of UL-DCCH-Message PDU
@returns Size of encoded bit stream in bytes*/ @returns Size of encoded bit stream in bytes*/
uint8_t do_RRCConnectionSetupComplete_NB_IoT(uint8_t Mod_id, uint8_t* buffer, const uint8_t Transaction_id, const int dedicatedInfoNASLength, uint8_t do_RRCConnectionSetupComplete_NB_IoT(uint8_t Mod_id, uint8_t* buffer, const uint8_t Transaction_id, const int dedicatedInfoNASLength,
const char* dedicatedInfoNAS); const char* dedicatedInfoNAS);
/** (UE-SIDE) /** (UE-SIDE)
\brief Generate an RRCConnectionReconfigurationComplete-NB UL-DCCH-Message (UE) \brief Generate an RRCConnectionReconfigurationComplete-NB UL-DCCH-Message (UE)
@param buffer Pointer to PER-encoded ASN.1 description of UL-DCCH-Message PDU @param buffer Pointer to PER-encoded ASN.1 description of UL-DCCH-Message PDU
@param ctxt_pP @param ctxt_pP
@param Transaction_id @param Transaction_id
@returns Size of encoded bit stream in bytes*/ @returns Size of encoded bit stream in bytes*/
uint8_t do_RRCConnectionReconfigurationComplete_NB_IoT( uint8_t do_RRCConnectionReconfigurationComplete_NB_IoT(
const protocol_ctxt_t* const ctxt_pP, const protocol_ctxt_t* const ctxt_pP,
uint8_t* buffer, uint8_t* buffer,
const uint8_t Transaction_id const uint8_t Transaction_id
); );
/** /**
\brief Generate an RRCConnectionSetup-NB DL-CCCH-Message (eNB). This routine configures SRB_ToAddMod (SRB1/SRB1bis-NB) and \brief Generate an RRCConnectionSetup-NB DL-CCCH-Message (eNB). This routine configures SRB_ToAddMod (SRB1/SRB1bis-NB) and
PhysicalConfigDedicated-NB IEs. PhysicalConfigDedicated-NB IEs.
@param ctxt_pP Running context @param ctxt_pP Running context
@param ue_context_pP UE context @param ue_context_pP UE context
@param CC_id Component Carrier ID @param CC_id Component Carrier ID
@param buffer Pointer to PER-encoded ASN.1 description of DL-CCCH-Message PDU @param buffer Pointer to PER-encoded ASN.1 description of DL-CCCH-Message PDU
@param transmission_mode Transmission mode for UE (1-9) @param transmission_mode Transmission mode for UE (1-9)
@param UE_id UE index for this message @param UE_id UE index for this message
@param Transaction_id Transaction_ID for this message @param Transaction_id Transaction_ID for this message
@param SRB_configList Pointer (returned) to SRB1_config/SRB1bis_config(later) IEs for this UE @param SRB_configList Pointer (returned) to SRB1_config/SRB1bis_config(later) IEs for this UE
@param physicalConfigDedicated_NB Pointer (returned) to PhysicalConfigDedicated-NB IE for this UE @param physicalConfigDedicated_NB Pointer (returned) to PhysicalConfigDedicated-NB IE for this UE
@returns Size of encoded bit stream in bytes*/ @returns Size of encoded bit stream in bytes*/
uint8_t do_RRCConnectionSetup_NB_IoT( uint8_t do_RRCConnectionSetup_NB_IoT(
const protocol_ctxt_t* const ctxt_pP, const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_NB_IoT_t* const ue_context_pP, rrc_eNB_ue_context_NB_IoT_t* const ue_context_pP,
int CC_id, int CC_id,
uint8_t* const buffer, //carrier[CC_id].Srb0.Tx_buffer.Payload uint8_t* const buffer, //carrier[CC_id].Srb0.Tx_buffer.Payload
const uint8_t Transaction_id, const uint8_t Transaction_id,
const NB_IoT_DL_FRAME_PARMS* const frame_parms, //to be changed but not deleted const NB_IoT_DL_FRAME_PARMS* const frame_parms, //to be changed but not deleted
SRB_ToAddModList_NB_r13_t** SRB_configList_NB_IoT, //in order to be configured--> stanno puntando alla SRB_configlist dell ue_context SRB_ToAddModList_NB_r13_t** SRB_configList_NB_IoT, //in order to be configured--> stanno puntando alla SRB_configlist dell ue_context
struct PhysicalConfigDedicated_NB_r13** physicalConfigDedicated_NB_IoT //in order to be configured--> stanno puntando alla physicalConfigDedicated dell ue_context struct PhysicalConfigDedicated_NB_r13** physicalConfigDedicated_NB_IoT //in order to be configured--> stanno puntando alla physicalConfigDedicated dell ue_context
); );
/** /**
* For which SRB is used in NB-IoT?? * For which SRB is used in NB-IoT??
\brief Generate an RRCConnectionReconfiguration-NB DL-DCCH-Message (eNB). This routine configures SRBToAddMod-NB (SRB1) and one DRBToAddMod-NB \brief Generate an RRCConnectionReconfiguration-NB DL-DCCH-Message (eNB). This routine configures SRBToAddMod-NB (SRB1) and one DRBToAddMod-NB
(DRB3). PhysicalConfigDedicated-NB is not updated. (DRB3). PhysicalConfigDedicated-NB is not updated.
@param ctxt_pP Running context @param ctxt_pP Running context
@param buffer Pointer to PER-encoded ASN.1 description of DL-CCCH-Message PDU @param buffer Pointer to PER-encoded ASN.1 description of DL-CCCH-Message PDU
@param Transaction_id Transaction_ID for this message @param Transaction_id Transaction_ID for this message
@param SRB_list_NB Pointer to SRB List to be added/modified (NULL if no additions/modifications) @param SRB_list_NB Pointer to SRB List to be added/modified (NULL if no additions/modifications)
@param DRB_list_NB Pointer to DRB List to be added/modified (NULL if no additions/modifications) @param DRB_list_NB Pointer to DRB List to be added/modified (NULL if no additions/modifications)
@param DRB_list2_NB Pointer to DRB List to be released (NULL if none to be released) @param DRB_list2_NB Pointer to DRB List to be released (NULL if none to be released)
//sps not supported by NB-IoT //sps not supported by NB-IoT
@param physicalConfigDedicated_NB Pointer to PhysicalConfigDedicated-NB to be modified (NULL if no modifications) @param physicalConfigDedicated_NB Pointer to PhysicalConfigDedicated-NB to be modified (NULL if no modifications)
//measurement not supported by NB-IoT //measurement not supported by NB-IoT
@param mac_MainConfig Pointer to Mac_MainConfig(NULL if no modifications) @param mac_MainConfig Pointer to Mac_MainConfig(NULL if no modifications)
//no CBA functionalities //no CBA functionalities
@returns Size of encoded bit stream in bytes*/ @returns Size of encoded bit stream in bytes*/
uint16_t uint16_t
do_RRCConnectionReconfiguration_NB_IoT( do_RRCConnectionReconfiguration_NB_IoT(
const protocol_ctxt_t* const ctxt_pP, const protocol_ctxt_t* const ctxt_pP,
uint8_t *buffer, uint8_t *buffer,
uint8_t Transaction_id, uint8_t Transaction_id,
SRB_ToAddModList_NB_r13_t *SRB_list_NB_IoT, SRB_ToAddModList_NB_r13_t *SRB_list_NB_IoT,
DRB_ToAddModList_NB_r13_t *DRB_list_NB_IoT, DRB_ToAddModList_NB_r13_t *DRB_list_NB_IoT,
DRB_ToReleaseList_NB_r13_t *DRB_list2_NB_IoT, DRB_ToReleaseList_NB_r13_t *DRB_list2_NB_IoT,
struct PhysicalConfigDedicated_NB_r13 *physicalConfigDedicated, struct PhysicalConfigDedicated_NB_r13 *physicalConfigDedicated,
MAC_MainConfig_t *mac_MainConfig, MAC_MainConfig_t *mac_MainConfig,
struct RRCConnectionReconfiguration_NB_r13_IEs__dedicatedInfoNASList_r13* dedicatedInfoNASList_NB_IoT); struct RRCConnectionReconfiguration_NB_r13_IEs__dedicatedInfoNASList_r13* dedicatedInfoNASList_NB_IoT);
/** /**
* E-UTRAN applies the procedure as follows: when only for NB-IoT SRB1 and SRB1bis is established * E-UTRAN applies the procedure as follows: when only for NB-IoT SRB1 and SRB1bis is established
\brief Generate a SecurityModeCommand \brief Generate a SecurityModeCommand
@param ctxt_pP Running context @param ctxt_pP Running context
@param buffer Pointer to PER-encoded ASN.1 description @param buffer Pointer to PER-encoded ASN.1 description
@param Transaction_id Transaction_ID for this message @param Transaction_id Transaction_ID for this message
@param cipheringAlgorithm @param cipheringAlgorithm
@param integrityProtAlgorithm @param integrityProtAlgorithm
*/ */
uint8_t do_SecurityModeCommand_NB_IoT( uint8_t do_SecurityModeCommand_NB_IoT(
const protocol_ctxt_t* const ctxt_pP, const protocol_ctxt_t* const ctxt_pP,
uint8_t* const buffer, uint8_t* const buffer,
const uint8_t Transaction_id, const uint8_t Transaction_id,
const uint8_t cipheringAlgorithm, const uint8_t cipheringAlgorithm,
const uint8_t integrityProtAlgorithm); const uint8_t integrityProtAlgorithm);
/** /**
* E-UTRAN applies the procedure as follows: when only for NB-IoT SRB1 and SRB1bis is established * E-UTRAN applies the procedure as follows: when only for NB-IoT SRB1 and SRB1bis is established
\brief Generate a SecurityModeCommand \brief Generate a SecurityModeCommand
@param ctxt_pP Running context @param ctxt_pP Running context
@param buffer Pointer to PER-encoded ASN.1 description @param buffer Pointer to PER-encoded ASN.1 description
@param Transaction_id Transaction_ID for this message @param Transaction_id Transaction_ID for this message
*/ */
uint8_t do_UECapabilityEnquiry_NB_IoT( uint8_t do_UECapabilityEnquiry_NB_IoT(
const protocol_ctxt_t* const ctxt_pP, const protocol_ctxt_t* const ctxt_pP,
uint8_t* const buffer, uint8_t* const buffer,
const uint8_t Transaction_id const uint8_t Transaction_id
); );
/** /**
* There is nothing new in this type of message for NB-IoT (only change in some nomenclature) * There is nothing new in this type of message for NB-IoT (only change in some nomenclature)
\brief Generate an RRCConnectionReestablishmentReject DL-CCCH-Message (eNB). \brief Generate an RRCConnectionReestablishmentReject DL-CCCH-Message (eNB).
@param Mod_id Module ID of eNB @param Mod_id Module ID of eNB
@param buffer Pointer to PER-encoded ASN.1 description of DL-CCCH-Message PDU @param buffer Pointer to PER-encoded ASN.1 description of DL-CCCH-Message PDU
@returns Size of encoded bit stream in bytes*/ @returns Size of encoded bit stream in bytes*/
uint8_t uint8_t
do_RRCConnectionReestablishmentReject_NB_IoT( do_RRCConnectionReestablishmentReject_NB_IoT(
uint8_t Mod_id, uint8_t Mod_id,
uint8_t* const buffer); uint8_t* const buffer);
/** /**
\brief Generate an RRCConnectionReject-NB DL-CCCH-Message (eNB). \brief Generate an RRCConnectionReject-NB DL-CCCH-Message (eNB).
@param Mod_id Module ID of eNB @param Mod_id Module ID of eNB
@param buffer Pointer to PER-encoded ASN.1 description of DL-CCCH-Message PDU @param buffer Pointer to PER-encoded ASN.1 description of DL-CCCH-Message PDU
@returns Size of encoded bit stream in bytes*/ @returns Size of encoded bit stream in bytes*/
uint8_t uint8_t
do_RRCConnectionReject_NB_IoT( do_RRCConnectionReject_NB_IoT(
uint8_t Mod_id, uint8_t Mod_id,
uint8_t* const buffer); uint8_t* const buffer);
/** /**
\brief Generate an RRCConnectionRelease-NB DL-DCCH-Message \brief Generate an RRCConnectionRelease-NB DL-DCCH-Message
@param Mod_id Module ID of eNB @param Mod_id Module ID of eNB
@param buffer Pointer to PER-encoded ASN.1 description @param buffer Pointer to PER-encoded ASN.1 description
@param transaction_id Transaction index @param transaction_id Transaction index
@returns Size of encoded bit stream in bytes*/ @returns Size of encoded bit stream in bytes*/
uint8_t do_RRCConnectionRelease_NB_IoT(uint8_t Mod_id, uint8_t *buffer,int Transaction_id); uint8_t do_RRCConnectionRelease_NB_IoT(uint8_t Mod_id, uint8_t *buffer,int Transaction_id);
uint8_t do_DLInformationTransfer_NB_IoT( uint8_t do_DLInformationTransfer_NB_IoT(
uint8_t Mod_id, uint8_t Mod_id,
uint8_t **buffer, uint8_t **buffer,
uint8_t transaction_id, uint8_t transaction_id,
uint32_t pdu_length, uint32_t pdu_length,
uint8_t *pdu_buffer); uint8_t *pdu_buffer);
//for now not implemented since UE side //for now not implemented since UE side
//uint8_t do_ULInformationTransfer(uint8_t **buffer, uint32_t pdu_length, uint8_t *pdu_buffer); //uint8_t do_ULInformationTransfer(uint8_t **buffer, uint32_t pdu_length, uint8_t *pdu_buffer);
//for now not implemented since UE side??? //for now not implemented since UE side???
//OAI_UECapability_t *fill_ue_capability(char *UE_EUTRA_Capability_xer_fname) //OAI_UECapability_t *fill_ue_capability(char *UE_EUTRA_Capability_xer_fname)
/** /**
\brief Generate an RRCConnectionReestablishment-NB DL-CCCH Message \brief Generate an RRCConnectionReestablishment-NB DL-CCCH Message
*@param *@param
* *
*/ */
uint8_t do_RRCConnectionReestablishment_NB_IoT( uint8_t do_RRCConnectionReestablishment_NB_IoT(
uint8_t Mod_id, uint8_t Mod_id,
uint8_t* const buffer, uint8_t* const buffer,
const uint8_t Transaction_id, const uint8_t Transaction_id,
const NB_IoT_DL_FRAME_PARMS* const frame_parms, //to be changed const NB_IoT_DL_FRAME_PARMS* const frame_parms, //to be changed
SRB_ToAddModList_NB_r13_t** SRB_configList_NB_IoT SRB_ToAddModList_NB_r13_t** SRB_configList_NB_IoT
); );
/** /**
\brief Generate an RRCConnectionRelease-NB DL-DCCH-Message (eNB) \brief Generate an RRCConnectionRelease-NB DL-DCCH-Message (eNB)
@param Mod_id Module ID of eNB @param Mod_id Module ID of eNB
@param buffer Pointer to PER-encoded ASN.1 description of DL-DCCH-Message PDU @param buffer Pointer to PER-encoded ASN.1 description of DL-DCCH-Message PDU
@param transaction_id Transaction index @param transaction_id Transaction index
@returns Size of encoded bit stream in bytes*/ @returns Size of encoded bit stream in bytes*/
//uint8_t do_RRCConnectionRelease_NB_IoT(uint8_t Mod_id, uint8_t *buffer,int Transaction_id); //uint8_t do_RRCConnectionRelease_NB_IoT(uint8_t Mod_id, uint8_t *buffer,int Transaction_id);
File diff suppressed because it is too large Load Diff
+62 -62
View File
@@ -1,63 +1,63 @@
/* /*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. * this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under * The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file * the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. * except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.openairinterface.org/?page_id=698 * http://www.openairinterface.org/?page_id=698
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*------------------------------------------------------------------------------- *-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance: * For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org * contact@openairinterface.org
*/ */
/*! \file vars.h /*! \file vars.h
* \brief rrc external vars * \brief rrc external vars
* \author Navid Nikaein and Raymond Knopp, Michele Paffetti * \author Navid Nikaein and Raymond Knopp, Michele Paffetti
* \date 2011-2017 * \date 2011-2017
* \version 1.0 * \version 1.0
* \company Eurecom * \company Eurecom
* \email: navid.nikaein@eurecom.fr, michele.paffetti@studio.unibo.it * \email: navid.nikaein@eurecom.fr, michele.paffetti@studio.unibo.it
*/ */
#ifndef __OPENAIR_RRC_EXTERN_NB_IOT_H__ #ifndef __OPENAIR_RRC_EXTERN_NB_IOT_H__
#define __OPENAIR_RRC_EXTERN_NB_IOT_H__ #define __OPENAIR_RRC_EXTERN_NB_IOT_H__
#include "RRC/LITE/defs_NB_IoT.h" #include "RRC/LITE/defs_NB_IoT.h"
#include "PHY_INTERFACE/IF_Module_NB_IoT.h" #include "PHY_INTERFACE/IF_Module_NB_IoT.h"
#include "LAYER2/RLC/rlc.h" #include "LAYER2/RLC/rlc.h"
#include "LogicalChannelConfig-NB-r13.h" #include "LogicalChannelConfig-NB-r13.h"
#include "LAYER2/MAC/defs_NB_IoT.h" #include "LAYER2/MAC/defs_NB_IoT.h"
#include "common/ran_context.h"
//MP: NOTE:XXX some of the parameters defined in vars_nb_iot are called by the extern.h file so not replicated here
extern UE_RRC_INST_NB_IoT *UE_rrc_inst_NB_IoT;
extern eNB_RRC_INST_NB_IoT *eNB_rrc_inst_NB_IoT;
extern PHY_Config_NB_IoT_t *config_INFO;
extern rlc_info_t Rlc_info_am_NB_IoT,Rlc_info_am_config_NB_IoT;
extern uint8_t DRB2LCHAN_NB_IoT[2];
extern LogicalChannelConfig_NB_r13_t SRB1bis_logicalChannelConfig_defaultValue_NB_IoT;
extern LogicalChannelConfig_NB_r13_t SRB1_logicalChannelConfig_defaultValue_NB_IoT;
extern uint16_t T300_NB_IoT[8];
extern uint16_t T301_NB_IoT[8];
extern uint16_t T310_NB_IoT[8];
extern uint16_t T311_NB_IoT[8];
extern uint16_t N310_NB_IoT[8];
extern uint16_t N311_NB_IoT[8];
extern uint8_t *get_NB_IoT_MIB(struct eNB_RRC_INST_NB_IoT_s *nb_iot_rrc);
#endif
#include "common/ran_context.h"
//MP: NOTE:XXX some of the parameters defined in vars_nb_iot are called by the extern.h file so not replicated here
extern UE_RRC_INST_NB_IoT *UE_rrc_inst_NB_IoT;
extern eNB_RRC_INST_NB_IoT *eNB_rrc_inst_NB_IoT;
extern PHY_Config_NB_IoT_t *config_INFO;
extern rlc_info_t Rlc_info_am_NB_IoT,Rlc_info_am_config_NB_IoT;
extern uint8_t DRB2LCHAN_NB_IoT[2];
extern LogicalChannelConfig_NB_r13_t SRB1bis_logicalChannelConfig_defaultValue_NB_IoT;
extern LogicalChannelConfig_NB_r13_t SRB1_logicalChannelConfig_defaultValue_NB_IoT;
extern uint16_t T300_NB_IoT[8];
extern uint16_t T301_NB_IoT[8];
extern uint16_t T310_NB_IoT[8];
extern uint16_t T311_NB_IoT[8];
extern uint16_t N310_NB_IoT[8];
extern uint16_t N311_NB_IoT[8];
extern uint8_t *get_NB_IoT_MIB(struct eNB_RRC_INST_NB_IoT_s *nb_iot_rrc);
#endif
+260 -260
View File
@@ -1,260 +1,260 @@
/* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more /* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. * this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under * The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file * the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. * except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.openairinterface.org/?page_id=698 * http://www.openairinterface.org/?page_id=698
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*------------------------------------------------------------------------------- *-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance: * For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org * contact@openairinterface.org
*/ */
/*! \file proto_NB_IoT.h /*! \file proto_NB_IoT.h
* \brief RRC functions prototypes for eNB and UE for NB-IoT * \brief RRC functions prototypes for eNB and UE for NB-IoT
* \author Navid Nikaein, Raymond Knopp and Michele Paffetti * \author Navid Nikaein, Raymond Knopp and Michele Paffetti
* \date 2010 - 2014 * \date 2010 - 2014
* \email navid.nikaein@eurecom.fr, michele.paffetti@studio.unibo.it * \email navid.nikaein@eurecom.fr, michele.paffetti@studio.unibo.it
* \version 1.0 * \version 1.0
*/ */
/** \addtogroup _rrc /** \addtogroup _rrc
* @{ * @{
*/ */
#include "RRC/LITE/defs_NB_IoT.h" #include "RRC/LITE/defs_NB_IoT.h"
#include "pdcp.h" #include "pdcp.h"
#include "rlc.h" #include "rlc.h"
#include "extern_NB_IoT.h" #include "extern_NB_IoT.h"
#include "LAYER2/MAC/defs_NB_IoT.h" #include "LAYER2/MAC/defs_NB_IoT.h"
/*NOTE: no static function should be declared in this header file (e.g. init_SI_NB)*/ /*NOTE: no static function should be declared in this header file (e.g. init_SI_NB)*/
/*------------------------common_nb_iot.c----------------------------------------*/ /*------------------------common_nb_iot.c----------------------------------------*/
/** \brief configure BCCH & CCCH Logical Channels and associated rrc_buffers, configure associated SRBs /** \brief configure BCCH & CCCH Logical Channels and associated rrc_buffers, configure associated SRBs
*/ */
void openair_rrc_on_NB_IoT(const protocol_ctxt_t* const ctxt_pP); void openair_rrc_on_NB_IoT(const protocol_ctxt_t* const ctxt_pP);
void rrc_config_buffer_NB_IoT(SRB_INFO_NB_IoT *srb_info, uint8_t Lchan_type, uint8_t Role); void rrc_config_buffer_NB_IoT(SRB_INFO_NB_IoT *srb_info, uint8_t Lchan_type, uint8_t Role);
int L3_xface_init_NB_IoT(void); int L3_xface_init_NB_IoT(void);
void openair_rrc_top_init_eNB_NB_IoT(void); void openair_rrc_top_init_eNB_NB_IoT(void);
//void rrc_top_cleanup(void); -->seems not to be used //void rrc_top_cleanup(void); -->seems not to be used
//rrc_t310_expiration-->seems not to be used //rrc_t310_expiration-->seems not to be used
/** \brief Function to update timers every subframe. For UE it updates T300,T304 and T310. /** \brief Function to update timers every subframe. For UE it updates T300,T304 and T310.
@param ctxt_pP running context @param ctxt_pP running context
@param enb_index @param enb_index
@param CC_id @param CC_id
*/ */
RRC_status_t rrc_rx_tx_NB_IoT(protocol_ctxt_t* const ctxt_pP, const uint8_t enb_index, const int CC_id); RRC_status_t rrc_rx_tx_NB_IoT(protocol_ctxt_t* const ctxt_pP, const uint8_t enb_index, const int CC_id);
//long binary_search_int(int elements[], long numElem, int value);--> seems not to be used //long binary_search_int(int elements[], long numElem, int value);--> seems not to be used
//long binary_search_float(float elements[], long numElem, float value);--> used only at UE side //long binary_search_float(float elements[], long numElem, float value);--> used only at UE side
//--------------------------------------- //---------------------------------------
//defined in L2_interface //defined in L2_interface
//called by rx_sdu only in case of CCCH message (e.g RRCConnectionRequest-NB) //called by rx_sdu only in case of CCCH message (e.g RRCConnectionRequest-NB)
int8_t mac_rrc_data_ind_eNB_NB_IoT( int8_t mac_rrc_data_ind_eNB_NB_IoT(
const module_id_t module_idP, const module_id_t module_idP,
const int CC_id, const int CC_id,
const frame_t frameP, const frame_t frameP,
const sub_frame_t sub_frameP, const sub_frame_t sub_frameP,
const rnti_t rntiP, const rnti_t rntiP,
const rb_id_t srb_idP,//could be skipped since always go through the CCCH channel const rb_id_t srb_idP,//could be skipped since always go through the CCCH channel
const uint8_t* sduP, const uint8_t* sduP,
const sdu_size_t sdu_lenP const sdu_size_t sdu_lenP
); );
//------------------------------------------- //-------------------------------------------
//defined in L2_interface //defined in L2_interface
void dump_ue_list_NB_IoT(UE_list_NB_IoT_t *listP, int ul_flag); void dump_ue_list_NB_IoT(UE_list_NB_IoT_t *listP, int ul_flag);
//------------------------------------------- //-------------------------------------------
//defined in L2_interface //defined in L2_interface
void mac_eNB_rrc_ul_failure_NB_IoT( void mac_eNB_rrc_ul_failure_NB_IoT(
const module_id_t mod_idP, const module_id_t mod_idP,
const int CC_idP, const int CC_idP,
const frame_t frameP, const frame_t frameP,
const sub_frame_t subframeP, const sub_frame_t subframeP,
const rnti_t rntiP); const rnti_t rntiP);
//------------------------------------------ //------------------------------------------
//defined in eNB_scheduler_primitives.c //defined in eNB_scheduler_primitives.c
int rrc_mac_remove_ue_NB_IoT( int rrc_mac_remove_ue_NB_IoT(
module_id_t mod_idP, module_id_t mod_idP,
rnti_t rntiP); rnti_t rntiP);
//------------------------------------------ //------------------------------------------
//defined in L2_interface //defined in L2_interface
void mac_eNB_rrc_ul_in_sync_NB_IoT( void mac_eNB_rrc_ul_in_sync_NB_IoT(
const module_id_t mod_idP, const module_id_t mod_idP,
const int CC_idP, const int CC_idP,
const frame_t frameP, const frame_t frameP,
const sub_frame_t subframeP, const sub_frame_t subframeP,
const rnti_t rntiP); const rnti_t rntiP);
//------------------------------------------ //------------------------------------------
//defined in L2_interface //defined in L2_interface
int mac_eNB_get_rrc_status_NB_IoT( int mac_eNB_get_rrc_status_NB_IoT(
const module_id_t Mod_idP, const module_id_t Mod_idP,
const rnti_t rntiP const rnti_t rntiP
); );
//--------------------------- //---------------------------
/*-----------eNB procedures (rrc_eNB_nb_iot.c)---------------*/ /*-----------eNB procedures (rrc_eNB_nb_iot.c)---------------*/
//---Initialization-------------- //---Initialization--------------
void openair_eNB_rrc_on_NB_IoT( void openair_eNB_rrc_on_NB_IoT(
const protocol_ctxt_t* const ctxt_pP const protocol_ctxt_t* const ctxt_pP
); );
void rrc_config_buffer_NB_IoT( void rrc_config_buffer_NB_IoT(
SRB_INFO_NB_IoT* Srb_info, SRB_INFO_NB_IoT* Srb_info,
uint8_t Lchan_type, uint8_t Lchan_type,
uint8_t Role uint8_t Role
); );
char openair_rrc_eNB_configuration_NB_IoT( char openair_rrc_eNB_configuration_NB_IoT(
const module_id_t enb_mod_idP, const module_id_t enb_mod_idP,
NbIoTRrcConfigurationReq* configuration NbIoTRrcConfigurationReq* configuration
); );
//----------------------------- //-----------------------------
/**\brief RRC eNB task. (starting of the RRC state machine) /**\brief RRC eNB task. (starting of the RRC state machine)
\param void *args_p Pointer on arguments to start the task. */ \param void *args_p Pointer on arguments to start the task. */
void *rrc_enb_task_NB_IoT(void *args_p); void *rrc_enb_task_NB_IoT(void *args_p);
/**\brief Entry routine to decode a UL-CCCH-Message-NB. Invokes PER decoder and parses message. /**\brief Entry routine to decode a UL-CCCH-Message-NB. Invokes PER decoder and parses message.
\param ctxt_pP Running context \param ctxt_pP Running context
\param Srb_info Pointer to SRB0 information structure (buffer, etc.)*/ \param Srb_info Pointer to SRB0 information structure (buffer, etc.)*/
int rrc_eNB_decode_ccch_NB_IoT( int rrc_eNB_decode_ccch_NB_IoT(
protocol_ctxt_t* const ctxt_pP, protocol_ctxt_t* const ctxt_pP,
const SRB_INFO_NB_IoT* const Srb_info, const SRB_INFO_NB_IoT* const Srb_info,
const int CC_id const int CC_id
); );
/**\brief Entry routine to decode a UL-DCCH-Message-NB. Invokes PER decoder and parses message. /**\brief Entry routine to decode a UL-DCCH-Message-NB. Invokes PER decoder and parses message.
\param ctxt_pP Context \param ctxt_pP Context
\param Rx_sdu Pointer Received Message \param Rx_sdu Pointer Received Message
\param sdu_size Size of incoming SDU*/ \param sdu_size Size of incoming SDU*/
int rrc_eNB_decode_dcch_NB_IoT( int rrc_eNB_decode_dcch_NB_IoT(
const protocol_ctxt_t* const ctxt_pP, const protocol_ctxt_t* const ctxt_pP,
const rb_id_t Srb_id, const rb_id_t Srb_id,
const uint8_t* const Rx_sdu, const uint8_t* const Rx_sdu,
const sdu_size_t sdu_sizeP const sdu_size_t sdu_sizeP
); );
/**\brief Generate RRCConnectionReestablishmentReject-NB /**\brief Generate RRCConnectionReestablishmentReject-NB
\param ctxt_pP Running context \param ctxt_pP Running context
\param ue_context_pP UE context \param ue_context_pP UE context
\param CC_id Component Carrier ID*/ \param CC_id Component Carrier ID*/
void rrc_eNB_generate_RRCConnectionReestablishmentReject_NB_IoT( void rrc_eNB_generate_RRCConnectionReestablishmentReject_NB_IoT(
const protocol_ctxt_t* const ctxt_pP, const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_NB_IoT_t* const ue_context_pP, rrc_eNB_ue_context_NB_IoT_t* const ue_context_pP,
const int CC_id const int CC_id
); );
void rrc_eNB_generate_RRCConnectionReject_NB_IoT( void rrc_eNB_generate_RRCConnectionReject_NB_IoT(
const protocol_ctxt_t* const ctxt_pP, const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_NB_IoT_t* const ue_context_pP, rrc_eNB_ue_context_NB_IoT_t* const ue_context_pP,
const int CC_id const int CC_id
); );
void rrc_eNB_generate_RRCConnectionSetup_NB_IoT( void rrc_eNB_generate_RRCConnectionSetup_NB_IoT(
const protocol_ctxt_t* const ctxt_pP, const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_NB_IoT_t* const ue_context_pP, rrc_eNB_ue_context_NB_IoT_t* const ue_context_pP,
const int CC_id const int CC_id
); );
void rrc_eNB_process_RRCConnectionReconfigurationComplete_NB_IoT( void rrc_eNB_process_RRCConnectionReconfigurationComplete_NB_IoT(
const protocol_ctxt_t* const ctxt_pP, const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_NB_IoT_t* ue_context_pP, rrc_eNB_ue_context_NB_IoT_t* ue_context_pP,
const uint8_t xid //transaction identifier const uint8_t xid //transaction identifier
); );
void //was under ITTI void //was under ITTI
rrc_eNB_reconfigure_DRBs_NB_IoT(const protocol_ctxt_t* const ctxt_pP, rrc_eNB_reconfigure_DRBs_NB_IoT(const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_NB_IoT_t* ue_context_pP); rrc_eNB_ue_context_NB_IoT_t* ue_context_pP);
void //was under ITTI void //was under ITTI
rrc_eNB_generate_dedicatedRRCConnectionReconfiguration_NB_IoT( rrc_eNB_generate_dedicatedRRCConnectionReconfiguration_NB_IoT(
const protocol_ctxt_t* const ctxt_pP, const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_NB_IoT_t* const ue_context_pP rrc_eNB_ue_context_NB_IoT_t* const ue_context_pP
// const uint8_t ho_state // const uint8_t ho_state
); );
void rrc_eNB_process_RRCConnectionSetupComplete_NB_IoT( void rrc_eNB_process_RRCConnectionSetupComplete_NB_IoT(
const protocol_ctxt_t* const ctxt_pP, const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_NB_IoT_t* ue_context_pP, rrc_eNB_ue_context_NB_IoT_t* ue_context_pP,
RRCConnectionSetupComplete_NB_r13_IEs_t * rrcConnectionSetupComplete_NB RRCConnectionSetupComplete_NB_r13_IEs_t * rrcConnectionSetupComplete_NB
); );
void rrc_eNB_generate_SecurityModeCommand_NB_IoT( void rrc_eNB_generate_SecurityModeCommand_NB_IoT(
const protocol_ctxt_t* const ctxt_pP, const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_NB_IoT_t* const ue_context_pP rrc_eNB_ue_context_NB_IoT_t* const ue_context_pP
); );
void rrc_eNB_generate_UECapabilityEnquiry_NB_IoT( void rrc_eNB_generate_UECapabilityEnquiry_NB_IoT(
const protocol_ctxt_t* const ctxt_pP, const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_NB_IoT_t* const ue_context_pP rrc_eNB_ue_context_NB_IoT_t* const ue_context_pP
); );
void rrc_eNB_generate_defaultRRCConnectionReconfiguration_NB_IoT(const protocol_ctxt_t* const ctxt_pP, void rrc_eNB_generate_defaultRRCConnectionReconfiguration_NB_IoT(const protocol_ctxt_t* const ctxt_pP,
rrc_eNB_ue_context_NB_IoT_t* const ue_context_pP rrc_eNB_ue_context_NB_IoT_t* const ue_context_pP
//no HO flag //no HO flag
); );
/// Utilities------------------------------------------------ /// Utilities------------------------------------------------
void rrc_eNB_free_UE_NB_IoT( void rrc_eNB_free_UE_NB_IoT(
const module_id_t enb_mod_idP, const module_id_t enb_mod_idP,
const struct rrc_eNB_ue_context_NB_IoT_s* const ue_context_pP const struct rrc_eNB_ue_context_NB_IoT_s* const ue_context_pP
); );
void rrc_eNB_free_mem_UE_context_NB_IoT( void rrc_eNB_free_mem_UE_context_NB_IoT(
const protocol_ctxt_t* const ctxt_pP, const protocol_ctxt_t* const ctxt_pP,
struct rrc_eNB_ue_context_NB_IoT_s* const ue_context_pP struct rrc_eNB_ue_context_NB_IoT_s* const ue_context_pP
); );
/**\brief Function to get the next transaction identifier. /**\brief Function to get the next transaction identifier.
\param module_idP Instance ID for CH/eNB \param module_idP Instance ID for CH/eNB
\return a transaction identifier*/ \return a transaction identifier*/
uint8_t rrc_eNB_get_next_transaction_identifier_NB_IoT(module_id_t module_idP); uint8_t rrc_eNB_get_next_transaction_identifier_NB_IoT(module_id_t module_idP);
int rrc_init_global_param_NB_IoT(void); int rrc_init_global_param_NB_IoT(void);
//L2_interface.c //L2_interface.c
int8_t mac_rrc_data_req_eNB_NB_IoT( int8_t mac_rrc_data_req_eNB_NB_IoT(
const module_id_t Mod_idP, const module_id_t Mod_idP,
const int CC_id, const int CC_id,
const frame_t frameP, const frame_t frameP,
const frame_t h_frameP, const frame_t h_frameP,
const sub_frame_t subframeP, //need for the case in which both SIB1-NB_IoT and SIB23-NB_IoT will be scheduled in the same frame const sub_frame_t subframeP, //need for the case in which both SIB1-NB_IoT and SIB23-NB_IoT will be scheduled in the same frame
const rb_id_t Srb_id, const rb_id_t Srb_id,
uint8_t* const buffer_pP, uint8_t* const buffer_pP,
uint8_t flag uint8_t flag
); );