NAS: Add configuration for full and short network names.

master
Matan Perelman 4 years ago committed by Andre Puschmann
parent 102a943171
commit ee997a4e4e

@ -128,6 +128,8 @@ typedef struct {
uint16_t paging_timer; uint16_t paging_timer;
std::string apn; std::string apn;
std::string dns; std::string dns;
std::string full_net_name;
std::string short_net_name;
srsran::CIPHERING_ALGORITHM_ID_ENUM cipher_algo; srsran::CIPHERING_ALGORITHM_ID_ENUM cipher_algo;
srsran::INTEGRITY_ALGORITHM_ID_ENUM integ_algo; srsran::INTEGRITY_ALGORITHM_ID_ENUM integ_algo;
} nas_init_t; } nas_init_t;
@ -264,6 +266,8 @@ private:
uint16_t m_tac = 0; uint16_t m_tac = 0;
std::string m_apn; std::string m_apn;
std::string m_dns; std::string m_dns;
std::string m_full_net_name;
std::string m_short_net_name;
// Timers timeout values // Timers timeout values
uint16_t m_t3413 = 0; uint16_t m_t3413 = 0;

@ -35,6 +35,8 @@ typedef struct {
std::string mme_bind_addr; std::string mme_bind_addr;
std::string mme_name; std::string mme_name;
std::string dns_addr; std::string dns_addr;
std::string full_net_name;
std::string short_net_name;
std::string mme_apn; std::string mme_apn;
bool pcap_enable; bool pcap_enable;
std::string pcap_filename; std::string pcap_filename;

@ -78,6 +78,8 @@ void parse_args(all_args_t* args, int argc, char* argv[])
string sgi_if_addr; string sgi_if_addr;
string sgi_if_name; string sgi_if_name;
string dns_addr; string dns_addr;
string full_net_name;
string short_net_name;
string hss_db_file; string hss_db_file;
string hss_auth_algo; string hss_auth_algo;
string log_filename; string log_filename;
@ -101,6 +103,8 @@ void parse_args(all_args_t* args, int argc, char* argv[])
("mme.mnc", bpo::value<string>(&mnc)->default_value("01"), "Mobile Network Code") ("mme.mnc", bpo::value<string>(&mnc)->default_value("01"), "Mobile Network Code")
("mme.mme_bind_addr", bpo::value<string>(&mme_bind_addr)->default_value("127.0.0.1"), "IP address of MME for S1 connection") ("mme.mme_bind_addr", bpo::value<string>(&mme_bind_addr)->default_value("127.0.0.1"), "IP address of MME for S1 connection")
("mme.dns_addr", bpo::value<string>(&dns_addr)->default_value("8.8.8.8"), "IP address of the DNS server for the UEs") ("mme.dns_addr", bpo::value<string>(&dns_addr)->default_value("8.8.8.8"), "IP address of the DNS server for the UEs")
("mme.full_net_name", bpo::value<string>(&full_net_name)->default_value("Software Radio Systems RAN"), "Full name of the network")
("mme.short_net_name", bpo::value<string>(&short_net_name)->default_value("srsRAN"), "Short name of the network")
("mme.apn", bpo::value<string>(&mme_apn)->default_value(""), "Set Access Point Name (APN) for data services") ("mme.apn", bpo::value<string>(&mme_apn)->default_value(""), "Set Access Point Name (APN) for data services")
("mme.encryption_algo", bpo::value<string>(&encryption_algo)->default_value("EEA0"), "Set preferred encryption algorithm for NAS layer ") ("mme.encryption_algo", bpo::value<string>(&encryption_algo)->default_value("EEA0"), "Set preferred encryption algorithm for NAS layer ")
("mme.integrity_algo", bpo::value<string>(&integrity_algo)->default_value("EIA1"), "Set preferred integrity protection algorithm for NAS") ("mme.integrity_algo", bpo::value<string>(&integrity_algo)->default_value("EIA1"), "Set preferred integrity protection algorithm for NAS")
@ -260,6 +264,8 @@ void parse_args(all_args_t* args, int argc, char* argv[])
args->mme_args.s1ap_args.mme_bind_addr = mme_bind_addr; args->mme_args.s1ap_args.mme_bind_addr = mme_bind_addr;
args->mme_args.s1ap_args.mme_name = mme_name; args->mme_args.s1ap_args.mme_name = mme_name;
args->mme_args.s1ap_args.dns_addr = dns_addr; args->mme_args.s1ap_args.dns_addr = dns_addr;
args->mme_args.s1ap_args.full_net_name = full_net_name;
args->mme_args.s1ap_args.short_net_name = short_net_name;
args->mme_args.s1ap_args.mme_apn = mme_apn; args->mme_args.s1ap_args.mme_apn = mme_apn;
args->mme_args.s1ap_args.paging_timer = paging_timer; args->mme_args.s1ap_args.paging_timer = paging_timer;
args->spgw_args.gtpu_bind_addr = spgw_bind_addr; args->spgw_args.gtpu_bind_addr = spgw_bind_addr;

@ -34,6 +34,8 @@ nas::nas(const nas_init_t& args, const nas_if_t& itf) :
m_tac(args.tac), m_tac(args.tac),
m_apn(args.apn), m_apn(args.apn),
m_dns(args.dns), m_dns(args.dns),
m_full_net_name(args.full_net_name),
m_short_net_name(args.short_net_name),
m_t3413(args.paging_timer) m_t3413(args.paging_timer)
{ {
m_sec_ctx.integ_algo = args.integ_algo; m_sec_ctx.integ_algo = args.integ_algo;
@ -1564,10 +1566,10 @@ bool nas::pack_emm_information(srsran::byte_buffer_t* nas_buffer)
LIBLTE_MME_EMM_INFORMATION_MSG_STRUCT emm_info; LIBLTE_MME_EMM_INFORMATION_MSG_STRUCT emm_info;
emm_info.full_net_name_present = true; emm_info.full_net_name_present = true;
strncpy(emm_info.full_net_name.name, "Software Radio Systems LTE", LIBLTE_STRING_LEN); memccpy(emm_info.full_net_name.name, m_full_net_name.c_str(), 0, LIBLTE_STRING_LEN);
emm_info.full_net_name.add_ci = LIBLTE_MME_ADD_CI_DONT_ADD; emm_info.full_net_name.add_ci = LIBLTE_MME_ADD_CI_DONT_ADD;
emm_info.short_net_name_present = true; emm_info.short_net_name_present = true;
strncpy(emm_info.short_net_name.name, "srsRAN", LIBLTE_STRING_LEN); memccpy(emm_info.short_net_name.name, m_short_net_name.c_str(), 0, LIBLTE_STRING_LEN);
emm_info.short_net_name.add_ci = LIBLTE_MME_ADD_CI_DONT_ADD; emm_info.short_net_name.add_ci = LIBLTE_MME_ADD_CI_DONT_ADD;
emm_info.local_time_zone_present = false; emm_info.local_time_zone_present = false;

@ -66,6 +66,8 @@ void s1ap_nas_transport::init()
m_nas_init.tac = m_s1ap->m_s1ap_args.tac; m_nas_init.tac = m_s1ap->m_s1ap_args.tac;
m_nas_init.apn = m_s1ap->m_s1ap_args.mme_apn; m_nas_init.apn = m_s1ap->m_s1ap_args.mme_apn;
m_nas_init.dns = m_s1ap->m_s1ap_args.dns_addr; m_nas_init.dns = m_s1ap->m_s1ap_args.dns_addr;
m_nas_init.full_net_name = m_s1ap->m_s1ap_args.full_net_name;
m_nas_init.short_net_name = m_s1ap->m_s1ap_args.short_net_name;
m_nas_init.paging_timer = m_s1ap->m_s1ap_args.paging_timer; m_nas_init.paging_timer = m_s1ap->m_s1ap_args.paging_timer;
m_nas_init.integ_algo = m_s1ap->m_s1ap_args.integrity_algo; m_nas_init.integ_algo = m_s1ap->m_s1ap_args.integrity_algo;
m_nas_init.cipher_algo = m_s1ap->m_s1ap_args.encryption_algo; m_nas_init.cipher_algo = m_s1ap->m_s1ap_args.encryption_algo;

Loading…
Cancel
Save