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
db28ce0d
Commit
db28ce0d
authored
Mar 25, 2020
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
polish App, Context
parent
87176c72
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
282 additions
and
46 deletions
+282
-46
src/smf_app/smf_app.cpp
src/smf_app/smf_app.cpp
+3
-1
src/smf_app/smf_context.cpp
src/smf_app/smf_context.cpp
+227
-40
src/smf_app/smf_context.hpp
src/smf_app/smf_context.hpp
+52
-5
No files found.
src/smf_app/smf_app.cpp
View file @
db28ce0d
...
...
@@ -409,7 +409,7 @@ void smf_app::handle_itti_msg (itti_n11_n1n2_message_transfer_response_status& m
if
(
m
.
msg_type
==
PDU_SESSION_ESTABLISHMENT_REJECT
){
status
=
pdu_session_status_e
::
PDU_SESSION_INACTIVE
;
}
else
if
(
m
.
msg_type
==
PDU_SESSION_ESTABLISHMENT_ACCEPT
){
status
=
pdu_session_status_e
::
PDU_SESSION_
ACTIVE
;
status
=
pdu_session_status_e
::
PDU_SESSION_
ESTABLISHMENT_PENDING
;
}
update_pdu_session_status
(
m
.
scid
,
status
);
Logger
::
smf_app
().
debug
(
"Got successful response from AMF (Response code %d), set session status to %s"
,
m
.
response_code
,
pdu_session_status_e2str
[
static_cast
<
int
>
(
status
)].
c_str
());
...
...
@@ -542,6 +542,8 @@ void smf_app::handle_pdu_session_create_sm_context_request(std::shared_ptr<itti_
//return
}
//TODO: store UE 5GSM Capability
//TODO: For the moment, not support PDU session authentication and authorization by the external DN
//Step 3. check if the DNN requested is valid
...
...
src/smf_app/smf_context.cpp
View file @
db28ce0d
This diff is collapsed.
Click to expand it.
src/smf_app/smf_context.hpp
View file @
db28ce0d
...
...
@@ -50,9 +50,13 @@
#include "pistache/http.h"
#include "pistache/router.h"
#include "SmContextCreateError.h"
#include "smf_msg.hpp"
//
#include "smf_msg.hpp"
#include "itti.hpp"
#include "msg_pfcp.hpp"
extern
"C"
{
#include "QOSRules.h"
}
namespace
smf
{
...
...
@@ -65,7 +69,6 @@ public:
void
clear
()
{
ul_fteid
=
{};
dl_fteid
=
{};
eps_bearer_qos
=
{};
pdr_id_ul
=
{};
pdr_id_dl
=
{};
precedence
=
{};
...
...
@@ -83,8 +86,6 @@ public:
fteid_t
ul_fteid
;
//fteid of UPF
fteid_t
dl_fteid
;
//fteid of AN
bearer_qos_t
eps_bearer_qos
;
// EPS Bearer QoS: ARP, GBR, MBR, QCI.
// PFCP
// Packet Detection Rule ID
pfcp
::
pdr_id_t
pdr_id_ul
;
...
...
@@ -97,8 +98,30 @@ public:
bool
released
;
// finally seems necessary, TODO try to find heuristic ?
pdu_session_id_t
pdu_session_id
;
//qos_rules[0]: default rule
std
::
vector
<
QOSRulesIE
>
qos_rules
;
//QoS profile
qos_profile_t
qos_profile
;
//cause
uint8_t
cause_value
;
};
/*
typedef struct qos_flow_s {
pfcp::qfi_t qfi; //QoS Flow Identifier
//qos_rules[0]: default rule
std::vector<QOSRulesIE> qos_rules;
//QoS profile
qos_profile_t qos_profile;
//pfcp::create_pdr pdr;
//pfcp::create_far far;
} qos_flow_t;
*/
class
smf_pdu_session
:
public
std
::
enable_shared_from_this
<
smf_pdu_session
>
{
public:
...
...
@@ -131,6 +154,7 @@ public:
bool
get_qos_flow
(
const
pfcp
::
qfi_t
&
qfi
,
smf_qos_flow
&
q
);
void
add_qos_flow
(
smf_qos_flow
&
flow
);
smf_qos_flow
&
get_qos_flow
(
const
pfcp
::
qfi_t
&
qfi
);
void
get_qos_flows
(
std
::
vector
<
smf_qos_flow
>&
flows
);
bool
find_qos_flow
(
const
pfcp
::
pdr_id_t
&
pdr_id
,
smf_qos_flow
&
flow
);
bool
has_qos_flow
(
const
pfcp
::
pdr_id_t
&
pdr_id
,
pfcp
::
qfi_t
&
qfi
);
...
...
@@ -171,6 +195,9 @@ public:
void
release_far_id
(
const
pfcp
::
far_id_t
&
far_id
);
void
insert_procedure
(
smf_procedure
*
proc
);
void
generate_qos_rule_id
(
uint8_t
&
rule_id
);
void
release_qos_rule_id
(
const
uint8_t
&
rule_id
);
bool
ipv4
;
// IP Address(es): IPv4 address and/or IPv6 prefix
bool
ipv6
;
// IP Address(es): IPv4 address and/or IPv6 prefix
struct
in_addr
ipv4_address
;
// IP Address(es): IPv4 address and/or IPv6 prefix
...
...
@@ -223,6 +250,14 @@ public:
//N3 tunnel status (ACTIVATED, DEACTIVATED, ACTIVATING)
upCnx_state_e
upCnx_state
;
//5GSM parameters and capabilities
uint8_t
maximum_number_of_supported_packet_filters
;
//TODO: 5GSM Capability (section 9.11.4.1@3GPP TS 24.501 V16.1.0)
//TODO: Integrity protection maximum data rate (section 9.11.4.7@@3GPP TS 24.501 V16.1.0)
//number_of_supported_packet_filters
uint8_t
number_of_supported_packet_filters
;
util
::
uint_generator
<
uint32_t
>
qos_rule_id_generator
;
};
...
...
@@ -233,6 +268,7 @@ public:
void
find_dnn_configuration
(
std
::
string
dnn
,
std
::
shared_ptr
<
dnn_configuration_t
>&
dnn_configuration
);
private:
snssai_t
single_nssai
;
//dnn <->dnn_configuration
std
::
map
<
std
::
string
,
std
::
shared_ptr
<
dnn_configuration_t
>>
dnn_configurations
;
};
...
...
@@ -276,7 +312,7 @@ class smf_context;
class
smf_context
:
public
std
::
enable_shared_from_this
<
smf_context
>
{
public:
smf_context
()
:
m_context
(),
imsi
(),
imsi_unauthenticated_indicator
(
false
),
pending_procedures
(),
msisdn
(),
dnn_subscriptions
()
{}
smf_context
()
:
m_context
(),
imsi
(),
imsi_unauthenticated_indicator
(
false
),
pending_procedures
(),
msisdn
(),
dnn_subscriptions
()
,
scid
(
0
)
{}
smf_context
(
smf_context
&
b
)
=
delete
;
...
...
@@ -386,6 +422,13 @@ public:
void
set_scid
(
scid_t
const
&
id
);
scid_t
get_scid
()
const
;
/*
* Get the default QoS Rule for all QFIs
* @param [QOSRulesIE] qos_rule
* @return void
*/
void
get_default_qos_rule
(
QOSRulesIE
&
qos_rule
,
uint8_t
pdu_session_type
);
private:
std
::
vector
<
std
::
shared_ptr
<
dnn_context
>>
dnns
;
...
...
@@ -412,6 +455,10 @@ private:
supi_t
supi
;
scid_t
scid
;
//list of QOSRules (QFI<->Rule)
//std::map<uint8_t, QOSRulesIE> qos_rules;
};
}
...
...
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