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
630dfe19
Commit
630dfe19
authored
Feb 03, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve the conflit from Bupt
parent
c4c7a068
Changes
24
Show whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
1564 additions
and
438 deletions
+1564
-438
src/amf-app/amf_app.cpp
src/amf-app/amf_app.cpp
+2
-3
src/amf-app/amf_config.cpp
src/amf-app/amf_config.cpp
+18
-0
src/amf-app/amf_config.hpp
src/amf-app/amf_config.hpp
+3
-0
src/amf-app/amf_n1.cpp
src/amf-app/amf_n1.cpp
+20
-7
src/amf-app/amf_n2.cpp
src/amf-app/amf_n2.cpp
+19
-28
src/contexts/nas_context.hpp
src/contexts/nas_context.hpp
+1
-0
src/nas/common/common_defs.h
src/nas/common/common_defs.h
+2
-2
src/ngap/libngap/asn_application.c
src/ngap/libngap/asn_application.c
+346
-354
src/ngap/libngap/per_opentype.c
src/ngap/libngap/per_opentype.c
+1
-1
src/sbi/amf_server/AMFApiServer.cpp
src/sbi/amf_server/AMFApiServer.cpp
+10
-7
src/sbi/amf_server/AMFApiServer.hpp
src/sbi/amf_server/AMFApiServer.hpp
+49
-35
src/sbi/amf_server/model/AuthenticationInfo.cpp
src/sbi/amf_server/model/AuthenticationInfo.cpp
+238
-0
src/sbi/amf_server/model/AuthenticationInfo.h
src/sbi/amf_server/model/AuthenticationInfo.h
+133
-0
src/sbi/amf_server/model/Av5gAka.cpp
src/sbi/amf_server/model/Av5gAka.cpp
+66
-0
src/sbi/amf_server/model/Av5gAka.h
src/sbi/amf_server/model/Av5gAka.h
+74
-0
src/sbi/amf_server/model/ConfirmationData.cpp
src/sbi/amf_server/model/ConfirmationData.cpp
+48
-0
src/sbi/amf_server/model/ConfirmationData.h
src/sbi/amf_server/model/ConfirmationData.h
+60
-0
src/sbi/amf_server/model/ConfirmationDataResponse.cpp
src/sbi/amf_server/model/ConfirmationDataResponse.cpp
+95
-0
src/sbi/amf_server/model/ConfirmationDataResponse.h
src/sbi/amf_server/model/ConfirmationDataResponse.h
+83
-0
src/sbi/amf_server/model/LinksValueSchema.cpp
src/sbi/amf_server/model/LinksValueSchema.cpp
+59
-0
src/sbi/amf_server/model/LinksValueSchema.h
src/sbi/amf_server/model/LinksValueSchema.h
+62
-0
src/sbi/amf_server/model/UEAuthenticationCtx.cpp
src/sbi/amf_server/model/UEAuthenticationCtx.cpp
+86
-0
src/sbi/amf_server/model/UEAuthenticationCtx.h
src/sbi/amf_server/model/UEAuthenticationCtx.h
+87
-0
src/sbi/smf_client/model/SmContextCreateData.cpp
src/sbi/smf_client/model/SmContextCreateData.cpp
+2
-1
No files found.
src/amf-app/amf_app.cpp
View file @
630dfe19
...
@@ -81,7 +81,7 @@ amf_app::amf_app(const amf_config& amf_cfg) {
...
@@ -81,7 +81,7 @@ amf_app::amf_app(const amf_config& amf_cfg) {
}
}
// Register to NRF
// Register to NRF
register_to_nrf
();
if
(
amf_cfg
.
enable_nf_registration
)
register_to_nrf
();
timer_id_t
tid
=
itti_inst
->
timer_setup
(
timer_id_t
tid
=
itti_inst
->
timer_setup
(
amf_cfg
.
statistics_interval
,
0
,
TASK_AMF_APP
,
amf_cfg
.
statistics_interval
,
0
,
TASK_AMF_APP
,
...
@@ -216,7 +216,6 @@ bool amf_app::find_pdu_session_context(
...
@@ -216,7 +216,6 @@ bool amf_app::find_pdu_session_context(
return
true
;
return
true
;
}
}
// ITTI handlers
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
amf_app
::
handle_itti_message
(
void
amf_app
::
handle_itti_message
(
itti_n1n2_message_transfer_request
&
itti_msg
)
{
itti_n1n2_message_transfer_request
&
itti_msg
)
{
...
@@ -266,7 +265,7 @@ void amf_app::handle_itti_message(
...
@@ -266,7 +265,7 @@ void amf_app::handle_itti_message(
long
amf_ue_ngap_id
=
0
;
long
amf_ue_ngap_id
=
0
;
std
::
shared_ptr
<
ue_context
>
uc
;
std
::
shared_ptr
<
ue_context
>
uc
;
//
c
heck UE Context with 5g-s-tmsi
//
C
heck UE Context with 5g-s-tmsi
if
((
amf_ue_ngap_id
=
itti_msg
.
amf_ue_ngap_id
)
==
-
1
)
{
if
((
amf_ue_ngap_id
=
itti_msg
.
amf_ue_ngap_id
)
==
-
1
)
{
amf_ue_ngap_id
=
generate_amf_ue_ngap_id
();
amf_ue_ngap_id
=
generate_amf_ue_ngap_id
();
}
}
...
...
src/amf-app/amf_config.cpp
View file @
630dfe19
...
@@ -64,6 +64,7 @@ amf_config::amf_config() {
...
@@ -64,6 +64,7 @@ amf_config::amf_config() {
enable_smf_selection
=
false
;
enable_smf_selection
=
false
;
enable_external_auth
=
false
;
enable_external_auth
=
false
;
// TODO:
// TODO:
is_Nausf
=
true
;
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
...
@@ -187,6 +188,11 @@ int amf_config::load(const std::string& config_file) {
...
@@ -187,6 +188,11 @@ int amf_config::load(const std::string& config_file) {
const
Setting
&
n2_amf_cfg
=
const
Setting
&
n2_amf_cfg
=
new_if_cfg
[
AMF_CONFIG_STRING_INTERFACE_NGAP_AMF
];
new_if_cfg
[
AMF_CONFIG_STRING_INTERFACE_NGAP_AMF
];
load_interface
(
n2_amf_cfg
,
n2
);
load_interface
(
n2_amf_cfg
,
n2
);
if
(
is_Nausf
)
{
const
Setting
&
nausf_amf_cfg
=
new_if_cfg
[
AMF_CONFIG_STRING_INTERFACE_NAUSF
];
load_interface
(
nausf_amf_cfg
,
nausf
);
}
const
Setting
&
n11_cfg
=
new_if_cfg
[
AMF_CONFIG_STRING_INTERFACE_N11
];
const
Setting
&
n11_cfg
=
new_if_cfg
[
AMF_CONFIG_STRING_INTERFACE_N11
];
load_interface
(
n11_cfg
,
n11
);
load_interface
(
n11_cfg
,
n11
);
const
Setting
&
smf_addr_pool
=
const
Setting
&
smf_addr_pool
=
...
@@ -416,6 +422,18 @@ void amf_config::display() {
...
@@ -416,6 +422,18 @@ void amf_config::display() {
" ip ....................: %s"
,
inet_ntoa
(
n11
.
addr4
));
" ip ....................: %s"
,
inet_ntoa
(
n11
.
addr4
));
Logger
::
config
().
info
(
" port ..................: %d"
,
n11
.
port
);
Logger
::
config
().
info
(
" port ..................: %d"
,
n11
.
port
);
if
(
is_Nausf
)
{
Logger
::
config
().
info
(
"- Nausf Networking:"
);
Logger
::
config
().
info
(
" iface ................: %s"
,
nausf
.
if_name
.
c_str
());
Logger
::
config
().
info
(
" ip ...................: %s"
,
inet_ntoa
(
nausf
.
addr4
));
Logger
::
config
().
info
(
" port .................: %d"
,
nausf
.
port
);
}
else
{
Logger
::
config
().
warn
(
"- Not using ausf: Please remove [--no-ausf] using it."
);
}
Logger
::
config
().
info
(
"- NRF:"
);
Logger
::
config
().
info
(
"- NRF:"
);
Logger
::
config
().
info
(
Logger
::
config
().
info
(
" IP addr ..............: %s"
,
inet_ntoa
(
nrf_addr
.
ipv4_addr
));
" IP addr ..............: %s"
,
inet_ntoa
(
nrf_addr
.
ipv4_addr
));
...
...
src/amf-app/amf_config.hpp
View file @
630dfe19
...
@@ -45,6 +45,7 @@
...
@@ -45,6 +45,7 @@
#define AMF_CONFIG_STRING_STATISTICS_TIMER_INTERVAL "STATISTICS_TIMER_INTERVAL"
#define AMF_CONFIG_STRING_STATISTICS_TIMER_INTERVAL "STATISTICS_TIMER_INTERVAL"
#define AMF_CONFIG_STRING_INTERFACES "INTERFACES"
#define AMF_CONFIG_STRING_INTERFACES "INTERFACES"
#define AMF_CONFIG_STRING_INTERFACE_NGAP_AMF "NGAP_AMF"
#define AMF_CONFIG_STRING_INTERFACE_NGAP_AMF "NGAP_AMF"
#define AMF_CONFIG_STRING_INTERFACE_NAME "INTERFACE_NAME"
#define AMF_CONFIG_STRING_INTERFACE_NAME "INTERFACE_NAME"
#define AMF_CONFIG_STRING_IPV4_ADDRESS "IPV4_ADDRESS"
#define AMF_CONFIG_STRING_IPV4_ADDRESS "IPV4_ADDRESS"
#define AMF_CONFIG_STRING_PORT "PORT"
#define AMF_CONFIG_STRING_PORT "PORT"
...
@@ -176,6 +177,7 @@ class amf_config {
...
@@ -176,6 +177,7 @@ class amf_config {
std
::
string
pid_dir
;
std
::
string
pid_dir
;
interface_cfg_t
n2
;
interface_cfg_t
n2
;
interface_cfg_t
n11
;
interface_cfg_t
n11
;
interface_cfg_t
nausf
;
itti_cfg_t
itti
;
itti_cfg_t
itti
;
unsigned
int
statistics_interval
;
unsigned
int
statistics_interval
;
std
::
string
AMF_Name
;
std
::
string
AMF_Name
;
...
@@ -196,6 +198,7 @@ class amf_config {
...
@@ -196,6 +198,7 @@ class amf_config {
unsigned
int
port
;
unsigned
int
port
;
std
::
string
api_version
;
std
::
string
api_version
;
}
nrf_addr
;
}
nrf_addr
;
bool
is_Nausf
;
}
;
}
;
}
// namespace config
}
// namespace config
...
...
src/amf-app/amf_n1.cpp
View file @
630dfe19
...
@@ -55,11 +55,19 @@
...
@@ -55,11 +55,19 @@
#include "nas_algorithms.hpp"
#include "nas_algorithms.hpp"
#include "sha256.hpp"
#include "sha256.hpp"
#include "AuthenticationInfo.h"
#include "UEAuthenticationCtx.h"
#include "ConfirmationData.h"
#include "ConfirmationDataResponse.h"
#include <curl/curl.h>
extern
"C"
{
extern
"C"
{
#include "bstrlib.h"
#include "bstrlib.h"
#include "dynamic_memory_check.h"
#include "dynamic_memory_check.h"
}
}
using
namespace
oai
::
amf
::
model
;
using
namespace
nas
;
using
namespace
nas
;
using
namespace
amf_application
;
using
namespace
amf_application
;
using
namespace
config
;
using
namespace
config
;
...
@@ -225,7 +233,7 @@ void amf_n1::handle_itti_message(itti_uplink_nas_data_ind& nas_data_ind) {
...
@@ -225,7 +233,7 @@ void amf_n1::handle_itti_message(itti_uplink_nas_data_ind& nas_data_ind) {
else
{
else
{
Logger
::
amf_n1
().
error
(
Logger
::
amf_n1
().
error
(
"No existing nas_context with GUTI %s"
,
nas_data_ind
.
guti
.
c_str
());
"No existing nas_context with GUTI %s"
,
nas_data_ind
.
guti
.
c_str
());
return
;
//
return;
}
}
}
else
{
}
else
{
if
(
is_amf_ue_id_2_nas_context
(
amf_ue_ngap_id
))
if
(
is_amf_ue_id_2_nas_context
(
amf_ue_ngap_id
))
...
@@ -1160,6 +1168,9 @@ void amf_n1::run_registration_procedure(std::shared_ptr<nas_context>& nc) {
...
@@ -1160,6 +1168,9 @@ void amf_n1::run_registration_procedure(std::shared_ptr<nas_context>& nc) {
bool
amf_n1
::
auth_vectors_generator
(
std
::
shared_ptr
<
nas_context
>&
nc
)
{
bool
amf_n1
::
auth_vectors_generator
(
std
::
shared_ptr
<
nas_context
>&
nc
)
{
Logger
::
amf_n1
().
debug
(
"Start to generate authentication vectors"
);
Logger
::
amf_n1
().
debug
(
"Start to generate authentication vectors"
);
authentication_vectors_generator_in_udm
(
nc
);
authentication_vectors_generator_in_udm
(
nc
);
if
(
amf_cfg
.
is_Nausf
)
{
if
(
!
authentication_vectors_from_ausf
(
nc
))
return
false
;
}
else
{
authentication_vectors_generator_in_ausf
(
nc
);
authentication_vectors_generator_in_ausf
(
nc
);
Logger
::
amf_n1
().
debug
(
"Deriving kamf"
);
Logger
::
amf_n1
().
debug
(
"Deriving kamf"
);
for
(
int
i
=
0
;
i
<
MAX_5GS_AUTH_VECTORS
;
i
++
)
{
for
(
int
i
=
0
;
i
<
MAX_5GS_AUTH_VECTORS
;
i
++
)
{
...
@@ -1167,6 +1178,7 @@ bool amf_n1::auth_vectors_generator(std::shared_ptr<nas_context>& nc) {
...
@@ -1167,6 +1178,7 @@ bool amf_n1::auth_vectors_generator(std::shared_ptr<nas_context>& nc) {
nc
.
get
()
->
imsi
,
nc
.
get
()
->
_5g_av
[
i
].
kseaf
,
nc
.
get
()
->
kamf
[
i
],
nc
.
get
()
->
imsi
,
nc
.
get
()
->
_5g_av
[
i
].
kseaf
,
nc
.
get
()
->
kamf
[
i
],
0x0000
);
// second parameter: abba
0x0000
);
// second parameter: abba
}
}
}
return
true
;
return
true
;
}
}
...
@@ -1865,6 +1877,7 @@ void amf_n1::security_mode_complete_handle(
...
@@ -1865,6 +1877,7 @@ void amf_n1::security_mode_complete_handle(
uint8_t
kgnb
[
32
];
uint8_t
kgnb
[
32
];
uint32_t
ulcount
=
secu
->
ul_count
.
seq_num
|
(
secu
->
ul_count
.
overflow
<<
8
);
uint32_t
ulcount
=
secu
->
ul_count
.
seq_num
|
(
secu
->
ul_count
.
overflow
<<
8
);
Authentication_5gaka
::
derive_kgnb
(
0
,
0x01
,
kamf
,
kgnb
);
Authentication_5gaka
::
derive_kgnb
(
0
,
0x01
,
kamf
,
kgnb
);
ncc
=
1
;
print_buffer
(
"amf_n1"
,
"kamf"
,
kamf
,
32
);
print_buffer
(
"amf_n1"
,
"kamf"
,
kamf
,
32
);
// Authentication_5gaka::derive_kgnb(ulcount, 0x01, kamf, kgnb);
// Authentication_5gaka::derive_kgnb(ulcount, 0x01, kamf, kgnb);
bstring
kgnb_bs
=
blk2bstr
(
kgnb
,
32
);
bstring
kgnb_bs
=
blk2bstr
(
kgnb
,
32
);
...
...
src/amf-app/amf_n2.cpp
View file @
630dfe19
...
@@ -73,6 +73,7 @@ uint32_t ran_id_Global = 0;
...
@@ -73,6 +73,7 @@ uint32_t ran_id_Global = 0;
uint32_t
AMF_TARGET_ran_id_global
=
0
;
uint32_t
AMF_TARGET_ran_id_global
=
0
;
sctp_assoc_id_t
downlink_sctp_assoc_id
=
0
;
sctp_assoc_id_t
downlink_sctp_assoc_id
=
0
;
sctp_assoc_id_t
source_assoc_id
=
0
;
sctp_assoc_id_t
source_assoc_id
=
0
;
int
ncc
=
0
;
void
amf_n2_task
(
void
*
);
void
amf_n2_task
(
void
*
);
...
@@ -294,6 +295,8 @@ void amf_n2::handle_itti_message(itti_ng_setup_request& itti_msg) {
...
@@ -294,6 +295,8 @@ void amf_n2::handle_itti_message(itti_ng_setup_request& itti_msg) {
}
}
}
}
set_gnb_id_2_gnb_context
(
gnb_id
,
gc
);
// store Paging DRX in gNB context
// store Paging DRX in gNB context
Logger
::
amf_n2
().
debug
(
"Encoding NG_SETUP_RESPONSE ..."
);
Logger
::
amf_n2
().
debug
(
"Encoding NG_SETUP_RESPONSE ..."
);
// encode NG SETUP RESPONSE message with information stored in configuration
// encode NG SETUP RESPONSE message with information stored in configuration
...
@@ -875,6 +878,7 @@ void amf_n2::handle_itti_message(
...
@@ -875,6 +878,7 @@ void amf_n2::handle_itti_message(
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
void
amf_n2
::
handle_itti_message
(
itti_handover_required
&
itti_msg
)
{
void
amf_n2
::
handle_itti_message
(
itti_handover_required
&
itti_msg
)
{
ncc
++
;
unsigned
long
amf_ue_ngap_id
=
itti_msg
.
handvoerRequ
->
getAmfUeNgapId
();
unsigned
long
amf_ue_ngap_id
=
itti_msg
.
handvoerRequ
->
getAmfUeNgapId
();
uint32_t
ran_ue_ngap_id
=
itti_msg
.
handvoerRequ
->
getRanUeNgapId
();
uint32_t
ran_ue_ngap_id
=
itti_msg
.
handvoerRequ
->
getRanUeNgapId
();
ran_id_Global
=
ran_ue_ngap_id
;
ran_id_Global
=
ran_ue_ngap_id
;
...
@@ -1006,31 +1010,11 @@ void amf_n2::handle_itti_message(itti_handover_required& itti_msg) {
...
@@ -1006,31 +1010,11 @@ void amf_n2::handle_itti_message(itti_handover_required& itti_msg) {
Logger
::
amf_n1
().
debug
(
"uplink count(%d)"
,
secu
->
ul_count
.
seq_num
);
Logger
::
amf_n1
().
debug
(
"uplink count(%d)"
,
secu
->
ul_count
.
seq_num
);
uint8_t
knh
[
32
];
uint8_t
knh
[
32
];
Authentication_5gaka
::
handover_ncc_derive_knh
(
Authentication_5gaka
::
handover_ncc_derive_knh
(
ulcount
,
0x01
,
kamf
,
kgnb
,
knh
,
2
);
ulcount
,
0x01
,
kamf
,
kgnb
,
knh
,
ncc
);
/*Authentication_5gaka::derive_kgnb(ulcount, 0x01, kamf, kgnb);
print_buffer("amf_n1", "HO:kgnb", kgnb, 32);
//NCC = 1
uint8_t S[35], knh[32];
S[0] = 0x6f;
memcpy(S + 1, kgnb, 32);
S[33] = 0x00;
S[34] = 0x20;
print_buffer("amf_n1", "NCC=1: S", S, 35);
Authentication_5gaka::kdf(kamf, 32, S, 35, knh, 32);
//NCC = 2
uint8_t S2[35], knh2[32];
S2[0] = 0x6f;
memcpy(S2 + 1, knh, 32);
S2[33] = 0x00;
S2[34] = 0x20;
print_buffer("amf_n1", "NCC=2: S2", S2, 35);
Authentication_5gaka::kdf(kamf, 32, S2, 35, knh2, 32);
print_buffer("amf_n1", "Knh2", knh2, 32);
bstring knh_bs = blk2bstr(knh2, 32);*/
bstring
knh_bs
=
blk2bstr
(
knh
,
32
);
bstring
knh_bs
=
blk2bstr
(
knh
,
32
);
handoverrequest
->
setSecurityContext
(
handoverrequest
->
setSecurityContext
(
2
/*NCC count*/
,
(
uint8_t
*
)
bdata
(
knh_bs
));
ncc
/*NCC count*/
,
(
uint8_t
*
)
bdata
(
knh_bs
));
// handoverrequest->setSourceToTarget_TransparentContainer(sourceTotarget);
// handoverrequest->setSourceToTarget_TransparentContainer(sourceTotarget);
string
supi
=
"imsi-"
+
nc
.
get
()
->
imsi
;
string
supi
=
"imsi-"
+
nc
.
get
()
->
imsi
;
...
@@ -1060,6 +1044,7 @@ void amf_n2::handle_itti_message(itti_handover_required& itti_msg) {
...
@@ -1060,6 +1044,7 @@ void amf_n2::handle_itti_message(itti_handover_required& itti_msg) {
handoverrequest
->
setGUAMI
(
m_plmnId
,
m_aMFRegionID
,
m_aMFSetID
,
m_aMFPointer
);
handoverrequest
->
setGUAMI
(
m_plmnId
,
m_aMFRegionID
,
m_aMFSetID
,
m_aMFPointer
);
uint8_t
buffer
[
20240
];
uint8_t
buffer
[
20240
];
int
encoded_size
=
handoverrequest
->
encode2buffer
(
buffer
,
20240
);
int
encoded_size
=
handoverrequest
->
encode2buffer
(
buffer
,
20240
);
delete
handoverrequest
;
bstring
b
=
blk2bstr
(
buffer
,
encoded_size
);
bstring
b
=
blk2bstr
(
buffer
,
encoded_size
);
std
::
shared_ptr
<
gnb_context
>
gc_target
;
std
::
shared_ptr
<
gnb_context
>
gc_target
;
gc_target
=
gnb_id_2_gnb_context
(
gnbid
->
getValue
());
gc_target
=
gnb_id_2_gnb_context
(
gnbid
->
getValue
());
...
@@ -1173,6 +1158,7 @@ void amf_n2::handle_itti_message(itti_handover_request_Ack& itti_msg) {
...
@@ -1173,6 +1158,7 @@ void amf_n2::handle_itti_message(itti_handover_request_Ack& itti_msg) {
/**************************setPduSessionResourceHandoverList_PDYSessionID_handovercommandtransfer-end**************************/
/**************************setPduSessionResourceHandoverList_PDYSessionID_handovercommandtransfer-end**************************/
uint8_t
buffer
[
10240
];
uint8_t
buffer
[
10240
];
int
encoded_size
=
handovercommand
->
encode2buffer
(
buffer
,
10240
);
int
encoded_size
=
handovercommand
->
encode2buffer
(
buffer
,
10240
);
delete
handovercommand
;
bstring
b
=
blk2bstr
(
buffer
,
encoded_size
);
bstring
b
=
blk2bstr
(
buffer
,
encoded_size
);
std
::
shared_ptr
<
ue_ngap_context
>
unc
;
std
::
shared_ptr
<
ue_ngap_context
>
unc
;
if
(
!
is_ran_ue_id_2_ue_ngap_context
(
ran_id_Global
))
{
if
(
!
is_ran_ue_id_2_ue_ngap_context
(
ran_id_Global
))
{
...
@@ -1182,6 +1168,9 @@ void amf_n2::handle_itti_message(itti_handover_request_Ack& itti_msg) {
...
@@ -1182,6 +1168,9 @@ void amf_n2::handle_itti_message(itti_handover_request_Ack& itti_msg) {
unc
=
std
::
shared_ptr
<
ue_ngap_context
>
(
new
ue_ngap_context
());
unc
=
std
::
shared_ptr
<
ue_ngap_context
>
(
new
ue_ngap_context
());
set_ran_ue_ngap_id_2_ue_ngap_context
(
ran_id_Global
,
unc
);
set_ran_ue_ngap_id_2_ue_ngap_context
(
ran_id_Global
,
unc
);
unc
.
get
()
->
gnb_assoc_id
=
source_assoc_id
;
unc
.
get
()
->
gnb_assoc_id
=
source_assoc_id
;
}
else
{
unc
=
ran_ue_id_2_ue_ngap_context
(
ran_id_Global
);
unc
.
get
()
->
gnb_assoc_id
=
source_assoc_id
;
}
}
// std::shared_ptr<ue_ngap_context> ngc =
// std::shared_ptr<ue_ngap_context> ngc =
// ran_ue_id_2_ue_ngap_context(nc.get()->ran_ue_ngap_id);
// ran_ue_id_2_ue_ngap_context(nc.get()->ran_ue_ngap_id);
...
@@ -1217,12 +1206,13 @@ void amf_n2::handle_itti_message(itti_handover_notify& itti_msg) {
...
@@ -1217,12 +1206,13 @@ void amf_n2::handle_itti_message(itti_handover_notify& itti_msg) {
Ngap_CauseRadioNetwork_successful_handover
);
Ngap_CauseRadioNetwork_successful_handover
);
uint8_t
buffer
[
10240
];
uint8_t
buffer
[
10240
];
int
encoded_size
=
ueContextReleaseCommand
->
encode2buffer
(
buffer
,
10240
);
int
encoded_size
=
ueContextReleaseCommand
->
encode2buffer
(
buffer
,
10240
);
delete
ueContextReleaseCommand
;
bstring
b
=
blk2bstr
(
buffer
,
encoded_size
);
bstring
b
=
blk2bstr
(
buffer
,
encoded_size
);
std
::
shared_ptr
<
nas_context
>
nc
=
std
::
shared_ptr
<
nas_context
>
nc
=
amf_n1_inst
->
amf_ue_id_2_nas_context
(
amf_ue_ngap_id
);
amf_n1_inst
->
amf_ue_id_2_nas_context
(
amf_ue_ngap_id
);
std
::
shared_ptr
<
ue_ngap_context
>
ngc
=
std
::
shared_ptr
<
ue_ngap_context
>
ngc
=
ran_ue_id_2_ue_ngap_context
(
nc
.
get
()
->
ran_ue_ngap_id
);
ran_ue_id_2_ue_ngap_context
(
nc
.
get
()
->
ran_ue_ngap_id
);
sctp_s_38412
.
sctp_send_msg
(
ngc
.
get
()
->
gnb
_assoc_id
,
0
,
&
b
);
sctp_s_38412
.
sctp_send_msg
(
source
_assoc_id
,
0
,
&
b
);
/*std::shared_ptr<nas_context> nc =
/*std::shared_ptr<nas_context> nc =
amf_n1_inst->amf_ue_id_2_nas_context(amf_ue_ngap_id); string supi = "imsi-" +
amf_n1_inst->amf_ue_id_2_nas_context(amf_ue_ngap_id); string supi = "imsi-" +
nc.get()->imsi; std::shared_ptr<pdu_session_context> psc =
nc.get()->imsi; std::shared_ptr<pdu_session_context> psc =
...
@@ -1302,6 +1292,7 @@ void amf_n2::handle_itti_message(itti_uplinkranstatsutransfer& itti_msg) {
...
@@ -1302,6 +1292,7 @@ void amf_n2::handle_itti_message(itti_uplinkranstatsutransfer& itti_msg) {
amf_drb_id
,
amf_ul_pdcp
,
amf_hfn_ul_pdcp
,
amf_dl_pdcp
,
amf_hfn_dl_pdcp
);
amf_drb_id
,
amf_ul_pdcp
,
amf_hfn_ul_pdcp
,
amf_dl_pdcp
,
amf_hfn_dl_pdcp
);
uint8_t
buffer
[
1024
];
uint8_t
buffer
[
1024
];
int
encode_size
=
downLinkranstatustransfer
->
encodetobuffer
(
buffer
,
1024
);
int
encode_size
=
downLinkranstatustransfer
->
encodetobuffer
(
buffer
,
1024
);
delete
downLinkranstatustransfer
;
bstring
b
=
blk2bstr
(
buffer
,
encode_size
);
bstring
b
=
blk2bstr
(
buffer
,
encode_size
);
// std::shared_ptr<ue_ngap_context> ngc =
// std::shared_ptr<ue_ngap_context> ngc =
// ran_ue_id_2_ue_ngap_context(AMF_TARGET_ran_id_global);
// ran_ue_id_2_ue_ngap_context(AMF_TARGET_ran_id_global);
...
...
src/contexts/nas_context.hpp
View file @
630dfe19
...
@@ -92,6 +92,7 @@ class nas_context {
...
@@ -92,6 +92,7 @@ class nas_context {
auc_vector_t
_vector
[
MAX_5GS_AUTH_VECTORS
];
/* 5GS authentication vector */
auc_vector_t
_vector
[
MAX_5GS_AUTH_VECTORS
];
/* 5GS authentication vector */
_5G_HE_AV_t
_5g_he_av
[
MAX_5GS_AUTH_VECTORS
];
// generated by UDM
_5G_HE_AV_t
_5g_he_av
[
MAX_5GS_AUTH_VECTORS
];
// generated by UDM
_5G_AV_t
_5g_av
[
MAX_5GS_AUTH_VECTORS
];
// generated by ausf
_5G_AV_t
_5g_av
[
MAX_5GS_AUTH_VECTORS
];
// generated by ausf
std
::
string
Href
;
uint8_t
kamf
[
MAX_5GS_AUTH_VECTORS
][
32
];
uint8_t
kamf
[
MAX_5GS_AUTH_VECTORS
][
32
];
security_context_t
_security
;
security_context_t
_security
;
...
...
src/nas/common/common_defs.h
View file @
630dfe19
...
@@ -4,8 +4,8 @@
...
@@ -4,8 +4,8 @@
* this work for additional information regarding copyright ownership.
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this
* the OAI Public License, Version 1.1 (the "License"); you may not use this
*file except in compliance with the License. You may obtain a copy of the
*
file except in compliance with the License. You may obtain a copy of the
*License at
*
License at
*
*
* http://www.openairinterface.org/?page_id=698
* http://www.openairinterface.org/?page_id=698
*
*
...
...
src/ngap/libngap/asn_application.c
View file @
630dfe19
...
@@ -6,30 +6,26 @@
...
@@ -6,30 +6,26 @@
#include <asn_application.h>
#include <asn_application.h>
#include <errno.h>
#include <errno.h>
static
asn_enc_rval_t
asn_encode_internal
(
const
asn_codec_ctx_t
*
opt_codec_ctx
,
static
asn_enc_rval_t
asn_encode_internal
(
enum
asn_transfer_syntax
syntax
,
const
asn_codec_ctx_t
*
opt_codec_ctx
,
enum
asn_transfer_syntax
syntax
,
const
asn_TYPE_descriptor_t
*
td
,
const
asn_TYPE_descriptor_t
*
td
,
const
void
*
sptr
,
const
void
*
sptr
,
asn_app_consume_bytes_f
*
callback
,
void
*
callback_key
);
asn_app_consume_bytes_f
*
callback
,
void
*
callback_key
);
struct
callback_count_bytes_key
{
struct
callback_count_bytes_key
{
asn_app_consume_bytes_f
*
callback
;
asn_app_consume_bytes_f
*
callback
;
void
*
callback_key
;
void
*
callback_key
;
size_t
computed_size
;
size_t
computed_size
;
};
};
/*
/*
* Encoder which just counts bytes that come through it.
* Encoder which just counts bytes that come through it.
*/
*/
static
int
static
int
callback_count_bytes_cb
(
const
void
*
data
,
size_t
size
,
void
*
keyp
)
{
callback_count_bytes_cb
(
const
void
*
data
,
size_t
size
,
void
*
keyp
)
{
struct
callback_count_bytes_key
*
key
=
keyp
;
struct
callback_count_bytes_key
*
key
=
keyp
;
int
ret
;
int
ret
;
ret
=
key
->
callback
(
data
,
size
,
key
->
callback_key
);
ret
=
key
->
callback
(
data
,
size
,
key
->
callback_key
);
if
(
ret
>=
0
)
{
if
(
ret
>=
0
)
{
key
->
computed_size
+=
size
;
key
->
computed_size
+=
size
;
}
}
...
@@ -37,20 +33,20 @@ callback_count_bytes_cb(const void *data, size_t size, void *keyp) {
...
@@ -37,20 +33,20 @@ callback_count_bytes_cb(const void *data, size_t size, void *keyp) {
}
}
struct
overrun_encoder_key
{
struct
overrun_encoder_key
{
void
*
buffer
;
void
*
buffer
;
size_t
buffer_size
;
size_t
buffer_size
;
size_t
computed_size
;
size_t
computed_size
;
};
};
struct
dynamic_encoder_key
{
struct
dynamic_encoder_key
{
void
*
buffer
;
void
*
buffer
;
size_t
buffer_size
;
size_t
buffer_size
;
size_t
computed_size
;
size_t
computed_size
;
};
};
struct
callback_failure_catch_key
{
struct
callback_failure_catch_key
{
asn_app_consume_bytes_f
*
callback
;
asn_app_consume_bytes_f
*
callback
;
void
*
callback_key
;
void
*
callback_key
;
int
callback_failed
;
int
callback_failed
;
};
};
...
@@ -58,18 +54,17 @@ struct callback_failure_catch_key {
...
@@ -58,18 +54,17 @@ struct callback_failure_catch_key {
* Encoder which doesn't stop counting bytes
* Encoder which doesn't stop counting bytes
* even if it reaches the end of the buffer.
* even if it reaches the end of the buffer.
*/
*/
static
int
static
int
overrun_encoder_cb
(
const
void
*
data
,
size_t
size
,
void
*
keyp
)
{
overrun_encoder_cb
(
const
void
*
data
,
size_t
size
,
void
*
keyp
)
{
struct
overrun_encoder_key
*
key
=
keyp
;
struct
overrun_encoder_key
*
key
=
keyp
;
if
(
key
->
computed_size
+
size
>
key
->
buffer_size
)
{
if
(
key
->
computed_size
+
size
>
key
->
buffer_size
)
{
/*
/*
* Avoid accident on the next call:
* Avoid accident on the next call:
* stop adding bytes to the buffer.
* stop adding bytes to the buffer.
*/
*/
key
->
buffer_size
=
0
;
key
->
buffer_size
=
0
;
}
else
{
}
else
{
memcpy
((
char
*
)
key
->
buffer
+
key
->
computed_size
,
data
,
size
);
memcpy
((
char
*
)
key
->
buffer
+
key
->
computed_size
,
data
,
size
);
}
}
key
->
computed_size
+=
size
;
key
->
computed_size
+=
size
;
...
@@ -80,21 +75,20 @@ overrun_encoder_cb(const void *data, size_t size, void *keyp) {
...
@@ -80,21 +75,20 @@ overrun_encoder_cb(const void *data, size_t size, void *keyp) {
* Encoder which dynamically allocates output, and continues
* Encoder which dynamically allocates output, and continues
* to count even if allocation failed.
* to count even if allocation failed.
*/
*/
static
int
static
int
dynamic_encoder_cb
(
const
void
*
data
,
size_t
size
,
void
*
keyp
)
{
dynamic_encoder_cb
(
const
void
*
data
,
size_t
size
,
void
*
keyp
)
{
struct
dynamic_encoder_key
*
key
=
keyp
;
struct
dynamic_encoder_key
*
key
=
keyp
;
if
(
key
->
buffer
)
{
if
(
key
->
buffer
)
{
if
(
key
->
computed_size
+
size
>=
key
->
buffer_size
)
{
if
(
key
->
computed_size
+
size
>=
key
->
buffer_size
)
{
void
*
p
;
void
*
p
;
size_t
new_size
=
key
->
buffer_size
;
size_t
new_size
=
key
->
buffer_size
;
do
{
do
{
new_size
*=
2
;
new_size
*=
2
;
}
while
(
new_size
<=
key
->
computed_size
+
size
);
}
while
(
new_size
<=
key
->
computed_size
+
size
);
p
=
REALLOC
(
key
->
buffer
,
new_size
);
p
=
REALLOC
(
key
->
buffer
,
new_size
);
if
(
p
)
{
if
(
p
)
{
key
->
buffer
=
p
;
key
->
buffer
=
p
;
key
->
buffer_size
=
new_size
;
key
->
buffer_size
=
new_size
;
}
else
{
}
else
{
...
@@ -105,7 +99,7 @@ dynamic_encoder_cb(const void *data, size_t size, void *keyp) {
...
@@ -105,7 +99,7 @@ dynamic_encoder_cb(const void *data, size_t size, void *keyp) {
return
0
;
return
0
;
}
}
}
}
memcpy
((
char
*
)
key
->
buffer
+
key
->
computed_size
,
data
,
size
);
memcpy
((
char
*
)
key
->
buffer
+
key
->
computed_size
,
data
,
size
);
}
}
key
->
computed_size
+=
size
;
key
->
computed_size
+=
size
;
...
@@ -116,27 +110,27 @@ dynamic_encoder_cb(const void *data, size_t size, void *keyp) {
...
@@ -116,27 +110,27 @@ dynamic_encoder_cb(const void *data, size_t size, void *keyp) {
/*
/*
* Encoder which help convert the application level encoder failure into EIO.
* Encoder which help convert the application level encoder failure into EIO.
*/
*/
static
int
static
int
callback_failure_catch_cb
(
callback_failure_catch_cb
(
const
void
*
data
,
size_t
size
,
void
*
keyp
)
{
const
void
*
data
,
size_t
size
,
void
*
keyp
)
{
struct
callback_failure_catch_key
*
key
=
keyp
;
struct
callback_failure_catch_key
*
key
=
keyp
;
int
ret
;
int
ret
;
ret
=
key
->
callback
(
data
,
size
,
key
->
callback_key
);
ret
=
key
->
callback
(
data
,
size
,
key
->
callback_key
);
if
(
ret
<
0
)
{
if
(
ret
<
0
)
{
key
->
callback_failed
=
1
;
key
->
callback_failed
=
1
;
}
}
return
ret
;
return
ret
;
}
}
asn_enc_rval_t
asn_enc_rval_t
asn_encode
(
asn_encode
(
const
asn_codec_ctx_t
*
opt_codec_ct
x
,
const
asn_codec_ctx_t
*
opt_codec_ctx
,
enum
asn_transfer_syntax
synta
x
,
enum
asn_transfer_syntax
syntax
,
const
asn_TYPE_descriptor_t
*
td
,
const
asn_TYPE_descriptor_t
*
td
,
const
void
*
sptr
,
const
void
*
sptr
,
asn_app_consume_bytes_f
*
callback
,
void
*
callback_key
)
{
asn_app_consume_bytes_f
*
callback
,
void
*
callback_key
)
{
struct
callback_failure_catch_key
cb_key
;
struct
callback_failure_catch_key
cb_key
;
asn_enc_rval_t
er
;
asn_enc_rval_t
er
;
if
(
!
callback
)
{
if
(
!
callback
)
{
errno
=
EINVAL
;
errno
=
EINVAL
;
ASN__ENCODE_FAILED
;
ASN__ENCODE_FAILED
;
}
}
...
@@ -145,9 +139,9 @@ asn_encode(const asn_codec_ctx_t *opt_codec_ctx,
...
@@ -145,9 +139,9 @@ asn_encode(const asn_codec_ctx_t *opt_codec_ctx,
cb_key
.
callback_key
=
callback_key
;
cb_key
.
callback_key
=
callback_key
;
cb_key
.
callback_failed
=
0
;
cb_key
.
callback_failed
=
0
;
er
=
asn_encode_internal
(
opt_codec_ctx
,
syntax
,
td
,
sptr
,
er
=
asn_encode_internal
(
callback_failure_catch_cb
,
&
cb_key
);
opt_codec_ctx
,
syntax
,
td
,
sptr
,
callback_failure_catch_cb
,
&
cb_key
);
if
(
cb_key
.
callback_failed
)
{
if
(
cb_key
.
callback_failed
)
{
assert
(
er
.
encoded
==
-
1
);
assert
(
er
.
encoded
==
-
1
);
assert
(
errno
==
EBADF
);
assert
(
errno
==
EBADF
);
errno
=
EIO
;
errno
=
EIO
;
...
@@ -156,15 +150,14 @@ asn_encode(const asn_codec_ctx_t *opt_codec_ctx,
...
@@ -156,15 +150,14 @@ asn_encode(const asn_codec_ctx_t *opt_codec_ctx,
return
er
;
return
er
;
}
}
asn_enc_rval_t
asn_enc_rval_t
asn_encode_to_buffer
(
asn_encode_to_buffer
(
const
asn_codec_ctx_t
*
opt_codec_ctx
,
const
asn_codec_ctx_t
*
opt_codec_ctx
,
enum
asn_transfer_syntax
syntax
,
enum
asn_transfer_syntax
syntax
,
const
asn_TYPE_descriptor_t
*
td
,
const
void
*
sptr
,
void
*
buffer
,
const
asn_TYPE_descriptor_t
*
td
,
const
void
*
sptr
,
size_t
buffer_size
)
{
void
*
buffer
,
size_t
buffer_size
)
{
struct
overrun_encoder_key
buf_key
;
struct
overrun_encoder_key
buf_key
;
asn_enc_rval_t
er
;
asn_enc_rval_t
er
;
if
(
buffer_size
>
0
&&
!
buffer
)
{
if
(
buffer_size
>
0
&&
!
buffer
)
{
errno
=
EINVAL
;
errno
=
EINVAL
;
ASN__ENCODE_FAILED
;
ASN__ENCODE_FAILED
;
}
}
...
@@ -173,23 +166,23 @@ asn_encode_to_buffer(const asn_codec_ctx_t *opt_codec_ctx,
...
@@ -173,23 +166,23 @@ asn_encode_to_buffer(const asn_codec_ctx_t *opt_codec_ctx,
buf_key
.
buffer_size
=
buffer_size
;
buf_key
.
buffer_size
=
buffer_size
;
buf_key
.
computed_size
=
0
;
buf_key
.
computed_size
=
0
;
er
=
asn_encode_internal
(
opt_codec_ctx
,
syntax
,
td
,
sptr
,
er
=
asn_encode_internal
(
overrun_encoder_cb
,
&
buf_key
);
opt_codec_ctx
,
syntax
,
td
,
sptr
,
overrun_encoder_cb
,
&
buf_key
);
if
(
er
.
encoded
>=
0
&&
(
size_t
)
er
.
encoded
!=
buf_key
.
computed_size
)
{
if
(
er
.
encoded
>=
0
&&
(
size_t
)
er
.
encoded
!=
buf_key
.
computed_size
)
{
ASN_DEBUG
(
"asn_encode() returned %"
ASN_PRI_SSIZE
ASN_DEBUG
(
" yet produced %"
ASN_PRI_SIZE
" bytes"
,
"asn_encode() returned %"
ASN_PRI_SSIZE
" yet produced %"
ASN_PRI_SIZE
" bytes"
,
er
.
encoded
,
buf_key
.
computed_size
);
er
.
encoded
,
buf_key
.
computed_size
);
assert
(
er
.
encoded
<
0
||
(
size_t
)
er
.
encoded
==
buf_key
.
computed_size
);
assert
(
er
.
encoded
<
0
||
(
size_t
)
er
.
encoded
==
buf_key
.
computed_size
);
}
}
return
er
;
return
er
;
}
}
asn_encode_to_new_buffer_result_t
asn_encode_to_new_buffer_result_t
asn_encode_to_new_buffer
(
asn_encode_to_new_buffer
(
const
asn_codec_ctx_t
*
opt_codec_ctx
,
const
asn_codec_ctx_t
*
opt_codec_ctx
,
enum
asn_transfer_syntax
syntax
,
enum
asn_transfer_syntax
syntax
,
const
asn_TYPE_descriptor_t
*
td
,
const
void
*
sptr
)
{
const
asn_TYPE_descriptor_t
*
td
,
const
void
*
sptr
)
{
struct
dynamic_encoder_key
buf_key
;
struct
dynamic_encoder_key
buf_key
;
asn_encode_to_new_buffer_result_t
res
;
asn_encode_to_new_buffer_result_t
res
;
...
@@ -197,55 +190,55 @@ asn_encode_to_new_buffer(const asn_codec_ctx_t *opt_codec_ctx,
...
@@ -197,55 +190,55 @@ asn_encode_to_new_buffer(const asn_codec_ctx_t *opt_codec_ctx,
buf_key
.
buffer
=
MALLOC
(
buf_key
.
buffer_size
);
buf_key
.
buffer
=
MALLOC
(
buf_key
.
buffer_size
);
buf_key
.
computed_size
=
0
;
buf_key
.
computed_size
=
0
;
res
.
result
=
asn_encode_internal
(
opt_codec_ctx
,
syntax
,
td
,
sptr
,
res
.
result
=
asn_encode_internal
(
dynamic_encoder_cb
,
&
buf_key
);
opt_codec_ctx
,
syntax
,
td
,
sptr
,
dynamic_encoder_cb
,
&
buf_key
);
if
(
res
.
result
.
encoded
>=
0
if
(
res
.
result
.
encoded
>=
0
&&
&&
(
size_t
)
res
.
result
.
encoded
!=
buf_key
.
computed_size
)
{
(
size_t
)
res
.
result
.
encoded
!=
buf_key
.
computed_size
)
{
ASN_DEBUG
(
"asn_encode() returned %"
ASN_PRI_SSIZE
ASN_DEBUG
(
" yet produced %"
ASN_PRI_SIZE
" bytes"
,
"asn_encode() returned %"
ASN_PRI_SSIZE
" yet produced %"
ASN_PRI_SIZE
" bytes"
,
res
.
result
.
encoded
,
buf_key
.
computed_size
);
res
.
result
.
encoded
,
buf_key
.
computed_size
);
assert
(
res
.
result
.
encoded
<
0
assert
(
||
(
size_t
)
res
.
result
.
encoded
==
buf_key
.
computed_size
);
res
.
result
.
encoded
<
0
||
(
size_t
)
res
.
result
.
encoded
==
buf_key
.
computed_size
);
}
}
res
.
buffer
=
buf_key
.
buffer
;
res
.
buffer
=
buf_key
.
buffer
;
/* 0-terminate just in case. */
/* 0-terminate just in case. */
if
(
res
.
buffer
)
{
if
(
res
.
buffer
)
{
assert
(
buf_key
.
computed_size
<
buf_key
.
buffer_size
);
assert
(
buf_key
.
computed_size
<
buf_key
.
buffer_size
);
((
char
*
)
res
.
buffer
)[
buf_key
.
computed_size
]
=
'\0'
;
((
char
*
)
res
.
buffer
)[
buf_key
.
computed_size
]
=
'\0'
;
}
}
return
res
;
return
res
;
}
}
static
asn_enc_rval_t
static
asn_enc_rval_t
asn_encode_internal
(
asn_encode_internal
(
const
asn_codec_ctx_t
*
opt_codec_ctx
,
const
asn_codec_ctx_t
*
opt_codec_ctx
,
enum
asn_transfer_syntax
syntax
,
enum
asn_transfer_syntax
syntax
,
const
asn_TYPE_descriptor_t
*
td
,
const
void
*
sptr
,
const
asn_TYPE_descriptor_t
*
td
,
const
void
*
sptr
,
asn_app_consume_bytes_f
*
callback
,
void
*
callback_key
)
{
asn_app_consume_bytes_f
*
callback
,
void
*
callback_key
)
{
asn_enc_rval_t
er
;
asn_enc_rval_t
er
;
enum
xer_encoder_flags_e
xer_flags
=
XER_F_CANONICAL
;
enum
xer_encoder_flags_e
xer_flags
=
XER_F_CANONICAL
;
(
void
)
opt_codec_ctx
;
/* Parameters are not checked on encode yet. */
(
void
)
opt_codec_ctx
;
/* Parameters are not checked on encode yet. */
if
(
!
td
||
!
sptr
)
{
if
(
!
td
||
!
sptr
)
{
errno
=
EINVAL
;
errno
=
EINVAL
;
ASN__ENCODE_FAILED
;
ASN__ENCODE_FAILED
;
}
}
switch
(
syntax
)
{
switch
(
syntax
)
{
case
ATS_NONSTANDARD_PLAINTEXT
:
case
ATS_NONSTANDARD_PLAINTEXT
:
if
(
td
->
op
->
print_struct
)
{
if
(
td
->
op
->
print_struct
)
{
struct
callback_count_bytes_key
cb_key
;
struct
callback_count_bytes_key
cb_key
;
cb_key
.
callback
=
callback
;
cb_key
.
callback
=
callback
;
cb_key
.
callback_key
=
callback_key
;
cb_key
.
callback_key
=
callback_key
;
cb_key
.
computed_size
=
0
;
cb_key
.
computed_size
=
0
;
if
(
td
->
op
->
print_struct
(
td
,
sptr
,
1
,
callback_count_bytes_cb
,
if
(
td
->
op
->
print_struct
(
&
cb_key
)
td
,
sptr
,
1
,
callback_count_bytes_cb
,
&
cb_key
)
<
0
||
<
0
callback_count_bytes_cb
(
"
\n
"
,
1
,
&
cb_key
)
<
0
)
{
||
callback_count_bytes_cb
(
"
\n
"
,
1
,
&
cb_key
)
<
0
)
{
errno
=
EBADF
;
/* Structure has incorrect form. */
errno
=
EBADF
;
/* Structure has incorrect form. */
er
.
encoded
=
-
1
;
er
.
encoded
=
-
1
;
er
.
failed_type
=
td
;
er
.
failed_type
=
td
;
...
@@ -269,10 +262,10 @@ asn_encode_internal(const asn_codec_ctx_t *opt_codec_ctx,
...
@@ -269,10 +262,10 @@ asn_encode_internal(const asn_codec_ctx_t *opt_codec_ctx,
/* BER is a superset of DER. */
/* BER is a superset of DER. */
/* Fall through. */
/* Fall through. */
case
ATS_DER
:
case
ATS_DER
:
if
(
td
->
op
->
der_encoder
)
{
if
(
td
->
op
->
der_encoder
)
{
er
=
der_encode
(
td
,
sptr
,
callback
,
callback_key
);
er
=
der_encode
(
td
,
sptr
,
callback
,
callback_key
);
if
(
er
.
encoded
==
-
1
)
{
if
(
er
.
encoded
==
-
1
)
{
if
(
er
.
failed_type
&&
er
.
failed_type
->
op
->
der_encoder
)
{
if
(
er
.
failed_type
&&
er
.
failed_type
->
op
->
der_encoder
)
{
errno
=
EBADF
;
/* Structure has incorrect form. */
errno
=
EBADF
;
/* Structure has incorrect form. */
}
else
{
}
else
{
errno
=
ENOENT
;
/* DER is not defined for this type. */
errno
=
ENOENT
;
/* DER is not defined for this type. */
...
@@ -298,10 +291,10 @@ asn_encode_internal(const asn_codec_ctx_t *opt_codec_ctx,
...
@@ -298,10 +291,10 @@ asn_encode_internal(const asn_codec_ctx_t *opt_codec_ctx,
/* CANONICAL-OER is a superset of BASIC-OER. */
/* CANONICAL-OER is a superset of BASIC-OER. */
/* Fall through. */
/* Fall through. */
case
ATS_CANONICAL_OER
:
case
ATS_CANONICAL_OER
:
if
(
td
->
op
->
oer_encoder
)
{
if
(
td
->
op
->
oer_encoder
)
{
er
=
oer_encode
(
td
,
sptr
,
callback
,
callback_key
);
er
=
oer_encode
(
td
,
sptr
,
callback
,
callback_key
);
if
(
er
.
encoded
==
-
1
)
{
if
(
er
.
encoded
==
-
1
)
{
if
(
er
.
failed_type
&&
er
.
failed_type
->
op
->
oer_encoder
)
{
if
(
er
.
failed_type
&&
er
.
failed_type
->
op
->
oer_encoder
)
{
errno
=
EBADF
;
/* Structure has incorrect form. */
errno
=
EBADF
;
/* Structure has incorrect form. */
}
else
{
}
else
{
errno
=
ENOENT
;
/* OER is not defined for this type. */
errno
=
ENOENT
;
/* OER is not defined for this type. */
...
@@ -327,19 +320,19 @@ asn_encode_internal(const asn_codec_ctx_t *opt_codec_ctx,
...
@@ -327,19 +320,19 @@ asn_encode_internal(const asn_codec_ctx_t *opt_codec_ctx,
/* CANONICAL-UPER is a superset of BASIC-UPER. */
/* CANONICAL-UPER is a superset of BASIC-UPER. */
/* Fall through. */
/* Fall through. */
case
ATS_UNALIGNED_CANONICAL_PER
:
case
ATS_UNALIGNED_CANONICAL_PER
:
if
(
td
->
op
->
uper_encoder
)
{
if
(
td
->
op
->
uper_encoder
)
{
er
=
uper_encode
(
td
,
0
,
sptr
,
callback
,
callback_key
);
er
=
uper_encode
(
td
,
0
,
sptr
,
callback
,
callback_key
);
if
(
er
.
encoded
==
-
1
)
{
if
(
er
.
encoded
==
-
1
)
{
if
(
er
.
failed_type
&&
er
.
failed_type
->
op
->
uper_encoder
)
{
if
(
er
.
failed_type
&&
er
.
failed_type
->
op
->
uper_encoder
)
{
errno
=
EBADF
;
/* Structure has incorrect form. */
errno
=
EBADF
;
/* Structure has incorrect form. */
}
else
{
}
else
{
errno
=
ENOENT
;
/* UPER is not defined for this type. */
errno
=
ENOENT
;
/* UPER is not defined for this type. */
}
}
}
else
{
}
else
{
ASN_DEBUG
(
"Complete encoded in %ld bits"
,
(
long
)
er
.
encoded
);
ASN_DEBUG
(
"Complete encoded in %ld bits"
,
(
long
)
er
.
encoded
);
if
(
er
.
encoded
==
0
)
{
if
(
er
.
encoded
==
0
)
{
/* Enforce "Complete Encoding" of X.691 #11.1 */
/* Enforce "Complete Encoding" of X.691 #11.1 */
if
(
callback
(
"
\0
"
,
1
,
callback_key
)
<
0
)
{
if
(
callback
(
"
\0
"
,
1
,
callback_key
)
<
0
)
{
errno
=
EBADF
;
errno
=
EBADF
;
ASN__ENCODE_FAILED
;
ASN__ENCODE_FAILED
;
}
}
...
@@ -357,19 +350,19 @@ asn_encode_internal(const asn_codec_ctx_t *opt_codec_ctx,
...
@@ -357,19 +350,19 @@ asn_encode_internal(const asn_codec_ctx_t *opt_codec_ctx,
/* CANONICAL-APER is a superset of BASIC-APER. */
/* CANONICAL-APER is a superset of BASIC-APER. */
/* Fall through. */
/* Fall through. */
case
ATS_ALIGNED_CANONICAL_PER
:
case
ATS_ALIGNED_CANONICAL_PER
:
if
(
td
->
op
->
aper_encoder
)
{
if
(
td
->
op
->
aper_encoder
)
{
er
=
aper_encode
(
td
,
0
,
sptr
,
callback
,
callback_key
);
er
=
aper_encode
(
td
,
0
,
sptr
,
callback
,
callback_key
);
if
(
er
.
encoded
==
-
1
)
{
if
(
er
.
encoded
==
-
1
)
{
if
(
er
.
failed_type
&&
er
.
failed_type
->
op
->
aper_encoder
)
{
if
(
er
.
failed_type
&&
er
.
failed_type
->
op
->
aper_encoder
)
{
errno
=
EBADF
;
/* Structure has incorrect form. */
errno
=
EBADF
;
/* Structure has incorrect form. */
}
else
{
}
else
{
errno
=
ENOENT
;
/* APER is not defined for this type. */
errno
=
ENOENT
;
/* APER is not defined for this type. */
}
}
}
else
{
}
else
{
ASN_DEBUG
(
"Complete encoded in %ld bits"
,
(
long
)
er
.
encoded
);
ASN_DEBUG
(
"Complete encoded in %ld bits"
,
(
long
)
er
.
encoded
);
if
(
er
.
encoded
==
0
)
{
if
(
er
.
encoded
==
0
)
{
/* Enforce "Complete Encoding" of X.691 #11.1 */
/* Enforce "Complete Encoding" of X.691 #11.1 */
if
(
callback
(
"
\0
"
,
1
,
callback_key
)
<
0
)
{
if
(
callback
(
"
\0
"
,
1
,
callback_key
)
<
0
)
{
errno
=
EBADF
;
errno
=
EBADF
;
ASN__ENCODE_FAILED
;
ASN__ENCODE_FAILED
;
}
}
...
@@ -391,10 +384,10 @@ asn_encode_internal(const asn_codec_ctx_t *opt_codec_ctx,
...
@@ -391,10 +384,10 @@ asn_encode_internal(const asn_codec_ctx_t *opt_codec_ctx,
xer_flags
|=
XER_F_BASIC
;
xer_flags
|=
XER_F_BASIC
;
/* Fall through. */
/* Fall through. */
case
ATS_CANONICAL_XER
:
case
ATS_CANONICAL_XER
:
if
(
td
->
op
->
xer_encoder
)
{
if
(
td
->
op
->
xer_encoder
)
{
er
=
xer_encode
(
td
,
sptr
,
xer_flags
,
callback
,
callback_key
);
er
=
xer_encode
(
td
,
sptr
,
xer_flags
,
callback
,
callback_key
);
if
(
er
.
encoded
==
-
1
)
{
if
(
er
.
encoded
==
-
1
)
{
if
(
er
.
failed_type
&&
er
.
failed_type
->
op
->
xer_encoder
)
{
if
(
er
.
failed_type
&&
er
.
failed_type
->
op
->
xer_encoder
)
{
errno
=
EBADF
;
/* Structure has incorrect form. */
errno
=
EBADF
;
/* Structure has incorrect form. */
}
else
{
}
else
{
errno
=
ENOENT
;
/* XER is not defined for this type. */
errno
=
ENOENT
;
/* XER is not defined for this type. */
...
@@ -414,15 +407,15 @@ asn_encode_internal(const asn_codec_ctx_t *opt_codec_ctx,
...
@@ -414,15 +407,15 @@ asn_encode_internal(const asn_codec_ctx_t *opt_codec_ctx,
return
er
;
return
er
;
}
}
asn_dec_rval_t
asn_dec_rval_t
asn_decode
(
asn_decode
(
const
asn_codec_ctx_t
*
opt_codec_ct
x
,
const
asn_codec_ctx_t
*
opt_codec_ctx
,
enum
asn_transfer_syntax
synta
x
,
enum
asn_transfer_syntax
syntax
,
const
asn_TYPE_descriptor_t
*
td
,
const
asn_TYPE_descriptor_t
*
td
,
void
**
sptr
,
const
void
*
buffer
,
void
**
sptr
,
const
void
*
buffer
,
size_t
size
)
{
size_t
size
)
{
if
(
!
td
||
!
td
->
op
||
!
sptr
||
(
size
&&
!
buffer
))
{
if
(
!
td
||
!
td
->
op
||
!
sptr
||
(
size
&&
!
buffer
))
{
ASN__DECODE_FAILED
;
ASN__DECODE_FAILED
;
}
}
switch
(
syntax
)
{
switch
(
syntax
)
{
case
ATS_CER
:
case
ATS_CER
:
case
ATS_NONSTANDARD_PLAINTEXT
:
case
ATS_NONSTANDARD_PLAINTEXT
:
default:
default:
...
@@ -430,10 +423,10 @@ asn_decode(const asn_codec_ctx_t *opt_codec_ctx,
...
@@ -430,10 +423,10 @@ asn_decode(const asn_codec_ctx_t *opt_codec_ctx,
ASN__DECODE_FAILED
;
ASN__DECODE_FAILED
;
case
ATS_RANDOM
:
case
ATS_RANDOM
:
if
(
!
td
->
op
->
random_fill
)
{
if
(
!
td
->
op
->
random_fill
)
{
ASN__DECODE_FAILED
;
ASN__DECODE_FAILED
;
}
else
{
}
else
{
if
(
asn_random_fill
(
td
,
sptr
,
16000
)
==
0
)
{
if
(
asn_random_fill
(
td
,
sptr
,
16000
)
==
0
)
{
asn_dec_rval_t
ret
=
{
RC_OK
,
0
};
asn_dec_rval_t
ret
=
{
RC_OK
,
0
};
return
ret
;
return
ret
;
}
else
{
}
else
{
...
@@ -478,4 +471,3 @@ asn_decode(const asn_codec_ctx_t *opt_codec_ctx,
...
@@ -478,4 +471,3 @@ asn_decode(const asn_codec_ctx_t *opt_codec_ctx,
return
xer_decode
(
opt_codec_ctx
,
td
,
sptr
,
buffer
,
size
);
return
xer_decode
(
opt_codec_ctx
,
td
,
sptr
,
buffer
,
size
);
}
}
}
}
src/ngap/libngap/per_opentype.c
View file @
630dfe19
...
@@ -400,7 +400,7 @@ aper_open_type_get_simple(const asn_codec_ctx_t *ctx,
...
@@ -400,7 +400,7 @@ aper_open_type_get_simple(const asn_codec_ctx_t *ctx,
const
asn_per_constraints_t
*
constraints
,
void
**
sptr
,
asn_per_data_t
*
pd
)
{
const
asn_per_constraints_t
*
constraints
,
void
**
sptr
,
asn_per_data_t
*
pd
)
{
asn_dec_rval_t
rv
;
asn_dec_rval_t
rv
;
ssize_t
chunk_bytes
;
ssize_t
chunk_bytes
;
int
repeat
;
int
repeat
=
0
;
uint8_t
*
buf
=
0
;
uint8_t
*
buf
=
0
;
size_t
bufLen
=
0
;
size_t
bufLen
=
0
;
size_t
bufSize
=
0
;
size_t
bufSize
=
0
;
...
...
src/sbi/amf_server/AMFApiServer.cpp
View file @
630dfe19
...
@@ -33,20 +33,23 @@ void AMFApiServer::start() {
...
@@ -33,20 +33,23 @@ void AMFApiServer::start() {
if
(
m_n1N2MessageCollectionDocumentApiImpl
!=
nullptr
)
if
(
m_n1N2MessageCollectionDocumentApiImpl
!=
nullptr
)
Logger
::
amf_server
().
debug
(
Logger
::
amf_server
().
debug
(
"AMF handler for N1N2MessageCollectionDocumentApiImpl"
);
"AMF handler for N1N2MessageCollectionDocumentApiImpl"
);
if
(
m_n1N2SubscriptionsCollectionForIndividualUEContextsDocumentApiImpl
if
(
m_n1N2SubscriptionsCollectionForIndividualUEContextsDocumentApiImpl
!=
!=
nullptr
)
nullptr
)
Logger
::
amf_server
().
debug
(
Logger
::
amf_server
().
debug
(
"AMF handler for N1N2SubscriptionsCollectionForIndividualUEContextsDocumentApiImpl"
);
"AMF handler for "
if
(
m_nonUEN2MessageNotificationIndividualSubscriptionDocumentApiImpl
"N1N2SubscriptionsCollectionForIndividualUEContextsDocumentApiImpl"
);
!=
nullptr
)
if
(
m_nonUEN2MessageNotificationIndividualSubscriptionDocumentApiImpl
!=
nullptr
)
Logger
::
amf_server
().
debug
(
Logger
::
amf_server
().
debug
(
"AMF handler for NonUEN2MessageNotificationIndividualSubscriptionDocumentApiImpl"
);
"AMF handler for "
"NonUEN2MessageNotificationIndividualSubscriptionDocumentApiImpl"
);
if
(
m_nonUEN2MessagesCollectionDocumentApiImpl
!=
nullptr
)
if
(
m_nonUEN2MessagesCollectionDocumentApiImpl
!=
nullptr
)
Logger
::
amf_server
().
debug
(
Logger
::
amf_server
().
debug
(
"AMF handler for NonUEN2MessagesCollectionDocumentApiImpl"
);
"AMF handler for NonUEN2MessagesCollectionDocumentApiImpl"
);
if
(
m_nonUEN2MessagesSubscriptionsCollectionDocumentApiImpl
!=
nullptr
)
if
(
m_nonUEN2MessagesSubscriptionsCollectionDocumentApiImpl
!=
nullptr
)
Logger
::
amf_server
().
debug
(
Logger
::
amf_server
().
debug
(
"AMF handler for NonUEN2MessagesSubscriptionsCollectionDocumentApiImpl"
);
"AMF handler for "
"NonUEN2MessagesSubscriptionsCollectionDocumentApiImpl"
);
if
(
m_subscriptionsCollectionDocumentApiImpl
!=
nullptr
)
if
(
m_subscriptionsCollectionDocumentApiImpl
!=
nullptr
)
Logger
::
amf_server
().
debug
(
Logger
::
amf_server
().
debug
(
"AMF handler for SubscriptionsCollectionDocumentApiImpl"
);
"AMF handler for SubscriptionsCollectionDocumentApiImpl"
);
...
...
src/sbi/amf_server/AMFApiServer.hpp
View file @
630dfe19
...
@@ -26,34 +26,39 @@ using namespace oai::amf::api;
...
@@ -26,34 +26,39 @@ using namespace oai::amf::api;
class
AMFApiServer
{
class
AMFApiServer
{
public:
public:
AMFApiServer
(
Pistache
::
Address
address
,
AMFApiServer
(
amf_application
::
amf_app
*
amf_app_inst
)
Pistache
::
Address
address
,
amf_application
::
amf_app
*
amf_app_inst
)
:
:
m_httpEndpoint
(
std
::
make_shared
<
Pistache
::
Http
::
Endpoint
>
(
address
))
{
m_httpEndpoint
(
std
::
make_shared
<
Pistache
::
Http
::
Endpoint
>
(
address
))
{
m_router
=
std
::
make_shared
<
Pistache
::
Rest
::
Router
>
();
m_router
=
std
::
make_shared
<
Pistache
::
Rest
::
Router
>
();
m_individualSubscriptionDocumentApiImpl
=
std
::
make_shared
m_individualSubscriptionDocumentApiImpl
=
<
IndividualSubscriptionDocumentApiImpl
>
(
m_router
,
amf_app_inst
);
std
::
make_shared
<
IndividualSubscriptionDocumentApiImpl
>
(
m_individualUeContextDocumentApiImpl
=
std
::
make_shared
m_router
,
amf_app_inst
);
<
IndividualUeContextDocumentApiImpl
>
(
m_router
,
amf_app_inst
);
m_individualUeContextDocumentApiImpl
=
m_n1N2IndividualSubscriptionDocumentApiImpl
=
std
::
make_shared
std
::
make_shared
<
IndividualUeContextDocumentApiImpl
>
(
<
N1N2IndividualSubscriptionDocumentApiImpl
>
(
m_router
,
amf_app_inst
);
m_router
,
amf_app_inst
);
m_n1N2MessageCollectionDocumentApiImpl
=
std
::
make_shared
m_n1N2IndividualSubscriptionDocumentApiImpl
=
<
N1N2MessageCollectionDocumentApiImpl
>
(
m_router
,
amf_app_inst
);
std
::
make_shared
<
N1N2IndividualSubscriptionDocumentApiImpl
>
(
m_router
,
amf_app_inst
);
m_n1N2MessageCollectionDocumentApiImpl
=
std
::
make_shared
<
N1N2MessageCollectionDocumentApiImpl
>
(
m_router
,
amf_app_inst
);
m_n1N2SubscriptionsCollectionForIndividualUEContextsDocumentApiImpl
=
m_n1N2SubscriptionsCollectionForIndividualUEContextsDocumentApiImpl
=
std
::
make_shared
std
::
make_shared
<
<
N1N2SubscriptionsCollectionForIndividualUEContextsDocumentApiImpl
N1N2SubscriptionsCollectionForIndividualUEContextsDocumentApiImpl
>
(
>
(
m_router
,
amf_app_inst
);
m_router
,
amf_app_inst
);
m_nonUEN2MessageNotificationIndividualSubscriptionDocumentApiImpl
=
m_nonUEN2MessageNotificationIndividualSubscriptionDocumentApiImpl
=
std
::
make_shared
std
::
make_shared
<
<
NonUEN2MessageNotificationIndividualSubscriptionDocumentApiImpl
NonUEN2MessageNotificationIndividualSubscriptionDocumentApiImpl
>
(
>
(
m_router
,
amf_app_inst
);
m_router
,
amf_app_inst
);
m_nonUEN2MessagesCollectionDocumentApiImpl
=
std
::
make_shared
m_nonUEN2MessagesCollectionDocumentApiImpl
=
<
NonUEN2MessagesCollectionDocumentApiImpl
>
(
m_router
,
amf_app_inst
);
std
::
make_shared
<
NonUEN2MessagesCollectionDocumentApiImpl
>
(
m_nonUEN2MessagesSubscriptionsCollectionDocumentApiImpl
=
std
::
make_shared
m_router
,
amf_app_inst
);
<
NonUEN2MessagesSubscriptionsCollectionDocumentApiImpl
m_nonUEN2MessagesSubscriptionsCollectionDocumentApiImpl
=
>
(
m_router
,
amf_app_inst
);
std
::
make_shared
<
NonUEN2MessagesSubscriptionsCollectionDocumentApiImpl
>
(
m_subscriptionsCollectionDocumentApiImpl
=
std
::
make_shared
m_router
,
amf_app_inst
);
<
SubscriptionsCollectionDocumentApiImpl
>
(
m_router
,
amf_app_inst
);
m_subscriptionsCollectionDocumentApiImpl
=
std
::
make_shared
<
SubscriptionsCollectionDocumentApiImpl
>
(
m_router
,
amf_app_inst
);
}
}
void
init
(
size_t
thr
=
1
);
void
init
(
size_t
thr
=
1
);
...
@@ -63,15 +68,24 @@ class AMFApiServer {
...
@@ -63,15 +68,24 @@ class AMFApiServer {
private:
private:
std
::
shared_ptr
<
Pistache
::
Http
::
Endpoint
>
m_httpEndpoint
;
std
::
shared_ptr
<
Pistache
::
Http
::
Endpoint
>
m_httpEndpoint
;
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
m_router
;
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
m_router
;
std
::
shared_ptr
<
IndividualSubscriptionDocumentApiImpl
>
m_individualSubscriptionDocumentApiImpl
;
std
::
shared_ptr
<
IndividualSubscriptionDocumentApiImpl
>
std
::
shared_ptr
<
IndividualUeContextDocumentApiImpl
>
m_individualUeContextDocumentApiImpl
;
m_individualSubscriptionDocumentApiImpl
;
std
::
shared_ptr
<
N1N2IndividualSubscriptionDocumentApiImpl
>
m_n1N2IndividualSubscriptionDocumentApiImpl
;
std
::
shared_ptr
<
IndividualUeContextDocumentApiImpl
>
std
::
shared_ptr
<
N1N2MessageCollectionDocumentApiImpl
>
m_n1N2MessageCollectionDocumentApiImpl
;
m_individualUeContextDocumentApiImpl
;
std
::
shared_ptr
<
N1N2IndividualSubscriptionDocumentApiImpl
>
m_n1N2IndividualSubscriptionDocumentApiImpl
;
std
::
shared_ptr
<
N1N2MessageCollectionDocumentApiImpl
>
m_n1N2MessageCollectionDocumentApiImpl
;
std
::
shared_ptr
<
std
::
shared_ptr
<
N1N2SubscriptionsCollectionForIndividualUEContextsDocumentApiImpl
>
m_n1N2SubscriptionsCollectionForIndividualUEContextsDocumentApiImpl
;
N1N2SubscriptionsCollectionForIndividualUEContextsDocumentApiImpl
>
m_n1N2SubscriptionsCollectionForIndividualUEContextsDocumentApiImpl
;
std
::
shared_ptr
<
std
::
shared_ptr
<
NonUEN2MessageNotificationIndividualSubscriptionDocumentApiImpl
>
m_nonUEN2MessageNotificationIndividualSubscriptionDocumentApiImpl
;
NonUEN2MessageNotificationIndividualSubscriptionDocumentApiImpl
>
std
::
shared_ptr
<
NonUEN2MessagesCollectionDocumentApiImpl
>
m_nonUEN2MessagesCollectionDocumentApiImpl
;
m_nonUEN2MessageNotificationIndividualSubscriptionDocumentApiImpl
;
std
::
shared_ptr
<
NonUEN2MessagesSubscriptionsCollectionDocumentApiImpl
>
m_nonUEN2MessagesSubscriptionsCollectionDocumentApiImpl
;
std
::
shared_ptr
<
NonUEN2MessagesCollectionDocumentApiImpl
>
std
::
shared_ptr
<
SubscriptionsCollectionDocumentApiImpl
>
m_subscriptionsCollectionDocumentApiImpl
;
m_nonUEN2MessagesCollectionDocumentApiImpl
;
std
::
shared_ptr
<
NonUEN2MessagesSubscriptionsCollectionDocumentApiImpl
>
m_nonUEN2MessagesSubscriptionsCollectionDocumentApiImpl
;
std
::
shared_ptr
<
SubscriptionsCollectionDocumentApiImpl
>
m_subscriptionsCollectionDocumentApiImpl
;
};
};
src/sbi/amf_server/model/AuthenticationInfo.cpp
0 → 100644
View file @
630dfe19
/**
* AUSF API
* AUSF UE Authentication Service. © 2020, 3GPP Organizational Partners (ARIB,
* ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
#include "AuthenticationInfo.h"
namespace
oai
{
namespace
amf
{
namespace
model
{
AuthenticationInfo
::
AuthenticationInfo
()
{
m_SupiOrSuci
=
""
;
m_ServingNetworkName
=
""
;
// m_ResynchronizationInfoIsSet = false;
// m_Pei = "";
// m_PeiIsSet = false;
// m_TraceDataIsSet = false;
// m_UdmGroupId = "";
// m_UdmGroupIdIsSet = false;
// m_RoutingIndicator = "";
// m_RoutingIndicatorIsSet = false;
// m_CellCagInfoIsSet = false;
// m_N5gcInd = false;
// m_N5gcIndIsSet = false;
}
AuthenticationInfo
::~
AuthenticationInfo
()
{}
void
AuthenticationInfo
::
validate
()
{
// TODO: implement validation
}
void
to_json
(
nlohmann
::
json
&
j
,
const
AuthenticationInfo
&
o
)
{
j
=
nlohmann
::
json
();
j
[
"supiOrSuci"
]
=
o
.
m_SupiOrSuci
;
j
[
"servingNetworkName"
]
=
o
.
m_ServingNetworkName
;
// if(o.resynchronizationInfoIsSet())
// j["resynchronizationInfo"] = o.m_ResynchronizationInfo;
// if(o.peiIsSet())
// j["pei"] = o.m_Pei;
// if(o.traceDataIsSet())
// j["traceData"] = o.m_TraceData;
// if(o.udmGroupIdIsSet())
// j["udmGroupId"] = o.m_UdmGroupId;
// if(o.routingIndicatorIsSet())
// j["routingIndicator"] = o.m_RoutingIndicator;
// if(o.cellCagInfoIsSet() || !o.m_CellCagInfo.empty())
// j["cellCagInfo"] = o.m_CellCagInfo;
// if(o.n5gcIndIsSet())
// j["n5gcInd"] = o.m_N5gcInd;
}
void
from_json
(
const
nlohmann
::
json
&
j
,
AuthenticationInfo
&
o
)
{
j
.
at
(
"supiOrSuci"
).
get_to
(
o
.
m_SupiOrSuci
);
j
.
at
(
"servingNetworkName"
).
get_to
(
o
.
m_ServingNetworkName
);
// if(j.find("resynchronizationInfo") != j.end())
// {
// j.at("resynchronizationInfo").get_to(o.m_ResynchronizationInfo);
// o.m_ResynchronizationInfoIsSet = true;
// }
// if(j.find("pei") != j.end())
// {
// j.at("pei").get_to(o.m_Pei);
// o.m_PeiIsSet = true;
// }
// if(j.find("traceData") != j.end())
// {
// j.at("traceData").get_to(o.m_TraceData);
// o.m_TraceDataIsSet = true;
// }
// if(j.find("udmGroupId") != j.end())
// {
// j.at("udmGroupId").get_to(o.m_UdmGroupId);
// o.m_UdmGroupIdIsSet = true;
// }
// if(j.find("routingIndicator") != j.end())
// {
// j.at("routingIndicator").get_to(o.m_RoutingIndicator);
// o.m_RoutingIndicatorIsSet = true;
// }
// if(j.find("cellCagInfo") != j.end())
// {
// j.at("cellCagInfo").get_to(o.m_CellCagInfo);
// o.m_CellCagInfoIsSet = true;
// }
// if(j.find("n5gcInd") != j.end())
// {
// j.at("n5gcInd").get_to(o.m_N5gcInd);
// o.m_N5gcIndIsSet = true;
// }
}
std
::
string
AuthenticationInfo
::
getSupiOrSuci
()
const
{
return
m_SupiOrSuci
;
}
void
AuthenticationInfo
::
setSupiOrSuci
(
std
::
string
const
&
value
)
{
m_SupiOrSuci
=
value
;
}
std
::
string
AuthenticationInfo
::
getServingNetworkName
()
const
{
return
m_ServingNetworkName
;
}
void
AuthenticationInfo
::
setServingNetworkName
(
std
::
string
const
&
value
)
{
m_ServingNetworkName
=
value
;
}
// ResynchronizationInfo AuthenticationInfo::getResynchronizationInfo() const
//{
// return m_ResynchronizationInfo;
//}
// void AuthenticationInfo::setResynchronizationInfo(ResynchronizationInfo
// const& value)
//{
// m_ResynchronizationInfo = value;
// m_ResynchronizationInfoIsSet = true;
//}
// bool AuthenticationInfo::resynchronizationInfoIsSet() const
//{
// return m_ResynchronizationInfoIsSet;
//}
// void AuthenticationInfo::unsetResynchronizationInfo()
//{
// m_ResynchronizationInfoIsSet = false;
//}
// std::string AuthenticationInfo::getPei() const
//{
// return m_Pei;
//}
// void AuthenticationInfo::setPei(std::string const& value)
//{
// m_Pei = value;
// m_PeiIsSet = true;
//}
// bool AuthenticationInfo::peiIsSet() const
//{
// return m_PeiIsSet;
//}
// void AuthenticationInfo::unsetPei()
//{
// m_PeiIsSet = false;
//}
// TraceData AuthenticationInfo::getTraceData() const
//{
// return m_TraceData;
//}
// void AuthenticationInfo::setTraceData(TraceData const& value)
//{
// m_TraceData = value;
// m_TraceDataIsSet = true;
//}
// bool AuthenticationInfo::traceDataIsSet() const
//{
// return m_TraceDataIsSet;
//}
// void AuthenticationInfo::unsetTraceData()
//{
// m_TraceDataIsSet = false;
//}
// std::string AuthenticationInfo::getUdmGroupId() const
//{
// return m_UdmGroupId;
//}
// void AuthenticationInfo::setUdmGroupId(std::string const& value)
//{
// m_UdmGroupId = value;
// m_UdmGroupIdIsSet = true;
//}
// bool AuthenticationInfo::udmGroupIdIsSet() const
//{
// return m_UdmGroupIdIsSet;
//}
// void AuthenticationInfo::unsetUdmGroupId()
//{
// m_UdmGroupIdIsSet = false;
//}
// std::string AuthenticationInfo::getRoutingIndicator() const
//{
// return m_RoutingIndicator;
//}
// void AuthenticationInfo::setRoutingIndicator(std::string const& value)
//{
// m_RoutingIndicator = value;
// m_RoutingIndicatorIsSet = true;
//}
// bool AuthenticationInfo::routingIndicatorIsSet() const
//{
// return m_RoutingIndicatorIsSet;
//}
// void AuthenticationInfo::unsetRoutingIndicator()
//{
// m_RoutingIndicatorIsSet = false;
//}
// std::vector<std::string>& AuthenticationInfo::getCellCagInfo()
//{
// return m_CellCagInfo;
//}
// void AuthenticationInfo::setCellCagInfo(std::vector<std::string> const&
// value)
//{
// m_CellCagInfo = value;
// m_CellCagInfoIsSet = true;
//}
// bool AuthenticationInfo::cellCagInfoIsSet() const
//{
// return m_CellCagInfoIsSet;
//}
// void AuthenticationInfo::unsetCellCagInfo()
//{
// m_CellCagInfoIsSet = false;
//}
// bool AuthenticationInfo::isN5gcInd() const
//{
// return m_N5gcInd;
//}
// void AuthenticationInfo::setN5gcInd(bool const value)
//{
// m_N5gcInd = value;
// m_N5gcIndIsSet = true;
//}
// bool AuthenticationInfo::n5gcIndIsSet() const
//{
// return m_N5gcIndIsSet;
//}
// void AuthenticationInfo::unsetN5gcInd()
//{
// m_N5gcIndIsSet = false;
//}
}
// namespace model
}
// namespace amf
}
// namespace oai
src/sbi/amf_server/model/AuthenticationInfo.h
0 → 100755
View file @
630dfe19
/**
* AUSF API
* AUSF UE Authentication Service. © 2020, 3GPP Organizational Partners (ARIB,
* ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
/*
* AuthenticationInfo.h
*
*
*/
#ifndef AuthenticationInfo_H_
#define AuthenticationInfo_H_
//#include "ResynchronizationInfo.h"
//#include "TraceData.h"
#include <nlohmann/json.hpp>
#include <string>
#include <vector>
namespace
oai
{
namespace
amf
{
namespace
model
{
/// <summary>
///
/// </summary>
class
AuthenticationInfo
{
public:
AuthenticationInfo
();
virtual
~
AuthenticationInfo
();
void
validate
();
/////////////////////////////////////////////
/// AuthenticationInfo members
/// <summary>
///
/// </summary>
std
::
string
getSupiOrSuci
()
const
;
void
setSupiOrSuci
(
std
::
string
const
&
value
);
/// <summary>
///
/// </summary>
std
::
string
getServingNetworkName
()
const
;
void
setServingNetworkName
(
std
::
string
const
&
value
);
/// <summary>
///
/// </summary>
// ResynchronizationInfo getResynchronizationInfo() const;
// void setResynchronizationInfo(ResynchronizationInfo const &value);
// bool resynchronizationInfoIsSet() const;
// void unsetResynchronizationInfo();
// /// <summary>
// ///
// /// </summary>
// std::string getPei() const;
// void setPei(std::string const &value);
// bool peiIsSet() const;
// void unsetPei();
// /// <summary>
// ///
// /// </summary>
// TraceData getTraceData() const;
// void setTraceData(TraceData const &value);
// bool traceDataIsSet() const;
// void unsetTraceData();
// /// <summary>
// ///
// /// </summary>
// std::string getUdmGroupId() const;
// void setUdmGroupId(std::string const &value);
// bool udmGroupIdIsSet() const;
// void unsetUdmGroupId();
// /// <summary>
// ///
// /// </summary>
// std::string getRoutingIndicator() const;
// void setRoutingIndicator(std::string const &value);
// bool routingIndicatorIsSet() const;
// void unsetRoutingIndicator();
// /// <summary>
// ///
// /// </summary>
// std::vector<std::string> &getCellCagInfo();
// void setCellCagInfo(std::vector<std::string> const &value);
// bool cellCagInfoIsSet() const;
// void unsetCellCagInfo();
// /// <summary>
// ///
// /// </summary>
// bool isN5gcInd() const;
// void setN5gcInd(bool const value);
// bool n5gcIndIsSet() const;
// void unsetN5gcInd();
friend
void
to_json
(
nlohmann
::
json
&
j
,
const
AuthenticationInfo
&
o
);
friend
void
from_json
(
const
nlohmann
::
json
&
j
,
AuthenticationInfo
&
o
);
protected:
std
::
string
m_SupiOrSuci
;
std
::
string
m_ServingNetworkName
;
// ResynchronizationInfo m_ResynchronizationInfo;
// bool m_ResynchronizationInfoIsSet;
// std::string m_Pei;
// bool m_PeiIsSet;
// TraceData m_TraceData;
// bool m_TraceDataIsSet;
// std::string m_UdmGroupId;
// bool m_UdmGroupIdIsSet;
// std::string m_RoutingIndicator;
// bool m_RoutingIndicatorIsSet;
// std::vector<std::string> m_CellCagInfo;
// bool m_CellCagInfoIsSet;
// bool m_N5gcInd;
// bool m_N5gcIndIsSet;
};
}
// namespace model
}
// namespace amf
}
// namespace oai
#endif
/* AuthenticationInfo_H_ */
src/sbi/amf_server/model/Av5gAka.cpp
0 → 100644
View file @
630dfe19
/**
* AUSF API
* AUSF UE Authentication Service. © 2020, 3GPP Organizational Partners (ARIB,
* ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
#include "Av5gAka.h"
namespace
oai
{
namespace
amf
{
namespace
model
{
Av5gAka
::
Av5gAka
()
{
m_Rand
=
""
;
m_HxresStar
=
""
;
m_Autn
=
""
;
}
Av5gAka
::~
Av5gAka
()
{}
void
Av5gAka
::
validate
()
{
// TODO: implement validation
}
void
to_json
(
nlohmann
::
json
&
j
,
const
Av5gAka
&
o
)
{
j
=
nlohmann
::
json
();
j
[
"rand"
]
=
o
.
m_Rand
;
j
[
"hxresStar"
]
=
o
.
m_HxresStar
;
j
[
"autn"
]
=
o
.
m_Autn
;
}
void
from_json
(
const
nlohmann
::
json
&
j
,
Av5gAka
&
o
)
{
j
.
at
(
"rand"
).
get_to
(
o
.
m_Rand
);
j
.
at
(
"hxresStar"
).
get_to
(
o
.
m_HxresStar
);
j
.
at
(
"autn"
).
get_to
(
o
.
m_Autn
);
}
std
::
string
Av5gAka
::
getRand
()
const
{
return
m_Rand
;
}
void
Av5gAka
::
setRand
(
std
::
string
const
&
value
)
{
m_Rand
=
value
;
}
std
::
string
Av5gAka
::
getHxresStar
()
const
{
return
m_HxresStar
;
}
void
Av5gAka
::
setHxresStar
(
std
::
string
const
&
value
)
{
m_HxresStar
=
value
;
}
std
::
string
Av5gAka
::
getAutn
()
const
{
return
m_Autn
;
}
void
Av5gAka
::
setAutn
(
std
::
string
const
&
value
)
{
m_Autn
=
value
;
}
}
// namespace model
}
// namespace amf
}
// namespace oai
src/sbi/amf_server/model/Av5gAka.h
0 → 100755
View file @
630dfe19
/**
* AUSF API
* AUSF UE Authentication Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/*
* Av5gAka.h
*
*
*/
#ifndef Av5gAka_H_
#define Av5gAka_H_
#include <string>
#include <nlohmann/json.hpp>
namespace
oai
{
namespace
amf
{
namespace
model
{
/// <summary>
///
/// </summary>
class
Av5gAka
{
public:
Av5gAka
();
virtual
~
Av5gAka
();
void
validate
();
/////////////////////////////////////////////
/// Av5gAka members
/// <summary>
///
/// </summary>
std
::
string
getRand
()
const
;
void
setRand
(
std
::
string
const
&
value
);
/// <summary>
///
/// </summary>
std
::
string
getHxresStar
()
const
;
void
setHxresStar
(
std
::
string
const
&
value
);
/// <summary>
///
/// </summary>
std
::
string
getAutn
()
const
;
void
setAutn
(
std
::
string
const
&
value
);
friend
void
to_json
(
nlohmann
::
json
&
j
,
const
Av5gAka
&
o
);
friend
void
from_json
(
const
nlohmann
::
json
&
j
,
Av5gAka
&
o
);
protected:
std
::
string
m_Rand
;
std
::
string
m_HxresStar
;
std
::
string
m_Autn
;
};
}
}
}
#endif
/* Av5gAka_H_ */
src/sbi/amf_server/model/ConfirmationData.cpp
0 → 100644
View file @
630dfe19
/**
* AUSF API
* AUSF UE Authentication Service. © 2020, 3GPP Organizational Partners (ARIB,
* ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
#include "ConfirmationData.h"
namespace
oai
{
namespace
amf
{
namespace
model
{
ConfirmationData
::
ConfirmationData
()
{
m_ResStar
=
""
;
}
ConfirmationData
::~
ConfirmationData
()
{}
void
ConfirmationData
::
validate
()
{
// TODO: implement validation
}
void
to_json
(
nlohmann
::
json
&
j
,
const
ConfirmationData
&
o
)
{
j
=
nlohmann
::
json
();
j
[
"resStar"
]
=
o
.
m_ResStar
;
}
void
from_json
(
const
nlohmann
::
json
&
j
,
ConfirmationData
&
o
)
{
j
.
at
(
"resStar"
).
get_to
(
o
.
m_ResStar
);
}
std
::
string
ConfirmationData
::
getResStar
()
const
{
return
m_ResStar
;
}
void
ConfirmationData
::
setResStar
(
std
::
string
const
&
value
)
{
m_ResStar
=
value
;
}
}
// namespace model
}
// namespace amf
}
// namespace oai
src/sbi/amf_server/model/ConfirmationData.h
0 → 100755
View file @
630dfe19
/**
* AUSF API
* AUSF UE Authentication Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/*
* ConfirmationData.h
*
*
*/
#ifndef ConfirmationData_H_
#define ConfirmationData_H_
#include <string>
#include <nlohmann/json.hpp>
namespace
oai
{
namespace
amf
{
namespace
model
{
/// <summary>
///
/// </summary>
class
ConfirmationData
{
public:
ConfirmationData
();
virtual
~
ConfirmationData
();
void
validate
();
/////////////////////////////////////////////
/// ConfirmationData members
/// <summary>
///
/// </summary>
std
::
string
getResStar
()
const
;
void
setResStar
(
std
::
string
const
&
value
);
friend
void
to_json
(
nlohmann
::
json
&
j
,
const
ConfirmationData
&
o
);
friend
void
from_json
(
const
nlohmann
::
json
&
j
,
ConfirmationData
&
o
);
protected:
std
::
string
m_ResStar
;
};
}
}
}
#endif
/* ConfirmationData_H_ */
src/sbi/amf_server/model/ConfirmationDataResponse.cpp
0 → 100644
View file @
630dfe19
/**
* AUSF API
* AUSF UE Authentication Service. © 2020, 3GPP Organizational Partners (ARIB,
* ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
#include "ConfirmationDataResponse.h"
namespace
oai
{
namespace
amf
{
namespace
model
{
ConfirmationDataResponse
::
ConfirmationDataResponse
()
{
m_Supi
=
""
;
m_SupiIsSet
=
false
;
m_Kseaf
=
""
;
m_KseafIsSet
=
false
;
}
ConfirmationDataResponse
::~
ConfirmationDataResponse
()
{}
void
ConfirmationDataResponse
::
validate
()
{
// TODO: implement validation
}
void
to_json
(
nlohmann
::
json
&
j
,
const
ConfirmationDataResponse
&
o
)
{
j
=
nlohmann
::
json
();
j
[
"authResult"
]
=
o
.
m_AuthResult
;
if
(
o
.
supiIsSet
())
j
[
"supi"
]
=
o
.
m_Supi
;
if
(
o
.
kseafIsSet
())
j
[
"kseaf"
]
=
o
.
m_Kseaf
;
}
void
from_json
(
const
nlohmann
::
json
&
j
,
ConfirmationDataResponse
&
o
)
{
j
.
at
(
"authResult"
).
get_to
(
o
.
m_AuthResult
);
if
(
j
.
find
(
"supi"
)
!=
j
.
end
())
{
j
.
at
(
"supi"
).
get_to
(
o
.
m_Supi
);
o
.
m_SupiIsSet
=
true
;
}
if
(
j
.
find
(
"kseaf"
)
!=
j
.
end
())
{
j
.
at
(
"kseaf"
).
get_to
(
o
.
m_Kseaf
);
o
.
m_KseafIsSet
=
true
;
}
}
// AuthResult ConfirmationDataResponse::getAuthResult() const
// {
// return m_AuthResult;
// }
// void ConfirmationDataResponse::setAuthResult(AuthResult const& value)
// {
// m_AuthResult = value;
// }
bool
ConfirmationDataResponse
::
getAuthResult
()
const
{
return
m_AuthResult
;
}
void
ConfirmationDataResponse
::
setAuthResult
(
bool
const
&
value
)
{
m_AuthResult
=
value
;
}
std
::
string
ConfirmationDataResponse
::
getSupi
()
const
{
return
m_Supi
;
}
void
ConfirmationDataResponse
::
setSupi
(
std
::
string
const
&
value
)
{
m_Supi
=
value
;
m_SupiIsSet
=
true
;
}
bool
ConfirmationDataResponse
::
supiIsSet
()
const
{
return
m_SupiIsSet
;
}
void
ConfirmationDataResponse
::
unsetSupi
()
{
m_SupiIsSet
=
false
;
}
std
::
string
ConfirmationDataResponse
::
getKseaf
()
const
{
return
m_Kseaf
;
}
void
ConfirmationDataResponse
::
setKseaf
(
std
::
string
const
&
value
)
{
m_Kseaf
=
value
;
m_KseafIsSet
=
true
;
}
bool
ConfirmationDataResponse
::
kseafIsSet
()
const
{
return
m_KseafIsSet
;
}
void
ConfirmationDataResponse
::
unsetKseaf
()
{
m_KseafIsSet
=
false
;
}
}
// namespace model
}
// namespace amf
}
// namespace oai
src/sbi/amf_server/model/ConfirmationDataResponse.h
0 → 100755
View file @
630dfe19
/**
* AUSF API
* AUSF UE Authentication Service. © 2020, 3GPP Organizational Partners (ARIB,
* ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
/*
* ConfirmationDataResponse.h
*
*
*/
#ifndef ConfirmationDataResponse_H_
#define ConfirmationDataResponse_H_
#include <nlohmann/json.hpp>
#include <string>
namespace
oai
{
namespace
amf
{
namespace
model
{
/// <summary>
///
/// </summary>
class
ConfirmationDataResponse
{
public:
ConfirmationDataResponse
();
virtual
~
ConfirmationDataResponse
();
void
validate
();
/////////////////////////////////////////////
/// ConfirmationDataResponse members
/// <summary>
///
/// </summary>
bool
getAuthResult
()
const
;
void
setAuthResult
(
bool
const
&
value
);
// AuthResult getAuthResult() const;
// void setAuthResult(AuthResult const &value);
/// <summary>
///
/// </summary>
std
::
string
getSupi
()
const
;
void
setSupi
(
std
::
string
const
&
value
);
bool
supiIsSet
()
const
;
void
unsetSupi
();
/// <summary>
///
/// </summary>
std
::
string
getKseaf
()
const
;
void
setKseaf
(
std
::
string
const
&
value
);
bool
kseafIsSet
()
const
;
void
unsetKseaf
();
friend
void
to_json
(
nlohmann
::
json
&
j
,
const
ConfirmationDataResponse
&
o
);
friend
void
from_json
(
const
nlohmann
::
json
&
j
,
ConfirmationDataResponse
&
o
);
protected:
bool
m_AuthResult
;
// AuthResult m_AuthResult; //AuthResult not defined
std
::
string
m_Supi
;
bool
m_SupiIsSet
;
std
::
string
m_Kseaf
;
bool
m_KseafIsSet
;
};
}
// namespace model
}
// namespace amf
}
// namespace oai
#endif
/* ConfirmationDataResponse_H_ */
src/sbi/amf_server/model/LinksValueSchema.cpp
0 → 100644
View file @
630dfe19
/**
* AUSF API
* AUSF UE Authentication Service. © 2020, 3GPP Organizational Partners (ARIB,
* ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
#include "LinksValueSchema.h"
namespace
oai
{
namespace
amf
{
namespace
model
{
LinksValueSchema
::
LinksValueSchema
()
{
m_Href
=
""
;
m_HrefIsSet
=
false
;
}
LinksValueSchema
::~
LinksValueSchema
()
{}
void
LinksValueSchema
::
validate
()
{
// TODO: implement validation
}
void
to_json
(
nlohmann
::
json
&
j
,
const
LinksValueSchema
&
o
)
{
j
=
nlohmann
::
json
();
if
(
o
.
hrefIsSet
())
j
[
"href"
]
=
o
.
m_Href
;
}
void
from_json
(
const
nlohmann
::
json
&
j
,
LinksValueSchema
&
o
)
{
if
(
j
.
find
(
"href"
)
!=
j
.
end
())
{
j
.
at
(
"href"
).
get_to
(
o
.
m_Href
);
o
.
m_HrefIsSet
=
true
;
}
}
std
::
string
LinksValueSchema
::
getHref
()
const
{
return
m_Href
;
}
void
LinksValueSchema
::
setHref
(
std
::
string
const
&
value
)
{
m_Href
=
value
;
m_HrefIsSet
=
true
;
}
bool
LinksValueSchema
::
hrefIsSet
()
const
{
return
m_HrefIsSet
;
}
void
LinksValueSchema
::
unsetHref
()
{
m_HrefIsSet
=
false
;
}
}
// namespace model
}
// namespace amf
}
// namespace oai
src/sbi/amf_server/model/LinksValueSchema.h
0 → 100755
View file @
630dfe19
/**
* AUSF API
* AUSF UE Authentication Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/*
* LinksValueSchema.h
*
*
*/
#ifndef LinksValueSchema_H_
#define LinksValueSchema_H_
#include <string>
#include <nlohmann/json.hpp>
namespace
oai
{
namespace
amf
{
namespace
model
{
/// <summary>
///
/// </summary>
class
LinksValueSchema
{
public:
LinksValueSchema
();
virtual
~
LinksValueSchema
();
void
validate
();
/////////////////////////////////////////////
/// LinksValueSchema members
/// <summary>
///
/// </summary>
std
::
string
getHref
()
const
;
void
setHref
(
std
::
string
const
&
value
);
bool
hrefIsSet
()
const
;
void
unsetHref
();
friend
void
to_json
(
nlohmann
::
json
&
j
,
const
LinksValueSchema
&
o
);
friend
void
from_json
(
const
nlohmann
::
json
&
j
,
LinksValueSchema
&
o
);
protected:
std
::
string
m_Href
;
bool
m_HrefIsSet
;
};
}
}
}
#endif
/* LinksValueSchema_H_ */
src/sbi/amf_server/model/UEAuthenticationCtx.cpp
0 → 100644
View file @
630dfe19
/**
* AUSF API
* AUSF UE Authentication Service. © 2020, 3GPP Organizational Partners (ARIB,
* ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator
* (https://openapi-generator.tech). https://openapi-generator.tech Do not edit
* the class manually.
*/
#include "UEAuthenticationCtx.h"
namespace
oai
{
namespace
amf
{
namespace
model
{
UEAuthenticationCtx
::
UEAuthenticationCtx
()
{
m_AuthType
=
""
;
m_ServingNetworkName
=
""
;
m_ServingNetworkNameIsSet
=
false
;
}
UEAuthenticationCtx
::~
UEAuthenticationCtx
()
{}
void
UEAuthenticationCtx
::
validate
()
{
// TODO: implement validation
}
void
to_json
(
nlohmann
::
json
&
j
,
const
UEAuthenticationCtx
&
o
)
{
j
=
nlohmann
::
json
();
j
[
"authType"
]
=
o
.
m_AuthType
;
j
[
"5gAuthData"
]
=
o
.
m_r_5gAuthData
;
j
[
"_links"
]
=
o
.
m__links
;
if
(
o
.
servingNetworkNameIsSet
())
j
[
"servingNetworkName"
]
=
o
.
m_ServingNetworkName
;
}
void
from_json
(
const
nlohmann
::
json
&
j
,
UEAuthenticationCtx
&
o
)
{
j
.
at
(
"authType"
).
get_to
(
o
.
m_AuthType
);
j
.
at
(
"5gAuthData"
).
get_to
(
o
.
m_r_5gAuthData
);
j
.
at
(
"_links"
).
get_to
(
o
.
m__links
);
if
(
j
.
find
(
"servingNetworkName"
)
!=
j
.
end
())
{
j
.
at
(
"servingNetworkName"
).
get_to
(
o
.
m_ServingNetworkName
);
o
.
m_ServingNetworkNameIsSet
=
true
;
}
}
std
::
string
UEAuthenticationCtx
::
getAuthType
()
const
{
return
m_AuthType
;
}
void
UEAuthenticationCtx
::
setAuthType
(
std
::
string
const
&
value
)
{
m_AuthType
=
value
;
}
Av5gAka
UEAuthenticationCtx
::
getR5gAuthData
()
const
{
return
m_r_5gAuthData
;
}
void
UEAuthenticationCtx
::
setR5gAuthData
(
Av5gAka
const
&
value
)
{
m_r_5gAuthData
=
value
;
}
std
::
map
<
std
::
string
,
LinksValueSchema
>&
UEAuthenticationCtx
::
getLinks
()
{
return
m__links
;
}
void
UEAuthenticationCtx
::
setLinks
(
std
::
map
<
std
::
string
,
LinksValueSchema
>
const
&
value
)
{
m__links
=
value
;
}
std
::
string
UEAuthenticationCtx
::
getServingNetworkName
()
const
{
return
m_ServingNetworkName
;
}
void
UEAuthenticationCtx
::
setServingNetworkName
(
std
::
string
const
&
value
)
{
m_ServingNetworkName
=
value
;
m_ServingNetworkNameIsSet
=
true
;
}
bool
UEAuthenticationCtx
::
servingNetworkNameIsSet
()
const
{
return
m_ServingNetworkNameIsSet
;
}
void
UEAuthenticationCtx
::
unsetServingNetworkName
()
{
m_ServingNetworkNameIsSet
=
false
;
}
}
// namespace model
}
// namespace amf
}
// namespace oai
src/sbi/amf_server/model/UEAuthenticationCtx.h
0 → 100755
View file @
630dfe19
/**
* AUSF API
* AUSF UE Authentication Service. © 2020, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TSDSI, TTA, TTC). All rights reserved.
*
* The version of the OpenAPI document: 1.1.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/*
* UEAuthenticationCtx.h
*
*
*/
#ifndef UEAuthenticationCtx_H_
#define UEAuthenticationCtx_H_
#include "Av5gAka.h"
#include "LinksValueSchema.h"
#include <string>
#include <map>
#include <vector>
#include <nlohmann/json.hpp>
namespace
oai
{
namespace
amf
{
namespace
model
{
/// <summary>
///
/// </summary>
class
UEAuthenticationCtx
{
public:
UEAuthenticationCtx
();
virtual
~
UEAuthenticationCtx
();
void
validate
();
/////////////////////////////////////////////
/// UEAuthenticationCtx members
/// <summary>
///
/// </summary>
std
::
string
getAuthType
()
const
;
void
setAuthType
(
std
::
string
const
&
value
);
/// <summary>
///
/// </summary>
Av5gAka
getR5gAuthData
()
const
;
void
setR5gAuthData
(
Av5gAka
const
&
value
);
/// <summary>
///
/// </summary>
std
::
map
<
std
::
string
,
LinksValueSchema
>&
getLinks
();
void
setLinks
(
std
::
map
<
std
::
string
,
LinksValueSchema
>
const
&
value
);
/// <summary>
///
/// </summary>
std
::
string
getServingNetworkName
()
const
;
void
setServingNetworkName
(
std
::
string
const
&
value
);
bool
servingNetworkNameIsSet
()
const
;
void
unsetServingNetworkName
();
friend
void
to_json
(
nlohmann
::
json
&
j
,
const
UEAuthenticationCtx
&
o
);
friend
void
from_json
(
const
nlohmann
::
json
&
j
,
UEAuthenticationCtx
&
o
);
protected:
std
::
string
m_AuthType
;
Av5gAka
m_r_5gAuthData
;
std
::
map
<
std
::
string
,
LinksValueSchema
>
m__links
;
std
::
string
m_ServingNetworkName
;
bool
m_ServingNetworkNameIsSet
;
};
}
}
}
#endif
/* UEAuthenticationCtx_H_ */
src/sbi/smf_client/model/SmContextCreateData.cpp
View file @
630dfe19
...
@@ -676,7 +676,8 @@ void SmContextCreateData::toMultipart(
...
@@ -676,7 +676,8 @@ void SmContextCreateData::toMultipart(
value
+=
n1sm
;
value
+=
n1sm
;
std
::
string
ngsId
=
",
\"
servingNfId
\"
:
\"
servingNfId
\"
"
;
std
::
string
ngsId
=
",
\"
servingNfId
\"
:
\"
servingNfId
\"
"
;
value
+=
ngsId
;
value
+=
ngsId
;
std
::
string
sn
=
",
\"
servingNetwork
\"
:{
\"
mcc
\"
:
\"
460
\"
,
\"
mnc
\"
:
\"
011
\"
}"
;
// std::string sn = ", \"servingNetwork\":{\"mcc\":\"460\", \"mnc\":\"011\"}";
std
::
string
sn
=
",
\"
servingNetwork
\"
:{
\"
mcc
\"
:
\"
110
\"
,
\"
mnc
\"
:
\"
011
\"
}"
;
value
+=
sn
;
value
+=
sn
;
std
::
string
anType
=
",
\"
anType
\"
:
\"
3GPP_ACCESS
\"
"
;
std
::
string
anType
=
",
\"
anType
\"
:
\"
3GPP_ACCESS
\"
"
;
value
+=
anType
;
value
+=
anType
;
...
...
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