Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-AMF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-AMF
Commits
34f40dbb
Commit
34f40dbb
authored
Aug 02, 2022
by
Tien Thinh NGUYEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code cleanup for PDU Session handling
parent
3bec2681
Changes
21
Show whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
196 additions
and
271 deletions
+196
-271
src/amf-app/amf_config.cpp
src/amf-app/amf_config.cpp
+100
-54
src/amf-app/amf_config.hpp
src/amf-app/amf_config.hpp
+26
-10
src/amf-app/amf_n1.cpp
src/amf-app/amf_n1.cpp
+1
-8
src/amf-app/amf_n1.hpp
src/amf-app/amf_n1.hpp
+0
-7
src/amf-app/amf_n2.cpp
src/amf-app/amf_n2.cpp
+1
-8
src/amf-app/amf_n2.hpp
src/amf-app/amf_n2.hpp
+0
-7
src/amf-app/amf_sbi.cpp
src/amf-app/amf_sbi.cpp
+39
-87
src/amf-app/amf_sbi.hpp
src/amf-app/amf_sbi.hpp
+1
-9
src/common/3gpp_29.502.h
src/common/3gpp_29.502.h
+4
-0
src/contexts/gNB_context.hpp
src/contexts/gNB_context.hpp
+0
-7
src/contexts/nas_context.cpp
src/contexts/nas_context.cpp
+0
-7
src/contexts/nas_context.hpp
src/contexts/nas_context.hpp
+2
-9
src/contexts/nas_security_context.hpp
src/contexts/nas_security_context.hpp
+0
-7
src/contexts/pdu_session_context.cpp
src/contexts/pdu_session_context.cpp
+8
-13
src/contexts/pdu_session_context.hpp
src/contexts/pdu_session_context.hpp
+10
-13
src/contexts/security_def.hpp
src/contexts/security_def.hpp
+0
-7
src/contexts/ue_context.hpp
src/contexts/ue_context.hpp
+1
-9
src/contexts/ue_ngap_context.hpp
src/contexts/ue_ngap_context.hpp
+0
-7
src/itti/itti_msg.hpp
src/itti/itti_msg.hpp
+1
-1
src/itti/msgs/itti_msg_n2.hpp
src/itti/msgs/itti_msg_n2.hpp
+1
-1
src/utils/fqdn.cpp
src/utils/fqdn.cpp
+1
-0
No files found.
src/amf-app/amf_config.cpp
View file @
34f40dbb
...
@@ -19,13 +19,6 @@
...
@@ -19,13 +19,6 @@
* contact@openairinterface.org
* contact@openairinterface.org
*/
*/
/*! \file amf_config.cpp
\brief
\author Keliang DU (BUPT), Tien-Thinh NGUYEN (EURECOM)
\date 2020
\email: contact@openairinterface.org
*/
#include "amf_config.hpp"
#include "amf_config.hpp"
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string.hpp>
...
@@ -35,6 +28,7 @@
...
@@ -35,6 +28,7 @@
#include <libconfig.h++>
#include <libconfig.h++>
#include "3gpp_ts24501.hpp"
#include "3gpp_ts24501.hpp"
#include "3gpp_29.502.h"
#include "amf_app.hpp"
#include "amf_app.hpp"
#include "if.hpp"
#include "if.hpp"
#include "logger.hpp"
#include "logger.hpp"
...
@@ -81,7 +75,7 @@ amf_config::amf_config() {
...
@@ -81,7 +75,7 @@ amf_config::amf_config() {
guami_list
=
{};
guami_list
=
{};
relative_amf_capacity
=
0
;
relative_amf_capacity
=
0
;
plmn_list
=
{};
plmn_list
=
{};
auth_
conf
auth_para
=
{};
auth_
para
=
{};
nas_cfg
=
{};
nas_cfg
=
{};
smf_pool
=
{};
smf_pool
=
{};
support_features
.
enable_nf_registration
=
false
;
support_features
.
enable_nf_registration
=
false
;
...
@@ -361,6 +355,7 @@ int amf_config::load(const std::string& config_file) {
...
@@ -361,6 +355,7 @@ int amf_config::load(const std::string& config_file) {
throw
(
AMF_CONFIG_STRING_SBI_HTTP2_PORT
"failed"
);
throw
(
AMF_CONFIG_STRING_SBI_HTTP2_PORT
"failed"
);
}
}
if
(
!
support_features
.
enable_smf_selection
)
{
// SMF
// SMF
const
Setting
&
smf_addr_pool
=
const
Setting
&
smf_addr_pool
=
sbi_cfg
[
AMF_CONFIG_STRING_SMF_INSTANCES_POOL
];
sbi_cfg
[
AMF_CONFIG_STRING_SMF_INSTANCES_POOL
];
...
@@ -377,7 +372,8 @@ int amf_config::load(const std::string& config_file) {
...
@@ -377,7 +372,8 @@ int amf_config::load(const std::string& config_file) {
// Store FQDN
// Store FQDN
smf_addr_item
.
lookupValue
(
AMF_CONFIG_STRING_FQDN_DNS
,
smf_inst
.
fqdn
);
smf_addr_item
.
lookupValue
(
AMF_CONFIG_STRING_FQDN_DNS
,
smf_inst
.
fqdn
);
smf_addr_item
.
lookupValue
(
AMF_CONFIG_STRING_SMF_INSTANCE_ID
,
smf_inst
.
id
);
smf_addr_item
.
lookupValue
(
AMF_CONFIG_STRING_SMF_INSTANCE_ID
,
smf_inst
.
id
);
if
(
!
support_features
.
use_fqdn_dns
)
{
if
(
!
support_features
.
use_fqdn_dns
)
{
smf_addr_item
.
lookupValue
(
smf_addr_item
.
lookupValue
(
AMF_CONFIG_STRING_IPV4_ADDRESS
,
smf_inst
.
ipv4
);
AMF_CONFIG_STRING_IPV4_ADDRESS
,
smf_inst
.
ipv4
);
...
@@ -386,7 +382,8 @@ int amf_config::load(const std::string& config_file) {
...
@@ -386,7 +382,8 @@ int amf_config::load(const std::string& config_file) {
"BAD IPv4 ADDRESS FORMAT FOR SMF !"
);
"BAD IPv4 ADDRESS FORMAT FOR SMF !"
);
if
(
!
(
smf_addr_item
.
lookupValue
(
if
(
!
(
smf_addr_item
.
lookupValue
(
AMF_CONFIG_STRING_SMF_INSTANCE_PORT
,
smf_inst
.
port
)))
{
AMF_CONFIG_STRING_SMF_INSTANCE_PORT
,
smf_inst
.
port
)))
{
Logger
::
amf_app
().
error
(
AMF_CONFIG_STRING_SMF_INSTANCE_PORT
"failed"
);
Logger
::
amf_app
().
error
(
AMF_CONFIG_STRING_SMF_INSTANCE_PORT
"failed"
);
throw
(
AMF_CONFIG_STRING_SMF_INSTANCE_PORT
"failed"
);
throw
(
AMF_CONFIG_STRING_SMF_INSTANCE_PORT
"failed"
);
}
}
if
(
!
(
smf_addr_item
.
lookupValue
(
if
(
!
(
smf_addr_item
.
lookupValue
(
...
@@ -414,6 +411,7 @@ int amf_config::load(const std::string& config_file) {
...
@@ -414,6 +411,7 @@ int amf_config::load(const std::string& config_file) {
smf_inst
.
selected
=
false
;
smf_inst
.
selected
=
false
;
smf_pool
.
push_back
(
smf_inst
);
smf_pool
.
push_back
(
smf_inst
);
}
}
}
// NRF
// NRF
const
Setting
&
nrf_cfg
=
new_if_cfg
[
AMF_CONFIG_STRING_NRF
];
const
Setting
&
nrf_cfg
=
new_if_cfg
[
AMF_CONFIG_STRING_NRF
];
...
@@ -960,6 +958,54 @@ std::string amf_config::get_ausf_ue_authentications_uri() {
...
@@ -960,6 +958,54 @@ std::string amf_config::get_ausf_ue_authentications_uri() {
ausf_addr
.
api_version
+
"/ue-authentications"
;
ausf_addr
.
api_version
+
"/ue-authentications"
;
}
}
//------------------------------------------------------------------------------
bool
amf_config
::
get_smf_pdu_session_context_uri
(
const
std
::
shared_ptr
<
pdu_session_context
>&
psc
,
std
::
string
&
smf_uri
)
{
if
(
!
psc
)
return
false
;
if
(
!
psc
.
get
()
->
smf_info
.
info_available
)
{
Logger
::
amf_sbi
().
error
(
"No SMF is available for this PDU session"
);
return
false
;
}
std
::
string
smf_addr
=
{};
std
::
string
smf_port
=
{};
std
::
string
smf_ip_addr
=
{};
smf_addr
=
psc
->
smf_info
.
addr
;
smf_port
=
psc
->
smf_info
.
port
;
// remove http port from the URI if existed
std
::
size_t
found_port
=
smf_addr
.
find
(
":"
);
if
(
found_port
!=
std
::
string
::
npos
)
smf_ip_addr
=
smf_addr
.
substr
(
0
,
found_port
-
1
);
else
smf_ip_addr
=
smf_addr
;
std
::
size_t
found
=
psc
.
get
()
->
smf_info
.
context_location
.
find
(
smf_ip_addr
);
if
(
found
!=
std
::
string
::
npos
)
smf_uri
=
psc
.
get
()
->
smf_info
.
context_location
;
else
smf_uri
=
smf_addr
+
":"
+
smf_port
+
psc
.
get
()
->
smf_info
.
context_location
;
return
true
;
}
//------------------------------------------------------------------------------
std
::
string
amf_config
::
get_smf_pdu_session_base_uri
(
const
std
::
string
&
smf_addr
,
const
std
::
string
&
smf_port
,
const
std
::
string
&
smf_api_version
)
{
// Remove http port from the URI if existed
std
::
string
smf_ip_addr
=
{};
std
::
size_t
found_port
=
smf_addr
.
find
(
":"
);
if
(
found_port
!=
std
::
string
::
npos
)
smf_ip_addr
=
smf_addr
.
substr
(
0
,
found_port
);
else
smf_ip_addr
=
smf_addr
;
return
smf_ip_addr
+
":"
+
smf_port
+
"/nsmf-pdusession/"
+
smf_api_version
+
NSMF_PDU_SESSION_CREATE
;
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
amf_config
::
to_json
(
nlohmann
::
json
&
json_data
)
const
{
void
amf_config
::
to_json
(
nlohmann
::
json
&
json_data
)
const
{
json_data
[
"instance"
]
=
instance
;
json_data
[
"instance"
]
=
instance
;
...
...
src/amf-app/amf_config.hpp
View file @
34f40dbb
...
@@ -19,13 +19,6 @@
...
@@ -19,13 +19,6 @@
* contact@openairinterface.org
* contact@openairinterface.org
*/
*/
/*! \file amf_config.hpp
\brief
\author Keliang DU, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#ifndef _AMF_CONFIG_H_
#ifndef _AMF_CONFIG_H_
#define _AMF_CONFIG_H_
#define _AMF_CONFIG_H_
...
@@ -45,6 +38,7 @@
...
@@ -45,6 +38,7 @@
#include "string.hpp"
#include "string.hpp"
#include "thread_sched.hpp"
#include "thread_sched.hpp"
#include "common_defs.h"
#include "common_defs.h"
#include "pdu_session_context.hpp"
#define AMF_CONFIG_STRING_AMF_CONFIG "AMF"
#define AMF_CONFIG_STRING_AMF_CONFIG "AMF"
#define AMF_CONFIG_STRING_PID_DIRECTORY "PID_DIRECTORY"
#define AMF_CONFIG_STRING_PID_DIRECTORY "PID_DIRECTORY"
...
@@ -124,7 +118,7 @@ using namespace libconfig;
...
@@ -124,7 +118,7 @@ using namespace libconfig;
namespace
config
{
namespace
config
{
typedef
struct
{
typedef
struct
auth_conf_s
{
std
::
string
mysql_server
;
std
::
string
mysql_server
;
std
::
string
mysql_user
;
std
::
string
mysql_user
;
std
::
string
mysql_pass
;
std
::
string
mysql_pass
;
...
@@ -148,7 +142,7 @@ typedef struct {
...
@@ -148,7 +142,7 @@ typedef struct {
this
->
random
=
json_data
[
"random"
].
get
<
std
::
string
>
();
this
->
random
=
json_data
[
"random"
].
get
<
std
::
string
>
();
}
}
}
auth_conf
;
}
auth_conf
_t
;
typedef
struct
interface_cfg_s
{
typedef
struct
interface_cfg_s
{
std
::
string
if_name
;
std
::
string
if_name
;
...
@@ -457,6 +451,28 @@ class amf_config {
...
@@ -457,6 +451,28 @@ class amf_config {
*/
*/
std
::
string
get_ausf_ue_authentications_uri
();
std
::
string
get_ausf_ue_authentications_uri
();
/*
* Get the URI of SMF PDU Session Service
* @param [const std::shared_ptr<pdu_session_context>&] psc: pointer to the
* PDU Session Context
* @param [std::string&] smf_uri: based URI of Nsmf_PDUSession Services
* @return true if can get the URI. otherwise false
*/
bool
get_smf_pdu_session_context_uri
(
const
std
::
shared_ptr
<
pdu_session_context
>&
psc
,
std
::
string
&
smf_uri
);
/*
* Get the URI of SMF Services
* @param [const std::string&] smf_addr: SMF's Addr in String representation
* @param [const std::string&] smf_port: SMF's port in String representation
* @param [const std::string&] smf_api_version: SMF's API version in String
* representation
* @return URI in string format
*/
std
::
string
get_smf_pdu_session_base_uri
(
const
std
::
string
&
smf_addr
,
const
std
::
string
&
smf_port
,
const
std
::
string
&
smf_api_version
);
/*
/*
* Display the AMF configuration parameters
* Display the AMF configuration parameters
* @param void
* @param void
...
@@ -493,7 +509,7 @@ class amf_config {
...
@@ -493,7 +509,7 @@ class amf_config {
unsigned
int
relative_amf_capacity
;
unsigned
int
relative_amf_capacity
;
std
::
vector
<
plmn_item_t
>
plmn_list
;
std
::
vector
<
plmn_item_t
>
plmn_list
;
std
::
string
is_emergency_support
;
std
::
string
is_emergency_support
;
auth_conf
auth_para
;
auth_conf
_t
auth_para
;
nas_conf_t
nas_cfg
;
nas_conf_t
nas_cfg
;
std
::
vector
<
smf_inst_t
>
smf_pool
;
std
::
vector
<
smf_inst_t
>
smf_pool
;
...
...
src/amf-app/amf_n1.cpp
View file @
34f40dbb
...
@@ -19,13 +19,6 @@
...
@@ -19,13 +19,6 @@
* contact@openairinterface.org
* contact@openairinterface.org
*/
*/
/*! \file amf_n1.cpp
\brief
\author Keliang DU (BUPT), Tien-Thinh NGUYEN (EURECOM)
\date 2020
\email: contact@openairinterface.org
*/
#include "amf_n1.hpp"
#include "amf_n1.hpp"
#include <curl/curl.h>
#include <curl/curl.h>
...
@@ -2998,7 +2991,7 @@ void amf_n1::ue_initiate_de_registration_handle(
...
@@ -2998,7 +2991,7 @@ void amf_n1::ue_initiate_de_registration_handle(
itti_msg
->
supi
=
uc
->
supi
;
itti_msg
->
supi
=
uc
->
supi
;
itti_msg
->
pdu_session_id
=
session
->
pdu_session_id
;
itti_msg
->
pdu_session_id
=
session
->
pdu_session_id
;
itti_msg
->
promise_id
=
promise_id
;
itti_msg
->
promise_id
=
promise_id
;
itti_msg
->
context_location
=
session
->
smf_context_location
;
itti_msg
->
context_location
=
session
->
smf_
info
.
context_location
;
int
ret
=
itti_inst
->
send_msg
(
itti_msg
);
int
ret
=
itti_inst
->
send_msg
(
itti_msg
);
if
(
0
!=
ret
)
{
if
(
0
!=
ret
)
{
...
...
src/amf-app/amf_n1.hpp
View file @
34f40dbb
...
@@ -19,13 +19,6 @@
...
@@ -19,13 +19,6 @@
* contact@openairinterface.org
* contact@openairinterface.org
*/
*/
/*! \file amf_n1.hpp
\brief
\author Keliang DU (BUPT), Tien-Thinh NGUYEN (EURECOM)
\date 2020
\email: contact@openairinterface.org
*/
#ifndef _AMF_N1_H_
#ifndef _AMF_N1_H_
#define _AMF_N1_H_
#define _AMF_N1_H_
...
...
src/amf-app/amf_n2.cpp
View file @
34f40dbb
...
@@ -19,13 +19,6 @@
...
@@ -19,13 +19,6 @@
* contact@openairinterface.org
* contact@openairinterface.org
*/
*/
/*! \file amf_n2.cpp
\brief
\author Keliang DU (BUPT), Tien-Thinh NGUYEN (EURECOM)
\date 2020
\email: contact@openairinterface.org
*/
#include "amf_n2.hpp"
#include "amf_n2.hpp"
#include "DefaultPagingDRX.hpp"
#include "DefaultPagingDRX.hpp"
...
@@ -182,7 +175,7 @@ void amf_n2_task(void* args_p) {
...
@@ -182,7 +175,7 @@ void amf_n2_task(void* args_p) {
dynamic_cast
<
itti_ue_radio_capability_indication
*>
(
msg
);
dynamic_cast
<
itti_ue_radio_capability_indication
*>
(
msg
);
amf_n2_inst
->
handle_itti_message
(
ref
(
*
m
));
amf_n2_inst
->
handle_itti_message
(
ref
(
*
m
));
}
break
;
}
break
;
case
HANDOVER_REQUIRED
:
{
case
HANDOVER_REQUIRED
_MSG
:
{
Logger
::
amf_n2
().
info
(
"Received HANDOVER_REQUIRED message, handling"
);
Logger
::
amf_n2
().
info
(
"Received HANDOVER_REQUIRED message, handling"
);
itti_handover_required
*
m
=
dynamic_cast
<
itti_handover_required
*>
(
msg
);
itti_handover_required
*
m
=
dynamic_cast
<
itti_handover_required
*>
(
msg
);
if
(
!
amf_n2_inst
->
handle_itti_message
(
ref
(
*
m
)))
if
(
!
amf_n2_inst
->
handle_itti_message
(
ref
(
*
m
)))
...
...
src/amf-app/amf_n2.hpp
View file @
34f40dbb
...
@@ -19,13 +19,6 @@
...
@@ -19,13 +19,6 @@
* contact@openairinterface.org
* contact@openairinterface.org
*/
*/
/*! \file amf_n2.hpp
\brief
\author Keliang DU (BUPT), Tien-Thinh NGUYEN (EURECOM)
\date 2020
\email: contact@openairinterface.org
*/
#ifndef _AMF_N2_H_
#ifndef _AMF_N2_H_
#define _AMF_N2_H_
#define _AMF_N2_H_
...
...
src/amf-app/amf_sbi.cpp
View file @
34f40dbb
...
@@ -19,13 +19,6 @@
...
@@ -19,13 +19,6 @@
* contact@openairinterface.org
* contact@openairinterface.org
*/
*/
/*! \file amf_sbi.cpp
\brief
\author Keliang DU (BUPT), Tien-Thinh NGUYEN (EURECOM)
\date 2020
\email: contact@openairinterface.org
*/
#include "amf_sbi.hpp"
#include "amf_sbi.hpp"
#include <curl/curl.h>
#include <curl/curl.h>
...
@@ -33,6 +26,7 @@
...
@@ -33,6 +26,7 @@
#include "3gpp_ts24501.hpp"
#include "3gpp_ts24501.hpp"
#include "3gpp_29.500.h"
#include "3gpp_29.500.h"
#include "3gpp_29.502.h"
#include "amf.hpp"
#include "amf.hpp"
#include "amf_app.hpp"
#include "amf_app.hpp"
...
@@ -238,34 +232,12 @@ void amf_sbi::handle_itti_message(
...
@@ -238,34 +232,12 @@ void amf_sbi::handle_itti_message(
return
;
return
;
}
}
std
::
string
smf_addr
=
{};
std
::
string
smf_port
=
{};
std
::
string
smf_api_version
=
{};
if
(
!
psc
.
get
()
->
smf_available
)
{
Logger
::
amf_sbi
().
error
(
"No SMF is available for this PDU session"
);
}
else
{
smf_addr
=
psc
->
smf_addr
;
smf_port
=
psc
->
smf_port
;
smf_api_version
=
psc
->
smf_api_version
;
}
std
::
string
smf_ip_addr
=
{};
std
::
string
remote_uri
=
{};
std
::
string
remote_uri
=
{};
if
(
!
amf_cfg
.
get_smf_pdu_session_context_uri
(
psc
,
remote_uri
))
{
// remove http port from the URI if existed
Logger
::
amf_sbi
().
error
(
"Could not find Nsmf_PDUSession URI"
);
std
::
size_t
found_port
=
smf_addr
.
find
(
":"
);
return
;
if
(
found_port
!=
std
::
string
::
npos
)
}
smf_ip_addr
=
smf_addr
.
substr
(
0
,
found_port
-
1
);
remote_uri
+=
NSMF_PDU_SESSION_MODIFY
;
else
smf_ip_addr
=
smf_addr
;
std
::
size_t
found
=
psc
.
get
()
->
smf_context_location
.
find
(
smf_ip_addr
);
if
(
found
!=
std
::
string
::
npos
)
remote_uri
=
psc
.
get
()
->
smf_context_location
+
"/modify"
;
else
remote_uri
=
smf_addr
+
":"
+
smf_port
+
psc
.
get
()
->
smf_context_location
+
"/modify"
;
Logger
::
amf_sbi
().
debug
(
"SMF URI: %s"
,
remote_uri
.
c_str
());
Logger
::
amf_sbi
().
debug
(
"SMF URI: %s"
,
remote_uri
.
c_str
());
...
@@ -377,7 +349,7 @@ void amf_sbi::handle_itti_message(itti_nsmf_pdusession_create_sm_context& smf) {
...
@@ -377,7 +349,7 @@ void amf_sbi::handle_itti_message(itti_nsmf_pdusession_create_sm_context& smf) {
std
::
string
smf_addr
=
{};
std
::
string
smf_addr
=
{};
std
::
string
smf_api_version
=
{};
std
::
string
smf_api_version
=
{};
std
::
string
smf_port
=
"80"
;
// Set to default port number
std
::
string
smf_port
=
"80"
;
// Set to default port number
if
(
!
psc
.
get
()
->
smf_available
)
{
if
(
!
psc
.
get
()
->
smf_
info
.
info_
available
)
{
if
(
amf_cfg
.
support_features
.
enable_smf_selection
)
{
if
(
amf_cfg
.
support_features
.
enable_smf_selection
)
{
// Get NRF URI
// Get NRF URI
std
::
string
nrf_uri
=
{};
std
::
string
nrf_uri
=
{};
...
@@ -403,13 +375,14 @@ void amf_sbi::handle_itti_message(itti_nsmf_pdusession_create_sm_context& smf) {
...
@@ -403,13 +375,14 @@ void amf_sbi::handle_itti_message(itti_nsmf_pdusession_create_sm_context& smf) {
}
}
// store smf info to be used with this PDU session
// store smf info to be used with this PDU session
psc
.
get
()
->
smf_available
=
true
;
psc
.
get
()
->
smf_
info
.
info_
available
=
true
;
psc
->
smf_
addr
=
smf_addr
;
psc
->
smf_
info
.
addr
=
smf_addr
;
psc
->
smf_
port
=
smf_port
;
psc
->
smf_
info
.
port
=
smf_port
;
psc
->
smf_
api_version
=
smf_api_version
;
psc
->
smf_
info
.
api_version
=
smf_api_version
;
}
else
{
}
else
{
smf_addr
=
psc
->
smf_addr
;
smf_addr
=
psc
->
smf_info
.
addr
;
smf_api_version
=
psc
->
smf_api_version
;
smf_api_version
=
psc
->
smf_info
.
api_version
;
std
::
string
smf_port
=
psc
->
smf_info
.
port
;
}
}
switch
(
smf
.
req_type
&
0x07
)
{
switch
(
smf
.
req_type
&
0x07
)
{
...
@@ -432,8 +405,7 @@ void amf_sbi::handle_itti_message(itti_nsmf_pdusession_create_sm_context& smf) {
...
@@ -432,8 +405,7 @@ void amf_sbi::handle_itti_message(itti_nsmf_pdusession_create_sm_context& smf) {
default:
{
default:
{
// send Nsmf_PDUSession_UpdateSM_Context to SMF e.g., for PDU Session
// send Nsmf_PDUSession_UpdateSM_Context to SMF e.g., for PDU Session
// release request
// release request
send_pdu_session_update_sm_context_request
(
send_pdu_session_update_sm_context_request
(
supi
,
psc
,
smf
.
sm_msg
,
dnn
);
supi
,
psc
,
smf_addr
,
smf
.
sm_msg
,
dnn
);
}
}
}
}
}
}
...
@@ -441,26 +413,19 @@ void amf_sbi::handle_itti_message(itti_nsmf_pdusession_create_sm_context& smf) {
...
@@ -441,26 +413,19 @@ void amf_sbi::handle_itti_message(itti_nsmf_pdusession_create_sm_context& smf) {
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
amf_sbi
::
send_pdu_session_update_sm_context_request
(
void
amf_sbi
::
send_pdu_session_update_sm_context_request
(
const
std
::
string
&
supi
,
std
::
shared_ptr
<
pdu_session_context
>&
psc
,
const
std
::
string
&
supi
,
std
::
shared_ptr
<
pdu_session_context
>&
psc
,
const
std
::
string
&
smf_addr
,
bstring
sm_msg
,
const
std
::
string
&
dnn
)
{
bstring
sm_msg
,
const
std
::
string
&
dnn
)
{
Logger
::
amf_sbi
().
debug
(
Logger
::
amf_sbi
().
debug
(
"Send PDU Session Update SM Context Request to SMF (SUPI %s, PDU Session "
"Send PDU Session Update SM Context Request to SMF (SUPI %s, PDU Session "
"ID %d, %s)"
,
"ID %d, %s)"
,
supi
.
c_str
(),
psc
.
get
()
->
pdu_session_id
,
smf_addr
.
c_str
());
supi
.
c_str
(),
psc
.
get
()
->
pdu_session_id
,
psc
.
get
()
->
smf_info
.
addr
.
c_str
());
std
::
string
smf_ip_addr
=
{};
std
::
string
remote_uri
=
{};
std
::
string
remote_uri
=
{};
// remove http port from the URI if existed
if
(
!
amf_cfg
.
get_smf_pdu_session_context_uri
(
psc
,
remote_uri
))
{
std
::
size_t
found_port
=
smf_addr
.
find
(
":"
);
Logger
::
amf_sbi
().
error
(
"Could not find Nsmf_PDUSession URI"
);
if
(
found_port
!=
std
::
string
::
npos
)
return
;
smf_ip_addr
=
smf_addr
.
substr
(
0
,
found_port
-
1
);
}
else
remote_uri
+=
NSMF_PDU_SESSION_MODIFY
;
smf_ip_addr
=
smf_addr
;
std
::
size_t
found
=
psc
.
get
()
->
smf_context_location
.
find
(
smf_ip_addr
);
if
(
found
!=
std
::
string
::
npos
)
remote_uri
=
psc
.
get
()
->
smf_context_location
+
"/modify"
;
else
remote_uri
=
smf_addr
+
psc
.
get
()
->
smf_context_location
+
"/modify"
;
Logger
::
amf_sbi
().
debug
(
"SMF URI: %s"
,
remote_uri
.
c_str
());
Logger
::
amf_sbi
().
debug
(
"SMF URI: %s"
,
remote_uri
.
c_str
());
...
@@ -489,21 +454,16 @@ void amf_sbi::handle_pdu_session_initial_request(
...
@@ -489,21 +454,16 @@ void amf_sbi::handle_pdu_session_initial_request(
"Handle PDU Session Establishment Request (SUPI %s, PDU Session ID %d)"
,
"Handle PDU Session Establishment Request (SUPI %s, PDU Session ID %d)"
,
supi
.
c_str
(),
psc
.
get
()
->
pdu_session_id
);
supi
.
c_str
(),
psc
.
get
()
->
pdu_session_id
);
// remove http port from the URI if existed
// Provide http2 port if enabled
std
::
string
smf_ip_addr
=
{};
std
::
size_t
found_port
=
smf_addr
.
find
(
":"
);
if
(
found_port
!=
std
::
string
::
npos
)
smf_ip_addr
=
smf_addr
.
substr
(
0
,
found_port
);
else
smf_ip_addr
=
smf_addr
;
// provide http2 port if enabled
std
::
string
amf_port
=
to_string
(
amf_cfg
.
sbi
.
port
);
std
::
string
amf_port
=
to_string
(
amf_cfg
.
sbi
.
port
);
if
(
amf_cfg
.
support_features
.
use_http2
)
if
(
amf_cfg
.
support_features
.
use_http2
)
amf_port
=
to_string
(
amf_cfg
.
sbi_http2_port
);
amf_port
=
to_string
(
amf_cfg
.
sbi_http2_port
);
// TODO: Remove hardcoded values
std
::
string
remote_uri
=
std
::
string
remote_uri
=
smf_ip_addr
+
":"
+
smf_port
+
"/nsmf-pdusession/"
+
amf_cfg
.
get_smf_pdu_session_base_uri
(
smf_addr
,
smf_port
,
smf_api_version
);
smf_api_version
+
"/sm-contexts"
;
Logger
::
amf_sbi
().
debug
(
"SMF URI: %s"
,
remote_uri
.
c_str
());
nlohmann
::
json
pdu_session_establishment_request
;
nlohmann
::
json
pdu_session_establishment_request
;
pdu_session_establishment_request
[
"supi"
]
=
supi
.
c_str
();
pdu_session_establishment_request
[
"supi"
]
=
supi
.
c_str
();
pdu_session_establishment_request
[
"pei"
]
=
"imei-200000000000001"
;
pdu_session_establishment_request
[
"pei"
]
=
"imei-200000000000001"
;
...
@@ -559,18 +519,14 @@ void amf_sbi::handle_itti_message(
...
@@ -559,18 +519,14 @@ void amf_sbi::handle_itti_message(
return
;
return
;
}
}
string
smf_addr
=
{};
std
::
string
smf_api_version
=
{};
std
::
string
remote_uri
=
{};
std
::
string
remote_uri
=
{};
if
(
!
amf_cfg
.
get_smf_pdu_session_context_uri
(
psc
,
remote_uri
))
{
if
(
!
psc
.
get
()
->
smf_available
)
{
Logger
::
amf_sbi
().
error
(
"Could not find Nsmf_PDUSession URI"
);
Logger
::
amf_sbi
().
error
(
"No SMF is available for this PDU session"
);
return
;
}
else
{
smf_addr
=
psc
->
smf_addr
;
smf_api_version
=
psc
->
smf_api_version
;
}
}
remote_uri
+=
NSMF_PDU_SESSION_RELEASE
;
Logger
::
amf_sbi
().
debug
(
"SMF URI: %s"
,
remote_uri
.
c_str
());
remote_uri
=
psc
.
get
()
->
smf_context_location
+
"/release"
;
nlohmann
::
json
pdu_session_release_request
;
nlohmann
::
json
pdu_session_release_request
;
pdu_session_release_request
[
"supi"
]
=
itti_msg
.
supi
.
c_str
();
pdu_session_release_request
[
"supi"
]
=
itti_msg
.
supi
.
c_str
();
pdu_session_release_request
[
"dnn"
]
=
psc
.
get
()
->
dnn
.
c_str
();
pdu_session_release_request
[
"dnn"
]
=
psc
.
get
()
->
dnn
.
c_str
();
...
@@ -586,10 +542,6 @@ void amf_sbi::handle_itti_message(
...
@@ -586,10 +542,6 @@ void amf_sbi::handle_itti_message(
nlohmann
::
json
response_json
=
{};
nlohmann
::
json
response_json
=
{};
uint32_t
response_code
=
0
;
uint32_t
response_code
=
0
;
// curl_http_client(
// remote_uri, json_part, "", "", itti_msg.supi,
// psc.get()->pdu_session_id, http_version);
curl_http_client
(
curl_http_client
(
remote_uri
,
"POST"
,
msg_body
,
response_json
,
response_code
,
http_version
);
remote_uri
,
"POST"
,
msg_body
,
response_json
,
response_code
,
http_version
);
...
@@ -623,7 +575,7 @@ void amf_sbi::handle_itti_message(itti_sbi_notify_subscribed_event& itti_msg) {
...
@@ -623,7 +575,7 @@ void amf_sbi::handle_itti_message(itti_sbi_notify_subscribed_event& itti_msg) {
report
[
"reachability"
]
=
r
.
getReachability
().
get_value
();
report
[
"reachability"
]
=
r
.
getReachability
().
get_value
();
}
}
//
t
imestamp
//
T
imestamp
std
::
time_t
time_epoch_ntp
=
std
::
time
(
nullptr
);
std
::
time_t
time_epoch_ntp
=
std
::
time
(
nullptr
);
uint64_t
tv_ntp
=
time_epoch_ntp
+
SECONDS_SINCE_FIRST_EPOCH
;
uint64_t
tv_ntp
=
time_epoch_ntp
+
SECONDS_SINCE_FIRST_EPOCH
;
report
[
"timeStamp"
]
=
std
::
to_string
(
tv_ntp
);
report
[
"timeStamp"
]
=
std
::
to_string
(
tv_ntp
);
...
@@ -1233,7 +1185,7 @@ void amf_sbi::curl_http_client(
...
@@ -1233,7 +1185,7 @@ void amf_sbi::curl_http_client(
location_pos
+
10
,
crlf_pos
-
(
location_pos
+
10
));
location_pos
+
10
,
crlf_pos
-
(
location_pos
+
10
));
Logger
::
amf_sbi
().
info
(
Logger
::
amf_sbi
().
info
(
"Location of the created SMF context: %s"
,
location
.
c_str
());
"Location of the created SMF context: %s"
,
location
.
c_str
());
psc
.
get
()
->
smf_context_location
=
location
;
psc
.
get
()
->
smf_
info
.
context_location
=
location
;
}
}
}
}
...
...
src/amf-app/amf_sbi.hpp
View file @
34f40dbb
...
@@ -19,13 +19,6 @@
...
@@ -19,13 +19,6 @@
* contact@openairinterface.org
* contact@openairinterface.org
*/
*/
/*! \file amf_sbi.hpp
\brief
\author Keliang DU (BUPT), Tien-Thinh NGUYEN (EURECOM)
\date 2020
\email: contact@openairinterface.org
*/
#ifndef _AMF_SBI_H_
#ifndef _AMF_SBI_H_
#define _AMF_SBI_H_
#define _AMF_SBI_H_
...
@@ -161,14 +154,13 @@ class amf_sbi {
...
@@ -161,14 +154,13 @@ class amf_sbi {
* @param [const std::string&] supi: SUPI
* @param [const std::string&] supi: SUPI
* @param [std::shared_ptr<pdu_session_context>&] psc: Pointer to the PDU
* @param [std::shared_ptr<pdu_session_context>&] psc: Pointer to the PDU
* Session Context
* Session Context
* @param [const std::string&] smf_addr: SMF's Address
* @param [bstring] sm_msg: SM message
* @param [bstring] sm_msg: SM message
* @param [const std::string&] dnn: DNN
* @param [const std::string&] dnn: DNN
* @return void
* @return void
*/
*/
void
send_pdu_session_update_sm_context_request
(
void
send_pdu_session_update_sm_context_request
(
const
std
::
string
&
supi
,
std
::
shared_ptr
<
pdu_session_context
>&
psc
,
const
std
::
string
&
supi
,
std
::
shared_ptr
<
pdu_session_context
>&
psc
,
const
std
::
string
&
smf_addr
,
bstring
sm_msg
,
const
std
::
string
&
dnn
);
bstring
sm_msg
,
const
std
::
string
&
dnn
);
/*
/*
* Select SMF from the configuration file
* Select SMF from the configuration file
...
...
src/common/3gpp_29.502.h
View file @
34f40dbb
...
@@ -137,4 +137,8 @@ static const std::vector<std::string> n2_sm_info_type_e2str = {
...
@@ -137,4 +137,8 @@ static const std::vector<std::string> n2_sm_info_type_e2str = {
"HANDOVER_REQ_ACK"
,
"HANDOVER_RES_ALLOC_FAIL"
,
"HANDOVER_REQ_ACK"
,
"HANDOVER_RES_ALLOC_FAIL"
,
"SECONDARY_RAT_USAGE"
};
"SECONDARY_RAT_USAGE"
};
#define NSMF_PDU_SESSION_CREATE "/sm-contexts"
#define NSMF_PDU_SESSION_MODIFY "/modify"
#define NSMF_PDU_SESSION_RELEASE "/release"
#endif
#endif
src/contexts/gNB_context.hpp
View file @
34f40dbb
...
@@ -19,13 +19,6 @@
...
@@ -19,13 +19,6 @@
* contact@openairinterface.org
* contact@openairinterface.org
*/
*/
/*! \file gNB_context.hpp
\brief
\author Keliang DU, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#ifndef _GNB_CONTEXT_H_
#ifndef _GNB_CONTEXT_H_
#define _GNB_CONTEXT_H_
#define _GNB_CONTEXT_H_
...
...
src/contexts/nas_context.cpp
View file @
34f40dbb
...
@@ -19,13 +19,6 @@
...
@@ -19,13 +19,6 @@
* contact@openairinterface.org
* contact@openairinterface.org
*/
*/
/*! \file nas_context.cpp
\brief
\author Keliang DU, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#include "nas_context.hpp"
#include "nas_context.hpp"
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
...
...
src/contexts/nas_context.hpp
View file @
34f40dbb
...
@@ -19,13 +19,6 @@
...
@@ -19,13 +19,6 @@
* contact@openairinterface.org
* contact@openairinterface.org
*/
*/
/*! \file nas_context.hpp
\brief
\author Keliang DU, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#ifndef _AMF_NAS_CONTEXT_H_
#ifndef _AMF_NAS_CONTEXT_H_
#define _AMF_NAS_CONTEXT_H_
#define _AMF_NAS_CONTEXT_H_
...
@@ -59,8 +52,8 @@ static const std::vector<std::string> _5gmm_state_e2str = {
...
@@ -59,8 +52,8 @@ static const std::vector<std::string> _5gmm_state_e2str = {
typedef
enum
{
CM_IDLE
=
0
,
CM_CONNECTED
}
cm_state_t
;
typedef
enum
{
CM_IDLE
=
0
,
CM_CONNECTED
}
cm_state_t
;
static
const
std
::
vector
<
std
::
string
>
cm_state_e2str
=
{
"CM_IDLE"
,
static
const
std
::
vector
<
std
::
string
>
cm_state_e2str
=
{
"CM_CONNECTED"
};
"CM_IDLE"
,
"CM_CONNECTED"
};
class
nas_context
{
class
nas_context
{
public:
public:
...
...
src/contexts/nas_security_context.hpp
View file @
34f40dbb
...
@@ -19,13 +19,6 @@
...
@@ -19,13 +19,6 @@
* contact@openairinterface.org
* contact@openairinterface.org
*/
*/
/*! \file nas_security_context.hpp
\brief
\author Keliang DU, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#ifndef _NAS_SECURITY_CONTEXT_H_
#ifndef _NAS_SECURITY_CONTEXT_H_
#define _NAS_SECURITY_CONTEXT_H_
#define _NAS_SECURITY_CONTEXT_H_
...
...
src/contexts/pdu_session_context.cpp
View file @
34f40dbb
...
@@ -19,18 +19,10 @@
...
@@ -19,18 +19,10 @@
* contact@openairinterface.org
* contact@openairinterface.org
*/
*/
/*! \file pdu_session_context.cpp
\brief
\author Keliang DU, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#include "pdu_session_context.hpp"
#include "pdu_session_context.hpp"
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
pdu_session_context
::
pdu_session_context
()
{
pdu_session_context
::
pdu_session_context
()
{
smf_available
=
false
;
isn2sm_avaliable
=
false
;
isn2sm_avaliable
=
false
;
isn1sm_avaliable
=
false
;
isn1sm_avaliable
=
false
;
ran_ue_ngap_id
=
0
;
ran_ue_ngap_id
=
0
;
...
@@ -41,7 +33,10 @@ pdu_session_context::pdu_session_context() {
...
@@ -41,7 +33,10 @@ pdu_session_context::pdu_session_context() {
isn2sm_avaliable
=
false
;
isn2sm_avaliable
=
false
;
// bstring n1sm;
// bstring n1sm;
isn1sm_avaliable
=
false
;
isn1sm_avaliable
=
false
;
smf_available
=
false
;
smf_info
.
info_available
=
false
;
smf_info
.
addr
=
{};
smf_info
.
api_version
=
"v1"
;
smf_info
.
port
=
"80"
;
snssai
=
{};
snssai
=
{};
plmn
=
{};
plmn
=
{};
is_ho_accepted
=
false
;
is_ho_accepted
=
false
;
...
...
src/contexts/pdu_session_context.hpp
View file @
34f40dbb
...
@@ -19,13 +19,6 @@
...
@@ -19,13 +19,6 @@
* contact@openairinterface.org
* contact@openairinterface.org
*/
*/
/*! \file pdu_session_context.hpp
\brief
\author Keliang DU, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#ifndef _PDU_SESSION_CONTEXT_H_
#ifndef _PDU_SESSION_CONTEXT_H_
#define _PDU_SESSION_CONTEXT_H_
#define _PDU_SESSION_CONTEXT_H_
...
@@ -34,6 +27,14 @@
...
@@ -34,6 +27,14 @@
#include "amf.hpp"
#include "amf.hpp"
#include "bstrlib.h"
#include "bstrlib.h"
typedef
struct
smf_context_info_s
{
bool
info_available
;
std
::
string
addr
;
std
::
string
port
;
std
::
string
api_version
;
std
::
string
context_location
;
}
smf_context_info_t
;
class
pdu_session_context
{
class
pdu_session_context
{
public:
public:
pdu_session_context
();
pdu_session_context
();
...
@@ -48,14 +49,10 @@ class pdu_session_context {
...
@@ -48,14 +49,10 @@ class pdu_session_context {
bstring
n1sm
;
bstring
n1sm
;
bool
isn1sm_avaliable
;
bool
isn1sm_avaliable
;
std
::
string
dnn
;
std
::
string
dnn
;
std
::
string
smf_addr
;
smf_context_info_t
smf_info
;
std
::
string
smf_port
;
std
::
string
smf_api_version
;
bool
smf_available
;
std
::
string
location
;
snssai_t
snssai
;
snssai_t
snssai
;
plmn_t
plmn
;
plmn_t
plmn
;
std
::
string
smf_context_location
;
bool
is_ho_accepted
;
bool
is_ho_accepted
;
};
};
...
...
src/contexts/security_def.hpp
View file @
34f40dbb
...
@@ -19,13 +19,6 @@
...
@@ -19,13 +19,6 @@
* contact@openairinterface.org
* contact@openairinterface.org
*/
*/
/*! \file security_def.hpp
\brief
\author Keliang DU, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#ifndef _SECURITY_DEF_H_
#ifndef _SECURITY_DEF_H_
#define _SECURITY_DEF_H_
#define _SECURITY_DEF_H_
...
...
src/contexts/ue_context.hpp
View file @
34f40dbb
...
@@ -19,13 +19,6 @@
...
@@ -19,13 +19,6 @@
* contact@openairinterface.org
* contact@openairinterface.org
*/
*/
/*! \file ue_context.hpp
\brief
\author Keliang DU, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#ifndef _UE_CONTEXT_H_
#ifndef _UE_CONTEXT_H_
#define _UE_CONTEXT_H_
#define _UE_CONTEXT_H_
...
@@ -69,8 +62,7 @@ class ue_context {
...
@@ -69,8 +62,7 @@ class ue_context {
Tai_t
tai
;
Tai_t
tai
;
std
::
string
supi
;
std
::
string
supi
;
uint32_t
tmsi
;
uint32_t
tmsi
;
// pdu session id <-> pdu_session_contex: map stores all pdu sessions for this
// pdu session id <-> pdu_session_contex
// UE
std
::
map
<
std
::
uint8_t
,
std
::
shared_ptr
<
pdu_session_context
>>
pdu_sessions
;
std
::
map
<
std
::
uint8_t
,
std
::
shared_ptr
<
pdu_session_context
>>
pdu_sessions
;
mutable
std
::
shared_mutex
m_pdu_session
;
mutable
std
::
shared_mutex
m_pdu_session
;
};
};
...
...
src/contexts/ue_ngap_context.hpp
View file @
34f40dbb
...
@@ -19,13 +19,6 @@
...
@@ -19,13 +19,6 @@
* contact@openairinterface.org
* contact@openairinterface.org
*/
*/
/*! \file ue_ngap_context.hpp
\brief
\author Keliang DU, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#ifndef _UE_NGAP_CONTEXT_H_
#ifndef _UE_NGAP_CONTEXT_H_
#define _UE_NGAP_CONTEXT_H_
#define _UE_NGAP_CONTEXT_H_
...
...
src/itti/itti_msg.hpp
View file @
34f40dbb
...
@@ -101,7 +101,7 @@ typedef enum {
...
@@ -101,7 +101,7 @@ typedef enum {
SBI_N1_MESSAGE_NOTIFICATION
,
SBI_N1_MESSAGE_NOTIFICATION
,
SBI_N1N2_MESSAGE_SUBSCRIBE
,
SBI_N1N2_MESSAGE_SUBSCRIBE
,
SBI_N1N2_MESSAGE_UNSUBSCRIBE
,
SBI_N1N2_MESSAGE_UNSUBSCRIBE
,
HANDOVER_REQUIRED
,
HANDOVER_REQUIRED
_MSG
,
HANDOVER_REQUEST_ACK
,
HANDOVER_REQUEST_ACK
,
HANDOVER_NOTIFY
,
HANDOVER_NOTIFY
,
UPLINK_RAN_STATUS_TRANSFER
,
UPLINK_RAN_STATUS_TRANSFER
,
...
...
src/itti/msgs/itti_msg_n2.hpp
View file @
34f40dbb
...
@@ -246,7 +246,7 @@ class itti_ue_radio_capability_indication : public itti_msg_n2 {
...
@@ -246,7 +246,7 @@ class itti_ue_radio_capability_indication : public itti_msg_n2 {
class
itti_handover_required
:
public
itti_msg_n2
{
class
itti_handover_required
:
public
itti_msg_n2
{
public:
public:
itti_handover_required
(
const
task_id_t
origin
,
const
task_id_t
destination
)
itti_handover_required
(
const
task_id_t
origin
,
const
task_id_t
destination
)
:
itti_msg_n2
(
HANDOVER_REQUIRED
,
origin
,
destination
)
{
:
itti_msg_n2
(
HANDOVER_REQUIRED
_MSG
,
origin
,
destination
)
{
handoverReq
=
nullptr
;
handoverReq
=
nullptr
;
}
}
itti_handover_required
(
const
itti_handover_required
&
i
)
:
itti_msg_n2
(
i
)
{}
itti_handover_required
(
const
itti_handover_required
&
i
)
:
itti_msg_n2
(
i
)
{}
...
...
src/utils/fqdn.cpp
View file @
34f40dbb
...
@@ -51,6 +51,7 @@ bool fqdn::resolve(
...
@@ -51,6 +51,7 @@ bool fqdn::resolve(
return
true
;
return
true
;
}
}
}
catch
(
std
::
exception
&
e
)
{
}
catch
(
std
::
exception
&
e
)
{
// TODO: Remove this line so that AMF can re-try several times
throw
std
::
runtime_error
(
throw
std
::
runtime_error
(
"Cannot resolve a DNS name "
+
std
::
string
(
e
.
what
()));
"Cannot resolve a DNS name "
+
std
::
string
(
e
.
what
()));
return
false
;
return
false
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment