Commit bfcabe01 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Merge branch 'http2' into 'develop'

Merge Http2

See merge request oai/cn5g/oai-cn5g-smf!27
parents 8196f0aa ac320374
...@@ -17,12 +17,15 @@ SMF_CONF[@SMF_INTERFACE_NAME_FOR_SBI@]='ens3' ...@@ -17,12 +17,15 @@ SMF_CONF[@SMF_INTERFACE_NAME_FOR_SBI@]='ens3'
SMF_CONF[@SMF_INTERFACE_PORT_FOR_SBI@]='80' SMF_CONF[@SMF_INTERFACE_PORT_FOR_SBI@]='80'
SMF_CONF[@SMF_INTERFACE_HTTP2_PORT_FOR_SBI@]='9090' SMF_CONF[@SMF_INTERFACE_HTTP2_PORT_FOR_SBI@]='9090'
SMF_CONF[@SMF_API_VERSION@]='v1'
SMF_CONF[@UDM_IPV4_ADDRESS@]='172.16.1.103' SMF_CONF[@UDM_IPV4_ADDRESS@]='172.16.1.103'
SMF_CONF[@UDM_PORT@]='80' SMF_CONF[@UDM_PORT@]='80'
SMF_CONF[@UDM_API_VERSION@]='v2'
SMF_CONF[@AMF_IPV4_ADDRESS@]='192.168.122.183' SMF_CONF[@AMF_IPV4_ADDRESS@]='192.168.122.183'
SMF_CONF[@AMF_PORT@]='80' SMF_CONF[@AMF_PORT@]='80'
SMF_CONF[@AMF_API_VERSION@]='v1'
SMF_CONF[@UPF_IPV4_ADDRESS@]='192.168.122.151' SMF_CONF[@UPF_IPV4_ADDRESS@]='192.168.122.151'
......
...@@ -30,11 +30,14 @@ class smfConfigGen(): ...@@ -30,11 +30,14 @@ class smfConfigGen():
self.sbi_name = '' self.sbi_name = ''
self.sbi_port = '80' self.sbi_port = '80'
self.sbi_http2_port = '9090' self.sbi_http2_port = '9090'
self.sbi_api_version = 'v1'
self.n4_name = '' self.n4_name = ''
self.amf_ip_addr = '' self.amf_ip_addr = ''
self.amf_port = '80' self.amf_port = '80'
self.amf_api_version = 'v1'
self.udm_ip_addr = '' self.udm_ip_addr = ''
self.udm_port = '80' self.udm_port = '80'
self.udm_api_version = 'v2'
self.upf_ip_addr = '' self.upf_ip_addr = ''
self.apn = 'carrier.com' self.apn = 'carrier.com'
self.dns1_ip = '192.168.18.129' self.dns1_ip = '192.168.18.129'
...@@ -68,17 +71,20 @@ class smfConfigGen(): ...@@ -68,17 +71,20 @@ class smfConfigGen():
smfFile.write('\n') smfFile.write('\n')
smfFile.write('SMF_CONF[@INSTANCE@]=$INSTANCE\n') smfFile.write('SMF_CONF[@INSTANCE@]=$INSTANCE\n')
smfFile.write('SMF_CONF[@PID_DIRECTORY@]=\'/var/run\'\n') smfFile.write('SMF_CONF[@PID_DIRECTORY@]=\'/var/run\'\n')
smfFile.write('SMF_CONF[@SMF_INTERFACE_NAME_FOR_N4@]=\'' + self.n4_name + '\'\n')
smfFile.write('SMF_CONF[@SMF_INTERFACE_NAME_FOR_SBI@]=\'' + self.sbi_name + '\'\n') smfFile.write('SMF_CONF[@SMF_INTERFACE_NAME_FOR_SBI@]=\'' + self.sbi_name + '\'\n')
smfFile.write('SMF_CONF[@SMF_INTERFACE_PORT_FOR_SBI@]=' + self.sbi_port + '\n') smfFile.write('SMF_CONF[@SMF_INTERFACE_PORT_FOR_SBI@]=' + self.sbi_port + '\n')
smfFile.write('SMF_CONF[@SMF_INTERFACE_HTTP2_PORT_FOR_SBI@]=' + self.sbi_http2_port + '\n') smfFile.write('SMF_CONF[@SMF_INTERFACE_HTTP2_PORT_FOR_SBI@]=' + self.sbi_http2_port + '\n')
smfFile.write('SMF_CONF[@SMF_INTERFACE_NAME_FOR_N4@]=\'' + self.n4_name + '\'\n') smfFile.write('SMF_CONF[@SMF_API_VERSION@]=\'' + self.sbi_api_version + '\'\n')
smfFile.write('SMF_CONF[@DEFAULT_DNS_IPV4_ADDRESS@]=$MY_PRIMARY_DNS\n') smfFile.write('SMF_CONF[@DEFAULT_DNS_IPV4_ADDRESS@]=$MY_PRIMARY_DNS\n')
smfFile.write('SMF_CONF[@DEFAULT_DNS_SEC_IPV4_ADDRESS@]=$MY_SECONDARY_DNS\n') smfFile.write('SMF_CONF[@DEFAULT_DNS_SEC_IPV4_ADDRESS@]=$MY_SECONDARY_DNS\n')
#smfFile.write('SMF_CONF[@DEFAULT_APN@]=$MY_APN\n') #smfFile.write('SMF_CONF[@DEFAULT_APN@]=$MY_APN\n')
smfFile.write('SMF_CONF[@AMF_IPV4_ADDRESS@]=\'' + self.amf_ip_addr + '\'\n') smfFile.write('SMF_CONF[@AMF_IPV4_ADDRESS@]=\'' + self.amf_ip_addr + '\'\n')
smfFile.write('SMF_CONF[@AMF_PORT@]=' + self.amf_port + '\n') smfFile.write('SMF_CONF[@AMF_PORT@]=' + self.amf_port + '\n')
smfFile.write('SMF_CONF[@AMF_API_VERSION@]=\'' + self.amf_api_version + '\'\n')
smfFile.write('SMF_CONF[@UDM_IPV4_ADDRESS@]=\'' + self.udm_ip_addr + '\'\n') smfFile.write('SMF_CONF[@UDM_IPV4_ADDRESS@]=\'' + self.udm_ip_addr + '\'\n')
smfFile.write('SMF_CONF[@UDM_PORT@]=' + self.udm_port + '\n') smfFile.write('SMF_CONF[@UDM_PORT@]=' + self.udm_port + '\n')
smfFile.write('SMF_CONF[@UDM_API_VERSION@]=\'' + self.udm_api_version + '\'\n')
smfFile.write('SMF_CONF[@UPF_IPV4_ADDRESS@]=\'' + self.upf_ip_addr + '\'\n') smfFile.write('SMF_CONF[@UPF_IPV4_ADDRESS@]=\'' + self.upf_ip_addr + '\'\n')
smfFile.write('\n') smfFile.write('\n')
smfFile.write('for K in "${!SMF_CONF[@]}"; do \n') smfFile.write('for K in "${!SMF_CONF[@]}"; do \n')
......
...@@ -39,7 +39,7 @@ Based on document **3GPP TS 23.501 v16.0.0 §6.2.2**. ...@@ -39,7 +39,7 @@ Based on document **3GPP TS 23.501 v16.0.0 §6.2.2**.
| **ID** | **Classification** | **Status** | **Comments** | | **ID** | **Classification** | **Status** | **Comments** |
| ------ | ------------------------------------------------------------------- | ------------------ | ------------------------------------------- | | ------ | ------------------------------------------------------------------- | ------------------ | ------------------------------------------- |
| 1 | Session Management (Session Establishment/Modification/Release) | :heavy_check_mark: | | | 1 | Session Management (Session Establishment/Modification/Release) | :heavy_check_mark: | |
| 2 | UE IP address allocation & management​ | :heavy_check_mark: | Only support static ipv4 address allocation | | 2 | UE IP address allocation & management​ | :heavy_check_mark: | IP Address pool is controlled by SMF |
| 3 | DHCPv4 (server and client) and DHCPv6 (server and client) function | :x: | | | 3 | DHCPv4 (server and client) and DHCPv6 (server and client) function | :x: | |
| 4 | Respond to ARP requests and/or IPv6 Neighbour Solicitation requests | :x: | | | 4 | Respond to ARP requests and/or IPv6 Neighbour Solicitation requests | :x: | |
| 5 | Selection of UPF function​ | :heavy_check_mark: | Local configuration in SMF | | 5 | Selection of UPF function​ | :heavy_check_mark: | Local configuration in SMF |
......
...@@ -21,26 +21,26 @@ ...@@ -21,26 +21,26 @@
SMF = SMF =
{ {
INSTANCE = @INSTANCE@; # 0 is the default INSTANCE = @INSTANCE@; # 0 is the default
PID_DIRECTORY = "@PID_DIRECTORY@"; # /var/run is the default PID_DIRECTORY = "@PID_DIRECTORY@"; # /var/run is the default
INTERFACES : INTERFACES :
{ {
N4 : N4 :
{ {
# SMF binded interface for N4 communication (UPF) # SMF binded interface for N4 communication (UPF)
INTERFACE_NAME = "@SMF_INTERFACE_NAME_FOR_N4@"; # STRING, interface name INTERFACE_NAME = "@SMF_INTERFACE_NAME_FOR_N4@"; # YOUR NETWORK CONFIG HERE
IPV4_ADDRESS = "read"; # STRING, CIDR or "read" to let app read interface configured IP address IPV4_ADDRESS = "read";
}; };
SBI : SBI :
{ {
# SMF binded interface for SBI interface (e.g., communication with AMF, UDM) # SMF binded interface for SBI interface (e.g., communication with AMF, UDM)
INTERFACE_NAME = "@SMF_INTERFACE_NAME_FOR_SBI@"; # STRING, interface name INTERFACE_NAME = "@SMF_INTERFACE_NAME_FOR_SBI@"; # YOUR NETWORK CONFIG HERE
#IPV4_ADDRESS = "@SMF_INTERFACE_IPV4_ADDRESS_FOR_SBI@"; # STRING, CIDR or "read" to let app read interface configured IP address IPV4_ADDRESS = "read";
IPV4_ADDRESS = "read"; PORT = @SMF_INTERFACE_PORT_FOR_SBI@; # YOUR NETWORK CONFIG HERE (default: 80)
PORT = @SMF_INTERFACE_PORT_FOR_SBI@; #Normally we don't need this (default port 80) HTTP2_PORT = @SMF_INTERFACE_HTTP2_PORT_FOR_SBI@; # YOUR NETWORK CONFIG HERE
HTTP2_PORT = @SMF_INTERFACE_HTTP2_PORT_FOR_SBI@; API_VERSION = "@SMF_API_VERSION@"; # YOUR SMF API VERSION CONFIG HERE
}; };
}; };
...@@ -48,62 +48,64 @@ SMF = ...@@ -48,62 +48,64 @@ SMF =
# Pool of UE assigned IP addresses # Pool of UE assigned IP addresses
# Do not make IP pools overlap # Do not make IP pools overlap
# first IPv4 address X.Y.Z.1 is reserved for GTP network device on SPGW # first IPv4 address X.Y.Z.1 is reserved for GTP network device on UPF
# Normally no more than 96 pools allowed, but for non OVS GTP solution, only one pool allowed (TODO).
IP_ADDRESS_POOL : IP_ADDRESS_POOL :
{ {
IPV4_LIST = ( IPV4_LIST = (
{RANGE = "12.1.1.2 - 12.1.1.128";}, # STRING, IPv4 RANGE IP_start - IP_end, YOUR NETWORK CONFIG HERE. {RANGE = "12.1.1.2 - 12.1.1.128";}, # STRING, IPv4 RANGE IP_start - IP_end, YOUR NETWORK CONFIG HERE.
{RANGE = "12.1.1.129 - 12.1.1.224";}, # STRING, IPv4 RANGE IP_start - IP_end, YOUR NETWORK CONFIG HERE. {RANGE = "12.1.1.129 - 12.1.1.224";}, # STRING, IPv4 RANGE IP_start - IP_end, YOUR NETWORK CONFIG HERE.
{RANGE = "192.169.0.2 - 192.169.255.253";}, # STRING, IPv4 RANGE IP_start - IP_end, YOUR NETWORK CONFIG HERE. {RANGE = "192.169.0.2 - 192.169.255.253";}, # STRING, IPv4 RANGE IP_start - IP_end, YOUR NETWORK CONFIG HERE.
{RANGE = "192.170.0.2 - 192.170.255.253";}, # STRING, IPv4 RANGE IP_start - IP_end, YOUR NETWORK CONFIG HERE. {RANGE = "192.170.0.2 - 192.170.255.253";}, # STRING, IPv4 RANGE IP_start - IP_end, YOUR NETWORK CONFIG HERE.
{RANGE = "192.171.0.2 - 192.171.255.253";} # STRING, IPv4 RANGE IP_start - IP_end, YOUR NETWORK CONFIG HERE. {RANGE = "192.171.0.2 - 192.171.255.253";} # STRING, IPv4 RANGE IP_start - IP_end, YOUR NETWORK CONFIG HERE.
); );
IPV6_LIST = ( IPV6_LIST = (
{PREFIX = "2001:1:2::/64";}, # STRING, IPv6 prefix, YOUR NETWORK CONFIG HERE. {PREFIX = "2001:1:2::/64";}, # STRING, IPv6 prefix, YOUR NETWORK CONFIG HERE.
{PREFIX = "3001:1:2::/64";}, # STRING, IPv6 prefix, YOUR NETWORK CONFIG HERE. {PREFIX = "3001:1:2::/64";}, # STRING, IPv6 prefix, YOUR NETWORK CONFIG HERE.
{PREFIX = "4001:1:2::/64";} # STRING, IPv6 prefix, YOUR NETWORK CONFIG HERE. {PREFIX = "4001:1:2::/64";} # STRING, IPv6 prefix, YOUR NETWORK CONFIG HERE.
); );
}; };
DNN_LIST = ( DNN_LIST = (
# IPV4_POOL, IPV6_POOL are index in IPV4_LIST, IPV6_LIST, PDN_TYPE choice in {IPv4, IPv6, IPv4v6} # IPV4_POOL, IPV6_POOL are index in IPV4_LIST, IPV6_LIST, PDU_SESSION_TYPE choice in {IPv4, IPv6, IPv4v6}
{DNN_NI = "default"; PDN_TYPE = "IPv4"; IPV4_POOL = 0; IPV6_POOL = -1}, {DNN_NI = "default"; PDU_SESSION_TYPE = "IPv4"; IPV4_POOL = 0; IPV6_POOL = -1},
{DNN_NI = "carrier.com"; PDN_TYPE = "IPv4"; IPV4_POOL = 1; IPV6_POOL = -1}, {DNN_NI = "carrier.com"; PDU_SESSION_TYPE = "IPv4"; IPV4_POOL = 1; IPV6_POOL = -1},
{DNN_NI = "apn2"; PDN_TYPE = "IPv4"; IPV4_POOL = 2; IPV6_POOL = -1}, {DNN_NI = "apn2"; PDU_SESSION_TYPE = "IPv4"; IPV4_POOL = 2; IPV6_POOL = -1},
{DNN_NI = "apn3"; PDN_TYPE = "IPv4"; IPV4_POOL = 3; IPV6_POOL = -1}, {DNN_NI = "apn3"; PDU_SESSION_TYPE = "IPv4"; IPV4_POOL = 3; IPV6_POOL = -1},
{DNN_NI = "apn4"; PDN_TYPE = "IPv4"; IPV4_POOL = 4; IPV6_POOL = -1} {DNN_NI = "apn4"; PDU_SESSION_TYPE = "IPv4"; IPV4_POOL = 4; IPV6_POOL = -1}
); );
# DNS address communicated to UEs # DNS address communicated to UEs
DEFAULT_DNS_IPV4_ADDRESS = "@DEFAULT_DNS_IPV4_ADDRESS@"; # YOUR NETWORK CONFIG HERE DEFAULT_DNS_IPV4_ADDRESS = "@DEFAULT_DNS_IPV4_ADDRESS@"; # YOUR DNS CONFIG HERE
DEFAULT_DNS_SEC_IPV4_ADDRESS = "@DEFAULT_DNS_SEC_IPV4_ADDRESS@"; # YOUR NETWORK CONFIG HERE DEFAULT_DNS_SEC_IPV4_ADDRESS = "@DEFAULT_DNS_SEC_IPV4_ADDRESS@"; # YOUR DNS CONFIG HERE
DEFAULT_DNS_IPV6_ADDRESS = "2001:4860:4860::8888"; # FFU DEFAULT_DNS_IPV6_ADDRESS = "2001:4860:4860::8888"; # YOUR DNS CONFIG HERE
DEFAULT_DNS_SEC_IPV6_ADDRESS = "2001:4860:4860::8844"; # FFU DEFAULT_DNS_SEC_IPV6_ADDRESS = "2001:4860:4860::8844"; # YOUR DNS CONFIG HERE
# Non standard feature, normally should be set to "no", but you may need to set to yes for UE that do not explicitly request a PDN address through NAS signalling # Non standard feature, normally should be set to "no", but you may need to set to yes for UE that do not explicitly request a PDN address through NAS signalling
FORCE_PUSH_PROTOCOL_CONFIGURATION_OPTIONS = "no"; # STRING, {"yes", "no"}. FORCE_PUSH_PROTOCOL_CONFIGURATION_OPTIONS = "no"; # STRING, {"yes", "no"}.
AMF : AMF :
{ {
IPV4_ADDRESS="@AMF_IPV4_ADDRESS@"; IPV4_ADDRESS = "@AMF_IPV4_ADDRESS@"; # YOUR AMF CONFIG HERE
PORT = @AMF_PORT@; #should be removed (default: 80) PORT = @AMF_PORT@; # YOUR AMF CONFIG HERE (default: 80)
API_VERSION = "@AMF_API_VERSION@"; # YOUR SMF API VERSION FOR SBI CONFIG HERE
}; };
UDM : UDM :
{ {
IPV4_ADDRESS="@UDM_IPV4_ADDRESS@"; IPV4_ADDRESS = "@UDM_IPV4_ADDRESS@"; # YOUR UDM CONFIG HERE
PORT = @UDM_PORT@; #should be removed (default 80) PORT = @UDM_PORT@; # YOUR UDM CONFIG HERE (default: 80)
API_VERSION = "@UDM_API_VERSION@"; # YOUR UDM API VERSION FOR SBI CONFIG HERE
}; };
UPF_LIST = ( UPF_LIST = (
{IPV4_ADDRESS="@UPF_IPV4_ADDRESS@" ;} {IPV4_ADDRESS = "@UPF_IPV4_ADDRESS@" ;} # YOUR UPF CONFIG HERE
); );
LOCAL_CONFIGURATION : LOCAL_CONFIGURATION :
{ {
USE_LOCAL_CONFIGURATION = "yes"; USE_LOCAL_CONFIGURATION = "yes";
SESSION_MANAGEMENT_SUBSCRIPTION_LIST = ( SESSION_MANAGEMENT_SUBSCRIPTION_LIST = (
{ NSSAI_SST = 222; NSSAI_SD = "123", DNN = "default", DEFAULT_SESSION_TYPE = "IPV4", DEFAULT_SSC_MODE = 1, { NSSAI_SST = 222, NSSAI_SD = "123", DNN = "default", DEFAULT_SESSION_TYPE = "IPV4", DEFAULT_SSC_MODE = 1,
QOS_PROFILE_5QI = 6, QOS_PROFILE_PRIORITY_LEVEL = 1, QOS_PROFILE_ARP_PRIORITY_LEVEL = 1, QOS_PROFILE_ARP_PREEMPTCAP = "NOT_PREEMPT", QOS_PROFILE_5QI = 6, QOS_PROFILE_PRIORITY_LEVEL = 1, QOS_PROFILE_ARP_PRIORITY_LEVEL = 1, QOS_PROFILE_ARP_PREEMPTCAP = "NOT_PREEMPT",
QOS_PROFILE_ARP_PREEMPTVULN = "NOT_PREEMPTABLE", SESSION_AMBR_UL = "20Mbps", SESSION_AMBR_DL = "22Mbps"}, QOS_PROFILE_ARP_PREEMPTVULN = "NOT_PREEMPTABLE", SESSION_AMBR_UL = "20Mbps", SESSION_AMBR_DL = "22Mbps"},
{ NSSAI_SST = 222; NSSAI_SD = "123", DNN = "carrier.com", DEFAULT_SESSION_TYPE = "IPV4", DEFAULT_SSC_MODE = 1, { NSSAI_SST = 222; NSSAI_SD = "123", DNN = "carrier.com", DEFAULT_SESSION_TYPE = "IPV4", DEFAULT_SSC_MODE = 1,
......
################################################################################
# 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
################################################################################
set(SMF_API_SERVER_DIR "${SRC_TOP_DIR}/api-server") set(SMF_API_SERVER_DIR "${SRC_TOP_DIR}/api-server")
include_directories(${SMF_API_SERVER_DIR}/api) include_directories(${SMF_API_SERVER_DIR}/api)
......
...@@ -12,6 +12,9 @@ ...@@ -12,6 +12,9 @@
#include "IndividualPDUSessionHSMFApi.h" #include "IndividualPDUSessionHSMFApi.h"
#include "Helpers.h" #include "Helpers.h"
#include "smf_config.hpp"
extern smf::smf_config smf_cfg;
namespace oai { namespace oai {
namespace smf_server { namespace smf_server {
...@@ -34,12 +37,12 @@ void IndividualPDUSessionHSMFApi::setupRoutes() { ...@@ -34,12 +37,12 @@ void IndividualPDUSessionHSMFApi::setupRoutes() {
Routes::Post( Routes::Post(
*router, *router,
base + "/pdu-sessions/:pduSessionRef/release", base + smf_cfg.sbi_api_version + "/pdu-sessions/:pduSessionRef/release",
Routes::bind(&IndividualPDUSessionHSMFApi::release_pdu_session_handler, Routes::bind(&IndividualPDUSessionHSMFApi::release_pdu_session_handler,
this)); this));
Routes::Post( Routes::Post(
*router, *router,
base + "/pdu-sessions/:pduSessionRef/modify", base + smf_cfg.sbi_api_version + "/pdu-sessions/:pduSessionRef/modify",
Routes::bind(&IndividualPDUSessionHSMFApi::update_pdu_session_handler, Routes::bind(&IndividualPDUSessionHSMFApi::update_pdu_session_handler,
this)); this));
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#ifndef IndividualPDUSessionHSMFApi_H_ #ifndef IndividualPDUSessionHSMFApi_H_
#define IndividualPDUSessionHSMFApi_H_ #define IndividualPDUSessionHSMFApi_H_
#include <string>
#include <pistache/http.h> #include <pistache/http.h>
#include <pistache/router.h> #include <pistache/router.h>
#include <pistache/http_headers.h> #include <pistache/http_headers.h>
...@@ -28,7 +29,6 @@ ...@@ -28,7 +29,6 @@
#include "HsmfUpdatedData.h" #include "HsmfUpdatedData.h"
#include "ProblemDetails.h" #include "ProblemDetails.h"
#include "ReleaseData.h" #include "ReleaseData.h"
#include <string>
namespace oai { namespace oai {
namespace smf_server { namespace smf_server {
...@@ -43,7 +43,7 @@ class IndividualPDUSessionHSMFApi { ...@@ -43,7 +43,7 @@ class IndividualPDUSessionHSMFApi {
} }
void init(); void init();
const std::string base = "/nsmf-pdusession/v1"; const std::string base = "/nsmf-pdusession/";
private: private:
void setupRoutes(); void setupRoutes();
......
...@@ -44,6 +44,9 @@ ...@@ -44,6 +44,9 @@
#include "logger.hpp" #include "logger.hpp"
#include "Helpers.h" #include "Helpers.h"
#include "mime_parser.hpp" #include "mime_parser.hpp"
#include "smf_config.hpp"
extern smf::smf_config smf_cfg;
namespace oai { namespace oai {
namespace smf_server { namespace smf_server {
...@@ -65,13 +68,13 @@ void IndividualSMContextApi::setupRoutes() { ...@@ -65,13 +68,13 @@ void IndividualSMContextApi::setupRoutes() {
using namespace Pistache::Rest; using namespace Pistache::Rest;
Routes::Post( Routes::Post(
*router, base + "/sm-contexts/:smContextRef/release", *router, base + smf_cfg.sbi_api_version + "/sm-contexts/:smContextRef/release",
Routes::bind(&IndividualSMContextApi::release_sm_context_handler, this)); Routes::bind(&IndividualSMContextApi::release_sm_context_handler, this));
Routes::Post( Routes::Post(
*router, base + "/sm-contexts/:smContextRef/retrieve", *router, base + smf_cfg.sbi_api_version + "/sm-contexts/:smContextRef/retrieve",
Routes::bind(&IndividualSMContextApi::retrieve_sm_context_handler, this)); Routes::bind(&IndividualSMContextApi::retrieve_sm_context_handler, this));
Routes::Post( Routes::Post(
*router, base + "/sm-contexts/:smContextRef/modify", *router, base + smf_cfg.sbi_api_version + "/sm-contexts/:smContextRef/modify",
Routes::bind(&IndividualSMContextApi::update_sm_context_handler, this)); Routes::bind(&IndividualSMContextApi::update_sm_context_handler, this));
// Default handler, called when a route is not found // Default handler, called when a route is not found
......
...@@ -71,7 +71,7 @@ class IndividualSMContextApi { ...@@ -71,7 +71,7 @@ class IndividualSMContextApi {
} }
void init(); void init();
const std::string base = "/nsmf-pdusession/v1"; const std::string base = "/nsmf-pdusession/";
private: private:
void setupRoutes(); void setupRoutes();
......
...@@ -12,6 +12,9 @@ ...@@ -12,6 +12,9 @@
#include "PDUSessionsCollectionApi.h" #include "PDUSessionsCollectionApi.h"
#include "Helpers.h" #include "Helpers.h"
#include "smf_config.hpp"
extern smf::smf_config smf_cfg;
namespace oai { namespace oai {
namespace smf_server { namespace smf_server {
...@@ -33,7 +36,7 @@ void PDUSessionsCollectionApi::setupRoutes() { ...@@ -33,7 +36,7 @@ void PDUSessionsCollectionApi::setupRoutes() {
using namespace Pistache::Rest; using namespace Pistache::Rest;
Routes::Post( Routes::Post(
*router, base + "/pdu-sessions", *router, base + smf_cfg.sbi_api_version + "/pdu-sessions",
Routes::bind(&PDUSessionsCollectionApi::post_pdu_sessions_handler, this)); Routes::bind(&PDUSessionsCollectionApi::post_pdu_sessions_handler, this));
// Default handler, called when a route is not found // Default handler, called when a route is not found
......
...@@ -41,7 +41,7 @@ class PDUSessionsCollectionApi { ...@@ -41,7 +41,7 @@ class PDUSessionsCollectionApi {
} }
void init(); void init();
const std::string base = "/nsmf-pdusession/v1"; const std::string base = "/nsmf-pdusession/";
private: private:
void setupRoutes(); void setupRoutes();
......
...@@ -44,6 +44,9 @@ ...@@ -44,6 +44,9 @@
#include "logger.hpp" #include "logger.hpp"
#include "Helpers.h" #include "Helpers.h"
#include "mime_parser.hpp" #include "mime_parser.hpp"
#include "smf_config.hpp"
extern smf::smf_config smf_cfg;
namespace oai { namespace oai {
namespace smf_server { namespace smf_server {
...@@ -65,7 +68,7 @@ void SMContextsCollectionApi::setupRoutes() { ...@@ -65,7 +68,7 @@ void SMContextsCollectionApi::setupRoutes() {
using namespace Pistache::Rest; using namespace Pistache::Rest;
Routes::Post( Routes::Post(
*router, base + "/sm-contexts", *router, base + smf_cfg.sbi_api_version + "/sm-contexts",
Routes::bind(&SMContextsCollectionApi::post_sm_contexts_handler, this)); Routes::bind(&SMContextsCollectionApi::post_sm_contexts_handler, this));
// Default handler, called when a route is not found // Default handler, called when a route is not found
......
...@@ -62,7 +62,7 @@ class SMContextsCollectionApi { ...@@ -62,7 +62,7 @@ class SMContextsCollectionApi {
} }
void init(); void init();
const std::string base = "/nsmf-pdusession/v1"; const std::string base = "/nsmf-pdusession/";
private: private:
void setupRoutes(); void setupRoutes();
......
...@@ -37,6 +37,9 @@ ...@@ -37,6 +37,9 @@
#include "itti_msg_n11.hpp" #include "itti_msg_n11.hpp"
#include "3gpp_29.502.h" #include "3gpp_29.502.h"
#include <nghttp2/asio_http2_server.h> #include <nghttp2/asio_http2_server.h>
#include "smf_config.hpp"
extern smf::smf_config smf_cfg;
namespace oai { namespace oai {
namespace smf_server { namespace smf_server {
...@@ -75,7 +78,7 @@ void SMContextsCollectionApiImpl::post_sm_contexts( ...@@ -75,7 +78,7 @@ void SMContextsCollectionApiImpl::post_sm_contexts(
//set N1 SM Message //set N1 SM Message
sm_context_req_msg.set_n1_sm_message(n1_sm_msg); sm_context_req_msg.set_n1_sm_message(n1_sm_msg);
//set api root to be used as location header in HTTP response //set api root to be used as location header in HTTP response
sm_context_req_msg.set_api_root(m_address + base + "/sm-contexts"); sm_context_req_msg.set_api_root(m_address + base + smf_cfg.sbi_api_version + "/sm-contexts");
//supi //supi
supi_t supi = { .length = 0 }; supi_t supi = { .length = 0 };
......
...@@ -40,18 +40,21 @@ ...@@ -40,18 +40,21 @@
#include "3gpp_29.502.h" #include "3gpp_29.502.h"
#include "mime_parser.hpp" #include "mime_parser.hpp"
#include "3gpp_29.500.h" #include "3gpp_29.500.h"
#include "smf_config.hpp"
using namespace nghttp2::asio_http2; using namespace nghttp2::asio_http2;
using namespace nghttp2::asio_http2::server; using namespace nghttp2::asio_http2::server;
using namespace oai::smf_server::model; using namespace oai::smf_server::model;
extern smf::smf_config smf_cfg;
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void smf_http2_server::start() { void smf_http2_server::start() {
boost::system::error_code ec; boost::system::error_code ec;
Logger::smf_api_server().info("HTTP2 server started"); Logger::smf_api_server().info("HTTP2 server started");
//Create SM Context Request //Create SM Context Request
server.handle(NSMF_PDU_SESSION_SM_CONTEXT_CREATE_URL, server.handle(NSMF_PDU_SESSION_BASE + smf_cfg.sbi_api_version + NSMF_PDU_SESSION_SM_CONTEXT_CREATE_URL,
[&](const request &request, const response &response) { [&](const request &request, const response &response) {
request.on_data([&](const uint8_t *data, std::size_t len) { request.on_data([&](const uint8_t *data, std::size_t len) {
...@@ -131,7 +134,7 @@ void smf_http2_server::start() { ...@@ -131,7 +134,7 @@ void smf_http2_server::start() {
}); });
//Update SM Context Request //Update SM Context Request
server.handle(NSMF_PDU_SESSION_SM_CONTEXT_UPDATE_URL, server.handle(NSMF_PDU_SESSION_BASE + smf_cfg.sbi_api_version + NSMF_PDU_SESSION_SM_CONTEXT_UPDATE_URL,
[&](const request &request, const response &response) { [&](const request &request, const response &response) {
request.on_data([&](const uint8_t *data, std::size_t len) { request.on_data([&](const uint8_t *data, std::size_t len) {
...@@ -292,7 +295,7 @@ void smf_http2_server::create_sm_contexts_handler( ...@@ -292,7 +295,7 @@ void smf_http2_server::create_sm_contexts_handler(
//set api root to be used as location header in HTTP response //set api root to be used as location header in HTTP response
sm_context_req_msg.set_api_root( sm_context_req_msg.set_api_root(
m_address + ":" + std::to_string(m_port) m_address + ":" + std::to_string(m_port)
+ "/nsmf-pdusession/v1/sm-context"); + "/nsmf-pdusession/" + smf_cfg.sbi_api_version + "/sm-context");
//supi //supi
supi_t supi = { .length = 0 }; supi_t supi = { .length = 0 };
...@@ -389,17 +392,21 @@ void smf_http2_server::create_sm_contexts_handler( ...@@ -389,17 +392,21 @@ void smf_http2_server::create_sm_contexts_handler(
Logger::smf_api_server().debug("Got result for promise ID %d", promise_id); Logger::smf_api_server().debug("Got result for promise ID %d", promise_id);
nlohmann::json json_data = { }; nlohmann::json json_data = { };
sm_context_response.get_json_data(json_data); sm_context_response.get_json_data(json_data);
//Add header
header_map h;
//Location header
if (sm_context_response.get_smf_context_uri().size() > 0) { if (sm_context_response.get_smf_context_uri().size() > 0) {
Logger::smf_api_server().debug( Logger::smf_api_server().debug(
"Add location header %s", "Add location header %s",
sm_context_response.get_smf_context_uri().c_str()); sm_context_response.get_smf_context_uri().c_str());
header_map h;
h.emplace("location", header_value { h.emplace("location", header_value {
sm_context_response.get_smf_context_uri().c_str() }); sm_context_response.get_smf_context_uri().c_str() });
response.write_head(sm_context_response.get_http_code(), h);
} else {
response.write_head(sm_context_response.get_http_code());
} }
//content-type header
h.emplace("content-type", header_value {"application/json"});
response.write_head(sm_context_response.get_http_code(), h);
response.end(json_data.dump().c_str()); response.end(json_data.dump().c_str());
} }
......
...@@ -1425,8 +1425,8 @@ struct fully_qualified_tunnel_endpoint_identifier_s { ...@@ -1425,8 +1425,8 @@ struct fully_qualified_tunnel_endpoint_identifier_s {
std::string s = { }; std::string s = { };
interface_type_t iface_type((interface_type_e) interface_type); interface_type_t iface_type((interface_type_e) interface_type);
if ((v4) || (v6)) { if ((v4) || (v6)) {
s.append("Interface type=").append(iface_type.toString()); //s.append("Interface type=").append(iface_type.toString());
s.append(", TEID=").append(std::to_string(teid_gre_key)); s.append("TEID=").append(std::to_string(teid_gre_key));
if (v4) { if (v4) {
s.append(", IPv4=").append(conv::toString(ipv4_address)); s.append(", IPv4=").append(conv::toString(ipv4_address));
} }
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
# For more information about the OpenAirInterface (OAI) Software Alliance: # For more information about the OpenAirInterface (OAI) Software Alliance:
# contact@openairinterface.org # contact@openairinterface.org
################################################################################ ################################################################################
include_directories(${CMAKE_CURRENT_SOURCE_DIR}) include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/msg) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/msg)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/nas) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/nas)
......
/*
* 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
*/
#ifndef FILE_AMF_SEEN
#define FILE_AMF_SEEN
#endif
...@@ -55,19 +55,19 @@ void Logger::_init(const char *app, const bool log_stdout, ...@@ -55,19 +55,19 @@ void Logger::_init(const char *app, const bool log_stdout,
std::stringstream ss; std::stringstream ss;
ss << "[%Y-%m-%dT%H:%M:%S.%f] [" << app << "] [%n] [%l] %v"; ss << "[%Y-%m-%dT%H:%M:%S.%f] [" << app << "] [%n] [%l] %v";
m_async_cmd = new _Logger("async_c ", m_sinks, ss.str().c_str()); m_async_cmd = new _Logger("async_c", m_sinks, ss.str().c_str());
m_itti = new _Logger("itti ", m_sinks, ss.str().c_str()); m_itti = new _Logger("itti ", m_sinks, ss.str().c_str());
m_smf_app = new _Logger("smf_app ", m_sinks, ss.str().c_str()); m_smf_app = new _Logger("smf_app", m_sinks, ss.str().c_str());
m_system = new _Logger("system ", m_sinks, ss.str().c_str()); m_system = new _Logger("system ", m_sinks, ss.str().c_str());
m_udp = new _Logger("udp ", m_sinks, ss.str().c_str()); m_udp = new _Logger("udp ", m_sinks, ss.str().c_str());
m_pfcp = new _Logger("pfcp ", m_sinks, ss.str().c_str()); m_pfcp = new _Logger("pfcp ", m_sinks, ss.str().c_str());
m_pfcp_switch = new _Logger("pfcp_sw ", m_sinks, ss.str().c_str()); m_pfcp_switch = new _Logger("pfcp_sw ", m_sinks, ss.str().c_str());
m_smf_n1 = new _Logger("smf_n1 ", m_sinks, ss.str().c_str()); m_smf_n1 = new _Logger("smf_n1 ", m_sinks, ss.str().c_str());
m_smf_n2 = new _Logger("smf_n2 ", m_sinks, ss.str().c_str()); m_smf_n2 = new _Logger("smf_n2 ", m_sinks, ss.str().c_str());
m_smf_n4 = new _Logger("smf_n4 ", m_sinks, ss.str().c_str()); m_smf_n4 = new _Logger("smf_n4 ", m_sinks, ss.str().c_str());
m_smf_n10 = new _Logger("smf_n10 ", m_sinks, ss.str().c_str()); m_smf_n10 = new _Logger("smf_n10", m_sinks, ss.str().c_str());
m_smf_n11 = new _Logger("smf_n11 ", m_sinks, ss.str().c_str()); m_smf_n11 = new _Logger("smf_n11", m_sinks, ss.str().c_str());
m_smf_api_server = new _Logger("smf_api_server ", m_sinks, ss.str().c_str()); m_smf_api_server = new _Logger("sbi_srv", m_sinks, ss.str().c_str());
} }
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
......
...@@ -179,14 +179,18 @@ typedef struct qos_profile_s { ...@@ -179,14 +179,18 @@ typedef struct qos_profile_s {
} qos_profile_t; } qos_profile_t;
//URL, N1, N2 (may get from configuration file) //URL, N1, N2 (may get from configuration file)
#define NAMF_COMMUNICATION_N1N2_MESSAGE_TRANSFER_URL "/namf-comm/v1/ue-contexts/{}/n1-n2-messages" //context id #define NAMF_COMMUNICATION_BASE "/namf-comm/"
#define NUDM_SDM_GET_SM_DATA_URL "/nudm-sdm/v2/{}/sm-data" //ue Id #define NAMF_COMMUNICATION_N1N2_MESSAGE_TRANSFER_URL "/ue-contexts/{}/n1-n2-messages" //context id
#define NUDM_SDM_BASE "/nudm-sdm/"
#define NUDM_SDM_GET_SM_DATA_URL "/{}/sm-data" //ue Id
#define N1_SM_CONTENT_ID "n1SmMsg" #define N1_SM_CONTENT_ID "n1SmMsg"
#define N1N2_MESSAGE_CLASS "SM" #define N1N2_MESSAGE_CLASS "SM"
#define N2_SM_CONTENT_ID "n2msg" #define N2_SM_CONTENT_ID "n2msg"
#define NSMF_CALLBACK_N1N2_MESSAGE_TRANSFER_FAILURE "/nsmf-pdusession/v1/callback/N1N2MsgTxfrFailureNotification/{}" //UE Id #define NSMF_PDU_SESSION_BASE "/nsmf-pdusession/"
#define NSMF_PDU_SESSION_SM_CONTEXT_CREATE_URL "/nsmf-pdusession/v1/sm-contexts" #define NSMF_CALLBACK_N1N2_MESSAGE_TRANSFER_FAILURE "/callback/N1N2MsgTxfrFailureNotification/{}" //UE Id
#define NSMF_PDU_SESSION_SM_CONTEXT_UPDATE_URL "/nsmf-pdusession/v1/sm-contexts/" #define NSMF_PDU_SESSION_SM_CONTEXT_CREATE_URL "/sm-contexts"
#define NSMF_PDU_SESSION_SM_CONTEXT_UPDATE_URL "/sm-contexts/"
//for CURL //for CURL
#define AMF_CURL_TIMEOUT_MS 100L #define AMF_CURL_TIMEOUT_MS 100L
......
...@@ -74,194 +74,6 @@ ...@@ -74,194 +74,6 @@
#define APPEND_3GPPNETWORK append("3gppnetwork.org") #define APPEND_3GPPNETWORK append("3gppnetwork.org")
namespace EPC { namespace EPC {
enum AppServiceEnum {
x_3gpp_unknown,
x_3gpp_pgw,
x_3gpp_sgw,
x_3gpp_ggsn,
x_3gpp_sgsn,
x_3gpp_mme,
x_3gpp_msc
};
enum AppProtocolEnum {
x_unknown,
x_gn,
x_gp,
x_nq,
x_nqprime,
x_s10,
x_s11,
x_s12,
x_s1_mme,
x_s1_u,
x_s16,
x_s2a_gtp,
x_s2a_mipv4,
x_s2a_pmip,
x_s2b_gtp,
x_s2b_pmip,
x_s2c_dsmip,
x_s3,
x_s4,
x_s5_gtp,
x_s5_pmip,
x_s6a,
x_s8_gtp,
x_s8_pmip,
x_sv
};
enum PGWAppProtocolEnum {
pgw_x_gn,
pgw_x_gp,
pgw_x_s2a_gtp,
pgw_x_s2a_mipv4,
pgw_x_s2a_pmip,
pgw_x_s2b_gtp,
pgw_x_s2b_pmip,
pgw_x_s2c_dsmip,
pgw_x_s5_gtp,
pgw_x_s5_pmip,
pgw_x_s8_gtp,
pgw_x_s8_pmip
};
enum SGWAppProtocolEnum {
sgw_x_s11,
sgw_x_s12,
sgw_x_s1_u,
sgw_x_s2a_pmip,
sgw_x_s2b_pmip,
sgw_x_s4,
sgw_x_s5_gtp,
sgw_x_s5_pmip,
sgw_x_s8_gtp,
sgw_x_s8_pmip
};
enum GGSNAppProtocolEnum {
ggsn_x_gn,
ggsn_x_gp
};
enum SGSNAppProtocolEnum {
sgsn_x_gn,
sgsn_x_gp,
sgsn_x_nqprime,
sgsn_x_s16,
sgsn_x_s3,
sgsn_x_s4,
sgsn_x_sv
};
enum MMEAppProtocolEnum {
mme_x_gn,
mme_x_gp,
mme_x_nq,
mme_x_s10,
mme_x_s11,
mme_x_s1_mme,
mme_x_s3,
mme_x_s6a,
mme_x_sv
};
enum MSCAppProtocolEnum {
msc_x_sv
};
enum DiameterApplicationEnum {
dia_app_unknown,
/*
+------------------+----------------------------+
| Tag | Diameter Application |
+------------------+----------------------------+
| aaa+ap1 | NASREQ [RFC3588] |
| aaa+ap2 | Mobile IPv4 [RFC4004] |
| aaa+ap3 | Base Accounting [RFC3588] |
| aaa+ap4 | Credit Control [RFC4006] |
| aaa+ap5 | EAP [RFC4072] |
| aaa+ap6 | SIP [RFC4740] |
| aaa+ap7 | Mobile IPv6 IKE [RFC5778] |
| aaa+ap8 | Mobile IPv6 Auth [RFC5778] |
| aaa+ap9 | QoS [RFC5866] |
| aaa+ap4294967295 | Relay [RFC3588] |
+------------------+----------------------------+
*/
dia_app_nasreq,
dia_app_mobile_ipv4,
dia_app_base_accounting,
dia_app_credit_control,
dia_app_eap,
dia_app_sip6,
dia_app_mobile_ipv6_ike,
dia_app_mobile_ipv6_auth,
dia_app_qos,
dia_app_relay,
/*
+----------------+----------------------+
| Tag | Diameter Application |
+----------------+----------------------+
| aaa+ap16777250 | 3GPP STa [TS29.273] |
| aaa+ap16777251 | 3GPP S6a [TS29.272] |
| aaa+ap16777264 | 3GPP SWm [TS29.273] |
| aaa+ap16777267 | 3GPP S9 [TS29.215] |
+----------------+----------------------+
*/
dia_app_3gpp_sta,
dia_app_3gpp_s6a,
dia_app_3gpp_swm,
dia_app_3gpp_s9,
/*
+----------------+--------------------------------------------------+
| Tag | Diameter Application |
+----------------+--------------------------------------------------+
| aaa+ap16777281 | WiMAX Network Access Authentication and |
| | Authorization Diameter Application (WNAAADA) |
| | [WiMAX-BASE] |
| aaa+ap16777282 | WiMAX Network Accounting Diameter Application |
| | (WNADA) [WiMAX-BASE] |
| aaa+ap16777283 | WiMAX MIP4 Diameter Application (WM4DA) |
| | [WiMAX-BASE] |
| aaa+ap16777284 | WiMAX MIP6 Diameter Application (WM6DA) |
| | [WiMAX-BASE] |
| aaa+ap16777285 | WiMAX DHCP Diameter Application (WDDA) |
| | [WiMAX-BASE] |
| aaa+ap16777286 | WiMAX Location Authentication Authorization |
| | Diameter Application (WLAADA) [WiMAX-LBS] |
| aaa+ap16777287 | WiMAX Policy and Charging Control R3 Policies |
| | Diameter Application (WiMAX PCC-R3-P) |
| | [WiMAX-PCC] |
| aaa+ap16777288 | WiMAX Policy and Charging Control R3 Offline |
| | Charging Diameter Application (WiMAX PCC-R3-OFC) |
| | [WiMAX-PCC] |
| aaa+ap16777289 | WiMAX Policy and Charging Control R3 Offline |
| | Charging Prime Diameter Application (WiMAX |
| | PCC-R3-OFC-PRIME) [WiMAX-PCC] |
| aaa+ap16777290 | WiMAX Policy and Charging Control R3 Online |
| | Charging Diameter Application (WiMAX PCC-R3-OC) |
| | [WiMAX-PCC] |
+----------------+--------------------------------------------------+
*/
dia_app_wimax_wnaaada,
dia_app_wimax_wnada,
dia_app_wimax_wm4da,
dia_app_wimax_wm6da,
dia_app_wimax_wdda,
dia_app_wimax_wlaada,
dia_app_wimax_pcc_r3_p,
dia_app_wimax_pcc_r3_ofc,
dia_app_wimax_pcc_r3_ofc_prime,
dia_app_wimax_pcc_r3_oc
};
enum DiameterProtocolEnum {
dia_protocol_unknown,
dia_protocol_tcp,
dia_protocol_sctp,
dia_protocol_tls_tcp
};
class Utility { class Utility {
public: public:
...@@ -343,27 +155,7 @@ class Utility { ...@@ -343,27 +155,7 @@ class Utility {
static std::string dnn(const char *apnoi, const unsigned char *plmnid); static std::string dnn(const char *apnoi, const unsigned char *plmnid);
static std::string dnn_label(const std::string &dnn); static std::string dnn_label(const std::string &dnn);
static AppServiceEnum getAppService(const std::string &s);
static AppProtocolEnum getAppProtocol(const std::string &p);
static const char* getAppService(AppServiceEnum s);
static const char* getAppProtocol(AppProtocolEnum proto);
static AppProtocolEnum getAppProtocol(PGWAppProtocolEnum proto);
static AppProtocolEnum getAppProtocol(SGWAppProtocolEnum proto);
static AppProtocolEnum getAppProtocol(GGSNAppProtocolEnum proto);
static AppProtocolEnum getAppProtocol(SGSNAppProtocolEnum proto);
static AppProtocolEnum getAppProtocol(MMEAppProtocolEnum proto);
static AppProtocolEnum getAppProtocol(MSCAppProtocolEnum proto);
static std::string diameter_fqdn(const char *mnc, const char *mcc);
static std::string diameter_fqdn(const unsigned char *plmnid);
static uint32_t getDiameterApplication(DiameterApplicationEnum app);
static const char* getDiameterProtocol(DiameterProtocolEnum protocol);
static std::string getDiameterService(DiameterApplicationEnum app,
DiameterProtocolEnum protocol);
private: private:
Utility() { Utility() {
......
################################################################################
# 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
################################################################################
set(NAS_DIR "${SRC_TOP_DIR}/nas") set(NAS_DIR "${SRC_TOP_DIR}/nas")
include_directories(${NAS_DIR}) include_directories(${NAS_DIR})
include_directories(${NAS_DIR}/ies) include_directories(${NAS_DIR}/ies)
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
# For more information about the OpenAirInterface (OAI) Software Alliance: # For more information about the OpenAirInterface (OAI) Software Alliance:
# contact@openairinterface.org # contact@openairinterface.org
################################################################################ ################################################################################
include_directories(${SRC_TOP_DIR}/common) include_directories(${SRC_TOP_DIR}/common)
include_directories(${SRC_TOP_DIR}/itti) include_directories(${SRC_TOP_DIR}/itti)
include_directories(${SRC_TOP_DIR}/common/msg) include_directories(${SRC_TOP_DIR}/common/msg)
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
# For more information about the OpenAirInterface (OAI) Software Alliance: # For more information about the OpenAirInterface (OAI) Software Alliance:
# contact@openairinterface.org # contact@openairinterface.org
################################################################################ ################################################################################
include_directories(${SRC_TOP_DIR}/common) include_directories(${SRC_TOP_DIR}/common)
include_directories(${SRC_TOP_DIR}/common/msg) include_directories(${SRC_TOP_DIR}/common/msg)
include_directories(${SRC_TOP_DIR}/common/utils) include_directories(${SRC_TOP_DIR}/common/utils)
......
...@@ -65,7 +65,6 @@ extern "C" { ...@@ -65,7 +65,6 @@ extern "C" {
using namespace smf; using namespace smf;
#define SYSTEM_CMD_MAX_STR_SIZE 512
extern util::async_shell_cmd *async_shell_cmd_inst; extern util::async_shell_cmd *async_shell_cmd_inst;
extern smf_app *smf_app_inst; extern smf_app *smf_app_inst;
extern smf_config smf_cfg; extern smf_config smf_cfg;
...@@ -559,8 +558,9 @@ void smf_app::handle_pdu_session_create_sm_context_request( ...@@ -559,8 +558,9 @@ void smf_app::handle_pdu_session_create_sm_context_request(
int decoder_rc = smf_n1_inst.decode_n1_sm_container(decoded_nas_msg, int decoder_rc = smf_n1_inst.decode_n1_sm_container(decoded_nas_msg,
n1_sm_msg); n1_sm_msg);
//Failed to decode, send reply to AMF with PDU Session Establishment Reject
if (decoder_rc != RETURNok) { if (decoder_rc != RETURNok) {
//error, send reply to AMF with PDU Session Establishment Reject
Logger::smf_app().warn("N1 SM container cannot be decoded correctly!"); Logger::smf_app().warn("N1 SM container cannot be decoded correctly!");
problem_details.setCause( problem_details.setCause(
pdu_session_application_error_e2str[PDU_SESSION_APPLICATION_ERROR_N1_SM_ERROR]); pdu_session_application_error_e2str[PDU_SESSION_APPLICATION_ERROR_N1_SM_ERROR]);
...@@ -599,7 +599,6 @@ void smf_app::handle_pdu_session_create_sm_context_request( ...@@ -599,7 +599,6 @@ void smf_app::handle_pdu_session_create_sm_context_request(
//PDU session type (Optional) //PDU session type (Optional)
if (decoded_nas_msg.plain.sm.header.message_type if (decoded_nas_msg.plain.sm.header.message_type
== PDU_SESSION_ESTABLISHMENT_REQUEST) { == PDU_SESSION_ESTABLISHMENT_REQUEST) {
//TODO: Disable this command temporarily since can't get this info from tester
Logger::smf_app().debug( Logger::smf_app().debug(
"PDU Session Type %d", "PDU Session Type %d",
decoded_nas_msg.plain.sm.pdu_session_establishment_request decoded_nas_msg.plain.sm.pdu_session_establishment_request
...@@ -608,7 +607,6 @@ void smf_app::handle_pdu_session_create_sm_context_request( ...@@ -608,7 +607,6 @@ void smf_app::handle_pdu_session_create_sm_context_request(
.pdu_session_establishment_request._pdusessiontype .pdu_session_establishment_request._pdusessiontype
.pdu_session_type_value; .pdu_session_type_value;
} }
smreq->req.set_pdu_session_type(pdu_session_type.pdu_session_type); smreq->req.set_pdu_session_type(pdu_session_type.pdu_session_type);
//TODO: Support IPv4 only for now //TODO: Support IPv4 only for now
......
...@@ -77,7 +77,6 @@ typedef enum { ...@@ -77,7 +77,6 @@ typedef enum {
} pdu_session_procedure_t; } pdu_session_procedure_t;
class smf_config; class smf_config;
// same namespace
class smf_context_ref { class smf_context_ref {
public: public:
......
This diff is collapsed.
...@@ -54,6 +54,8 @@ ...@@ -54,6 +54,8 @@
#define SMF_CONFIG_STRING_INTERFACE_N4 "N4" #define SMF_CONFIG_STRING_INTERFACE_N4 "N4"
#define SMF_CONFIG_STRING_INTERFACE_SBI "SBI" #define SMF_CONFIG_STRING_INTERFACE_SBI "SBI"
#define SMF_CONFIG_STRING_SBI_HTTP2_PORT "HTTP2_PORT" #define SMF_CONFIG_STRING_SBI_HTTP2_PORT "HTTP2_PORT"
#define SMF_CONFIG_STRING_API_VERSION "API_VERSION"
#define SMF_CONFIG_STRING_NAS_FORCE_PUSH_PCO "FORCE_PUSH_PROTOCOL_CONFIGURATION_OPTIONS" #define SMF_CONFIG_STRING_NAS_FORCE_PUSH_PCO "FORCE_PUSH_PROTOCOL_CONFIGURATION_OPTIONS"
...@@ -73,19 +75,15 @@ ...@@ -73,19 +75,15 @@
#define SMF_CONFIG_STRING_DEFAULT_DNS_IPV6_ADDRESS "DEFAULT_DNS_IPV6_ADDRESS" #define SMF_CONFIG_STRING_DEFAULT_DNS_IPV6_ADDRESS "DEFAULT_DNS_IPV6_ADDRESS"
#define SMF_CONFIG_STRING_DEFAULT_DNS_SEC_IPV6_ADDRESS "DEFAULT_DNS_SEC_IPV6_ADDRESS" #define SMF_CONFIG_STRING_DEFAULT_DNS_SEC_IPV6_ADDRESS "DEFAULT_DNS_SEC_IPV6_ADDRESS"
#define SMF_CONFIG_STRING_UE_MTU "UE_MTU" #define SMF_CONFIG_STRING_UE_MTU "UE_MTU"
#define SMF_CONFIG_STRING_GTPV1U_REALIZATION "GTPV1U_REALIZATION"
#define SMF_CONFIG_STRING_INTERFACE_DISABLED "none" #define SMF_CONFIG_STRING_INTERFACE_DISABLED "none"
#define SMF_CONFIG_STRING_DNN_LIST "DNN_LIST" #define SMF_CONFIG_STRING_DNN_LIST "DNN_LIST"
#define SMF_CONFIG_STRING_DNN_NI "DNN_NI" #define SMF_CONFIG_STRING_DNN_NI "DNN_NI"
#define SMF_CONFIG_STRING_PDN_TYPE "PDN_TYPE" #define SMF_CONFIG_STRING_PDN_TYPE "PDU_SESSION_TYPE"
#define SMF_CONFIG_STRING_IPV4_POOL "IPV4_POOL" #define SMF_CONFIG_STRING_IPV4_POOL "IPV4_POOL"
#define SMF_CONFIG_STRING_IPV6_POOL "IPV6_POOL" #define SMF_CONFIG_STRING_IPV6_POOL "IPV6_POOL"
#define SMF_CONFIG_STRING_AUTOMATIC_PUSH_DEDICATED_BEARER_PCC_RULE "AUTOMATIC_PUSH_DEDICATED_BEARER_PCC_RULE"
#define SMF_CONFIG_STRING_DEFAULT_BEARER_STATIC_PCC_RULE "DEFAULT_BEARER_STATIC_PCC_RULE"
#define SMF_CONFIG_STRING_PUSH_STATIC_PCC_RULES "PUSH_STATIC_PCC_RULES"
#define SMF_ABORT_ON_ERROR true #define SMF_ABORT_ON_ERROR true
#define SMF_WARN_ON_ERROR false #define SMF_WARN_ON_ERROR false
...@@ -165,6 +163,7 @@ class smf_config { ...@@ -165,6 +163,7 @@ class smf_config {
interface_cfg_t n4; interface_cfg_t n4;
interface_cfg_t sbi; interface_cfg_t sbi;
unsigned int sbi_http2_port; unsigned int sbi_http2_port;
std::string sbi_api_version;
itti_cfg_t itti; itti_cfg_t itti;
struct in_addr default_dnsv4; struct in_addr default_dnsv4;
...@@ -202,11 +201,13 @@ class smf_config { ...@@ -202,11 +201,13 @@ class smf_config {
struct { struct {
struct in_addr ipv4_addr; struct in_addr ipv4_addr;
unsigned int port; unsigned int port;
std::string api_version;
} amf_addr; } amf_addr;
struct { struct {
struct in_addr ipv4_addr; struct in_addr ipv4_addr;
unsigned int port; unsigned int port;
std::string api_version;
} udm_addr; } udm_addr;
std::vector<pfcp::node_id_t> upfs; std::vector<pfcp::node_id_t> upfs;
...@@ -269,8 +270,10 @@ class smf_config { ...@@ -269,8 +270,10 @@ class smf_config {
amf_addr.ipv4_addr.s_addr = INADDR_ANY; amf_addr.ipv4_addr.s_addr = INADDR_ANY;
amf_addr.port = 80; amf_addr.port = 80;
amf_addr.ipv4_addr.s_addr = INADDR_ANY; amf_addr.api_version = "v1";
udm_addr.ipv4_addr.s_addr = INADDR_ANY;
udm_addr.port = 80; udm_addr.port = 80;
udm_addr.api_version = "v1";
local_configuration = false; local_configuration = false;
num_session_management_subscription = 0; num_session_management_subscription = 0;
...@@ -278,7 +281,8 @@ class smf_config { ...@@ -278,7 +281,8 @@ class smf_config {
for (int i = 0; i < SMF_NUM_SESSION_MANAGEMENT_SUBSCRIPTION_MAX; i++) { for (int i = 0; i < SMF_NUM_SESSION_MANAGEMENT_SUBSCRIPTION_MAX; i++) {
session_management_subscription[i] = {}; session_management_subscription[i] = {};
} }
sbi_http2_port = 0; sbi_http2_port = 8080;
sbi_api_version = "v1";
} }
; ;
......
...@@ -63,7 +63,6 @@ using namespace smf; ...@@ -63,7 +63,6 @@ using namespace smf;
extern itti_mw *itti_inst; extern itti_mw *itti_inst;
extern smf::smf_app *smf_app_inst; extern smf::smf_app *smf_app_inst;
extern smf::smf_n11 *smf_n11_inst;
extern smf::smf_config smf_cfg; extern smf::smf_config smf_cfg;
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
...@@ -710,6 +709,7 @@ void smf_context::handle_itti_msg( ...@@ -710,6 +709,7 @@ void smf_context::handle_itti_msg(
std::string url = std::string( std::string url = std::string(
inet_ntoa(*((struct in_addr*) &smf_cfg.amf_addr.ipv4_addr))) inet_ntoa(*((struct in_addr*) &smf_cfg.amf_addr.ipv4_addr)))
+ ":" + std::to_string(smf_cfg.amf_addr.port) + ":" + std::to_string(smf_cfg.amf_addr.port)
+ NAMF_COMMUNICATION_BASE + smf_cfg.amf_addr.api_version
+ fmt::format(NAMF_COMMUNICATION_N1N2_MESSAGE_TRANSFER_URL, + fmt::format(NAMF_COMMUNICATION_N1N2_MESSAGE_TRANSFER_URL,
supi_str.c_str()); supi_str.c_str());
session_report_msg.set_amf_url(url); session_report_msg.set_amf_url(url);
...@@ -1182,7 +1182,6 @@ void smf_context::handle_pdu_session_create_sm_context_request( ...@@ -1182,7 +1182,6 @@ void smf_context::handle_pdu_session_create_sm_context_request(
std::shared_ptr<itti_n11_create_sm_context_response>(sm_context_resp); std::shared_ptr<itti_n11_create_sm_context_response>(sm_context_resp);
sm_context_resp->http_version = smreq->http_version; sm_context_resp->http_version = smreq->http_version;
sm_context_resp->res.set_http_code( sm_context_resp->res.set_http_code(
http_status_code_e::HTTP_STATUS_CODE_200_OK); //default status code http_status_code_e::HTTP_STATUS_CODE_200_OK); //default status code
sm_context_resp->res.set_supi(supi); sm_context_resp->res.set_supi(supi);
...@@ -1246,6 +1245,7 @@ void smf_context::handle_pdu_session_create_sm_context_request( ...@@ -1246,6 +1245,7 @@ void smf_context::handle_pdu_session_create_sm_context_request(
//For the moment, SMF uses the local policy (e.g., default QoS rule) //For the moment, SMF uses the local policy (e.g., default QoS rule)
//address allocation based on PDN type //address allocation based on PDN type
//IP Address pool is controlled by SMF
//Step 6. paa //Step 6. paa
bool set_paa = false; bool set_paa = false;
paa_t paa = { }; paa_t paa = { };
...@@ -1267,7 +1267,7 @@ void smf_context::handle_pdu_session_create_sm_context_request( ...@@ -1267,7 +1267,7 @@ void smf_context::handle_pdu_session_create_sm_context_request(
//smf_app_inst->process_pco_request(extended_protocol_options, pco_resp, pco_ids); //smf_app_inst->process_pco_request(extended_protocol_options, pco_resp, pco_ids);
//Step 7. Address allocation based on PDN type //Step 7. Address allocation based on PDN type
Logger::smf_app().debug("UE address allocation"); Logger::smf_app().debug("UE Address Allocation");
switch (sp->pdn_type.pdn_type) { switch (sp->pdn_type.pdn_type) {
case PDN_TYPE_E_IPV4: { case PDN_TYPE_E_IPV4: {
if (!pco_ids.ci_ipv4_address_allocation_via_dhcpv4) { //use SM NAS signalling if (!pco_ids.ci_ipv4_address_allocation_via_dhcpv4) { //use SM NAS signalling
...@@ -1294,6 +1294,7 @@ void smf_context::handle_pdu_session_create_sm_context_request( ...@@ -1294,6 +1294,7 @@ void smf_context::handle_pdu_session_create_sm_context_request(
if (success) { if (success) {
set_paa = true; set_paa = true;
} else { } else {
//TODO:
//cause: ALL_DYNAMIC_ADDRESSES_ARE_OCCUPIED; //check for 5G? //cause: ALL_DYNAMIC_ADDRESSES_ARE_OCCUPIED; //check for 5G?
} }
// Static IP address allocation // Static IP address allocation
...@@ -1354,11 +1355,7 @@ void smf_context::handle_pdu_session_create_sm_context_request( ...@@ -1354,11 +1355,7 @@ void smf_context::handle_pdu_session_create_sm_context_request(
sm_context_resp_pending->res.set_paa(paa); //will be used when procedure is running sm_context_resp_pending->res.set_paa(paa); //will be used when procedure is running
sp->set(paa); sp->set(paa);
} else { } else {
// Valid PAA sent in CSR ? //TODO:
//bool paa_res = csreq->gtp_ies.get(paa);
//if ((paa_res) && ( paa.is_ip_assigned())) {
// sp->set(paa);
//}
} }
//Step 5 (4.3.2.2.1 TS 23.502): Trigger SMF APP to send response to SMF-HTTP-API-SERVER //Step 5 (4.3.2.2.1 TS 23.502): Trigger SMF APP to send response to SMF-HTTP-API-SERVER
...@@ -1462,6 +1459,7 @@ void smf_context::handle_pdu_session_create_sm_context_request( ...@@ -1462,6 +1459,7 @@ void smf_context::handle_pdu_session_create_sm_context_request(
std::string url = std::string( std::string url = std::string(
inet_ntoa(*((struct in_addr*) &smf_cfg.amf_addr.ipv4_addr))) + ":" inet_ntoa(*((struct in_addr*) &smf_cfg.amf_addr.ipv4_addr))) + ":"
+ std::to_string(smf_cfg.amf_addr.port) + std::to_string(smf_cfg.amf_addr.port)
+ NAMF_COMMUNICATION_BASE + smf_cfg.amf_addr.api_version
+ fmt::format(NAMF_COMMUNICATION_N1N2_MESSAGE_TRANSFER_URL, + fmt::format(NAMF_COMMUNICATION_N1N2_MESSAGE_TRANSFER_URL,
supi_str.c_str()); supi_str.c_str());
sm_context_resp_pending->res.set_amf_url(url); sm_context_resp_pending->res.set_amf_url(url);
...@@ -2651,6 +2649,7 @@ void smf_context::handle_pdu_session_modification_network_requested( ...@@ -2651,6 +2649,7 @@ void smf_context::handle_pdu_session_modification_network_requested(
std::string url = std::string( std::string url = std::string(
inet_ntoa(*((struct in_addr*) &smf_cfg.amf_addr.ipv4_addr))) + ":" inet_ntoa(*((struct in_addr*) &smf_cfg.amf_addr.ipv4_addr))) + ":"
+ std::to_string(smf_cfg.amf_addr.port) + std::to_string(smf_cfg.amf_addr.port)
+ NAMF_COMMUNICATION_BASE + smf_cfg.amf_addr.api_version
+ fmt::format(NAMF_COMMUNICATION_N1N2_MESSAGE_TRANSFER_URL, + fmt::format(NAMF_COMMUNICATION_N1N2_MESSAGE_TRANSFER_URL,
supi_str.c_str()); supi_str.c_str());
itti_msg->msg.set_amf_url(url); itti_msg->msg.set_amf_url(url);
......
This diff is collapsed.
...@@ -117,6 +117,7 @@ bool smf_n10::get_sm_data( ...@@ -117,6 +117,7 @@ bool smf_n10::get_sm_data(
std::string url = std::string( std::string url = std::string(
inet_ntoa(*((struct in_addr*) &smf_cfg.udm_addr.ipv4_addr))) + ":" inet_ntoa(*((struct in_addr*) &smf_cfg.udm_addr.ipv4_addr))) + ":"
+ std::to_string(smf_cfg.udm_addr.port) + std::to_string(smf_cfg.udm_addr.port)
+ NUDM_SDM_BASE + smf_cfg.udm_addr.api_version
+ fmt::format(NUDM_SDM_GET_SM_DATA_URL, std::to_string(supi)); + fmt::format(NUDM_SDM_GET_SM_DATA_URL, std::to_string(supi));
Logger::smf_n10().debug("UDM's URL: %s ", url.c_str()); Logger::smf_n10().debug("UDM's URL: %s ", url.c_str());
......
...@@ -415,17 +415,17 @@ void smf_n4::handle_receive_association_setup_response( ...@@ -415,17 +415,17 @@ void smf_n4::handle_receive_association_setup_response(
if (!error) { if (!error) {
if (not msg_ies_container.node_id.first) { if (not msg_ies_container.node_id.first) {
// Should be detected by lower layers // Should be detected by lower layers
Logger::smf_app().warn( Logger::smf_n4().warn(
"Received N4 ASSOCIATION SETUP RESPONSE without node id IE!, ignore message"); "Received N4 ASSOCIATION SETUP RESPONSE without node id IE!, ignore message");
return; return;
} }
if (not msg_ies_container.recovery_time_stamp.first) { if (not msg_ies_container.recovery_time_stamp.first) {
// Should be detected by lower layers // Should be detected by lower layers
Logger::smf_app().warn( Logger::smf_n4().warn(
"Received N4 ASSOCIATION SETUP RESPONSE without recovery time stamp IE!, ignore message"); "Received N4 ASSOCIATION SETUP RESPONSE without recovery time stamp IE!, ignore message");
return; return;
} }
Logger::smf_app().info("Received N4 ASSOCIATION SETUP RESPONSE"); Logger::smf_n4().info("Received N4 ASSOCIATION SETUP RESPONSE");
bool restore_n4_sessions = false; bool restore_n4_sessions = false;
if (msg_ies_container.up_function_features.first) { if (msg_ies_container.up_function_features.first) {
pfcp_associations::get_instance().add_association( pfcp_associations::get_instance().add_association(
......
...@@ -55,7 +55,6 @@ using namespace std; ...@@ -55,7 +55,6 @@ using namespace std;
extern itti_mw *itti_inst; extern itti_mw *itti_inst;
extern smf::smf_app *smf_app_inst; extern smf::smf_app *smf_app_inst;
extern smf::smf_config smf_cfg; extern smf::smf_config smf_cfg;
extern smf::smf_n11 *smf_n11_inst;
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
int n4_session_restore_procedure::run() { int n4_session_restore_procedure::run() {
...@@ -426,6 +425,7 @@ void session_create_sm_context_procedure::handle_itti_msg( ...@@ -426,6 +425,7 @@ void session_create_sm_context_procedure::handle_itti_msg(
std::string url = std::string( std::string url = std::string(
inet_ntoa(*((struct in_addr*) &smf_cfg.amf_addr.ipv4_addr))) + ":" inet_ntoa(*((struct in_addr*) &smf_cfg.amf_addr.ipv4_addr))) + ":"
+ std::to_string(smf_cfg.amf_addr.port) + std::to_string(smf_cfg.amf_addr.port)
+ NAMF_COMMUNICATION_BASE + smf_cfg.amf_addr.api_version
+ fmt::format(NAMF_COMMUNICATION_N1N2_MESSAGE_TRANSFER_URL, + fmt::format(NAMF_COMMUNICATION_N1N2_MESSAGE_TRANSFER_URL,
supi_str.c_str()); supi_str.c_str());
n11_triggered_pending->res.set_amf_url(url); n11_triggered_pending->res.set_amf_url(url);
...@@ -460,6 +460,7 @@ void session_create_sm_context_procedure::handle_itti_msg( ...@@ -460,6 +460,7 @@ void session_create_sm_context_procedure::handle_itti_msg(
std::string callback_uri = std::string( std::string callback_uri = std::string(
inet_ntoa(*((struct in_addr*) &smf_cfg.amf_addr.ipv4_addr))) + ":" inet_ntoa(*((struct in_addr*) &smf_cfg.amf_addr.ipv4_addr))) + ":"
+ std::to_string(smf_cfg.amf_addr.port) + std::to_string(smf_cfg.amf_addr.port)
+ NSMF_PDU_SESSION_BASE + smf_cfg.sbi_api_version
+ fmt::format(NSMF_CALLBACK_N1N2_MESSAGE_TRANSFER_FAILURE, + fmt::format(NSMF_CALLBACK_N1N2_MESSAGE_TRANSFER_FAILURE,
supi_str.c_str()); supi_str.c_str());
json_data["n1n2FailureTxfNotifURI"] = callback_uri.c_str(); json_data["n1n2FailureTxfNotifURI"] = callback_uri.c_str();
......
################################################################################
# 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
################################################################################
cmake_minimum_required (VERSION 3.2) cmake_minimum_required (VERSION 3.2)
project(amf-client) project(amf-client)
......
/*
* 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
*/
/*! \file amf_client.cpp
\author Tien-Thinh NGUYEN
\company Eurecom
\date 2019
\email: tien-thinh.nguyen@eurecom.fr
*/
#include <curl/curl.h> #include <curl/curl.h>
#include <nlohmann/json.hpp> #include <nlohmann/json.hpp>
#include <iostream> #include <iostream>
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
# For more information about the OpenAirInterface (OAI) Software Alliance: # For more information about the OpenAirInterface (OAI) Software Alliance:
# contact@openairinterface.org # contact@openairinterface.org
################################################################################ ################################################################################
include_directories(${SRC_TOP_DIR}/common) include_directories(${SRC_TOP_DIR}/common)
include_directories(${SRC_TOP_DIR}/common/msg) include_directories(${SRC_TOP_DIR}/common/msg)
include_directories(${SRC_TOP_DIR}/common/utils) include_directories(${SRC_TOP_DIR}/common/utils)
......
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