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
7ab16895
Commit
7ab16895
authored
Oct 07, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
S-TMSI handling in Initial UE Message
parent
bbf325ab
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
28 additions
and
5 deletions
+28
-5
src/gnb/ngap/nas.cpp
src/gnb/ngap/nas.cpp
+21
-2
src/gnb/ngap/task.cpp
src/gnb/ngap/task.cpp
+1
-1
src/gnb/ngap/task.hpp
src/gnb/ngap/task.hpp
+3
-2
src/gnb/nts.hpp
src/gnb/nts.hpp
+1
-0
src/gnb/rrc/connection.cpp
src/gnb/rrc/connection.cpp
+2
-0
No files found.
src/gnb/ngap/nas.cpp
View file @
7ab16895
...
...
@@ -24,7 +24,8 @@
namespace
nr
::
gnb
{
void
NgapTask
::
handleInitialNasTransport
(
int
ueId
,
const
OctetString
&
nasPdu
,
long
rrcEstablishmentCause
)
void
NgapTask
::
handleInitialNasTransport
(
int
ueId
,
const
OctetString
&
nasPdu
,
long
rrcEstablishmentCause
,
const
std
::
optional
<
GutiMobileIdentity
>
&
sTmsi
)
{
m_logger
->
debug
(
"Initial NAS message received from UE[%d]"
,
ueId
);
...
...
@@ -54,25 +55,43 @@ void NgapTask::handleInitialNasTransport(int ueId, const OctetString &nasPdu, lo
amfCtx
->
nextStream
+=
1
;
ueCtx
->
uplinkStream
=
amfCtx
->
nextStream
;
std
::
vector
<
ASN_NGAP_InitialUEMessage_IEs
*>
ies
;
auto
*
ieEstablishmentCause
=
asn
::
New
<
ASN_NGAP_InitialUEMessage_IEs
>
();
ieEstablishmentCause
->
id
=
ASN_NGAP_ProtocolIE_ID_id_RRCEstablishmentCause
;
ieEstablishmentCause
->
criticality
=
ASN_NGAP_Criticality_ignore
;
ieEstablishmentCause
->
value
.
present
=
ASN_NGAP_InitialUEMessage_IEs__value_PR_RRCEstablishmentCause
;
ieEstablishmentCause
->
value
.
choice
.
RRCEstablishmentCause
=
rrcEstablishmentCause
;
ies
.
push_back
(
ieEstablishmentCause
);
auto
*
ieCtxRequest
=
asn
::
New
<
ASN_NGAP_InitialUEMessage_IEs
>
();
ieCtxRequest
->
id
=
ASN_NGAP_ProtocolIE_ID_id_UEContextRequest
;
ieCtxRequest
->
criticality
=
ASN_NGAP_Criticality_ignore
;
ieCtxRequest
->
value
.
present
=
ASN_NGAP_InitialUEMessage_IEs__value_PR_UEContextRequest
;
ieCtxRequest
->
value
.
choice
.
UEContextRequest
=
ASN_NGAP_UEContextRequest_requested
;
ies
.
push_back
(
ieCtxRequest
);
auto
*
ieNasPdu
=
asn
::
New
<
ASN_NGAP_InitialUEMessage_IEs
>
();
ieNasPdu
->
id
=
ASN_NGAP_ProtocolIE_ID_id_NAS_PDU
;
ieNasPdu
->
criticality
=
ASN_NGAP_Criticality_reject
;
ieNasPdu
->
value
.
present
=
ASN_NGAP_InitialUEMessage_IEs__value_PR_NAS_PDU
;
asn
::
SetOctetString
(
ieNasPdu
->
value
.
choice
.
NAS_PDU
,
nasPdu
);
ies
.
push_back
(
ieNasPdu
);
if
(
sTmsi
)
{
auto
*
ieTmsi
=
asn
::
New
<
ASN_NGAP_InitialUEMessage_IEs
>
();
ieTmsi
->
id
=
ASN_NGAP_ProtocolIE_ID_id_FiveG_S_TMSI
;
ieTmsi
->
criticality
=
ASN_NGAP_Criticality_reject
;
ieTmsi
->
value
.
present
=
ASN_NGAP_InitialUEMessage_IEs__value_PR_FiveG_S_TMSI
;
asn
::
SetBitStringInt
<
10
>
(
sTmsi
->
amfSetId
,
ieTmsi
->
value
.
choice
.
FiveG_S_TMSI
.
aMFSetID
);
asn
::
SetBitStringInt
<
6
>
(
sTmsi
->
amfPointer
,
ieTmsi
->
value
.
choice
.
FiveG_S_TMSI
.
aMFPointer
);
asn
::
SetOctetString4
(
ieTmsi
->
value
.
choice
.
FiveG_S_TMSI
.
fiveG_TMSI
,
sTmsi
->
tmsi
);
ies
.
push_back
(
ieTmsi
);
}
auto
*
pdu
=
asn
::
ngap
::
NewMessagePdu
<
ASN_NGAP_InitialUEMessage
>
(
{
ieEstablishmentCause
,
ieCtxRequest
,
ieNasPdu
}
);
auto
*
pdu
=
asn
::
ngap
::
NewMessagePdu
<
ASN_NGAP_InitialUEMessage
>
(
ies
);
sendNgapUeAssociated
(
ueId
,
pdu
);
}
...
...
src/gnb/ngap/task.cpp
View file @
7ab16895
...
...
@@ -55,7 +55,7 @@ void NgapTask::onLoop()
switch
(
w
->
present
)
{
case
NmGnbRrcToNgap
:
:
INITIAL_NAS_DELIVERY
:
{
handleInitialNasTransport
(
w
->
ueId
,
w
->
pdu
,
w
->
rrcEstablishmentCause
);
handleInitialNasTransport
(
w
->
ueId
,
w
->
pdu
,
w
->
rrcEstablishmentCause
,
w
->
sTmsi
);
break
;
}
case
NmGnbRrcToNgap
:
:
UPLINK_NAS_DELIVERY
:
{
...
...
src/gnb/ngap/task.hpp
View file @
7ab16895
...
...
@@ -98,7 +98,8 @@ class NgapTask : public NtsTask
bool
handleSctpStreamId
(
int
amfId
,
int
stream
,
const
ASN_NGAP_NGAP_PDU
&
pdu
);
/* NAS transport */
void
handleInitialNasTransport
(
int
ueId
,
const
OctetString
&
nasPdu
,
long
rrcEstablishmentCause
);
void
handleInitialNasTransport
(
int
ueId
,
const
OctetString
&
nasPdu
,
long
rrcEstablishmentCause
,
const
std
::
optional
<
GutiMobileIdentity
>
&
sTmsi
);
void
handleUplinkNasTransport
(
int
ueId
,
const
OctetString
&
nasPdu
);
void
receiveDownlinkNasTransport
(
int
amfId
,
ASN_NGAP_DownlinkNASTransport
*
msg
);
void
deliverDownlinkNas
(
int
ueId
,
OctetString
&&
nasPdu
);
...
...
@@ -108,7 +109,7 @@ class NgapTask : public NtsTask
/* PDU session management */
void
receiveSessionResourceSetupRequest
(
int
amfId
,
ASN_NGAP_PDUSessionResourceSetupRequest
*
msg
);
void
receiveSessionResourceReleaseCommand
(
int
amfId
,
ASN_NGAP_PDUSessionResourceReleaseCommand
*
msg
);
std
::
optional
<
NgapCause
>
setupPduSessionResource
(
NgapUeContext
*
ue
,
PduSessionResource
*
resource
);
std
::
optional
<
NgapCause
>
setupPduSessionResource
(
NgapUeContext
*
ue
,
PduSessionResource
*
resource
);
/* UE context management */
void
receiveInitialContextSetup
(
int
amfId
,
ASN_NGAP_InitialContextSetupRequest
*
msg
);
...
...
src/gnb/nts.hpp
View file @
7ab16895
...
...
@@ -204,6 +204,7 @@ struct NmGnbRrcToNgap : NtsMessage
// INITIAL_NAS_DELIVERY
long
rrcEstablishmentCause
{};
std
::
optional
<
GutiMobileIdentity
>
sTmsi
{};
explicit
NmGnbRrcToNgap
(
PR
present
)
:
NtsMessage
(
NtsMessageType
::
GNB_RRC_TO_NGAP
),
present
(
present
)
{
...
...
src/gnb/rrc/connection.cpp
View file @
7ab16895
...
...
@@ -104,6 +104,8 @@ void GnbRrcTask::receiveRrcSetupComplete(int ueId, const ASN_RRC_RRCSetupComplet
w
->
ueId
=
ueId
;
w
->
pdu
=
asn
::
GetOctetString
(
setupComplete
->
dedicatedNAS_Message
);
w
->
rrcEstablishmentCause
=
ue
->
establishmentCause
;
w
->
sTmsi
=
std
::
nullopt
;
// TODO
m_base
->
ngapTask
->
push
(
w
);
}
...
...
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