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
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
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
OpenXG
OpenXG-RAN
Commits
63bc9a9b
Commit
63bc9a9b
authored
4 years ago
by
s.rampalli
Committed by
Rigiel
4 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
coding done need to verify testing part
parent
9747773f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
113 additions
and
20 deletions
+113
-20
openair2/RRC/LTE/rrc_eNB.c
openair2/RRC/LTE/rrc_eNB.c
+80
-3
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+13
-10
openair2/RRC/NR/rrc_gNB_internode.c
openair2/RRC/NR/rrc_gNB_internode.c
+1
-1
openair2/RRC/NR/rrc_gNB_nsa.c
openair2/RRC/NR/rrc_gNB_nsa.c
+4
-4
openair2/RRC/NR/rrc_gNB_reconfig.c
openair2/RRC/NR/rrc_gNB_reconfig.c
+15
-2
No files found.
openair2/RRC/LTE/rrc_eNB.c
View file @
63bc9a9b
...
@@ -97,6 +97,7 @@
...
@@ -97,6 +97,7 @@
#include "SIMULATION/TOOLS/sim.h" // for taus
#include "SIMULATION/TOOLS/sim.h" // for taus
#define ASN_MAX_ENCODE_SIZE 4096
#define ASN_MAX_ENCODE_SIZE 4096
#define NUMBEROF_DRBS_TOBE_ADDED 1
static
int
encode_CG_ConfigInfo
(
char
*
buffer
,
int
buffer_size
,
rrc_eNB_ue_context_t
*
const
ue_context_pP
,
int
*
enc_size
);
static
int
encode_CG_ConfigInfo
(
char
*
buffer
,
int
buffer_size
,
rrc_eNB_ue_context_t
*
const
ue_context_pP
,
int
*
enc_size
);
static
int
is_en_dc_supported
(
LTE_UE_EUTRA_Capability_t
*
c
);
static
int
is_en_dc_supported
(
LTE_UE_EUTRA_Capability_t
*
c
);
static
void
free_rb_config
(
struct
NR_RadioBearerConfig
*
rb_config
);
static
void
free_rb_config
(
struct
NR_RadioBearerConfig
*
rb_config
);
...
@@ -2124,6 +2125,27 @@ rrc_eNB_generate_RRCConnectionReestablishmentReject(
...
@@ -2124,6 +2125,27 @@ rrc_eNB_generate_RRCConnectionReestablishmentReject(
PROTOCOL_RRC_CTXT_UE_ARGS
(
ctxt_pP
),
PROTOCOL_RRC_CTXT_UE_ARGS
(
ctxt_pP
),
ue_p
->
Srb0
.
Tx_buffer
.
payload_size
);
ue_p
->
Srb0
.
Tx_buffer
.
payload_size
);
}
}
#ifdef GES_ENDC_SUPPORT
void
rrc_generate_SgNBReleaseRequest
(
const
protocol_ctxt_t
*
const
ctxt_pP
,
rrc_eNB_ue_context_t
*
const
ue_context_pP
)
//-----------------------------------------------------------------------------
{
MessageDef
*
msg
;
msg
=
itti_alloc_new_message
(
TASK_RRC_ENB
,
X2AP_ENDC_SGNB_RELEASE_REQ
);
memset
(
&
(
X2AP_ENDC_SGNB_RELEASE_REQ
(
msg
)),
0
,
sizeof
(
x2ap_ENDC_sgnb_release_req_t
));
// X2AP_ENDC_SGNB_RELEASE_REQ(msg).MeNB_ue_x2_id = ;
// X2AP_ENDC_SGNB_RELEASE_REQ(msg).SgNB_ue_x2_id = ;
// X2AP_ENDC_SGNB_RELEASE_REQ(msg).cause = ;
// X2AP_ENDC_SGNB_RELEASE_REQ(msg).target_physCellId = ;
LOG_I
(
RRC
,
"[eNB %d] frame %d UE rnti %x transmitting sgnb release request to sgnb
\n
"
,
ctxt_pP
->
module_id
,
ctxt_pP
->
frame
,
ctxt_pP
->
rnti
);
itti_send_msg_to_task
(
TASK_X2AP
,
ENB_MODULE_ID_TO_INSTANCE
(
ctxt_pP
->
module_id
),
msg
);
return
;
}
#endif
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
/*
/*
...
@@ -2144,6 +2166,15 @@ rrc_eNB_generate_RRCConnectionRelease(
...
@@ -2144,6 +2166,15 @@ rrc_eNB_generate_RRCConnectionRelease(
memset
(
buffer
,
0
,
RRC_BUF_SIZE
);
memset
(
buffer
,
0
,
RRC_BUF_SIZE
);
T
(
T_ENB_RRC_CONNECTION_RELEASE
,
T_INT
(
ctxt_pP
->
module_id
),
T_INT
(
ctxt_pP
->
frame
),
T
(
T_ENB_RRC_CONNECTION_RELEASE
,
T_INT
(
ctxt_pP
->
module_id
),
T_INT
(
ctxt_pP
->
frame
),
T_INT
(
ctxt_pP
->
subframe
),
T_INT
(
ctxt_pP
->
rnti
));
T_INT
(
ctxt_pP
->
subframe
),
T_INT
(
ctxt_pP
->
rnti
));
#ifdef GES_ENDC_SUPPORT
if
(
ue_context_pP
!=
NULL
)
{
if
(
ue_context_pP
->
ue_context
.
Status
==
RRC_NR_NSA
)
{
//rrc_eNB_generate_SgNBReleaseRequest(ctxt_pP,ue_context_pP);
}
}
#endif
size
=
do_RRCConnectionRelease
(
ctxt_pP
->
module_id
,
buffer
,
rrc_eNB_get_next_transaction_identifier
(
ctxt_pP
->
module_id
));
size
=
do_RRCConnectionRelease
(
ctxt_pP
->
module_id
,
buffer
,
rrc_eNB_get_next_transaction_identifier
(
ctxt_pP
->
module_id
));
ue_context_pP
->
ue_context
.
ue_reestablishment_timer
=
0
;
ue_context_pP
->
ue_context
.
ue_reestablishment_timer
=
0
;
ue_context_pP
->
ue_context
.
ue_release_timer
=
0
;
ue_context_pP
->
ue_context
.
ue_release_timer
=
0
;
...
@@ -4344,6 +4375,7 @@ static int encode_CG_ConfigInfo(
...
@@ -4344,6 +4375,7 @@ static int encode_CG_ConfigInfo(
asn_enc_rval_t
enc_rval
;
asn_enc_rval_t
enc_rval
;
int
RRC_OK
=
1
;
int
RRC_OK
=
1
;
int
index
=
0
;
int
index
=
0
;
char
temp_buff
[
4096
];
rb_config
=
calloc
(
1
,
sizeof
(
struct
NR_RadioBearerConfig
));
rb_config
=
calloc
(
1
,
sizeof
(
struct
NR_RadioBearerConfig
));
AssertFatal
(
rb_config
!=
NULL
,
"failed to allocate memory for rb_config"
);
AssertFatal
(
rb_config
!=
NULL
,
"failed to allocate memory for rb_config"
);
...
@@ -4356,7 +4388,7 @@ static int encode_CG_ConfigInfo(
...
@@ -4356,7 +4388,7 @@ static int encode_CG_ConfigInfo(
=
calloc
(
ue_context_pP
->
ue_context
.
DRB_configList
->
list
.
count
,
sizeof
(
struct
NR_DRB_ToAddMod
));
=
calloc
(
ue_context_pP
->
ue_context
.
DRB_configList
->
list
.
count
,
sizeof
(
struct
NR_DRB_ToAddMod
));
AssertFatal
(
rb_config
->
drb_ToAddModList
->
list
.
array
!=
NULL
,
AssertFatal
(
rb_config
->
drb_ToAddModList
->
list
.
array
!=
NULL
,
"falied to allocate memory for list.array"
);
"falied to allocate memory for list.array"
);
for
(
index
=
0
;
index
<
ue_context_pP
->
ue_context
.
DRB_configList
->
list
.
count
;
index
++
)
{
for
(
index
=
0
;
index
<
NUMBEROF_DRBS_TOBE_ADDED
;
index
++
)
{
rb_config
->
drb_ToAddModList
->
list
.
array
[
index
]
rb_config
->
drb_ToAddModList
->
list
.
array
[
index
]
=
calloc
(
1
,
sizeof
(
struct
NR_DRB_ToAddMod
));
=
calloc
(
1
,
sizeof
(
struct
NR_DRB_ToAddMod
));
AssertFatal
(
rb_config
->
drb_ToAddModList
->
list
.
array
[
index
]
!=
NULL
,
AssertFatal
(
rb_config
->
drb_ToAddModList
->
list
.
array
[
index
]
!=
NULL
,
...
@@ -4373,7 +4405,30 @@ static int encode_CG_ConfigInfo(
...
@@ -4373,7 +4405,30 @@ static int encode_CG_ConfigInfo(
rb_config
->
drb_ToAddModList
->
list
.
array
[
index
]
->
cnAssociation
->
choice
.
eps_BearerIdentity
rb_config
->
drb_ToAddModList
->
list
.
array
[
index
]
->
cnAssociation
->
choice
.
eps_BearerIdentity
=*
(
ue_context_pP
->
ue_context
.
DRB_configList
->
list
.
array
[
index
]
->
eps_BearerIdentity
);
=*
(
ue_context_pP
->
ue_context
.
DRB_configList
->
list
.
array
[
index
]
->
eps_BearerIdentity
);
}
}
rb_config
->
drb_ToAddModList
->
list
.
array
[
index
]
->
pdcp_Config
=
calloc
(
1
,
sizeof
(
struct
NR_PDCP_Config
));
rb_config
->
drb_ToAddModList
->
list
.
array
[
index
]
->
pdcp_Config
->
drb
=
calloc
(
1
,
sizeof
(
struct
NR_PDCP_Config__drb
));
rb_config
->
drb_ToAddModList
->
list
.
array
[
index
]
->
pdcp_Config
->
drb
->
discardTimer
=
calloc
(
1
,
sizeof
(
long
*
));
*
rb_config
->
drb_ToAddModList
->
list
.
array
[
index
]
->
pdcp_Config
->
drb
->
discardTimer
=
*
(
ue_context_pP
->
ue_context
.
DRB_configList
->
list
.
array
[
index
]
->
pdcp_Config
->
discardTimer
);
rb_config
->
drb_ToAddModList
->
list
.
array
[
index
]
->
pdcp_Config
->
drb
->
pdcp_SN_SizeUL
=
calloc
(
1
,
sizeof
(
long
*
));
*
rb_config
->
drb_ToAddModList
->
list
.
array
[
index
]
->
pdcp_Config
->
drb
->
pdcp_SN_SizeUL
=
NR_PDCP_Config__drb__pdcp_SN_SizeUL_len18bits
;
rb_config
->
drb_ToAddModList
->
list
.
array
[
index
]
->
pdcp_Config
->
drb
->
pdcp_SN_SizeDL
=
calloc
(
1
,
sizeof
(
long
*
));
*
rb_config
->
drb_ToAddModList
->
list
.
array
[
index
]
->
pdcp_Config
->
drb
->
pdcp_SN_SizeDL
=
NR_PDCP_Config__drb__pdcp_SN_SizeDL_len18bits
;
rb_config
->
drb_ToAddModList
->
list
.
array
[
index
]
->
pdcp_Config
->
drb
->
headerCompression
.
present
=
NR_PDCP_Config__drb__headerCompression_PR_notUsed
;
rb_config
->
drb_ToAddModList
->
list
.
array
[
index
]
->
pdcp_Config
->
drb
->
headerCompression
.
choice
.
notUsed
=
0
;
rb_config
->
drb_ToAddModList
->
list
.
array
[
index
]
->
pdcp_Config
->
t_Reordering
=
calloc
(
1
,
sizeof
(
long
*
));
*
rb_config
->
drb_ToAddModList
->
list
.
array
[
index
]
->
pdcp_Config
->
t_Reordering
=
NR_PDCP_Config__t_Reordering_ms0
;
}
}
rb_config
->
securityConfig
=
calloc
(
1
,
sizeof
(
struct
NR_SecurityConfig
));
rb_config
->
securityConfig
->
securityAlgorithmConfig
=
calloc
(
1
,
sizeof
(
struct
NR_SecurityAlgorithmConfig
));
rb_config
->
securityConfig
->
securityAlgorithmConfig
->
cipheringAlgorithm
=
NR_CipheringAlgorithm_nea0
;
rb_config
->
securityConfig
->
securityAlgorithmConfig
->
integrityProtAlgorithm
=
NULL
;
rb_config
->
securityConfig
->
keyToUse
=
calloc
(
1
,
sizeof
(
long
*
));
*
rb_config
->
securityConfig
->
keyToUse
=
NR_SecurityConfig__keyToUse_master
;
}
}
cg_configinfo
=
calloc
(
1
,
sizeof
(
struct
NR_CG_ConfigInfo
));
cg_configinfo
=
calloc
(
1
,
sizeof
(
struct
NR_CG_ConfigInfo
));
...
@@ -4392,7 +4447,17 @@ static int encode_CG_ConfigInfo(
...
@@ -4392,7 +4447,17 @@ static int encode_CG_ConfigInfo(
cg_configinfo
->
criticalExtensions
.
choice
.
c1
->
choice
.
cg_ConfigInfo
->
ue_CapabilityInfo
cg_configinfo
->
criticalExtensions
.
choice
.
c1
->
choice
.
cg_ConfigInfo
->
ue_CapabilityInfo
=
calloc
(
1
,
sizeof
(
OCTET_STRING_t
));
=
calloc
(
1
,
sizeof
(
OCTET_STRING_t
));
AssertFatal
(
cg_configinfo
->
criticalExtensions
.
choice
.
c1
->
choice
.
cg_ConfigInfo
->
AssertFatal
(
cg_configinfo
->
criticalExtensions
.
choice
.
c1
->
choice
.
cg_ConfigInfo
->
ue_CapabilityInfo
!=
NULL
,
"failed to allocate memory for ue_capabilityinfo"
);
ue_CapabilityInfo
!=
NULL
,
"failed to allocate memory for ue_capabilityinfo"
);
#if 1
enc_rval
=
uper_encode_to_buffer
(
&
asn_DEF_LTE_UE_CapabilityRAT_ContainerList
,
NULL
,
(
void
*
)
ue_context_pP
->
ue_context
.
UE_Capability
,
temp_buff
,
4096
);
AssertFatal
(
enc_rval
.
encoded
>
0
,
"ASN1 message encoding failed (%s, %jd)!
\n
"
,
enc_rval
.
failed_type
->
name
,
enc_rval
.
encoded
);
OCTET_STRING_fromBuf
(
cg_configinfo
->
criticalExtensions
.
choice
.
c1
->
choice
.
cg_ConfigInfo
->
ue_CapabilityInfo
,
(
const
char
*
)
temp_buff
,(
enc_rval
.
encoded
+
7
)
>>
3
);
#endif
#if 0
cg_configinfo->criticalExtensions.choice.c1->choice.cg_ConfigInfo->ue_CapabilityInfo->size
cg_configinfo->criticalExtensions.choice.c1->choice.cg_ConfigInfo->ue_CapabilityInfo->size
= ue_context_pP->ue_context.UE_Capability_size;
= ue_context_pP->ue_context.UE_Capability_size;
cg_configinfo->criticalExtensions.choice.c1->choice.cg_ConfigInfo->ue_CapabilityInfo->buf
cg_configinfo->criticalExtensions.choice.c1->choice.cg_ConfigInfo->ue_CapabilityInfo->buf
...
@@ -4401,8 +4466,19 @@ static int encode_CG_ConfigInfo(
...
@@ -4401,8 +4466,19 @@ static int encode_CG_ConfigInfo(
ue_CapabilityInfo->buf != NULL, "failed to allocate memory for buf");
ue_CapabilityInfo->buf != NULL, "failed to allocate memory for buf");
memcpy(cg_configinfo->criticalExtensions.choice.c1->choice.cg_ConfigInfo->ue_CapabilityInfo->buf,
memcpy(cg_configinfo->criticalExtensions.choice.c1->choice.cg_ConfigInfo->ue_CapabilityInfo->buf,
ue_context_pP->ue_context.UE_Capability,ue_context_pP->ue_context.UE_Capability_size);
ue_context_pP->ue_context.UE_Capability,ue_context_pP->ue_context.UE_Capability_size);
#endif
#if 1
cg_configinfo
->
criticalExtensions
.
choice
.
c1
->
choice
.
cg_ConfigInfo
->
mcg_RB_Config
cg_configinfo
->
criticalExtensions
.
choice
.
c1
->
choice
.
cg_ConfigInfo
->
mcg_RB_Config
=
calloc
(
1
,
sizeof
(
OCTET_STRING_t
));
=
calloc
(
1
,
sizeof
(
OCTET_STRING_t
));
AssertFatal
(
cg_configinfo
->
criticalExtensions
.
choice
.
c1
->
choice
.
cg_ConfigInfo
->
mcg_RB_Config
!=
NULL
,
"failed to allocate memory for mcg_rb_config"
);
enc_rval
=
uper_encode_to_buffer
(
&
asn_DEF_NR_RadioBearerConfig
,
NULL
,(
void
*
)
rb_config
,
temp_buff
,
4096
);
AssertFatal
(
enc_rval
.
encoded
>
0
,
"ASN1 message encoding failed (%s, %jd)!
\n
"
,
enc_rval
.
failed_type
->
name
,
enc_rval
.
encoded
);
OCTET_STRING_fromBuf
(
cg_configinfo
->
criticalExtensions
.
choice
.
c1
->
choice
.
cg_ConfigInfo
->
mcg_RB_Config
,
(
const
char
*
)
temp_buff
,
(
enc_rval
.
encoded
+
7
)
>>
3
);
#endif
#if 0
AssertFatal(cg_configinfo->criticalExtensions.choice.c1->choice.cg_ConfigInfo->
AssertFatal(cg_configinfo->criticalExtensions.choice.c1->choice.cg_ConfigInfo->
mcg_RB_Config != NULL, "failed to allocate memory for mcg_rb_config");
mcg_RB_Config != NULL, "failed to allocate memory for mcg_rb_config");
cg_configinfo->criticalExtensions.choice.c1->choice.cg_ConfigInfo->mcg_RB_Config->size
cg_configinfo->criticalExtensions.choice.c1->choice.cg_ConfigInfo->mcg_RB_Config->size
...
@@ -4413,8 +4489,9 @@ static int encode_CG_ConfigInfo(
...
@@ -4413,8 +4489,9 @@ static int encode_CG_ConfigInfo(
mcg_RB_Config->buf != NULL,"failed to allocate memory for buf");
mcg_RB_Config->buf != NULL,"failed to allocate memory for buf");
memcpy(cg_configinfo->criticalExtensions.choice.c1->choice.cg_ConfigInfo->mcg_RB_Config->buf,
memcpy(cg_configinfo->criticalExtensions.choice.c1->choice.cg_ConfigInfo->mcg_RB_Config->buf,
rb_config,sizeof(struct NR_RadioBearerConfig));
rb_config,sizeof(struct NR_RadioBearerConfig));
#endif
// this xer_fprint can be enabled for additional debugging messages
// this xer_fprint can be enabled for additional debugging messages
//
xer_fprint(stdout,&asn_DEF_NR_CG_ConfigInfo,(void*)cg_configinfo);
xer_fprint
(
stdout
,
&
asn_DEF_NR_CG_ConfigInfo
,(
void
*
)
cg_configinfo
);
enc_rval
=
uper_encode_to_buffer
(
&
asn_DEF_NR_CG_ConfigInfo
,
NULL
,(
void
*
)
cg_configinfo
,
enc_rval
=
uper_encode_to_buffer
(
&
asn_DEF_NR_CG_ConfigInfo
,
NULL
,(
void
*
)
cg_configinfo
,
buffer
,
buffer_size
);
buffer
,
buffer_size
);
AssertFatal
(
enc_rval
.
encoded
>
0
,
"ASN1 message encoding failed (%s, %lu)!
\n
"
,
AssertFatal
(
enc_rval
.
encoded
>
0
,
"ASN1 message encoding failed (%s, %lu)!
\n
"
,
...
...
This diff is collapsed.
Click to expand it.
openair2/RRC/NR/rrc_gNB.c
View file @
63bc9a9b
...
@@ -296,11 +296,12 @@ char openair_rrc_gNB_configuration(const module_id_t gnb_mod_idP, gNB_RrcConfigu
...
@@ -296,11 +296,12 @@ char openair_rrc_gNB_configuration(const module_id_t gnb_mod_idP, gNB_RrcConfigu
void
rrc_gNB_process_AdditionRequestInformation
(
const
module_id_t
gnb_mod_idP
,
x2ap_ENDC_sgnb_addition_req_t
*
m
)
{
void
rrc_gNB_process_AdditionRequestInformation
(
const
module_id_t
gnb_mod_idP
,
x2ap_ENDC_sgnb_addition_req_t
*
m
)
{
LTE_UL_DCCH_Message_t
*
LTE_UL_DCCH_Message
=
NULL
;
//LTE_UL_DCCH_Message_t *LTE_UL_DCCH_Message = NULL;
struct
NR_CG_ConfigInfo
*
cg_configinfo
=
NULL
;
asn_dec_rval_t
dec_rval
=
uper_decode_complete
(
NULL
,
asn_dec_rval_t
dec_rval
=
uper_decode_complete
(
NULL
,
&
asn_DEF_
LTE_UL_DCCH_Message
,
&
asn_DEF_
NR_CG_ConfigInfo
,
(
void
**
)
&
LTE_UL_DCCH_Message
,
(
void
**
)
&
cg_configinfo
,
(
uint8_t
*
)
m
->
rrc_buffer
,
(
uint8_t
*
)
m
->
rrc_buffer
,
(
int
)
m
->
rrc_buffer_size
);
//m->rrc_buffer_size);
(
int
)
m
->
rrc_buffer_size
);
//m->rrc_buffer_size);
...
@@ -309,13 +310,14 @@ void rrc_gNB_process_AdditionRequestInformation(const module_id_t gnb_mod_idP, x
...
@@ -309,13 +310,14 @@ void rrc_gNB_process_AdditionRequestInformation(const module_id_t gnb_mod_idP, x
if
((
dec_rval
.
code
!=
RC_OK
)
&&
(
dec_rval
.
consumed
==
0
))
{
if
((
dec_rval
.
code
!=
RC_OK
)
&&
(
dec_rval
.
consumed
==
0
))
{
AssertFatal
(
1
==
0
,
"NR_UL_DCCH_MESSAGE decode error
\n
"
);
AssertFatal
(
1
==
0
,
"NR_UL_DCCH_MESSAGE decode error
\n
"
);
// free the memory
// free the memory
SEQUENCE_free
(
&
asn_DEF_LTE_UL_DCCH_Message
,
LTE_UL_DCCH_Message
,
1
);
SEQUENCE_free
(
&
asn_DEF_NR_CG_ConfigInfo
,
cg_configinfo
,
1
);
return
;
return
;
}
}
xer_fprint
(
stdout
,
&
asn_DEF_
LTE_UL_DCCH_Message
,
LTE_UL_DCCH_Message
);
xer_fprint
(
stdout
,
&
asn_DEF_
NR_CG_ConfigInfo
,
cg_configinfo
);
// recreate enough of X2 EN-DC Container
// recreate enough of X2 EN-DC Container
AssertFatal
(
LTE_UL_DCCH_Message
->
message
.
choice
.
c1
.
present
==
LTE_UL_DCCH_MessageType__c1_PR_ueCapabilityInformation
,
AssertFatal
(
cg_configinfo
->
criticalExtensions
.
choice
.
c1
->
present
==
NR_CG_ConfigInfo__criticalExtensions__c1_PR_cg_ConfigInfo
,
"ueCapabilityInformation not present
\n
"
);
"ueCapabilityInformation not present
\n
"
);
#if 0
NR_CG_ConfigInfo_t *CG_ConfigInfo = calloc(1,sizeof(*CG_ConfigInfo));
NR_CG_ConfigInfo_t *CG_ConfigInfo = calloc(1,sizeof(*CG_ConfigInfo));
CG_ConfigInfo->criticalExtensions.present = NR_CG_ConfigInfo__criticalExtensions_PR_c1;
CG_ConfigInfo->criticalExtensions.present = NR_CG_ConfigInfo__criticalExtensions_PR_c1;
CG_ConfigInfo->criticalExtensions.choice.c1 = calloc(1,sizeof(*CG_ConfigInfo->criticalExtensions.choice.c1));
CG_ConfigInfo->criticalExtensions.choice.c1 = calloc(1,sizeof(*CG_ConfigInfo->criticalExtensions.choice.c1));
...
@@ -325,11 +327,12 @@ void rrc_gNB_process_AdditionRequestInformation(const module_id_t gnb_mod_idP, x
...
@@ -325,11 +327,12 @@ void rrc_gNB_process_AdditionRequestInformation(const module_id_t gnb_mod_idP, x
cg_ConfigInfo->ue_CapabilityInfo = calloc(1,sizeof(*cg_ConfigInfo->ue_CapabilityInfo));
cg_ConfigInfo->ue_CapabilityInfo = calloc(1,sizeof(*cg_ConfigInfo->ue_CapabilityInfo));
asn_enc_rval_t enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_UE_CapabilityRAT_ContainerList,NULL,(void*)<E_UL_DCCH_Message->message.choice.c1.choice.ueCapabilityInformation.criticalExtensions.choice.c1.choice.ueCapabilityInformation_r8.ue_CapabilityRAT_ContainerList,m->rrc_buffer,m->rrc_buffer_size);
asn_enc_rval_t enc_rval = uper_encode_to_buffer(&asn_DEF_LTE_UE_CapabilityRAT_ContainerList,NULL,(void*)<E_UL_DCCH_Message->message.choice.c1.choice.ueCapabilityInformation.criticalExtensions.choice.c1.choice.ueCapabilityInformation_r8.ue_CapabilityRAT_ContainerList,m->rrc_buffer,m->rrc_buffer_size);
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %jd)!\n",
AssertFatal (enc_rval.encoded > 0, "ASN1 message encoding failed (%s, %jd)!\n",
enc_rval
.
failed_type
->
name
,
enc_rval
.
encoded
);
enc_rval.failed_type->name, enc_rval.encoded);
OCTET_STRING_fromBuf(cg_ConfigInfo->ue_CapabilityInfo,
OCTET_STRING_fromBuf(cg_ConfigInfo->ue_CapabilityInfo,
(
const
char
*
)
m
->
rrc_buffer
,
(const char *)m->rrc_buffer,
(
enc_rval
.
encoded
+
7
)
>>
3
);
(enc_rval.encoded+7)>>3);
parse_CG_ConfigInfo
(
rrc
,
CG_ConfigInfo
,
m
);
#endif
parse_CG_ConfigInfo
(
rrc
,
cg_configinfo
,
m
);
}
}
...
...
This diff is collapsed.
Click to expand it.
openair2/RRC/NR/rrc_gNB_internode.c
View file @
63bc9a9b
...
@@ -56,7 +56,7 @@ int parse_CG_ConfigInfo(gNB_RRC_INST *rrc, NR_CG_ConfigInfo_t *CG_ConfigInfo, x2
...
@@ -56,7 +56,7 @@ int parse_CG_ConfigInfo(gNB_RRC_INST *rrc, NR_CG_ConfigInfo_t *CG_ConfigInfo, x2
AssertFatal
(
1
==
0
,
"[InterNode] Failed to decode NR_UE_CapabilityRAT_ContainerList (%zu bits), size of OCTET_STRING %lu
\n
"
,
AssertFatal
(
1
==
0
,
"[InterNode] Failed to decode NR_UE_CapabilityRAT_ContainerList (%zu bits), size of OCTET_STRING %lu
\n
"
,
dec_rval
.
consumed
,
cg_ConfigInfo
->
ue_CapabilityInfo
->
size
);
dec_rval
.
consumed
,
cg_ConfigInfo
->
ue_CapabilityInfo
->
size
);
}
}
rrc_parse_ue_capabilities
(
rrc
,
UE_CapabilityRAT_ContainerList
,
m
);
rrc_parse_ue_capabilities
(
rrc
,
UE_CapabilityRAT_ContainerList
,
m
,
cg_ConfigInfo
->
criticalExtensions
.
choice
.
c1
->
choice
.
cg_ConfigInfo
);
}
}
if
(
cg_ConfigInfo
->
candidateCellInfoListMN
)
AssertFatal
(
1
==
0
,
"Can't handle candidateCellInfoListMN yet
\n
"
);
if
(
cg_ConfigInfo
->
candidateCellInfoListMN
)
AssertFatal
(
1
==
0
,
"Can't handle candidateCellInfoListMN yet
\n
"
);
}
}
...
...
This diff is collapsed.
Click to expand it.
openair2/RRC/NR/rrc_gNB_nsa.c
View file @
63bc9a9b
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
#include "openair2/LAYER2/NR_MAC_gNB/mac_proto.h"
#include "openair2/LAYER2/NR_MAC_gNB/mac_proto.h"
#include "openair2/RRC/LTE/rrc_eNB_GTPV1U.h"
#include "openair2/RRC/LTE/rrc_eNB_GTPV1U.h"
void
rrc_parse_ue_capabilities
(
gNB_RRC_INST
*
rrc
,
LTE_UE_CapabilityRAT_ContainerList_t
*
UE_CapabilityRAT_ContainerList
,
x2ap_ENDC_sgnb_addition_req_t
*
m
)
{
void
rrc_parse_ue_capabilities
(
gNB_RRC_INST
*
rrc
,
LTE_UE_CapabilityRAT_ContainerList_t
*
UE_CapabilityRAT_ContainerList
,
x2ap_ENDC_sgnb_addition_req_t
*
m
,
struct
NR_CG_ConfigInfo_IEs
*
cg_config_info
)
{
struct
rrc_gNB_ue_context_s
*
ue_context_p
=
NULL
;
struct
rrc_gNB_ue_context_s
*
ue_context_p
=
NULL
;
OCTET_STRING_t
*
ueCapabilityRAT_Container_nr
=
NULL
;
OCTET_STRING_t
*
ueCapabilityRAT_Container_nr
=
NULL
;
...
@@ -98,10 +98,10 @@ void rrc_parse_ue_capabilities(gNB_RRC_INST *rrc, LTE_UE_CapabilityRAT_Container
...
@@ -98,10 +98,10 @@ void rrc_parse_ue_capabilities(gNB_RRC_INST *rrc, LTE_UE_CapabilityRAT_Container
xer_fprint
(
stdout
,
&
asn_DEF_NR_UE_MRDC_Capability
,
ue_context_p
->
ue_context
.
UE_Capability_MRDC
);
xer_fprint
(
stdout
,
&
asn_DEF_NR_UE_MRDC_Capability
,
ue_context_p
->
ue_context
.
UE_Capability_MRDC
);
}
}
rrc_add_nsa_user
(
rrc
,
ue_context_p
,
m
);
rrc_add_nsa_user
(
rrc
,
ue_context_p
,
m
,
cg_config_info
);
}
}
void
rrc_add_nsa_user
(
gNB_RRC_INST
*
rrc
,
struct
rrc_gNB_ue_context_s
*
ue_context_p
,
x2ap_ENDC_sgnb_addition_req_t
*
m
)
{
void
rrc_add_nsa_user
(
gNB_RRC_INST
*
rrc
,
struct
rrc_gNB_ue_context_s
*
ue_context_p
,
x2ap_ENDC_sgnb_addition_req_t
*
m
,
struct
NR_CG_ConfigInfo_IEs
*
cg_config_info
)
{
// generate nr-Config-r15 containers for LTE RRC : inside message for X2 EN-DC (CG-Config Message from 38.331)
// generate nr-Config-r15 containers for LTE RRC : inside message for X2 EN-DC (CG-Config Message from 38.331)
...
@@ -133,7 +133,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
...
@@ -133,7 +133,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
ue_context_p
->
ue_context
.
rb_config
=
calloc
(
1
,
sizeof
(
NR_RRCReconfiguration_t
));
ue_context_p
->
ue_context
.
rb_config
=
calloc
(
1
,
sizeof
(
NR_RRCReconfiguration_t
));
fill_default_rbconfig
(
ue_context_p
->
ue_context
.
rb_config
);
fill_default_rbconfig
(
ue_context_p
->
ue_context
.
rb_config
,
m
,
cg_config_info
);
ue_context_p
->
ue_id_rnti
=
ue_context_p
->
ue_context
.
secondaryCellGroup
->
spCellConfig
->
reconfigurationWithSync
->
newUE_Identity
;
ue_context_p
->
ue_id_rnti
=
ue_context_p
->
ue_context
.
secondaryCellGroup
->
spCellConfig
->
reconfigurationWithSync
->
newUE_Identity
;
NR_CG_Config_t
*
CG_Config
=
calloc
(
1
,
sizeof
(
*
CG_Config
));
NR_CG_Config_t
*
CG_Config
=
calloc
(
1
,
sizeof
(
*
CG_Config
));
memset
((
void
*
)
CG_Config
,
0
,
sizeof
(
*
CG_Config
));
memset
((
void
*
)
CG_Config
,
0
,
sizeof
(
*
CG_Config
));
...
...
This diff is collapsed.
Click to expand it.
openair2/RRC/NR/rrc_gNB_reconfig.c
View file @
63bc9a9b
...
@@ -2032,8 +2032,20 @@ void fill_default_reconfig(NR_ServingCellConfigCommon_t *servingcellconfigcommon
...
@@ -2032,8 +2032,20 @@ void fill_default_reconfig(NR_ServingCellConfigCommon_t *servingcellconfigcommon
reconfig
->
nonCriticalExtension
=
NULL
;
reconfig
->
nonCriticalExtension
=
NULL
;
}
}
void
fill_default_rbconfig
(
NR_RadioBearerConfig_t
*
rbconfig
)
{
void
fill_default_rbconfig
(
NR_RadioBearerConfig_t
*
rbconfig
,
x2ap_ENDC_sgnb_addition_req_t
*
m
,
struct
NR_CG_ConfigInfo_IEs
*
cg_config_info
)
{
if
(
cg_config_info
->
mcg_RB_Config
)
{
asn_dec_rval
dec_rval
=
uper_decode
(
NULL
,
&
asn_DEF_NR_RadioBearerConfig
,
(
void
**
)
&
rbconfig
,
cg_config_info
->
mcg_RB_Config
->
buf
,
cg_ConfigInfo
->
mcg_RB_Config
->
size
,
0
,
0
);
if
((
dec_rval
.
code
!=
RC_OK
)
&&
(
dec_rval
.
consumed
==
0
))
{
AssertFatal
(
1
==
0
,
"[InterNode] Failed to decode mcg_rb_config (%zu bits), size of OCTET_STRING %lu
\n
"
,
dec_rval
.
consumed
,
cg_ConfigInfo
->
ue_CapabilityInfo
->
size
);
}
}
#if 0
rbconfig->srb_ToAddModList = NULL;
rbconfig->srb_ToAddModList = NULL;
rbconfig->srb3_ToRelease = NULL;
rbconfig->srb3_ToRelease = NULL;
rbconfig->drb_ToAddModList = calloc(1,sizeof(*rbconfig->drb_ToAddModList));
rbconfig->drb_ToAddModList = calloc(1,sizeof(*rbconfig->drb_ToAddModList));
...
@@ -2074,6 +2086,7 @@ void fill_default_rbconfig(NR_RadioBearerConfig_t *rbconfig) {
...
@@ -2074,6 +2086,7 @@ void fill_default_rbconfig(NR_RadioBearerConfig_t *rbconfig) {
rbconfig->securityConfig->securityAlgorithmConfig->integrityProtAlgorithm=NULL;
rbconfig->securityConfig->securityAlgorithmConfig->integrityProtAlgorithm=NULL;
rbconfig->securityConfig->keyToUse = calloc(1,sizeof(*rbconfig->securityConfig->keyToUse));
rbconfig->securityConfig->keyToUse = calloc(1,sizeof(*rbconfig->securityConfig->keyToUse));
*rbconfig->securityConfig->keyToUse = NR_SecurityConfig__keyToUse_master;
*rbconfig->securityConfig->keyToUse = NR_SecurityConfig__keyToUse_master;
#endif
xer_fprint
(
stdout
,
&
asn_DEF_NR_RadioBearerConfig
,
(
const
void
*
)
rbconfig
);
xer_fprint
(
stdout
,
&
asn_DEF_NR_RadioBearerConfig
,
(
const
void
*
)
rbconfig
);
}
}
...
...
This diff is collapsed.
Click to expand it.
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