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
86881999
Commit
86881999
authored
May 22, 2019
by
gauthier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debug logs of PFCP switch forwarding table
parent
3362058a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
10 deletions
+33
-10
src/spgwu/simpleswitch/pfcp_session.cpp
src/spgwu/simpleswitch/pfcp_session.cpp
+0
-6
src/spgwu/simpleswitch/pfcp_switch.cpp
src/spgwu/simpleswitch/pfcp_switch.cpp
+33
-4
No files found.
src/spgwu/simpleswitch/pfcp_session.cpp
View file @
86881999
...
@@ -296,12 +296,6 @@ void pfcp_session::cleanup()
...
@@ -296,12 +296,6 @@ void pfcp_session::cleanup()
std
::
string
pfcp_session
::
to_string
()
const
std
::
string
pfcp_session
::
to_string
()
const
{
{
std
::
string
s
=
{};
std
::
string
s
=
{};
s
.
append
(
"
\n
+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
\n
"
);
s
.
append
(
"| PFCP switch Packet Detection Rule list ordered by established sessions: |
\n
"
);
s
.
append
(
"+----------------+----+--------+--------+------------+---------------------------------------+----------------------+----------------+-------------------------------------------------------------+
\n
"
)
;
s
.
append
(
"| SEID |pdr | far |predence| action | create outer hdr tun id| rmv outer hdr tun id| UE IPv4 | |
\n
"
);
s
.
append
(
"+----------------+----+--------+--------+------------+---------------------------------------+----------------------+----------------+---------------------------------------------------------------------+
\n
"
);
//for (auto it_pdr : pdrs) {
for
(
std
::
vector
<
std
::
shared_ptr
<
pfcp
::
pfcp_pdr
>>::
const_iterator
it_pdr
=
pdrs
.
begin
();
it_pdr
!=
pdrs
.
end
();
++
it_pdr
)
{
for
(
std
::
vector
<
std
::
shared_ptr
<
pfcp
::
pfcp_pdr
>>::
const_iterator
it_pdr
=
pdrs
.
begin
();
it_pdr
!=
pdrs
.
end
();
++
it_pdr
)
{
s
.
append
(
fmt
::
format
(
"|{:016x}"
,
seid
));
// TODO continue this line
s
.
append
(
fmt
::
format
(
"|{:016x}"
,
seid
));
// TODO continue this line
std
::
shared_ptr
<
pfcp
::
pfcp_pdr
>
pdr
=
*
it_pdr
;
std
::
shared_ptr
<
pfcp
::
pfcp_pdr
>
pdr
=
*
it_pdr
;
...
...
src/spgwu/simpleswitch/pfcp_switch.cpp
View file @
86881999
...
@@ -592,8 +592,17 @@ void pfcp_switch::handle_pfcp_session_establishment_request(std::shared_ptr<itti
...
@@ -592,8 +592,17 @@ void pfcp_switch::handle_pfcp_session_establishment_request(std::shared_ptr<itti
||
(
cause
.
cause_value
==
CAUSE_VALUE_CONDITIONAL_IE_MISSING
)){
||
(
cause
.
cause_value
==
CAUSE_VALUE_CONDITIONAL_IE_MISSING
)){
resp
->
pfcp_ies
.
set
(
offending_ie
);
resp
->
pfcp_ies
.
set
(
offending_ie
);
}
}
// TODO warn may be huge, do a vector of string
Logger
::
pfcp_switch
().
info
(
to_string
());
#if DEBUG_IS_ON
std
::
cout
<<
"
\n
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+"
<<
std
::
endl
;
std
::
cout
<<
"| PFCP switch Packet Detection Rule list ordered by established sessions: |"
<<
std
::
endl
;
std
::
cout
<<
"+----------------+----+--------+--------+------------+---------------------------------------+----------------------+----------------+-------------------------------------------------------------+"
<<
std
::
endl
;
std
::
cout
<<
"| SEID |pdr | far |predence| action | create outer hdr tun id| rmv outer hdr tun id| UE IPv4 | |"
<<
std
::
endl
;
std
::
cout
<<
"+----------------+----+--------+--------+------------+---------------------------------------+----------------------+----------------+-------------------------------------------------------------+"
<<
std
::
endl
;
for
(
const
auto
&
it
:
up_seid2pfcp_sessions
)
{
std
::
cout
<<
it
.
second
->
to_string
()
<<
std
::
endl
;
}
#endif
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
pfcp_switch
::
handle_pfcp_session_modification_request
(
std
::
shared_ptr
<
itti_sxab_session_modification_request
>
sreq
,
itti_sxab_session_modification_response
*
resp
)
void
pfcp_switch
::
handle_pfcp_session_modification_request
(
std
::
shared_ptr
<
itti_sxab_session_modification_request
>
sreq
,
itti_sxab_session_modification_response
*
resp
)
...
@@ -718,7 +727,17 @@ void pfcp_switch::handle_pfcp_session_modification_request(std::shared_ptr<itti_
...
@@ -718,7 +727,17 @@ void pfcp_switch::handle_pfcp_session_modification_request(std::shared_ptr<itti_
||
(
cause
.
cause_value
==
CAUSE_VALUE_CONDITIONAL_IE_MISSING
)){
||
(
cause
.
cause_value
==
CAUSE_VALUE_CONDITIONAL_IE_MISSING
)){
resp
->
pfcp_ies
.
set
(
offending_ie
);
resp
->
pfcp_ies
.
set
(
offending_ie
);
}
}
Logger
::
pfcp_switch
().
info
(
to_string
());
#if DEBUG_IS_ON
std
::
cout
<<
"
\n
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+"
<<
std
::
endl
;
std
::
cout
<<
"| PFCP switch Packet Detection Rule list ordered by established sessions: |"
<<
std
::
endl
;
std
::
cout
<<
"+----------------+----+--------+--------+------------+---------------------------------------+----------------------+----------------+-------------------------------------------------------------+"
<<
std
::
endl
;
std
::
cout
<<
"| SEID |pdr | far |predence| action | create outer hdr tun id| rmv outer hdr tun id| UE IPv4 | |"
<<
std
::
endl
;
std
::
cout
<<
"+----------------+----+--------+--------+------------+---------------------------------------+----------------------+----------------+-------------------------------------------------------------+"
<<
std
::
endl
;
for
(
const
auto
&
it
:
up_seid2pfcp_sessions
)
{
std
::
cout
<<
it
.
second
->
to_string
()
<<
std
::
endl
;
}
#endif
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
pfcp_switch
::
handle_pfcp_session_deletion_request
(
std
::
shared_ptr
<
itti_sxab_session_deletion_request
>
sreq
,
itti_sxab_session_deletion_response
*
resp
)
void
pfcp_switch
::
handle_pfcp_session_deletion_request
(
std
::
shared_ptr
<
itti_sxab_session_deletion_request
>
sreq
,
itti_sxab_session_deletion_response
*
resp
)
...
@@ -739,7 +758,17 @@ void pfcp_switch::handle_pfcp_session_deletion_request(std::shared_ptr<itti_sxab
...
@@ -739,7 +758,17 @@ void pfcp_switch::handle_pfcp_session_deletion_request(std::shared_ptr<itti_sxab
}
}
pfcp_associations
::
get_instance
().
notify_del_session
(
fseid
);
pfcp_associations
::
get_instance
().
notify_del_session
(
fseid
);
resp
->
pfcp_ies
.
set
(
cause
);
resp
->
pfcp_ies
.
set
(
cause
);
Logger
::
pfcp_switch
().
info
(
to_string
());
#if DEBUG_IS_ON
std
::
cout
<<
"
\n
+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+"
<<
std
::
endl
;
std
::
cout
<<
"| PFCP switch Packet Detection Rule list ordered by established sessions: |"
<<
std
::
endl
;
std
::
cout
<<
"+----------------+----+--------+--------+------------+---------------------------------------+----------------------+----------------+-------------------------------------------------------------+"
<<
std
::
endl
;
std
::
cout
<<
"| SEID |pdr | far |predence| action | create outer hdr tun id| rmv outer hdr tun id| UE IPv4 | |"
<<
std
::
endl
;
std
::
cout
<<
"+----------------+----+--------+--------+------------+---------------------------------------+----------------------+----------------+-------------------------------------------------------------+"
<<
std
::
endl
;
for
(
const
auto
&
it
:
up_seid2pfcp_sessions
)
{
std
::
cout
<<
it
.
second
->
to_string
()
<<
std
::
endl
;
}
#endif
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
pfcp_switch
::
pfcp_session_look_up_pack_in_access
(
struct
iphdr
*
const
iph
,
const
std
::
size_t
num_bytes
,
const
endpoint
&
r_endpoint
,
const
uint32_t
tunnel_id
)
void
pfcp_switch
::
pfcp_session_look_up_pack_in_access
(
struct
iphdr
*
const
iph
,
const
std
::
size_t
num_bytes
,
const
endpoint
&
r_endpoint
,
const
uint32_t
tunnel_id
)
...
...
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