Commit 9b20fb79 authored by aligungr's avatar aligungr

UAC implementation

parent 1a6d3c28
...@@ -73,8 +73,9 @@ bool NasMm::isInNonAllowedArea() ...@@ -73,8 +73,9 @@ bool NasMm::isInNonAllowedArea()
return false; return false;
} }
std::bitset<16> NasMm::determineAccessIdentities() void NasMm::performUac()
{ {
auto accessIdentities = [this]() {
std::bitset<16> ais; std::bitset<16> ais;
auto currentPlmn = m_base->shCtx.getCurrentPlmn(); auto currentPlmn = m_base->shCtx.getCurrentPlmn();
...@@ -83,19 +84,15 @@ std::bitset<16> NasMm::determineAccessIdentities() ...@@ -83,19 +84,15 @@ std::bitset<16> NasMm::determineAccessIdentities()
{ {
if (currentPlmn == m_base->config->hplmn || m_storage->equivalentPlmnList->contains(currentPlmn) || if (currentPlmn == m_base->config->hplmn || m_storage->equivalentPlmnList->contains(currentPlmn) ||
currentPlmn.mcc == m_base->config->hplmn.mcc) currentPlmn.mcc == m_base->config->hplmn.mcc)
{
ais[1] = true; ais[1] = true;
} }
}
if (m_base->config->uacAic.mcs && m_rmState == ERmState::RM_REGISTERED && currentPlmn.hasValue()) if (m_base->config->uacAic.mcs && m_rmState == ERmState::RM_REGISTERED && currentPlmn.hasValue())
{ {
if (currentPlmn == m_base->config->hplmn || m_storage->equivalentPlmnList->contains(currentPlmn) || if (currentPlmn == m_base->config->hplmn || m_storage->equivalentPlmnList->contains(currentPlmn) ||
currentPlmn.mcc == m_base->config->hplmn.mcc) currentPlmn.mcc == m_base->config->hplmn.mcc)
{
ais[2] = true; ais[2] = true;
} }
}
if (m_nwFeatureSupport) if (m_nwFeatureSupport)
{ {
...@@ -124,10 +121,9 @@ std::bitset<16> NasMm::determineAccessIdentities() ...@@ -124,10 +121,9 @@ std::bitset<16> NasMm::determineAccessIdentities()
ais[0] = true; ais[0] = true;
return ais; return ais;
} }();
int NasMm::determineAccessCategory() auto accessCategory = [this]() {
{
/* Check for Rule #1 */ /* Check for Rule #1 */
if (m_procCtl.mobilityRegistration) if (m_procCtl.mobilityRegistration)
{ {
...@@ -179,6 +175,7 @@ int NasMm::determineAccessCategory() ...@@ -179,6 +175,7 @@ int NasMm::determineAccessCategory()
return 7; return 7;
return 0; return 0;
}();
} }
} // namespace nr::ue } // namespace nr::ue
...@@ -174,8 +174,7 @@ class NasMm ...@@ -174,8 +174,7 @@ class NasMm
bool hasEmergency(); bool hasEmergency();
void setN1Capability(bool enabled); void setN1Capability(bool enabled);
bool isInNonAllowedArea(); bool isInNonAllowedArea();
std::bitset<16> determineAccessIdentities(); void performUac();
int determineAccessCategory();
private: /* eCall */ private: /* eCall */
bool startECallInactivityIfNeeded(); bool startECallInactivityIfNeeded();
......
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