Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
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
spbro
OpenXG-RAN
Commits
dfa50d97
Commit
dfa50d97
authored
Oct 16, 2020
by
Xue Song
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Modify RRCSetupComplete
parent
5697057f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
6 deletions
+33
-6
openair2/RRC/NR/MESSAGES/asn1_msg.c
openair2/RRC/NR/MESSAGES/asn1_msg.c
+1
-2
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+32
-4
No files found.
openair2/RRC/NR/MESSAGES/asn1_msg.c
View file @
dfa50d97
...
...
@@ -1115,12 +1115,11 @@ uint8_t do_RRCSetupRequest(uint8_t Mod_id, uint8_t *buffer,uint8_t *rv) {
rrcSetupRequest
->
rrcSetupRequest
.
ue_Identity
.
choice
.
randomValue
.
size
=
5
;
rrcSetupRequest
->
rrcSetupRequest
.
ue_Identity
.
choice
.
randomValue
.
bits_unused
=
1
;
rrcSetupRequest
->
rrcSetupRequest
.
ue_Identity
.
choice
.
randomValue
.
buf
=
buf
;
rv
[
0
]
=
rv
[
0
]
&
0x7F
;
rrcSetupRequest
->
rrcSetupRequest
.
ue_Identity
.
choice
.
randomValue
.
buf
[
0
]
=
rv
[
0
];
rrcSetupRequest
->
rrcSetupRequest
.
ue_Identity
.
choice
.
randomValue
.
buf
[
1
]
=
rv
[
1
];
rrcSetupRequest
->
rrcSetupRequest
.
ue_Identity
.
choice
.
randomValue
.
buf
[
2
]
=
rv
[
2
];
rrcSetupRequest
->
rrcSetupRequest
.
ue_Identity
.
choice
.
randomValue
.
buf
[
3
]
=
rv
[
3
];
rrcSetupRequest
->
rrcSetupRequest
.
ue_Identity
.
choice
.
randomValue
.
buf
[
4
]
=
rv
[
4
];
rrcSetupRequest
->
rrcSetupRequest
.
ue_Identity
.
choice
.
randomValue
.
buf
[
4
]
=
rv
[
4
]
&
0xfe
;
}
else
{
rrcSetupRequest
->
rrcSetupRequest
.
ue_Identity
.
present
=
NR_InitialUE_Identity_PR_ng_5G_S_TMSI_Part1
;
rrcSetupRequest
->
rrcSetupRequest
.
ue_Identity
.
choice
.
ng_5G_S_TMSI_Part1
.
size
=
1
;
...
...
openair2/RRC/NR/rrc_gNB.c
View file @
dfa50d97
...
...
@@ -86,6 +86,9 @@
#include "executables/softmodem-common.h"
#include <openair2/RRC/NR/rrc_gNB_UE_context.h>
#include "BIT_STRING.h"
#include "assertions.h"
//#define XER_PRINT
extern
RAN_CONTEXT_t
RC
;
...
...
@@ -112,6 +115,8 @@ extern rlc_op_status_t nr_rrc_rlc_config_asn1_req (const protocol_ctxt_t * con
const
LTE_PMCH_InfoList_r9_t
*
const
pmch_InfoList_r9_pP
,
struct
NR_CellGroupConfig__rlc_BearerToAddModList
*
rlc_bearer2add_list
);
static
inline
uint64_t
bitStr_to_uint64
(
BIT_STRING_t
*
asn
);
mui_t
rrc_gNB_mui
=
0
;
///---------------------------------------------------------------------------------------------------------------///
...
...
@@ -773,7 +778,7 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP,
return
-
1
;
}
uint64_t
s_tmsi_part1
=
BIT_STRING
_to_uint64
(
&
rrcSetupRequest
->
ue_Identity
.
choice
.
ng_5G_S_TMSI_Part1
);
uint64_t
s_tmsi_part1
=
bitStr
_to_uint64
(
&
rrcSetupRequest
->
ue_Identity
.
choice
.
ng_5G_S_TMSI_Part1
);
// memcpy(((uint8_t *) & random_value) + 3,
// rrcSetupRequest->ue_Identity.choice.ng_5G_S_TMSI_Part1.buf,
...
...
@@ -857,6 +862,29 @@ int nr_rrc_gNB_decode_ccch(protocol_ctxt_t *const ctxt_pP,
return
0
;
}
/*! \fn uint64_t bitStr_to_uint64(BIT_STRING_t *)
*\brief This function extract at most a 64 bits value from a BIT_STRING_t object, the exact bits number depend on the BIT_STRING_t contents.
*\param[in] pointer to the BIT_STRING_t object.
*\return the extracted value.
*/
static
inline
uint64_t
bitStr_to_uint64
(
BIT_STRING_t
*
asn
)
{
uint64_t
result
=
0
;
int
index
;
int
shift
;
DevCheck
((
asn
->
size
>
0
)
&&
(
asn
->
size
<=
8
),
asn
->
size
,
0
,
0
);
shift
=
((
asn
->
size
-
1
)
*
8
)
-
asn
->
bits_unused
;
for
(
index
=
0
;
index
<
(
asn
->
size
-
1
);
index
++
)
{
result
|=
(
uint64_t
)
asn
->
buf
[
index
]
<<
shift
;
shift
-=
8
;
}
result
|=
asn
->
buf
[
index
]
>>
asn
->
bits_unused
;
return
result
;
}
//-----------------------------------------------------------------------------
int
rrc_gNB_decode_dcch
(
...
...
@@ -894,7 +922,7 @@ rrc_gNB_decode_dcch(
sdu_sizeP
,
0
,
0
);
xer_fprint
(
stdout
,
&
asn_DEF_NR_UL_DCCH_Message
,
(
void
*
)
&
ul_dcch_msg
);
//
xer_fprint(stdout, &asn_DEF_NR_UL_DCCH_Message, (void *)&ul_dcch_msg);
{
for
(
i
=
0
;
i
<
sdu_sizeP
;
i
++
)
{
...
...
@@ -1019,9 +1047,9 @@ rrc_gNB_decode_dcch(
return
-
1
;
}
uint64_t
fiveg_s_TMSI
=
BIT_STRING
_to_uint64
(
&
ul_dcch_msg
->
message
.
choice
.
c1
->
choice
.
rrcSetupComplete
->
uint64_t
fiveg_s_TMSI
=
bitStr
_to_uint64
(
&
ul_dcch_msg
->
message
.
choice
.
c1
->
choice
.
rrcSetupComplete
->
criticalExtensions
.
choice
.
rrcSetupComplete
->
ng_5G_S_TMSI_Value
->
choice
.
ng_5G_S_TMSI
);
LOG_I
(
NR_RRC
,
"Received rrcSetupComplete, 5g_s_TMSI: 0x%lX, amf_set_id: 0x%lX(%d), amf_pointer: 0x%lX(%d), 5g TMSI: 0x%
l
X
\n
"
,
LOG_I
(
NR_RRC
,
"Received rrcSetupComplete, 5g_s_TMSI: 0x%lX, amf_set_id: 0x%lX(%d), amf_pointer: 0x%lX(%d), 5g TMSI: 0x%X
\n
"
,
fiveg_s_TMSI
,
fiveg_s_TMSI
>>
38
,
fiveg_s_TMSI
>>
38
,
(
fiveg_s_TMSI
>>
32
)
&
0x3F
,
(
fiveg_s_TMSI
>>
32
)
&
0x3F
,
(
uint32_t
)
fiveg_s_TMSI
);
...
...
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