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
9c462934
Commit
9c462934
authored
Sep 25, 2020
by
heshanyun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix compile issue about build ngap asn file
parent
1aac2287
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
7013 additions
and
7011 deletions
+7013
-7011
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+1
-1
openair3/NGAP/MESSAGES/ASN1/ASN1_files/ngap-15.8.0.asn1
openair3/NGAP/MESSAGES/ASN1/ASN1_files/ngap-15.8.0.asn1
+6885
-6892
openair3/NGAP/ngap_common.h
openair3/NGAP/ngap_common.h
+5
-0
openair3/NGAP/ngap_gNB.c
openair3/NGAP/ngap_gNB.c
+13
-11
openair3/NGAP/ngap_gNB_context_management_procedures.c
openair3/NGAP/ngap_gNB_context_management_procedures.c
+10
-8
openair3/NGAP/ngap_gNB_decoder.c
openair3/NGAP/ngap_gNB_decoder.c
+7
-7
openair3/NGAP/ngap_gNB_encoder.c
openair3/NGAP/ngap_gNB_encoder.c
+6
-6
openair3/NGAP/ngap_gNB_handlers.c
openair3/NGAP/ngap_gNB_handlers.c
+23
-23
openair3/NGAP/ngap_gNB_nas_procedures.c
openair3/NGAP/ngap_gNB_nas_procedures.c
+63
-63
No files found.
cmake_targets/CMakeLists.txt
View file @
9c462934
...
...
@@ -451,7 +451,7 @@ set(NGAP_ASN_DIR ${NGAP_DIR}/MESSAGES/ASN1/ASN1_files)
set
(
NGAP_C_DIR
${
asn1_generated_dir
}
/NGAP_
${
NGAP_RELEASE
}
)
# Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make
execute_process
(
COMMAND
${
OPENAIR_CMAKE
}
/tools/make_asn1c_includes.sh
"
${
NGAP_C_DIR
}
"
"
${
NGAP_ASN_DIR
}
/
${
NGAP_ASN_FILES
}
"
"NGAP_"
-fno-include-deps
execute_process
(
COMMAND
${
OPENAIR_CMAKE
}
/tools/make_asn1c_includes.sh
"
${
NGAP_C_DIR
}
"
"
${
NGAP_ASN_DIR
}
/
${
NGAP_ASN_FILES
}
"
"NGAP_"
-fno-include-deps
-findirect-choice
RESULT_VARIABLE ret
)
if
(
NOT
${
ret
}
STREQUAL 0
)
message
(
FATAL_ERROR
"
${
ret
}
: error"
)
...
...
openair3/NGAP/MESSAGES/ASN1/ASN1_files/ngap-15.8.0.asn1
View file @
9c462934
This diff is collapsed.
Click to expand it.
openair3/NGAP/ngap_common.h
View file @
9c462934
...
...
@@ -79,6 +79,11 @@
#include "NGAP_PDUSessionResourceModifyRequestTransfer.h"
#include "NGAP_QosFlowAddOrModifyRequestItem.h"
#include "NGAP_TAIListForPagingItem.h"
#include "NGAP_GNB-ID.h"
#include "NGAP_GlobalGNB-ID.h"
#include "NGAP_GTPTunnel.h"
#include "NGAP_UE-NGAP-ID-pair.h"
#include "NGAP_UserLocationInformationNR.h"
/* Checking version of ASN1C compiler */
#if (ASN1C_ENVIRONMENT_VERSION < ASN1C_MINIMUM_VERSION)
...
...
openair3/NGAP/ngap_gNB.c
View file @
9c462934
...
...
@@ -469,28 +469,30 @@ static int ngap_gNB_generate_ng_setup_request(
/* Prepare the NGAP message to encode */
memset
(
&
pdu
,
0
,
sizeof
(
pdu
));
pdu
.
present
=
NGAP_NGAP_PDU_PR_initiatingMessage
;
pdu
.
choice
.
initiatingMessage
.
procedureCode
=
NGAP_ProcedureCode_id_NGSetup
;
pdu
.
choice
.
initiatingMessage
.
criticality
=
NGAP_Criticality_reject
;
pdu
.
choice
.
initiatingMessage
.
value
.
present
=
NGAP_InitiatingMessage__value_PR_NGSetupRequest
;
out
=
&
pdu
.
choice
.
initiatingMessage
.
value
.
choice
.
NGSetupRequest
;
pdu
.
choice
.
initiatingMessage
=
CALLOC
(
1
,
sizeof
(
struct
NGAP_InitiatingMessage
));
pdu
.
choice
.
initiatingMessage
->
procedureCode
=
NGAP_ProcedureCode_id_NGSetup
;
pdu
.
choice
.
initiatingMessage
->
criticality
=
NGAP_Criticality_reject
;
pdu
.
choice
.
initiatingMessage
->
value
.
present
=
NGAP_InitiatingMessage__value_PR_NGSetupRequest
;
out
=
&
pdu
.
choice
.
initiatingMessage
->
value
.
choice
.
NGSetupRequest
;
/* mandatory */
ie
=
(
NGAP_NGSetupRequestIEs_t
*
)
calloc
(
1
,
sizeof
(
NGAP_NGSetupRequestIEs_t
));
ie
->
id
=
NGAP_ProtocolIE_ID_id_GlobalRANNodeID
;
ie
->
criticality
=
NGAP_Criticality_reject
;
ie
->
value
.
present
=
NGAP_NGSetupRequestIEs__value_PR_GlobalRANNodeID
;
ie
->
value
.
choice
.
GlobalRANNodeID
.
present
=
NGAP_GlobalRANNodeID_PR_globalGNB_ID
;
ie
->
value
.
choice
.
GlobalRANNodeID
.
choice
.
globalGNB_ID
=
CALLOC
(
1
,
sizeof
(
struct
NGAP_GlobalGNB_ID
));
MCC_MNC_TO_PLMNID
(
instance_p
->
mcc
[
ngap_amf_data_p
->
broadcast_plmn_index
[
0
]],
instance_p
->
mnc
[
ngap_amf_data_p
->
broadcast_plmn_index
[
0
]],
instance_p
->
mnc_digit_length
[
ngap_amf_data_p
->
broadcast_plmn_index
[
0
]],
&
ie
->
value
.
choice
.
GlobalRANNodeID
.
choice
.
globalGNB_ID
.
pLMNIdentity
);
ie
->
value
.
choice
.
GlobalRANNodeID
.
choice
.
globalGNB_ID
.
gNB_ID
.
present
=
NGAP_GNB_ID_PR_gNB_ID
;
&
(
ie
->
value
.
choice
.
GlobalRANNodeID
.
choice
.
globalGNB_ID
->
pLMNIdentity
)
);
ie
->
value
.
choice
.
GlobalRANNodeID
.
choice
.
globalGNB_ID
->
gNB_ID
.
present
=
NGAP_GNB_ID_PR_gNB_ID
;
MACRO_GNB_ID_TO_BIT_STRING
(
instance_p
->
gNB_id
,
&
ie
->
value
.
choice
.
GlobalRANNodeID
.
choice
.
globalGNB_ID
.
gNB_ID
.
choice
.
gNB_ID
);
&
ie
->
value
.
choice
.
GlobalRANNodeID
.
choice
.
globalGNB_ID
->
gNB_ID
.
choice
.
gNB_ID
);
NGAP_INFO
(
"%u -> %02x%02x%02x%02x
\n
"
,
instance_p
->
gNB_id
,
ie
->
value
.
choice
.
GlobalRANNodeID
.
choice
.
globalGNB_ID
.
gNB_ID
.
choice
.
gNB_ID
.
buf
[
0
],
ie
->
value
.
choice
.
GlobalRANNodeID
.
choice
.
globalGNB_ID
.
gNB_ID
.
choice
.
gNB_ID
.
buf
[
1
],
ie
->
value
.
choice
.
GlobalRANNodeID
.
choice
.
globalGNB_ID
.
gNB_ID
.
choice
.
gNB_ID
.
buf
[
2
],
ie
->
value
.
choice
.
GlobalRANNodeID
.
choice
.
globalGNB_ID
.
gNB_ID
.
choice
.
gNB_ID
.
buf
[
3
]);
ie
->
value
.
choice
.
GlobalRANNodeID
.
choice
.
globalGNB_ID
->
gNB_ID
.
choice
.
gNB_ID
.
buf
[
0
],
ie
->
value
.
choice
.
GlobalRANNodeID
.
choice
.
globalGNB_ID
->
gNB_ID
.
choice
.
gNB_ID
.
buf
[
1
],
ie
->
value
.
choice
.
GlobalRANNodeID
.
choice
.
globalGNB_ID
->
gNB_ID
.
choice
.
gNB_ID
.
buf
[
2
],
ie
->
value
.
choice
.
GlobalRANNodeID
.
choice
.
globalGNB_ID
->
gNB_ID
.
choice
.
gNB_ID
.
buf
[
3
]);
ASN_SEQUENCE_ADD
(
&
out
->
protocolIEs
.
list
,
ie
);
/* optional */
...
...
openair3/NGAP/ngap_gNB_context_management_procedures.c
View file @
9c462934
...
...
@@ -84,10 +84,11 @@ int ngap_ue_context_release_complete(instance_t instance,
/* Prepare the NGAP message to encode */
memset
(
&
pdu
,
0
,
sizeof
(
pdu
));
pdu
.
present
=
NGAP_NGAP_PDU_PR_successfulOutcome
;
pdu
.
choice
.
successfulOutcome
.
procedureCode
=
NGAP_ProcedureCode_id_UEContextRelease
;
pdu
.
choice
.
successfulOutcome
.
criticality
=
NGAP_Criticality_reject
;
pdu
.
choice
.
successfulOutcome
.
value
.
present
=
NGAP_SuccessfulOutcome__value_PR_UEContextReleaseComplete
;
out
=
&
pdu
.
choice
.
successfulOutcome
.
value
.
choice
.
UEContextReleaseComplete
;
pdu
.
choice
.
successfulOutcome
=
CALLOC
(
1
,
sizeof
(
struct
NGAP_SuccessfulOutcome
));
pdu
.
choice
.
successfulOutcome
->
procedureCode
=
NGAP_ProcedureCode_id_UEContextRelease
;
pdu
.
choice
.
successfulOutcome
->
criticality
=
NGAP_Criticality_reject
;
pdu
.
choice
.
successfulOutcome
->
value
.
present
=
NGAP_SuccessfulOutcome__value_PR_UEContextReleaseComplete
;
out
=
&
pdu
.
choice
.
successfulOutcome
->
value
.
choice
.
UEContextReleaseComplete
;
/* mandatory */
ie
=
(
NGAP_UEContextReleaseComplete_IEs_t
*
)
calloc
(
1
,
sizeof
(
NGAP_UEContextReleaseComplete_IEs_t
));
...
...
@@ -178,10 +179,11 @@ int ngap_ue_context_release_req(instance_t instance,
/* Prepare the NGAP message to encode */
memset
(
&
pdu
,
0
,
sizeof
(
pdu
));
pdu
.
present
=
NGAP_NGAP_PDU_PR_initiatingMessage
;
pdu
.
choice
.
initiatingMessage
.
procedureCode
=
NGAP_ProcedureCode_id_UEContextReleaseRequest
;
pdu
.
choice
.
initiatingMessage
.
criticality
=
NGAP_Criticality_ignore
;
pdu
.
choice
.
initiatingMessage
.
value
.
present
=
NGAP_InitiatingMessage__value_PR_UEContextReleaseRequest
;
out
=
&
pdu
.
choice
.
initiatingMessage
.
value
.
choice
.
UEContextReleaseRequest
;
pdu
.
choice
.
initiatingMessage
=
CALLOC
(
1
,
sizeof
(
struct
NGAP_InitiatingMessage
));
pdu
.
choice
.
initiatingMessage
->
procedureCode
=
NGAP_ProcedureCode_id_UEContextReleaseRequest
;
pdu
.
choice
.
initiatingMessage
->
criticality
=
NGAP_Criticality_ignore
;
pdu
.
choice
.
initiatingMessage
->
value
.
present
=
NGAP_InitiatingMessage__value_PR_UEContextReleaseRequest
;
out
=
&
pdu
.
choice
.
initiatingMessage
->
value
.
choice
.
UEContextReleaseRequest
;
/* mandatory */
ie
=
(
NGAP_UEContextReleaseRequest_IEs_t
*
)
calloc
(
1
,
sizeof
(
NGAP_UEContextReleaseRequest_IEs_t
));
...
...
openair3/NGAP/ngap_gNB_decoder.c
View file @
9c462934
...
...
@@ -40,7 +40,7 @@ static int ngap_gNB_decode_initiating_message(NGAP_NGAP_PDU_t *pdu) {
asn_encode_to_new_buffer_result_t
res
=
{
NULL
,
{
0
,
NULL
,
NULL
}
};
DevAssert
(
pdu
!=
NULL
);
switch
(
pdu
->
choice
.
initiatingMessage
.
procedureCode
)
{
switch
(
pdu
->
choice
.
initiatingMessage
->
procedureCode
)
{
case
NGAP_ProcedureCode_id_DownlinkNASTransport
:
res
=
asn_encode_to_new_buffer
(
NULL
,
ATS_CANONICAL_XER
,
&
asn_DEF_NGAP_NGAP_PDU
,
pdu
);
free
(
res
.
buffer
);
...
...
@@ -88,9 +88,9 @@ static int ngap_gNB_decode_initiating_message(NGAP_NGAP_PDU_t *pdu) {
default:
NGAP_ERROR
(
"Unknown procedure ID (%d) for initiating message
\n
"
,
(
int
)
pdu
->
choice
.
initiatingMessage
.
procedureCode
);
(
int
)
pdu
->
choice
.
initiatingMessage
->
procedureCode
);
AssertFatal
(
0
,
"Unknown procedure ID (%d) for initiating message
\n
"
,
(
int
)
pdu
->
choice
.
initiatingMessage
.
procedureCode
);
(
int
)
pdu
->
choice
.
initiatingMessage
->
procedureCode
);
return
-
1
;
}
...
...
@@ -101,7 +101,7 @@ static int ngap_gNB_decode_successful_outcome(NGAP_NGAP_PDU_t *pdu) {
asn_encode_to_new_buffer_result_t
res
=
{
NULL
,
{
0
,
NULL
,
NULL
}
};
DevAssert
(
pdu
!=
NULL
);
switch
(
pdu
->
choice
.
successfulOutcome
.
procedureCode
)
{
switch
(
pdu
->
choice
.
successfulOutcome
->
procedureCode
)
{
case
NGAP_ProcedureCode_id_NGSetup
:
res
=
asn_encode_to_new_buffer
(
NULL
,
ATS_CANONICAL_XER
,
&
asn_DEF_NGAP_NGAP_PDU
,
pdu
);
free
(
res
.
buffer
);
...
...
@@ -120,7 +120,7 @@ static int ngap_gNB_decode_successful_outcome(NGAP_NGAP_PDU_t *pdu) {
default:
NGAP_ERROR
(
"Unknown procedure ID (%d) for successfull outcome message
\n
"
,
(
int
)
pdu
->
choice
.
successfulOutcome
.
procedureCode
);
(
int
)
pdu
->
choice
.
successfulOutcome
->
procedureCode
);
return
-
1
;
}
...
...
@@ -131,7 +131,7 @@ static int ngap_gNB_decode_unsuccessful_outcome(NGAP_NGAP_PDU_t *pdu) {
asn_encode_to_new_buffer_result_t
res
=
{
NULL
,
{
0
,
NULL
,
NULL
}
};
DevAssert
(
pdu
!=
NULL
);
switch
(
pdu
->
choice
.
unsuccessfulOutcome
.
procedureCode
)
{
switch
(
pdu
->
choice
.
unsuccessfulOutcome
->
procedureCode
)
{
case
NGAP_ProcedureCode_id_NGSetup
:
res
=
asn_encode_to_new_buffer
(
NULL
,
ATS_CANONICAL_XER
,
&
asn_DEF_NGAP_NGAP_PDU
,
pdu
);
free
(
res
.
buffer
);
...
...
@@ -143,7 +143,7 @@ static int ngap_gNB_decode_unsuccessful_outcome(NGAP_NGAP_PDU_t *pdu) {
default:
NGAP_ERROR
(
"Unknown procedure ID (%d) for unsuccessfull outcome message
\n
"
,
(
int
)
pdu
->
choice
.
unsuccessfulOutcome
.
procedureCode
);
(
int
)
pdu
->
choice
.
unsuccessfulOutcome
->
procedureCode
);
return
-
1
;
}
...
...
openair3/NGAP/ngap_gNB_encoder.c
View file @
9c462934
...
...
@@ -82,7 +82,7 @@ int ngap_gNB_encode_initiating(NGAP_NGAP_PDU_t *pdu,
asn_encode_to_new_buffer_result_t
res
=
{
NULL
,
{
0
,
NULL
,
NULL
}
};
DevAssert
(
pdu
!=
NULL
);
switch
(
pdu
->
choice
.
initiatingMessage
.
procedureCode
)
{
switch
(
pdu
->
choice
.
initiatingMessage
->
procedureCode
)
{
case
NGAP_ProcedureCode_id_NGSetup
:
res
=
asn_encode_to_new_buffer
(
NULL
,
ATS_CANONICAL_XER
,
&
asn_DEF_NGAP_NGAP_PDU
,
pdu
);
free
(
res
.
buffer
);
...
...
@@ -125,7 +125,7 @@ int ngap_gNB_encode_initiating(NGAP_NGAP_PDU_t *pdu,
default:
NGAP_DEBUG
(
"Unknown procedure ID (%d) for initiating message
\n
"
,
(
int
)
pdu
->
choice
.
initiatingMessage
.
procedureCode
);
(
int
)
pdu
->
choice
.
initiatingMessage
->
procedureCode
);
return
-
1
;
}
...
...
@@ -146,7 +146,7 @@ int ngap_gNB_encode_successfull_outcome(NGAP_NGAP_PDU_t *pdu,
asn_encode_to_new_buffer_result_t
res
=
{
NULL
,
{
0
,
NULL
,
NULL
}
};
DevAssert
(
pdu
!=
NULL
);
switch
(
pdu
->
choice
.
successfulOutcome
.
procedureCode
)
{
switch
(
pdu
->
choice
.
successfulOutcome
->
procedureCode
)
{
case
NGAP_ProcedureCode_id_InitialContextSetup
:
res
=
asn_encode_to_new_buffer
(
NULL
,
ATS_CANONICAL_XER
,
&
asn_DEF_NGAP_NGAP_PDU
,
pdu
);
free
(
res
.
buffer
);
...
...
@@ -177,7 +177,7 @@ int ngap_gNB_encode_successfull_outcome(NGAP_NGAP_PDU_t *pdu,
default:
NGAP_WARN
(
"Unknown procedure ID (%d) for successfull outcome message
\n
"
,
(
int
)
pdu
->
choice
.
successfulOutcome
.
procedureCode
);
(
int
)
pdu
->
choice
.
successfulOutcome
->
procedureCode
);
return
-
1
;
}
...
...
@@ -198,7 +198,7 @@ int ngap_gNB_encode_unsuccessfull_outcome(NGAP_NGAP_PDU_t *pdu,
asn_encode_to_new_buffer_result_t
res
=
{
NULL
,
{
0
,
NULL
,
NULL
}
};
DevAssert
(
pdu
!=
NULL
);
switch
(
pdu
->
choice
.
unsuccessfulOutcome
.
procedureCode
)
{
switch
(
pdu
->
choice
.
unsuccessfulOutcome
->
procedureCode
)
{
case
NGAP_ProcedureCode_id_InitialContextSetup
:
res
=
asn_encode_to_new_buffer
(
NULL
,
ATS_CANONICAL_XER
,
&
asn_DEF_NGAP_NGAP_PDU
,
pdu
);
free
(
res
.
buffer
);
...
...
@@ -206,7 +206,7 @@ int ngap_gNB_encode_unsuccessfull_outcome(NGAP_NGAP_PDU_t *pdu,
default:
NGAP_DEBUG
(
"Unknown procedure ID (%d) for unsuccessfull outcome message
\n
"
,
(
int
)
pdu
->
choice
.
unsuccessfulOutcome
.
procedureCode
);
(
int
)
pdu
->
choice
.
unsuccessfulOutcome
->
procedureCode
);
return
-
1
;
}
...
...
openair3/NGAP/ngap_gNB_handlers.c
View file @
9c462934
This diff is collapsed.
Click to expand it.
openair3/NGAP/ngap_gNB_nas_procedures.c
View file @
9c462934
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