Commit 21a252a2 authored by Robert Schmidt's avatar Robert Schmidt

Generate and build M3AP ASN.1 during build time

parent 2c79b0a4
......@@ -454,50 +454,10 @@ target_link_libraries(m2ap PRIVATE lte_rrc nr_rrc)
target_include_directories(m2ap PRIVATE "${M2AP_DIR}")
#M3AP
# Same limitation as described in RRC/S1AP: unknown generated file list
# so we generate it at cmake time
##############
add_list1_option(M3AP_RELEASE R14 "M3AP ASN.1 grammar version" R14)
set(M3AP_DIR ${OPENAIR3_DIR}/M3AP)
if (${M3AP_RELEASE} STREQUAL "R8")
make_version(M3AP_VERSION 8 9 0)
set(M3AP_ASN_FILES m3ap-8.9.0.asn1)
elseif (${M3AP_RELEASE} STREQUAL "R11")
make_version(M3AP_VERSION 11 9 0)
set(M3AP_ASN_FILES m3ap-11.9.0.asn1)
elseif (${M3AP_RELEASE} STREQUAL "R12")
make_version(M3AP_VERSION 12 9 0)
set(M3AP_ASN_FILES m3ap-12.9.0.asn1)
elseif (${M3AP_RELEASE} STREQUAL "R14")
make_version(M3AP_VERSION 14 0 0)
set(M3AP_ASN_FILES m3ap-14.0.0.asn1)
elseif (${M3AP_RELEASE} STREQUAL "R15")
make_version(M3AP_VERSION 15 1 0)
set(M3AP_ASN_FILES m3ap-15.1.0.asn1)
endif(${M3AP_RELEASE} STREQUAL "R8")
add_definitions(-DM3AP_VERSION=${M3AP_VERSION})
set(M3AP_ASN_DIR ${M3AP_DIR}/MESSAGES/ASN1/${M3AP_RELEASE})
set(M3AP_C_DIR ${asn1_generated_dir}/M3AP_${M3AP_RELEASE})
# Warning: if you modify ASN.1 source file to generate new C files, cmake should be re-run instead of make
set(m3_cmd ${OPENAIR_CMAKE}/tools/make_asn1c_includes.sh "M3AP_" -fno-include-deps "${M3AP_C_DIR}")
compile_asn1("${M3AP_ASN_DIR}/${M3AP_ASN_FILES}" "${m3_cmd}" m3_flag)
file(GLOB M3AP_source ${M3AP_C_DIR}/*.c)
add_library(M3AP_LIB
${M3AP_source}
add_library(m3ap
${M3AP_DIR}/m3ap_common.c
)
add_dependencies(M3AP_LIB m3_flag)
target_link_libraries(M3AP_LIB PRIVATE asn1_nr_rrc asn1_lte_rrc)
include_directories ("${M3AP_C_DIR}")
include_directories ("${M3AP_DIR}")
add_library(M3AP_ENB
${M3AP_DIR}/m3ap_decoder.c
${M3AP_DIR}/m3ap_encoder.c
${M3AP_DIR}/m3ap_MCE_handler.c
......@@ -511,10 +471,11 @@ add_library(M3AP_ENB
${M3AP_DIR}/m3ap_itti_messaging.c
${M3AP_DIR}/m3ap_ids.c
${M3AP_DIR}/m3ap_timers.c
)
add_dependencies(M3AP_ENB m3_flag)
target_link_libraries(M3AP_ENB PRIVATE asn1_nr_rrc asn1_lte_rrc)
)
target_link_libraries(m3ap PUBLIC asn1_m3ap)
target_link_libraries(m3ap PRIVATE m2ap)
target_link_libraries(m3ap PRIVATE asn1_nr_rrc asn1_lte_rrc)
target_include_directories(m3ap PUBLIC "${M3AP_DIR}")
#X2AP
##############
......@@ -1754,7 +1715,6 @@ add_library(L2
${ENB_APP_SRC}
${MCE_APP_SRC}
)
add_dependencies(L2 m3_flag)
target_link_libraries(L2 PRIVATE f1ap x2ap s1ap lte_rrc m2ap)
target_link_libraries(L2 PRIVATE asn1_nr_rrc asn1_lte_rrc)
......@@ -1836,8 +1796,7 @@ set (MME_APP_SRC
${OPENAIR3_DIR}/MME_APP/mme_config.c
)
add_library(MME_APP ${MME_APP_SRC})
add_dependencies(MME_APP m3_flag)
target_link_libraries(MME_APP PRIVATE m2ap)
target_link_libraries(MME_APP PRIVATE m2ap m3ap)
target_link_libraries(MME_APP PRIVATE asn1_nr_rrc asn1_lte_rrc)
set(SCTP_SRC
......@@ -2369,7 +2328,7 @@ add_dependencies(lte-softmodem oai_iqplayer)
target_link_libraries(lte-softmodem PRIVATE
-Wl,--start-group
lte_rrc nr_rrc s1ap m2ap x2ap M3AP_LIB M3AP_ENB GTPV1U f1ap SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP SCHED_LIB SCHED_RU_LIB
lte_rrc nr_rrc s1ap m2ap x2ap m3ap GTPV1U f1ap SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP SCHED_LIB SCHED_RU_LIB
PHY_COMMON PHY PHY_RU L2 L2_LTE NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB MISC_NFAPI_LTE_LIB
${RAL_LIB} ${NAS_UE_LIB} ITTI
-Wl,--end-group z dl)
......@@ -2409,7 +2368,7 @@ add_dependencies(ocp-enb oai_iqplayer coding params_libconfig rfsimulator)
target_link_libraries (ocp-enb
-Wl,--start-group
lte_rrc nr_rrc s1ap f1ap m2ap x2ap M3AP_LIB M3AP_ENB GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP SCHED_LIB SCHED_RU_LIB
lte_rrc nr_rrc s1ap f1ap m2ap x2ap m3ap GTPV1U SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP SCHED_LIB SCHED_RU_LIB
PHY_COMMON PHY PHY_RU L2 L2_LTE NFAPI_COMMON_LIB NFAPI_LIB MISC_NFAPI_LTE_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB SIMU_COMMON
${RAL_LIB} ${NAS_UE_LIB} ITTI
-Wl,--end-group z dl)
......@@ -2465,7 +2424,7 @@ if (NOT ${NOS1})
endif()
target_link_libraries(lte-uesoftmodem PRIVATE
-Wl,--start-group
lte_rrc nr_rrc s1ap x2ap m2ap M3AP_LIB M3AP_ENB
lte_rrc nr_rrc s1ap x2ap m2ap m3ap
SECU_CN SECU_OSA UTIL HASHTABLE SCTP_CLIENT MME_APP SCHED_RU_LIB SCHED_UE_LIB PHY_COMMON
PHY_UE PHY_RU L2_UE L2_LTE SIMU_COMMON SIMU NFAPI_COMMON_LIB NFAPI_LIB NFAPI_PNF_LIB NFAPI_USER_LIB MISC_NFAPI_LTE_LIB
${RAL_LIB} ${NAS_UE_LIB} ITTI ${ATLAS_LIBRARIES}
......@@ -2509,7 +2468,7 @@ target_link_libraries(nr-softmodem PRIVATE
UTIL HASHTABLE SCTP_CLIENT SCHED_LIB SCHED_RU_LIB SCHED_NR_LIB PHY_NR PHY PHY_COMMON PHY_NR_COMMON PHY_RU GTPV1U SECU_CN SECU_OSA
ITTI ${RAL_LIB} ${NAS_UE_LIB} lte_rrc nr_rrc
ngap s1ap L2_LTE_NR L2_NR MAC_NR_COMMON NFAPI_COMMON_LIB NFAPI_LIB NFAPI_VNF_LIB NFAPI_PNF_LIB NFAPI_USER_LIB
x2ap f1ap m2ap M3AP_LIB M3AP_ENB
x2ap f1ap m2ap m3ap
-Wl,--end-group z dl)
target_link_libraries(nr-softmodem PRIVATE ${LIBXML2_LIBRARIES})
......@@ -2806,7 +2765,7 @@ if (${T_TRACER})
syncsim nr_ulsim nr_dlsim nr_dlschsim nr_pbchsim nr_pucchsim
nr_ulschsim ldpctest polartest smallblocktest cu_test du_test
#all "add_library" definitions
ITTI lte_rrc nr_rrc s1ap x2ap m2ap M3AP_LIB M3AP_ENB f1ap
ITTI lte_rrc nr_rrc s1ap x2ap m2ap m3ap f1ap
params_libconfig oai_usrpdevif oai_bladerfdevif oai_lmssdrdevif oai_iqplayer
oai_eth_transpro oai_mobipass coding HASHTABLE UTIL OMG_SUMO
SECU_OSA SECU_CN SCHED_LIB SCHED_NR_LIB SCHED_RU_LIB SCHED_UE_LIB SCHED_NR_UE_LIB default_sched remote_sched RAL
......
add_subdirectory(M3AP)
add_subdirectory(S1AP)
add_subdirectory(NGAP)
add_subdirectory(MESSAGES)
-- M3AP-PDU-Descriptions.asn
--
-- 3GPP TS 36.444 V13.2.0 (2016-03)
-- http://www.3gpp.org/ftp/Specs/archive/36_series/36.444/36444-d20.zip
--
-- 9.3.3 Elementary Procedure Definitions
--
-- **************************************************************
--
-- Elementary Procedure definitions
--
-- **************************************************************
M3AP-PDU-Descriptions {
itu-t (0) identified-organization (4) etsi (0) mobileDomain (0)
eps-Access (21) modules (3) m3ap (5) version1 (1) m3ap-PDU-Descriptions (0) }
DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
-- **************************************************************
--
-- IE parameter types from other modules.
--
-- **************************************************************
IMPORTS
Criticality,
ProcedureCode
FROM M3AP-CommonDataTypes
MBMSSessionStartRequest,
MBMSSessionStartResponse,
MBMSSessionStartFailure,
MBMSSessionStopRequest,
MBMSSessionStopResponse,
MBMSSessionUpdateRequest,
MBMSSessionUpdateResponse,
MBMSSessionUpdateFailure,
MCEConfigurationUpdate,
MCEConfigurationUpdateAcknowledge,
MCEConfigurationUpdateFailure,
M3SetupRequest,
M3SetupResponse,
M3SetupFailure,
ErrorIndication,
Reset,
ResetAcknowledge,
PrivateMessage
FROM M3AP-PDU-Contents
id-mBMSsessionStart,
id-mBMSsessionStop,
id-mBMSsessionUpdate,
id-mCEConfigurationUpdate,
id-m3Setup,
id-errorIndication,
id-Reset,
id-privateMessage
FROM M3AP-Constants;
-- **************************************************************
--
-- Interface Elementary Procedure Class
--
-- **************************************************************
M3AP-ELEMENTARY-PROCEDURE ::= CLASS {
&InitiatingMessage ,
&SuccessfulOutcome OPTIONAL,
&UnsuccessfulOutcome OPTIONAL,
&procedureCode ProcedureCode UNIQUE,
&criticality Criticality DEFAULT ignore
}
WITH SYNTAX {
INITIATING MESSAGE &InitiatingMessage
[SUCCESSFUL OUTCOME &SuccessfulOutcome]
[UNSUCCESSFUL OUTCOME &UnsuccessfulOutcome]
PROCEDURE CODE &procedureCode
[CRITICALITY &criticality]
}
-- **************************************************************
--
-- Interface PDU Definition
--
-- **************************************************************
M3AP-PDU ::= CHOICE {
initiatingMessage InitiatingMessage,
successfulOutcome SuccessfulOutcome,
unsuccessfulOutcome UnsuccessfulOutcome,
...
}
InitiatingMessage ::= SEQUENCE {
procedureCode M3AP-ELEMENTARY-PROCEDURE.&procedureCode ({M3AP-ELEMENTARY-PROCEDURES}),
criticality M3AP-ELEMENTARY-PROCEDURE.&criticality ({M3AP-ELEMENTARY-PROCEDURES}{@procedureCode}),
value M3AP-ELEMENTARY-PROCEDURE.&InitiatingMessage ({M3AP-ELEMENTARY-PROCEDURES}{@procedureCode})
}
SuccessfulOutcome ::= SEQUENCE {
procedureCode M3AP-ELEMENTARY-PROCEDURE.&procedureCode ({M3AP-ELEMENTARY-PROCEDURES}),
criticality M3AP-ELEMENTARY-PROCEDURE.&criticality ({M3AP-ELEMENTARY-PROCEDURES}{@procedureCode}),
value M3AP-ELEMENTARY-PROCEDURE.&SuccessfulOutcome ({M3AP-ELEMENTARY-PROCEDURES}{@procedureCode})
}
UnsuccessfulOutcome ::= SEQUENCE {
procedureCode M3AP-ELEMENTARY-PROCEDURE.&procedureCode ({M3AP-ELEMENTARY-PROCEDURES}),
criticality M3AP-ELEMENTARY-PROCEDURE.&criticality ({M3AP-ELEMENTARY-PROCEDURES}{@procedureCode}),
value M3AP-ELEMENTARY-PROCEDURE.&UnsuccessfulOutcome ({M3AP-ELEMENTARY-PROCEDURES}{@procedureCode})
}
-- **************************************************************
--
-- Interface Elementary Procedure List
--
-- **************************************************************
M3AP-ELEMENTARY-PROCEDURES M3AP-ELEMENTARY-PROCEDURE ::= {
M3AP-ELEMENTARY-PROCEDURES-CLASS-1 |
M3AP-ELEMENTARY-PROCEDURES-CLASS-2 ,
...
}
M3AP-ELEMENTARY-PROCEDURES-CLASS-1 M3AP-ELEMENTARY-PROCEDURE ::= {
mBMSsessionStart |
mBMSsessionStop |
mBMSsessionUpdate |
reset |
m3Setup |
mCEConfigurationUpdate ,
...
}
M3AP-ELEMENTARY-PROCEDURES-CLASS-2 M3AP-ELEMENTARY-PROCEDURE ::= {
errorIndication |
privateMessage ,
...
}
-- **************************************************************
--
-- Interface Elementary Procedures
--
-- **************************************************************
mBMSsessionStart M3AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE MBMSSessionStartRequest
SUCCESSFUL OUTCOME MBMSSessionStartResponse
UNSUCCESSFUL OUTCOME MBMSSessionStartFailure
PROCEDURE CODE id-mBMSsessionStart
CRITICALITY reject
}
mBMSsessionStop M3AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE MBMSSessionStopRequest
SUCCESSFUL OUTCOME MBMSSessionStopResponse
PROCEDURE CODE id-mBMSsessionStop
CRITICALITY reject
}
mBMSsessionUpdate M3AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE MBMSSessionUpdateRequest
SUCCESSFUL OUTCOME MBMSSessionUpdateResponse
UNSUCCESSFUL OUTCOME MBMSSessionUpdateFailure
PROCEDURE CODE id-mBMSsessionUpdate
CRITICALITY reject
}
errorIndication M3AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE ErrorIndication
PROCEDURE CODE id-errorIndication
CRITICALITY ignore
}
reset M3AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE Reset
SUCCESSFUL OUTCOME ResetAcknowledge
PROCEDURE CODE id-Reset
CRITICALITY reject
}
privateMessage M3AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE PrivateMessage
PROCEDURE CODE id-privateMessage
CRITICALITY ignore
}
mCEConfigurationUpdate M3AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE MCEConfigurationUpdate
SUCCESSFUL OUTCOME MCEConfigurationUpdateAcknowledge
UNSUCCESSFUL OUTCOME MCEConfigurationUpdateFailure
PROCEDURE CODE id-mCEConfigurationUpdate
CRITICALITY reject
}
m3Setup M3AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE M3SetupRequest
SUCCESSFUL OUTCOME M3SetupResponse
UNSUCCESSFUL OUTCOME M3SetupFailure
PROCEDURE CODE id-m3Setup
CRITICALITY reject
}
END
-- M3AP-PDU-Contents.asn
--
-- 3GPP TS 36.444 V13.2.0 (2016-03)
-- http://www.3gpp.org/ftp/Specs/archive/36_series/36.444/36444-d20.zip
--
-- 9.3.4 PDU Definitions
--
-- **************************************************************
--
-- PDU definitions for M3AP.
--
-- **************************************************************
M3AP-PDU-Contents {
itu-t (0) identified-organization (4) etsi (0) mobileDomain (0)
eps-Access (21) modules (3) m3ap (5) version1 (1) m3ap-PDU-Contents (1) }
DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
-- **************************************************************
--
-- IE parameter types from other modules.
--
-- **************************************************************
IMPORTS
Absolute-Time-ofMBMS-Data,
Cause,
CriticalityDiagnostics,
Global-MCE-ID,
MBMS-E-RAB-QoS-Parameters,
MBMS-Service-associatedLogicalM3-ConnectionItem,
MBMS-Service-Area,
MBMSServiceArea1,
MBMS-Session-Duration,
MBMS-Session-ID,
MCE-MBMS-M3AP-ID,
MCEname,
MinimumTimeToMBMSDataTransfer,
MME-MBMS-M3AP-ID,
TimeToWait,
TMGI,
TNL-Information,
Reestablishment,
MBMS-Cell-List
FROM M3AP-IEs
PrivateIE-Container{},
ProtocolExtensionContainer{},
ProtocolIE-Container{},
ProtocolIE-ContainerList{},
ProtocolIE-ContainerPair{},
ProtocolIE-ContainerPairList{},
ProtocolIE-Single-Container{},
M3AP-PRIVATE-IES,
M3AP-PROTOCOL-EXTENSION,
M3AP-PROTOCOL-IES,
M3AP-PROTOCOL-IES-PAIR
FROM M3AP-Containers
id-AllocationAndRetentionPriority,
id-MCE-MBMS-M3AP-ID,
id-MME-MBMS-M3AP-ID,
id-TMGI,
id-MBMS-Session-ID,
id-MBMS-E-RAB-QoS-Parameters,
id-MBMS-Session-Duration,
id-MBMS-Service-Area,
id-TNL-Information,
id-Alternative-TNL-Information,
id-CriticalityDiagnostics,
id-Cause,
id-MBMS-Service-Area-List,
id-MBMS-Service-Area-List-Item,
id-TimeToWait,
id-ResetType,
id-MBMS-Service-associatedLogicalM3-ConnectionItem,
id-MBMS-Service-associatedLogicalM3-ConnectionListResAck,
id-MBMSServiceAreaList,
id-MinimumTimeToMBMSDataTransfer,
id-Time-ofMBMS-DataStop,
id-Time-ofMBMS-DataTransfer,
id-Global-MCE-ID,
id-MCEname,
id-Reestablishment,
id-MBMS-Cell-List,
maxnoofMBMSServiceAreaIdentitiesPerMCE,
maxnooferrors,
maxNrOfIndividualM3ConnectionsToReset
FROM M3AP-Constants;
-- **************************************************************
--
-- MBMS SESSION START REQUEST
--
-- **************************************************************
MBMSSessionStartRequest ::= SEQUENCE {
protocolIEs ProtocolIE-Container {{MBMSSessionStartRequest-IEs}},
...
}
MBMSSessionStartRequest-IEs M3AP-PROTOCOL-IES ::= {
{ ID id-MME-MBMS-M3AP-ID CRITICALITY reject TYPE MME-MBMS-M3AP-ID PRESENCE mandatory}|
{ ID id-TMGI CRITICALITY reject TYPE TMGI PRESENCE mandatory}|
{ ID id-MBMS-Session-ID CRITICALITY ignore TYPE MBMS-Session-ID PRESENCE optional}|
{ ID id-MBMS-E-RAB-QoS-Parameters CRITICALITY reject TYPE MBMS-E-RAB-QoS-Parameters PRESENCE mandatory}|
{ ID id-MBMS-Session-Duration CRITICALITY reject TYPE MBMS-Session-Duration PRESENCE mandatory}|
{ ID id-MBMS-Service-Area CRITICALITY reject TYPE MBMS-Service-Area PRESENCE mandatory}|
{ ID id-MinimumTimeToMBMSDataTransfer CRITICALITY reject TYPE MinimumTimeToMBMSDataTransfer PRESENCE mandatory}|
{ ID id-TNL-Information CRITICALITY reject TYPE TNL-Information PRESENCE mandatory}|
{ ID id-Time-ofMBMS-DataTransfer CRITICALITY ignore TYPE Absolute-Time-ofMBMS-Data PRESENCE optional}|
{ ID id-Reestablishment CRITICALITY ignore TYPE Reestablishment PRESENCE optional}|
{ ID id-Alternative-TNL-Information CRITICALITY ignore TYPE TNL-Information PRESENCE optional}|
{ ID id-MBMS-Cell-List CRITICALITY reject TYPE MBMS-Cell-List PRESENCE optional},
...
}
-- **************************************************************
--
-- MBMS SESSION START RESPONSE
--
-- **************************************************************
MBMSSessionStartResponse ::= SEQUENCE {
protocolIEs ProtocolIE-Container {{ MBMSSessionStartResponse-IEs}},
...
}
MBMSSessionStartResponse-IEs M3AP-PROTOCOL-IES ::= {
{ ID id-MME-MBMS-M3AP-ID CRITICALITY ignore TYPE MME-MBMS-M3AP-ID PRESENCE mandatory } |
{ ID id-MCE-MBMS-M3AP-ID CRITICALITY ignore TYPE MCE-MBMS-M3AP-ID PRESENCE mandatory } |
{ ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional },
...
}
-- **************************************************************
--
-- MBMS SESSION START FAILURE
--
-- **************************************************************
MBMSSessionStartFailure ::= SEQUENCE {
protocolIEs ProtocolIE-Container {{ MBMSSessionStartFailure-IEs}},
...
}
MBMSSessionStartFailure-IEs M3AP-PROTOCOL-IES ::= {
{ ID id-MME-MBMS-M3AP-ID CRITICALITY ignore TYPE MME-MBMS-M3AP-ID PRESENCE mandatory } |
{ ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory } |
{ ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional },
...
}
-- **************************************************************
--
-- MBMS SESSION STOP REQUEST
--
-- **************************************************************
MBMSSessionStopRequest ::= SEQUENCE {
protocolIEs ProtocolIE-Container {{MBMSSessionStopRequest-IEs}},
...
}
MBMSSessionStopRequest-IEs M3AP-PROTOCOL-IES ::= {
{ ID id-MME-MBMS-M3AP-ID CRITICALITY reject TYPE MME-MBMS-M3AP-ID PRESENCE mandatory}|
{ ID id-MCE-MBMS-M3AP-ID CRITICALITY reject TYPE MCE-MBMS-M3AP-ID PRESENCE mandatory}|
{ ID id-Time-ofMBMS-DataStop CRITICALITY ignore TYPE Absolute-Time-ofMBMS-Data PRESENCE optional},
...
}
-- **************************************************************
--
-- MBMS SESSION STOP RESPONSE
--
-- **************************************************************
MBMSSessionStopResponse ::= SEQUENCE {
protocolIEs ProtocolIE-Container {{ MBMSSessionStopResponse-IEs}},
...
}
MBMSSessionStopResponse-IEs M3AP-PROTOCOL-IES ::= {
{ ID id-MME-MBMS-M3AP-ID CRITICALITY ignore TYPE MME-MBMS-M3AP-ID PRESENCE mandatory } |
{ ID id-MCE-MBMS-M3AP-ID CRITICALITY ignore TYPE MCE-MBMS-M3AP-ID PRESENCE mandatory } |
{ ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional } ,
...
}
-- **************************************************************
--
-- MBMS SESSION UPDATE REQUEST
--
-- **************************************************************
MBMSSessionUpdateRequest ::= SEQUENCE {
protocolIEs ProtocolIE-Container {{MBMSSessionUpdateRequest-IEs}},
...
}
MBMSSessionUpdateRequest-IEs M3AP-PROTOCOL-IES ::= {
{ ID id-MME-MBMS-M3AP-ID CRITICALITY reject TYPE MME-MBMS-M3AP-ID PRESENCE mandatory}|
{ ID id-MCE-MBMS-M3AP-ID CRITICALITY reject TYPE MCE-MBMS-M3AP-ID PRESENCE mandatory}|
{ ID id-TMGI CRITICALITY reject TYPE TMGI PRESENCE mandatory}|
{ ID id-MBMS-Session-ID CRITICALITY ignore TYPE MBMS-Session-ID PRESENCE optional}|
{ ID id-MBMS-E-RAB-QoS-Parameters CRITICALITY reject TYPE MBMS-E-RAB-QoS-Parameters PRESENCE mandatory}|
{ ID id-MBMS-Session-Duration CRITICALITY reject TYPE MBMS-Session-Duration PRESENCE mandatory}|
{ ID id-MBMS-Service-Area CRITICALITY ignore TYPE MBMS-Service-Area PRESENCE optional}|
{ ID id-MinimumTimeToMBMSDataTransfer CRITICALITY reject TYPE MinimumTimeToMBMSDataTransfer PRESENCE mandatory}|
{ ID id-TNL-Information CRITICALITY ignore TYPE TNL-Information PRESENCE optional}|
{ ID id-Time-ofMBMS-DataTransfer CRITICALITY ignore TYPE Absolute-Time-ofMBMS-Data PRESENCE optional}|
{ ID id-MBMS-Cell-List CRITICALITY reject TYPE MBMS-Cell-List PRESENCE optional},
...
}
-- **************************************************************
--
-- MBMS SESSION UPDATE RESPONSE
--
-- **************************************************************
MBMSSessionUpdateResponse ::= SEQUENCE {
protocolIEs ProtocolIE-Container {{ MBMSSessionUpdateResponse-IEs}},
...
}
MBMSSessionUpdateResponse-IEs M3AP-PROTOCOL-IES ::= {
{ ID id-MME-MBMS-M3AP-ID CRITICALITY ignore TYPE MME-MBMS-M3AP-ID PRESENCE mandatory } |
{ ID id-MCE-MBMS-M3AP-ID CRITICALITY ignore TYPE MCE-MBMS-M3AP-ID PRESENCE mandatory } |
{ ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional },
...
}
-- **************************************************************
--
-- MBMS SESSION UPDATE FAILURE
--
-- **************************************************************
MBMSSessionUpdateFailure ::= SEQUENCE {
protocolIEs ProtocolIE-Container {{ MBMSSessionUpdateFailure-IEs}},
...
}
MBMSSessionUpdateFailure-IEs M3AP-PROTOCOL-IES ::= {
{ ID id-MME-MBMS-M3AP-ID CRITICALITY ignore TYPE MME-MBMS-M3AP-ID PRESENCE mandatory } |
{ ID id-MCE-MBMS-M3AP-ID CRITICALITY ignore TYPE MCE-MBMS-M3AP-ID PRESENCE mandatory } |
{ ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory } |
{ ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional },
...
}
-- **************************************************************
--
-- ERROR INDICATION
--
-- **************************************************************
ErrorIndication ::= SEQUENCE {
protocolIEs ProtocolIE-Container {{ErrorIndication-IEs}},
...
}
ErrorIndication-IEs M3AP-PROTOCOL-IES ::= {
{ ID id-MME-MBMS-M3AP-ID CRITICALITY ignore TYPE MME-MBMS-M3AP-ID PRESENCE optional } |
{ ID id-MCE-MBMS-M3AP-ID CRITICALITY ignore TYPE MCE-MBMS-M3AP-ID PRESENCE optional } |
{ ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE optional } |
{ ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional } ,
...
}
-- **************************************************************
--
-- Reset
--
-- **************************************************************
Reset ::= SEQUENCE {
protocolIEs ProtocolIE-Container { {ResetIEs} },
...
}
ResetIEs M3AP-PROTOCOL-IES ::= {
{ ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory }|
{ ID id-ResetType CRITICALITY reject TYPE ResetType PRESENCE mandatory },
...
}
ResetType ::= CHOICE {
m3-Interface ResetAll,
partOfM3-Interface MBMS-Service-associatedLogicalM3-ConnectionListRes,
...
}
ResetAll ::= ENUMERATED {
reset-all,
...
}
MBMS-Service-associatedLogicalM3-ConnectionListRes ::= SEQUENCE (SIZE(1.. maxNrOfIndividualM3ConnectionsToReset)) OF ProtocolIE-Single-Container { { MBMS-Service-associatedLogicalM3-ConnectionItemRes } }
MBMS-Service-associatedLogicalM3-ConnectionItemRes M3AP-PROTOCOL-IES ::= {
{ ID id-MBMS-Service-associatedLogicalM3-ConnectionItem CRITICALITY reject TYPE MBMS-Service-associatedLogicalM3-ConnectionItem PRESENCE mandatory },
...
}
-- **************************************************************
--
-- Reset Acknowledge
--
-- **************************************************************
ResetAcknowledge ::= SEQUENCE {
protocolIEs ProtocolIE-Container { {ResetAcknowledgeIEs} },
...
}
ResetAcknowledgeIEs M3AP-PROTOCOL-IES ::= {
{ ID id-MBMS-Service-associatedLogicalM3-ConnectionListResAck CRITICALITY ignore TYPE MBMS-Service-associatedLogicalM3-ConnectionListResAck PRESENCE optional }|
{ ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional },
...
}
MBMS-Service-associatedLogicalM3-ConnectionListResAck ::= SEQUENCE (SIZE(1.. maxNrOfIndividualM3ConnectionsToReset)) OF ProtocolIE-Single-Container { { MBMS-Service-associatedLogicalM3-ConnectionItemResAck } }
MBMS-Service-associatedLogicalM3-ConnectionItemResAck M3AP-PROTOCOL-IES ::= {
{ ID id-MBMS-Service-associatedLogicalM3-ConnectionItem CRITICALITY ignore TYPE MBMS-Service-associatedLogicalM3-ConnectionItem PRESENCE mandatory },
...
}
-- **************************************************************
--
-- PRIVATE MESSAGE
--
-- **************************************************************
PrivateMessage ::= SEQUENCE {
privateIEs PrivateIE-Container {{PrivateMessage-IEs}},
...
}
PrivateMessage-IEs M3AP-PRIVATE-IES ::= {
...
}
-- **************************************************************
--
-- M3 SETUP ELEMENTARY PROCEDURE
--
-- **************************************************************
-- **************************************************************
--
-- M3 Setup Request
--
-- **************************************************************
M3SetupRequest ::= SEQUENCE {
protocolIEs ProtocolIE-Container { {M3SetupRequestIEs} },
...
}
M3SetupRequestIEs M3AP-PROTOCOL-IES ::= {
{ ID id-Global-MCE-ID CRITICALITY reject TYPE Global-MCE-ID PRESENCE mandatory}|
{ ID id-MCEname CRITICALITY ignore TYPE MCEname PRESENCE optional}|
{ ID id-MBMSServiceAreaList CRITICALITY reject TYPE MBMSServiceAreaListItem PRESENCE mandatory},
...
}
MBMSServiceAreaListItem ::= SEQUENCE (SIZE(1..maxnoofMBMSServiceAreaIdentitiesPerMCE)) OF MBMSServiceArea1
-- **************************************************************
--
-- M3 Setup Response
--
-- **************************************************************
M3SetupResponse ::= SEQUENCE {
protocolIEs ProtocolIE-Container { {M3SetupResponseIEs} },
...
}
M3SetupResponseIEs M3AP-PROTOCOL-IES ::= {
{ ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional},
...
}
-- **************************************************************
--
-- M3 Setup Failure
--
-- **************************************************************
M3SetupFailure ::= SEQUENCE {
protocolIEs ProtocolIE-Container { {M3SetupFailureIEs} },
...
}
M3SetupFailureIEs M3AP-PROTOCOL-IES ::= {
{ ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}|
{ ID id-TimeToWait CRITICALITY ignore TYPE TimeToWait PRESENCE optional}|
{ ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional},
...
}
-- **************************************************************
--
-- MCE CONFIGURATION UPDATE ELEMENTARY PROCEDURE
--
-- **************************************************************
-- **************************************************************
--
-- MCE Configuration Update
--
-- **************************************************************
MCEConfigurationUpdate ::= SEQUENCE {
protocolIEs ProtocolIE-Container { {MCEConfigurationUpdateIEs} },
...
}
MCEConfigurationUpdateIEs M3AP-PROTOCOL-IES ::= {
{ ID id-Global-MCE-ID CRITICALITY reject TYPE Global-MCE-ID PRESENCE optional}|
{ ID id-MCEname CRITICALITY ignore TYPE MCEname PRESENCE optional}|
{ ID id-MBMSServiceAreaList CRITICALITY reject TYPE MBMSServiceAreaListItem PRESENCE optional},
...
}
-- **************************************************************
--
-- MCE Configuration Update Acknowledge
--
-- **************************************************************
MCEConfigurationUpdateAcknowledge ::= SEQUENCE {
protocolIEs ProtocolIE-Container { {MCEConfigurationUpdateAcknowledgeIEs} },
...
}
MCEConfigurationUpdateAcknowledgeIEs M3AP-PROTOCOL-IES ::= {
{ ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional },
...
}
-- **************************************************************
--
-- MCE Configuration Update Failure
--
-- **************************************************************
MCEConfigurationUpdateFailure ::= SEQUENCE {
protocolIEs ProtocolIE-Container { {MCEConfigurationUpdateFailureIEs} },
...
}
MCEConfigurationUpdateFailureIEs M3AP-PROTOCOL-IES ::= {
{ ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory}|
{ ID id-TimeToWait CRITICALITY ignore TYPE TimeToWait PRESENCE optional}|
{ ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional},
...
}
END
-- M3AP-IEs.asn
--
-- 3GPP TS 36.444 V13.2.0 (2016-03)
-- http://www.3gpp.org/ftp/Specs/archive/36_series/36.444/36444-d20.zip
--
-- 9.3.5 Information Element Definitions
--
-- **************************************************************
--
-- Information Element Definitions
--
-- **************************************************************
M3AP-IEs {
itu-t (0) identified-organization (4) etsi (0) mobileDomain (0)
eps-Access (21) modules (3) m3ap (5) version1 (1) m3ap-IEs (2) }
DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
IMPORTS
id-AllocationAndRetentionPriority,
maxnooferrors,
maxnoofCellsforMBMS
FROM M3AP-Constants
Criticality,
ProcedureCode,
ProtocolIE-ID,
TriggeringMessage
FROM M3AP-CommonDataTypes
ProtocolExtensionContainer{},
ProtocolIE-Single-Container{},
M3AP-PROTOCOL-EXTENSION,
M3AP-PROTOCOL-IES
FROM M3AP-Containers;
-- A
Absolute-Time-ofMBMS-Data ::= BIT STRING (SIZE (64))
AllocationAndRetentionPriority ::= SEQUENCE {
priorityLevel PriorityLevel,
pre-emptionCapability Pre-emptionCapability,
pre-emptionVulnerability Pre-emptionVulnerability,
iE-Extensions ProtocolExtensionContainer { {AllocationAndRetentionPriority-ExtIEs} } OPTIONAL
}
AllocationAndRetentionPriority-ExtIEs M3AP-PROTOCOL-EXTENSION ::= {
...
}
-- B
BitRate ::= INTEGER (0..10000000000)
-- C
Cause ::= CHOICE {
radioNetwork CauseRadioNetwork,
transport CauseTransport,
nAS CauseNAS,
protocol CauseProtocol,
misc CauseMisc,
...
}
CauseMisc ::= ENUMERATED {
control-processing-overload,
not-enough-user-plane-processing-resources,
hardware-failure,
om-intervention,
unspecified,
...
}
CauseNAS ::= ENUMERATED {
unspecified,
...
}
CauseProtocol ::= ENUMERATED {
transfer-syntax-error,
abstract-syntax-error-reject,
abstract-syntax-error-ignore-and-notify,
message-not-compatible-with-receiver-state,
semantic-error,
abstract-syntax-error-falsely-constructed-message,
unspecified,
...
}
CauseRadioNetwork ::= ENUMERATED {
unknown-or-already-allocated-MME-MBMS-M3AP-ID,
unknown-or-already-allocated-MCE-MBMS-M3AP-ID,
unknown-or-inconsistent-pair-of-MBMS-M3AP-IDs,
radio-resources-not-available,
invalid-QoS-combination,
interaction-with-other-procedure,
not-supported-QCI-value,
unspecified,
...,
uninvolved-MCE
}
CauseTransport ::= ENUMERATED {
transport-resource-unavailable,
unspecified,
...
}
CriticalityDiagnostics ::= SEQUENCE {
procedureCode ProcedureCode OPTIONAL,
triggeringMessage TriggeringMessage OPTIONAL,
procedureCriticality Criticality OPTIONAL,
iEsCriticalityDiagnostics CriticalityDiagnostics-IE-List OPTIONAL,
iE-Extensions ProtocolExtensionContainer { {CriticalityDiagnostics-ExtIEs} } OPTIONAL,
...
}
CriticalityDiagnostics-ExtIEs M3AP-PROTOCOL-EXTENSION ::= {
...
}
CriticalityDiagnostics-IE-List ::= SEQUENCE (SIZE (1..maxnooferrors)) OF
SEQUENCE {
iECriticality Criticality,
iE-ID ProtocolIE-ID,
typeOfError TypeOfError,
iE-Extensions ProtocolExtensionContainer { {CriticalityDiagnostics-IE-List-ExtIEs} } OPTIONAL,
...
}
CriticalityDiagnostics-IE-List-ExtIEs M3AP-PROTOCOL-EXTENSION ::= {
...
}
-- D
-- E
ECGI ::= SEQUENCE {
pLMN-Identity PLMN-Identity,
eUTRANcellIdentifier EUTRANCellIdentifier,
iE-Extensions ProtocolExtensionContainer { {ECGI-ExtIEs} } OPTIONAL,
...
}
ECGI-ExtIEs M3AP-PROTOCOL-EXTENSION ::= {
...
}
EUTRANCellIdentifier ::= BIT STRING (SIZE (28))
ExtendedMCE-ID ::= OCTET STRING (SIZE(1))
-- F
-- G
Global-MCE-ID ::= SEQUENCE {
pLMN-Identity PLMN-Identity,
mCE-ID MCE-ID,
extendedMCE-ID ExtendedMCE-ID OPTIONAL,
iE-Extensions ProtocolExtensionContainer { {GlobalMCE-ID-ExtIEs} } OPTIONAL,
...
}
GlobalMCE-ID-ExtIEs M3AP-PROTOCOL-EXTENSION ::= {
...
}
GBR-QosInformation ::= SEQUENCE {
mBMS-E-RAB-MaximumBitrateDL BitRate,
mBMS-E-RAB-GuaranteedBitrateDL BitRate,
iE-Extensions ProtocolExtensionContainer { { GBR-QosInformation-ExtIEs} } OPTIONAL,
...
}
GBR-QosInformation-ExtIEs M3AP-PROTOCOL-EXTENSION ::= {
...
}
GTP-TEID ::= OCTET STRING (SIZE (4))
-- H
-- I
IPAddress ::= OCTET STRING (SIZE(4..16, ...))
-- J
-- K
-- L
-- M
MBMS-Cell-List ::= SEQUENCE (SIZE(1.. maxnoofCellsforMBMS)) OF ECGI
MBMS-E-RAB-QoS-Parameters ::= SEQUENCE {
qCI QCI,
gbrQosInformation GBR-QosInformation OPTIONAL,
iE-Extensions ProtocolExtensionContainer { { MBMS-E-RAB-QoS-Parameters-ExtIEs} } OPTIONAL,
...
}
MBMS-E-RAB-QoS-Parameters-ExtIEs M3AP-PROTOCOL-EXTENSION ::= {
-- Extension for Release 10 ARP support --
{ID id-AllocationAndRetentionPriority CRITICALITY ignore EXTENSION AllocationAndRetentionPriority PRESENCE mandatory},
...
}
MBMS-Service-associatedLogicalM3-ConnectionItem ::= SEQUENCE {
mME-MBMS-M3AP-ID MME-MBMS-M3AP-ID OPTIONAL,
mCE-MBMS-M3AP-ID MCE-MBMS-M3AP-ID OPTIONAL,
iE-Extensions ProtocolExtensionContainer { { MBMS-Service-associatedLogicalM3-ConnectionItemExtIEs} } OPTIONAL,
...
}
MBMS-Service-associatedLogicalM3-ConnectionItemExtIEs M3AP-PROTOCOL-EXTENSION ::= {
...
}
MBMSServiceArea1 ::= OCTET STRING (SIZE (2))
MBMS-Service-Area ::= OCTET STRING
MBMS-Session-Duration ::= OCTET STRING (SIZE (3))
MBMS-Session-ID ::= OCTET STRING (SIZE (1))
MCE-MBMS-M3AP-ID ::= INTEGER (0..65535)
MCE-ID ::= OCTET STRING (SIZE(2))
MCEname ::= PrintableString (SIZE (1..150,...))
MinimumTimeToMBMSDataTransfer ::= OCTET STRING (SIZE (1))
MME-MBMS-M3AP-ID ::= INTEGER (0..65535)
-- N
-- O
-- P
Pre-emptionCapability ::= ENUMERATED {
shall-not-trigger-pre-emption,
may-trigger-pre-emption
}
Pre-emptionVulnerability ::= ENUMERATED {
not-pre-emptable,
pre-emptable
}
PriorityLevel ::= INTEGER { spare (0), highest (1), lowest (14), no-priority (15) } (0..15)
PLMN-Identity ::= OCTET STRING (SIZE(3))
-- Q
QCI ::= INTEGER (0..255)
-- R
Reestablishment ::= ENUMERATED {true, ...}
-- S
-- T
TimeToWait ::= ENUMERATED {v1s, v2s, v5s, v10s, v20s, v60s, ...}
TMGI ::= SEQUENCE {
pLMNidentity PLMN-Identity,
serviceID OCTET STRING (SIZE (3)),
iE-Extensions ProtocolExtensionContainer { {TMGI-ExtIEs} } OPTIONAL
}
TMGI-ExtIEs M3AP-PROTOCOL-EXTENSION ::= {
...
}
TNL-Information ::= SEQUENCE {
iPMCAddress IPAddress,
iPSourceAddress IPAddress,
gTP-DLTEID GTP-TEID,
iE-Extensions ProtocolExtensionContainer { {TNL-Information-ExtIEs} } OPTIONAL,
...
}
TNL-Information-ExtIEs M3AP-PROTOCOL-EXTENSION ::= {
...
}
TypeOfError ::= ENUMERATED {
not-understood,
missing,
...
}
-- U
-- V
-- W
-- X
-- Y
-- Z
END
-- M3AP-CommonDataTypes.asn
--
-- 3GPP TS 36.444 V13.2.0 (2016-03)
-- http://www.3gpp.org/ftp/Specs/archive/36_series/36.444/36444-d20.zip
--
-- 9.3.6 Common Definitions
--
-- **************************************************************
--
-- Common definitions
--
-- **************************************************************
M3AP-CommonDataTypes {
itu-t (0) identified-organization (4) etsi (0) mobileDomain (0)
eps-Access (21) modules (3) m3ap (5) version1 (1) m3ap-CommonDataTypes (3) }
DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
-- **************************************************************
--
-- Extension constants
--
-- **************************************************************
maxPrivateIEs INTEGER ::= 65535
maxProtocolExtensions INTEGER ::= 65535
maxProtocolIEs INTEGER ::= 65535
-- **************************************************************
--
-- Common Data Types
--
-- **************************************************************
Criticality ::= ENUMERATED { reject, ignore, notify }
Presence ::= ENUMERATED { optional, conditional, mandatory }
PrivateIE-ID ::= CHOICE {
local INTEGER (0.. maxPrivateIEs),
global OBJECT IDENTIFIER
}
ProcedureCode ::= INTEGER (0..255)
ProtocolIE-ID ::= INTEGER (0..maxProtocolIEs)
TriggeringMessage ::= ENUMERATED { initiating-message, successful-outcome, unsuccessful-outcome}
END
-- M3AP-Containers.asn
--
-- 3GPP TS 36.444 V13.2.0 (2016-03)
-- http://www.3gpp.org/ftp/Specs/archive/36_series/36.444/36444-d20.zip
--
-- 9.3.8 Container Definitions
--
-- **************************************************************
--
-- Container definitions
--
-- **************************************************************
M3AP-Containers {
itu-t (0) identified-organization (4) etsi (0) mobileDomain (0)
eps-Access (21) modules (3) m3ap (5) version1 (1) m3ap-Containers (5) }
DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
-- **************************************************************
--
-- IE parameter types from other modules.
--
-- **************************************************************
IMPORTS
maxPrivateIEs,
maxProtocolExtensions,
maxProtocolIEs,
Criticality,
Presence,
PrivateIE-ID,
ProtocolIE-ID
FROM M3AP-CommonDataTypes;
-- **************************************************************
--
-- Class Definition for Protocol IEs
--
-- **************************************************************
M3AP-PROTOCOL-IES ::= CLASS {
&id ProtocolIE-ID UNIQUE,
&criticality Criticality,
&Value,
&presence Presence
}
WITH SYNTAX {
ID &id
CRITICALITY &criticality
TYPE &Value
PRESENCE &presence
}
-- **************************************************************
--
-- Class Definition for Protocol IEs
--
-- **************************************************************
M3AP-PROTOCOL-IES-PAIR ::= CLASS {
&id ProtocolIE-ID UNIQUE,
&firstCriticality Criticality,
&FirstValue,
&secondCriticality Criticality,
&SecondValue,
&presence Presence
}
WITH SYNTAX {
ID &id
FIRST CRITICALITY &firstCriticality
FIRST TYPE &FirstValue
SECOND CRITICALITY &secondCriticality
SECOND TYPE &SecondValue
PRESENCE &presence
}
-- **************************************************************
--
-- Class Definition for Protocol Extensions
--
-- **************************************************************
M3AP-PROTOCOL-EXTENSION ::= CLASS {
&id ProtocolIE-ID UNIQUE,
&criticality Criticality,
&Extension,
&presence Presence
}
WITH SYNTAX {
ID &id
CRITICALITY &criticality
EXTENSION &Extension
PRESENCE &presence
}
-- **************************************************************
--
-- Class Definition for Private IEs
--
-- **************************************************************
M3AP-PRIVATE-IES ::= CLASS {
&id PrivateIE-ID,
&criticality Criticality,
&Value,
&presence Presence
}
WITH SYNTAX {
ID &id
CRITICALITY &criticality
TYPE &Value
PRESENCE &presence
}
-- **************************************************************
--
-- Container for Protocol IEs
--
-- **************************************************************
ProtocolIE-Container {M3AP-PROTOCOL-IES : IEsSetParam} ::=
SEQUENCE (SIZE (0..maxProtocolIEs)) OF
ProtocolIE-Field {{IEsSetParam}}
ProtocolIE-Single-Container {M3AP-PROTOCOL-IES : IEsSetParam} ::=
ProtocolIE-Field {{IEsSetParam}}
ProtocolIE-Field {M3AP-PROTOCOL-IES : IEsSetParam} ::= SEQUENCE {
id M3AP-PROTOCOL-IES.&id ({IEsSetParam}),
criticality M3AP-PROTOCOL-IES.&criticality ({IEsSetParam}{@id}),
value M3AP-PROTOCOL-IES.&Value ({IEsSetParam}{@id})
}
-- **************************************************************
--
-- Container for Protocol IE Pairs
--
-- **************************************************************
ProtocolIE-ContainerPair {M3AP-PROTOCOL-IES-PAIR : IEsSetParam} ::=
SEQUENCE (SIZE (0..maxProtocolIEs)) OF
ProtocolIE-FieldPair {{IEsSetParam}}
ProtocolIE-FieldPair {M3AP-PROTOCOL-IES-PAIR : IEsSetParam} ::= SEQUENCE {
id M3AP-PROTOCOL-IES-PAIR.&id ({IEsSetParam}),
firstCriticality M3AP-PROTOCOL-IES-PAIR.&firstCriticality ({IEsSetParam}{@id}),
firstValue M3AP-PROTOCOL-IES-PAIR.&FirstValue ({IEsSetParam}{@id}),
secondCriticality M3AP-PROTOCOL-IES-PAIR.&secondCriticality ({IEsSetParam}{@id}),
secondValue M3AP-PROTOCOL-IES-PAIR.&SecondValue ({IEsSetParam}{@id})
}
-- **************************************************************
--
-- Container Lists for Protocol IE Containers
--
-- **************************************************************
ProtocolIE-ContainerList {INTEGER : lowerBound, INTEGER : upperBound, M3AP-PROTOCOL-IES : IEsSetParam} ::=
SEQUENCE (SIZE (lowerBound..upperBound)) OF
ProtocolIE-Container {{IEsSetParam}}
ProtocolIE-ContainerPairList {INTEGER : lowerBound, INTEGER : upperBound, M3AP-PROTOCOL-IES-PAIR : IEsSetParam} ::=
SEQUENCE (SIZE (lowerBound..upperBound)) OF
ProtocolIE-ContainerPair {{IEsSetParam}}
-- **************************************************************
--
-- Container for Protocol Extensions
--
-- **************************************************************
ProtocolExtensionContainer {M3AP-PROTOCOL-EXTENSION : ExtensionSetParam} ::=
SEQUENCE (SIZE (1..maxProtocolExtensions)) OF
ProtocolExtensionField {{ExtensionSetParam}}
ProtocolExtensionField {M3AP-PROTOCOL-EXTENSION : ExtensionSetParam} ::= SEQUENCE {
id M3AP-PROTOCOL-EXTENSION.&id ({ExtensionSetParam}),
criticality M3AP-PROTOCOL-EXTENSION.&criticality ({ExtensionSetParam}{@id}),
extensionValue M3AP-PROTOCOL-EXTENSION.&Extension ({ExtensionSetParam}{@id})
}
-- **************************************************************
--
-- Container for Private IEs
--
-- **************************************************************
PrivateIE-Container {M3AP-PRIVATE-IES : IEsSetParam} ::=
SEQUENCE (SIZE (1..maxPrivateIEs)) OF
PrivateIE-Field {{IEsSetParam}}
PrivateIE-Field {M3AP-PRIVATE-IES : IEsSetParam} ::= SEQUENCE {
id M3AP-PRIVATE-IES.&id ({IEsSetParam}),
criticality M3AP-PRIVATE-IES.&criticality ({IEsSetParam}{@id}),
value M3AP-PRIVATE-IES.&Value ({IEsSetParam}{@id})
}
END
-- M3AP-Constants.asn
--
-- 3GPP TS 36.444 V13.2.0 (2016-03)
-- http://www.3gpp.org/ftp/Specs/archive/36_series/36.444/36444-d20.zip
--
-- 9.3.7 Constant Definitions
--
-- **************************************************************
--
-- Constant definitions
--
-- **************************************************************
M3AP-Constants {
itu-t (0) identified-organization (4) etsi (0) mobileDomain (0)
eps-Access (21) modules (3) m3ap (5) version1 (1) m3ap-Constants (4) }
DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
IMPORTS
ProcedureCode,
ProtocolIE-ID
FROM M3AP-CommonDataTypes;
-- **************************************************************
--
-- Elementary Procedures
--
-- **************************************************************
id-mBMSsessionStart ProcedureCode ::= 0
id-mBMSsessionStop ProcedureCode ::= 1
id-errorIndication ProcedureCode ::= 2
id-privateMessage ProcedureCode ::= 3
id-Reset ProcedureCode ::= 4
id-mBMSsessionUpdate ProcedureCode ::= 5
id-mCEConfigurationUpdate ProcedureCode ::= 6
id-m3Setup ProcedureCode ::= 7
-- **************************************************************
--
-- Lists
--
-- **************************************************************
maxnoofMBMSServiceAreaIdentitiesPerMCE INTEGER ::= 65536
maxnooferrors INTEGER ::= 256
maxNrOfIndividualM3ConnectionsToReset INTEGER ::= 256
maxnoofCellsforMBMS INTEGER ::= 4096
-- **************************************************************
--
-- IEs
--
-- **************************************************************
id-MME-MBMS-M3AP-ID ProtocolIE-ID ::= 0
id-MCE-MBMS-M3AP-ID ProtocolIE-ID ::= 1
id-TMGI ProtocolIE-ID ::= 2
id-MBMS-Session-ID ProtocolIE-ID ::= 3
id-MBMS-E-RAB-QoS-Parameters ProtocolIE-ID ::= 4
id-MBMS-Session-Duration ProtocolIE-ID ::= 5
id-MBMS-Service-Area ProtocolIE-ID ::= 6
id-TNL-Information ProtocolIE-ID ::= 7
id-CriticalityDiagnostics ProtocolIE-ID ::= 8
id-Cause ProtocolIE-ID ::= 9
id-MBMS-Service-Area-List ProtocolIE-ID ::= 10
id-MBMS-Service-Area-List-Item ProtocolIE-ID ::= 11
id-TimeToWait ProtocolIE-ID ::= 12
id-ResetType ProtocolIE-ID ::= 13
id-MBMS-Service-associatedLogicalM3-ConnectionItem ProtocolIE-ID ::= 14
id-MBMS-Service-associatedLogicalM3-ConnectionListResAck ProtocolIE-ID ::= 15
id-MinimumTimeToMBMSDataTransfer ProtocolIE-ID ::= 16
id-AllocationAndRetentionPriority ProtocolIE-ID ::= 17
id-Global-MCE-ID ProtocolIE-ID ::= 18
id-MCEname ProtocolIE-ID ::= 19
id-MBMSServiceAreaList ProtocolIE-ID ::= 20
id-Time-ofMBMS-DataTransfer ProtocolIE-ID ::= 21
id-Time-ofMBMS-DataStop ProtocolIE-ID ::= 22
id-Reestablishment ProtocolIE-ID ::= 23
id-Alternative-TNL-Information ProtocolIE-ID ::= 24
id-MBMS-Cell-List ProtocolIE-ID ::= 25
END
import re, os, sys, string
import datetime
import getopt
import getpass
version = "1.0.2"
lines = ""
iesDefs = {}
ieofielist = {}
outdir = './'
filenames = []
verbosity = 0
prefix = ""
FAIL = '\033[91m'
WARN = '\033[93m'
ENDC = '\033[0m'
fileprefix = ""
fileprefix_first_upper = ""
def printFail(string):
sys.stderr.write(FAIL + string + ENDC + "\n")
def printWarning(string):
print WARN + string + ENDC
def printDebug(string):
if verbosity > 0:
print string
def outputHeaderToFile(f, filename):
now = datetime.datetime.now()
f.write("""/*
* 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
*/
""")
f.write("/*******************************************************************************\n")
f.write(" * This file had been created by asn1tostruct.py script v%s\n" % (version))
f.write(" * Please do not modify this file but regenerate it via script.\n")
f.write(" * Created on: %s by %s\n * from %s\n" % (str(now), getpass.getuser(), filenames))
f.write(" ******************************************************************************/\n")
def lowerFirstCamelWord(word):
""" puts the first word in a CamelCase Word in lowercase.
I.e. CustomerID becomes customerID, XMLInfoTest becomes xmlInfoTest
"""
newstr = ''
swapped = word.swapcase()
idx = 0
# if it's all-caps, return an all-lowered version
lowered = word.lower()
if swapped == lowered:
return lowered
for c in swapped:
if c in string.lowercase:
newstr += c
idx += 1
else:
break
if idx < 2:
newstr += word[idx:]
else:
newstr = newstr[:-1]+ word[idx-1:]
return newstr
def usage():
print "Python parser for asn1 v%s" % (version)
print "Usage: python asn1tostruct.py [options]"
print "Available options:"
print "-d Enable script debug"
print "-f [file] Input file to parse"
print "-o [dir] Output files to given directory"
print "-h Print this help and return"
try:
opts, args = getopt.getopt(sys.argv[1:], "df:ho:", ["debug", "file", "help", "outdir"])
except getopt.GetoptError as err:
# print help information and exit:
usage()
sys.exit(2)
for o, a in opts:
if o in ("-f", "--file"):
filenames.append(a)
if o in ("-d", "--debug"):
verbosity = 1
if o in ("-o", "--outdir"):
outdir = a
if outdir.rfind('/') != len(outdir):
outdir += '/'
if o in ("-h", "--help"):
usage()
sys.exit(2)
for filename in filenames:
file = open(filename, 'r')
for line in file:
# Removing any comment
if line.find('--') >= 0:
line = line[:line.find('--')]
# Removing any carriage return
lines += re.sub('\r', '', line)
for m in re.findall(r'([a-zA-Z0-9-]+)\s*::=\s+SEQUENCE\s+\(\s*SIZE\s*\(\s*\d+\s*\.\.\s*[0-9a-zA-Z-]+\s*\)\s*\)\s*OF\s+[a-zA-Z-]+\s*\{\s*\{\s*([0-9a-zA-Z-]+)\s*\}\s*\}', lines, re.MULTILINE):
ieofielist[m[0]] = m[1]
for m in re.findall(r'([a-zA-Z0-9-]+)\s*::=\s+E-RAB-IE-ContainerList\s*\{\s*\{\s*([a-zA-Z0-9-]+)\s*\}\s*\}', lines, re.MULTILINE):
ieofielist[m[0]] = m[1]
for i in re.findall(r'([a-zA-Z0-9-]+)\s+([A-Z0-9-]+)\s*::=\s*\{\s+([\,\|\{\}\t\n\.{3}\ \-a-zA-Z0-9]+)\s+}\n', lines, re.MULTILINE):
ies = []
maxLength = 0
# TODO: handle extensions
if i[1].find('EXTENSION') >= 0:
continue
if fileprefix == "":
fileprefix = i[1][:i[1].find('-')].lower()
for j in re.findall(r'\s*\{\s*([a-zA-Z0-9-\ \t]+)\s*\}\s*[\|,]*', i[2], re.MULTILINE):
for k in re.findall(r'ID\s*([a-zA-Z0-9\-]+)\s*CRITICALITY\s*([a-zA-Z0-9\-]+)\s+[A-Z]+\s+([a-zA-Z0-9\-]+)\s*PRESENCE\s*([a-zA-Z0-9\-]+)', j, re.MULTILINE):
printDebug("Got new ie for message " + i[0] + ": " + str(k))
if len(k[2]) > maxLength:
maxLength = len(k[2])
ies.append(k)
if len(ies) > 0:
iesDefs[i[0]] = { "length": maxLength, "ies": ies }
else:
printWarning("Didn't find any information element for message: " + i[0])
if len(iesDefs) == 0:
printFail("No Information Element parsed, exiting")
sys.exit(0)
fileprefix_first_upper = fileprefix[0].upper() + fileprefix[1:]
f = open(outdir + fileprefix + '_ies_defs.h', 'w')
outputHeaderToFile(f, filename)
f.write("#include \"%s_common.h\"\n\n" % (fileprefix))
f.write("#ifndef %s_IES_DEFS_H_\n#define %s_IES_DEFS_H_\n\n" % (fileprefix.upper(), fileprefix.upper()))
f.write("/* Define the version of script used to generate this file */\n")
f.write("#define %s_SCRIPT_VERSION (%s)\n\n" % (fileprefix.upper(), re.sub('\.', '', version)))
for key in iesDefs:
if key not in ieofielist.values():
continue
for (i, j) in ieofielist.items():
if j == key:
break
f.write("typedef struct %sIEs_s {\n" % (re.sub('-', '_', i)))
f.write(" A_SEQUENCE_OF(struct %s_s) %s;\n" % (re.sub('IEs', '', re.sub('-', '_', ieofielist[i])), lowerFirstCamelWord(re.sub('IEs', '', re.sub('-', '_', ieofielist[i])))))
f.write("} %sIEs_t;\n\n" % (re.sub('-', '_', i)))
for key in iesDefs:
keyupperunderscore = re.sub('-', '_', key.upper())
keylowerunderscore = re.sub('-', '_', key.lower())
shift = 0
if len(iesDefs[key]["ies"]) == 0:
continue
# Presence mask
for ie in iesDefs[key]["ies"]:
ieupperunderscore = re.sub('-', '_', re.sub('id-', '', ie[0])).upper()
if ie[3] == "optional" or ie[3] == "conditional":
f.write("#define {0:<{pad}} {1}\n".format("%s_%s_PRESENT" % (keyupperunderscore, ieupperunderscore), "(1 << %d)" % shift,
pad=iesDefs[key]["length"] + len(keyupperunderscore) + 9))
shift += 1
if (shift > 0):
f.write("\n")
f.write("typedef struct %s_s {\n" % (re.sub('-', '_', key)))
if (shift > 0):
f.write(" {0:<{pad}} {1};\n".format("uint16_t", "presenceMask", pad=iesDefs[key]["length"] + 2))
for ie in iesDefs[key]["ies"]:
ieunderscore = re.sub('-', '_', ie[2])
iename = re.sub('id-', '', ie[0])
ienameunderscore = lowerFirstCamelWord(re.sub('-', '_', iename))
if ie[2] in ieofielist:
f.write(" %sIEs_t %s;" % (re.sub('-', '_', ie[2]), ienameunderscore))
else:
f.write(" {0:<{pad}} {1};".format("%s_t" % ieunderscore, ienameunderscore, pad=iesDefs[key]["length"] + 2))
if ie[3] == "optional":
f.write(" ///< Optional field")
elif ie[3] == "conditional":
f.write(" ///< Conditional field")
f.write("\n")
f.write("} %s_t;\n\n" % (re.sub('-', '_', key)))
f.write("typedef struct %s_message_s {\n" % (fileprefix))
f.write(" %s_ProcedureCode_t procedureCode;\n" % (fileprefix_first_upper))
f.write(" %s_Criticality_t criticality;\n" % (fileprefix_first_upper))
f.write(" uint8_t direction;\n")
f.write(" union {\n")
messageList = iesDefs.keys()
messageList.sort()
for message in messageList:
if message in ieofielist.values():
continue
if len(iesDefs[message]["ies"]) == 0:
continue
f.write(" %s_t %s;\n" % (re.sub('-', '_', message), lowerFirstCamelWord(re.sub('-', '_', message))))
f.write(" } msg;\n")
f.write("} %s_message;\n\n" % (fileprefix))
for key in iesDefs:
if key in ieofielist.values():
continue
structName = re.sub('ies', '', key)
asn1cStruct = re.sub('-', '_', re.sub('IEs', '', re.sub('-IEs', '', key)))
asn1cStruct = re.sub('Item', 'List', asn1cStruct)
keylowerunderscore = re.sub('-', '_', key.lower())
firstlower = re.sub('Item', 'List', re.sub('enb', 'eNB', lowerFirstCamelWord(asn1cStruct)))
f.write("/* %s in iesDefs not in ieofielist.values() */\n" % (key))
f.write("/** \\brief Decode function for %s ies.\n" % (key))
if len(iesDefs[key]["ies"]) != 0:
f.write(" * \\param %s Pointer to ASN1 structure in which data will be stored\n" % (lowerFirstCamelWord(re.sub('-', '_', key))))
f.write(" * \\param any_p Pointer to the ANY value to decode.\n")
f.write(" **/\n")
f.write("int %s_decode_%s(\n" % (fileprefix, keylowerunderscore))
if len(iesDefs[key]["ies"]) != 0:
f.write(" %s_t *%s,\n" % (re.sub('-', '_', key), lowerFirstCamelWord(re.sub('-', '_', key))))
f.write(" ANY_t *any_p);\n\n")
if len(iesDefs[key]["ies"]) == 0:
continue
f.write("/* %s in iesDefs not in ieofielist.values() */\n" % (key))
f.write("/** \\brief Encode function for %s ies.\n" % (key))
f.write(" * \\param %s Pointer to the ASN1 structure.\n" % (firstlower))
f.write(" * \\param %s Pointer to the IES structure.\n" % (lowerFirstCamelWord(re.sub('-', '_', key))))
f.write(" **/\n")
f.write("int %s_encode_%s(\n" % (fileprefix, re.sub('-', '_', structName.lower())))
f.write(" %s_t *%s,\n" % (asn1cStruct, firstlower))
f.write(" %s_t *%s);\n\n" % (re.sub('-', '_', key), lowerFirstCamelWord(re.sub('-', '_', key))))
for key in iesDefs:
if key not in ieofielist.values():
continue
asn1cStruct = re.sub('-', '_', re.sub('IEs', '', key))
asn1cStruct = re.sub('Item', 'List', asn1cStruct)
firstlower = re.sub('Item', 'List', re.sub('enb', 'eNB', lowerFirstCamelWord(asn1cStruct)))
f.write("/* %s in iesDefs in ieofielist.values() */\n" % (key))
f.write("/** \\brief Encode function for %s ies.\n" % (key))
f.write(" * \\param %s Pointer to the ASN1 structure.\n" % (firstlower))
f.write(" * \\param %s Pointer to the IES structure.\n" % (lowerFirstCamelWord(re.sub('-', '_', key))))
f.write(" **/\n")
f.write("/* %s in iesDefs in ieofielist.values() */\n" % (key))
f.write("int %s_encode_%s(\n" % (fileprefix, firstlower.lower()))
f.write(" %s_t *%s,\n" % (asn1cStruct, firstlower))
f.write(" %sIEs_t *%sIEs);\n\n" % (asn1cStruct, firstlower))
f.write("/** \\brief Decode function for %s ies.\n" % (key))
f.write(" * \\param any_p Pointer to the ANY value to decode.\n")
f.write(" * \\param callback Callback function called when any_p is successfully decoded.\n")
f.write(" **/\n")
f.write("/* %s in iesDefs in ieofielist.values() */\n" % (key))
f.write("int %s_decode_%s(\n" % (fileprefix, firstlower.lower()))
f.write(" %sIEs_t *%sIEs,\n" % (asn1cStruct, firstlower))
f.write(" %s_t *%s);\n\n" % (asn1cStruct, lowerFirstCamelWord(asn1cStruct)))
for key in iesDefs:
asn1cStruct = re.sub('-', '_', re.sub('IEs', '', key))
asn1cStruct = re.sub('Item', 'List', asn1cStruct)
firstlower = re.sub('Item', 'List', re.sub('enb', 'eNB', lowerFirstCamelWord(asn1cStruct)))
if key in ieofielist.values():
f.write("/** \\brief Display %s encapsulated IE using XER encoding.\n" % (asn1cStruct))
f.write(" * \\param %s Pointer to the IES structure.\n" % (lowerFirstCamelWord(re.sub('-', '_', key))))
f.write(" * \\param file File descriptor to write output.\n")
f.write(" **/\n")
f.write("asn_enc_rval_t %s_xer_print_%s(\n" % (fileprefix, re.sub('item', 'list', firstlower.lower())))
f.write(" asn_app_consume_bytes_f *cb,\n")
f.write(" void *app_key,\n")
f.write(" %sIEs_t *%sIEs);\n\n" % (re.sub('item', 'list', asn1cStruct), firstlower))
else:
f.write("/** \\brief Display %s message using XER encoding.\n" % (asn1cStruct))
f.write(" * \\param message_p Pointer to root message.\n")
f.write(" * \\param file File descriptor to write output.\n")
f.write(" **/\n")
f.write("asn_enc_rval_t %s_xer_print_%s(\n" % (fileprefix, firstlower.lower()))
f.write(" asn_app_consume_bytes_f *cb,\n")
f.write(" void *app_key,\n")
f.write(" %s_message *message_p);\n\n" % (fileprefix))
f.write("int %s_xer__print2sp(const void *buffer, size_t size, void *app_key);\n\n" % (fileprefix.lower()))
f.write("int %s_xer__print2fp(const void *buffer, size_t size, void *app_key);\n\n" % (fileprefix.lower()))
f.write("extern size_t %s_string_total_size;\n\n" % (fileprefix.lower()))
f.write("#endif /* %s_IES_DEFS_H_ */\n\n" % (fileprefix.upper()))
#Generate Decode functions
f = open(outdir + fileprefix + '_decoder.c', 'w')
outputHeaderToFile(f, filename)
f.write("#include \"%s_common.h\"\n#include \"%s_ies_defs.h\"\n\n" % (fileprefix, fileprefix))
for key in iesDefs:
if key in ieofielist.values():
continue
structName = re.sub('ies', '', key)
asn1cStruct = re.sub('-', '_', re.sub('IEs', '', key))
if asn1cStruct.rfind('_') == len(asn1cStruct) - 1:
asn1cStruct = asn1cStruct[:-1]
asn1cStruct = re.sub('Item', 'List', asn1cStruct)
ielistname = re.sub('UE', 'ue', asn1cStruct)
ielistnamefirstlower = ielistname[:1].lower() + ielistname[1:]
asn1cStructfirstlower = asn1cStruct[:1].lower() + asn1cStruct[1:]
keyName = re.sub('-', '_', key)
keyupperunderscore = keyName.upper()
firstlower = re.sub('Item', 'List', re.sub('enb', 'eNB', lowerFirstCamelWord(asn1cStruct)))
iesaccess = ""
if key not in ieofielist.values():
iesaccess = "%s_ies." % (firstlower)
f.write("int %s_decode_%s(\n" % (fileprefix, re.sub('-', '_', structName.lower())))
if len(iesDefs[key]["ies"]) != 0:
f.write(" %s_t *%s,\n" % (re.sub('-', '_', key), lowerFirstCamelWord(re.sub('-', '_', key))))
f.write(" ANY_t *any_p) {\n\n")
f.write(" %s_t %s;\n %s_t *%s_p = &%s;\n" % (asn1cStruct, asn1cStructfirstlower, asn1cStruct, asn1cStructfirstlower, asn1cStructfirstlower))
f.write(" int i, decoded = 0;\n")
if len(iesDefs[key]["ies"]) != 0:
f.write(" int tempDecoded = 0;\n")
f.write(" assert(any_p != NULL);\n")
if len(iesDefs[key]["ies"]) != 0:
f.write(" assert(%s != NULL);\n\n" % (lowerFirstCamelWord(re.sub('-', '_', key))))
f.write(" %s_DEBUG(\"Decoding message %s (%%s:%%d)\\n\", __FILE__, __LINE__);\n\n" % (fileprefix.upper(), re.sub('-', '_', keyName)))
f.write(" ANY_to_type_aper(any_p, &asn_DEF_%s, (void**)&%s_p);\n\n" % (asn1cStruct, asn1cStructfirstlower))
f.write(" for (i = 0; i < %s_p->%slist.count; i++) {\n" % (asn1cStructfirstlower, iesaccess))
f.write(" %s_IE_t *ie_p;\n" % (fileprefix[0].upper() + fileprefix[1:]))
f.write(" ie_p = %s_p->%slist.array[i];\n" % (asn1cStructfirstlower, iesaccess))
f.write(" switch(ie_p->id) {\n")
for ie in iesDefs[key]["ies"]:
iename = re.sub('id-', '', ie[0])
ienameunderscore = lowerFirstCamelWord(re.sub('-', '_', iename))
ienameunderscorefirstlower = lowerFirstCamelWord(ienameunderscore)
ietypesubst = re.sub('-', '', ie[2])
ietypeunderscore = re.sub('-', '_', ie[2])
ieupperunderscore = re.sub('-', '_', re.sub('id-', '', ie[0])).upper()
if ie[3] == "optional":
f.write(" /* Optional field */\n")
elif ie[3] == "conditional":
f.write(" /* Conditional field */\n")
f.write(" case %s_ProtocolIE_ID_%s:\n" % (fileprefix_first_upper, re.sub('-', '_', ie[0])))
f.write(" {\n")
f.write(" %s_t *%s_p = NULL;\n" % (ietypeunderscore, lowerFirstCamelWord(ietypesubst)))
if ie[3] != "mandatory":
f.write(" %s->presenceMask |= %s_%s_PRESENT;\n" % (lowerFirstCamelWord(re.sub('-', '_', key)), keyupperunderscore, ieupperunderscore))
f.write(" tempDecoded = ANY_to_type_aper(&ie_p->value, &asn_DEF_%s, (void**)&%s_p);\n" % (ietypeunderscore, lowerFirstCamelWord(ietypesubst)))
f.write(" if (tempDecoded < 0 || %s_p == NULL) {\n" % (lowerFirstCamelWord(ietypesubst)))
f.write(" %s_ERROR(\"Decoding of IE %s failed\\n\");\n" % (fileprefix.upper(), ienameunderscore))
f.write(" if (%s_p)\n" % (lowerFirstCamelWord(ietypesubst)))
f.write(" ASN_STRUCT_FREE(asn_DEF_%s, %s_p);\n" % (ietypeunderscore, lowerFirstCamelWord(ietypesubst)))
f.write(" return -1;\n")
f.write(" }\n")
f.write(" decoded += tempDecoded;\n")
f.write(" if (asn1_xer_print)\n")
f.write(" xer_fprint(stdout, &asn_DEF_%s, %s_p);\n" % (ietypeunderscore, lowerFirstCamelWord(ietypesubst)))
if ie[2] in ieofielist.keys():
f.write(" if (%s_decode_%s(&%s->%s, %s_p) < 0) {\n" % (fileprefix, ietypeunderscore.lower(), lowerFirstCamelWord(re.sub('-', '_', key)), ienameunderscore, lowerFirstCamelWord(ietypesubst)))
f.write(" %s_ERROR(\"Decoding of encapsulated IE %s failed\\n\");\n" % (fileprefix.upper(), lowerFirstCamelWord(ietypesubst)))
f.write(" ASN_STRUCT_FREE(asn_DEF_%s, %s_p);\n" % (ietypeunderscore, lowerFirstCamelWord(ietypesubst)))
f.write(" }\n")
else:
f.write(" memcpy(&%s->%s, %s_p, sizeof(%s_t));\n" % (lowerFirstCamelWord(re.sub('-', '_', key)), ienameunderscore, lowerFirstCamelWord(ietypesubst), ietypeunderscore))
#f.write(" ASN_STRUCT_FREE(asn_DEF_%s, %s_p);\n" % (ietypeunderscore, lowerFirstCamelWord(ietypesubst)))
f.write(" } break;\n")
f.write(" default:\n")
f.write(" %s_ERROR(\"Unknown protocol IE id (%%d) for message %s\\n\", (int)ie_p->id);\n" % (fileprefix.upper(), re.sub('-', '_', structName.lower())))
f.write(" return -1;\n")
f.write(" }\n")
f.write(" }\n")
f.write(" return decoded;\n")
f.write("}\n\n")
for key in iesDefs:
if key not in ieofielist.values():
continue
keyname = re.sub('IEs', '', re.sub('Item', 'List', key))
f.write("int %s_decode_%s(\n" % (fileprefix, re.sub('-', '_', keyname).lower()))
f.write(" %sIEs_t *%sIEs,\n" % (re.sub('-', '_', keyname), lowerFirstCamelWord(re.sub('-', '_', keyname))))
f.write(" %s_t *%s) {\n\n" % (re.sub('-', '_', keyname), lowerFirstCamelWord(re.sub('-', '_', keyname))))
f.write(" int i, decoded = 0;\n")
f.write(" int tempDecoded = 0;\n\n")
f.write(" assert(%s != NULL);\n" % (lowerFirstCamelWord(re.sub('-', '_', keyname))));
f.write(" assert(%sIEs != NULL);\n\n" % (lowerFirstCamelWord(re.sub('-', '_', keyname))));
f.write(" for (i = 0; i < %s->list.count; i++) {\n" % (lowerFirstCamelWord(re.sub('-', '_', keyname))))
f.write(" %s_IE_t *ie_p = %s->list.array[i];\n" % (fileprefix[0].upper() + fileprefix[1:], lowerFirstCamelWord(re.sub('-', '_', keyname))))
f.write(" switch (ie_p->id) {\n")
for ie in iesDefs[key]["ies"]:
iename = re.sub('id-', '', ie[0])
ienameunderscore = lowerFirstCamelWord(re.sub('-', '_', iename))
f.write(" case %s_ProtocolIE_ID_%s:\n" % (fileprefix_first_upper, re.sub('-', '_', ie[0])))
f.write(" {\n")
f.write(" %s_t *%s_p = NULL;\n" % (re.sub('-', '_', ie[2]), lowerFirstCamelWord(re.sub('-', '', ie[2]))))
f.write(" tempDecoded = ANY_to_type_aper(&ie_p->value, &asn_DEF_%s, (void**)&%s_p);\n" % (re.sub('-', '_', ie[2]), lowerFirstCamelWord(re.sub('-', '', ie[2]))))
f.write(" if (tempDecoded < 0 || %s_p == NULL) {\n" % (lowerFirstCamelWord(re.sub('-', '', ie[2]))))
f.write(" %s_ERROR(\"Decoding of IE %s for message %s failed\\n\");\n" % (fileprefix.upper(), ienameunderscore, re.sub('-', '_', keyname)))
f.write(" if (%s_p)\n" % (lowerFirstCamelWord(re.sub('-', '', ie[2]))))
#f.write(" free(%s_p);\n" % (lowerFirstCamelWord(re.sub('-', '', ie[2]))))
f.write(" ASN_STRUCT_FREE(asn_DEF_%s, %s_p);\n" % (re.sub('-', '_', ie[2]), lowerFirstCamelWord(re.sub('-', '', ie[2]))))
f.write(" return -1;\n")
f.write(" }\n")
f.write(" decoded += tempDecoded;\n")
f.write(" if (asn1_xer_print)\n")
f.write(" xer_fprint(stdout, &asn_DEF_%s, %s_p);\n" % (re.sub('-', '_', ie[2]), lowerFirstCamelWord(re.sub('-', '', ie[2]))))
f.write(" ASN_SEQUENCE_ADD(&%sIEs->%s, %s_p);\n" % (lowerFirstCamelWord(re.sub('-', '_', keyname)),
re.sub('IEs', '', lowerFirstCamelWord(re.sub('-', '_', key))), lowerFirstCamelWord(re.sub('-', '', ie[2]))))
f.write(" } break;\n")
f.write(" default:\n")
f.write(" %s_ERROR(\"Unknown protocol IE id (%%d) for message %s\\n\", (int)ie_p->id);\n" % (fileprefix.upper(), re.sub('-', '_', structName.lower())))
f.write(" return -1;\n")
f.write(" }\n")
f.write(" }\n")
f.write(" return decoded;\n")
f.write("}\n\n")
#Generate IES Encode functions
f = open(outdir + fileprefix + '_encoder.c', 'w')
outputHeaderToFile(f,filename)
f.write("#include \"%s_common.h\"\n" % (fileprefix))
f.write("#include \"%s_ies_defs.h\"\n\n" % (fileprefix))
for key in iesDefs:
if key in ieofielist.values():
continue
structName = re.sub('ies', '', key)
asn1cStruct = re.sub('-', '_', re.sub('IEs', '', key))
asn1cStruct = re.sub('Item', 'List', asn1cStruct)
if asn1cStruct.rfind('_') == len(asn1cStruct) - 1:
asn1cStruct = asn1cStruct[:-1]
asn1cStructfirstlower = asn1cStruct[:1].lower() + asn1cStruct[1:]
firstwordlower = re.sub('Item', 'List', re.sub('enb', 'eNB', lowerFirstCamelWord(asn1cStruct)))
iesaccess = ""
if key not in ieofielist.values():
iesaccess = "%s_ies." % (firstwordlower)
keyName = re.sub('-', '_', key)
keyupperunderscore = keyName.upper()
# No IE to encode...
if len(iesDefs[key]["ies"]) == 0:
continue
f.write("int %s_encode_%s(\n" % (fileprefix, re.sub('-', '_', structName.lower())))
f.write(" %s_t *%s,\n" % (asn1cStruct, firstwordlower))
f.write(" %s_t *%s) {\n\n" % (re.sub('-', '_', key), lowerFirstCamelWord(re.sub('-', '_', key))))
f.write(" %s_IE_t *ie;\n\n" % (fileprefix_first_upper))
f.write(" assert(%s != NULL);\n" % (firstwordlower));
f.write(" assert(%s != NULL);\n\n" % (lowerFirstCamelWord(re.sub('-', '_', key))));
for ie in iesDefs[key]["ies"]:
iename = re.sub('-', '_', re.sub('id-', '', ie[0]))
ienameunderscore = re.sub('-', '_', iename)
ienamefirstwordlower = lowerFirstCamelWord(iename)
ieupperunderscore = re.sub('-', '_', re.sub('id-', '', ie[0])).upper()
ietypeunderscore = re.sub('-', '_', ie[2])
if ie[3] != "mandatory":
if ie[3] == "optional":
f.write(" /* Optional field */\n")
elif ie[3] == "conditional":
f.write(" /* Conditional field */\n")
f.write(" if (%s->presenceMask & %s_%s_PRESENT) {\n" % (lowerFirstCamelWord(re.sub('-', '_', key)), keyupperunderscore, ieupperunderscore))
#f.write(" == %s_%s_PRESENT) {\n" % (keyupperunderscore, ieupperunderscore))
f.write(" if ((ie = %s_new_ie(%s_ProtocolIE_ID_%s,\n" % (fileprefix, fileprefix_first_upper, re.sub('-', '_', ie[0])))
f.write(" %s_Criticality_%s,\n" % (fileprefix_first_upper, ie[1]))
f.write(" &asn_DEF_%s,\n" % (ietypeunderscore))
f.write(" &%s->%s)) == NULL) {\n" % (lowerFirstCamelWord(re.sub('-', '_', key)), ienamefirstwordlower))
f.write(" return -1;\n")
f.write(" }\n")
f.write(" ASN_SEQUENCE_ADD(&%s->%slist, ie);\n" % (firstwordlower, iesaccess))
f.write(" }\n\n")
else:
if ie[2] in ieofielist.keys():
f.write(" %s_t %s;\n\n" % (ietypeunderscore, ienamefirstwordlower))
f.write(" memset(&%s, 0, sizeof(%s_t));\n" % (ienamefirstwordlower, ietypeunderscore))
f.write("\n")
f.write(" if (%s_encode_%s(&%s, &%s->%s) < 0) return -1;\n" % (fileprefix, ietypeunderscore.lower(), ienamefirstwordlower, lowerFirstCamelWord(re.sub('-', '_', key)), ienamefirstwordlower))
f.write(" if ((ie = %s_new_ie(%s_ProtocolIE_ID_%s,\n" % (fileprefix, fileprefix_first_upper, re.sub('-', '_', ie[0])))
f.write(" %s_Criticality_%s,\n" % (fileprefix_first_upper, ie[1]))
f.write(" &asn_DEF_%s,\n" % (ietypeunderscore))
if ie[2] in ieofielist.keys():
f.write(" &%s)) == NULL) {\n" % (ienamefirstwordlower))
else:
f.write(" &%s->%s)) == NULL) {\n" % (lowerFirstCamelWord(re.sub('-', '_', key)), ienamefirstwordlower))
f.write(" return -1;\n")
f.write(" }\n")
f.write(" ASN_SEQUENCE_ADD(&%s->%slist, ie);\n\n" % (firstwordlower, iesaccess))
if ie[2] in ieofielist.keys():
f.write(" /* Free any dynamic allocation that is no more used */\n")
f.write(" ASN_STRUCT_FREE_CONTENTS_ONLY(asn_DEF_%s, &%s);\n\n" % (ietypeunderscore, ienamefirstwordlower))
f.write(" return 0;\n")
f.write("}\n\n")
for (key, value) in iesDefs.items():
if key not in ieofielist.values():
continue
ie = value["ies"][0]
ietypeunderscore = re.sub('-', '_', ie[2])
asn1cStruct = re.sub('-', '_', re.sub('IEs', '', re.sub('-IEs', '', key)))
asn1cStruct = re.sub('Item', 'List', asn1cStruct)
firstwordlower = re.sub('Item', 'List', re.sub('enb', 'eNB', lowerFirstCamelWord(asn1cStruct)))
for (i, j) in ieofielist.items():
if j == key:
break
f.write("int %s_encode_%s(\n" % (fileprefix, re.sub('-', '_', i).lower()))
f.write(" %s_t *%s,\n" % (asn1cStruct, firstwordlower))
f.write(" %sIEs_t *%sIEs) {\n\n" % (re.sub('-', '_', i), lowerFirstCamelWord(re.sub('-', '_', i))))
f.write(" int i;\n")
f.write(" %s_IE_t *ie;\n\n" % (fileprefix_first_upper))
f.write(" assert(%s != NULL);\n" % (firstwordlower));
f.write(" assert(%sIEs != NULL);\n\n" % (lowerFirstCamelWord(re.sub('-', '_', i))));
f.write(" for (i = 0; i < %sIEs->%s.count; i++) {\n" % (firstwordlower, re.sub('IEs', '', lowerFirstCamelWord(re.sub('-', '_', key)))))
f.write(" if ((ie = %s_new_ie(%s_ProtocolIE_ID_%s,\n" % (fileprefix, fileprefix_first_upper, re.sub('-', '_', ie[0])))
f.write(" %s_Criticality_%s,\n" % (fileprefix_first_upper, ie[1]))
f.write(" &asn_DEF_%s,\n" % (ietypeunderscore))
f.write(" %sIEs->%s.array[i])) == NULL) {\n" % (firstwordlower, re.sub('IEs', '', lowerFirstCamelWord(re.sub('-', '_', key)))))
f.write(" return -1;\n")
f.write(" }\n")
f.write(" ASN_SEQUENCE_ADD(&%s->list, ie);\n" % (firstwordlower))
f.write(" }\n")
f.write(" return 0;\n")
f.write("}\n\n")
#Generate xer print functions
f = open(outdir + fileprefix + '_xer_print.c', 'w')
outputHeaderToFile(f, filename)
f.write("#include <stdlib.h>\n")
f.write("#include <stdio.h>\n\n")
f.write("#include <asn_application.h>\n#include <asn_internal.h>\n\n")
f.write("#include \"%s_common.h\"\n#include \"%s_ies_defs.h\"\n\n" % (fileprefix, fileprefix))
f.write("size_t %s_string_total_size = 0;\n\n" % (fileprefix.lower()))
f.write("""int
%s_xer__print2fp(const void *buffer, size_t size, void *app_key) {
FILE *stream = (FILE *)app_key;
if(fwrite(buffer, 1, size, stream) != size)
return -1;
return 0;
}
""" % (fileprefix.lower()))
f.write("""int %s_xer__print2sp(const void *buffer, size_t size, void *app_key) {
char *string = (char *)app_key;
/* Copy buffer to the formatted string */
memcpy(&string[%s_string_total_size], buffer, size);
%s_string_total_size += size;
return 0;
}
""" % (fileprefix.lower(), fileprefix.lower(), fileprefix.lower()))
f.write("""static asn_enc_rval_t
xer_encode_local(asn_TYPE_descriptor_t *td, void *sptr,
asn_app_consume_bytes_f *cb, void *app_key, int indent) {
asn_enc_rval_t er, tmper;
const char *mname;
size_t mlen;
int xcan = 2;
if(!td || !sptr) goto cb_failed;
mname = td->xml_tag;
mlen = strlen(mname);
ASN__TEXT_INDENT(0, indent);
ASN__CALLBACK3("<", 1, mname, mlen, ">", 1);
tmper = td->op->xer_encoder(td, sptr, indent + 1, XER_F_BASIC, cb, app_key);
if(tmper.encoded == -1) return tmper;
ASN__CALLBACK3("</", 2, mname, mlen, ">\\n", xcan);
er.encoded = 4 + xcan + (2 * mlen) + tmper.encoded;
ASN__ENCODED_OK(er);
cb_failed:
ASN__ENCODE_FAILED;
}
""")
for (key, value) in iesDefs.items():
keyName = re.sub('-', '_', key)
keyupperunderscore = keyName.upper()
iesStructName = lowerFirstCamelWord(re.sub('-', '_', key))
ie = value["ies"][0]
ietypeunderscore = re.sub('-', '_', ie[2])
if key in ieofielist.values():
f.write("asn_enc_rval_t %s_xer_print_%s(\n" % (fileprefix, re.sub('ies', '', re.sub('item', 'list', re.sub('-', '_', key).lower()))))
else:
f.write("asn_enc_rval_t %s_xer_print_%s(\n" % (fileprefix, re.sub('ies', '', re.sub('-', '_', key).lower())))
#f.write(" FILE *file,\n")
f.write(" asn_app_consume_bytes_f *cb,\n")
f.write(" void *app_key,\n")
if key in ieofielist.values():
iesStructName = lowerFirstCamelWord(re.sub('Item', 'List', re.sub('-', '_', key)))
f.write(" %sIEs_t *%s) {\n\n" % (re.sub('IEs', '', re.sub('Item', 'List', re.sub('-', '_', key))), iesStructName))
f.write(" int i;\n")
f.write(" asn_enc_rval_t er;\n")
else:
f.write(" %s_message *message_p)\n{\n" % (fileprefix))
f.write(" %s_t *%s;\n" % (re.sub('-', '_', key), iesStructName))
f.write(" asn_enc_rval_t er;\n")
#f.write(" void *app_key = (void *)file;\n")
#f.write(" asn_app_consume_bytes_f *cb = %s_xer__print2fp;\n\n" % (fileprefix.lower()))
f.write(" %s = &message_p->msg.%s;\n\n" % (iesStructName, iesStructName))
if key in ieofielist.values():
# Increase indentation level
f.write(" for (i = 0; i < %s->%s.count; i++) {\n" % (iesStructName, re.sub('IEs', '', lowerFirstCamelWord(re.sub('-', '_', key)))))
#f.write(" xer_fprint(file, &asn_DEF_%s, %s->%s.array[i]);\n" % (ietypeunderscore, iesStructName, re.sub('IEs', '', lowerFirstCamelWord(re.sub('-', '_', key)))))
f.write(" er = xer_encode(&asn_DEF_%s, %s->%s.array[i], XER_F_BASIC, cb, app_key);\n" % (ietypeunderscore, iesStructName, re.sub('IEs', '', lowerFirstCamelWord(re.sub('-', '_', key)))))
f.write(" }\n")
else:
f.write(" cb(\"<%s-PDU>\\n\", %d, app_key);\n" % (key, len("<%s-PDU>\n" % (key))))
f.write(" xer_encode_local(&asn_DEF_%s_Criticality, &message_p->criticality, cb, app_key, 1);\n" % fileprefix_first_upper)
f.write(" xer_encode_local(&asn_DEF_%s_ProcedureCode, &message_p->procedureCode, cb, app_key, 1);\n" % fileprefix_first_upper)
f.write(" cb(\" <%s>\\n\", %d, app_key);\n" % (key, len(" <%s>\n" % (key))))
for ie in iesDefs[key]["ies"]:
iename = re.sub('-', '_', re.sub('id-', '', ie[0]))
ienameunderscore = re.sub('-', '_', iename)
ienamefirstwordlower = lowerFirstCamelWord(iename)
ietypeunderscore = re.sub('-', '_', ie[2])
ieupperunderscore = re.sub('-', '_', re.sub('id-', '', ie[0])).upper()
if ie[3] != "mandatory":
if ie[3] == "optional":
f.write(" /* Optional field */\n")
elif ie[3] == "conditional":
f.write(" /* Conditional field */\n")
f.write(" if (%s->presenceMask & %s_%s_PRESENT)\n " % (iesStructName, keyupperunderscore, ieupperunderscore))
# Is it an encapsulated IE ?
if ie[2] in ieofielist.keys():
f.write(" %s_xer_print_%s(cb, app_key, &%s->%s);\n" % (fileprefix, re.sub('ies', '', re.sub('-', '_', ie[2]).lower()), iesStructName, ienamefirstwordlower))
else:
f.write(" xer_encode_local(&asn_DEF_%s, &%s->%s, cb, app_key, 2);\n" % (ietypeunderscore, iesStructName, ienamefirstwordlower))
f.write(" cb(\" </%s>\\n\", %d, app_key);\n" % (key, len(" </%s>\n" % (key))))
f.write(" cb(\"</%s-PDU>\\n\", %d, app_key);\n" % (key, len("</%s-PDU>\n" % (key))))
f.write(" ASN__ENCODED_OK(er);\n")
#if key not in ieofielist.values():
#f.write("cb_failed:\n")
#f.write(" return er;\n")
f.write("}\n\n")
#Generate xer print functions
f = open(outdir + fileprefix + '_compare.c', 'w')
outputHeaderToFile(f, filename)
f.write("#include <stdlib.h>\n")
f.write("#include <stdio.h>\n\n")
f.write("#include <asn_application.h>\n#include <asn_internal.h>\n\n")
f.write("#include \"%s_common.h\"\n#include \"%s_ies_defs.h\"\n" % (fileprefix, fileprefix))
f.write("#include \"%s-ProtocolIE-ID.h\"\n\n" % (fileprefix_first_upper))
for (key, value) in iesDefs.items():
if key not in ieofielist.values():
continue
ie = value["ies"][0]
ietypeunderscore = re.sub('-', '_', ie[2])
asn1cStruct = re.sub('-', '_', re.sub('IEs', '', re.sub('-IEs', '', key)))
asn1cStruct = re.sub('Item', 'List', asn1cStruct)
firstwordlower = re.sub('Item', 'List', re.sub('enb', 'eNB', lowerFirstCamelWord(asn1cStruct)))
for (i, j) in ieofielist.items():
if j == key:
break
f.write("extern asn_TYPE_descriptor_t asn_DEF_%s;\n" % (ietypeunderscore))
set(M3AP_GRAMMAR ASN1/m3ap-14.0.0.asn)
set(m3ap_source
ANY.c
asn_application.c
asn_bit_data.c
asn_codecs_prim.c
asn_internal.c
asn_random_fill.c
asn_SEQUENCE_OF.c
asn_SET_OF.c
ber_decoder.c
ber_tlv_length.c
ber_tlv_tag.c
BIT_STRING.c
constraints.c
constr_CHOICE.c
constr_SEQUENCE.c
constr_SEQUENCE_OF.c
constr_SET_OF.c
constr_TYPE.c
der_encoder.c
INTEGER.c
M3AP_Absolute-Time-ofMBMS-Data.c
M3AP_AllocationAndRetentionPriority.c
M3AP_BitRate.c
M3AP_Cause.c
M3AP_CauseMisc.c
M3AP_CauseNAS.c
M3AP_CauseProtocol.c
M3AP_CauseRadioNetwork.c
M3AP_CauseTransport.c
M3AP_Criticality.c
M3AP_CriticalityDiagnostics.c
M3AP_CriticalityDiagnostics-IE-List.c
M3AP_ECGI.c
M3AP_ErrorIndication.c
M3AP_EUTRANCellIdentifier.c
M3AP_ExtendedMCE-ID.c
M3AP_GBR-QosInformation.c
M3AP_Global-MCE-ID.c
M3AP_GTP-TEID.c
M3AP_InitiatingMessage.c
M3AP_IPAddress.c
M3AP_M3AP-PDU.c
M3AP_M3SetupFailure.c
M3AP_M3SetupRequest.c
M3AP_M3SetupResponse.c
M3AP_MBMS-Cell-List.c
M3AP_MBMS-E-RAB-QoS-Parameters.c
M3AP_MBMSServiceArea1.c
M3AP_MBMS-Service-Area.c
M3AP_MBMSServiceAreaListItem.c
M3AP_MBMS-Service-associatedLogicalM3-ConnectionItem.c
M3AP_MBMS-Service-associatedLogicalM3-ConnectionListResAck.c
M3AP_MBMS-Service-associatedLogicalM3-ConnectionListRes.c
M3AP_MBMS-Session-Duration.c
M3AP_MBMS-Session-ID.c
M3AP_MBMSSessionStartFailure.c
M3AP_MBMSSessionStartRequest.c
M3AP_MBMSSessionStartResponse.c
M3AP_MBMSSessionStopRequest.c
M3AP_MBMSSessionStopResponse.c
M3AP_MBMSSessionUpdateFailure.c
M3AP_MBMSSessionUpdateRequest.c
M3AP_MBMSSessionUpdateResponse.c
M3AP_MCEConfigurationUpdateAcknowledge.c
M3AP_MCEConfigurationUpdate.c
M3AP_MCEConfigurationUpdateFailure.c
M3AP_MCE-ID.c
M3AP_MCE-MBMS-M3AP-ID.c
M3AP_MCEname.c
M3AP_MinimumTimeToMBMSDataTransfer.c
M3AP_MME-MBMS-M3AP-ID.c
M3AP_PLMN-Identity.c
M3AP_Pre-emptionCapability.c
M3AP_Pre-emptionVulnerability.c
M3AP_Presence.c
M3AP_PriorityLevel.c
M3AP_PrivateIE-Container.c
M3AP_PrivateIE-Field.c
M3AP_PrivateIE-ID.c
M3AP_PrivateMessage.c
M3AP_ProcedureCode.c
M3AP_ProtocolExtensionContainer.c
M3AP_ProtocolExtensionField.c
M3AP_ProtocolIE-Container.c
M3AP_ProtocolIE-ContainerList.c
M3AP_ProtocolIE-ContainerPair.c
M3AP_ProtocolIE-ContainerPairList.c
M3AP_ProtocolIE-Field.c
M3AP_ProtocolIE-FieldPair.c
M3AP_ProtocolIE-ID.c
M3AP_ProtocolIE-Single-Container.c
M3AP_QCI.c
M3AP_Reestablishment.c
M3AP_ResetAcknowledge.c
M3AP_ResetAll.c
M3AP_Reset.c
M3AP_ResetType.c
M3AP_SuccessfulOutcome.c
M3AP_TimeToWait.c
M3AP_TMGI.c
M3AP_TNL-Information.c
M3AP_TriggeringMessage.c
M3AP_TypeOfError.c
M3AP_UnsuccessfulOutcome.c
NativeEnumerated.c
NativeInteger.c
OBJECT_IDENTIFIER.c
OCTET_STRING.c
OPEN_TYPE.c
per_decoder.c
per_encoder.c
per_opentype.c
per_support.c
PrintableString.c
xer_decoder.c
xer_encoder.c
xer_support.c
)
set(m3ap_headers
ANY.h
asn_application.h
asn_bit_data.h
asn_codecs.h
asn_codecs_prim.h
asn_internal.h
asn_ioc.h
asn_random_fill.h
asn_SEQUENCE_OF.h
asn_SET_OF.h
asn_system.h
ber_decoder.h
ber_tlv_length.h
ber_tlv_tag.h
BIT_STRING.h
constraints.h
constr_CHOICE.h
constr_SEQUENCE.h
constr_SEQUENCE_OF.h
constr_SET_OF.h
constr_TYPE.h
der_encoder.h
INTEGER.h
M3AP_Absolute-Time-ofMBMS-Data.h
M3AP_AllocationAndRetentionPriority.h
M3AP_asn_constant.h
M3AP_BitRate.h
M3AP_Cause.h
M3AP_CauseMisc.h
M3AP_CauseNAS.h
M3AP_CauseProtocol.h
M3AP_CauseRadioNetwork.h
M3AP_CauseTransport.h
M3AP_CriticalityDiagnostics.h
M3AP_CriticalityDiagnostics-IE-List.h
M3AP_Criticality.h
M3AP_ECGI.h
M3AP_ErrorIndication.h
M3AP_EUTRANCellIdentifier.h
M3AP_ExtendedMCE-ID.h
M3AP_GBR-QosInformation.h
M3AP_Global-MCE-ID.h
M3AP_GTP-TEID.h
M3AP_InitiatingMessage.h
M3AP_IPAddress.h
M3AP_M3AP-PDU.h
M3AP_M3SetupFailure.h
M3AP_M3SetupRequest.h
M3AP_M3SetupResponse.h
M3AP_MBMS-Cell-List.h
M3AP_MBMS-E-RAB-QoS-Parameters.h
M3AP_MBMSServiceArea1.h
M3AP_MBMS-Service-Area.h
M3AP_MBMSServiceAreaListItem.h
M3AP_MBMS-Service-associatedLogicalM3-ConnectionItem.h
M3AP_MBMS-Service-associatedLogicalM3-ConnectionListResAck.h
M3AP_MBMS-Service-associatedLogicalM3-ConnectionListRes.h
M3AP_MBMS-Session-Duration.h
M3AP_MBMS-Session-ID.h
M3AP_MBMSSessionStartFailure.h
M3AP_MBMSSessionStartRequest.h
M3AP_MBMSSessionStartResponse.h
M3AP_MBMSSessionStopRequest.h
M3AP_MBMSSessionStopResponse.h
M3AP_MBMSSessionUpdateFailure.h
M3AP_MBMSSessionUpdateRequest.h
M3AP_MBMSSessionUpdateResponse.h
M3AP_MCEConfigurationUpdateAcknowledge.h
M3AP_MCEConfigurationUpdateFailure.h
M3AP_MCEConfigurationUpdate.h
M3AP_MCE-ID.h
M3AP_MCE-MBMS-M3AP-ID.h
M3AP_MCEname.h
M3AP_MinimumTimeToMBMSDataTransfer.h
M3AP_MME-MBMS-M3AP-ID.h
M3AP_PLMN-Identity.h
M3AP_Pre-emptionCapability.h
M3AP_Pre-emptionVulnerability.h
M3AP_Presence.h
M3AP_PriorityLevel.h
M3AP_PrivateIE-Container.h
M3AP_PrivateIE-Field.h
M3AP_PrivateIE-ID.h
M3AP_PrivateMessage.h
M3AP_ProcedureCode.h
M3AP_ProtocolExtensionContainer.h
M3AP_ProtocolExtensionField.h
M3AP_ProtocolIE-Container.h
M3AP_ProtocolIE-ContainerList.h
M3AP_ProtocolIE-ContainerPair.h
M3AP_ProtocolIE-ContainerPairList.h
M3AP_ProtocolIE-Field.h
M3AP_ProtocolIE-FieldPair.h
M3AP_ProtocolIE-ID.h
M3AP_ProtocolIE-Single-Container.h
M3AP_QCI.h
M3AP_Reestablishment.h
M3AP_ResetAcknowledge.h
M3AP_ResetAll.h
M3AP_Reset.h
M3AP_ResetType.h
M3AP_SuccessfulOutcome.h
M3AP_TimeToWait.h
M3AP_TMGI.h
M3AP_TNL-Information.h
M3AP_TriggeringMessage.h
M3AP_TypeOfError.h
M3AP_UnsuccessfulOutcome.h
NativeEnumerated.h
NativeInteger.h
OBJECT_IDENTIFIER.h
OCTET_STRING.h
OPEN_TYPE.h
per_decoder.h
per_encoder.h
per_opentype.h
per_support.h
PrintableString.h
xer_decoder.h
xer_encoder.h
xer_support.h
)
set(M3AP_VERSION 14 0 0)
make_version(M3AP_cc ${M3AP_VERSION})
string(REPLACE ";" "." M3AP_RELEASE "${M3AP_VERSION}")
if(M3AP_RELEASE VERSION_EQUAL "8.9.0")
include(ASN1/m3ap-8.9.0.cmake)
elseif(M3AP_RELEASE VERSION_EQUAL "11.9.0")
include(ASN1/m3ap-11.9.0.cmake)
elseif(M3AP_RELEASE VERSION_EQUAL "12.9.0")
include(ASN1/m3ap-12.9.0.cmake)
elseif(M3AP_RELEASE VERSION_EQUAL "14.0.0")
include(ASN1/m3ap-14.0.0.cmake)
elseif(M3AP_RELEASE VERSION_EQUAL "15.1.0")
include(ASN1/m3ap-15.1.0.cmake)
else()
message(FATAL_ERROR "unknown M3AP_RELEASE ${M3AP_RELEASE}")
endif()
add_custom_command(OUTPUT ${m3ap_source} ${m3ap_headers}
COMMAND ASN1C_PREFIX=M3AP_ asn1c -gen-PER -no-gen-OER -fcompound-names -no-gen-example -fno-include-deps -D ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${M3AP_GRAMMAR}
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${M3AP_GRAMMAR}
COMMENT "Generating M3AP source files from ${CMAKE_CURRENT_SOURCE_DIR}/${M3AP_GRAMMAR}"
)
add_library(asn1_m3ap ${m3ap_source})
target_include_directories(asn1_m3ap PUBLIC "${CMAKE_CURRENT_BINARY_DIR}")
target_compile_options(asn1_m3ap PRIVATE -DASN_DISABLE_OER_SUPPORT -w)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment