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
8078dd5f
Commit
8078dd5f
authored
May 17, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RRC developments
parent
03d6cc66
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
83 additions
and
1 deletion
+83
-1
src/ue/nas/storage.cpp
src/ue/nas/storage.cpp
+24
-0
src/ue/nas/storage.hpp
src/ue/nas/storage.hpp
+25
-0
src/utils/common_types.cpp
src/utils/common_types.cpp
+20
-0
src/utils/common_types.hpp
src/utils/common_types.hpp
+14
-1
No files found.
src/ue/nas/storage.cpp
0 → 100644
View file @
8078dd5f
//
// This file is a part of UERANSIM open source project.
// Copyright (c) 2021 ALİ GÜNGÖR.
//
// The software and all associated files are licensed under GPL-3.0
// and subject to the terms and conditions defined in LICENSE file.
//
#include "storage.hpp"
static
constexpr
const
size_t
FORBIDDEN_TAI_LIST_SIZE
=
40
;
static
constexpr
const
int64_t
FORBIDDEN_TAI_CLEAR_PERIOD
=
1000ll
*
60ll
*
60ll
*
12ll
;
namespace
nr
::
ue
{
MmStorage
::
MmStorage
()
:
m_forbiddenTaiListRoaming
{
FORBIDDEN_TAI_LIST_SIZE
,
FORBIDDEN_TAI_CLEAR_PERIOD
},
m_forbiddenTaiListRps
{
FORBIDDEN_TAI_LIST_SIZE
,
FORBIDDEN_TAI_CLEAR_PERIOD
}
{
}
}
// namespace nr::ue
\ No newline at end of file
src/ue/nas/storage.hpp
0 → 100644
View file @
8078dd5f
//
// This file is a part of UERANSIM open source project.
// Copyright (c) 2021 ALİ GÜNGÖR.
//
// The software and all associated files are licensed under GPL-3.0
// and subject to the terms and conditions defined in LICENSE file.
//
#include <lib/nas/msg.hpp>
#include <lib/nas/storage.hpp>
namespace
nr
::
ue
{
class
MmStorage
{
public:
nas
::
NasListT1
<
Tai
>
m_forbiddenTaiListRoaming
;
nas
::
NasListT1
<
Tai
>
m_forbiddenTaiListRps
;
public:
MmStorage
();
};
}
// namespace nr::ue
src/utils/common_types.cpp
View file @
8078dd5f
...
...
@@ -104,6 +104,11 @@ bool operator==(const SingleSlice &lhs, const SingleSlice &rhs)
return
((
int
)
*
lhs
.
sd
)
==
((
int
)
*
rhs
.
sd
);
}
bool
operator
!=
(
const
SingleSlice
&
lhs
,
const
SingleSlice
&
rhs
)
{
return
!
(
lhs
==
rhs
);
}
bool
operator
==
(
const
Plmn
&
lhs
,
const
Plmn
&
rhs
)
{
if
(
lhs
.
mcc
!=
rhs
.
mcc
)
...
...
@@ -123,6 +128,21 @@ bool operator==(const GlobalNci &lhs, const GlobalNci &rhs)
return
lhs
.
plmn
==
rhs
.
plmn
&&
lhs
.
nci
==
rhs
.
nci
;
}
bool
operator
!=
(
const
GlobalNci
&
lhs
,
const
GlobalNci
&
rhs
)
{
return
!
(
lhs
==
rhs
);
}
bool
operator
==
(
const
Tai
&
lhs
,
const
Tai
&
rhs
)
{
return
lhs
.
plmn
==
rhs
.
plmn
&&
lhs
.
tac
==
rhs
.
tac
;
}
bool
operator
!=
(
const
Tai
&
lhs
,
const
Tai
&
rhs
)
{
return
!
(
lhs
==
rhs
);
}
void
NetworkSlice
::
addIfNotExists
(
const
SingleSlice
&
slice
)
{
if
(
!
std
::
any_of
(
slices
.
begin
(),
slices
.
end
(),
[
&
slice
](
auto
&
s
)
{
return
s
==
slice
;
}))
...
...
src/utils/common_types.hpp
View file @
8078dd5f
...
...
@@ -34,6 +34,12 @@ struct Plmn
[[
nodiscard
]]
bool
hasValue
()
const
;
};
struct
Tai
{
Plmn
plmn
;
int
tac
{};
};
struct
SingleSlice
{
octet
sst
{};
...
...
@@ -196,10 +202,17 @@ struct UacAiBarringSet
bool
ai15
=
false
;
};
bool
operator
==
(
const
SingleSlice
&
lhs
,
const
SingleSlice
&
rhs
);
bool
operator
==
(
const
Plmn
&
lhs
,
const
Plmn
&
rhs
);
bool
operator
!=
(
const
Plmn
&
lhs
,
const
Plmn
&
rhs
);
bool
operator
==
(
const
Tai
&
lhs
,
const
Tai
&
rhs
);
bool
operator
!=
(
const
Tai
&
lhs
,
const
Tai
&
rhs
);
bool
operator
==
(
const
SingleSlice
&
lhs
,
const
SingleSlice
&
rhs
);
bool
operator
!=
(
const
SingleSlice
&
lhs
,
const
SingleSlice
&
rhs
);
bool
operator
==
(
const
GlobalNci
&
lhs
,
const
GlobalNci
&
rhs
);
bool
operator
!=
(
const
GlobalNci
&
lhs
,
const
GlobalNci
&
rhs
);
Json
ToJson
(
const
Supi
&
v
);
Json
ToJson
(
const
Plmn
&
v
);
...
...
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