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
a9935948
Commit
a9935948
authored
Jan 27, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code cleanup after testing
parent
93911a2a
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
776 additions
and
1246 deletions
+776
-1246
src/smf_app/smf_app.cpp
src/smf_app/smf_app.cpp
+3
-3
src/smf_app/smf_context.cpp
src/smf_app/smf_context.cpp
+624
-1193
src/smf_app/smf_context.hpp
src/smf_app/smf_context.hpp
+149
-50
No files found.
src/smf_app/smf_app.cpp
View file @
a9935948
...
...
@@ -631,10 +631,10 @@ void smf_app::handle_pdu_session_create_sm_context_request(
PDU_SESSION_TYPE_E_IPV4
};
// Step 1. Decode NAS and get the necessary information
// std::string n1_sm_msg = smreq->req.get_n1_sm_message();
// std::string n1_sm_msg = smreq->req.get_n1_sm_message();
int
decoder_rc
=
smf_n1
::
get_instance
().
decode_n1_sm_container
(
decoded_nas_msg
,
smreq
->
req
.
get_n1_sm_message
());
int
decoder_rc
=
smf_n1
::
get_instance
().
decode_n1_sm_container
(
decoded_nas_msg
,
smreq
->
req
.
get_n1_sm_message
());
// Failed to decode, send reply to AMF with PDU Session Establishment Reject
if
(
decoder_rc
!=
RETURNok
)
{
...
...
src/smf_app/smf_context.cpp
View file @
a9935948
This diff is collapsed.
Click to expand it.
src/smf_app/smf_context.hpp
View file @
a9935948
...
...
@@ -648,6 +648,146 @@ class smf_context : public std::enable_shared_from_this<smf_context> {
void
handle_pdu_session_modification_network_requested
(
std
::
shared_ptr
<
itti_nx_trigger_pdu_session_modification
>
msg
);
/*
* Handle PDU Session Modification Request
* @param [nas_message_t&] nas_msg: NAS message received from AMF
* @param [std::shared_ptr<itti_n11_update_sm_context_request>&]
* sm_context_request: Request message
* @param [std::shared_ptr<itti_n11_update_sm_context_response>&]
* sm_context_resp: Response message
* @param [std::shared_ptr<smf_pdu_session>&] sp: PDU session
* @return True if handle successful, otherwise return false
*/
bool
handle_pdu_session_modification_request
(
nas_message_t
&
nas_msg
,
std
::
shared_ptr
<
itti_n11_update_sm_context_request
>&
sm_context_request
,
std
::
shared_ptr
<
itti_n11_update_sm_context_response
>&
sm_context_resp
,
std
::
shared_ptr
<
smf_pdu_session
>&
sp
);
/*
* Handle PDU Session Modification Complete
* @param [nas_message_t&] nas_msg: NAS message received from AMF
* @param [std::shared_ptr<itti_n11_update_sm_context_request>&]
* sm_context_request: Request message
* @param [std::shared_ptr<itti_n11_update_sm_context_response>&]
* sm_context_resp: Response message
* @param [std::shared_ptr<smf_pdu_session>&] sp: PDU session
* @return True if handle successful, otherwise return false
*/
bool
handle_pdu_session_modification_complete
(
nas_message_t
&
nas_msg
,
std
::
shared_ptr
<
itti_n11_update_sm_context_request
>&
sm_context_request
,
std
::
shared_ptr
<
itti_n11_update_sm_context_response
>&
sm_context_resp
,
std
::
shared_ptr
<
smf_pdu_session
>&
sp
);
/*
* Handle PDU Session Modification Command Reject
* @param [nas_message_t&] nas_msg: NAS message received from AMF
* @param [std::shared_ptr<itti_n11_update_sm_context_request>&]
* sm_context_request: Request message
* @param [std::shared_ptr<itti_n11_update_sm_context_response>&]
* sm_context_resp: Response message
* @param [std::shared_ptr<smf_pdu_session>&] sp: PDU session
* @return True if handle successful, otherwise return false
*/
bool
handle_pdu_session_modification_command_reject
(
nas_message_t
&
nas_msg
,
std
::
shared_ptr
<
itti_n11_update_sm_context_request
>&
sm_context_request
,
std
::
shared_ptr
<
itti_n11_update_sm_context_response
>&
sm_context_resp
,
std
::
shared_ptr
<
smf_pdu_session
>&
sp
);
/*
* Handle PDU Session Release Request
* @param [nas_message_t&] nas_msg: NAS message received from AMF
* @param [std::shared_ptr<itti_n11_update_sm_context_request>&]
* sm_context_request: Request message
* @param [std::shared_ptr<itti_n11_update_sm_context_response>&]
* sm_context_resp: Response message
* @param [std::shared_ptr<smf_pdu_session>&] sp: PDU session
* @return True if handle successful, otherwise return false
*/
bool
handle_pdu_session_release_request
(
nas_message_t
&
nas_msg
,
std
::
shared_ptr
<
itti_n11_update_sm_context_request
>&
sm_context_request
,
std
::
shared_ptr
<
itti_n11_update_sm_context_response
>&
sm_context_resp
,
std
::
shared_ptr
<
smf_pdu_session
>&
sp
);
/*
* Handle PDU Session Release Complete
* @param [nas_message_t&] nas_msg: NAS message received from AMF
* @param [std::shared_ptr<itti_n11_update_sm_context_request>&]
* sm_context_request: Request message
* @param [std::shared_ptr<itti_n11_update_sm_context_response>&]
* sm_context_resp: Response message
* @param [std::shared_ptr<smf_pdu_session>&] sp: PDU session
* @return True if handle successful, otherwise return false
*/
bool
handle_pdu_session_release_complete
(
nas_message_t
&
nas_msg
,
std
::
shared_ptr
<
itti_n11_update_sm_context_request
>&
sm_context_request
,
std
::
shared_ptr
<
itti_n11_update_sm_context_response
>&
sm_context_resp
,
std
::
shared_ptr
<
smf_pdu_session
>&
sp
);
/*
* Handle Service Request
* @param [std::string&] n2_sm_information: NGAP message in form of string
* @param [std::shared_ptr<itti_n11_update_sm_context_request>&]
* sm_context_request: Request message
* @param [std::shared_ptr<itti_n11_update_sm_context_response>&]
* sm_context_resp: Response message
* @param [std::shared_ptr<smf_pdu_session>&] sp: PDU session
* @return True if handle successful, otherwise return false
*/
bool
handle_service_request
(
std
::
string
&
n2_sm_information
,
std
::
shared_ptr
<
itti_n11_update_sm_context_request
>&
sm_context_request
,
std
::
shared_ptr
<
itti_n11_update_sm_context_response
>&
sm_context_resp
,
std
::
shared_ptr
<
smf_pdu_session
>&
sp
);
/*
* Handle PDU Session Resource Setup Response Transfer
* @param [std::string&] n2_sm_information: NGAP message in form of string
* @param [std::shared_ptr<itti_n11_update_sm_context_request>&]
* sm_context_request: Request message
* @return True if handle successful, otherwise return false
*/
bool
handle_pdu_session_resource_setup_response_transfer
(
std
::
string
&
n2_sm_information
,
std
::
shared_ptr
<
itti_n11_update_sm_context_request
>&
sm_context_request
);
/*
* Handle PDU Session Resource Setup Unsuccessful Transfer
* @param [std::string&] n2_sm_information: NGAP message in form of string
* @param [std::shared_ptr<itti_n11_update_sm_context_request>&]
* sm_context_request: Request message
* @return True if handle successful, otherwise return false
*/
bool
handle_pdu_session_resource_setup_unsuccessful_transfer
(
std
::
string
&
n2_sm_information
,
std
::
shared_ptr
<
itti_n11_update_sm_context_request
>&
sm_context_request
);
/*
* Handle PDU Session Resource Modify Response Transfer
* @param [std::string&] n2_sm_information: NGAP message in form of string
* @param [std::shared_ptr<itti_n11_update_sm_context_request>&]
* sm_context_request: Request message
* @return True if handle successful, otherwise return false
*/
bool
handle_pdu_session_resource_modify_response_transfer
(
std
::
string
&
n2_sm_information
,
std
::
shared_ptr
<
itti_n11_update_sm_context_request
>&
sm_context_request
);
/*
* Handle PDU Session Resource Release Response Transfer
* @param [std::string&] n2_sm_information: NGAP message in form of string
* @param [std::shared_ptr<itti_n11_update_sm_context_request>&]
* sm_context_request: Request message
* @return True if handle successful, otherwise return false
*/
bool
handle_pdu_session_resource_release_response_transfer
(
std
::
string
&
n2_sm_information
,
std
::
shared_ptr
<
itti_n11_update_sm_context_request
>&
sm_context_request
);
/*
* Find DNN context with name
* @param [const std::string&] dnn
...
...
@@ -849,61 +989,20 @@ class smf_context : public std::enable_shared_from_this<smf_context> {
void
handle_ee_pdu_session_release
(
supi64_t
supi
,
pdu_session_id_t
pdu_session_id
,
uint8_t
http_version
);
/*
* Update QoS information in the Response message according to the content of
* decoded NAS msg
* @param [std::shared_ptr<smf_pdu_session>&] sp: PDU session
* @param [std::shared_ptr<pdu_session_update_sm_context_response>&] res:
* Response message
* @param [const nas_message_t] nas_msg: NAS message
* @return void
*/
void
update_qos_info
(
std
::
shared_ptr
<
smf_pdu_session
>&
sp
,
smf
::
pdu_session_update_sm_context_response
&
res
,
const
nas_message_t
&
nas_msg
);
bool
handle_pdu_session_modification_request
(
nas_message_t
&
nas_msg
,
std
::
shared_ptr
<
itti_n11_update_sm_context_request
>&
sm_context_request
,
std
::
shared_ptr
<
itti_n11_update_sm_context_response
>&
sm_context_resp
,
std
::
shared_ptr
<
smf_pdu_session
>&
sp
);
bool
handle_pdu_session_modification_complete
(
nas_message_t
&
nas_msg
,
std
::
shared_ptr
<
itti_n11_update_sm_context_request
>&
sm_context_request
,
std
::
shared_ptr
<
itti_n11_update_sm_context_response
>&
sm_context_resp
,
std
::
shared_ptr
<
smf_pdu_session
>&
sp
);
bool
handle_pdu_session_modification_command_reject
(
nas_message_t
&
nas_msg
,
std
::
shared_ptr
<
itti_n11_update_sm_context_request
>&
sm_context_request
,
std
::
shared_ptr
<
itti_n11_update_sm_context_response
>&
sm_context_resp
,
std
::
shared_ptr
<
smf_pdu_session
>&
sp
);
bool
handle_pdu_session_release_request
(
nas_message_t
&
nas_msg
,
std
::
shared_ptr
<
itti_n11_update_sm_context_request
>&
sm_context_request
,
std
::
shared_ptr
<
itti_n11_update_sm_context_response
>&
sm_context_resp
,
std
::
shared_ptr
<
smf_pdu_session
>&
sp
);
bool
handle_pdu_session_release_complete
(
nas_message_t
&
nas_msg
,
std
::
shared_ptr
<
itti_n11_update_sm_context_request
>&
sm_context_request
,
std
::
shared_ptr
<
itti_n11_update_sm_context_response
>&
sm_context_resp
,
std
::
shared_ptr
<
smf_pdu_session
>&
sp
);
bool
handle_pdu_session_resource_setup_response_transfer
(
std
::
string
&
n2_sm_information
,
std
::
shared_ptr
<
itti_n11_update_sm_context_request
>&
sm_context_request
);
bool
handle_pdu_session_resource_setup_unsuccessful_transfer
(
std
::
string
&
n2_sm_information
,
std
::
shared_ptr
<
itti_n11_update_sm_context_request
>&
sm_context_request
);
bool
handle_pdu_session_resource_modify_response_transfer
(
std
::
string
&
n2_sm_information
,
std
::
shared_ptr
<
itti_n11_update_sm_context_request
>&
sm_context_request
);
bool
handle_pdu_session_resource_release_response_transfer
(
std
::
string
&
n2_sm_information
,
std
::
shared_ptr
<
itti_n11_update_sm_context_request
>&
sm_context_request
);
bool
handle_service_request
(
std
::
string
&
n2_sm_information
,
std
::
shared_ptr
<
itti_n11_update_sm_context_request
>&
sm_context_request
,
std
::
shared_ptr
<
itti_n11_update_sm_context_response
>&
sm_context_resp
,
std
::
shared_ptr
<
smf_pdu_session
>&
sp
);
private:
std
::
vector
<
std
::
shared_ptr
<
dnn_context
>>
dnns
;
std
::
vector
<
std
::
shared_ptr
<
smf_procedure
>>
pending_procedures
;
...
...
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