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-Simple
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
CommunityXG
OpenXG-SMF-Simple
Commits
a7c8a089
Commit
a7c8a089
authored
Feb 25, 2021
by
Rohan
Committed by
Rohan
Mar 18, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IE Enterprise Specific - optional decoding in pfcp asscociation req/resp
parent
ba332d2a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
80 additions
and
2 deletions
+80
-2
src/pfcp/msg_pfcp.hpp
src/pfcp/msg_pfcp.hpp
+30
-2
src/smf_app/smf_n4.cpp
src/smf_app/smf_n4.cpp
+12
-0
src/smf_app/smf_pfcp_association.cpp
src/smf_app/smf_pfcp_association.cpp
+32
-0
src/smf_app/smf_pfcp_association.hpp
src/smf_app/smf_pfcp_association.hpp
+6
-0
No files found.
src/pfcp/msg_pfcp.hpp
View file @
a7c8a089
...
...
@@ -5566,13 +5566,15 @@ class pfcp_association_setup_request : public pfcp_ies_container {
std
::
pair
<
bool
,
pfcp
::
cp_function_features_t
>
cp_function_features
;
std
::
pair
<
bool
,
pfcp
::
user_plane_ip_resource_information_t
>
user_plane_ip_resource_information
;
std
::
pair
<
bool
,
pfcp
::
enterprise_specific_t
>
enterprise_specific
;
pfcp_association_setup_request
()
:
node_id
(),
recovery_time_stamp
(),
up_function_features
(),
cp_function_features
(),
user_plane_ip_resource_information
()
{}
user_plane_ip_resource_information
(),
enterprise_specific
()
{}
pfcp_association_setup_request
(
const
pfcp_association_setup_request
&
i
)
{
node_id
=
i
.
node_id
;
...
...
@@ -5580,6 +5582,7 @@ class pfcp_association_setup_request : public pfcp_ies_container {
up_function_features
=
i
.
up_function_features
;
cp_function_features
=
i
.
cp_function_features
;
user_plane_ip_resource_information
=
i
.
user_plane_ip_resource_information
;
enterprise_specific
=
i
.
enterprise_specific
;
}
const
char
*
get_msg_name
()
const
{
return
"PFCP_ASSOCIATION_SETUP_REQUEST"
;
};
...
...
@@ -5618,6 +5621,13 @@ class pfcp_association_setup_request : public pfcp_ies_container {
}
return
false
;
}
bool
get
(
pfcp
::
enterprise_specific_t
&
v
)
const
{
if
(
enterprise_specific
.
first
)
{
v
=
enterprise_specific
.
second
;
return
true
;
}
return
false
;
}
void
set
(
const
pfcp
::
node_id_t
&
v
)
{
node_id
.
first
=
true
;
...
...
@@ -5639,6 +5649,10 @@ class pfcp_association_setup_request : public pfcp_ies_container {
user_plane_ip_resource_information
.
first
=
true
;
user_plane_ip_resource_information
.
second
=
v
;
}
void
set
(
const
pfcp
::
enterprise_specific_t
&
v
)
{
enterprise_specific
.
first
=
true
;
enterprise_specific
.
second
=
v
;
}
};
//------------------------------------------------------------------------------
...
...
@@ -5653,6 +5667,7 @@ class pfcp_association_setup_response : public pfcp_ies_container {
std
::
pair
<
bool
,
pfcp
::
cp_function_features_t
>
cp_function_features
;
std
::
pair
<
bool
,
pfcp
::
user_plane_ip_resource_information_t
>
user_plane_ip_resource_information
;
std
::
pair
<
bool
,
pfcp
::
enterprise_specific_t
>
enterprise_specific
;
pfcp_association_setup_response
()
:
node_id
(),
...
...
@@ -5660,7 +5675,8 @@ class pfcp_association_setup_response : public pfcp_ies_container {
recovery_time_stamp
(),
up_function_features
(),
cp_function_features
(),
user_plane_ip_resource_information
()
{}
user_plane_ip_resource_information
(),
enterprise_specific
()
{}
pfcp_association_setup_response
(
const
pfcp_association_setup_response
&
i
)
{
node_id
=
i
.
node_id
;
...
...
@@ -5669,6 +5685,7 @@ class pfcp_association_setup_response : public pfcp_ies_container {
up_function_features
=
i
.
up_function_features
;
cp_function_features
=
i
.
cp_function_features
;
user_plane_ip_resource_information
=
i
.
user_plane_ip_resource_information
;
enterprise_specific
=
i
.
enterprise_specific
;
}
const
char
*
get_msg_name
()
const
{
return
"PFCP_ASSOCIATION_SETUP_RESPONSE"
;
...
...
@@ -5716,6 +5733,13 @@ class pfcp_association_setup_response : public pfcp_ies_container {
}
return
false
;
}
bool
get
(
pfcp
::
enterprise_specific_t
&
v
)
const
{
if
(
enterprise_specific
.
first
)
{
v
=
enterprise_specific
.
second
;
return
true
;
}
return
false
;
}
void
set
(
const
pfcp
::
node_id_t
&
v
)
{
node_id
.
first
=
true
;
...
...
@@ -5741,6 +5765,10 @@ class pfcp_association_setup_response : public pfcp_ies_container {
user_plane_ip_resource_information
.
first
=
true
;
user_plane_ip_resource_information
.
second
=
v
;
}
void
set
(
const
pfcp
::
enterprise_specific_t
&
v
)
{
enterprise_specific
.
first
=
true
;
enterprise_specific
.
second
=
v
;
}
};
//------------------------------------------------------------------------------
...
...
src/smf_app/smf_n4.cpp
View file @
a7c8a089
...
...
@@ -372,6 +372,12 @@ void smf_n4::handle_receive_association_setup_request(
msg_ies_container
.
node_id
.
second
,
msg_ies_container
.
recovery_time_stamp
.
second
,
msg_ies_container
.
up_function_features
.
second
,
restore_n4_sessions
);
}
else
if
(
msg_ies_container
.
enterprise_specific
.
first
)
{
pfcp_associations
::
get_instance
().
add_association
(
msg_ies_container
.
node_id
.
second
,
msg_ies_container
.
recovery_time_stamp
.
second
,
msg_ies_container
.
up_function_features
.
second
,
msg_ies_container
.
enterprise_specific
.
second
,
restore_n4_sessions
);
}
else
{
pfcp_associations
::
get_instance
().
add_association
(
msg_ies_container
.
node_id
.
second
,
...
...
@@ -446,6 +452,12 @@ void smf_n4::handle_receive_association_setup_response(
msg_ies_container
.
node_id
.
second
,
msg_ies_container
.
recovery_time_stamp
.
second
,
msg_ies_container
.
up_function_features
.
second
,
restore_n4_sessions
);
}
else
if
(
msg_ies_container
.
enterprise_specific
.
first
)
{
pfcp_associations
::
get_instance
().
add_association
(
msg_ies_container
.
node_id
.
second
,
msg_ies_container
.
recovery_time_stamp
.
second
,
msg_ies_container
.
up_function_features
.
second
,
msg_ies_container
.
enterprise_specific
.
second
,
restore_n4_sessions
);
}
else
{
pfcp_associations
::
get_instance
().
add_association
(
msg_ies_container
.
node_id
.
second
,
...
...
src/smf_app/smf_pfcp_association.cpp
View file @
a7c8a089
...
...
@@ -215,6 +215,38 @@ bool pfcp_associations::add_association(
}
return
true
;
}
//------------------------------------------------------------------------------
bool
pfcp_associations
::
add_association
(
pfcp
::
node_id_t
&
node_id
,
pfcp
::
recovery_time_stamp_t
&
recovery_time_stamp
,
pfcp
::
up_function_features_s
&
function_features
,
pfcp
::
enterprise_specific_s
&
enterprise_specific
,
bool
&
restore_n4_sessions
)
{
std
::
shared_ptr
<
pfcp_association
>
sa
=
std
::
shared_ptr
<
pfcp_association
>
(
nullptr
);
if
(
get_association
(
node_id
,
sa
))
{
itti_inst
->
timer_remove
(
sa
->
timer_heartbeat
);
if
(
sa
->
recovery_time_stamp
==
recovery_time_stamp
)
{
restore_n4_sessions
=
false
;
}
else
{
restore_n4_sessions
=
true
;
}
sa
->
recovery_time_stamp
=
recovery_time_stamp
;
sa
->
function_features
.
first
=
true
;
sa
->
function_features
.
second
=
function_features
;
}
else
{
restore_n4_sessions
=
false
;
pfcp_association
*
association
=
new
pfcp_association
(
node_id
,
recovery_time_stamp
,
function_features
);
sa
=
std
::
shared_ptr
<
pfcp_association
>
(
association
);
sa
->
recovery_time_stamp
=
recovery_time_stamp
;
sa
->
function_features
.
first
=
true
;
sa
->
function_features
.
second
=
function_features
;
std
::
size_t
hash_node_id
=
std
::
hash
<
pfcp
::
node_id_t
>
{}(
node_id
);
associations
.
insert
((
int32_t
)
hash_node_id
,
sa
);
trigger_heartbeat_request_procedure
(
sa
);
}
return
true
;
}
//------------------------------------------------------------------------------
bool
pfcp_associations
::
update_association
(
...
...
src/smf_app/smf_pfcp_association.hpp
View file @
a7c8a089
...
...
@@ -190,6 +190,12 @@ class pfcp_associations {
pfcp
::
recovery_time_stamp_t
&
recovery_time_stamp
,
pfcp
::
up_function_features_s
&
function_features
,
bool
&
restore_n4_sessions
);
bool
add_association
(
pfcp
::
node_id_t
&
node_id
,
pfcp
::
recovery_time_stamp_t
&
recovery_time_stamp
,
pfcp
::
up_function_features_s
&
function_features
,
pfcp
::
enterprise_specific_s
&
enterprise_specific
,
bool
&
restore_n4_sessions
);
bool
update_association
(
pfcp
::
node_id_t
&
node_id
,
pfcp
::
up_function_features_s
&
function_features
);
...
...
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