Commit d3f0f938 authored by HFJ's avatar HFJ

add build_ausf

parent 14e5b40d
......@@ -21,23 +21,37 @@ The main folder contains also a file with a main that can be used to start the s
Of course, is you should customize this file based on your needs
## Installation
First of all, you need to download and install the libraries listed [here](#libraries-required).
Once the libraries are installed, in order to compile and run the server please follow the steps below:
### Install Libraries
```bash
cd src
mkdir build
cd build
cmake ..
sudo apt-get install cmake git pkg-config nettle-dev libconfig++-dev libboost-all-dev curl libcurl4-gnutls-dev
sudo apt-get install -y build-essential
make
```
### Download the Souce Code
```bash
git clone -b hfj http://git.opensource5g.org/openxg/openxg-ausf.git
cd openxg-ausf/
```
### Build AUSF
```bash
cd scripts
./build_ausf
```
### Configuration
```bash
cd etc
gedit ausf.conf
```
### Run AUSF
Once compiled run the server:
```bash
cd build
./ausf -c ../../etc/ausf.conf -o -r
#or ./ausf -c ../etc/ausf.conf -o -r
./ausf -c ../etc/ausf.conf -o -r
```
## Libraries required
......
......@@ -3,25 +3,7 @@ AUSF =
{
INSTANCE_ID = 10; #10
PID_DIRECTORY = "/var/run";
######################################################################## NG SETUP RESPONSE IEs ############################################################
AUSF_NAME = "bupt-ausf";
# GUAMI:{MCC = "110"; MNC = "11"; RegionID = "128"; AMFSetID = "4"; AMFPointer = "1"}
# SERVED_GUAMI_LIST = (
# {MCC = "110"; MNC = "11"; RegionID = "10"; AMFSetID = "1"; AMFPointer = "0"}, #48bits <MCC><MNC><RegionID><AMFSetID><AMFPointer>
# {MCC = "110"; MNC = "11"; RegionID = "10"; AMFSetID = "1"; AMFPointer = "1"} #48bits <MCC><MNC><RegionID><AMFSetID><AMFPointer>
# );
# RELATIVE_CAPACITY = 30;
# PLMN_SUPPORT_LIST = (
# {MCC = "110"; MNC = "11"; TAC = 100;
# SLICE_SUPPORT_LIST = (
# {SST = "1"; SD = "none"},
# {SST = "1"; SD = "12"}
# )
# }
# );
##################################################################### clause 9.2.6.2, 3gpp ts38.413 ####################################################
#STATISTICS_TIMER_INTERVAL = 20; #second
INTERFACES:{
SBI_AUSF:{
......@@ -36,32 +18,8 @@ AUSF =
PORT = 8181; #udm service port
#PPID = 60;
};
NAMF:{
INTERFACE_NAME = "ens33"; #interface for request for amf service
IPV4_ADDRESS = "192.168.21.136/24"; #amf address (cidr)
PORT = 8383; #amf port
};
# NUDR:{
# INTERFACE_NAME = "ens33"; #interface for request for udr service
# IPV4_ADDRESS = "192.168.21.133/24"; #udr address (cidr)
# PORT = 8080; #udr port
# VERSION = "v2";
# };
};
# CORE_CONFIGURATION:{
# EMERGENCY_SUPPORT = "false";
# };
# AUTHENTICATION:{
# MYSQL_server = "127.0.0.1";
# MYSQL_user = "bupt"; # Database server login
# MYSQL_pass = "linux"; # Database server password
# MYSQL_db = "OAI_DB";
# OPERATOR_key = "1006020f0a478bf6b699f15c062e42b3"; # op
# RANDOM = "true";
# };
};
#!/bin/bash
THIS_SCRIPT_PATH=$(dirname $(readlink -f $0))
export OPENXGUDR_DIR=${THIS_SCRIPT_PATH%/*}
#echo "${THIS_SCRIPT_PATH%/*}"
if [ ! -d "$OPENXGUDR_DIR/build" ]; then
mkdir $OPENXGUDR_DIR/build
fi
cd $OPENXGUDR_DIR/build
cmake $OPENXGUDR_DIR/src/
make
......@@ -140,8 +140,8 @@ int ausf_config::load(const std::string &config_file) {
const Setting &nudm_cfg = new_if_cfg[AUSF_CONFIG_STRING_INTERFACE_NUDM];
load_interface(nudm_cfg, nudm);
const Setting &namf_cfg = new_if_cfg[AUSF_CONFIG_STRING_INTERFACE_NAMF];
load_interface(namf_cfg, namf);
// const Setting &namf_cfg = new_if_cfg[AUSF_CONFIG_STRING_INTERFACE_NAMF];
// load_interface(namf_cfg, namf);
// const Setting &udr_addr_pool = nudm_cfg[AUSF_CONFIG_STRING_UDR_INSTANCES_POOL];
// int count = udr_addr_pool.getLength();
......@@ -226,10 +226,10 @@ void ausf_config::display() {
Logger::config().info(" ip ...................: %s", inet_ntoa(nudm.addr4));
Logger::config().info(" port .................: %d", nudm.port);
Logger::config().info("- Namf Networking:");
Logger::config().info(" iface ................: %s", namf.if_name.c_str());
Logger::config().info(" ip ...................: %s", inet_ntoa(namf.addr4));
Logger::config().info(" port .................: %d", namf.port);
// Logger::config().info("- Namf Networking:");
// Logger::config().info(" iface ................: %s", namf.if_name.c_str());
// Logger::config().info(" ip ...................: %s", inet_ntoa(namf.addr4));
// Logger::config().info(" port .................: %d", namf.port);
// Logger::config().info(" HTTP2 port ............: %d", nudm_http2_port);
......
......@@ -53,7 +53,7 @@
#define AUSF_CONFIG_STRING_INTERFACES "INTERFACES"
#define AUSF_CONFIG_STRING_INTERFACE_SBI_AUSF "SBI_AUSF"
#define AUSF_CONFIG_STRING_INTERFACE_NUDM "NUDM"
#define AUSF_CONFIG_STRING_INTERFACE_NAMF "NAMF"
// #define AUSF_CONFIG_STRING_INTERFACE_NAMF "NAMF"
#define AUSF_CONFIG_STRING_INTERFACE_NAME "INTERFACE_NAME"
#define AUSF_CONFIG_STRING_IPV4_ADDRESS "IPV4_ADDRESS"
#define AUSF_CONFIG_STRING_PORT "PORT"
......@@ -152,7 +152,7 @@ class ausf_config {
interface_cfg_t sbi;
interface_cfg_t nudm;
interface_cfg_t namf;
// interface_cfg_t namf;
//unsigned int statistics_interval;
//std::vector<plmn_item_t> plmn_list;
......
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