This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15589 Change subject: SABP (Service Area Broadcast Protocol) definitions ...................................................................... SABP (Service Area Broadcast Protocol) definitions Using ASN.1 syntax copy+pasted from 3GPP TS 25.419 version 15.0.0 Release 15 Change-Id: Iab44cca10a664bbe2823a4183bca055ac8851137 --- A library/sabp/SABP_CommonDataTypes.asn A library/sabp/SABP_Constants.asn A library/sabp/SABP_Containers.asn A library/sabp/SABP_EncDec.cc A library/sabp/SABP_IEs.asn A library/sabp/SABP_PDU_Contents.asn A library/sabp/SABP_PDU_Descriptions.asn A library/sabp/SABP_Templates.ttcn A library/sabp/SABP_Types.ttcn 9 files changed, 1,747 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/89/15589/1 diff --git a/library/sabp/SABP_CommonDataTypes.asn b/library/sabp/SABP_CommonDataTypes.asn new file mode 100644 index 0000000..92f3e12 --- /dev/null +++ b/library/sabp/SABP_CommonDataTypes.asn @@ -0,0 +1,16 @@ +-- +-- Common definitions +-- +-- ************************************************************** +SABP-CommonDataTypes { +itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) +umts-Access (20) modules (3) sabp (3) version1 (1) sabp-CommonDataTypes (3) } +DEFINITIONS AUTOMATIC TAGS ::= +BEGIN +Criticality ::= ENUMERATED { reject, ignore, notify } +Presence ::= ENUMERATED { optional, conditional, mandatory } +ProcedureCode ::= INTEGER (0..255) +ProtocolExtensionID ::= INTEGER (0..65535) +ProtocolIE-ID ::= INTEGER (0..65535) +TriggeringMessage ::= ENUMERATED {initiating-message, successful-outcome, unsuccessful-outcome, outcome} +END diff --git a/library/sabp/SABP_Constants.asn b/library/sabp/SABP_Constants.asn new file mode 100644 index 0000000..5b390a9 --- /dev/null +++ b/library/sabp/SABP_Constants.asn @@ -0,0 +1,66 @@ +-- ************************************************************** +-- +-- Constant definitions +-- +-- ************************************************************** +SABP-Constants { +itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) +umts-Access (20) modules (3) sabp (3) version1 (1) sabp-Constants (4) } +DEFINITIONS AUTOMATIC TAGS ::= +BEGIN +-- ************************************************************** +-- +-- Elementary Procedures +-- +-- ************************************************************** +id-Write-Replace INTEGER ::= 0 +id-Kill INTEGER ::= 1 +id-Load-Status-Enquiry INTEGER ::= 2 +id-Message-Status-Query INTEGER ::= 3 +id-Restart-Indication INTEGER ::= 4 +id-Reset INTEGER ::= 5 +id-Failure-Indication INTEGER ::= 6 +id-Error-Indication INTEGER ::= 7 +-- ************************************************************** +-- +-- IEs +-- +-- ************************************************************** +id-Broadcast-Message-Content INTEGER ::= 0 +id-Category INTEGER ::= 1 +id-Cause INTEGER ::= 2 +id-Criticality-Diagnostics INTEGER ::=3 +id-Data-Coding-Scheme INTEGER ::= 4 +id-Failure-List INTEGER ::= 5 +id-Message-Identifier INTEGER ::= 6 +id-New-Serial-Number INTEGER ::= 7 +id-Number-of-Broadcasts-Completed-List INTEGER ::= 8 +id-Number-of-Broadcasts-Requested INTEGER ::= 9 +id-Old-Serial-Number INTEGER ::= 10 +id-Radio-Resource-Loading-List INTEGER ::= 11 +id-Recovery-Indication INTEGER ::= 12 +id-Repetition-Period INTEGER ::= 13 +id-Serial-Number INTEGER ::= 14 +id-Service-Areas-List INTEGER ::= 15 +id-MessageStructure INTEGER ::= 16 +id-TypeOfError INTEGER ::= 17 +id-Paging-ETWS-Indicator INTEGER ::= 18 +id-Warning-Type INTEGER ::= 19 +id-WarningSecurityInfo INTEGER ::= 20 +id-Broadcast-Message-Content-Validity-Indicator INTEGER ::= 21 +-- ************************************************************** +-- +-- Extension constants +-- +-- ************************************************************** +-- ************************************************************** +-- +-- Lists +-- +-- ************************************************************** +maxNrOfErrors INTEGER ::= 256 +maxnoofSAI INTEGER ::= 65535 +maxProtocolExtensions INTEGER ::= 65535 +maxProtocolIEs INTEGER ::= 65535 +maxNrOfLevels INTEGER ::= 256 +END diff --git a/library/sabp/SABP_Containers.asn b/library/sabp/SABP_Containers.asn new file mode 100644 index 0000000..0aea9cc --- /dev/null +++ b/library/sabp/SABP_Containers.asn @@ -0,0 +1,94 @@ +-- ************************************************************** +-- +-- Container definitions +-- +-- ************************************************************** +SABP-Containers { +itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) +umts-Access (20) modules (3) sabp (3) version1 (1) sabp-Containers (5) } +DEFINITIONS AUTOMATIC TAGS ::= +BEGIN +-- ************************************************************** +-- +-- IE parameter types from other modules. +-- +-- ************************************************************** +IMPORTS + Criticality, + Presence, + ProtocolExtensionID, + ProtocolIE-ID +FROM SABP-CommonDataTypes + maxProtocolExtensions, + maxProtocolIEs +FROM SABP-Constants; +-- ************************************************************** +-- +-- Class Definition for Protocol IEs +-- +-- ************************************************************** +SABP-PROTOCOL-IES ::= CLASS { + &id ProtocolIE-ID UNIQUE, + &criticality Criticality DEFAULT ignore, + &Value, + &presence Presence +} +WITH SYNTAX { + ID &id + CRITICALITY &criticality + TYPE &Value + PRESENCE &presence +} + +-- ************************************************************** +-- +-- Class Definition for Protocol Extensions +-- +-- ************************************************************** +SABP-PROTOCOL-EXTENSION ::= CLASS { + &id ProtocolExtensionID UNIQUE, + &criticality Criticality DEFAULT ignore, + &Extension, + &presence Presence +} +WITH SYNTAX { + ID &id + CRITICALITY &criticality + EXTENSION &Extension + PRESENCE &presence +} +-- ************************************************************** +-- +-- Container for Protocol IEs +-- +-- ************************************************************** +ProtocolIE-Container {SABP-PROTOCOL-IES : IEsSetParam} ::= + SEQUENCE (SIZE (0..maxProtocolIEs)) OF + ProtocolIE-Field {{IEsSetParam}} +ProtocolIE-Field {SABP-PROTOCOL-IES : IEsSetParam} ::= SEQUENCE { + id SABP-PROTOCOL-IES.&id ({IEsSetParam}), + criticality SABP-PROTOCOL-IES.&criticality ({IEsSetParam}{@id}), + value SABP-PROTOCOL-IES.&Value ({IEsSetParam}{@id}) +} +-- ************************************************************** +-- +-- Container Lists for Protocol IE Containers +-- +-- ************************************************************** +ProtocolIE-ContainerList {INTEGER : lowerBound, INTEGER : upperBound, SABP-PROTOCOL-IES : IEsSetParam} ::= + SEQUENCE (SIZE (lowerBound..upperBound)) OF + ProtocolIE-Container {{IEsSetParam}} +-- ************************************************************** +-- +-- Container for Protocol Extensions +-- +-- ************************************************************** +ProtocolExtensionContainer {SABP-PROTOCOL-EXTENSION : ExtensionSetParam} ::= + SEQUENCE (SIZE (1..maxProtocolExtensions)) OF + ProtocolExtensionField {{ExtensionSetParam}} +ProtocolExtensionField {SABP-PROTOCOL-EXTENSION : ExtensionSetParam} ::= SEQUENCE { + id SABP-PROTOCOL-EXTENSION.&id ({ExtensionSetParam}), + criticality SABP-PROTOCOL-EXTENSION.&criticality ({ExtensionSetParam}{@id}), + extensionValue SABP-PROTOCOL-EXTENSION.&Extension ({ExtensionSetParam}{@id}) +} +END diff --git a/library/sabp/SABP_EncDec.cc b/library/sabp/SABP_EncDec.cc new file mode 100644 index 0000000..3c60e82 --- /dev/null +++ b/library/sabp/SABP_EncDec.cc @@ -0,0 +1,64 @@ + +#include <string.h> +#include <stdarg.h> +#include "SABP_PDU_Descriptions.hh" + +extern "C" { +#include <fftranscode/transcode.h> +} + +namespace SABP__Types { + +TTCN_Module SABP__EncDec("SABP_EncDec", __DATE__, __TIME__); + +OCTETSTRING enc__SABP__PDU(const SABP__PDU__Descriptions::SABP__PDU &pdu) +{ + uint8_t *aper_buf; + int aper_buf_len; + TTCN_Buffer TTCN_buf; + TTCN_buf.clear(); + + /* Encode from abstract data type into BER/DER */ + pdu.encode(SABP__PDU__Descriptions::SABP__PDU_descr_, TTCN_buf, + TTCN_EncDec::CT_BER, BER_ENCODE_DER); + + aper_buf_len = fftranscode_ber2aper(FFTRANSC_T_SABP, &aper_buf, TTCN_buf.get_data(), TTCN_buf.get_len()); + if (aper_buf_len < 0) { + TTCN_error("fftranscode failed."); + } + + /* make octetstring from output buffer */ + OCTETSTRING ret_val(aper_buf_len, aper_buf); + + /* release dynamically-allocated output buffer */ + fftranscode_free(aper_buf); + + return ret_val; +} + +SABP__PDU__Descriptions::SABP__PDU dec__SABP__PDU(const OCTETSTRING &stream) +{ + uint8_t *ber_buf; + int ber_buf_len; + + /* First, decode APER + re-encode as BER */ + ber_buf_len = fftranscode_aper2ber(FFTRANSC_T_SABP, &ber_buf, (const unsigned char *)stream, stream.lengthof()); + if (ber_buf_len < 0) { + TTCN_error("fftranscode failed."); + } + + /* Then, re-encode from BER to TITAN representation */ + SABP__PDU__Descriptions::SABP__PDU ret_dcc; + TTCN_Buffer TTCN_buf; + TTCN_buf.clear(); + TTCN_buf.put_s(ber_buf_len, ber_buf); + + ret_dcc.decode(SABP__PDU__Descriptions::SABP__PDU_descr_, TTCN_buf, + TTCN_EncDec::CT_BER, BER_ACCEPT_ALL); + + fftranscode_free(ber_buf); + + return ret_dcc; +} + +} diff --git a/library/sabp/SABP_IEs.asn b/library/sabp/SABP_IEs.asn new file mode 100644 index 0000000..e21e007 --- /dev/null +++ b/library/sabp/SABP_IEs.asn @@ -0,0 +1,203 @@ +-- ************************************************************** +-- +-- Information Element Definitions +-- +-- ************************************************************** +SABP-IEs { +itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) +umts-Access (20) modules (3) sabp (3) version1 (1) sabp-IEs (2) } +DEFINITIONS AUTOMATIC TAGS ::= +BEGIN +IMPORTS + maxNrOfErrors, + maxnoofSAI, + maxNrOfLevels, + id-MessageStructure, + id-TypeOfError +FROM SABP-Constants + Criticality, + ProcedureCode, + TriggeringMessage, + ProtocolIE-ID +FROM SABP-CommonDataTypes + ProtocolExtensionContainer{}, + SABP-PROTOCOL-EXTENSION +FROM SABP-Containers; +-- A +Available-Bandwidth ::= INTEGER (0..20480) +-- bits/sec +-- B +Broadcast-Message-Content ::= BIT STRING (SIZE (1..9968))-- This IE is sent from the CN to the RNC containing user information i.e. +-- the message. +Broadcast-Message-Content-Validity-Indicator ::= ENUMERATED { + broadcast-Message-Content-not-valid, + ... +} +-- C +Category ::= ENUMERATED { + high-priority, + background-priority, + normal-priority, + default-priority, + ... +} +Cause ::= INTEGER { + parameter-not-recognised (0), + parameter-value-invalid (1), + valid-CN-message-not-identified (2), + service-area-identity-not-valid (3), + unrecognised-message (4), + missing-mandatory-element (5), + rNC-capacity-exceeded (6), + rNC-memory-exceeded (7), + service-area-broadcast-not-supported (8), + service-area-broadcast-not-operational (9), + message-reference-already-used (10), + unspecifed-error (11), + transfer-syntax-error (12), + semantic-error (13), + message-not-compatible-with-receiver-state (14), + abstract-syntax-error-reject (15), + abstract-syntax-error-ignore-and-notify (16), + abstract-syntax-error-falsely-constructed-message (17) +} (0..255) +Criticality-Diagnostics ::= SEQUENCE { + procedureCode ProcedureCode OPTIONAL, + triggeringMessage TriggeringMessage OPTIONAL, + procedureCriticality Criticality OPTIONAL, + iEsCriticalityDiagnostics CriticalityDiagnostics-IE-List OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {CriticalityDiagnostics-ExtIEs} } OPTIONAL, + ... +} +CriticalityDiagnostics-ExtIEs SABP-PROTOCOL-EXTENSION ::= { + ... +} +CriticalityDiagnostics-IE-List ::= SEQUENCE (SIZE (1..maxNrOfErrors)) OF + SEQUENCE { + iECriticality Criticality, + iE-ID ProtocolIE-ID, + repetitionNumber RepetitionNumber0 OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {CriticalityDiagnostics-IE-List-ExtIEs} } OPTIONAL, + ... + } +CriticalityDiagnostics-IE-List-ExtIEs SABP-PROTOCOL-EXTENSION ::= { + { ID id-MessageStructure CRITICALITY ignore EXTENSION MessageStructure PRESENCE optional }| + { ID id-TypeOfError CRITICALITY ignore EXTENSION TypeOfError PRESENCE mandatory }, + ... +} +MessageStructure ::= SEQUENCE (SIZE (1..maxNrOfLevels)) OF + SEQUENCE { + iE-ID ProtocolIE-ID, + repetitionNumber RepetitionNumber1 OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {MessageStructure-ExtIEs} } OPTIONAL, + ... + } +MessageStructure-ExtIEs SABP-PROTOCOL-EXTENSION ::= { + ... +} +-- D +Data-Coding-Scheme ::= BIT STRING (SIZE (8)) +-- E +-- F +Failure-List ::= SEQUENCE (SIZE (1..maxnoofSAI)) OF Failure-List-Item +Failure-List-Item ::= SEQUENCE { + service-area-identifier Service-Area-Identifier, + cause Cause, + iE-Extensions ProtocolExtensionContainer { {FailureListItemIE-ExtIEs} } OPTIONAL, + ... +} +FailureListItemIE-ExtIEs SABP-PROTOCOL-EXTENSION ::= { +... +} +-- G +-- H +-- I +-- J +-- K +-- L +-- M +Message-Identifier ::= BIT STRING (SIZE (16)) +-- N +New-Serial-Number ::= Serial-Number +Number-of-Broadcasts-Completed-List ::= SEQUENCE (SIZE (1..maxnoofSAI)) OF + Number-of-Broadcasts-Completed-List-Item +Number-of-Broadcasts-Completed-List-Item ::= SEQUENCE { + service-area-identifier Service-Area-Identifier, + number-of-broadcasts-completed INTEGER (0..65535), + number-of-broadcasts-completed-info Number-Of-Broadcasts-Completed-Info OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {NoOfBroadcastsCompletedListItemIE-ExtIEs} } OPTIONAL, + ... +} +NoOfBroadcastsCompletedListItemIE-ExtIEs SABP-PROTOCOL-EXTENSION ::= { +... +} +Number-Of-Broadcasts-Completed-Info ::= ENUMERATED { + overflow, + unknown, + ... +} +Number-of-Broadcasts-Requested ::= INTEGER { + broadcast-indefinitely (0) +} (0..65535) +-- O +Old-Serial-Number ::= Serial-Number +-- P +Paging-ETWS-Indicator ::= ENUMERATED { + paging, + ... +} +-- Q +-- R +Radio-Resource-Loading-List ::= SEQUENCE (SIZE (1..maxnoofSAI)) OF + Radio-Resource-Loading-List-Item +Radio-Resource-Loading-List-Item ::= SEQUENCE { + service-area-identifier Service-Area-Identifier, + available-bandwidth Available-Bandwidth, + iE-Extensions ProtocolExtensionContainer { {RadioResourceLoadingListItemIE-ExtIEs} } OPTIONAL, + ... +} +RadioResourceLoadingListItemIE-ExtIEs SABP-PROTOCOL-EXTENSION ::= { +... +} +Recovery-Indication ::= ENUMERATED { + data-lost, + data-available +} +RepetitionNumber0 ::= INTEGER(0..255) +RepetitionNumber1 ::= INTEGER(1..256) +Repetition-Period ::= INTEGER (1..4096) +-- Each unit represents a repetition of one second to a maximum of +-- once per 4096 seconds (~1 hour). +-- S +Serial-Number ::= BIT STRING (SIZE (16)) +Service-Area-Identifier ::= SEQUENCE { + pLMNidentity OCTET STRING (SIZE (3)) + -- Digits 0 to 9, two digits per octet. -- + -- Each octet encoded 0000 to 1001. -- + -- 1111 used as filler -- + -- Bit 4 to 1 of octet n encoding digit 2n-1. -- + -- Bit 8 to 5 of octet n encoding digit 2n. -- + -- The PLMN identity consists of 3 digits from MCC -- + -- followed by either a filler plus 2 digits -- + -- from MNC (in case of 2 digit MNC) or 3 digits -- + -- from MNC (in case of 3 digit MNC). -- , + lac OCTET STRING (SIZE (2)) + -- 0000 and FFFE not allowed -- , + sac OCTET STRING (SIZE (2)) +} +-- **TODO** The IE type for these parameters is not known as yet +Service-Areas-List ::= SEQUENCE (SIZE (1..maxnoofSAI)) OF Service-Area-Identifier +-- T +TypeOfError ::= ENUMERATED { + not-understood, + missing, + ... +} +-- U +-- V +-- W +WarningSecurityInfo ::= OCTET STRING (SIZE (50)) +Warning-Type ::= OCTET STRING (SIZE(2)) +-- X +-- Y +END diff --git a/library/sabp/SABP_PDU_Contents.asn b/library/sabp/SABP_PDU_Contents.asn new file mode 100644 index 0000000..814da2f --- /dev/null +++ b/library/sabp/SABP_PDU_Contents.asn @@ -0,0 +1,447 @@ +-- ************************************************************** +-- +-- PDU definitions for SABP. +-- +-- ************************************************************** +SABP-PDU-Contents { +itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) +umts-Access (20) modules (3) sabp (3) version1 (1) sabp-PDU-Contents (1) } +DEFINITIONS AUTOMATIC TAGS ::= +BEGIN +-- ************************************************************** +-- +-- IE parameter types from other modules. +-- +-- ************************************************************** +IMPORTS + Broadcast-Message-Content, + Category, + Cause, +Criticality-Diagnostics, + Data-Coding-Scheme, + Failure-List, + Message-Identifier, + New-Serial-Number, + Number-of-Broadcasts-Completed-List, + Number-of-Broadcasts-Requested, + Old-Serial-Number, + Paging-ETWS-Indicator, + Radio-Resource-Loading-List, + Recovery-Indication, + Repetition-Period, + Serial-Number, + Service-Areas-List, + WarningSecurityInfo, + Warning-Type, + Broadcast-Message-Content-Validity-Indicator +FROM SABP-IEs + ProtocolExtensionContainer{}, + ProtocolIE-Container{}, + SABP-PROTOCOL-EXTENSION, + SABP-PROTOCOL-IES +FROM SABP-Containers + id-Broadcast-Message-Content, + id-Category, + id-Criticality-Diagnostics, + id-Cause, + id-Data-Coding-Scheme, + id-Failure-List, + id-Message-Identifier, + id-New-Serial-Number, + id-Number-of-Broadcasts-Completed-List, + id-Number-of-Broadcasts-Requested, + id-Old-Serial-Number, + id-Paging-ETWS-Indicator, + id-Radio-Resource-Loading-List, + id-Recovery-Indication, + id-Repetition-Period, + id-Serial-Number, + id-Service-Areas-List, + id-WarningSecurityInfo, + id-Warning-Type, + id-Broadcast-Message-Content-Validity-Indicator +FROM SABP-Constants; +-- ************************************************************** +-- +-- Write-Replace +-- +-- ************************************************************** +Write-Replace ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {Write-Replace-IEs} }, + protocolExtensions ProtocolExtensionContainer { {Write-Replace-Extensions} } OPTIONAL, + ... +} +Write-Replace-IEs SABP-PROTOCOL-IES ::= { + { ID id-Message-Identifier CRITICALITY reject TYPE Message-Identifier PRESENCE mandatory } | + { ID id-New-Serial-Number CRITICALITY reject TYPE New-Serial-Number PRESENCE mandatory } | + { ID id-Old-Serial-Number CRITICALITY ignore TYPE Old-Serial-Number PRESENCE optional } | + { ID id-Service-Areas-List CRITICALITY reject TYPE Service-Areas-List PRESENCE mandatory } | + { ID id-Category CRITICALITY ignore TYPE Category PRESENCE optional } | + { ID id-Repetition-Period CRITICALITY reject TYPE Repetition-Period PRESENCE mandatory } | + { ID id-Number-of-Broadcasts-Requested + CRITICALITY reject TYPE Number-of-Broadcasts-Requested PRESENCE mandatory } | + { ID id-Data-Coding-Scheme CRITICALITY reject TYPE Data-Coding-Scheme PRESENCE mandatory } | + { ID id-Broadcast-Message-Content + CRITICALITY reject TYPE Broadcast-Message-Content PRESENCE mandatory }, + ... +} +Write-Replace-Extensions SABP-PROTOCOL-EXTENSION ::= { + { ID id-WarningSecurityInfo CRITICALITY ignore EXTENSION WarningSecurityInfo PRESENCE optional } | + { ID id-Paging-ETWS-Indicator CRITICALITY ignore EXTENSION Paging-ETWS-Indicator PRESENCE optional } | + { ID id-Warning-Type CRITICALITY ignore EXTENSION Warning-Type PRESENCE optional } | + { ID id-Broadcast-Message-Content-Validity-Indicator CRITICALITY ignore EXTENSION Broadcast-Message-Content-Validity-Indicator PRESENCE +optional }, + ... +} +-- ************************************************************** +-- +-- Write-Replace-Complete +-- +-- ************************************************************** +Write-Replace-Complete ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {Write-Replace-Complete-IEs} }, + protocolExtensions ProtocolExtensionContainer { {Write-Replace-Complete-Extensions} } OPTIONAL, + ... +} +Write-Replace-Complete-IEs SABP-PROTOCOL-IES ::= { + { ID id-Message-Identifier CRITICALITY reject TYPE Message-Identifier PRESENCE mandatory } | + { ID id-New-Serial-Number CRITICALITY reject TYPE New-Serial-Number PRESENCE mandatory } | + { ID id-Number-of-Broadcasts-Completed-List + CRITICALITY reject TYPE Number-of-Broadcasts-Completed-List + PRESENCE mandatory }| +{ ID id-Criticality-Diagnostics +CRITICALITY ignore TYPE Criticality-Diagnostics PRESENCE optional }, + ... +} +Write-Replace-Complete-Extensions SABP-PROTOCOL-EXTENSION ::= { + ... +} +-- ************************************************************** +-- +-- Write-Replace-Failure +-- +-- ************************************************************** +Write-Replace-Failure ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {Write-Replace-Failure-IEs} }, + protocolExtensions ProtocolExtensionContainer { {Write-Replace-Failure-Extensions} } OPTIONAL, + ... +} +Write-Replace-Failure-IEs SABP-PROTOCOL-IES ::= { + { ID id-Message-Identifier CRITICALITY reject TYPE Message-Identifier PRESENCE mandatory } | + { ID id-New-Serial-Number CRITICALITY reject TYPE New-Serial-Number PRESENCE mandatory } | + { ID id-Failure-List CRITICALITY reject TYPE Failure-List PRESENCE mandatory } | + { ID id-Number-of-Broadcasts-Completed-List + CRITICALITY ignore TYPE Number-of-Broadcasts-Completed-List + PRESENCE optional } | +{ ID id-Criticality-Diagnostics +CRITICALITY ignore TYPE Criticality-Diagnostics PRESENCE optional }, + ... +} +Write-Replace-Failure-Extensions SABP-PROTOCOL-EXTENSION ::= { + ... +} +-- ************************************************************** +-- +-- Kill +-- +-- ************************************************************** +Kill ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{Kill-IEs}}, + protocolExtensions ProtocolExtensionContainer {{Kill-Extensions}} OPTIONAL, + ... +} +Kill-IEs SABP-PROTOCOL-IES ::= { + { ID id-Message-Identifier CRITICALITY reject TYPE Message-Identifier PRESENCE mandatory } | + { ID id-Old-Serial-Number CRITICALITY reject TYPE Old-Serial-Number PRESENCE mandatory } | + { ID id-Service-Areas-List CRITICALITY reject TYPE Service-Areas-List PRESENCE mandatory } , + ... +} +Kill-Extensions SABP-PROTOCOL-EXTENSION ::= { + ... +} +-- ************************************************************** +-- +-- Kill-Complete +-- +-- ************************************************************** +Kill-Complete ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{Kill-Complete-IEs}}, + protocolExtensions ProtocolExtensionContainer {{Kill-Complete-Extensions}} OPTIONAL, + ... +} +Kill-Complete-IEs SABP-PROTOCOL-IES ::= { + { ID id-Message-Identifier CRITICALITY reject TYPE Message-Identifier PRESENCE mandatory } | + { ID id-Old-Serial-Number CRITICALITY reject TYPE Old-Serial-Number PRESENCE mandatory } | + { ID id-Number-of-Broadcasts-Completed-List + CRITICALITY reject TYPE Number-of-Broadcasts-Completed-List + PRESENCE mandatory }| +{ ID id-Criticality-Diagnostics +CRITICALITY ignore TYPE Criticality-Diagnostics PRESENCE optional }, + ... +} +Kill-Complete-Extensions SABP-PROTOCOL-EXTENSION ::= { + ... +} +-- ************************************************************** +-- +-- Kill-Failure +-- +-- ************************************************************** +Kill-Failure ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{Kill-Failure-IEs}}, + protocolExtensions ProtocolExtensionContainer {{Kill-Failure-Extensions}} OPTIONAL, + ... +} +Kill-Failure-IEs SABP-PROTOCOL-IES ::= { + { ID id-Message-Identifier CRITICALITY reject TYPE Message-Identifier PRESENCE mandatory } | + { ID id-Old-Serial-Number CRITICALITY reject TYPE Old-Serial-Number PRESENCE mandatory } | + { ID id-Failure-List CRITICALITY reject TYPE Failure-List PRESENCE mandatory } | + { ID id-Number-of-Broadcasts-Completed-List + CRITICALITY ignore TYPE Number-of-Broadcasts-Completed-List + PRESENCE optional } | +{ ID id-Criticality-Diagnostics +CRITICALITY ignore TYPE Criticality-Diagnostics PRESENCE optional }, + ... +} +Kill-Failure-Extensions SABP-PROTOCOL-EXTENSION ::= { + ... +} +-- ************************************************************** +-- +-- Load-Query +-- +-- ************************************************************** +Load-Query ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{Load-Query-IEs}}, + protocolExtensions ProtocolExtensionContainer {{Load-Query-Extensions}} OPTIONAL, + ... +} +Load-Query-IEs SABP-PROTOCOL-IES ::= { + { ID id-Service-Areas-List CRITICALITY reject TYPE Service-Areas-List PRESENCE mandatory } , + ... +} +Load-Query-Extensions SABP-PROTOCOL-EXTENSION ::= { + ... +} +-- ************************************************************** +-- +-- Load-Query-Complete +-- +-- ************************************************************** +Load-Query-Complete ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{Load-Query-Complete-IEs}}, + protocolExtensions ProtocolExtensionContainer {{Load-Query-Complete-Extensions}} OPTIONAL, + ... +} +Load-Query-Complete-IEs SABP-PROTOCOL-IES ::= { + { ID id-Radio-Resource-Loading-List + CRITICALITY reject TYPE Radio-Resource-Loading-List + PRESENCE mandatory } | +{ ID id-Criticality-Diagnostics +CRITICALITY ignore TYPE Criticality-Diagnostics PRESENCE optional }, + ... +} +Load-Query-Complete-Extensions SABP-PROTOCOL-EXTENSION ::= { + ... +} +-- ************************************************************** +-- +-- Load-Query-Failure +-- +-- ************************************************************** +Load-Query-Failure ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{Load-Query-Failure-IEs}}, + protocolExtensions ProtocolExtensionContainer {{Load-Query-Failure-Extensions}} OPTIONAL, + ... +} +Load-Query-Failure-IEs SABP-PROTOCOL-IES ::= { + { ID id-Failure-List CRITICALITY reject TYPE Failure-List PRESENCE mandatory } | + { ID id-Radio-Resource-Loading-List + CRITICALITY ignore TYPE Radio-Resource-Loading-List + PRESENCE optional } | +{ ID id-Criticality-Diagnostics +CRITICALITY ignore TYPE Criticality-Diagnostics PRESENCE optional }, + ... +} +Load-Query-Failure-Extensions SABP-PROTOCOL-EXTENSION ::= { + ... +} +-- ************************************************************** +-- +-- Message-Status-Query +-- +-- ************************************************************** +Message-Status-Query ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{Message-Status-Query-IEs}}, + protocolExtensions ProtocolExtensionContainer {{Message-Status-Query-Extensions}} OPTIONAL, + ... +} +Message-Status-Query-IEs SABP-PROTOCOL-IES ::= { + { ID id-Message-Identifier CRITICALITY reject TYPE Message-Identifier PRESENCE mandatory } | + { ID id-Old-Serial-Number CRITICALITY reject TYPE Old-Serial-Number PRESENCE mandatory } | + { ID id-Service-Areas-List CRITICALITY reject TYPE Service-Areas-List PRESENCE mandatory } , + ... +} +Message-Status-Query-Extensions SABP-PROTOCOL-EXTENSION ::= { + ... +} +-- ************************************************************** +-- +-- Message-Status-Query-Complete +-- +-- ************************************************************** +Message-Status-Query-Complete ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{Message-Status-Query-Complete-IEs}}, + protocolExtensions ProtocolExtensionContainer {{Message-Status-Query-Complete-Extensions}} OPTIONAL, + ... +} +Message-Status-Query-Complete-IEs SABP-PROTOCOL-IES ::= { + { ID id-Message-Identifier CRITICALITY reject TYPE Message-Identifier PRESENCE mandatory } | + { ID id-Old-Serial-Number CRITICALITY reject TYPE Old-Serial-Number PRESENCE mandatory } | + { ID id-Number-of-Broadcasts-Completed-List + CRITICALITY reject TYPE Number-of-Broadcasts-Completed-List + PRESENCE mandatory } | +{ ID id-Criticality-Diagnostics +CRITICALITY ignore TYPE Criticality-Diagnostics PRESENCE optional }, + ... +} +Message-Status-Query-Complete-Extensions SABP-PROTOCOL-EXTENSION ::= { + ... +} +-- ************************************************************** +-- +-- Message-Status-Query-Failure +-- +-- ************************************************************** +Message-Status-Query-Failure ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{Message-Status-Query-Failure-IEs}}, + protocolExtensions ProtocolExtensionContainer {{Message-Status-Query-Failure-Extensions}} OPTIONAL, + ... +} +Message-Status-Query-Failure-IEs SABP-PROTOCOL-IES ::= { + { ID id-Message-Identifier CRITICALITY reject TYPE Message-Identifier PRESENCE mandatory } | + { ID id-Failure-List CRITICALITY reject TYPE Failure-List PRESENCE mandatory } | + { ID id-Old-Serial-Number CRITICALITY reject TYPE Old-Serial-Number PRESENCE mandatory } | + { ID id-Number-of-Broadcasts-Completed-List + CRITICALITY ignore TYPE Number-of-Broadcasts-Completed-List + PRESENCE optional } | +{ ID id-Criticality-Diagnostics +CRITICALITY ignore TYPE Criticality-Diagnostics PRESENCE optional }, + ... +} +Message-Status-Query-Failure-Extensions SABP-PROTOCOL-EXTENSION ::= { + ... +} +-- ************************************************************** +-- +-- Reset +-- +-- ************************************************************** +Reset ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{Reset-IEs}}, + protocolExtensions ProtocolExtensionContainer {{Reset-Extensions}} OPTIONAL, + ... +} +Reset-IEs SABP-PROTOCOL-IES ::= { + { ID id-Service-Areas-List CRITICALITY reject TYPE Service-Areas-List PRESENCE mandatory } , + ... +} +Reset-Extensions SABP-PROTOCOL-EXTENSION ::= { + ... +} +-- ************************************************************** +-- +-- Reset-Complete +-- +-- ************************************************************** +Reset-Complete ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{Reset-Complete-IEs}}, + protocolExtensions ProtocolExtensionContainer {{Reset-Complete-Extensions}} OPTIONAL, + ... +} +Reset-Complete-IEs SABP-PROTOCOL-IES ::= { + { ID id-Service-Areas-List CRITICALITY reject TYPE Service-Areas-List PRESENCE mandatory } | +{ ID id-Criticality-Diagnostics +CRITICALITY ignore TYPE Criticality-Diagnostics PRESENCE optional }, + ... +} +Reset-Complete-Extensions SABP-PROTOCOL-EXTENSION ::= { + ... +} +-- ************************************************************** +-- +-- Reset-Failure +-- +-- ************************************************************** +Reset-Failure ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{Reset-Failure-IEs}}, + protocolExtensions ProtocolExtensionContainer {{Reset-Failure-Extensions}} OPTIONAL, + ... +} +Reset-Failure-IEs SABP-PROTOCOL-IES ::= { + { ID id-Failure-List CRITICALITY reject TYPE Failure-List PRESENCE mandatory } | + { ID id-Service-Areas-List CRITICALITY reject TYPE Service-Areas-List PRESENCE optional } | +{ ID id-Criticality-Diagnostics +CRITICALITY ignore TYPE Criticality-Diagnostics PRESENCE optional } , + ... +} +Reset-Failure-Extensions SABP-PROTOCOL-EXTENSION ::= { + ... +} +-- ************************************************************** +-- +-- Restart +-- +-- ************************************************************** +Restart ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{Restart-IEs}}, + protocolExtensions ProtocolExtensionContainer {{Restart-Extensions}} OPTIONAL, + ... +} +Restart-IEs SABP-PROTOCOL-IES ::= { + { ID id-Service-Areas-List CRITICALITY ignore TYPE Service-Areas-List PRESENCE mandatory } | + { ID id-Recovery-Indication CRITICALITY ignore TYPE Recovery-Indication PRESENCE optional } , + ... +} +Restart-Extensions SABP-PROTOCOL-EXTENSION ::= { + ... +} +-- ************************************************************** +-- +-- Failure +-- +-- ************************************************************** +Failure ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{Failure-IEs}}, + protocolExtensions ProtocolExtensionContainer {{Failure-Extensions}} OPTIONAL, + ... +} +Failure-IEs SABP-PROTOCOL-IES ::= { + { ID id-Service-Areas-List CRITICALITY ignore TYPE Service-Areas-List PRESENCE mandatory } , + ... +} +Failure-Extensions SABP-PROTOCOL-EXTENSION ::= { + ... +} +-- ************************************************************** +-- +-- Error-Indication +-- +-- ************************************************************** +Error-Indication ::= SEQUENCE { + protocolIEs ProtocolIE-Container {{Error-Indication-IEs}}, + protocolExtensions ProtocolExtensionContainer {{Error-Indication-Extensions}} OPTIONAL, + ... +} +Error-Indication-IEs SABP-PROTOCOL-IES ::= { + { ID id-Message-Identifier CRITICALITY ignore TYPE Message-Identifier PRESENCE optional } | + { ID id-Serial-Number CRITICALITY ignore TYPE Serial-Number PRESENCE optional } | + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE optional } | +{ ID id-Criticality-Diagnostics +CRITICALITY ignore TYPE Criticality-Diagnostics PRESENCE optional }, + ... +} +Error-Indication-Extensions SABP-PROTOCOL-EXTENSION ::= { + ... +} +END diff --git a/library/sabp/SABP_PDU_Descriptions.asn b/library/sabp/SABP_PDU_Descriptions.asn new file mode 100644 index 0000000..428c35a --- /dev/null +++ b/library/sabp/SABP_PDU_Descriptions.asn @@ -0,0 +1,168 @@ +-- ************************************************************** +-- +-- Elementary Procedure definitions +-- +-- ************************************************************** +SABP-PDU-Descriptions { +itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) +umts-Access (20) modules (3) sabp (3) version1 (1) sabp-PDU-Descriptions (0)} +DEFINITIONS AUTOMATIC TAGS ::= +BEGIN +-- ************************************************************** +-- +-- IE parameter types from other modules. +-- +-- ************************************************************** +IMPORTS + Criticality, + ProcedureCode +FROM SABP-CommonDataTypes + Error-Indication, + Failure, + Kill, + Kill-Complete, + Kill-Failure, + Load-Query, + Load-Query-Complete, + Load-Query-Failure, + Reset, + Reset-Complete, + Reset-Failure, + Restart, + Message-Status-Query, + Message-Status-Query-Complete, + Message-Status-Query-Failure, + Write-Replace, + Write-Replace-Complete, + Write-Replace-Failure +FROM SABP-PDU-Contents + id-Error-Indication, + id-Failure-Indication, + id-Kill, + id-Reset, + id-Restart-Indication, + id-Load-Status-Enquiry, + id-Message-Status-Query, + id-Write-Replace +FROM SABP-Constants; +-- ************************************************************** +-- +-- Interface Elementary Procedure Class +-- +-- ************************************************************** +SABP-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 +-- +-- ************************************************************** +SABP-PDU ::= CHOICE { + initiatingMessage InitiatingMessage, + successfulOutcome SuccessfulOutcome, + unsuccessfulOutcome UnsuccessfulOutcome, + ... +} +InitiatingMessage ::= SEQUENCE { + procedureCode SABP-ELEMENTARY-PROCEDURE.&procedureCode ({SABP-ELEMENTARY-PROCEDURES}), + criticality SABP-ELEMENTARY-PROCEDURE.&criticality ({SABP-ELEMENTARY-PROCEDURES}{@procedureCode}), + value SABP-ELEMENTARY-PROCEDURE.&InitiatingMessage ({SABP-ELEMENTARY-PROCEDURES}{@procedureCode}) +} +SuccessfulOutcome ::= SEQUENCE { + procedureCode SABP-ELEMENTARY-PROCEDURE.&procedureCode ({SABP-ELEMENTARY-PROCEDURES}), + criticality SABP-ELEMENTARY-PROCEDURE.&criticality ({SABP-ELEMENTARY-PROCEDURES}{@procedureCode}), + value SABP-ELEMENTARY-PROCEDURE.&SuccessfulOutcome ({SABP-ELEMENTARY-PROCEDURES}{@procedureCode}) +} +UnsuccessfulOutcome ::= SEQUENCE { + procedureCode SABP-ELEMENTARY-PROCEDURE.&procedureCode ({SABP-ELEMENTARY-PROCEDURES}), + criticality SABP-ELEMENTARY-PROCEDURE.&criticality ({SABP-ELEMENTARY-PROCEDURES}{@procedureCode}), + value SABP-ELEMENTARY-PROCEDURE.&UnsuccessfulOutcome ({SABP-ELEMENTARY-PROCEDURES}{@procedureCode}) +} +-- ************************************************************** +-- +-- Interface Elementary Procedure List +-- +-- ************************************************************** +SABP-ELEMENTARY-PROCEDURES SABP-ELEMENTARY-PROCEDURE ::= { + SABP-ELEMENTARY-PROCEDURES-CLASS-1 | + SABP-ELEMENTARY-PROCEDURES-CLASS-2 , + ... +} +SABP-ELEMENTARY-PROCEDURES-CLASS-1 SABP-ELEMENTARY-PROCEDURE ::= { + write-Replace | + kill | + load-Status-Enquiry | + message-Status-Query | + reset , + ... +} +SABP-ELEMENTARY-PROCEDURES-CLASS-2 SABP-ELEMENTARY-PROCEDURE ::= { + restart-Indication | + failure-Indication | + error-Indication , + ... +} +write-Replace SABP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE Write-Replace + SUCCESSFUL OUTCOME Write-Replace-Complete + UNSUCCESSFUL OUTCOME Write-Replace-Failure + PROCEDURE CODE id-Write-Replace + CRITICALITY reject +} +kill SABP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE Kill + SUCCESSFUL OUTCOME Kill-Complete + UNSUCCESSFUL OUTCOME Kill-Failure + PROCEDURE CODE id-Kill + CRITICALITY reject +} +load-Status-Enquiry SABP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE Load-Query + SUCCESSFUL OUTCOME Load-Query-Complete + UNSUCCESSFUL OUTCOME Load-Query-Failure + PROCEDURE CODE id-Load-Status-Enquiry + CRITICALITY reject +} +message-Status-Query SABP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE Message-Status-Query + SUCCESSFUL OUTCOME Message-Status-Query-Complete + UNSUCCESSFUL OUTCOME Message-Status-Query-Failure + PROCEDURE CODE id-Message-Status-Query + CRITICALITY reject +} +reset SABP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE Reset + SUCCESSFUL OUTCOME Reset-Complete + UNSUCCESSFUL OUTCOME Reset-Failure + PROCEDURE CODE id-Reset + CRITICALITY reject +} +restart-Indication SABP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE Restart + PROCEDURE CODE id-Restart-Indication + CRITICALITY ignore +} +failure-Indication SABP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE Failure + PROCEDURE CODE id-Failure-Indication + CRITICALITY ignore +} +error-Indication SABP-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE Error-Indication + PROCEDURE CODE id-Error-Indication + CRITICALITY ignore +} +END diff --git a/library/sabp/SABP_Templates.ttcn b/library/sabp/SABP_Templates.ttcn new file mode 100644 index 0000000..a5ed81d --- /dev/null +++ b/library/sabp/SABP_Templates.ttcn @@ -0,0 +1,682 @@ +/* SABP Templates in TTCN-3 + * (C) 2019 Harald Welte <laforge at gnumonks.org> + * All rights reserved. + * + * Released under the terms of GNU General Public License, Version 2 or + * (at your option) any later version. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +module SABP_Templates { + +import from General_Types all; + +import from SABP_IEs all; +import from SABP_CommonDataTypes all; +import from SABP_Constants all; +import from SABP_Containers all; +import from SABP_PDU_Contents all; +import from SABP_PDU_Descriptions all; + +template (value) Service_Area_Identifier ts_SabpSai(template (value) OCT3 plmn_id, + template (value) OCT2 lac, + template (value) OCT2 sac) := { + pLMNidentity := plmn_id, + lac := lac, + sac := sac +} + +/* 9.1.3 WRITE REPLACE */ +template (value) SABP_PDU +ts_SABP_Write(template (value) BIT16 msg_id, template (value) BIT16 ser_nr, + template (value) Service_Areas_List sa_list, template (value) integer rep_per, + template (value) integer num_bcast, template (value) BIT8 dcs, + template (value) bitstring content) := { + initiatingMessage := { + procedureCode := id_Write_Replace, + criticality := reject, + value_ := { + Write_Replace := { + protocolIEs := { + { + id := SABP_Constants.id_Message_Identifier, + criticality := reject, + value_ := { Message_Identifier := msg_id } + }, { + id := SABP_Constants.id_New_Serial_Number, + criticality := reject, + value_ := { New_Serial_Number := ser_nr } + }, { + /* Optional: Old Serial Number */ + id := SABP_Constants.id_Service_Areas_List, + criticality := reject, + value_ := { Service_Areas_List := sa_list } + }, { + /* Optional: Category */ + id := SABP_Constants.id_Repetition_Period, + criticality := reject, + value_ := { Repetition_Period := rep_per } + }, { + id := SABP_Constants.id_Number_of_Broadcasts_Requested, + criticality := reject, + value_ := { Number_of_Broadcasts_Requested := num_bcast } + }, { + id := SABP_Constants.id_Data_Coding_Scheme, + criticality := reject, + value_ := { Data_Coding_Scheme := dcs } + }, { + id := SABP_Constants.id_Broadcast_Message_Content, + criticality := reject, + value_ := { Broadcast_Message_Content := content } + } + }, + protocolExtensions := omit + } + } + } +} +template (present) SABP_PDU +tr_SABP_Write(template (present) BIT16 msg_id, template (present) BIT16 ser_nr, + template (present) Service_Areas_List sa_list := ?, template (present) integer rep_per := ?, + template (present) integer num_bcast := ?, template (present) BIT8 dcs := ?, + template (present) bitstring content := ?) := { + initiatingMessage := { + procedureCode := id_Write_Replace, + criticality := reject, + value_ := { + Write_Replace := { + protocolIEs := { + { + id := SABP_Constants.id_Message_Identifier, + criticality := reject, + value_ := { Message_Identifier := msg_id } + }, { + id := SABP_Constants.id_New_Serial_Number, + criticality := reject, + value_ := { New_Serial_Number := ser_nr } + }, *, /* Optional: Old Serial Number */ + { + id := SABP_Constants.id_Service_Areas_List, + criticality := reject, + value_ := { Service_Areas_List := sa_list } + }, * /* Optional: Category */, + { + id := SABP_Constants.id_Repetition_Period, + criticality := reject, + value_ := { Repetition_Period := rep_per } + }, { + id := SABP_Constants.id_Number_of_Broadcasts_Requested, + criticality := reject, + value_ := { Number_of_Broadcasts_Requested := num_bcast } + }, { + id := SABP_Constants.id_Data_Coding_Scheme, + criticality := reject, + value_ := { Data_Coding_Scheme := dcs } + }, { + id := SABP_Constants.id_Broadcast_Message_Content, + criticality := reject, + value_ := { Broadcast_Message_Content := content } + } + }, + protocolExtensions := * + } + } + } +} + +/* 9.1.4 WRITE REPLACE COMPLETE */ +template (value) SABP_PDU +ts_SABPWriteCompl(template (value) BIT16 msg_id, template (value) BIT16 ser_nr) := { + successfulOutcome := { + procedureCode := id_Write_Replace, + criticality := reject, + value_ := { + Write_Replace_Complete := { + protocolIEs := { + { + id := SABP_Constants.id_Message_Identifier, + criticality := reject, + value_ := { Message_Identifier := msg_id } + }, { + id := SABP_Constants.id_New_Serial_Number, + criticality := reject, + value_ := { New_Serial_Number := ser_nr } + } + /* Optional: Number of Broadcasts Completed List */ + /* Optional: Criticality-Diagnostics */ + }, + protocolExtensions := omit + } + } + } +} +template (present) SABP_PDU +tr_SABP_WriteCompl(template (present) BIT16 msg_id, template (present) BIT16 ser_nr) := { + successfulOutcome := { + procedureCode := id_Write_Replace, + criticality := reject, + value_ := { + Write_Replace_Complete := { + protocolIEs := { + { + id := SABP_Constants.id_Message_Identifier, + criticality := reject, + value_ := { Message_Identifier := msg_id } + }, { + id := SABP_Constants.id_New_Serial_Number, + criticality := reject, + value_ := { New_Serial_Number := ser_nr } + }, * + /* Optional: Number of Broadcasts Completed List */ + /* Optional: Criticality-Diagnostics */ + }, + protocolExtensions := * + } + } + } +} + +/* 9.1.5 WRITE REPLACE FAILURE */ +template (value) SABP_PDU +ts_SABP_WriteFail(template (value) BIT16 msg_id, template (value) BIT16 ser_nr, + template (value) Failure_List fail_list) := { + unsuccessfulOutcome := { + procedureCode := id_Write_Replace, + criticality := reject, + value_ := { + Write_Replace_Failure := { + protocolIEs := { + { + id := SABP_Constants.id_Message_Identifier, + criticality := reject, + value_ := { Message_Identifier := msg_id } + }, { + id := SABP_Constants.id_New_Serial_Number, + criticality := reject, + value_ := { New_Serial_Number := ser_nr } + }, { + id := SABP_Constants.id_Failure_List, + criticality := reject, + value_ := { Failure_List := fail_list } + } + /* Optional: Number of Broadcasts Completed List */ + /* Optional: Criticality-Diagnostics */ + }, + protocolExtensions := omit + } + } + } +} +template (present) SABP_PDU +tr_SABP_WriteFail(template (present) BIT16 msg_id, template (present) BIT16 ser_nr, + template (present) Failure_List fail_list := ?) := { + unsuccessfulOutcome := { + procedureCode := id_Write_Replace, + criticality := reject, + value_ := { + Write_Replace_Failure := { + protocolIEs := { + { + id := SABP_Constants.id_Message_Identifier, + criticality := reject, + value_ := { Message_Identifier := msg_id } + }, { + id := SABP_Constants.id_New_Serial_Number, + criticality := reject, + value_ := { New_Serial_Number := ser_nr } + }, { + id := SABP_Constants.id_Failure_List, + criticality := reject, + value_ := { Failure_List := fail_list } + }, * + /* Optional: Number of Broadcasts Completed List */ + /* Optional: Criticality-Diagnostics */ + }, + protocolExtensions := * + } + } + } +} + +/* 9.1.6 KILL */ +template (value) SABP_PDU +ts_SABP_Kill(template (value) BIT16 msg_id, template (value) BIT16 ser_nr, + template (value) Service_Areas_List sa_list) := { + initiatingMessage := { + procedureCode := id_Kill, + criticality := reject, + value_ := { + kill_ := { + protocolIEs := { + { + id := SABP_Constants.id_Message_Identifier, + criticality := reject, + value_ := { Message_Identifier := msg_id } + }, { + id := SABP_Constants.id_Old_Serial_Number, + criticality := reject, + value_ := { Old_Serial_Number := ser_nr } + }, { + id := SABP_Constants.id_Service_Areas_List, + criticality := reject, + value_ := { Service_Areas_List := sa_list } + } + }, + protocolExtensions := omit + } + } + } +} +template (present) SABP_PDU +tr_SABP_Kill(template (present) BIT16 msg_id, template (present) BIT16 ser_nr, + template (present) Service_Areas_List sa_list) := { + initiatingMessage := { + procedureCode := id_Kill, + criticality := reject, + value_ := { + kill_ := { + protocolIEs := { + { + id := SABP_Constants.id_Message_Identifier, + criticality := reject, + value_ := { Message_Identifier := msg_id } + }, { + id := SABP_Constants.id_Old_Serial_Number, + criticality := reject, + value_ := { Old_Serial_Number := ser_nr } + }, { + id := SABP_Constants.id_Service_Areas_List, + criticality := reject, + value_ := { Service_Areas_List := sa_list } + } + }, + protocolExtensions := * + } + } + } +} + +/* 9.1.7 KILL COMPLETE */ +template (value) SABP_PDU +ts_SABP_KillCompl(template (value) BIT16 msg_id, template (value) BIT16 ser_nr, + template (value) Number_of_Broadcasts_Completed_List num_bcast_compl) := { + successfulOutcome := { + procedureCode := id_Kill, + criticality := reject, + value_ := { + Kill_Complete := { + protocolIEs := { + { + id := SABP_Constants.id_Message_Identifier, + criticality := reject, + value_ := { Message_Identifier := msg_id } + }, { + id := SABP_Constants.id_Old_Serial_Number, + criticality := reject, + value_ := { Old_Serial_Number := ser_nr } + }, { + id := SABP_Constants.id_Number_of_Broadcasts_Completed_List, + criticality := reject, + value_ := { Number_of_Broadcasts_Completed_List := num_bcast_compl } + } + }, + protocolExtensions := omit + } + } + } +} +template (present) SABP_PDU +tr_SABP_KillCompl(template (present) BIT16 msg_id, template (present) BIT16 ser_nr, + template (present) Number_of_Broadcasts_Completed_List num_bcast_compl := ?) := { + successfulOutcome := { + procedureCode := id_Kill, + criticality := reject, + value_ := { + Kill_Complete := { + protocolIEs := { + { + id := SABP_Constants.id_Message_Identifier, + criticality := reject, + value_ := { Message_Identifier := msg_id } + }, { + id := SABP_Constants.id_Old_Serial_Number, + criticality := reject, + value_ := { Old_Serial_Number := ser_nr } + }, { + id := SABP_Constants.id_Number_of_Broadcasts_Completed_List, + criticality := reject, + value_ := { Number_of_Broadcasts_Completed_List := num_bcast_compl } + }, * + }, + protocolExtensions := * + } + } + } +} + + +/* 9.1.7 KILL FAILURE */ +template (value) SABP_PDU +ts_SABP_KillFail(template (value) BIT16 msg_id, template (value) BIT16 ser_nr, + template (value) Failure_List fail_list) := { + unsuccessfulOutcome := { + procedureCode := id_Kill, + criticality := reject, + value_ := { + Kill_Failure := { + protocolIEs := { + { + id := SABP_Constants.id_Message_Identifier, + criticality := reject, + value_ := { Message_Identifier := msg_id } + }, { + id := SABP_Constants.id_Old_Serial_Number, + criticality := reject, + value_ := { Old_Serial_Number := ser_nr } + }, { + id := SABP_Constants.id_Failure_List, + criticality := reject, + value_ := { Failure_List := fail_list } + } + /* Optional: Number-of-Broadcasts-Completed-List */ + /* Optional: Criticality-Diagnostics */ + }, + protocolExtensions := omit + } + } + } +} +template (present) SABP_PDU +tr_SABP_KillFail(template (present) BIT16 msg_id, template (present) BIT16 ser_nr, + template (present) Failure_List fail_list := ?) := { + unsuccessfulOutcome := { + procedureCode := id_Kill, + criticality := reject, + value_ := { + Kill_Failure := { + protocolIEs := { + { + id := SABP_Constants.id_Message_Identifier, + criticality := reject, + value_ := { Message_Identifier := msg_id } + }, { + id := SABP_Constants.id_Old_Serial_Number, + criticality := reject, + value_ := { Old_Serial_Number := ser_nr } + }, { + id := SABP_Constants.id_Failure_List, + criticality := reject, + value_ := { Failure_List := fail_list } + }, * + /* Optional: Number-of-Broadcasts-Completed-List */ + /* Optional: Criticality-Diagnostics */ + }, + protocolExtensions := * + } + } + } +} + +/* TODO: Load Query + Complete + Failure */ +/* TODO: Message Status Query + Complete + Failure */ + +/* 9.1.15 RESET */ +template (value) SABP_PDU +ts_SABP_Reset(template (value) Service_Areas_List sa_list) := { + initiatingMessage := { + procedureCode := id_Reset, + criticality := reject, + value_ := { + Reset := { + protocolIEs := { + { + id := SABP_Constants.id_Service_Areas_List, + criticality := reject, + value_ := { Service_Areas_List := sa_list } + } + }, + protocolExtensions := omit + } + } + } +} +template (present) SABP_PDU +tr_SABP_Reset(template (present) Service_Areas_List sa_list) := { + initiatingMessage := { + procedureCode := id_Reset, + criticality := reject, + value_ := { + Reset := { + protocolIEs := { + { + id := SABP_Constants.id_Service_Areas_List, + criticality := reject, + value_ := { Service_Areas_List := sa_list } + } + }, + protocolExtensions := * + } + } + } +} + + +/* 9.1.16 RESET COMPLETE */ +template (value) SABP_PDU +ts_SABP_ResetCompl(template (value) Service_Areas_List sa_list) := { + successfulOutcome := { + procedureCode := id_Reset, + criticality := reject, + value_ := { + Reset_Complete := { + protocolIEs := { + { + id := SABP_Constants.id_Service_Areas_List, + criticality := reject, + value_ := { Service_Areas_List := sa_list } + } + }, + protocolExtensions := omit + } + } + } +} +template (present) SABP_PDU +tr_SABP_ResetCompl(template (present) Service_Areas_List sa_list) := { + successfulOutcome := { + procedureCode := id_Reset, + criticality := reject, + value_ := { + Reset_Complete := { + protocolIEs := { + { + id := SABP_Constants.id_Service_Areas_List, + criticality := reject, + value_ := { Service_Areas_List := sa_list } + }, * + }, + protocolExtensions := * + } + } + } +} + +/* 9.1.17 RESET FAILURE */ +template (value) SABP_PDU +ts_SABP_ResetFail(template (value) Failure_List f_list) := { + unsuccessfulOutcome := { + procedureCode := id_Reset, + criticality := reject, + value_ := { + Reset_Failure := { + protocolIEs := { + { + id := SABP_Constants.id_Failure_List, + criticality := reject, + value_ := { Failure_List := f_list } + } + /* Optional: Service Area List */ + }, + protocolExtensions := omit + } + } + } +} +template (present) SABP_PDU +tr_SABP_ResetFail(template (present) Failure_List f_list := ?) := { + unsuccessfulOutcome := { + procedureCode := id_Reset, + criticality := reject, + value_ := { + Reset_Failure := { + protocolIEs := { + { + id := SABP_Constants.id_Failure_List, + criticality := reject, + value_ := { Failure_List := f_list } + }, * + /* Optional: Service Area List */ + }, + protocolExtensions := * + } + } + } +} + +/* 9.1.18 RESTART (RNC->CN) */ +template (value) SABP_PDU +ts_SABP_Restart(template (value) Service_Areas_List sa_list) := { + initiatingMessage := { + procedureCode := id_Restart_Indication, + criticality := ignore, + value_ := { + Restart := { + protocolIEs := { + { + id := SABP_Constants.id_Service_Areas_List, + criticality := reject, + value_ := { Service_Areas_List := sa_list } + } + /* Optional: Recovery_Indication */ + }, + protocolExtensions := omit + } + } + } +} +template (present) SABP_PDU +tr_SABP_Restart(template (present) Service_Areas_List sa_list) := { + initiatingMessage := { + procedureCode := id_Restart_Indication, + criticality := ignore, + value_ := { + Restart := { + protocolIEs := { + { + id := SABP_Constants.id_Service_Areas_List, + criticality := reject, + value_ := { Service_Areas_List := sa_list } + }, * + /* Optional: Recovery_Indication */ + }, + protocolExtensions := * + } + } + } +} + +/* 9.1.19 FAILURE (RNC->CN) */ +template (value) SABP_PDU +ts_SABP_Failure(template (value) Service_Areas_List sa_list) := { + initiatingMessage := { + procedureCode := id_Failure_Indication, + criticality := ignore, + value_ := { + Failure := { + protocolIEs := { + { + id := SABP_Constants.id_Service_Areas_List, + criticality := ignore, + value_ := { Service_Areas_List := sa_list } + } + }, + protocolExtensions := omit + } + } + } +} +template (present) SABP_PDU +tr_SABP_Failure(template (present) Service_Areas_List sa_list) := { + initiatingMessage := { + procedureCode := id_Failure_Indication, + criticality := ignore, + value_ := { + Failure := { + protocolIEs := { + { + id := SABP_Constants.id_Service_Areas_List, + criticality := ignore, + value_ := { Service_Areas_List := sa_list } + } + }, + protocolExtensions := * + } + } + } +} + +/* 9.1.20 ERROR INDICATION (RNC->CN) */ +template (value) SABP_PDU +ts_SABP_ErrorInd(template (value) BIT16 msg_id, template (value) BIT16 ser_nr, + template (value) Cause cause) := { + initiatingMessage := { + procedureCode := id_Error_Indication, + criticality := ignore, + value_ := { + Error_Indication := { + protocolIEs := { + { + id := SABP_Constants.id_Message_Identifier, + criticality := ignore, + value_ := { Message_Identifier := msg_id } + }, { + id := SABP_Constants.id_Serial_Number, + criticality := ignore, + value_ := { Serial_Number := ser_nr } + }, { + id := SABP_Constants.id_Cause, + criticality := ignore, + value_ :={ Cause := cause } + } + /* Optional: Criticality-Diagnostics */ + }, + protocolExtensions := omit + } + } + } +} +template (present) SABP_PDU +tr_SABP_ErrorInd := { + initiatingMessage := { + procedureCode := id_Error_Indication, + criticality := ignore, + value_ := { + Error_Indication := { + protocolIEs := { + * + /* Optional: Message-Identifier */ + /* Optional: Serial-Number */ + /* Optional: Cause */ + /* Optional: Criticality-Diagnostics */ + }, + protocolExtensions := * + } + } + } +} + + + +} + diff --git a/library/sabp/SABP_Types.ttcn b/library/sabp/SABP_Types.ttcn new file mode 100644 index 0000000..df86549 --- /dev/null +++ b/library/sabp/SABP_Types.ttcn @@ -0,0 +1,7 @@ +module SABP_Types { + + import from SABP_PDU_Descriptions language "ASN.1:1997" all; + + external function enc_SABP_PDU(in SABP_PDU pdu) return octetstring; + external function dec_SABP_PDU(in octetstring stream) return SABP_PDU; +} -- To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/15589 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-ttcn3-hacks Gerrit-Branch: master Gerrit-Change-Id: Iab44cca10a664bbe2823a4183bca055ac8851137 Gerrit-Change-Number: 15589 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge at gnumonks.org> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190923/db56e369/attachment.htm>