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
61f246d6
Commit
61f246d6
authored
Jan 13, 2020
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug for N2 SM info
parent
a91ed1ef
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
61 additions
and
6 deletions
+61
-6
src/api-server/impl/IndividualSMContextApiImpl.cpp
src/api-server/impl/IndividualSMContextApiImpl.cpp
+8
-3
src/common/3gpp_29.502.h
src/common/3gpp_29.502.h
+50
-0
src/smf_app/smf_app.cpp
src/smf_app/smf_app.cpp
+3
-3
No files found.
src/api-server/impl/IndividualSMContextApiImpl.cpp
View file @
61f246d6
...
...
@@ -13,6 +13,7 @@
#include "IndividualSMContextApiImpl.h"
extern
"C"
{
#include "Ngap_NGAP-PDU.h"
#include "Ngap_PDUSessionResourceSetupRequestTransfer.h"
}
namespace
oai
{
namespace
smf_server
{
...
...
@@ -54,14 +55,18 @@ void IndividualSMContextApiImpl::update_sm_context(const std::string &smContextR
std
::
string
n2_sm_info_type
=
smContextUpdateData
.
getN2SmInfoType
();
if
(
n2_sm_info_type
.
compare
(
"PDU_RES_SETUP_REQ"
)
==
0
){
Ngap_PDUSessionResourceSetupRequestTransfer_t
*
decoded_msg
=
null
;
//Temps: decode Ngap_PDUSessionResourceSetupRequestTransfer
if
(
n2_sm_info_type
.
compare
(
n2_sm_info_type_e2str
[
PDU_RES_SETUP_REQ
])
==
0
){
Ngap_PDUSessionResourceSetupRequestTransfer_t
*
decoded_msg
=
NULL
;
//Decode N2 SM info into decoded nas msg
asn_dec_rval_t
rc
=
asn_decode
(
NULL
,
&
asn_DEF_Ngap_PDUSessionResourceSetupRequestTransfer
,
(
void
**
)
&
decoded_msg
,
n2_sm_msg_hex
,
n2_sm_msg_hex
.
length
());
asn_dec_rval_t
rc
=
asn_decode
(
NULL
,
ATS_ALIGNED_CANONICAL_PER
,
&
asn_DEF_Ngap_PDUSessionResourceSetupRequestTransfer
,
(
void
**
)
&
decoded_msg
,
(
void
*
)
n2_sm_msg_hex
.
c_str
()
,
n2_sm_msg_hex
.
length
());
if
(
rc
.
code
!=
RC_OK
)
{
Logger
::
smf_api_server
().
warn
(
"asn_decode failed %d...
\n
"
,
rc
.
code
);
//TODO: send error to AMF??
}
}
/*
...
...
src/common/3gpp_29.502.h
View file @
61f246d6
...
...
@@ -100,6 +100,56 @@ static const std::vector<std::string> pdu_session_application_error_e2str = {
"NETWORK_FAILURE"
};
enum
n2_sm_info_type_e
{
PDU_RES_SETUP_REQ
=
1
,
PDU_RES_SETUP_RSP
=
2
,
PDU_RES_SETUP_FAIL
=
3
,
PDU_RES_REL_CMD
=
4
,
PDU_RES_REL_RSP
=
5
,
PDU_RES_MOD_REQ
=
6
,
PDU_RES_MOD_RSP
=
7
,
PDU_RES_MOD_FAIL
=
8
,
PDU_RES_NTY
=
9
,
PDU_RES_NTY_REL
=
10
,
PDU_RES_MOD_IND
=
11
,
PDU_RES_MOD_CFM
=
12
,
PATH_SWITCH_REQ
=
13
,
PATH_SWITCH_SETUP_FAIL
=
14
,
PATH_SWITCH_REQ_ACK
=
15
,
PATH_SWITCH_REQ_FAIL
=
16
,
HANDOVER_REQUIRED
=
17
,
HANDOVER_CMD
=
18
,
HANDOVER_PREP_FAIL
=
19
,
HANDOVER_REQ_ACK
=
20
,
HANDOVER_RES_ALLOC_FAIL
=
21
,
SECONDARY_RAT_USAGE
=
22
};
static
const
std
::
vector
<
std
::
string
>
n2_sm_info_type_e2str
=
{
"UNKNOWN_TYPE"
,
"PDU_RES_SETUP_REQ"
,
"PDU_RES_SETUP_RSP"
,
"PDU_RES_SETUP_FAIL"
,
"PDU_RES_REL_CMD"
,
"PDU_RES_REL_RSP"
,
"PDU_RES_MOD_REQ"
,
"PDU_RES_MOD_RSP"
,
"PDU_RES_MOD_FAIL"
,
"PDU_RES_NTY"
,
"PDU_RES_NTY_REL"
,
"PDU_RES_MOD_IND"
,
"PDU_RES_MOD_CFM"
,
"PATH_SWITCH_REQ"
,
"PATH_SWITCH_SETUP_FAIL"
,
"PATH_SWITCH_REQ_ACK"
,
"PATH_SWITCH_REQ_FAIL"
,
"HANDOVER_REQUIRED"
,
"HANDOVER_CMD"
,
"HANDOVER_PREP_FAIL"
,
"HANDOVER_REQ_ACK"
,
"HANDOVER_RES_ALLOC_FAIL"
,
"SECONDARY_RAT_USAGE"
};
#endif
src/smf_app/smf_app.cpp
View file @
61f246d6
...
...
@@ -495,9 +495,9 @@ void smf_app::handle_amf_msg (std::shared_ptr<itti_n11_update_sm_context_request
supi64_t
supi64
=
smf_supi_to_u64
(
supi
);
//store in itti_n11_update_sm_context_request to be processed later on
smreq
->
set_supi
(
supi
);
smreq
->
set_dnn
(
dnn
);
smreq
->
set_pdu_session_id
(
pdu_session_id
);
smreq
->
req
.
set_supi
(
supi
);
smreq
->
req
.
set_dnn
(
dnn
);
smreq
->
req
.
set_pdu_session_id
(
pdu_session_id
);
//Step 1. get necessary information (N2 SM information)
...
...
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