Support for SBc-AP protocol as used on the MME-CBC interface

This requires a recent libfftranscode (>=0.5) with SBC-AP support.

The asn files are obtained from 3GPP TS 29.168.

Related: osmo-cbc.git Ib278bc1d1a74459814016fef7a8fe21cc29d46c9
Related: docker-playground.git 5f3c78105836d1f2c229655df3f537a73ab6e12a
Change-Id: Ia6743e0a3e7974a5f2dd3ecf74ec331f646f6bc2
Related: OS#4945
diff --git a/library/sbcap/SBC_AP_PDU_Contents.asn b/library/sbcap/SBC_AP_PDU_Contents.asn
new file mode 100644
index 0000000..1117432
--- /dev/null
+++ b/library/sbcap/SBC_AP_PDU_Contents.asn
@@ -0,0 +1,374 @@
+-- SBC-AP-PDU-Contents.asn
+--
+-- Taken from 3GPP TS 29.168  V15.1.0 (2018-09)
+-- http://www.3gpp.org/ftp/Specs/archive/29_series/29.168/29168-930.zip
+--
+-- 4.4.4	PDU Definitions
+--
+
+-- **************************************************************
+--
+-- PDU definitions for SBC-AP.
+--
+-- **************************************************************
+
+SBC-AP-PDU-Contents {
+itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) 
+eps-Access (21) modules (3) sbc-AP (3) version1 (1) sbc-AP-PDU-Contents (1)}
+
+DEFINITIONS AUTOMATIC TAGS ::= 
+
+BEGIN
+
+-- **************************************************************
+--
+-- IE parameter types from other modules.
+--
+-- **************************************************************
+
+IMPORTS
+	
+	Cause,
+	Concurrent-Warning-Message-Indicator,
+	Criticality-Diagnostics,
+	Data-Coding-Scheme,
+	Message-Identifier,
+	Serial-Number,
+	List-of-TAIs,
+	Warning-Area-List, 
+	Omc-Id,
+	Repetition-Period, 
+	Extended-Repetition-Period,
+	Number-of-Broadcasts-Requested,
+	Warning-Type,
+	Warning-Security-Information,
+	Warning-Message-Content,
+	Warning-Area-Coordinates,
+	Send-Write-Replace-Warning-Indication,
+	Broadcast-Scheduled-Area-List,
+	Unknown-Tracking-Area-List,
+	Send-Stop-Warning-Indication,
+	Broadcast-Cancelled-Area-List,
+	Stop-All-Indicator,
+	Broadcast-Empty-Area-List,
+	Restarted-Cell-List,
+	Global-ENB-ID,
+	List-of-TAIs-Restart,
+	List-of-EAIs-Restart,
+	Failed-Cell-List,
+	List-of-5GS-TAIs,
+	Warning-Area-List-5GS,
+	Global-RAN-Node-ID,
+	Global-GNB-ID,
+	RAT-Selector-5GS,
+	Unknown-5GS-Tracking-Area-List,
+	Broadcast-Scheduled-Area-List-5GS,
+	Broadcast-Cancelled-Area-List-5GS,
+	Broadcast-Empty-Area-List-5GS,
+	Restarted-Cell-List-NR,
+	Failed-Cell-List-NR,
+	List-of-5GS-TAI-for-Restart
+
+FROM SBC-AP-IEs
+
+	ProtocolExtensionContainer{},
+	ProtocolIE-Container{},
+	SBC-AP-PROTOCOL-EXTENSION,
+	SBC-AP-PROTOCOL-IES
+FROM SBC-AP-Containers
+
+	id-Concurrent-Warning-Message-Indicator,
+	id-Criticality-Diagnostics,
+	id-Cause,
+	id-Data-Coding-Scheme,
+	id-List-of-TAIs,
+	id-Message-Identifier,
+	id-Serial-Number,
+	id-Number-of-Broadcasts-Requested, 
+	id-Omc-Id,
+	id-Radio-Resource-Loading-List,
+	id-Recovery-Indication,
+	id-Repetition-Period, 
+	id-Extended-Repetition-Period,
+	id-Warning-Area-List,
+	id-Warning-Message-Content, 
+	id-Warning-Area-Coordinates,
+	id-Warning-Security-Information,
+	id-Warning-Type, 
+	id-Send-Write-Replace-Warning-Indication,
+	id-Broadcast-Scheduled-Area-List,
+	id-Unknown-Tracking-Area-List,
+	id-Send-Stop-Warning-Indication,
+	id-Broadcast-Cancelled-Area-List,
+	id-Stop-All-Indicator,
+	id-Broadcast-Empty-Area-List,
+	id-Global-ENB-ID,
+	id-Restarted-Cell-List,
+	id-List-of-TAIs-Restart,
+	id-List-of-EAIs-Restart,
+	id-Failed-Cell-List,
+	id-List-of-5GS-TAIs,
+	id-Warning-Area-List-5GS,
+	id-Global-RAN-Node-ID,
+	id-Global-GNB-ID,
+	id-RAT-Selector-5GS,
+	id-Unknown-5GS-Tracking-Area-List,
+	id-Broadcast-Scheduled-Area-List-5GS,
+	id-Broadcast-Cancelled-Area-List-5GS,
+	id-Broadcast-Empty-Area-List-5GS,
+	id-Restarted-Cell-List-NR,
+	id-Failed-Cell-List-NR,
+	id-List-of-5GS-TAI-for-Restart
+
+FROM SBC-AP-Constants;
+
+-- **************************************************************
+--
+-- Write-Replace-Warning-Request
+--
+-- **************************************************************
+
+Write-Replace-Warning-Request ::= SEQUENCE {
+	protocolIEs	ProtocolIE-Container      { {Write-Replace-Warning-Request-IEs} },
+	protocolExtensions	ProtocolExtensionContainer { {Write-Replace-Warning-Request-Extensions} } OPTIONAL,
+	...
+}
+
+Write-Replace-Warning-Request-IEs SBC-AP-PROTOCOL-IES ::= {
+	{ ID id-Message-Identifier	CRITICALITY reject	TYPE Message-Identifier	PRESENCE mandatory } |
+	{ ID id-Serial-Number	CRITICALITY reject	TYPE Serial-Number	PRESENCE mandatory } |
+	{ ID id-List-of-TAIs	CRITICALITY reject	TYPE List-of-TAIs	PRESENCE optional } |
+	{ ID id-Warning-Area-List	CRITICALITY ignore	TYPE Warning-Area-List	PRESENCE optional } |
+	{ ID id-Repetition-Period	CRITICALITY reject	TYPE Repetition-Period	PRESENCE mandatory  } |
+	{ ID id-Extended-Repetition-Period	CRITICALITY reject	TYPE Extended-Repetition-Period	PRESENCE optional  } |
+
+	{ ID id-Number-of-Broadcasts-Requested
+		CRITICALITY reject	TYPE Number-of-Broadcasts-Requested	PRESENCE mandatory } |
+	{ ID id-Warning-Type	CRITICALITY ignore	TYPE Warning-Type	PRESENCE optional } |
+	{ ID id-Warning-Security-Information	CRITICALITY ignore	TYPE Warning-Security-Information	PRESENCE optional } |
+	{ ID id-Data-Coding-Scheme	CRITICALITY ignore	TYPE Data-Coding-Scheme	PRESENCE optional } |
+	{ ID id-Warning-Message-Content
+		CRITICALITY ignore	TYPE Warning-Message-Content	PRESENCE optional } |
+	{ ID id-Omc-Id  CRITICALITY ignore TYPE Omc-Id PRESENCE optional } |
+	{ ID id-Concurrent-Warning-Message-Indicator  CRITICALITY reject TYPE Concurrent-Warning-Message-Indicator PRESENCE optional }	|
+	{ ID id-Send-Write-Replace-Warning-Indication	CRITICALITY ignore	TYPE Send-Write-Replace-Warning-Indication	PRESENCE optional }	|
+	{ ID id-Global-ENB-ID	CRITICALITY ignore	TYPE Global-ENB-ID	PRESENCE optional },
+	... ,
+	{ID id-Warning-Area-Coordinates	CRITICALITY ignore TYPE Warning-Area-Coordinates PRESENCE optional}
+}
+
+Write-Replace-Warning-Request-Extensions SBC-AP-PROTOCOL-EXTENSION ::= {
+	{ ID id-List-of-5GS-TAIs	CRITICALITY ignore	EXTENSION List-of-5GS-TAIs	PRESENCE optional }|
+	{ ID id-Warning-Area-List-5GS	CRITICALITY ignore	EXTENSION Warning-Area-List-5GS	PRESENCE optional }|
+	{ ID id-Global-RAN-Node-ID	CRITICALITY ignore	EXTENSION Global-RAN-Node-ID	PRESENCE optional }|
+	{ ID id-RAT-Selector-5GS	CRITICALITY ignore	EXTENSION RAT-Selector-5GS	PRESENCE optional },
+	...
+}
+
+-- **************************************************************
+--
+-- Write-Replace-Warning-Response
+--
+-- **************************************************************
+
+Write-Replace-Warning-Response ::= SEQUENCE {
+	protocolIEs	ProtocolIE-Container       { {Write-Replace-Warning-Response-IEs} },
+	protocolExtensions	ProtocolExtensionContainer { {Write-Replace-Warning-Response-Extensions} } OPTIONAL,
+	...
+}
+
+Write-Replace-Warning-Response-IEs SBC-AP-PROTOCOL-IES ::= {
+	{ ID id-Message-Identifier	CRITICALITY reject	TYPE Message-Identifier	PRESENCE mandatory } |
+	{ ID id-Serial-Number	CRITICALITY reject	TYPE Serial-Number	PRESENCE mandatory } |
+	{ ID id-Cause	CRITICALITY reject	TYPE Cause		PRESENCE mandatory }	|
+	{ ID id-Criticality-Diagnostics	CRITICALITY ignore	TYPE Criticality-Diagnostics	PRESENCE optional } |
+	{ ID id-Unknown-Tracking-Area-List CRITICALITY ignore	TYPE List-of-TAIs	PRESENCE optional },
+	...
+}
+
+Write-Replace-Warning-Response-Extensions SBC-AP-PROTOCOL-EXTENSION ::= {
+	{ ID id-Unknown-5GS-Tracking-Area-List	CRITICALITY ignore	EXTENSION Unknown-5GS-Tracking-Area-List	PRESENCE optional },
+	...
+}
+
+-- **************************************************************
+--
+-- Stop-Warning-Request
+--
+-- **************************************************************
+
+Stop-Warning-Request ::= SEQUENCE {
+	protocolIEs	ProtocolIE-Container      { {Stop-Warning-Request-IEs} },
+	protocolExtensions	ProtocolExtensionContainer { {Stop-Warning-Request-Extensions} } OPTIONAL,
+	...
+}
+
+Stop-Warning-Request-IEs SBC-AP-PROTOCOL-IES ::= {
+	{ ID id-Message-Identifier	CRITICALITY reject	TYPE Message-Identifier	PRESENCE mandatory } |
+	{ ID id-Serial-Number	CRITICALITY reject	TYPE Serial-Number	PRESENCE mandatory } |
+	{ ID id-List-of-TAIs	CRITICALITY reject	TYPE List-of-TAIs	PRESENCE optional } |
+	{ ID id-Warning-Area-List	CRITICALITY ignore	TYPE Warning-Area-List	PRESENCE optional }|
+	{ ID id-Omc-Id  CRITICALITY ignore TYPE Omc-Id PRESENCE optional } |
+	{ ID id-Send-Stop-Warning-Indication	CRITICALITY ignore	TYPE Send-Stop-Warning-Indication	PRESENCE optional } |
+	{ ID id-Stop-All-Indicator	CRITICALITY reject 	TYPE Stop-All-Indicator	PRESENCE optional},
+	...	
+}
+
+Stop-Warning-Request-Extensions SBC-AP-PROTOCOL-EXTENSION ::= {
+	{ ID id-List-of-5GS-TAIs	CRITICALITY ignore	EXTENSION List-of-5GS-TAIs	PRESENCE optional }|
+	{ ID id-Warning-Area-List-5GS	CRITICALITY ignore	EXTENSION Warning-Area-List-5GS	PRESENCE optional } |	{ ID id-RAT-Selector-5GS	CRITICALITY ignore	EXTENSION RAT-Selector-5GS	PRESENCE optional },
+	...
+}
+
+-- **************************************************************
+--
+-- Stop-Warning-Response
+--
+-- **************************************************************
+
+Stop-Warning-Response ::= SEQUENCE {
+	protocolIEs	ProtocolIE-Container       { {Stop-Warning-Response-IEs} },
+	protocolExtensions	ProtocolExtensionContainer { {Stop-Warning-Response-Extensions} } OPTIONAL,
+	...
+}
+
+Stop-Warning-Response-IEs SBC-AP-PROTOCOL-IES ::= {
+	{ ID id-Message-Identifier	CRITICALITY reject	TYPE Message-Identifier	PRESENCE mandatory } |
+	{ ID id-Serial-Number	CRITICALITY reject	TYPE Serial-Number	PRESENCE mandatory } |
+	{ ID id-Cause	CRITICALITY reject	TYPE Cause		PRESENCE mandatory }	|
+	{ ID id-Criticality-Diagnostics	CRITICALITY ignore	TYPE Criticality-Diagnostics	PRESENCE optional } |
+	{ ID id-Unknown-Tracking-Area-List CRITICALITY ignore	TYPE List-of-TAIs	PRESENCE optional },
+	...
+}
+
+Stop-Warning-Response-Extensions SBC-AP-PROTOCOL-EXTENSION ::= {
+	{ ID id-Unknown-5GS-Tracking-Area-List	CRITICALITY ignore	EXTENSION Unknown-5GS-Tracking-Area-List	PRESENCE optional },
+	...
+}
+
+-- **************************************************************
+--
+-- Write-Replace-Warning-Indication
+--
+-- **************************************************************
+
+Write-Replace-Warning-Indication ::= SEQUENCE {
+	protocolIEs	ProtocolIE-Container       { {Write-Replace-Warning-Indication-IEs} },
+	protocolExtensions	ProtocolExtensionContainer { {Write-Replace-Warning-Indication-Extensions} } OPTIONAL,
+	...
+}
+
+Write-Replace-Warning-Indication-IEs SBC-AP-PROTOCOL-IES ::= {
+	{ ID id-Message-Identifier	CRITICALITY reject	TYPE Message-Identifier	PRESENCE mandatory } |
+	{ ID id-Serial-Number	CRITICALITY reject	TYPE Serial-Number	PRESENCE mandatory } |
+	{ ID id-Broadcast-Scheduled-Area-List	CRITICALITY reject	TYPE Broadcast-Scheduled-Area-List	PRESENCE optional },
+	...
+}
+
+Write-Replace-Warning-Indication-Extensions SBC-AP-PROTOCOL-EXTENSION ::= {
+	{ ID id-Broadcast-Scheduled-Area-List-5GS	CRITICALITY ignore	EXTENSION Broadcast-Scheduled-Area-List-5GS	PRESENCE optional },
+
+	...
+}
+
+-- **************************************************************
+--
+-- Stop-Warning-Indication
+--
+-- **************************************************************
+
+Stop-Warning-Indication ::= SEQUENCE {
+	protocolIEs	ProtocolIE-Container       { {Stop-Warning-Indication-IEs} },
+	protocolExtensions	ProtocolExtensionContainer { {Stop-Warning-Indication-Extensions} } OPTIONAL,
+	...
+}
+
+Stop-Warning-Indication-IEs SBC-AP-PROTOCOL-IES ::= {
+	{ ID id-Message-Identifier	CRITICALITY reject	TYPE Message-Identifier	PRESENCE mandatory } |
+	{ ID id-Serial-Number	CRITICALITY reject	TYPE Serial-Number	PRESENCE mandatory } |
+	{ ID id-Broadcast-Cancelled-Area-List	CRITICALITY reject	TYPE Broadcast-Cancelled-Area-List	PRESENCE optional }|
+	{ ID id-Broadcast-Empty-Area-List	CRITICALITY ignore	TYPE Broadcast-Empty-Area-List	PRESENCE optional },
+	...
+}
+
+Stop-Warning-Indication-Extensions SBC-AP-PROTOCOL-EXTENSION ::= {
+	{ ID id-Broadcast-Cancelled-Area-List-5GS	CRITICALITY ignore	EXTENSION Broadcast-Cancelled-Area-List-5GS	PRESENCE optional }|
+	{ ID id-Broadcast-Empty-Area-List-5GS	CRITICALITY ignore	EXTENSION Broadcast-Empty-Area-List-5GS	PRESENCE optional },
+	...
+}
+
+-- **************************************************************
+--
+-- PWS-Restart-Indication
+--
+-- **************************************************************
+
+PWS-Restart-Indication ::= SEQUENCE {
+	protocolIEs	ProtocolIE-Container       { {PWS-Restart-Indication-IEs} },
+	protocolExtensions	ProtocolExtensionContainer { {PWS-Restart-Indication-Extensions} } OPTIONAL,
+	...
+}
+
+PWS-Restart-Indication-IEs SBC-AP-PROTOCOL-IES ::= {
+	{ ID id-Restarted-Cell-List	CRITICALITY reject	TYPE Restarted-Cell-List	PRESENCE mandatory }|
+	{ ID id-Global-ENB-ID	CRITICALITY reject	TYPE Global-ENB-ID	PRESENCE mandatory } |
+	{ ID id-List-of-TAIs-Restart	CRITICALITY reject	TYPE List-of-TAIs-Restart	PRESENCE mandatory } |
+	{ ID id-List-of-EAIs-Restart	CRITICALITY reject	TYPE List-of-EAIs-Restart	PRESENCE optional },
+	...
+}
+
+PWS-Restart-Indication-Extensions SBC-AP-PROTOCOL-EXTENSION ::= {
+	{ ID id-Restarted-Cell-List-NR	CRITICALITY ignore	EXTENSION Restarted-Cell-List-NR	PRESENCE optional }|
+	{ ID id-List-of-5GS-TAI-for-Restart	CRITICALITY ignore	EXTENSION List-of-5GS-TAI-for-Restart	PRESENCE optional }|
+{ ID id-Global-GNB-ID	CRITICALITY ignore	EXTENSION Global-GNB-ID	PRESENCE optional },
+	...
+}
+
+-- **************************************************************
+--
+-- PWS-Failure-Indication
+--
+-- **************************************************************
+
+PWS-Failure-Indication ::= SEQUENCE {
+	protocolIEs	ProtocolIE-Container       { {PWS-Failure-Indication-IEs} },
+	protocolExtensions	ProtocolExtensionContainer { {PWS-Failure-Indication-Extensions} } OPTIONAL,
+	...
+}
+
+PWS-Failure-Indication-IEs SBC-AP-PROTOCOL-IES ::= {
+	{ ID id-Failed-Cell-List	CRITICALITY reject	TYPE Failed-Cell-List	PRESENCE mandatory }|
+	{ ID id-Global-ENB-ID	CRITICALITY reject	TYPE Global-ENB-ID	PRESENCE mandatory },
+	...
+}
+
+PWS-Failure-Indication-Extensions SBC-AP-PROTOCOL-EXTENSION ::= {
+	{ ID id-Failed-Cell-List-NR	CRITICALITY ignore	EXTENSION Failed-Cell-List-NR	PRESENCE optional }|
+	{ ID id-Global-GNB-ID	CRITICALITY ignore	EXTENSION Global-GNB-ID	PRESENCE optional },
+	...
+}
+
+-- **************************************************************
+--
+-- ERROR INDICATION ELEMENTARY PROCEDURE
+--
+-- **************************************************************
+
+-- **************************************************************
+--
+-- Error Indication
+--
+-- **************************************************************
+
+Error-Indication ::= SEQUENCE {
+	protocolIEs	ProtocolIE-Container       {{ErrorIndicationIEs}},
+	...
+}
+
+ErrorIndicationIEs SBC-AP-PROTOCOL-IES ::= {
+	{ ID id-Cause		CRITICALITY ignore	TYPE Cause		PRESENCE optional	} |
+	{ ID id-Criticality-Diagnostics	CRITICALITY ignore	TYPE Criticality-Diagnostics	PRESENCE optional	} ,
+	...
+}
+
+END