Commit cfdee6fc authored by Niuhaiwen's avatar Niuhaiwen

merge docker and master

parent a4562ebf
#!/bin/bash
THIS_SCRIPT_PATH=$(dirname $(readlink -f $0))
echo "$THIS_SCRIPT_PATH"
source ${THIS_SCRIPT_PATH}/build_install_package.sh
function build_docker()
{
docker build -t amf:v1.0 -f ${THIS_SCRIPT_PATH}/../../docker/Dockerfile $1/
if [[ $? -eq 0 ]]; then
return 0
else
return 1
fi
}
function main()
{
local -i apk=0
local -i docker=0
until [ -z "$1" ]
do
case "$1" in
-g | --generate-type)
if [ "$2" == "Apk" ]; then
apk=1
elif [ "$2" == "Docker" ]; then
apk=1
docker=1
else
echo "Unknown option \"Apk\" Or \"Docker\""
return 1
fi
shift 2;
;;
*)
echo "Unknown option $1"
return 1
;;
esac
done
if [ $apk -ne 0 ]; then
echo "Generating a green installation package"
generate_install_package ${THIS_SCRIPT_PATH}/../amf/build/amf ${THIS_SCRIPT_PATH}/../../etc/amf_docker.conf ${THIS_SCRIPT_PATH}/../amf-install-packer
if [[ $? -eq 0 ]]; then
echo "Green installation package was generated successfully"
else
echo "Green installation package generation failed"
return 0
fi
fi
if [ $docker -ne 0 ]; then
echo "Creating a Docker image"
build_docker ${THIS_SCRIPT_PATH}/../amf-install-packer
if [[ $? -eq 0 ]]; then
echo "Docker image created successfully"
else
echo "Docker image creation failed"
return 0
fi
fi
}
main "$@"
#!/bin/bash
function generate_install_package()
{
local lib_dir=""
local libs_dir=""
local res=""
local res_new=""
local result=false
echo "[Executable File]$1"
echo "[Config File] $2"
echo "[Generate Dir] $3"
if [ -n "$1" ] && [ -n "$2" ] && [ -n "$3" ]; then
if [ -f "$1" ] && [ -f "$2" ];then
res="$(ldd $1)"
for ((i=1; i<=100; i++))
do
res_new="${res#*/}"
if [ "$res_new" == "$res" ]; then
result=true
break
fi
lib_dir="/${res_new%%(*} "
libs_dir+="$lib_dir "
res="${res_new#* }"
done
else
echo "\"$1\" Or \"$2\" does not exist!"
fi
if [ $result == true ]; then
if [ -d "$3" ]; then
rm -r $3
fi
mkdir $3 $3/libs
cp $libs_dir $3/libs/
cp $1 $3
cp $2 $3/default.conf
cd $3
cat>start.sh<<EOF
#!/bin/bash
cd \`dirname \$0\`
ROOT_DIR=\$(pwd)
if [ -f "\$ROOT_DIR/external.conf" ]; then
echo -e "\E[33mUsing external configuration \E[00m"
\$ROOT_DIR/libs/ld-linux-x86-64.so.2 --library-path \$ROOT_DIR/libs/ \$ROOT_DIR/$(basename $1) -c \$ROOT_DIR/external.conf -o
else
echo -e "\E[33mUsing default configuration \E[00m"
\$ROOT_DIR/libs/ld-linux-x86-64.so.2 --library-path \$ROOT_DIR/libs/ \$ROOT_DIR/$(basename $1) -c \$ROOT_DIR/default.conf -o
fi
EOF
chmod 777 start.sh
return 0
else
echo "Extract library failed!"
return 1
fi
else
echo "$0 [Executable File] [Config File] [Generate Dir]"
fi
}
#generate_install_package "$@"
FROM ubuntu:18.04
ADD . /opt/5gc/amf
RUN apt-get update -y && \
apt-get install --no-install-recommends -y net-tools vim inetutils-ping && \
mkdir /opt/5gc/log
EXPOSE 8282 38412/sctp
CMD ["/opt/5gc/amf/start.sh"]
################################################################################
# Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
# contributor license agreements. See the NOTICE file distributed with
# 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
#
# http://www.openairinterface.org/?page_id=698
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#-------------------------------------------------------------------------------
# For more information about the OpenAirInterface (OAI) Software Alliance:
# contact@openairinterface.org
################################################################################
AMF =
{
INSTANCE_ID = 10; # 0 is the default
PID_DIRECTORY = "/var/run"; # /var/run is the default
AMF_NAME = "OAI-AMF";
RELATIVE_CAPACITY = 50;
# Display statistics about whole system (in seconds)
STATISTICS_TIMER_INTERVAL = 20; # YOUR CONFIG HERE
CORE_CONFIGURATION:
{
EMERGENCY_SUPPORT = "false";
};
GUAMI:
{
MCC = "220"; MNC = "11"; RegionID = "128"; AMFSetID = "4"; AMFPointer = "1" # YOUR GUAMI CONFIG HERE
}
SERVED_GUAMI_LIST = (
#{MCC = "220"; MNC = "11"; RegionID = "10"; AMFSetID = "1"; AMFPointer = "0"} #48bits <MCC><MNC><RegionID><AMFSetID><AMFPointer>
{MCC = "220"; MNC = "11"; RegionID = "128"; AMFSetID = "4"; AMFPointer = "1"} #48bits <MCC><MNC><RegionID><AMFSetID><AMFPointer>
);
PLMN_SUPPORT_LIST = (
{
MCC = "220"; MNC = "11"; TAC = 100; # YOUR PLMN CONFIG HERE
SLICE_SUPPORT_LIST = (
{SST = "1"; SD = "none"}, # YOUR NSSAI CONFIG HERE
{SST = "1"; SD = "12"} # YOUR NSSAI CONFIG HERE
)
}
);
INTERFACES:
{
# AMF binded interface for N1/N2 interface (NGAP)
NGAP_AMF:
{
INTERFACE_NAME = "eth0"; # YOUR NETWORK CONFIG HERE
IPV4_ADDRESS = "read";
PORT = 38412; # YOUR NETWORK CONFIG HERE
PPID = 60; # YOUR NETWORK CONFIG HERE
};
# AMF binded interface for Nausf interface
NAUSF:
{
INTERFACE_NAME = "eth0"; # YOUR NETWORK CONFIG HERE
IPV4_ADDRESS = "172.16.200.13/24";
PORT = 8383; # YOUR NETWORK CONFIG HERE
};
# AMF binded interface for N11
N11:
{
INTERFACE_NAME = "eth0"; # YOUR NETWORK CONFIG HERE
IPV4_ADDRESS = "read";
PORT = 8282; # YOUR NETWORK CONFIG HERE
SMF_INSTANCES_POOL = (
{SMF_INSTANCE_ID = 1; IPV4_ADDRESS = "172.16.200.15"; PORT = "8889"; VERSION = "v1"; SELECTED = "true"}, # YOUR SMF CONFIG HERE
{SMF_INSTANCE_ID = 2; IPV4_ADDRESS = "10.103.238.21"; PORT = "8181"; VERSION = "v1"; SELECTED = "false"} # YOUR SMF CONFIG HERE
);
};
};
AUTHENTICATION:
{
## MySQL mandatory options
MYSQL_server = "172.16.200.10"; # MySQL Server address
MYSQL_user = "yunshou"; # Database server login
MYSQL_pass = "123456"; # Database server password
MYSQL_db = "OAI_DB"; # Your database name
## OP
OPERATOR_key = "1006020f0a478bf6b699f15c062e42b3"; # OP key matching your database
RANDOM = "true";
};
NAS:
{
ORDERED_SUPPORTED_INTEGRITY_ALGORITHM_LIST = [ "NIA1" , "NIA1" , "NIA1" ];
ORDERED_SUPPORTED_CIPHERING_ALGORITHM_LIST = [ "NEA0" , "NEA1" , "NEA2" ];
};
};
MODULES =
{
NGAP_MESSAGE = (
{MSG_NAME = "NGSetupRequest"; ProcedureCode = 21; TypeOfMessage = "initialMessage"}
);
};
#
# Copyright (c) 2015, EURECOM (www.eurecom.fr)
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# The views and conclusions contained in the software and documentation are those
# of the authors and should not be interpreted as representing official policies,
# either expressed or implied, of the FreeBSD Project.
#
# see https://clang.llvm.org/docs/ClangFormatStyleOptions.html for explanation
# of style options
BasedOnStyle: Google
Language: Cpp
IndentWidth: 2
ColumnLimit: 80
IncludeBlocks: Preserve
SortIncludes: false
# alignment
AlignAfterOpenBracket: AlwaysBreak
AlignConsecutiveAssignments: true
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Right
AlignOperands: true
AlignTrailingComments: true
DerivePointerAlignment: false
PointerAlignment: Left
# function style
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortFunctionsOnASingleLine: Inline
AlwaysBreakAfterReturnType: None
IndentWrappedFunctionNames: false
# template style
AlwaysBreakTemplateDeclarations: Yes
# preprocessor style
IndentPPDirectives: None
# block style
AllowShortBlocksOnASingleLine: false
KeepEmptyLinesAtTheStartOfBlocks: false
# break style
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Attach
BreakBeforeTernaryOperators: false
BreakStringLiterals: true
CompactNamespaces: false
ContinuationIndentWidth: 4
MaxEmptyLinesToKeep: 1
ReflowComments: true
# spacing style
UseTab: Never
SpaceAfterCStyleCast: true
SpaceAfterTemplateKeyword: false
SpaceBeforeAssignmentOperators: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
# class style
BreakConstructorInitializers: BeforeColon
BreakInheritanceList: BeforeColon
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
# case statements
IndentCaseLabels: true
# cpp
Cpp11BracedListStyle: true
FixNamespaceComments: true
NamespaceIndentation: None
SortUsingDeclarations: true
# todo
# AlwaysBreakBeforeMultilineStrings: bool
# PenaltyBreakAssignment (unsigned)
# PenaltyBreakBeforeFirstCallParameter (unsigned)
# PenaltyBreakComment (unsigned)
# PenaltyBreakFirstLessLess (unsigned)
# PenaltyBreakString (unsigned)
# PenaltyBreakTemplateDeclaration (unsigned)
# PenaltyExcessCharacter (unsigned)
# PenaltyReturnTypeOnItsOwnLine (unsigned)
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -112,7 +112,7 @@ class amf_n1 {
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);
std::shared_ptr<nas_context>& nc, bstring resStar);
bool authentication_vectors_generator_in_ausf(
std::shared_ptr<nas_context>& nc);
......
......@@ -626,10 +626,12 @@ void amf_n2::handle_itti_message(itti_initial_context_setup_request& itti_msg) {
item.s_nssai.sd = "None";
item.pduSessionNAS_PDU = NULL;
if (itti_msg.isn2sm_avaliable) {
bstring n2sm = itti_msg.n2sm;
//bstring n2sm = itti_msg.n2sm;
if (blength(itti_msg.n2sm) != 0) {
Logger::amf_n2().debug("*** test into itti_msg.n2sm ***");
item.pduSessionResourceSetupRequestTransfer.buf =
(uint8_t*) bdata(itti_msg.n2sm);
Logger::amf_n2().debug("*** test into item.pduSessionResourceSetupRequestTransfer.buf ***");
item.pduSessionResourceSetupRequestTransfer.size =
blength(itti_msg.n2sm);
} else {
......
......@@ -89,11 +89,13 @@ void S_NSSAI::getSst(std::string& charSst) {
//------------------------------------------------------------------------------
void S_NSSAI::setSd(const std::string charSd) {
if(charSd.compare("none"))
if(charSd.compare("none") && charSd.compare("none"))
{
sdIsSet = true;
sd = fromString<int>(charSd);
}
else
sdIsSet = false;
sd = fromString<int>(charSd);
}
//------------------------------------------------------------------------------
......
......@@ -386,7 +386,8 @@ void InitialContextSetupRequestMsg::setAllowedNssai(std::vector<S_Nssai> list) {
S_NSSAI* m_snssai = new S_NSSAI[list.size()]();
for (int i = 0; i < list.size(); i++) {
m_snssai[i].setSst(list[i].sst);
if (list[i].sd.size()) m_snssai[i].setSd(list[i].sd);
if (list[i].sd.size() && (list[i].sd.compare("None") && list[i].sd.compare("none")))
m_snssai[i].setSd(list[i].sd);
}
allowedNssai->setAllowedNSSAI(m_snssai, list.size());
......@@ -470,7 +471,7 @@ void InitialContextSetupRequestMsg::setNasPdu(uint8_t* nas, size_t sizeofnas) {
(Ngap_InitialContextSetupRequestIEs_t*) calloc(
1, sizeof(Ngap_InitialContextSetupRequestIEs_t));
ie->id = Ngap_ProtocolIE_ID_id_NAS_PDU;
ie->criticality = Ngap_Criticality_reject;
ie->criticality = Ngap_Criticality_ignore;
ie->value.present = Ngap_InitialContextSetupRequestIEs__value_PR_NAS_PDU;
int ret = nasPdu->encode2octetstring(ie->value.choice.NAS_PDU);
......@@ -738,7 +739,7 @@ bool InitialContextSetupRequestMsg::decodefrompdu(
} break;
case Ngap_ProtocolIE_ID_id_NAS_PDU: {
if (initialContextSetupRequestIEs->protocolIEs.list.array[i]
->criticality == Ngap_Criticality_reject &&
->criticality == Ngap_Criticality_ignore &&
initialContextSetupRequestIEs->protocolIEs.list.array[i]
->value.present ==
Ngap_InitialContextSetupRequestIEs__value_PR_NAS_PDU) {
......
......@@ -267,8 +267,8 @@ bool InitialContextSetupResponseMsg::decodefrompdu(
i++) {
switch (initialContextSetupResponseIEs->protocolIEs.list.array[i]->id) {
case Ngap_ProtocolIE_ID_id_AMF_UE_NGAP_ID: {
if (initialContextSetupResponseIEs->protocolIEs.list.array[i]
->criticality == Ngap_Criticality_ignore &&
if (/*initialContextSetupResponseIEs->protocolIEs.list.array[i]
->criticality == Ngap_Criticality_ignore &&*/
initialContextSetupResponseIEs->protocolIEs.list.array[i]
->value.present ==
Ngap_InitialContextSetupResponseIEs__value_PR_AMF_UE_NGAP_ID) {
......@@ -285,8 +285,8 @@ bool InitialContextSetupResponseMsg::decodefrompdu(
}
} break;
case Ngap_ProtocolIE_ID_id_RAN_UE_NGAP_ID: {
if (initialContextSetupResponseIEs->protocolIEs.list.array[i]
->criticality == Ngap_Criticality_ignore &&
if (/*initialContextSetupResponseIEs->protocolIEs.list.array[i]
->criticality == Ngap_Criticality_ignore &&*/
initialContextSetupResponseIEs->protocolIEs.list.array[i]
->value.present ==
Ngap_InitialContextSetupResponseIEs__value_PR_RAN_UE_NGAP_ID) {
......
......@@ -294,8 +294,8 @@ bool InitialUEMessageMsg::decodefrompdu(Ngap_NGAP_PDU_t* ngap_msg_pdu) {
}
} break;
case Ngap_ProtocolIE_ID_id_UserLocationInformation: {
if (initialUEMessageIEs->protocolIEs.list.array[i]->criticality ==
Ngap_Criticality_reject &&
if (/*initialUEMessageIEs->protocolIEs.list.array[i]->criticality ==
Ngap_Criticality_reject &&*/
initialUEMessageIEs->protocolIEs.list.array[i]->value.present ==
Ngap_InitialUEMessage_IEs__value_PR_UserLocationInformation) {
userLocationInformation = new UserLocationInformation();
......
......@@ -172,8 +172,8 @@ void NGSetupResponseMsg::setPlmnSupportList(
S_NSSAI* snssai = new S_NSSAI[list[i].slice_list.size()]();
for (int j = 0; j < list[i].slice_list.size(); j++) {
snssai[j].setSst(list[i].slice_list[j].sst);
if (list[i].slice_list[j].sd.size()) {
snssai[j].setSd(list[i].slice_list[j].sd);
if (list[i].slice_list[j].sd.size() && (list[i].slice_list[j].sd.compare("None") && list[i].slice_list[j].sd.compare("none"))) {
snssai[j].setSd(list[i].slice_list[j].sd);
}
}
plmnSupportItem[i].setPlmnSliceSupportList(
......
......@@ -273,8 +273,8 @@ bool PduSessionResourceSetupResponseMsg::decodefrompdu(
i < pduSessionResourceSetupResponseIEs->protocolIEs.list.count; i++) {
switch (pduSessionResourceSetupResponseIEs->protocolIEs.list.array[i]->id) {
case Ngap_ProtocolIE_ID_id_AMF_UE_NGAP_ID: {
if (pduSessionResourceSetupResponseIEs->protocolIEs.list.array[i]
->criticality == Ngap_Criticality_ignore &&
if (/*pduSessionResourceSetupResponseIEs->protocolIEs.list.array[i]
->criticality == Ngap_Criticality_ignore &&*/
pduSessionResourceSetupResponseIEs->protocolIEs.list.array[i]
->value.present ==
Ngap_PDUSessionResourceSetupResponseIEs__value_PR_AMF_UE_NGAP_ID) {
......@@ -291,8 +291,8 @@ bool PduSessionResourceSetupResponseMsg::decodefrompdu(
}
} break;
case Ngap_ProtocolIE_ID_id_RAN_UE_NGAP_ID: {
if (pduSessionResourceSetupResponseIEs->protocolIEs.list.array[i]
->criticality == Ngap_Criticality_ignore &&
if (/*pduSessionResourceSetupResponseIEs->protocolIEs.list.array[i]
->criticality == Ngap_Criticality_ignore &&*/
pduSessionResourceSetupResponseIEs->protocolIEs.list.array[i]
->value.present ==
Ngap_PDUSessionResourceSetupResponseIEs__value_PR_RAN_UE_NGAP_ID) {
......
......@@ -18,9 +18,9 @@ namespace amf {
namespace model {
AuthenticationInfo::AuthenticationInfo() {
m_SupiOrSuci = "";
m_SupiOrSuci = "";
m_ServingNetworkName = "";
// m_ResynchronizationInfoIsSet = false;
m_ResynchronizationInfoIsSet = false;
// m_Pei = "";
// m_PeiIsSet = false;
// m_TraceDataIsSet = false;
......@@ -39,12 +39,12 @@ void AuthenticationInfo::validate() {
// TODO: implement validation
}
void to_json(nlohmann::json& j, const AuthenticationInfo& o) {
j = nlohmann::json();
j["supiOrSuci"] = o.m_SupiOrSuci;
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.resynchronizationInfoIsSet())
j["resynchronizationInfo"] = o.m_ResynchronizationInfo;
// if(o.peiIsSet())
// j["pei"] = o.m_Pei;
// if(o.traceDataIsSet())
......@@ -59,14 +59,14 @@ void to_json(nlohmann::json& j, const AuthenticationInfo& o) {
// j["n5gcInd"] = o.m_N5gcInd;
}
void from_json(const nlohmann::json& j, AuthenticationInfo& o) {
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("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);
......@@ -99,18 +99,31 @@ void from_json(const nlohmann::json& j, AuthenticationInfo& o) {
// }
}
std::string AuthenticationInfo::getSupiOrSuci() const {
return m_SupiOrSuci;
}
void AuthenticationInfo::setSupiOrSuci(std::string const& value) {
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) {
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;
}
// ResynchronizationInfo AuthenticationInfo::getResynchronizationInfo() const
//{
// return m_ResynchronizationInfo;
......@@ -233,6 +246,6 @@ void AuthenticationInfo::setServingNetworkName(std::string const& value) {
// m_N5gcIndIsSet = false;
//}
} // namespace model
} // namespace amf
} // namespace oai
} // namespace model
} // namespace amf
} // namespace oai
......@@ -19,7 +19,7 @@
#ifndef AuthenticationInfo_H_
#define AuthenticationInfo_H_
//#include "ResynchronizationInfo.h"
#include "ResynchronizationInfo.h"
//#include "TraceData.h"
#include <nlohmann/json.hpp>
#include <string>
......@@ -55,10 +55,10 @@ class AuthenticationInfo {
/// <summary>
///
/// </summary>
// ResynchronizationInfo getResynchronizationInfo() const;
// void setResynchronizationInfo(ResynchronizationInfo const &value);
// bool resynchronizationInfoIsSet() const;
// void unsetResynchronizationInfo();
ResynchronizationInfo getResynchronizationInfo() const;
void setResynchronizationInfo(ResynchronizationInfo const &value);
bool resynchronizationInfoIsSet() const;
void unsetResynchronizationInfo();
// /// <summary>
// ///
// /// </summary>
......@@ -110,8 +110,8 @@ class AuthenticationInfo {
std::string m_ServingNetworkName;
// ResynchronizationInfo m_ResynchronizationInfo;
// bool m_ResynchronizationInfoIsSet;
ResynchronizationInfo m_ResynchronizationInfo;
bool m_ResynchronizationInfoIsSet;
// std::string m_Pei;
// bool m_PeiIsSet;
// TraceData m_TraceData;
......
/**
* 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 "ResynchronizationInfo.h"
namespace oai {
namespace amf {
namespace model {
ResynchronizationInfo::ResynchronizationInfo() {
m_Rand = "";
m_Auts = "";
}
ResynchronizationInfo::~ResynchronizationInfo() {}
void ResynchronizationInfo::validate() {
// TODO: implement validation
}
void to_json(nlohmann::json &j, const ResynchronizationInfo &o) {
j = nlohmann::json();
j["rand"] = o.m_Rand;
j["auts"] = o.m_Auts;
}
void from_json(const nlohmann::json &j, ResynchronizationInfo &o) {
j.at("rand").get_to(o.m_Rand);
j.at("auts").get_to(o.m_Auts);
}
std::string ResynchronizationInfo::getRand() const { return m_Rand; }
void ResynchronizationInfo::setRand(std::string const &value) {
m_Rand = value;
}
std::string ResynchronizationInfo::getAuts() const { return m_Auts; }
void ResynchronizationInfo::setAuts(std::string const &value) {
m_Auts = value;
}
} // namespace model
} // namespace amf
} // namespace oai
/**
* 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.
*/
/*
* ResynchronizationInfo.h
*
*
*/
#ifndef ResynchronizationInfo_H_
#define ResynchronizationInfo_H_
#include <nlohmann/json.hpp>
#include <string>
namespace oai {
namespace amf {
namespace model {
class ResynchronizationInfo {
public:
ResynchronizationInfo();
virtual ~ResynchronizationInfo();
void validate();
std::string getRand() const;
void setRand(std::string const &value);
std::string getAuts() const;
void setAuts(std::string const &value);
friend void to_json(nlohmann::json &j, const ResynchronizationInfo &o);
friend void from_json(const nlohmann::json &j, ResynchronizationInfo &o);
protected:
std::string m_Rand;
std::string m_Auts;
};
} // namespace model
} // namespace amf
} // namespace oai
#endif /* ResynchronizationInfo_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