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
f245ace2
Commit
f245ace2
authored
Aug 09, 2022
by
laurent
Committed by
Sakthivel Velumani
Sep 13, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove log_i() of fatal errors
parent
d2a0f3c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
80 deletions
+49
-80
openair2/RRC/NR/MESSAGES/asn1_msg.c
openair2/RRC/NR/MESSAGES/asn1_msg.c
+49
-80
No files found.
openair2/RRC/NR/MESSAGES/asn1_msg.c
View file @
f245ace2
...
...
@@ -297,11 +297,6 @@ uint8_t do_MIB_NR(gNB_RRC_INST *rrc,uint32_t frame) {
24
);
AssertFatal
(
enc_rval
.
encoded
>
0
,
"ASN1 message encoding failed (%s, %lu)!
\n
"
,
enc_rval
.
failed_type
->
name
,
enc_rval
.
encoded
);
if
(
enc_rval
.
encoded
==-
1
)
{
return
(
-
1
);
}
return
((
enc_rval
.
encoded
+
7
)
/
8
);
}
...
...
@@ -708,11 +703,6 @@ uint8_t do_SIB23_NR(rrc_gNB_carrier_data_t *carrier,
100
);
AssertFatal
(
enc_rval
.
encoded
>
0
,
"ASN1 message encoding failed (%s, %lu)!
\n
"
,
enc_rval
.
failed_type
->
name
,
enc_rval
.
encoded
);
if
(
enc_rval
.
encoded
==-
1
)
{
return
(
-
1
);
}
return
((
enc_rval
.
encoded
+
7
)
/
8
);
}
...
...
@@ -1823,13 +1813,6 @@ uint8_t do_NR_SecurityModeCommand(
enc_rval
.
encoded
,
(
enc_rval
.
encoded
+
7
)
/
8
);
if
(
enc_rval
.
encoded
==-
1
)
{
LOG_E
(
NR_RRC
,
"[gNB %d] ASN1 : securityModeCommand encoding failed for UE %x
\n
"
,
ctxt_pP
->
module_id
,
ctxt_pP
->
rnti
);
return
(
-
1
);
}
// rrc_ue_process_ueCapabilityEnquiry(0,1000,&dl_dcch_msg.message.choice.c1.choice.ueCapabilityEnquiry,0);
// exit(-1);
return
((
enc_rval
.
encoded
+
7
)
/
8
);
...
...
@@ -1918,13 +1901,6 @@ uint8_t do_NR_SA_UECapabilityEnquiry( const protocol_ctxt_t *const ctxt_pP,
enc_rval
.
encoded
,
(
enc_rval
.
encoded
+
7
)
/
8
);
if
(
enc_rval
.
encoded
==-
1
)
{
LOG_E
(
NR_RRC
,
"[gNB %d] ASN1 : NR UECapabilityRequest encoding failed for UE %x
\n
"
,
ctxt_pP
->
module_id
,
ctxt_pP
->
rnti
);
return
(
-
1
);
}
return
((
enc_rval
.
encoded
+
7
)
/
8
);
}
...
...
@@ -1982,19 +1958,18 @@ int16_t do_RRCReconfiguration(
NR_CellGroupConfig_t
*
cellGroupConfig
)
//------------------------------------------------------------------------------
{
NR_DL_DCCH_Message_t
dl_dcch_msg
;
NR_DL_DCCH_Message_t
dl_dcch_msg
=
{
0
}
;
asn_enc_rval_t
enc_rval
;
NR_RRCReconfiguration_IEs_t
*
ie
;
unsigned
char
masterCellGroup_buf
[
1000
];
memset
(
&
dl_dcch_msg
,
0
,
sizeof
(
NR_DL_DCCH_Message_t
));
dl_dcch_msg
.
message
.
present
=
NR_DL_DCCH_MessageType_PR_c1
;
dl_dcch_msg
.
message
.
choice
.
c1
=
CALLOC
(
1
,
sizeof
(
struct
NR_DL_DCCH_MessageType__c1
));
dl_dcch_msg
.
message
.
choice
.
c1
->
present
=
NR_DL_DCCH_MessageType__c1_PR_rrcReconfiguration
;
asn1cCalloc
(
dl_dcch_msg
.
message
.
choice
.
c1
,
c1
);
//
= CALLOC(1, sizeof(struct NR_DL_DCCH_MessageType__c1));
c1
->
present
=
NR_DL_DCCH_MessageType__c1_PR_rrcReconfiguration
;
dl_dcch_msg
.
message
.
choice
.
c1
->
choice
.
rrcReconfiguration
=
calloc
(
1
,
sizeof
(
NR_RRCReconfiguration_t
));
dl_dcch_msg
.
message
.
choice
.
c1
->
choice
.
rrcReconfiguration
->
rrc_TransactionIdentifier
=
Transaction_id
;
dl_dcch_msg
.
message
.
choice
.
c1
->
choice
.
rrcReconfiguration
->
criticalExtensions
.
present
=
NR_RRCReconfiguration__criticalExtensions_PR_rrcReconfiguration
;
asn1cCalloc
(
c1
->
choice
.
rrcReconfiguration
,
rrcReconf
);
//
= calloc(1, sizeof(NR_RRCReconfiguration_t));
rrcReconf
->
rrc_TransactionIdentifier
=
Transaction_id
;
rrcReconf
->
criticalExtensions
.
present
=
NR_RRCReconfiguration__criticalExtensions_PR_rrcReconfiguration
;
/******************** Radio Bearer Config ********************/
/* Configure Security */
...
...
@@ -2006,7 +1981,8 @@ int16_t do_RRCReconfiguration(
// *security_config->keyToUse = NR_SecurityConfig__keyToUse_master;
ie
=
calloc
(
1
,
sizeof
(
NR_RRCReconfiguration_IEs_t
));
if
(
SRB_configList
||
DRB_configList
)
{
if
((
SRB_configList
&&
SRB_configList
->
list
.
size
)
||
(
DRB_configList
&&
DRB_configList
->
list
.
size
))
{
ie
->
radioBearerConfig
=
calloc
(
1
,
sizeof
(
NR_RadioBearerConfig_t
));
ie
->
radioBearerConfig
->
srb_ToAddModList
=
SRB_configList
;
ie
->
radioBearerConfig
->
drb_ToAddModList
=
DRB_configList
;
...
...
@@ -2035,49 +2011,42 @@ int16_t do_RRCReconfiguration(
configuration
);
enc_rval
=
uper_encode_to_buffer
(
&
asn_DEF_NR_CellGroupConfig
,
NULL
,
(
void
*
)
cellGroupConfig
,
masterCellGroup_buf
,
1000
);
AssertFatal
(
enc_rval
.
encoded
>
0
,
"ASN1 message encoding failed (%s, %lu)!
\n
"
,
enc_rval
.
failed_type
->
name
,
enc_rval
.
encoded
);
NULL
,
(
void
*
)
cellGroupConfig
,
masterCellGroup_buf
,
1000
);
AssertFatal
(
enc_rval
.
encoded
>
0
,
"ASN1 message encoding failed (%s, %lu)!
\n
"
,
enc_rval
.
failed_type
->
name
,
enc_rval
.
encoded
);
if
(
LOG_DEBUGFLAG
(
DEBUG_ASN1
)
)
{
xer_fprint
(
stdout
,
&
asn_DEF_NR_CellGroupConfig
,
(
const
void
*
)
cellGroupConfig
);
}
ie
->
nonCriticalExtension
->
masterCellGroup
=
calloc
(
1
,
sizeof
(
OCTET_STRING_t
));
ie
->
nonCriticalExtension
->
masterCellGroup
->
buf
=
masterCellGroup_buf
;
ie
->
nonCriticalExtension
->
masterCellGroup
->
size
=
(
enc_rval
.
encoded
+
7
)
/
8
;
}
dl_dcch_msg
.
message
.
choice
.
c1
->
choice
.
rrcReconfiguration
->
criticalExtensions
.
choice
.
rrcReconfiguration
=
ie
;
if
(
LOG_DEBUGFLAG
(
DEBUG_ASN1
)
)
{
xer_fprint
(
stdout
,
&
asn_DEF_NR_DL_DCCH_Message
,
(
void
*
)
&
dl_dcch_msg
);
}
enc_rval
=
uper_encode_to_buffer
(
&
asn_DEF_NR_DL_DCCH_Message
,
NULL
,
(
void
*
)
&
dl_dcch_msg
,
buffer
,
buffer_size
);
NULL
,
(
void
*
)
&
dl_dcch_msg
,
buffer
,
buffer_size
);
AssertFatal
(
enc_rval
.
encoded
>
0
,
"ASN1 message encoding failed (%s, %lu)!
\n
"
,
enc_rval
.
failed_type
->
name
,
enc_rval
.
encoded
);
LOG_D
(
NR_RRC
,
"[gNB %d] RRCReconfiguration for UE %x Encoded %zd bits (%zd bytes)
\n
"
,
ctxt_pP
->
module_id
,
ctxt_pP
->
rnti
,
enc_rval
.
encoded
,
(
enc_rval
.
encoded
+
7
)
/
8
);
if
(
enc_rval
.
encoded
==
-
1
)
{
LOG_E
(
NR_RRC
,
"[gNB %d] ASN1 : RRCReconfiguration encoding failed for UE %x
\n
"
,
ctxt_pP
->
module_id
,
ctxt_pP
->
rnti
);
return
(
-
1
);
}
ctxt_pP
->
module_id
,
ctxt_pP
->
rnti
,
enc_rval
.
encoded
,
(
enc_rval
.
encoded
+
7
)
/
8
);
return
((
enc_rval
.
encoded
+
7
)
/
8
);
}
...
...
@@ -2212,9 +2181,9 @@ uint8_t do_RRCSetupComplete(uint8_t Mod_id, uint8_t *buffer, size_t buffer_size,
NR_UL_DCCH_Message_t
ul_dcch_msg
;
NR_RRCSetupComplete_t
*
RrcSetupComplete
;
memset
((
void
*
)
&
ul_dcch_msg
,
0
,
sizeof
(
NR_UL_DCCH_Message_t
));
uint8_t
buf
[
6
];
ul_dcch_msg
.
message
.
present
=
NR_UL_DCCH_MessageType_PR_c1
;
ul_dcch_msg
.
message
.
choice
.
c1
=
CALLOC
(
1
,
sizeof
(
struct
NR_UL_DCCH_MessageType__c1
));
ul_dcch_msg
.
message
.
choice
.
c1
->
present
=
NR_UL_DCCH_MessageType__c1_PR_rrcSetupComplete
;
...
...
@@ -2227,7 +2196,7 @@ uint8_t do_RRCSetupComplete(uint8_t Mod_id, uint8_t *buffer, size_t buffer_size,
// sizeof(*RrcSetupComplete->criticalExtensions.choice.rrcSetupComplete->nonCriticalExtension));
RrcSetupComplete
->
criticalExtensions
.
choice
.
rrcSetupComplete
->
selectedPLMN_Identity
=
sel_plmn_id
;
RrcSetupComplete
->
criticalExtensions
.
choice
.
rrcSetupComplete
->
registeredAMF
=
NULL
;
RrcSetupComplete
->
criticalExtensions
.
choice
.
rrcSetupComplete
->
ng_5G_S_TMSI_Value
=
CALLOC
(
1
,
sizeof
(
struct
NR_RRCSetupComplete_IEs__ng_5G_S_TMSI_Value
));
RrcSetupComplete
->
criticalExtensions
.
choice
.
rrcSetupComplete
->
ng_5G_S_TMSI_Value
->
present
=
NR_RRCSetupComplete_IEs__ng_5G_S_TMSI_Value_PR_ng_5G_S_TMSI
;
RrcSetupComplete
->
criticalExtensions
.
choice
.
rrcSetupComplete
->
ng_5G_S_TMSI_Value
->
choice
.
ng_5G_S_TMSI
.
size
=
6
;
...
...
@@ -2238,23 +2207,23 @@ uint8_t do_RRCSetupComplete(uint8_t Mod_id, uint8_t *buffer, size_t buffer_size,
RrcSetupComplete
->
criticalExtensions
.
choice
.
rrcSetupComplete
->
ng_5G_S_TMSI_Value
->
choice
.
ng_5G_S_TMSI
.
buf
[
3
]
=
0x78
;
RrcSetupComplete
->
criticalExtensions
.
choice
.
rrcSetupComplete
->
ng_5G_S_TMSI_Value
->
choice
.
ng_5G_S_TMSI
.
buf
[
4
]
=
0x9A
;
RrcSetupComplete
->
criticalExtensions
.
choice
.
rrcSetupComplete
->
ng_5G_S_TMSI_Value
->
choice
.
ng_5G_S_TMSI
.
buf
[
5
]
=
0xBC
;
memset
(
&
RrcSetupComplete
->
criticalExtensions
.
choice
.
rrcSetupComplete
->
dedicatedNAS_Message
,
0
,
sizeof
(
OCTET_STRING_t
));
OCTET_STRING_fromBuf
(
&
RrcSetupComplete
->
criticalExtensions
.
choice
.
rrcSetupComplete
->
dedicatedNAS_Message
,
dedicatedInfoNAS
,
dedicatedInfoNASLength
);
if
(
LOG_DEBUGFLAG
(
DEBUG_ASN1
)
)
{
xer_fprint
(
stdout
,
&
asn_DEF_NR_UL_DCCH_Message
,
(
void
*
)
&
ul_dcch_msg
);
}
enc_rval
=
uper_encode_to_buffer
(
&
asn_DEF_NR_UL_DCCH_Message
,
NULL
,
(
void
*
)
&
ul_dcch_msg
,
buffer
,
buffer_size
);
AssertFatal
(
enc_rval
.
encoded
>
0
,
"ASN1 message encoding failed (%s, %lu)!
\n
"
,
enc_rval
.
failed_type
->
name
,
enc_rval
.
encoded
);
LOG_D
(
NR_RRC
,
"RRCSetupComplete Encoded %zd bits (%zd bytes)
\n
"
,
enc_rval
.
encoded
,(
enc_rval
.
encoded
+
7
)
/
8
);
return
((
enc_rval
.
encoded
+
7
)
/
8
);
memset
(
&
RrcSetupComplete
->
criticalExtensions
.
choice
.
rrcSetupComplete
->
dedicatedNAS_Message
,
0
,
sizeof
(
OCTET_STRING_t
));
OCTET_STRING_fromBuf
(
&
RrcSetupComplete
->
criticalExtensions
.
choice
.
rrcSetupComplete
->
dedicatedNAS_Message
,
dedicatedInfoNAS
,
dedicatedInfoNASLength
);
if
(
LOG_DEBUGFLAG
(
DEBUG_ASN1
)
)
{
xer_fprint
(
stdout
,
&
asn_DEF_NR_UL_DCCH_Message
,
(
void
*
)
&
ul_dcch_msg
);
}
enc_rval
=
uper_encode_to_buffer
(
&
asn_DEF_NR_UL_DCCH_Message
,
NULL
,
(
void
*
)
&
ul_dcch_msg
,
buffer
,
buffer_size
);
AssertFatal
(
enc_rval
.
encoded
>
0
,
"ASN1 message encoding failed (%s, %lu)!
\n
"
,
enc_rval
.
failed_type
->
name
,
enc_rval
.
encoded
);
LOG_D
(
NR_RRC
,
"RRCSetupComplete Encoded %zd bits (%zd bytes)
\n
"
,
enc_rval
.
encoded
,(
enc_rval
.
encoded
+
7
)
/
8
);
return
((
enc_rval
.
encoded
+
7
)
/
8
);
}
//------------------------------------------------------------------------------
...
...
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