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
d5978496
Commit
d5978496
authored
Jun 10, 2020
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix padding issue for NGAP messages
parent
e08a5729
Changes
8
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
101 additions
and
102 deletions
+101
-102
build/scripts/build_helper.smf
build/scripts/build_helper.smf
+2
-5
docs/FEATURE_SET.md
docs/FEATURE_SET.md
+2
-4
src/api-server/smf-http2-server.cpp
src/api-server/smf-http2-server.cpp
+8
-0
src/api-server/smf-http2-server.h
src/api-server/smf-http2-server.h
+8
-0
src/common/utils/mime_parser.cpp
src/common/utils/mime_parser.cpp
+3
-2
src/ngap/asn1c/per_support.h
src/ngap/asn1c/per_support.h
+2
-2
src/oai_smf/main.cpp
src/oai_smf/main.cpp
+11
-6
src/smf_app/smf_n1_n2.cpp
src/smf_app/smf_n1_n2.cpp
+65
-83
No files found.
build/scripts/build_helper.smf
View file @
d5978496
...
@@ -203,7 +203,7 @@ install_nlohmann_from_git() {
...
@@ -203,7 +203,7 @@ install_nlohmann_from_git() {
install_nghttp2_from_git() {
install_nghttp2_from_git() {
if [ $1 -eq 0 ]; then
if [ $1 -eq 0 ]; then
read -p "Do you want to install nghttp2 ? <y/N> " prompt
read -p "Do you want to install nghttp2 ? <y/N> " prompt
OPTION="
-y
"
OPTION=""
else
else
prompt='y'
prompt='y'
OPTION="-y"
OPTION="-y"
...
@@ -261,7 +261,6 @@ install_nghttp2_from_git() {
...
@@ -261,7 +261,6 @@ install_nghttp2_from_git() {
popd
popd
fi
fi
return 0
return 0
}
}
#-------------------------------------------------------------------------------
#-------------------------------------------------------------------------------
...
@@ -401,8 +400,6 @@ check_install_smf_deps() {
...
@@ -401,8 +400,6 @@ check_install_smf_deps() {
install_nghttp2_from_git $1 $2
install_nghttp2_from_git $1 $2
ret=$?;[[ $ret -ne 0 ]] && return $ret
ret=$?;[[ $ret -ne 0 ]] && return $ret
$SUDO /sbin/ldconfig -v
ret=$?;[[ $ret -ne 0 ]] && return $ret
return 0
return 0
}
}
...
...
docs/FEATURE_SET.md
View file @
d5978496
...
@@ -41,8 +41,8 @@ Based on document **3GPP TS 23.501 v16.0.0 §6.2.2**.
...
@@ -41,8 +41,8 @@ Based on document **3GPP TS 23.501 v16.0.0 §6.2.2**.
| 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: | Only support static ipv4 address allocation |
| 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: |
Local configuration in SMF
|
| 4 | Respond to ARP requests and/or IPv6 Neighbour Solicitation requests | :x: |
|
| 5 | Selection of UPF function | :
x: |
|
| 5 | Selection of UPF function | :
heavy_check_mark: | Local configuration in SMF
|
| 6 | Configures traffic steering at UPF | :x: | |
| 6 | Configures traffic steering at UPF | :x: | |
| 7 | Termination of interfaces towards PCFs | :x: | |
| 7 | Termination of interfaces towards PCFs | :x: | |
| 8 | Lawful intercept | :x: | |
| 8 | Lawful intercept | :x: | |
...
@@ -55,5 +55,3 @@ Based on document **3GPP TS 23.501 v16.0.0 §6.2.2**.
...
@@ -55,5 +55,3 @@ Based on document **3GPP TS 23.501 v16.0.0 §6.2.2**.
| 15 | Support of header compression. | :x: | |
| 15 | Support of header compression. | :x: | |
| 16 | Act as I-SMF in deployments | :x: | |
| 16 | Act as I-SMF in deployments | :x: | |
| 17 | Provisioning of external parameters | :x: | |
| 17 | Provisioning of external parameters | :x: | |
src/api-server/smf-http2-server.cpp
View file @
d5978496
...
@@ -19,6 +19,14 @@
...
@@ -19,6 +19,14 @@
* contact@openairinterface.org
* contact@openairinterface.org
*/
*/
/*! \file smf_http2-server.cpp
\brief
\author Tien-Thinh NGUYEN
\company Eurecom
\date 2020
\email: tien-thinh.nguyen@eurecom.fr
*/
#include "smf-http2-server.h"
#include "smf-http2-server.h"
#include <string>
#include <string>
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string.hpp>
...
...
src/api-server/smf-http2-server.h
View file @
d5978496
...
@@ -19,6 +19,14 @@
...
@@ -19,6 +19,14 @@
* contact@openairinterface.org
* contact@openairinterface.org
*/
*/
/*! \file smf_http2-server.h
\brief
\author Tien-Thinh NGUYEN
\company Eurecom
\date 2020
\email: tien-thinh.nguyen@eurecom.fr
*/
#ifndef FILE_SMF_HTTP2_SERVER_SEEN
#ifndef FILE_SMF_HTTP2_SERVER_SEEN
#define FILE_SMF_HTTP2_SERVER_SEEN
#define FILE_SMF_HTTP2_SERVER_SEEN
...
...
src/common/utils/mime_parser.cpp
View file @
d5978496
...
@@ -64,10 +64,8 @@ void mime_parser::get_mime_parts(std::vector<mime_part> &parts) const {
...
@@ -64,10 +64,8 @@ void mime_parser::get_mime_parts(std::vector<mime_part> &parts) const {
for
(
auto
it
:
mime_parts
)
{
for
(
auto
it
:
mime_parts
)
{
parts
.
push_back
(
it
);
parts
.
push_back
(
it
);
}
}
}
}
//---------------------------------------------------------------------------------------------
//---------------------------------------------------------------------------------------------
unsigned
char
*
mime_parser
::
format_string_as_hex
(
const
std
::
string
&
str
)
{
unsigned
char
*
mime_parser
::
format_string_as_hex
(
const
std
::
string
&
str
)
{
unsigned
int
str_len
=
str
.
length
();
unsigned
int
str_len
=
str
.
length
();
...
@@ -101,6 +99,8 @@ void mime_parser::create_multipart_related_content(std::string &body,
...
@@ -101,6 +99,8 @@ void mime_parser::create_multipart_related_content(std::string &body,
const
std
::
string
&
n1_message
,
const
std
::
string
&
n1_message
,
const
std
::
string
&
n2_message
)
{
const
std
::
string
&
n2_message
)
{
//TODO: provide Content-Ids as function parameters
//format string as hex
//format string as hex
unsigned
char
*
n1_msg_hex
=
format_string_as_hex
(
n1_message
);
unsigned
char
*
n1_msg_hex
=
format_string_as_hex
(
n1_message
);
unsigned
char
*
n2_msg_hex
=
format_string_as_hex
(
n2_message
);
unsigned
char
*
n2_msg_hex
=
format_string_as_hex
(
n2_message
);
...
@@ -131,6 +131,7 @@ void mime_parser::create_multipart_related_content(
...
@@ -131,6 +131,7 @@ void mime_parser::create_multipart_related_content(
std
::
string
&
body
,
const
std
::
string
&
json_part
,
const
std
::
string
boundary
,
std
::
string
&
body
,
const
std
::
string
&
json_part
,
const
std
::
string
boundary
,
const
std
::
string
&
message
,
const
multipart_related_content_part_e
content_type
)
{
const
std
::
string
&
message
,
const
multipart_related_content_part_e
content_type
)
{
//TODO: provide Content-Id as function parameters
//format string as hex
//format string as hex
unsigned
char
*
msg_hex
=
format_string_as_hex
(
message
);
unsigned
char
*
msg_hex
=
format_string_as_hex
(
message
);
...
...
src/ngap/asn1c/per_support.h
View file @
d5978496
...
@@ -24,8 +24,8 @@ typedef struct asn_per_constraint_s {
...
@@ -24,8 +24,8 @@ typedef struct asn_per_constraint_s {
}
flags
;
}
flags
;
int
range_bits
;
/* Full number of bits in the range */
int
range_bits
;
/* Full number of bits in the range */
int
effective_bits
;
/* Effective bits */
int
effective_bits
;
/* Effective bits */
long
lower_bound
;
/* "lb" value */
long
lo
ng
lo
wer_bound
;
/* "lb" value */
long
upper_bound
;
/* "ub" value */
long
long
upper_bound
;
/* "ub" value */
}
asn_per_constraint_t
;
}
asn_per_constraint_t
;
typedef
struct
asn_per_constraints_s
{
typedef
struct
asn_per_constraints_s
{
asn_per_constraint_t
value
;
asn_per_constraint_t
value
;
...
...
src/oai_smf/main.cpp
View file @
d5978496
...
@@ -46,6 +46,7 @@ itti_mw *itti_inst = nullptr;
...
@@ -46,6 +46,7 @@ itti_mw *itti_inst = nullptr;
async_shell_cmd
*
async_shell_cmd_inst
=
nullptr
;
async_shell_cmd
*
async_shell_cmd_inst
=
nullptr
;
smf_app
*
smf_app_inst
=
nullptr
;
smf_app
*
smf_app_inst
=
nullptr
;
smf_config
smf_cfg
;
smf_config
smf_cfg
;
SMFApiServer
*
smf_api_server_1
=
nullptr
;
void
send_heartbeat_to_tasks
(
const
uint32_t
sequence
);
void
send_heartbeat_to_tasks
(
const
uint32_t
sequence
);
...
@@ -73,7 +74,9 @@ void my_app_signal_handler(int s)
...
@@ -73,7 +74,9 @@ void my_app_signal_handler(int s)
if
(
itti_inst
)
delete
itti_inst
;
itti_inst
=
nullptr
;
if
(
itti_inst
)
delete
itti_inst
;
itti_inst
=
nullptr
;
std
::
cout
<<
"ITTI memory done."
<<
std
::
endl
;
std
::
cout
<<
"ITTI memory done."
<<
std
::
endl
;
if
(
smf_app_inst
)
delete
smf_app_inst
;
smf_app_inst
=
nullptr
;
if
(
smf_app_inst
)
delete
smf_app_inst
;
smf_app_inst
=
nullptr
;
std
::
cout
<<
"PGW APP memory done."
<<
std
::
endl
;
std
::
cout
<<
"SMF APP memory done."
<<
std
::
endl
;
smf_api_server_1
->
shutdown
();
if
(
smf_api_server_1
)
delete
smf_api_server_1
;
smf_api_server_1
=
nullptr
;
std
::
cout
<<
"Freeing Allocated memory done"
<<
std
::
endl
;
std
::
cout
<<
"Freeing Allocated memory done"
<<
std
::
endl
;
exit
(
0
);
exit
(
0
);
}
}
...
@@ -124,13 +127,15 @@ int main(int argc, char **argv)
...
@@ -124,13 +127,15 @@ int main(int argc, char **argv)
//SMF Pistache API server (HTTP1)
//SMF Pistache API server (HTTP1)
Pistache
::
Address
addr
(
std
::
string
(
inet_ntoa
(
*
((
struct
in_addr
*
)
&
smf_cfg
.
sbi
.
addr4
)))
,
Pistache
::
Port
(
smf_cfg
.
sbi
.
port
));
Pistache
::
Address
addr
(
std
::
string
(
inet_ntoa
(
*
((
struct
in_addr
*
)
&
smf_cfg
.
sbi
.
addr4
)))
,
Pistache
::
Port
(
smf_cfg
.
sbi
.
port
));
SMFApiServer
smfApiServer
(
addr
,
smf_app_inst
);
SMFApiServer
*
smf_api_server_1
=
new
SMFApiServer
(
addr
,
smf_app_inst
);
smfApiServer
.
init
(
2
);
smf_api_server_1
->
init
(
2
);
std
::
thread
smf_api_manager
(
&
SMFApiServer
::
start
,
smfApiServer
);
smf_api_server_1
->
start
();
//std::thread smf_api_manager(&SMFApiServer::start, smf_api_server_1);
//SMF NGHTTP API server (HTTP2)
//SMF NGHTTP API server (HTTP2)
smf_http2_server
*
smf_server
=
new
smf_http2_server
(
conv
::
toString
(
smf_cfg
.
sbi
.
addr4
),
smf_cfg
.
sbi_http2_port
,
smf_app_inst
);
smf_http2_server
*
smf_api_server_2
=
new
smf_http2_server
(
conv
::
toString
(
smf_cfg
.
sbi
.
addr4
),
smf_cfg
.
sbi_http2_port
,
smf_app_inst
);
std
::
thread
smf_api
(
&
smf_http2_server
::
start
,
smf_server
);
smf_api_server_2
->
start
();
//std::thread smf_api(&smf_http2_server::start, smf_api_server_2);
FILE
*
fp
=
NULL
;
FILE
*
fp
=
NULL
;
std
::
string
filename
=
fmt
::
format
(
"/tmp/smf_{}.status"
,
getpid
());
std
::
string
filename
=
fmt
::
format
(
"/tmp/smf_{}.status"
,
getpid
());
...
...
src/smf_app/smf_n1_n2.cpp
View file @
d5978496
This diff is collapsed.
Click to expand it.
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