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
lizhongxiao
OpenXG-RAN
Commits
3e354e2e
Commit
3e354e2e
authored
Aug 06, 2018
by
WEI-TAI CHEN
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge develop but not complete [unstable]
parent
9b7143ca
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
4710 additions
and
1188 deletions
+4710
-1188
cmake_targets/CMakeLists.txt
cmake_targets/CMakeLists.txt
+34
-34
openair1/PHY/TOOLS/file_output.c
openair1/PHY/TOOLS/file_output.c
+177
-0
openair1/PHY/defs_eNB.h
openair1/PHY/defs_eNB.h
+0
-422
openair2/RRC/NR/MESSAGES/asn1c/ASN1_files/nr-rrc-15.2.1.asn1
openair2/RRC/NR/MESSAGES/asn1c/ASN1_files/nr-rrc-15.2.1.asn1
+4469
-0
openair2/RRC/NR/nr_rrc_defs.h
openair2/RRC/NR/nr_rrc_defs.h
+2
-1
openair3/S1AP/s1ap_eNB_handlers.c
openair3/S1AP/s1ap_eNB_handlers.c
+28
-731
No files found.
cmake_targets/CMakeLists.txt
View file @
3e354e2e
...
...
@@ -184,8 +184,7 @@ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath -Wl,${CMAKE_CU
# these changes are related to hardcoded path to include .h files
add_definitions
(
-DCMAKER
)
set
(
CMAKE_C_FLAGS_DEBUG
"
${
CMAKE_C_FLAGS
}
-g -DMALLOC_CHECK_=3"
)
#set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS} -g -DMALLOC_CHECK_=3 -O2")
set
(
CMAKE_C_FLAGS_RELWITHDEBINFO
"
${
CMAKE_C_FLAGS
}
-g -DMALLOC_CHECK_=3"
)
set
(
CMAKE_C_FLAGS_RELWITHDEBINFO
"
${
CMAKE_C_FLAGS
}
-g -DMALLOC_CHECK_=3 -O2"
)
set
(
GIT_BRANCH
"UNKNOWN"
)
...
...
@@ -324,7 +323,9 @@ set (RRC_FULL_DIR ${asn1_generated_dir}/RRC_${RRC_ASN1_VERSION})
message
(
"calling asn1c -pdu=all -fcompound-names -gen-PER -no-gen-OER -no-gen-example -D
${
RRC_FULL_DIR
}
${
RRC_GRAMMAR
}
"
)
execute_process
(
COMMAND mkdir -p
${
RRC_FULL_DIR
}
COMMAND env asn1c -pdu=all -fcompound-names -gen-PER -no-gen-OER -no-gen-example -D
${
RRC_FULL_DIR
}
${
RRC_GRAMMAR
}
RESULT_VARIABLE ret
)
RESULT_VARIABLE ret
OUTPUT_QUIET
ERROR_QUIET
)
if
(
NOT
${
ret
}
STREQUAL 0
)
message
(
FATAL_ERROR
"
${
ret
}
: error"
)
endif
(
NOT
${
ret
}
STREQUAL 0
)
...
...
@@ -354,18 +355,18 @@ add_custom_command (
add_list2_option
(
NR_RRC_ASN1_VERSION
"NR_Rel15"
"ASN.1 version of NR_RRC interface"
)
if
(
${
NR_RRC_ASN1_VERSION
}
STREQUAL
"NR_Rel15"
)
set
(
NR_RRC_GRAMMAR
${
OPENAIR2_DIR
}
/RRC/NR/MESSAGES/asn1c/ASN1_files/NR-RRC-38331-f21.asn
)
make_version
(
NR_RRC_VERSION 15 2 1
)
set
(
NR_RRC_GRAMMAR
${
OPENAIR2_DIR
}
/RRC/NR/MESSAGES/asn1c/ASN1_files/nr-rrc-15.2.1.asn1
)
endif
(
${
NR_RRC_ASN1_VERSION
}
STREQUAL
"NR_Rel15"
)
add_definitions
(
-DNR_RRC_VERSION=
${
NR_RRC_VERSION
}
)
set
(
NR_RRC_FULL_DIR
${
asn1_generated_dir
}
/
${
NR_RRC_ASN1_VERSION
}
)
message
(
"calling ASN1C_PREFIX=NR_ asn1c -
gen-PER -fcompound-names -findirect-choice
-no-gen-example -D
${
NR_RRC_FULL_DIR
}
${
NR_RRC_GRAMMAR
}
"
)
message
(
"calling ASN1C_PREFIX=NR_ asn1c -
pdu=all -fcompound-names -fno-include-deps -gen-PER -no-gen-OER
-no-gen-example -D
${
NR_RRC_FULL_DIR
}
${
NR_RRC_GRAMMAR
}
"
)
execute_process
(
COMMAND mkdir -p
${
NR_RRC_FULL_DIR
}
COMMAND env
"ASN1C_PREFIX=NR_"
asn1c -
fcompound-names -findirect-choice -gen-P
ER -no-gen-example -D
${
NR_RRC_FULL_DIR
}
${
NR_RRC_GRAMMAR
}
COMMAND env
"ASN1C_PREFIX=NR_"
asn1c -
pdu=all -fcompound-names -fno-include-deps -gen-PER -no-gen-O
ER -no-gen-example -D
${
NR_RRC_FULL_DIR
}
${
NR_RRC_GRAMMAR
}
RESULT_VARIABLE ret
OUTPUT_QUIET
ERROR_QUIET
)
OUTPUT_QUIET
ERROR_QUIET
)
if
(
NOT
${
ret
}
STREQUAL 0
)
message
(
FATAL_ERROR
"
${
ret
}
: error"
)
...
...
@@ -373,8 +374,8 @@ endif (NOT ${ret} STREQUAL 0)
file
(
GLOB nr_rrc_source
${
NR_RRC_FULL_DIR
}
/*.c
)
file
(
GLOB nr_rrc_h
${
NR_RRC_FULL_DIR
}
/*.h
)
set
(
nr_rrc_h
${
nr_rrc_h
}
${
NR_RRC_FULL_DIR
}
/NR_asn
1_constants
.h
)
set_source_files_properties
(
${
nr_rrc_source
}
PROPERTIES COMPILE_FLAGS -w
)
# suppress warnings from generated code
set
(
nr_rrc_h
${
nr_rrc_h
}
${
NR_RRC_FULL_DIR
}
/NR_asn
_constant
.h
)
#
set_source_files_properties(${nr_rrc_source} PROPERTIES COMPILE_FLAGS -w) # suppress warnings from generated code
add_library
(
NR_RRC_LIB
${
nr_rrc_h
}
${
nr_rrc_source
}
...
...
@@ -384,9 +385,9 @@ include_directories ("${NR_RRC_FULL_DIR}")
# add the command to generate the source code
# Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make
add_custom_command
(
OUTPUT
${
NR_RRC_FULL_DIR
}
/NR_asn
1_constants
.h
add_custom_command
(
OUTPUT
${
NR_RRC_FULL_DIR
}
/NR_asn
_constant
.h
COMMAND mkdir -p
${
NR_RRC_FULL_DIR
}
#COMMAND env "ASN1C_PREFIX=NR_" asn1c -gen-PER -fcompound-names -findirect-choice
-no-gen-example -D ${NR_RRC_FULL_DIR} ${NR_RRC_GRAMMAR}
COMMAND env
"ASN1C_PREFIX=NR_"
asn1c -gen-PER -fcompound-names -findirect-choice -no-gen-OER
-no-gen-example -D
${
NR_RRC_FULL_DIR
}
${
NR_RRC_GRAMMAR
}
DEPENDS
${
NR_RRC_GRAMMAR
}
)
...
...
@@ -428,10 +429,13 @@ set(S1AP_C_DIR ${asn1_generated_dir}/S1AP_${S1AP_RELEASE})
message
(
"calling ASN1C_PREFIX=S1AP_ asn1c -pdu=all -fcompound-names -fno-include-deps -gen-PER -no-gen-OER -no-gen-example -D
${
S1AP_C_DIR
}
${
S1AP_ASN_DIR
}
/
${
S1AP_ASN_FILES
}
"
)
execute_process
(
COMMAND mkdir -p
${
S1AP_C_DIR
}
COMMAND env
"ASN1C_PREFIX=S1AP_"
asn1c -pdu=all -fcompound-names -fno-include-deps -gen-PER -no-gen-OER -no-gen-example -D
${
S1AP_C_DIR
}
${
S1AP_ASN_DIR
}
/
${
S1AP_ASN_FILES
}
RESULT_VARIABLE ret
)
RESULT_VARIABLE ret
OUTPUT_QUIET
ERROR_QUIET
)
if
(
NOT
${
ret
}
STREQUAL 0
)
message
(
FATAL_ERROR
"
${
ret
}
: error"
)
endif
(
NOT
${
ret
}
STREQUAL 0
)
file
(
GLOB S1AP_source
${
S1AP_C_DIR
}
/*.c
)
file
(
GLOB s1ap_h
${
S1AP_C_DIR
}
/*.h
)
set
(
s1ap_h
${
s1ap_h
}
)
...
...
@@ -453,6 +457,7 @@ include_directories ("${S1AP_DIR}")
add_library
(
S1AP_ENB
${
S1AP_DIR
}
/s1ap_eNB.c
${
S1AP_DIR
}
/s1ap_eNB_context_management_procedures.c
${
S1AP_DIR
}
/s1ap_eNB_decoder.c
${
S1AP_DIR
}
/s1ap_eNB_encoder.c
${
S1AP_DIR
}
/s1ap_eNB_handlers.c
${
S1AP_DIR
}
/s1ap_eNB_itti_messaging.c
...
...
@@ -462,7 +467,6 @@ add_library(S1AP_ENB
${
S1AP_DIR
}
/s1ap_eNB_overload.c
${
S1AP_DIR
}
/s1ap_eNB_trace.c
${
S1AP_DIR
}
/s1ap_eNB_ue_context.c
${
S1AP_DIR
}
/s1ap_eNB_decoder.c
)
#X2AP
...
...
@@ -494,7 +498,9 @@ set(X2AP_C_DIR ${asn1_generated_dir}/X2AP_${X2AP_RELEASE})
message
(
"calling ASN1C_PREFIX=X2AP_ asn1c -pdu=all -fcompound-names -fno-include-deps -gen-PER -no-gen-OER -no-gen-example -D
${
X2AP_C_DIR
}
${
X2AP_ASN_DIR
}
/
${
X2AP_ASN_FILES
}
"
)
execute_process
(
COMMAND mkdir -p
${
X2AP_C_DIR
}
COMMAND env
"ASN1C_PREFIX=X2AP_"
asn1c -pdu=all -fcompound-names -fno-include-deps -gen-PER -no-gen-OER -no-gen-example -D
${
X2AP_C_DIR
}
${
X2AP_ASN_DIR
}
/
${
X2AP_ASN_FILES
}
RESULT_VARIABLE ret
)
RESULT_VARIABLE ret
OUTPUT_QUIET
ERROR_QUIET
)
if
(
NOT
${
ret
}
STREQUAL 0
)
message
(
FATAL_ERROR
"
${
ret
}
: error"
)
endif
(
NOT
${
ret
}
STREQUAL 0
)
...
...
@@ -510,13 +516,6 @@ add_custom_command (
DEPENDS
${
X2AP_ASN_DIR
}
/
${
X2AP_ASN_FILES
}
)
#add_custom_command (
# OUTPUT ${X2AP_C_DIR}/X2AP_asn_constant.h
# COMMAND ${asn1c_call} ${X2AP_C_DIR} ${X2AP_ASN_DIR}/${X2AP_ASN_FILES} X2AP
# COMMAND ${fix_asn1c_call} ${X2AP_C_DIR} X2AP ${X2AP_VERSION}
# DEPENDS ${X2AP_ASN_DIR}/${X2AP_ASN_FILES}
# )
add_library
(
X2AP_LIB
${
X2AP_source
}
${
X2AP_DIR
}
/x2ap_common.c
...
...
@@ -1267,6 +1266,7 @@ set(PHY_SRC_UE
${
OPENAIR1_DIR
}
/PHY/LTE_ESTIMATION/lte_sync_time.c
${
OPENAIR1_DIR
}
/PHY/LTE_ESTIMATION/lte_sync_timefreq.c
${
OPENAIR1_DIR
}
/PHY/LTE_ESTIMATION/lte_adjust_sync.c
${
OPENAIR1_DIR
}
/PHY/LTE_ESTIMATION/lte_adjust_sync_ue.c
${
OPENAIR1_DIR
}
/PHY/LTE_ESTIMATION/lte_dl_channel_estimation.c
${
OPENAIR1_DIR
}
/PHY/LTE_ESTIMATION/lte_dl_bf_channel_estimation.c
${
OPENAIR1_DIR
}
/PHY/LTE_ESTIMATION/lte_dl_mbsfn_channel_estimation.c
...
...
@@ -1278,7 +1278,7 @@ set(PHY_SRC_UE
set
(
PHY_NR_SRC
# depend on code generation from asn1c
${
RRC_FULL_DIR
}
/asn
1_constants
.h
${
RRC_FULL_DIR
}
/asn
_constant
.h
# actual source
${
OPENAIR1_DIR
}
/PHY/INIT/nr_init.c
${
OPENAIR1_DIR
}
/PHY/INIT/nr_parms.c
...
...
@@ -1303,7 +1303,7 @@ set(PHY_SRC_UE
set
(
PHY_NR_UE_SRC
# depend on code generation from asn1c
${
RRC_FULL_DIR
}
/asn
1_constants
.h
${
RRC_FULL_DIR
}
/asn
_constant
.h
# actual source
${
OPENAIR1_DIR
}
/PHY/MODULATION/slot_fep.c
${
OPENAIR1_DIR
}
/PHY/INIT/nr_parms.c
...
...
@@ -1495,12 +1495,12 @@ set (MAC_SRC
#${PHY_INTERFACE_DIR}/phy_stub_UE.c
${
PHY_INTERFACE_DIR
}
/IF_Module.c
${
MAC_DIR
}
/main.c
${
MAC_DIR
}
/main_ue.c
${
MAC_DIR
}
/ue_procedures.c
${
MAC_DIR
}
/ra_procedures.c
#
${MAC_DIR}/main_ue.c
#
${MAC_DIR}/ue_procedures.c
#
${MAC_DIR}/ra_procedures.c
${
MAC_DIR
}
/l1_helpers.c
${
MAC_DIR
}
/rar_tools.c
${
MAC_DIR
}
/rar_tools_ue.c
#
${MAC_DIR}/rar_tools_ue.c
${
MAC_DIR
}
/eNB_scheduler.c
${
MAC_DIR
}
/eNB_scheduler_dlsch.c
${
MAC_DIR
}
/eNB_scheduler_ulsch.c
...
...
@@ -1512,7 +1512,7 @@ set (MAC_SRC
${
MAC_DIR
}
/eNB_scheduler_phytest.c
${
MAC_DIR
}
/pre_processor.c
${
MAC_DIR
}
/config.c
${
MAC_DIR
}
/config_ue.c
#
${MAC_DIR}/config_ue.c
${
NR_PHY_INTERFACE_DIR
}
/NR_IF_Module.c
${
NR_MAC_DIR
}
/main.c
${
NR_MAC_DIR
}
/config.c
...
...
@@ -2168,7 +2168,7 @@ add_executable(lte-softmodem
target_link_libraries
(
lte-softmodem
-Wl,--start-group
RRC_LIB
NR_RRC_LIB
S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB PHY_COMMON PHY PHY_RU LFDS L2
RRC_LIB S1AP_LIB S1AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT UDP SCHED_LIB SCHED_RU_LIB PHY_COMMON PHY PHY_RU LFDS L2
${
MSC_LIB
}
${
RAL_LIB
}
${
NAS_UE_LIB
}
${
ITTI_LIB
}
${
FLPT_MSG_LIB
}
${
ASYNC_IF_LIB
}
${
FLEXRAN_AGENT_LIB
}
LFDS7
NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
-Wl,--end-group z dl
)
...
...
@@ -2613,13 +2613,13 @@ endif()
add_custom_command
(
OUTPUT
${
OPENAIR_BIN_DIR
}
/messages.xml
COMMAND
${
xml_command
}
DEPENDS
${
S1AP_OAI_generated
}
${
RRC_FULL_DIR
}
/asn
1_constants
.h
DEPENDS
${
S1AP_OAI_generated
}
${
RRC_FULL_DIR
}
/asn
_constant
.h
)
add_custom_command
(
OUTPUT
${
OPENAIR_BIN_DIR
}
/messages_xml.h
COMMAND sed -e 's/ *//' -e 's/\"/\\\\\"/g' -e 's/^/\"/' -e 's/$$/\\\\n\"/'
${
OPENAIR_BIN_DIR
}
/messages.xml >
${
OPENAIR_BIN_DIR
}
/messages_xml.h
DEPENDS
${
OPENAIR_BIN_DIR
}
/messages.xml
${
RRC_FULL_DIR
}
/asn
1_constants
.h
DEPENDS
${
OPENAIR_BIN_DIR
}
/messages.xml
${
RRC_FULL_DIR
}
/asn
_constant
.h
)
################
...
...
openair1/PHY/TOOLS/file_output.c
0 → 100644
View file @
3e354e2e
/*
* 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
*/
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
int
write_output
(
const
char
*
fname
,
const
char
*
vname
,
void
*
data
,
int
length
,
int
dec
,
char
format
)
{
FILE
*
fp
=
NULL
;
int
i
;
printf
(
"Writing %d elements of type %d to %s
\n
"
,
length
,
format
,
fname
);
if
(
format
==
10
||
format
==
11
||
format
==
12
||
format
==
13
||
format
==
14
)
{
fp
=
fopen
(
fname
,
"a+"
);
}
else
if
(
format
!=
10
&&
format
!=
11
&&
format
!=
12
&&
format
!=
13
&&
format
!=
14
)
{
fp
=
fopen
(
fname
,
"w+"
);
}
if
(
fp
==
NULL
)
{
printf
(
"[OPENAIR][FILE OUTPUT] Cannot open file %s
\n
"
,
fname
);
return
(
-
1
);
}
if
(
format
!=
10
&&
format
!=
11
&&
format
!=
12
&&
format
!=
13
&&
format
!=
14
)
fprintf
(
fp
,
"%s = ["
,
vname
);
switch
(
format
)
{
case
0
:
// real 16-bit
for
(
i
=
0
;
i
<
length
;
i
+=
dec
)
{
fprintf
(
fp
,
"%d
\n
"
,((
short
*
)
data
)[
i
]);
}
break
;
case
1
:
// complex 16-bit
case
13
:
case
14
:
case
15
:
for
(
i
=
0
;
i
<
length
<<
1
;
i
+=
(
2
*
dec
))
{
fprintf
(
fp
,
"%d + j*(%d)
\n
"
,((
short
*
)
data
)[
i
],((
short
*
)
data
)[
i
+
1
]);
}
break
;
case
2
:
// real 32-bit
for
(
i
=
0
;
i
<
length
;
i
+=
dec
)
{
fprintf
(
fp
,
"%d
\n
"
,((
int
*
)
data
)[
i
]);
}
break
;
case
3
:
// complex 32-bit
for
(
i
=
0
;
i
<
length
<<
1
;
i
+=
(
2
*
dec
))
{
fprintf
(
fp
,
"%d + j*(%d)
\n
"
,((
int
*
)
data
)[
i
],((
int
*
)
data
)[
i
+
1
]);
}
break
;
case
4
:
// real 8-bit
for
(
i
=
0
;
i
<
length
;
i
+=
dec
)
{
fprintf
(
fp
,
"%d
\n
"
,((
char
*
)
data
)[
i
]);
}
break
;
case
5
:
// complex 8-bit
for
(
i
=
0
;
i
<
length
<<
1
;
i
+=
(
2
*
dec
))
{
fprintf
(
fp
,
"%d + j*(%d)
\n
"
,((
char
*
)
data
)[
i
],((
char
*
)
data
)[
i
+
1
]);
}
break
;
case
6
:
// real 64-bit
for
(
i
=
0
;
i
<
length
;
i
+=
dec
)
{
fprintf
(
fp
,
"%lld
\n
"
,((
long
long
*
)
data
)[
i
]);
}
break
;
case
7
:
// real double
for
(
i
=
0
;
i
<
length
;
i
+=
dec
)
{
fprintf
(
fp
,
"%g
\n
"
,((
double
*
)
data
)[
i
]);
}
break
;
case
8
:
// complex double
for
(
i
=
0
;
i
<
length
<<
1
;
i
+=
2
*
dec
)
{
fprintf
(
fp
,
"%g + j*(%g)
\n
"
,((
double
*
)
data
)[
i
],
((
double
*
)
data
)[
i
+
1
]);
}
break
;
case
9
:
// real unsigned 8-bit
for
(
i
=
0
;
i
<
length
;
i
+=
dec
)
{
fprintf
(
fp
,
"%d
\n
"
,((
unsigned
char
*
)
data
)[
i
]);
}
break
;
case
10
:
// case eren 16 bit complex :
for
(
i
=
0
;
i
<
length
<<
1
;
i
+=
(
2
*
dec
))
{
if
((
i
<
2
*
(
length
-
1
))
&&
(
i
>
0
))
fprintf
(
fp
,
"%d + j*(%d),"
,((
short
*
)
data
)[
i
],((
short
*
)
data
)[
i
+
1
]);
else
if
(
i
==
2
*
(
length
-
1
))
fprintf
(
fp
,
"%d + j*(%d);"
,((
short
*
)
data
)[
i
],((
short
*
)
data
)[
i
+
1
]);
else
if
(
i
==
0
)
fprintf
(
fp
,
"
\n
%d + j*(%d),"
,((
short
*
)
data
)[
i
],((
short
*
)
data
)[
i
+
1
]);
}
break
;
case
11
:
//case eren 16 bit real for channel magnitudes:
for
(
i
=
0
;
i
<
length
;
i
+=
dec
)
{
if
((
i
<
(
length
-
1
))
&&
(
i
>
0
))
fprintf
(
fp
,
"%d,"
,((
short
*
)
data
)[
i
]);
else
if
(
i
==
(
length
-
1
))
fprintf
(
fp
,
"%d;"
,((
short
*
)
data
)[
i
]);
else
if
(
i
==
0
)
fprintf
(
fp
,
"
\n
%d,"
,((
short
*
)
data
)[
i
]);
}
break
;
case
12
:
// case eren for log2_maxh real unsigned 8 bit
fprintf
(
fp
,
"%d
\n
"
,((
unsigned
char
*
)
&
data
)[
0
]);
break
;
}
if
(
format
!=
10
&&
format
!=
11
&&
format
!=
12
&&
format
!=
13
&&
format
!=
15
)
{
fprintf
(
fp
,
"];
\n
"
);
fclose
(
fp
);
}
else
if
(
format
==
10
||
format
==
11
||
format
==
12
||
format
==
13
||
format
==
15
)
{
fclose
(
fp
);
}
return
0
;
}
openair1/PHY/defs_eNB.h
View file @
3e354e2e
...
...
@@ -102,428 +102,6 @@
#define MAX_FRAME_NUMBER 0x400
typedef
struct
RU_proc_t_s
{
/// Pointer to associated RU descriptor
struct
RU_t_s
*
ru
;
/// timestamp received from HW
openair0_timestamp
timestamp_rx
;
/// timestamp to send to "slave rru"
openair0_timestamp
timestamp_tx
;
/// subframe to act upon for reception
int
subframe_rx
;
/// subframe to act upon for transmission
int
subframe_tx
;
/// subframe to act upon for reception of prach
int
subframe_prach
;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// subframe to act upon for reception of prach BL/CE UEs
int
subframe_prach_br
;
#endif
/// frame to act upon for reception
int
frame_rx
;
/// frame to act upon for transmission
int
frame_tx
;
/// unwrapped frame count
int
frame_tx_unwrap
;
/// frame to act upon for reception of prach
int
frame_prach
;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// frame to act upon for reception of prach
int
frame_prach_br
;
#endif
/// frame offset for slave RUs (to correct for frame asynchronism at startup)
int
frame_offset
;
/// \brief Instance count for FH processing thread.
/// \internal This variable is protected by \ref mutex_FH.
int
instance_cnt_FH
;
int
instance_cnt_FH1
;
/// \internal This variable is protected by \ref mutex_prach.
int
instance_cnt_prach
;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// \internal This variable is protected by \ref mutex_prach.
int
instance_cnt_prach_br
;
#endif
/// \internal This variable is protected by \ref mutex_synch.
int
instance_cnt_synch
;
/// \internal This variable is protected by \ref mutex_eNBs.
int
instance_cnt_eNBs
;
/// \brief Instance count for rx processing thread.
/// \internal This variable is protected by \ref mutex_asynch_rxtx.
int
instance_cnt_asynch_rxtx
;
/// \internal This variable is protected by \ref mutex_fep
int
instance_cnt_fep
;
/// \internal This variable is protected by \ref mutex_feptx
int
instance_cnt_feptx
;
/// This varible is protected by \ref mutex_emulatedRF
int
instance_cnt_emulateRF
;
/// pthread structure for RU FH processing thread
pthread_t
pthread_FH
;
pthread_t
pthread_FH1
;
/// pthread structure for RU prach processing thread
pthread_t
pthread_prach
;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// pthread structure for RU prach processing thread BL/CE UEs
pthread_t
pthread_prach_br
;
#endif
/// pthread struct for RU synch thread
pthread_t
pthread_synch
;
/// pthread struct for RU RX FEP worker thread
pthread_t
pthread_fep
;
/// pthread struct for RU TX FEP worker thread
pthread_t
pthread_feptx
;
/// pthread struct for emulated RF
pthread_t
pthread_emulateRF
;
/// pthread structure for asychronous RX/TX processing thread
pthread_t
pthread_asynch_rxtx
;
/// flag to indicate first RX acquisition
int
first_rx
;
/// flag to indicate first TX transmission
int
first_tx
;
/// pthread attributes for RU FH processing thread
pthread_attr_t
attr_FH
;
pthread_attr_t
attr_FH1
;
/// pthread attributes for RU prach
pthread_attr_t
attr_prach
;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// pthread attributes for RU prach BL/CE UEs
pthread_attr_t
attr_prach_br
;
#endif
/// pthread attributes for RU synch thread
pthread_attr_t
attr_synch
;
/// pthread attributes for asynchronous RX thread
pthread_attr_t
attr_asynch_rxtx
;
/// pthread attributes for worker fep thread
pthread_attr_t
attr_fep
;
/// pthread attributes for worker feptx thread
pthread_attr_t
attr_feptx
;
/// pthread attributes for emulated RF
pthread_attr_t
attr_emulateRF
;
/// scheduling parameters for RU FH thread
struct
sched_param
sched_param_FH
;
struct
sched_param
sched_param_FH1
;
/// scheduling parameters for RU prach thread
struct
sched_param
sched_param_prach
;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// scheduling parameters for RU prach thread BL/CE UEs
struct
sched_param
sched_param_prach_br
;
#endif
/// scheduling parameters for RU synch thread
struct
sched_param
sched_param_synch
;
/// scheduling parameters for asynch_rxtx thread
struct
sched_param
sched_param_asynch_rxtx
;
/// condition variable for RU FH thread
pthread_cond_t
cond_FH
;
pthread_cond_t
cond_FH1
;
/// condition variable for RU prach thread
pthread_cond_t
cond_prach
;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// condition variable for RU prach thread BL/CE UEs
pthread_cond_t
cond_prach_br
;
#endif
/// condition variable for RU synch thread
pthread_cond_t
cond_synch
;
/// condition variable for asynch RX/TX thread
pthread_cond_t
cond_asynch_rxtx
;
/// condition varible for RU RX FEP thread
pthread_cond_t
cond_fep
;
/// condition varible for RU TX FEP thread
pthread_cond_t
cond_feptx
;
/// condition varible for emulated RF
pthread_cond_t
cond_emulateRF
;
/// condition variable for eNB signal
pthread_cond_t
cond_eNBs
;
/// mutex for RU FH
pthread_mutex_t
mutex_FH
;
pthread_mutex_t
mutex_FH1
;
/// mutex for RU prach
pthread_mutex_t
mutex_prach
;
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// mutex for RU prach BL/CE UEs
pthread_mutex_t
mutex_prach_br
;
#endif
/// mutex for RU synch
pthread_mutex_t
mutex_synch
;
/// mutex for eNB signal
pthread_mutex_t
mutex_eNBs
;
/// mutex for asynch RX/TX thread
pthread_mutex_t
mutex_asynch_rxtx
;
/// mutex for fep RX worker thread
pthread_mutex_t
mutex_fep
;
/// mutex for fep TX worker thread
pthread_mutex_t
mutex_feptx
;
/// mutex for emulated RF thread
pthread_mutex_t
mutex_emulateRF
;
/// symbol mask for IF4p5 reception per subframe
uint32_t
symbol_mask
[
10
];
/// number of slave threads
int
num_slaves
;
/// array of pointers to slaves
struct
RU_proc_t_s
**
slave_proc
;
#ifdef PHY_TX_THREAD
/// pthread structure for PRACH thread
pthread_t
pthread_phy_tx
;
pthread_mutex_t
mutex_phy_tx
;
pthread_cond_t
cond_phy_tx
;
/// \internal This variable is protected by \ref mutex_phy_tx.
int
instance_cnt_phy_tx
;
/// frame to act upon for transmission
int
frame_phy_tx
;
/// subframe to act upon for transmission
int
subframe_phy_tx
;
/// timestamp to send to "slave rru"
openair0_timestamp
timestamp_phy_tx
;
/// pthread structure for RF TX thread
pthread_t
pthread_rf_tx
;
pthread_mutex_t
mutex_rf_tx
;
pthread_cond_t
cond_rf_tx
;
/// \internal This variable is protected by \ref mutex_rf_tx.
int
instance_cnt_rf_tx
;
#endif
#if defined(PRE_SCD_THREAD)
pthread_t
pthread_pre_scd
;
/// condition variable for time processing thread
pthread_cond_t
cond_pre_scd
;
/// mutex for time thread
pthread_mutex_t
mutex_pre_scd
;
int
instance_pre_scd
;
#endif
/// pipeline ready state
int
ru_rx_ready
;
int
ru_tx_ready
;
}
RU_proc_t
;
typedef
enum
{
LOCAL_RF
=
0
,
REMOTE_IF5
=
1
,
REMOTE_MBP_IF5
=
2
,
REMOTE_IF4p5
=
3
,
REMOTE_IF1pp
=
4
,
MAX_RU_IF_TYPES
=
5
//EMULATE_RF =6
}
RU_if_south_t
;
typedef
struct
RU_t_s
{
/// index of this ru
uint32_t
idx
;
/// Pointer to configuration file
char
*
rf_config_file
;
/// southbound interface
RU_if_south_t
if_south
;
/// timing
node_timing_t
if_timing
;
/// function
node_function_t
function
;
/// Ethernet parameters for fronthaul interface
eth_params_t
eth_params
;
/// flag to indicate the RU is in synch with a master reference
int
in_synch
;
/// timing offset
int
rx_offset
;
/// flag to indicate the RU is a slave to another source
int
is_slave
;
/// Total gain of receive chain
uint32_t
rx_total_gain_dB
;
/// number of bands that this device can support
int
num_bands
;
/// band list
int
band
[
MAX_BANDS_PER_RRU
];
/// number of RX paths on device
int
nb_rx
;
/// number of TX paths on device
int
nb_tx
;
/// maximum PDSCH RS EPRE
int
max_pdschReferenceSignalPower
;
/// maximum RX gain
int
max_rxgain
;
/// Attenuation of RX paths on device
int
att_rx
;
/// Attenuation of TX paths on device
int
att_tx
;
/// flag to indicate precoding operation in RU
int
do_precoding
;
/// Frame parameters
LTE_DL_FRAME_PARMS
frame_parms
;
///timing offset used in TDD
int
N_TA_offset
;
/// RF device descriptor
openair0_device
rfdevice
;
/// HW configuration
openair0_config_t
openair0_cfg
;
/// Number of eNBs using this RU
int
num_eNB
;
/// list of eNBs using this RU
struct
PHY_VARS_eNB_s
*
eNB_list
[
NUMBER_OF_eNB_MAX
];
/// Mapping of antenna ports to RF chain index
openair0_rf_map
rf_map
;
/// IF device descriptor
openair0_device
ifdevice
;
/// Pointer for ifdevice buffer struct
if_buffer_t
ifbuffer
;
/// if prach processing is to be performed in RU
int
do_prach
;
/// function pointer to synchronous RX fronthaul function (RRU,3GPP_eNB)
void
(
*
fh_south_in
)(
struct
RU_t_s
*
ru
,
int
*
frame
,
int
*
subframe
);
/// function pointer to synchronous TX fronthaul function
void
(
*
fh_south_out
)(
struct
RU_t_s
*
ru
);
/// function pointer to synchronous RX fronthaul function (RRU)
void
(
*
fh_north_in
)(
struct
RU_t_s
*
ru
,
int
*
frame
,
int
*
subframe
);
/// function pointer to synchronous RX fronthaul function (RRU)
void
(
*
fh_north_out
)(
struct
RU_t_s
*
ru
);
/// function pointer to asynchronous fronthaul interface
void
(
*
fh_north_asynch_in
)(
struct
RU_t_s
*
ru
,
int
*
frame
,
int
*
subframe
);
/// function pointer to asynchronous fronthaul interface
void
(
*
fh_south_asynch_in
)(
struct
RU_t_s
*
ru
,
int
*
frame
,
int
*
subframe
);
/// function pointer to initialization function for radio interface
int
(
*
start_rf
)(
struct
RU_t_s
*
ru
);
/// function pointer to release function for radio interface
int
(
*
stop_rf
)(
struct
RU_t_s
*
ru
);
/// function pointer to initialization function for radio interface
int
(
*
start_if
)(
struct
RU_t_s
*
ru
,
struct
PHY_VARS_eNB_s
*
eNB
);
/// function pointer to RX front-end processing routine (DFTs/prefix removal or NULL)
void
(
*
feprx
)(
struct
RU_t_s
*
ru
);
/// function pointer to TX front-end processing routine (IDFTs and prefix removal or NULL)
void
(
*
feptx_ofdm
)(
struct
RU_t_s
*
ru
);
/// function pointer to TX front-end processing routine (PRECODING)
void
(
*
feptx_prec
)(
struct
RU_t_s
*
ru
);
/// function pointer to wakeup routine in lte-enb.
int
(
*
wakeup_rxtx
)(
struct
PHY_VARS_eNB_s
*
eNB
,
struct
RU_t_s
*
ru
);
/// function pointer to wakeup routine in lte-enb.
void
(
*
wakeup_prach_eNB
)(
struct
PHY_VARS_eNB_s
*
eNB
,
struct
RU_t_s
*
ru
,
int
frame
,
int
subframe
);
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// function pointer to wakeup routine in lte-enb.
void
(
*
wakeup_prach_eNB_br
)(
struct
PHY_VARS_eNB_s
*
eNB
,
struct
RU_t_s
*
ru
,
int
frame
,
int
subframe
);
#endif
/// function pointer to eNB entry routine
void
(
*
eNB_top
)(
struct
PHY_VARS_eNB_s
*
eNB
,
int
frame_rx
,
int
subframe_rx
,
char
*
string
,
struct
RU_t_s
*
ru
);
/// Timing statistics
time_stats_t
ofdm_demod_stats
;
/// Timing statistics (TX)
time_stats_t
ofdm_mod_stats
;
/// Timing wait statistics
time_stats_t
ofdm_demod_wait_stats
;
/// Timing wakeup statistics
time_stats_t
ofdm_demod_wakeup_stats
;
/// Timing wait statistics (TX)
time_stats_t
ofdm_mod_wait_stats
;
/// Timing wakeup statistics (TX)
time_stats_t
ofdm_mod_wakeup_stats
;
/// Timing statistics (RX Fronthaul + Compression)
time_stats_t
rx_fhaul
;
/// Timing statistics (TX Fronthaul + Compression)
time_stats_t
tx_fhaul
;
/// Timong statistics (Compression)
time_stats_t
compression
;
/// Timing statistics (Fronthaul transport)
time_stats_t
transport
;
/// RX and TX buffers for precoder output
RU_COMMON
common
;
/// beamforming weight vectors per eNB
int32_t
**
beam_weights
[
NUMBER_OF_eNB_MAX
+
1
][
15
];
/// received frequency-domain signal for PRACH (IF4p5 RRU)
int16_t
**
prach_rxsigF
;
/// received frequency-domain signal for PRACH BR (IF4p5 RRU)
int16_t
**
prach_rxsigF_br
[
4
];
/// sequence number for IF5
uint8_t
seqno
;
/// initial timestamp used as an offset make first real timestamp 0
openair0_timestamp
ts_offset
;
/// process scheduling variables
RU_proc_t
proc
;
/// stats thread pthread descriptor
pthread_t
ru_stats_thread
;
}
RU_t
;
#define MAX_RRU_CONFIG_SIZE 1024
typedef
enum
{
RAU_tick
=
0
,
RRU_capabilities
=
1
,
RRU_config
=
2
,
RRU_MSG_max_num
=
3
}
rru_config_msg_type_t
;
typedef
struct
RRU_CONFIG_msg_s
{
rru_config_msg_type_t
type
;
ssize_t
len
;
uint8_t
msg
[
MAX_RRU_CONFIG_SIZE
];
}
RRU_CONFIG_msg_t
;
typedef
enum
{
OAI_IF5_only
=
0
,
OAI_IF4p5_only
=
1
,
OAI_IF5_and_IF4p5
=
2
,
MBP_IF5
=
3
,
MAX_FH_FMTs
=
4
}
FH_fmt_options_t
;
#define MAX_BANDS_PER_RRU 4
typedef
struct
RRU_capabilities_s
{
/// Fronthaul format
FH_fmt_options_t
FH_fmt
;
/// number of EUTRA bands (<=4) supported by RRU
uint8_t
num_bands
;
/// EUTRA band list supported by RRU
uint8_t
band_list
[
MAX_BANDS_PER_RRU
];
/// Number of concurrent bands (component carriers)
uint8_t
num_concurrent_bands
;
/// Maximum TX EPRE of each band
int8_t
max_pdschReferenceSignalPower
[
MAX_BANDS_PER_RRU
];
/// Maximum RX gain of each band
uint8_t
max_rxgain
[
MAX_BANDS_PER_RRU
];
/// Number of RX ports of each band
uint8_t
nb_rx
[
MAX_BANDS_PER_RRU
];
/// Number of TX ports of each band
uint8_t
nb_tx
[
MAX_BANDS_PER_RRU
];
/// max DL bandwidth (1,6,15,25,50,75,100)
uint8_t
N_RB_DL
[
MAX_BANDS_PER_RRU
];
/// max UL bandwidth (1,6,15,25,50,75,100)
uint8_t
N_RB_UL
[
MAX_BANDS_PER_RRU
];
}
RRU_capabilities_t
;
typedef
struct
RRU_config_s
{
/// Fronthaul format
RU_if_south_t
FH_fmt
;
/// number of EUTRA bands (<=4) configured in RRU
uint8_t
num_bands
;
/// EUTRA band list configured in RRU
uint8_t
band_list
[
MAX_BANDS_PER_RRU
];
/// TDD configuration (0-6)
uint8_t
tdd_config
[
MAX_BANDS_PER_RRU
];
/// TDD special subframe configuration (0-10)
uint8_t
tdd_config_S
[
MAX_BANDS_PER_RRU
];
/// TX frequency
uint32_t
tx_freq
[
MAX_BANDS_PER_RRU
];
/// RX frequency
uint32_t
rx_freq
[
MAX_BANDS_PER_RRU
];
/// TX attenation w.r.t. max
uint8_t
att_tx
[
MAX_BANDS_PER_RRU
];
/// RX attenuation w.r.t. max
uint8_t
att_rx
[
MAX_BANDS_PER_RRU
];
/// DL bandwidth
uint8_t
N_RB_DL
[
MAX_BANDS_PER_RRU
];
/// UL bandwidth
uint8_t
N_RB_UL
[
MAX_BANDS_PER_RRU
];
/// 3/4 sampling rate
uint8_t
threequarter_fs
[
MAX_BANDS_PER_RRU
];
/// prach_FreqOffset for IF4p5
int
prach_FreqOffset
[
MAX_BANDS_PER_RRU
];
/// prach_ConfigIndex for IF4p5
int
prach_ConfigIndex
[
MAX_BANDS_PER_RRU
];
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
int
emtc_prach_CElevel_enable
[
MAX_BANDS_PER_RRU
][
4
];
/// emtc_prach_FreqOffset for IF4p5 per CE Level
int
emtc_prach_FreqOffset
[
MAX_BANDS_PER_RRU
][
4
];
/// emtc_prach_ConfigIndex for IF4p5 per CE Level
int
emtc_prach_ConfigIndex
[
MAX_BANDS_PER_RRU
][
4
];
#endif
}
RRU_config_t
;
typedef
struct
{
/// \brief Pointers (dynamic) to the received data in the time domain.
/// - first index: rx antenna [0..nb_antennas_rx[
...
...
openair2/RRC/NR/MESSAGES/asn1c/ASN1_files/nr-rrc-15.2.1.asn1
0 → 100644
View file @
3e354e2e
This source diff could not be displayed because it is too large. You can
view the blob
instead.
openair2/RRC/NR/nr_rrc_defs.h
View file @
3e354e2e
...
...
@@ -64,8 +64,9 @@
//#include "AS-Context.h"
#include "NR_UE-NR-Capability.h"
#include "NR_MeasResults.h"
#include "NR_MeasResults.h"
#include "NR_CellGroupConfig.h"
#include "NR_ServingCellConfigCommon.h"
//-------------------
#if defined(ENABLE_ITTI)
...
...
openair3/S1AP/s1ap_eNB_handlers.c
View file @
3e354e2e
...
...
@@ -66,16 +66,6 @@ int s1ap_eNB_handle_error_indication(uint32_t assoc_id,
static
int
s1ap_eNB_handle_initial_context_request
(
uint32_t
assoc_id
,
<<<<<<<
HEAD
uint32_t
stream
,
S1AP_S1AP_PDU_t
*
pdu
);
static
int
s1ap_eNB_handle_ue_context_release_command
(
uint32_t
assoc_id
,
uint32_t
stream
,
S1AP_S1AP_PDU_t
*
pdu
);
=======
uint32_t
stream
,
S1AP_S1AP_PDU_t
*
pdu
);
...
...
@@ -83,7 +73,6 @@ static
int
s1ap_eNB_handle_ue_context_release_command
(
uint32_t
assoc_id
,
uint32_t
stream
,
S1AP_S1AP_PDU_t
*
pdu
);
>>>>>>>
origin
/
develop
static
int
s1ap_eNB_handle_e_rab_setup_request
(
uint32_t
assoc_id
,
...
...
@@ -97,15 +86,6 @@ int s1ap_eNB_handle_paging(uint32_t assoc_id,
static
int
s1ap_eNB_handle_e_rab_modify_request
(
uint32_t
assoc_id
,
<<<<<<<
HEAD
uint32_t
stream
,
S1AP_S1AP_PDU_t
*
pdu
);
static
int
s1ap_eNB_handle_e_rab_release_command
(
uint32_t
assoc_id
,
uint32_t
stream
,
S1AP_S1AP_PDU_t
*
pdu
);
=======
uint32_t
stream
,
S1AP_S1AP_PDU_t
*
pdu
);
...
...
@@ -113,7 +93,6 @@ static
int
s1ap_eNB_handle_e_rab_release_command
(
uint32_t
assoc_id
,
uint32_t
stream
,
S1AP_S1AP_PDU_t
*
pdu
);
>>>>>>>
origin
/
develop
/* Handlers matrix. Only eNB related procedure present here */
s1ap_message_decoded_callback
messages_callback
[][
3
]
=
{
...
...
@@ -193,6 +172,7 @@ void s1ap_handle_s1_setup_message(s1ap_eNB_mme_data_t *mme_desc_p, int sctp_shut
/* If there are no more associated MME, inform eNB app */
if
(
mme_desc_p
->
s1ap_eNB_instance
->
s1ap_mme_associated_nb
==
0
)
{
MessageDef
*
message_p
;
message_p
=
itti_alloc_new_message
(
TASK_S1AP
,
S1AP_DEREGISTERED_ENB_IND
);
S1AP_DEREGISTERED_ENB_IND
(
message_p
).
nb_mme
=
0
;
itti_send_msg_to_task
(
TASK_ENB_APP
,
mme_desc_p
->
s1ap_eNB_instance
->
instance
,
message_p
);
...
...
@@ -211,6 +191,7 @@ void s1ap_handle_s1_setup_message(s1ap_eNB_mme_data_t *mme_desc_p, int sctp_shut
/* If there are no more pending messages, inform eNB app */
if
(
mme_desc_p
->
s1ap_eNB_instance
->
s1ap_mme_pending_nb
==
0
)
{
MessageDef
*
message_p
;
message_p
=
itti_alloc_new_message
(
TASK_S1AP
,
S1AP_REGISTER_ENB_CNF
);
S1AP_REGISTER_ENB_CNF
(
message_p
).
nb_mme
=
mme_desc_p
->
s1ap_eNB_instance
->
s1ap_mme_associated_nb
;
itti_send_msg_to_task
(
TASK_ENB_APP
,
mme_desc_p
->
s1ap_eNB_instance
->
instance
,
message_p
);
...
...
@@ -222,20 +203,12 @@ int s1ap_eNB_handle_message(uint32_t assoc_id, int32_t stream,
const
uint8_t
*
const
data
,
const
uint32_t
data_length
)
{
S1AP_S1AP_PDU_t
pdu
;
<<<<<<<
HEAD
int
ret
=
-
1
;
=======
int
ret
;
>>>>>>>
origin
/
develop
DevAssert
(
data
!=
NULL
);
memset
(
&
pdu
,
0
,
sizeof
(
pdu
));
<<<<<<<
HEAD
=======
memset
(
&
pdu
,
0
,
sizeof
(
pdu
));
>>>>>>>
origin
/
develop
if
(
s1ap_eNB_decode_pdu
(
&
pdu
,
data
,
data_length
)
<
0
)
{
S1AP_ERROR
(
"Failed to decode PDU
\n
"
);
return
-
1
;
...
...
@@ -277,13 +250,9 @@ int s1ap_eNB_handle_s1_setup_failure(uint32_t assoc_id,
S1AP_S1SetupFailure_t
*
container
;
S1AP_S1SetupFailureIEs_t
*
ie
;
s1ap_eNB_mme_data_t
*
mme_desc_p
;
<<<<<<<
HEAD
DevAssert
(
pdu
!=
NULL
);
=======
DevAssert
(
pdu
!=
NULL
);
>>>>>>>
origin
/
develop
container
=
&
pdu
->
choice
.
unsuccessfulOutcome
.
value
.
choice
.
S1SetupFailure
;
/* S1 Setup Failure == Non UE-related procedure -> stream 0 */
...
...
@@ -299,11 +268,7 @@ int s1ap_eNB_handle_s1_setup_failure(uint32_t assoc_id,
}
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_S1SetupFailureIEs_t
,
ie
,
container
,
<<<<<<<
HEAD
S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID
,
TRUE
);
=======
S1AP_ProtocolIE_ID_id_Cause
,
true
);
>>>>>>>
origin
/
develop
if
((
ie
->
value
.
choice
.
Cause
.
present
==
S1AP_Cause_PR_misc
)
&&
(
ie
->
value
.
choice
.
Cause
.
choice
.
misc
==
S1AP_CauseMisc_unspecified
))
{
...
...
@@ -314,6 +279,7 @@ int s1ap_eNB_handle_s1_setup_failure(uint32_t assoc_id,
mme_desc_p
->
state
=
S1AP_ENB_STATE_WAITING
;
s1ap_handle_s1_setup_message
(
mme_desc_p
,
0
);
return
0
;
}
...
...
@@ -326,13 +292,9 @@ int s1ap_eNB_handle_s1_setup_response(uint32_t assoc_id,
S1AP_S1SetupResponseIEs_t
*
ie
;
s1ap_eNB_mme_data_t
*
mme_desc_p
;
int
i
;
<<<<<<<
HEAD
DevAssert
(
pdu
!=
NULL
);
=======
DevAssert
(
pdu
!=
NULL
);
>>>>>>>
origin
/
develop
container
=
&
pdu
->
choice
.
successfulOutcome
.
value
.
choice
.
S1SetupResponse
;
/* S1 Setup Response == Non UE-related procedure -> stream 0 */
...
...
@@ -349,11 +311,7 @@ int s1ap_eNB_handle_s1_setup_response(uint32_t assoc_id,
}
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_S1SetupResponseIEs_t
,
ie
,
container
,
<<<<<<<
HEAD
S1AP_ProtocolIE_ID_id_ServedGUMMEIs
,
TRUE
);
=======
S1AP_ProtocolIE_ID_id_ServedGUMMEIs
,
true
);
>>>>>>>
origin
/
develop
/* The list of served gummei can contain at most 8 elements.
* LTE related gummei is the first element in the list, i.e with an id of 0.
*/
...
...
@@ -365,28 +323,20 @@ int s1ap_eNB_handle_s1_setup_response(uint32_t assoc_id,
S1AP_ServedGUMMEIsItem_t
*
gummei_item_p
;
struct
served_gummei_s
*
new_gummei_p
;
int
j
;
<<<<<<<
HEAD
=======
>>>>>>>
origin
/
develop
gummei_item_p
=
ie
->
value
.
choice
.
ServedGUMMEIs
.
list
.
array
[
i
];
new_gummei_p
=
calloc
(
1
,
sizeof
(
struct
served_gummei_s
));
STAILQ_INIT
(
&
new_gummei_p
->
served_plmns
);
STAILQ_INIT
(
&
new_gummei_p
->
served_group_ids
);
STAILQ_INIT
(
&
new_gummei_p
->
mme_codes
);
<<<<<<<
HEAD
=======
>>>>>>>
origin
/
develop
S1AP_DEBUG
(
"servedPLMNs.list.count %d
\n
"
,
gummei_item_p
->
servedPLMNs
.
list
.
count
);
for
(
j
=
0
;
j
<
gummei_item_p
->
servedPLMNs
.
list
.
count
;
j
++
)
{
S1AP_PLMNidentity_t
*
plmn_identity_p
;
struct
plmn_identity_s
*
new_plmn_identity_p
;
<<<<<<<
HEAD
=======
>>>>>>>
origin
/
develop
plmn_identity_p
=
gummei_item_p
->
servedPLMNs
.
list
.
array
[
j
];
new_plmn_identity_p
=
calloc
(
1
,
sizeof
(
struct
plmn_identity_s
));
TBCD_TO_MCC_MNC
(
plmn_identity_p
,
new_plmn_identity_p
->
mcc
,
...
...
@@ -398,6 +348,7 @@ int s1ap_eNB_handle_s1_setup_response(uint32_t assoc_id,
for
(
j
=
0
;
j
<
gummei_item_p
->
servedGroupIDs
.
list
.
count
;
j
++
)
{
S1AP_MME_Group_ID_t
*
mme_group_id_p
;
struct
served_group_id_s
*
new_group_id_p
;
mme_group_id_p
=
gummei_item_p
->
servedGroupIDs
.
list
.
array
[
j
];
new_group_id_p
=
calloc
(
1
,
sizeof
(
struct
served_group_id_s
));
OCTET_STRING_TO_INT16
(
mme_group_id_p
,
new_group_id_p
->
mme_group_id
);
...
...
@@ -408,8 +359,10 @@ int s1ap_eNB_handle_s1_setup_response(uint32_t assoc_id,
for
(
j
=
0
;
j
<
gummei_item_p
->
servedMMECs
.
list
.
count
;
j
++
)
{
S1AP_MME_Code_t
*
mme_code_p
;
struct
mme_code_s
*
new_mme_code_p
;
mme_code_p
=
gummei_item_p
->
servedMMECs
.
list
.
array
[
j
];
new_mme_code_p
=
calloc
(
1
,
sizeof
(
struct
mme_code_s
));
OCTET_STRING_TO_INT8
(
mme_code_p
,
new_mme_code_p
->
mme_code
);
STAILQ_INSERT_TAIL
(
&
new_gummei_p
->
mme_codes
,
new_mme_code_p
,
next
);
new_gummei_p
->
nb_mme_code
++
;
...
...
@@ -418,16 +371,6 @@ int s1ap_eNB_handle_s1_setup_response(uint32_t assoc_id,
STAILQ_INSERT_TAIL
(
&
mme_desc_p
->
served_gummei
,
new_gummei_p
,
next
);
}
<<<<<<<
HEAD
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_S1SetupResponseIEs_t
,
ie
,
container
,
S1AP_ProtocolIE_ID_id_RelativeMMECapacity
,
TRUE
);
/* Set the capacity of this MME */
mme_desc_p
->
relative_mme_capacity
=
ie
->
value
.
choice
.
RelativeMMECapacity
;
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_S1SetupResponseIEs_t
,
ie
,
container
,
S1AP_ProtocolIE_ID_id_MMEname
,
FALSE
);
/* Optionaly set the mme name */
=======
/* Set the capacity of this MME */
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_S1SetupResponseIEs_t
,
ie
,
container
,
S1AP_ProtocolIE_ID_id_RelativeMMECapacity
,
true
);
...
...
@@ -436,7 +379,6 @@ int s1ap_eNB_handle_s1_setup_response(uint32_t assoc_id,
/* Optionaly set the mme name */
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_S1SetupResponseIEs_t
,
ie
,
container
,
S1AP_ProtocolIE_ID_id_MMEname
,
false
);
>>>>>>>
origin
/
develop
if
(
ie
)
{
mme_desc_p
->
mme_name
=
calloc
(
ie
->
value
.
choice
.
MMEname
.
size
+
1
,
sizeof
(
char
));
memcpy
(
mme_desc_p
->
mme_name
,
ie
->
value
.
choice
.
MMEname
.
buf
,
...
...
@@ -451,56 +393,7 @@ int s1ap_eNB_handle_s1_setup_response(uint32_t assoc_id,
mme_desc_p
->
state
=
S1AP_ENB_STATE_CONNECTED
;
mme_desc_p
->
s1ap_eNB_instance
->
s1ap_mme_associated_nb
++
;
s1ap_handle_s1_setup_message
(
mme_desc_p
,
0
);
<<<<<<<
HEAD
#if 0
/* We call back our self
* -> generate a dummy initial UE message
*/
{
s1ap_nas_first_req_t s1ap_nas_first_req;
memset(&s1ap_nas_first_req, 0, sizeof(s1ap_nas_first_req_t));
s1ap_nas_first_req.rnti = 0xC03A;
s1ap_nas_first_req.establishment_cause = RRC_CAUSE_MO_DATA;
s1ap_nas_first_req.ue_identity.presenceMask = UE_IDENTITIES_gummei;
s1ap_nas_first_req.ue_identity.gummei.mcc = 208;
s1ap_nas_first_req.ue_identity.gummei.mnc = 34;
s1ap_nas_first_req.ue_identity.gummei.mme_code = 0;
s1ap_nas_first_req.ue_identity.gummei.mme_group_id = 0;
/* NAS Attach request with IMSI */
static uint8_t nas_attach_req_imsi[] = {
0x07, 0x41,
/* EPS Mobile identity = IMSI */
0x71, 0x08, 0x29, 0x80, 0x43, 0x21, 0x43, 0x65, 0x87,
0xF9,
/* End of EPS Mobile Identity */
0x02, 0xE0, 0xE0, 0x00, 0x20, 0x02, 0x03,
0xD0, 0x11, 0x27, 0x1A, 0x80, 0x80, 0x21, 0x10, 0x01, 0x00, 0x00,
0x10, 0x81, 0x06, 0x00, 0x00, 0x00, 0x00, 0x83, 0x06, 0x00, 0x00,
0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x0A, 0x00, 0x52, 0x12, 0xF2,
0x01, 0x27, 0x11,
};
/* NAS Attach request with GUTI */
static uint8_t nas_attach_req_guti[] = {
0x07, 0x41,
/* EPS Mobile identity = IMSI */
0x71, 0x0B, 0xF6, 0x12, 0xF2, 0x01, 0x80, 0x00, 0x01, 0xE0, 0x00,
0xDA, 0x1F,
/* End of EPS Mobile Identity */
0x02, 0xE0, 0xE0, 0x00, 0x20, 0x02, 0x03,
0xD0, 0x11, 0x27, 0x1A, 0x80, 0x80, 0x21, 0x10, 0x01, 0x00, 0x00,
0x10, 0x81, 0x06, 0x00, 0x00, 0x00, 0x00, 0x83, 0x06, 0x00, 0x00,
0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x0A, 0x00, 0x52, 0x12, 0xF2,
0x01, 0x27, 0x11,
};
s1ap_nas_first_req.nas_pdu.buffer = nas_attach_req_guti;
s1ap_nas_first_req.nas_pdu.length = sizeof(nas_attach_req_guti);
s1ap_eNB_handle_nas_first_req(mme_desc_p->s1ap_eNB_instance->instance,
&s1ap_nas_first_req);
}
#endif
=======
>>>>>>>
origin
/
develop
return
0
;
}
...
...
@@ -513,13 +406,9 @@ int s1ap_eNB_handle_error_indication(uint32_t assoc_id,
S1AP_ErrorIndication_t
*
container
;
S1AP_ErrorIndicationIEs_t
*
ie
;
s1ap_eNB_mme_data_t
*
mme_desc_p
;
<<<<<<<
HEAD
DevAssert
(
pdu
!=
NULL
);
=======
DevAssert
(
pdu
!=
NULL
);
>>>>>>>
origin
/
develop
container
=
&
pdu
->
choice
.
initiatingMessage
.
value
.
choice
.
ErrorIndication
;
/* S1 Setup Failure == Non UE-related procedure -> stream 0 */
...
...
@@ -535,11 +424,7 @@ int s1ap_eNB_handle_error_indication(uint32_t assoc_id,
}
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_ErrorIndicationIEs_t
,
ie
,
container
,
<<<<<<<
HEAD
S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID
,
FALSE
);
=======
S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID
,
false
);
>>>>>>>
origin
/
develop
/* optional */
if
(
!
ie
)
{
...
...
@@ -547,11 +432,7 @@ int s1ap_eNB_handle_error_indication(uint32_t assoc_id,
}
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_ErrorIndicationIEs_t
,
ie
,
container
,
<<<<<<<
HEAD
S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID
,
FALSE
);
=======
S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID
,
false
);
>>>>>>>
origin
/
develop
/* optional */
if
(
!
ie
)
{
...
...
@@ -559,11 +440,7 @@ int s1ap_eNB_handle_error_indication(uint32_t assoc_id,
}
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_ErrorIndicationIEs_t
,
ie
,
container
,
<<<<<<<
HEAD
S1AP_ProtocolIE_ID_id_Cause
,
FALSE
);
=======
S1AP_ProtocolIE_ID_id_Cause
,
false
);
>>>>>>>
origin
/
develop
/* optional */
if
(
ie
)
{
...
...
@@ -577,160 +454,6 @@ int s1ap_eNB_handle_error_indication(uint32_t assoc_id,
case
S1AP_CauseRadioNetwork_unspecified
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseRadioNetwork_unspecified
\n
"
);
break
;
<<<<<<<
HEAD
case
S1AP_CauseRadioNetwork_tx2relocoverall_expiry
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseRadioNetwork_tx2relocoverall_expiry
\n
"
);
break
;
case
S1AP_CauseRadioNetwork_successful_handover
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseRadioNetwork_successful_handover
\n
"
);
break
;
case
S1AP_CauseRadioNetwork_release_due_to_eutran_generated_reason
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseRadioNetwork_release_due_to_eutran_generated_reason
\n
"
);
break
;
case
S1AP_CauseRadioNetwork_handover_cancelled
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseRadioNetwork_handover_cancelled
\n
"
);
break
;
case
S1AP_CauseRadioNetwork_partial_handover
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseRadioNetwork_partial_handover
\n
"
);
break
;
case
S1AP_CauseRadioNetwork_ho_failure_in_target_EPC_eNB_or_target_system
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseRadioNetwork_ho_failure_in_target_EPC_eNB_or_target_system
\n
"
);
break
;
case
S1AP_CauseRadioNetwork_ho_target_not_allowed
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseRadioNetwork_ho_target_not_allowed
\n
"
);
break
;
case
S1AP_CauseRadioNetwork_tS1relocoverall_expiry
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseRadioNetwork_tS1relocoverall_expiry
\n
"
);
break
;
case
S1AP_CauseRadioNetwork_tS1relocprep_expiry
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseRadioNetwork_tS1relocprep_expiry
\n
"
);
break
;
case
S1AP_CauseRadioNetwork_cell_not_available
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseRadioNetwork_cell_not_available
\n
"
);
break
;
case
S1AP_CauseRadioNetwork_unknown_targetID
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseRadioNetwork_unknown_targetID
\n
"
);
break
;
case
S1AP_CauseRadioNetwork_no_radio_resources_available_in_target_cell
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseRadioNetwork_no_radio_resources_available_in_target_cell
\n
"
);
break
;
case
S1AP_CauseRadioNetwork_unknown_mme_ue_s1ap_id
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseRadioNetwork_unknown_mme_ue_s1ap_id
\n
"
);
break
;
case
S1AP_CauseRadioNetwork_unknown_enb_ue_s1ap_id
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseRadioNetwork_unknown_enb_ue_s1ap_id
\n
"
);
break
;
case
S1AP_CauseRadioNetwork_unknown_pair_ue_s1ap_id
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseRadioNetwork_unknown_pair_ue_s1ap_id
\n
"
);
break
;
case
S1AP_CauseRadioNetwork_handover_desirable_for_radio_reason
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseRadioNetwork_handover_desirable_for_radio_reason
\n
"
);
break
;
case
S1AP_CauseRadioNetwork_time_critical_handover
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseRadioNetwork_time_critical_handover
\n
"
);
break
;
case
S1AP_CauseRadioNetwork_resource_optimisation_handover
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseRadioNetwork_resource_optimisation_handover
\n
"
);
break
;
case
S1AP_CauseRadioNetwork_reduce_load_in_serving_cell
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseRadioNetwork_reduce_load_in_serving_cell
\n
"
);
break
;
case
S1AP_CauseRadioNetwork_user_inactivity
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseRadioNetwork_user_inactivity
\n
"
);
break
;
case
S1AP_CauseRadioNetwork_radio_connection_with_ue_lost
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseRadioNetwork_radio_connection_with_ue_lost
\n
"
);
break
;
case
S1AP_CauseRadioNetwork_load_balancing_tau_required
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseRadioNetwork_load_balancing_tau_required
\n
"
);
break
;
case
S1AP_CauseRadioNetwork_cs_fallback_triggered
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseRadioNetwork_cs_fallback_triggered
\n
"
);
break
;
case
S1AP_CauseRadioNetwork_ue_not_available_for_ps_service
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseRadioNetwork_ue_not_available_for_ps_service
\n
"
);
break
;
case
S1AP_CauseRadioNetwork_radio_resources_not_available
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseRadioNetwork_radio_resources_not_available
\n
"
);
break
;
case
S1AP_CauseRadioNetwork_failure_in_radio_interface_procedure
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseRadioNetwork_failure_in_radio_interface_procedure
\n
"
);
break
;
case
S1AP_CauseRadioNetwork_invalid_qos_combination
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseRadioNetwork_invals1ap_id_qos_combination
\n
"
);
break
;
case
S1AP_CauseRadioNetwork_interrat_redirection
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseRadioNetwork_interrat_redirection
\n
"
);
break
;
case
S1AP_CauseRadioNetwork_interaction_with_other_procedure
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseRadioNetwork_interaction_with_other_procedure
\n
"
);
break
;
case
S1AP_CauseRadioNetwork_unknown_E_RAB_ID
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseRadioNetwork_unknown_E_RAB_ID
\n
"
);
break
;
case
S1AP_CauseRadioNetwork_multiple_E_RAB_ID_instances
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseRadioNetwork_multiple_E_RAB_ID_instances
\n
"
);
break
;
case
S1AP_CauseRadioNetwork_encryption_and_or_integrity_protection_algorithms_not_supported
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseRadioNetwork_encryption_and_or_integrity_protection_algorithms_not_supported
\n
"
);
break
;
case
S1AP_CauseRadioNetwork_s1_intra_system_handover_triggered
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseRadioNetwork_s1_intra_system_handover_triggered
\n
"
);
break
;
case
S1AP_CauseRadioNetwork_s1_inter_system_handover_triggered
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseRadioNetwork_s1_inter_system_handover_triggered
\n
"
);
break
;
case
S1AP_CauseRadioNetwork_x2_handover_triggered
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseRadioNetwork_x2_handover_triggered
\n
"
);
break
;
case
S1AP_CauseRadioNetwork_redirection_towards_1xRTT
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseRadioNetwork_redirection_towards_1xRTT
\n
"
);
break
;
case
S1AP_CauseRadioNetwork_not_supported_QCI_value
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseRadioNetwork_not_supported_QCI_value
\n
"
);
break
;
case
S1AP_CauseRadioNetwork_invalid_CSG_Id
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseRadioNetwork_invals1ap_id_CSG_Id
\n
"
);
break
;
=======
case
S1AP_CauseRadioNetwork_tx2relocoverall_expiry
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseRadioNetwork_tx2relocoverall_expiry
\n
"
);
break
;
...
...
@@ -847,15 +570,10 @@ int s1ap_eNB_handle_error_indication(uint32_t assoc_id,
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseRadioNetwork_invals1ap_id_CSG_Id
\n
"
);
break
;
#endif
/* #if (S1AP_VERSION >= MAKE_VERSION(9, 0, 0)) */
>>>>>>>
origin
/
develop
default:
S1AP_WARN
(
"Received S1 Error indication cause radio network case not handled
\n
"
);
}
<<<<<<<
HEAD
=======
>>>>>>>
origin
/
develop
break
;
case
S1AP_Cause_PR_transport
:
...
...
@@ -863,19 +581,6 @@ int s1ap_eNB_handle_error_indication(uint32_t assoc_id,
case
S1AP_CauseTransport_transport_resource_unavailable
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseTransport_transport_resource_unavailable
\n
"
);
break
;
<<<<<<<
HEAD
case
S1AP_CauseTransport_unspecified
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseTransport_unspecified
\n
"
);
break
;
default:
S1AP_WARN
(
"Received S1 Error indication cause transport case not handled
\n
"
);
}
break
;
=======
case
S1AP_CauseTransport_unspecified
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseTransport_unspecified
\n
"
);
break
;
...
...
@@ -884,31 +589,11 @@ int s1ap_eNB_handle_error_indication(uint32_t assoc_id,
}
break
;
>>>>>>>
origin
/
develop
case
S1AP_Cause_PR_nas
:
switch
(
ie
->
value
.
choice
.
Cause
.
choice
.
nas
)
{
case
S1AP_CauseNas_normal_release
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseNas_normal_release
\n
"
);
break
;
<<<<<<<
HEAD
case
S1AP_CauseNas_authentication_failure
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseNas_authentication_failure
\n
"
);
break
;
case
S1AP_CauseNas_detach
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseNas_detach
\n
"
);
break
;
case
S1AP_CauseNas_unspecified
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseNas_unspecified
\n
"
);
break
;
case
S1AP_CauseNas_csg_subscription_expiry
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseNas_csg_subscription_expiry
\n
"
);
break
;
=======
case
S1AP_CauseNas_authentication_failure
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseNas_authentication_failure
\n
"
);
break
;
...
...
@@ -923,7 +608,6 @@ int s1ap_eNB_handle_error_indication(uint32_t assoc_id,
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseNas_csg_subscription_expiry
\n
"
);
break
;
#endif
/* #if (S1AP_VERSION >= MAKE_VERSION(9, 0, 0)) */
>>>>>>>
origin
/
develop
default:
S1AP_WARN
(
"Received S1 Error indication cause nas case not handled
\n
"
);
}
...
...
@@ -935,36 +619,27 @@ int s1ap_eNB_handle_error_indication(uint32_t assoc_id,
case
S1AP_CauseProtocol_transfer_syntax_error
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseProtocol_transfer_syntax_error
\n
"
);
break
;
<<<<<<<
HEAD
case
S1AP_CauseProtocol_abstract_syntax_error_reject
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseProtocol_abstract_syntax_error_reject
\n
"
);
break
;
case
S1AP_CauseProtocol_abstract_syntax_error_ignore_and_notify
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseProtocol_abstract_syntax_error_ignore_and_notify
\n
"
);
break
;
case
S1AP_CauseProtocol_message_not_compatible_with_receiver_state
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseProtocol_message_not_compatible_with_receiver_state
\n
"
);
break
;
case
S1AP_CauseProtocol_semantic_error
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseProtocol_semantic_error
\n
"
);
break
;
case
S1AP_CauseProtocol_abstract_syntax_error_falsely_constructed_message
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseProtocol_abstract_syntax_error_falsely_constructed_message
\n
"
);
break
;
case
S1AP_CauseProtocol_unspecified
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseProtocol_unspecified
\n
"
);
break
;
default:
S1AP_WARN
(
"Received S1 Error indication cause protocol case not handled
\n
"
);
}
break
;
case
S1AP_Cause_PR_misc
:
...
...
@@ -972,95 +647,36 @@ int s1ap_eNB_handle_error_indication(uint32_t assoc_id,
case
S1AP_CauseMisc_control_processing_overload
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseMisc_control_processing_overload
\n
"
);
break
;
case
S1AP_CauseMisc_not_enough_user_plane_processing_resources
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseMisc_not_enough_user_plane_processing_resources
\n
"
);
break
;
case
S1AP_CauseMisc_hardware_failure
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseMisc_hardware_failure
\n
"
);
break
;
case
S1AP_CauseMisc_om_intervention
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseMisc_om_intervention
\n
"
);
break
;
case
S1AP_CauseMisc_unspecified
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseMisc_unspecified
\n
"
);
break
;
case
S1AP_CauseMisc_unknown_PLMN
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseMisc_unknown_PLMN
\n
"
);
break
;
default:
S1AP_WARN
(
"Received S1 Error indication cause misc case not handled
\n
"
);
}
=======
case
S1AP_CauseProtocol_abstract_syntax_error_reject
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseProtocol_abstract_syntax_error_reject
\n
"
);
break
;
case
S1AP_CauseProtocol_abstract_syntax_error_ignore_and_notify
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseProtocol_abstract_syntax_error_ignore_and_notify
\n
"
);
break
;
case
S1AP_CauseProtocol_message_not_compatible_with_receiver_state
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseProtocol_message_not_compatible_with_receiver_state
\n
"
);
break
;
case
S1AP_CauseProtocol_semantic_error
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseProtocol_semantic_error
\n
"
);
break
;
case
S1AP_CauseProtocol_abstract_syntax_error_falsely_constructed_message
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseProtocol_abstract_syntax_error_falsely_constructed_message
\n
"
);
break
;
case
S1AP_CauseProtocol_unspecified
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseProtocol_unspecified
\n
"
);
break
;
default:
S1AP_WARN
(
"Received S1 Error indication cause protocol case not handled
\n
"
);
}
break
;
case
S1AP_Cause_PR_misc
:
switch
(
ie
->
value
.
choice
.
Cause
.
choice
.
protocol
)
{
case
S1AP_CauseMisc_control_processing_overload
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseMisc_control_processing_overload
\n
"
);
break
;
case
S1AP_CauseMisc_not_enough_user_plane_processing_resources
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseMisc_not_enough_user_plane_processing_resources
\n
"
);
break
;
case
S1AP_CauseMisc_hardware_failure
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseMisc_hardware_failure
\n
"
);
break
;
case
S1AP_CauseMisc_om_intervention
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseMisc_om_intervention
\n
"
);
break
;
case
S1AP_CauseMisc_unspecified
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseMisc_unspecified
\n
"
);
break
;
case
S1AP_CauseMisc_unknown_PLMN
:
S1AP_WARN
(
"Received S1 Error indication S1AP_CauseMisc_unknown_PLMN
\n
"
);
break
;
default:
S1AP_WARN
(
"Received S1 Error indication cause misc case not handled
\n
"
);
}
>>>>>>>
origin
/
develop
break
;
}
}
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_ErrorIndicationIEs_t
,
ie
,
container
,
<<<<<<<
HEAD
S1AP_ProtocolIE_ID_id_CriticalityDiagnostics
,
FALSE
);
=======
S1AP_ProtocolIE_ID_id_CriticalityDiagnostics
,
false
);
>>>>>>>
origin
/
develop
if
(
ie
)
{
// TODO continue
}
// TODO continue
return
0
;
}
...
...
@@ -1077,14 +693,10 @@ int s1ap_eNB_handle_initial_context_request(uint32_t assoc_id,
S1AP_InitialContextSetupRequest_t
*
container
;
S1AP_InitialContextSetupRequestIEs_t
*
ie
;
S1AP_ENB_UE_S1AP_ID_t
enb_ue_s1ap_id
;
<<<<<<<
HEAD
DevAssert
(
pdu
!=
NULL
);
=======
S1AP_MME_UE_S1AP_ID_t
mme_ue_s1ap_id
;
DevAssert
(
pdu
!=
NULL
);
>>>>>>>
origin
/
develop
container
=
&
pdu
->
choice
.
initiatingMessage
.
value
.
choice
.
InitialContextSetupRequest
;
if
((
mme_desc_p
=
s1ap_eNB_get_MME
(
NULL
,
assoc_id
,
0
))
==
NULL
)
{
...
...
@@ -1093,14 +705,6 @@ int s1ap_eNB_handle_initial_context_request(uint32_t assoc_id,
return
-
1
;
}
<<<<<<<
HEAD
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_InitialContextSetupRequestIEs_t
,
ie
,
container
,
S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID
,
FALSE
);
enb_ue_s1ap_id
=
ie
->
value
.
choice
.
ENB_UE_S1AP_ID
;
if
((
ue_desc_p
=
s1ap_eNB_get_ue_context
(
mme_desc_p
->
s1ap_eNB_instance
,
enb_ue_s1ap_id
))
==
NULL
)
{
=======
/* id-MME-UE-S1AP-ID */
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_InitialContextSetupRequestIEs_t
,
ie
,
container
,
S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID
,
true
);
...
...
@@ -1113,7 +717,6 @@ int s1ap_eNB_handle_initial_context_request(uint32_t assoc_id,
if
((
ue_desc_p
=
s1ap_eNB_get_ue_context
(
mme_desc_p
->
s1ap_eNB_instance
,
enb_ue_s1ap_id
))
==
NULL
)
{
>>>>>>>
origin
/
develop
S1AP_ERROR
(
"[SCTP %d] Received initial context setup request for non "
"existing UE context 0x%06lx
\n
"
,
assoc_id
,
enb_ue_s1ap_id
);
...
...
@@ -1128,59 +731,28 @@ int s1ap_eNB_handle_initial_context_request(uint32_t assoc_id,
}
ue_desc_p
->
rx_stream
=
stream
;
<<<<<<<
HEAD
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_InitialContextSetupRequestIEs_t
,
ie
,
container
,
S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID
,
TRUE
);
ue_desc_p
->
mme_ue_s1ap_id
=
ie
->
value
.
choice
.
MME_UE_S1AP_ID
;
=======
ue_desc_p
->
mme_ue_s1ap_id
=
mme_ue_s1ap_id
;
>>>>>>>
origin
/
develop
message_p
=
itti_alloc_new_message
(
TASK_S1AP
,
S1AP_INITIAL_CONTEXT_SETUP_REQ
);
S1AP_INITIAL_CONTEXT_SETUP_REQ
(
message_p
).
ue_initial_id
=
ue_desc_p
->
ue_initial_id
;
ue_desc_p
->
ue_initial_id
=
0
;
<<<<<<<
HEAD
if
(
ue_desc_p
->
eNB_ue_s1ap_id
!=
enb_ue_s1ap_id
)
{
/* TBD */
}
S1AP_INITIAL_CONTEXT_SETUP_REQ
(
message_p
).
eNB_ue_s1ap_id
=
ue_desc_p
->
eNB_ue_s1ap_id
;
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_InitialContextSetupRequestIEs_t
,
ie
,
container
,
S1AP_ProtocolIE_ID_id_uEaggregateMaximumBitrate
,
TRUE
);
=======
S1AP_INITIAL_CONTEXT_SETUP_REQ
(
message_p
).
eNB_ue_s1ap_id
=
ue_desc_p
->
eNB_ue_s1ap_id
;
/* id-uEaggregateMaximumBitrate */
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_InitialContextSetupRequestIEs_t
,
ie
,
container
,
S1AP_ProtocolIE_ID_id_uEaggregateMaximumBitrate
,
true
);
>>>>>>>
origin
/
develop
asn_INTEGER2ulong
(
&
(
ie
->
value
.
choice
.
UEAggregateMaximumBitrate
.
uEaggregateMaximumBitRateUL
),
&
(
S1AP_INITIAL_CONTEXT_SETUP_REQ
(
message_p
).
ue_ambr
.
br_ul
));
asn_INTEGER2ulong
(
&
(
ie
->
value
.
choice
.
UEAggregateMaximumBitrate
.
uEaggregateMaximumBitRateDL
),
&
(
S1AP_INITIAL_CONTEXT_SETUP_REQ
(
message_p
).
ue_ambr
.
br_dl
));
<<<<<<<
HEAD
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_InitialContextSetupRequestIEs_t
,
ie
,
container
,
S1AP_ProtocolIE_ID_id_UESecurityCapabilities
,
TRUE
);
S1AP_INITIAL_CONTEXT_SETUP_REQ
(
message_p
).
security_capabilities
.
encryption_algorithms
=
BIT_STRING_to_uint16
(
&
ie
->
value
.
choice
.
UESecurityCapabilities
.
encryptionAlgorithms
);
S1AP_INITIAL_CONTEXT_SETUP_REQ
(
message_p
).
security_capabilities
.
integrity_algorithms
=
BIT_STRING_to_uint16
(
&
ie
->
value
.
choice
.
UESecurityCapabilities
.
integrityProtectionAlgorithms
);
/* Copy the security key */
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_InitialContextSetupRequestIEs_t
,
ie
,
container
,
S1AP_ProtocolIE_ID_id_SecurityKey
,
TRUE
);
memcpy
(
&
S1AP_INITIAL_CONTEXT_SETUP_REQ
(
message_p
).
security_key
,
ie
->
value
.
choice
.
SecurityKey
.
buf
,
ie
->
value
.
choice
.
SecurityKey
.
size
);
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_InitialContextSetupRequestIEs_t
,
ie
,
container
,
S1AP_ProtocolIE_ID_id_E_RABToBeSetupListCtxtSUReq
,
TRUE
);
=======
/* id-E-RABToBeSetupListCtxtSUReq */
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_InitialContextSetupRequestIEs_t
,
ie
,
container
,
S1AP_ProtocolIE_ID_id_E_RABToBeSetupListCtxtSUReq
,
true
);
>>>>>>>
origin
/
develop
S1AP_INITIAL_CONTEXT_SETUP_REQ
(
message_p
).
nb_of_e_rabs
=
ie
->
value
.
choice
.
E_RABToBeSetupListCtxtSUReq
.
list
.
count
;
...
...
@@ -1192,8 +764,10 @@ int s1ap_eNB_handle_initial_context_request(uint32_t assoc_id,
if
(
item_p
->
nAS_PDU
!=
NULL
)
{
/* Only copy NAS pdu if present */
S1AP_INITIAL_CONTEXT_SETUP_REQ
(
message_p
).
e_rab_param
[
i
].
nas_pdu
.
length
=
item_p
->
nAS_PDU
->
size
;
S1AP_INITIAL_CONTEXT_SETUP_REQ
(
message_p
).
e_rab_param
[
i
].
nas_pdu
.
buffer
=
malloc
(
sizeof
(
uint8_t
)
*
item_p
->
nAS_PDU
->
size
);
memcpy
(
S1AP_INITIAL_CONTEXT_SETUP_REQ
(
message_p
).
e_rab_param
[
i
].
nas_pdu
.
buffer
,
item_p
->
nAS_PDU
->
buf
,
item_p
->
nAS_PDU
->
size
);
S1AP_DEBUG
(
"Received NAS message with the E_RAB setup procedure
\n
"
);
...
...
@@ -1207,10 +781,13 @@ int s1ap_eNB_handle_initial_context_request(uint32_t assoc_id,
item_p
->
transportLayerAddress
.
buf
,
item_p
->
transportLayerAddress
.
size
);
S1AP_INITIAL_CONTEXT_SETUP_REQ
(
message_p
).
e_rab_param
[
i
].
sgw_addr
.
length
=
item_p
->
transportLayerAddress
.
size
*
8
-
item_p
->
transportLayerAddress
.
bits_unused
;
/* GTP tunnel endpoint ID */
OCTET_STRING_TO_INT32
(
&
item_p
->
gTP_TEID
,
S1AP_INITIAL_CONTEXT_SETUP_REQ
(
message_p
).
e_rab_param
[
i
].
gtp_teid
);
/* Set the QOS informations */
S1AP_INITIAL_CONTEXT_SETUP_REQ
(
message_p
).
e_rab_param
[
i
].
qos
.
qci
=
item_p
->
e_RABlevelQoSParameters
.
qCI
;
S1AP_INITIAL_CONTEXT_SETUP_REQ
(
message_p
).
e_rab_param
[
i
].
qos
.
allocation_retention_priority
.
priority_level
=
item_p
->
e_RABlevelQoSParameters
.
allocationRetentionPriority
.
priorityLevel
;
S1AP_INITIAL_CONTEXT_SETUP_REQ
(
message_p
).
e_rab_param
[
i
].
qos
.
allocation_retention_priority
.
pre_emp_capability
=
...
...
@@ -1234,6 +811,7 @@ int s1ap_eNB_handle_initial_context_request(uint32_t assoc_id,
ie
->
value
.
choice
.
SecurityKey
.
buf
,
ie
->
value
.
choice
.
SecurityKey
.
size
);
itti_send_msg_to_task
(
TASK_RRC_ENB
,
ue_desc_p
->
eNB_instance
->
instance
,
message_p
);
return
0
;
}
...
...
@@ -1250,13 +828,9 @@ int s1ap_eNB_handle_ue_context_release_command(uint32_t assoc_id,
S1AP_ENB_UE_S1AP_ID_t
enb_ue_s1ap_id
;
S1AP_UEContextReleaseCommand_t
*
container
;
S1AP_UEContextReleaseCommand_IEs_t
*
ie
;
<<<<<<<
HEAD
DevAssert
(
pdu
!=
NULL
);
=======
DevAssert
(
pdu
!=
NULL
);
>>>>>>>
origin
/
develop
container
=
&
pdu
->
choice
.
initiatingMessage
.
value
.
choice
.
UEContextReleaseCommand
;
if
((
mme_desc_p
=
s1ap_eNB_get_MME
(
NULL
,
assoc_id
,
0
))
==
NULL
)
{
...
...
@@ -1266,20 +840,13 @@ int s1ap_eNB_handle_ue_context_release_command(uint32_t assoc_id,
}
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_UEContextReleaseCommand_IEs_t
,
ie
,
container
,
<<<<<<<
HEAD
S1AP_ProtocolIE_ID_id_UE_S1AP_IDs
,
TRUE
);
=======
S1AP_ProtocolIE_ID_id_UE_S1AP_IDs
,
true
);
>>>>>>>
origin
/
develop
switch
(
ie
->
value
.
choice
.
UE_S1AP_IDs
.
present
)
{
case
S1AP_UE_S1AP_IDs_PR_uE_S1AP_ID_pair
:
enb_ue_s1ap_id
=
ie
->
value
.
choice
.
UE_S1AP_IDs
.
choice
.
uE_S1AP_ID_pair
.
eNB_UE_S1AP_ID
;
mme_ue_s1ap_id
=
ie
->
value
.
choice
.
UE_S1AP_IDs
.
choice
.
uE_S1AP_ID_pair
.
mME_UE_S1AP_ID
;
<<<<<<<
HEAD
=======
>>>>>>>
origin
/
develop
MSC_LOG_RX_MESSAGE
(
MSC_S1AP_ENB
,
MSC_S1AP_MME
,
...
...
@@ -1290,11 +857,7 @@ int s1ap_eNB_handle_ue_context_release_command(uint32_t assoc_id,
mme_ue_s1ap_id
);
if
((
ue_desc_p
=
s1ap_eNB_get_ue_context
(
mme_desc_p
->
s1ap_eNB_instance
,
<<<<<<<
HEAD
enb_ue_s1ap_id
))
==
NULL
)
{
=======
enb_ue_s1ap_id
))
==
NULL
)
{
>>>>>>>
origin
/
develop
S1AP_ERROR
(
"[SCTP %d] Received UE context release command for non "
"existing UE context 0x%06lx
\n
"
,
assoc_id
,
...
...
@@ -1334,11 +897,7 @@ int s1ap_eNB_handle_ue_context_release_command(uint32_t assoc_id,
}
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_UEContextReleaseCommand_IEs_t
,
ie
,
container
,
<<<<<<<
HEAD
S1AP_ProtocolIE_ID_id_Cause
,
TRUE
);
=======
S1AP_ProtocolIE_ID_id_Cause
,
true
);
>>>>>>>
origin
/
develop
/* TBD */
}
...
...
@@ -1348,23 +907,16 @@ int s1ap_eNB_handle_e_rab_setup_request(uint32_t assoc_id,
S1AP_S1AP_PDU_t
*
pdu
)
{
int
i
;
<<<<<<<
HEAD
=======
S1AP_MME_UE_S1AP_ID_t
mme_ue_s1ap_id
;
>>>>>>>
origin
/
develop
S1AP_ENB_UE_S1AP_ID_t
enb_ue_s1ap_id
;
s1ap_eNB_mme_data_t
*
mme_desc_p
=
NULL
;
s1ap_eNB_ue_context_t
*
ue_desc_p
=
NULL
;
MessageDef
*
message_p
=
NULL
;
S1AP_E_RABSetupRequest_t
*
container
;
S1AP_E_RABSetupRequestIEs_t
*
ie
;
<<<<<<<
HEAD
DevAssert
(
pdu
!=
NULL
);
=======
DevAssert
(
pdu
!=
NULL
);
>>>>>>>
origin
/
develop
container
=
&
pdu
->
choice
.
initiatingMessage
.
value
.
choice
.
E_RABSetupRequest
;
if
((
mme_desc_p
=
s1ap_eNB_get_MME
(
NULL
,
assoc_id
,
0
))
==
NULL
)
{
...
...
@@ -1373,16 +925,6 @@ int s1ap_eNB_handle_e_rab_setup_request(uint32_t assoc_id,
return
-
1
;
}
<<<<<<<
HEAD
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_E_RABSetupRequestIEs_t
,
ie
,
container
,
S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID
,
TRUE
);
if
((
ue_desc_p
=
s1ap_eNB_get_ue_context
(
mme_desc_p
->
s1ap_eNB_instance
,
ie
->
value
.
choice
.
ENB_UE_S1AP_ID
))
==
NULL
)
{
S1AP_ERROR
(
"[SCTP %d] Received initial context setup request for non "
"existing UE context 0x%06lx
\n
"
,
assoc_id
,
ie
->
value
.
choice
.
ENB_UE_S1AP_ID
);
=======
/* id-MME-UE-S1AP-ID */
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_E_RABSetupRequestIEs_t
,
ie
,
container
,
S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID
,
true
);
...
...
@@ -1398,12 +940,9 @@ int s1ap_eNB_handle_e_rab_setup_request(uint32_t assoc_id,
S1AP_ERROR
(
"[SCTP %d] Received initial context setup request for non "
"existing UE context 0x%06lx
\n
"
,
assoc_id
,
enb_ue_s1ap_id
);
>>>>>>>
origin
/
develop
return
-
1
;
}
enb_ue_s1ap_id
=
ie
->
value
.
choice
.
ENB_UE_S1AP_ID
;
/* Initial context request = UE-related procedure -> stream != 0 */
if
(
stream
==
0
)
{
S1AP_ERROR
(
"[SCTP %d] Received UE-related procedure on stream (%d)
\n
"
,
...
...
@@ -1412,22 +951,7 @@ int s1ap_eNB_handle_e_rab_setup_request(uint32_t assoc_id,
}
ue_desc_p
->
rx_stream
=
stream
;
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_E_RABSetupRequestIEs_t
,
ie
,
container
,
S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID
,
TRUE
);
<<<<<<<
HEAD
if
(
ue_desc_p
->
mme_ue_s1ap_id
!=
ie
->
value
.
choice
.
MME_UE_S1AP_ID
)
{
S1AP_WARN
(
"UE context mme_ue_s1ap_id is different form that of the message (%d != %ld)"
,
ue_desc_p
->
mme_ue_s1ap_id
,
ie
->
value
.
choice
.
MME_UE_S1AP_ID
);
}
message_p
=
itti_alloc_new_message
(
TASK_S1AP
,
S1AP_E_RAB_SETUP_REQ
);
S1AP_E_RAB_SETUP_REQ
(
message_p
).
ue_initial_id
=
ue_desc_p
->
ue_initial_id
;
S1AP_E_RAB_SETUP_REQ
(
message_p
).
mme_ue_s1ap_id
=
ie
->
value
.
choice
.
MME_UE_S1AP_ID
;
S1AP_E_RAB_SETUP_REQ
(
message_p
).
eNB_ue_s1ap_id
=
enb_ue_s1ap_id
;
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_E_RABSetupRequestIEs_t
,
ie
,
container
,
S1AP_ProtocolIE_ID_id_E_RABToBeSetupListBearerSUReq
,
TRUE
);
=======
if
(
ue_desc_p
->
mme_ue_s1ap_id
!=
mme_ue_s1ap_id
)
{
S1AP_WARN
(
"UE context mme_ue_s1ap_id is different form that of the message (%d != %ld)"
,
ue_desc_p
->
mme_ue_s1ap_id
,
mme_ue_s1ap_id
);
...
...
@@ -1441,35 +965,29 @@ int s1ap_eNB_handle_e_rab_setup_request(uint32_t assoc_id,
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_E_RABSetupRequestIEs_t
,
ie
,
container
,
S1AP_ProtocolIE_ID_id_E_RABToBeSetupListBearerSUReq
,
true
);
>>>>>>>
origin
/
develop
S1AP_E_RAB_SETUP_REQ
(
message_p
).
nb_e_rabs_tosetup
=
ie
->
value
.
choice
.
E_RABToBeSetupListBearerSUReq
.
list
.
count
;
for
(
i
=
0
;
i
<
ie
->
value
.
choice
.
E_RABToBeSetupListBearerSUReq
.
list
.
count
;
i
++
)
{
S1AP_E_RABToBeSetupItemBearerSUReq_t
*
item_p
;
<<<<<<<
HEAD
item_p
=
&
(((
S1AP_E_RABToBeSetupItemBearerSUReqIEs_t
*
)
ie
->
value
.
choice
.
E_RABToBeSetupListBearerSUReq
.
list
.
array
[
i
])
->
value
.
choice
.
E_RABToBeSetupItemBearerSUReq
);
=======
item_p
=
&
(((
S1AP_E_RABToBeSetupItemBearerSUReqIEs_t
*
)
ie
->
value
.
choice
.
E_RABToBeSetupListBearerSUReq
.
list
.
array
[
i
])
->
value
.
choice
.
E_RABToBeSetupItemBearerSUReq
);
>>>>>>>
origin
/
develop
S1AP_E_RAB_SETUP_REQ
(
message_p
).
e_rab_setup_params
[
i
].
e_rab_id
=
item_p
->
e_RAB_ID
;
// check for the NAS PDU
if
(
item_p
->
nAS_PDU
.
size
>
0
)
{
S1AP_E_RAB_SETUP_REQ
(
message_p
).
e_rab_setup_params
[
i
].
nas_pdu
.
length
=
item_p
->
nAS_PDU
.
size
;
S1AP_E_RAB_SETUP_REQ
(
message_p
).
e_rab_setup_params
[
i
].
nas_pdu
.
buffer
=
malloc
(
sizeof
(
uint8_t
)
*
item_p
->
nAS_PDU
.
size
);
memcpy
(
S1AP_E_RAB_SETUP_REQ
(
message_p
).
e_rab_setup_params
[
i
].
nas_pdu
.
buffer
,
item_p
->
nAS_PDU
.
buf
,
item_p
->
nAS_PDU
.
size
);
// S1AP_INFO("received a NAS PDU with size %d (%02x.%02x)\n",S1AP_E_RAB_SETUP_REQ(message_p).e_rab_setup_params[i].nas_pdu.length, item_p->nAS_PDU.buf[0], item_p->nAS_PDU.buf[1]);
}
else
{
S1AP_E_RAB_SETUP_REQ
(
message_p
).
e_rab_setup_params
[
i
].
nas_pdu
.
length
=
0
;
S1AP_E_RAB_SETUP_REQ
(
message_p
).
e_rab_setup_params
[
i
].
nas_pdu
.
buffer
=
NULL
;
<<<<<<<
HEAD
=======
>>>>>>>
origin
/
develop
S1AP_WARN
(
"NAS PDU is not provided, generate a E_RAB_SETUP Failure (TBD) back to MME
\n
"
);
// return -1;
}
...
...
@@ -1479,23 +997,18 @@ int s1ap_eNB_handle_e_rab_setup_request(uint32_t assoc_id,
item_p
->
transportLayerAddress
.
buf
,
item_p
->
transportLayerAddress
.
size
);
S1AP_E_RAB_SETUP_REQ
(
message_p
).
e_rab_setup_params
[
i
].
sgw_addr
.
length
=
item_p
->
transportLayerAddress
.
size
*
8
-
item_p
->
transportLayerAddress
.
bits_unused
;
<<<<<<<
HEAD
/* S1AP_INFO("sgw addr %s len: %d (size %d, index %d)\n",
S1AP_E_RAB_SETUP_REQ(message_p).e_rab_setup_params[i].sgw_addr.buffer,
S1AP_E_RAB_SETUP_REQ(message_p).e_rab_setup_params[i].sgw_addr.length,
item_p->transportLayerAddress.size, i);
=======
/* S1AP_INFO("sgw addr %s len: %d (size %d, index %d)\n",
S1AP_E_RAB_SETUP_REQ(message_p).e_rab_setup_params[i].sgw_addr.buffer,
S1AP_E_RAB_SETUP_REQ(message_p).e_rab_setup_params[i].sgw_addr.length,
item_p->transportLayerAddress.size, i);
>>>>>>> origin/develop
*/
/* GTP tunnel endpoint ID */
OCTET_STRING_TO_INT32
(
&
item_p
->
gTP_TEID
,
S1AP_E_RAB_SETUP_REQ
(
message_p
).
e_rab_setup_params
[
i
].
gtp_teid
);
/* Set the QOS informations */
S1AP_E_RAB_SETUP_REQ
(
message_p
).
e_rab_setup_params
[
i
].
qos
.
qci
=
item_p
->
e_RABlevelQoSParameters
.
qCI
;
S1AP_E_RAB_SETUP_REQ
(
message_p
).
e_rab_setup_params
[
i
].
qos
.
allocation_retention_priority
.
priority_level
=
item_p
->
e_RABlevelQoSParameters
.
allocationRetentionPriority
.
priorityLevel
;
S1AP_E_RAB_SETUP_REQ
(
message_p
).
e_rab_setup_params
[
i
].
qos
.
allocation_retention_priority
.
pre_emp_capability
=
...
...
@@ -1505,6 +1018,7 @@ int s1ap_eNB_handle_e_rab_setup_request(uint32_t assoc_id,
}
itti_send_msg_to_task
(
TASK_RRC_ENB
,
ue_desc_p
->
eNB_instance
->
instance
,
message_p
);
return
0
;
}
...
...
@@ -1518,16 +1032,11 @@ int s1ap_eNB_handle_paging(uint32_t assoc_id,
MessageDef
*
message_p
=
NULL
;
S1AP_Paging_t
*
container
;
S1AP_PagingIEs_t
*
ie
;
<<<<<<<
HEAD
DevAssert
(
pdu
!=
NULL
);
container
=
&
pdu
->
choice
.
initiatingMessage
.
value
.
choice
.
Paging
;
=======
DevAssert
(
pdu
!=
NULL
);
container
=
&
pdu
->
choice
.
initiatingMessage
.
value
.
choice
.
Paging
;
>>>>>>>
origin
/
develop
// received Paging Message from MME
S1AP_DEBUG
(
"[SCTP %d] Received Paging Message From MME
\n
"
,
assoc_id
);
...
...
@@ -1545,7 +1054,6 @@ int s1ap_eNB_handle_paging(uint32_t assoc_id,
}
s1ap_eNB_instance
=
mme_desc_p
->
s1ap_eNB_instance
;
if
(
s1ap_eNB_instance
==
NULL
)
{
S1AP_ERROR
(
"[SCTP %d] Received Paging for non existing MME context : s1ap_eNB_instance is NULL
\n
"
,
assoc_id
);
...
...
@@ -1553,15 +1061,6 @@ int s1ap_eNB_handle_paging(uint32_t assoc_id,
}
message_p
=
itti_alloc_new_message
(
TASK_S1AP
,
S1AP_PAGING_IND
);
<<<<<<<
HEAD
/* convert S1AP_PagingIEs_t to s1ap_paging_ind_t */
/* convert UE Identity Index value */
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_PagingIEs_t
,
ie
,
container
,
S1AP_ProtocolIE_ID_id_UEIdentityIndexValue
,
TRUE
);
S1AP_PAGING_IND
(
message_p
).
ue_index_value
=
BIT_STRING_to_uint32
(
&
ie
->
value
.
choice
.
UEIdentityIndexValue
);
S1AP_DEBUG
(
"[SCTP %d] Received Paging ue_index_value (%d)
\n
"
,
assoc_id
,(
uint32_t
)
S1AP_PAGING_IND
(
message_p
).
ue_index_value
);
=======
/* convert S1AP_PagingIEs_t to s1ap_paging_ind_t */
/* id-UEIdentityIndexValue : convert UE Identity Index value */
...
...
@@ -1571,11 +1070,8 @@ int s1ap_eNB_handle_paging(uint32_t assoc_id,
S1AP_DEBUG
(
"[SCTP %d] Received Paging ue_index_value (%d)
\n
"
,
assoc_id
,(
uint32_t
)
S1AP_PAGING_IND
(
message_p
).
ue_index_value
);
>>>>>>>
origin
/
develop
S1AP_PAGING_IND
(
message_p
).
ue_paging_identity
.
choice
.
s_tmsi
.
mme_code
=
0
;
S1AP_PAGING_IND
(
message_p
).
ue_paging_identity
.
choice
.
s_tmsi
.
m_tmsi
=
0
;
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_PagingIEs_t
,
ie
,
container
,
S1AP_ProtocolIE_ID_id_UEPagingID
,
TRUE
);
/* id-UEPagingID */
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_PagingIEs_t
,
ie
,
container
,
...
...
@@ -1617,56 +1113,6 @@ int s1ap_eNB_handle_paging(uint32_t assoc_id,
return
-
1
;
}
<<<<<<<
HEAD
#if 0
/* convert Paging DRX(optional) */
if (paging_p->presenceMask & S1AP_PAGINGIES_PAGINGDRX_PRESENT) {
switch(paging_p->pagingDRX) {
case S1AP_PagingDRX_v32:
S1AP_PAGING_IND(message_p).paging_drx = PAGING_DRX_32;
break;
case S1AP_PagingDRX_v64:
S1AP_PAGING_IND(message_p).paging_drx = PAGING_DRX_64;
break;
case S1AP_PagingDRX_v128:
S1AP_PAGING_IND(message_p).paging_drx = PAGING_DRX_128;
break;
case S1AP_PagingDRX_v256:
S1AP_PAGING_IND(message_p).paging_drx = PAGING_DRX_256;
break;
default:
// when UE Paging DRX is no value
S1AP_PAGING_IND(message_p).paging_drx = PAGING_DRX_256;
break;
}
}
#endif
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_PagingIEs_t
,
ie
,
container
,
S1AP_ProtocolIE_ID_id_pagingDRX
,
FALSE
);
/* optional */
if
(
ie
)
{
S1AP_PAGING_IND
(
message_p
).
paging_drx
=
ie
->
value
.
choice
.
PagingDRX
;
}
else
{
S1AP_PAGING_IND
(
message_p
).
paging_drx
=
PAGING_DRX_256
;
}
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_PagingIEs_t
,
ie
,
container
,
S1AP_ProtocolIE_ID_id_CNDomain
,
TRUE
);
/* convert cnDomain */
if
(
ie
->
value
.
choice
.
CNDomain
==
S1AP_CNDomain_ps
)
{
S1AP_PAGING_IND
(
message_p
).
cn_domain
=
CN_DOMAIN_PS
;
}
else
if
(
ie
->
value
.
choice
.
CNDomain
==
S1AP_CNDomain_cs
)
{
S1AP_PAGING_IND
(
message_p
).
cn_domain
=
CN_DOMAIN_CS
;
}
else
{
=======
S1AP_PAGING_IND
(
message_p
).
paging_drx
=
PAGING_DRX_256
;
/* id-pagingDRX */
...
...
@@ -1690,7 +1136,6 @@ int s1ap_eNB_handle_paging(uint32_t assoc_id,
}
else
if
(
ie
->
value
.
choice
.
CNDomain
==
S1AP_CNDomain_cs
)
{
S1AP_PAGING_IND
(
message_p
).
cn_domain
=
CN_DOMAIN_CS
;
}
else
{
>>>>>>>
origin
/
develop
/* invalid paging_p->cnDomain */
S1AP_ERROR
(
"[SCTP %d] Received Paging : cnDomain(%ld) is unknown
\n
"
,
assoc_id
,
ie
->
value
.
choice
.
CNDomain
);
return
-
1
;
...
...
@@ -1699,15 +1144,10 @@ int s1ap_eNB_handle_paging(uint32_t assoc_id,
memset
(
&
S1AP_PAGING_IND
(
message_p
).
plmn_identity
[
0
],
0
,
sizeof
(
plmn_identity_t
)
*
256
);
memset
(
&
S1AP_PAGING_IND
(
message_p
).
tac
[
0
],
0
,
sizeof
(
int16_t
)
*
256
);
S1AP_PAGING_IND
(
message_p
).
tai_size
=
0
;
<<<<<<<
HEAD
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_PagingIEs_t
,
ie
,
container
,
S1AP_ProtocolIE_ID_id_TAIList
,
TRUE
);
=======
/* id-TAIList */
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_PagingIEs_t
,
ie
,
container
,
S1AP_ProtocolIE_ID_id_TAIList
,
true
);
>>>>>>>
origin
/
develop
S1AP_INFO
(
"[SCTP %d] Received Paging taiList: count %d
\n
"
,
assoc_id
,
ie
->
value
.
choice
.
TAIList
.
list
.
count
);
for
(
int
i
=
0
;
i
<
ie
->
value
.
choice
.
TAIList
.
list
.
count
;
i
++
)
{
...
...
@@ -1724,60 +1164,7 @@ int s1ap_eNB_handle_paging(uint32_t assoc_id,
S1AP_PAGING_IND
(
message_p
).
tac
[
i
]);
}
<<<<<<<
HEAD
#if 0
// CSG Id(optional) List is not used
if (paging_p->presenceMask & S1AP_PAGINGIES_CSG_IDLIST_PRESENT) {
// TODO
}
/* convert pagingPriority (optional) if has value */
if (paging_p->presenceMask & S1AP_PAGINGIES_PAGINGPRIORITY_PRESENT) {
switch(paging_p->pagingPriority) {
case S1AP_PagingPriority_priolevel1:
S1AP_PAGING_IND(message_p).paging_priority = PAGING_PRIO_LEVEL1;
break;
case S1AP_PagingPriority_priolevel2:
S1AP_PAGING_IND(message_p).paging_priority = PAGING_PRIO_LEVEL2;
break;
case S1AP_PagingPriority_priolevel3:
S1AP_PAGING_IND(message_p).paging_priority = PAGING_PRIO_LEVEL3;
break;
case S1AP_PagingPriority_priolevel4:
S1AP_PAGING_IND(message_p).paging_priority = PAGING_PRIO_LEVEL4;
break;
case S1AP_PagingPriority_priolevel5:
S1AP_PAGING_IND(message_p).paging_priority = PAGING_PRIO_LEVEL5;
break;
case S1AP_PagingPriority_priolevel6:
S1AP_PAGING_IND(message_p).paging_priority = PAGING_PRIO_LEVEL6;
break;
case S1AP_PagingPriority_priolevel7:
S1AP_PAGING_IND(message_p).paging_priority = PAGING_PRIO_LEVEL7;
break;
case S1AP_PagingPriority_priolevel8:
S1AP_PAGING_IND(message_p).paging_priority = PAGING_PRIO_LEVEL8;
break;
default:
/* invalid paging_p->pagingPriority */
S1AP_ERROR("[SCTP %d] Received paging : pagingPriority(%ld) is invalid\n", assoc_id, paging_p->pagingPriority);
return -1;
}
}
#endif
=======
>>>>>>>
origin
/
develop
//paging parameter values
S1AP_DEBUG
(
"[SCTP %d] Received Paging parameters: ue_index_value %d cn_domain %d paging_drx %d paging_priority %d
\n
"
,
assoc_id
,
S1AP_PAGING_IND
(
message_p
).
ue_index_value
,
S1AP_PAGING_IND
(
message_p
).
cn_domain
,
...
...
@@ -1788,45 +1175,29 @@ int s1ap_eNB_handle_paging(uint32_t assoc_id,
S1AP_PAGING_IND
(
message_p
).
ue_paging_identity
.
choice
.
imsi
.
buffer
[
0
],
S1AP_PAGING_IND
(
message_p
).
ue_paging_identity
.
choice
.
imsi
.
buffer
[
1
],
S1AP_PAGING_IND
(
message_p
).
ue_paging_identity
.
choice
.
imsi
.
buffer
[
2
],
S1AP_PAGING_IND
(
message_p
).
ue_paging_identity
.
choice
.
imsi
.
buffer
[
3
],
S1AP_PAGING_IND
(
message_p
).
ue_paging_identity
.
choice
.
imsi
.
buffer
[
4
],
S1AP_PAGING_IND
(
message_p
).
ue_paging_identity
.
choice
.
imsi
.
buffer
[
5
]);
<<<<<<<
HEAD
/* send message to RRC */
itti_send_msg_to_task
(
TASK_RRC_ENB
,
s1ap_eNB_instance
->
instance
,
message_p
);
=======
/* send message to RRC */
itti_send_msg_to_task
(
TASK_RRC_ENB
,
s1ap_eNB_instance
->
instance
,
message_p
);
>>>>>>>
origin
/
develop
return
0
;
}
static
int
s1ap_eNB_handle_e_rab_modify_request
(
uint32_t
assoc_id
,
<<<<<<<
HEAD
uint32_t
stream
,
S1AP_S1AP_PDU_t
*
pdu
)
{
int
i
;
=======
uint32_t
stream
,
S1AP_S1AP_PDU_t
*
pdu
)
{
int
i
,
nb_of_e_rabs_failed
;
>>>>>>>
origin
/
develop
s1ap_eNB_mme_data_t
*
mme_desc_p
=
NULL
;
s1ap_eNB_ue_context_t
*
ue_desc_p
=
NULL
;
MessageDef
*
message_p
=
NULL
;
S1AP_E_RABModifyRequest_t
*
container
;
S1AP_E_RABModifyRequestIEs_t
*
ie
;
S1AP_ENB_UE_S1AP_ID_t
enb_ue_s1ap_id
;
<<<<<<<
HEAD
DevAssert
(
pdu
!=
NULL
);
=======
S1AP_MME_UE_S1AP_ID_t
mme_ue_s1ap_id
;
DevAssert
(
pdu
!=
NULL
);
>>>>>>>
origin
/
develop
container
=
&
pdu
->
choice
.
initiatingMessage
.
value
.
choice
.
E_RABModifyRequest
;
if
((
mme_desc_p
=
s1ap_eNB_get_MME
(
NULL
,
assoc_id
,
0
))
==
NULL
)
{
...
...
@@ -1835,17 +1206,6 @@ int s1ap_eNB_handle_e_rab_modify_request(uint32_t assoc_id,
return
-
1
;
}
<<<<<<<
HEAD
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_E_RABModifyRequestIEs_t
,
ie
,
container
,
S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID
,
TRUE
);
enb_ue_s1ap_id
=
ie
->
value
.
choice
.
ENB_UE_S1AP_ID
;
if
((
ue_desc_p
=
s1ap_eNB_get_ue_context
(
mme_desc_p
->
s1ap_eNB_instance
,
ie
->
value
.
choice
.
ENB_UE_S1AP_ID
))
==
NULL
)
{
S1AP_ERROR
(
"[SCTP %d] Received E-RAB modify request for non "
"existing UE context 0x%06lx
\n
"
,
assoc_id
,
ie
->
value
.
choice
.
ENB_UE_S1AP_ID
);
=======
/* id-MME-UE-S1AP-ID */
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_E_RABModifyRequestIEs_t
,
ie
,
container
,
S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID
,
true
);
...
...
@@ -1861,7 +1221,6 @@ int s1ap_eNB_handle_e_rab_modify_request(uint32_t assoc_id,
S1AP_ERROR
(
"[SCTP %d] Received E-RAB modify request for non "
"existing UE context 0x%06lx
\n
"
,
assoc_id
,
enb_ue_s1ap_id
);
>>>>>>>
origin
/
develop
return
-
1
;
}
...
...
@@ -1873,27 +1232,7 @@ int s1ap_eNB_handle_e_rab_modify_request(uint32_t assoc_id,
}
ue_desc_p
->
rx_stream
=
stream
;
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_E_RABModifyRequestIEs_t
,
ie
,
container
,
S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID
,
TRUE
);
<<<<<<<
HEAD
if
(
ue_desc_p
->
mme_ue_s1ap_id
!=
ie
->
value
.
choice
.
MME_UE_S1AP_ID
)
{
S1AP_WARN
(
"UE context mme_ue_s1ap_id is different form that of the message (%d != %ld)"
,
ue_desc_p
->
mme_ue_s1ap_id
,
ie
->
value
.
choice
.
MME_UE_S1AP_ID
);
message_p
=
itti_alloc_new_message
(
TASK_RRC_ENB
,
S1AP_E_RAB_MODIFY_RESP
);
S1AP_E_RAB_MODIFY_RESP
(
message_p
).
eNB_ue_s1ap_id
=
enb_ue_s1ap_id
;
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_E_RABModifyRequestIEs_t
,
ie
,
container
,
S1AP_ProtocolIE_ID_id_E_RABToBeModifiedListBearerModReq
,
TRUE
);
for
(
i
=
0
;
i
<
ie
->
value
.
choice
.
E_RABToBeModifiedListBearerModReq
.
list
.
count
;
i
++
)
{
S1AP_E_RABToBeModifiedItemBearerModReq_t
*
item_p
;
item_p
=
&
(((
S1AP_E_RABToBeModifiedItemBearerModReqIEs_t
*
)
ie
->
value
.
choice
.
E_RABToBeModifiedListBearerModReq
.
list
.
array
[
i
])
->
value
.
choice
.
E_RABToBeModifiedItemBearerModReq
);
S1AP_E_RAB_MODIFY_RESP
(
message_p
).
e_rabs_failed
[
i
].
e_rab_id
=
item_p
->
e_RAB_ID
;
S1AP_E_RAB_MODIFY_RESP
(
message_p
).
e_rabs_failed
[
i
].
cause
=
S1AP_Cause_PR_radioNetwork
;
S1AP_E_RAB_MODIFY_RESP
(
message_p
).
e_rabs_failed
[
i
].
cause_value
=
S1AP_CauseRadioNetwork_unknown_mme_ue_s1ap_id
;
}
=======
if
(
ue_desc_p
->
mme_ue_s1ap_id
!=
mme_ue_s1ap_id
)
{
S1AP_WARN
(
"UE context mme_ue_s1ap_id is different form that of the message (%d != %ld)"
,
ue_desc_p
->
mme_ue_s1ap_id
,
mme_ue_s1ap_id
);
...
...
@@ -1913,23 +1252,17 @@ int s1ap_eNB_handle_e_rab_modify_request(uint32_t assoc_id,
S1AP_E_RAB_MODIFY_RESP
(
message_p
).
e_rabs_failed
[
nb_of_e_rabs_failed
].
cause_value
=
S1AP_CauseRadioNetwork_unknown_mme_ue_s1ap_id
;
}
S1AP_E_RAB_MODIFY_RESP
(
message_p
).
nb_of_e_rabs_failed
=
nb_of_e_rabs_failed
;
>>>>>>>
origin
/
develop
S1AP_E_RAB_MODIFY_RESP
(
message_p
).
nb_of_e_rabs_failed
=
ie
->
value
.
choice
.
E_RABToBeModifiedListBearerModReq
.
list
.
count
;
s1ap_eNB_e_rab_modify_resp
(
mme_desc_p
->
s1ap_eNB_instance
->
instance
,
&
S1AP_E_RAB_MODIFY_RESP
(
message_p
));
message_p
=
NULL
;
return
-
1
;
}
message_p
=
itti_alloc_new_message
(
TASK_S1AP
,
S1AP_E_RAB_MODIFY_REQ
);
S1AP_E_RAB_MODIFY_REQ
(
message_p
).
ue_initial_id
=
ue_desc_p
->
ue_initial_id
;
<<<<<<<
HEAD
S1AP_E_RAB_MODIFY_REQ
(
message_p
).
mme_ue_s1ap_id
=
ie
->
value
.
choice
.
MME_UE_S1AP_ID
;
S1AP_E_RAB_MODIFY_REQ
(
message_p
).
eNB_ue_s1ap_id
=
enb_ue_s1ap_id
;
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_E_RABModifyRequestIEs_t
,
ie
,
container
,
S1AP_ProtocolIE_ID_id_E_RABToBeModifiedListBearerModReq
,
TRUE
);
=======
S1AP_E_RAB_MODIFY_REQ
(
message_p
).
mme_ue_s1ap_id
=
mme_ue_s1ap_id
;
S1AP_E_RAB_MODIFY_REQ
(
message_p
).
eNB_ue_s1ap_id
=
enb_ue_s1ap_id
;
...
...
@@ -1937,7 +1270,6 @@ int s1ap_eNB_handle_e_rab_modify_request(uint32_t assoc_id,
/* id-E-RABToBeModifiedListBearerModReq */
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_E_RABModifyRequestIEs_t
,
ie
,
container
,
S1AP_ProtocolIE_ID_id_E_RABToBeModifiedListBearerModReq
,
true
);
>>>>>>>
origin
/
develop
S1AP_E_RAB_MODIFY_REQ
(
message_p
).
nb_e_rabs_tomodify
=
ie
->
value
.
choice
.
E_RABToBeModifiedListBearerModReq
.
list
.
count
;
...
...
@@ -1949,7 +1281,9 @@ int s1ap_eNB_handle_e_rab_modify_request(uint32_t assoc_id,
// check for the NAS PDU
if
(
item_p
->
nAS_PDU
.
size
>
0
)
{
S1AP_E_RAB_MODIFY_REQ
(
message_p
).
e_rab_modify_params
[
i
].
nas_pdu
.
length
=
item_p
->
nAS_PDU
.
size
;
S1AP_E_RAB_MODIFY_REQ
(
message_p
).
e_rab_modify_params
[
i
].
nas_pdu
.
buffer
=
malloc
(
sizeof
(
uint8_t
)
*
item_p
->
nAS_PDU
.
size
);
memcpy
(
S1AP_E_RAB_MODIFY_REQ
(
message_p
).
e_rab_modify_params
[
i
].
nas_pdu
.
buffer
,
item_p
->
nAS_PDU
.
buf
,
item_p
->
nAS_PDU
.
size
);
}
else
{
...
...
@@ -1960,27 +1294,25 @@ int s1ap_eNB_handle_e_rab_modify_request(uint32_t assoc_id,
/* Set the QOS informations */
S1AP_E_RAB_MODIFY_REQ
(
message_p
).
e_rab_modify_params
[
i
].
qos
.
qci
=
item_p
->
e_RABLevelQoSParameters
.
qCI
;
S1AP_E_RAB_MODIFY_REQ
(
message_p
).
e_rab_modify_params
[
i
].
qos
.
allocation_retention_priority
.
priority_level
=
item_p
->
e_RABLevelQoSParameters
.
allocationRetentionPriority
.
priorityLevel
;
S1AP_E_RAB_MODIFY_REQ
(
message_p
).
e_rab_modify_params
[
i
].
qos
.
allocation_retention_priority
.
pre_emp_capability
=
item_p
->
e_RABLevelQoSParameters
.
allocationRetentionPriority
.
pre_emptionCapability
;
S1AP_E_RAB_MODIFY_REQ
(
message_p
).
e_rab_modify_params
[
i
].
qos
.
allocation_retention_priority
.
pre_emp_vulnerability
=
item_p
->
e_RABLevelQoSParameters
.
allocationRetentionPriority
.
pre_emptionVulnerability
;
}
itti_send_msg_to_task
(
TASK_RRC_ENB
,
ue_desc_p
->
eNB_instance
->
instance
,
message_p
);
return
0
;
}
// handle e-rab release command and send it to rrc_end
static
int
s1ap_eNB_handle_e_rab_release_command
(
uint32_t
assoc_id
,
<<<<<<<
HEAD
uint32_t
stream
,
S1AP_S1AP_PDU_t
*
pdu
)
=======
uint32_t
stream
,
S1AP_S1AP_PDU_t
*
pdu
)
>>>>>>>
origin
/
develop
{
int
i
;
s1ap_eNB_mme_data_t
*
mme_desc_p
=
NULL
;
...
...
@@ -1989,14 +1321,10 @@ int s1ap_eNB_handle_e_rab_release_command(uint32_t assoc_id,
S1AP_E_RABReleaseCommand_t
*
container
;
S1AP_E_RABReleaseCommandIEs_t
*
ie
;
S1AP_ENB_UE_S1AP_ID_t
enb_ue_s1ap_id
;
<<<<<<<
HEAD
DevAssert
(
pdu
!=
NULL
);
=======
S1AP_MME_UE_S1AP_ID_t
mme_ue_s1ap_id
;
DevAssert
(
pdu
!=
NULL
);
>>>>>>>
origin
/
develop
container
=
&
pdu
->
choice
.
initiatingMessage
.
value
.
choice
.
E_RABReleaseCommand
;
if
((
mme_desc_p
=
s1ap_eNB_get_MME
(
NULL
,
assoc_id
,
0
))
==
NULL
)
{
...
...
@@ -2004,14 +1332,6 @@ int s1ap_eNB_handle_e_rab_release_command(uint32_t assoc_id,
return
-
1
;
}
<<<<<<<
HEAD
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_E_RABReleaseCommandIEs_t
,
ie
,
container
,
S1AP_ProtocolIE_ID_id_eNB_UE_S1AP_ID
,
TRUE
);
enb_ue_s1ap_id
=
ie
->
value
.
choice
.
ENB_UE_S1AP_ID
;
if
((
ue_desc_p
=
s1ap_eNB_get_ue_context
(
mme_desc_p
->
s1ap_eNB_instance
,
ie
->
value
.
choice
.
ENB_UE_S1AP_ID
))
==
NULL
)
{
=======
/* id-MME-UE-S1AP-ID */
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_E_RABReleaseCommandIEs_t
,
ie
,
container
,
S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID
,
true
);
...
...
@@ -2024,7 +1344,6 @@ int s1ap_eNB_handle_e_rab_release_command(uint32_t assoc_id,
if
((
ue_desc_p
=
s1ap_eNB_get_ue_context
(
mme_desc_p
->
s1ap_eNB_instance
,
enb_ue_s1ap_id
))
==
NULL
)
{
>>>>>>>
origin
/
develop
S1AP_ERROR
(
"[SCTP %d] Received E-RAB release command for non existing UE context 0x%06lx
\n
"
,
assoc_id
,
ie
->
value
.
choice
.
ENB_UE_S1AP_ID
);
return
-
1
;
...
...
@@ -2038,24 +1357,7 @@ int s1ap_eNB_handle_e_rab_release_command(uint32_t assoc_id,
}
ue_desc_p
->
rx_stream
=
stream
;
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_E_RABReleaseCommandIEs_t
,
ie
,
container
,
S1AP_ProtocolIE_ID_id_MME_UE_S1AP_ID
,
TRUE
);
<<<<<<<
HEAD
if
(
ue_desc_p
->
mme_ue_s1ap_id
!=
ie
->
value
.
choice
.
MME_UE_S1AP_ID
)
{
S1AP_WARN
(
"UE context mme_ue_s1ap_id is different form that of the message (%d != %ld)"
,
ue_desc_p
->
mme_ue_s1ap_id
,
ie
->
value
.
choice
.
MME_UE_S1AP_ID
);
}
S1AP_DEBUG
(
"[SCTP %d] Received E-RAB release command for eNB_UE_S1AP_ID %ld mme_ue_s1ap_id %ld
\n
"
,
assoc_id
,
enb_ue_s1ap_id
,
ie
->
value
.
choice
.
MME_UE_S1AP_ID
);
message_p
=
itti_alloc_new_message
(
TASK_S1AP
,
S1AP_E_RAB_RELEASE_COMMAND
);
S1AP_E_RAB_RELEASE_COMMAND
(
message_p
).
eNB_ue_s1ap_id
=
enb_ue_s1ap_id
;
S1AP_E_RAB_RELEASE_COMMAND
(
message_p
).
mme_ue_s1ap_id
=
ie
->
value
.
choice
.
MME_UE_S1AP_ID
;
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_E_RABReleaseCommandIEs_t
,
ie
,
container
,
S1AP_ProtocolIE_ID_id_NAS_PDU
,
FALSE
);
=======
if
(
ue_desc_p
->
mme_ue_s1ap_id
!=
mme_ue_s1ap_id
)
{
S1AP_WARN
(
"UE context mme_ue_s1ap_id is different form that of the message (%d != %ld)"
,
ue_desc_p
->
mme_ue_s1ap_id
,
mme_ue_s1ap_id
);
...
...
@@ -2071,7 +1373,6 @@ int s1ap_eNB_handle_e_rab_release_command(uint32_t assoc_id,
/* id-NAS-PDU */
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_E_RABReleaseCommandIEs_t
,
ie
,
container
,
S1AP_ProtocolIE_ID_id_NAS_PDU
,
false
);
>>>>>>>
origin
/
develop
if
(
ie
&&
ie
->
value
.
choice
.
NAS_PDU
.
size
>
0
)
{
S1AP_E_RAB_RELEASE_COMMAND
(
message_p
).
nas_pdu
.
length
=
ie
->
value
.
choice
.
NAS_PDU
.
size
;
S1AP_E_RAB_RELEASE_COMMAND
(
message_p
).
nas_pdu
.
buffer
=
...
...
@@ -2084,14 +1385,9 @@ int s1ap_eNB_handle_e_rab_release_command(uint32_t assoc_id,
S1AP_E_RAB_RELEASE_COMMAND
(
message_p
).
nas_pdu
.
buffer
=
NULL
;
}
<<<<<<<
HEAD
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_E_RABReleaseCommandIEs_t
,
ie
,
container
,
S1AP_ProtocolIE_ID_id_E_RABToBeReleasedList
,
TRUE
);
=======
/* id-E-RABToBeReleasedList */
S1AP_FIND_PROTOCOLIE_BY_ID
(
S1AP_E_RABReleaseCommandIEs_t
,
ie
,
container
,
S1AP_ProtocolIE_ID_id_E_RABToBeReleasedList
,
true
);
>>>>>>>
origin
/
develop
S1AP_E_RAB_RELEASE_COMMAND
(
message_p
).
nb_e_rabs_torelease
=
ie
->
value
.
choice
.
E_RABList
.
list
.
count
;
for
(
i
=
0
;
i
<
ie
->
value
.
choice
.
E_RABList
.
list
.
count
;
i
++
)
{
...
...
@@ -2102,5 +1398,6 @@ int s1ap_eNB_handle_e_rab_release_command(uint32_t assoc_id,
}
itti_send_msg_to_task
(
TASK_RRC_ENB
,
ue_desc_p
->
eNB_instance
->
instance
,
message_p
);
return
0
;
}
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