Commit d2eff68f authored by Tien Thinh NGUYEN's avatar Tien Thinh NGUYEN

Code refactor for SUCI and SUPI format IMSI

parent 16ea304a
This diff is collapsed.
...@@ -37,8 +37,8 @@ namespace nas { ...@@ -37,8 +37,8 @@ namespace nas {
// 5G-GUTI // 5G-GUTI
typedef struct _5G_GUTI_s { typedef struct _5G_GUTI_s {
string mcc; std::string mcc;
string mnc; std::string mnc;
uint8_t amf_region_id; uint8_t amf_region_id;
uint8_t amf_set_id; uint8_t amf_set_id;
uint16_t amf_pointer; uint16_t amf_pointer;
...@@ -84,7 +84,7 @@ class _5GSMobileIdentity { ...@@ -84,7 +84,7 @@ class _5GSMobileIdentity {
_5GSMobileIdentity( _5GSMobileIdentity(
const string mcc, const string mnc, const string routingInd, const string mcc, const string mnc, const string routingInd,
uint8_t protection_sch_id, uint8_t protection_sch_id,
const string msin); // SUCI and SUPI format IMSI const string msin); // TODO: SetSUCI, SUCI and SUPI format IMSI
_5GSMobileIdentity(); _5GSMobileIdentity();
~_5GSMobileIdentity(); ~_5GSMobileIdentity();
...@@ -94,10 +94,11 @@ class _5GSMobileIdentity { ...@@ -94,10 +94,11 @@ class _5GSMobileIdentity {
void setIEI(uint8_t _iei); void setIEI(uint8_t _iei);
int encode2Buffer(uint8_t* buf, int len); int encode2Buffer(uint8_t* buf, int len);
int suci_encode2buffer(uint8_t* buf, int len);
int _5g_guti_encode2buffer(uint8_t* buf, int len); int _5g_guti_encode2buffer(uint8_t* buf, int len);
int encodeMssMnc2buffer( int suci_encode2buffer(uint8_t* buf, int len);
int encodeMccMnc2buffer(
const std::string& mcc_str, const std::string& mnc_str, uint8_t* buf); const std::string& mcc_str, const std::string& mnc_str, uint8_t* buf);
int encodeRoutid2buffer(string routid, uint8_t* buf); int encodeRoutid2buffer(string routid, uint8_t* buf);
...@@ -125,24 +126,25 @@ class _5GSMobileIdentity { ...@@ -125,24 +126,25 @@ class _5GSMobileIdentity {
void setSuciWithSupiImsi( void setSuciWithSupiImsi(
const string& mcc, const string& mnc, const string& routingInd, const string& mcc, const string& mnc, const string& routingInd,
uint8_t protecSchId, const string& msin_digits); uint8_t protecSchId, const string& msin_digits);
void getSuciWithSupiImsi(SUCI_imsi_t&); bool getSuciWithSupiImsi(SUCI_imsi_t&);
bool get5G_S_TMSI(uint16_t& amfSetId, uint8_t& amfPointer, string& tmsi); bool get5G_S_TMSI(uint16_t& amfSetId, uint8_t& amfPointer, string& tmsi);
void setIMEISV(IMEISV_t imeisv); void setIMEISV(const IMEISV_t& imeisv);
void getIMEISV(IMEISV_t& imeisv); bool getIMEISV(IMEISV_t& imeisv);
private: private:
uint8_t iei; uint8_t iei;
uint16_t length; uint16_t length;
uint8_t typeOfIdentity : 3; uint8_t typeOfIdentity : 3;
std::optional<SUCI_imsi_t> supi_format_imsi;
std::optional<_5G_GUTI_t> _5g_guti; std::optional<_5G_GUTI_t> _5g_guti;
IMEI_IMEISV_t* imei_imeisv; std::optional<IMEI_IMEISV_t> _imei; // TODO:
SUCI_imsi_t* supi_format_imsi; std::optional<IMEISV_t> _IMEISV;
_5G_S_TMSI_t* _5g_s_tmsi; _5G_S_TMSI_t* _5g_s_tmsi;
bool is_no_identity; bool is_no_identity;
IMEISV_t _IMEISV;
}; };
} // namespace nas } // namespace nas
......
...@@ -19,13 +19,6 @@ ...@@ -19,13 +19,6 @@
* contact@openairinterface.org * contact@openairinterface.org
*/ */
/*! \file
\brief
\author Keliang DU, BUPT
\date 2020
\email: contact@openairinterface.org
*/
#include "RegistrationRequest.hpp" #include "RegistrationRequest.hpp"
#include "3gpp_24.501.hpp" #include "3gpp_24.501.hpp"
......
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