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
1fb86a55
Commit
1fb86a55
authored
Nov 24, 2020
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code cleanup
parent
8b47068f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2 additions
and
94 deletions
+2
-94
src/common/utils/3gpp_conversions.cpp
src/common/utils/3gpp_conversions.cpp
+0
-76
src/common/utils/3gpp_conversions.hpp
src/common/utils/3gpp_conversions.hpp
+0
-5
src/smf_app/smf_procedure.cpp
src/smf_app/smf_procedure.cpp
+2
-12
src/smf_app/smf_procedure.hpp
src/smf_app/smf_procedure.hpp
+0
-1
No files found.
src/common/utils/3gpp_conversions.cpp
View file @
1fb86a55
...
...
@@ -84,80 +84,4 @@ void xgpp_conv::pdn_ip_to_pfcp_ue_ip_address(
;
}
}
//------------------------------------------------------------------------------
void
xgpp_conv
::
pfcp_to_core_fteid
(
const
pfcp
::
fteid_t
&
pfteid
,
fteid_t
&
fteid
)
{
fteid
.
v4
=
pfteid
.
v4
;
fteid
.
v6
=
pfteid
.
v6
;
fteid
.
ipv4_address
.
s_addr
=
pfteid
.
ipv4_address
.
s_addr
;
fteid
.
ipv6_address
=
pfteid
.
ipv6_address
;
fteid
.
teid_gre_key
=
pfteid
.
teid
;
}
//------------------------------------------------------------------------------
void
xgpp_conv
::
pfcp_from_core_fteid
(
pfcp
::
fteid_t
&
pfteid
,
const
fteid_t
&
fteid
)
{
pfteid
.
chid
=
0
;
pfteid
.
ch
=
0
;
pfteid
.
choose_id
=
0
;
pfteid
.
v4
=
fteid
.
v4
;
pfteid
.
v6
=
fteid
.
v6
;
pfteid
.
ipv4_address
.
s_addr
=
fteid
.
ipv4_address
.
s_addr
;
pfteid
.
ipv6_address
=
fteid
.
ipv6_address
;
pfteid
.
teid
=
fteid
.
teid_gre_key
;
}
//------------------------------------------------------------------------------
void
xgpp_conv
::
pfcp_cause_to_core_cause
(
const
pfcp
::
cause_t
&
pc
,
cause_t
&
c
)
{
switch
(
pc
.
cause_value
)
{
case
pfcp
:
:
CAUSE_VALUE_REQUEST_ACCEPTED
:
c
.
cause_value
=
REQUEST_ACCEPTED
;
break
;
case
pfcp
:
:
CAUSE_VALUE_REQUEST_REJECTED
:
c
.
cause_value
=
REQUEST_REJECTED
;
break
;
case
pfcp
:
:
CAUSE_VALUE_SESSION_CONTEXT_NOT_FOUND
:
case
pfcp
:
:
CAUSE_VALUE_MANDATORY_IE_MISSING
:
case
pfcp
:
:
CAUSE_VALUE_CONDITIONAL_IE_MISSING
:
case
pfcp
:
:
CAUSE_VALUE_INVALID_LENGTH
:
case
pfcp
:
:
CAUSE_VALUE_MANDATORY_IE_INCORRECT
:
case
pfcp
:
:
CAUSE_VALUE_INVALID_FORWARDING_POLICY
:
case
pfcp
:
:
CAUSE_VALUE_INVALID_FTEID_ALLOCATION_OPTION
:
case
pfcp
:
:
CAUSE_VALUE_NO_ESTABLISHED_PFCP_ASSOCIATION
:
case
pfcp
:
:
CAUSE_VALUE_RULE_CREATION_MODIFICATION_FAILURE
:
c
.
cause_value
=
SYSTEM_FAILURE
;
// ?
break
;
case
pfcp
:
:
CAUSE_VALUE_PFCP_ENTITY_IN_CONGESTION
:
c
.
cause_value
=
APN_CONGESTION
;
// ? ...
break
;
case
pfcp
:
:
CAUSE_VALUE_NO_RESOURCES_AVAILABLE
:
case
pfcp
:
:
CAUSE_VALUE_SERVICE_NOT_SUPPORTED
:
case
pfcp
:
:
CAUSE_VALUE_SYSTEM_FAILURE
:
default:
c
.
cause_value
=
SYSTEM_FAILURE
;
// ? ...
}
}
//------------------------------------------------------------------------------
bool
xgpp_conv
::
endpoint_to_gtp_u_peer_address
(
const
endpoint
&
ep
,
gtp_u_peer_address_t
&
peer_address
)
{
switch
(
ep
.
family
())
{
case
AF_INET
:
{
const
struct
sockaddr_in
*
const
sin
=
reinterpret_cast
<
const
sockaddr_in
*
const
>
(
&
ep
.
addr_storage
);
peer_address
.
ipv4_address
.
s_addr
=
sin
->
sin_addr
.
s_addr
;
peer_address
.
is_v4
=
true
;
return
true
;
}
break
;
case
AF_INET6
:
{
const
struct
sockaddr_in6
*
const
sin6
=
reinterpret_cast
<
const
sockaddr_in6
*
const
>
(
&
ep
.
addr_storage
);
peer_address
.
ipv6_address
=
sin6
->
sin6_addr
;
peer_address
.
is_v4
=
false
;
return
true
;
}
break
;
default:
return
false
;
}
}
src/common/utils/3gpp_conversions.hpp
View file @
1fb86a55
...
...
@@ -42,11 +42,6 @@ void pdn_ip_to_pfcp_ue_ip_address(const pdu_session_type_t &pdu_session_type,
const
struct
in_addr
&
ipv4_address
,
const
struct
in6_addr
ipv6_address
,
pfcp
::
ue_ip_address_t
&
ue_ip_address
);
void
pfcp_to_core_fteid
(
const
pfcp
::
fteid_t
&
pfteid
,
fteid_t
&
fteid
);
void
pfcp_from_core_fteid
(
pfcp
::
fteid_t
&
pfteid
,
const
fteid_t
&
fteid
);
void
pfcp_cause_to_core_cause
(
const
pfcp
::
cause_t
&
pc
,
cause_t
&
c
);
bool
endpoint_to_gtp_u_peer_address
(
const
endpoint
&
ep
,
gtp_u_peer_address_t
&
gpa
);
}
#endif
/* FILE_3GPP_CONVERSIONS_HPP_SEEN */
src/smf_app/smf_procedure.cpp
View file @
1fb86a55
...
...
@@ -850,12 +850,7 @@ void session_update_sm_context_procedure::handle_itti_msg(
n11_trigger
.
get
()
->
req
.
get_pdu_session_id
());
pfcp
::
cause_t
cause
=
{
};
::
cause_t
cause_gtp
=
{
.
cause_value
=
REQUEST_ACCEPTED
};
// must be there
if
(
resp
.
pfcp_ies
.
get
(
cause
))
{
xgpp_conv
::
pfcp_cause_to_core_cause
(
cause
,
cause_gtp
);
}
resp
.
pfcp_ies
.
get
(
cause
);
//list of accepted QFI(s) and AN Tunnel Info corresponding to the PDU Session
std
::
vector
<
pfcp
::
qfi_t
>
list_of_qfis_to_be_modified
=
{
};
...
...
@@ -1246,12 +1241,7 @@ void session_release_sm_context_procedure::handle_itti_msg(
n11_trigger
.
get
()
->
req
.
get_pdu_session_id
());
pfcp
::
cause_t
cause
=
{
};
::
cause_t
cause_gtp
=
{
.
cause_value
=
REQUEST_ACCEPTED
};
// must be there
if
(
resp
.
pfcp_ies
.
get
(
cause
))
{
xgpp_conv
::
pfcp_cause_to_core_cause
(
cause
,
cause_gtp
);
}
resp
.
pfcp_ies
.
get
(
cause
);
if
(
cause
.
cause_value
==
CAUSE_VALUE_REQUEST_ACCEPTED
)
{
Logger
::
smf_app
().
info
(
"PDU Session Release SM Context accepted by UPF"
);
...
...
src/smf_app/smf_procedure.hpp
View file @
1fb86a55
...
...
@@ -34,7 +34,6 @@
#include <set>
#include "3gpp_29.244.hpp"
//#include "3gpp_29.274.hpp"
#include "itti_msg_n11.hpp"
#include "itti_msg_n4.hpp"
#include "itti_msg_n4_restore.hpp"
...
...
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