Commit 8f64764b authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Code cleanup for AMF_N1

parent 77842cc6
This diff is collapsed.
...@@ -64,6 +64,22 @@ typedef enum { ...@@ -64,6 +64,22 @@ typedef enum {
class amf_n1 { class amf_n1 {
public: public:
std::map<long, std::shared_ptr<nas_context>>
amfueid2nas_context; // amf ue ngap id
std::map<std::string, std::shared_ptr<nas_context>> imsi2nas_context;
std::map<std::string, long> supi2amfId;
std::map<std::string, uint32_t> supi2ranId;
mutable std::shared_mutex m_nas_context;
std::map<std::string, std::shared_ptr<nas_context>> guti2nas_context;
mutable std::shared_mutex m_guti2nas_context;
static std::map<std::string, std::string> rand_record;
static uint8_t no_random_delta;
random_state_t random_state;
database_t* db_desc;
amf_n1(); amf_n1();
~amf_n1(); ~amf_n1();
void handle_itti_message(itti_uplink_nas_data_ind&); void handle_itti_message(itti_uplink_nas_data_ind&);
...@@ -78,16 +94,6 @@ class amf_n1 { ...@@ -78,16 +94,6 @@ class amf_n1 {
plmn_t plmn); plmn_t plmn);
bool check_security_header_type(SecurityHeaderType& type, uint8_t* buffer); bool check_security_header_type(SecurityHeaderType& type, uint8_t* buffer);
std::map<long, std::shared_ptr<nas_context>>
amfueid2nas_context; // amf ue ngap id
std::map<std::string, std::shared_ptr<nas_context>> imsi2nas_context;
std::map<std::string, long> supi2amfId;
std::map<std::string, uint32_t> supi2ranId;
mutable std::shared_mutex m_nas_context;
std::map<std::string, std::shared_ptr<nas_context>> guti2nas_context;
mutable std::shared_mutex m_guti2nas_context;
bool is_guti_2_nas_context(const std::string& guti) const; bool is_guti_2_nas_context(const std::string& guti) const;
std::shared_ptr<nas_context> guti_2_nas_context( std::shared_ptr<nas_context> guti_2_nas_context(
const std::string& guti) const; const std::string& guti) const;
...@@ -100,7 +106,6 @@ class amf_n1 { ...@@ -100,7 +106,6 @@ class amf_n1 {
const long& amf_ue_ngap_id) const; const long& amf_ue_ngap_id) const;
void set_amf_ue_ngap_id_2_nas_context( void set_amf_ue_ngap_id_2_nas_context(
const long& amf_ue_ngap_id, std::shared_ptr<nas_context> nc); const long& amf_ue_ngap_id, std::shared_ptr<nas_context> nc);
database_t* db_desc;
// procedures // procedures
// specific procedures running logic // specific procedures running logic
......
...@@ -61,7 +61,6 @@ using namespace oai::smf::model; ...@@ -61,7 +61,6 @@ using namespace oai::smf::model;
using namespace oai::smf::api; using namespace oai::smf::api;
using namespace web; using namespace web;
using namespace web::http; using namespace web::http;
// Common features like URIs.
using namespace web::http::client; using namespace web::http::client;
using namespace config; using namespace config;
using namespace amf_application; using namespace amf_application;
......
...@@ -75,8 +75,6 @@ extern amf_n11* amf_n11_inst; ...@@ -75,8 +75,6 @@ extern amf_n11* amf_n11_inst;
extern amf_config amf_cfg; extern amf_config amf_cfg;
extern amf_app* amf_app_inst; extern amf_app* amf_app_inst;
extern statistics stacs; extern statistics stacs;
extern void print_buffer(
const std::string app, const std::string commit, uint8_t* buf, int len);
void amf_n2_task(void*); void amf_n2_task(void*);
......
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