|
|
|
@ -24,24 +24,24 @@ enum auth_result_t { AUTH_OK, AUTH_FAILED, AUTH_SYNCH_FAILURE };
|
|
|
|
|
class usim_interface_nas
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
virtual std::string get_imsi_str() = 0;
|
|
|
|
|
virtual std::string get_imei_str() = 0;
|
|
|
|
|
virtual bool get_imsi_vec(uint8_t* imsi_, uint32_t n) = 0;
|
|
|
|
|
virtual bool get_imei_vec(uint8_t* imei_, uint32_t n) = 0;
|
|
|
|
|
virtual bool get_home_plmn_id(srsran::plmn_id_t* home_plmn_id) = 0;
|
|
|
|
|
virtual std::string get_imsi_str() = 0;
|
|
|
|
|
virtual std::string get_imei_str() = 0;
|
|
|
|
|
virtual bool get_imsi_vec(uint8_t* imsi_, uint32_t n) = 0;
|
|
|
|
|
virtual bool get_imei_vec(uint8_t* imei_, uint32_t n) = 0;
|
|
|
|
|
virtual bool get_home_plmn_id(srsran::plmn_id_t* home_plmn_id) = 0;
|
|
|
|
|
// Get the home mcc as bytes array
|
|
|
|
|
virtual bool get_home_mcc_bytes(uint8_t* mcc_, uint32_t n) = 0;
|
|
|
|
|
virtual bool get_home_mcc_bytes(uint8_t* mcc_, uint32_t n) = 0;
|
|
|
|
|
// Get the home mnc as byte array
|
|
|
|
|
virtual bool get_home_mnc_bytes(uint8_t* mnc_, uint32_t n) = 0;
|
|
|
|
|
virtual bool get_home_mnc_bytes(uint8_t* mnc_, uint32_t n) = 0;
|
|
|
|
|
// Get the home msin in bytes array encoded as bcd
|
|
|
|
|
virtual bool get_home_msin_bcd(uint8_t* msin_, uint32_t n) = 0;
|
|
|
|
|
virtual bool get_home_msin_bcd(uint8_t* msin_, uint32_t n) = 0;
|
|
|
|
|
virtual auth_result_t generate_authentication_response(uint8_t* rand,
|
|
|
|
|
uint8_t* autn_enb,
|
|
|
|
|
uint16_t mcc,
|
|
|
|
|
uint16_t mnc,
|
|
|
|
|
uint8_t* res,
|
|
|
|
|
int* res_len,
|
|
|
|
|
uint8_t* k_asme) = 0;
|
|
|
|
|
uint8_t* k_asme) = 0;
|
|
|
|
|
|
|
|
|
|
virtual auth_result_t generate_authentication_response_5g(uint8_t* rand,
|
|
|
|
|
uint8_t* autn_enb,
|
|
|
|
@ -77,8 +77,10 @@ public:
|
|
|
|
|
class usim_interface_rrc_nr
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
virtual bool generate_nr_context(uint16_t sk_counter, srsran::as_security_config_t* sec_cfg) = 0;
|
|
|
|
|
virtual bool update_nr_context(srsran::as_security_config_t* sec_cfg) = 0;
|
|
|
|
|
virtual void
|
|
|
|
|
generate_nr_as_keys(srsran::as_key_t& k_amf, uint32_t count_ul, srsran::as_security_config_t* sec_cfg) = 0;
|
|
|
|
|
virtual bool generate_nr_context(uint16_t sk_counter, srsran::as_security_config_t* sec_cfg) = 0;
|
|
|
|
|
virtual bool update_nr_context(srsran::as_security_config_t* sec_cfg) = 0;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
} // namespace srsue
|
|
|
|
|