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
5a88cd6f
Commit
5a88cd6f
authored
Apr 04, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Service request handling
parent
eae9085b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
43 additions
and
4 deletions
+43
-4
src/ue/nas/mm/service.cpp
src/ue/nas/mm/service.cpp
+13
-4
src/ue/types.cpp
src/ue/types.cpp
+29
-0
src/ue/types.hpp
src/ue/types.hpp
+1
-0
No files found.
src/ue/nas/mm/service.cpp
View file @
5a88cd6f
...
@@ -15,7 +15,7 @@ namespace nr::ue
...
@@ -15,7 +15,7 @@ namespace nr::ue
void
NasMm
::
sendServiceRequest
(
EServiceReqCause
reqCause
)
void
NasMm
::
sendServiceRequest
(
EServiceReqCause
reqCause
)
{
{
m_logger
->
debug
(
"Sending Service Request
"
);
m_logger
->
debug
(
"Sending Service Request
due to [%s]"
,
ToJson
(
reqCause
).
str
().
c_str
()
);
auto
request
=
std
::
make_unique
<
nas
::
ServiceRequest
>
();
auto
request
=
std
::
make_unique
<
nas
::
ServiceRequest
>
();
...
@@ -170,15 +170,24 @@ void NasMm::receiveServiceAccept(const nas::ServiceAccept &msg)
...
@@ -170,15 +170,24 @@ void NasMm::receiveServiceAccept(const nas::ServiceAccept &msg)
void
NasMm
::
receiveServiceReject
(
const
nas
::
ServiceReject
&
msg
)
void
NasMm
::
receiveServiceReject
(
const
nas
::
ServiceReject
&
msg
)
{
{
if
(
m_mmState
!=
EMmState
::
MM_SERVICE_REQUEST_INITIATED
)
{
m_logger
->
warn
(
"Service Reject ignored since the MM state is not MM_SERVICE_REQUEST_INITIATED"
);
sendMmStatus
(
nas
::
EMmCause
::
MESSAGE_NOT_COMPATIBLE_WITH_PROTOCOL_STATE
);
return
;
}
auto
cause
=
msg
.
mmCause
.
value
;
m_logger
->
err
(
"Service Request failed [%s]"
,
nas
::
utils
::
EnumToString
(
cause
));
// Handle EAP message
if
(
msg
.
eapMessage
.
has_value
())
if
(
msg
.
eapMessage
.
has_value
())
{
{
if
(
msg
.
eapMessage
->
eap
->
code
==
eap
::
ECode
::
FAILURE
)
if
(
msg
.
eapMessage
->
eap
->
code
==
eap
::
ECode
::
FAILURE
)
receiveEapFailureMessage
(
*
msg
.
eapMessage
->
eap
);
receiveEapFailureMessage
(
*
msg
.
eapMessage
->
eap
);
else
else
m_logger
->
warn
(
"Network sent EAP with inconvenient type in Service
Accep
t, ignoring EAP IE."
);
m_logger
->
warn
(
"Network sent EAP with inconvenient type in Service
Rejec
t, ignoring EAP IE."
);
}
}
// TODO
}
}
}
// namespace nr::ue
}
// namespace nr::ue
src/ue/types.cpp
View file @
5a88cd6f
...
@@ -243,4 +243,33 @@ Json ToJson(const UePduSessionInfo &v)
...
@@ -243,4 +243,33 @@ Json ToJson(const UePduSessionInfo &v)
});
});
}
}
Json
ToJson
(
const
EServiceReqCause
&
v
)
{
switch
(
v
)
{
case
EServiceReqCause
:
:
UNSPECIFIED
:
return
"UNSPECIFIED"
;
case
EServiceReqCause
:
:
IDLE_PAGING
:
return
"IDLE_PAGING"
;
case
EServiceReqCause
:
:
CONNECTED_3GPP_NOTIFICATION_N3GPP
:
return
"CONNECTED_3GPP_NOTIFICATION_N3GPP"
;
case
EServiceReqCause
:
:
IDLE_UPLINK_SIGNAL_PENDING
:
return
"IDLE_UPLINK_SIGNAL_PENDING"
;
case
EServiceReqCause
:
:
IDLE_UPLINK_DATA_PENDING
:
return
"IDLE_UPLINK_DATA_PENDING"
;
case
EServiceReqCause
:
:
CONNECTED_UPLINK_DATA_PENDING
:
return
"CONNECTED_UPLINK_DATA_PENDING"
;
case
EServiceReqCause
:
:
NON_3GPP_AS_ESTABLISHED
:
return
"NON_3GPP_AS_ESTABLISHED"
;
case
EServiceReqCause
:
:
IDLE_3GPP_NOTIFICATION_N3GPP
:
return
"IDLE_3GPP_NOTIFICATION_N3GPP"
;
case
EServiceReqCause
:
:
EMERGENCY_FALLBACK
:
return
"EMERGENCY_FALLBACK"
;
case
EServiceReqCause
:
:
FALLBACK_INDICATION
:
return
"FALLBACK_INDICATION"
;
default:
return
"?"
;
}
}
}
// namespace nr::ue
}
// namespace nr::ue
src/ue/types.hpp
View file @
5a88cd6f
...
@@ -495,5 +495,6 @@ Json ToJson(const UeTimers &v);
...
@@ -495,5 +495,6 @@ Json ToJson(const UeTimers &v);
Json
ToJson
(
const
ERegUpdateCause
&
v
);
Json
ToJson
(
const
ERegUpdateCause
&
v
);
Json
ToJson
(
const
EPsState
&
v
);
Json
ToJson
(
const
EPsState
&
v
);
Json
ToJson
(
const
UePduSessionInfo
&
v
);
Json
ToJson
(
const
UePduSessionInfo
&
v
);
Json
ToJson
(
const
EServiceReqCause
&
v
);
}
// namespace nr::ue
}
// namespace nr::ue
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