Commit 2b72ad41 authored by yangjian's avatar yangjian

add ausf

parent a7683bb2
...@@ -28,6 +28,14 @@ AMF = ...@@ -28,6 +28,14 @@ AMF =
PORT = 38412; PORT = 38412;
PPID = 60; PPID = 60;
}; };
# AMF binded interface for Nausf interface
NAUSF:
{
INTERFACE_NAME = "ens33"; # YOUR NETWORK CONFIG HERE
IPV4_ADDRESS = "read";
PORT = 8383; # YOUR NETWORK CONFIG HERE
};
N11:{ N11:{
SMF_INSTANCES_POOL = ( SMF_INSTANCES_POOL = (
{SMF_INSTANCE_ID = 1; IPV4_ADDRESS = "192.168.199.203"; PORT = "8889"; VERSION = "v2"; SELECTED = "true"}, {SMF_INSTANCE_ID = 1; IPV4_ADDRESS = "192.168.199.203"; PORT = "8889"; VERSION = "v2"; SELECTED = "true"},
......
...@@ -56,6 +56,7 @@ namespace config { ...@@ -56,6 +56,7 @@ namespace config {
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
amf_config::amf_config() { amf_config::amf_config() {
//TODO: //TODO:
is_Nausf = true;
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
...@@ -162,6 +163,11 @@ int amf_config::load(const std::string &config_file) { ...@@ -162,6 +163,11 @@ int amf_config::load(const std::string &config_file) {
const Setting &new_if_cfg = amf_cfg[AMF_CONFIG_STRING_INTERFACES]; const Setting &new_if_cfg = amf_cfg[AMF_CONFIG_STRING_INTERFACES];
const Setting &n2_amf_cfg = new_if_cfg[AMF_CONFIG_STRING_INTERFACE_NGAP_AMF]; const Setting &n2_amf_cfg = 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 = n11_cfg[AMF_CONFIG_STRING_SMF_INSTANCES_POOL]; const Setting &smf_addr_pool = n11_cfg[AMF_CONFIG_STRING_SMF_INSTANCES_POOL];
...@@ -278,6 +284,18 @@ void amf_config::display() { ...@@ -278,6 +284,18 @@ void amf_config::display() {
Logger::config().info(" ip ...................: %s", inet_ntoa(n2.addr4)); Logger::config().info(" ip ...................: %s", inet_ntoa(n2.addr4));
Logger::config().info(" port .................: %d", n2.port); Logger::config().info(" port .................: %d", n2.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("- N11 Networking:"); Logger::config().info("- N11 Networking:");
Logger::config().info(" iface ................: %s", n11.if_name.c_str()); Logger::config().info(" iface ................: %s", n11.if_name.c_str());
Logger::config().info(" ip ...................: %s", Logger::config().info(" ip ...................: %s",
......
...@@ -50,6 +50,8 @@ ...@@ -50,6 +50,8 @@
#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_NAUSF "NAUSF"
#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"
...@@ -170,6 +172,7 @@ class amf_config { ...@@ -170,6 +172,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;
...@@ -181,6 +184,8 @@ class amf_config { ...@@ -181,6 +184,8 @@ class amf_config {
auth_conf auth_para; auth_conf auth_para;
nas_conf_t nas_cfg; nas_conf_t nas_cfg;
std::vector<smf_inst_t> smf_pool; std::vector<smf_inst_t> smf_pool;
bool is_Nausf;
}; };
} }
......
This diff is collapsed.
...@@ -100,6 +100,9 @@ class amf_n1 { ...@@ -100,6 +100,9 @@ class amf_n1 {
//authentication //authentication
bool auth_vectors_generator(std::shared_ptr<nas_context> &nc); bool auth_vectors_generator(std::shared_ptr<nas_context> &nc);
bool authentication_vectors_generator_in_ausf(std::shared_ptr<nas_context> &nc); bool authentication_vectors_generator_in_ausf(std::shared_ptr<nas_context> &nc);
void curl_http_client(std::string remoteUri, std::string Method, std::string msgBody, std::string &Response);
bool authentication_vectors_from_ausf(std::shared_ptr<nas_context> &nc);
bool _5g_aka_confirmation_from_ausf(std::shared_ptr<nas_context> &nc,std::string &resStar);
bool authentication_vectors_generator_in_udm(std::shared_ptr<nas_context> &nc); bool authentication_vectors_generator_in_udm(std::shared_ptr<nas_context> &nc);
//mysql handlers in mysql_db.cpp //mysql handlers in mysql_db.cpp
bool get_mysql_auth_info(std::string imsi, mysql_auth_info_t &resp); bool get_mysql_auth_info(std::string imsi, mysql_auth_info_t &resp);
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
*/ */
#include "conversions.hpp" #include "conversions.hpp"
#include <iostream>
#include <stdlib.h> #include <stdlib.h>
#include <stdint.h> #include <stdint.h>
#include <stdbool.h> #include <stdbool.h>
...@@ -141,3 +142,4 @@ std::string conv::toString(const struct in6_addr &in6addr) { ...@@ -141,3 +142,4 @@ std::string conv::toString(const struct in6_addr &in6addr) {
} }
return s; return s;
} }
...@@ -73,6 +73,7 @@ class nas_context { ...@@ -73,6 +73,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;
......
...@@ -69,6 +69,7 @@ if (!Options::parse(argc, argv)) { ...@@ -69,6 +69,7 @@ if (!Options::parse(argc, argv)) {
Logger::init( "AMF" , Options::getlogStdout() , Options::getlogRotFilelog()); Logger::init( "AMF" , Options::getlogStdout() , Options::getlogRotFilelog());
Logger::amf_app().startup("Options parsed!"); Logger::amf_app().startup("Options parsed!");
amf_cfg.is_Nausf = Options::isNausf();
amf_cfg.load(Options::getlibconfigConfig()); amf_cfg.load(Options::getlibconfigConfig());
amf_cfg.display(); amf_cfg.display();
modules.load(Options::getlibconfigConfig()); modules.load(Options::getlibconfigConfig());
......
...@@ -26,11 +26,12 @@ int Options::options; ...@@ -26,11 +26,12 @@ int Options::options;
std::string Options::m_libconfigcfg; std::string Options::m_libconfigcfg;
bool Options::m_log_rot_file_log; bool Options::m_log_rot_file_log;
bool Options::m_log_stdout; bool Options::m_log_stdout;
bool Options::m_is_Nausf = true;
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
void Options::help() { void Options::help() {
std::cout << std::endl << "Usage: AMF [OPTIONS]..." << std::endl << " -h, --help Print help and exit" << std::endl << " -c, --libconfigcfg filename Read the application configuration from this file." << std::endl std::cout << std::endl << "Usage: AMF [OPTIONS]..." << std::endl << " -h, --help Print help and exit" << std::endl << " -c, --libconfigcfg filename Read the application configuration from this file." << std::endl
<< " -o, --stdoutlog Send the application logs to STDOUT fd." << std::endl << " -r, --rotatelog Send the application logs to local file (in current working directory)." << std::endl; << " -o, --stdoutlog Send the application logs to STDOUT fd." << std::endl << " -r, --rotatelog Send the application logs to local file (in current working directory)." << std::endl<< " --no-ausf Do not connect ausf." << std::endl;
} }
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
...@@ -50,13 +51,15 @@ bool Options::validateOptions() { ...@@ -50,13 +51,15 @@ bool Options::validateOptions() {
} }
#define OPTIONS_NAUSF_VAL 0xFFFF
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
bool Options::parseInputOptions(int argc, char **argv) { bool Options::parseInputOptions(int argc, char **argv) {
int c; int c;
int lopt;
int option_index = 0; int option_index = 0;
bool result = true; bool result = true;
struct option long_options[] = { { "help", no_argument, NULL, 'h' }, { "libconfigcfg", required_argument, NULL, 'f' }, { "stdoutlog", no_argument, NULL, 'o' }, { "rotatelog", no_argument, NULL, 'r' }, { NULL, 0, NULL, 0 } }; struct option long_options[] = { { "help", no_argument, NULL, 'h' }, { "libconfigcfg", required_argument, NULL, 'f' }, { "stdoutlog", no_argument, NULL, 'o' }, { "rotatelog", no_argument, NULL, 'r' }, { "no-ausf", no_argument, &lopt, OPTIONS_NAUSF_VAL }, { NULL, 0, NULL, 0 } };
// Loop on arguments // Loop on arguments
while (1) { while (1) {
...@@ -65,6 +68,14 @@ bool Options::parseInputOptions(int argc, char **argv) { ...@@ -65,6 +68,14 @@ bool Options::parseInputOptions(int argc, char **argv) {
break; // Exit from the loop. break; // Exit from the loop.
switch (c) { switch (c) {
case 0:{
switch (lopt){
case OPTIONS_NAUSF_VAL:{
m_is_Nausf = false;
}
}
break;
}
case 'h': { case 'h': {
help(); help();
exit(0); exit(0);
......
...@@ -33,6 +33,7 @@ public: ...@@ -33,6 +33,7 @@ public:
static const std::string &getlibconfigConfig() { return m_libconfigcfg; } static const std::string &getlibconfigConfig() { return m_libconfigcfg; }
static const bool &getlogRotFilelog() { return m_log_rot_file_log; } static const bool &getlogRotFilelog() { return m_log_rot_file_log; }
static const bool &getlogStdout() { return m_log_stdout; } static const bool &getlogStdout() { return m_log_stdout; }
static const bool &isNausf() { return m_is_Nausf; }
private: private:
...@@ -48,6 +49,7 @@ private: ...@@ -48,6 +49,7 @@ private:
static bool m_log_rot_file_log; static bool m_log_rot_file_log;
static bool m_log_stdout; static bool m_log_stdout;
static bool m_is_Nausf;
static std::string m_libconfigcfg; static std::string m_libconfigcfg;
}; };
......
/**
* 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;
//}
}
}
}
/**
* 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_ */
/**
* 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;
}
}
}
}
/**
* 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_ */
/**
* 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;
}
}
}
}
/**
* 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_ */
/**
* 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;
}
}
}
}
/**
* 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_ */
/**
* 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 server
} // namespace openapitools
/**
* 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_ */
/**
* 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;
}
}
}
}
/**
* 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_ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment