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-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-AMF-Simple
Commits
5227afe5
Commit
5227afe5
authored
Sep 14, 2020
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add NSSAI to PduSessionResourceSetupRequest
parent
b26dc726
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
11 deletions
+27
-11
src/amf-app/amf_app.cpp
src/amf-app/amf_app.cpp
+5
-11
src/amf-app/amf_n2.cpp
src/amf-app/amf_n2.cpp
+22
-0
No files found.
src/amf-app/amf_app.cpp
View file @
5227afe5
...
...
@@ -65,22 +65,16 @@ amf_app::amf_app(const amf_config &amf_cfg) {
Logger
::
amf_app
().
error
(
"Cannot create task TASK_AMF_APP"
);
throw
std
::
runtime_error
(
"Cannot create task TASK_AMF_APP"
);
}
try
{
amf_n2_inst
=
new
amf_n2
(
std
::
string
(
inet_ntoa
(
amf_cfg
.
n2
.
addr4
)),
amf_cfg
.
n2
.
port
);
}
catch
(
std
::
exception
&
e
)
{
Logger
::
amf_app
().
error
(
"Cannot create N2 interface: %s"
,
e
.
what
());
throw
;
}
try
{
amf_n1_inst
=
new
amf_n1
();
}
catch
(
std
::
exception
&
e
)
{
Logger
::
amf_app
().
error
(
"Cannot create N1 interface: %s"
,
e
.
what
());
}
try
{
amf_n2_inst
=
new
amf_n2
(
std
::
string
(
inet_ntoa
(
amf_cfg
.
n2
.
addr4
)),
amf_cfg
.
n2
.
port
);
amf_n11_inst
=
new
amf_n11
();
}
catch
(
std
::
exception
&
e
)
{
Logger
::
amf_app
().
error
(
"Cannot create N11 interface: %s"
,
e
.
what
());
Logger
::
amf_app
().
error
(
"Cannot create AMF APP: %s"
,
e
.
what
());
throw
;
}
timer_id_t
tid
=
itti_inst
->
timer_setup
(
amf_cfg
.
statistics_interval
,
0
,
TASK_AMF_APP
,
TASK_AMF_APP_PERIODIC_STATISTICS
,
0
);
Logger
::
amf_app
().
startup
(
"Started timer(%d)"
,
tid
);
}
...
...
src/amf-app/amf_n2.cpp
View file @
5227afe5
...
...
@@ -29,6 +29,7 @@
#include "amf_n2.hpp"
#include "amf_n1.hpp"
#include "amf_n11.hpp"
#include "amf_app.hpp"
#include "logger.hpp"
#include "sctp_server.hpp"
...
...
@@ -52,6 +53,7 @@ using namespace config;
extern
itti_mw
*
itti_inst
;
extern
amf_n2
*
amf_n2_inst
;
extern
amf_n1
*
amf_n1_inst
;
extern
amf_n11
*
amf_n11_inst
;
extern
amf_config
amf_cfg
;
extern
amf_app
*
amf_app_inst
;
extern
statistics
stacs
;
...
...
@@ -546,6 +548,26 @@ void amf_n2::handle_itti_message(itti_pdu_session_resource_setup_request &itti_m
item
.
sizeofpduSessionNAS_PDU
=
blength
(
itti_msg
.
nas
);
item
.
s_nssai
.
sst
=
"01"
;
//TODO: get from N1N2msgTranferMsg
item
.
s_nssai
.
sd
=
""
;
//TODO: get from N1N2msgTranferMsg
//Get NSSAI from PDU Session Context
std
::
shared_ptr
<
nas_context
>
nc
;
if
(
amf_n1_inst
->
is_amf_ue_id_2_nas_context
(
itti_msg
.
amf_ue_ngap_id
))
nc
=
amf_n1_inst
->
amf_ue_id_2_nas_context
(
itti_msg
.
amf_ue_ngap_id
);
else
{
Logger
::
amf_n2
().
warn
(
"No existed nas_context with amf_ue_ngap_id(0x%x)"
,
itti_msg
.
amf_ue_ngap_id
);
//TODO:
}
string
supi
=
"imsi-"
+
nc
.
get
()
->
imsi
;
Logger
::
amf_n2
().
debug
(
"SUPI (%s)"
,
supi
.
c_str
());
std
::
shared_ptr
<
pdu_session_context
>
psc
;
if
(
amf_n11_inst
->
is_supi_to_pdu_ctx
(
supi
))
{
psc
=
amf_n11_inst
->
supi_to_pdu_ctx
(
supi
);
}
else
{
Logger
::
amf_n2
().
warn
(
"Cannot get pdu_session_context with SUPI (%s)"
,
supi
.
c_str
());
}
item
.
s_nssai
.
sst
=
std
::
to_string
(
psc
.
get
()
->
snssai
.
sST
);
item
.
s_nssai
.
sd
=
psc
.
get
()
->
snssai
.
sD
;
item
.
pduSessionResourceSetupRequestTransfer
.
buf
=
(
uint8_t
*
)
bdata
(
itti_msg
.
n2sm
);
item
.
pduSessionResourceSetupRequestTransfer
.
size
=
blength
(
itti_msg
.
n2sm
);
list
.
push_back
(
item
);
...
...
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