summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/asn1/mms
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/asn1/mms')
-rw-r--r--epan/dissectors/asn1/mms/CMakeLists.txt39
-rw-r--r--epan/dissectors/asn1/mms/mms.asn2301
-rw-r--r--epan/dissectors/asn1/mms/mms.cnf201
-rw-r--r--epan/dissectors/asn1/mms/packet-mms-template.c248
-rw-r--r--epan/dissectors/asn1/mms/packet-mms-template.h18
5 files changed, 2807 insertions, 0 deletions
diff --git a/epan/dissectors/asn1/mms/CMakeLists.txt b/epan/dissectors/asn1/mms/CMakeLists.txt
new file mode 100644
index 00000000..54a77b81
--- /dev/null
+++ b/epan/dissectors/asn1/mms/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 mms )
+
+set( PROTO_OPT )
+
+set( EXT_ASN_FILE_LIST
+)
+
+set( ASN_FILE_LIST
+ ${PROTOCOL_NAME}.asn
+)
+
+set( EXTRA_DIST
+ ${ASN_FILE_LIST}
+ packet-${PROTOCOL_NAME}-template.c
+ packet-${PROTOCOL_NAME}-template.h
+ ${PROTOCOL_NAME}.cnf
+)
+
+set( SRC_FILES
+ ${EXTRA_DIST}
+ ${EXT_ASN_FILE_LIST}
+)
+
+set( A2W_FLAGS -b )
+
+set( EXTRA_CNF
+ "${CMAKE_CURRENT_BINARY_DIR}/../acse/acse-exp.cnf"
+)
+
+ASN2WRS()
diff --git a/epan/dissectors/asn1/mms/mms.asn b/epan/dissectors/asn1/mms/mms.asn
new file mode 100644
index 00000000..3f72c10f
--- /dev/null
+++ b/epan/dissectors/asn1/mms/mms.asn
@@ -0,0 +1,2301 @@
+-- ASN definition from
+-- http://www.sisconet.com/techinfo.htm
+-- slightly modified
+--
+--
+--Corrections made July 2, 1994
+--
+--
+-- Modified to pass asn2wrs
+
+MMS { iso standard 9506 part(2) mms-general-module-version(2) }
+
+DEFINITIONS ::=
+
+BEGIN
+
+EXPORTS MMSpdu;
+
+IMPORTS
+ EXTERNALt,
+ AP-title,
+ AP-invocation-identifier,
+ AE-qualifier,
+ AE-invocation-identifier
+FROM ISO-8650-ACSE-1;
+
+
+MMSpdu ::= CHOICE
+ {
+ confirmed-RequestPDU [0] IMPLICIT Confirmed-RequestPDU,
+ confirmed-ResponsePDU [1] IMPLICIT Confirmed-ResponsePDU,
+ confirmed-ErrorPDU [2] IMPLICIT Confirmed-ErrorPDU,
+ unconfirmed-PDU [3] IMPLICIT Unconfirmed-PDU,
+ rejectPDU [4] IMPLICIT RejectPDU,
+ cancel-RequestPDU [5] IMPLICIT Cancel-RequestPDU,
+ cancel-ResponsePDU [6] IMPLICIT Cancel-ResponsePDU,
+ cancel-ErrorPDU [7] IMPLICIT Cancel-ErrorPDU,
+ initiate-RequestPDU [8] IMPLICIT Initiate-RequestPDU,
+ initiate-ResponsePDU [9] IMPLICIT Initiate-ResponsePDU,
+ initiate-ErrorPDU [10] IMPLICIT Initiate-ErrorPDU,
+ conclude-RequestPDU [11] IMPLICIT Conclude-RequestPDU,
+ conclude-ResponsePDU [12] IMPLICIT Conclude-ResponsePDU,
+ conclude-ErrorPDU [13] IMPLICIT Conclude-ErrorPDU
+ }
+
+
+Confirmed-RequestPDU ::= SEQUENCE
+ {
+ invokeID Unsigned32,
+ listOfModifier SEQUENCE OF Modifier OPTIONAL,
+ confirmedServiceRequest ConfirmedServiceRequest,
+ cs-request-detail [79] CS-Request-Detail OPTIONAL
+ }
+
+
+Unconfirmed-PDU ::= SEQUENCE
+ {
+ unconfirmedService UnconfirmedService,
+ cs-request-detail [79] CS-Request-Detail OPTIONAL
+ }
+
+
+Confirmed-ResponsePDU ::= SEQUENCE
+ {
+ invokeID Unsigned32,
+ confirmedServiceResponse ConfirmedServiceResponse,
+ cs-request-detail [79] CS-Request-Detail OPTIONAL
+ }
+
+
+Confirmed-ErrorPDU ::= SEQUENCE
+ {
+ invokeID [0] IMPLICIT Unsigned32,
+ modifierPosition [1] IMPLICIT Unsigned32 OPTIONAL,
+ serviceError [2] IMPLICIT ServiceError
+ }
+
+
+UnconfirmedService ::= CHOICE
+ {
+ informationReport [0] IMPLICIT InformationReport,
+ unsolicitedStatus [1] IMPLICIT UnsolicitedStatus,
+ eventNotification [2] IMPLICIT EventNotification
+-- XXX this one is neither in this ASN nor in the IMPORTS
+-- additionalService [3] AdditionalUnconfirmedService
+ }
+
+
+Modifier ::= CHOICE
+ {
+ attach-To-Event-Condition [0] IMPLICIT AttachToEventCondition,
+ attach-To-Semaphore [1] IMPLICIT AttachToSemaphore
+ }
+
+
+ConfirmedServiceRequest ::= CHOICE
+ {
+ status [0] IMPLICIT Status-Request,
+ getNameList [1] IMPLICIT GetNameList-Request,
+ identify [2] IMPLICIT Identify-Request,
+ rename [3] IMPLICIT Rename-Request,
+ read [4] IMPLICIT Read-Request,
+ write [5] IMPLICIT Write-Request,
+ getVariableAccessAttributes [6] GetVariableAccessAttributes-Request,
+ defineNamedVariable [7] IMPLICIT DefineNamedVariable-Request,
+ defineScatteredAccess [8] IMPLICIT DefineScatteredAccess-Request,
+ getScatteredAccessAttributes [9] IMPLICIT GetScatteredAccessAttributes-Request,
+ deleteVariableAccess [10] IMPLICIT DeleteVariableAccess-Request,
+ defineNamedVariableList [11] IMPLICIT DefineNamedVariableList-Request,
+ getNamedVariableListAttributes [12] IMPLICIT GetNamedVariableListAttributes-Request,
+ deleteNamedVariableList [13] IMPLICIT DeleteNamedVariableList-Request,
+ defineNamedType [14] IMPLICIT DefineNamedType-Request,
+ getNamedTypeAttributes [15] IMPLICIT GetNamedTypeAttributes-Request,
+ deleteNamedType [16] IMPLICIT DeleteNamedType-Request,
+ input [17] IMPLICIT Input-Request,
+ output [18] IMPLICIT Output-Request,
+ takeControl [19] IMPLICIT TakeControl-Request,
+ relinquishControl [20] IMPLICIT RelinquishControl-Request,
+ defineSemaphore [21] IMPLICIT DefineSemaphore-Request,
+ deleteSemaphore [22] IMPLICIT DeleteSemaphore-Request,
+ reportSemaphoreStatus [23] IMPLICIT ReportSemaphoreStatus-Request,
+ reportPoolSemaphoreStatus [24] IMPLICIT ReportPoolSemaphoreStatus-Request,
+ reportSemaphoreEntryStatus [25] IMPLICIT ReportSemaphoreEntryStatus-Request,
+ initiateDownloadSequence [26] IMPLICIT InitiateDownloadSequence-Request,
+ downloadSegment [27] IMPLICIT DownloadSegment-Request,
+ terminateDownloadSequence [28] IMPLICIT TerminateDownloadSequence-Request,
+ initiateUploadSequence [29] IMPLICIT InitiateUploadSequence-Request,
+ uploadSegment [30] IMPLICIT UploadSegment-Request,
+ terminateUploadSequence [31] IMPLICIT TerminateUploadSequence-Request,
+ requestDomainDownload [32] IMPLICIT RequestDomainDownload-Request,
+ requestDomainUpload [33] IMPLICIT RequestDomainUpload-Request,
+ loadDomainContent [34] IMPLICIT LoadDomainContent-Request,
+ storeDomainContent [35] IMPLICIT StoreDomainContent-Request,
+ deleteDomain [36] IMPLICIT DeleteDomain-Request,
+ getDomainAttributes [37] IMPLICIT GetDomainAttributes-Request,
+ createProgramInvocation [38] IMPLICIT CreateProgramInvocation-Request,
+ deleteProgramInvocation [39] IMPLICIT DeleteProgramInvocation-Request,
+ start [40] IMPLICIT Start-Request,
+ stop [41] IMPLICIT Stop-Request,
+ resume [42] IMPLICIT Resume-Request,
+ reset [43] IMPLICIT Reset-Request,
+ kill [44] IMPLICIT Kill-Request,
+ getProgramInvocationAttributes [45] IMPLICIT GetProgramInvocationAttributes-Request,
+ obtainFile [46] IMPLICIT ObtainFile-Request,
+ defineEventCondition [47] IMPLICIT DefineEventCondition-Request,
+ deleteEventCondition [48] DeleteEventCondition-Request,
+ getEventConditionAttributes [49] GetEventConditionAttributes-Request,
+ reportEventConditionStatus [50] ReportEventConditionStatus-Request,
+ alterEventConditionMonitoring [51] IMPLICIT AlterEventConditionMonitoring-Request,
+ triggerEvent [52] IMPLICIT TriggerEvent-Request,
+ defineEventAction [53] IMPLICIT DefineEventAction-Request,
+ deleteEventAction [54] DeleteEventAction-Request,
+ getEventActionAttributes [55] GetEventActionAttributes-Request,
+ reportEventActionStatus [56] ReportEventActionStatus-Request,
+ defineEventEnrollment [57] IMPLICIT DefineEventEnrollment-Request,
+ deleteEventEnrollment [58] DeleteEventEnrollment-Request,
+ alterEventEnrollment [59] IMPLICIT AlterEventEnrollment-Request,
+ reportEventEnrollmentStatus [60] ReportEventEnrollmentStatus-Request,
+ getEventEnrollmentAttributes [61] IMPLICIT GetEventEnrollmentAttributes-Request,
+ acknowledgeEventNotification [62] IMPLICIT AcknowledgeEventNotification-Request,
+ getAlarmSummary [63] IMPLICIT GetAlarmSummary-Request,
+ getAlarmEnrollmentSummary [64] IMPLICIT GetAlarmEnrollmentSummary-Request,
+ readJournal [65] IMPLICIT ReadJournal-Request,
+ writeJournal [66] IMPLICIT WriteJournal-Request,
+ initializeJournal [67] IMPLICIT InitializeJournal-Request,
+ reportJournalStatus [68] IMPLICIT ReportJournalStatus-Request,
+ createJournal [69] IMPLICIT CreateJournal-Request,
+ deleteJournal [70] IMPLICIT DeleteJournal-Request,
+ getCapabilityList [71] IMPLICIT GetCapabilityList-Request,
+ fileOpen [72] IMPLICIT FileOpen-Request,
+ fileRead [73] IMPLICIT FileRead-Request,
+ fileClose [74] IMPLICIT FileClose-Request,
+ fileRename [75] IMPLICIT FileRename-Request,
+ fileDelete [76] IMPLICIT FileDelete-Request,
+ fileDirectory [77] IMPLICIT FileDirectory-Request
+-- XXX this one is neither in this ASN nor in the IMPORTS
+-- additionalService [78] AdditionalService-Request
+ }
+
+CS-Request-Detail ::= CHOICE {
+-- see ISO 9506-2
+-- XXX can not handle empty choice
+-- XXX fix me later
+ foo INTEGER
+ }
+
+ConfirmedServiceResponse ::= CHOICE
+ {
+ status [0] IMPLICIT Status-Response,
+ getNameList [1] IMPLICIT GetNameList-Response,
+ identify [2] IMPLICIT Identify-Response,
+ rename [3] IMPLICIT Rename-Response,
+ read [4] IMPLICIT Read-Response,
+ write [5] IMPLICIT Write-Response,
+ getVariableAccessAttributes [6] IMPLICIT GetVariableAccessAttributes-Response,
+ defineNamedVariable [7] IMPLICIT DefineNamedVariable-Response,
+ defineScatteredAccess [8] IMPLICIT DefineScatteredAccess-Response,
+ getScatteredAccessAttributes [9] IMPLICIT GetScatteredAccessAttributes-Response,
+ deleteVariableAccess [10] IMPLICIT DeleteVariableAccess-Response,
+ defineNamedVariableList [11] IMPLICIT DefineNamedVariableList-Response,
+ getNamedVariableListAttributes [12] IMPLICIT GetNamedVariableListAttributes-Response,
+ deleteNamedVariableList [13] IMPLICIT DeleteNamedVariableList-Response,
+ defineNamedType [14] IMPLICIT DefineNamedType-Response,
+ getNamedTypeAttributes [15] IMPLICIT GetNamedTypeAttributes-Response,
+ deleteNamedType [16] IMPLICIT DeleteNamedType-Response,
+ input [17] IMPLICIT Input-Response,
+ output [18] IMPLICIT Output-Response,
+ takeControl [19] TakeControl-Response,
+ relinquishControl [20] IMPLICIT RelinquishControl-Response,
+ defineSemaphore [21] IMPLICIT DefineSemaphore-Response,
+ deleteSemaphore [22] IMPLICIT DeleteSemaphore-Response,
+ reportSemaphoreStatus [23] IMPLICIT ReportSemaphoreStatus-Response,
+ reportPoolSemaphoreStatus [24] IMPLICIT ReportPoolSemaphoreStatus-Response,
+ reportSemaphoreEntryStatus [25] IMPLICIT ReportSemaphoreEntryStatus-Response,
+ initiateDownloadSequence [26] IMPLICIT InitiateDownloadSequence-Response,
+ downloadSegment [27] IMPLICIT DownloadSegment-Response,
+ terminateDownloadSequence [28] IMPLICIT TerminateDownloadSequence-Response,
+ initiateUploadSequence [29] IMPLICIT InitiateUploadSequence-Response,
+ uploadSegment [30] IMPLICIT UploadSegment-Response,
+ terminateUploadSequence [31] IMPLICIT TerminateUploadSequence-Response,
+ requestDomainDownLoad [32] IMPLICIT RequestDomainDownload-Response,
+ requestDomainUpload [33] IMPLICIT RequestDomainUpload-Response,
+ loadDomainContent [34] IMPLICIT LoadDomainContent-Response,
+ storeDomainContent [35] IMPLICIT StoreDomainContent-Response,
+ deleteDomain [36] IMPLICIT DeleteDomain-Response,
+ getDomainAttributes [37] IMPLICIT GetDomainAttributes-Response,
+ createProgramInvocation [38] IMPLICIT CreateProgramInvocation-Response,
+ deleteProgramInvocation [39] IMPLICIT DeleteProgramInvocation-Response,
+ start [40] IMPLICIT Start-Response,
+ stop [41] IMPLICIT Stop-Response,
+ resume [42] IMPLICIT Resume-Response,
+ reset [43] IMPLICIT Reset-Response,
+ kill [44] IMPLICIT Kill-Response,
+ getProgramInvocationAttributes [45] IMPLICIT GetProgramInvocationAttributes-Response,
+ obtainFile [46] IMPLICIT ObtainFile-Response,
+ fileOpen [72] IMPLICIT FileOpen-Response,
+ defineEventCondition [47] IMPLICIT DefineEventCondition-Response,
+ deleteEventCondition [48] IMPLICIT DeleteEventCondition-Response,
+ getEventConditionAttributes [49] IMPLICIT GetEventConditionAttributes-Response,
+ reportEventConditionStatus [50] IMPLICIT ReportEventConditionStatus-Response,
+ alterEventConditionMonitoring [51] IMPLICIT AlterEventConditionMonitoring-Response,
+ triggerEvent [52] IMPLICIT TriggerEvent-Response,
+ defineEventAction [53] IMPLICIT DefineEventAction-Response,
+ deleteEventAction [54] IMPLICIT DeleteEventAction-Response,
+ getEventActionAttributes [55] IMPLICIT GetEventActionAttributes-Response,
+ reportActionStatus [56] IMPLICIT ReportEventActionStatus-Response,
+ defineEventEnrollment [57] IMPLICIT DefineEventEnrollment-Response,
+ deleteEventEnrollment [58] IMPLICIT DeleteEventEnrollment-Response,
+ alterEventEnrollment [59] IMPLICIT AlterEventEnrollment-Response,
+ reportEventEnrollmentStatus [60] IMPLICIT ReportEventEnrollmentStatus-Response,
+ getEventEnrollmentAttributes [61] IMPLICIT GetEventEnrollmentAttributes-Response,
+ acknowledgeEventNotification [62] IMPLICIT AcknowledgeEventNotification-Response,
+ getAlarmSummary [63] IMPLICIT GetAlarmSummary-Response,
+ getAlarmEnrollmentSummary [64] IMPLICIT GetAlarmEnrollmentSummary-Response,
+ readJournal [65] IMPLICIT ReadJournal-Response,
+ writeJournal [66] IMPLICIT WriteJournal-Response,
+ initializeJournal [67] IMPLICIT InitializeJournal-Response,
+ reportJournalStatus [68] IMPLICIT ReportJournalStatus-Response,
+ createJournal [69] IMPLICIT CreateJournal-Response,
+ deleteJournal [70] IMPLICIT DeleteJournal-Response,
+ getCapabilityList [71] IMPLICIT GetCapabilityList-Response,
+ fileRead [73] IMPLICIT FileRead-Response,
+ fileClose [74] IMPLICIT FileClose-Response,
+ fileRename [75] IMPLICIT FileRename-Response,
+ fileDelete [76] IMPLICIT FileDelete-Response,
+ fileDirectory [77] IMPLICIT FileDirectory-Response
+-- XXX this one is neither in this ASN nor in the IMPORTS
+-- additionalService [78] AdditionalService-Response
+ }
+
+--********************************** COMMON MMS TYPES ***********************************
+
+FileName ::= SEQUENCE OF GraphicString
+
+TimeOfDay ::= OCTET STRING -- (SIZE (4 | 6))
+
+Identifier ::= VisibleString
+
+MMSString ::= UTF8String
+
+Integer8 ::= INTEGER
+Integer16 ::= INTEGER
+Integer32 ::= INTEGER
+
+
+Unsigned8 ::= INTEGER
+Unsigned16 ::= INTEGER
+Unsigned32 ::= INTEGER
+
+
+ObjectName ::= CHOICE
+ {
+ vmd-specific [0] IMPLICIT Identifier,
+ domain-specific [1] IMPLICIT SEQUENCE
+ {
+ domainId Identifier,
+ itemId Identifier
+ },
+ aa-specific [2] IMPLICIT Identifier
+ }
+
+
+ApplicationReference ::= SEQUENCE
+ {
+ ap-title [0] AP-title OPTIONAL,
+ ap-invocation-id [1] AP-invocation-identifier OPTIONAL,
+ ae-qualifier [2] AE-qualifier OPTIONAL,
+ ae-invocation-id [3] AE-invocation-identifier OPTIONAL
+ }
+
+
+Priority ::= Unsigned8
+
+normalPriority Priority ::= 64
+
+
+
+
+
+-- ************************************ GENERAL *************************************
+
+Initiate-ErrorPDU ::= ServiceError
+
+Initiate-RequestPDU ::= SEQUENCE
+ {
+ localDetailCalling [0] IMPLICIT Integer32 OPTIONAL,
+ proposedMaxServOutstandingCalling [1] IMPLICIT Integer16,
+ proposedMaxServOutstandingCalled [2] IMPLICIT Integer16,
+ proposedDataStructureNestingLevel [3] IMPLICIT Integer8 OPTIONAL,
+ mmsInitRequestDetail [4] IMPLICIT InitRequestDetail
+ }
+
+InitRequestDetail ::= SEQUENCE
+ {
+ proposedVersionNumber [0] IMPLICIT Integer16,
+ proposedParameterCBB [1] IMPLICIT ParameterSupportOptions,
+ servicesSupportedCalling [2] IMPLICIT ServiceSupportOptions
+ }
+
+Initiate-ResponsePDU ::= SEQUENCE
+ {
+ localDetailCalled [0] IMPLICIT Integer32 OPTIONAL,
+ negociatedMaxServOutstandingCalling [1] IMPLICIT Integer16,
+ negociatedMaxServOutstandingCalled [2] IMPLICIT Integer16,
+ negociatedDataStructureNestingLevel [3] IMPLICIT Integer8 OPTIONAL,
+ mmsInitResponseDetail [4] IMPLICIT InitResponseDetail
+ }
+
+InitResponseDetail ::= SEQUENCE
+ {
+ negociatedVersionNumber [0] IMPLICIT Integer16,
+ negociatedParameterCBB [1] IMPLICIT ParameterSupportOptions,
+ servicesSupportedCalled [2] IMPLICIT ServiceSupportOptions
+ }
+
+
+ParameterSupportOptions ::= BIT STRING {
+ str1 (0),
+ str2 (1),
+ vnam (2),
+ valt (3),
+ vadr (4),
+ vsca (5),
+ tpy (6),
+ vlis (7),
+ real (8),
+ cei (10)
+ }
+
+
+ServiceSupportOptions ::= BIT STRING
+ {
+ status (0),
+ getNameList (1),
+ identify (2),
+ rename (3),
+ read (4),
+ write (5),
+ getVariableAccessAttributes (6),
+ defineNamedVariable (7),
+ defineScatteredAccess (8),
+ getScatteredAccessAttributes (9),
+ deleteVariableAccess (10),
+ defineNamedVariableList (11),
+ getNamedVariableListAttributes (12),
+ deleteNamedVariableList (13),
+ defineNamedType (14),
+ getNamedTypeAttributes (15),
+ deleteNamedType (16),
+ input (17),
+ output (18),
+ takeControl (19),
+ relinquishControl (20),
+ defineSemaphore (21),
+ deleteSemaphore (22),
+ reportSemaphoreStatus (23),
+ reportPoolSemaphoreStatus (24),
+ reportSemaphoreEntryStatus (25),
+ initiateDownloadSequence (26),
+ downloadSegment (27),
+ terminateDownloadSequence (28),
+ initiateUploadSequence (29),
+ uploadSegment (30),
+ terminateUploadSequence (31),
+ requestDomainDownload (32),
+ requestDomainUpload (33),
+ loadDomainContent (34),
+ storeDomainContent (35),
+ deleteDomain (36),
+ getDomainAttributes (37),
+ createProgramInvocation (38),
+ deleteProgramInvocation (39),
+ start (40),
+ stop (41),
+ resume (42),
+ reset (43),
+ kill (44),
+ getProgramInvocationAttributes (45),
+ obtainFile (46),
+ defineEventCondition (47),
+ deleteEventCondition (48),
+ getEventConditionAttributes (49),
+ reportEventConditionStatus (50),
+ alterEventConditionMonitoring (51),
+ triggerEvent (52),
+ defineEventAction (53),
+ deleteEventAction (54),
+ getEventActionAttributes (55),
+ reportActionStatus (56),
+ defineEventEnrollment (57),
+ deleteEventEnrollment (58),
+ alterEventEnrollment (59),
+ reportEventEnrollmentStatus (60),
+ getEventEnrollmentAttributes (61),
+ acknowledgeEventNotification (62),
+ getAlarmSummary (63),
+ getAlarmEnrollmentSummary (64),
+ readJournal (65),
+ writeJournal (66),
+ initializeJournal (67),
+ reportJournalStatus (68),
+ createJournal (69),
+ deleteJournal (70),
+ getCapabilityList (71),
+ fileOpen (72),
+ fileRead (73),
+ fileClose (74),
+ fileRename (75),
+ fileDelete (76),
+ fileDirectory (77),
+ unsolicitedStatus (78),
+ informationReport (79),
+ eventNotification (80),
+ attachToEventCondition (81),
+ attachToSemaphore (82),
+ conclude (83),
+ cancel (84)
+ }
+
+---------------------------------- CONCLUDE --------------------------------
+
+Conclude-RequestPDU ::= NULL
+
+Conclude-ResponsePDU ::= NULL
+
+Conclude-ErrorPDU ::= ServiceError
+
+---------------------------------- CANCEL --------------------------------
+
+Cancel-RequestPDU ::= Unsigned32 -- originalInvokeID
+
+Cancel-ResponsePDU ::= Unsigned32 -- originalInvokeID
+
+Cancel-ErrorPDU ::= SEQUENCE
+ {
+ originalInvokeID [0] IMPLICIT Unsigned32,
+ serviceError [1] IMPLICIT ServiceError
+ }
+
+------------------------------ Service-Error --------------------------------
+
+ServiceError ::= SEQUENCE
+ {
+ errorClass [0] CHOICE
+ {
+ vmd-state [0] IMPLICIT INTEGER
+ {
+ other (0),
+ vmd-state-conflict (1),
+ vmd-operational-problem (2),
+ domain-transfer-problem (3),
+ state-machine-id-invalid (4)
+ },
+ application-reference [1] IMPLICIT INTEGER
+ {
+ other (0),
+ aplication-unreachable (1),
+ connection-lost (2),
+ application-reference-invalid (3),
+ context-unsupported (4)
+ },
+ definition [2] IMPLICIT INTEGER
+ {
+ other (0),
+ object-undefined (1),
+ invalid-address (2),
+ type-unsupported (3),
+ type-inconsistent (4),
+ object-exists (5),
+ object-attribute-inconsistent (6)
+ },
+ resource [3] IMPLICIT INTEGER
+ {
+ other (0),
+ memory-unavailable (1),
+ processor-resource-unavailable (2),
+ mass-storage-unavailable (3),
+ capability-unavailable (4),
+ capability-unknown (5)
+ },
+ service [4] IMPLICIT INTEGER
+ {
+ other (0),
+ primitives-out-of-sequence (1),
+ object-sate-conflict (2),
+ pdu-size (3),
+ continuation-invalid (4),
+ object-constraint-conflict (5)
+ },
+ service-preempt [5] IMPLICIT INTEGER
+ {
+ other (0),
+ timeout (1),
+ deadlock (2),
+ cancel (3)
+ },
+ time-resolution [6] IMPLICIT INTEGER
+ {
+ other (0),
+ unsupportable-time-resolution (1)
+ },
+ access [7] IMPLICIT INTEGER
+ {
+ other (0),
+ object-access-unsupported (1),
+ object-non-existent (2),
+ object-access-denied (3),
+ object-invalidated (4)
+ },
+ initiate [8] IMPLICIT INTEGER
+ {
+ other (0),
+ version-incompatible (1),
+ max-segment-insufficient (2),
+ max-services-outstanding-calling-insufficient (3),
+ max-services-outstanding-called-insufficient (4),
+ service-CBB-insufficient (5),
+ parameter-CBB-insufficient (6),
+ nesting-level-insufficient (7)
+ },
+ conclude [9] IMPLICIT INTEGER
+ {
+ other (0),
+ further-communication-required (1)
+ },
+ cancel [10] IMPLICIT INTEGER
+ {
+ other (0),
+ invoke-id-unknown (1),
+ cancel-not-possible (2)
+ },
+ file [11] IMPLICIT INTEGER
+ {
+ other (0),
+ filename-ambiguous (1),
+ file-busy (2),
+ filename-syntax-error (3),
+ content-type-invalid (4),
+ position-invalid (5),
+ file-acces-denied (6),
+ file-non-existent (7),
+ duplicate-filename (8),
+ insufficient-space-in-filestore (9)
+ },
+ others [12] IMPLICIT INTEGER
+ },
+ additionalCode [1] IMPLICIT INTEGER OPTIONAL,
+ additionalDescription [2] IMPLICIT VisibleString OPTIONAL,
+ serviceSpecificInformation [3] CHOICE
+ {
+ obtainFile [0] IMPLICIT ObtainFile-Error,
+ start [1] IMPLICIT Start-Error,
+ stop [2] IMPLICIT Stop-Error,
+ resume [3] IMPLICIT Resume-Error,
+ reset [4] IMPLICIT Reset-Error,
+ deleteVariableAccess [5] IMPLICIT DeleteVariableAccess-Error,
+ deleteNamedVariableList [6] IMPLICIT DeleteNamedVariableList-Error,
+ deleteNamedType [7] IMPLICIT DeleteNamedType-Error,
+ defineEventEnrollment-Error [8] DefineEventEnrollment-Error,
+ fileRename [9] IMPLICIT FileRename-Error,
+ additionalService [10] AdditionalService-Error,
+ changeAccessControl [11] IMPLICIT ChangeAccessControl-Error
+ } OPTIONAL
+ }
+
+ AdditionalService-Error ::= CHOICE
+ {
+ defineEcl [0] DefineEventConditionList-Error,
+ addECLReference [1] AddEventConditionListReference-Error,
+ removeECLReference [2] RemoveEventConditionListReference-Error,
+ initiateUC [3] InitiateUnitControl-Error,
+ startUC [4] IMPLICIT StartUnitControl-Error,
+ stopUC [5] IMPLICIT StopUnitControl-Error,
+ deleteUC [6] DeleteUnitControl-Error,
+ loadUCFromFile [7] LoadUnitControlFromFile-Error
+ }
+
+ DefineEventConditionList-Error ::= ObjectName
+
+ AddEventConditionListReference-Error ::= ObjectName
+
+ RemoveEventConditionListReference-Error ::= CHOICE
+ {
+ eventCondition [0] ObjectName,
+ eventConditionList [1] ObjectName
+ }
+
+ InitiateUnitControl-Error ::= CHOICE
+ {
+ domain [0] IMPLICIT Identifier,
+ programInvocation [1] IMPLICIT Identifier
+ }
+
+ StartUnitControl-Error ::= SEQUENCE
+ {
+ programInvocationName [0] IMPLICIT Identifier,
+ programInvocationState [1] IMPLICIT ProgramInvocationState
+ }
+
+ StopUnitControl-Error ::= SEQUENCE
+ {
+ programInvocationName [0] IMPLICIT Identifier,
+ programInvocationState [1] IMPLICIT ProgramInvocationState
+ }
+
+ DeleteUnitControl-Error ::= CHOICE
+ {
+ domain [0] IMPLICIT Identifier,
+ programInvocation [1] IMPLICIT Identifier
+ }
+
+ LoadUnitControlFromFile-Error ::= CHOICE
+ {
+ none [0] IMPLICIT NULL,
+ domain [1] IMPLICIT Identifier,
+ programInvocation [2] IMPLICIT Identifier
+ }
+
+ ChangeAccessControl-Error ::= Unsigned32
+
+---------------------------------- REJECT --------------------------------
+
+RejectPDU ::= SEQUENCE
+ {
+ originalInvokeID [0] IMPLICIT Unsigned32 OPTIONAL,
+ rejectReason CHOICE
+ {
+ confirmed-requestPDU [1] IMPLICIT INTEGER
+ {
+ other (0),
+ unrecognized-service (1),
+ unrecognized-modifier (2),
+ invalid-invokeID (3),
+ invalid-argument (4),
+ invalid-modifier (5),
+ max-serv-outstanding-exceeded (6),
+ max-recursion-exceeded (8),
+ value-out-of-range (9)
+ },
+
+ confirmed-responsePDU [2] IMPLICIT INTEGER
+ {
+ other (0),
+ unrecognized-service (1),
+ invalid-invokeID (2),
+ invalid-result (3),
+ max-recursion-exceeded (5),
+ value-out-of-range (6)
+ },
+
+ confirmed-errorPDU [3] IMPLICIT INTEGER
+ {
+ other (0),
+ unrecognized-service (1),
+ invalid-invokeID (2),
+ invalid-serviceError (3),
+ value-out-of-range (4)
+ } ,
+
+ unconfirmedPDU [4] IMPLICIT INTEGER
+ {
+ other (0),
+ unrecognized-service (1),
+ invalid-argument (2),
+ max-recursion-exceeded (3),
+ value-out-of-range (4)
+ },
+
+ pdu-error [5] IMPLICIT INTEGER
+ {
+ unknown-pdu-type (0),
+ invalid-pdu (1),
+ illegal-acse-mapping (2)
+ },
+
+ cancel-requestPDU [6] IMPLICIT INTEGER
+ {
+ other (0),
+ invalid-invokeID (1)
+ },
+
+ cancel-responsePDU [7] IMPLICIT INTEGER
+ {
+ other (0),
+ invalid-invokeID (1)
+ },
+
+ cancel-errorPDU [8] IMPLICIT INTEGER
+ {
+ other (0),
+ invalid-invokeID (1),
+ invalid-serviceError (2),
+ value-out-of-range (3)
+ },
+
+ conclude-requestPDU [9] IMPLICIT INTEGER
+ {
+ other (0),
+ invalid-argument (1)
+ },
+
+ conclude-responsePDU [10] IMPLICIT INTEGER
+ {
+ other (0),
+ invalid-result (1)
+ },
+
+ conclude-errorPDU [11] IMPLICIT INTEGER
+ {
+ other (0),
+ invalid-serviceError (1),
+ value-out-of-range (2)
+ }
+ }
+ }
+
+
+-- *************************************** VMD ********************************************
+
+
+Status-Request ::= BOOLEAN
+
+Status-Response ::= SEQUENCE {
+ vmdLogicalStatus [0] IMPLICIT INTEGER {
+ state-changes-allowed (0),
+ no-state-changes-allowed (1),
+ limited-services-allowed (2),
+ support-services-allowed (3)
+ },
+ vmdPhysicalStatus [1] IMPLICIT INTEGER {
+ operational (0),
+ partially-operational (1),
+ inoperable (2),
+ needs-commissioning (3)
+ },
+ localDetail [2] IMPLICIT BIT STRING(SIZE(0..128)) OPTIONAL
+
+ }
+
+-- UNSOLICITEDSTATUS
+
+UnsolicitedStatus ::= Status-Response
+
+-- GETNAMELIST
+
+GetNameList-Request ::= SEQUENCE
+ {
+ extendedObjectClass [0] CHOICE
+ {
+ objectClass [0] IMPLICIT INTEGER
+ {
+ nammedVariable (0),
+ scatteredAccess (1),
+ namedVariableList (2),
+ namedType (3),
+ semaphore (4),
+ eventCondition (5),
+ eventAction (6),
+ eventEnrollment (7),
+ journal (8),
+ domain (9),
+ programInvocation (10),
+ operatorStation (11)
+ }
+ },
+ objectScope [1] CHOICE
+ {
+ vmdSpecific [0] IMPLICIT NULL,
+ domainSpecific [1] IMPLICIT Identifier,
+ aaSpecific [2] IMPLICIT NULL
+ },
+ continueAfter [2] IMPLICIT Identifier OPTIONAL
+ }
+
+GetNameList-Response ::= SEQUENCE
+ {
+ listOfIdentifier [0] IMPLICIT SEQUENCE OF Identifier,
+ moreFollows [1] IMPLICIT BOOLEAN DEFAULT TRUE
+ }
+
+
+---------------------------------- IDENTIFY --------------------------------
+
+Identify-Request ::= NULL
+
+Identify-Response ::= SEQUENCE {
+ vendorName [0] IMPLICIT VisibleString,
+ modelName [1] IMPLICIT VisibleString,
+ revision [2] IMPLICIT VisibleString,
+ listOfAbstractSyntaxes [3] IMPLICIT SEQUENCE OF OBJECT IDENTIFIER OPTIONAL
+ }
+
+---------------------------------- RENAME --------------------------------
+
+Rename-Request ::= SEQUENCE
+ {
+ extendedObjectClass [0] CHOICE {
+ objectClass [0] IMPLICIT INTEGER
+ {
+ namedVariable (0),
+ scatteredAccess (1),
+ namedVariableList (2),
+ namedType (3),
+ semaphore (4),
+ eventCondition (5),
+ eventAction (6),
+ eventEnrollment (7),
+ journal (8),
+ domain (9),
+ programInvocation (10),
+ operatorStation (11)
+ }
+
+ },
+ currentName [1] ObjectName,
+ newIdentifier [2] IMPLICIT Identifier
+ }
+
+Rename-Response ::= NULL
+
+---------------------------------- GET CAPABILITY LIST --------------------------------
+
+GetCapabilityList-Request ::= SEQUENCE {
+ continueAfter VisibleString OPTIONAL
+ }
+
+GetCapabilityList-Response ::= SEQUENCE {
+ listOfCapabilities [0] IMPLICIT SEQUENCE OF VisibleString,
+ moreFollows [1] IMPLICIT BOOLEAN DEFAULT TRUE
+ }
+
+
+
+
+
+-- ************************************* DOMAIN ****************************************
+
+InitiateDownloadSequence-Request ::= SEQUENCE
+ {
+ domainName [0] IMPLICIT Identifier,
+ listOfCapabilities [1] IMPLICIT SEQUENCE OF VisibleString,
+ sharable [2] IMPLICIT BOOLEAN
+ }
+
+InitiateDownloadSequence-Response ::= NULL
+
+-- DOWNLOAD SEGMENT
+
+DownloadSegment-Request ::= Identifier
+
+DownloadSegment-Response ::= SEQUENCE
+ {
+ loadData CHOICE {
+ non-coded [0] IMPLICIT OCTET STRING,
+ coded EXTERNALt
+ },
+ moreFollows [1] IMPLICIT BOOLEAN DEFAULT TRUE
+ }
+
+-- TERMINATE DOWNLOAD
+
+TerminateDownloadSequence-Request ::= SEQUENCE
+ {
+ domainName [0] IMPLICIT Identifier,
+ discard [1] IMPLICIT ServiceError OPTIONAL
+ }
+
+TerminateDownloadSequence-Response ::= NULL
+
+-- INITIATE UPLOAD
+
+InitiateUploadSequence-Request ::= Identifier -- Domain Name
+
+InitiateUploadSequence-Response ::= SEQUENCE
+ {
+ ulsmID [0] IMPLICIT Integer32,
+ listOfCapabilities [1] IMPLICIT SEQUENCE OF VisibleString
+ }
+
+-- UPLOAD SEGMENT
+
+UploadSegment-Request ::= Integer32 -- ULSM Identifier
+
+UploadSegment-Response ::= SEQUENCE
+ {
+ loadData CHOICE {
+ non-coded [0] IMPLICIT OCTET STRING,
+ coded EXTERNALt
+ },
+ moreFollows [1] IMPLICIT BOOLEAN DEFAULT TRUE
+ }
+
+-- TERMINATE UPLOAD
+
+TerminateUploadSequence-Request ::= Integer32 -- ULSM Identifer
+
+TerminateUploadSequence-Response ::= NULL
+
+-- REQUEST DOMAIN DOWNLOAD
+
+RequestDomainDownload-Request ::= SEQUENCE
+ {
+ domainName [0] IMPLICIT Identifier,
+ listOfCapabilities [1] IMPLICIT SEQUENCE OF VisibleString OPTIONAL,
+ sharable [2] IMPLICIT BOOLEAN,
+ fileName [4] IMPLICIT FileName
+ }
+RequestDomainDownload-Response ::= NULL
+
+-- REQUEST DOMAIN UPLOAD
+
+RequestDomainUpload-Request ::= SEQUENCE
+ {
+ domainName [0] IMPLICIT Identifier,
+ fileName [1] IMPLICIT FileName
+ }
+
+RequestDomainUpload-Response ::= NULL
+
+-- LOAD DOMAIN CONTENT
+
+LoadDomainContent-Request ::= SEQUENCE
+ {
+ domainName [0] IMPLICIT Identifier,
+ listOfCapabilities [1] IMPLICIT SEQUENCE OF VisibleString OPTIONAL,
+ sharable [2] IMPLICIT BOOLEAN,
+ fileName [4] IMPLICIT FileName,
+ thirdParty [5] IMPLICIT ApplicationReference OPTIONAL
+ }
+
+LoadDomainContent-Response ::= NULL
+
+-- STORE DOMAIN CONTENT
+
+StoreDomainContent-Request ::= SEQUENCE
+ {
+ domainName [0] IMPLICIT Identifier,
+ filenName [1] IMPLICIT FileName,
+ thirdParty [2] IMPLICIT ApplicationReference OPTIONAL
+ }
+
+StoreDomainContent-Response ::= NULL
+
+-- DELETE DOMAIN
+
+DeleteDomain-Request ::= Identifier -- Domain Name
+
+DeleteDomain-Response ::= NULL
+
+-- GET DOMAIN ATTRIBUTES
+
+GetDomainAttributes-Request ::= Identifier -- Domain Name
+
+GetDomainAttributes-Response ::= SEQUENCE
+ {
+ listOfCapabilities [0] IMPLICIT SEQUENCE OF VisibleString,
+ state [1] IMPLICIT DomainState,
+ mmsDeletable [2] IMPLICIT BOOLEAN,
+ sharable [3] IMPLICIT BOOLEAN,
+ listOfProgramInvocations [4] IMPLICIT SEQUENCE OF Identifier, -- PI Names
+ uploadInProgress [5] IMPLICIT Integer8
+ }
+
+
+DomainState ::= INTEGER
+ {
+ non-existent (0),
+ loading (1),
+ ready (2),
+ in-use (3),
+ complete (4),
+ incomplete (5),
+ d1 (7),
+ d2 (8),
+ d3 (9),
+ d4 (10),
+ d5 (11),
+ d6 (12),
+ d7 (13),
+ d8 (14),
+ d9 (15)
+ }
+
+-- ********************************* PROGRAM INVOCATION *********************************
+
+
+-- CREATE PROGRAM INVOCATION
+
+CreateProgramInvocation-Request ::= SEQUENCE
+ {
+ programInvocationName [0] IMPLICIT Identifier,
+ listOfDomainName [1] IMPLICIT SEQUENCE OF Identifier,
+ reusable [2] IMPLICIT BOOLEAN DEFAULT TRUE,
+ monitorType [3] IMPLICIT BOOLEAN OPTIONAL
+ -- TRUE indicates PERMANENT monitoring
+ -- FALSE indicates CURRENT monitoring
+ }
+
+CreateProgramInvocation-Response ::= NULL
+
+-- DELETE PROGRAM INVOCATION
+
+DeleteProgramInvocation-Request ::= Identifier -- Program Invocation Name
+
+DeleteProgramInvocation-Response ::= NULL
+
+-- START
+
+Start-Request ::= SEQUENCE
+ {
+ programInvocationName [0] IMPLICIT Identifier,
+ executionArgument CHOICE {
+ simpleString [1] IMPLICIT VisibleString,
+ encodedString EXTERNALt
+ } OPTIONAL
+ }
+
+Start-Response ::= NULL
+
+Start-Error ::= ProgramInvocationState
+
+-- STOP
+
+Stop-Request ::= SEQUENCE
+ {
+ programInvocationName [0] IMPLICIT Identifier
+ }
+
+Stop-Response ::= NULL
+
+Stop-Error ::= ProgramInvocationState
+
+-- RESUME
+
+Resume-Request ::= SEQUENCE
+ {
+ programInvocationName [0] IMPLICIT Identifier,
+ executionArgument CHOICE {
+ simpleString [1] IMPLICIT VisibleString,
+ encodedString EXTERNALt
+ } OPTIONAL
+ }
+
+Resume-Response ::= NULL
+
+Resume-Error ::= ProgramInvocationState
+
+-- RESET
+
+Reset-Request ::= SEQUENCE
+ {
+ programInvocationName [0] IMPLICIT Identifier
+ }
+
+Reset-Response ::= NULL
+
+Reset-Error ::= ProgramInvocationState
+
+-- KILL
+
+Kill-Request ::= SEQUENCE
+ {
+ programInvocationName [0] IMPLICIT Identifier
+ }
+
+Kill-Response ::= NULL
+
+-- GET PI ATTRIBUTES
+
+GetProgramInvocationAttributes-Request ::= Identifier -- Program Invocation Name
+
+GetProgramInvocationAttributes-Response ::= SEQUENCE
+ {
+ state [0] IMPLICIT ProgramInvocationState,
+ listOfDomainNames [1] IMPLICIT SEQUENCE OF Identifier,
+ mmsDeletable [2] IMPLICIT BOOLEAN,
+ reusable [3] IMPLICIT BOOLEAN,
+ monitor [4] IMPLICIT BOOLEAN,
+ startArgument [5] IMPLICIT VisibleString,
+ executionArgument CHOICE {
+ simpleString [1] IMPLICIT VisibleString,
+ encodedString EXTERNALt
+ } OPTIONAL
+ }
+
+
+ProgramInvocationState ::= INTEGER
+ {
+ non-existent (0),
+ unrunable (1),
+ idle (2),
+ running (3),
+ stopped (4),
+ starting (5),
+ stopping (6),
+ resuming (7),
+ resetting (8)
+ }
+ -- Companion Standard may add additional values
+
+
+-- *********************************** VARIABLES ****************************************
+
+
+TypeSpecification ::= CHOICE
+ {
+ typeName [0] ObjectName,
+ array [1] IMPLICIT SEQUENCE
+ {
+ packed [0] IMPLICIT BOOLEAN DEFAULT FALSE,
+ numberOfElements [1] IMPLICIT Unsigned32,
+ elementType [2] TypeSpecification
+ },
+ structure [2] IMPLICIT SEQUENCE
+ {
+ packed [0] IMPLICIT BOOLEAN DEFAULT FALSE,
+ components [1] IMPLICIT SEQUENCE OF SEQUENCE
+ {
+ componentName [0] IMPLICIT Identifier OPTIONAL,
+ componentType [1] TypeSpecification
+ }
+ },
+
+ -- Simple Type
+ boolean [3] IMPLICIT NULL,
+ bit-string [4] IMPLICIT Integer32,
+ integer [5] IMPLICIT Unsigned8,
+ unsigned [6] IMPLICIT Unsigned8,
+ octet-string [9] IMPLICIT Integer32,
+ visible-string [10] IMPLICIT Integer32,
+ generalized-time [11] IMPLICIT NULL,
+ binary-time [12] IMPLICIT BOOLEAN,
+ bcd [13] IMPLICIT Unsigned8,
+ objId [15] IMPLICIT NULL
+ }
+
+AlternateAccess ::= SEQUENCE OF CHOICE
+ {
+ unnamed AlternateAccessSelection,
+ named [5] IMPLICIT SEQUENCE
+ {
+ componentName [0] IMPLICIT Identifier,
+ accesst AlternateAccessSelection
+ }
+ }
+
+AlternateAccessSelection ::= CHOICE
+ {
+ selectAlternateAccess [0] IMPLICIT SEQUENCE
+ {
+ accessSelection CHOICE
+ {
+ component [0] IMPLICIT Identifier,
+ index [1] IMPLICIT Unsigned32,
+ indexRange [2] IMPLICIT SEQUENCE
+ {
+ lowIndex [0] IMPLICIT Unsigned32,
+ numberOfElements [1] IMPLICIT Unsigned32},
+ allElements [3] IMPLICIT NULL
+ },
+ alternateAccess AlternateAccess
+ },
+ selectAccess CHOICE
+ {
+ component [1] IMPLICIT Identifier,
+ index [2] IMPLICIT Unsigned32,
+ indexRange [3] IMPLICIT SEQUENCE
+ {
+ lowIndex [0] IMPLICIT Unsigned32,
+ nmberOfElements [1] IMPLICIT Unsigned32
+ },
+ allElements [4] IMPLICIT NULL
+ }
+ }
+
+
+
+
+
+
+
+
+
+
+
+-- READ
+
+Read-Request ::= SEQUENCE
+ {
+ specificationWithResult [0] IMPLICIT BOOLEAN DEFAULT FALSE,
+ variableAccessSpecificatn [1] VariableAccessSpecification
+ }
+
+
+Read-Response ::= SEQUENCE
+ {
+ variableAccessSpecificatn [0] VariableAccessSpecification OPTIONAL,
+ listOfAccessResult [1] IMPLICIT SEQUENCE OF AccessResult
+ }
+
+-- WRITE
+
+
+
+Write-Request ::= SEQUENCE
+ {
+ variableAccessSpecificatn VariableAccessSpecification,
+ listOfData [0] IMPLICIT SEQUENCE OF Data
+ }
+
+Write-Response ::= SEQUENCE OF CHOICE
+ {
+ failure [0] IMPLICIT DataAccessError,
+ success [1] IMPLICIT NULL
+ }
+
+-- INFORMATION REPORT
+
+InformationReport ::= SEQUENCE
+ {
+ variableAccessSpecification VariableAccessSpecification,
+ listOfAccessResult [0] IMPLICIT SEQUENCE OF AccessResult
+ }
+
+-- GET VARIABLE ACCESS ATTRIBUTES
+
+GetVariableAccessAttributes-Request ::= CHOICE
+ {
+ name [0] ObjectName,
+ address [1] Address
+ }
+
+
+GetVariableAccessAttributes-Response ::= SEQUENCE
+ {
+ mmsDeletable [0] IMPLICIT BOOLEAN,
+ address [1] Address OPTIONAL,
+ typeSpecification [2] TypeSpecification
+ }
+-- DEFINE NAMED VARIABLE
+
+DefineNamedVariable-Request ::= SEQUENCE
+ {
+ variableName [0] ObjectName,
+ address [1] Address,
+ typeSpecification [2] TypeSpecification OPTIONAL
+ }
+
+DefineNamedVariable-Response ::= NULL
+
+-- DEFINE SCATTERED ACCESS
+
+DefineScatteredAccess-Request ::= SEQUENCE
+ {
+ scatteredAccessName [0] ObjectName,
+ scatteredAccessDescription [1] IMPLICIT ScatteredAccessDescription
+ }
+
+
+DefineScatteredAccess-Response ::= NULL
+
+-- GET SCATTERED ACCESS ATTRIBUTES
+
+GetScatteredAccessAttributes-Request ::= ObjectName -- ScatteredAccessName
+
+
+GetScatteredAccessAttributes-Response ::= SEQUENCE
+ {
+ mmsDeletable [0] IMPLICIT BOOLEAN,
+ scatteredAccessDescription [1] IMPLICIT ScatteredAccessDescription
+ }
+
+-- DELETE VARIABLE ACCESS
+
+DeleteVariableAccess-Request ::= SEQUENCE
+ {
+ scopeOfDelete [0] IMPLICIT INTEGER
+ {
+ specific (0),
+ aa-specific (1),
+ domain (2),
+ vmd (3)
+ } DEFAULT specific,
+ listOfName [1] IMPLICIT SEQUENCE OF ObjectName OPTIONAL,
+ domainName [2] IMPLICIT Identifier OPTIONAL
+ }
+
+DeleteVariableAccess-Response ::= SEQUENCE
+ {
+ numberMatched [0] IMPLICIT Unsigned32,
+ numberDeleted [1] IMPLICIT Unsigned32
+ }
+
+
+DeleteVariableAccess-Error ::= Unsigned32 -- numberDeleted
+
+-- DEFINE NAMED VAR. LIST
+
+DefineNamedVariableList-Request ::= SEQUENCE
+ {
+ variableListName ObjectName,
+ listOfVariable [0] IMPLICIT SEQUENCE OF SEQUENCE
+ {
+ variableSpecification VariableSpecification,
+ alternateAccess [5] IMPLICIT AlternateAccess OPTIONAL
+ }
+ }
+
+
+DefineNamedVariableList-Response ::= NULL
+
+-- GET NAMED VAR. LIST ATTRIBUTES
+
+GetNamedVariableListAttributes-Request ::= ObjectName -- VariableListName
+
+
+GetNamedVariableListAttributes-Response ::= SEQUENCE
+ {
+ mmsDeletable [0] IMPLICIT BOOLEAN,
+ listOfVariable [1] IMPLICIT SEQUENCE OF SEQUENCE
+ {
+ variableSpecification VariableSpecification,
+ alternateAccess [5] IMPLICIT AlternateAccess OPTIONAL
+ }
+ }
+
+-- DELETE NAMED VAR. LIST
+
+DeleteNamedVariableList-Request ::= SEQUENCE
+ {
+ scopeOfDelete [0] IMPLICIT INTEGER
+ {
+ specific (0),
+ aa-specific (1),
+ domain (2),
+ vmd (3)
+ } DEFAULT specific,
+ listOfVariableListName [1] IMPLICIT SEQUENCE OF ObjectName OPTIONAL,
+ domainName [2] IMPLICIT Identifier OPTIONAL
+ }
+
+
+DeleteNamedVariableList-Response ::= SEQUENCE
+ {
+ numberMatched [0] IMPLICIT Unsigned32,
+ numberDeleted [1] IMPLICIT Unsigned32
+ }
+
+
+DeleteNamedVariableList-Error ::= Unsigned32 -- number Deleted
+
+-- DEFINE NAMED TYPE
+
+DefineNamedType-Request ::= SEQUENCE
+ {
+ typeName ObjectName,
+ typeSpecification TypeSpecification
+ }
+
+
+DefineNamedType-Response ::= NULL
+
+
+-- GET NAMED TYPE ATTRIB.
+
+GetNamedTypeAttributes-Request ::= ObjectName -- TypeName
+
+GetNamedTypeAttributes-Response ::= SEQUENCE
+ {
+ mmsDeletable [0] IMPLICIT BOOLEAN,
+ typeSpecification TypeSpecification
+ }
+
+-- DELETE NAMED TYPE
+
+DeleteNamedType-Request ::= SEQUENCE
+ {
+ scopeOfDelete [0] IMPLICIT INTEGER
+ {
+ specific (0),
+ aa-specific (1),
+ domain (2),
+ vmd (3)
+ } DEFAULT specific,
+ listOfTypeName [1] IMPLICIT SEQUENCE OF ObjectName OPTIONAL,
+ domainName [2] IMPLICIT Identifier OPTIONAL
+ }
+
+DeleteNamedType-Response ::= SEQUENCE
+ {
+ numberMatched [0] IMPLICIT Unsigned32,
+ numberDeleted [1] IMPLICIT Unsigned32
+ }
+
+DeleteNamedType-Error ::= Unsigned32 -- number Deleted
+
+-- SUPPORT DEFINITIONS
+
+AccessResult ::= CHOICE
+ {
+ failure [0] IMPLICIT DataAccessError,
+ success Data
+ }
+
+DataAccessError ::= INTEGER
+ {
+ object-invalidated (0),
+ hardware-fault (1),
+ temporarily-unavailable (2),
+ object-access-denied (3),
+ object-undefined (4),
+ invalid-address (5),
+ type-unsupported (6),
+ type-inconsistent (7),
+ object-attribute-inconsistent (8),
+ object-access-unsupported (9),
+ object-non-existent (10),
+ object-value-invalid (11)
+ }
+
+
+
+Data ::= CHOICE
+ {
+ -- context tag 0 is reserved for AccessResult
+ array [1] IMPLICIT SEQUENCE OF Data,
+ structure [2] IMPLICIT SEQUENCE OF Data,
+ boolean [3] IMPLICIT BOOLEAN,
+ bit-string [4] IMPLICIT BIT STRING,
+ integer [5] IMPLICIT INTEGER,
+ unsigned [6] IMPLICIT INTEGER,
+ floating-point [7] IMPLICIT FloatingPoint,
+-- XXX asn2wrs and packet-ber can not handle REAL yet
+-- real [8] IMPLICIT REAL,
+ octet-string [9] IMPLICIT OCTET STRING,
+ visible-string [10] IMPLICIT VisibleString,
+ binary-time [12] IMPLICIT TimeOfDay,
+ bcd [13] IMPLICIT INTEGER,
+ booleanArray [14] IMPLICIT BIT STRING,
+ objId [15] IMPLICIT OBJECT IDENTIFIER,
+ ...,
+ mMSString [16] IMPLICIT MMSString,
+ utc-time [17] IMPLICIT UtcTime -- added by IEC61850 8.1 G3
+ }
+
+UtcTime ::= OCTET STRING -- added by IEC61850 8.1 G3
+
+FloatingPoint ::= OCTET STRING
+
+
+VariableAccessSpecification ::= CHOICE
+ {
+ listOfVariable [0] IMPLICIT SEQUENCE OF SEQUENCE
+ {
+ variableSpecification VariableSpecification,
+ alternateAccess [5] IMPLICIT AlternateAccess OPTIONAL
+ },
+ variableListName [1] ObjectName
+ }
+
+
+ScatteredAccessDescription ::= SEQUENCE OF SEQUENCE
+ {
+ componentName [0] IMPLICIT Identifier OPTIONAL,
+ variableSpecification [1] VariableSpecification,
+ alternateAccess [2] IMPLICIT AlternateAccess OPTIONAL
+ }
+
+
+VariableSpecification ::= CHOICE
+ {
+ name [0] ObjectName,
+ address [1] Address,
+ variableDescription [2] IMPLICIT SEQUENCE
+ {
+ address Address,
+ typeSpecification TypeSpecification
+ },
+ scatteredAccessDescription [3] IMPLICIT ScatteredAccessDescription,
+ invalidated [4] IMPLICIT NULL
+ }
+
+Address ::= CHOICE
+ {
+ numericAddress [0] IMPLICIT Unsigned32,
+ symbolicAddress [1] IMPLICIT VisibleString,
+ unconstrainedAddress [2] IMPLICIT OCTET STRING
+ }
+
+
+-- ********************************* SEMAPHORES *****************************************
+
+TakeControl-Request ::= SEQUENCE
+ {
+ semaphoreName [0] ObjectName,
+ namedToken [1] IMPLICIT Identifier OPTIONAL,
+ priority [2] IMPLICIT Priority DEFAULT 64,
+ acceptableDelay [3] IMPLICIT Unsigned32 OPTIONAL,
+ controlTimeOut [4] IMPLICIT Unsigned32 OPTIONAL,
+ abortOnTimeOut [5] IMPLICIT BOOLEAN OPTIONAL,
+ relinquishIfConnectionLost [6] IMPLICIT BOOLEAN DEFAULT TRUE,
+ applicationToPreempt [7] IMPLICIT ApplicationReference OPTIONAL
+ }
+
+TakeControl-Response ::= CHOICE
+ {
+ noResult [0] IMPLICIT NULL,
+ namedToken [1] IMPLICIT Identifier
+ }
+
+-- RELINQUISH CONTROL
+
+RelinquishControl-Request ::= SEQUENCE
+ {
+ semaphoreName [0] ObjectName,
+ namedToken [1] IMPLICIT Identifier OPTIONAL
+ }
+
+RelinquishControl-Response ::= NULL
+
+-- DEFINE SEMAPHORE
+
+DefineSemaphore-Request ::= SEQUENCE
+ {
+ semaphoreName [0] ObjectName,
+ numbersOfTokens [1] IMPLICIT Unsigned16
+ }
+
+DefineSemaphore-Response ::= NULL
+
+-- DELETE SEMAPHORE
+
+DeleteSemaphore-Request ::= ObjectName -- Semaphore Name
+
+DeleteSemaphore-Response ::= NULL
+
+-- REPORT SEMAPHORE STATUS
+
+ReportSemaphoreStatus-Request ::= ObjectName -- SemaphoreName
+
+ReportSemaphoreStatus-Response ::= SEQUENCE
+ {
+ mmsDeletable [0] IMPLICIT BOOLEAN,
+ class [1] IMPLICIT INTEGER
+ {
+ token (0),
+ pool (1)
+ },
+ numberOfTokens [2] IMPLICIT Unsigned16,
+ numberOfOwnedTokens [3] IMPLICIT Unsigned16,
+ numberOfHungTokens [4] IMPLICIT Unsigned16
+ }
+
+-- REPORT POOL SEMAPHORE STATUS
+
+ReportPoolSemaphoreStatus-Request ::= SEQUENCE
+ {
+ semaphoreName [0] ObjectName,
+ nameToStartAfter [1] IMPLICIT Identifier OPTIONAL
+ }
+
+ReportPoolSemaphoreStatus-Response ::= SEQUENCE
+ {
+ listOfNamedTokens [0] IMPLICIT SEQUENCE OF CHOICE
+ {
+ freeNamedToken [0] IMPLICIT Identifier,
+ ownedNamedToken [1] IMPLICIT Identifier,
+ hungNamedToken [2] IMPLICIT Identifier
+ },
+ moreFollows [1] IMPLICIT BOOLEAN DEFAULT TRUE
+ }
+
+-- REPORT SEMAPHORE ENTRY STATUS
+
+ReportSemaphoreEntryStatus-Request ::=SEQUENCE
+ {
+ semaphoreName [0] ObjectName,
+ state [1] IMPLICIT INTEGER
+ {
+ queued (0),
+ owner (1),
+ hung (2)
+ } ,
+ entryIdToStartAfter [2] IMPLICIT OCTET STRING OPTIONAL
+ }
+
+ReportSemaphoreEntryStatus-Response ::= SEQUENCE
+ {
+ listOfSemaphoreEntry [0] IMPLICIT SEQUENCE OF SemaphoreEntry,
+ moreFollows [1] IMPLICIT BOOLEAN DEFAULT TRUE
+ }
+
+
+AttachToSemaphore ::= SEQUENCE
+ {
+ semaphoreName [0] ObjectName,
+ namedToken [1] IMPLICIT Identifier OPTIONAL,
+ priority [2] IMPLICIT Priority DEFAULT 64,
+ acceptableDelay [3] IMPLICIT Unsigned32 OPTIONAL,
+ controlTimeOut [4] IMPLICIT Unsigned32 OPTIONAL,
+ abortOnTimeOut [5] IMPLICIT BOOLEAN OPTIONAL,
+ relinquishIfConnectionLost [6] IMPLICIT BOOLEAN DEFAULT TRUE
+ }
+
+
+SemaphoreEntry ::= SEQUENCE
+ {
+ entryId [0] IMPLICIT OCTET STRING,
+ entryClass [1] IMPLICIT INTEGER
+ {
+ simple (0),
+ modifier (1)
+ },
+ applicationReference [2] ApplicationReference,
+ namedToken [3] IMPLICIT Identifier OPTIONAL,
+ priority [4] IMPLICIT Priority DEFAULT 64,
+ remainingTimeOut [5] IMPLICIT Unsigned32 OPTIONAL,
+ abortOnTimeOut [6] IMPLICIT BOOLEAN OPTIONAL,
+ relinquishIfConnectionLost [7] IMPLICIT BOOLEAN DEFAULT TRUE
+ }
+
+--******************************** OPERATOR COMMUNICATION *****************************
+
+
+-- INPUT
+
+Input-Request ::= SEQUENCE
+ {
+ operatorStationName [0] IMPLICIT Identifier,
+ echo [1] IMPLICIT BOOLEAN DEFAULT TRUE,
+ listOfPromptData [2] IMPLICIT SEQUENCE OF VisibleString OPTIONAL,
+ inputTimeOut [3] IMPLICIT Unsigned32 OPTIONAL
+ }
+
+
+Input-Response ::= VisibleString -- Input String
+
+-- OUTPUT
+
+Output-Request ::= SEQUENCE
+ {
+ operatorStationName [0] IMPLICIT Identifier,
+ listOfOutputData [1] IMPLICIT SEQUENCE OF VisibleString
+ }
+
+
+Output-Response ::= NULL
+
+
+-- ************************************ EVENTS *********************************************
+
+DefineEventCondition-Request ::= SEQUENCE
+ {
+ eventConditionName [0] ObjectName,
+ class [1] IMPLICIT EC-Class,
+ prio-rity [2] IMPLICIT Priority DEFAULT 64,
+ severity [3] IMPLICIT Unsigned8 DEFAULT 64,
+ alarmSummaryReports [4] IMPLICIT BOOLEAN OPTIONAL,
+ monitoredVariable [6] VariableSpecification OPTIONAL,
+ evaluationInterval [7] IMPLICIT Unsigned32 OPTIONAL
+ }
+
+DefineEventCondition-Response ::= NULL
+
+
+DeleteEventCondition-Request ::= CHOICE
+ {
+ specific [0] IMPLICIT SEQUENCE OF ObjectName,
+ aa-specific [1] IMPLICIT NULL,
+ domain [2] IMPLICIT Identifier,
+ vmd [3] IMPLICIT NULL
+ }
+
+DeleteEventCondition-Response ::= Unsigned32 -- Candidates Not Deleted
+
+
+GetEventConditionAttributes-Request ::= ObjectName -- Event Condition Name
+
+GetEventConditionAttributes-Response ::= SEQUENCE
+ {
+ mmsDeletable [0] IMPLICIT BOOLEAN DEFAULT FALSE,
+ class [1] IMPLICIT EC-Class,
+ prio-rity [2] IMPLICIT Priority DEFAULT 64,
+ severity [3] IMPLICIT Unsigned8 DEFAULT 64,
+ alarmSummaryReports [4] IMPLICIT BOOLEAN DEFAULT FALSE,
+ monitoredVariable [6] CHOICE
+ {
+ variableReference [0] VariableSpecification,
+ undefined [1] IMPLICIT NULL
+ } OPTIONAL,
+ evaluationInterval [7] IMPLICIT Unsigned32 OPTIONAL
+ }
+
+
+ReportEventConditionStatus-Request ::= ObjectName -- EventConditionName
+
+ReportEventConditionStatus-Response ::= SEQUENCE
+ {
+ currentState [0] IMPLICIT EC-State,
+ numberOfEventEnrollments [1] IMPLICIT Unsigned32,
+ enabled [2] IMPLICIT BOOLEAN OPTIONAL,
+ timeOfLastTransitionToActive [3] EventTime OPTIONAL,
+ timeOfLastTransitionToIdle [4] EventTime OPTIONAL
+ }
+
+
+AlterEventConditionMonitoring-Request ::= SEQUENCE
+ {
+ eventConditionName [0] ObjectName,
+ enabled [1] IMPLICIT BOOLEAN OPTIONAL,
+ priority [2] IMPLICIT Priority OPTIONAL,
+ alarmSummaryReports [3] IMPLICIT BOOLEAN OPTIONAL,
+ evaluationInterval [4] IMPLICIT Unsigned32 OPTIONAL
+ }
+
+AlterEventConditionMonitoring-Response ::= NULL
+
+
+TriggerEvent-Request ::= SEQUENCE
+ {
+ eventConditionName [0] ObjectName,
+ priority [1] IMPLICIT Priority OPTIONAL
+ }
+
+TriggerEvent-Response ::= NULL
+
+
+DefineEventAction-Request ::= SEQUENCE
+ {
+ eventActionName [0] ObjectName,
+ listOfModifier [1] IMPLICIT SEQUENCE OF Modifier OPTIONAL
+-- XXX this one is neither in this ASN nor in the IMPORTS
+-- confirmed-Service-Request [2] DefineEventAction-ConfirmedServiceRequest
+
+ }
+
+
+DefineEventAction-Response ::= NULL
+
+DeleteEventAction-Request ::= CHOICE
+ {
+ specific [0] IMPLICIT SEQUENCE OF ObjectName,
+ aa-specific [1] IMPLICIT NULL,
+ domain [3] IMPLICIT Identifier,
+ vmd [4] IMPLICIT NULL
+ }
+
+DeleteEventAction-Response ::= Unsigned32 -- candidates not deleted
+
+GetEventActionAttributes-Request ::= ObjectName -- Event Action Name
+
+
+GetEventActionAttributes-Response ::= SEQUENCE
+ {
+ mmsDeletable [0] IMPLICIT BOOLEAN DEFAULT FALSE,
+ listOfModifier [1] IMPLICIT SEQUENCE OF Modifier
+-- XXX this one is neither in this ASN nor in the IMPORTS
+-- confirmed-Service-Request [2] DefineEventAction-ConfirmedServiceRequest
+ }
+
+ReportEventActionStatus-Request ::= ObjectName -- EventActionName
+
+ReportEventActionStatus-Response ::= Unsigned32 -- Number of Event Enrollments
+
+
+DefineEventEnrollment-Request ::= SEQUENCE
+ {
+ eventEnrollmentName [0] ObjectName,
+ eventConditionName [1] ObjectName,
+ eventConditionTransition [2] IMPLICIT Transitions,
+ alarmAcknowledgementRule [3] IMPLICIT AlarmAckRule,
+ eventActionName [4] ObjectName OPTIONAL,
+ clientApplication [5] ApplicationReference OPTIONAL
+ }
+
+DefineEventEnrollment-Response ::= NULL
+
+DefineEventEnrollment-Error ::= ObjectName
+
+
+DeleteEventEnrollment-Request ::= CHOICE
+ {
+ specific [0] IMPLICIT SEQUENCE OF ObjectName,
+ ec [1] ObjectName,
+ ea [2] ObjectName
+ }
+
+DeleteEventEnrollment-Response ::= Unsigned32 -- candidates not deleted
+
+
+GetEventEnrollmentAttributes-Request ::= SEQUENCE
+ {
+ scopeOfRequest [0] IMPLICIT INTEGER
+ {
+ specific (0),
+ client (1),
+ ec (2),
+ ea (3)
+ } DEFAULT client,
+ eventEnrollmentNames [1] IMPLICIT SEQUENCE OF ObjectName OPTIONAL,
+ clientApplication [2] ApplicationReference OPTIONAL,
+ eventConditionName [3] ObjectName OPTIONAL,
+ eventActionName [4] ObjectName OPTIONAL,
+ continueAfter [5] ObjectName OPTIONAL
+ }
+
+
+EventEnrollment ::= SEQUENCE
+ {
+ eventEnrollmentName [0] ObjectName,
+ eventConditionName [1] CHOICE
+ {
+ eventCondition [0] ObjectName,
+ undefined [1] IMPLICIT NULL
+ },
+ eventActionName [2] CHOICE
+ {
+ eventAction [0] ObjectName,
+ undefined [1] IMPLICIT NULL
+ } OPTIONAL,
+ clientApplication [3] ApplicationReference OPTIONAL,
+ mmsDeletable [4] IMPLICIT BOOLEAN DEFAULT FALSE,
+ enrollmentClass [5] IMPLICIT EE-Class,
+ duration [6] IMPLICIT EE-Duration DEFAULT current,
+ invokeID [7] IMPLICIT Unsigned32,
+ remainingAcceptableDelay [8] IMPLICIT Unsigned32 OPTIONAL
+ }
+
+
+GetEventEnrollmentAttributes-Response ::= SEQUENCE
+ {
+ listOfEventEnrollment [0] IMPLICIT SEQUENCE OF EventEnrollment,
+ moreFollows [1] IMPLICIT BOOLEAN DEFAULT FALSE
+ }
+
+
+ReportEventEnrollmentStatus-Request ::= ObjectName -- Event Enrollment Name
+
+ReportEventEnrollmentStatus-Response ::= SEQUENCE
+ {
+ eventConditionTransitions [0] IMPLICIT Transitions,
+ notificationLost [1] IMPLICIT BOOLEAN DEFAULT FALSE,
+ duration [2] IMPLICIT EE-Duration,
+ alarmAcknowledgmentRule [3] IMPLICIT AlarmAckRule OPTIONAL,
+ currentState [4] IMPLICIT EE-State
+ }
+
+AlterEventEnrollment-Request ::= SEQUENCE
+ {
+ eventEnrollmentName [0] ObjectName,
+ eventConditionTransitions [1] IMPLICIT Transitions OPTIONAL,
+ alarmAcknowledgmentRule [2] IMPLICIT AlarmAckRule OPTIONAL
+ }
+
+AlterEventEnrollment-Response ::= SEQUENCE
+ {
+ currentState [0] CHOICE
+ {
+ state [0] IMPLICIT EE-State,
+ undefined [1] IMPLICIT NULL
+ },
+ transitionTime [1] EventTime
+ }
+
+
+AcknowledgeEventNotification-Request ::= SEQUENCE
+ {
+ eventEnrollmentName [0] ObjectName,
+ acknowledgedState [2] IMPLICIT EC-State,
+ timeOfAcknowledgedTransition [3] EventTime
+ }
+
+AcknowledgeEventNotification-Response ::= NULL
+
+
+GetAlarmSummary-Request ::= SEQUENCE
+ {
+ enrollmentsOnly [0] IMPLICIT BOOLEAN DEFAULT TRUE,
+ activeAlarmsOnly [1] IMPLICIT BOOLEAN DEFAULT TRUE,
+ acknowledgmentFilter [2] IMPLICIT INTEGER
+ {
+ not-acked (0),
+ acked (1),
+ all (2)
+ } DEFAULT not-acked,
+ severityFilter [3] IMPLICIT SEQUENCE
+ {
+ mostSevere [0] IMPLICIT Unsigned8,
+ leastSevere [1] IMPLICIT Unsigned8
+ } OPTIONAL,
+ continueAfter [5] ObjectName OPTIONAL
+ }
+
+GetAlarmSummary-Response ::= SEQUENCE
+ {
+ listOfAlarmSummary [0] IMPLICIT SEQUENCE OF AlarmSummary,
+ moreFollows [1] IMPLICIT BOOLEAN DEFAULT FALSE
+ }
+
+
+AlarmSummary ::= SEQUENCE
+ {
+ eventConditionName [0] ObjectName,
+ severity [1] IMPLICIT Unsigned8,
+ currentState [2] IMPLICIT EC-State,
+ unacknowledgedState [3] IMPLICIT INTEGER
+ {
+ none (0),
+ active (1),
+ idle (2),
+ both (3)
+ },
+ timeOfLastTransitionToActive [5] EventTime OPTIONAL,
+ timeOfLastTransitionToIdle [6] EventTime OPTIONAL
+ }
+
+
+GetAlarmEnrollmentSummary-Request ::= SEQUENCE
+ {
+ enrollmentsOnly [0] IMPLICIT BOOLEAN DEFAULT TRUE,
+ activeAlarmsOnly [1] IMPLICIT BOOLEAN DEFAULT TRUE,
+ acknowledgmentFilter [2] IMPLICIT INTEGER
+ {
+ not-acked (0),
+ acked (1),
+ all (2)
+ } DEFAULT not-acked,
+ severityFilter [3] IMPLICIT SEQUENCE
+ {
+ mostSevere [0] IMPLICIT Unsigned8,
+ leastSevere [1] IMPLICIT Unsigned8
+ } OPTIONAL,
+ continueAfter [5] ObjectName OPTIONAL
+ }
+
+GetAlarmEnrollmentSummary-Response ::= SEQUENCE
+ {
+ listOfAlarmEnrollmentSummary [0] IMPLICIT SEQUENCE OF AlarmEnrollmentSummary,
+ moreFollows [1] IMPLICIT BOOLEAN DEFAULT FALSE
+ }
+
+
+AlarmEnrollmentSummary ::= SEQUENCE
+ {
+ eventEnrollmentName [0] ObjectName,
+ clientApplication [2] ApplicationReference OPTIONAL,
+ severity [3] IMPLICIT Unsigned8,
+ currentState [4] IMPLICIT EC-State,
+ notificationLost [6] IMPLICIT BOOLEAN DEFAULT FALSE,
+ alarmAcknowledgmentRule [7] IMPLICIT AlarmAckRule OPTIONAL,
+ enrollementState [8] IMPLICIT EE-State OPTIONAL,
+ timeOfLastTransitionToActive [9] EventTime OPTIONAL,
+ timeActiveAcknowledged [10] EventTime OPTIONAL,
+ timeOfLastTransitionToIdle [11] EventTime OPTIONAL,
+ timeIdleAcknowledged [12] EventTime OPTIONAL
+ }
+
+
+EventNotification ::= SEQUENCE
+ {
+ eventEnrollmentName [0] ObjectName,
+ eventConditionName [1] CHOICE
+ {
+ eventCondition [0] ObjectName,
+ undefined [1] IMPLICIT NULL
+ },
+ severity [2] IMPLICIT Unsigned8,
+ currentState [3] IMPLICIT EC-State OPTIONAL,
+ transitionTime [4] EventTime,
+ notificationLost [6] IMPLICIT BOOLEAN DEFAULT FALSE,
+ alarmAcknowledgmentRule [7] IMPLICIT AlarmAckRule OPTIONAL,
+ actionResult [8] IMPLICIT SEQUENCE
+ {
+ eventActioName ObjectName,
+ eventActionResult CHOICE
+ {
+ success [0] ConfirmedServiceResponse,
+ failure [1] IMPLICIT ServiceError
+ }
+ } OPTIONAL
+ }
+
+
+AttachToEventCondition ::= SEQUENCE
+ {
+ eventEnrollmentName [0] ObjectName,
+ eventConditionName [1] ObjectName,
+ causingTransitions [2] IMPLICIT Transitions,
+ acceptableDelay [3] IMPLICIT Unsigned32 OPTIONAL
+ }
+
+
+EventTime ::= CHOICE
+ {
+ timeOfDayT [0] IMPLICIT TimeOfDay,
+ timeSequenceIdentifier [1] IMPLICIT Unsigned32
+ }
+
+
+EC-Class ::= INTEGER
+ {
+ network-triggered (0),
+ monitored (1)
+ }
+
+EC-State ::= INTEGER
+ {
+ disabled (0),
+ idle (1),
+ active (2)
+ }
+
+EE-State ::= INTEGER
+ {
+ disabled (0),
+ idle (1),
+ active (2),
+ activeNoAckA (3),
+ idleNoAckI (4),
+ idleNoAckA (5),
+ idleAcked (6),
+ activeAcked (7)
+ }
+
+Transitions ::= BIT STRING
+ {
+ idle-to-disabled (0),
+ active-to-disabled (1),
+ disabled-to-idle (2),
+ active-to-idle (3),
+ disabled-to-active (4),
+ idle-to-active (5),
+ any-to-deleted (6)
+ }
+
+AlarmAckRule ::= INTEGER
+ {
+ none (0),
+ simple (1),
+ ack-active (2),
+ ack-all (3)
+ }
+
+EE-Class ::= INTEGER
+ {
+ modifier (0),
+ notification (1)
+ }
+
+EE-Duration ::= INTEGER
+ {
+ current (0),
+ permanent (1)
+ }
+
+
+-- ********************************** JOURNAL *******************************************
+
+
+-- READ JOURNAL
+
+ReadJournal-Request ::= SEQUENCE
+ {
+ journalName [0] ObjectName,
+ rangeStartSpecification [1] CHOICE
+ {
+ startingTime [0] IMPLICIT TimeOfDay,
+ startingEntry [1] IMPLICIT OCTET STRING
+ } OPTIONAL,
+ rangeStopSpecification [2] CHOICE
+ {
+ endingTime [0] IMPLICIT TimeOfDay,
+ numberOfEntries [1] IMPLICIT Integer32
+ } OPTIONAL,
+ listOfVariables [4] IMPLICIT SEQUENCE OF VisibleString OPTIONAL,
+ entryToStartAfter [5] IMPLICIT SEQUENCE
+ {
+ timeSpecification [0] IMPLICIT TimeOfDay,
+ entrySpecification [1] IMPLICIT OCTET STRING
+ }
+ }
+
+ReadJournal-Response ::= SEQUENCE
+ {
+ listOfJournalEntry [0] IMPLICIT SEQUENCE OF JournalEntry,
+ moreFollows [1] IMPLICIT BOOLEAN DEFAULT FALSE
+ }
+
+
+JournalEntry ::= SEQUENCE
+ {
+ entryIdentifier [0] IMPLICIT OCTET STRING,
+ originatingApplication [1] ApplicationReference,
+ entryContent [2] IMPLICIT EntryContent
+ }
+
+-- WRITE JOURNAL
+
+WriteJournal-Request ::= SEQUENCE
+ {
+ journalName [0] ObjectName,
+ listOfJournalEntry [1] IMPLICIT SEQUENCE OF EntryContent
+ }
+
+WriteJournal-Response ::= NULL
+
+-- INITIALIZE JOURNAL
+
+InitializeJournal-Request ::= SEQUENCE
+ {
+ journalName [0] ObjectName,
+ limitSpecification [1] IMPLICIT SEQUENCE
+ {
+ limitingTime [0] IMPLICIT TimeOfDay,
+ limitingEntry [1] IMPLICIT OCTET STRING OPTIONAL
+ } OPTIONAL
+ }
+
+InitializeJournal-Response ::= Unsigned32 -- entries deleted
+
+-- REPORT JOURNAL STATUS
+
+ReportJournalStatus-Request ::= ObjectName -- Journal Name
+
+ReportJournalStatus-Response ::= SEQUENCE
+ {
+ currentEntries [0] IMPLICIT Unsigned32,
+ mmsDeletable [1] IMPLICIT BOOLEAN
+ }
+
+-- CREATE JOURNAL
+
+CreateJournal-Request ::= SEQUENCE
+ {
+ journalName [0] ObjectName
+ }
+
+CreateJournal-Response ::= NULL
+
+-- DELETE JOURNAL
+
+DeleteJournal-Request ::= SEQUENCE
+ {
+ journalName [0] ObjectName
+ }
+
+DeleteJournal-Response ::= NULL
+
+
+-- SUPPORTING PRODUCTIONS
+
+EntryContent ::= SEQUENCE
+ {
+ occurenceTime [0] IMPLICIT TimeOfDay,
+ additionalDetail [1] JOU-Additional-Detail OPTIONAL,
+ -- additionalDetail shall be omitted
+ -- from abstract syntax defined in this standard
+ entryForm CHOICE
+ {
+ data [2] IMPLICIT SEQUENCE
+ {
+ event [0] IMPLICIT SEQUENCE
+ {
+ eventConditionName [0] ObjectName,
+ currentState [1] IMPLICIT EC-State
+ } OPTIONAL,
+ listOfVariables [1] IMPLICIT SEQUENCE OF SEQUENCE
+ {
+ variableTag [0] IMPLICIT VisibleString,
+ valueSpecification [1] Data
+ } OPTIONAL
+ },
+ annotation [3] IMPLICIT VisibleString
+ }
+ }
+
+
+JOU-Additional-Detail ::= NULL -- Defined by Companion Standard
+
+
+
+-- **************************************** FILES *********************************************
+
+ObtainFile-Request ::= SEQUENCE {
+ sourceFileServer [0] IMPLICIT ApplicationReference OPTIONAL,
+ sourceFile [1] IMPLICIT FileName,
+ destinationFile [2] IMPLICIT FileName
+ }
+
+ObtainFile-Response ::= NULL
+
+ObtainFile-Error ::= INTEGER {
+ source-file (0),
+ destination-file (1)
+ }
+
+
+FileOpen-Request ::= SEQUENCE {
+ fileName [0] IMPLICIT FileName,
+ initialPosition [1] IMPLICIT Unsigned32
+ }
+
+FileOpen-Response ::= SEQUENCE {
+ frsmID [0] IMPLICIT Integer32,
+ fileAttributes [1] IMPLICIT FileAttributes
+ }
+
+FileRead-Request ::= Integer32
+
+FileRead-Response ::= SEQUENCE {
+ fileData [0] IMPLICIT OCTET STRING,
+ moreFollows [1] IMPLICIT BOOLEAN DEFAULT TRUE
+ }
+
+FileClose-Request ::= Integer32
+
+FileClose-Response ::= NULL
+
+
+FileRename-Request ::= SEQUENCE {
+ currentFileName [0] IMPLICIT FileName,
+ newFileName [1] IMPLICIT FileName
+ }
+
+FileRename-Response ::= NULL
+
+FileRename-Error ::= INTEGER {
+ source-file (0),
+ destination-file (1)
+ }
+
+FileDelete-Request ::= FileName
+
+FileDelete-Response ::= NULL
+
+
+FileDirectory-Request ::= SEQUENCE {
+ fileSpecification [0] IMPLICIT FileName OPTIONAL,
+ continueAfter [1] IMPLICIT FileName OPTIONAL
+ }
+
+FileDirectory-Response ::= SEQUENCE {
+ listOfDirectoryEntry [0] SEQUENCE OF DirectoryEntry,
+ moreFollows [1] IMPLICIT BOOLEAN DEFAULT FALSE
+ }
+
+DirectoryEntry ::= SEQUENCE {
+ filename [0] IMPLICIT FileName,
+ fileAttributes [1] IMPLICIT FileAttributes
+ }
+
+
+FileAttributes ::= SEQUENCE {
+ sizeOfFile [0] IMPLICIT Unsigned32,
+ lastModified [1] IMPLICIT GeneralizedTime OPTIONAL
+ }
+
+
+
+END
+
diff --git a/epan/dissectors/asn1/mms/mms.cnf b/epan/dissectors/asn1/mms/mms.cnf
new file mode 100644
index 00000000..68190ade
--- /dev/null
+++ b/epan/dissectors/asn1/mms/mms.cnf
@@ -0,0 +1,201 @@
+# mms.cnf
+# mms conformation file
+
+#.MODULE_IMPORT
+ISO-8650-ACSE-1 acse
+
+#.IMPORT ../acse/acse-exp.cnf
+
+#.EXPORTS
+MMSpdu
+
+#.PDU
+
+#.NO_EMIT
+
+#.TYPE_RENAME
+
+#.TYPE_ATTR
+TimeOfDay TYPE = FT_STRING DISPLAY = BASE_NONE
+UtcTime TYPE = FT_STRING DISPLAY = BASE_NONE
+
+#.FIELD_RENAME
+ConfirmedServiceRequest/deleteEventCondition confirmedServiceRequest_deleteEventCondition
+ConfirmedServiceResponse/deleteEventCondition confirmedServiceResponse_deleteEventCondition
+ConfirmedServiceRequest/deleteEventAction confirmedServiceRequest_deleteEventAction
+ConfirmedServiceRequest/deleteEventAction confirmedServiceRequest_deleteEventAction
+ConfirmedServiceRequest/deleteEventEnrollment confirmedServiceRequest_deleteEventEnrollment
+ConfirmedServiceResponse/deleteEventEnrollment confirmedServiceResponse_deleteEventEnrollment
+TypeSpecification/bit-string typeSpecification_bit-string
+Data/bit-string data_bit-string
+TypeSpecification/octet-string typeSpecification_octet-string
+Data/octet-string data_octet-string
+TypeSpecification/visible-string typeSpecification_visible-string
+Data/visible-string data_visible-string
+TypeSpecification/binary-time typeSpecification_binary-time
+Data/binary-time data_binary-time
+GetNameList-Request/continueAfter getNameList-Request_continueAfter
+GetCapabilityList-Request/continueAfter getCapabilityList-Request_continueAfter
+GetEventEnrollmentAttributes-Request/continueAfter getEventEnrollmentAttributes-Request_continueAfter
+GetAlarmEnrollmentSummary-Request/continueAfter getAlarmEnrollmentSummary-Request_continueAfter
+FileDirectory-Request/continueAfter fileDirectory-Request_continueAfter
+GetDomainAttributes-Response/state getDomainAttributes-Response_state
+GetProgramInvocationAttributes-Response/state getProgramInvocationAttributes-Response_state
+ReportSemaphoreEntryStatus-Request/state reportSemaphoreEntryStatus-Request_state
+AlterEventEnrollment-Response/currentState/state alterEventEnrollment-Response_currentState_state
+
+#.FIELD_ATTR
+ConfirmedServiceRequest/deleteEventCondition ABBREV=confirmedServiceRequest.deleteEventCondition
+ConfirmedServiceResponse/deleteEventCondition ABBREV=confirmedServiceResponse.deleteEventCondition
+ConfirmedServiceRequest/deleteEventAction ABBREV=confirmedServiceRequest.deleteEventAction
+ConfirmedServiceRequest/deleteEventAction ABBREV=confirmedServiceRequest.deleteEventAction
+ConfirmedServiceRequest/deleteEventEnrollment ABBREV=confirmedServiceRequest.deleteEventEnrollment
+ConfirmedServiceResponse/deleteEventEnrollment ABBREV=confirmedServiceResponse.deleteEventEnrollment
+TypeSpecification/bit-string ABBREV=typeSpecification_bit-string
+Data/bit-string ABBREV=data_bit-string
+TypeSpecification/octet-string ABBREV=typeSpecification.octet-string
+Data/octet-string ABBREV=data.octet-string
+TypeSpecification/visible-string ABBREV=typeSpecification.visible-string
+Data/visible-string ABBREV=data.visible-string
+TypeSpecification/binary-time ABBREV=typeSpecification.binary-time
+Data/binary-time ABBREV=data.binary-time
+GetNameList-Request/continueAfter ABBREV=getNameList-Request_continueAfter
+GetCapabilityList-Request/continueAfter ABBREV=getCapabilityList-Request_continueAfter
+GetEventEnrollmentAttributes-Request/continueAfter ABBREV=getEventEnrollmentAttributes-Request_continueAfter
+GetAlarmEnrollmentSummary-Request/continueAfter ABBREV=getAlarmEnrollmentSummary-Request_continueAfter
+FileDirectory-Request/continueAfter ABBREV=fileDirectory-Request_continueAfter
+GetDomainAttributes-Response/state ABBREV=getDomainAttributes-Response_state
+GetProgramInvocationAttributes-Response/state ABBREV=getProgramInvocationAttributes-Response_state
+ReportSemaphoreEntryStatus-Request/state ABBREV=reportSemaphoreEntryStatus-Request_state
+AlterEventEnrollment-Response/currentState/state ABBREV=alterEventEnrollment-Response_currentState_state
+
+
+#.FN_BODY ApplicationReference/ap-title
+ offset=dissect_acse_AP_title(FALSE, tvb, offset, actx, tree, hf_mms_ap_title);
+
+#.FN_BODY ApplicationReference/ap-invocation-id
+ offset=dissect_acse_AP_invocation_identifier(FALSE, tvb, offset, actx, tree, hf_mms_ap_invocation_id);
+
+#.FN_BODY ApplicationReference/ae-qualifier
+ offset=dissect_acse_AE_qualifier(FALSE, tvb, offset, actx, tree, hf_mms_ae_qualifier);
+
+#.FN_BODY ApplicationReference/ae-invocation-id
+ offset=dissect_acse_AE_invocation_identifier(FALSE, tvb, offset, actx, tree, hf_mms_ae_invocation_id);
+
+#.FN_BODY MMSpdu VAL_PTR=&branch_taken
+ gint branch_taken;
+
+%(DEFAULT_BODY)s
+
+ if( (branch_taken!=-1) && mms_MMSpdu_vals[branch_taken].strptr ){
+ if (mms_has_private_data(actx))
+ col_append_fstr(actx->pinfo->cinfo, COL_INFO, "%%s%%s%%s",
+ private_data_get_preCinfo(actx), mms_MMSpdu_vals[branch_taken].strptr, private_data_get_moreCinfo(actx));
+ else
+ col_append_fstr(actx->pinfo->cinfo, COL_INFO, "%%s",
+ mms_MMSpdu_vals[branch_taken].strptr);
+ }
+
+#.FN_BODY TimeOfDay
+
+ guint32 len;
+ guint32 milliseconds;
+ guint16 days;
+ gchar * ptime;
+ nstime_t ts;
+
+ len = tvb_reported_length_remaining(tvb, offset);
+
+ if(len == 4)
+ {
+ milliseconds = tvb_get_ntohl(tvb, offset);
+ ptime = signed_time_msecs_to_str(actx->pinfo->pool, milliseconds);
+
+ if(hf_index >= 0)
+ {
+ proto_tree_add_string(tree, hf_index, tvb, offset, len, ptime);
+ }
+ return offset;
+ }
+
+ if(len == 6)
+ {
+ milliseconds = tvb_get_ntohl(tvb, offset);
+ days = tvb_get_ntohs(tvb, offset+4);
+
+ /* 5113 days between 01-01-1970 and 01-01-1984 */
+ /* 86400 seconds in one day */
+
+ ts.secs = (days + 5113) * 86400 + milliseconds / 1000;
+ ts.nsecs = (milliseconds %% 1000) * 1000000U;
+
+ ptime = abs_time_to_str(actx->pinfo->pool, &ts, ABSOLUTE_TIME_UTC, TRUE);
+ if(hf_index >= 0)
+ {
+ proto_tree_add_string(tree, hf_index, tvb, offset, len, ptime);
+ }
+
+ return offset;
+ }
+
+ proto_tree_add_expert_format(tree, actx->pinfo, &ei_mms_mal_timeofday_encoding,
+ tvb, offset, len, "BER Error: malformed TimeOfDay encoding, length must be 4 or 6 bytes");
+ if(hf_index >= 0)
+ {
+ proto_tree_add_string(tree, hf_index, tvb, offset, len, "????");
+ }
+
+#.FN_BODY UtcTime
+
+ guint32 len;
+ guint32 seconds;
+ guint32 fraction;
+ guint32 nanoseconds;
+ nstime_t ts;
+ gchar * ptime;
+
+ len = tvb_reported_length_remaining(tvb, offset);
+
+ if(len != 8)
+ {
+ proto_tree_add_expert_format(tree, actx->pinfo, &ei_mms_mal_utctime_encoding,
+ tvb, offset, len, "BER Error: malformed IEC61850 UTCTime encoding, length must be 8 bytes");
+ if(hf_index >= 0)
+ {
+ proto_tree_add_string(tree, hf_index, tvb, offset, len, "????");
+ }
+ return offset;
+ }
+
+ seconds = tvb_get_ntohl(tvb, offset);
+ fraction = tvb_get_ntoh24(tvb, offset+4) * 0x100; /* Only 3 bytes are recommended */
+ nanoseconds = (guint32)( ((guint64)fraction * G_GUINT64_CONSTANT(1000000000)) / G_GUINT64_CONSTANT(0x100000000) ) ;
+
+ ts.secs = seconds;
+ ts.nsecs = nanoseconds;
+
+ ptime = abs_time_to_str(actx->pinfo->pool, &ts, ABSOLUTE_TIME_UTC, TRUE);
+
+ if(hf_index >= 0)
+ {
+ proto_tree_add_string(tree, hf_index, tvb, offset, len, ptime);
+ }
+
+
+#.FN_BODY Unsigned32 VAL_PTR=&val
+ guint32 val;
+%(DEFAULT_BODY)s
+ if (hf_index == hf_mms_invokeID)
+ private_data_add_preCinfo(actx, val);
+
+#.FN_BODY FloatingPoint
+%(DEFAULT_BODY)s
+ private_data_add_moreCinfo_float(actx, tvb);
+
+#.FN_BODY Identifier
+ int offset_id = offset;
+%(DEFAULT_BODY)s
+ if ((hf_index == hf_mms_domainId) || (hf_index == hf_mms_itemId)) {
+ if (tvb_get_guint8(tvb, offset_id) == 0x1a)
+ private_data_add_moreCinfo_id(actx,tvb);
+ }
diff --git a/epan/dissectors/asn1/mms/packet-mms-template.c b/epan/dissectors/asn1/mms/packet-mms-template.c
new file mode 100644
index 00000000..2706003d
--- /dev/null
+++ b/epan/dissectors/asn1/mms/packet-mms-template.c
@@ -0,0 +1,248 @@
+/* packet-mms_asn1.c
+ *
+ * Ronnie Sahlberg 2005
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1998 Gerald Combs
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#include "config.h"
+
+#include <epan/packet.h>
+#include <epan/prefs.h>
+#include <epan/asn1.h>
+#include <epan/expert.h>
+#include <epan/proto_data.h>
+
+#include "packet-ber.h"
+#include "packet-acse.h"
+#include "packet-mms.h"
+
+#define PNAME "MMS"
+#define PSNAME "MMS"
+#define PFNAME "mms"
+
+void proto_register_mms(void);
+void proto_reg_handoff_mms(void);
+
+/* Initialize the protocol and registered fields */
+static int proto_mms = -1;
+
+#include "packet-mms-hf.c"
+
+/* Initialize the subtree pointers */
+static gint ett_mms = -1;
+#include "packet-mms-ett.c"
+
+static expert_field ei_mms_mal_timeofday_encoding = EI_INIT;
+static expert_field ei_mms_mal_utctime_encoding = EI_INIT;
+static expert_field ei_mms_zero_pdu = EI_INIT;
+
+/*****************************************************************************/
+/* Packet private data */
+/* For this dissector, all access to actx->private_data should be made */
+/* through this API, which ensures that they will not overwrite each other!! */
+/*****************************************************************************/
+
+#define BUFFER_SIZE_PRE 10
+#define BUFFER_SIZE_MORE 1024
+
+typedef struct mms_private_data_t
+{
+ char preCinfo[BUFFER_SIZE_PRE];
+ char moreCinfo[BUFFER_SIZE_MORE];
+} mms_private_data_t;
+
+
+/* Helper function to get or create the private data struct */
+static
+mms_private_data_t* mms_get_private_data(asn1_ctx_t *actx)
+{
+ packet_info *pinfo = actx->pinfo;
+ mms_private_data_t *private_data = (mms_private_data_t *)p_get_proto_data(pinfo->pool, pinfo, proto_mms, pinfo->curr_layer_num);
+ if(private_data != NULL )
+ return private_data;
+ else {
+ private_data = wmem_new0(pinfo->pool, mms_private_data_t);
+ p_add_proto_data(pinfo->pool, pinfo, proto_mms, pinfo->curr_layer_num, private_data);
+ return private_data;
+ }
+}
+
+/* Helper function to test presence of private data struct */
+static gboolean
+mms_has_private_data(asn1_ctx_t *actx)
+{
+ packet_info *pinfo = actx->pinfo;
+ return (p_get_proto_data(pinfo->pool, pinfo, proto_mms, pinfo->curr_layer_num) != NULL);
+}
+
+static void
+private_data_add_preCinfo(asn1_ctx_t *actx, guint32 val)
+{
+ mms_private_data_t *private_data = (mms_private_data_t*)mms_get_private_data(actx);
+ snprintf(private_data->preCinfo, BUFFER_SIZE_PRE, "%02d ", val);
+}
+
+static char*
+private_data_get_preCinfo(asn1_ctx_t *actx)
+{
+ mms_private_data_t *private_data = (mms_private_data_t*)mms_get_private_data(actx);
+ return private_data->preCinfo;
+}
+
+static void
+private_data_add_moreCinfo_id(asn1_ctx_t *actx, tvbuff_t *tvb)
+{
+ mms_private_data_t *private_data = (mms_private_data_t*)mms_get_private_data(actx);
+ (void) g_strlcat(private_data->moreCinfo, " ", BUFFER_SIZE_MORE);
+ (void) g_strlcat(private_data->moreCinfo, tvb_get_string_enc(actx->pinfo->pool,
+ tvb, 2, tvb_get_guint8(tvb, 1), ENC_STRING), BUFFER_SIZE_MORE);
+}
+
+static void
+private_data_add_moreCinfo_float(asn1_ctx_t *actx, tvbuff_t *tvb)
+{
+ mms_private_data_t *private_data = (mms_private_data_t*)mms_get_private_data(actx);
+ snprintf(private_data->moreCinfo, BUFFER_SIZE_MORE,
+ " %f", tvb_get_ieee_float(tvb, 1, ENC_BIG_ENDIAN));
+}
+
+static char*
+private_data_get_moreCinfo(asn1_ctx_t *actx)
+{
+ mms_private_data_t *private_data = (mms_private_data_t*)mms_get_private_data(actx);
+ return private_data->moreCinfo;
+}
+
+/*****************************************************************************/
+
+
+#include "packet-mms-fn.c"
+
+/*
+* Dissect MMS PDUs inside a PPDU.
+*/
+static int
+dissect_mms(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void* data _U_)
+{
+ int offset = 0;
+ int old_offset;
+ proto_item *item=NULL;
+ proto_tree *tree=NULL;
+ asn1_ctx_t asn1_ctx;
+ asn1_ctx_init(&asn1_ctx, ASN1_ENC_BER, TRUE, pinfo);
+
+ if(parent_tree){
+ item = proto_tree_add_item(parent_tree, proto_mms, tvb, 0, -1, ENC_NA);
+ tree = proto_item_add_subtree(item, ett_mms);
+ }
+ col_set_str(pinfo->cinfo, COL_PROTOCOL, "MMS");
+ col_clear(pinfo->cinfo, COL_INFO);
+
+ while (tvb_reported_length_remaining(tvb, offset) > 0){
+ old_offset=offset;
+ offset=dissect_mms_MMSpdu(FALSE, tvb, offset, &asn1_ctx , tree, -1);
+ if(offset == old_offset){
+ proto_tree_add_expert(tree, pinfo, &ei_mms_zero_pdu, tvb, offset, -1);
+ break;
+ }
+ }
+ return tvb_captured_length(tvb);
+}
+
+
+/*--- proto_register_mms -------------------------------------------*/
+void proto_register_mms(void) {
+
+ /* List of fields */
+ static hf_register_info hf[] =
+ {
+#include "packet-mms-hfarr.c"
+ };
+
+ /* List of subtrees */
+ static gint *ett[] = {
+ &ett_mms,
+#include "packet-mms-ettarr.c"
+ };
+
+ static ei_register_info ei[] = {
+ { &ei_mms_mal_timeofday_encoding, { "mms.malformed.timeofday_encoding", PI_MALFORMED, PI_WARN, "BER Error: malformed TimeOfDay encoding", EXPFILL }},
+ { &ei_mms_mal_utctime_encoding, { "mms.malformed.utctime", PI_MALFORMED, PI_WARN, "BER Error: malformed IEC61850 UTCTime encoding", EXPFILL }},
+ { &ei_mms_zero_pdu, { "mms.zero_pdu", PI_PROTOCOL, PI_ERROR, "Internal error, zero-byte MMS PDU", EXPFILL }},
+ };
+
+ expert_module_t* expert_mms;
+
+ /* Register protocol */
+ proto_mms = proto_register_protocol(PNAME, PSNAME, PFNAME);
+ register_dissector("mms", dissect_mms, proto_mms);
+ /* Register fields and subtrees */
+ proto_register_field_array(proto_mms, hf, array_length(hf));
+ proto_register_subtree_array(ett, array_length(ett));
+ expert_mms = expert_register_protocol(proto_mms);
+ expert_register_field_array(expert_mms, ei, array_length(ei));
+
+}
+
+
+static gboolean
+dissect_mms_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, void *data _U_)
+{
+ /* must check that this really is an mms packet */
+ int offset = 0;
+ guint32 length = 0 ;
+ guint32 oct;
+ gint idx = 0 ;
+
+ gint8 tmp_class;
+ bool tmp_pc;
+ gint32 tmp_tag;
+
+ /* first, check do we have at least 2 bytes (pdu) */
+ if (!tvb_bytes_exist(tvb, 0, 2))
+ return FALSE; /* no */
+
+ /* can we recognize MMS PDU ? Return FALSE if not */
+ /* get MMS PDU type */
+ offset = get_ber_identifier(tvb, offset, &tmp_class, &tmp_pc, &tmp_tag);
+
+ /* check MMS type */
+
+ /* Class should be constructed */
+ if (tmp_class!=BER_CLASS_CON)
+ return FALSE;
+
+ /* see if the tag is a valid MMS PDU */
+ try_val_to_str_idx(tmp_tag, mms_MMSpdu_vals, &idx);
+ if (idx == -1) {
+ return FALSE; /* no, it isn't an MMS PDU */
+ }
+
+ /* check MMS length */
+ oct = tvb_get_guint8(tvb, offset)& 0x7F;
+ if (oct==0)
+ /* MMS requires length after tag so not MMS if indefinite length*/
+ return FALSE;
+
+ offset = get_ber_length(tvb, offset, &length, NULL);
+ /* do we have enough bytes? */
+ if (!tvb_bytes_exist(tvb, offset, length))
+ return FALSE;
+
+ dissect_mms(tvb, pinfo, parent_tree, data);
+ return TRUE;
+}
+
+/*--- proto_reg_handoff_mms --- */
+void proto_reg_handoff_mms(void) {
+ register_ber_oid_dissector("1.0.9506.2.3", dissect_mms, proto_mms,"MMS");
+ register_ber_oid_dissector("1.0.9506.2.1", dissect_mms, proto_mms,"mms-abstract-syntax-version1(1)");
+ heur_dissector_add("cotp", dissect_mms_heur, "MMS over COTP", "mms_cotp", proto_mms, HEURISTIC_ENABLE);
+ heur_dissector_add("cotp_is", dissect_mms_heur, "MMS over COTP (inactive subset)", "mms_cotp_is", proto_mms, HEURISTIC_ENABLE);
+}
+
diff --git a/epan/dissectors/asn1/mms/packet-mms-template.h b/epan/dissectors/asn1/mms/packet-mms-template.h
new file mode 100644
index 00000000..c64a7a39
--- /dev/null
+++ b/epan/dissectors/asn1/mms/packet-mms-template.h
@@ -0,0 +1,18 @@
+/* packet-mms.h
+ * Routines for MMS packet dissection
+ * Ronnie Sahlberg 2005
+ *
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
+ * Copyright 1998 Gerald Combs
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#ifndef PACKET_MMS_H
+#define PACKET_MMS_H
+
+#include "packet-mms-exp.h"
+
+#endif /* PACKET_MMS_H */
+