Commit ae86138d authored by aligungr's avatar aligungr

L3 RRC/NAS developments

parent 0cad0976
...@@ -18,6 +18,11 @@ imei: '356938035643803' ...@@ -18,6 +18,11 @@ imei: '356938035643803'
# IMEISV number of the device. It is used if no SUPI and IMEI is provided # IMEISV number of the device. It is used if no SUPI and IMEI is provided
imeiSv: '4370816125816151' imeiSv: '4370816125816151'
# Other USIM (Universal Subscriber Identity Module) Parameters
highPriority: false
eCallOnly: false
emergencyIndication: false
# List of gNB IP addresses for Radio Link Simulation # List of gNB IP addresses for Radio Link Simulation
gnbSearchList: gnbSearchList:
- 127.0.0.1 - 127.0.0.1
......
...@@ -118,7 +118,7 @@ void NasMm::receiveConfigurationUpdate(const nas::ConfigurationUpdateCommand &ms ...@@ -118,7 +118,7 @@ void NasMm::receiveConfigurationUpdate(const nas::ConfigurationUpdateCommand &ms
if (msg.allowedNssai.has_value()) if (msg.allowedNssai.has_value())
{ {
hasNewConfig = true; hasNewConfig = true;
m_usim->m_allowedNssai = nas::utils::NssaiTo(*msg.allowedNssai); m_storage->allowedNssai->set(nas::utils::NssaiTo(*msg.allowedNssai));
} }
// "If the UE receives a new configured NSSAI in the CONFIGURATION UPDATE COMMAND message, the UE shall consider the // "If the UE receives a new configured NSSAI in the CONFIGURATION UPDATE COMMAND message, the UE shall consider the
...@@ -128,7 +128,7 @@ void NasMm::receiveConfigurationUpdate(const nas::ConfigurationUpdateCommand &ms ...@@ -128,7 +128,7 @@ void NasMm::receiveConfigurationUpdate(const nas::ConfigurationUpdateCommand &ms
if (msg.configuredNssai.has_value()) if (msg.configuredNssai.has_value())
{ {
hasNewConfig = true; hasNewConfig = true;
m_usim->m_configuredNssai = nas::utils::NssaiTo(*msg.configuredNssai); m_storage->configuredNssai->set(nas::utils::NssaiTo(*msg.configuredNssai));
} }
// "If the UE receives the Network slicing indication IE in the CONFIGURATION UPDATE COMMAND message with the // "If the UE receives the Network slicing indication IE in the CONFIGURATION UPDATE COMMAND message with the
...@@ -149,13 +149,13 @@ void NasMm::receiveConfigurationUpdate(const nas::ConfigurationUpdateCommand &ms ...@@ -149,13 +149,13 @@ void NasMm::receiveConfigurationUpdate(const nas::ConfigurationUpdateCommand &ms
hasNewConfig = true; hasNewConfig = true;
for (auto &rejectedSlice : msg.rejectedNssai->list) for (auto &rejectedSlice : msg.rejectedNssai->list)
{ {
SingleSlice slice{}; SingleSlice slice;
slice.sst = rejectedSlice.sst; slice.sst = rejectedSlice.sst;
slice.sd = rejectedSlice.sd; slice.sd = rejectedSlice.sd;
auto &list = rejectedSlice.cause == nas::ERejectedSNssaiCause::NA_IN_PLMN ? m_usim->m_rejectedNssaiInPlmn auto &nssai = rejectedSlice.cause == nas::ERejectedSNssaiCause::NA_IN_PLMN ? m_storage->rejectedNssaiInPlmn
: m_usim->m_rejectedNssaiInTa; : m_storage->rejectedNssaiInTa;
list.addIfNotExists(slice); nssai->mutate([slice](auto &value) { value.addIfNotExists(slice); });
} }
} }
......
...@@ -208,8 +208,8 @@ void NasMm::receiveDeregistrationRequest(const nas::DeRegistrationRequestUeTermi ...@@ -208,8 +208,8 @@ void NasMm::receiveDeregistrationRequest(const nas::DeRegistrationRequestUeTermi
// "Upon sending a DEREGISTRATION ACCEPT message, the UE shall delete the rejected NSSAI as specified in // "Upon sending a DEREGISTRATION ACCEPT message, the UE shall delete the rejected NSSAI as specified in
// subclause 4.6.2.2." // subclause 4.6.2.2."
m_usim->m_rejectedNssaiInTa = {}; m_storage->rejectedNssaiInTa->clear();
m_usim->m_rejectedNssaiInPlmn = {}; m_storage->rejectedNssaiInPlmn->clear();
// Handle 5.5.2.3.4 Abnormal cases in the UE, item b) // Handle 5.5.2.3.4 Abnormal cases in the UE, item b)
auto handleAbnormal = [this]() { auto handleAbnormal = [this]() {
......
...@@ -352,13 +352,13 @@ void NasMm::receiveInitialRegistrationAccept(const nas::RegistrationAccept &msg) ...@@ -352,13 +352,13 @@ void NasMm::receiveInitialRegistrationAccept(const nas::RegistrationAccept &msg)
{ {
for (auto &rejectedSlice : msg.rejectedNSSAI->list) for (auto &rejectedSlice : msg.rejectedNSSAI->list)
{ {
SingleSlice slice{}; SingleSlice slice;
slice.sst = rejectedSlice.sst; slice.sst = rejectedSlice.sst;
slice.sd = rejectedSlice.sd; slice.sd = rejectedSlice.sd;
auto &list = rejectedSlice.cause == nas::ERejectedSNssaiCause::NA_IN_PLMN ? m_usim->m_rejectedNssaiInPlmn auto &nssai = rejectedSlice.cause == nas::ERejectedSNssaiCause::NA_IN_PLMN ? m_storage->rejectedNssaiInPlmn
: m_usim->m_rejectedNssaiInTa; : m_storage->rejectedNssaiInTa;
list.addIfNotExists(slice); nssai->mutate([slice](auto &value) { value.addIfNotExists(slice); });
} }
} }
...@@ -371,12 +371,12 @@ void NasMm::receiveInitialRegistrationAccept(const nas::RegistrationAccept &msg) ...@@ -371,12 +371,12 @@ void NasMm::receiveInitialRegistrationAccept(const nas::RegistrationAccept &msg)
} }
// Store the allowed NSSAI // Store the allowed NSSAI
m_usim->m_allowedNssai = nas::utils::NssaiTo(msg.allowedNSSAI.value_or(nas::IENssai{})); m_storage->allowedNssai->set(nas::utils::NssaiTo(msg.allowedNSSAI.value_or(nas::IENssai{})));
// Process configured NSSAI IE // Process configured NSSAI IE
if (msg.configuredNSSAI.has_value()) if (msg.configuredNSSAI.has_value())
{ {
m_usim->m_configuredNssai = nas::utils::NssaiTo(msg.configuredNSSAI.value_or(nas::IENssai{})); m_storage->configuredNssai->set(nas::utils::NssaiTo(msg.configuredNSSAI.value_or(nas::IENssai{})));
sendComplete = true; sendComplete = true;
} }
...@@ -484,9 +484,9 @@ void NasMm::receiveMobilityRegistrationAccept(const nas::RegistrationAccept &msg ...@@ -484,9 +484,9 @@ void NasMm::receiveMobilityRegistrationAccept(const nas::RegistrationAccept &msg
slice.sst = rejectedSlice.sst; slice.sst = rejectedSlice.sst;
slice.sd = rejectedSlice.sd; slice.sd = rejectedSlice.sd;
auto &list = rejectedSlice.cause == nas::ERejectedSNssaiCause::NA_IN_PLMN ? m_usim->m_rejectedNssaiInPlmn auto &nssai = rejectedSlice.cause == nas::ERejectedSNssaiCause::NA_IN_PLMN ? m_storage->rejectedNssaiInPlmn
: m_usim->m_rejectedNssaiInTa; : m_storage->rejectedNssaiInTa;
list.addIfNotExists(slice); nssai->mutate([slice](auto &value) { value.addIfNotExists(slice); });
} }
} }
...@@ -499,12 +499,12 @@ void NasMm::receiveMobilityRegistrationAccept(const nas::RegistrationAccept &msg ...@@ -499,12 +499,12 @@ void NasMm::receiveMobilityRegistrationAccept(const nas::RegistrationAccept &msg
} }
// Store the allowed NSSAI // Store the allowed NSSAI
m_usim->m_allowedNssai = nas::utils::NssaiTo(msg.allowedNSSAI.value_or(nas::IENssai{})); m_storage->allowedNssai->set(nas::utils::NssaiTo(msg.allowedNSSAI.value_or(nas::IENssai{})));
// Process configured NSSAI IE // Process configured NSSAI IE
if (msg.configuredNSSAI.has_value()) if (msg.configuredNSSAI.has_value())
{ {
m_usim->m_configuredNssai = nas::utils::NssaiTo(msg.configuredNSSAI.value_or(nas::IENssai{})); m_storage->configuredNssai->set(nas::utils::NssaiTo(msg.configuredNSSAI.value_or(nas::IENssai{})));
sendComplete = true; sendComplete = true;
} }
......
...@@ -43,25 +43,25 @@ NetworkSlice NasMm::makeRequestedNssai(bool &isDefaultNssai) const ...@@ -43,25 +43,25 @@ NetworkSlice NasMm::makeRequestedNssai(bool &isDefaultNssai) const
NetworkSlice res{}; NetworkSlice res{};
if (!m_usim->m_allowedNssai.slices.empty() || !m_usim->m_configuredNssai.slices.empty()) if (!m_storage->allowedNssai->get().slices.empty() || !m_storage->configuredNssai->get().slices.empty())
{ {
if (!m_usim->m_allowedNssai.slices.empty()) if (!m_storage->allowedNssai->get().slices.empty())
{ {
AppendSubset(m_usim->m_allowedNssai, res, m_usim->m_rejectedNssaiInPlmn, m_usim->m_rejectedNssaiInTa, AppendSubset(m_storage->allowedNssai->get(), res, m_storage->rejectedNssaiInPlmn->get(),
8); m_storage->rejectedNssaiInTa->get(), 8);
AppendSubset(m_usim->m_configuredNssai, res, m_usim->m_rejectedNssaiInPlmn, AppendSubset(m_storage->configuredNssai->get(), res, m_storage->rejectedNssaiInPlmn->get(),
m_usim->m_rejectedNssaiInTa, static_cast<size_t>(8) - res.slices.size()); m_storage->rejectedNssaiInTa->get(), static_cast<size_t>(8) - res.slices.size());
} }
else else
{ {
AppendSubset(m_usim->m_configuredNssai, res, m_usim->m_rejectedNssaiInPlmn, AppendSubset(m_storage->configuredNssai->get(), res, m_storage->rejectedNssaiInPlmn->get(),
m_usim->m_rejectedNssaiInTa, 8); m_storage->rejectedNssaiInTa->get(), 8);
} }
} }
else if (!m_usim->m_defConfiguredNssai.slices.empty()) else if (!m_storage->defConfiguredNssai->get().slices.empty())
{ {
AppendSubset(m_usim->m_defConfiguredNssai, res, m_usim->m_rejectedNssaiInPlmn, AppendSubset(m_storage->defConfiguredNssai->get(), res, m_storage->rejectedNssaiInPlmn->get(),
m_usim->m_rejectedNssaiInTa, 8); m_storage->rejectedNssaiInTa->get(), 8);
isDefaultNssai = true; isDefaultNssai = true;
} }
......
...@@ -22,9 +22,9 @@ namespace nr::ue ...@@ -22,9 +22,9 @@ namespace nr::ue
MmStorage::MmStorage(TaskBase *base) : m_base{base} MmStorage::MmStorage(TaskBase *base) : m_base{base}
{ {
uState = std::make_unique<nas::NasSlot<E5UState>>(0, std::nullopt); uState = std::make_unique<nas::NasSlot<E5UState>>(0, std::nullopt);
storedSuci = std::make_unique<nas::NasSlot<nas::IE5gsMobileIdentity>>(0, std::nullopt); storedSuci = std::make_unique<nas::NasSlot<nas::IE5gsMobileIdentity>>(0, std::nullopt);
storedGuti = std::make_unique<nas::NasSlot<nas::IE5gsMobileIdentity>>(0, std::nullopt); storedGuti = std::make_unique<nas::NasSlot<nas::IE5gsMobileIdentity>>(0, std::nullopt);
...@@ -47,6 +47,21 @@ MmStorage::MmStorage(TaskBase *base) : m_base{base} ...@@ -47,6 +47,21 @@ MmStorage::MmStorage(TaskBase *base) : m_base{base}
equivalentPlmnList = std::make_unique<nas::NasList<Plmn>>(16, 0, std::nullopt); equivalentPlmnList = std::make_unique<nas::NasList<Plmn>>(16, 0, std::nullopt);
forbiddenPlmnList = std::make_unique<nas::NasList<Plmn>>(16, 0, std::nullopt); forbiddenPlmnList = std::make_unique<nas::NasList<Plmn>>(16, 0, std::nullopt);
defConfiguredNssai = std::make_unique<nas::NasSlot<NetworkSlice>>(0, std::nullopt);
configuredNssai = std::make_unique<nas::NasSlot<NetworkSlice>>(0, std::nullopt);
allowedNssai = std::make_unique<nas::NasSlot<NetworkSlice>>(0, std::nullopt);
rejectedNssaiInPlmn = std::make_unique<nas::NasSlot<NetworkSlice>>(0, std::nullopt);
rejectedNssaiInTa = std::make_unique<nas::NasSlot<NetworkSlice>>(0, std::nullopt);
/////////////////////////////////////////////////////////////////////////////////////////////////////////
defConfiguredNssai->set(m_base->config->initials.defaultConfiguredNssai);
configuredNssai->set(m_base->config->initials.configuredNssai);
} }
} // namespace nr::ue } // namespace nr::ue
\ No newline at end of file
...@@ -34,6 +34,12 @@ class MmStorage ...@@ -34,6 +34,12 @@ class MmStorage
std::unique_ptr<nas::NasSlot<nas::IEServiceAreaList>> serviceAreaList; std::unique_ptr<nas::NasSlot<nas::IEServiceAreaList>> serviceAreaList;
std::unique_ptr<nas::NasSlot<NetworkSlice>> defConfiguredNssai;
std::unique_ptr<nas::NasSlot<NetworkSlice>> configuredNssai;
std::unique_ptr<nas::NasSlot<NetworkSlice>> allowedNssai;
std::unique_ptr<nas::NasSlot<NetworkSlice>> rejectedNssaiInPlmn;
std::unique_ptr<nas::NasSlot<NetworkSlice>> rejectedNssaiInTa;
public: public:
explicit MmStorage(TaskBase *base); explicit MmStorage(TaskBase *base);
}; };
......
...@@ -15,9 +15,6 @@ void ue::Usim::initialize(bool hasSupi, const UeConfig::Initials &initials) ...@@ -15,9 +15,6 @@ void ue::Usim::initialize(bool hasSupi, const UeConfig::Initials &initials)
{ {
m_isValid = hasSupi; m_isValid = hasSupi;
m_defConfiguredNssai = initials.defaultConfiguredNssai;
m_configuredNssai = initials.configuredNssai;
m_sqnMng = std::make_unique<SqnManager>(5ull, 1ull << 28ull); m_sqnMng = std::make_unique<SqnManager>(5ull, 1ull << 28ull);
} }
......
...@@ -34,13 +34,6 @@ class Usim ...@@ -34,13 +34,6 @@ class Usim
OctetString m_resStar{}; OctetString m_resStar{};
std::unique_ptr<SqnManager> m_sqnMng{}; std::unique_ptr<SqnManager> m_sqnMng{};
// NSSAI related
NetworkSlice m_defConfiguredNssai{};
NetworkSlice m_configuredNssai{};
NetworkSlice m_allowedNssai{};
NetworkSlice m_rejectedNssaiInPlmn{};
NetworkSlice m_rejectedNssaiInTa{};
// NITZ related // NITZ related
std::optional<nas::IENetworkName> m_networkFullName{}; std::optional<nas::IENetworkName> m_networkFullName{};
std::optional<nas::IENetworkName> m_networkShortName{}; std::optional<nas::IENetworkName> m_networkShortName{};
......
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