Commit 1c22f054 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen
Browse files

Code cleanup

parent 46b7bb77
......@@ -516,7 +516,7 @@ void xgpp_conv::sm_context_request_from_nas(
}
//------------------------------------------------------------------------------
void xgpp_conv::create_sm_context_response_from_ct_request(
void xgpp_conv::create_sm_context_response_from_ctx_request(
const std::shared_ptr<itti_n11_create_sm_context_request>& ctx_request,
std::shared_ptr<itti_n11_create_sm_context_response>& ctx_response) {
ctx_response->http_version = ctx_request->http_version;
......@@ -535,7 +535,7 @@ void xgpp_conv::create_sm_context_response_from_ct_request(
}
//------------------------------------------------------------------------------
void xgpp_conv::update_sm_context_response_from_ct_request(
void xgpp_conv::update_sm_context_response_from_ctx_request(
const std::shared_ptr<itti_n11_update_sm_context_request>& ct_request,
std::shared_ptr<itti_n11_update_sm_context_response>& ct_response) {
ct_response->res.set_http_code(
......
......@@ -161,11 +161,11 @@ void smf_event_exposure_notification_from_openapi(
void sm_context_request_from_nas(
const nas_message_t& nm, smf::pdu_session_create_sm_context_request& pcr);
void create_sm_context_response_from_ct_request(
void create_sm_context_response_from_ctx_request(
const std::shared_ptr<itti_n11_create_sm_context_request>& ct_request,
std::shared_ptr<itti_n11_create_sm_context_response>& ct_response);
void update_sm_context_response_from_ct_request(
void update_sm_context_response_from_ctx_request(
const std::shared_ptr<itti_n11_update_sm_context_request>& ct_request,
std::shared_ptr<itti_n11_update_sm_context_response>& ct_response);
......
......@@ -694,8 +694,7 @@ void smf_app::handle_pdu_session_create_sm_context_request(
"Handle a PDU Session Create SM Context Request from an AMF (HTTP "
"version %d)",
smreq->http_version);
// handle PDU Session Create SM Context Request as specified in section 4.3.2
// 3GPP TS 23.502
// Handle PDU Session Create SM Context Request (Section 4.3.2@3GPP TS 23.502)
std::string n1_sm_message, n1_sm_message_hex;
nas_message_t decoded_nas_msg = {};
cause_value_5gsm_e cause_n1 = {cause_value_5gsm_e::CAUSE_0_UNKNOWN};
......@@ -714,13 +713,13 @@ void smf_app::handle_pdu_session_create_sm_context_request(
smreq->req, n1_sm_message,
cause_value_5gsm_e::CAUSE_95_SEMANTICALLY_INCORRECT_MESSAGE)) {
conv::convert_string_2_hex(n1_sm_message, n1_sm_message_hex);
// trigger to send reply to AMF
// Trigger the reply to AMF
trigger_create_context_error_response(
http_status_code_e::HTTP_STATUS_CODE_403_FORBIDDEN,
PDU_SESSION_APPLICATION_ERROR_N1_SM_ERROR, n1_sm_message_hex,
smreq->pid);
} else {
// trigger to send reply to AMF
// Trigger the reply to AMF
trigger_http_response(
http_status_code_e::HTTP_STATUS_CODE_500_INTERNAL_SERVER_ERROR,
smreq->pid, N11_SESSION_CREATE_SM_CONTEXT_RESPONSE);
......@@ -747,7 +746,7 @@ void smf_app::handle_pdu_session_create_sm_context_request(
if (smf_n1::get_instance().create_n1_pdu_session_establishment_reject(
smreq->req, n1_sm_message, cause_n1)) {
conv::convert_string_2_hex(n1_sm_message, n1_sm_message_hex);
// trigger to send reply to AMF
// Trigger the reply to AMF
trigger_create_context_error_response(
http_status_code_e::HTTP_STATUS_CODE_403_FORBIDDEN,
PDU_SESSION_APPLICATION_ERROR_PDUTYPE_DENIED, n1_sm_message_hex,
......@@ -787,7 +786,7 @@ void smf_app::handle_pdu_session_create_sm_context_request(
smreq->req, n1_sm_message,
cause_value_5gsm_e::CAUSE_81_INVALID_PTI_VALUE)) {
conv::convert_string_2_hex(n1_sm_message, n1_sm_message_hex);
// trigger to send reply to AMF
// Trigger the reply to AMF
trigger_create_context_error_response(
http_status_code_e::HTTP_STATUS_CODE_403_FORBIDDEN,
PDU_SESSION_APPLICATION_ERROR_N1_SM_ERROR, n1_sm_message_hex,
......@@ -800,7 +799,7 @@ void smf_app::handle_pdu_session_create_sm_context_request(
return;
}
// Check pdu session id
// Check PDU Session ID
pdu_session_id_t pdu_session_id =
decoded_nas_msg.plain.sm.header.pdu_session_identity;
if ((pdu_session_id == PDU_SESSION_IDENTITY_UNASSIGNED) ||
......@@ -814,7 +813,7 @@ void smf_app::handle_pdu_session_create_sm_context_request(
return;
}
// Check message type
// Check Message Type
uint8_t message_type = decoded_nas_msg.plain.sm.header.message_type;
if (message_type != PDU_SESSION_ESTABLISHMENT_REQUEST) {
Logger::smf_app().warn(
......@@ -828,7 +827,7 @@ void smf_app::handle_pdu_session_create_sm_context_request(
cause_value_5gsm_e::
CAUSE_98_MESSAGE_TYPE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE)) {
conv::convert_string_2_hex(n1_sm_message, n1_sm_message_hex);
// trigger to send reply to AMF
// Trigger the reply to AMF
trigger_create_context_error_response(
http_status_code_e::HTTP_STATUS_CODE_403_FORBIDDEN,
PDU_SESSION_APPLICATION_ERROR_N1_SM_ERROR, n1_sm_message_hex,
......@@ -841,7 +840,7 @@ void smf_app::handle_pdu_session_create_sm_context_request(
return;
}
// Check request type
// Check Request Type
std::string request_type = smreq->req.get_request_type();
if (request_type.compare("INITIAL_REQUEST") != 0) {
Logger::smf_app().warn(
......@@ -852,7 +851,6 @@ void smf_app::handle_pdu_session_create_sm_context_request(
return;
}
// TODO:
// If no DNN information from UE, set to default value
std::string dnn = smreq->req.get_dnn();
if (dnn.length() == 0) {
......@@ -866,7 +864,7 @@ void smf_app::handle_pdu_session_create_sm_context_request(
std::string nd_dnn;
util::dotted_to_string(dnn, nd_dnn);
dnn = nd_dnn;
// update DNN
// Update DNN
smreq->req.set_dnn(dnn);
if (not smf_cfg.is_dotted_dnn_handled(dnn, pdu_session_type)) {
// Not a valid request...
......@@ -879,7 +877,7 @@ void smf_app::handle_pdu_session_create_sm_context_request(
smreq->req, n1_sm_message,
cause_value_5gsm_e::CAUSE_27_MISSING_OR_UNKNOWN_DNN)) {
conv::convert_string_2_hex(n1_sm_message, n1_sm_message_hex);
// trigger to send reply to AMF
// Trigger the reply to AMF
trigger_create_context_error_response(
http_status_code_e::HTTP_STATUS_CODE_403_FORBIDDEN,
PDU_SESSION_APPLICATION_ERROR_DNN_DENIED, n1_sm_message_hex,
......@@ -892,7 +890,7 @@ void smf_app::handle_pdu_session_create_sm_context_request(
return;
}
// Step 4. create a context for this supi if not existed, otherwise update
// Step 4. Create a context for this supi if not existed, otherwise update
std::shared_ptr<smf_context> sc = {};
if (is_supi_2_smf_context(supi64)) {
Logger::smf_app().debug(
......@@ -913,7 +911,7 @@ void smf_app::handle_pdu_session_create_sm_context_request(
if (!sc.get()->find_dnn_context(snssai, dnn, sd)) {
if (nullptr == sd.get()) {
// create a new one and insert to the list
// Create a new one and insert to the list
Logger::smf_app().debug(
"Create a DNN context and add to the SMF context");
sd = std::shared_ptr<dnn_context>(new dnn_context(dnn));
......@@ -924,13 +922,13 @@ void smf_app::handle_pdu_session_create_sm_context_request(
}
}
// Step 6. if colliding with an existing SM context (session is already
// existed and request type is INITIAL_REQUEST) Delete the local context
// Step 6. If colliding with an existing SM context (session is already
// existed and request type is INITIAL_REQUEST). Delete the local context
// (including and any associated resources in the UPF and PCF) and create a
// new one
if (is_scid_2_smf_context(supi64, dnn, snssai, pdu_session_id) &&
(request_type.compare("INITIAL_REQUEST") == 0)) {
// remove smf_pdu_session (including all flows associated to this session)
// Remove smf_pdu_session (including all flows associated to this session)
sd.get()->remove_pdu_session(pdu_session_id);
Logger::smf_app().warn(
"PDU Session already existed (SUPI " SUPI_64_FMT
......@@ -938,10 +936,10 @@ void smf_app::handle_pdu_session_create_sm_context_request(
supi64, dnn.c_str(), snssai.sST, snssai.sD.c_str(), pdu_session_id);
}
// Step 7. retrieve Session Management Subscription data from UDM if not
// Step 7. Retrieve Session Management Subscription data from UDM if not
// available (step 4, section 4.3.2 3GPP TS 23.502)
std::string dnn_selection_mode = smreq->req.get_dnn_selection_mode();
// if the Session Management Subscription data is not available, get from
// If the Session Management Subscription data is not available, get from
// configuration file or UDM
if (not sc.get()->is_dnn_snssai_subscription_data(dnn, snssai)) {
Logger::smf_app().debug(
......@@ -956,14 +954,14 @@ void smf_app::handle_pdu_session_create_sm_context_request(
Logger::smf_app().debug(
"Retrieve Session Management Subscription data from the UDM");
if (smf_sbi_inst->get_sm_data(supi64, dnn, snssai, subscription)) {
// update dnn_context with subscription info
// Update dnn_context with subscription info
sc.get()->insert_dnn_subscription(snssai, dnn, subscription);
} else {
// Cannot retrieve information from UDM, reject PDU session
// establishment
Logger::smf_app().warn(
"Received a PDU Session Create SM Context Request, couldn't "
"retrieve the Session Management Subscription from UDM, ignore "
"retrieve the Session Management Subscription from UDM, ignore the "
"message!");
// PDU Session Establishment Reject
if (smf_n1::get_instance().create_n1_pdu_session_establishment_reject(
......@@ -971,7 +969,7 @@ void smf_app::handle_pdu_session_create_sm_context_request(
cause_value_5gsm_e::
CAUSE_29_USER_AUTHENTICATION_OR_AUTHORIZATION_FAILED)) {
conv::convert_string_2_hex(n1_sm_message, n1_sm_message_hex);
// trigger to send reply to AMF
// Trigger reply to AMF
trigger_create_context_error_response(
http_status_code_e::HTTP_STATUS_CODE_403_FORBIDDEN,
PDU_SESSION_APPLICATION_ERROR_SUBSCRIPTION_DENIED,
......@@ -985,7 +983,7 @@ void smf_app::handle_pdu_session_create_sm_context_request(
return;
}
} else {
// use local configuration
// Use local configuration
Logger::smf_app().debug(
"Retrieve Session Management Subscription data from local "
"configuration");
......@@ -997,10 +995,10 @@ void smf_app::handle_pdu_session_create_sm_context_request(
}
}
// store PLMN
// Store PLMN
sc.get()->set_plmn(smreq->req.get_plmn());
// Step 8. generate a SMF context Id and store the corresponding information
// Step 8. Generate a SMF context Id and store the corresponding information
// in a map (SM_Context_ID, (supi, dnn, nssai, pdu_session_id))
scid_t scid = generate_smf_context_ref();
std::shared_ptr<smf_context_ref> scf =
......@@ -1011,7 +1009,7 @@ void smf_app::handle_pdu_session_create_sm_context_request(
scf.get()->pdu_session_id = pdu_session_id;
set_scid_2_smf_context(scid, scf);
smreq->set_scid(scid);
// store scid in the context itself
// Store scid in the context itself
sc.get()->set_scid(scid);
Logger::smf_app().debug("Generated a SMF Context ID " SCID_FMT " ", scid);
......@@ -1022,14 +1020,13 @@ void smf_app::handle_pdu_session_create_sm_context_request(
//------------------------------------------------------------------------------
void smf_app::handle_pdu_session_update_sm_context_request(
std::shared_ptr<itti_n11_update_sm_context_request> smreq) {
// handle PDU Session Update SM Context Request as specified in section 4.3.2
// 3GPP TS 23.502
// Handle PDU Session Update SM Context Request (section 4.3.2@3GPP TS 23.502)
Logger::smf_app().info(
"Handle a PDU Session Update SM Context Request from an AMF (HTTP "
"version %d)",
smreq->http_version);
// Step 1. get supi, dnn, nssai, pdu_session id from sm_context
// Step 1. Get supi, dnn, nssai, pdu_session id from sm_context
// SM Context ID - uint32_t in our case
scid_t scid = {};
try {
......@@ -1038,7 +1035,7 @@ void smf_app::handle_pdu_session_update_sm_context_request(
Logger::smf_app().warn(
"Received a PDU Session Update SM Context Request, couldn't retrieve "
"the corresponding SMF context, ignore message!");
// trigger to send reply to AMF
// Trigger to send reply to AMF
trigger_update_context_error_response(
http_status_code_e::HTTP_STATUS_CODE_404_NOT_FOUND,
PDU_SESSION_APPLICATION_ERROR_CONTEXT_NOT_FOUND, smreq->pid);
......@@ -1053,14 +1050,14 @@ void smf_app::handle_pdu_session_update_sm_context_request(
} else {
Logger::smf_app().warn(
"SM Context associated with this id " SCID_FMT " does not exit!", scid);
// trigger to send reply to AMF
// Trigger to send reply to AMF
trigger_update_context_error_response(
http_status_code_e::HTTP_STATUS_CODE_404_NOT_FOUND,
PDU_SESSION_APPLICATION_ERROR_CONTEXT_NOT_FOUND, smreq->pid);
return;
}
// Step 2. store supi, dnn, nssai in itti_n11_update_sm_context_request to be
// Step 2. Store supi, dnn, nssai in itti_n11_update_sm_context_request to be
// processed later on
supi64_t supi64 = smf_supi_to_u64(scf.get()->supi);
smreq->req.set_supi(scf.get()->supi);
......@@ -1068,19 +1065,19 @@ void smf_app::handle_pdu_session_update_sm_context_request(
smreq->req.set_snssai(scf.get()->nssai);
smreq->req.set_pdu_session_id(scf.get()->pdu_session_id);
// Step 2. find the smf context
// Step 3. Find the smf context
std::shared_ptr<smf_context> sc = {};
if (is_supi_2_smf_context(supi64)) {
sc = supi_2_smf_context(supi64);
Logger::smf_app().debug(
"Retrieve SMF context with SUPI " SUPI_64_FMT "", supi64);
} else {
// send PDUSession_SMUpdateContext Response to AMF
// Send PDUSession_SMUpdateContext Response to AMF
Logger::smf_app().warn(
"Received PDU Session Update SM Context Request with Supi " SUPI_64_FMT
"couldn't retrieve the corresponding SMF context, ignore message!",
supi64);
// trigger to send reply to AMF
// Trigger to send reply to AMF
trigger_update_context_error_response(
http_status_code_e::HTTP_STATUS_CODE_404_NOT_FOUND,
PDU_SESSION_APPLICATION_ERROR_CONTEXT_NOT_FOUND, smreq->pid);
......@@ -1088,7 +1085,7 @@ void smf_app::handle_pdu_session_update_sm_context_request(
return;
}
// get dnn context
// Get dnn context
std::shared_ptr<dnn_context> sd = {};
if (!sc.get()->find_dnn_context(scf.get()->nssai, scf.get()->dnn, sd)) {
......@@ -1096,7 +1093,7 @@ void smf_app::handle_pdu_session_update_sm_context_request(
Logger::smf_app().warn(
"Received PDU Session Update SM Context Request, couldn't retrieve "
"the corresponding SMF context, ignore message!");
// trigger to send reply to AMF
// Trigger to send reply to AMF
trigger_update_context_error_response(
http_status_code_e::HTTP_STATUS_CODE_404_NOT_FOUND,
PDU_SESSION_APPLICATION_ERROR_CONTEXT_NOT_FOUND, smreq->pid);
......@@ -1104,9 +1101,9 @@ void smf_app::handle_pdu_session_update_sm_context_request(
}
}
// Step 3. Verify AMF??
// Step 4. Verify AMF??
// Step 4. handle the message in smf_context
// Step 5. handle the message in smf_context
sc.get()->handle_pdu_session_update_sm_context_request(smreq);
}
//------------------------------------------------------------------------------
......@@ -1784,10 +1781,8 @@ void smf_app::trigger_http_response(
case N11_SESSION_RELEASE_SM_CONTEXT_RESPONSE: {
pdu_session_release_sm_context_response sm_context_response = {};
sm_context_response.set_http_code(http_code);
trigger_session_release_sm_context_response(
sm_context_response, promise_id);
} break;
case N11_SESSION_CREATE_SM_CONTEXT_RESPONSE: {
......@@ -1795,7 +1790,6 @@ void smf_app::trigger_http_response(
sm_context_response.set_http_code(http_code);
trigger_session_create_sm_context_response(
sm_context_response, promise_id);
} break;
case N11_SESSION_UPDATE_SM_CONTEXT_RESPONSE: {
......@@ -1803,7 +1797,6 @@ void smf_app::trigger_http_response(
sm_context_response.set_http_code(http_code);
trigger_session_update_sm_context_response(
sm_context_response, promise_id);
} break;
default: {
......@@ -2047,7 +2040,7 @@ void smf_app::trigger_upf_status_notification_subscribe() {
json_data["reqNotifEvents"] = nlohmann::json::array();
json_data["reqNotifEvents"].push_back("NF_REGISTERED");
json_data["reqNotifEvents"].push_back("NF_DEREGISTERED");
json_data["validityTime"] = "20210531T235959";
json_data["validityTime"] = "20390531T235959";
std::string url =
std::string(inet_ntoa(*((struct in_addr*) &smf_cfg.nrf_addr.ipv4_addr))) +
......
......@@ -43,9 +43,6 @@
#include "itti_msg_n11.hpp"
#include "itti_msg_n4.hpp"
#include "itti_msg_sbi.hpp"
#include "pistache/endpoint.h"
#include "pistache/http.h"
#include "pistache/router.h"
#include "smf.h"
#include "smf_context.hpp"
#include "smf_msg.hpp"
......@@ -732,7 +729,6 @@ class smf_app {
* @param [const uint32_t &] http_code: Status code of HTTP response
* @param [const uint8_t &] cause: Error cause
* @param [uint32_t &] promise_id: Promise Id
* @param [uint8_t] msg_type: Type of HTTP message (Update/Release)
* @return void
*/
void trigger_update_context_error_response(
......@@ -745,7 +741,6 @@ class smf_app {
* @param [const uint8_t &] cause: cause
* @param [const std::string &] n1_sm_msg: N1 SM message
* @param [uint32_t &] promise_id: Promise Id
* @param [uint8_t] msg_type: Type of HTTP message (Update/Release)
* @return void
*/
void trigger_update_context_error_response(
......@@ -763,12 +758,38 @@ class smf_app {
void trigger_http_response(
const uint32_t& http_code, uint32_t& promise_id, uint8_t msg_type);
/*
* To trigger the session create sm context response by set the value of the
* corresponding promise to ready
* @param [pdu_session_create_sm_context_response&] sm_context_response:
* response message
* @param [uint32_t &] promise_id: Promise Id
* @return void
*/
void trigger_session_create_sm_context_response(
pdu_session_create_sm_context_response& sm_context_response,
uint32_t& pid);
/*
* To trigger the session update sm context response by set the value of the
* corresponding promise to ready
* @param [pdu_session_update_sm_context_response&] sm_context_response:
* response message
* @param [uint32_t &] promise_id: Promise Id
* @return void
*/
void trigger_session_update_sm_context_response(
pdu_session_update_sm_context_response& sm_context_response,
uint32_t& pid);
/*
* To trigger the session release sm context response by set the value of the
* corresponding promise to ready
* @param [pdu_session_release_sm_context_response&] sm_context_response:
* response message
* @param [uint32_t &] promise_id: Promise Id
* @return void
*/
void trigger_session_release_sm_context_response(
pdu_session_release_sm_context_response& sm_context_response,
uint32_t& pid);
......
......@@ -1223,13 +1223,13 @@ void smf_context::handle_pdu_session_create_sm_context_request(
std::string n1_sm_message, n1_sm_msg_hex;
bool request_accepted = true;
// Step 1. get necessary information
// Step 1. Get necessary information
std::string dnn = smreq->req.get_dnn();
snssai_t snssai = smreq->req.get_snssai();
supi64_t supi64 = smf_supi_to_u64(smreq->req.get_supi());
uint32_t pdu_session_id = smreq->req.get_pdu_session_id();
// Step 2. check the validity of the UE request, if valid send PDU Session
// Step 2. Check the validity of the UE request, if valid send PDU Session
// Accept, otherwise send PDU Session Reject to AMF
if (!verify_sm_context_request(smreq)) {
Logger::smf_app().warn(
......@@ -1256,7 +1256,7 @@ void smf_context::handle_pdu_session_create_sm_context_request(
return;
}
// store HttpResponse and session-related information to be used when
// Store HttpResponse and session-related information to be used when
// receiving the response from UPF
itti_n11_create_sm_context_response* sm_context_resp =
new itti_n11_create_sm_context_response(
......@@ -1265,14 +1265,14 @@ void smf_context::handle_pdu_session_create_sm_context_request(
std::shared_ptr<itti_n11_create_sm_context_response>(sm_context_resp);
// Assign necessary information for the response
xgpp_conv::create_sm_context_response_from_ct_request(
xgpp_conv::create_sm_context_response_from_ctx_request(
smreq, sm_context_resp_pending);
// Step 3. find pdu_session
// Step 3. Find pdu_session
std::shared_ptr<dnn_context> sd = {};
bool find_dnn = find_dnn_context(snssai, dnn, sd);
// step 3.1. create dnn context if not exist
// Step 3.1. Create dnn context if not exist
// At this step, this context should be existed
if (nullptr == sd.get()) {
Logger::smf_app().debug(
......@@ -1288,7 +1288,7 @@ void smf_context::handle_pdu_session_create_sm_context_request(
"DNN context (dnn_in_use %s) is already existed", dnn.c_str());
}
// step 3.2. create pdu session if not exist
// Step 3.2. Create pdu session if not exist
std::shared_ptr<smf_pdu_session> sp = {};
bool find_pdu = sd.get()->find_pdu_session(pdu_session_id, sp);
......@@ -1345,7 +1345,7 @@ void smf_context::handle_pdu_session_create_sm_context_request(
Logger::smf_app().debug(
"PDU Session Type IPv4v6, select PDU Session Type IPv4");
bool paa_res = false;
// TODO: Verified if use default session type or requested session type
// TODO: Verify if use default session type or requested session type
std::shared_ptr<session_management_subscription> ss = {};
std::shared_ptr<dnn_configuration_t> sdc = {};
find_dnn_subscription(snssai, ss);
......@@ -1436,6 +1436,7 @@ void smf_context::handle_pdu_session_create_sm_context_request(
Logger::smf_app().info(
"UE requests to use DHCPv4 for IPv4 address assignment, this "
"feature has not been supported yet!");
request_accepted = false;
// TODO
}
......@@ -1444,6 +1445,7 @@ void smf_context::handle_pdu_session_create_sm_context_request(
case PDU_SESSION_TYPE_E_IPV6: {
// TODO:
Logger::smf_app().debug("IPv6 has not been supported yet!");
request_accepted = false;
} break;
default: {
......@@ -1607,16 +1609,12 @@ void smf_context::handle_pdu_session_create_sm_context_request(
conv::convert_string_2_hex(n1_sm_message, n1_sm_msg_hex);
sm_context_resp_pending->res.set_n1_sm_message(n1_sm_msg_hex);
// get supi and put into URL
// Get supi and put into URL
std::string supi_str;
supi_t supi = sm_context_resp_pending->res.get_supi();
supi_str = sm_context_resp_pending->res.get_supi_prefix() + "-" +
smf_supi_to_string(supi);
std::string url =
// std::string(
// inet_ntoa(*((struct in_addr*) &smf_cfg.amf_addr.ipv4_addr))) +
// ":" + std::to_string(smf_cfg.amf_addr.port) + NAMF_COMMUNICATION_BASE
// +
sp.get()->get_amf_addr() + NAMF_COMMUNICATION_BASE +
smf_cfg.amf_addr.api_version +
fmt::format(
......@@ -1632,7 +1630,7 @@ void smf_context::handle_pdu_session_create_sm_context_request(
sm_context_resp_pending->res.get_pdu_session_id();
sm_context_resp_pending->res.set_json_data(json_data);
// send ITTI message to N11 to trigger N1N2MessageTransfer towards AMFs
// Send ITTI message to N11 to trigger N1N2MessageTransfer towards AMFs
Logger::smf_app().info(
"Sending ITTI message %s to task TASK_SMF_SBI",
sm_context_resp_pending->get_msg_name());
......@@ -2344,7 +2342,7 @@ void smf_context::handle_pdu_session_update_sm_context_request(
sp.get()->get_pdu_session_type().pdu_session_type);
// Assign necessary information for the response
xgpp_conv::update_sm_context_response_from_ct_request(
xgpp_conv::update_sm_context_response_from_ctx_request(
smreq, sm_context_resp_pending);
// Step 2.1. Decode N1 (if content is available)
......@@ -2370,7 +2368,7 @@ void smf_context::handle_pdu_session_update_sm_context_request(
switch (message_type) {
case PDU_SESSION_MODIFICATION_REQUEST: {
// PDU Session Modification procedure (UE-initiated, step 1.a,
// Section 4.3.3.2@3GPP TS 23.502) UE initiated PDU session
// Section 4.3.3.2@3GPP TS 23.502). UE initiated PDU session
// modification request (Step 1)
procedure_type = session_management_procedures_type_e::
......@@ -2382,9 +2380,8 @@ void smf_context::handle_pdu_session_update_sm_context_request(
} break;
case PDU_SESSION_MODIFICATION_COMPLETE: {
// PDU Session Modification
// procedure (UE-initiated/Network-requested) (step 3) PDU Session
// Modification Command Complete
// PDU Session Modification procedure (UE-initiated/Network-requested)
// (step 3) PDU Session Modification Command Complete
Logger::smf_app().debug("PDU_SESSION_MODIFICATION_COMPLETE");
procedure_type = session_management_procedures_type_e::
......@@ -2396,7 +2393,6 @@ void smf_context::handle_pdu_session_update_sm_context_request(
} break;
case PDU_SESSION_MODIFICATION_COMMAND_REJECT: {
// PDU_SESSION_MODIFICATION_COMMAND_REJECT
// PDU Session Modification procedure (Section 4.3.3.2@3GPP TS 23.502)
Logger::smf_app().debug("PDU_SESSION_MODIFICATION_COMMAND_REJECT");
......@@ -2599,7 +2595,7 @@ void smf_context::handle_pdu_session_update_sm_context_request(
insert_procedure(sproc);
if (proc->run(smreq, sm_context_resp_pending, shared_from_this())) {
// error !
// error
Logger::smf_app().info(
"PDU Update SM Context Request procedure failed (session procedure "
"type %s)",
......@@ -2640,14 +2636,14 @@ void smf_context::handle_pdu_session_update_sm_context_request(
PDU_SESSION_RELEASE_AMF_INITIATED:
case session_management_procedures_type_e::
PDU_SESSION_RELEASE_UE_REQUESTED_STEP1: {
// trigger to send reply to AMF
// trigger the reply to AMF
smf_app_inst->trigger_update_context_error_response(
http_status_code_e::HTTP_STATUS_CODE_403_FORBIDDEN,
PDU_SESSION_APPLICATION_ERROR_PEER_NOT_RESPONDING, smreq->pid);
} break;
default: {
// trigger to send reply to AMF
// trigger the reply to AMF
smf_app_inst->trigger_update_context_error_response(
http_status_code_e::HTTP_STATUS_CODE_403_FORBIDDEN,
PDU_SESSION_APPLICATION_ERROR_PEER_NOT_RESPONDING, smreq->pid);
......
......@@ -43,9 +43,6 @@
#include "common_root_types.h"
#include "itti.hpp"
#include "msg_pfcp.hpp"
#include "pistache/endpoint.h"
#include "pistache/http.h"
#include "pistache/router.h"
#include "smf_event.hpp"
#include "smf_procedure.hpp"
#include "uint_generator.hpp"
......
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