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
Expand all
Hide 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) {
}
// Register to NRF
register_to_nrf
();
if
(
amf_cfg
.
enable_nf_registration
)
register_to_nrf
();
timer_id_t
tid
=
itti_inst
->
timer_setup
(
amf_cfg
.
statistics_interval
,
0
,
TASK_AMF_APP
,
...
...
@@ -216,7 +216,6 @@ bool amf_app::find_pdu_session_context(
return
true
;
}
// ITTI handlers
//------------------------------------------------------------------------------
void
amf_app
::
handle_itti_message
(
itti_n1n2_message_transfer_request
&
itti_msg
)
{
...
...
@@ -266,7 +265,7 @@ void amf_app::handle_itti_message(
long
amf_ue_ngap_id
=
0
;
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
)
{
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() {
enable_smf_selection
=
false
;
enable_external_auth
=
false
;
// TODO:
is_Nausf
=
true
;
}
//------------------------------------------------------------------------------
...
...
@@ -187,6 +188,11 @@ int amf_config::load(const std::string& config_file) {
const
Setting
&
n2_amf_cfg
=
new_if_cfg
[
AMF_CONFIG_STRING_INTERFACE_NGAP_AMF
];
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
];
load_interface
(
n11_cfg
,
n11
);
const
Setting
&
smf_addr_pool
=
...
...
@@ -416,6 +422,18 @@ void amf_config::display() {
" ip ....................: %s"
,
inet_ntoa
(
n11
.
addr4
));
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
(
" IP addr ..............: %s"
,
inet_ntoa
(
nrf_addr
.
ipv4_addr
));
...
...
src/amf-app/amf_config.hpp
View file @
630dfe19
...
...
@@ -45,6 +45,7 @@
#define AMF_CONFIG_STRING_STATISTICS_TIMER_INTERVAL "STATISTICS_TIMER_INTERVAL"
#define AMF_CONFIG_STRING_INTERFACES "INTERFACES"
#define AMF_CONFIG_STRING_INTERFACE_NGAP_AMF "NGAP_AMF"
#define AMF_CONFIG_STRING_INTERFACE_NAME "INTERFACE_NAME"
#define AMF_CONFIG_STRING_IPV4_ADDRESS "IPV4_ADDRESS"
#define AMF_CONFIG_STRING_PORT "PORT"
...
...
@@ -176,6 +177,7 @@ class amf_config {
std
::
string
pid_dir
;
interface_cfg_t
n2
;
interface_cfg_t
n11
;
interface_cfg_t
nausf
;
itti_cfg_t
itti
;
unsigned
int
statistics_interval
;
std
::
string
AMF_Name
;
...
...
@@ -196,6 +198,7 @@ class amf_config {
unsigned
int
port
;
std
::
string
api_version
;
}
nrf_addr
;
bool
is_Nausf
;
}
;
}
// namespace config
...
...
src/amf-app/amf_n1.cpp
View file @
630dfe19
...
...
@@ -55,11 +55,19 @@
#include "nas_algorithms.hpp"
#include "sha256.hpp"
#include "AuthenticationInfo.h"
#include "UEAuthenticationCtx.h"
#include "ConfirmationData.h"
#include "ConfirmationDataResponse.h"
#include <curl/curl.h>
extern
"C"
{
#include "bstrlib.h"
#include "dynamic_memory_check.h"
}
using
namespace
oai
::
amf
::
model
;
using
namespace
nas
;
using
namespace
amf_application
;
using
namespace
config
;
...
...
@@ -225,7 +233,7 @@ void amf_n1::handle_itti_message(itti_uplink_nas_data_ind& nas_data_ind) {
else
{
Logger
::
amf_n1
().
error
(
"No existing nas_context with GUTI %s"
,
nas_data_ind
.
guti
.
c_str
());
return
;
//
return;
}
}
else
{
if
(
is_amf_ue_id_2_nas_context
(
amf_ue_ngap_id
))
...
...
@@ -1160,12 +1168,16 @@ void amf_n1::run_registration_procedure(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"
);
authentication_vectors_generator_in_udm
(
nc
);
authentication_vectors_generator_in_ausf
(
nc
);
Logger
::
amf_n1
().
debug
(
"Deriving kamf"
);
for
(
int
i
=
0
;
i
<
MAX_5GS_AUTH_VECTORS
;
i
++
)
{
Authentication_5gaka
::
derive_kamf
(
nc
.
get
()
->
imsi
,
nc
.
get
()
->
_5g_av
[
i
].
kseaf
,
nc
.
get
()
->
kamf
[
i
],
0x0000
);
// second parameter: abba
if
(
amf_cfg
.
is_Nausf
)
{
if
(
!
authentication_vectors_from_ausf
(
nc
))
return
false
;
}
else
{
authentication_vectors_generator_in_ausf
(
nc
);
Logger
::
amf_n1
().
debug
(
"Deriving kamf"
);
for
(
int
i
=
0
;
i
<
MAX_5GS_AUTH_VECTORS
;
i
++
)
{
Authentication_5gaka
::
derive_kamf
(
nc
.
get
()
->
imsi
,
nc
.
get
()
->
_5g_av
[
i
].
kseaf
,
nc
.
get
()
->
kamf
[
i
],
0x0000
);
// second parameter: abba
}
}
return
true
;
}
...
...
@@ -1865,6 +1877,7 @@ void amf_n1::security_mode_complete_handle(
uint8_t
kgnb
[
32
];
uint32_t
ulcount
=
secu
->
ul_count
.
seq_num
|
(
secu
->
ul_count
.
overflow
<<
8
);
Authentication_5gaka
::
derive_kgnb
(
0
,
0x01
,
kamf
,
kgnb
);
ncc
=
1
;
print_buffer
(
"amf_n1"
,
"kamf"
,
kamf
,
32
);
// Authentication_5gaka::derive_kgnb(ulcount, 0x01, kamf, kgnb);
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;
uint32_t
AMF_TARGET_ran_id_global
=
0
;
sctp_assoc_id_t
downlink_sctp_assoc_id
=
0
;
sctp_assoc_id_t
source_assoc_id
=
0
;
int
ncc
=
0
;
void
amf_n2_task
(
void
*
);
...
...
@@ -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
Logger
::
amf_n2
().
debug
(
"Encoding NG_SETUP_RESPONSE ..."
);
// encode NG SETUP RESPONSE message with information stored in configuration
...
...
@@ -875,6 +878,7 @@ void amf_n2::handle_itti_message(
//------------------------------------------------------------------------------
void
amf_n2
::
handle_itti_message
(
itti_handover_required
&
itti_msg
)
{
ncc
++
;
unsigned
long
amf_ue_ngap_id
=
itti_msg
.
handvoerRequ
->
getAmfUeNgapId
();
uint32_t
ran_ue_ngap_id
=
itti_msg
.
handvoerRequ
->
getRanUeNgapId
();
ran_id_Global
=
ran_ue_ngap_id
;
...
...
@@ -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
);
uint8_t
knh
[
32
];
Authentication_5gaka
::
handover_ncc_derive_knh
(
ulcount
,
0x01
,
kamf
,
kgnb
,
knh
,
2
);
/*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);*/
ulcount
,
0x01
,
kamf
,
kgnb
,
knh
,
ncc
);
bstring
knh_bs
=
blk2bstr
(
knh
,
32
);
handoverrequest
->
setSecurityContext
(
2
/*NCC count*/
,
(
uint8_t
*
)
bdata
(
knh_bs
));
ncc
/*NCC count*/
,
(
uint8_t
*
)
bdata
(
knh_bs
));
// handoverrequest->setSourceToTarget_TransparentContainer(sourceTotarget);
string
supi
=
"imsi-"
+
nc
.
get
()
->
imsi
;
...
...
@@ -1060,7 +1044,8 @@ void amf_n2::handle_itti_message(itti_handover_required& itti_msg) {
handoverrequest
->
setGUAMI
(
m_plmnId
,
m_aMFRegionID
,
m_aMFSetID
,
m_aMFPointer
);
uint8_t
buffer
[
20240
];
int
encoded_size
=
handoverrequest
->
encode2buffer
(
buffer
,
20240
);
bstring
b
=
blk2bstr
(
buffer
,
encoded_size
);
delete
handoverrequest
;
bstring
b
=
blk2bstr
(
buffer
,
encoded_size
);
std
::
shared_ptr
<
gnb_context
>
gc_target
;
gc_target
=
gnb_id_2_gnb_context
(
gnbid
->
getValue
());
downlink_sctp_assoc_id
=
gc_target
.
get
()
->
sctp_assoc_id
;
...
...
@@ -1173,7 +1158,8 @@ void amf_n2::handle_itti_message(itti_handover_request_Ack& itti_msg) {
/**************************setPduSessionResourceHandoverList_PDYSessionID_handovercommandtransfer-end**************************/
uint8_t
buffer
[
10240
];
int
encoded_size
=
handovercommand
->
encode2buffer
(
buffer
,
10240
);
bstring
b
=
blk2bstr
(
buffer
,
encoded_size
);
delete
handovercommand
;
bstring
b
=
blk2bstr
(
buffer
,
encoded_size
);
std
::
shared_ptr
<
ue_ngap_context
>
unc
;
if
(
!
is_ran_ue_id_2_ue_ngap_context
(
ran_id_Global
))
{
Logger
::
amf_n2
().
debug
(
...
...
@@ -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
());
set_ran_ue_ngap_id_2_ue_ngap_context
(
ran_id_Global
,
unc
);
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 =
// 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) {
Ngap_CauseRadioNetwork_successful_handover
);
uint8_t
buffer
[
10240
];
int
encoded_size
=
ueContextReleaseCommand
->
encode2buffer
(
buffer
,
10240
);
bstring
b
=
blk2bstr
(
buffer
,
encoded_size
);
delete
ueContextReleaseCommand
;
bstring
b
=
blk2bstr
(
buffer
,
encoded_size
);
std
::
shared_ptr
<
nas_context
>
nc
=
amf_n1_inst
->
amf_ue_id_2_nas_context
(
amf_ue_ngap_id
);
std
::
shared_ptr
<
ue_ngap_context
>
ngc
=
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 =
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 =
...
...
@@ -1302,7 +1292,8 @@ 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
);
uint8_t
buffer
[
1024
];
int
encode_size
=
downLinkranstatustransfer
->
encodetobuffer
(
buffer
,
1024
);
bstring
b
=
blk2bstr
(
buffer
,
encode_size
);
delete
downLinkranstatustransfer
;
bstring
b
=
blk2bstr
(
buffer
,
encode_size
);
// std::shared_ptr<ue_ngap_context> ngc =
// ran_ue_id_2_ue_ngap_context(AMF_TARGET_ran_id_global);
sctp_s_38412
.
sctp_send_msg
(
downlink_sctp_assoc_id
,
0
,
&
b
);
...
...
src/contexts/nas_context.hpp
View file @
630dfe19
...
...
@@ -92,6 +92,7 @@ class nas_context {
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_AV_t
_5g_av
[
MAX_5GS_AUTH_VECTORS
];
// generated by ausf
std
::
string
Href
;
uint8_t
kamf
[
MAX_5GS_AUTH_VECTORS
][
32
];
security_context_t
_security
;
...
...
src/nas/common/common_defs.h
View file @
630dfe19
...
...
@@ -4,8 +4,8 @@
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* 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
*License at
*
file except in compliance with the License. You may obtain a copy of the
*
License at
*
* http://www.openairinterface.org/?page_id=698
*
...
...
src/ngap/libngap/asn_application.c
View file @
630dfe19
This diff is collapsed.
Click to expand it.
src/ngap/libngap/per_opentype.c
View file @
630dfe19
...
...
@@ -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
)
{
asn_dec_rval_t
rv
;
ssize_t
chunk_bytes
;
int
repeat
;
int
repeat
=
0
;
uint8_t
*
buf
=
0
;
size_t
bufLen
=
0
;
size_t
bufSize
=
0
;
...
...
src/sbi/amf_server/AMFApiServer.cpp
View file @
630dfe19
...
...
@@ -33,20 +33,23 @@ void AMFApiServer::start() {
if
(
m_n1N2MessageCollectionDocumentApiImpl
!=
nullptr
)
Logger
::
amf_server
().
debug
(
"AMF handler for N1N2MessageCollectionDocumentApiImpl"
);
if
(
m_n1N2SubscriptionsCollectionForIndividualUEContextsDocumentApiImpl
!=
nullptr
)
if
(
m_n1N2SubscriptionsCollectionForIndividualUEContextsDocumentApiImpl
!=
nullptr
)
Logger
::
amf_server
().
debug
(
"AMF handler for N1N2SubscriptionsCollectionForIndividualUEContextsDocumentApiImpl"
);
if
(
m_nonUEN2MessageNotificationIndividualSubscriptionDocumentApiImpl
!=
nullptr
)
"AMF handler for "
"N1N2SubscriptionsCollectionForIndividualUEContextsDocumentApiImpl"
);
if
(
m_nonUEN2MessageNotificationIndividualSubscriptionDocumentApiImpl
!=
nullptr
)
Logger
::
amf_server
().
debug
(
"AMF handler for NonUEN2MessageNotificationIndividualSubscriptionDocumentApiImpl"
);
"AMF handler for "
"NonUEN2MessageNotificationIndividualSubscriptionDocumentApiImpl"
);
if
(
m_nonUEN2MessagesCollectionDocumentApiImpl
!=
nullptr
)
Logger
::
amf_server
().
debug
(
"AMF handler for NonUEN2MessagesCollectionDocumentApiImpl"
);
if
(
m_nonUEN2MessagesSubscriptionsCollectionDocumentApiImpl
!=
nullptr
)
Logger
::
amf_server
().
debug
(
"AMF handler for NonUEN2MessagesSubscriptionsCollectionDocumentApiImpl"
);
"AMF handler for "
"NonUEN2MessagesSubscriptionsCollectionDocumentApiImpl"
);
if
(
m_subscriptionsCollectionDocumentApiImpl
!=
nullptr
)
Logger
::
amf_server
().
debug
(
"AMF handler for SubscriptionsCollectionDocumentApiImpl"
);
...
...
src/sbi/amf_server/AMFApiServer.hpp
View file @
630dfe19
...
...
@@ -17,7 +17,7 @@
#include "NonUEN2MessagesSubscriptionsCollectionDocumentApiImpl.h"
#include "SubscriptionsCollectionDocumentApiImpl.h"
#define PISTACHE_SERVER_THREADS
2
#define PISTACHE_SERVER_THREADS 2
#define PISTACHE_SERVER_MAX_PAYLOAD 32768
#include "amf_app.hpp"
...
...
@@ -26,34 +26,39 @@ using namespace oai::amf::api;
class
AMFApiServer
{
public:
AMFApiServer
(
Pistache
::
Address
address
,
amf_application
::
amf_app
*
amf_app_inst
)
:
m_httpEndpoint
(
std
::
make_shared
<
Pistache
::
Http
::
Endpoint
>
(
address
))
{
AMFApiServer
(
Pistache
::
Address
address
,
amf_application
::
amf_app
*
amf_app_inst
)
:
m_httpEndpoint
(
std
::
make_shared
<
Pistache
::
Http
::
Endpoint
>
(
address
))
{
m_router
=
std
::
make_shared
<
Pistache
::
Rest
::
Router
>
();
m_individualSubscriptionDocumentApiImpl
=
std
::
make_shared
<
IndividualSubscriptionDocumentApiImpl
>
(
m_router
,
amf_app_inst
);
m_individualUeContextDocumentApiImpl
=
std
::
make_shared
<
IndividualUeContextDocumentApiImpl
>
(
m_router
,
amf_app_inst
);
m_n1N2IndividualSubscriptionDocumentApiImpl
=
std
::
make_shared
<
N1N2IndividualSubscriptionDocumentApiImpl
>
(
m_router
,
amf_app_inst
);
m_n1N2MessageCollectionDocumentApiImpl
=
std
::
make_shared
<
N1N2MessageCollectionDocumentApiImpl
>
(
m_router
,
amf_app_inst
);
m_individualSubscriptionDocumentApiImpl
=
std
::
make_shared
<
IndividualSubscriptionDocumentApiImpl
>
(
m_router
,
amf_app_inst
);
m_individualUeContextDocumentApiImpl
=
std
::
make_shared
<
IndividualUeContextDocumentApiImpl
>
(
m_router
,
amf_app_inst
);
m_n1N2IndividualSubscriptionDocumentApiImpl
=
std
::
make_shared
<
N1N2IndividualSubscriptionDocumentApiImpl
>
(
m_router
,
amf_app_inst
);
m_n1N2MessageCollectionDocumentApiImpl
=
std
::
make_shared
<
N1N2MessageCollectionDocumentApiImpl
>
(
m_router
,
amf_app_inst
);
m_n1N2SubscriptionsCollectionForIndividualUEContextsDocumentApiImpl
=
std
::
make_shared
<
N1N2SubscriptionsCollectionForIndividualUEContextsDocumentApiImpl
>
(
m_router
,
amf_app_inst
);
std
::
make_shared
<
N1N2SubscriptionsCollectionForIndividualUEContextsDocumentApiImpl
>
(
m_router
,
amf_app_inst
);
m_nonUEN2MessageNotificationIndividualSubscriptionDocumentApiImpl
=
std
::
make_shared
<
NonUEN2MessageNotificationIndividualSubscriptionDocumentApiImpl
>
(
m_router
,
amf_app_inst
);
m_nonUEN2MessagesCollectionDocumentApiImpl
=
std
::
make_shared
<
NonUEN2MessagesCollectionDocumentApiImpl
>
(
m_router
,
amf_app_inst
);
m_nonUEN2MessagesSubscriptionsCollectionDocumentApiImpl
=
std
::
make_shared
<
NonUEN2MessagesSubscriptionsCollectionDocumentApiImpl
>
(
m_router
,
amf_app_inst
);
m_subscriptionsCollectionDocumentApiImpl
=
std
::
make_shared
<
SubscriptionsCollectionDocumentApiImpl
>
(
m_router
,
amf_app_inst
);
std
::
make_shared
<
NonUEN2MessageNotificationIndividualSubscriptionDocumentApiImpl
>
(
m_router
,
amf_app_inst
);
m_nonUEN2MessagesCollectionDocumentApiImpl
=
std
::
make_shared
<
NonUEN2MessagesCollectionDocumentApiImpl
>
(
m_router
,
amf_app_inst
);
m_nonUEN2MessagesSubscriptionsCollectionDocumentApiImpl
=
std
::
make_shared
<
NonUEN2MessagesSubscriptionsCollectionDocumentApiImpl
>
(
m_router
,
amf_app_inst
);
m_subscriptionsCollectionDocumentApiImpl
=
std
::
make_shared
<
SubscriptionsCollectionDocumentApiImpl
>
(
m_router
,
amf_app_inst
);
}
void
init
(
size_t
thr
=
1
);
...
...
@@ -63,15 +68,24 @@ class AMFApiServer {
private:
std
::
shared_ptr
<
Pistache
::
Http
::
Endpoint
>
m_httpEndpoint
;
std
::
shared_ptr
<
Pistache
::
Rest
::
Router
>
m_router
;
std
::
shared_ptr
<
IndividualSubscriptionDocumentApiImpl
>
m_individualSubscriptionDocumentApiImpl
;
std
::
shared_ptr
<
IndividualUeContextDocumentApiImpl
>
m_individualUeContextDocumentApiImpl
;
std
::
shared_ptr
<
N1N2IndividualSubscriptionDocumentApiImpl
>
m_n1N2IndividualSubscriptionDocumentApiImpl
;
std
::
shared_ptr
<
N1N2MessageCollectionDocumentApiImpl
>
m_n1N2MessageCollectionDocumentApiImpl
;
std
::
shared_ptr
<
IndividualSubscriptionDocumentApiImpl
>
m_individualSubscriptionDocumentApiImpl
;
std
::
shared_ptr
<
IndividualUeContextDocumentApiImpl
>
m_individualUeContextDocumentApiImpl
;
std
::
shared_ptr
<
N1N2IndividualSubscriptionDocumentApiImpl
>
m_n1N2IndividualSubscriptionDocumentApiImpl
;
std
::
shared_ptr
<
N1N2MessageCollectionDocumentApiImpl
>
m_n1N2MessageCollectionDocumentApiImpl
;
std
::
shared_ptr
<
N1N2SubscriptionsCollectionForIndividualUEContextsDocumentApiImpl
>
m_n1N2SubscriptionsCollectionForIndividualUEContextsDocumentApiImpl
;
N1N2SubscriptionsCollectionForIndividualUEContextsDocumentApiImpl
>
m_n1N2SubscriptionsCollectionForIndividualUEContextsDocumentApiImpl
;
std
::
shared_ptr
<
NonUEN2MessageNotificationIndividualSubscriptionDocumentApiImpl
>
m_nonUEN2MessageNotificationIndividualSubscriptionDocumentApiImpl
;
std
::
shared_ptr
<
NonUEN2MessagesCollectionDocumentApiImpl
>
m_nonUEN2MessagesCollectionDocumentApiImpl
;
std
::
shared_ptr
<
NonUEN2MessagesSubscriptionsCollectionDocumentApiImpl
>
m_nonUEN2MessagesSubscriptionsCollectionDocumentApiImpl
;
std
::
shared_ptr
<
SubscriptionsCollectionDocumentApiImpl
>
m_subscriptionsCollectionDocumentApiImpl
;
NonUEN2MessageNotificationIndividualSubscriptionDocumentApiImpl
>
m_nonUEN2MessageNotificationIndividualSubscriptionDocumentApiImpl
;
std
::
shared_ptr
<
NonUEN2MessagesCollectionDocumentApiImpl
>
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(
value
+=
n1sm
;
std
::
string
ngsId
=
",
\"
servingNfId
\"
:
\"
servingNfId
\"
"
;
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
;
std
::
string
anType
=
",
\"
anType
\"
:
\"
3GPP_ACCESS
\"
"
;
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