Commit 58be070c authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

apply google style format

parent 53cbf6ec
......@@ -48,7 +48,6 @@ smf_config smf_cfg;
SMFApiServer *smf_api_server_1 = nullptr;
smf_http2_server *smf_api_server_2 = nullptr;
void send_heartbeat_to_tasks(const uint32_t sequence);
//------------------------------------------------------------------------------
......
......@@ -55,7 +55,6 @@ bool Options::validateOptions(){
(options & libconfigcfg)
);
}
bool Options::parseInputOptions( int argc, char **argv )
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -3,9 +3,9 @@
* 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
* 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
*
......@@ -31,9 +31,9 @@
#define FILE_SMF_CONFIG_HPP_SEEN
#include <arpa/inet.h>
#include <libconfig.h++>
#include <netinet/in.h>
#include <sys/socket.h>
#include <libconfig.h++>
#include <mutex>
#include <vector>
......@@ -56,8 +56,8 @@
#define SMF_CONFIG_STRING_SBI_HTTP2_PORT "HTTP2_PORT"
#define SMF_CONFIG_STRING_API_VERSION "API_VERSION"
#define SMF_CONFIG_STRING_NAS_FORCE_PUSH_PCO "FORCE_PUSH_PROTOCOL_CONFIGURATION_OPTIONS"
#define SMF_CONFIG_STRING_NAS_FORCE_PUSH_PCO \
"FORCE_PUSH_PROTOCOL_CONFIGURATION_OPTIONS"
#define SMF_CONFIG_STRING_IP_ADDRESS_POOL "IP_ADDRESS_POOL"
#define SMF_CONFIG_STRING_ARP_UE "ARP_UE"
......@@ -71,9 +71,11 @@
#define SMF_CONFIG_STRING_IPV4_ADDRESS_RANGE_DELIMITER "-"
#define SMF_CONFIG_STRING_IPV6_ADDRESS_PREFIX_DELIMITER "/"
#define SMF_CONFIG_STRING_DEFAULT_DNS_IPV4_ADDRESS "DEFAULT_DNS_IPV4_ADDRESS"
#define SMF_CONFIG_STRING_DEFAULT_DNS_SEC_IPV4_ADDRESS "DEFAULT_DNS_SEC_IPV4_ADDRESS"
#define SMF_CONFIG_STRING_DEFAULT_DNS_SEC_IPV4_ADDRESS \
"DEFAULT_DNS_SEC_IPV4_ADDRESS"
#define SMF_CONFIG_STRING_DEFAULT_DNS_IPV6_ADDRESS "DEFAULT_DNS_IPV6_ADDRESS"
#define SMF_CONFIG_STRING_DEFAULT_DNS_SEC_IPV6_ADDRESS "DEFAULT_DNS_SEC_IPV6_ADDRESS"
#define SMF_CONFIG_STRING_DEFAULT_DNS_SEC_IPV6_ADDRESS \
"DEFAULT_DNS_SEC_IPV6_ADDRESS"
#define SMF_CONFIG_STRING_UE_MTU "UE_MTU"
#define SMF_CONFIG_STRING_INTERFACE_DISABLED "none"
......@@ -111,17 +113,22 @@
#define SMF_CONFIG_STRING_LOCAL_CONFIGURATION "LOCAL_CONFIGURATION"
#define SMF_CONFIG_STRING_USE_LOCAL_CONFIGURATION "USE_LOCAL_CONFIGURATION"
#define SMF_CONFIG_STRING_SESSION_MANAGEMENT_SUBSCRIPTION_LIST "SESSION_MANAGEMENT_SUBSCRIPTION_LIST"
#define SMF_CONFIG_STRING_SESSION_MANAGEMENT_SUBSCRIPTION_LIST \
"SESSION_MANAGEMENT_SUBSCRIPTION_LIST"
#define SMF_CONFIG_STRING_NSSAI_SST "NSSAI_SST"
#define SMF_CONFIG_STRING_NSSAI_SD "NSSAI_SD"
#define SMF_CONFIG_STRING_DNN "DNN"
#define SMF_CONFIG_STRING_DEFAULT_SESSION_TYPE "DEFAULT_SESSION_TYPE"
#define SMF_CONFIG_STRING_DEFAULT_SSC_MODE "DEFAULT_SSC_MODE"
#define SMF_CONFIG_STRING_QOS_PROFILE_5QI "QOS_PROFILE_5QI"
#define SMF_CONFIG_STRING_QOS_PROFILE_PRIORITY_LEVEL "QOS_PROFILE_PRIORITY_LEVEL"
#define SMF_CONFIG_STRING_QOS_PROFILE_ARP_PRIORITY_LEVEL "QOS_PROFILE_ARP_PRIORITY_LEVEL"
#define SMF_CONFIG_STRING_QOS_PROFILE_ARP_PREEMPTCAP "QOS_PROFILE_ARP_PREEMPTCAP"
#define SMF_CONFIG_STRING_QOS_PROFILE_ARP_PREEMPTVULN "QOS_PROFILE_ARP_PREEMPTVULN"
#define SMF_CONFIG_STRING_QOS_PROFILE_PRIORITY_LEVEL \
"QOS_PROFILE_PRIORITY_LEVEL"
#define SMF_CONFIG_STRING_QOS_PROFILE_ARP_PRIORITY_LEVEL \
"QOS_PROFILE_ARP_PRIORITY_LEVEL"
#define SMF_CONFIG_STRING_QOS_PROFILE_ARP_PREEMPTCAP \
"QOS_PROFILE_ARP_PREEMPTCAP"
#define SMF_CONFIG_STRING_QOS_PROFILE_ARP_PREEMPTVULN \
"QOS_PROFILE_ARP_PREEMPTVULN"
#define SMF_CONFIG_STRING_SESSION_AMBR_UL "SESSION_AMBR_UL"
#define SMF_CONFIG_STRING_SESSION_AMBR_DL "SESSION_AMBR_DL"
......@@ -187,8 +194,11 @@ class smf_config {
struct in_addr ue_pool_range_high[SMF_NUM_UE_POOL_MAX];
struct in_addr ue_pool_network[SMF_NUM_UE_POOL_MAX];
struct in_addr ue_pool_netmask[SMF_NUM_UE_POOL_MAX];
//computed from config, UE IP adresses that matches ue_pool_network[]/ue_pool_netmask[] but do not match ue_pool_range_low[] - ue_pool_range_high[]
// The problem here is that OpenFlow do not deal with ip ranges but with netmasks
// computed from config, UE IP adresses that matches
// ue_pool_network[]/ue_pool_netmask[] but do not match ue_pool_range_low[] -
// ue_pool_range_high[]
// The problem here is that OpenFlow do not deal with ip ranges but with
// netmasks
std::vector<struct in_addr> ue_pool_excluded[SMF_NUM_UE_POOL_MAX];
int num_paa6_pool;
......@@ -212,7 +222,7 @@ class smf_config {
std::vector<pfcp::node_id_t> upfs;
//Local configuration
// Local configuration
bool local_configuration;
#define SMF_NUM_SESSION_MANAGEMENT_SUBSCRIPTION_MAX 5
struct {
......@@ -222,12 +232,12 @@ class smf_config {
uint8_t ssc_mode;
subscribed_default_qos_t default_qos;
session_ambr_t session_ambr;
} session_management_subscription[SMF_NUM_SESSION_MANAGEMENT_SUBSCRIPTION_MAX];
} session_management_subscription
[SMF_NUM_SESSION_MANAGEMENT_SUBSCRIPTION_MAX];
uint8_t num_session_management_subscription;
smf_config()
:
m_rw_lock(),
: m_rw_lock(),
num_dnn(0),
pid_dir(),
instance(0),
......@@ -236,7 +246,7 @@ class smf_config {
itti(),
upfs() {
for (int i = 0; i < SMF_NUM_DNN_MAX; i++) {
dnn[i] = { };
dnn[i] = {};
}
default_dnsv4.s_addr = INADDR_ANY;
default_dns_secv4.s_addr = INADDR_ANY;
......@@ -246,13 +256,13 @@ class smf_config {
num_ue_pool = 0;
num_paa6_pool = 0;
for (int i = 0; i < SMF_NUM_UE_POOL_MAX; i++) {
ue_pool_range_low[i] = { };
ue_pool_range_high[i] = { };
ue_pool_network[i] = { };
ue_pool_netmask[i] = { };
paa_pool6_prefix[i] = { };
paa_pool6_prefix_len[i] = { };
ue_pool_excluded[i] = { };
ue_pool_range_low[i] = {};
ue_pool_range_high[i] = {};
ue_pool_network[i] = {};
ue_pool_netmask[i] = {};
paa_pool6_prefix[i] = {};
paa_pool6_prefix_len[i] = {};
ue_pool_excluded[i] = {};
}
force_push_pco = true;
ue_mtu = 1500;
......@@ -283,18 +293,10 @@ class smf_config {
}
sbi_http2_port = 8080;
sbi_api_version = "v1";
}
;
};
~smf_config();
void lock() {
m_rw_lock.lock();
}
;
void unlock() {
m_rw_lock.unlock();
}
;
void lock() { m_rw_lock.lock(); };
void unlock() { m_rw_lock.unlock(); };
int load(const std::string &config_file);
int finalize();
void display();
......
This diff is collapsed.
This diff is collapsed.
......@@ -3,9 +3,9 @@
* 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
* 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
*
......@@ -28,9 +28,9 @@
*/
#include "smf_event.hpp"
#include "smf_subscription.hpp"
#include "smf_app.hpp"
#include "itti.hpp"
#include "smf_app.hpp"
#include "smf_subscription.hpp"
using namespace smf;
extern smf::smf_app *smf_app_inst;
......
......@@ -3,9 +3,9 @@
* 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
* 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
*
......@@ -38,15 +38,12 @@ namespace bs2 = boost::signals2;
namespace smf {
class smf_event {
public:
smf_event() {
}
;
smf_event(smf_event const&) = delete;
void operator=(smf_event const&) = delete;
smf_event(){};
smf_event(smf_event const &) = delete;
void operator=(smf_event const &) = delete;
static smf_event& get_instance() {
static smf_event &get_instance() {
static smf_event instance;
return instance;
}
......@@ -57,23 +54,29 @@ class smf_event {
/*
* Subscribe to SM Context Status Notification signal
* @param [const sm_context_status_sig_t::slot_type&] sig: slot_type parameter
* @return boost::signals2::connection: the connection between the signal and the slot
* @param [const sm_context_status_sig_t::slot_type&] sig: slot_type
* parameter
* @return boost::signals2::connection: the connection between the signal and
* the slot
*/
bs2::connection subscribe_sm_context_status(
const sm_context_status_sig_t::slot_type &sig);
/*
* Subscribe to Event Exposure Event: PDU Session Release
* @param [const ee_pdu_session_release_sig_t::slot_type&] sig: slot_type parameter
* @return boost::signals2::connection: the connection between the signal and the slot
* @param [const ee_pdu_session_release_sig_t::slot_type&] sig: slot_type
* parameter
* @return boost::signals2::connection: the connection between the signal and
* the slot
*/
bs2::connection subscribe_ee_pdu_session_release(
const ee_pdu_session_release_sig_t::slot_type &sig);
private:
sm_context_status_sig_t sm_context_status; //Signal for SM Context status update
ee_pdu_session_release_sig_t ee_pdu_session_release; //Signal for SM Context status update
sm_context_status_sig_t
sm_context_status; // Signal for SM Context status update
ee_pdu_session_release_sig_t
ee_pdu_session_release; // Signal for SM Context status update
};
}
} // namespace smf
#endif /* FILE_SMF_EVENT_HPP_SEEN */
......@@ -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
*
......@@ -38,14 +38,13 @@ namespace smf {
// Signal for PDU session status
// SCID, PDU Session Status, HTTP version
typedef bs2::signal_type<
void(scid_t, uint8_t, uint8_t),
bs2::keywords::mutex_type<bs2::dummy_mutex>>::type sm_context_status_sig_t;
typedef bs2::signal_type<void(scid_t, uint8_t, uint8_t),
bs2::keywords::mutex_type<bs2::dummy_mutex>>::type
sm_context_status_sig_t;
// Signal for Event exposure
// PDU session Release, SUPI, PDU SessionID, HTTP version
typedef bs2::signal_type<
void(supi64_t, pdu_session_id_t, uint8_t),
typedef bs2::signal_type<void(supi64_t, pdu_session_id_t, uint8_t),
bs2::keywords::mutex_type<bs2::dummy_mutex>>::type
ee_pdu_session_release_sig_t;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -3,9 +3,9 @@
* 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
* 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
*
......@@ -33,10 +33,10 @@
#include <curl/curl.h>
#include <nlohmann/json.hpp>
#include "smf.h"
#include "common_defs.h"
#include "itti.hpp"
#include "logger.hpp"
#include "smf.h"
#include "smf_config.hpp"
using namespace smf;
......@@ -46,7 +46,7 @@ using json = nlohmann::json;
extern itti_mw *itti_inst;
extern smf_n10 *smf_n10_inst;
extern smf_config smf_cfg;
void smf_n10_task(void*);
void smf_n10_task(void *);
/*
* To read content of the response from UDM
......@@ -67,16 +67,16 @@ void smf_n10_task(void *args_p) {
std::shared_ptr<itti_msg> shared_msg = itti_inst->receive_msg(task_id);
auto *msg = shared_msg.get();
switch (msg->msg_type) {
case N10_SESSION_GET_SESSION_MANAGEMENT_SUBSCRIPTION:
//if (itti_n10_get_session_management_subscription* m = dynamic_cast<itti_n10_get_session_management_subscription*>(msg)) {
// if (itti_n10_get_session_management_subscription* m =
// dynamic_cast<itti_n10_get_session_management_subscription*>(msg)) {
// smf_n10_inst->send_sm_data_get_msg(ref(*m));
//}
break;
case TERMINATE:
if (itti_msg_terminate *terminate =
dynamic_cast<itti_msg_terminate*>(msg)) {
dynamic_cast<itti_msg_terminate *>(msg)) {
Logger::smf_n10().info("Received terminate message");
return;
}
......@@ -103,10 +103,11 @@ smf_n10::smf_n10() {
bool smf_n10::get_sm_data(
const supi64_t &supi, const std::string &dnn, const snssai_t &snssai,
std::shared_ptr<session_management_subscription> subscription) {
//retrieve a UE's Session Management Subscription Data (TS29503_Nudm_SDM.yaml: /{supi}/sm-data)
//use curl to send data for the moment
// retrieve a UE's Session Management Subscription Data
// (TS29503_Nudm_SDM.yaml: /{supi}/sm-data) use curl to send data for the
// moment
nlohmann::json jsonData = { };
nlohmann::json jsonData = {};
curl_global_init(CURL_GLOBAL_DEFAULT);
struct curl_slist *headers = nullptr;
headers = curl_slist_append(headers, "Accept: application/json");
......@@ -114,15 +115,15 @@ bool smf_n10::get_sm_data(
headers = curl_slist_append(headers, "charsets: utf-8");
CURL *curl = curl_easy_init();
std::string url = std::string(
inet_ntoa(*((struct in_addr*) &smf_cfg.udm_addr.ipv4_addr))) + ":"
+ std::to_string(smf_cfg.udm_addr.port)
+ NUDM_SDM_BASE + smf_cfg.udm_addr.api_version
+ fmt::format(NUDM_SDM_GET_SM_DATA_URL, std::to_string(supi));
std::string url =
std::string(inet_ntoa(*((struct in_addr *)&smf_cfg.udm_addr.ipv4_addr))) +
":" + std::to_string(smf_cfg.udm_addr.port) + NUDM_SDM_BASE +
smf_cfg.udm_addr.api_version +
fmt::format(NUDM_SDM_GET_SM_DATA_URL, std::to_string(supi));
Logger::smf_n10().debug("UDM's URL: %s ", url.c_str());
if (curl) {
CURLcode res = { };
CURLcode res = {};
curl_easy_setopt(curl, CURLOPT_HTTPHEADER, headers);
curl_easy_setopt(curl, CURLOPT_URL, url.c_str());
......@@ -131,26 +132,26 @@ bool smf_n10::get_sm_data(
curl_easy_setopt(curl, CURLOPT_INTERFACE, smf_cfg.sbi.if_name.c_str());
// Response information.
long httpCode = { 0 };
long httpCode = {0};
std::unique_ptr<std::string> httpData(new std::string());
// Hook up data handling function.
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, &callback);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, httpData.get());
//curl_easy_setopt(curl, CURLOPT_WRITEDATA, httpData);
// curl_easy_setopt(curl, CURLOPT_WRITEDATA, httpData);
int numRetries = 0;
while (numRetries < UDM_NUMBER_RETRIES) {
res = curl_easy_perform(curl);
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &httpCode);
Logger::smf_n10().debug("Response from UDM, HTTP Code: %d ", httpCode);
if (static_cast<http_response_codes_e>(httpCode)
== http_response_codes_e::HTTP_RESPONSE_CODE_OK) {
if (static_cast<http_response_codes_e>(httpCode) ==
http_response_codes_e::HTTP_RESPONSE_CODE_OK) {
Logger::smf_n10().debug("Got successful response from UDM, URL: %s ",
url.c_str());
try {
jsonData = nlohmann::json::parse(*httpData.get());
//curl_easy_cleanup(curl);
// curl_easy_cleanup(curl);
break;
} catch (json::exception &e) {
Logger::smf_n10().warn("Could not parse json data from UDM");
......@@ -159,25 +160,25 @@ bool smf_n10::get_sm_data(
} else {
Logger::smf_n10().warn(
"Could not get response from UDM, URL %s, retry ...", url.c_str());
//retry
// retry
numRetries++;
}
}
curl_easy_cleanup(curl);
}
//process the response
// process the response
if (!jsonData.empty()) {
Logger::smf_n10().debug("Response from UDM %s", jsonData.dump().c_str());
//retrieve SessionManagementSubscription and store in the context
// retrieve SessionManagementSubscription and store in the context
for (nlohmann::json::iterator it = jsonData["dnnConfigurations"].begin();
it != jsonData["dnnConfigurations"].end(); ++it) {
Logger::smf_n10().debug("DNN %s", it.key().c_str());
try {
std::shared_ptr<dnn_configuration_t> dnn_configuration =
std::make_shared<dnn_configuration_t>();
//PDU Session Type
// PDU Session Type
pdu_session_type_t pdu_session_type(
pdu_session_type_e::PDU_SESSION_TYPE_E_IPV4);
std::string default_session_type =
......@@ -197,23 +198,23 @@ bool smf_n10::get_sm_data(
dnn_configuration->pdu_session_types.default_session_type =
pdu_session_type;
//Ssc_Mode
// Ssc_Mode
ssc_mode_t ssc_mode(ssc_mode_e::SSC_MODE_1);
std::string default_ssc_mode = it.value()["sscModes"]["defaultSscMode"];
Logger::smf_n10().debug("Default SSC Mode %s",
default_ssc_mode.c_str());
if (default_ssc_mode.compare("SSC_MODE_1") == 0) {
dnn_configuration->ssc_modes.default_ssc_mode = ssc_mode_t(
ssc_mode_e::SSC_MODE_1);
dnn_configuration->ssc_modes.default_ssc_mode =
ssc_mode_t(ssc_mode_e::SSC_MODE_1);
} else if (default_ssc_mode.compare("SSC_MODE_2") == 0) {
dnn_configuration->ssc_modes.default_ssc_mode = ssc_mode_t(
ssc_mode_e::SSC_MODE_2);
dnn_configuration->ssc_modes.default_ssc_mode =
ssc_mode_t(ssc_mode_e::SSC_MODE_2);
} else if (default_ssc_mode.compare("SSC_MODE_3") == 0) {
dnn_configuration->ssc_modes.default_ssc_mode = ssc_mode_t(
ssc_mode_e::SSC_MODE_3);
dnn_configuration->ssc_modes.default_ssc_mode =
ssc_mode_t(ssc_mode_e::SSC_MODE_3);
}
//5gQosProfile
// 5gQosProfile
dnn_configuration->_5g_qos_profile._5qi =
it.value()["5gQosProfile"]["5qi"];
dnn_configuration->_5g_qos_profile.arp.priority_level =
......@@ -222,9 +223,10 @@ bool smf_n10::get_sm_data(
it.value()["5gQosProfile"]["arp"]["preemptCap"];
dnn_configuration->_5g_qos_profile.arp.preempt_vuln =
it.value()["5gQosProfile"]["arp"]["preemptVuln"];
dnn_configuration->_5g_qos_profile.priority_level = 1; //TODO: hardcoded
dnn_configuration->_5g_qos_profile.priority_level =
1; // TODO: hardcoded
//session_ambr
// session_ambr
dnn_configuration->session_ambr.uplink =
it.value()["sessionAmbr"]["uplink"];
dnn_configuration->session_ambr.downlink =
......@@ -245,11 +247,9 @@ bool smf_n10::get_sm_data(
} else {
return false;
}
}
//------------------------------------------------------------------------------
void smf_n10::subscribe_sm_data() {
//TODO:
// TODO:
}
......@@ -3,9 +3,9 @@
* 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
* 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
*
......@@ -29,11 +29,11 @@
#ifndef FILE_SMF_N10_HPP_SEEN
#define FILE_SMF_N10_HPP_SEEN
#include <thread>
#include <map>
#include <thread>
#include "smf.h"
#include "3gpp_29.503.h"
#include "smf.h"
#include "smf_context.hpp"
namespace smf {
......@@ -45,8 +45,8 @@ class smf_n10 {
public:
smf_n10();
smf_n10(smf_n10 const&) = delete;
void operator=(smf_n10 const&) = delete;
smf_n10(smf_n10 const &) = delete;
void operator=(smf_n10 const &) = delete;
/*
* Get SM subscription data from UDM
......@@ -68,8 +68,7 @@ class smf_n10 {
*
*/
void subscribe_sm_data();
};
}
} // namespace smf
#endif /* FILE_SMF_N10_HPP_SEEN */
This diff is collapsed.
......@@ -3,9 +3,9 @@
* 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
* 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
*
......@@ -29,16 +29,16 @@
#ifndef FILE_SMF_N11_HPP_SEEN
#define FILE_SMF_N11_HPP_SEEN
#include <thread>
#include <map>
#include <thread>
#include "smf.h"
#include <curl/curl.h>
#include "3gpp_29.503.h"
#include "smf_context.hpp"
#include "SmContextCreatedData.h"
#include "SmContextUpdatedData.h"
#include "SmContextUpdateError.h"
#include "SmContextUpdatedData.h"
#include "smf.h"
#include "smf_context.hpp"
namespace smf {
......@@ -49,12 +49,13 @@ class smf_n11 {
public:
smf_n11();
smf_n11(smf_n11 const&) = delete;
void operator=(smf_n11 const&) = delete;
smf_n11(smf_n11 const &) = delete;
void operator=(smf_n11 const &) = delete;
/*
* Send N1N2 Message Transfer Request to AMF
* @param [std::shared_ptr<itti_n11_create_sm_context_response>] sm_context_res: Content of message to be sent
* @param [std::shared_ptr<itti_n11_create_sm_context_response>]
* sm_context_res: Content of message to be sent
* @return void
*/
void send_n1n2_message_transfer_request(
......@@ -62,15 +63,18 @@ class smf_n11 {
/*
* Send N1N2 Message Transfer Request to AMF
* @param [std::shared_ptr<itti_nx_trigger_pdu_session_modification>] sm_session_modification: Content of message to be sent
* @param [std::shared_ptr<itti_nx_trigger_pdu_session_modification>]
* sm_session_modification: Content of message to be sent
* @return void
*/
void send_n1n2_message_transfer_request(
std::shared_ptr<itti_nx_trigger_pdu_session_modification> sm_session_modification);
std::shared_ptr<itti_nx_trigger_pdu_session_modification>
sm_session_modification);
/*
* Send N1N2 Message Transfer Request to AMF
* @param [std::shared_ptr<itti_n11_session_report_request>] n11_msg: Content of message to be sent
* @param [std::shared_ptr<itti_n11_session_report_request>] n11_msg: Content
* of message to be sent
* @return void
*/
void send_n1n2_message_transfer_request(
......@@ -78,7 +82,8 @@ class smf_n11 {
/*
* Send SM Context Status Notification to AMF
* @param [std::shared_ptr<itti_n11_notify_sm_context_status>] sm_context_status: Content of message to be sent
* @param [std::shared_ptr<itti_n11_notify_sm_context_status>]
* sm_context_status: Content of message to be sent
* @return void
*/
void send_sm_context_status_notification(
......@@ -86,7 +91,8 @@ class smf_n11 {
/*
* Send Notification for the associated event to the subscribers
* @param [std::shared_ptr<itti_n11_notify_subscribed_event>] msg: Content of message to be sent
* @param [std::shared_ptr<itti_n11_notify_subscribed_event>] msg: Content of
* message to be sent
* @return void
*/
void notify_subscribed_event(
......@@ -98,8 +104,7 @@ class smf_n11 {
* @param [std::string *] data: data
* @return pointer to the created curl
*/
CURL * curl_create_handle (event_notification &ev_notif, std::string *data);
CURL *curl_create_handle(event_notification &ev_notif, std::string *data);
};
}
} // namespace smf
#endif /* FILE_SMF_N11_HPP_SEEN */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -3,9 +3,9 @@
* 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
* 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
*
......@@ -46,92 +46,42 @@ class smf_n4 : public pfcp::pfcp_l4_stack {
std::thread::id thread_id;
std::thread thread;
uint64_t recovery_time_stamp; //timestamp in seconds
uint64_t recovery_time_stamp; // timestamp in seconds
pfcp::cp_function_features_t cp_function_features;
public:
smf_n4();
smf_n4(smf_n4 const&) = delete;
void operator=(smf_n4 const&) = delete;
void handle_itti_msg(itti_n4_heartbeat_request &s) {
}
;
void handle_itti_msg(itti_n4_heartbeat_response &s) {
}
;
void handle_itti_msg(itti_n4_association_setup_request &s) {
}
;
void handle_itti_msg(itti_n4_association_setup_response &s) {
}
;
void handle_itti_msg(itti_n4_association_update_request &s) {
}
;
void handle_itti_msg(itti_n4_association_update_response &s) {
}
;
void handle_itti_msg(itti_n4_association_release_request &s) {
}
;
void handle_itti_msg(itti_n4_association_release_response &s) {
}
;
void handle_itti_msg(itti_n4_version_not_supported_response &s) {
}
;
void handle_itti_msg(itti_n4_node_report_response &s) {
}
;
void handle_itti_msg(itti_n4_session_set_deletion_request &s) {
}
;
void handle_itti_msg(itti_n4_session_establishment_request &s) {
}
;
void handle_itti_msg(itti_n4_session_modification_request &s) {
}
;
void handle_itti_msg(itti_n4_session_deletion_request &s) {
}
;
void handle_itti_msg(itti_n4_session_report_response &s) {
}
;
void send_n4_msg(itti_n4_heartbeat_request &s) {
}
;
void send_n4_msg(itti_n4_heartbeat_response &s) {
}
;
void send_n4_msg(itti_n4_association_setup_request &s) {
}
;
smf_n4(smf_n4 const &) = delete;
void operator=(smf_n4 const &) = delete;
void handle_itti_msg(itti_n4_heartbeat_request &s){};
void handle_itti_msg(itti_n4_heartbeat_response &s){};
void handle_itti_msg(itti_n4_association_setup_request &s){};
void handle_itti_msg(itti_n4_association_setup_response &s){};
void handle_itti_msg(itti_n4_association_update_request &s){};
void handle_itti_msg(itti_n4_association_update_response &s){};
void handle_itti_msg(itti_n4_association_release_request &s){};
void handle_itti_msg(itti_n4_association_release_response &s){};
void handle_itti_msg(itti_n4_version_not_supported_response &s){};
void handle_itti_msg(itti_n4_node_report_response &s){};
void handle_itti_msg(itti_n4_session_set_deletion_request &s){};
void handle_itti_msg(itti_n4_session_establishment_request &s){};
void handle_itti_msg(itti_n4_session_modification_request &s){};
void handle_itti_msg(itti_n4_session_deletion_request &s){};
void handle_itti_msg(itti_n4_session_report_response &s){};
void send_n4_msg(itti_n4_heartbeat_request &s){};
void send_n4_msg(itti_n4_heartbeat_response &s){};
void send_n4_msg(itti_n4_association_setup_request &s){};
void send_n4_msg(itti_n4_association_setup_response &s);
void send_n4_msg(itti_n4_association_update_request &s) {
}
;
void send_n4_msg(itti_n4_association_update_response &s) {
}
;
void send_n4_msg(itti_n4_association_release_request &s) {
}
;
void send_n4_msg(itti_n4_association_release_response &s) {
}
;
void send_n4_msg(itti_n4_version_not_supported_response &s) {
}
;
void send_n4_msg(itti_n4_node_report_request &s) {
}
;
void send_n4_msg(itti_n4_session_set_deletion_response &s) {
}
;
void send_n4_msg(itti_n4_association_update_request &s){};
void send_n4_msg(itti_n4_association_update_response &s){};
void send_n4_msg(itti_n4_association_release_request &s){};
void send_n4_msg(itti_n4_association_release_response &s){};
void send_n4_msg(itti_n4_version_not_supported_response &s){};
void send_n4_msg(itti_n4_node_report_request &s){};
void send_n4_msg(itti_n4_session_set_deletion_response &s){};
void send_n4_msg(itti_n4_session_establishment_request &s);
void send_n4_msg(itti_n4_session_modification_request &s);
void send_n4_msg(itti_n4_session_deletion_request &s);
......
This diff is collapsed.
This diff is collapsed.
......@@ -3,9 +3,9 @@
* 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
* 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
*
......@@ -40,13 +40,13 @@
*/
typedef struct protocol_configuration_options_ids_s {
// Protocol identifiers (from configuration protocol options list)
uint8_t pi_ipcp :1;
uint8_t pi_ipcp : 1;
// Container identifiers (from additional parameters list)
uint8_t ci_dns_server_ipv4_address_request :1;
uint8_t ci_ip_address_allocation_via_nas_signalling :1;
uint8_t ci_ipv4_address_allocation_via_dhcpv4 :1;
uint8_t ci_ipv4_link_mtu_request :1;
uint8_t ci_dns_server_ipv4_address_request : 1;
uint8_t ci_ip_address_allocation_via_nas_signalling : 1;
uint8_t ci_ipv4_address_allocation_via_dhcpv4 : 1;
uint8_t ci_ipv4_link_mtu_request : 1;
} protocol_configuration_options_ids_t;
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -3,9 +3,9 @@
* 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
* 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
*
......@@ -28,8 +28,8 @@
*/
#include "smf_subscription.hpp"
#include "smf_app.hpp"
#include "itti.hpp"
#include "smf_app.hpp"
#include "common_defs.h"
#include "itti_msg_sbi.hpp"
......@@ -38,5 +38,3 @@ using namespace smf;
extern smf::smf_app *smf_app_inst;
extern itti_mw *itti_inst;
This diff is collapsed.
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