Commit 93911a2a authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Update Handle a PDU Session Update SM Context Request procedure

parent ee363df2
......@@ -84,7 +84,7 @@ unsigned char* mime_parser::format_string_as_hex(const std::string& str) {
conv::ascii_to_hex(data_hex, (const char*) data);
Logger::smf_app().debug(
"[Format string as Hex] Input string (%d bytes): %s ", str_len,
"Input string (%d bytes): %s ", str_len,
str.c_str());
Logger::smf_app().debug("Data (formatted):");
#if DEBUG_IS_ON
......
......@@ -160,7 +160,7 @@ int fivegsm_msg_encode(SM_msg* msg, uint8_t* buffer, uint32_t len) {
buffer += header_result;
len -= header_result;
#if DEBUG_IS_ON
printf(", message type %d", msg->header.message_type);
printf("message type %d", msg->header.message_type);
#endif
switch (msg->header.message_type) {
case PDU_SESSION_ESTABLISHMENT_REQUEST:
......
......@@ -631,10 +631,10 @@ void smf_app::handle_pdu_session_create_sm_context_request(
PDU_SESSION_TYPE_E_IPV4};
// Step 1. Decode NAS and get the necessary information
std::string n1_sm_msg = smreq->req.get_n1_sm_message();
// std::string n1_sm_msg = smreq->req.get_n1_sm_message();
int decoder_rc =
smf_n1::get_instance().decode_n1_sm_container(decoded_nas_msg, n1_sm_msg);
smf_n1::get_instance().decode_n1_sm_container(decoded_nas_msg, smreq->req.get_n1_sm_message());
// Failed to decode, send reply to AMF with PDU Session Establishment Reject
if (decoder_rc != RETURNok) {
......
This diff is collapsed.
......@@ -854,6 +854,56 @@ class smf_context : public std::enable_shared_from_this<smf_context> {
smf::pdu_session_update_sm_context_response& res,
const nas_message_t& nas_msg);
bool handle_pdu_session_modification_request(
nas_message_t& nas_msg,
std::shared_ptr<itti_n11_update_sm_context_request>& sm_context_request,
std::shared_ptr<itti_n11_update_sm_context_response>& sm_context_resp,
std::shared_ptr<smf_pdu_session>& sp);
bool handle_pdu_session_modification_complete(
nas_message_t& nas_msg,
std::shared_ptr<itti_n11_update_sm_context_request>& sm_context_request,
std::shared_ptr<itti_n11_update_sm_context_response>& sm_context_resp,
std::shared_ptr<smf_pdu_session>& sp);
bool handle_pdu_session_modification_command_reject(
nas_message_t& nas_msg,
std::shared_ptr<itti_n11_update_sm_context_request>& sm_context_request,
std::shared_ptr<itti_n11_update_sm_context_response>& sm_context_resp,
std::shared_ptr<smf_pdu_session>& sp);
bool handle_pdu_session_release_request(
nas_message_t& nas_msg,
std::shared_ptr<itti_n11_update_sm_context_request>& sm_context_request,
std::shared_ptr<itti_n11_update_sm_context_response>& sm_context_resp,
std::shared_ptr<smf_pdu_session>& sp);
bool handle_pdu_session_release_complete(
nas_message_t& nas_msg,
std::shared_ptr<itti_n11_update_sm_context_request>& sm_context_request,
std::shared_ptr<itti_n11_update_sm_context_response>& sm_context_resp,
std::shared_ptr<smf_pdu_session>& sp);
bool handle_pdu_session_resource_setup_response_transfer(
std::string& n2_sm_information,
std::shared_ptr<itti_n11_update_sm_context_request>& sm_context_request);
bool handle_pdu_session_resource_setup_unsuccessful_transfer(
std::string& n2_sm_information,
std::shared_ptr<itti_n11_update_sm_context_request>& sm_context_request);
bool handle_pdu_session_resource_modify_response_transfer(
std::string& n2_sm_information,
std::shared_ptr<itti_n11_update_sm_context_request>& sm_context_request);
bool handle_pdu_session_resource_release_response_transfer(
std::string& n2_sm_information,
std::shared_ptr<itti_n11_update_sm_context_request>& sm_context_request);
bool handle_service_request(
std::string &n2_sm_information,
std::shared_ptr<itti_n11_update_sm_context_request>& sm_context_request,
std::shared_ptr<itti_n11_update_sm_context_response>& sm_context_resp,
std::shared_ptr<smf_pdu_session>& sp);
private:
std::vector<std::shared_ptr<dnn_context>> dnns;
std::vector<std::shared_ptr<smf_procedure>> pending_procedures;
......
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