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
8e368396
Commit
8e368396
authored
Dec 22, 2021
by
aligungr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Global gNodeB ID bug fix
parent
b0aef086
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
5 deletions
+6
-5
src/gnb/ngap/interface.cpp
src/gnb/ngap/interface.cpp
+2
-1
src/lib/asn/utils.cpp
src/lib/asn/utils.cpp
+3
-3
src/lib/asn/utils.hpp
src/lib/asn/utils.hpp
+1
-1
No files found.
src/gnb/ngap/interface.cpp
View file @
8e368396
...
...
@@ -122,7 +122,8 @@ void NgapTask::sendNgSetupRequest(int amfId)
auto
*
globalGnbId
=
asn
::
New
<
ASN_NGAP_GlobalGNB_ID
>
();
globalGnbId
->
gNB_ID
.
present
=
ASN_NGAP_GNB_ID_PR_gNB_ID
;
asn
::
SetBitString
(
globalGnbId
->
gNB_ID
.
choice
.
gNB_ID
,
octet4
{
m_base
->
config
->
getGnbId
()});
asn
::
SetBitString
(
globalGnbId
->
gNB_ID
.
choice
.
gNB_ID
,
octet4
{
m_base
->
config
->
getGnbId
()},
static_cast
<
size_t
>
(
m_base
->
config
->
gnbIdLength
));
asn
::
SetOctetString3
(
globalGnbId
->
pLMNIdentity
,
ngap_utils
::
PlmnToOctet3
(
m_base
->
config
->
plmn
));
auto
*
ieGlobalGnbId
=
asn
::
New
<
ASN_NGAP_NGSetupRequestIEs
>
();
...
...
src/lib/asn/utils.cpp
View file @
8e368396
...
...
@@ -60,7 +60,7 @@ void SetOctetString(OCTET_STRING_t &target, const OctetString &value)
throw
std
::
runtime_error
(
"OCTET_STRING_fromBuf failed"
);
}
void
SetBitString
(
BIT_STRING_t
&
target
,
octet4
value
)
void
SetBitString
(
BIT_STRING_t
&
target
,
octet4
value
,
size_t
bitCount
)
{
if
(
target
.
buf
)
free
(
target
.
buf
);
...
...
@@ -70,8 +70,8 @@ void SetBitString(BIT_STRING_t &target, octet4 value)
target
.
buf
[
1
]
=
value
[
1
];
target
.
buf
[
2
]
=
value
[
2
];
target
.
buf
[
3
]
=
value
[
3
];
target
.
size
=
4
;
target
.
bits_unused
=
0
;
target
.
size
=
static_cast
<
size_t
>
(
bits
::
NearDiv
(
static_cast
<
int
>
(
bitCount
),
8
)
/
8
)
;
target
.
bits_unused
=
static_cast
<
int
>
(
target
.
size
*
8
-
bitCount
)
;
}
void
SetBitString
(
BIT_STRING_t
&
target
,
const
OctetString
&
value
)
...
...
src/lib/asn/utils.hpp
View file @
8e368396
...
...
@@ -78,7 +78,7 @@ void SetOctetString(OCTET_STRING_t &target, const OctetString &value);
OctetString
GetOctetString
(
const
OCTET_STRING_t
&
source
);
OctetString
GetOctetString
(
const
BIT_STRING_t
&
source
);
void
SetBitString
(
BIT_STRING_t
&
target
,
octet4
value
);
void
SetBitString
(
BIT_STRING_t
&
target
,
octet4
value
,
size_t
bitCount
=
32
);
void
SetBitString
(
BIT_STRING_t
&
target
,
const
OctetString
&
value
);
template
<
size_t
BitCount
>
...
...
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