Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
UERANSIM
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
UERANSIM
Commits
ae86138d
Commit
ae86138d
authored
May 27, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
L3 RRC/NAS developments
parent
0cad0976
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
58 additions
and
42 deletions
+58
-42
config/open5gs-ue.yaml
config/open5gs-ue.yaml
+5
-0
src/ue/nas/mm/config.cpp
src/ue/nas/mm/config.cpp
+6
-6
src/ue/nas/mm/dereg.cpp
src/ue/nas/mm/dereg.cpp
+2
-2
src/ue/nas/mm/register.cpp
src/ue/nas/mm/register.cpp
+11
-11
src/ue/nas/mm/slice.cpp
src/ue/nas/mm/slice.cpp
+11
-11
src/ue/nas/storage.cpp
src/ue/nas/storage.cpp
+17
-2
src/ue/nas/storage.hpp
src/ue/nas/storage.hpp
+6
-0
src/ue/nas/usim/usim.cpp
src/ue/nas/usim/usim.cpp
+0
-3
src/ue/nas/usim/usim.hpp
src/ue/nas/usim/usim.hpp
+0
-7
No files found.
config/open5gs-ue.yaml
View file @
ae86138d
...
@@ -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
...
...
src/ue/nas/mm/config.cpp
View file @
ae86138d
...
@@ -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
);
}
);
}
}
}
}
...
...
src/ue/nas/mm/dereg.cpp
View file @
ae86138d
...
@@ -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
]()
{
...
...
src/ue/nas/mm/register.cpp
View file @
ae86138d
...
@@ -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
;
}
}
...
...
src/ue/nas/mm/slice.cpp
View file @
ae86138d
...
@@ -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
;
}
}
...
...
src/ue/nas/storage.cpp
View file @
ae86138d
...
@@ -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
src/ue/nas/storage.hpp
View file @
ae86138d
...
@@ -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
);
};
};
...
...
src/ue/nas/usim/usim.cpp
View file @
ae86138d
...
@@ -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
);
}
}
...
...
src/ue/nas/usim/usim.hpp
View file @
ae86138d
...
@@ -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
{};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment