Commit 184e034d authored by Stefan Spettel's avatar Stefan Spettel

refact(smf): Moved PDU session create/update/release response into smf_context

Signed-off-by: default avatarStefan Spettel <stefan.spettel@eurecom.fr>
parent eb7d7309
This diff is collapsed.
......@@ -1315,6 +1315,31 @@ class smf_context : public std::enable_shared_from_this<smf_context> {
const ng_ran_target_id_t& ran_target_id,
const pdu_session_id_t& pdu_session_id) const;
/**
* Send a PDU session Create Response, based on the content of resp.
* @param resp
*/
void send_pdu_session_create_response(
const std::shared_ptr<itti_n11_create_sm_context_response>& resp);
/**
* Create a PDU session UPDATE response, based on the content of resp
* @param resp
* @pram session_procedure_type The session procedure type of this reply
*/
void send_pdu_session_update_response(
const std::shared_ptr<itti_n11_update_sm_context_request>& req,
const std::shared_ptr<itti_n11_update_sm_context_response>& resp,
const session_management_procedures_type_e& session_procedure_type,
const std::shared_ptr<smf_pdu_session>& sps);
/**
* Create a PDU session Release response, based on the content of resp
* @param resp
*/
void send_pdu_session_release_response(
const std::shared_ptr<itti_n11_release_sm_context_response>& resp);
private:
std::vector<std::shared_ptr<smf_procedure>> pending_procedures;
// snssai <-> session management subscription
......
This diff is collapsed.
......@@ -48,6 +48,8 @@ namespace smf {
class smf_context;
class smf_pdu_session;
enum class smf_procedure_code : uint8_t { CONTINUE, ERROR, OK };
//------------------------------------------------------------------------------
class smf_procedure {
private:
......@@ -63,13 +65,13 @@ class smf_procedure {
explicit smf_procedure(uint64_t tx) { trxn_id = tx; }
virtual ~smf_procedure() {}
virtual itti_msg_type_t get_procedure_type() { return ITTI_MSG_TYPE_NONE; }
virtual void handle_itti_msg(
virtual smf_procedure_code handle_itti_msg(
itti_n4_session_establishment_response& resp,
std::shared_ptr<smf::smf_context> pc) {}
virtual void handle_itti_msg(
virtual smf_procedure_code handle_itti_msg(
itti_n4_session_modification_response& resp,
std::shared_ptr<smf::smf_context> pc) {}
virtual void handle_itti_msg(
virtual smf_procedure_code handle_itti_msg(
itti_n4_session_deletion_response& resp,
std::shared_ptr<smf::smf_context> pc) {}
};
......@@ -138,7 +140,7 @@ class session_create_sm_context_procedure : public smf_session_procedure {
* @param [std::shared_ptr<smf::smf_context>] sc: smf context
* @return
*/
int run(
smf_procedure_code run(
std::shared_ptr<itti_n11_create_sm_context_request> req,
std::shared_ptr<itti_n11_create_sm_context_response> resp,
std::shared_ptr<smf::smf_context> sc);
......@@ -149,7 +151,7 @@ class session_create_sm_context_procedure : public smf_session_procedure {
* @param [std::shared_ptr<smf::smf_context>] sc smf context
* @return void
*/
void handle_itti_msg(
smf_procedure_code handle_itti_msg(
itti_n4_session_establishment_response& resp,
std::shared_ptr<smf::smf_context> sc) override;
......@@ -177,7 +179,7 @@ class session_update_sm_context_procedure : public smf_session_procedure {
* @param [std::shared_ptr<smf::smf_context>] sc: smf context
* @return
*/
int run(
smf_procedure_code run(
std::shared_ptr<itti_n11_update_sm_context_request> req,
std::shared_ptr<itti_n11_update_sm_context_response> resp,
std::shared_ptr<smf::smf_context> sc);
......@@ -188,7 +190,7 @@ class session_update_sm_context_procedure : public smf_session_procedure {
* @param [std::shared_ptr<smf::smf_context>] sc smf context
* @return void
*/
void handle_itti_msg(
smf_procedure_code handle_itti_msg(
itti_n4_session_modification_response& resp,
std::shared_ptr<smf::smf_context> sc) override;
......@@ -216,7 +218,7 @@ class session_release_sm_context_procedure : public smf_session_procedure {
* @param [std::shared_ptr<smf::smf_context>] sc: smf context
* @return
*/
int run(
smf_procedure_code run(
std::shared_ptr<itti_n11_release_sm_context_request> req,
std::shared_ptr<itti_n11_release_sm_context_response> resp,
std::shared_ptr<smf::smf_context> sc);
......@@ -227,7 +229,7 @@ class session_release_sm_context_procedure : public smf_session_procedure {
* @param [std::shared_ptr<smf::smf_context>] sc smf context
* @return void
*/
void handle_itti_msg(
smf_procedure_code handle_itti_msg(
itti_n4_session_deletion_response& resp,
std::shared_ptr<smf::smf_context> sc) override;
......
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