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
93911a2a
Commit
93911a2a
authored
Jan 27, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Handle a PDU Session Update SM Context Request procedure
parent
ee363df2
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
772 additions
and
38 deletions
+772
-38
src/common/utils/mime_parser.cpp
src/common/utils/mime_parser.cpp
+1
-1
src/nas/sm/sm_msg.c
src/nas/sm/sm_msg.c
+1
-1
src/smf_app/smf_app.cpp
src/smf_app/smf_app.cpp
+2
-2
src/smf_app/smf_context.cpp
src/smf_app/smf_context.cpp
+718
-34
src/smf_app/smf_context.hpp
src/smf_app/smf_context.hpp
+50
-0
No files found.
src/common/utils/mime_parser.cpp
View file @
93911a2a
...
@@ -84,7 +84,7 @@ unsigned char* mime_parser::format_string_as_hex(const std::string& str) {
...
@@ -84,7 +84,7 @@ unsigned char* mime_parser::format_string_as_hex(const std::string& str) {
conv
::
ascii_to_hex
(
data_hex
,
(
const
char
*
)
data
);
conv
::
ascii_to_hex
(
data_hex
,
(
const
char
*
)
data
);
Logger
::
smf_app
().
debug
(
Logger
::
smf_app
().
debug
(
"
[Format string as Hex]
Input string (%d bytes): %s "
,
str_len
,
"Input string (%d bytes): %s "
,
str_len
,
str
.
c_str
());
str
.
c_str
());
Logger
::
smf_app
().
debug
(
"Data (formatted):"
);
Logger
::
smf_app
().
debug
(
"Data (formatted):"
);
#if DEBUG_IS_ON
#if DEBUG_IS_ON
...
...
src/nas/sm/sm_msg.c
View file @
93911a2a
...
@@ -160,7 +160,7 @@ int fivegsm_msg_encode(SM_msg* msg, uint8_t* buffer, uint32_t len) {
...
@@ -160,7 +160,7 @@ int fivegsm_msg_encode(SM_msg* msg, uint8_t* buffer, uint32_t len) {
buffer
+=
header_result
;
buffer
+=
header_result
;
len
-=
header_result
;
len
-=
header_result
;
#if DEBUG_IS_ON
#if DEBUG_IS_ON
printf
(
"
,
message type %d"
,
msg
->
header
.
message_type
);
printf
(
"message type %d"
,
msg
->
header
.
message_type
);
#endif
#endif
switch
(
msg
->
header
.
message_type
)
{
switch
(
msg
->
header
.
message_type
)
{
case
PDU_SESSION_ESTABLISHMENT_REQUEST
:
case
PDU_SESSION_ESTABLISHMENT_REQUEST
:
...
...
src/smf_app/smf_app.cpp
View file @
93911a2a
...
@@ -631,10 +631,10 @@ void smf_app::handle_pdu_session_create_sm_context_request(
...
@@ -631,10 +631,10 @@ void smf_app::handle_pdu_session_create_sm_context_request(
PDU_SESSION_TYPE_E_IPV4
};
PDU_SESSION_TYPE_E_IPV4
};
// Step 1. Decode NAS and get the necessary information
// 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
=
int
decoder_rc
=
smf_n1
::
get_instance
().
decode_n1_sm_container
(
decoded_nas_msg
,
n1_sm_msg
);
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
// Failed to decode, send reply to AMF with PDU Session Establishment Reject
if
(
decoder_rc
!=
RETURNok
)
{
if
(
decoder_rc
!=
RETURNok
)
{
...
...
src/smf_app/smf_context.cpp
View file @
93911a2a
This diff is collapsed.
Click to expand it.
src/smf_app/smf_context.hpp
View file @
93911a2a
...
@@ -854,6 +854,56 @@ class smf_context : public std::enable_shared_from_this<smf_context> {
...
@@ -854,6 +854,56 @@ class smf_context : public std::enable_shared_from_this<smf_context> {
smf
::
pdu_session_update_sm_context_response
&
res
,
smf
::
pdu_session_update_sm_context_response
&
res
,
const
nas_message_t
&
nas_msg
);
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:
private:
std
::
vector
<
std
::
shared_ptr
<
dnn_context
>>
dnns
;
std
::
vector
<
std
::
shared_ptr
<
dnn_context
>>
dnns
;
std
::
vector
<
std
::
shared_ptr
<
smf_procedure
>>
pending_procedures
;
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