Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-SMF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
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-SMF
Commits
f8e7915c
Commit
f8e7915c
authored
Jun 15, 2020
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code cleanup/bug fixes for SMF testing
parent
59a46d6e
Changes
22
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
77 additions
and
9640 deletions
+77
-9640
README.txt
README.txt
+0
-2
src/common/3gpp_29.274.h
src/common/3gpp_29.274.h
+44
-2
src/common/logger.cpp
src/common/logger.cpp
+0
-2
src/common/logger.hpp
src/common/logger.hpp
+0
-8
src/gtpv2c/3gpp_29.274.cpp
src/gtpv2c/3gpp_29.274.cpp
+0
-875
src/gtpv2c/3gpp_29.274.hpp
src/gtpv2c/3gpp_29.274.hpp
+0
-4221
src/gtpv2c/CMakeLists.txt
src/gtpv2c/CMakeLists.txt
+0
-32
src/gtpv2c/gtpv2c.cpp
src/gtpv2c/gtpv2c.cpp
+0
-674
src/gtpv2c/gtpv2c.hpp
src/gtpv2c/gtpv2c.hpp
+0
-163
src/gtpv2c/msg_gtpv2c.hpp
src/gtpv2c/msg_gtpv2c.hpp
+0
-3633
src/itti/itti_msg.hpp
src/itti/itti_msg.hpp
+0
-2
src/oai_smf/CMakeLists.txt
src/oai_smf/CMakeLists.txt
+1
-3
src/oai_smf/main.cpp
src/oai_smf/main.cpp
+0
-1
src/pfcp/pfcp.cpp
src/pfcp/pfcp.cpp
+1
-1
src/smf_app/CMakeLists.txt
src/smf_app/CMakeLists.txt
+0
-1
src/smf_app/smf_app.cpp
src/smf_app/smf_app.cpp
+18
-3
src/smf_app/smf_config.cpp
src/smf_app/smf_config.cpp
+1
-1
src/smf_app/smf_config.hpp
src/smf_app/smf_config.hpp
+0
-1
src/smf_app/smf_procedure.cpp
src/smf_app/smf_procedure.cpp
+0
-1
src/smf_app/smf_procedure.hpp
src/smf_app/smf_procedure.hpp
+1
-2
src/test/amf_client/amf-client.cpp
src/test/amf_client/amf-client.cpp
+11
-7
src/udp/CMakeLists.txt
src/udp/CMakeLists.txt
+0
-5
No files found.
README.txt
View file @
f8e7915c
...
...
@@ -19,8 +19,6 @@ openair-cn5g-smf
├── common: Common header files
│ ├── msg: ITTI messages definitions.
│ └── utils: Common utilities.
├── gtpv1u: Generic GTPV1-U stack implementation.
├── gtpv2c: Generic GTPV2-C stack implementation.
├── itti: Inter task interface.
├── nas: NAS protocol implememtation.
├── ngap: NGAP protocol implememtation.
...
...
src/common/3gpp_29.274.h
View file @
f8e7915c
...
...
@@ -38,8 +38,7 @@
#include <stdint.h>
#include <string>
extern
const
char
*
interface_type2char
[];
//extern const char *interface_type2char[];
namespace
gtpv2c
{
struct
gtpc_exception
:
public
std
::
exception
{
...
...
@@ -1337,6 +1336,49 @@ struct interface_type_s {
//------------------------------------------------------------------------------
std
::
string
toString
()
const
{
const
char
*
interface_type2char
[
40
]
=
{
"S1_U_ENODEB_GTP_U"
,
"S1_U_SGW_GTP_U"
,
"S12_RNC_GTP_U"
,
"S12_SGW_GTP_U"
,
"S5_S8_SGW_GTP_U"
,
"S5_S8_PGW_GTP_U"
,
"S5_S8_SGW_GTP_C"
,
"S5_S8_PGW_GTP_C"
,
"S5_S8_SGW_PMIPv6"
,
"S5_S8_PGW_PMIPv6"
,
"S11_MME_GTP_C"
,
"S11_S4_SGW_GTP_C"
,
"S10_MME_GTP_C"
,
"S3_MME_GTP_C"
,
"S3_SGSN_GTP_C"
,
"S4_SGSN_GTP_U"
,
"S4_SGW_GTP_U"
,
"S4_SGSN_GTP_C"
,
"S16_SGSN_GTP_C"
,
"ENODEB_GTP_U_DL_DATA_FORWARDING"
,
"ENODEB_GTP_U_UL_DATA_FORWARDING"
,
"RNC_GTP_U_DATA_FORWARDING"
,
"SGSN_GTP_U_DATA_FORWARDING"
,
"SGW_UPF_GTP_U_DL_DATA_FORWARDING"
,
"SM_MBMS_GW_GTP_C"
,
"SN_MBMS_GW_GTP_C"
,
"SM_MME_GTP_C"
,
"SN_SGSN_GTP_C"
,
"SGW_GTP_U_UL_DATA_FORWARDING"
,
"SN_SGSN_GTP_U"
,
"S2B_EPDG_GTP_C"
,
"S2B_U_EPDG_GTP_U"
,
"S2B_PGW_GTP_C"
,
"S2B_U_PGW_GTP_U"
,
"S2A_TWAN_GTP_U"
,
"S2A_TWAN_GTP_C"
,
"S2A_PGW_GTP_C"
,
"S2A_PGW_GTP_U"
,
"S11_MME_GTP_U"
,
"S11_SGW_GTP_U"
};
if
((
interface_type
>=
INTERFACE_TYPE_MIN
)
&&
(
interface_type
<=
INTERFACE_TYPE_MAX
))
{
return
std
::
string
(
interface_type2char
[
interface_type
]);
...
...
src/common/logger.cpp
View file @
f8e7915c
...
...
@@ -56,8 +56,6 @@ void Logger::_init(const char *app, const bool log_stdout,
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_gtpv1_u
=
new
_Logger
(
"gtpv1_u "
,
m_sinks
,
ss
.
str
().
c_str
());
m_gtpv2_c
=
new
_Logger
(
"gtpv2_c "
,
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_system
=
new
_Logger
(
"system "
,
m_sinks
,
ss
.
str
().
c_str
());
...
...
src/common/logger.hpp
View file @
f8e7915c
...
...
@@ -89,12 +89,6 @@ class Logger {
static
_Logger
&
async_cmd
()
{
return
*
singleton
().
m_async_cmd
;
}
static
_Logger
&
gtpv1_u
()
{
return
*
singleton
().
m_gtpv1_u
;
}
static
_Logger
&
gtpv2_c
()
{
return
*
singleton
().
m_gtpv2_c
;
}
static
_Logger
&
itti
()
{
return
*
singleton
().
m_itti
;
}
...
...
@@ -146,8 +140,6 @@ class Logger {
std
::
string
m_pattern
;
_Logger
*
m_async_cmd
;
_Logger
*
m_gtpv1_u
;
_Logger
*
m_gtpv2_c
;
_Logger
*
m_itti
;
_Logger
*
m_smf_app
;
_Logger
*
m_system
;
...
...
src/gtpv2c/3gpp_29.274.cpp
deleted
100644 → 0
View file @
59a46d6e
This diff is collapsed.
Click to expand it.
src/gtpv2c/3gpp_29.274.hpp
deleted
100644 → 0
View file @
59a46d6e
This diff is collapsed.
Click to expand it.
src/gtpv2c/CMakeLists.txt
deleted
100644 → 0
View file @
59a46d6e
################################################################################
# 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
################################################################################
add_library
(
GTPV2C STATIC
3gpp_29.274.cpp
gtpv2c.cpp
)
include_directories
(
${
SRC_TOP_DIR
}
/common
)
include_directories
(
${
SRC_TOP_DIR
}
/common/msg
)
include_directories
(
${
SRC_TOP_DIR
}
/common/utils
)
include_directories
(
${
SRC_TOP_DIR
}
/gtpv2c
)
include_directories
(
${
SRC_TOP_DIR
}
/itti
)
include_directories
(
${
SRC_TOP_DIR
}
/udp
)
include_directories
(
${
SRC_TOP_DIR
}
/../build/ext/spdlog/include
)
src/gtpv2c/gtpv2c.cpp
deleted
100644 → 0
View file @
59a46d6e
This diff is collapsed.
Click to expand it.
src/gtpv2c/gtpv2c.hpp
deleted
100644 → 0
View file @
59a46d6e
/*
* 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 gtpv2c.hpp
\brief
\author Lionel Gauthier
\company Eurecom
\email: lionel.gauthier@eurecom.fr
*/
#ifndef FILE_GTPV2C_HPP_SEEN
#define FILE_GTPV2C_HPP_SEEN
#include "3gpp_29.274.hpp"
#include "endpoint.hpp"
#include "itti.hpp"
#include "udp.hpp"
#include "uint_generator.hpp"
#include <iostream>
#include <map>
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "msg_gtpv2c.hpp"
namespace
gtpv2c
{
static
const
uint16_t
default_port
=
2123
;
class
gtpv2c_procedure
{
public:
std
::
shared_ptr
<
gtpv2c_msg
>
retry_msg
;
endpoint
remote_endpoint
;
teid_t
local_teid
;
// for peer not responding
timer_id_t
retry_timer_id
;
timer_id_t
proc_cleanup_timer_id
;
uint64_t
gtpc_tx_id
;
uint8_t
initial_msg_type
;
// sent or received
uint8_t
triggered_msg_type
;
// sent or received
uint8_t
retry_count
;
// Could add customized N3, and customized T3:
// T3-RESPONSE timer and N3-REQUESTS counter setting is implementation
// dependent. That is, the timers and counters may be configurable per procedure. Multileg communications (e.g. Create
// Session Requests and Responses) however require longer timer values and possibly a higher number of retransmission
// attempts compared to single leg communication.
gtpv2c_procedure
()
:
retry_msg
(),
remote_endpoint
(),
local_teid
(
0
),
retry_timer_id
(
0
),
proc_cleanup_timer_id
(
0
),
gtpc_tx_id
(
0
),
initial_msg_type
(
0
),
triggered_msg_type
(
0
),
retry_count
(
0
)
{}
gtpv2c_procedure
(
const
gtpv2c_procedure
&
p
)
:
retry_msg
(
p
.
retry_msg
),
remote_endpoint
(
p
.
remote_endpoint
),
local_teid
(
p
.
local_teid
),
retry_timer_id
(
p
.
retry_timer_id
),
proc_cleanup_timer_id
(
p
.
proc_cleanup_timer_id
),
gtpc_tx_id
(
p
.
gtpc_tx_id
),
initial_msg_type
(
p
.
initial_msg_type
),
triggered_msg_type
(
p
.
triggered_msg_type
),
retry_count
(
p
.
retry_count
)
{}
};
enum
gtpv2c_transaction_action
{
DELETE_TX
=
0
,
CONTINUE_TX
};
class
gtpv2c_stack
:
public
udp_application
{
#define GTPV2C_T3_RESPONSE_MS 1000
#define GTPV2C_N3_REQUESTS 3
#define GTPV2C_PROC_TIME_OUT_MS ((GTPV2C_T3_RESPONSE_MS) * (GTPV2C_N3_REQUESTS + 1) + 1000)
protected:
uint32_t
id
;
udp_server
udp_s
;
udp_server
udp_s_allocated
;
// seems no need for atomic
uint32_t
seq_num
;
std
::
mutex
m_seq_num
;
uint32_t
restart_counter
;
std
::
map
<
uint64_t
,
uint32_t
>
gtpc_tx_id2seq_num
;
std
::
map
<
timer_id_t
,
uint32_t
>
proc_cleanup_timers
;
std
::
map
<
timer_id_t
,
uint32_t
>
msg_out_retry_timers
;
std
::
map
<
uint32_t
,
gtpv2c_procedure
>
pending_procedures
;
static
const
char
*
msg_type2cstr
[
256
];
uint32_t
get_next_seq_num
();
static
uint64_t
generate_gtpc_tx_id
()
{
return
util
::
uint_uid_generator
<
uint64_t
>::
get_instance
().
get_uid
();
}
static
bool
check_initial_message_type
(
const
uint8_t
initial
);
static
bool
check_triggered_message_type
(
const
uint8_t
initial
,
const
uint8_t
triggered
);
void
start_proc_cleanup_timer
(
gtpv2c_procedure
&
p
,
uint32_t
time_out_milli_seconds
,
const
task_id_t
&
task_id
,
const
uint32_t
&
seq_num
);
void
start_msg_retry_timer
(
gtpv2c_procedure
&
p
,
uint32_t
time_out_milli_seconds
,
const
task_id_t
&
task_id
,
const
uint32_t
&
seq_num
);
void
stop_msg_retry_timer
(
gtpv2c_procedure
&
p
);
void
stop_msg_retry_timer
(
timer_id_t
&
t
);
void
stop_proc_cleanup_timer
(
gtpv2c_procedure
&
p
);
void
notify_ul_error
(
const
gtpv2c_procedure
&
p
,
const
cause_value_e
cause
);
public:
static
const
uint8_t
version
=
2
;
gtpv2c_stack
(
const
std
::
string
&
ip_address
,
const
unsigned
short
port_num
,
const
util
::
thread_sched_params
&
sched_param
);
virtual
void
handle_receive
(
char
*
recv_buffer
,
const
std
::
size_t
bytes_transferred
,
const
endpoint
&
r_endpoint
);
virtual
void
notify_ul_error
(
const
endpoint
&
r_endpoint
,
const
teid_t
l_teid
,
const
cause_value_e
cause
,
const
uint64_t
gtpc_tx_id
);
void
handle_receive_message_cb
(
const
gtpv2c_msg
&
msg
,
const
endpoint
&
r_endpoint
,
const
task_id_t
&
task_id
,
bool
&
error
,
uint64_t
&
gtpc_tx_id
);
// Path mangement messages
virtual
uint32_t
send_initial_message
(
const
endpoint
&
r_endpoint
,
const
gtpv2c_echo_request
&
gtp_ies
,
const
task_id_t
&
task_id
,
const
uint64_t
gtp_tx_id
);
virtual
void
send_triggered_message
(
const
endpoint
&
r_endpoint
,
const
gtpv2c_echo_response
&
gtp_ies
,
const
uint64_t
gtp_tx_id
,
const
gtpv2c_transaction_action
&
a
=
DELETE_TX
);
// Tunnel management messages
virtual
uint32_t
send_initial_message
(
const
endpoint
&
r_endpoint
,
const
teid_t
r_teid
,
const
teid_t
l_teid
,
const
gtpv2c_create_session_request
&
gtp_ies
,
const
task_id_t
&
task_id
,
const
uint64_t
gtp_tx_id
);
virtual
uint32_t
send_initial_message
(
const
endpoint
&
r_endpoint
,
const
teid_t
r_teid
,
const
teid_t
l_teid
,
const
gtpv2c_delete_session_request
&
gtp_ies
,
const
task_id_t
&
task_id
,
const
uint64_t
gtp_tx_id
);
virtual
uint32_t
send_initial_message
(
const
endpoint
&
r_endpoint
,
const
teid_t
r_teid
,
const
teid_t
l_teid
,
const
gtpv2c_modify_bearer_request
&
gtp_ies
,
const
task_id_t
&
task_id
,
const
uint64_t
gtp_tx_id
);
virtual
uint32_t
send_initial_message
(
const
endpoint
&
r_endpoint
,
const
teid_t
r_teid
,
const
teid_t
l_teid
,
const
gtpv2c_release_access_bearers_request
&
gtp_ies
,
const
task_id_t
&
task_id
,
const
uint64_t
gtp_tx_id
);
virtual
uint32_t
send_initial_message
(
const
endpoint
&
r_endpoint
,
const
teid_t
r_teid
,
const
teid_t
l_teid
,
const
gtpv2c_downlink_data_notification
&
gtp_ies
,
const
task_id_t
&
task_id
,
const
uint64_t
gtp_tx_id
);
virtual
void
send_triggered_message
(
const
endpoint
&
r_endpoint
,
const
teid_t
teid
,
const
gtpv2c_create_session_response
&
gtp_ies
,
const
uint64_t
gtp_tx_id
,
const
gtpv2c_transaction_action
&
a
=
DELETE_TX
);
virtual
void
send_triggered_message
(
const
endpoint
&
r_endpoint
,
const
teid_t
teid
,
const
gtpv2c_delete_session_response
&
gtp_ies
,
const
uint64_t
gtp_tx_id
,
const
gtpv2c_transaction_action
&
a
=
DELETE_TX
);
virtual
void
send_triggered_message
(
const
endpoint
&
r_endpoint
,
const
teid_t
teid
,
const
gtpv2c_modify_bearer_response
&
gtp_ies
,
const
uint64_t
gtp_tx_id
,
const
gtpv2c_transaction_action
&
a
=
DELETE_TX
);
virtual
void
send_triggered_message
(
const
endpoint
&
r_endpoint
,
const
teid_t
teid
,
const
gtpv2c_release_access_bearers_response
&
gtp_ies
,
const
uint64_t
gtp_tx_id
,
const
gtpv2c_transaction_action
&
a
=
DELETE_TX
);
virtual
void
send_triggered_message
(
const
endpoint
&
r_endpoint
,
const
teid_t
teid
,
const
gtpv2c_downlink_data_notification_acknowledge
&
gtp_ies
,
const
uint64_t
gtp_tx_id
,
const
gtpv2c_transaction_action
&
a
=
DELETE_TX
);
void
time_out_event
(
const
uint32_t
timer_id
,
const
task_id_t
&
task_id
,
bool
&
error
);
};
}
// namespace gtpv2c
#endif
/* FILE_GTPV2C_HPP_SEEN */
src/gtpv2c/msg_gtpv2c.hpp
deleted
100644 → 0
View file @
59a46d6e
This diff is collapsed.
Click to expand it.
src/itti/itti_msg.hpp
View file @
f8e7915c
...
...
@@ -34,8 +34,6 @@ typedef enum {
TASK_FIRST
=
0
,
TASK_ITTI_TIMER
=
TASK_FIRST
,
TASK_ASYNC_SHELL_CMD
,
TASK_GTPV1_U
,
TASK_GTPV2_C
,
TASK_SMF_APP
,
TASK_SMF_N4
,
TASK_SMF_N10
,
...
...
src/oai_smf/CMakeLists.txt
View file @
f8e7915c
...
...
@@ -266,7 +266,6 @@ endif(STATIC_LINKING)
ADD_SUBDIRECTORY
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/../../src/common
${
CMAKE_CURRENT_BINARY_DIR
}
/common
)
ADD_SUBDIRECTORY
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/../../src/common/utils
${
CMAKE_CURRENT_BINARY_DIR
}
/utils
)
ADD_SUBDIRECTORY
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/../../src/gtpv2c
${
CMAKE_CURRENT_BINARY_DIR
}
/gtpv2c
)
ADD_SUBDIRECTORY
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/../../src/pfcp
${
CMAKE_CURRENT_BINARY_DIR
}
/pfcp
)
ADD_SUBDIRECTORY
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/../../src/udp
${
CMAKE_CURRENT_BINARY_DIR
}
/udp
)
ADD_SUBDIRECTORY
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/../../src/api-server
${
CMAKE_CURRENT_BINARY_DIR
}
/api-server
)
...
...
@@ -354,7 +353,6 @@ include_directories(${SRC_TOP_DIR}/itti)
include_directories
(
${
SRC_TOP_DIR
}
/common/msg
)
include_directories
(
${
SRC_TOP_DIR
}
/common/nas
)
include_directories
(
${
SRC_TOP_DIR
}
/common/utils
)
include_directories
(
${
SRC_TOP_DIR
}
/gtpv2c
)
include_directories
(
${
SRC_TOP_DIR
}
/pfcp
)
include_directories
(
${
SRC_TOP_DIR
}
/udp
)
include_directories
(
${
SRC_TOP_DIR
}
/../build/ext/spdlog/include
)
...
...
@@ -377,5 +375,5 @@ IF(STATIC_LINKING)
ENDIF
(
STATIC_LINKING
)
target_link_libraries
(
smf
${
ASAN
}
-Wl,--start-group CN_UTILS SMF UDP
GTPV2C
PFCP 3GPP_COMMON_TYPES SMF_API -lnettle
${
NETTLE_LIBRARIES
}
${
CRYPTO_LIBRARIES
}
-lnghttp2_asio -lboost_system -lboost_thread -lssl -lcrypto NAS gflags glog dl double-conversion folly -Wl,--end-group pthread m rt config++ event boost_system pistache curl
)
-Wl,--start-group CN_UTILS SMF UDP PFCP 3GPP_COMMON_TYPES SMF_API -lnettle
${
NETTLE_LIBRARIES
}
${
CRYPTO_LIBRARIES
}
-lnghttp2_asio -lboost_system -lboost_thread -lssl -lcrypto NAS gflags glog dl double-conversion folly -Wl,--end-group pthread m rt config++ event boost_system pistache curl
)
\ No newline at end of file
src/oai_smf/main.cpp
View file @
f8e7915c
...
...
@@ -36,7 +36,6 @@
#include <stdlib.h> // srand
#include <unistd.h> // get_pid(), pause()
using
namespace
gtpv2c
;
using
namespace
smf
;
using
namespace
util
;
using
namespace
std
;
...
...
src/pfcp/pfcp.cpp
View file @
f8e7915c
...
...
@@ -19,7 +19,7 @@
* contact@openairinterface.org
*/
/*! \file
gtpv2c
.cpp
/*! \file
pfcp
.cpp
\brief
\author Lionel Gauthier
\company Eurecom
...
...
src/smf_app/CMakeLists.txt
View file @
f8e7915c
...
...
@@ -23,7 +23,6 @@ include_directories(${SRC_TOP_DIR}/common/msg)
include_directories
(
${
SRC_TOP_DIR
}
/common/utils
)
include_directories
(
${
SRC_TOP_DIR
}
/common/ngap
)
include_directories
(
${
SRC_TOP_DIR
}
/itti
)
include_directories
(
${
SRC_TOP_DIR
}
/gtpv2c
)
include_directories
(
${
SRC_TOP_DIR
}
/pfcp
)
include_directories
(
${
SRC_TOP_DIR
}
/smf
)
include_directories
(
${
SRC_TOP_DIR
}
/ngap
)
...
...
src/smf_app/smf_app.cpp
View file @
f8e7915c
...
...
@@ -503,7 +503,12 @@ void smf_app::handle_itti_msg(itti_n11_create_sm_context_response &m) {
Logger
::
smf_app
().
debug
(
"PDU Session Create SM Context: Set promise with ID %d to ready"
,
m
.
pid
);
pdu_session_create_sm_context_response
sm_context_response
=
{
};
std
::
shared_lock
lock
(
m_sm_context_create_promises
);
if
(
sm_context_create_promises
.
count
(
m
.
pid
)
>
0
){
sm_context_create_promises
[
m
.
pid
]
->
set_value
(
m
.
res
);
//Remove this promise from list
sm_context_create_promises
.
erase
(
m
.
pid
);
}
}
//------------------------------------------------------------------------------
...
...
@@ -511,7 +516,12 @@ void smf_app::handle_itti_msg(itti_n11_update_sm_context_response &m) {
Logger
::
smf_app
().
debug
(
"PDU Session Update SM Context: Set promise with ID %d to ready"
,
m
.
pid
);
pdu_session_update_sm_context_response
sm_context_response
=
{
};
std
::
shared_lock
lock
(
m_sm_context_update_promises
);
if
(
sm_context_update_promises
.
count
(
m
.
pid
)
>
0
){
sm_context_update_promises
[
m
.
pid
]
->
set_value
(
m
.
res
);
//Remove this promise from list
sm_context_update_promises
.
erase
(
m
.
pid
);
}
}
//------------------------------------------------------------------------------
...
...
@@ -519,7 +529,12 @@ void smf_app::handle_itti_msg(itti_n11_release_sm_context_response &m) {
Logger
::
smf_app
().
debug
(
"PDU Session Release SM Context: Set promise with ID %d to ready"
,
m
.
pid
);
pdu_session_release_sm_context_response
sm_context_response
=
{
};
std
::
shared_lock
lock
(
m_sm_context_release_promises
);
if
(
sm_context_release_promises
.
count
(
m
.
pid
)
>
0
){
sm_context_release_promises
[
m
.
pid
]
->
set_value
(
m
.
res
);
//Remove this promise from list
sm_context_release_promises
.
erase
(
m
.
pid
);
}
}
//------------------------------------------------------------------------------
...
...
src/smf_app/smf_config.cpp
View file @
f8e7915c
...
...
@@ -45,7 +45,7 @@
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/split.hpp>
#include "3gpp_29.274.hpp"
//
#include "3gpp_29.274.hpp"
#include "common_defs.h"
#include "epc.h"
#include "if.hpp"
...
...
src/smf_app/smf_config.hpp
View file @
f8e7915c
...
...
@@ -41,7 +41,6 @@
#include "3gpp_29.244.h"
#include "3gpp_29.274.h"
#include "gtpv2c.hpp"
#include "pfcp.hpp"
#include "smf.h"
...
...
src/smf_app/smf_procedure.cpp
View file @
f8e7915c
...
...
@@ -39,7 +39,6 @@
#include "itti.hpp"
#include "itti_msg_n4_restore.hpp"
#include "logger.hpp"
#include "msg_gtpv2c.hpp"
#include "smf_app.hpp"
#include "smf_config.hpp"
#include "smf_pfcp_association.hpp"
...
...
src/smf_app/smf_procedure.hpp
View file @
f8e7915c
...
...
@@ -34,13 +34,12 @@
#include <set>
#include "3gpp_29.244.hpp"
#include "3gpp_29.274.hpp"
//
#include "3gpp_29.274.hpp"
#include "itti_msg_n11.hpp"
#include "itti_msg_n4.hpp"
#include "itti_msg_n4_restore.hpp"
#include "itti_msg_nx.hpp"
#include "msg_pfcp.hpp"
#include "msg_gtpv2c.hpp"
#include "uint_generator.hpp"
#include "smf_msg.hpp"
...
...
src/test/amf_client/amf-client.cpp
View file @
f8e7915c
...
...
@@ -1485,7 +1485,7 @@ bool pdu_session_establishment(uint8_t pid, uint8_t context_id,
bool
status
=
false
;
if
(
send_pdu_session_establishment_request
(
pid
,
smf_ip_address
,
http_version
,
port
))
{
usleep
(
100000
);
//
usleep(100000);
status
=
send_pdu_session_update_sm_context_establishment
(
context_id
,
smf_ip_address
,
http_version
,
...
...
@@ -1576,10 +1576,14 @@ void test_all_procedures_for_multiple_threads(std::string smf_ip_address,
//bool status = false;
std
::
thread
t1
(
&
send_pdu_session_establishment_request
,
pid
,
smf_ip_address
,
/*
std::thread t1(&send_pdu_session_establishment_request, pid, smf_ip_address,
http_version, port);
std::thread t2(&send_pdu_session_update_sm_context_establishment, context_id,
smf_ip_address, http_version, port);
*/
std
::
thread
t1
(
&
pdu_session_establishment
,
pid
,
context_id
,
smf_ip_address
,
http_version
,
port
);
std
::
thread
t3
(
&
send_pdu_session_update_sm_context_ue_service_request
,
context_id
,
smf_ip_address
,
http_version
,
port
);
std
::
thread
t4
(
&
send_pdu_session_update_sm_context_ue_service_request_step2
,
...
...
@@ -1602,7 +1606,7 @@ void test_all_procedures_for_multiple_threads(std::string smf_ip_address,
//send_release_sm_context_request(pid, smf_ip_address, http_version, port);
t1
.
join
();
t2
.
join
();
//
t2.join();
t3
.
join
();
t4
.
join
();
t5
.
join
();
...
...
@@ -1662,11 +1666,11 @@ int main(int argc, char *argv[]) {
uint8_t
context_id
=
1
;
uint8_t
pid
=
1
;
test_all_procedures_for_one_session
(
pid
,
context_id
,
smf_ip_address
,
http_version
,
port
);
//
test_all_procedures_for_one_session(pid, context_id, smf_ip_address,
//
http_version, port);
//test_session_establishment_multiple_threads(smf_ip_address, http_version, port);
//
test_all_procedures_for_multiple_threads(smf_ip_address, http_version,
//
port);
test_all_procedures_for_multiple_threads
(
smf_ip_address
,
http_version
,
port
);
return
0
;
}
src/udp/CMakeLists.txt
View file @
f8e7915c
...
...
@@ -22,15 +22,10 @@ include_directories(${SRC_TOP_DIR}/common)
include_directories
(
${
SRC_TOP_DIR
}
/common/msg
)
include_directories
(
${
SRC_TOP_DIR
}
/common/utils
)
include_directories
(
${
SRC_TOP_DIR
}
/itti
)
include_directories
(
${
SRC_TOP_DIR
}
/gtpv1u
)
include_directories
(
${
SRC_TOP_DIR
}
/gtpv2c
)
include_directories
(
${
SRC_TOP_DIR
}
/pfcp
)
include_directories
(
${
SRC_TOP_DIR
}
/udp
)
include_directories
(
${
SRC_TOP_DIR
}
/../build/ext/spdlog/include
)
add_library
(
UDP STATIC
udp.cpp
)
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