Commit 914629c8 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

Polish header files/code cleanup

parent 3f35b76e
...@@ -30,11 +30,8 @@ ...@@ -30,11 +30,8 @@
#define _AMF_APP_H_ #define _AMF_APP_H_
#include <map> #include <map>
#include <set>
#include <shared_mutex> #include <shared_mutex>
#include <string> #include <string>
#include <thread>
#include <sstream>
#include "amf_config.hpp" #include "amf_config.hpp"
#include "amf_module_from_config.hpp" #include "amf_module_from_config.hpp"
#include "itti_msg_amf_app.hpp" #include "itti_msg_amf_app.hpp"
......
...@@ -33,6 +33,10 @@ ...@@ -33,6 +33,10 @@
#include "string.hpp" #include "string.hpp"
#include "thread_sched.hpp" #include "thread_sched.hpp"
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/split.hpp>
#include "logger.hpp" #include "logger.hpp"
#include "amf_app.hpp" #include "amf_app.hpp"
#include "if.hpp" #include "if.hpp"
...@@ -41,10 +45,8 @@ ...@@ -41,10 +45,8 @@
extern "C" { extern "C" {
#include <arpa/inet.h> #include <arpa/inet.h>
#include <stdbool.h> #include <stdbool.h>
#include <stdlib.h>
#include <string.h> #include <string.h>
#include <sys/types.h> #include <sys/types.h>
#include <unistd.h>
#include "common_defs.h" #include "common_defs.h"
} }
......
...@@ -35,15 +35,10 @@ ...@@ -35,15 +35,10 @@
#include <libconfig.h++> #include <libconfig.h++>
#include <netinet/in.h> #include <netinet/in.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <mutex>
#include <vector> #include <vector>
#include <string> #include <string>
#include "thread_sched.hpp" #include "thread_sched.hpp"
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/split.hpp>
#define AMF_CONFIG_STRING_AMF_CONFIG "AMF" #define AMF_CONFIG_STRING_AMF_CONFIG "AMF"
#define AMF_CONFIG_STRING_PID_DIRECTORY "PID_DIRECTORY" #define AMF_CONFIG_STRING_PID_DIRECTORY "PID_DIRECTORY"
#define AMF_CONFIG_STRING_INSTANCE_ID "INSTANCE_ID" #define AMF_CONFIG_STRING_INSTANCE_ID "INSTANCE_ID"
......
...@@ -29,14 +29,7 @@ ...@@ -29,14 +29,7 @@
#ifndef _AMF_MODULE_FROM_CONFIG_H_ #ifndef _AMF_MODULE_FROM_CONFIG_H_
#define _AMF_MODULE_FROM_CONFIG_H_ #define _AMF_MODULE_FROM_CONFIG_H_
#include <arpa/inet.h>
#include <libconfig.h++> #include <libconfig.h++>
#include <netinet/in.h>
#include <sys/socket.h>
#include <mutex>
#include <vector>
#include <boost/algorithm/string.hpp> #include <boost/algorithm/string.hpp>
#include <boost/algorithm/string/classification.hpp> #include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/split.hpp> #include <boost/algorithm/string/split.hpp>
......
...@@ -31,15 +31,8 @@ ...@@ -31,15 +31,8 @@
#include <map> #include <map>
#include <shared_mutex> #include <shared_mutex>
#include <pthread.h>
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <unistd.h>
#include <string.h> #include <string.h>
#include <errno.h>
#include <error.h>
#include <inttypes.h>
#include <mysql/mysql.h> #include <mysql/mysql.h>
#include "nas_context.hpp" #include "nas_context.hpp"
......
...@@ -28,8 +28,6 @@ ...@@ -28,8 +28,6 @@
#include "amf_statistics.hpp" #include "amf_statistics.hpp"
#include <iostream>
#include "logger.hpp" #include "logger.hpp"
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
......
...@@ -29,9 +29,6 @@ ...@@ -29,9 +29,6 @@
#ifndef _STATISTICS_H_ #ifndef _STATISTICS_H_
#define _STATISTICS_H_ #define _STATISTICS_H_
#include <stdlib.h>
#include <unistd.h>
#include <stdint.h>
#include <vector> #include <vector>
#include <string> #include <string>
......
...@@ -29,10 +29,8 @@ ...@@ -29,10 +29,8 @@
#ifndef _MYSQL_DB_HANDLERS_H_ #ifndef _MYSQL_DB_HANDLERS_H_
#define _MYSQL_DB_HANDLERS_H_ #define _MYSQL_DB_HANDLERS_H_
#include <stdint.h>
#include <pthread.h> #include <pthread.h>
#include <mysql/mysql.h> #include <mysql/mysql.h>
#include <netinet/in.h>
#include <string> #include <string>
#define KEY_LENGTH (16) #define KEY_LENGTH (16)
......
...@@ -92,17 +92,17 @@ class RegistrationRequest { ...@@ -92,17 +92,17 @@ class RegistrationRequest {
void setNAS_Message_Container(bstring value); void setNAS_Message_Container(bstring value);
void setEPS_Bearer_Context_Status(uint16_t value); void setEPS_Bearer_Context_Status(uint16_t value);
bool get5GSRegistrationType(bool &is_for, uint8_t &reg_type/*3bits*/); //返回获取IE的状态,成功或者失败 bool get5GSRegistrationType(bool &is_for, uint8_t &reg_type/*3bits*/);
uint8_t getngKSI(); //return -1;表示获取IE失败 uint8_t getngKSI();
uint8_t getMobilityIdentityType(); //return -1;表示获取IE失败 uint8_t getMobilityIdentityType();
std::string get_5g_guti(); //"error" for missing IE GUTI std::string get_5g_guti(); //"error" for missing IE GUTI
bool getSuciSupiFormatImsi(nas::SUCI_imsi_t &imsi); bool getSuciSupiFormatImsi(nas::SUCI_imsi_t &imsi);
uint8_t getNonCurrentNativeNasKSI(); //return -1;表示获取IE失败 uint8_t getNonCurrentNativeNasKSI();
uint8_t get5GMMCapability(); //return -1;表示获取IE失败; set接口可能有bug uint8_t get5GMMCapability();
bool getUeSecurityCapability(uint8_t &ea, uint8_t &ia); bool getUeSecurityCapability(uint8_t &ea, uint8_t &ia);
bool getRequestedNssai(std::vector<struct SNSSAI_s> &nssai); bool getRequestedNssai(std::vector<struct SNSSAI_s> &nssai);
bool getS1UeNetworkCapability(uint8_t &eea, uint8_t &eia); bool getS1UeNetworkCapability(uint8_t &eea, uint8_t &eia);
uint16_t getUplinkDataStatus(); //return -1;表示获取IE失败; uint16_t getUplinkDataStatus();
uint16_t getPduSessionStatus(); uint16_t getPduSessionStatus();
bool getMicoIndication(uint8_t &sprti, uint8_t &raai); bool getMicoIndication(uint8_t &sprti, uint8_t &raai);
bool getUeStatus(uint8_t &n1ModeReg, uint8_t &s1ModeReg); bool getUeStatus(uint8_t &n1ModeReg, uint8_t &s1ModeReg);
......
...@@ -53,10 +53,10 @@ class ServiceRequest { ...@@ -53,10 +53,10 @@ class ServiceRequest {
int encode2buffer(uint8_t *buf, int len); int encode2buffer(uint8_t *buf, int len);
public: public:
int decodefrombuffer(NasMmPlainHeader *header, uint8_t *buf, int len); int decodefrombuffer(NasMmPlainHeader *header, uint8_t *buf, int len);
uint8_t getngKSI(); //return -1;表示获取IE失败 uint8_t getngKSI();
uint8_t getServiceType(); uint8_t getServiceType();
bool get5G_S_TMSI(uint16_t &amfSetId, uint8_t &amfPointer, string &tmsi); bool get5G_S_TMSI(uint16_t &amfSetId, uint8_t &amfPointer, string &tmsi);
uint16_t getUplinkDataStatus(); //return -1;表示获取IE失败; uint16_t getUplinkDataStatus();
uint16_t getPduSessionStatus(); uint16_t getPduSessionStatus();
uint16_t getAllowedPduSessionStatus(); uint16_t getAllowedPduSessionStatus();
bool getNasMessageContainer(bstring &nas); bool getNasMessageContainer(bstring &nas);
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
#include <stdbool.h> #include <stdbool.h>
#include "TLVEncoder.h" #include "TLVEncoder.h"
//#include "log.h"
int errorCodeEncoder = 0; int errorCodeEncoder = 0;
......
...@@ -245,9 +245,6 @@ bool InitialUEMessageMsg::decodefrompdu(Ngap_NGAP_PDU_t *ngap_msg_pdu) { ...@@ -245,9 +245,6 @@ bool InitialUEMessageMsg::decodefrompdu(Ngap_NGAP_PDU_t *ngap_msg_pdu) {
initialUEMessagePdu = ngap_msg_pdu; initialUEMessagePdu = ngap_msg_pdu;
if (initialUEMessagePdu->present == Ngap_NGAP_PDU_PR_initiatingMessage) { if (initialUEMessagePdu->present == Ngap_NGAP_PDU_PR_initiatingMessage) {
//cout<<"test0515: procedureCode "<<initialUEMessagePdu->choice.initiatingMessage->procedureCode<<endl;
//cout<<"test0515: criticality "<<initialUEMessagePdu->choice.initiatingMessage->criticality<<endl;
//cout<<"test0515: present "<<initialUEMessagePdu->choice.initiatingMessage->value.present<<endl;
if (initialUEMessagePdu->choice.initiatingMessage if (initialUEMessagePdu->choice.initiatingMessage
&& initialUEMessagePdu->choice.initiatingMessage->procedureCode && initialUEMessagePdu->choice.initiatingMessage->procedureCode
== Ngap_ProcedureCode_id_InitialUEMessage == Ngap_ProcedureCode_id_InitialUEMessage
......
...@@ -54,7 +54,7 @@ class NGSetupResponseMsg { ...@@ -54,7 +54,7 @@ class NGSetupResponseMsg {
//External interfaces //External interfaces
//Encapsulation //Encapsulation
void setMessageType(); //Initialize the PDU and populate the MessageType; void setMessageType(); //Initialize the PDU and populate the MessageType;
void setAMFName(const std::string name); //���IE void setAMFName(const std::string name);
void setGUAMIList(std::vector<struct GuamiItem_s> list); void setGUAMIList(std::vector<struct GuamiItem_s> list);
void setRelativeAmfCapacity(long capacity); void setRelativeAmfCapacity(long capacity);
void setPlmnSupportList(std::vector<PlmnSliceSupport_t> list); void setPlmnSupportList(std::vector<PlmnSliceSupport_t> list);
......
...@@ -51,7 +51,6 @@ int ngap_amf_handle_ng_setup_request(const sctp_assoc_id_t assoc_id, ...@@ -51,7 +51,6 @@ int ngap_amf_handle_ng_setup_request(const sctp_assoc_id_t assoc_id,
const sctp_stream_id_t stream, const sctp_stream_id_t stream,
struct Ngap_NGAP_PDU *message_p) { struct Ngap_NGAP_PDU *message_p) {
Logger::ngap().debug("Sending ITTI NG Setup Request message to TASK_AMF_N2"); Logger::ngap().debug("Sending ITTI NG Setup Request message to TASK_AMF_N2");
//need code from yangjian and send itti message to TASK_AMF_N2
asn_fprint(stderr, &asn_DEF_Ngap_NGAP_PDU, message_p); asn_fprint(stderr, &asn_DEF_Ngap_NGAP_PDU, message_p);
NGSetupRequestMsg *ngSetupReq = new NGSetupRequestMsg(); NGSetupRequestMsg *ngSetupReq = new NGSetupRequestMsg();
if (!ngSetupReq->decodefrompdu(message_p)) { if (!ngSetupReq->decodefrompdu(message_p)) {
......
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