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
c2dbba5d
Commit
c2dbba5d
authored
May 23, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
L3 RRC/NAS developments
parent
d79d6434
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
14 deletions
+23
-14
src/ue/nas/mm/dereg.cpp
src/ue/nas/mm/dereg.cpp
+11
-6
src/ue/nas/mm/messaging.cpp
src/ue/nas/mm/messaging.cpp
+4
-2
src/ue/nas/mm/mm.hpp
src/ue/nas/mm/mm.hpp
+2
-2
src/ue/nas/mm/proc.cpp
src/ue/nas/mm/proc.cpp
+4
-2
src/ue/types.hpp
src/ue/types.hpp
+2
-2
No files found.
src/ue/nas/mm/dereg.cpp
View file @
c2dbba5d
...
@@ -26,12 +26,12 @@ static nas::IEDeRegistrationType MakeDeRegistrationType(EDeregCause deregCause)
...
@@ -26,12 +26,12 @@ static nas::IEDeRegistrationType MakeDeRegistrationType(EDeregCause deregCause)
return
res
;
return
res
;
}
}
void
NasMm
::
sendDeregistration
(
EDeregCause
deregCause
)
EProcRc
NasMm
::
sendDeregistration
(
EDeregCause
deregCause
)
{
{
if
(
m_rmState
!=
ERmState
::
RM_REGISTERED
)
if
(
m_rmState
!=
ERmState
::
RM_REGISTERED
)
{
{
m_logger
->
warn
(
"De-registration could not be triggered. UE is already de-registered"
);
m_logger
->
warn
(
"De-registration could not be triggered. UE is already de-registered"
);
return
;
return
EProcRc
::
CANCEL
;
}
}
m_logger
->
debug
(
"Starting de-registration procedure due to [%s]"
,
ToJson
(
deregCause
).
str
().
c_str
());
m_logger
->
debug
(
"Starting de-registration procedure due to [%s]"
,
ToJson
(
deregCause
).
str
().
c_str
());
...
@@ -54,7 +54,10 @@ void NasMm::sendDeregistration(EDeregCause deregCause)
...
@@ -54,7 +54,10 @@ void NasMm::sendDeregistration(EDeregCause deregCause)
request
->
mobileIdentity
=
getOrGeneratePreferredId
();
request
->
mobileIdentity
=
getOrGeneratePreferredId
();
sendNasMessage
(
*
request
);
auto
rc
=
sendNasMessage
(
*
request
);
if
(
rc
!=
EProcRc
::
OK
)
return
EProcRc
::
STAY
;
m_lastDeregistrationRequest
=
std
::
move
(
request
);
m_lastDeregistrationRequest
=
std
::
move
(
request
);
m_lastDeregCause
=
deregCause
;
m_lastDeregCause
=
deregCause
;
m_timers
->
t3521
.
resetExpiryCount
();
m_timers
->
t3521
.
resetExpiryCount
();
...
@@ -65,6 +68,10 @@ void NasMm::sendDeregistration(EDeregCause deregCause)
...
@@ -65,6 +68,10 @@ void NasMm::sendDeregistration(EDeregCause deregCause)
m_timers
->
t3521
.
start
();
m_timers
->
t3521
.
start
();
}
}
m_sm
->
localReleaseAllSessions
();
switchMmState
(
EMmSubState
::
MM_DEREGISTERED_INITIATED_PS
);
// TODO: Bu ikisinin burada olması gerektiğinden emin değilim
// TODO: Bu ikisinin burada olması gerektiğinden emin değilim
if
(
deregCause
==
EDeregCause
::
SWITCH_OFF
)
if
(
deregCause
==
EDeregCause
::
SWITCH_OFF
)
{
{
...
@@ -78,9 +85,7 @@ void NasMm::sendDeregistration(EDeregCause deregCause)
...
@@ -78,9 +85,7 @@ void NasMm::sendDeregistration(EDeregCause deregCause)
m_usim
->
invalidate
();
m_usim
->
invalidate
();
}
}
m_sm
->
localReleaseAllSessions
();
return
EProcRc
::
OK
;
switchMmState
(
EMmSubState
::
MM_DEREGISTERED_INITIATED_PS
);
}
}
void
NasMm
::
receiveDeregistrationAccept
(
const
nas
::
DeRegistrationAcceptUeOriginating
&
msg
)
void
NasMm
::
receiveDeregistrationAccept
(
const
nas
::
DeRegistrationAcceptUeOriginating
&
msg
)
...
...
src/ue/nas/mm/messaging.cpp
View file @
c2dbba5d
...
@@ -103,14 +103,14 @@ static void RemoveCleartextIEs(nas::PlainMmMessage &msg, OctetString &&nasMsgCon
...
@@ -103,14 +103,14 @@ static void RemoveCleartextIEs(nas::PlainMmMessage &msg, OctetString &&nasMsgCon
}
}
}
}
void
NasMm
::
sendNasMessage
(
const
nas
::
PlainMmMessage
&
msg
)
EProcRc
NasMm
::
sendNasMessage
(
const
nas
::
PlainMmMessage
&
msg
)
{
{
if
(
m_cmState
==
ECmState
::
CM_IDLE
&&
!
IsInitialNasMessage
(
msg
))
if
(
m_cmState
==
ECmState
::
CM_IDLE
&&
!
IsInitialNasMessage
(
msg
))
{
{
m_logger
->
warn
(
"NAS Transport aborted, Service Request is needed for uplink signalling"
);
m_logger
->
warn
(
"NAS Transport aborted, Service Request is needed for uplink signalling"
);
if
(
m_mmState
!=
EMmState
::
MM_SERVICE_REQUEST_INITIATED
)
if
(
m_mmState
!=
EMmState
::
MM_SERVICE_REQUEST_INITIATED
)
serviceRequestRequiredForSignalling
();
serviceRequestRequiredForSignalling
();
return
;
return
EProcRc
::
STAY
;
}
}
bool
hasNsCtx
=
bool
hasNsCtx
=
...
@@ -170,6 +170,8 @@ void NasMm::sendNasMessage(const nas::PlainMmMessage &msg)
...
@@ -170,6 +170,8 @@ void NasMm::sendNasMessage(const nas::PlainMmMessage &msg)
m
->
pduId
=
0
;
m
->
pduId
=
0
;
m
->
nasPdu
=
std
::
move
(
pdu
);
m
->
nasPdu
=
std
::
move
(
pdu
);
m_base
->
rrcTask
->
push
(
m
);
m_base
->
rrcTask
->
push
(
m
);
return
EProcRc
::
OK
;
}
}
void
NasMm
::
receiveNasMessage
(
const
nas
::
NasMessage
&
msg
)
void
NasMm
::
receiveNasMessage
(
const
nas
::
NasMessage
&
msg
)
...
...
src/ue/nas/mm/mm.hpp
View file @
c2dbba5d
...
@@ -93,7 +93,7 @@ class NasMm
...
@@ -93,7 +93,7 @@ class NasMm
void
onSimRemoval
();
void
onSimRemoval
();
private:
/* Messaging */
private:
/* Messaging */
void
sendNasMessage
(
const
nas
::
PlainMmMessage
&
msg
);
EProcRc
sendNasMessage
(
const
nas
::
PlainMmMessage
&
msg
);
void
receiveNasMessage
(
const
nas
::
NasMessage
&
msg
);
void
receiveNasMessage
(
const
nas
::
NasMessage
&
msg
);
void
receiveMmMessage
(
const
nas
::
PlainMmMessage
&
msg
);
void
receiveMmMessage
(
const
nas
::
PlainMmMessage
&
msg
);
void
receiveMmStatus
(
const
nas
::
FiveGMmStatus
&
msg
);
void
receiveMmStatus
(
const
nas
::
FiveGMmStatus
&
msg
);
...
@@ -133,7 +133,7 @@ class NasMm
...
@@ -133,7 +133,7 @@ class NasMm
nas
::
IEUeSecurityCapability
createSecurityCapabilityIe
();
nas
::
IEUeSecurityCapability
createSecurityCapabilityIe
();
private:
/* De-registration */
private:
/* De-registration */
void
sendDeregistration
(
EDeregCause
deregCause
);
EProcRc
sendDeregistration
(
EDeregCause
deregCause
);
void
receiveDeregistrationAccept
(
const
nas
::
DeRegistrationAcceptUeOriginating
&
msg
);
void
receiveDeregistrationAccept
(
const
nas
::
DeRegistrationAcceptUeOriginating
&
msg
);
void
receiveDeregistrationRequest
(
const
nas
::
DeRegistrationRequestUeTerminated
&
msg
);
void
receiveDeregistrationRequest
(
const
nas
::
DeRegistrationRequestUeTerminated
&
msg
);
void
performLocalDeregistration
();
void
performLocalDeregistration
();
...
...
src/ue/nas/mm/proc.cpp
View file @
c2dbba5d
...
@@ -104,11 +104,13 @@ void NasMm::invokeProcedures()
...
@@ -104,11 +104,13 @@ void NasMm::invokeProcedures()
{
{
if
(
m_procCtl
.
deregistration
)
if
(
m_procCtl
.
deregistration
)
{
{
sendDeregistration
(
*
m_procCtl
.
deregistration
);
EProcRc
rc
=
sendDeregistration
(
*
m_procCtl
.
deregistration
);
if
(
rc
!=
EProcRc
::
STAY
)
m_procCtl
.
deregistration
=
std
::
nullopt
;
m_procCtl
.
initialRegistration
=
std
::
nullopt
;
m_procCtl
.
initialRegistration
=
std
::
nullopt
;
m_procCtl
.
mobilityRegistration
=
std
::
nullopt
;
m_procCtl
.
mobilityRegistration
=
std
::
nullopt
;
m_procCtl
.
serviceRequest
=
std
::
nullopt
;
m_procCtl
.
serviceRequest
=
std
::
nullopt
;
m_procCtl
.
deregistration
=
std
::
nullopt
;
return
;
return
;
}
}
...
...
src/ue/types.hpp
View file @
c2dbba5d
...
@@ -555,8 +555,8 @@ enum class EServiceReqCause
...
@@ -555,8 +555,8 @@ enum class EServiceReqCause
enum
class
EProcRc
enum
class
EProcRc
{
{
OK
,
OK
,
INVALID
,
CANCEL
,
FAIL
,
STAY
,
};
};
struct
ProcControl
struct
ProcControl
...
...
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