diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-10 20:34:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-10 20:34:10 +0000 |
commit | e4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc (patch) | |
tree | 68cb5ef9081156392f1dd62a00c6ccc1451b93df /epan/dissectors/asn1/sabp | |
parent | Initial commit. (diff) | |
download | wireshark-e4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc.tar.xz wireshark-e4ba6dbc3f1e76890b22773807ea37fe8fa2b1bc.zip |
Adding upstream version 4.2.2.upstream/4.2.2
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'epan/dissectors/asn1/sabp')
-rw-r--r-- | epan/dissectors/asn1/sabp/CMakeLists.txt | 39 | ||||
-rw-r--r-- | epan/dissectors/asn1/sabp/SABP-CommonDataTypes.asn | 37 | ||||
-rw-r--r-- | epan/dissectors/asn1/sabp/SABP-Constants.asn | 86 | ||||
-rw-r--r-- | epan/dissectors/asn1/sabp/SABP-Containers.asn | 121 | ||||
-rw-r--r-- | epan/dissectors/asn1/sabp/SABP-IEs.asn | 292 | ||||
-rw-r--r-- | epan/dissectors/asn1/sabp/SABP-PDU-Contents.asn | 534 | ||||
-rw-r--r-- | epan/dissectors/asn1/sabp/SABP-PDU-Descriptions.asn | 202 | ||||
-rw-r--r-- | epan/dissectors/asn1/sabp/packet-sabp-template.c | 285 | ||||
-rw-r--r-- | epan/dissectors/asn1/sabp/sabp.cnf | 216 |
9 files changed, 1812 insertions, 0 deletions
diff --git a/epan/dissectors/asn1/sabp/CMakeLists.txt b/epan/dissectors/asn1/sabp/CMakeLists.txt new file mode 100644 index 00000000..f7434fb9 --- /dev/null +++ b/epan/dissectors/asn1/sabp/CMakeLists.txt @@ -0,0 +1,39 @@ +# CMakeLists.txt +# +# Wireshark - Network traffic analyzer +# By Gerald Combs <gerald@wireshark.org> +# Copyright 1998 Gerald Combs +# +# SPDX-License-Identifier: GPL-2.0-or-later +# + +set( PROTOCOL_NAME sabp ) + +set( PROTO_OPT ) + +set( EXT_ASN_FILE_LIST +) + +set( ASN_FILE_LIST + SABP-CommonDataTypes.asn + SABP-Constants.asn + SABP-Containers.asn + SABP-IEs.asn + SABP-PDU-Contents.asn + SABP-PDU-Descriptions.asn +) + +set( EXTRA_DIST + ${ASN_FILE_LIST} + packet-${PROTOCOL_NAME}-template.c + ${PROTOCOL_NAME}.cnf +) + +set( SRC_FILES + ${EXTRA_DIST} + ${EXT_ASN_FILE_LIST} +) + +set( A2W_FLAGS ) + +ASN2WRS() diff --git a/epan/dissectors/asn1/sabp/SABP-CommonDataTypes.asn b/epan/dissectors/asn1/sabp/SABP-CommonDataTypes.asn new file mode 100644 index 00000000..ca8ae0ea --- /dev/null +++ b/epan/dissectors/asn1/sabp/SABP-CommonDataTypes.asn @@ -0,0 +1,37 @@ +-- SABP-CommonDataTypes.asn +-- +-- Taken from 3GPP TS 25.419 V11.1.0 (2013-03) +-- http://www.3gpp.org/ftp/Specs/archive/25_series/25.419/25419-700.zip/25419-700.DOC +-- +-- 9.3.5 Common Definitions +-- + +-- ************************************************************** +-- +-- 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/epan/dissectors/asn1/sabp/SABP-Constants.asn b/epan/dissectors/asn1/sabp/SABP-Constants.asn new file mode 100644 index 00000000..feb87b8e --- /dev/null +++ b/epan/dissectors/asn1/sabp/SABP-Constants.asn @@ -0,0 +1,86 @@ +-- SABP-Constants.asn +-- +-- Taken from 3GPP TS 25.419 V11.1.0 (2013-03) +-- http://www.3gpp.org/ftp/Specs/archive/25_series/25.419/25419-700.zip/25419-700.DOC +-- +-- 9.3.6 Constant Definitions +-- + +-- ************************************************************** +-- +-- 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/epan/dissectors/asn1/sabp/SABP-Containers.asn b/epan/dissectors/asn1/sabp/SABP-Containers.asn new file mode 100644 index 00000000..777d7229 --- /dev/null +++ b/epan/dissectors/asn1/sabp/SABP-Containers.asn @@ -0,0 +1,121 @@ +-- SABP-Containers.asn +-- +-- Taken from 3GPP TS 25.419 V11.1.0 (2013-03) +-- http://www.3gpp.org/ftp/Specs/archive/25_series/25.419/25419-700.zip/25419-700.DOC +-- +-- 9.3.7 Container Definitions +-- + +-- ************************************************************** +-- +-- 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/epan/dissectors/asn1/sabp/SABP-IEs.asn b/epan/dissectors/asn1/sabp/SABP-IEs.asn new file mode 100644 index 00000000..3798a843 --- /dev/null +++ b/epan/dissectors/asn1/sabp/SABP-IEs.asn @@ -0,0 +1,292 @@ +-- SABP-IEs.asn +-- +-- Taken from 3GPP TS 25.419 V11.1.0 (2013-03) +-- http://www.3gpp.org/ftp/Specs/archive/25_series/25.419/25419-700.zip/25419-700.DOC +-- +-- 9.3.4 Information Element Definitions +-- + +-- ************************************************************** +-- +-- 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/epan/dissectors/asn1/sabp/SABP-PDU-Contents.asn b/epan/dissectors/asn1/sabp/SABP-PDU-Contents.asn new file mode 100644 index 00000000..edc039c3 --- /dev/null +++ b/epan/dissectors/asn1/sabp/SABP-PDU-Contents.asn @@ -0,0 +1,534 @@ +-- SABP-PDU-Contents.asn +-- +-- Taken from 3GPP TS 25.419 V11.1.0 (2013-03) +-- http://www.3gpp.org/ftp/Specs/archive/25_series/25.419/25419-700.zip/25419-700.DOC +-- +-- 9.3.3 PDU Definitions +-- + +-- ************************************************************** +-- +-- 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/epan/dissectors/asn1/sabp/SABP-PDU-Descriptions.asn b/epan/dissectors/asn1/sabp/SABP-PDU-Descriptions.asn new file mode 100644 index 00000000..058ca586 --- /dev/null +++ b/epan/dissectors/asn1/sabp/SABP-PDU-Descriptions.asn @@ -0,0 +1,202 @@ +-- SABP-PDU-Descriptions.asn +-- +-- Taken from 3GPP TS 25.419 V11.1.0 (2013-03) +-- http://www.3gpp.org/ftp/Specs/archive/25_series/25.419/25419-700.zip/25419-700.DOC +-- +-- 9.3.2 Elementary Procedure Definitions +-- + +-- ************************************************************** +-- +-- 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/epan/dissectors/asn1/sabp/packet-sabp-template.c b/epan/dissectors/asn1/sabp/packet-sabp-template.c new file mode 100644 index 00000000..494f96c7 --- /dev/null +++ b/epan/dissectors/asn1/sabp/packet-sabp-template.c @@ -0,0 +1,285 @@ +/* packet-sabp-template.c + * Routines for UTRAN Iu-BC Interface: Service Area Broadcast Protocol (SABP) packet dissection + * Copyright 2007, Tomas Kukosa <tomas.kukosa@siemens.com> + * + * Wireshark - Network traffic analyzer + * By Gerald Combs <gerald@wireshark.org> + * Copyright 1998 Gerald Combs + * + * SPDX-License-Identifier: GPL-2.0-or-later + * + * Ref: 3GPP TS 25.419 version V9.0.0 (2009-12) + */ + +#include "config.h" + +#include <epan/packet.h> + +#include <epan/asn1.h> + +#include "packet-tcp.h" +#include "packet-per.h" +#include "packet-e212.h" +#include "packet-gsm_map.h" +#include "packet-gsm_sms.h" +#include <epan/sctpppids.h> +#include "packet-cell_broadcast.h" + +#define PNAME "UTRAN IuBC interface SABP signaling" +#define PSNAME "SABP" +#define PFNAME "sabp" + +#include "packet-sabp-val.h" + +void proto_register_sabp(void); +void proto_reg_handoff_sabp(void); + +/* Initialize the protocol and registered fields */ +static int proto_sabp = -1; + +static int hf_sabp_no_of_pages = -1; +static int hf_sabp_cb_inf_len = -1; +static int hf_sabp_cb_msg_inf_page = -1; +static int hf_sabp_cbs_page_content = -1; +#include "packet-sabp-hf.c" + +/* Initialize the subtree pointers */ +static int ett_sabp = -1; +static int ett_sabp_e212 = -1; +static int ett_sabp_cbs_data_coding = -1; +static int ett_sabp_bcast_msg = -1; +static int ett_sabp_cbs_serial_number = -1; +static int ett_sabp_cbs_new_serial_number = -1; +static int ett_sabp_cbs_page = -1; +static int ett_sabp_cbs_page_content = -1; + +#include "packet-sabp-ett.c" + +/* Global variables */ +static guint32 ProcedureCode; +static guint32 ProtocolIE_ID; +static guint32 ProtocolExtensionID; +static guint8 sms_encoding; + +#define SABP_PORT 3452 + +/* Dissector tables */ +static dissector_table_t sabp_ies_dissector_table; +static dissector_table_t sabp_extension_dissector_table; +static dissector_table_t sabp_proc_imsg_dissector_table; +static dissector_table_t sabp_proc_sout_dissector_table; +static dissector_table_t sabp_proc_uout_dissector_table; + +static dissector_handle_t sabp_handle; +static dissector_handle_t sabp_tcp_handle; + +static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *); +static int dissect_ProtocolExtensionFieldExtensionValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *); +static int dissect_InitiatingMessageValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *); +static int dissect_SuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *); +static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *); +static void dissect_sabp_cb_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); + +#include "packet-sabp-fn.c" + +static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) +{ + return (dissector_try_uint(sabp_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0; +} + +static int dissect_ProtocolExtensionFieldExtensionValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) +{ + return (dissector_try_uint(sabp_extension_dissector_table, ProtocolExtensionID, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0; +} + +static int dissect_InitiatingMessageValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) +{ + return (dissector_try_uint(sabp_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0; +} + +static int dissect_SuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) +{ + return (dissector_try_uint(sabp_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0; +} + +static int dissect_UnsuccessfulOutcomeValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) +{ + return (dissector_try_uint(sabp_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree)) ? tvb_captured_length(tvb) : 0; +} + + +/* 3GPP TS 23.041 version 11.4.0 + * 9.4.2.2.5 CB Data + */ +static void +dissect_sabp_cb_data(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +{ + proto_item *cbs_page_item; + proto_tree *subtree; + tvbuff_t *page_tvb, *unpacked_tvb; + int offset = 0; + int n; + guint8 nr_pages, len, cb_inf_msg_len; + + + /* Octet 1 Number-of-Pages */ + nr_pages = tvb_get_guint8(tvb, offset); + proto_tree_add_item(tree, hf_sabp_no_of_pages, tvb, offset, 1, ENC_BIG_ENDIAN); + offset++; + /* + * NOTE: n equal to or less than 15 + */ + if(nr_pages > 15){ + /* Error */ + return; + } + for (n = 0; n < nr_pages; n++) { + subtree = proto_tree_add_subtree_format(tree, tvb, offset, 83, ett_sabp_cbs_page, NULL, + "CB page %u data", n+1); + /* octet 2 - 83 CBS-Message-Information-Page 1 */ + cbs_page_item = proto_tree_add_item(subtree, hf_sabp_cb_msg_inf_page, tvb, offset, 82, ENC_NA); + cb_inf_msg_len = tvb_get_guint8(tvb,offset+82); + page_tvb = tvb_new_subset_length(tvb, offset, cb_inf_msg_len); + unpacked_tvb = dissect_cbs_data(sms_encoding, page_tvb, subtree, pinfo, 0); + len = tvb_captured_length(unpacked_tvb); + if (unpacked_tvb != NULL){ + if (tree != NULL){ + proto_tree *cbs_page_subtree = proto_item_add_subtree(cbs_page_item, ett_sabp_cbs_page_content); + proto_tree_add_item(cbs_page_subtree, hf_sabp_cbs_page_content, unpacked_tvb, 0, len, ENC_UTF_8); + } + } + + offset = offset+82; + /* 84 CBS-Message-Information-Length 1 */ + proto_tree_add_item(subtree, hf_sabp_cb_inf_len, tvb, offset, 1, ENC_BIG_ENDIAN); + offset++; + } +} + +static int +dissect_sabp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) +{ + proto_item *sabp_item = NULL; + proto_tree *sabp_tree = NULL; + + /* make entry in the Protocol column on summary display */ + col_set_str(pinfo->cinfo, COL_PROTOCOL, PSNAME); + + /* create the sabp protocol tree */ + sabp_item = proto_tree_add_item(tree, proto_sabp, tvb, 0, -1, ENC_NA); + sabp_tree = proto_item_add_subtree(sabp_item, ett_sabp); + + return dissect_SABP_PDU_PDU(tvb, pinfo, sabp_tree, NULL); +} + +/* Note a little bit of a hack assumes length max takes two bytes and that the length starts at byte 4 */ +static int +dissect_sabp_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data) +{ + guint32 type_length, msg_len; + guint tvb_length; + int bit_offset; + gboolean is_fragmented; + asn1_ctx_t asn1_ctx; + asn1_ctx_init(&asn1_ctx, ASN1_ENC_PER, TRUE, pinfo); + + tvb_length = tvb_reported_length(tvb); + + if (tvb_length < 5) { + pinfo->desegment_offset = 0; + pinfo->desegment_len = DESEGMENT_ONE_MORE_SEGMENT; + return tvb_captured_length(tvb); + } + + /* Length should be in the 3:d octet */ + bit_offset = 24; + /* Get the length of the sabp packet. Offset in bits */ + do { + bit_offset = dissect_per_length_determinant(tvb, bit_offset, &asn1_ctx, NULL, -1, &type_length, &is_fragmented); + bit_offset += 8*type_length; + msg_len = (bit_offset + 7) >> 3; + if (is_fragmented) { + /* Next length field will take 1 or 2 bytes; let's ask for the maximum */ + msg_len += 2; + } + if (msg_len > tvb_length) { + pinfo->desegment_offset = 0; + pinfo->desegment_len = msg_len - tvb_length; + return tvb_captured_length(tvb); + } + } while (is_fragmented); + + return dissect_sabp(tvb, pinfo, tree, data); +} + +/*--- proto_register_sabp -------------------------------------------*/ +void proto_register_sabp(void) { + + /* List of fields */ + + static hf_register_info hf[] = { + { &hf_sabp_no_of_pages, + { "Number-of-Pages", "sabp.no_of_pages", + FT_UINT8, BASE_DEC, NULL, 0, + NULL, HFILL }}, + { &hf_sabp_cb_msg_inf_page, + { "CBS-Message-Information-Page", "sabp.cb_msg_inf_page", + FT_BYTES, BASE_NONE, NULL, 0, + NULL, HFILL }}, + { &hf_sabp_cbs_page_content, + { "CBS Page Content", "sabp.cb_page_content", + FT_STRING, BASE_NONE, NULL, 0, + NULL, HFILL }}, + { &hf_sabp_cb_inf_len, + { "CBS-Message-Information-Length", "sabp.cb_inf_len", + FT_UINT8, BASE_DEC, NULL, 0, + NULL, HFILL }}, + +#include "packet-sabp-hfarr.c" + }; + + /* List of subtrees */ + static gint *ett[] = { + &ett_sabp, + &ett_sabp_e212, + &ett_sabp_cbs_data_coding, + &ett_sabp_bcast_msg, + &ett_sabp_cbs_serial_number, + &ett_sabp_cbs_new_serial_number, + &ett_sabp_cbs_page, + &ett_sabp_cbs_page_content, +#include "packet-sabp-ettarr.c" + }; + + + /* Register protocol */ + proto_sabp = proto_register_protocol(PNAME, PSNAME, PFNAME); + /* Register fields and subtrees */ + proto_register_field_array(proto_sabp, hf, array_length(hf)); + proto_register_subtree_array(ett, array_length(ett)); + + /* Register dissector */ + sabp_handle = register_dissector("sabp", dissect_sabp, proto_sabp); + sabp_tcp_handle = register_dissector("sabp.tcp", dissect_sabp_tcp, proto_sabp); + + /* Register dissector tables */ + sabp_ies_dissector_table = register_dissector_table("sabp.ies", "SABP-PROTOCOL-IES", proto_sabp, FT_UINT32, BASE_DEC); + sabp_extension_dissector_table = register_dissector_table("sabp.extension", "SABP-PROTOCOL-EXTENSION", proto_sabp, FT_UINT32, BASE_DEC); + sabp_proc_imsg_dissector_table = register_dissector_table("sabp.proc.imsg", "SABP-ELEMENTARY-PROCEDURE InitiatingMessage", proto_sabp, FT_UINT32, BASE_DEC); + sabp_proc_sout_dissector_table = register_dissector_table("sabp.proc.sout", "SABP-ELEMENTARY-PROCEDURE SuccessfulOutcome", proto_sabp, FT_UINT32, BASE_DEC); + sabp_proc_uout_dissector_table = register_dissector_table("sabp.proc.uout", "SABP-ELEMENTARY-PROCEDURE UnsuccessfulOutcome", proto_sabp, FT_UINT32, BASE_DEC); +} + + +/*--- proto_reg_handoff_sabp ---------------------------------------*/ +void +proto_reg_handoff_sabp(void) +{ + dissector_add_uint_with_preference("udp.port", SABP_PORT, sabp_handle); + dissector_add_uint_with_preference("tcp.port", SABP_PORT, sabp_tcp_handle); + dissector_add_uint("sctp.ppi", SABP_PAYLOAD_PROTOCOL_ID, sabp_handle); + +#include "packet-sabp-dis-tab.c" +} + + diff --git a/epan/dissectors/asn1/sabp/sabp.cnf b/epan/dissectors/asn1/sabp/sabp.cnf new file mode 100644 index 00000000..2630514e --- /dev/null +++ b/epan/dissectors/asn1/sabp/sabp.cnf @@ -0,0 +1,216 @@ +# sabp.cnf +# sabp conformation file +# Copyright 2007 Tomas Kukosa + +#.OPT +PER +ALIGNED +#.END + +#.NO_EMIT + +#.PDU +SABP-PDU + +#.MAKE_ENUM +ProcedureCode +ProtocolIE-ID + +#.USE_VALS_EXT +ProcedureCode +ProtocolIE-ID +Cause + +#.OMIT_ASSIGNMENT +Presence +ProtocolIE-ContainerList +#.END + +#.TF_RENAME +ProtocolIE-Field/value ProtocolIE_Field_value +InitiatingMessage/value InitiatingMessage_value +SuccessfulOutcome/value SuccessfulOutcome_value +UnsuccessfulOutcome/value UnsuccessfulOutcome_value +#.END + +#.FIELD_RENAME +ProtocolExtensionField/id ext_id +MessageStructure/_item/repetitionNumber repetitionNumber1 +#.END + + +#.FN_PARS ProtocolIE-ID VAL_PTR=&ProtocolIE_ID +#.FN_FTR ProtocolIE-ID + if (tree) { + proto_item_append_text(proto_item_get_parent_nth(actx->created_item, 2), ": %s", val_to_str_ext(ProtocolIE_ID, &sabp_ProtocolIE_ID_vals_ext, "unknown (%d)")); + } +#.END + + +#.FN_PARS ProtocolIE-Field/value FN_VARIANT=_pdu_new TYPE_REF_FN=dissect_ProtocolIEFieldValue + +#.FN_PARS ProtocolExtensionID VAL_PTR=&ProtocolExtensionID +#.FN_PARS ProtocolExtensionField/extensionValue FN_VARIANT=_pdu_new TYPE_REF_FN=dissect_ProtocolExtensionFieldExtensionValue + +#.FN_PARS ProcedureCode VAL_PTR = &ProcedureCode +#.FN_FTR ProcedureCode + col_add_fstr(actx->pinfo->cinfo, COL_INFO, "%s ", + val_to_str_ext(ProcedureCode, &sabp_ProcedureCode_vals_ext, + "unknown message")); +#.END + +#.FN_PARS InitiatingMessage/value FN_VARIANT=_pdu_new TYPE_REF_FN=dissect_InitiatingMessageValue + +#.FN_PARS SuccessfulOutcome/value FN_VARIANT=_pdu_new TYPE_REF_FN=dissect_SuccessfulOutcomeValue + +#.FN_PARS UnsuccessfulOutcome/value FN_VARIANT=_pdu_new TYPE_REF_FN=dissect_UnsuccessfulOutcomeValue + + +#.ASSIGN_VALUE_TO_TYPE # SABP does not have constants assigned to types, they are pure INTEGER +# ProcedureCode +id-Write-Replace ProcedureCode +id-Kill ProcedureCode +id-Load-Status-Enquiry ProcedureCode +id-Message-Status-Query ProcedureCode +id-Restart-Indication ProcedureCode +id-Reset ProcedureCode +id-Failure-Indication ProcedureCode +id-Error-Indication ProcedureCode + +# ProtocolIE-ID +id-Broadcast-Message-Content ProtocolIE-ID +id-Category ProtocolIE-ID +id-Cause ProtocolIE-ID +id-Criticality-Diagnostics ProtocolIE-ID +id-Data-Coding-Scheme ProtocolIE-ID +id-Failure-List ProtocolIE-ID +id-Message-Identifier ProtocolIE-ID +id-New-Serial-Number ProtocolIE-ID +id-Number-of-Broadcasts-Completed-List ProtocolIE-ID +id-Number-of-Broadcasts-Requested ProtocolIE-ID +id-Old-Serial-Number ProtocolIE-ID +id-Radio-Resource-Loading-List ProtocolIE-ID +id-Recovery-Indication ProtocolIE-ID +id-Repetition-Period ProtocolIE-ID +id-Serial-Number ProtocolIE-ID +id-Service-Areas-List ProtocolIE-ID +id-MessageStructure ProtocolIE-ID +id-TypeOfError ProtocolIE-ID +id-Paging-ETWS-Indicator ProtocolIE-ID +id-Warning-Type ProtocolIE-ID +id-WarningSecurityInfo ProtocolIE-ID +id-Broadcast-Message-Content-Validity-Indicator ProtocolIE-ID + +#.END + +#.REGISTER + +#SABP-PROTOCOL-IES +Message-Identifier N sabp.ies id-Message-Identifier +New-Serial-Number N sabp.ies id-New-Serial-Number +Old-Serial-Number N sabp.ies id-Old-Serial-Number +Service-Areas-List N sabp.ies id-Service-Areas-List +Category N sabp.ies id-Category +Repetition-Period N sabp.ies id-Repetition-Period +Number-of-Broadcasts-Requested N sabp.ies id-Number-of-Broadcasts-Requested +Data-Coding-Scheme N sabp.ies id-Data-Coding-Scheme +Broadcast-Message-Content N sabp.ies id-Broadcast-Message-Content +Number-of-Broadcasts-Completed-List N sabp.ies id-Number-of-Broadcasts-Completed-List +Criticality-Diagnostics N sabp.ies id-Criticality-Diagnostics +Failure-List N sabp.ies id-Failure-List +Radio-Resource-Loading-List N sabp.ies id-Radio-Resource-Loading-List +Recovery-Indication N sabp.ies id-Recovery-Indication +Serial-Number N sabp.ies id-Serial-Number +Cause N sabp.ies id-Cause + +#SABP-PROTOCOL-EXTENSION +MessageStructure N sabp.extension id-MessageStructure +TypeOfError N sabp.extension id-TypeOfError +Paging-ETWS-Indicator N sabp.extension id-Paging-ETWS-Indicator +Warning-Type N sabp.extension id-Warning-Type +WarningSecurityInfo N sabp.extension id-WarningSecurityInfo +Broadcast-Message-Content-Validity-Indicator N sabp.extension id-Broadcast-Message-Content-Validity-Indicator + +#SABP-ELEMENTARY-PROCEDURE +Write-Replace N sabp.proc.imsg id-Write-Replace +Write-Replace-Complete N sabp.proc.sout id-Write-Replace +Write-Replace-Failure N sabp.proc.uout id-Write-Replace +Kill N sabp.proc.imsg id-Kill +Kill-Complete N sabp.proc.sout id-Kill +Kill-Failure N sabp.proc.uout id-Kill +Load-Query N sabp.proc.imsg id-Load-Status-Enquiry +Load-Query-Complete N sabp.proc.sout id-Load-Status-Enquiry +Load-Query-Failure N sabp.proc.uout id-Load-Status-Enquiry +Message-Status-Query N sabp.proc.imsg id-Message-Status-Query +Message-Status-Query-Complete N sabp.proc.sout id-Message-Status-Query +Message-Status-Query-Failure N sabp.proc.uout id-Message-Status-Query +Reset N sabp.proc.imsg id-Reset +Reset-Complete N sabp.proc.sout id-Reset +Reset-Failure N sabp.proc.uout id-Reset +Restart N sabp.proc.imsg id-Restart-Indication +Failure N sabp.proc.imsg id-Failure-Indication +Error-Indication N sabp.proc.imsg id-Error-Indication + +# following construction is not supported by asn2wrs +# PLMNidentity ::= TBCD-STRING (SIZE (3)) +# TBCD-STRING ::= OCTET STRING + +#.FN_BODY Service-Area-Identifier/pLMNidentity VAL_PTR = ¶meter_tvb + tvbuff_t *parameter_tvb=NULL; + proto_tree *subtree; + + offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, + 3, 3, FALSE, ¶meter_tvb); + + if (!parameter_tvb) + return offset; + subtree = proto_item_add_subtree(actx->created_item, ett_sabp_e212); + dissect_e212_mcc_mnc(parameter_tvb, actx->pinfo, subtree, 0, E212_SAI, FALSE); + +#.FN_BODY Data-Coding-Scheme VAL_PTR = ¶meter_tvb + tvbuff_t *parameter_tvb=NULL; + proto_tree *subtree; + +%(DEFAULT_BODY)s + + if (!parameter_tvb) + return offset; + subtree = proto_item_add_subtree(actx->created_item, ett_sabp_cbs_data_coding); + sms_encoding = dissect_cbs_data_coding_scheme(parameter_tvb, actx->pinfo, subtree, 0); + +#.FN_BODY Message-Identifier VAL_PTR = ¶meter_tvb + tvbuff_t *parameter_tvb=NULL; + +%(DEFAULT_BODY)s + if (!parameter_tvb) + return offset; + dissect_cbs_message_identifier(parameter_tvb, tree, 0); + +#.FN_BODY Serial-Number VAL_PTR = ¶meter_tvb + tvbuff_t *parameter_tvb=NULL; + proto_tree *subtree; + +%(DEFAULT_BODY)s + if (!parameter_tvb) + return offset; + subtree = proto_item_add_subtree(actx->created_item, ett_sabp_cbs_serial_number); + dissect_cbs_serial_number(parameter_tvb, subtree, 0); + +#.FN_BODY New-Serial-Number VAL_PTR = ¶meter_tvb + tvbuff_t *parameter_tvb=NULL; + proto_tree *subtree; + +%(DEFAULT_BODY)s + if (!parameter_tvb) + return offset; + subtree = proto_item_add_subtree(actx->created_item, ett_sabp_cbs_new_serial_number); + dissect_cbs_serial_number(parameter_tvb, subtree, 0); + +#.FN_BODY Broadcast-Message-Content VAL_PTR = ¶meter_tvb + tvbuff_t *parameter_tvb=NULL; + +%(DEFAULT_BODY)s + if (!parameter_tvb) + return offset; + dissect_sabp_cb_data(parameter_tvb, actx->pinfo, tree); +# dissect_umts_cell_broadcast_message(parameter_tvb, actx->pinfo, proto_tree_get_root(tree)); |