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/rua | |
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/rua')
-rw-r--r-- | epan/dissectors/asn1/rua/CMakeLists.txt | 39 | ||||
-rw-r--r-- | epan/dissectors/asn1/rua/RUA-CommonDataTypes.asn | 53 | ||||
-rw-r--r-- | epan/dissectors/asn1/rua/RUA-Constants.asn | 63 | ||||
-rw-r--r-- | epan/dissectors/asn1/rua/RUA-Containers.asn | 161 | ||||
-rw-r--r-- | epan/dissectors/asn1/rua/RUA-IEs.asn | 199 | ||||
-rw-r--r-- | epan/dissectors/asn1/rua/RUA-PDU-Contents.asn | 204 | ||||
-rw-r--r-- | epan/dissectors/asn1/rua/RUA-PDU-Descriptions.asn | 176 | ||||
-rw-r--r-- | epan/dissectors/asn1/rua/packet-rua-template.c | 161 | ||||
-rw-r--r-- | epan/dissectors/asn1/rua/rua.cnf | 147 |
9 files changed, 1203 insertions, 0 deletions
diff --git a/epan/dissectors/asn1/rua/CMakeLists.txt b/epan/dissectors/asn1/rua/CMakeLists.txt new file mode 100644 index 00000000..6a0a4dec --- /dev/null +++ b/epan/dissectors/asn1/rua/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 rua ) + +set( PROTO_OPT ) + +set( EXT_ASN_FILE_LIST +) + +set( ASN_FILE_LIST + RUA-CommonDataTypes.asn + RUA-Constants.asn + RUA-Containers.asn + RUA-IEs.asn + RUA-PDU-Contents.asn + RUA-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/rua/RUA-CommonDataTypes.asn b/epan/dissectors/asn1/rua/RUA-CommonDataTypes.asn new file mode 100644 index 00000000..4212bb57 --- /dev/null +++ b/epan/dissectors/asn1/rua/RUA-CommonDataTypes.asn @@ -0,0 +1,53 @@ +-- RUA-CommonDataTypes.asn +-- +-- 3GPP TS 25.468 V9.1.0 (2010-03) +-- http://www.3gpp.org/ftp/Specs/html-info/25468.htm +-- +-- 9.3.5 Common definitions +-- +-- ************************************************************** +-- +-- Common definitions +-- +-- ************************************************************** + +RUA-CommonDataTypes { +itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) +umts-Access (20) modules (3) rua(5) version1 (1) rUA-CommonDataTypes (3) } + +DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +-- ************************************************************** +-- +-- Extension constants +-- +-- ************************************************************** + +maxPrivateIEs INTEGER ::= 65535 +maxProtocolExtensions INTEGER ::= 65535 +maxProtocolIEs INTEGER ::= 65535 + +-- ************************************************************** +-- +-- Common Data Types +-- +-- ************************************************************** +Criticality ::= ENUMERATED { reject, ignore, notify } + +Presence ::= ENUMERATED { optional, conditional, mandatory } + + +ProcedureCode ::= INTEGER (0..255) + +PrivateIE-ID ::= CHOICE { + local INTEGER (0..65535), + global OBJECT IDENTIFIER +} + +ProtocolIE-ID ::= INTEGER (0..maxProtocolIEs) + +TriggeringMessage ::= ENUMERATED { initiating-message, successful-outcome, unsuccessful-outcome } + +END diff --git a/epan/dissectors/asn1/rua/RUA-Constants.asn b/epan/dissectors/asn1/rua/RUA-Constants.asn new file mode 100644 index 00000000..6ab3c25a --- /dev/null +++ b/epan/dissectors/asn1/rua/RUA-Constants.asn @@ -0,0 +1,63 @@ +-- RUA-Constants.asn +-- +-- 3GPP TS 25.468 V9.1.0 (2010-03) +-- http://www.3gpp.org/ftp/Specs/html-info/25468.htm +-- +-- 9.3.6 Constant definitions +-- + +-- ************************************************************** +-- +-- Constant definitions +-- +-- ************************************************************** + +RUA-Constants { +itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) +umts-Access (20) modules (3) rua(5) version1 (1) rUA-Constants (4) } + +DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +IMPORTS + ProcedureCode, + ProtocolIE-ID +FROM RUA-CommonDataTypes; + + +-- ************************************************************** +-- +-- Elementary Procedures +-- +id-Connect ProcedureCode ::= 1 +id-DirectTransfer ProcedureCode ::= 2 +id-Disconnect ProcedureCode ::= 3 +id-ConnectionlessTransfer ProcedureCode ::= 4 +id-ErrorIndication ProcedureCode ::= 5 +id-privateMessage ProcedureCode ::= 6 + +-- ************************************************************** +-- +-- Lists +-- +-- ************************************************************** +maxNrOfErrors INTEGER ::= 256 + +-- ************************************************************** +-- +-- IEs +-- +-- ************************************************************** + +id-Cause ProtocolIE-ID ::= 1 +id-CriticalityDiagnostics ProtocolIE-ID ::= 2 +id-Context-ID ProtocolIE-ID ::= 3 +id-RANAP-Message ProtocolIE-ID ::= 4 +id-IntraDomainNasNodeSelector ProtocolIE-ID ::= 5 +id-Establishment-Cause ProtocolIE-ID ::= 6 +id-CN-DomainIndicator ProtocolIE-ID ::= 7 +id-CSGMembershipStatus ProtocolIE-ID ::= 9 + + +END diff --git a/epan/dissectors/asn1/rua/RUA-Containers.asn b/epan/dissectors/asn1/rua/RUA-Containers.asn new file mode 100644 index 00000000..cffd5c28 --- /dev/null +++ b/epan/dissectors/asn1/rua/RUA-Containers.asn @@ -0,0 +1,161 @@ +-- RUA-Containers.asn +-- +-- 3GPP TS 25.468 V9.1.0 (2010-03) +-- http://www.3gpp.org/ftp/Specs/html-info/25468.htm +-- +-- 9.3.7 Container definitions +-- + +-- ************************************************************** +-- +-- Container definitions +-- +-- ************************************************************** + +RUA-Containers { +itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) +umts-Access (20) modules (3) rua(5) version1 (1) rUA-Containers (5) } + +DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +-- ************************************************************** +-- +-- IE parameter types from other modules. +-- +-- ************************************************************** + +IMPORTS + Criticality, + Presence, + PrivateIE-ID, + ProtocolIE-ID, + maxPrivateIEs, + maxProtocolExtensions, + maxProtocolIEs +FROM RUA-CommonDataTypes; + +-- ************************************************************** +-- +-- Class Definition for Private IEs +-- +-- ************************************************************** + +RUA-PRIVATE-IES ::= CLASS { + &id PrivateIE-ID, + &criticality Criticality, + &Value, + &presence Presence +} +WITH SYNTAX { + ID &id + CRITICALITY &criticality + TYPE &Value + PRESENCE &presence +} + + +-- ************************************************************** +-- +-- Class Definition for Protocol IEs +-- +-- ************************************************************** + +RUA-PROTOCOL-IES ::= CLASS { + &id ProtocolIE-ID UNIQUE, + &criticality Criticality, + &Value, + &presence Presence +} +WITH SYNTAX { + ID &id + CRITICALITY &criticality + TYPE &Value + PRESENCE &presence +} + +-- ************************************************************** +-- +-- Class Definition for Protocol Extensions +-- +-- ************************************************************** + +RUA-PROTOCOL-EXTENSION ::= CLASS { + &id ProtocolIE-ID UNIQUE, + &criticality Criticality, + &Extension, + &presence Presence +} +WITH SYNTAX { + ID &id + CRITICALITY &criticality + EXTENSION &Extension + PRESENCE &presence +} + + +-- ************************************************************** +-- +-- Container for Protocol IEs +-- +-- ************************************************************** + +ProtocolIE-Container {RUA-PROTOCOL-IES : IEsSetParam} ::= + SEQUENCE (SIZE (0..maxProtocolIEs)) OF + ProtocolIE-Field {{IEsSetParam}} + +ProtocolIE-Single-Container {RUA-PROTOCOL-IES : IEsSetParam} ::= + ProtocolIE-Field {{IEsSetParam}} + +ProtocolIE-Field {RUA-PROTOCOL-IES : IEsSetParam} ::= SEQUENCE { + id RUA-PROTOCOL-IES.&id ({IEsSetParam}), + criticality RUA-PROTOCOL-IES.&criticality ({IEsSetParam}{@id}), + value RUA-PROTOCOL-IES.&Value ({IEsSetParam}{@id}) +} + +-- ************************************************************** +-- +-- Container Lists for Protocol IE Containers +-- +-- ************************************************************** + +ProtocolIE-ContainerList {INTEGER : lowerBound, INTEGER : upperBound, RUA-PROTOCOL-IES : IEsSetParam} ::= + SEQUENCE (SIZE (lowerBound..upperBound)) OF + ProtocolIE-Container {{IEsSetParam}} + +-- ************************************************************** +-- +-- Container for Protocol Extensions +-- +-- ************************************************************** + +ProtocolExtensionContainer {RUA-PROTOCOL-EXTENSION : ExtensionSetParam} ::= + SEQUENCE (SIZE (1..maxProtocolExtensions)) OF + ProtocolExtensionField {{ExtensionSetParam}} + +ProtocolExtensionField {RUA-PROTOCOL-EXTENSION : ExtensionSetParam} ::= SEQUENCE { + id RUA-PROTOCOL-EXTENSION.&id ({ExtensionSetParam}), + criticality RUA-PROTOCOL-EXTENSION.&criticality ({ExtensionSetParam}{@id}), + extensionValue RUA-PROTOCOL-EXTENSION.&Extension ({ExtensionSetParam}{@id}) +} + + +-- ************************************************************** +-- +-- Container for Private IEs +-- +-- ************************************************************** + +PrivateIE-Container {RUA-PRIVATE-IES : IEsSetParam } ::= + SEQUENCE (SIZE (1.. maxPrivateIEs)) OF + PrivateIE-Field {{IEsSetParam}} + +PrivateIE-Field {RUA-PRIVATE-IES : IEsSetParam} ::= SEQUENCE { + id RUA-PRIVATE-IES.&id ({IEsSetParam}), + criticality RUA-PRIVATE-IES.&criticality ({IEsSetParam}{@id}), + value RUA-PRIVATE-IES.&Value ({IEsSetParam}{@id}) +} + + +END diff --git a/epan/dissectors/asn1/rua/RUA-IEs.asn b/epan/dissectors/asn1/rua/RUA-IEs.asn new file mode 100644 index 00000000..de1d5191 --- /dev/null +++ b/epan/dissectors/asn1/rua/RUA-IEs.asn @@ -0,0 +1,199 @@ +-- RUA-IEs.asn +-- +-- 3GPP TS 25.468 V9.1.0 (2010-03) +-- http://www.3gpp.org/ftp/Specs/html-info/25468.htm +-- +-- 9.3.4 Information Element definitions +-- + +-- ************************************************************** +-- +-- Information Element Definitions +-- +-- ************************************************************** + +RUA-IEs { +itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) +umts-Access (20) modules (3) rua(5) version1 (1) rUA-IEs (2) } + +DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +IMPORTS + maxNrOfErrors +FROM RUA-Constants + + Criticality, + ProcedureCode, + ProtocolIE-ID, + TriggeringMessage +FROM RUA-CommonDataTypes + + ProtocolExtensionContainer{}, + RUA-PROTOCOL-EXTENSION +FROM RUA-Containers; + + +CN-DomainIndicator ::= ENUMERATED { + cs-domain, + ps-domain +} + +CSGMembershipStatus ::= ENUMERATED { + member, + non-member, + ... +} + +Establishment-Cause ::= ENUMERATED { + emergency-call, + normal-call, + ... + } + + + + + +Context-ID ::= BIT STRING (SIZE(24)) + +IntraDomainNasNodeSelector ::= SEQUENCE { + version CHOICE { + release99 SEQUENCE { + cn-Type CHOICE { + gsm-Map-IDNNS Gsm-map-IDNNS, + ansi-41-IDNNS Ansi-41-IDNNS + } + }, + later SEQUENCE { + futurecoding BIT STRING (SIZE (15)) + } + } +} + +Gsm-map-IDNNS ::= SEQUENCE { + routingbasis CHOICE { + localPTMSI SEQUENCE { + routingparameter RoutingParameter + }, + tMSIofsamePLMN SEQUENCE { + routingparameter RoutingParameter + }, + tMSIofdifferentPLMN SEQUENCE { + routingparameter RoutingParameter + }, + iMSIresponsetopaging SEQUENCE { + routingparameter RoutingParameter + }, + iMSIcauseUEinitiatedEvent SEQUENCE { + routingparameter RoutingParameter + }, + iMEI SEQUENCE { + routingparameter RoutingParameter + }, + spare2 SEQUENCE { + routingparameter RoutingParameter + }, + spare1 SEQUENCE { + routingparameter RoutingParameter + } + }, + -- dummy is not used in this version of the specification and + -- it should be ignored by the receiver. + dummy BOOLEAN +} + + +Ansi-41-IDNNS ::= BIT STRING (SIZE (14)) + +RANAP-Message ::= OCTET STRING + +RoutingParameter ::= BIT STRING (SIZE (10)) + + +-- ************************************************************** +-- +-- Cause IE +-- +-- ************************************************************** + +Cause ::= CHOICE { + radioNetwork CauseRadioNetwork, + transport CauseTransport, + protocol CauseProtocol, + misc CauseMisc, + ... +} +CauseRadioNetwork ::= ENUMERATED { + normal, + connect-failed, + network-release, + unspecified, + ... +} +CauseTransport ::= ENUMERATED { + transport-resource-unavailable, + unspecified, + ... +} + +CauseProtocol ::= ENUMERATED { + transfer-syntax-error, + abstract-syntax-error-reject, + abstract-syntax-error-ignore-and-notify, + message-not-compatible-with-receiver-state, + semantic-error, + unspecified, + abstract-syntax-error-falsely-constructed-message, + ... +} + +CauseMisc ::= ENUMERATED { + processing-overload, + hardware-failure, + o-and-m-intervention, + unspecified, + ... +} + +-- ************************************************************** +-- +-- CriticalityDiagnostics +-- +-- ************************************************************** + +CriticalityDiagnostics ::= SEQUENCE { + procedureCode ProcedureCode OPTIONAL, + triggeringMessage TriggeringMessage OPTIONAL, + procedureCriticality Criticality OPTIONAL, + iEsCriticalityDiagnostics CriticalityDiagnostics-IE-List OPTIONAL, + iE-Extensions ProtocolExtensionContainer { {CriticalityDiagnostics-ExtIEs} } OPTIONAL, + ... +} + +CriticalityDiagnostics-IE-List ::= SEQUENCE (SIZE (1..maxNrOfErrors)) OF + SEQUENCE { + iECriticality Criticality, + iE-ID ProtocolIE-ID, + typeOfError TypeOfError, + iE-Extensions ProtocolExtensionContainer { {CriticalityDiagnostics-IE-List-ExtIEs} } OPTIONAL, + ... + } + +CriticalityDiagnostics-IE-List-ExtIEs RUA-PROTOCOL-EXTENSION ::= { + ... +} + +CriticalityDiagnostics-ExtIEs RUA-PROTOCOL-EXTENSION ::= { + ... +} + + +TypeOfError ::= ENUMERATED { + not-understood, + missing, + ... +} + +END diff --git a/epan/dissectors/asn1/rua/RUA-PDU-Contents.asn b/epan/dissectors/asn1/rua/RUA-PDU-Contents.asn new file mode 100644 index 00000000..b2598958 --- /dev/null +++ b/epan/dissectors/asn1/rua/RUA-PDU-Contents.asn @@ -0,0 +1,204 @@ +-- RUA-PDU-Contents.asn +-- +-- 3GPP TS 25.468 V9.1.0 (2010-03) +-- http://www.3gpp.org/ftp/Specs/html-info/25468.htm +-- +-- 9.3.3 PDU definitions +-- + +-- ************************************************************** +-- +-- PDU definitions for RUA. +-- +-- ************************************************************** + +RUA-PDU-Contents { +itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) +umts-Access (20) modules (3) rua(5) version1 (1) rUA-PDU-Contents (1) } + +DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +-- ************************************************************** +-- +-- IE parameter types from other modules. +-- +-- ************************************************************** + +IMPORTS + Cause, + CriticalityDiagnostics, + Context-ID, + CN-DomainIndicator, + CSGMembershipStatus, + IntraDomainNasNodeSelector, + RANAP-Message, + Establishment-Cause + +FROM RUA-IEs + + + ProtocolExtensionContainer{}, + ProtocolIE-ContainerList{}, + ProtocolIE-Container{}, + ProtocolIE-Single-Container{}, + PrivateIE-Container{}, + RUA-PRIVATE-IES, + RUA-PROTOCOL-EXTENSION, + RUA-PROTOCOL-IES +FROM RUA-Containers + + id-Cause, + id-CriticalityDiagnostics, + id-Context-ID, + id-CN-DomainIndicator, + id-CSGMembershipStatus, + id-RANAP-Message, + id-IntraDomainNasNodeSelector, + id-Establishment-Cause + +FROM RUA-Constants; + + +-- ************************************************************** +-- +-- Connect +-- +-- ************************************************************** + +Connect ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {ConnectIEs} }, + protocolExtensions ProtocolExtensionContainer { {ConnectExtensions} } OPTIONAL, + ... +} + +ConnectIEs RUA-PROTOCOL-IES ::= { + { ID id-CN-DomainIndicator CRITICALITY reject TYPE CN-DomainIndicator PRESENCE mandatory } | + { ID id-Context-ID CRITICALITY reject TYPE Context-ID PRESENCE mandatory } | + { ID id-IntraDomainNasNodeSelector CRITICALITY ignore TYPE IntraDomainNasNodeSelector PRESENCE optional } | + { ID id-Establishment-Cause CRITICALITY reject TYPE Establishment-Cause PRESENCE mandatory } | + { ID id-RANAP-Message CRITICALITY reject TYPE RANAP-Message PRESENCE mandatory }, + ... +} + +ConnectExtensions RUA-PROTOCOL-EXTENSION ::= { + { ID id-CSGMembershipStatus CRITICALITY ignore EXTENSION CSGMembershipStatus PRESENCE optional }, + + ... +} + + +-- ************************************************************** +-- +-- Direct Transfer +-- +-- ************************************************************** + +DirectTransfer ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {DirectTransferIEs} }, + protocolExtensions ProtocolExtensionContainer { {DirectTransferExtensions} } OPTIONAL, + ... +} + +DirectTransferIEs RUA-PROTOCOL-IES ::= { + { ID id-CN-DomainIndicator CRITICALITY reject TYPE CN-DomainIndicator PRESENCE mandatory } | + { ID id-Context-ID CRITICALITY reject TYPE Context-ID PRESENCE mandatory } | + { ID id-RANAP-Message CRITICALITY reject TYPE RANAP-Message PRESENCE mandatory }, + ... +} + +DirectTransferExtensions RUA-PROTOCOL-EXTENSION ::= { + ... +} + + + +-- ************************************************************** +-- +-- Disconnect +-- +-- ************************************************************** + +Disconnect ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {DisconnectIEs} }, + protocolExtensions ProtocolExtensionContainer { {DisconnectExtensions} } OPTIONAL, + ... +} + +DisconnectIEs RUA-PROTOCOL-IES ::= { + { ID id-CN-DomainIndicator CRITICALITY reject TYPE CN-DomainIndicator PRESENCE mandatory } | + { ID id-Context-ID CRITICALITY reject TYPE Context-ID PRESENCE mandatory } | + { ID id-Cause CRITICALITY reject TYPE Cause PRESENCE mandatory } | + { ID id-RANAP-Message CRITICALITY reject TYPE RANAP-Message PRESENCE conditional }, + -- RANAP message shall be included if Cause value is "normal" + ... +} + +DisconnectExtensions RUA-PROTOCOL-EXTENSION ::= { + ... +} + +-- ************************************************************** +-- +-- Connectionless Transfer +-- +-- ************************************************************** + +ConnectionlessTransfer ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {ConnectionlessTransferIEs} }, + protocolExtensions ProtocolExtensionContainer { {ConnectionlessTransferExtensions} } OPTIONAL, + ... +} + +ConnectionlessTransferIEs RUA-PROTOCOL-IES ::= { + { ID id-RANAP-Message CRITICALITY reject TYPE RANAP-Message PRESENCE mandatory }, + ... +} + +ConnectionlessTransferExtensions RUA-PROTOCOL-EXTENSION ::= { + ... +} + + + + +-- ************************************************************** +-- +-- ERROR INDICATION +-- +-- ************************************************************** + +ErrorIndication ::= SEQUENCE { + protocolIEs ProtocolIE-Container { {ErrorIndicationIEs} }, + protocolExtensions ProtocolExtensionContainer { {ErrorIndicationExtensions} } OPTIONAL, + ... +} + +ErrorIndicationIEs RUA-PROTOCOL-IES ::= { + { ID id-Cause CRITICALITY ignore TYPE Cause PRESENCE mandatory } | + { ID id-CriticalityDiagnostics CRITICALITY ignore TYPE CriticalityDiagnostics PRESENCE optional }, + ... +} + +ErrorIndicationExtensions RUA-PROTOCOL-EXTENSION ::= { + ... +} + +-- ************************************************************** +-- +-- PRIVATE MESSAGE +-- +-- ************************************************************** + +PrivateMessage ::= SEQUENCE { + privateIEs PrivateIE-Container {{PrivateMessage-IEs}}, + ... +} + +PrivateMessage-IEs RUA-PRIVATE-IES ::= { + ... +} + + +END diff --git a/epan/dissectors/asn1/rua/RUA-PDU-Descriptions.asn b/epan/dissectors/asn1/rua/RUA-PDU-Descriptions.asn new file mode 100644 index 00000000..7220b289 --- /dev/null +++ b/epan/dissectors/asn1/rua/RUA-PDU-Descriptions.asn @@ -0,0 +1,176 @@ +-- RUA-PDU-Descriptions.asn +-- +-- 3GPP TS 25.468 V9.1.0 (2010-03) +-- http://www.3gpp.org/ftp/Specs/html-info/25468.htm +-- +-- 9.3.2 Elementary Procedure definitions +-- + +-- ************************************************************** +-- +-- Elementary Procedure definitions +-- +-- ************************************************************** + +RUA-PDU-Descriptions { +itu-t (0) identified-organization (4) etsi (0) mobileDomain (0) +umts-Access (20) modules (3) rua(5) version1 (1) rUA-PDU-Descriptions (0)} + +DEFINITIONS AUTOMATIC TAGS ::= + +BEGIN + +-- ************************************************************** +-- +-- IE parameter types from other modules. +-- +-- ************************************************************** + +IMPORTS + Criticality, + ProcedureCode +FROM RUA-CommonDataTypes + Connect, + DirectTransfer, + Disconnect, + ConnectionlessTransfer, + ErrorIndication, + PrivateMessage + + +FROM RUA-PDU-Contents + id-Connect, + id-DirectTransfer, + id-Disconnect, + id-ConnectionlessTransfer, + id-ErrorIndication, + id-privateMessage +FROM RUA-Constants; + +-- ************************************************************** +-- +-- Interface Elementary Procedure Class +-- +-- ************************************************************** + +RUA-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 definitions +-- +-- ************************************************************** + +RUA-PDU ::= CHOICE { + initiatingMessage InitiatingMessage, + successfulOutcome SuccessfulOutcome, + unsuccessfulOutcome UnsuccessfulOutcome, + ... +} + + +InitiatingMessage ::= SEQUENCE { + procedureCode RUA-ELEMENTARY-PROCEDURE.&procedureCode ({RUA-ELEMENTARY-PROCEDURES}), + criticality RUA-ELEMENTARY-PROCEDURE.&criticality ({RUA-ELEMENTARY-PROCEDURES}{@procedureCode}), + value RUA-ELEMENTARY-PROCEDURE.&InitiatingMessage ({RUA-ELEMENTARY-PROCEDURES}{@procedureCode}) +} + +SuccessfulOutcome ::= SEQUENCE { + procedureCode RUA-ELEMENTARY-PROCEDURE.&procedureCode ({RUA-ELEMENTARY-PROCEDURES}), + criticality RUA-ELEMENTARY-PROCEDURE.&criticality ({RUA-ELEMENTARY-PROCEDURES}{@procedureCode}), + value RUA-ELEMENTARY-PROCEDURE.&SuccessfulOutcome ({RUA-ELEMENTARY-PROCEDURES}{@procedureCode}) +} + +UnsuccessfulOutcome ::= SEQUENCE { + procedureCode RUA-ELEMENTARY-PROCEDURE.&procedureCode ({RUA-ELEMENTARY-PROCEDURES}), + criticality RUA-ELEMENTARY-PROCEDURE.&criticality ({RUA-ELEMENTARY-PROCEDURES}{@procedureCode}), + value RUA-ELEMENTARY-PROCEDURE.&UnsuccessfulOutcome ({RUA-ELEMENTARY-PROCEDURES}{@procedureCode}) +} + +-- ************************************************************** +-- +-- Interface Elementary Procedure List +-- +-- ************************************************************** + +RUA-ELEMENTARY-PROCEDURES RUA-ELEMENTARY-PROCEDURE ::= { + RUA-ELEMENTARY-PROCEDURES-CLASS-1 | + RUA-ELEMENTARY-PROCEDURES-CLASS-2 , + ... +} + +RUA-ELEMENTARY-PROCEDURES-CLASS-1 RUA-ELEMENTARY-PROCEDURE ::= { + ... +} + + +RUA-ELEMENTARY-PROCEDURES-CLASS-2 RUA-ELEMENTARY-PROCEDURE ::= { + connectionRequest | + directTransfer | + disconnectRequest | + connectionlessTransfer | + errorIndication | + privateMessage, + ... +} + +-- ************************************************************** +-- +-- Interface Elementary Procedures +-- +-- ************************************************************** + + +connectionRequest RUA-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE Connect + PROCEDURE CODE id-Connect + CRITICALITY ignore +} + +directTransfer RUA-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE DirectTransfer + PROCEDURE CODE id-DirectTransfer + CRITICALITY ignore +} + +disconnectRequest RUA-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE Disconnect + PROCEDURE CODE id-Disconnect + CRITICALITY ignore +} +connectionlessTransfer RUA-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE ConnectionlessTransfer + PROCEDURE CODE id-ConnectionlessTransfer + CRITICALITY ignore +} + +errorIndication RUA-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE ErrorIndication + PROCEDURE CODE id-ErrorIndication + CRITICALITY ignore +} + +privateMessage RUA-ELEMENTARY-PROCEDURE ::= { + INITIATING MESSAGE PrivateMessage + PROCEDURE CODE id-privateMessage + CRITICALITY ignore +} + + +END + + diff --git a/epan/dissectors/asn1/rua/packet-rua-template.c b/epan/dissectors/asn1/rua/packet-rua-template.c new file mode 100644 index 00000000..cd4ba112 --- /dev/null +++ b/epan/dissectors/asn1/rua/packet-rua-template.c @@ -0,0 +1,161 @@ +/* packet-rua-template.c + * Routines for UMTS Home Node B RANAP User Adaptation (RUA) packet dissection + * Copyright 2010 Neil Piercy, ip.access Limited <Neil.Piercy@ipaccess.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.468 version 8.1.0 Release 8 + */ + +#include "config.h" + +#include <epan/packet.h> +#include <epan/sctpppids.h> +#include <epan/asn1.h> +#include <epan/prefs.h> + +#include "packet-per.h" + +#ifdef _MSC_VER +/* disable: "warning C4146: unary minus operator applied to unsigned type, result still unsigned" */ +#pragma warning(disable:4146) +#endif + +#define PNAME "UTRAN Iuh interface RUA signalling" +#define PSNAME "RUA" +#define PFNAME "rua" +/* Dissector to use SCTP PPID 19 or a configured SCTP port. IANA assigned port = 29169*/ +#define SCTP_PORT_RUA 29169 + +void proto_register_rua(void); + +#include "packet-rua-val.h" + +/* Initialize the protocol and registered fields */ +static int proto_rua = -1; + +#include "packet-rua-hf.c" + +/* Initialize the subtree pointers */ +static int ett_rua = -1; + + /* initialise sub-dissector handles */ + static dissector_handle_t ranap_handle = NULL; + +#include "packet-rua-ett.c" + +/* Global variables */ +static guint32 ProcedureCode; +static guint32 ProtocolIE_ID; + +/* Dissector tables */ +static dissector_table_t rua_ies_dissector_table; +static dissector_table_t rua_extension_dissector_table; +static dissector_table_t rua_proc_imsg_dissector_table; +static dissector_table_t rua_proc_sout_dissector_table; +static dissector_table_t rua_proc_uout_dissector_table; + +static dissector_handle_t rua_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 *); + +void proto_reg_handoff_rua(void); + +#include "packet-rua-fn.c" + +static int dissect_ProtocolIEFieldValue(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) +{ + return (dissector_try_uint_new(rua_ies_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE, NULL)) ? 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_new(rua_extension_dissector_table, ProtocolIE_ID, tvb, pinfo, tree, FALSE, NULL)) ? 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_new(rua_proc_imsg_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE, NULL)) ? 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_new(rua_proc_sout_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE, NULL)) ? 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_new(rua_proc_uout_dissector_table, ProcedureCode, tvb, pinfo, tree, FALSE, NULL)) ? tvb_captured_length(tvb) : 0; +} + +static int +dissect_rua(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) +{ + proto_item *rua_item = NULL; + proto_tree *rua_tree = NULL; + + /* make entry in the Protocol column on summary display */ + col_set_str(pinfo->cinfo, COL_PROTOCOL, "RUA"); + + /* create the rua protocol tree */ + rua_item = proto_tree_add_item(tree, proto_rua, tvb, 0, -1, ENC_NA); + rua_tree = proto_item_add_subtree(rua_item, ett_rua); + + return dissect_RUA_PDU_PDU(tvb, pinfo, rua_tree, data); +} + +/*--- proto_register_rua -------------------------------------------*/ +void proto_register_rua(void) { + + /* List of fields */ + + static hf_register_info hf[] = { + +#include "packet-rua-hfarr.c" + }; + + /* List of subtrees */ + static gint *ett[] = { + &ett_rua, +#include "packet-rua-ettarr.c" + }; + + + /* Register protocol */ + proto_rua = proto_register_protocol(PNAME, PSNAME, PFNAME); + /* Register fields and subtrees */ + proto_register_field_array(proto_rua, hf, array_length(hf)); + proto_register_subtree_array(ett, array_length(ett)); + + /* Register dissector */ + rua_handle = register_dissector("rua", dissect_rua, proto_rua); + + /* Register dissector tables */ + rua_ies_dissector_table = register_dissector_table("rua.ies", "RUA-PROTOCOL-IES", proto_rua, FT_UINT32, BASE_DEC); + rua_extension_dissector_table = register_dissector_table("rua.extension", "RUA-PROTOCOL-EXTENSION", proto_rua, FT_UINT32, BASE_DEC); + rua_proc_imsg_dissector_table = register_dissector_table("rua.proc.imsg", "RUA-ELEMENTARY-PROCEDURE InitiatingMessage", proto_rua, FT_UINT32, BASE_DEC); + rua_proc_sout_dissector_table = register_dissector_table("rua.proc.sout", "RUA-ELEMENTARY-PROCEDURE SuccessfulOutcome", proto_rua, FT_UINT32, BASE_DEC); + rua_proc_uout_dissector_table = register_dissector_table("rua.proc.uout", "RUA-ELEMENTARY-PROCEDURE UnsuccessfulOutcome", proto_rua, FT_UINT32, BASE_DEC); + + /* rua_module = prefs_register_protocol(proto_rua, NULL); */ + +} + + +/*--- proto_reg_handoff_rua ---------------------------------------*/ +void +proto_reg_handoff_rua(void) +{ + ranap_handle = find_dissector_add_dependency("ranap", proto_rua); + dissector_add_uint("sctp.ppi", RUA_PAYLOAD_PROTOCOL_ID, rua_handle); + dissector_add_uint_with_preference("sctp.port", SCTP_PORT_RUA, rua_handle); +#include "packet-rua-dis-tab.c" +} diff --git a/epan/dissectors/asn1/rua/rua.cnf b/epan/dissectors/asn1/rua/rua.cnf new file mode 100644 index 00000000..f173d7d7 --- /dev/null +++ b/epan/dissectors/asn1/rua/rua.cnf @@ -0,0 +1,147 @@ +# rua.cnf +# rua conformation file +# Copyright 2010 Neil Piercy, ip.access Limited <Neil.Piercy@ipaccess.com> + +#.OPT +PER +ALIGNED +#.END + +#.PDU +RUA-PDU + +#.MAKE_ENUM +ProtocolIE-ID +ProcedureCode + +#.TYPE_RENAME +ProtocolIE-Field/value ProtocolIE_Field_value +PrivateIE-Field/value PrivateIE_Field_value +InitiatingMessage/value InitiatingMessage_value +SuccessfulOutcome/value SuccessfulOutcome_value +UnsuccessfulOutcome/value UnsuccessfulOutcome_value + +#.FIELD_RENAME +InitiatingMessage/value initiatingMessagevalue +UnsuccessfulOutcome/value unsuccessfulOutcome_value +SuccessfulOutcome/value successfulOutcome_value +PrivateIE-Field/value private_value +ProtocolIE-Field/value ie_field_value +ProtocolIE-Field/id protocol_ie_field_id +PrivateIE-Field/id private_ie_field_id + +#.OMIT_ASSIGNMENT +Presence +ProtocolIE-ContainerList +ProtocolIE-Single-Container +#.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(ProtocolIE_ID, VALS(rua_ProtocolIE_ID_vals), "unknown (%d)")); + } +#.END + +#.FN_PARS ProtocolIE-Field/value FN_VARIANT=_pdu_new TYPE_REF_FN=dissect_ProtocolIEFieldValue + +#.FN_PARS ProtocolExtensionField/extensionValue FN_VARIANT=_pdu_new TYPE_REF_FN=dissect_ProtocolExtensionFieldExtensionValue + +#.FN_PARS ProcedureCode VAL_PTR = &ProcedureCode +#.FN_FTR ProcedureCode + if (strcmp(val_to_str(ProcedureCode, rua_ProcedureCode_vals, "Unknown"), "Unknown") == 0) { + col_set_str(actx->pinfo->cinfo, COL_INFO, + "Unknown Message "); + } /* Known Procedures should be included below and broken out as ELEMENTARY names to avoid confusion */ + +#.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 + +#.FN_BODY Connect + col_set_str(actx->pinfo->cinfo, COL_INFO, + "CONNECT "); +%(DEFAULT_BODY)s + +#.FN_BODY DirectTransfer + col_set_str(actx->pinfo->cinfo, COL_INFO, + "DIRECT_TRANSFER "); +%(DEFAULT_BODY)s + +#.FN_BODY Disconnect + col_set_str(actx->pinfo->cinfo, COL_INFO, + "DISCONNECT "); +%(DEFAULT_BODY)s + +#.FN_BODY ConnectionlessTransfer + col_set_str(actx->pinfo->cinfo, COL_INFO, + "CONNECTIONLESS_TRANSFER "); +%(DEFAULT_BODY)s + +#.FN_BODY ErrorIndication + col_set_str(actx->pinfo->cinfo, COL_INFO, + "ERROR_INDICATION "); + col_set_fence(actx->pinfo->cinfo, COL_INFO); /* Protect info from CriticalityDiagnostics decodes */ +%(DEFAULT_BODY)s + +#.FN_BODY PrivateMessage + col_set_str(actx->pinfo->cinfo, COL_INFO, + "PRIVATE_MESSAGE "); +%(DEFAULT_BODY)s + +#.FN_BODY RANAP-Message VAL_PTR = &ranap_message_tvb + tvbuff_t *ranap_message_tvb=NULL; +%(DEFAULT_BODY)s + if ((tvb_reported_length(ranap_message_tvb)>0)&&(ranap_handle)) { /* RUA has a RANAP-PDU */ + col_set_str(actx->pinfo->cinfo, COL_INFO, + "(RUA) "); /* Set info to (RUA) to make room for RANAP */ + col_set_fence(actx->pinfo->cinfo, COL_INFO); + call_dissector(ranap_handle,ranap_message_tvb,%(ACTX)s->pinfo, proto_tree_get_root(tree)); + } +#.END + + +#.ASSIGN_VALUE_TO_TYPE # RUA ASN.1 does not have constants assigned to types, +# ProcedureCode +id-Connect ProcedureCode +id-DirectTransfer ProcedureCode +id-Disconnect ProcedureCode +id-ConnectionlessTransfer ProcedureCode +id-ErrorIndication ProcedureCode +id-privateMessage ProcedureCode + +# ProtocolIE-ID +id-Cause ProtocolIE-ID +id-CriticalityDiagnostics ProtocolIE-ID +id-Context-ID ProtocolIE-ID +id-RANAP-Message ProtocolIE-ID +id-IntraDomainNasNodeSelector ProtocolIE-ID +id-Establishment-Cause ProtocolIE-ID +id-CN-DomainIndicator ProtocolIE-ID +#.END + + +#.REGISTER + +#RUA-PROTOCOL-IES +Cause N rua.ies id-Cause +CriticalityDiagnostics N rua.ies id-CriticalityDiagnostics +Context-ID N rua.ies id-Context-ID +RANAP-Message N rua.ies id-RANAP-Message +IntraDomainNasNodeSelector N rua.ies id-IntraDomainNasNodeSelector +Establishment-Cause N rua.ies id-Establishment-Cause +CN-DomainIndicator N rua.ies id-CN-DomainIndicator + +#RUA-PROTOCOL-EXTENSION +CSGMembershipStatus N rua.extension id-CSGMembershipStatus + +#RUA-ELEMENTARY-PROCEDURE +Connect N rua.proc.imsg id-Connect +DirectTransfer N rua.proc.imsg id-DirectTransfer +Disconnect N rua.proc.imsg id-Disconnect +ConnectionlessTransfer N rua.proc.imsg id-ConnectionlessTransfer +ErrorIndication N rua.proc.imsg id-ErrorIndication +PrivateMessage N rua.proc.imsg id-privateMessage +#.END |