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
6ac9597f
Commit
6ac9597f
authored
May 03, 2024
by
root
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changes 5 -may3
parent
922f0702
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
440 additions
and
41 deletions
+440
-41
openair2/GNB_APP/gnb_config.h
openair2/GNB_APP/gnb_config.h
+1
-0
openair2/XNAP/CMakeLists.txt
openair2/XNAP/CMakeLists.txt
+2
-1
openair2/XNAP/xnap_common.c
openair2/XNAP/xnap_common.c
+41
-16
openair2/XNAP/xnap_common.h
openair2/XNAP/xnap_common.h
+20
-23
openair2/XNAP/xnap_gNB_interface_management.c
openair2/XNAP/xnap_gNB_interface_management.c
+338
-0
openair2/XNAP/xnap_gNB_interface_management.h
openair2/XNAP/xnap_gNB_interface_management.h
+36
-0
openair2/XNAP/xnap_gNB_task.c
openair2/XNAP/xnap_gNB_task.c
+2
-1
No files found.
openair2/GNB_APP/gnb_config.h
View file @
6ac9597f
...
@@ -109,6 +109,7 @@ void wait_f1_setup_response(void);
...
@@ -109,6 +109,7 @@ void wait_f1_setup_response(void);
int
gNB_app_handle_f1ap_gnb_cu_configuration_update
(
f1ap_gnb_cu_configuration_update_t
*
gnb_cu_cfg_update
);
int
gNB_app_handle_f1ap_gnb_cu_configuration_update
(
f1ap_gnb_cu_configuration_update_t
*
gnb_cu_cfg_update
);
MessageDef
*
RCconfig_NR_CU_E1
(
const
E1_t
*
entity
);
MessageDef
*
RCconfig_NR_CU_E1
(
const
E1_t
*
entity
);
ngran_node_t
get_node_type
(
void
);
ngran_node_t
get_node_type
(
void
);
xnap_net_config_t
Read_IPconfig_Xn
(
void
);
#ifdef E2_AGENT
#ifdef E2_AGENT
#include "openair2/E2AP/e2_agent_arg.h"
#include "openair2/E2AP/e2_agent_arg.h"
...
...
openair2/XNAP/CMakeLists.txt
View file @
6ac9597f
...
@@ -5,7 +5,8 @@ add_library(xnap
...
@@ -5,7 +5,8 @@ add_library(xnap
xnap_gNB_management_procedures.c
xnap_gNB_management_procedures.c
xnap_gNB_task.c
xnap_gNB_task.c
xnap_gNB_itti_messaging.c
xnap_gNB_itti_messaging.c
xnap_gNB_handler.c
)
xnap_gNB_handler.c
xnap_gNB_interface_management.c
)
target_link_libraries
(
xnap
target_link_libraries
(
xnap
PUBLIC asn1_xnap
PUBLIC asn1_xnap
PRIVATE nr_rrc
)
PRIVATE nr_rrc
)
...
...
openair2/XNAP/xnap_common.c
View file @
6ac9597f
...
@@ -19,30 +19,55 @@
...
@@ -19,30 +19,55 @@
* contact@openairinterface.org
* contact@openairinterface.org
*/
*/
/*! \file xnap_common.c
* \brief xnap encoder,decoder dunctions for gNB
* \author Sreeshma Shiv <sreeshmau@iisc.ac.in>
* \date Dec 2023
* \version 1.0
*/
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include <stdint.h>
#include "assertions.h"
#include "conversions.h"
#include "intertask_interface.h"
#include "xnap_common.h"
#include "xnap_common.h"
#include "XNAP_XnAP-PDU.h"
int
xnap_gNB_encode_pdu
(
XNAP_XnAP_PDU_t
*
pdu
,
uint8_t
**
buffer
,
uint32_t
*
len
)
ssize_t
XNAP_generate_initiating_message
(
uint8_t
**
buffer
,
uint32_t
*
length
,
XNAP_ProcedureCode_t
procedureCode
,
XNAP_Criticality_t
criticality
,
asn_TYPE_descriptor_t
*
td
,
void
*
sptr
)
{
{
XNAP_XnAP_PDU_t
pdu
;
ssize_t
encoded
;
ssize_t
encoded
;
memset
(
&
pdu
,
0
,
sizeof
(
XNAP_XnAP_PDU_t
));
pdu
.
present
=
XNAP_XnAP_PDU_PR_initiatingMessage
;
pdu
.
choice
.
initiatingMessage
->
procedureCode
=
procedureCode
;
pdu
.
choice
.
initiatingMessage
->
criticality
=
criticality
;
ANY_fromType_aper
((
ANY_t
*
)
&
pdu
.
choice
.
initiatingMessage
->
value
,
td
,
sptr
);
if
((
encoded
=
aper_encode_to_new_buffer
(
&
asn_DEF_XNAP_XnAP_PDU
,
0
,
&
pdu
,
(
void
**
)
buffer
))
<
0
)
{
DevAssert
(
pdu
!=
NULL
);
DevAssert
(
buffer
!=
NULL
);
DevAssert
(
len
!=
NULL
);
xer_fprint
(
stdout
,
&
asn_DEF_XNAP_XnAP_PDU
,
(
void
*
)
pdu
);
encoded
=
aper_encode_to_new_buffer
(
&
asn_DEF_XNAP_XnAP_PDU
,
0
,
pdu
,
(
void
**
)
buffer
);
if
(
encoded
<
0
)
{
return
-
1
;
return
-
1
;
}
}
*
length
=
encoded
;
*
len
=
encoded
;
ASN_STRUCT_FREE_CONTENTS_ONLY
(
asn_DEF_XNAP_XnAP_PDU
,
pdu
);
return
encoded
;
return
encoded
;
}
}
int
xnap_gNB_decode_pdu
(
XNAP_XnAP_PDU_t
*
pdu
,
const
uint8_t
*
const
buffer
,
uint32_t
length
)
{
asn_dec_rval_t
dec_ret
;
DevAssert
(
buffer
!=
NULL
);
dec_ret
=
aper_decode
(
NULL
,
&
asn_DEF_XNAP_XnAP_PDU
,
(
void
**
)
&
pdu
,
buffer
,
length
,
0
,
0
);
xer_fprint
(
stdout
,
&
asn_DEF_XNAP_XnAP_PDU
,
pdu
);
if
(
dec_ret
.
code
!=
RC_OK
)
{
LOG_E
(
XNAP
,
"Failed to decode PDU
\n
"
);
return
-
1
;
}
return
0
;
}
openair2/XNAP/xnap_common.h
View file @
6ac9597f
/*
/* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* 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
* the OAI Public License, Version 1.1 (the "License"); you may not use this
*
except in compliance with the License.
*
file except in compliance with the License. You may obtain a copy of the
*
You may obtain a copy of the
License at
*License at
*
*
* http://www.openairinterface.org/?page_id=698
* 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
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
...
@@ -23,22 +20,26 @@
...
@@ -23,22 +20,26 @@
#ifndef XNAP_COMMON_H_
#ifndef XNAP_COMMON_H_
#define XNAP_COMMON_H_
#define XNAP_COMMON_H_
#include "XNAP_XnAP-PDU.h"
#include "intertask_interface.h"
#include "common/openairinterface5g_limits.h"
#include "oai_asn1.h"
#include "XNAP_ProtocolIE-Field.h"
#include "XNAP_InitiatingMessage.h"
#include "XNAP_InitiatingMessage.h"
#include "XNAP_ProtocolIE-ContainerPair.h"
#include "XNAP_ProtocolExtensionField.h"
#include "XNAP_ProtocolExtensionContainer.h"
#include "XNAP_ProtocolExtensionContainer.h"
#include "XNAP_ProtocolExtensionField.h"
#include "XNAP_ProtocolIE-ContainerPair.h"
#include "XNAP_ProtocolIE-Field.h"
#include "XNAP_ProtocolIE-FieldPair.h"
#include "XNAP_SuccessfulOutcome.h"
#include "XNAP_UnsuccessfulOutcome.h"
#include "XNAP_XnAP-PDU.h"
#include "XNAP_asn_constant.h"
#include "XNAP_asn_constant.h"
#include "common/openairinterface5g_limits.h"
#include "intertask_interface.h"
#include "oai_asn1.h"
#ifndef XNAP_PORT
#ifndef XNAP_PORT
#define XNAP_PORT 3842
2
#define XNAP_PORT 3842
3
#endif
#endif
extern
int
asn1_xer_print
;
#define XNAP_FIND_PROTOCOLIE_BY_ID(IE_TYPE, ie, container, IE_ID, mandatory) \
#define XNAP_FIND_PROTOCOLIE_BY_ID(IE_TYPE, ie, container, IE_ID, mandatory) \
do { \
do { \
IE_TYPE **ptr; \
IE_TYPE **ptr; \
...
@@ -54,11 +55,7 @@
...
@@ -54,11 +55,7 @@
DevAssert(ie != NULL); \
DevAssert(ie != NULL); \
} while (0)
} while (0)
ssize_t
xnap_generate_initiating_message
(
uint8_t
**
buffer
,
typedef
int
(
*
xnap_message_decoded_callback
)(
instance_t
instance
,
sctp_assoc_t
assocId
,
uint32_t
stream
,
XNAP_XnAP_PDU_t
*
pdu
);
uint32_t
*
length
,
int
xnap_gNB_decode_pdu
(
XNAP_XnAP_PDU_t
*
pdu
,
const
uint8_t
*
const
buffer
,
uint32_t
length
)
__attribute__
((
warn_unused_result
));
XNAP_ProcedureCode_t
procedureCode
,
int
xnap_gNB_encode_pdu
(
XNAP_XnAP_PDU_t
*
pdu
,
uint8_t
**
buffer
,
uint32_t
*
len
)
__attribute__
((
warn_unused_result
));
XNAP_Criticality_t
criticality
,
asn_TYPE_descriptor_t
*
td
,
void
*
sptr
);
#endif
/* XNAP_COMMON_H_ */
#endif
/* XNAP_COMMON_H_ */
openair2/XNAP/xnap_gNB_interface_management.c
0 → 100644
View file @
6ac9597f
This diff is collapsed.
Click to expand it.
openair2/XNAP/xnap_gNB_interface_management.h
0 → 100644
View file @
6ac9597f
/*
* 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
*
* 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
*/
/*! \file xnap_gNB_interface_management.h
* \brief xnap interface handler procedures for gNB
* \date 2023 Dec
* \version 1.0
*/
#ifndef XNAP_GNB_INTERFACE_MANAGEMENT_H_
#define XNAP_GNB_INTERFACE_MANAGEMENT_H_
/*Xn Setup*/
int
xnap_gNB_handle_xn_setup_request
(
instance_t
instance
,
sctp_assoc_t
assoc_id
,
uint32_t
stream
,
XNAP_XnAP_PDU_t
*
pdu
);
int
xnap_gNB_handle_xn_setup_response
(
instance_t
instance
,
sctp_assoc_t
assoc_id
,
uint32_t
stream
,
XNAP_XnAP_PDU_t
*
pdu
);
int
xnap_gNB_handle_xn_setup_failure
(
instance_t
instance
,
sctp_assoc_t
assoc_id
,
uint32_t
stream
,
XNAP_XnAP_PDU_t
*
pdu
);
#endif
/* XNAP_GNB_INTERFACE_MANAGEMENT_H_ */
openair2/XNAP/xnap_gNB_task.c
View file @
6ac9597f
...
@@ -210,7 +210,7 @@ void *xnap_task(void *arg)
...
@@ -210,7 +210,7 @@ void *xnap_task(void *arg)
LOG_D
(
XNAP
,
"Starting XNAP layer
\n
"
);
LOG_D
(
XNAP
,
"Starting XNAP layer
\n
"
);
itti_mark_task_ready
(
TASK_XNAP
);
itti_mark_task_ready
(
TASK_XNAP
);
const
int
instance
=
0
;
const
int
instance
=
0
;
xnap_net_config_t
xn_net_config
=
Read_IPconfig_Xn
();
xnap_net_config_t
*
xn_net_config
=
Read_IPconfig_Xn
();
createXninst
(
instance
,
NULL
,
xn_net_config
);
createXninst
(
instance
,
NULL
,
xn_net_config
);
while
(
1
)
{
while
(
1
)
{
...
@@ -223,6 +223,7 @@ void *xnap_task(void *arg)
...
@@ -223,6 +223,7 @@ void *xnap_task(void *arg)
break
;
break
;
case
XNAP_REGISTER_GNB_REQ
:
{
case
XNAP_REGISTER_GNB_REQ
:
{
xnap_net_config_t
*
xn_nc
=
&
XNAP_REGISTER_GNB_REQ
(
received_msg
).
net_config
;
xnap_gNB_init_sctp
(
ITTI_MSG_DESTINATION_INSTANCE
(
received_msg
),
xn_nc
);
xnap_gNB_init_sctp
(
ITTI_MSG_DESTINATION_INSTANCE
(
received_msg
),
xn_nc
);
}
break
;
}
break
;
...
...
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