Commit ad3820f9 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Add function headers for AMF N1/Code cleanup

parent 5d4d1c3e
......@@ -188,7 +188,7 @@ std::shared_ptr<ue_context> amf_app::amf_ue_id_2_ue_context(
//------------------------------------------------------------------------------
void amf_app::set_amf_ue_ngap_id_2_ue_context(
const long& amf_ue_ngap_id, std::shared_ptr<ue_context>& uc) {
const long& amf_ue_ngap_id, const std::shared_ptr<ue_context>& uc) {
std::unique_lock lock(m_amf_ue_ngap_id2ue_ctx);
amf_ue_ngap_id2ue_ctx[amf_ue_ngap_id] = uc;
}
......
......@@ -151,7 +151,7 @@ class amf_app {
* @return void
*/
void set_amf_ue_ngap_id_2_ue_context(
const long& amf_ue_ngap_id, std::shared_ptr<ue_context>& uc);
const long& amf_ue_ngap_id, const std::shared_ptr<ue_context>& uc);
/*
* Verify if a UE context associated with an UE Context Key exist
......
This diff is collapsed.
This diff is collapsed.
......@@ -37,7 +37,7 @@ extern amf_config amf_cfg;
//------------------------------------------------------------------------------
bool amf_n1::get_mysql_auth_info(
std::string imsi,
const std::string& imsi,
mysql_auth_info_t&
resp) { // openair-cn/tree/v0.5.0/src/oai_hss/db/db_connector.c
MYSQL_RES* res;
......@@ -116,7 +116,7 @@ bool amf_n1::connect_to_mysql() {
//------------------------------------------------------------------------------
void amf_n1::mysql_push_rand_sqn(
std::string imsi, uint8_t* rand_p, uint8_t* sqn) {
const std::string& imsi, uint8_t* rand_p, uint8_t* sqn) {
int status = 0;
MYSQL_RES* res;
char query[1000];
......@@ -171,7 +171,7 @@ void amf_n1::mysql_push_rand_sqn(
}
//------------------------------------------------------------------------------
void amf_n1::mysql_increment_sqn(std::string imsi) {
void amf_n1::mysql_increment_sqn(const std::string& imsi) {
int status;
MYSQL_RES* res;
char query[1000];
......
......@@ -63,4 +63,16 @@ constexpr uint64_t SECONDS_SINCE_FIRST_EPOCH = 2208988800;
#define NAMF_COMMUNICATION_BASE "/namf-comm/"
#define NAMF_COMMUNICATION_N1N2_MESSAGE_TRANSFER_URL \
"/ue-contexts/{}/n1-n2-messages" // context id
#define NAS_MESSAGE_DOWNLINK 1
#define NAS_MESSAGE_UPLINK 0
typedef enum {
PlainNasMsg = 0x0,
IntegrityProtected = 0x1,
IntegrityProtectedAndCiphered = 0x2,
IntegrityProtectedWithNew5GNASSecurityContext = 0x3,
IntegrityProtectedAndCipheredWithNew5GNASSecurityContext = 0x4,
} SecurityHeaderType_t;
#endif
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