Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-AMF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
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-AMF
Commits
300c6fbd
Commit
300c6fbd
authored
Nov 17, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get NSSAI from RegistrationRequest msg
parent
321a7b5c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
5 deletions
+35
-5
src/amf-app/amf_n1.cpp
src/amf-app/amf_n1.cpp
+33
-3
src/nas/msgs/ULNASTransport.cpp
src/nas/msgs/ULNASTransport.cpp
+2
-2
No files found.
src/amf-app/amf_n1.cpp
View file @
300c6fbd
...
...
@@ -1135,8 +1135,10 @@ void amf_n1::registration_request_handle(
std
::
vector
<
SNSSAI_t
>
requestedNssai
=
{};
if
(
!
regReq
->
getRequestedNssai
(
requestedNssai
))
{
Logger
::
amf_n1
().
warn
(
"No Optional IE RequestedNssai available"
);
}
else
{
nc
.
get
()
->
requestedNssai
=
requestedNssai
;
}
nc
.
get
()
->
requestedNssai
=
requestedNssai
;
nc
.
get
()
->
ctx_avaliability_ind
=
true
;
// Get Last visited registered TAI(OPtional IE), if provided
...
...
@@ -1148,6 +1150,19 @@ void amf_n1::registration_request_handle(
bstring
nas_msg
;
bool
is_messagecontainer
=
regReq
->
getNasMessageContainer
(
nas_msg
);
if
(
is_messagecontainer
)
{
std
::
unique_ptr
<
RegistrationRequest
>
registration_request_msg_container
=
std
::
make_unique
<
RegistrationRequest
>
();
registration_request_msg_container
->
decodefrombuffer
(
nullptr
,
(
uint8_t
*
)
bdata
(
nas_msg
),
blength
(
nas_msg
));
if
(
!
regReq
->
getRequestedNssai
(
requestedNssai
))
{
Logger
::
amf_n1
().
warn
(
"No Optional IE RequestedNssai available"
);
}
else
{
nc
.
get
()
->
requestedNssai
=
requestedNssai
;
}
}
// Store NAS information into nas_context
// Run the corresponding registration procedure
switch
(
reg_type
)
{
...
...
@@ -2604,8 +2619,22 @@ void amf_n1::ul_nas_transport_handle(
uint8_t
payload_type
=
ulNas
->
getPayloadContainerType
();
uint8_t
pdu_session_id
=
ulNas
->
getPduSessionId
();
uint8_t
request_type
=
ulNas
->
getRequestType
();
SNSSAI_t
snssai
=
{};
ulNas
->
getSnssai
(
snssai
);
// SNSSAI
SNSSAI_t
snssai
=
{};
if
(
!
ulNas
->
getSnssai
(
snssai
))
{
// If no SNSSAI in this message, use the one
// in Registration Request
// Only use the first one
std
::
shared_ptr
<
nas_context
>
nc
=
{};
if
(
amf_n1_inst
->
is_amf_ue_id_2_nas_context
(
amf_ue_ngap_id
))
nc
=
amf_n1_inst
->
amf_ue_id_2_nas_context
(
amf_ue_ngap_id
);
else
{
Logger
::
amf_n2
().
warn
(
"No existed nas_context with amf_ue_ngap_id(0x%x)"
,
amf_ue_ngap_id
);
}
if
(
nc
.
get
()
->
requestedNssai
.
size
()
>
0
)
snssai
=
nc
.
get
()
->
requestedNssai
[
0
];
}
bstring
dnn
=
bfromcstr
(
"default"
);
bstring
sm_msg
;
if
(
ulNas
->
getDnn
(
dnn
))
{
...
...
@@ -3088,6 +3117,7 @@ void amf_n1::initialize_registration_accept(
}
registration_accept
->
setTaiList
(
tai_list
);
// TODO: get the list of common SST, SD between UE/gNB and AMF
std
::
vector
<
struct
SNSSAI_s
>
nssai
;
for
(
auto
p
:
amf_cfg
.
plmn_list
)
{
for
(
auto
s
:
p
.
slice_list
)
{
...
...
src/nas/msgs/ULNASTransport.cpp
View file @
300c6fbd
...
...
@@ -144,9 +144,9 @@ void ULNASTransport::setS_NSSAI(SNSSAI_s snssai) {
bool
ULNASTransport
::
getSnssai
(
SNSSAI_s
&
snssai
)
{
if
(
ie_s_nssai
)
{
ie_s_nssai
->
getValue
(
snssai
);
return
0
;
return
true
;
}
else
{
return
-
1
;
return
false
;
}
}
...
...
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