gnb_config.h 3.57 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
/*
 * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * 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
 * except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.openairinterface.org/?page_id=698
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *-------------------------------------------------------------------------------
 * For more information about the OpenAirInterface (OAI) Software Alliance:
 *      contact@openairinterface.org
 */

/*
                                gnb_config.h
                             -------------------
WEI-TAI CHEN's avatar
WEI-TAI CHEN committed
25 26 27
  AUTHOR  : Lionel GAUTHIER, Navid Nikaein, Laurent Winckel, WEI-TAI CHEN
  COMPANY : EURECOM, NTSUT
  EMAIL   : Lionel.Gauthier@eurecom.fr, navid.nikaein@eurecom.fr, kroempa@gmail.com
28 29 30 31 32 33 34 35 36 37 38 39
*/

#ifndef GNB_CONFIG_H_
#define GNB_CONFIG_H_
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <libconfig.h>

#include "commonDef.h"
#include "platform_types.h"
#include "platform_constants.h"
40
#include "PHY/defs_eNB.h"
41
#include "s1ap_messages_types.h"
heshanyun's avatar
heshanyun committed
42
#include "ngap_messages_types.h"
43
#include "f1ap_messages_types.h"
44 45 46 47 48

#ifdef CMAKER
#include "rrc_messages_types.h"
#endif

49
#include "intertask_interface.h"
50
#include "RRC/NR/nr_rrc_defs.h"
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66

#define IPV4_STR_ADDR_TO_INT_NWBO(AdDr_StR,NwBo,MeSsAgE ) do {\
            struct in_addr inp;\
            if ( inet_aton(AdDr_StR, &inp ) < 0 ) {\
                AssertFatal (0, MeSsAgE);\
            } else {\
                NwBo = inp.s_addr;\
            }\
        } while (0);

/** @defgroup _enb_app ENB APP 
 * @ingroup _oai2
 * @{
 */

// Hard to find a defined value for max enb...
67
#define MAX_GNB 16
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95

/*
typedef struct mme_ip_address_s {
  unsigned  ipv4:1;
  unsigned  ipv6:1;
  unsigned  active:1;
  char     *ipv4_address;
  char     *ipv6_address;
} mme_ip_address_t;

typedef struct ru_config_s {
  // indicates if local or remote rf is used (1 == LOCAL)
  unsigned  local_rf:1;
  // indicates if UDP socket is used
  unsigned  udp:1;
  // indicates if RAW socket is used
  unsigned  raw:1;
  char      *ru_if_name;
  char     *local_address;
  char     *remote_address;
  uint16_t  local_port;
  uint16_t  remote_port;
  uint8_t   udpif4p5;
  uint8_t   rawif4p5;
  uint8_t   rawif5_mobipass;
  uint8_t   if_compress;
} ru_config_t;
*/
96
extern void NRRCconfig_RU(void);
97
extern void RCconfig_nr_flexran(void);
98 99
extern void RCconfig_NR_L1(void);
extern void RCconfig_nr_macrlc(void);
100
extern int  RCconfig_nr_gtpu(void );
101 102 103 104 105
extern void NRRCConfig(void);

//void                          enb_config_display(void);
//void                          ru_config_display(void);

WEI-TAI CHEN's avatar
WEI-TAI CHEN committed
106
void RCconfig_NRRRC(MessageDef *msg_p, uint32_t i, gNB_RRC_INST *rrc);
zhenghuangkun's avatar
zhenghuangkun committed
107
int RCconfig_NR_NG(MessageDef *msg_p, uint32_t i);
108
int RCconfig_NR_X2(MessageDef *msg_p, uint32_t i);
Xue Song's avatar
Xue Song committed
109
int RCconfig_NR_DU_F1(MessageDef *msg_p, uint32_t i);
110 111
int gNB_app_handle_f1ap_setup_resp(f1ap_setup_resp_t *resp);
int gNB_app_handle_f1ap_gnb_cu_configuration_update(f1ap_gnb_cu_configuration_update_t *gnb_cu_cfg_update);
Xue Song's avatar
Xue Song committed
112
void nr_read_config_and_init(void);
113 114 115

#endif /* GNB_CONFIG_H_ */
/** @} */