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
6106207b
Commit
6106207b
authored
May 26, 2022
by
Sakthivel Velumani
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixing build issues
parent
67235fac
Changes
15
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
622 additions
and
370 deletions
+622
-370
CMakeLists.txt
CMakeLists.txt
+2
-0
common/utils/ocp_itti/intertask_interface.h
common/utils/ocp_itti/intertask_interface.h
+1
-0
openair2/COMMON/e1ap_messages_def.h
openair2/COMMON/e1ap_messages_def.h
+4
-4
openair2/COMMON/e1ap_messages_types.h
openair2/COMMON/e1ap_messages_types.h
+211
-0
openair2/COMMON/messages_def.h
openair2/COMMON/messages_def.h
+1
-1
openair2/E1AP/CMakeLists.txt
openair2/E1AP/CMakeLists.txt
+1
-1
openair2/E1AP/e1ap.c
openair2/E1AP/e1ap.c
+210
-197
openair2/E1AP/e1ap.h
openair2/E1AP/e1ap.h
+53
-1
openair2/E1AP/e1ap_common.c
openair2/E1AP/e1ap_common.c
+116
-16
openair2/E1AP/e1ap_common.h
openair2/E1AP/e1ap_common.h
+9
-141
openair2/GNB_APP/gnb_app.c
openair2/GNB_APP/gnb_app.c
+1
-0
openair2/GNB_APP/gnb_config.c
openair2/GNB_APP/gnb_config.c
+7
-7
openair2/GNB_APP/gnb_config.h
openair2/GNB_APP/gnb_config.h
+3
-0
openair2/GNB_APP/gnb_paramdef.h
openair2/GNB_APP/gnb_paramdef.h
+2
-2
openair2/RRC/NR/nr_rrc_defs.h
openair2/RRC/NR/nr_rrc_defs.h
+1
-0
No files found.
CMakeLists.txt
View file @
6106207b
...
...
@@ -1325,6 +1325,8 @@ add_library(NFAPI_COMMON_LIB ${NFAPI_COMMON_SRC})
include_directories
(
${
NFAPI_DIR
}
/common/public_inc
)
include_directories
(
${
CMAKE_CURRENT_BINARY_DIR
}
/openair2/E1AP/MESSAGES/
)
set
(
NFAPI_SRC
${
NFAPI_DIR
}
/nfapi/src/nfapi.c
${
NFAPI_DIR
}
/nfapi/src/nfapi_p4.c
...
...
common/utils/ocp_itti/intertask_interface.h
View file @
6106207b
...
...
@@ -79,6 +79,7 @@ typedef struct IttiMsgText_s {
#include <openair2/COMMON/as_message.h>
#include <openair2/RRC/LTE/rrc_types.h>
#include <openair2/COMMON/rrc_messages_types.h>
#include <openair2/COMMON/e1ap_messages_types.h>
#include <openair3/NAS/COMMON/UTIL/OctetString.h>
#include <openair3/NAS/COMMON/IES/AccessPointName.h>
...
...
openair2/COMMON/e1ap_messages_def.h
View file @
6106207b
...
...
@@ -19,13 +19,13 @@
* contact@openairinterface.org
*/
#ifndef E1AP_MESSAGES_DEF_H_
#define E1AP_MESSAGES_DEF_H_
/* gNB_CUUP application layer -> E1AP messages */
MESSAGE_DEF
(
E1AP_SETUP_REQ
,
MESSAGE_PRIORITY_MED
,
e1ap_setup_req_t
,
e1ap_setup_req
)
/* E1AP -> eNB_DU or eNB_CU_RRC -> E1AP application layer messages */
MESSAGE_DEF
(
E1AP_SETUP_RESP
,
MESSAGE_PRIORITY_MED
,
e1ap_setup_resp_t
,
e1ap_setup_resp
)
#endif
/* E1AP_MESSAGES_DEF_H_ */
MESSAGE_DEF
(
E1AP_BEARER_CONTEXT_SETUP_REQ
,
MESSAGE_PRIORITY_MED
,
e1ap_bearer_setup_req_t
,
e1ap_bearer_setup_req
)
MESSAGE_DEF
(
E1AP_BEARER_CONTEXT_SETUP_RESP
,
MESSAGE_PRIORITY_MED
,
e1ap_bearer_setup_resp_t
,
e1ap_bearer_setup_resp
)
openair2/COMMON/e1ap_messages_types.h
0 → 100644
View file @
6106207b
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Author and copyright: Laurent Thomas, open-cells.com
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef E1AP_MESSAGES_TYPES_H
#define E1AP_MESSAGES_TYPES_H
#include "E1AP_E1AP-PDU.h"
#include "E1AP_TransactionID.h"
#include "E1AP_PriorityLevel.h"
#define E1AP_MAX_NUM_TRANSAC_IDS 4
#define E1AP_MAX_NUM_PLMNS 4
#define E1AP_MAX_NUM_CELL_GROUPS 4
#define E1AP_MAX_NUM_QOS_FLOWS 4
#define E1AP_MAX_NUM_NGRAN_DRB 4
#define E1AP_MAX_NUM_PDU_SESSIONS 4
#define E1AP_MAX_NUM_DRBS 4
#define E1AP_MAX_NUM_DRBS 4
#define E1AP_MAX_NUM_UP_PARAM 4
#define E1AP_SETUP_REQ(mSGpTR) (mSGpTR)->ittiMsg.e1ap_setup_req
#define E1AP_SETUP_RESP(mSGpTR) (mSGpTR)->ittiMsg.e1ap_setup_resp
#define E1AP_BEARER_CONTEXT_SETUP_REQ(mSGpTR) (mSGpTR)->ittiMsg.e1ap_bearer_setup_req
#define E1AP_BEARER_CONTEXT_SETUP_RESP(mSGpTR) (mSGpTR)->ittiMsg.e1ap_bearer_setup_resp
#define E1AP_PORT_NUMBER 25
#define E1AP_SCTP_PPID 63
typedef
f1ap_net_ip_address_t
e1ap_net_ip_address_t
;
typedef
int
(
*
e1ap_message_processing_t
)(
instance_t
instance
,
E1AP_E1AP_PDU_t
*
message_p
);
typedef
struct
PLMN_ID_s
{
int
mcc
;
int
mnc
;
int
mnc_digit_length
;
}
PLMN_ID_t
;
typedef
struct
e1ap_setup_req_s
{
uint64_t
gNB_cu_up_id
;
char
*
gNB_cu_up_name
;
int
assoc_id
;
uint64_t
transac_id
;
int
supported_plmns
;
PLMN_ID_t
plmns
[
E1AP_MAX_NUM_PLMNS
];
uint16_t
sctp_in_streams
;
uint16_t
sctp_out_streams
;
uint16_t
default_sctp_stream_id
;
e1ap_net_ip_address_t
CUUP_e1_ip_address
;
e1ap_net_ip_address_t
CUCP_e1_ip_address
;
long
cn_support
;
int
port_cuup
;
int
port_cucp
;
}
e1ap_setup_req_t
;
typedef
struct
e1ap_setup_resp_s
{
long
transac_id
;
}
e1ap_setup_resp_t
;
typedef
struct
cell_group_s
{
long
id
;
}
cell_group_t
;
typedef
struct
drb_to_setup_s
{
long
drbId
;
long
pDCP_SN_Size_UL
;
long
pDCP_SN_Size_DL
;
long
rLC_Mode
;
long
qci
;
long
qosPriorityLevel
;
long
pre_emptionCapability
;
long
pre_emptionVulnerability
;
in_addr_t
tlAddress
;
long
teId
;
int
numCellGroups
;
cell_group_t
cellGroupList
[
E1AP_MAX_NUM_CELL_GROUPS
];
}
drb_to_setup_t
;
typedef
struct
qos_flow_to_setup_s
{
long
id
;
long
fiveQI
;
long
qoSPriorityLevel
;
long
packetDelayBudget
;
long
packetError_scalar
;
long
packetError_exponent
;
long
priorityLevel
;
long
pre_emptionCapability
;
long
pre_emptionVulnerability
;
}
qos_flow_to_setup_t
;
typedef
struct
DRB_nGRAN_to_setup_s
{
long
id
;
long
defaultDRB
;
long
sDAP_Header_UL
;
long
sDAP_Header_DL
;
int
numCellGroups
;
cell_group_t
cellGroupList
[
E1AP_MAX_NUM_CELL_GROUPS
];
int
numQosFlow2Setup
;
qos_flow_to_setup_t
qosFlows
[
E1AP_MAX_NUM_QOS_FLOWS
];
}
DRB_nGRAN_to_setup_t
;
typedef
struct
pdu_session_to_setup_s
{
long
sessionId
;
long
sessionType
;
int32_t
sst
;
long
integrityProtectionIndication
;
long
confidentialityProtectionIndication
;
in_addr_t
tlAddress
;
int32_t
teId
;
long
numDRB2Setup
;
DRB_nGRAN_to_setup_t
DRBnGRanList
[
E1AP_MAX_NUM_NGRAN_DRB
];
}
pdu_session_to_setup_t
;
typedef
struct
e1ap_bearer_setup_req_s
{
uint64_t
gNB_cu_cp_ue_id
;
uint64_t
cipheringAlgorithm
;
char
encryptionKey
[
128
];
long
bitRate
;
PLMN_ID_t
servingPLMNid
;
long
activityNotificationLevel
;
int
numDRBs
;
drb_to_setup_t
DRBList
[
E1AP_MAX_NUM_DRBS
];
int
numPDUSessions
;
pdu_session_to_setup_t
pduSession
[
E1AP_MAX_NUM_PDU_SESSIONS
];
}
e1ap_bearer_setup_req_t
;
typedef
struct
up_params_s
{
in_addr_t
tlAddress
;
long
teId
;
}
up_params_t
;
typedef
struct
drb_setup_s
{
int
drbId
;
in_addr_t
tlAddress
;
int
teId
;
int
numUpParam
;
up_params_t
UpParamList
[
E1AP_MAX_NUM_UP_PARAM
];
}
drb_setup_t
;
typedef
struct
qos_flow_setup_s
{
long
id
;
}
qos_flow_setup_t
;
typedef
struct
DRB_nGRAN_setup_s
{
long
id
;
int
numUpParam
;
up_params_t
UpParamList
[
E1AP_MAX_NUM_UP_PARAM
];
int
numQosFlowSetup
;
qos_flow_setup_t
qosFlows
[
E1AP_MAX_NUM_QOS_FLOWS
];
}
DRB_nGRAN_setup_t
;
typedef
struct
DRB_nGRAN_failed_s
{
long
id
;
long
cause_type
;
long
cause
;
}
DRB_nGRAN_failed_t
;
typedef
struct
pdu_session_setup_s
{
long
id
;
in_addr_t
tlAddress
;
long
teId
;
int
numDRBSetup
;
DRB_nGRAN_setup_t
DRBnGRanList
[
E1AP_MAX_NUM_NGRAN_DRB
];
int
numDRBFailed
;
DRB_nGRAN_failed_t
DRBnGRanFailedList
[
E1AP_MAX_NUM_NGRAN_DRB
];
}
pdu_session_setup_t
;
typedef
struct
e1ap_bearer_setup_resp_s
{
uint64_t
gNB_cu_cp_ue_id
;
uint64_t
gNB_cu_up_ue_id
;
int
numDRBs
;
drb_setup_t
DRBList
[
E1AP_MAX_NUM_DRBS
];
int
numPDUSessions
;
pdu_session_setup_t
pduSession
[
E1AP_MAX_NUM_PDU_SESSIONS
];
}
e1ap_bearer_setup_resp_t
;
typedef
struct
e1ap_upcp_inst_s
{
uint32_t
assoc_id
;
e1ap_setup_req_t
setupReq
;
e1ap_bearer_setup_req_t
bearerSetupReq
;
e1ap_bearer_setup_resp_t
bearerSetupResp
;
}
e1ap_upcp_inst_t
;
typedef
enum
{
CPtype
=
0
,
UPtype
}
E1_t
;
#endif
/* E1AP_MESSAGES_TYPES_H */
openair2/COMMON/messages_def.h
View file @
6106207b
...
...
@@ -42,4 +42,4 @@
#include "udp_messages_def.h"
#include "gtpv1_u_messages_def.h"
#include "flexran_messages_def.h"
#include "e1ap_message
_types
.h"
#include "e1ap_message
s_def
.h"
openair2/E1AP/CMakeLists.txt
View file @
6106207b
add_subdirectory
(
MESSAGES
)
add_library
(
E1AP e1ap.c
)
add_library
(
E1AP e1ap.c
e1ap_common.c
)
target_link_libraries
(
E1AP
PUBLIC ASN1_E1AP_LIB
PRIVATE UTIL
)
...
...
openair2/E1AP/e1ap.c
View file @
6106207b
This diff is collapsed.
Click to expand it.
openair2/E1AP/e1ap.h
View file @
6106207b
...
...
@@ -27,9 +27,61 @@
#include <common/utils/LOG/log.h>
#include "openairinterface5g_limits.h"
#include <openair2/RRC/NR/MESSAGES/asn1_msg.h>
#include "e1ap_common.h"
#include "openair2/COMMON/e1ap_messages_types.h"
#include "openair3/UTILS/conversions.h"
#include "openair2/F1AP/f1ap_common.h"
#include <E1AP_Cause.h>
#include <E1AP_InitiatingMessage.h>
#include <E1AP_E1AP-PDU.h>
#include <E1AP_ProtocolIE-Field.h>
#include <E1AP_SupportedPLMNs-Item.h>
#include <E1AP_SuccessfulOutcome.h>
#include <E1AP_ProtocolIE-Field.h>
#include <E1AP_UnsuccessfulOutcome.h>
#include <E1AP_GNB-CU-UP-E1SetupFailure.h>
#include <E1AP_GNB-CU-UP-ConfigurationUpdate.h>
#include <E1AP_GNB-CU-UP-TNLA-To-Remove-Item.h>
#include <E1AP_CP-TNL-Information.h>
#include <E1AP_UP-Parameters-Item.h>
#include <E1AP_UP-TNL-Information.h>
#include <E1AP_PDU-Session-Resource-Setup-Item.h>
#include <E1AP_DRB-Setup-Item-EUTRAN.h>
#include <E1AP_DRB-Setup-Item-NG-RAN.h>
#include <E1AP_QoS-Flow-QoS-Parameter-Item.h>
#include <E1AP_QoS-Flow-Item.h>
#include <E1AP_DRB-Failed-List-NG-RAN.h>
#include <E1AP_DRB-Failed-Item-NG-RAN.h>
#include <E1AP_BearerContextSetupResponse.h>
#include <E1AP_BearerContextSetupRequest.h>
#include <E1AP_DRB-To-Setup-Item-EUTRAN.h>
#include <E1AP_DRB-To-Setup-Item-NG-RAN.h>
#include <E1AP_Cell-Group-Information-Item.h>
#include <E1AP_PDU-Session-Resource-To-Setup-Item.h>
#include <E1AP_GTPTunnel.h>
#include <E1AP_Non-Dynamic5QIDescriptor.h>
#include <E1AP_Dynamic5QIDescriptor.h>
#endif
int
e1apCUCP_handle_SETUP_REQUEST
(
instance_t
instance
,
E1AP_E1AP_PDU_t
*
pdu
);
int
e1apCUUP_handle_SETUP_RESPONSE
(
instance_t
instance
,
E1AP_E1AP_PDU_t
*
pdu
);
int
e1apCUUP_handle_SETUP_FAILURE
(
instance_t
instance
,
E1AP_E1AP_PDU_t
*
pdu
);
int
e1apCUUP_handle_BEARER_CONTEXT_SETUP_REQUEST
(
instance_t
instance
,
E1AP_E1AP_PDU_t
*
pdu
);
int
e1apCUCP_handle_BEARER_CONTEXT_SETUP_RESPONSE
(
instance_t
instance
,
E1AP_E1AP_PDU_t
*
pdu
);
int
e1apCUCP_handle_BEARER_CONTEXT_SETUP_FAILURE
(
instance_t
instance
,
E1AP_E1AP_PDU_t
*
pdu
);
void
*
E1AP_CUUP_task
(
void
*
arg
);
void
*
E1AP_CUCP_task
(
void
*
arg
);
openair2/E1AP/e1ap_common.c
View file @
6106207b
...
...
@@ -23,34 +23,42 @@
#include <time.h>
#include <stdlib.h>
#include "e1ap.h"
#include "e1ap_common.h"
static
e1ap_upcp_inst_t
*
e1_cp_inst
[
NUMBER_OF_gNB_MAX
]
=
{
0
};
static
e1ap_upcp_inst_t
*
e1_up_inst
[
NUMBER_OF_gNB_MAX
]
=
{
0
};
static
e1ap_upcp_inst_t
*
e1
ap
_cp_inst
[
NUMBER_OF_gNB_MAX
]
=
{
0
};
static
e1ap_upcp_inst_t
*
e1
ap
_up_inst
[
NUMBER_OF_gNB_MAX
]
=
{
0
};
e1ap_upcp_inst_t
*
getCxt
(
E1_t
type
,
instance_t
instance
)
{
AssertFatal
(
instance
<
sizeofArray
(
e1_cp_inst
),
"instance exceeds limit
\n
"
);
return
type
?
e1_up_inst
[
instance
]
:
e1_cp_inst
[
instance
];
e1ap_upcp_inst_t
*
getCxtE1
(
E1_t
type
,
instance_t
instance
)
{
AssertFatal
(
instance
<
sizeofArray
(
e1ap_cp_inst
),
"instance exceeds limit
\n
"
);
return
type
?
e1ap_up_inst
[
instance
]
:
e1ap_cp_inst
[
instance
];
}
int
e1ap_assoc_id
(
bool
isCu
,
instance_t
instance
)
{
return
0
;
}
void
createE1inst
(
E1_t
type
,
instance_t
instance
,
e1ap_setup_req_t
*
req
)
{
if
(
type
==
CPtype
)
{
AssertFatal
(
e1
_cp_inst
[
instance
]
==
NULL
,
"Double call to E1 CP instance %d
\n
"
,
instance
);
e1
_cp_inst
[
instance
]
=
(
e1_upcp_inst_t
*
)
calloc
(
1
,
sizeof
(
e1
_upcp_inst_t
));
AssertFatal
(
e1
ap_cp_inst
[
instance
]
==
NULL
,
"Double call to E1 CP instance %d
\n
"
,
(
int
)
instance
);
e1
ap_cp_inst
[
instance
]
=
(
e1ap_upcp_inst_t
*
)
calloc
(
1
,
sizeof
(
e1ap
_upcp_inst_t
));
}
else
{
AssertFatal
(
e1
_up_inst
[
instance
]
==
NULL
,
"Double call to E1 UP instance %d
\n
"
,
instance
);
e1
_up_inst
[
instance
]
=
(
e1_upcp_inst_t
*
)
calloc
(
1
,
sizeof
(
e1
_upcp_inst_t
));
memcpy
(
&
e1_up_inst
[
instance
]
->
setupReq
,
req
,
sizeof
(
e1ap_setup_req_t
));
AssertFatal
(
e1
ap_up_inst
[
instance
]
==
NULL
,
"Double call to E1 UP instance %d
\n
"
,
(
int
)
instance
);
e1
ap_up_inst
[
instance
]
=
(
e1ap_upcp_inst_t
*
)
calloc
(
1
,
sizeof
(
e1ap
_upcp_inst_t
));
memcpy
(
&
e1
ap
_up_inst
[
instance
]
->
setupReq
,
req
,
sizeof
(
e1ap_setup_req_t
));
}
}
E1AP_TransactionID_t
transacID
[
MAX_NUM_TRANSAC_IDS
]
=
{
0
};
srand
(
time
(
NULL
));
E1AP_TransactionID_t
transacID
[
E1AP_MAX_NUM_TRANSAC_IDS
]
=
{
0
};
void
e1ap_common_init
()
{
srand
(
time
(
NULL
));
}
bool
check_transac_id
(
E1AP_TransactionID_t
id
,
int
*
freeIdx
)
{
bool
isFreeIdxSet
=
false
;
for
(
int
i
=
0
;
i
<
MAX_NUM_TRANSAC_IDS
;
i
++
)
{
for
(
int
i
=
0
;
i
<
E1AP_
MAX_NUM_TRANSAC_IDS
;
i
++
)
{
if
(
id
==
transacID
[
i
])
return
false
;
else
if
(
!
isFreeIdxSet
&&
(
transacID
[
i
]
==
0
))
{
...
...
@@ -69,14 +77,68 @@ E1AP_TransactionID_t E1AP_get_next_transaction_identifier() {
while
(
!
isTransacIdValid
)
{
genTransacId
=
rand
();
isTransacIdValid
=
check_transac_
I
d
(
genTransacId
,
&
freeIdx
);
isTransacIdValid
=
check_transac_
i
d
(
genTransacId
,
&
freeIdx
);
}
AssertFatal
(
freeIdx
<
MAX_NUM_TRANSAC_IDS
,
"Free Index exceeds array length
\n
"
);
AssertFatal
(
freeIdx
<
E1AP_
MAX_NUM_TRANSAC_IDS
,
"Free Index exceeds array length
\n
"
);
transacID
[
freeIdx
]
=
genTransacId
;
return
genTransacId
;
}
int
e1ap_decode_initiating_message
(
E1AP_E1AP_PDU_t
*
pdu
)
{
DevAssert
(
pdu
!=
NULL
);
switch
(
pdu
->
choice
.
initiatingMessage
->
procedureCode
)
{
case
E1AP_ProcedureCode_id_gNB_CU_UP_E1Setup
:
break
;
case
E1AP_ProcedureCode_id_gNB_CU_UP_ConfigurationUpdate
:
break
;
case
E1AP_ProcedureCode_id_bearerContextSetup
:
break
;
default:
LOG_E
(
E1AP
,
"Unsupported procedure code (%d) for initiating message
\n
"
,
(
int
)
pdu
->
choice
.
initiatingMessage
->
procedureCode
);
return
-
1
;
}
return
0
;
}
int
e1ap_decode_successful_outcome
(
E1AP_E1AP_PDU_t
*
pdu
)
{
DevAssert
(
pdu
!=
NULL
);
switch
(
pdu
->
choice
.
successfulOutcome
->
procedureCode
)
{
case
E1AP_ProcedureCode_id_gNB_CU_UP_E1Setup
:
break
;
case
E1AP_ProcedureCode_id_bearerContextSetup
:
break
;
default:
LOG_E
(
E1AP
,
"Unsupported procedure code (%d) for successful message
\n
"
,
(
int
)
pdu
->
choice
.
successfulOutcome
->
procedureCode
);
return
-
1
;
}
return
0
;
}
int
e1ap_decode_unsuccessful_outcome
(
E1AP_E1AP_PDU_t
*
pdu
)
{
DevAssert
(
pdu
!=
NULL
);
switch
(
pdu
->
choice
.
unsuccessfulOutcome
->
procedureCode
)
{
case
E1AP_ProcedureCode_id_gNB_CU_UP_E1Setup
:
break
;
default:
LOG_E
(
E1AP
,
"Unsupported procedure code (%d) for unsuccessful message
\n
"
,
(
int
)
pdu
->
choice
.
unsuccessfulOutcome
->
procedureCode
);
return
-
1
;
}
return
0
;
}
int
asn1_xer_print_e1ap
=
1
;
int
e1ap_decode_pdu
(
E1AP_E1AP_PDU_t
*
pdu
,
const
uint8_t
*
const
buffer
,
uint32_t
length
)
{
asn_dec_rval_t
dec_ret
;
DevAssert
(
buffer
!=
NULL
);
...
...
@@ -88,7 +150,7 @@ int e1ap_decode_pdu(E1AP_E1AP_PDU_t *pdu, const uint8_t *const buffer, uint32_t
0
,
0
);
if
(
asn1_
decoder_xer_print
)
{
if
(
asn1_
xer_print_e1ap
)
{
LOG_E
(
F1AP
,
"----------------- ASN1 DECODER PRINT START-----------------
\n
"
);
xer_fprint
(
stdout
,
&
asn_DEF_E1AP_E1AP_PDU
,
pdu
);
LOG_E
(
F1AP
,
"----------------- ASN1 DECODER PRINT END -----------------
\n
"
);
...
...
@@ -116,3 +178,41 @@ int e1ap_decode_pdu(E1AP_E1AP_PDU_t *pdu, const uint8_t *const buffer, uint32_t
return
-
1
;
}
int
e1ap_encode_send
(
bool
isCu
,
instance_t
instance
,
E1AP_E1AP_PDU_t
*
pdu
,
uint16_t
stream
,
const
char
*
func
)
{
DevAssert
(
pdu
!=
NULL
);
if
(
asn1_xer_print_e1ap
)
{
LOG_E
(
E1AP
,
"----------------- ASN1 ENCODER PRINT START -----------------
\n
"
);
xer_fprint
(
stdout
,
&
asn_DEF_E1AP_E1AP_PDU
,
pdu
);
LOG_E
(
E1AP
,
"----------------- ASN1 ENCODER PRINT END-----------------
\n
"
);
}
char
errbuf
[
2048
];
/* Buffer for error message */
size_t
errlen
=
sizeof
(
errbuf
);
/* Size of the buffer */
int
ret
=
asn_check_constraints
(
&
asn_DEF_E1AP_E1AP_PDU
,
pdu
,
errbuf
,
&
errlen
);
if
(
ret
)
{
LOG_E
(
E1AP
,
"%s: Constraint validation failed: %s
\n
"
,
func
,
errbuf
);
}
void
*
buffer
=
NULL
;
ssize_t
encoded
=
aper_encode_to_new_buffer
(
&
asn_DEF_E1AP_E1AP_PDU
,
0
,
pdu
,
buffer
);
if
(
encoded
<
0
)
{
LOG_E
(
E1AP
,
"%s: Failed to encode E1AP message
\n
"
,
func
);
return
-
1
;
}
else
{
MessageDef
*
message
=
itti_alloc_new_message
(
isCu
?
TASK_CUCP_E1
:
TASK_CUUP_E1
,
0
,
SCTP_DATA_REQ
);
sctp_data_req_t
*
s
=
&
message
->
ittiMsg
.
sctp_data_req
;
s
->
assoc_id
=
e1ap_assoc_id
(
isCu
,
instance
);
s
->
buffer
=
buffer
;
s
->
buffer_length
=
encoded
;
s
->
stream
=
stream
;
LOG_I
(
E1AP
,
"%s: Sending ITTI message to SCTP Task
\n
"
,
func
);
itti_send_msg_to_task
(
TASK_SCTP
,
instance
,
message
);
}
return
encoded
;
}
openair2/E1AP/e1ap_common.h
View file @
6106207b
...
...
@@ -24,153 +24,21 @@
#ifndef E1AP_COMMON_H_
#define E1AP_COMMON_H_
#include "E1AP_E1AP-PDU.h"
#include "E1AP_TransactionID.h"
#include "E1AP_PriorityLevel.h"
#include "openair2/COMMON/e1ap_messages_types.h"
#define MAX_NUM_TRANSAC_IDS 8
int
e1ap_decode_pdu
(
E1AP_E1AP_PDU_t
*
pdu
,
const
uint8_t
*
const
buffer
,
uint32_t
length
);
#define E1AP_SETUP_REQ(mSGpTR) (mSGpTR)->ittiMsg.e1ap_setup_req
#define E1AP_SETUP_RESP(mSGpTR) (mSGpTR)->ittiMsg.e1ap_setup_resp
e1ap_upcp_inst_t
*
getCxtE1
(
E1_t
type
,
instance_t
instance
);
#define E1AP_PORT_NUMBER 25
#define E1AP_SCTP_PPID 63
E1AP_TransactionID_t
E1AP_get_next_transaction_identifier
();
typedef
f1ap_net_ip_address_t
e1ap_net_ip_address_t
;
void
createE1inst
(
E1_t
type
,
instance_t
instance
,
e1ap_setup_req_t
*
req
)
;
typedef
int
(
*
e1ap_message_processing_t
)(
instance_t
instance
;
uint32_t
assoc_id
;
uint32_t
stream
;
E1AP_E1AP_PDU_t
*
message_p
;
}
;
bool
check_transac_id
(
E1AP_TransactionID_t
id
,
int
*
freeIdx
);
typedef
struct
cell_group_s
{
long
id
;
}
cell_group_t
;
int
e1ap_assoc_id
(
bool
isCu
,
instance_t
instance
);
typedef
struct
drb_to_setup_s
{
long
drbId
;
long
pDCP_SN_Size_UL
;
long
pDCP_SN_Size_DL
;
long
rLC_Mode
;
long
qci
;
E1AP_PriorityLevel_t
qosPriorityLevel
;
E1AP_Pre_emptionCapability_t
pre_emptionCapability
;
E1AP_Pre_emptionVulnerability_t
pre_emptionVulnerability
;
in_addr_t
tlAddress
;
long
teId
;
int
numCellGroups
;
cell_group_t
cellGroupList
[
MAX_NUM_CELL_GROUPS
];
}
drb_to_setup_t
;
typedef
struct
qos_flow_to_setup_s
{
long
id
;
long
fiveQI
;
long
qoSPriorityLevel
;
long
packetDelayBudget
;
long
packetError_scalar
;
long
packetError_exponent
;
E1AP_PriorityLevel_t
priorityLevel
;
E1AP_Pre_emptionCapability_t
pre_emptionCapability
;
E1AP_Pre_emptionVulnerability_t
pre_emptionVulnerability
;
}
qos_flow_to_setup_t
;
typedef
struct
DRB_nGRAN_to_setup_s
{
long
id
;
E1AP_DefaultDRB_t
defaultDRB
;
E1AP_SDAP_Header_UL_t
sDAP_Header_UL
;
E1AP_SDAP_Header_DL_t
sDAP_Header_DL
;
int
numCellGroups
;
cell_group_t
cellGroupList
[
MAX_NUM_CELL_GROUPS
];
int
numQosFlowSetup
;
qos_flow_to_setup_t
qosFlows
[
MAX_NUM_QOS_FLOWS
];
}
DRB_nGRAN_to_setup_t
;
typedef
struct
pdu_session_to_setup_s
{
long
sessionId
;
E1AP_PDU_Session_Type_t
sessionType
;
int32_t
sst
;
E1AP_IntegrityProtectionIndication_t
integrityProtectionIndication
;
E1AP_ConfidentialityProtectionIndication_t
confidentialityProtectionIndication
;
in_addr_t
tlAddress
;
long
teId
;
long
numDRB2Setup
;
DRB_nGRAN_to_setup_t
DRBnGRanList
[
MAX_NUM_NGRAN_DRB
];
}
pdu_session_to_setup_t
;
typedef
struct
e1ap_bearer_setup_req_s
{
uint64_t
gNB_cu_cp_ue_id
;
uint64_t
cipheringAlgorithm
;
char
encryptionKey
[
128
];
uint64_t
bitRate
;
E1AP_ActivityNotificationLevel_t
activityNotificationLevel
;
int
numDRBs
;
drb_to_setup_t
DRBList
[
MAX_NUM_DRBS
];
int
numPDUSessions
;
pdu_session_to_setup_t
pduSession
[
MAX_NUM_PDU_SESSIONS
];
}
e1ap_bearer_setup_req_t
;
typedef
struct
up_params_s
{
in_addr_t
tlAddress
;
long
teId
;
}
up_params_t
;
typedef
struct
drb_setup_s
{
int
drbId
;
in_addr_t
tlAddress
;
ling
teId
;
int
numUpParam
;
up_params_t
UpParamList
[
MAX_NUM_UP_PARAM
];
}
drb_setup_t
;
typedef
struct
qos_flow_setup_s
{
long
id
;
}
qos_flow_setup_t
;
typedef
struct
DRB_nGRAN_setup_s
{
long
id
;
int
numUpParam
;
up_params_t
UpParamList
[
MAX_NUM_UP_PARAM
];
int
numQosFlowSetup
;
qos_flow_setup_t
qosFlows
[
MAX_NUM_QOS_FLOWS
];
}
DRB_nGRAN_setup_t
;
typedef
struct
DRB_nGRAN_failed_s
{
long
id
;
long
cause_type
;
long
cause
;
}
DRB_nGRAN_failed_t
;
typedef
struct
pdu_session_setup_s
{
long
id
;
in_addr_t
tlAddress
;
long
teId
;
int
numDRBSetup
;
DRB_nGRAN_setup_t
DRBnGRanList
[
MAX_NUM_NGRAN_DRB
];
int
numDRBFailed
;
DRB_nGRAN_failed_t
DRBnGRanFailedList
[
MAX_NUM_NGRAN_DRB
];
}
pdu_session_setup_t
;
typedef
struct
e1ap_bearer_setup_resp_s
{
uint64_t
gNB_cu_cp_ue_id
;
uint64_t
gNB_cu_up_ue_id
;
int
numDRBs
;
drb_setup_t
DRBList
[
MAX_NUM_DRBS
];
int
numPDUSessions
;
}
e1ap_bearer_setup_resp_t
;
typedef
struct
e1ap_upcp_inst_s
{
uint32_t
assoc_id
;
e1ap_setup_req_t
setupReq
;
e1ap_bearer_setup_req_t
bearerSetupReq
;
e1ap_bearer_setup_resp_t
bearerSetupResp
;
}
e1ap_upcp_inst_t
;
typedef
enum
{
CPtype
=
0
,
UPtype
}
E1_t
;
int
e1ap_encode_send
(
bool
isCu
,
instance_t
instance
,
E1AP_E1AP_PDU_t
*
pdu
,
uint16_t
stream
,
const
char
*
func
);
void
e1ap_common_init
();
#endif
/* E1AP_COMMON_H_ */
openair2/GNB_APP/gnb_app.c
View file @
6106207b
...
...
@@ -52,6 +52,7 @@
#include "nfapi/oai_integration/vendor_ext.h"
#include <openair2/LAYER2/nr_pdcp/nr_pdcp.h>
#include "openair2/LAYER2/PDCP_v10.1.0/pdcp.h"
#include "openair2/E1AP/e1ap.h"
extern
unsigned
char
NB_gNB_INST
;
extern
RAN_CONTEXT_t
RC
;
...
...
openair2/GNB_APP/gnb_config.c
View file @
6106207b
...
...
@@ -1845,7 +1845,7 @@ int RCconfig_NR_CU_E1(MessageDef *msg_p, uint32_t i) {
"gNB id %u is not defined in configuration file
\n
"
,
i
);
config_getlist
(
&
GNBE1ParamList
,
GNBE1Params
,
sizeof
(
GNBE1Params
)
/
sizeof
(
paramdef_t
),
NULL
);
e1ap_setup_req_t
*
e1Setup
=
&
E1AP_SETUP_REQ
(
msg_p
);
e1
s
etup
->
gNB_cu_up_id
=
*
(
GNBParamList
.
paramarray
[
0
][
GNB_GNB_ID_IDX
].
uptr
);
e1
S
etup
->
gNB_cu_up_id
=
*
(
GNBParamList
.
paramarray
[
0
][
GNB_GNB_ID_IDX
].
uptr
);
paramdef_t
PLMNParams
[]
=
GNBPLMNPARAMS_DESC
;
paramlist_def_t
PLMNParamList
=
{
GNB_CONFIG_STRING_PLMN_LIST
,
NULL
,
0
};
...
...
@@ -1855,7 +1855,7 @@ int RCconfig_NR_CU_E1(MessageDef *msg_p, uint32_t i) {
for
(
int
I
=
0
;
I
<
sizeof
(
PLMNParams
)
/
sizeof
(
paramdef_t
);
++
I
)
PLMNParams
[
I
].
chkPptr
=
&
(
config_check_PLMNParams
[
I
]);
config_getlist
(
&
PLMNParamList
,
PLMNParams
,
sizeof
(
PLMNParams
)
/
sizeof
(
paramdef_t
),
aprefix
);
config_getlist
(
&
PLMNParamList
,
PLMNParams
,
sizeof
(
PLMNParams
)
/
sizeof
(
paramdef_t
),
NULL
);
int
numPLMNs
=
PLMNParamList
.
numelt
;
e1Setup
->
supported_plmns
=
numPLMNs
;
...
...
@@ -1865,12 +1865,12 @@ int RCconfig_NR_CU_E1(MessageDef *msg_p, uint32_t i) {
e1Setup
->
plmns
[
I
].
mnc
=
*
PLMNParamList
.
paramarray
[
I
][
GNB_MNC_DIGIT_LENGTH
].
u8ptr
;
}
strcpy
(
e1Setup
->
CUCP_e1_ip_address
.
ipv4_address
,
GNBE1PARAMList
.
paramarray
[
0
][
GNB_CONFIG_E1_IPV4_ADDRESS_CUCP
].
strptr
);
e1Setup
->
port_cucp
=
*
GNBE1P
ARAM
List
.
paramarray
[
0
][
GNB_CONFIG_E1_PORT_CUCP
].
uptr
;
strcpy
(
e1Setup
->
CUUP_e1_ip_address
.
ipv4_address
,
GNBE1PARAMList
.
paramarray
[
0
][
GNB_CONFIG_E1_IPV4_ADDRESS_CUUP
].
strptr
);
e1Setup
->
port_cuup
=
*
GNBE1P
ARAM
List
.
paramarray
[
0
][
GNB_CONFIG_E1_PORT_CUUP
].
uptr
;
strcpy
(
e1Setup
->
CUCP_e1_ip_address
.
ipv4_address
,
*
(
GNBE1ParamList
.
paramarray
[
0
][
GNB_CONFIG_E1_IPV4_ADDRESS_CUCP
].
strptr
)
);
e1Setup
->
port_cucp
=
*
GNBE1P
aram
List
.
paramarray
[
0
][
GNB_CONFIG_E1_PORT_CUCP
].
uptr
;
strcpy
(
e1Setup
->
CUUP_e1_ip_address
.
ipv4_address
,
*
(
GNBE1ParamList
.
paramarray
[
0
][
GNB_CONFIG_E1_IPV4_ADDRESS_CUUP
].
strptr
)
);
e1Setup
->
port_cuup
=
*
GNBE1P
aram
List
.
paramarray
[
0
][
GNB_CONFIG_E1_PORT_CUUP
].
uptr
;
e1Setup
->
cn_support
=
*
GNBE1P
ARAMList
.
P
aramarray
[
0
][
GNB_CONFIG_E1_CN_SUPPORT
].
uptr
;
e1Setup
->
cn_support
=
*
GNBE1P
aramList
.
p
aramarray
[
0
][
GNB_CONFIG_E1_CN_SUPPORT
].
uptr
;
}
return
0
;
...
...
openair2/GNB_APP/gnb_config.h
View file @
6106207b
...
...
@@ -41,6 +41,7 @@
#include "s1ap_messages_types.h"
#include "ngap_messages_types.h"
#include "f1ap_messages_types.h"
#include "e1ap_messages_types.h"
#include "rrc_messages_types.h"
#include "intertask_interface.h"
...
...
@@ -107,6 +108,8 @@ int RCconfig_NR_DU_F1(MessageDef *msg_p, uint32_t i);
int
gNB_app_handle_f1ap_setup_resp
(
f1ap_setup_resp_t
*
resp
);
int
gNB_app_handle_f1ap_gnb_cu_configuration_update
(
f1ap_gnb_cu_configuration_update_t
*
gnb_cu_cfg_update
);
void
nr_read_config_and_init
(
void
);
void
set_node_type
(
void
);
int
RCconfig_NR_CU_E1
(
MessageDef
*
msg_p
,
uint32_t
i
);
#endif
/* GNB_CONFIG_H_ */
/** @} */
openair2/GNB_APP/gnb_paramdef.h
View file @
6106207b
...
...
@@ -387,8 +387,8 @@ typedef enum {
{GNB_CONFIG_STRING_E1_IPV4_ADDRESS_CUCP, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
{GNB_CONFIG_STRING_E1_PORT_CUCP, NULL, 0, uptr :NULL, defintval:25L, TYPE_UINT, 0}, \
{GNB_CONFIG_STRING_E1_IPV4_ADDRESS_CUUP, NULL, 0, strptr:NULL, defstrval:NULL, TYPE_STRING, 0}, \
{GNB_CONFIG_STRING_E1_PORT_CUUP, NULL, 0, uptr :NULL, defintval:25L, TYPE_UINT, 0} \
{GNB_CONFIG_STRING_E1_CN_SUPPORT, NULL, 0, uptr :NULL, defintval:1L, TYPE_U
NI
T, 0} \
{GNB_CONFIG_STRING_E1_PORT_CUUP, NULL, 0, uptr :NULL, defintval:25L, TYPE_UINT, 0}
,
\
{GNB_CONFIG_STRING_E1_CN_SUPPORT, NULL, 0, uptr :NULL, defintval:1L, TYPE_U
IN
T, 0} \
}
/* L1 configuration section names */
...
...
openair2/RRC/NR/nr_rrc_defs.h
View file @
6106207b
...
...
@@ -476,6 +476,7 @@ typedef struct nr_mac_rrc_dl_if_s {
typedef
struct
gNB_RRC_INST_s
{
ngran_node_t
node_type
;
int
cu_type
;
uint32_t
node_id
;
char
*
node_name
;
int
module_id
;
...
...
FANG WANG
@wf
mentioned in commit
553f1d1a
·
Feb 11, 2023
mentioned in commit
553f1d1a
mentioned in commit 553f1d1a52845911be4ba61ec2bcc5c60ad42ae7
Toggle commit list
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