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
d0f0f33c
Commit
d0f0f33c
authored
Sep 03, 2020
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'integration_test' into 'develop'
Integration test See merge request oai/cn5g/oai-cn5g-smf!19
parents
36f6b3e5
85e1531b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
4 deletions
+14
-4
src/smf_app/smf_context.cpp
src/smf_app/smf_context.cpp
+6
-0
src/smf_app/smf_n1_n2.cpp
src/smf_app/smf_n1_n2.cpp
+1
-0
src/udp/udp.hpp
src/udp/udp.hpp
+7
-4
No files found.
src/smf_app/smf_context.cpp
View file @
d0f0f33c
...
@@ -1797,6 +1797,9 @@ void smf_context::handle_pdu_session_update_sm_context_request(
...
@@ -1797,6 +1797,9 @@ void smf_context::handle_pdu_session_update_sm_context_request(
smreq
->
pid
,
N11_SESSION_UPDATE_SM_CONTEXT_RESPONSE
);
smreq
->
pid
,
N11_SESSION_UPDATE_SM_CONTEXT_RESPONSE
);
free_wrapper
((
void
**
)
&
qos_flow_description
);
free_wrapper
((
void
**
)
&
qos_flow_description
);
free_wrapper
((
void
**
)
&
decoded_nas_msg
.
plain
.
sm
.
pdu_session_modification_request
.
qosflowdescriptions
.
qosflowdescriptionscontents
);
return
;
return
;
}
}
...
@@ -1840,6 +1843,9 @@ void smf_context::handle_pdu_session_update_sm_context_request(
...
@@ -1840,6 +1843,9 @@ void smf_context::handle_pdu_session_update_sm_context_request(
//don't need to create a procedure to update UPF
//don't need to create a procedure to update UPF
free_wrapper
((
void
**
)
&
qos_flow_description
);
free_wrapper
((
void
**
)
&
qos_flow_description
);
free_wrapper
((
void
**
)
&
decoded_nas_msg
.
plain
.
sm
.
pdu_session_modification_request
.
qosflowdescriptions
.
qosflowdescriptionscontents
);
}
}
break
;
break
;
...
...
src/smf_app/smf_n1_n2.cpp
View file @
d0f0f33c
...
@@ -732,6 +732,7 @@ bool smf_n1_n2::create_n2_sm_information(pdu_session_msg &msg,
...
@@ -732,6 +732,7 @@ bool smf_n1_n2::create_n2_sm_information(pdu_session_msg &msg,
or
(
qos_flow
.
qfi
.
qfi
>
QOS_FLOW_IDENTIFIER_LAST
))
{
or
(
qos_flow
.
qfi
.
qfi
>
QOS_FLOW_IDENTIFIER_LAST
))
{
//error
//error
Logger
::
smf_app
().
error
(
"Incorrect QFI %d"
,
qos_flow
.
qfi
.
qfi
);
Logger
::
smf_app
().
error
(
"Incorrect QFI %d"
,
qos_flow
.
qfi
.
qfi
);
free_wrapper
((
void
**
)
&
ngap_IEs
);
return
false
;
return
false
;
}
}
...
...
src/udp/udp.hpp
View file @
d0f0f33c
...
@@ -63,6 +63,7 @@ public:
...
@@ -63,6 +63,7 @@ public:
udp_server
(
const
struct
in_addr
&
address
,
const
uint16_t
port_num
)
udp_server
(
const
struct
in_addr
&
address
,
const
uint16_t
port_num
)
:
app_
(
nullptr
),
port_
(
port_num
)
:
app_
(
nullptr
),
port_
(
port_num
)
{
{
recv_buffer_
[
0
]
=
0
;
socket_
=
create_socket
(
address
,
port_
);
socket_
=
create_socket
(
address
,
port_
);
if
(
socket_
>
0
)
{
if
(
socket_
>
0
)
{
Logger
::
udp
().
debug
(
"udp_server::udp_server(%s:%d)"
,
conv
::
toString
(
address
).
c_str
(),
port_
);
Logger
::
udp
().
debug
(
"udp_server::udp_server(%s:%d)"
,
conv
::
toString
(
address
).
c_str
(),
port_
);
...
@@ -74,6 +75,7 @@ public:
...
@@ -74,6 +75,7 @@ public:
}
}
}
}
//------------------------------------------------------------------------------
udp_server
(
const
struct
in6_addr
&
address
,
const
uint16_t
port_num
)
udp_server
(
const
struct
in6_addr
&
address
,
const
uint16_t
port_num
)
:
app_
(
nullptr
),
port_
(
port_num
)
:
app_
(
nullptr
),
port_
(
port_num
)
{
{
...
@@ -89,9 +91,11 @@ public:
...
@@ -89,9 +91,11 @@ public:
}
}
}
}
//------------------------------------------------------------------------------
udp_server
(
const
char
*
address
,
const
uint16_t
port_num
)
udp_server
(
const
char
*
address
,
const
uint16_t
port_num
)
:
app_
(
nullptr
),
port_
(
port_num
)
:
app_
(
nullptr
),
port_
(
port_num
)
{
{
recv_buffer_
[
0
]
=
0
;
socket_
=
create_socket
(
address
,
port_
);
socket_
=
create_socket
(
address
,
port_
);
if
(
socket_
>
0
)
{
if
(
socket_
>
0
)
{
Logger
::
udp
().
debug
(
"udp_server::udp_server(%s:%d)"
,
address
,
port_
);
Logger
::
udp
().
debug
(
"udp_server::udp_server(%s:%d)"
,
address
,
port_
);
...
@@ -109,6 +113,7 @@ public:
...
@@ -109,6 +113,7 @@ public:
void
udp_read_loop
(
const
util
::
thread_sched_params
&
thread_sched_params
);
void
udp_read_loop
(
const
util
::
thread_sched_params
&
thread_sched_params
);
//------------------------------------------------------------------------------
void
async_send_to
(
const
char
*
send_buffer
,
const
ssize_t
num_bytes
,
const
endpoint
&
r_endpoint
)
void
async_send_to
(
const
char
*
send_buffer
,
const
ssize_t
num_bytes
,
const
endpoint
&
r_endpoint
)
{
{
ssize_t
bytes_written
=
sendto
(
socket_
,
send_buffer
,
num_bytes
,
0
,
(
struct
sockaddr
*
)
&
r_endpoint
.
addr_storage
,
r_endpoint
.
addr_storage_len
);
ssize_t
bytes_written
=
sendto
(
socket_
,
send_buffer
,
num_bytes
,
0
,
(
struct
sockaddr
*
)
&
r_endpoint
.
addr_storage
,
r_endpoint
.
addr_storage_len
);
...
@@ -117,6 +122,7 @@ public:
...
@@ -117,6 +122,7 @@ public:
}
}
}
}
//------------------------------------------------------------------------------
void
async_send_to
(
const
char
*
send_buffer
,
const
ssize_t
num_bytes
,
const
struct
sockaddr_in
&
r_endpoint
)
void
async_send_to
(
const
char
*
send_buffer
,
const
ssize_t
num_bytes
,
const
struct
sockaddr_in
&
r_endpoint
)
{
{
ssize_t
bytes_written
=
sendto
(
socket_
,
send_buffer
,
num_bytes
,
0
,
(
struct
sockaddr
*
)
&
r_endpoint
,
sizeof
(
struct
sockaddr_in
));
ssize_t
bytes_written
=
sendto
(
socket_
,
send_buffer
,
num_bytes
,
0
,
(
struct
sockaddr
*
)
&
r_endpoint
,
sizeof
(
struct
sockaddr_in
));
...
@@ -125,6 +131,7 @@ public:
...
@@ -125,6 +131,7 @@ public:
}
}
}
}
//------------------------------------------------------------------------------
void
async_send_to
(
const
char
*
send_buffer
,
const
ssize_t
num_bytes
,
const
struct
sockaddr_in6
&
r_endpoint
)
void
async_send_to
(
const
char
*
send_buffer
,
const
ssize_t
num_bytes
,
const
struct
sockaddr_in6
&
r_endpoint
)
{
{
ssize_t
bytes_written
=
sendto
(
socket_
,
send_buffer
,
num_bytes
,
0
,
(
struct
sockaddr
*
)
&
r_endpoint
,
sizeof
(
struct
sockaddr_in6
));
ssize_t
bytes_written
=
sendto
(
socket_
,
send_buffer
,
num_bytes
,
0
,
(
struct
sockaddr
*
)
&
r_endpoint
,
sizeof
(
struct
sockaddr_in6
));
...
@@ -133,7 +140,6 @@ public:
...
@@ -133,7 +140,6 @@ public:
}
}
}
}
void
start_receive
(
udp_application
*
gtp_stack
,
const
util
::
thread_sched_params
&
sched_params
);
void
start_receive
(
udp_application
*
gtp_stack
,
const
util
::
thread_sched_params
&
sched_params
);
protected:
protected:
...
@@ -141,15 +147,12 @@ protected:
...
@@ -141,15 +147,12 @@ protected:
int
create_socket
(
const
struct
in6_addr
&
address
,
const
uint16_t
port
);
int
create_socket
(
const
struct
in6_addr
&
address
,
const
uint16_t
port
);
int
create_socket
(
const
char
*
address
,
const
uint16_t
port_num
);
int
create_socket
(
const
char
*
address
,
const
uint16_t
port_num
);
// void handle_receive(const int& error, std::size_t bytes_transferred);
static
void
handle_send
(
const
char
*
,
/*buffer*/
static
void
handle_send
(
const
char
*
,
/*buffer*/
const
int
&
/*error*/
,
const
int
&
/*error*/
,
std
::
size_t
/*bytes_transferred*/
)
std
::
size_t
/*bytes_transferred*/
)
{
{
}
}
udp_application
*
app_
;
udp_application
*
app_
;
std
::
thread
thread_
;
std
::
thread
thread_
;
int
socket_
;
int
socket_
;
...
...
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