From Graeme Lunt
authoretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 4 Sep 2005 16:22:12 +0000 (16:22 +0000)
committeretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>
Sun, 4 Sep 2005 16:22:12 +0000 (16:22 +0000)
I attach my RTSE dissector (in tar file) which requires the included ROS dissector, as well as a patch to the latest pres.{cnf,asn}. The ROS dissector uses a new field in the SESSION_DATA_STRUCTURE to pass the ROS operation to the sub-dissector, though this is also set by other dissectors (RTSE uses it in X.410 mode).

Note that X.400 P1 in X.410 mode doesn't use ROS, so it is useful not to explicitly include ROS in my X411 dissector. However, the inclusion of a ROS dissector won't effect any dissectors that currently implement their own ROS.

I also include dissectors for:

X.411  (P1)  X.400 OSI Message Transfer Service
X.420  (P22)  X.400 OSI Information Object
STANAG 4406 (P772) STANAG 4406 Military Message Extensions (to P22)

These rely on the RTSE and ROS dissectors.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@15679 f5534014-38df-0310-8fa8-9805f1628bb7

36 files changed:
asn1/pres/ISO8823-PRESENTATION.asn
asn1/pres/pres.cnf
asn1/ros/Makefile [new file with mode: 0644]
asn1/ros/Makefile.nmake [new file with mode: 0644]
asn1/ros/packet-ros-template.c [new file with mode: 0644]
asn1/ros/packet-ros-template.h [new file with mode: 0644]
asn1/ros/ros-exp.cnf [new file with mode: 0644]
asn1/ros/ros.asn [new file with mode: 0644]
asn1/ros/ros.cnf [new file with mode: 0644]
asn1/rtse/Makefile [new file with mode: 0644]
asn1/rtse/Makefile.nmake [new file with mode: 0644]
asn1/rtse/packet-rtse-template.c [new file with mode: 0644]
asn1/rtse/packet-rtse-template.h [new file with mode: 0644]
asn1/rtse/rtse-exp.cnf [new file with mode: 0644]
asn1/rtse/rtse.asn [new file with mode: 0644]
asn1/rtse/rtse.cnf [new file with mode: 0644]
asn1/s4406/Makefile [new file with mode: 0644]
asn1/s4406/Makefile.nmake [new file with mode: 0644]
asn1/s4406/packet-s4406-template.c [new file with mode: 0644]
asn1/s4406/packet-s4406-template.h [new file with mode: 0644]
asn1/s4406/s4406.asn [new file with mode: 0644]
asn1/s4406/s4406.cnf [new file with mode: 0644]
asn1/x411/Makefile [new file with mode: 0644]
asn1/x411/Makefile.nmake [new file with mode: 0644]
asn1/x411/packet-x411-template.c [new file with mode: 0644]
asn1/x411/packet-x411-template.h [new file with mode: 0644]
asn1/x411/x411-exp.cnf [new file with mode: 0644]
asn1/x411/x411.asn [new file with mode: 0644]
asn1/x411/x411.cnf [new file with mode: 0644]
asn1/x420/Makefile [new file with mode: 0644]
asn1/x420/Makefile.nmake [new file with mode: 0644]
asn1/x420/packet-x420-template.c [new file with mode: 0644]
asn1/x420/packet-x420-template.h [new file with mode: 0644]
asn1/x420/x420-exp.cnf [new file with mode: 0644]
asn1/x420/x420.asn [new file with mode: 0644]
asn1/x420/x420.cnf [new file with mode: 0644]

index 9f13917db6fa7a73f2eaeb7ee101ed9893f56f34..225519877417f6e141adcfaff44f926b355692a6 100644 (file)
@@ -1,4 +1,4 @@
--- $Id:$
+-- $Id$
 -- Module ISO8823-PRESENTATION (X.226:07/1994)
 ISO8823-PRESENTATION DEFINITIONS ::=
 BEGIN
@@ -10,97 +10,11 @@ BEGIN
 --  In normal mode, the value of the SS-user data parameter of the S-CONNECT request and
 --  indication session-service primitives shall be a CP-type value, followed as a requestor's
 --  option by zero or more CPC-type values.
---IMPORTS
---  RTORQapdu, RTOACapdu, RTORJapdu, RTABapdu
---    FROM Reliable-Transfer-APDU {joint-iso-itu-t(2) reliable-transfer(3)
---      apdus(0)};
--- Importd done localy
---  RTORQapdu, RTOACapdu, RTORJapdu, RTABapdu
---    FROM Reliable-Transfer-APDU {joint-iso-itu-t(2) reliable-transfer(3)
---      apdus(0)};
-
-RTORQapdu ::= SET {
-  checkpointSize       [0] IMPLICIT INTEGER DEFAULT 0,
-  windowSize           [1] IMPLICIT INTEGER DEFAULT 3,
-  dialogueMode
-    [2] IMPLICIT INTEGER {monologue(0), twa(1)} DEFAULT monologue,
-  connectionDataRQ     [3]  ConnectionData,
-  applicationProtocol
-    [4] IMPLICIT INTEGER OPTIONAL --solely in X.410-1984 mode--
-}
-
-RTOACapdu ::= SET {
-  checkpointSize    [0] IMPLICIT INTEGER DEFAULT 0,
-  windowSize        [1] IMPLICIT INTEGER DEFAULT 3,
-  connectionDataAC  [2]  ConnectionData
-}
-
-RTORJapdu ::= SET {
-  refuseReason  [0] IMPLICIT RefuseReason OPTIONAL, -- only in X.410-1984 mode
-  userDataRJ
---    [1]  OPEN.&Type OPTIONAL 
--- RTSE user data, only in normal mode
---
-     [1]  OPEN
-}
+IMPORTS
+  RTORQapdu, RTOACapdu, RTORJapdu, RTABapdu
+    FROM Reliable-Transfer-APDU {joint-iso-itu-t(2) reliable-transfer(3)
+      apdus(0)};
 
-RTABapdu ::= SET {
-  abortReason         [0] IMPLICIT AbortReason OPTIONAL,
-  reflectedParameter  [1] IMPLICIT BIT STRING OPTIONAL,
-  -- 8 bits maximum, only if abortReason is invalidParameter
-  userdataAB
---    [2]  OPEN.&Type OPTIONAL 
--- only in normal mode and if abortReason
---
-    [2]  OPEN
-  -- is userError 
-}
-
-OPEN ::= ANY
-
-ConnectionData ::= CHOICE {
---  open     [0]  OPEN.&Type, 
--- RTSE user data
-  open     [0]  OPEN, 
-  
-  -- this alternative is encoded as [0] IMPLICIT NULL
-  -- in the case of absence of RTSE user data,
-  recover  [1] IMPLICIT SessionConnectionIdentifier
-}
-
-SessionConnectionIdentifier ::= SEQUENCE {
-  callingSSuserReference          CallingSSuserReference,
-  commonReference                 CommonReference,
-  additionalReferenceInformation
-    [0] IMPLICIT AdditionalReferenceInformation OPTIONAL
-}
-
-RefuseReason ::= INTEGER {
-  rtsBusy(0), cannotRecover(1), validationFailure(2),
-  unacceptableDialogueMode(3)}
-
-CallingSSuserReference ::= CHOICE {
-  t61String    T61String -- solely in X.410-1984 --,
-  octetString  OCTET STRING -- solely in normal mode --
-}
-
-CommonReference ::= UTCTime
-
-AdditionalReferenceInformation ::= T61String
-
-AbortReason ::= INTEGER {
-  localSystemProblem(0),
-  invalidParameter(1), -- reflectedParameter supplied
-  unrecognizedActivity(2),
-  temporaryProblem(3),
-  -- the RTSE cannot accept a session for a period of time
-  protocolError(4), -- RTSE level protocol error
-  permanentProblem(5), --provider-abort solely in normal mode 
-  userError(6), -- user-abort solely in normal mode
-  transferCompleted(7) -- activity can't be discarded--}
-
--- end local imports
--- 
 CP-type ::= SET {
   mode-selector           [0] IMPLICIT Mode-selector,
   x410-mode-parameters
index 120e85362f54beb3f9e79f5c7961ea17e303d787..851b892c8359c3be0c67214abbe284142516c1fe 100644 (file)
@@ -4,6 +4,9 @@
 # $Id$
 
 #.MODULE_IMPORT
+Reliable-Transfer-APDU rtse
+
+#.INCLUDE ../rtse/rtse-exp.cnf
 
 #.EXPORTS
 
diff --git a/asn1/ros/Makefile b/asn1/ros/Makefile
new file mode 100644 (file)
index 0000000..3b9f678
--- /dev/null
@@ -0,0 +1,17 @@
+# $Id$
+
+DISSECTOR_FILES=packet-ros.c packet-ros.h
+
+all: generate_dissector
+
+generate_dissector: $(DISSECTOR_FILES)
+
+$(DISSECTOR_FILES): ../../tools/asn2eth.py ros.asn packet-ros-template.c packet-ros-template.h ros.cnf
+       python ../../tools/asn2eth.py -X -b -e -p ros -c ros.cnf -s packet-ros-template  ros.asn
+
+clean:
+       rm -f parsetab.py $(DISSECTOR_FILES)
+
+copy_files: generate_dissector
+       cp $(DISSECTOR_FILES) ../../epan/dissectors
+
diff --git a/asn1/ros/Makefile.nmake b/asn1/ros/Makefile.nmake
new file mode 100644 (file)
index 0000000..43735a3
--- /dev/null
@@ -0,0 +1,42 @@
+## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
+#
+# $Id$
+
+include ../../config.nmake
+
+UNIX2DOS=$(PERL) ../../tools/unix2dos.pl
+
+PROTOCOL_NAME=ros
+DISSECTOR_FILES=packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).h
+
+all: generate_dissector
+
+generate_dissector: $(DISSECTOR_FILES)
+
+$(DISSECTOR_FILES): ../../tools/asn2eth.py $(PROTOCOL_NAME).asn packet-$(PROTOCOL_NAME)-template.c packet-$(PROTOCOL_NAME)-template.h $(PROTOCOL_NAME).cnf
+!IFDEF PYTHON
+       $(PYTHON) ../../tools/asn2eth.py -X -b -e -p $(PROTOCOL_NAME) -c $(PROTOCOL_NAME).cnf -s packet-$(PROTOCOL_NAME)-template $(PROTOCOL_NAME).asn
+!ELSE
+       @echo Error: You need Python to use asn2eth.py
+       @exit 1
+!ENDIF
+
+clean:
+       rm -f parsetab.py $(DISSECTOR_FILES)
+
+# Fix EOL in generated dissectors. Cygwin's python generates files with 
+# mixed EOL styles, which can't be commited to the SVN repository.
+# Stuff included from template and "cnf" files has "\r\n" on windows, while 
+# the generated stuff has "\n".
+
+fix_eol: generate_dissector
+       move packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).c.tmp
+       move packet-$(PROTOCOL_NAME).h packet-$(PROTOCOL_NAME).h.tmp
+       $(UNIX2DOS) < packet-$(PROTOCOL_NAME).c.tmp > packet-$(PROTOCOL_NAME).c
+       $(UNIX2DOS) < packet-$(PROTOCOL_NAME).h.tmp > packet-$(PROTOCOL_NAME).h
+       del /f packet-$(PROTOCOL_NAME).c.tmp packet-$(PROTOCOL_NAME).h.tmp
+
+copy_files: generate_dissector fix_eol
+       xcopy packet-$(PROTOCOL_NAME).c ..\..\epan\dissectors /d /y
+       xcopy packet-$(PROTOCOL_NAME).h ..\..\epan\dissectors /d /y
+
diff --git a/asn1/ros/packet-ros-template.c b/asn1/ros/packet-ros-template.c
new file mode 100644 (file)
index 0000000..8d432e5
--- /dev/null
@@ -0,0 +1,175 @@
+/* packet-ros_asn1.c
+ * Routines for ROS packet dissection
+ * Graeme Lunt 2005
+ *
+ * $Id$
+ *
+ * Ethereal - Network traffic analyzer
+ * By Gerald Combs <gerald@ethereal.com>
+ * Copyright 1998 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <glib.h>
+#include <epan/packet.h>
+#include <epan/conversation.h>
+
+#include <stdio.h>
+#include <string.h>
+
+#include "packet-ber.h"
+#include "packet-acse.h"
+#include "packet-ros.h"
+
+#define PNAME  "X.880 OSI Remote Operations Service"
+#define PSNAME "ROS"
+#define PFNAME "ros"
+
+/* Initialize the protocol and registered fields */
+int proto_ros = -1;
+
+static struct SESSION_DATA_STRUCTURE* session = NULL;
+
+static proto_tree *top_tree=NULL;
+static guint32 opcode;
+
+#include "packet-ros-hf.c"
+
+/* Initialize the subtree pointers */
+static gint ett_ros = -1;
+#include "packet-ros-ett.c"
+
+#include "packet-ros-fn.c"
+
+static dissector_table_t ros_oid_dissector_table=NULL;
+static GHashTable *oid_table=NULL;
+static gint ett_ros_unknown = -1;
+
+void
+register_ros_oid_dissector_handle(const char *oid, dissector_handle_t dissector, int proto _U_, const char *name)
+{
+       dissector_add_string("ros.oid", oid, dissector);
+       g_hash_table_insert(oid_table, (gpointer)oid, (gpointer)name);
+}
+
+static int
+call_ros_oid_callback(const char *oid, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
+{
+       tvbuff_t *next_tvb;
+
+       next_tvb = tvb_new_subset(tvb, offset, tvb_length_remaining(tvb, offset), tvb_reported_length_remaining(tvb, offset));
+       if(!dissector_try_string(ros_oid_dissector_table, oid, next_tvb, pinfo, tree)){
+               proto_item *item=NULL;
+               proto_tree *next_tree=NULL;
+
+               item=proto_tree_add_text(tree, next_tvb, 0, tvb_length_remaining(tvb, offset), "RTSE: Dissector for OID:%s not implemented. Contact Ethereal developers if you want this supported", oid);
+               if(item){
+                       next_tree=proto_item_add_subtree(item, ett_ros_unknown);
+               }
+               dissect_unknown_ber(pinfo, next_tvb, offset, next_tree);
+       }
+
+       /*XXX until we change the #.REGISTER signature for _PDU()s 
+        * into new_dissector_t   we have to do this kludge with
+        * manually step past the content in the ANY type.
+        */
+       offset+=tvb_length_remaining(tvb, offset);
+
+       return offset;
+}
+
+/*
+* Dissect ROS PDUs inside a PPDU.
+*/
+static void
+dissect_ros(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
+{
+       int offset = 0;
+       int old_offset;
+       proto_item *item=NULL;
+       proto_tree *tree=NULL;
+
+       /* save parent_tree so subdissectors can create new top nodes */
+       top_tree=parent_tree;
+
+       /* do we have application context from the acse dissector?  */
+       if( !pinfo->private_data ){
+               if(parent_tree){
+                       proto_tree_add_text(parent_tree, tvb, offset, -1,
+                               "Internal error:can't get application context from ACSE dissector.");
+               } 
+               return  ;
+       } else {
+               session  = ( (struct SESSION_DATA_STRUCTURE*)(pinfo->private_data) );
+
+       }
+
+       if(parent_tree){
+               item = proto_tree_add_item(parent_tree, proto_ros, tvb, 0, -1, FALSE);
+               tree = proto_item_add_subtree(item, ett_ros);
+       }
+       if (check_col(pinfo->cinfo, COL_PROTOCOL))
+               col_set_str(pinfo->cinfo, COL_PROTOCOL, "ROS");
+       if (check_col(pinfo->cinfo, COL_INFO))
+               col_clear(pinfo->cinfo, COL_INFO);
+
+       while (tvb_reported_length_remaining(tvb, offset) > 0){
+               old_offset=offset;
+               offset=dissect_ros_ROS(FALSE, tvb, offset, pinfo , tree, -1);
+               if(offset == old_offset){
+                       proto_tree_add_text(tree, tvb, offset, -1,"Internal error, zero-byte ROS PDU");
+                       offset = tvb_length(tvb);
+                       break;
+               }
+       }
+}
+
+
+/*--- proto_register_ros -------------------------------------------*/
+void proto_register_ros(void) {
+
+  /* List of fields */
+  static hf_register_info hf[] =
+  {
+#include "packet-ros-hfarr.c"
+  };
+
+  /* List of subtrees */
+  static gint *ett[] = {
+    &ett_ros,
+    &ett_ros_unknown,
+#include "packet-ros-ettarr.c"
+  };
+
+  /* Register protocol */
+  proto_ros = proto_register_protocol(PNAME, PSNAME, PFNAME);
+  register_dissector("ros", dissect_ros, proto_ros);
+  /* Register fields and subtrees */
+  proto_register_field_array(proto_ros, hf, array_length(hf));
+  proto_register_subtree_array(ett, array_length(ett));
+
+  ros_oid_dissector_table = register_dissector_table("ros.oid", "ROS OID Dissectors", FT_STRING, BASE_NONE);
+  oid_table=g_hash_table_new(g_str_hash, g_str_equal);
+}
+
+
+/*--- proto_reg_handoff_ros --- */
+void proto_reg_handoff_ros(void) {
+}
diff --git a/asn1/ros/packet-ros-template.h b/asn1/ros/packet-ros-template.h
new file mode 100644 (file)
index 0000000..fbd3364
--- /dev/null
@@ -0,0 +1,52 @@
+/* packet-ros.h
+ * Routines for ROS packet dissection
+ * Graeme Lunt 2005
+ *
+ * $Id$
+ *
+ * Ethereal - Network traffic analyzer
+ * By Gerald Combs <gerald@ethereal.com>
+ * Copyright 1998 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
+#ifndef PACKET_ROS_H
+#define PACKET_ROS_H
+
+#include "packet-ros-exp.h"
+
+# include "packet-ses.h"
+
+/* for use in the SESSION_DATA_STRUCTURE ros_op argument
+   top byte indicates ROS invocation 
+   bottom three bytes indicate operation code */
+
+# define ROS_OP_MASK    0xff000000
+
+# define ROS_OP_ARGUMENT  0x10000000
+# define ROS_OP_RESULT  0x20000000
+# define ROS_OP_ERROR   0x30000000
+# define ROS_OP_REJECT  0x40000000
+
+# define ROS_OP_BIND    0x01000000
+# define ROS_OP_UNBIND  0x02000000
+# define ROS_OP_INVOKE  0x03000000
+
+# define ROS_OP_OPCODE_MASK (~ROS_OP_MASK)
+
+void register_ros_oid_dissector_handle(const char *oid, dissector_handle_t dissector, int proto _U_, const char *name);
+
+#endif  /* PACKET_ROS_H */
diff --git a/asn1/ros/ros-exp.cnf b/asn1/ros/ros-exp.cnf
new file mode 100644 (file)
index 0000000..7dab68a
--- /dev/null
@@ -0,0 +1,10 @@
+#.IMPORT_TAG
+InvokeId                 BER_CLASS_ANY/*choice*/ -1/*choice*/
+Code                     BER_CLASS_ANY/*choice*/ -1/*choice*/
+#.END
+
+#.TYPE_ATTR
+InvokeId                 TYPE = FT_UINT32  DISPLAY = BASE_DEC   STRINGS = VALS(ros_InvokeId_vals)  BITMASK = 0
+Code                     TYPE = FT_UINT32  DISPLAY = BASE_DEC   STRINGS = VALS(ros_Code_vals)  BITMASK = 0
+#.END
+
diff --git a/asn1/ros/ros.asn b/asn1/ros/ros.asn
new file mode 100644 (file)
index 0000000..d767072
--- /dev/null
@@ -0,0 +1,186 @@
+-- Module Remote-Operations-Generic-ROS-PDUs (X.880:07/1994)
+-- See also the README file
+-- See also the index of all ASN.1 assignments needed in this Recommendation
+
+
+Remote-Operations-Generic-ROS-PDUs {joint-iso-itu-t remote-operations(4)
+  generic-ROS-PDUs(6) version1(0)} DEFINITIONS IMPLICIT TAGS ::=
+BEGIN
+
+-- exports everything
+IMPORTS
+  OPERATION, ERROR
+    FROM Remote-Operations-Information-Objects {joint-iso-itu-t
+      remote-operations(4) informationObjects(5) version1(0)};
+
+
+
+ROS --{InvokeId:InvokeIdSet, OPERATION:Invokable, OPERATION:Returnable} -- ::=
+  CHOICE {
+  invoke        [1]  Invoke --{{InvokeIdSet}, {Invokable}}--,
+  returnResult  [2]  ReturnResult --{{Returnable}}--,
+  returnError   [3]  ReturnError --{{Errors  {{Returnable}}}}--,
+  reject        [4]  Reject,
+
+  bind-invoke  [16]  --OPERATION.&ArgumentType({operation})-- ANY,
+  bind-result  [17]  --OPERATION.&ResultType({operation})-- ANY,
+  bind-error   [18]  --OPERATION.&Errors.&ParameterType({operation}) -- ANY,
+
+  unbind-invoke  [19]  --OPERATION.&ArgumentType({operation})-- ANY,
+  unbind-result  [20]  --OPERATION.&ResultType({operation})-- ANY,
+  unbind-error   [21]  --OPERATION.&Errors.&ParameterType({operation}) -- ANY
+}
+
+
+--(CONSTRAINED BY { - - must conform to the above definition - -} !
+-- RejectProblem:general-unrecognizedPDU)
+
+Invoke --{InvokeId:InvokeIdSet, OPERATION:Operations}-- ::= SEQUENCE {
+  invokeId
+    InvokeId --(InvokeIdSet)
+--      (CONSTRAINED BY { - - must be unambiguous - -} !
+--       RejectProblem:invoke-duplicateInvocation)--,
+  linkedId
+--    CHOICE {present  [0] IMPLICIT present < InvokeId,
+--            absent   [1] IMPLICIT NULL
+--  }
+  [0] INTEGER
+--  (CONSTRAINED BY { - - must identify an outstanding operation - -} !
+--   RejectProblem:invoke-unrecognizedLinkedId)
+--  (CONSTRAINED BY { - - which has one or more linked operations- -} !
+--   RejectProblem:invoke-linkedResponseUnexpected)-- OPTIONAL,
+  opcode INTEGER
+--    OPERATION.&operationCode
+--      ({Operations} !RejectProblem:invoke-unrecognizedOperation)--,
+  argument
+--    OPERATION.&ArgumentType
+--      ({Operations}{@opcode} !RejectProblem:invoke-mistypedArgument) -- ANY OPTIONAL
+}
+--(CONSTRAINED BY { - - must conform to the above definition - -} !
+-- RejectProblem:general-mistypedPDU)
+--(WITH COMPONENTS {
+--   ...,
+--   linkedId  ABSENT
+-- } |
+-- WITH COMPONENTS {
+--   ...,
+--   linkedId  PRESENT,
+--   opcode    (CONSTRAINED BY { - - must be in the &Linked field of the associated operation - -
+--                } !RejectProblem:invoke-unexpectedLinkedOperation)
+-- })
+
+-- continued on the next page
+ReturnResult --{OPERATION:Operations}-- ::= SEQUENCE {
+  invokeId
+    InvokeId
+--      (CONSTRAINED BY { - - must be that for an outstanding operation - -} !
+--       RejectProblem:returnResult-unrecognizedInvocation)
+--      (CONSTRAINED BY { - - which returns a result - -} !
+--       RejectProblem:returnResult-resultResponseUnexpected)--,
+  result
+    SEQUENCE {opcode INTEGER
+--                OPERATION.&operationCode({Operations})
+--                  (CONSTRAINED BY { - - identified by invokeId - -} !
+--                   RejectProblem:returnResult-unrecognizedInvocation)--,
+              result ANY
+--                OPERATION.&ResultType
+--                  ({Operations}{@.opcode} !
+--                   RejectProblem:returnResult-mistypedResult) -- } OPTIONAL
+}
+--(CONSTRAINED BY { - - must conform to the above definition - -} !
+-- RejectProblem:general-mistypedPDU)
+
+ReturnError --{ERROR:Errors}-- ::= SEQUENCE {
+  invokeId
+    InvokeId
+--      (CONSTRAINED BY { - - must be that for an outstanding operation - -} !
+--       RejectProblem:returnError-unrecognizedInvocation)
+--      (CONSTRAINED BY { - - which returns an error - -} !
+--       RejectProblem:returnError-errorResponseUnexpected) --,
+  errcode INTEGER
+--    ERROR.&errorCode({Errors} !RejectProblem:returnError-unrecognizedError)
+--      (CONSTRAINED BY { - - must be in the &Errors field of the associated operation - -
+--         } !RejectProblem:returnError-unexpectedError)--,
+  parameter ANY
+--    ERROR.&ParameterType
+--      ({Errors}{@errcode} !RejectProblem:returnError-mistypedParameter)
+      OPTIONAL
+}
+--(CONSTRAINED BY { - - must conform to the above definition - -} !
+-- RejectProblem:general-mistypedPDU)
+
+Reject ::= SEQUENCE {
+  invokeId  InvokeId,
+  problem
+    CHOICE {general       [0]  GeneralProblem,
+            invoke        [1]  InvokeProblem,
+            returnResult  [2]  ReturnResultProblem,
+            returnError   [3]  ReturnErrorProblem}
+}
+--(CONSTRAINED BY { - - must conform to the above definition - -} !
+-- RejectProblem:general-mistypedPDU)
+
+GeneralProblem ::= INTEGER {
+  unrecognizedPDU(0), mistypedPDU(1), badlyStructuredPDU(2)}
+
+-- continued on the next page
+InvokeProblem ::= INTEGER {
+  duplicateInvocation(0), unrecognizedOperation(1), mistypedArgument(2),
+  resourceLimitation(3), releaseInProgress(4), unrecognizedLinkedId(5),
+  linkedResponseUnexpected(6), unexpectedLinkedOperation(7)}
+
+ReturnResultProblem ::= INTEGER {
+  unrecognizedInvocation(0), resultResponseUnexpected(1), mistypedResult(2)
+}
+
+ReturnErrorProblem ::= INTEGER {
+  unrecognizedInvocation(0), errorResponseUnexpected(1), unrecognizedError(2),
+  unexpectedError(3), mistypedParameter(4)}
+
+RejectProblem ::= INTEGER {
+  general-unrecognizedPDU(0), general-mistypedPDU(1),
+  general-badlyStructuredPDU(2), invoke-duplicateInvocation(10),
+  invoke-unrecognizedOperation(11), invoke-mistypedArgument(12),
+  invoke-resourceLimitation(13), invoke-releaseInProgress(14),
+  invoke-unrecognizedLinkedId(15), invoke-linkedResponseUnexpected(16),
+  invoke-unexpectedLinkedOperation(17),
+  returnResult-unrecognizedInvocation(20),
+  returnResult-resultResponseUnexpected(21), returnResult-mistypedResult(22),
+  returnError-unrecognizedInvocation(30),
+  returnError-errorResponseUnexpected(31), returnError-unrecognizedError(32),
+  returnError-unexpectedError(33), returnError-mistypedParameter(34)}
+
+InvokeId ::= CHOICE {present  INTEGER,
+                     absent   NULL
+}
+
+--noInvokeId InvokeId ::= absent:NULL
+
+--NoInvokeId InvokeId ::= {noInvokeId}
+
+--Errors{OPERATION:Operations} ERROR ::= {Operations.&Errors}
+
+-- continued on the next page
+--Bind{OPERATION:operation} ::= CHOICE {
+--  bind-invoke  [16]  OPERATION.&ArgumentType({operation}),
+--  bind-result  [17]  OPERATION.&ResultType({operation}),
+--  bind-error   [18]  OPERATION.&Errors.&ParameterType({operation})
+--}
+
+--Unbind{OPERATION:operation} ::= CHOICE {
+--  unbind-invoke  [19]  OPERATION.&ArgumentType({operation}),
+--  unbind-result  [20]  OPERATION.&ResultType({operation}),
+--  unbind-error   [21]  OPERATION.&Errors.&ParameterType({operation})
+--}
+
+
+Code ::= CHOICE {
+  local INTEGER,
+  global OBJECT IDENTIFIER
+}
+
+Priority ::= INTEGER
+
+END -- end of generic ROS PDU definitions
+
+-- Generated by Asnp, the ASN.1 pretty-printer of France Telecom R&D 
diff --git a/asn1/ros/ros.cnf b/asn1/ros/ros.cnf
new file mode 100644 (file)
index 0000000..3c74d6b
--- /dev/null
@@ -0,0 +1,123 @@
+#.EXPORTS
+InvokeId
+Code
+
+#.FN_BODY opcode
+
+  offset = dissect_ber_integer(FALSE, pinfo, tree, tvb, offset, hf_index,
+                                  &opcode);
+
+#.FN_BODY errcode
+
+  offset = dissect_ber_integer(FALSE, pinfo, tree, tvb, offset, hf_index,
+                                  &opcode);
+
+
+#.FN_BODY T_argument
+  char *oid;
+  /* not sure what the length should be - -1 for now */
+  proto_tree_add_text(tree, tvb, offset,-1, "invoke argument");
+       
+  if(session && session->pres_ctx_id && (oid = find_oid_by_pres_ctx_id(pinfo, session->pres_ctx_id))) {
+       /* this should be ROS! */
+       session->ros_op = (ROS_OP_INVOKE | ROS_OP_ARGUMENT);
+       /* now add the opcode */
+       session->ros_op |= opcode;
+       offset = call_ros_oid_callback(oid, tvb, offset, pinfo, top_tree);
+  }
+
+#.FN_BODY T_result1
+  char *oid;
+  /* not sure what the length should be - -1 for now */
+  proto_tree_add_text(tree, tvb, offset,-1, "return result");
+       
+  if(session && session->pres_ctx_id && (oid = find_oid_by_pres_ctx_id(pinfo, session->pres_ctx_id))) {
+       /* this should be ROS! */
+       session->ros_op = (ROS_OP_INVOKE | ROS_OP_RESULT);
+       /* now add the opcode */
+       session->ros_op |= opcode;
+       offset = call_ros_oid_callback(oid, tvb, offset, pinfo, top_tree);
+  }
+
+#.FN_BODY T_parameter
+  char *oid;
+  /* not sure what the length should be - -1 for now */
+  proto_tree_add_text(tree, tvb, offset,-1, "return result");
+       
+  if(session && session->pres_ctx_id && (oid = find_oid_by_pres_ctx_id(pinfo, session->pres_ctx_id))) {
+       /* this should be ROS! */
+       session->ros_op = (ROS_OP_INVOKE | ROS_OP_ERROR);
+       /* now add the opcode  (really the errode) */
+       session->ros_op |= opcode;
+       offset = call_ros_oid_callback(oid, tvb, offset, pinfo, top_tree);
+  }
+
+
+#.FN_BODY T_bind_invoke
+  char *oid;
+  /* not sure what the length should be - -1 for now */
+  proto_tree_add_text(tree, tvb, offset,-1, "bind-invoke");
+
+  if(session && session->pres_ctx_id && (oid = find_oid_by_pres_ctx_id(pinfo, session->pres_ctx_id))) {
+    /* this should be ROS! */
+    session->ros_op = (ROS_OP_BIND | ROS_OP_ARGUMENT);
+    offset = call_ros_oid_callback(oid, tvb, offset, pinfo, top_tree);
+  }
+
+#.FN_BODY T_bind_result
+  char *oid;
+  /* not sure what the length should be - -1 for now */
+  proto_tree_add_text(tree, tvb, offset,-1, "bind-result");
+
+  if(session && session->pres_ctx_id && (oid = find_oid_by_pres_ctx_id(pinfo, session->pres_ctx_id))) {
+    /* this should be ROS! */
+    session->ros_op = (ROS_OP_BIND | ROS_OP_RESULT);
+    offset = call_ros_oid_callback(oid, tvb, offset, pinfo, top_tree);
+  }
+
+#.FN_BODY T_bind_error
+  char *oid;
+  /* not sure what the length should be - -1 for now */
+  proto_tree_add_text(tree, tvb, offset,-1, "bind-error");
+
+  if(session && session->pres_ctx_id && (oid = find_oid_by_pres_ctx_id(pinfo, session->pres_ctx_id))) {
+    /* this should be ROS! */
+    session->ros_op = (ROS_OP_BIND | ROS_OP_ERROR);
+    offset = call_ros_oid_callback(oid, tvb, offset, pinfo, top_tree);
+  }
+
+
+#.FN_BODY T_unbind_invoke
+  char *oid;
+  /* not sure what the length should be - -1 for now */
+  proto_tree_add_text(tree, tvb, offset,-1, "unbind-invoke");
+
+  if(session && session->pres_ctx_id && (oid = find_oid_by_pres_ctx_id(pinfo, session->pres_ctx_id))) {
+    /* this should be ROS! */
+    session->ros_op = (ROS_OP_UNBIND | ROS_OP_ARGUMENT);
+    offset = call_ros_oid_callback(oid, tvb, offset, pinfo, top_tree);
+  }
+
+
+#.FN_BODY T_unbind_result
+  char *oid;
+  /* not sure what the length should be - -1 for now */
+  proto_tree_add_text(tree, tvb, offset,-1, "unbind-result");
+
+  if(session && session->pres_ctx_id && (oid = find_oid_by_pres_ctx_id(pinfo, session->pres_ctx_id))) {
+    /* this should be ROS! */
+    session->ros_op = (ROS_OP_UNBIND | ROS_OP_RESULT);
+    offset = call_ros_oid_callback(oid, tvb, offset, pinfo, top_tree);
+  }
+
+#.FN_BODY T_unbind_error
+  char *oid;
+  /* not sure what the length should be - -1 for now */
+  proto_tree_add_text(tree, tvb, offset,-1, "unbind-error");
+
+  if(session && session->pres_ctx_id && (oid = find_oid_by_pres_ctx_id(pinfo, session->pres_ctx_id))) {
+    /* this should be ROS! */
+    session->ros_op = (ROS_OP_UNBIND | ROS_OP_ERROR);
+    offset = call_ros_oid_callback(oid, tvb, offset, pinfo, top_tree);
+  }
+#.END
diff --git a/asn1/rtse/Makefile b/asn1/rtse/Makefile
new file mode 100644 (file)
index 0000000..949b065
--- /dev/null
@@ -0,0 +1,17 @@
+# $Id$
+
+DISSECTOR_FILES=packet-rtse.c packet-rtse.h
+
+all: generate_dissector
+
+generate_dissector: $(DISSECTOR_FILES)
+
+$(DISSECTOR_FILES): ../../tools/asn2eth.py rtse.asn packet-rtse-template.c packet-rtse-template.h rtse.cnf
+       python ../../tools/asn2eth.py -X -b -e -p rtse -c rtse.cnf -s packet-rtse-template  rtse.asn
+
+clean:
+       rm -f parsetab.py $(DISSECTOR_FILES)
+
+copy_files: generate_dissector
+       cp $(DISSECTOR_FILES) ../../epan/dissectors
+
diff --git a/asn1/rtse/Makefile.nmake b/asn1/rtse/Makefile.nmake
new file mode 100644 (file)
index 0000000..740198a
--- /dev/null
@@ -0,0 +1,42 @@
+## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
+#
+# $Id$
+
+include ../../config.nmake
+
+UNIX2DOS=$(PERL) ../../tools/unix2dos.pl
+
+PROTOCOL_NAME=rtse
+DISSECTOR_FILES=packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).h
+
+all: generate_dissector
+
+generate_dissector: $(DISSECTOR_FILES)
+
+$(DISSECTOR_FILES): ../../tools/asn2eth.py $(PROTOCOL_NAME).asn packet-$(PROTOCOL_NAME)-template.c packet-$(PROTOCOL_NAME)-template.h $(PROTOCOL_NAME).cnf
+!IFDEF PYTHON
+       $(PYTHON) ../../tools/asn2eth.py -X -b -e -p $(PROTOCOL_NAME) -c $(PROTOCOL_NAME).cnf -s packet-$(PROTOCOL_NAME)-template $(PROTOCOL_NAME).asn
+!ELSE
+       @echo Error: You need Python to use asn2eth.py
+       @exit 1
+!ENDIF
+
+clean:
+       rm -f parsetab.py $(DISSECTOR_FILES)
+
+# Fix EOL in generated dissectors. Cygwin's python generates files with 
+# mixed EOL styles, which can't be commited to the SVN repository.
+# Stuff included from template and "cnf" files has "\r\n" on windows, while 
+# the generated stuff has "\n".
+
+fix_eol: generate_dissector
+       move packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).c.tmp
+       move packet-$(PROTOCOL_NAME).h packet-$(PROTOCOL_NAME).h.tmp
+       $(UNIX2DOS) < packet-$(PROTOCOL_NAME).c.tmp > packet-$(PROTOCOL_NAME).c
+       $(UNIX2DOS) < packet-$(PROTOCOL_NAME).h.tmp > packet-$(PROTOCOL_NAME).h
+       del /f packet-$(PROTOCOL_NAME).c.tmp packet-$(PROTOCOL_NAME).h.tmp
+
+copy_files: generate_dissector fix_eol
+       xcopy packet-$(PROTOCOL_NAME).c ..\..\epan\dissectors /d /y
+       xcopy packet-$(PROTOCOL_NAME).h ..\..\epan\dissectors /d /y
+
diff --git a/asn1/rtse/packet-rtse-template.c b/asn1/rtse/packet-rtse-template.c
new file mode 100644 (file)
index 0000000..6bf6c64
--- /dev/null
@@ -0,0 +1,186 @@
+/* packet-rtse_asn1.c
+ * Routines for RTSE packet dissection
+ * Graeme Lunt 2005
+ *
+ * $Id$
+ *
+ * Ethereal - Network traffic analyzer
+ * By Gerald Combs <gerald@ethereal.com>
+ * Copyright 1998 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <glib.h>
+#include <epan/packet.h>
+#include <epan/conversation.h>
+
+#include <stdio.h>
+#include <string.h>
+
+#include "packet-ber.h"
+#include "packet-pres.h"
+#include "packet-acse.h"
+#include "packet-ros.h"
+#include "packet-rtse.h"
+
+#define PNAME  "X.228 OSI Reliable Transfer Service"
+#define PSNAME "RTSE"
+#define PFNAME "rtse"
+
+/* Initialize the protocol and registered fields */
+int proto_rtse = -1;
+
+static struct SESSION_DATA_STRUCTURE* session = NULL;
+
+static char object_identifier_id[MAX_OID_STR_LEN];
+/* indirect_reference, used to pick up the signalling so we know what
+   kind of data is transferred in SES_DATA_TRANSFER_PDUs */
+static guint32 indir_ref=0;
+static guint32 app_proto=0;
+
+static proto_tree *top_tree=NULL;
+
+
+#include "packet-rtse-hf.c"
+
+/* Initialize the subtree pointers */
+static gint ett_rtse = -1;
+#include "packet-rtse-ett.c"
+
+#include "packet-rtse-fn.c"
+
+static dissector_table_t rtse_oid_dissector_table=NULL;
+static GHashTable *oid_table=NULL;
+static gint ett_rtse_unknown = -1;
+
+void
+register_rtse_oid_dissector_handle(const char *oid, dissector_handle_t dissector, int proto _U_, const char *name)
+{
+       dissector_add_string("rtse.oid", oid, dissector);
+       g_hash_table_insert(oid_table, (gpointer)oid, (gpointer)name);
+}
+
+static int
+call_rtse_oid_callback(const char *oid, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
+{
+       tvbuff_t *next_tvb;
+
+       next_tvb = tvb_new_subset(tvb, offset, tvb_length_remaining(tvb, offset), tvb_reported_length_remaining(tvb, offset));
+       if(!dissector_try_string(rtse_oid_dissector_table, oid, next_tvb, pinfo, tree)){
+               proto_item *item=NULL;
+               proto_tree *next_tree=NULL;
+
+               item=proto_tree_add_text(tree, next_tvb, 0, tvb_length_remaining(tvb, offset), "RTSE: Dissector for OID:%s not implemented. Contact Ethereal developers if you want this supported", oid);
+               if(item){
+                       next_tree=proto_item_add_subtree(item, ett_rtse_unknown);
+               }
+               dissect_unknown_ber(pinfo, next_tvb, offset, next_tree);
+       }
+
+       /*XXX until we change the #.REGISTER signature for _PDU()s 
+        * into new_dissector_t   we have to do this kludge with
+        * manually step past the content in the ANY type.
+        */
+       offset+=tvb_length_remaining(tvb, offset);
+
+       return offset;
+}
+
+/*
+* Dissect RTSE PDUs inside a PPDU.
+*/
+static void
+dissect_rtse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
+{
+       int offset = 0;
+       int old_offset;
+       proto_item *item=NULL;
+       proto_tree *tree=NULL;
+
+       /* save parent_tree so subdissectors can create new top nodes */
+       top_tree=parent_tree;
+
+       /* do we have application context from the acse dissector?  */
+       if( !pinfo->private_data ){
+               if(parent_tree){
+                       proto_tree_add_text(parent_tree, tvb, offset, -1,
+                               "Internal error:can't get application context from ACSE dissector.");
+               } 
+               return  ;
+       } else {
+               session  = ( (struct SESSION_DATA_STRUCTURE*)(pinfo->private_data) );
+
+       }
+
+       if(parent_tree){
+               item = proto_tree_add_item(parent_tree, proto_rtse, tvb, 0, -1, FALSE);
+               tree = proto_item_add_subtree(item, ett_rtse);
+       }
+       if (check_col(pinfo->cinfo, COL_PROTOCOL))
+               col_set_str(pinfo->cinfo, COL_PROTOCOL, "RTSE");
+       if (check_col(pinfo->cinfo, COL_INFO))
+               col_clear(pinfo->cinfo, COL_INFO);
+
+       while (tvb_reported_length_remaining(tvb, offset) > 0){
+               old_offset=offset;
+               offset=dissect_rtse_RTSE_apdus(FALSE, tvb, offset, pinfo , tree, -1);
+               if(offset == old_offset){
+                       proto_tree_add_text(tree, tvb, offset, -1,"Internal error, zero-byte RTSE PDU");
+                       offset = tvb_length(tvb);
+                       break;
+               }
+       }
+
+       top_tree = NULL;
+}
+
+
+/*--- proto_register_rtse -------------------------------------------*/
+void proto_register_rtse(void) {
+
+  /* List of fields */
+  static hf_register_info hf[] =
+  {
+#include "packet-rtse-hfarr.c"
+  };
+
+  /* List of subtrees */
+  static gint *ett[] = {
+    &ett_rtse,
+    &ett_rtse_unknown,
+#include "packet-rtse-ettarr.c"
+  };
+
+  /* Register protocol */
+  proto_rtse = proto_register_protocol(PNAME, PSNAME, PFNAME);
+  register_dissector("rtse", dissect_rtse, proto_rtse);
+  /* Register fields and subtrees */
+  proto_register_field_array(proto_rtse, hf, array_length(hf));
+  proto_register_subtree_array(ett, array_length(ett));
+
+  rtse_oid_dissector_table = register_dissector_table("rtse.oid", "RTSE OID Dissectors", FT_STRING, BASE_NONE);
+  oid_table=g_hash_table_new(g_str_hash, g_str_equal);
+
+}
+
+
+/*--- proto_reg_handoff_rtse --- */
+void proto_reg_handoff_rtse(void) {
+}
diff --git a/asn1/rtse/packet-rtse-template.h b/asn1/rtse/packet-rtse-template.h
new file mode 100644 (file)
index 0000000..7600374
--- /dev/null
@@ -0,0 +1,32 @@
+/* packet-rtse.h
+ * Routines for RTSE packet dissection
+ * Graeme Lunt 2005
+ *
+ * $Id$
+ *
+ * Ethereal - Network traffic analyzer
+ * By Gerald Combs <gerald@ethereal.com>
+ * Copyright 1998 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
+#ifndef PACKET_RTSE_H
+#define PACKET_RTSE_H
+
+/*#include "packet-rtse-exp.h"*/
+void register_rtse_oid_dissector_handle(const char *oid, dissector_handle_t dissector, int proto _U_, const char *name);
+
+#endif  /* PACKET_RTSE_H */
diff --git a/asn1/rtse/rtse-exp.cnf b/asn1/rtse/rtse-exp.cnf
new file mode 100644 (file)
index 0000000..b0eaedd
--- /dev/null
@@ -0,0 +1,14 @@
+#.IMPORT_TAG
+RTORQapdu                BER_CLASS_UNI BER_UNI_TAG_SET
+RTOACapdu                BER_CLASS_UNI BER_UNI_TAG_SET
+RTORJapdu                BER_CLASS_UNI BER_UNI_TAG_SET
+RTABapdu                 BER_CLASS_UNI BER_UNI_TAG_SET
+#.END
+
+#.TYPE_ATTR
+RTORQapdu                TYPE = FT_NONE    DISPLAY = BASE_NONE  STRINGS = NULL  BITMASK = 0
+RTOACapdu                TYPE = FT_NONE    DISPLAY = BASE_NONE  STRINGS = NULL  BITMASK = 0
+RTORJapdu                TYPE = FT_NONE    DISPLAY = BASE_NONE  STRINGS = NULL  BITMASK = 0
+RTABapdu                 TYPE = FT_NONE    DISPLAY = BASE_NONE  STRINGS = NULL  BITMASK = 0
+#.END
+
diff --git a/asn1/rtse/rtse.asn b/asn1/rtse/rtse.asn
new file mode 100644 (file)
index 0000000..1782b8d
--- /dev/null
@@ -0,0 +1,159 @@
+-- RTSE definition from 
+--   http://www.itu.int/ITU-T/asn1/database/itu-t/x/x228/1988/Reliable-Transfer-APDU.html
+-- and modified to pass through ASN2ETH
+--
+--
+-- Module Reliable-Transfer-APDU (X.228:11/1988)
+-- See also the README file
+-- See also the index of all ASN.1 assignments needed in this Recommendation
+
+
+Reliable-Transfer-APDU {joint-iso-itu-t reliable-transfer(3) apdus(0)}
+DEFINITIONS ::=
+BEGIN
+
+EXPORTS
+  rTSE, rTSE-abstract-syntax, RTORQapdu, RTOACapdu, RTORJapdu, RTABapdu; --    for use by Presentation Layer only
+
+--IMPORTS
+--  CONTRACT
+--    FROM Remote-Operations-Information-Objects {joint-iso-itu-t
+--      remote-operations(4) informationObjects(5) version1(0)};
+--OPEN ::= CLASS {&Type  
+--}WITH SYNTAX {TYPE &Type
+--}
+
+rTSE-abstract-syntax OBJECT IDENTIFIER ::=
+  {joint-iso-itu-t reliable-transfer(3) abstract-syntax(2)}
+
+--rTSE CONTRACT ::= {ID  {joint-iso-itu-t reliable-transfer(3) aseID(1)}
+--}
+
+RTSE-apdus ::= CHOICE {
+  rtorq-apdu  [16] IMPLICIT RTORQapdu,
+  rtoac-apdu  [17] IMPLICIT RTOACapdu,
+  rtorj-apdu  [18] IMPLICIT RTORJapdu,
+  rttp-apdu   RTTPapdu,
+  rttr-apdu   RTTRapdu,
+  rtab-apdu   [22] IMPLICIT RTABapdu
+}
+
+-- Tags [19], [20], [21] are used by the values of the UNBIND macro of the RO-notation of
+-- Recommendation X.219. Tags [0] to [15] inclusive are reserved for the 
+-- use by the APDUs of ROSE (Recommendation X229). Any occurrence of 
+-- ANY in this module shall be replaced by a single ASN. 1 type (if any) in an RTSE-user
+-- protocol specification. In addition any RTSE-user protocol sharing a single named
+-- abstract syntax with the RTSE protocol shall use distinct tags for the single
+-- presentation data values in the user data parameters of the RT-CLOSE (if any) and
+-- RT- TRANSFER services. These tags shall be distinct from the tag values [16], [17],
+-- [18] and [22] and from the ASN. 1 types INTEGER and OCTET STRING.
+-- Note - The above conditions are ensured, if the RTSE-user protocol specification uses the
+-- RO-notation of Recommendation X229.
+-- In X.410-1984 mode only the components of RTORQapdu, RTOACapdu, RTORJapdu
+-- and RTABapdu are used by the presentation layer. This has the effect that the following
+-- APDU types appear in the protocol in X.410-1984 mode instead of the alternative types
+-- of the RTSE-apdus type:
+--                     RTORQapdu
+--                     RTOACapdu
+--                     RTORJapdu
+--                     RTTPapdu
+--                     RTTRapdu
+--                     RTABapdu
+RTORQapdu ::= SET {
+  checkpointSize       [0] IMPLICIT INTEGER DEFAULT 0,
+  windowSize           [1] IMPLICIT INTEGER DEFAULT 3,
+  dialogueMode
+    [2] IMPLICIT INTEGER {monologue(0), twa(1)} DEFAULT monologue,
+  connectionDataRQ     [3]  ConnectionData,
+  applicationProtocol
+    [4] IMPLICIT INTEGER {mts-transfer-protocol(12), mts-transfer-protocol-1984(1)} OPTIONAL --solely in X.410-1984 mode--
+}
+
+RTOACapdu ::= SET {
+  checkpointSize    [0] IMPLICIT INTEGER DEFAULT 0,
+  windowSize        [1] IMPLICIT INTEGER DEFAULT 3,
+  connectionDataAC  [2]  ConnectionData
+}
+
+RTORJapdu ::= SET {
+  refuseReason  [0] IMPLICIT RefuseReason OPTIONAL, -- only in X.410-1984 mode
+  userDataRJ
+--    [1]  OPEN.&Type OPTIONAL 
+    [1] ANY OPTIONAL -- RTSE user data, only in normal mode--
+}
+
+RTTPapdu ::= INTEGER -- priority-- 
+
+RTTRapdu ::= OCTET STRING
+
+RTABapdu ::= SET {
+  abortReason         [0] IMPLICIT AbortReason OPTIONAL,
+  reflectedParameter  [1] IMPLICIT BIT STRING OPTIONAL,
+  -- 8 bits maximum, only if abortReason is invalidParameter
+  userdataAB
+--    [2]  OPEN.&Type OPTIONAL 
+  [2] ANY OPTIONAL -- only in normal mode and if abortReason--
+  -- is userError 
+}
+
+ConnectionData ::= CHOICE {
+--  open     [0]  OPEN.&Type, 
+  open         [0] ANY, -- RTSE user data
+  
+  -- this alternative is encoded as [0] IMPLICIT NULL
+  -- in the case of absence of RTSE user data,
+  recover  [1] IMPLICIT SessionConnectionIdentifier
+}
+
+SessionConnectionIdentifier ::= SEQUENCE {
+  callingSSuserReference          CallingSSuserReference,
+  commonReference                 CommonReference,
+  additionalReferenceInformation
+    [0] IMPLICIT AdditionalReferenceInformation OPTIONAL
+}
+
+RefuseReason ::= INTEGER {
+  rtsBusy(0), cannotRecover(1), validationFailure(2),
+  unacceptableDialogueMode(3)}
+
+CallingSSuserReference ::= CHOICE {
+  t61String    T61String -- solely in X.410-1984 --,
+  octetString  OCTET STRING -- solely in normal mode --
+}
+
+CommonReference ::= UTCTime
+
+AdditionalReferenceInformation ::= T61String
+
+AbortReason ::= INTEGER {
+  localSystemProblem(0),
+  invalidParameter(1), -- reflectedParameter supplied
+  unrecognizedActivity(2),
+  temporaryProblem(3),
+  -- the RTSE cannot accept a session for a period of time
+  protocolError(4), -- RTSE level protocol error
+  permanentProblem(5), --provider-abort solely in normal mode 
+  userError(6), -- user-abort solely in normal mode
+  transferCompleted(7) -- activity can't be discarded--}
+
+-- I can't use the ACSE External as it dispatches out of the 
+-- ber_callbacks and I want to dispatch out of the rtse_callbacks
+
+-- Workaround for bug in ASN2ETH in the .cnf file
+-- to handle the lack of support for tagged assignments.
+-- remove that workaround once asn2eth learns how to handle
+-- tagged assignments.
+EXTERNAL  ::=  [UNIVERSAL 8] IMPLICIT SEQUENCE
+     {
+      direct-reference  OBJECT IDENTIFIER OPTIONAL,
+      indirect-reference  INTEGER OPTIONAL,
+      data-value-descriptor  ObjectDescriptor  OPTIONAL,
+      encoding  CHOICE
+                  {single-ASN1-type  [0] ANY,
+                   octet-aligned     [1] IMPLICIT OCTET STRING,
+                   arbitrary         [2] IMPLICIT BIT STRING}
+     }
+
+END
+
+-- Generated by Asnp, the ASN.1 pretty-printer of France Telecom R&D 
diff --git a/asn1/rtse/rtse.cnf b/asn1/rtse/rtse.cnf
new file mode 100644 (file)
index 0000000..e7885d4
--- /dev/null
@@ -0,0 +1,111 @@
+#.EXPORTS
+RTORQapdu
+RTOACapdu
+RTORJapdu
+RTABapdu
+
+#.FN_BODY RTORJapdu/userDataRJ
+/*XXX not implemented yet */
+
+#.FN_BODY RTABapdu/userdataAB
+/*XXX not implemented yet */
+
+#.FN_BODY RTORQapdu
+
+  if(session  = (struct SESSION_DATA_STRUCTURE*)(pinfo->private_data))
+       session->ros_op = (ROS_OP_BIND | ROS_OP_ARGUMENT);
+
+  offset = dissect_ber_set(implicit_tag, pinfo, tree, tvb, offset,
+                              RTORQapdu_set, hf_index, ett_rtse_RTORQapdu);
+
+
+#.FN_BODY RTOACapdu
+
+  if(session  = (struct SESSION_DATA_STRUCTURE*)(pinfo->private_data))
+       session->ros_op = (ROS_OP_BIND | ROS_OP_RESULT);
+
+  offset = dissect_ber_set(implicit_tag, pinfo, tree, tvb, offset,
+                              RTOACapdu_set, hf_index, ett_rtse_RTOACapdu);
+
+
+#.FN_BODY T_open
+
+       char *oid = NULL;
+
+       switch(app_proto)  {
+       case 1:         /* mts-transfer-protocol-1984 */
+               oid = "applicationProtocol.1";
+               break;
+       case 12:        /* mts-transfer-protocol */
+               oid = "applicationProtocol.12";
+               break;
+       default:
+               if(session && session->pres_ctx_id)
+                       oid = find_oid_by_pres_ctx_id(pinfo, session->pres_ctx_id);
+               break;
+       }
+       
+       if(!oid) /* XXX: problem here is we haven't decoded the applicationProtocol yet - so we make assumptions! */
+               oid = "applicationProtocol.12";
+
+       if(oid) {
+
+               offset = call_rtse_oid_callback(oid, tvb, offset, pinfo, top_tree ? top_tree : tree);
+       }
+
+       /* else XXX: need to flag we can't find the presentation context */
+
+#.FN_BODY RTTRapdu
+       tvbuff_t *next_tvb = NULL;
+
+       offset = dissect_ber_octet_string(FALSE, pinfo, tree, tvb, offset, hf_index, &next_tvb);
+
+       if(next_tvb) {
+
+               /* XXX: we should check is this is an EXTERNAL first */
+
+               /* ROS won't do this for us */
+               if(session)
+                       session->ros_op = (ROS_OP_INVOKE | ROS_OP_ARGUMENT);
+
+               offset = dissect_rtse_EXTERNAL(FALSE, next_tvb, 0, pinfo, tree, -1);
+
+       }
+
+#.FN_BODY EXTERNAL
+  gint8 class;
+  gboolean pc, ind_field;
+  gint32 tag;
+  guint32 len1;
+
+  /* XXX  asn2eth can not yet handle tagged assignment so for the
+   * time being  just remove this tag manually inside the EXTERNAL
+   * dissector.
+   */
+   offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
+   offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
+   offset = dissect_ber_sequence(TRUE, pinfo, tree, tvb, offset,
+                                EXTERNAL_sequence, hf_index, ett_rtse_EXTERNAL);
+
+#.FN_BODY EXTERNAL/indirect-reference
+  char *oid;
+
+  offset = dissect_ber_integer(FALSE, pinfo, tree, tvb, offset,
+                hf_rtse_indirect_reference,
+                &indir_ref);
+
+  /* look up the indirect reference */
+  if(oid = find_oid_by_pres_ctx_id(pinfo, indir_ref)) {
+    strcpy(object_identifier_id, oid);
+  }
+       
+
+#.FN_BODY EXTERNAL/encoding/single-ASN1-type
+  offset=call_rtse_oid_callback(object_identifier_id, tvb, offset, pinfo, top_tree);
+
+
+#.FN_BODY T_applicationProtocol
+
+  offset = dissect_ber_integer(TRUE, pinfo, tree, tvb, offset, hf_index, &app_proto);
+
+#.END
diff --git a/asn1/s4406/Makefile b/asn1/s4406/Makefile
new file mode 100644 (file)
index 0000000..4b920d7
--- /dev/null
@@ -0,0 +1,17 @@
+# $Id$
+
+DISSECTOR_FILES=packet-s4406.c packet-s4406.h
+
+all: generate_dissector
+
+generate_dissector: $(DISSECTOR_FILES)
+
+$(DISSECTOR_FILES): ../../tools/asn2eth.py s4406.asn packet-s4406-template.c packet-s4406-template.h s4406.cnf ../x411/x411-exp.cnf
+       python ../../tools/asn2eth.py -X -b -e -p s4406 -c s4406.cnf -s packet-s4406-template  s4406.asn
+
+clean:
+       rm -f parsetab.py $(DISSECTOR_FILES)
+
+copy_files: generate_dissector
+       cp $(DISSECTOR_FILES) ../../epan/dissectors
+
diff --git a/asn1/s4406/Makefile.nmake b/asn1/s4406/Makefile.nmake
new file mode 100644 (file)
index 0000000..bc53951
--- /dev/null
@@ -0,0 +1,42 @@
+## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
+#
+# $Id$
+
+include ../../config.nmake
+
+UNIX2DOS=$(PERL) ../../tools/unix2dos.pl
+
+PROTOCOL_NAME=s4406
+DISSECTOR_FILES=packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).h
+
+all: generate_dissector
+
+generate_dissector: $(DISSECTOR_FILES)
+
+$(DISSECTOR_FILES): ../../tools/asn2eth.py $(PROTOCOL_NAME).asn packet-$(PROTOCOL_NAME)-template.c packet-$(PROTOCOL_NAME)-template.h $(PROTOCOL_NAME).cnf
+!IFDEF PYTHON
+       $(PYTHON) ../../tools/asn2eth.py -X -b -e -p $(PROTOCOL_NAME) -c $(PROTOCOL_NAME).cnf -s packet-$(PROTOCOL_NAME)-template $(PROTOCOL_NAME).asn
+!ELSE
+       @echo Error: You need Python to use asn2eth.py
+       @exit 1
+!ENDIF
+
+clean:
+       rm -f parsetab.py $(DISSECTOR_FILES)
+
+# Fix EOL in generated dissectors. Cygwin's python generates files with 
+# mixed EOL styles, which can't be commited to the SVN repository.
+# Stuff included from template and "cnf" files has "\r\n" on windows, while 
+# the generated stuff has "\n".
+
+fix_eol: generate_dissector
+       move packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).c.tmp
+       move packet-$(PROTOCOL_NAME).h packet-$(PROTOCOL_NAME).h.tmp
+       $(UNIX2DOS) < packet-$(PROTOCOL_NAME).c.tmp > packet-$(PROTOCOL_NAME).c
+       $(UNIX2DOS) < packet-$(PROTOCOL_NAME).h.tmp > packet-$(PROTOCOL_NAME).h
+       del /f packet-$(PROTOCOL_NAME).c.tmp packet-$(PROTOCOL_NAME).h.tmp
+
+copy_files: generate_dissector fix_eol
+       xcopy packet-$(PROTOCOL_NAME).c ..\..\epan\dissectors /d /y
+       xcopy packet-$(PROTOCOL_NAME).h ..\..\epan\dissectors /d /y
+
diff --git a/asn1/s4406/packet-s4406-template.c b/asn1/s4406/packet-s4406-template.c
new file mode 100644 (file)
index 0000000..d864769
--- /dev/null
@@ -0,0 +1,90 @@
+/* packet-s4406.c
+ * Routines for STANAG 4406 (X.400 Military Message Extensions)  packet dissection
+ * Graeme Lunt 2005
+ *
+ * $Id$
+ *
+ * Ethereal - Network traffic analyzer
+ * By Gerald Combs <gerald@ethereal.com>
+ * Copyright 1998 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <glib.h>
+#include <epan/packet.h>
+#include <epan/conversation.h>
+
+#include <stdio.h>
+#include <string.h>
+
+#include "packet-ber.h"
+
+#include "packet-x509if.h"
+
+#include "packet-s4406.h"
+
+#define PNAME  "STANAG 4406 Military Message Extensions"
+#define PSNAME "STANAG 4406"
+#define PFNAME "MMHS"
+
+/* Initialize the protocol and registered fields */
+int proto_s4406 = -1;
+
+#include "packet-s4406-hf.c"
+
+/* Initialize the subtree pointers */
+static gint ett_s4406 = -1;
+#include "packet-s4406-ett.c"
+
+#include "packet-s4406-fn.c"
+
+
+
+
+/*--- proto_register_s4406 -------------------------------------------*/
+void proto_register_s4406(void) {
+
+  /* List of fields */
+  static hf_register_info hf[] =
+  {
+#include "packet-s4406-hfarr.c"
+  };
+
+  /* List of subtrees */
+  static gint *ett[] = {
+    &ett_s4406,
+#include "packet-s4406-ettarr.c"
+  };
+
+  /* Register protocol */
+  proto_s4406 = proto_register_protocol(PNAME, PSNAME, PFNAME);
+
+  /* Register fields and subtrees */
+  proto_register_field_array(proto_s4406, hf, array_length(hf));
+  proto_register_subtree_array(ett, array_length(ett));
+
+}
+
+
+/*--- proto_reg_handoff_s4406 --- */
+void proto_reg_handoff_s4406(void) {
+#include "packet-s4406-dis-tab.c"
+
+}
diff --git a/asn1/s4406/packet-s4406-template.h b/asn1/s4406/packet-s4406-template.h
new file mode 100644 (file)
index 0000000..1bb5ee6
--- /dev/null
@@ -0,0 +1,31 @@
+/* packet-s4406.h
+ * Routines for X.411 (X.400 Message Transfer) packet dissection
+ * Graeme Lunt 2005
+ *
+ * $Id$
+ *
+ * Ethereal - Network traffic analyzer
+ * By Gerald Combs <gerald@ethereal.com>
+ * Copyright 1998 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
+#ifndef PACKET_S4406_H
+#define PACKET_S4406_H
+
+/* #include "packet-s4406-exp.h" */
+
+#endif  /* PACKET_S4406_H */
diff --git a/asn1/s4406/s4406.asn b/asn1/s4406/s4406.asn
new file mode 100644 (file)
index 0000000..c1f8773
--- /dev/null
@@ -0,0 +1,264 @@
+MMSHeadingExtensions { iso(1) identified-organization(3) NATO(26)
+       STANAGS(0) MMHS(4406) object-identifiers(0) module(0) heading-extensions(6) }
+
+DEFINITIONS IMPLICIT TAGS ::=
+BEGIN
+-- Prologue
+-- Exports Everything
+IMPORTS
+
+-- IPMS information objects
+IPMS-EXTENSION, ORDescriptor
+---
+FROM IPMSInformationObjects { joint-iso-ccitt  mhs-motis(6) ipms(1)
+       modules(0) information-objects(2) }
+
+-- MMS upper bounds
+--lb-military-sic, ub-military-number-of-sics, ub-military-sic
+---
+--FROM MMSUpperBounds { iso(1) identified-organization(3) NATO(26)
+--     STANAGS(0) MMHS(4406) object-identifiers(0) module(0) upper-bounds(0) }
+
+-- MMS object identifiers
+--id-nato-mmhs-mm-acp127-message-identifier, 
+--id-nato-mmhs-mm-address-list-indicator,
+--id-nato-mmhs-mm-codress-message,
+--id-nato-mmhs-mm-copy-precedence, id-nato-mmhs-mm-distribution-codes, 
+--id-nato-mmhs-mm-exempted-address, 
+--id-nato-mmhs-mm-extended-authorisation-info, 
+--id-nato-mmhs-mm-handling-instructions, 
+--id-nato-mmhs-mm-information-labels,
+--id-nato-mmhs-mm-message-instructions, id-nato-mmhs-mm-message-type, 
+--id-nato-mmhs-mm-originator-reference, id-nato-mmhs-mm-originator-plad,
+--id-nato-mmhs-mm-other-recipients-indicator, 
+--id-nato-mmhs-mm-pilot-forwarding-info, 
+--id-nato-mmhs-mm-primary-precedence
+---
+--FROM MMSObjectIdentifiers { iso(1) identified-organization(3) NATO(26)
+--     STANAGS(0) MMHS(4406) object-identifiers(0) }
+
+-- MTS abstract service
+--Message--SecurityLabel
+---
+FROM MTSAbstractService {joint-iso-ccitt  mhs-motis(6) mts(3)
+       modules(0) mts-abstract-service(1) };
+
+-- exempted address
+
+--exempted-address IPMS-EXTENSION
+--     VALUE SEQUENCE OF ExemptedAddress
+--     ::= id-nato-mmhs-mm-exempted-address
+
+ExemptedAddress ::= ORDescriptor
+
+
+-- extended authorisation information
+
+--extended-authorisation-info IPMS-EXTENSION
+--     VALUE ExtendedAuthorisationInfo
+--     ::= id-nato-mmhs-mm-extended-authorisation-info
+
+ExtendedAuthorisationInfo ::= UTCTime
+               -- UTCTime as defined in 8.5.4 of ITU-T X.411
+
+
+-- Distribution codes
+-- will carry subject indicator codes and leave room for expansion.
+
+--distribution-codes IPMS-EXTENSION
+--     VALUE DistributionCodes
+--     ::= id-nato-mmhs-mm-distribution-codes
+
+DistributionCodes ::= SET {
+       sics    [0]     SEQUENCE --SIZE
+--                             (1..ub-military-number-of-sics)-- OF
+                               Sic OPTIONAL,
+       dist-Extensions [1]     SEQUENCE OF
+                               DistributionExtensionField OPTIONAL }
+
+Sic ::= PrintableString --(SIZE (lb-military-sic..ub-military-sic))
+
+DistributionExtensionField ::= SEQUENCE {
+       dist-type       OBJECT IDENTIFIER,
+       dist-value      ANY --DEFINED BY dist-type-- }
+
+
+-- Handling instructions
+
+--handling-instructions IPMS-EXTENSION
+--     VALUE HandlingInstructions
+--     ::= id-nato-mmhs-mm-handling-instructions
+
+HandlingInstructions ::= SEQUENCE OF MilitaryString
+
+MilitaryString ::= PrintableString --(SIZE(1..ub-military-string))
+
+
+-- Message instructions
+-- will carry operating signals
+
+--message-instructions IPMS-EXTENSION
+--     VALUE MessageInstructions
+--     ::= id-nato-mmhs-mm-message-instructions
+
+MessageInstructions ::= SEQUENCE OF MilitaryString
+
+
+-- Codress message
+-- Needed for transition or as long as codress messages need to be carried.
+
+--codress-message IPMS-EXTENSION
+--     VALUE CodressMessage
+--     ::= id-nato-mmhs-mm-codress-message
+
+CodressMessage ::= INTEGER
+
+
+-- Originator reference
+-- only used if a user designated identifier string becomes important.
+
+--originator-reference IPMS-EXTENSION
+--     VALUE OriginatorReference
+--     ::= id-nato-mmhs-mm-originator-reference
+
+OriginatorReference ::= MilitaryString
+
+
+-- Primary reference
+
+--primary-precedence IPMS-EXTENSION
+--     VALUE MMHSPrecedence
+--     ::= id-nato-mmhs-mm-primary-precedence
+
+MMHSPrecedence ::= INTEGER {deferred (0), routine (1), priority (2), immediate (3),
+       flash (4), override (5), 
+-- these are used by some National systems XXX need to verify
+       ecp(16), critic(17), override(18)}
+
+-- Note: Values 0 to 15 are reserved for NATO defined precedence levels.
+-- Values 16 to 31 are reserved for national user.
+
+
+-- Copy precedence
+
+--copy-precedence IPMS-EXTENSION
+--     VALUE MMHSPrecedence 
+--     ::= id-nato-mmhs-mm-copy-precedence
+
+-- Note: Values 0 to 15 are reserved for NATO defined precedence levels. 
+-- Values 16 to 31 are reserved for national user.
+
+-- Message type
+
+--message-type IPMS-EXTENSION
+--     VALUE MessageType
+--     ::=id-nato-mmhs-mm-message-type
+
+MessageType ::= SET{
+       type    [0]     TypeMessage,
+       identifier      [1]     MessageIdentifier OPTIONAL }
+
+TypeMessage ::= INTEGER {exercise(0), operation(1), project(2), drill(3) }
+
+-- Note: Values 0 to 127 are reserved for NATO defined Message Type
+-- identifiers. Values above 128 to 255 are not defined by NATO and may
+-- be used nationally or bilaterally.
+
+MessageIdentifier ::= MilitaryString
+
+
+-- Address list indicator
+
+--address-list-indicator IPMS-EXTENSION
+--     VALUE SEQUENCE OF AddressListDesignator
+--     ::=id-nato-mmhs-mm-address-list-indicator
+
+AddressListDesignator ::=SET {
+       type    [0]     INTEGER
+                               { primaryAddressList(0), copyAddressList(1) },
+       listName        [1]     ORDescriptor,
+       notificationRequest     [2]     AddressListRequest OPTIONAL,
+       replyRequest    [3]     AddressListRequest OPTIONAL }
+
+AddressListRequest ::= INTEGER { action(0), info(1), both(2) }
+
+-- Other recipients indicator
+
+--other-recipients-indicator IPMS-EXTENSION
+--     VALUE SEQUENCE OF OtherRecipientDesignator
+--     ::=id-nato-mmhs-mm-other-recipients-indicator
+
+OtherRecipientDesignator ::= SET {
+       type    [0]     INTEGER { primary(0), copy(1) },
+       designator      [1]     MilitaryString }
+
+
+-- pilot forwarding information
+
+--pilot-forwarding-info IPMS-EXTENSION
+--     VALUE SEQUENCE OF PilotInformation
+--     ::= id-nato-mmhs-mm-pilot-forwarding-info
+
+PilotInformation ::= SEQUENCE {
+       pilotPrecedence [0]     MMHSPrecedence OPTIONAL,
+               -- Note: Values 0 to 15 are reserved for NATO defined precedence levels.
+               -- Values 16 to 31 are reserved for national use.
+       pilotRecipient  [1]     SEQUENCE OF ORDescriptor OPTIONAL,
+       pilotSecurity   [2]     --Message--SecurityLabel OPTIONAL,
+       pilotHandling   [3]     SEQUENCE OF MilitaryString OPTIONAL}
+
+
+-- Acp127 message identifier
+-- a string to store routing indicator, station serial number and julian file 
+-- time seperated by spaces.
+
+--acp127-message-identifier IPMS-EXTENSION
+--     VALUE Acp127MessageIdentifier
+--     ::= id-nato-mmhs-mm-acp127-message-identifier
+
+Acp127MessageIdentifier ::= MilitaryString
+
+
+-- Originator PLAD
+
+--originator-plad IPMS-EXTENSION
+--     VALUE OriginatorPlad
+--     ::= id-nato-mmhs-mm-originator-plad
+
+OriginatorPlad ::= MilitaryString
+
+-- Information label
+
+--security-information-labels IPMS-EXTENSION
+--     VALUE SecurityInformationLabels
+--     ::= id-nato-mmhs-mm-information-labels
+
+SecurityInformationLabels ::= SEQUENCE {
+       content-security-label  [0]     SecurityLabel,
+               -- SecurityLabel as defined in 8.5.9 of ITU-T X.411
+       heading-security-label  [1]     SecurityLabel OPTIONAL,
+       body-part-security-labels       [2]     SEQUENCE OF BodyPartSecurityLabel OPTIONAL }
+
+BodyPartSecurityLabel  ::= SET {
+       body-part-security-label        [0]     SecurityLabel,
+       body-part-sequence-number       [1]     BodyPartSequenceNumber OPTIONAL }
+
+BodyPartSequenceNumber ::= INTEGER
+
+--  Note: If all body parts of the message are labelled, each 
+--  element in the body sequence above shall correspond to the
+--  same numbered element of the Body sequence, and the body 
+--  part sequence number may be absent. (i.e. the first element
+--  of this field shall correspond to the first body part, etc.
+--  Otherwise the body part sequence number shall be present
+--  and shall correspond to the sequence of the body part
+--  to which the security label relates. (i.e. the value of the 
+--  body part sequence number shall correspond to sequence in which
+--  the originator encoded the body parts of the message).
+
+-- NOTE: The security-information-labels heading extension is now
+-- deprecated. Its use is, therefore, discouraged. See STANAG 4406
+-- Annex B for instruction on the use of its replacement, the
+-- ESSSecurityLabel.
+
+END -- of Military heading extensions used in MMS
diff --git a/asn1/s4406/s4406.cnf b/asn1/s4406/s4406.cnf
new file mode 100644 (file)
index 0000000..4001163
--- /dev/null
@@ -0,0 +1,36 @@
+#.MODULE_IMPORT 
+MTSAbstractService     x411
+IPMSInformationObjects x420
+
+#.INCLUDE ../x411/x411-exp.cnf
+#.INCLUDE ../x420/x420-exp.cnf
+
+#.TYPE_RENAME
+AddressListDesignator/type     AddressListType
+OtherRecipientDesignator/type  OtherRecipientType
+
+#.FIELD_RENAME
+AddressListDesignator/type     address_list_type
+MessageType/type               message_type_type
+OtherRecipientDesignator/type  other_recipient_type
+
+#.REGISTER
+MMHSPrecedence B "1.3.26.0.4406.0.2.0" "primary-precedence"
+MMHSPrecedence B "1.3.26.0.4406.0.2.1" "copy-precedence"
+MessageType B "1.3.26.0.4406.0.2.2" "message-type"
+AddressListDesignator B "1.3.26.0.4406.0.2.3" "address-list-indicator"
+ExemptedAddress B "1.3.26.0.4406.0.2.4" "exempted-address"
+ExtendedAuthorisationInfo B "1.3.26.0.4406.0.2.5" "extended-authorisation-info"
+DistributionCodes B "1.3.26.0.4406.0.2.6" "distribution-codes"
+HandlingInstructions B "1.3.26.0.4406.0.2.7" "handling-instructions"
+MessageInstructions B "1.3.26.0.4406.0.2.8" "message-instructions"
+CodressMessage B "1.3.26.0.4406.0.2.9" "codress-message"
+OriginatorReference B "1.3.26.0.4406.0.2.10" "originator-reference"
+OtherRecipientDesignator B "1.3.26.0.4406.0.2.11" "other-recipients-indicator"
+PilotInformation B "1.3.26.0.4406.0.2.12" "pilot-forwarding-info"
+Acp127MessageIdentifier B "1.3.26.0.4406.0.2.13" "acp127-message-identifierr"
+OriginatorPlad B "1.3.26.0.4406.0.2.14" "originator-plad"
+SecurityInformationLabels B "1.3.26.0.4406.0.2.17" "information-labels"
+
+#.FN_BODY T_dist_value
+/* XXX: not implemented */
\ No newline at end of file
diff --git a/asn1/x411/Makefile b/asn1/x411/Makefile
new file mode 100644 (file)
index 0000000..69bae85
--- /dev/null
@@ -0,0 +1,17 @@
+# $Id$
+
+DISSECTOR_FILES=packet-x411.c packet-x411.h
+
+all: generate_dissector
+
+generate_dissector: $(DISSECTOR_FILES)
+
+$(DISSECTOR_FILES): ../../tools/asn2eth.py x411.asn packet-x411-template.c packet-x411-template.h x411.cnf
+       python ../../tools/asn2eth.py -X -b -e -p x411 -c x411.cnf -s packet-x411-template  x411.asn
+
+clean:
+       rm -f parsetab.py $(DISSECTOR_FILES)
+
+copy_files: generate_dissector
+       cp $(DISSECTOR_FILES) ../../epan/dissectors
+
diff --git a/asn1/x411/Makefile.nmake b/asn1/x411/Makefile.nmake
new file mode 100644 (file)
index 0000000..0f6db77
--- /dev/null
@@ -0,0 +1,42 @@
+## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
+#
+# $Id$
+
+include ../../config.nmake
+
+UNIX2DOS=$(PERL) ../../tools/unix2dos.pl
+
+PROTOCOL_NAME=x411
+DISSECTOR_FILES=packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).h
+
+all: generate_dissector
+
+generate_dissector: $(DISSECTOR_FILES)
+
+$(DISSECTOR_FILES): ../../tools/asn2eth.py $(PROTOCOL_NAME).asn packet-$(PROTOCOL_NAME)-template.c packet-$(PROTOCOL_NAME)-template.h $(PROTOCOL_NAME).cnf
+!IFDEF PYTHON
+       $(PYTHON) ../../tools/asn2eth.py -X -b -e -p $(PROTOCOL_NAME) -c $(PROTOCOL_NAME).cnf -s packet-$(PROTOCOL_NAME)-template $(PROTOCOL_NAME).asn
+!ELSE
+       @echo Error: You need Python to use asn2eth.py
+       @exit 1
+!ENDIF
+
+clean:
+       rm -f parsetab.py $(DISSECTOR_FILES)
+
+# Fix EOL in generated dissectors. Cygwin's python generates files with 
+# mixed EOL styles, which can't be commited to the SVN repository.
+# Stuff included from template and "cnf" files has "\r\n" on windows, while 
+# the generated stuff has "\n".
+
+fix_eol: generate_dissector
+       move packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).c.tmp
+       move packet-$(PROTOCOL_NAME).h packet-$(PROTOCOL_NAME).h.tmp
+       $(UNIX2DOS) < packet-$(PROTOCOL_NAME).c.tmp > packet-$(PROTOCOL_NAME).c
+       $(UNIX2DOS) < packet-$(PROTOCOL_NAME).h.tmp > packet-$(PROTOCOL_NAME).h
+       del /f packet-$(PROTOCOL_NAME).c.tmp packet-$(PROTOCOL_NAME).h.tmp
+
+copy_files: generate_dissector fix_eol
+       xcopy packet-$(PROTOCOL_NAME).c ..\..\epan\dissectors /d /y
+       xcopy packet-$(PROTOCOL_NAME).h ..\..\epan\dissectors /d /y
+
diff --git a/asn1/x411/packet-x411-template.c b/asn1/x411/packet-x411-template.c
new file mode 100644 (file)
index 0000000..3bd924a
--- /dev/null
@@ -0,0 +1,203 @@
+/* packet-x411.c
+ * Routines for X.411 (X.400 Message Transfer)  packet dissection
+ * Graeme Lunt 2005
+ *
+ * $Id$
+ *
+ * Ethereal - Network traffic analyzer
+ * By Gerald Combs <gerald@ethereal.com>
+ * Copyright 1998 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <glib.h>
+#include <epan/packet.h>
+#include <epan/conversation.h>
+
+#include <stdio.h>
+#include <string.h>
+
+#include "packet-ber.h"
+#include "packet-acse.h"
+#include "packet-ros.h"
+#include "packet-rtse.h"
+
+#include "packet-x509af.h"
+#include "packet-x509ce.h"
+#include "packet-x509if.h"
+#include "packet-x509sat.h"
+
+#include "packet-x411.h"
+
+#define PNAME  "X.411 OSI Message Transfer Service"
+#define PSNAME "X411"
+#define PFNAME "x411"
+
+/* Initialize the protocol and registered fields */
+int proto_x411 = -1;
+
+static struct SESSION_DATA_STRUCTURE* session = NULL;
+static int extension_id = 0; /* integer extension id */
+static char object_identifier_id[BER_MAX_OID_STR_LEN]; /* content type identifier */
+static int
+call_x411_oid_callback(char *base_oid, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree);
+
+#include "packet-x411-hf.c"
+
+/* Initialize the subtree pointers */
+static gint ett_x411 = -1;
+#include "packet-x411-ett.c"
+
+#include "packet-x411-fn.c"
+
+static int
+call_x411_oid_callback(char *base_oid, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree)
+{
+  
+  char extension_oid[BER_MAX_OID_STR_LEN];
+
+  sprintf(extension_oid, "%s.%d", base_oid, extension_id);     
+
+  return call_ber_oid_callback(extension_oid, tvb, offset, pinfo, tree);
+
+}
+
+
+/*
+* Dissect X411 PDUs inside a PPDU.
+*/
+static void
+dissect_x411(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
+{
+       int offset = 0;
+       int old_offset;
+       proto_item *item=NULL;
+       proto_tree *tree=NULL;
+       int (*x411_dissector)(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) = NULL;
+       char *x411_op_name;
+
+       /* do we have operation information from the ROS dissector?  */
+       if( !pinfo->private_data ){
+               if(parent_tree){
+                       proto_tree_add_text(parent_tree, tvb, offset, -1,
+                               "Internal error: can't get operation information from ROS dissector.");
+               } 
+               return  ;
+       } else {
+               session  = ( (struct SESSION_DATA_STRUCTURE*)(pinfo->private_data) );
+       }
+
+       if(parent_tree){
+               item = proto_tree_add_item(parent_tree, proto_x411, tvb, 0, -1, FALSE);
+               tree = proto_item_add_subtree(item, ett_x411);
+       }
+       if (check_col(pinfo->cinfo, COL_PROTOCOL))
+               col_set_str(pinfo->cinfo, COL_PROTOCOL, "X411");
+       if (check_col(pinfo->cinfo, COL_INFO))
+               col_clear(pinfo->cinfo, COL_INFO);
+
+       switch(session->ros_op & ROS_OP_MASK) {
+       case (ROS_OP_BIND | ROS_OP_ARGUMENT):   /*  BindInvoke */
+         x411_dissector = dissect_x411_MTABindArgument;
+         x411_op_name = "MTA-Bind-Argument";
+         break;
+       case (ROS_OP_BIND | ROS_OP_RESULT):     /*  BindResult */
+         x411_dissector = dissect_x411_MTABindResult;
+         x411_op_name = "MTA-Bind-Result";
+         break;
+       case (ROS_OP_INVOKE | ROS_OP_ARGUMENT): /*  Invoke Argument */
+         x411_dissector = dissect_x411_MTS_APDU;
+         x411_op_name = "MTA-Transfer";
+         break;
+       default:
+         proto_tree_add_text(tree, tvb, offset, -1,"Unsupported X411 PDU");
+         return;
+       }
+
+       if (check_col(pinfo->cinfo, COL_INFO))
+         col_add_str(pinfo->cinfo, COL_INFO, x411_op_name);
+
+       while (tvb_reported_length_remaining(tvb, offset) > 0){
+               old_offset=offset;
+               offset=(*x411_dissector)(TRUE, tvb, offset, pinfo , tree, -1);
+               if(offset == old_offset){
+                       proto_tree_add_text(tree, tvb, offset, -1,"Internal error, zero-byte X411 PDU");
+                       offset = tvb_length(tvb);
+                       break;
+               }
+       }
+}
+
+
+/*--- proto_register_x411 -------------------------------------------*/
+void proto_register_x411(void) {
+
+  /* List of fields */
+  static hf_register_info hf[] =
+  {
+#include "packet-x411-hfarr.c"
+  };
+
+  /* List of subtrees */
+  static gint *ett[] = {
+    &ett_x411,
+#include "packet-x411-ettarr.c"
+  };
+
+  /* Register protocol */
+  proto_x411 = proto_register_protocol(PNAME, PSNAME, PFNAME);
+  register_dissector("x411", dissect_x411, proto_x411);
+  /* Register fields and subtrees */
+  proto_register_field_array(proto_x411, hf, array_length(hf));
+  proto_register_subtree_array(ett, array_length(ett));
+
+}
+
+
+/*--- proto_reg_handoff_x411 --- */
+void proto_reg_handoff_x411(void) {
+  dissector_handle_t handle = NULL;
+
+#include "packet-x411-dis-tab.c"
+
+  register_ber_oid_name("2.6.0.1.6", "id-ac-mts-transfer");
+
+  /* we register RTSE with BER (which is used by ACSE) */
+  if(handle = find_dissector("rtse")) {
+    register_ber_oid_dissector_handle("2.6.0.2.12", handle, 0 , "id-as-mta-rtse");
+    register_ber_oid_dissector_handle("2.6.0.2.7", handle, 0 , "id-as-mtse");
+  }
+
+  /* then register ROS with RTSE  */
+  if(handle = find_dissector("ros")) {
+    register_rtse_oid_dissector_handle("2.6.0.2.12", handle, 0 , "id-as-mta-rtse");
+  }
+
+  /* and then finally X411 with ROS  and RTSE */
+  if(handle = find_dissector("x411")) {
+    register_ros_oid_dissector_handle("2.6.0.2.12", handle, 0, "id-as-mta-rtse"); 
+    register_rtse_oid_dissector_handle("2.6.0.2.7", handle, 0, "id-as-mtse");
+
+    register_rtse_oid_dissector_handle("applicationProtocol.1", handle, 0, "mts-transfer-protocol-1984");
+    register_rtse_oid_dissector_handle("applicationProtocol.12", handle, 0, "mta-transfer-protocol");
+  }
+
+
+}
diff --git a/asn1/x411/packet-x411-template.h b/asn1/x411/packet-x411-template.h
new file mode 100644 (file)
index 0000000..fac444d
--- /dev/null
@@ -0,0 +1,31 @@
+/* packet-x411.h
+ * Routines for X.411 (X.400 Message Transfer) packet dissection
+ * Graeme Lunt 2005
+ *
+ * $Id$
+ *
+ * Ethereal - Network traffic analyzer
+ * By Gerald Combs <gerald@ethereal.com>
+ * Copyright 1998 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
+#ifndef PACKET_X411_H
+#define PACKET_X411_H
+
+#include "packet-x411-exp.h"
+
+#endif  /* PACKET_X411_H */
diff --git a/asn1/x411/x411-exp.cnf b/asn1/x411/x411-exp.cnf
new file mode 100644 (file)
index 0000000..7e11a63
--- /dev/null
@@ -0,0 +1,24 @@
+#.IMPORT_TAG
+OtherMessageDeliveryFields BER_CLASS_UNI BER_UNI_TAG_SET
+MessageDeliveryTime      BER_CLASS_UNI BER_UNI_TAG_UTCTime
+SupplementaryInformation BER_CLASS_UNI BER_UNI_TAG_PrintableString
+ExtendedCertificates     BER_CLASS_UNI BER_UNI_TAG_SET
+ORName                   BER_CLASS_APP 0
+EncodedInformationTypes  BER_CLASS_APP 5
+G3FacsimileNonBasicParameters BER_CLASS_UNI BER_UNI_TAG_BITSTRING
+TeletexNonBasicParameters BER_CLASS_UNI BER_UNI_TAG_SET
+SecurityLabel            BER_CLASS_UNI BER_UNI_TAG_SET
+#.END
+
+#.TYPE_ATTR
+OtherMessageDeliveryFields TYPE = FT_NONE    DISPLAY = BASE_NONE  STRINGS = NULL  BITMASK = 0
+MessageDeliveryTime      TYPE = FT_STRING  DISPLAY = BASE_NONE  STRINGS = NULL  BITMASK = 0
+SupplementaryInformation TYPE = FT_STRING  DISPLAY = BASE_NONE  STRINGS = NULL  BITMASK = 0
+ExtendedCertificates     TYPE = FT_UINT32  DISPLAY = BASE_DEC   STRINGS = NULL  BITMASK = 0
+ORName                   TYPE = FT_NONE    DISPLAY = BASE_NONE  STRINGS = NULL  BITMASK = 0
+EncodedInformationTypes  TYPE = FT_NONE    DISPLAY = BASE_NONE  STRINGS = NULL  BITMASK = 0
+G3FacsimileNonBasicParameters TYPE = FT_BYTES   DISPLAY = BASE_HEX   STRINGS = NULL  BITMASK = 0
+TeletexNonBasicParameters TYPE = FT_NONE    DISPLAY = BASE_NONE  STRINGS = NULL  BITMASK = 0
+SecurityLabel            TYPE = FT_NONE    DISPLAY = BASE_NONE  STRINGS = NULL  BITMASK = 0
+#.END
+
diff --git a/asn1/x411/x411.asn b/asn1/x411/x411.asn
new file mode 100644 (file)
index 0000000..a33d32b
--- /dev/null
@@ -0,0 +1,2932 @@
+-- Module MTAAbstractService (X.411:06/1999)
+MTAAbstractService {joint-iso-itu-t mhs(6) mts(3) modules(0)
+  mta-abstract-service(2) version-1999(1)} DEFINITIONS IMPLICIT TAGS ::=
+BEGIN
+
+--     Prologue
+--     Exports everything
+IMPORTS
+  -- Remote Operations
+--  CONNECTION-PACKAGE, CONTRACT
+    --==
+--    FROM Remote-Operations-Information-Objects {joint-iso-itu-t
+--      remote-operations(4) informationObjects(5) version1(0)}
+  emptyUnbind
+    --==
+    FROM Remote-Operations-Useful-Definitions {joint-iso-itu-t
+      remote-operations(4) useful-definitions(7) version1(0)}
+  -- MTS Abstract Service Parameters
+--  ABSTRACT-ERROR, ABSTRACT-OPERATION, administration, 
+--    AdministrationDomainName,
+--    certificate-selectors, certificate-selectors-override, Content,
+--    ContentIdentifier, ContentLength, ContentType,
+--    content-confidentiality-algorithm-identifier, content-correlator,
+--    content-integrity-check, conversion-with-loss-prohibited,
+--    ConvertedEncodedInformationTypes, CountryName, DeferredDeliveryTime,
+--    delivery, dl-exempted-recipients, dl-expansion-history,
+--    dl-expansion-prohibited, ExplicitConversion, EXTENSION, ExtensionField{},
+--    GlobalDomainIdentifier, InitiatorCredentials, latest-delivery-time,
+--    message-origin-authentication-check, message-security-label, message-token,
+--    MHS-OBJECT, MTAName, MTSIdentifier, multiple-originator-certificates,
+--    ORAddressAndOptionalDirectoryName, OriginalEncodedInformationTypes,
+--    originator-and-DL-expansion-history, originator-certificate,
+--    originator-return-address, PerMessageIndicators, physical-delivery-modes,
+--    physical-delivery-report-request, physical-forwarding-address,
+--    physical-forwarding-address-request, physical-forwarding-prohibited,
+--    physical-rendition-attributes, PORT, Priority, PrivateDomainIdentifier,
+--    PrivateExtensions, probe-origin-authentication-check, proof-of-delivery,
+--    proof-of-delivery-request, recipient-certificate,
+--    recipient-number-for-advice, recipient-reassignment-prohibited,
+--    redirection-history, registered-mail-type, reporting-DL-name,
+--    reporting-MTA-certificate, reporting-MTA-name, ReportType,
+--    report-origin-authentication-check, requested-delivery-method,
+--    ResponderCredentials, SecurityContext, submission,
+--    SupplementaryInformation, Time
+    --==
+--    FROM MTSAbstractService {joint-iso-itu-t mhs(6) mts(3) modules(0)
+--      mts-abstract-service(1) version-1999(1)}
+  -- IPM Information Objects
+  IPMPerRecipientEnvelopeExtensions
+    --==
+    FROM IPMSInformationObjects {joint-iso-itu-t mhs(6) ipms(1) modules(0)
+      information-objects(2) version-1999(1)}
+  -- Object Identifiers
+--  id-cp-mta-connect, id-ct-mta-transfer, id-ot-mta, id-pt-transfer
+    --==
+--    FROM MTSObjectIdentifiers {joint-iso-itu-t mhs(6) mts(3) modules(0)
+--      object-identifiers(0) version-1999(1)}
+  -- Upper Bounds
+  ub-bit-options, ub-integer-options, ub-recipients, ub-transfers
+    --==
+    FROM MTSUpperBounds {joint-iso-itu-t mhs(6) mts(3) modules(0)
+      upper-bounds(3) version-1999(1)}
+  Name
+    --==
+    FROM InformationFramework {joint-iso-itu-t ds(5) module(1)
+      informationFramework(1) 3}
+  PresentationAddress
+    --==
+    FROM SelectedAttributeTypes {joint-iso-itu-t ds(5) module(1)
+      selectedAttributeTypes(5) 3}
+  CertificateAssertion
+    --==
+    FROM CertificateExtensions {joint-iso-itu-t ds(5) module(1)
+      certificateExtensions(26) 0}
+  Certificates, AlgorithmIdentifier
+    --==
+    FROM AuthenticationFramework {joint-iso-itu-t ds(5) module(1)
+      authenticationFramework(7) 3};
+
+--     Objects
+--mta MHS-OBJECT ::= {BOTH  {mta-transfer}
+--                    ID    id-ot-mta
+--}
+
+--     Contracts
+--mta-transfer CONTRACT ::= {
+--  CONNECTION     mta-connect
+--  OPERATIONS OF  {transfer}
+--  ID             id-ct-mta-transfer
+--}
+
+--     Connection package
+--mta-connect CONNECTION-PACKAGE ::= {
+--  BIND    mta-bind
+--  UNBIND  mta-unbind
+--  ID      id-cp-mta-connect
+--}
+
+--     Ports
+--transfer PORT ::= {
+--  OPERATIONS  {message-transfer | probe-transfer | report-transfer}
+--  ID          id-pt-transfer
+--}
+
+--     MTA-bind and MTA-unbind
+--mta-bind ABSTRACT-OPERATION ::= {
+--  ARGUMENT  MTABindArgument
+--  RESULT    MTABindResult
+--  ERRORS    {mta-bind-error}
+--}
+
+-- mta-unbind ABSTRACT-OPERATION ::= emptyUnbind
+
+MTABindArgument ::= CHOICE {
+  unauthenticated  NULL, -- if no authentication is required
+  authenticated
+    [1]  SET {-- if authentication is required--initiator-name
+                                                  [0]  MTAName,
+                                                initiator-credentials
+                                                  [1]  InitiatorCredentials
+                                                         (WITH COMPONENTS {
+                                                            ...,
+                                                            protected  ABSENT
+                                                          }),
+                                                security-context
+                                                  [2]  SecurityContext OPTIONAL
+  }
+}
+
+MTABindResult ::= CHOICE {
+  unauthenticated  NULL, -- if no authentication is required
+  authenticated
+    [1]  SET {-- if authentication is required--responder-name
+                                                  [0]  MTAName,
+                                                responder-credentials
+                                                  [1]  ResponderCredentials
+--                                                         (WITH COMPONENTS {
+--                                                            ...,
+--                                                            protected  ABSENT
+--                                                          })--}
+}
+
+--mta-bind-error ABSTRACT-ERROR -- MTABindError ::= -- {
+--  PARAMETER
+    INTEGER {busy(0), authentication-error(2), unacceptable-dialogue-mode(3),
+             unacceptable-security-context(4),
+             inadequate-association-confidentiality(5)}(0..ub-integer-options)
+--}
+
+--     Transfer Port
+--message-transfer ABSTRACT-OPERATION ::= {ARGUMENT  Message
+--}
+
+--probe-transfer ABSTRACT-OPERATION ::= {ARGUMENT  Probe
+--}
+
+--report-transfer ABSTRACT-OPERATION ::= {ARGUMENT  Report
+--}
+
+-- taken from X.419
+MTS-APDU ::= CHOICE {
+message        [0] Message,
+probe [2] Probe,
+report [1] Report
+}
+
+Message ::= SEQUENCE {envelope  MessageTransferEnvelope,
+                      content   Content
+}
+
+Probe ::= ProbeTransferEnvelope
+
+Report ::= SEQUENCE {
+  envelope  ReportTransferEnvelope,
+  content   ReportTransferContent
+}
+
+--     Message Transfer Envelope
+MessageTransferEnvelope ::= SET {
+--  COMPONENTS OF PerMessageTransferFields,
+--  per-recipient-fields
+--    [2]  SEQUENCE SIZE (1..ub-recipients) OF PerRecipientMessageTransferFields
+--}
+
+--PerMessageTransferFields ::= SET {
+  message-identifier                  MessageIdentifier,
+  originator-name                     MTAOriginatorName,
+  original-encoded-information-types  OriginalEncodedInformationTypes OPTIONAL,
+  content-type                        ContentType,
+-- asn2eth seems to have a problem with untagged choices - so we will expand 'in situ' for now
+-- it's not the greatest solution - but should be OK
+--  built-in-content-type                      BuiltInContentType OPTIONAL,
+--  extended-content-type                      ExtendedContentType OPTIONAL,
+-- end of workaround
+  content-identifier                  ContentIdentifier OPTIONAL,
+  priority                            Priority DEFAULT normal,
+  per-message-indicators              PerMessageIndicators DEFAULT {},
+  deferred-delivery-time              [0]  DeferredDeliveryTime OPTIONAL,
+  per-domain-bilateral-information
+    [1]  SEQUENCE -- SIZE (1..ub-transfers) -- OF PerDomainBilateralInformation
+      OPTIONAL,
+  trace-information                   TraceInformation,
+  extensions
+    [3]  SET OF ExtensionField --{{MessageTransferExtensions}}-- DEFAULT {}
+  ,per-recipient-fields
+    [2]  SEQUENCE --SIZE  (1..ub-recipients) -- OF PerRecipientMessageTransferFields
+}
+
+--MessageTransferExtensions EXTENSION ::=
+  --{- - May contain the following extensions, private extensions, and future standardised extensions,
+   -- at most one instance of each extension type:
+--   recipient-reassignment-prohibited | dl-expansion-prohibited |
+--   conversion-with-loss-prohibited | latest-delivery-time |
+--   originator-return-address | originator-certificate |
+--   content-confidentiality-algorithm-identifier |
+--   message-origin-authentication-check | message-security-label |
+--   content-correlator | dl-exempted-recipients | certificate-selectors |
+--   multiple-originator-certificates | dl-expansion-history |
+--   internal-trace-information | PrivateExtensions, ...}
+
+PerRecipientMessageTransferFields ::= SET {
+  recipient-name                         MTARecipientName,
+  originally-specified-recipient-number
+    [0]  OriginallySpecifiedRecipientNumber,
+  per-recipient-indicators               [1]  PerRecipientIndicators,
+  explicit-conversion                    [2]  ExplicitConversion OPTIONAL,
+  extensions
+    [3]  SET OF ExtensionField --{{PerRecipientMessageTransferExtensions}}
+      DEFAULT {}
+}
+
+--PerRecipientMessageTransferExtensions EXTENSION ::=
+--  {- - May contain the following extensions, private extensions, and future standardised extensions,
+   -- at most one instance of each extension type:
+--   originator-requested-alternate-recipient | requested-delivery-method |
+--   physical-forwarding-prohibited | physical-forwarding-address-request |
+--   physical-delivery-modes | registered-mail-type | recipient-number-for-advice
+--   | physical-rendition-attributes | physical-delivery-report-request |
+--   message-token | content-integrity-check | proof-of-delivery-request |
+--   certificate-selectors-override | recipient-certificate | redirection-history
+--   | IPMPerRecipientEnvelopeExtensions | PrivateExtensions, ...}
+
+--     Probe Transfer Envelope
+ProbeTransferEnvelope ::= SET {
+--  COMPONENTS OF PerProbeTransferFields,
+--  per-recipient-fields
+--    [2]  SEQUENCE SIZE (1..ub-recipients) OF PerRecipientProbeTransferFields
+--}
+
+--PerProbeTransferFields ::= SET {
+  probe-identifier                    ProbeIdentifier,
+  originator-name                     MTAOriginatorName,
+  original-encoded-information-types  OriginalEncodedInformationTypes OPTIONAL,
+  content-type                        ContentType,
+  content-identifier                  ContentIdentifier OPTIONAL,
+  content-length                      [0]  ContentLength OPTIONAL,
+  per-message-indicators              PerMessageIndicators DEFAULT {},
+  per-domain-bilateral-information
+    [1]  SEQUENCE -- SIZE (1..ub-transfers) -- OF PerDomainBilateralInformation
+      OPTIONAL,
+  trace-information                   TraceInformation,
+  extensions
+    [3]  SET OF ExtensionField --{{ProbeTransferExtensions}}-- DEFAULT {}
+  ,per-recipient-fields
+    [2]  SEQUENCE -- SIZE (1..ub-recipients) -- OF PerRecipientProbeTransferFields
+}
+
+--ProbeTransferExtensions EXTENSION ::=
+--  {- - May contain the following extensions, private extensions, and future standardised extensions,
+   -- at most one instance of each extension type:
+--   recipient-reassignment-prohibited | dl-expansion-prohibited |
+--   conversion-with-loss-prohibited | originator-certificate |
+--   message-security-label | content-correlator |
+--   probe-origin-authentication-check | internal-trace-information |
+--   PrivateExtensions, ...}
+
+PerRecipientProbeTransferFields ::= SET {
+  recipient-name                         MTARecipientName,
+  originally-specified-recipient-number
+    [0]  OriginallySpecifiedRecipientNumber,
+  per-recipient-indicators               [1]  PerRecipientIndicators,
+  explicit-conversion                    [2]  ExplicitConversion OPTIONAL,
+  extensions
+    [3]  SET OF ExtensionField --{{PerRecipientProbeTransferExtensions}}
+      DEFAULT {}
+}
+
+--PerRecipientProbeTransferExtensions EXTENSION ::=
+--  {- - May contain the following extensions, private extensions, and future standardised extensions,
+   -- at most one instance of each extension type:
+--   originator-requested-alternate-recipient | requested-delivery-method |
+--   physical-rendition-attributes | redirection-history | PrivateExtensions, 
+--   ...}
+
+--     Report Transfer Envelope
+ReportTransferEnvelope ::= SET {
+  report-identifier        ReportIdentifier,
+  report-destination-name  ReportDestinationName,
+  trace-information        TraceInformation,
+  extensions
+    [1]  SET OF ExtensionField --{{ReportTransferEnvelopeExtensions}}-- DEFAULT {}
+}
+
+--ReportTransferEnvelopeExtensions EXTENSION ::=
+--  {- - May contain the following extensions, private extensions, and future standardised extensions,
+   -- at most one instance of each extension type:
+--   message-security-label | redirection-history |
+--   originator-and-DL-expansion-history | reporting-DL-name |
+--   reporting-MTA-certificate | report-origin-authentication-check |
+--   internal-trace-information | reporting-MTA-name | PrivateExtensions, 
+--   ...}
+
+--     Report Transfer Content
+ReportTransferContent ::= SET {
+--  COMPONENTS OF PerReportTransferFields,
+--  per-recipient-fields
+--    [0]  SEQUENCE SIZE (1..ub-recipients) OF PerRecipientReportTransferFields
+--}
+
+--PerReportTransferFields ::= SET {
+  subject-identifier                      SubjectIdentifier,
+  subject-intermediate-trace-information
+    SubjectIntermediateTraceInformation OPTIONAL,
+  original-encoded-information-types
+    OriginalEncodedInformationTypes OPTIONAL,
+  content-type                            ContentType OPTIONAL,
+  content-identifier                      ContentIdentifier OPTIONAL,
+  returned-content                        [1]  Content OPTIONAL,
+  additional-information                  [2]  AdditionalInformation OPTIONAL,
+  extensions
+    [3]  SET OF ExtensionField --{{ReportTransferContentExtensions}}-- DEFAULT {}
+  ,per-recipient-fields
+    [0]  SEQUENCE -- SIZE (1..ub-recipients) -- OF PerRecipientReportTransferFields
+}
+
+--ReportTransferContentExtensions EXTENSION ::=
+--  {- - May contain the following extensions, private extensions, and future standardised extensions,
+   -- at most one instance of each extension type:
+--   content-correlator | PrivateExtensions, ...}
+
+PerRecipientReportTransferFields ::= SET {
+  actual-recipient-name                  [0]  MTAActualRecipientName,
+  originally-specified-recipient-number
+    [1]  OriginallySpecifiedRecipientNumber,
+  per-recipient-indicators               [2]  PerRecipientIndicators,
+  last-trace-information                 [3]  LastTraceInformation,
+  originally-intended-recipient-name
+    [4]  MTAOriginallyIntendedRecipientName OPTIONAL,
+  supplementary-information              [5]  SupplementaryInformation OPTIONAL,
+  extensions
+    [6]  SET OF ExtensionField --{{PerRecipientReportTransferExtensions}}
+      DEFAULT {}
+}
+
+--PerRecipientReportTransferExtensions EXTENSION ::=
+--  {- - May contain the following extensions, private extensions, and future standardised extensions,
+   -- at most one instance of each extension type:
+--   redirection-history | physical-forwarding-address | recipient-certificate |
+--   proof-of-delivery | PrivateExtensions, ...}
+
+--     Envelope & Report Content Fields
+MessageIdentifier ::= MTSIdentifier
+
+MTAOriginatorName ::= ORAddressAndOptionalDirectoryName
+
+PerDomainBilateralInformation ::= SEQUENCE {
+--  COMPONENTS OF BILATERAL.&id,
+--  bilateral-information  BILATERAL.&Type
+--}
+
+--BILATERAL ::= CLASS {&id    BilateralDomain UNIQUE,
+--                     &Type  
+--}WITH SYNTAX {&Type,
+--              IDENTIFIED BY &id
+--}
+
+--BilateralDomain ::= SEQUENCE {
+  country-name  CountryName,
+  domain
+    CHOICE {administration-domain-name  AdministrationDomainName,
+            private-domain
+              SEQUENCE {administration-domain-name
+                          [0]  AdministrationDomainName,
+                        private-domain-identifier
+                          [1]  PrivateDomainIdentifier}}
+}
+
+MTARecipientName ::= ORAddressAndOptionalDirectoryName
+
+OriginallySpecifiedRecipientNumber ::= INTEGER --(1..ub-recipients)
+
+PerRecipientIndicators ::= BIT STRING {
+  responsibility(0),
+  -- responsible 'one', not-responsible 'zero'
+  originating-MTA-report(1),
+  originating-MTA-non-delivery-report(2),
+  -- either originating-MTA-report, or originating-MTA-non-delivery-report,
+  -- or both, shall be 'one':
+  -- originating-MTA-report bit 'one' requests a 'report';
+  -- originating-MTA-non-delivery-report bit 'one' requests a 'non-delivery-report';
+  -- both bits 'one' requests an 'audited-report';
+  -- bits 0 - 2 'don't care' for Report Transfer Content
+  originator-report(3),
+  originator-non-delivery-report(4),
+  -- at most one bit shall be 'one':
+  -- originator-report bit 'one' requests a 'report';
+  -- originator-non-delivery-report bit 'one' requests a 'non-delivery-report';
+  -- both bits 'zero' requests 'no-report'
+  reserved-5(5), reserved-6(6), reserved-7(7)
+                                
+-- reserved- bits 5 - 7 shall be 'zero' --}--(SIZE (8..ub-bit-options))
+
+ProbeIdentifier ::= MTSIdentifier
+
+ReportIdentifier ::= MTSIdentifier
+
+ReportDestinationName ::= ORAddressAndOptionalDirectoryName
+
+SubjectIdentifier ::= MessageOrProbeIdentifier
+
+MessageOrProbeIdentifier ::= MTSIdentifier
+
+SubjectIntermediateTraceInformation ::= TraceInformation
+
+--     AdditionalInformation is retained for backwards compatibility only, 
+--     and use in new systems is strongly deprecated
+--ADDITIONAL ::= CLASS {&Type  
+--}
+
+AdditionalInformation ::=
+  ANY --ADDITIONAL.&Type - - maximum ub-additional-info octets including all encoding
+
+MTAActualRecipientName ::= ORAddressAndOptionalDirectoryName
+
+LastTraceInformation ::= SET {
+  arrival-time                         [0]  ArrivalTime,
+  converted-encoded-information-types
+    ConvertedEncodedInformationTypes OPTIONAL,
+  report-type                          [1]  ReportType
+}
+
+MTAOriginallyIntendedRecipientName ::= ORAddressAndOptionalDirectoryName
+
+--     Extension Fields
+--originator-requested-alternate-recipient EXTENSION ::= {
+--  OriginatorRequestedAlternateRecipient,
+--  IDENTIFIED BY  standard-extension:2
+--}
+
+MTAOriginatorRequestedAlternateRecipient ::= ORAddressAndOptionalDirectoryName
+
+--trace-information EXTENSION ::= {
+--  TraceInformation,
+--  IDENTIFIED BY  standard-extension:37
+--}
+
+--internal-trace-information EXTENSION ::= {
+--  InternalTraceInformation,
+--  IDENTIFIED BY  standard-extension:38
+--}
+
+InternalTraceInformation ::=
+  SEQUENCE -- SIZE (1..ub-transfers)-- OF InternalTraceInformationElement
+
+InternalTraceInformationElement ::= SEQUENCE {
+  global-domain-identifier  GlobalDomainIdentifier,
+  mta-name                  MTAName,
+  mta-supplied-information  MTASuppliedInformation
+}
+
+MTASuppliedInformation ::= SET {
+  arrival-time    [0]  ArrivalTime,
+  routing-action  [2]  RoutingAction,
+  attempted       CHOICE {mta     MTAName,
+                          domain  GlobalDomainIdentifier} OPTIONAL,
+  -- additional-actions - -COMPONENTS OF InternalAdditionalActions
+  deferred-time                        [1]  DeferredTime OPTIONAL,
+  converted-encoded-information-types
+    ConvertedEncodedInformationTypes OPTIONAL,
+  other-actions                        [3]  OtherActions DEFAULT {}
+}
+
+--InternalAdditionalActions ::= AdditionalActions
+
+--     Common Parameter Types
+TraceInformation ::=
+  [APPLICATION 9]  SEQUENCE -- SIZE (1..ub-transfers) -- OF TraceInformationElement
+
+TraceInformationElement ::= SEQUENCE {
+  global-domain-identifier     GlobalDomainIdentifier,
+  domain-supplied-information  DomainSuppliedInformation
+}
+
+DomainSuppliedInformation ::= SET {
+  arrival-time      [0]  ArrivalTime,
+  routing-action    [2]  RoutingAction,
+  attempted-domain  GlobalDomainIdentifier OPTIONAL,
+  -- additional-actions - -COMPONENTS OF AdditionalActions
+--}
+
+--AdditionalActions ::= SET {
+  deferred-time                        [1]  DeferredTime OPTIONAL,
+  converted-encoded-information-types
+    ConvertedEncodedInformationTypes OPTIONAL,
+  other-actions                        [3]  OtherActions DEFAULT {}
+}
+
+RoutingAction ::= ENUMERATED {relayed(0), rerouted(1)}
+
+DeferredTime ::= Time
+
+ArrivalTime ::= Time
+
+OtherActions ::= BIT STRING {redirected(0), dl-operation(1)
+}--(SIZE (0..ub-bit-options))--
+
+-- END - - of MTA Abstract Service
+
+-- Generated by Asnp, the ASN.1 pretty-printer of France Telecom R&D
+
+-- Module MTSAbstractService (X.411:06/1999)
+--MTSAbstractService {joint-iso-itu-t mhs(6) mts(3) modules(0)
+--  mts-abstract-service(1) version-1999(1)} DEFINITIONS IMPLICIT TAGS ::=
+--BEGIN
+
+--     Prologue
+--     Exports everything
+--IMPORTS
+  -- Remote Operations
+--  CONNECTION-PACKAGE, CONTRACT, ERROR, OPERATION, OPERATION-PACKAGE,
+--    ROS-OBJECT-CLASS
+    --==
+--    FROM Remote-Operations-Information-Objects {joint-iso-itu-t
+--      remote-operations(4) informationObjects(5) version1(0)}
+--  emptyUnbind
+    --==
+--    FROM Remote-Operations-Useful-Definitions {joint-iso-itu-t
+--      remote-operations(4) useful-definitions(7) version1(0)}
+  -- MTA Abstract Service
+--  internal-trace-information, trace-information
+    --==
+--    FROM MTAAbstractService {joint-iso-itu-t mhs(6) mts(3) modules(0)
+--      mta-abstract-service(2) version-1999(1)}
+  -- MS Abstract Service Extension
+--  forwarding-request
+    --==
+--    FROM MSAbstractService {joint-iso-itu-t mhs(6) ms(4) modules(0)
+--      abstract-service(1) version-1999(1)}
+  -- IPM Information Objects
+--  IPMPerRecipientEnvelopeExtensions
+    --==
+--    FROM IPMSInformationObjects {joint-iso-itu-t mhs(6) ipms(1) modules(0)
+--      information-objects(2) version-1999(1)}
+  -- Object Identifiers
+--  id-att-physicalRendition-basic, id-cp-mts-connect, id-ct-mts-access,
+--    id-ct-mts-forced-access, id-ot-mts, id-ot-mts-user, id-pt-administration,
+--    id-pt-delivery, id-pt-submission, id-tok-asymmetricToken
+    --==
+--    FROM MTSObjectIdentifiers {joint-iso-itu-t mhs(6) mts(3) modules(0)
+--      object-identifiers(0) version-1999(1)}
+  -- Operation and Error Codes
+--  err-control-violates-registration,
+--    err-deferred-delivery-cancellation-rejected, err-delivery-control-violated,
+--    err-element-of-service-not-subscribed, err-inconsistent-request,
+--    err-message-submission-identifier-invalid,
+--    err-new-credentials-unacceptable,
+--    err-old-credentials-incorrectly-specified, err-operation-refused,
+--    err-originator-invalid, err-recipient-improperly-specified,
+--    err-register-rejected, err-remote-bind-error, err-security-error,
+--    err-submission-control-violated, err-unsupported-critical-function,
+--    op-cancel-deferred-delivery, op-change-credentials, op-delivery-control,
+--    op-message-delivery, op-message-submission, op-probe-submission,
+--    op-register, op-report-delivery, op-submission-control
+    --==
+--    FROM MTSAccessProtocol {joint-iso-itu-t mhs(6) protocols(0) modules(0)
+--      mts-access-protocol(1) version-1999(1)}
+  -- Directory Definitions
+--  Name
+    --==
+--    FROM InformationFramework {joint-iso-itu-t ds(5) module(1)
+--      informationFramework(1) 3}
+--  PresentationAddress
+    --==
+--    FROM SelectedAttributeTypes {joint-iso-itu-t ds(5) module(1)
+--      selectedAttributeTypes(5) 3}
+--  ALGORITHM, AlgorithmIdentifier, Certificates, ENCRYPTED{}, SIGNATURE{},
+--    SIGNED{}
+    --==
+--    FROM AuthenticationFramework {joint-iso-itu-t ds(5) module(1)
+--      authenticationFramework(7) 3}
+  -- Certificate Extensions
+--  CertificateAssertion
+    --==
+--    FROM CertificateExtensions {joint-iso-itu-t ds(5) module(1)
+--      certificateExtensions(26) 0}
+  -- Upper Bounds
+--  ub-bit-options, ub-built-in-content-type,
+--    ub-built-in-encoded-information-types, ub-certificates,
+--    ub-common-name-length, ub-content-id-length, ub-content-length,
+--    ub-content-types, ub-country-name-alpha-length,
+--    ub-country-name-numeric-length, ub-deliverable-class, ub-diagnostic-codes,
+--    ub-dl-expansions, ub-domain-defined-attributes,
+--    ub-domain-defined-attribute-type-length,
+--    ub-domain-defined-attribute-value-length, ub-domain-name-length,
+--    ub-encoded-information-types, ub-extension-attributes, ub-extension-types,
+--    ub-e163-4-number-length, ub-e163-4-sub-address-length,
+--    ub-generation-qualifier-length, ub-given-name-length, ub-initials-length,
+--    ub-integer-options, ub-local-id-length, ub-mta-name-length,
+--    ub-mts-user-types, ub-numeric-user-id-length, ub-organization-name-length,
+--    ub-organizational-units, ub-organizational-unit-name-length,
+--    ub-orig-and-dl-expansions, ub-password-length, ub-pds-name-length,
+--    ub-pds-parameter-length, ub-pds-physical-address-lines,
+--    ub-postal-code-length, ub-privacy-mark-length, ub-queue-size,
+--    ub-reason-codes, ub-recipients, ub-recipient-number-for-advice-length,
+--    ub-redirections, ub-redirection-classes, ub-restrictions,
+--    ub-security-categories, ub-security-labels, ub-security-problems,
+--    ub-supplementary-info-length, ub-surname-length, ub-terminal-id-length,
+--    ub-tsap-id-length, ub-unformatted-address-length,
+--    ub-universal-generation-qualifier-length, ub-universal-given-name-length,
+--    ub-universal-initials-length, ub-universal-surname-length,
+--    ub-x121-address-length
+    --==
+--    FROM MTSUpperBounds {joint-iso-itu-t mhs(6) mts(3) modules(0)
+--      upper-bounds(3) version-1999(1)};
+
+--operationObject1 OPERATION ::= {LINKED  {operationObject2}
+--}
+
+--operationObject2 OPERATION ::= {LINKED  {operationObject3}
+--}
+
+--operationObject3 OPERATION ::= {LINKED  {operationObject4}
+--}
+
+--operationObject4 OPERATION ::= {LINKED  {...}
+--}
+
+--     Objects
+--MHS-OBJECT ::= ROS-OBJECT-CLASS
+
+--mts MHS-OBJECT ::= {
+--  INITIATES  {mts-forced-access-contract}
+--  RESPONDS   {mts-access-contract}
+--  ID         id-ot-mts
+--}
+
+--mts-user MHS-OBJECT ::= {
+--  INITIATES  {mts-access-contract}
+--  RESPONDS   {mts-forced-access-contract}
+--  ID         id-ot-mts-user
+--}
+
+-- Contracts
+--mts-access-contract CONTRACT ::= {
+--  CONNECTION             mts-connect
+--  INITIATOR CONSUMER OF  {submission | delivery | administration}
+--  ID                     id-ct-mts-access
+--}
+
+--mts-forced-access-contract CONTRACT ::= {
+--  CONNECTION             mts-connect
+--  RESPONDER CONSUMER OF  {submission | delivery | administration}
+--  ID                     id-ct-mts-forced-access
+--}
+
+-- Connection package
+--mts-connect CONNECTION-PACKAGE ::= {
+--  BIND    mts-bind
+--  UNBIND  mts-unbind
+--  ID      id-cp-mts-connect
+--}
+
+--     Ports
+--PORT ::= OPERATION-PACKAGE
+
+--submission PORT ::= {
+--  OPERATIONS        {operationObject1, ...}
+--  CONSUMER INVOKES
+--    {message-submission | probe-submission | cancel-deferred-delivery, ...}
+--  SUPPLIER INVOKES  {submission-control, ...}
+--  ID                id-pt-submission
+--}
+
+--delivery PORT ::= {
+--  OPERATIONS        {operationObject1, ...}
+--  CONSUMER INVOKES  {delivery-control, ...}
+--  SUPPLIER INVOKES  {message-delivery | report-delivery, ...}
+--  ID                id-pt-delivery
+--}
+
+--administration PORT ::= {
+--  OPERATIONS        {change-credentials, ...}
+--  CONSUMER INVOKES  {register, ...}
+--  SUPPLIER INVOKES  {operationObject1, ...}
+--  ID                id-pt-administration
+--}
+
+--     MTS-bind and MTS-unbind
+--ABSTRACT-OPERATION ::= OPERATION
+
+--ABSTRACT-ERROR ::= ERROR
+
+--mts-bind ABSTRACT-OPERATION ::= {
+--  ARGUMENT  MTSBindArgument
+--  RESULT    MTSBindResult
+--  ERRORS    {mts-bind-error}
+--}
+
+MTSBindArgument ::= SET {
+  initiator-name         ObjectName,
+  messages-waiting       [1] EXPLICIT MessagesWaiting OPTIONAL,
+  initiator-credentials  [2]  InitiatorCredentials,
+  security-context       [3]  SecurityContext OPTIONAL,
+--  ...,
+  extensions
+    [5]  SET OF ExtensionField --{{MTSBindExtensions}}-- DEFAULT {}
+}
+
+--MTSBindExtensions EXTENSION ::= {PrivateExtensions, ...}
+
+-- May contain private extensions and future standardised extensions
+MTSBindResult ::= SET {
+  responder-name         ObjectName,
+  messages-waiting       [1] EXPLICIT MessagesWaiting OPTIONAL,
+  responder-credentials  [2]  ResponderCredentials,
+  ...,
+  extensions
+    [5]  SET OF ExtensionField --{{MTSBindResultExtensions}}-- DEFAULT {}
+}
+
+--MTSBindResultExtensions EXTENSION ::= {PrivateExtensions, ...}
+
+-- May contain private extensions and future standardised extensions
+MTSBindError --mts-bind-error ABSTRACT-ERROR-- ::= --{
+--  PARAMETER
+    INTEGER {busy(0), authentication-error(2), unacceptable-dialogue-mode(3),
+             unacceptable-security-context(4),
+             inadequate-association-confidentiality(5)}--(0..ub-integer-options)
+--}
+
+--mts-unbind ABSTRACT-OPERATION ::= emptyUnbind
+
+--     Association Control Parameters
+ObjectName ::= CHOICE {
+  user-agent     ORAddressAndOptionalDirectoryName,
+  mTA            [0]  MTAName,
+  message-store  [4]  ORAddressAndOptionalDirectoryName
+}
+
+MessagesWaiting ::= SET {
+  urgent      [0]  DeliveryQueue,
+  normal      [1]  DeliveryQueue,
+  non-urgent  [2]  DeliveryQueue
+}
+
+DeliveryQueue ::= SET {
+  messages  [0]  INTEGER --(0..ub-queue-size)--,
+  octets    [1]  INTEGER --(0..ub-content-length)-- OPTIONAL
+}
+
+InitiatorCredentials ::= Credentials
+
+ResponderCredentials ::= Credentials
+
+Credentials ::= CHOICE {
+  simple     Password
+--  strong     [0]  StrongCredentials,
+--  ...,
+--  protected  [1]  ProtectedPassword
+}
+
+Password ::= CHOICE {
+  ia5-string    IA5String --(SIZE (0..ub-password-length))--,
+  octet-string  OCTET STRING --(SIZE (0..ub-password-length))
+}
+
+--StrongCredentials ::= SET {
+--  bind-token               [0]  Token OPTIONAL,
+--  certificate              [1]  Certificates OPTIONAL,
+--  ...,
+--  certificate-selector     [2]  CertificateAssertion OPTIONAL
+--}
+
+--ProtectedPassword ::= SET {
+--  signature
+--    SIGNATURE{SET {password  Password,
+--                   time1     [0]  UTCTime OPTIONAL,
+--                   time2     [1]  UTCTime OPTIONAL,
+--                   random1   [2]  BIT STRING OPTIONAL,
+--                   random2   [3]  BIT STRING OPTIONAL}},
+--  time1      [0]  UTCTime OPTIONAL,
+--  time2      [1]  UTCTime OPTIONAL,
+--  random1    [2]  BIT STRING OPTIONAL,
+--  random2    [3]  BIT STRING OPTIONAL
+--}
+
+SecurityContext ::= SET --SIZE (1..ub-security-labels)-- OF SecurityLabel
+
+--     Submission Port
+--message-submission ABSTRACT-OPERATION ::= {
+--  ARGUMENT         MessageSubmissionArgument
+--  RESULT           MessageSubmissionResult
+--  ERRORS
+--    {submission-control-violated | element-of-service-not-subscribed |
+--      originator-invalid | recipient-improperly-specified |
+--      inconsistent-request | security-error | unsupported-critical-function |
+--      remote-bind-error}
+--  LINKED           {operationObject1, ...}
+--  INVOKE PRIORITY  {4 | 6 | 7}
+--  CODE             op-message-submission
+--}
+
+MessageSubmissionArgument ::= SEQUENCE {
+  envelope  MessageSubmissionEnvelope,
+  content   Content
+}
+
+MessageSubmissionResult ::= SET {
+  message-submission-identifier  MessageSubmissionIdentifier,
+  message-submission-time        [0]  MessageSubmissionTime,
+  content-identifier             ContentIdentifier OPTIONAL,
+  extensions
+    [1]  SET OF ExtensionField --{{MessageSubmissionResultExtensions}}-- DEFAULT {}
+}
+
+--MessageSubmissionResultExtensions EXTENSION ::=
+--  {- - May contain the following extensions, private extensions, and future standardised extensions,
+--   - - at most one instance of each extension type:
+--   originating-MTA-certificate | proof-of-submission | PrivateExtensions, 
+--   ...}
+
+--probe-submission ABSTRACT-OPERATION ::= {
+--  ARGUMENT         ProbeSubmissionArgument
+--  RESULT           ProbeSubmissionResult
+--  ERRORS
+--    {submission-control-violated | element-of-service-not-subscribed |
+--      originator-invalid | recipient-improperly-specified |
+--      inconsistent-request | security-error | unsupported-critical-function |
+--      remote-bind-error}
+--  LINKED           {operationObject1, ...}
+--  INVOKE PRIORITY  {5}
+--  CODE             op-probe-submission
+--}
+
+ProbeSubmissionArgument ::= ProbeSubmissionEnvelope
+
+ProbeSubmissionResult ::= SET {
+  probe-submission-identifier  ProbeSubmissionIdentifier,
+  probe-submission-time        [0]  ProbeSubmissionTime,
+  content-identifier           ContentIdentifier OPTIONAL,
+  extensions
+    [1]  SET OF ExtensionField --{{ProbeResultExtensions}}-- DEFAULT {}
+}
+
+--ProbeResultExtensions EXTENSION ::= {PrivateExtensions, ...}
+
+-- May contain private extensions and future standardised extensions,
+-- at most one instance of each extension type
+--cancel-deferred-delivery ABSTRACT-OPERATION ::= {
+--  ARGUMENT         CancelDeferredDeliveryArgument
+--  RESULT           CancelDeferredDeliveryResult
+--  ERRORS
+--    {deferred-delivery-cancellation-rejected |
+--      message-submission-identifier-invalid | remote-bind-error}
+--  LINKED           {operationObject1, ...}
+--  INVOKE PRIORITY  {3}
+--  CODE             op-cancel-deferred-delivery
+--}
+
+CancelDeferredDeliveryArgument ::= MessageSubmissionIdentifier
+
+CancelDeferredDeliveryResult ::= NULL
+
+--submission-control ABSTRACT-OPERATION ::= {
+--  ARGUMENT         SubmissionControlArgument
+--  RESULT           SubmissionControlResult
+--  ERRORS           {security-error | remote-bind-error}
+--  LINKED           {operationObject1, ...}
+--  INVOKE PRIORITY  {3}
+--  CODE             op-submission-control
+--}
+
+SubmissionControlArgument ::= SubmissionControls
+
+SubmissionControlResult ::= Waiting
+
+--submission-control-violated ABSTRACT-ERROR ::= {
+--  PARAMETER  NULL
+--  CODE       err-submission-control-violated
+--}
+
+--element-of-service-not-subscribed ABSTRACT-ERROR ::= {
+--  PARAMETER  NULL
+--  CODE       err-element-of-service-not-subscribed
+--}
+
+--deferred-delivery-cancellation-rejected ABSTRACT-ERROR ::= {
+--  PARAMETER  NULL
+--  CODE       err-deferred-delivery-cancellation-rejected
+--}
+
+--originator-invalid ABSTRACT-ERROR ::= {
+--  PARAMETER  NULL
+--  CODE       err-originator-invalid
+--}
+
+--recipient-improperly-specified ABSTRACT-ERROR ::= {
+--  PARAMETER  ImproperlySpecifiedRecipients
+--  CODE       err-recipient-improperly-specified
+--}
+
+ImproperlySpecifiedRecipients ::=
+  SEQUENCE --SIZE (1..ub-recipients)-- OF MTSRecipientName
+
+--message-submission-identifier-invalid ABSTRACT-ERROR ::= {
+--  PARAMETER  NULL
+--  CODE       err-message-submission-identifier-invalid
+--}
+
+--inconsistent-request ABSTRACT-ERROR ::= {
+--  PARAMETER  NULL
+--  CODE       err-inconsistent-request
+--}
+
+--security-error ABSTRACT-ERROR ::= {
+--  PARAMETER  SecurityProblem
+--  CODE       err-security-error
+--}
+
+SecurityProblem ::= INTEGER {
+  assemby-instructions-conflict-with-security-services(0),
+  authentication-problem(1), authentication-failure-on-subject-message(2),
+  confidentiality-association-problem(3), decryption-failed(4),
+  decryption-key-unobtainable(5), failure-of-proof-of-message(6),
+  forbidden-user-security-label-register(7),
+  incompatible-change-with-original-security-context(8),
+  integrity-failure-on-subject-message(9), invalid-security-label(10),
+  invalid-security-label-update(11), key-failure(12),
+  mandatory-parameter-absence(13), operation-security-failure(14),
+  redirection-prohibited(15), refused-alternate-recipient-name(16),
+  repudiation-failure-of-message(17),
+  responder-credentials-checking-problem(18), security-context-failure(19),
+  security-context-problem(20), security-policy-violation(21),
+  security-services-refusal(22), token-decryption-failed(23), token-error(24),
+  unable-to-aggregate-security-labels(25), unauthorised-dl-name(26),
+  unauthorised-entry-class(27),
+  unauthorised-originally-intended-recipient-name(28),
+  unauthorised-originator-name(29), unauthorised-recipient-name(30),
+  unauthorised-security-label-update(31), unauthorised-user-name(32),
+  unknown-security-label(33), unsupported-algorithm-identifier(34),
+  unsupported-security-policy(35)}(0..ub-security-problems)
+
+--unsupported-critical-function ABSTRACT-ERROR ::= {
+--  PARAMETER  NULL
+--  CODE       err-unsupported-critical-function
+--}
+
+--remote-bind-error ABSTRACT-ERROR ::= {
+--  PARAMETER  NULL
+--  CODE       err-remote-bind-error
+--}
+
+--     Submission Port Parameters
+MessageSubmissionIdentifier ::= MTSIdentifier
+
+MessageSubmissionTime ::= Time
+
+ProbeSubmissionIdentifier ::= MTSIdentifier
+
+ProbeSubmissionTime ::= Time
+
+SubmissionControls ::=
+  Controls
+    (WITH COMPONENTS {
+       ...,
+       permissible-content-types              ABSENT,
+       permissible-encoded-information-types  ABSENT
+     })
+
+Waiting ::= SET {
+  waiting-operations                 [0]  Operations DEFAULT {},
+  waiting-messages                   [1]  WaitingMessages DEFAULT {},
+  waiting-content-types
+    [2]  SET --SIZE (0..ub-content-types)-- OF ContentType DEFAULT {},
+  waiting-encoded-information-types  EncodedInformationTypes OPTIONAL
+}
+
+Operations ::= BIT STRING {
+  probe-submission-or-report-delivery(0),
+  message-submission-or-message-delivery(1)}(SIZE (0..ub-bit-options))
+
+-- holding 'one', not-holding 'zero'
+WaitingMessages ::= BIT STRING {
+  long-content(0), low-priority(1), other-security-labels(2)
+}(SIZE (0..ub-bit-options))
+
+--     Delivery Port
+--message-delivery ABSTRACT-OPERATION ::= {
+--  ARGUMENT         MessageDeliveryArgument
+--  RESULT           MessageDeliveryResult
+--  ERRORS
+--    {delivery-control-violated | security-error |
+--      unsupported-critical-function}
+--  LINKED           {operationObject1, ...}
+--  INVOKE PRIORITY  {4 | 6 | 7}
+--  CODE             op-message-delivery
+--}
+
+MessageDeliveryArgument ::= SEQUENCE {
+--  COMPONENTS OF MessageDeliveryEnvelope,
+  message-delivery-identifier  MessageDeliveryIdentifier,
+  message-delivery-time        MessageDeliveryTime,
+  other-fields                 OtherMessageDeliveryFields,
+  content  Content
+}
+
+MessageDeliveryResult ::= SET {
+  recipient-certificate  [0]  RecipientCertificate OPTIONAL,
+--  proof-of-delivery      [1] IMPLICIT ProofOfDelivery OPTIONAL,
+  ...,
+  extensions
+    [2]  SET OF ExtensionField --{{MessageDeliveryResultExtensions}}-- DEFAULT {}
+}
+
+--MessageDeliveryResultExtensions EXTENSION ::= {PrivateExtensions, ...}
+
+-- May contain private extensions and future standardised extensions
+--report-delivery ABSTRACT-OPERATION ::= {
+--  ARGUMENT         ReportDeliveryArgument
+--  RESULT           ReportDeliveryResult
+--  ERRORS
+--    {delivery-control-violated | security-error |
+--      unsupported-critical-function}
+--  LINKED           {operationObject1, ...}
+--  INVOKE PRIORITY  {5}
+--  CODE             op-report-delivery
+--}
+
+ReportDeliveryArgument ::= SET {
+--  COMPONENTS OF ReportDeliveryEnvelope
+  subject-submission-identifier       SubjectSubmissionIdentifier,
+  content-identifier                  ContentIdentifier OPTIONAL,
+  content-type                        ContentType OPTIONAL,
+  original-encoded-information-types  OriginalEncodedInformationTypes OPTIONAL,
+  extensions
+    [1]  SET OF ExtensionField --{{ReportDeliveryExtensions}}-- DEFAULT {},
+  per-recipient-fields
+    SEQUENCE --SIZE (1..ub-recipients)-- OF PerRecipientReportDeliveryFields,
+  returned-content  [0]  Content OPTIONAL
+}
+
+ReportDeliveryResult ::= CHOICE {
+  empty-result  NULL,
+  ...,
+  extensions
+    SET --SIZE (1..MAX)-- OF ExtensionField --{{ReportDeliveryResultExtensions}}--
+}
+
+--ReportDeliveryResultExtensions EXTENSION ::= {PrivateExtensions, ...}
+
+-- May contain private extensions and future standardised extensions
+--delivery-control ABSTRACT-OPERATION ::= {
+--  ARGUMENT         DeliveryControlArgument
+--  RESULT           DeliveryControlResult
+--  ERRORS
+--    {control-violates-registration | security-error | operation-refused}
+--  LINKED           {operationObject1, ...}
+--  INVOKE PRIORITY  {3}
+--  CODE             op-delivery-control
+--}
+
+DeliveryControlArgument ::= SET {
+--  COMPONENTS OF DeliveryControls,
+  restrict                               [0]  BOOLEAN DEFAULT TRUE,
+  -- update 'TRUE', remove 'FALSE'
+  permissible-operations                 [1]  Operations OPTIONAL,
+  permissible-maximum-content-length     [2]  ContentLength OPTIONAL,
+  permissible-lowest-priority            Priority OPTIONAL,
+  permissible-content-types              [4]  ContentTypes OPTIONAL,
+  permissible-encoded-information-types
+    PermissibleEncodedInformationTypes OPTIONAL,
+  permissible-security-context           [5]  SecurityContext OPTIONAL,
+  extensions
+    [6]  SET OF ExtensionField --{{DeliveryControlExtensions}}-- DEFAULT {}
+}
+
+--DeliveryControlExtensions EXTENSION ::= {PrivateExtensions, ...}
+
+-- May contain private extensions and future standardised extensions
+DeliveryControlResult ::= SET {
+--  COMPONENTS OF Waiting,
+  waiting-operations                 [0]  Operations DEFAULT {},
+  waiting-messages                   [1]  WaitingMessages DEFAULT {},
+  waiting-content-types
+    [2]  SET --SIZE (0..ub-content-types)-- OF ContentType DEFAULT {},
+  waiting-encoded-information-types  EncodedInformationTypes OPTIONAL,
+  extensions
+    [6]  SET OF ExtensionField --{{DeliveryControlResultExtensions}}--  DEFAULT {}
+}
+
+--DeliveryControlResultExtensions EXTENSION ::= {PrivateExtensions, ...}
+
+-- May contain private extensions and future standardised extensions
+--delivery-control-violated ABSTRACT-ERROR ::= {
+--  PARAMETER  NULL
+--  CODE       err-delivery-control-violated
+--}
+
+--control-violates-registration ABSTRACT-ERROR ::= {
+--  PARAMETER  NULL
+--  CODE       err-control-violates-registration
+--}
+
+--operation-refused ABSTRACT-ERROR ::= {
+--  PARAMETER  RefusedOperation
+--  CODE       err-operation-refused
+--}
+
+RefusedOperation ::= SET {
+  refused-argument
+    CHOICE {built-in-argument  [1]  RefusedArgument,
+            refused-extension  ANY --EXTENSION.&id --},
+  refusal-reason    [2]  RefusalReason
+}
+
+RefusedArgument ::= INTEGER {
+  user-name(0), user-address(1), deliverable-content-types(2),
+  deliverable-maximum-content-length(3),
+  deliverable-encoded-information-types-constraints(4),
+  deliverable-security-labels(5), recipient-assigned-redirections(6),
+  restricted-delivery(7),
+  retrieve-registrations(8), -- value 9 reserved for possible future extension to Register arguments
+  restrict(10), permissible-operations(11), permissible-lowest-priority(12),
+  permissible-encoded-information-types(13), permissible-content-types(14),
+  permissible-maximum-content-length(15), permissible-security-context(16)
+}(0..ub-integer-options)
+
+RefusalReason ::= INTEGER {
+  facility-unavailable(0), facility-not-subscribed(1),
+  parameter-unacceptable(2)}(0..ub-integer-options)
+
+--     Delivery Port Parameters
+RecipientCertificate ::= Certificates
+
+--ProofOfDelivery ::=
+--  SIGNATURE
+--    {SEQUENCE {algorithm-identifier
+--                 ProofOfDeliveryAlgorithmIdentifier,
+--               delivery-time                       MessageDeliveryTime,
+--               this-recipient-name                 ThisRecipientName,
+--               originally-intended-recipient-name
+--                 MTSOriginallyIntendedRecipientName OPTIONAL,
+--               content                             Content,
+--               content-identifier                  ContentIdentifier OPTIONAL,
+--               message-security-label
+--                 MessageSecurityLabel OPTIONAL}}
+
+ProofOfDeliveryAlgorithmIdentifier ::= AlgorithmIdentifier
+
+DeliveryControls ::= Controls
+
+Controls ::= SET {
+  restrict                               [0]  BOOLEAN DEFAULT TRUE,
+  -- update 'TRUE', remove 'FALSE'
+  permissible-operations                 [1]  Operations OPTIONAL,
+  permissible-maximum-content-length     [2]  ContentLength OPTIONAL,
+  permissible-lowest-priority            Priority OPTIONAL,
+  permissible-content-types              [4]  ContentTypes OPTIONAL,
+  permissible-encoded-information-types
+    PermissibleEncodedInformationTypes OPTIONAL,
+  permissible-security-context           [5]  SecurityContext OPTIONAL
+}
+
+--     Note - The Tags [0], [1] and [2] are altered for the Register operation only.
+PermissibleEncodedInformationTypes ::=
+  EncodedInformationTypesConstraints
+
+--     Administration Port
+--register ABSTRACT-OPERATION ::= {
+--  ARGUMENT         RegisterArgument
+--  RESULT           RegisterResult
+--  ERRORS
+--    {register-rejected | remote-bind-error | operation-refused |
+--      security-error}
+--  LINKED           {operationObject1, ...}
+--  INVOKE PRIORITY  {5}
+--  CODE             op-register
+--}
+
+RegisterArgument ::= SET {
+  user-name                  UserName OPTIONAL,
+  user-address               [0]  UserAddress OPTIONAL,
+  deliverable-class
+    SET --SIZE (1..ub-deliverable-class)-- OF DeliverableClass OPTIONAL,
+  default-delivery-controls  [2] EXPLICIT DefaultDeliveryControls OPTIONAL,
+  redirections               [3]  Redirections OPTIONAL,
+  restricted-delivery        [4]  RestrictedDelivery OPTIONAL,
+  retrieve-registrations     [5]  RegistrationTypes OPTIONAL,
+  extensions
+    [6]  SET OF ExtensionField --{{RegisterExtensions}}-- DEFAULT {}
+}
+
+--RegisterExtensions EXTENSION ::= {PrivateExtensions, ...}
+
+-- May contain private extensions and future standardised extensions
+RegisterResult ::= CHOICE {
+  empty-result      NULL,
+  non-empty-result
+    SET {registered-information
+           [0]  RegisterArgument
+--                  (WITH COMPONENTS {
+--                     ...,
+--                     retrieve-registrations  ABSENT
+--                   }) OPTIONAL--,
+         extensions
+           [1]  SET OF ExtensionField --{{RegisterResultExtensions}}-- DEFAULT {}
+  }
+}
+
+--RegisterResultExtensions EXTENSION ::= {PrivateExtensions, ...}
+
+-- May contain private extensions and future standardised extensions
+--change-credentials ABSTRACT-OPERATION ::= {
+--  ARGUMENT         ChangeCredentialsArgument
+--  RESULT           NULL
+--  ERRORS
+--    {new-credentials-unacceptable | old-credentials-incorrectly-specified |
+--      remote-bind-error | security-error}
+--  LINKED           {operationObject1, ...}
+--  INVOKE PRIORITY  {5}
+--  CODE             op-change-credentials
+--}
+
+ChangeCredentialsArgument ::= SET {
+  old-credentials  [0]  Credentials(WITH COMPONENTS {
+                                      simple  
+                                    }),
+  new-credentials  [1]  Credentials(WITH COMPONENTS {
+                                      simple  
+                                    })
+}
+
+--register-rejected ABSTRACT-ERROR ::= {
+--  PARAMETER  NULL
+--  CODE       err-register-rejected
+--}
+
+--new-credentials-unacceptable ABSTRACT-ERROR ::= {
+--  PARAMETER  NULL
+--  CODE       err-new-credentials-unacceptable
+--}
+
+--old-credentials-incorrectly-specified ABSTRACT-ERROR ::= {
+--  PARAMETER  NULL
+--  CODE       err-old-credentials-incorrectly-specified
+--}
+
+--     Administration Port Parameters
+UserName ::= ORAddressAndOptionalDirectoryName
+
+UserAddress ::= CHOICE {
+  x121
+    [0]  SEQUENCE {x121-address
+                     NumericString --(SIZE (1..ub-x121-address-length))-- OPTIONAL,
+                   tsap-id
+                     PrintableString --(SIZE (1..ub-tsap-id-length))-- OPTIONAL
+  },
+  presentation  [1]  PSAPAddress
+}
+
+PSAPAddress ::= PresentationAddress
+
+DeliverableClass ::=
+  MessageClass
+    (WITH COMPONENTS {
+       ...,
+       priority         ABSENT,
+       -- The 'objects' component shall always be defaulted.
+       -- objects ABSENT,
+       -- A component with a DEFAULT clause cannot be ABSENT 
+       applies-only-to  ABSENT
+     })
+
+DefaultDeliveryControls ::=
+  Controls
+    (WITH COMPONENTS {
+       ...,
+       
+       -- The 'restrict' component shall always be defaulted.
+       -- restrict ABSENT,
+       -- A component with a DEFAULT clause cannot be ABSENT 
+       permissible-security-context  ABSENT
+     })
+
+Redirections ::= SEQUENCE SIZE (1..ub-redirections) OF RecipientRedirection
+
+RecipientRedirection ::= SET {
+  redirection-classes
+    [0]  SET --SIZE (1..ub-redirection-classes)-- OF RedirectionClass OPTIONAL,
+  recipient-assigned-alternate-recipient
+    [1]  RecipientAssignedAlternateRecipient OPTIONAL
+}
+
+RedirectionClass ::= MessageClass
+
+MessageClass ::= SET {
+  content-types                          [0]  ContentTypes OPTIONAL,
+  maximum-content-length                 [1]  ContentLength OPTIONAL,
+  encoded-information-types-constraints
+    [2]  EncodedInformationTypesConstraints OPTIONAL,
+  security-labels                        [3]  SecurityContext OPTIONAL,
+  priority                               [4]  SET OF Priority OPTIONAL,
+  objects
+    [5]  ENUMERATED {messages(0), reports(1), both(2), ...
+                     } DEFAULT both,
+  applies-only-to                        [6]  SEQUENCE OF Restriction OPTIONAL, -- Not considered in the case of Reports 
+  extensions
+    [7]  SET OF ExtensionField --{{MessageClassExtensions}}-- DEFAULT {}
+}
+
+EncodedInformationTypesConstraints ::= SEQUENCE {
+  unacceptable-eits            [0]  ExtendedEncodedInformationTypes OPTIONAL,
+  acceptable-eits              [1]  ExtendedEncodedInformationTypes OPTIONAL,
+  exclusively-acceptable-eits  [2]  ExtendedEncodedInformationTypes OPTIONAL
+}
+
+--MessageClassExtensions EXTENSION ::= {PrivateExtensions, ...}
+
+-- May contain private extensions and future standardised extensions
+RecipientAssignedAlternateRecipient ::=
+  ORAddressAndOrDirectoryName
+
+RestrictedDelivery ::= SEQUENCE SIZE (1..ub-restrictions) OF Restriction
+
+Restriction ::= SET {
+  permitted    BOOLEAN DEFAULT TRUE,
+  source-type
+    BIT STRING {originated-by(0), redirected-by(1), dl-expanded-by(2)}
+--      DEFAULT {originated-by, redirected-by, dl-expanded-by}--,
+  source-name  ExactOrPattern OPTIONAL
+}
+
+ExactOrPattern ::= CHOICE {
+  exact-match    [0]  ORName,
+  pattern-match  [1]  ORName
+}
+
+RegistrationTypes ::= SEQUENCE {
+  standard-parameters
+    [0]  BIT STRING {user-name(0), user-address(1), deliverable-class(2),
+                     default-delivery-controls(3), redirections(4),
+                     restricted-delivery(5)} OPTIONAL,
+  extensions           [1]  SET OF ANY --EXTENSION.&id({RegisterExtensions})-- OPTIONAL
+}
+
+--     Message Submission Envelope
+MessageSubmissionEnvelope ::= SET {
+--  COMPONENTS OF PerMessageSubmissionFields,
+--  per-recipient-fields
+--    [1]  SEQUENCE SIZE (1..ub-recipients) OF
+--           PerRecipientMessageSubmissionFields
+--}
+
+--PerMessageSubmissionFields ::= SET {
+  originator-name                     MTSOriginatorName,
+  original-encoded-information-types  OriginalEncodedInformationTypes OPTIONAL,
+  content-type                        ContentType,
+  content-identifier                  ContentIdentifier OPTIONAL,
+  priority                            Priority DEFAULT normal,
+  per-message-indicators              PerMessageIndicators DEFAULT {},
+  deferred-delivery-time              [0]  DeferredDeliveryTime OPTIONAL,
+  extensions
+    [2]  SET OF ExtensionField --{{PerMessageSubmissionExtensions}}-- DEFAULT {}
+    ,per-recipient-fields
+    [1]  SEQUENCE --SIZE (1..ub-recipients)-- OF
+           PerRecipientMessageSubmissionFields
+
+}
+
+--PerMessageSubmissionExtensions EXTENSION ::=
+--  {- - May contain the following extensions, private extensions, and future standardised extensions,
+   -- at most one instance of each extension type:
+--   recipient-reassignment-prohibited | dl-expansion-prohibited |
+--   conversion-with-loss-prohibited | latest-delivery-time |
+--   originator-return-address | originator-certificate |
+--   content-confidentiality-algorithm-identifier |
+--   message-origin-authentication-check | message-security-label |
+--   proof-of-submission-request | content-correlator | dl-exempted-recipients |
+--   certificate-selectors | multiple-originator-certificates |
+--   forwarding-request - - for MS Abstract Service only - - | PrivateExtensions, 
+--   ...}
+
+PerRecipientMessageSubmissionFields ::= SET {
+  recipient-name             MTSRecipientName,
+  originator-report-request  [0]  OriginatorReportRequest,
+  explicit-conversion        [1]  ExplicitConversion OPTIONAL,
+  extensions
+    [2]  SET OF ExtensionField --{{PerRecipientMessageSubmissionExtensions}}--
+      DEFAULT {}
+}
+
+--PerRecipientMessageSubmissionExtensions EXTENSION ::=
+--  {- - May contain the following extensions, private extensions, and future standardised extensions,
+   -- at most one instance of each extension type:
+--   originator-requested-alternate-recipient | requested-delivery-method |
+--   physical-forwarding-prohibited | physical-forwarding-address-request |
+--   physical-delivery-modes | registered-mail-type | recipient-number-for-advice
+--   | physical-rendition-attributes | physical-delivery-report-request |
+--   message-token | content-integrity-check | proof-of-delivery-request |
+--   certificate-selectors-override | recipient-certificate |
+--   IPMPerRecipientEnvelopeExtensions | PrivateExtensions, ...}
+
+--     Probe Submission Envelope
+ProbeSubmissionEnvelope ::= SET {
+--  COMPONENTS OF PerProbeSubmissionFields,
+--  per-recipient-fields
+--    [3]  SEQUENCE SIZE (1..ub-recipients) OF PerRecipientProbeSubmissionFields
+--}
+
+--PerProbeSubmissionFields ::= SET {
+  originator-name                     MTSOriginatorName,
+  original-encoded-information-types  OriginalEncodedInformationTypes OPTIONAL,
+  content-type                        ContentType,
+  content-identifier                  ContentIdentifier OPTIONAL,
+  content-length                      [0]  ContentLength OPTIONAL,
+  per-message-indicators              PerMessageIndicators DEFAULT {},
+  extensions
+    [2]  SET OF ExtensionField --{{PerProbeSubmissionExtensions}}-- DEFAULT {}
+  ,per-recipient-fields
+    [3]  SEQUENCE --SIZE (1..ub-recipients)-- OF PerRecipientProbeSubmissionFields
+
+}
+
+--PerProbeSubmissionExtensions EXTENSION ::=
+--  {- - May contain the following extensions, private extensions, and future standardised extensions,
+   -- at most one instance of each extension type:
+--   recipient-reassignment-prohibited | dl-expansion-prohibited |
+--   conversion-with-loss-prohibited | originator-certificate |
+--   message-security-label | content-correlator |
+--   probe-origin-authentication-check | PrivateExtensions, ...}
+
+PerRecipientProbeSubmissionFields ::= SET {
+  recipient-name             MTSRecipientName,
+  originator-report-request  [0]  OriginatorReportRequest,
+  explicit-conversion        [1]  ExplicitConversion OPTIONAL,
+  extensions
+    [2]  SET OF ExtensionField --{{PerRecipientProbeSubmissionExtensions}}
+      DEFAULT {}
+}
+
+--PerRecipientProbeSubmissionExtensions EXTENSION ::=
+--  {- - May contain the following extensions, private extensions, and future standardised extensions,
+   -- at most one instance of each extension type:
+--   originator-requested-alternate-recipient | requested-delivery-method |
+--   physical-rendition-attributes | PrivateExtensions, ...}
+
+--     Message Delivery Envelope
+MessageDeliveryEnvelope ::= SEQUENCE {
+  message-delivery-identifier  MessageDeliveryIdentifier,
+  message-delivery-time        MessageDeliveryTime,
+  other-fields                 OtherMessageDeliveryFields
+}
+
+OtherMessageDeliveryFields ::= SET {
+  content-type                         DeliveredContentType,
+  originator-name                      DeliveredOriginatorName,
+  original-encoded-information-types
+    [1]  OriginalEncodedInformationTypes OPTIONAL,
+  priority                             Priority DEFAULT normal,
+  delivery-flags                       [2]  DeliveryFlags OPTIONAL,
+  other-recipient-names                [3]  OtherRecipientNames OPTIONAL,
+  this-recipient-name                  [4]  ThisRecipientName,
+  originally-intended-recipient-name
+    [5]  MTSOriginallyIntendedRecipientName OPTIONAL,
+  converted-encoded-information-types
+    [6]  ConvertedEncodedInformationTypes OPTIONAL,
+  message-submission-time              [7]  MessageSubmissionTime,
+  content-identifier                   [8]  ContentIdentifier OPTIONAL,
+  extensions
+    [9]  SET OF ExtensionField --{{MessageDeliveryExtensions}}-- DEFAULT {}
+}
+
+--MessageDeliveryExtensions EXTENSION ::=
+--  {- - May contain the following extensions, private extensions, and future standardised extensions,
+   -- at most one instance of each extension type:
+--   conversion-with-loss-prohibited | requested-delivery-method |
+--   physical-forwarding-prohibited | physical-forwarding-address-request |
+--   physical-delivery-modes | registered-mail-type | recipient-number-for-advice
+--   | physical-rendition-attributes | originator-return-address |
+--   physical-delivery-report-request | originator-certificate | message-token |
+--   content-confidentiality-algorithm-identifier | content-integrity-check |
+--   message-origin-authentication-check | message-security-label |
+--   proof-of-delivery-request | dl-exempted-recipients | certificate-selectors |
+--   certificate-selectors-override | multiple-originator-certificates |
+--   recipient-certificate | IPMPerRecipientEnvelopeExtensions |
+--   redirection-history | dl-expansion-history | trace-information |
+--   internal-trace-information | PrivateExtensions, ...}
+
+--     Report Delivery Envelope
+ReportDeliveryEnvelope ::= SET {
+--  COMPONENTS OF PerReportDeliveryFields,
+--  per-recipient-fields
+--    SEQUENCE SIZE (1..ub-recipients) OF PerRecipientReportDeliveryFields
+--}
+
+--PerReportDeliveryFields ::= SET {
+  subject-submission-identifier       SubjectSubmissionIdentifier,
+  content-identifier                  ContentIdentifier OPTIONAL,
+  content-type                        ContentType OPTIONAL,
+  original-encoded-information-types  OriginalEncodedInformationTypes OPTIONAL,
+  extensions
+    [1]  SET OF ExtensionField --{{ReportDeliveryExtensions}}-- DEFAULT {}
+  ,per-recipient-fields
+    SEQUENCE --SIZE (1..ub-recipients)-- OF PerRecipientReportDeliveryFields
+
+}
+
+--ReportDeliveryExtensions EXTENSION ::=
+--  {- - May contain the following extensions, private extensions, and future standardised extensions,
+   -- at most one instance of each extension type:
+--   message-security-label | content-correlator | redirection-history |
+--   originator-and-DL-expansion-history | reporting-DL-name |
+--   reporting-MTA-certificate | report-origin-authentication-check |
+--   trace-information | internal-trace-information | reporting-MTA-name |
+--   PrivateExtensions, ...}
+
+PerRecipientReportDeliveryFields ::= SET {
+  actual-recipient-name                [0]  MTSActualRecipientName,
+  report-type                          [1]  ReportType,
+  converted-encoded-information-types
+    ConvertedEncodedInformationTypes OPTIONAL,
+  originally-intended-recipient-name
+    [2]  MTSOriginallyIntendedRecipientName OPTIONAL,
+  supplementary-information            [3]  SupplementaryInformation OPTIONAL,
+  extensions
+    [4]  SET OF ExtensionField --{{PerRecipientReportDeliveryExtensions}}--
+      DEFAULT {}
+}
+
+--PerRecipientReportDeliveryExtensions EXTENSION ::=
+--  {- - May contain the following extensions, private extensions, and future standardised extensions,
+   -- at most one instance of each extension type:
+--   redirection-history | physical-forwarding-address | recipient-certificate |
+--   proof-of-delivery | PrivateExtensions, ...}
+
+ReportType ::= CHOICE {
+  delivery      [0]  DeliveryReport,
+  non-delivery  [1]  NonDeliveryReport
+}
+
+DeliveryReport ::= SET {
+  message-delivery-time  [0]  MessageDeliveryTime,
+  type-of-MTS-user       [1]  TypeOfMTSUser DEFAULT public
+}
+
+NonDeliveryReport ::= SET {
+  non-delivery-reason-code      [0]  NonDeliveryReasonCode,
+  non-delivery-diagnostic-code  [1]  NonDeliveryDiagnosticCode OPTIONAL
+}
+
+--     Envelope Fields
+MTSOriginatorName ::= ORAddressAndOrDirectoryName
+
+DeliveredOriginatorName ::= ORAddressAndOptionalDirectoryName
+
+OriginalEncodedInformationTypes ::= EncodedInformationTypes
+
+ContentTypes ::= SET --SIZE (1..ub-content-types)-- OF ContentType
+
+ContentType ::= CHOICE {
+  built-in  BuiltInContentType,
+  extended  ExtendedContentType
+}
+
+BuiltInContentType ::= [APPLICATION 6]  INTEGER {
+  unidentified(0),
+  external(1), -- identified by the object-identifier of the EXTERNAL content
+  interpersonal-messaging-1984(2), interpersonal-messaging-1988(22),
+  edi-messaging(35), voice-messaging(40)} --(0..ub-built-in-content-type)
+
+ExtendedContentType ::= OBJECT IDENTIFIER -- RELATIVE-OID
+
+DeliveredContentType ::= CHOICE {
+  built-in  [0]  BuiltInContentType,
+  extended  ExtendedContentType
+}
+
+ContentIdentifier ::=
+  [APPLICATION 10]  PrintableString --(SIZE (1..ub-content-id-length))
+
+PerMessageIndicators ::= [APPLICATION 8]  BIT STRING {
+  disclosure-of-other-recipients(0), -- disclosure-of-other-recipients-requested 'one',
+  
+  -- disclosure-of-other-recipients-prohibited 'zero';
+  -- ignored for Probe-submission
+  implicit-conversion-prohibited(1), -- implicit-conversion-prohibited 'one', 
+  
+  -- implicit-conversion-allowed 'zero'
+  alternate-recipient-allowed(2), -- alternate-recipient-allowed 'one',
+  
+  -- alternate-recipient-prohibited 'zero'
+  content-return-request(3), -- content-return-requested 'one', 
+  
+  -- content-return-not-requested 'zero';
+  -- ignored for Probe-submission
+  reserved(4), -- bit reserved by MOTIS 1986
+  bit-5(5),
+  bit-6(6), -- notification type-1 : bit 5 'zero' and bit 6 'one'
+  
+  -- notification type-2 : bit 5 'one' and bit 6 'zero'
+  -- notification type-3 : bit 5 'one' and bit 6 'one'
+  -- the mapping between notification type 1, 2, 3
+  -- and the content specific notification types are defined
+  -- in relevant content specifications
+  service-message(7) -- the message content is for service purposes;
+  
+  
+-- it may be a notification related to a service message;
+-- used only by bilateral agreement --}(SIZE (0..ub-bit-options))
+
+MTSRecipientName ::= ORAddressAndOrDirectoryName
+
+OriginatorReportRequest ::= BIT STRING {report(3), non-delivery-report(4)
+                                                   
+-- at most one bit shall be 'one':
+-- report bit 'one' requests a 'report';
+-- non-delivery-report bit 'one' requests a 'non-delivery-report';
+-- both bits 'zero' requests 'no-report' --}(SIZE (0..ub-bit-options))
+
+ExplicitConversion ::= INTEGER {
+  ia5-text-to-teletex(0),
+  -- values 1 to 7 are no longer defined
+  ia5-text-to-g3-facsimile(8), ia5-text-to-g4-class-1(9),
+  ia5-text-to-videotex(10), teletex-to-ia5-text(11),
+  teletex-to-g3-facsimile(12), teletex-to-g4-class-1(13),
+  teletex-to-videotex(14),
+  -- value 15 is no longer defined
+  videotex-to-ia5-text(16), videotex-to-teletex(17)}(0..ub-integer-options)
+
+DeferredDeliveryTime ::= Time
+
+Priority ::= [APPLICATION 7]  ENUMERATED {normal(0), non-urgent(1), urgent(2)}
+
+ContentLength ::= INTEGER(0..ub-content-length)
+
+MessageDeliveryIdentifier ::= MTSIdentifier
+
+MessageDeliveryTime ::= Time
+
+DeliveryFlags ::= BIT STRING {
+  implicit-conversion-prohibited(1) -- implicit-conversion-prohibited 'one', 
+  
+  -- implicit-conversion-allowed 'zero' --}(SIZE (0..ub-bit-options))
+
+OtherRecipientNames ::= SEQUENCE --SIZE (1..ub-recipients)-- OF OtherRecipientName
+
+OtherRecipientName ::= ORAddressAndOptionalDirectoryName
+
+ThisRecipientName ::= ORAddressAndOptionalDirectoryName
+
+MTSOriginallyIntendedRecipientName ::= ORAddressAndOptionalDirectoryName
+
+ConvertedEncodedInformationTypes ::= EncodedInformationTypes
+
+SubjectSubmissionIdentifier ::= MTSIdentifier
+
+MTSActualRecipientName ::= ORAddressAndOrDirectoryName
+
+TypeOfMTSUser ::= INTEGER {
+  public(0), private(1), ms(2), dl(3), pdau(4), physical-recipient(5), other(6)
+}(0..ub-mts-user-types)
+
+NonDeliveryReasonCode ::= INTEGER {
+  transfer-failure(0), unable-to-transfer(1), conversion-not-performed(2),
+  physical-rendition-not-performed(3), physical-delivery-not-performed(4),
+  restricted-delivery(5), directory-operation-unsuccessful(6),
+  deferred-delivery-not-performed(7), transfer-failure-for-security-reason(8)
+}(0..ub-reason-codes)
+
+NonDeliveryDiagnosticCode ::= INTEGER {
+  unrecognised-OR-name(0), ambiguous-OR-name(1), mts-congestion(2),
+  loop-detected(3), recipient-unavailable(4), maximum-time-expired(5),
+  encoded-information-types-unsupported(6), content-too-long(7),
+  conversion-impractical(8), implicit-conversion-prohibited(9),
+  implicit-conversion-not-subscribed(10), invalid-arguments(11),
+  content-syntax-error(12), size-constraint-violation(13),
+  protocol-violation(14), content-type-not-supported(15),
+  too-many-recipients(16), no-bilateral-agreement(17),
+  unsupported-critical-function(18), conversion-with-loss-prohibited(19),
+  line-too-long(20), page-split(21), pictorial-symbol-loss(22),
+  punctuation-symbol-loss(23), alphabetic-character-loss(24),
+  multiple-information-loss(25), recipient-reassignment-prohibited(26),
+  redirection-loop-detected(27), dl-expansion-prohibited(28),
+  no-dl-submit-permission(29), dl-expansion-failure(30),
+  physical-rendition-attributes-not-supported(31),
+  undeliverable-mail-physical-delivery-address-incorrect(32),
+  undeliverable-mail-physical-delivery-office-incorrect-or-invalid(33),
+  undeliverable-mail-physical-delivery-address-incomplete(34),
+  undeliverable-mail-recipient-unknown(35),
+  undeliverable-mail-recipient-deceased(36),
+  undeliverable-mail-organization-expired(37),
+  undeliverable-mail-recipient-refused-to-accept(38),
+  undeliverable-mail-recipient-did-not-claim(39),
+  undeliverable-mail-recipient-changed-address-permanently(40),
+  undeliverable-mail-recipient-changed-address-temporarily(41),
+  undeliverable-mail-recipient-changed-temporary-address(42),
+  undeliverable-mail-new-address-unknown(43),
+  undeliverable-mail-recipient-did-not-want-forwarding(44),
+  undeliverable-mail-originator-prohibited-forwarding(45),
+  secure-messaging-error(46), unable-to-downgrade(47),
+  unable-to-complete-transfer(48), transfer-attempts-limit-reached(49),
+  incorrect-notification-type(50),
+  dl-expansion-prohibited-by-security-policy(51),
+  forbidden-alternate-recipient(52), security-policy-violation(53),
+  security-services-refusal(54), unauthorised-dl-member(55),
+  unauthorised-dl-name(56),
+  unauthorised-originally-intended-recipient-name(57),
+  unauthorised-originator-name(58), unauthorised-recipient-name(59),
+  unreliable-system(60), authentication-failure-on-subject-message(61),
+  decryption-failed(62), decryption-key-unobtainable(63),
+  double-envelope-creation-failure(64),
+  double-enveloping-message-restoring-failure(65),
+  failure-of-proof-of-message(66), integrity-failure-on-subject-message(67),
+  invalid-security-label(68), key-failure(69), mandatory-parameter-absence(70),
+  operation-security-failure(71), repudiation-failure-of-message(72),
+  security-context-failure(73), token-decryption-failed(74), token-error(75),
+  unknown-security-label(76), unsupported-algorithm-identifier(77),
+  unsupported-security-policy(78)}(0..ub-diagnostic-codes)
+
+SupplementaryInformation ::=
+  PrintableString(SIZE (1..ub-supplementary-info-length))
+
+--     Extension Fields
+--EXTENSION ::= CLASS {
+--  &id           ExtensionType UNIQUE,
+--  &Type         OPTIONAL,
+--  &absent       &Type OPTIONAL,
+--  &recommended  Criticality DEFAULT {}
+--}
+--WITH SYNTAX {
+--  [&Type
+--   [IF ABSENT &absent],]
+--  [RECOMMENDED CRITICALITY &recommended,]
+--  IDENTIFIED BY &id
+--}
+
+ExtensionType ::= CHOICE {
+  standard-extension  [0]  INTEGER --(0..ub-extension-types)--,
+  private-extension   [3]  OBJECT IDENTIFIER
+}
+
+Criticality ::= BIT STRING {for-submission(0), for-transfer(1), for-delivery(2)
+} -- (SIZE (0..ub-bit-options)) - - critical 'one', non-critical 'zero'
+
+ExtensionField --{EXTENSION:ChosenFrom}-- ::= SEQUENCE {
+  type         ExtensionType --EXTENSION.&id({ChosenFrom})--,
+  criticality  [1]  Criticality DEFAULT {},
+  value        [2]  ANY --EXTENSION.&Type({ChosenFrom}{@type}) DEFAULT NULL:NULL
+}
+
+--PrivateExtensions EXTENSION ::=
+--  {- - Any value shall be relayed and delivered if not Critical (see Table 27)
+   -- except those values whose semantics the MTA obeys which are defined to be removed when obeyed.
+--   - - Shall be IDENTIFIED BY ExtensionType.private-extension - -...}
+
+--recipient-reassignment-prohibited EXTENSION ::= {
+--  RecipientReassignmentProhibited
+--  IF ABSENT                recipient-reassignment-allowed,
+--  RECOMMENDED CRITICALITY  {for-delivery},
+--  IDENTIFIED BY            standard-extension:1
+--}
+
+RecipientReassignmentProhibited ::= ENUMERATED {
+  recipient-reassignment-allowed(0), recipient-reassignment-prohibited(1)
+}
+
+--originator-requested-alternate-recipient EXTENSION ::= {
+--  OriginatorRequestedAlternateRecipient,
+--  RECOMMENDED CRITICALITY  {for-submission},
+--  IDENTIFIED BY            standard-extension:2
+--}
+
+MTSOriginatorRequestedAlternateRecipient ::= ORAddressAndOrDirectoryName
+
+-- OriginatorRequestedAlternateRecipient as defined here differs from the field of the same name 
+-- defined in Figure 4, since on submission the OR-address need not be present, but on 
+-- transfer the OR-address must be present.
+--dl-expansion-prohibited EXTENSION ::= {
+--  DLExpansionProhibited
+--  IF ABSENT                dl-expansion-allowed,
+--  RECOMMENDED CRITICALITY  {for-delivery},
+--  IDENTIFIED BY            standard-extension:3
+--}
+
+DLExpansionProhibited ::= ENUMERATED {
+  dl-expansion-allowed(0), dl-expansion-prohibited(1)}
+
+--conversion-with-loss-prohibited EXTENSION ::= {
+--  ConversionWithLossProhibited
+--  IF ABSENT                conversion-with-loss-allowed,
+--  RECOMMENDED CRITICALITY  {for-delivery},
+--  IDENTIFIED BY            standard-extension:4
+--}
+
+ConversionWithLossProhibited ::= ENUMERATED {
+  conversion-with-loss-allowed(0), conversion-with-loss-prohibited(1)
+}
+
+--latest-delivery-time EXTENSION ::= {
+--  LatestDeliveryTime,
+--  RECOMMENDED CRITICALITY  {for-delivery},
+--  IDENTIFIED BY            standard-extension:5
+--}
+
+LatestDeliveryTime ::= Time
+
+--requested-delivery-method EXTENSION ::= {
+--  RequestedDeliveryMethod
+--  IF ABSENT      {any-delivery-method},
+--  IDENTIFIED BY  standard-extension:6
+--}
+
+RequestedDeliveryMethod ::=
+  SEQUENCE OF INTEGER { -- each different in order of preference,
+      -- most preferred first
+      any-delivery-method(0), mhs-delivery(1), physical-delivery(2),
+      telex-delivery(3), teletex-delivery(4), g3-facsimile-delivery(5),
+  
+    g4-facsimile-delivery(6), ia5-terminal-delivery(7), videotex-delivery(8),
+      telephone-delivery(9)}(0..ub-integer-options)
+
+--physical-forwarding-prohibited EXTENSION ::= {
+--  PhysicalForwardingProhibited
+--  IF ABSENT                physical-forwarding-allowed,
+--  RECOMMENDED CRITICALITY  {for-delivery},
+--  IDENTIFIED BY            standard-extension:7
+--}
+
+PhysicalForwardingProhibited ::= ENUMERATED {
+  physical-forwarding-allowed(0), physical-forwarding-prohibited(1)}
+
+--physical-forwarding-address-request EXTENSION ::= {
+--  PhysicalForwardingAddressRequest
+--  IF ABSENT                physical-forwarding-address-not-requested,
+--  RECOMMENDED CRITICALITY  {for-delivery},
+--  IDENTIFIED BY            standard-extension:8
+--}
+
+PhysicalForwardingAddressRequest ::= ENUMERATED {
+  physical-forwarding-address-not-requested(0),
+  physical-forwarding-address-requested(1)}
+
+--physical-delivery-modes EXTENSION ::= {
+--  PhysicalDeliveryModes
+--  IF ABSENT                {ordinary-mail},
+--  RECOMMENDED CRITICALITY  {for-delivery},
+--  IDENTIFIED BY            standard-extension:9
+--}
+
+PhysicalDeliveryModes ::= BIT STRING {
+  ordinary-mail(0), special-delivery(1), express-mail(2),
+  counter-collection(3), counter-collection-with-telephone-advice(4),
+  counter-collection-with-telex-advice(5),
+  counter-collection-with-teletex-advice(6), bureau-fax-delivery(7)
+                                             
+-- bits 0 to 6 are mutually exclusive
+-- bit 7 can be set independently of any of bits 0 to 6 --}
+--(SIZE (0..ub-bit-options))
+
+--registered-mail-type EXTENSION ::= {
+--  RegisteredMailType
+--  IF ABSENT                non-registered-mail,
+--  RECOMMENDED CRITICALITY  {for-delivery},
+--  IDENTIFIED BY            standard-extension:10
+--}
+
+RegisteredMailType ::= INTEGER {
+  non-registered-mail(0), registered-mail(1),
+  registered-mail-to-addressee-in-person(2)}(0..ub-integer-options)
+
+--recipient-number-for-advice EXTENSION ::= {
+--  RecipientNumberForAdvice,
+--  RECOMMENDED CRITICALITY  {for-delivery},
+--  IDENTIFIED BY            standard-extension:11
+--}
+
+RecipientNumberForAdvice ::=
+  TeletexString --(SIZE (1..ub-recipient-number-for-advice-length))
+
+--physical-rendition-attributes EXTENSION ::= {
+--  PhysicalRenditionAttributes
+--  IF ABSENT                id-att-physicalRendition-basic,
+--  RECOMMENDED CRITICALITY  {for-delivery},
+--  IDENTIFIED BY            standard-extension:12
+--}
+
+PhysicalRenditionAttributes ::= OBJECT IDENTIFIER
+
+--originator-return-address EXTENSION ::= {
+--  OriginatorReturnAddress,
+--  IDENTIFIED BY  standard-extension:13
+--}
+
+OriginatorReturnAddress ::= ORAddress
+
+--physical-delivery-report-request EXTENSION ::= {
+--  PhysicalDeliveryReportRequest
+--  IF ABSENT                return-of-undeliverable-mail-by-PDS,
+--  RECOMMENDED CRITICALITY  {for-delivery},
+--  IDENTIFIED BY            standard-extension:14
+--}
+
+PhysicalDeliveryReportRequest ::= INTEGER {
+  return-of-undeliverable-mail-by-PDS(0), return-of-notification-by-PDS(1),
+  return-of-notification-by-MHS(2), return-of-notification-by-MHS-and-PDS(3)
+} -- (0..ub-integer-options)
+
+--originator-certificate EXTENSION ::= {
+--  OriginatorCertificate,
+--  IDENTIFIED BY  standard-extension:15
+--}
+
+OriginatorCertificate ::= Certificates
+
+--message-token EXTENSION ::= {
+--  MessageToken,
+--  RECOMMENDED CRITICALITY  {for-delivery},
+--  IDENTIFIED BY            standard-extension:16
+--}
+
+--MessageToken ::= Token
+
+--content-confidentiality-algorithm-identifier EXTENSION ::= {
+--  ContentConfidentialityAlgorithmIdentifier,
+--  RECOMMENDED CRITICALITY  {for-delivery},
+--  IDENTIFIED BY            standard-extension:17
+--}
+
+ContentConfidentialityAlgorithmIdentifier ::= AlgorithmIdentifier
+
+--content-integrity-check EXTENSION ::= {
+--  ContentIntegrityCheck,
+--  RECOMMENDED CRITICALITY  {for-delivery},
+--  IDENTIFIED BY            standard-extension:18
+--}
+
+--ContentIntegrityCheck ::=
+--  SIGNATURE
+--    {SEQUENCE {algorithm-identifier
+--                 ContentIntegrityAlgorithmIdentifier OPTIONAL,
+--               content               Content}}
+
+ContentIntegrityAlgorithmIdentifier ::= AlgorithmIdentifier
+
+--message-origin-authentication-check EXTENSION ::= {
+--  MessageOriginAuthenticationCheck,
+--  RECOMMENDED CRITICALITY  {for-delivery},
+--  IDENTIFIED BY            standard-extension:19
+--}
+
+--MessageOriginAuthenticationCheck ::=
+--  SIGNATURE
+--    {SEQUENCE {algorithm-identifier
+--                 MessageOriginAuthenticationAlgorithmIdentifier,
+--               content                 Content,
+--               content-identifier      ContentIdentifier OPTIONAL,
+--               message-security-label  MessageSecurityLabel OPTIONAL}}
+
+MessageOriginAuthenticationAlgorithmIdentifier ::= AlgorithmIdentifier
+
+--message-security-label EXTENSION ::= {
+--  MessageSecurityLabel,
+--  RECOMMENDED CRITICALITY  {for-delivery},
+--  IDENTIFIED BY            standard-extension:20
+--}
+
+MessageSecurityLabel ::= SecurityLabel
+
+--proof-of-submission-request EXTENSION ::= {
+--  ProofOfSubmissionRequest
+--  IF ABSENT                proof-of-submission-not-requested,
+--  RECOMMENDED CRITICALITY  {for-submission},
+--  IDENTIFIED BY            standard-extension:21
+--}
+
+ProofOfSubmissionRequest ::= ENUMERATED {
+  proof-of-submission-not-requested(0), proof-of-submission-requested(1)
+}
+
+--proof-of-delivery-request EXTENSION ::= {
+--  ProofOfDeliveryRequest
+--  IF ABSENT                proof-of-delivery-not-requested,
+--  RECOMMENDED CRITICALITY  {for-delivery},
+--  IDENTIFIED BY            standard-extension:22
+--}
+
+ProofOfDeliveryRequest ::= ENUMERATED {
+  proof-of-delivery-not-requested(0), proof-of-delivery-requested(1)}
+
+--content-correlator EXTENSION ::= {
+--  ContentCorrelator,
+--  IDENTIFIED BY  standard-extension:23
+--}
+
+ContentCorrelator ::= CHOICE {ia5text  IA5String,
+                              octets   OCTET STRING
+}
+
+--probe-origin-authentication-check EXTENSION ::= {
+--  ProbeOriginAuthenticationCheck,
+--  RECOMMENDED CRITICALITY  {for-delivery},
+--  IDENTIFIED BY            standard-extension:24
+--}
+
+--ProbeOriginAuthenticationCheck ::=
+--  SIGNATURE
+--    {SEQUENCE {algorithm-identifier
+--                 ProbeOriginAuthenticationAlgorithmIdentifier,
+--               content-identifier      ContentIdentifier OPTIONAL,
+--               message-security-label  MessageSecurityLabel OPTIONAL}}
+
+ProbeOriginAuthenticationAlgorithmIdentifier ::= AlgorithmIdentifier
+
+--redirection-history EXTENSION ::= {
+--  RedirectionHistory,
+--  IDENTIFIED BY  standard-extension:25
+--}
+
+RedirectionHistory ::= SEQUENCE SIZE (1..ub-redirections) OF Redirection
+
+Redirection ::= SEQUENCE {
+  intended-recipient-name  IntendedRecipientName,
+  redirection-reason       RedirectionReason
+}
+
+IntendedRecipientName ::= SEQUENCE {
+  intended-recipient  ORAddressAndOptionalDirectoryName,
+  redirection-time    Time
+}
+
+RedirectionReason ::= ENUMERATED {
+  recipient-assigned-alternate-recipient(0),
+  originator-requested-alternate-recipient(1),
+  recipient-MD-assigned-alternate-recipient(2),
+  -- The following values may not be supported by implementations of earlier versions of this Service Definition
+  directory-look-up(3), alias(4), ...
+  }
+
+--dl-expansion-history EXTENSION ::= {
+--  DLExpansionHistory,
+--  IDENTIFIED BY  standard-extension:26
+--}
+
+DLExpansionHistory ::= SEQUENCE -- SIZE (1..ub-dl-expansions)-- OF DLExpansion
+
+DLExpansion ::= SEQUENCE {
+  dl                 ORAddressAndOptionalDirectoryName,
+  dl-expansion-time  Time
+}
+
+--physical-forwarding-address EXTENSION ::= {
+--  PhysicalForwardingAddress,
+--  IDENTIFIED BY  standard-extension:27
+--}
+
+PhysicalForwardingAddress ::= ORAddressAndOptionalDirectoryName
+
+--recipient-certificate EXTENSION ::= {
+--  RecipientCertificate,
+--  IDENTIFIED BY  standard-extension:28
+--}
+
+--proof-of-delivery EXTENSION ::= {
+--  ProofOfDelivery,
+--  IDENTIFIED BY  standard-extension:29
+--}
+
+--originator-and-DL-expansion-history EXTENSION ::= {
+--  OriginatorAndDLExpansionHistory,
+--  IDENTIFIED BY  standard-extension:30
+--}
+
+OriginatorAndDLExpansionHistory ::=
+  SEQUENCE --SIZE (2..ub-orig-and-dl-expansions)-- OF OriginatorAndDLExpansion
+
+OriginatorAndDLExpansion ::= SEQUENCE {
+  originator-or-dl-name          ORAddressAndOptionalDirectoryName,
+  origination-or-expansion-time  Time
+}
+
+--reporting-DL-name EXTENSION ::= {
+--  ReportingDLName,
+--  IDENTIFIED BY  standard-extension:31
+--}
+
+ReportingDLName ::= ORAddressAndOptionalDirectoryName
+
+--reporting-MTA-certificate EXTENSION ::= {
+--  ReportingMTACertificate,
+--  RECOMMENDED CRITICALITY  {for-delivery},
+--  IDENTIFIED BY            standard-extension:32
+--}
+
+ReportingMTACertificate ::= Certificates
+
+--report-origin-authentication-check EXTENSION ::= {
+--  ReportOriginAuthenticationCheck,
+--  RECOMMENDED CRITICALITY  {for-delivery},
+--  IDENTIFIED BY            standard-extension:33
+--}
+
+--ReportOriginAuthenticationCheck ::=
+--  SIGNATURE
+--    {SEQUENCE {algorithm-identifier
+--                 ReportOriginAuthenticationAlgorithmIdentifier,
+--               content-identifier      ContentIdentifier OPTIONAL,
+--               message-security-label  MessageSecurityLabel OPTIONAL,
+--               per-recipient
+--                 SEQUENCE SIZE (1..ub-recipients) OF PerRecipientReportFields
+--    }}
+
+ReportOriginAuthenticationAlgorithmIdentifier ::= AlgorithmIdentifier
+
+PerRecipientReportFields ::= SEQUENCE {
+  actual-recipient-name               MTSActualRecipientName,
+  originally-intended-recipient-name  MTSOriginallyIntendedRecipientName OPTIONAL,
+  report-type
+    CHOICE {delivery      [0]  PerRecipientDeliveryReportFields,
+            non-delivery  [1]  PerRecipientNonDeliveryReportFields}
+}
+
+PerRecipientDeliveryReportFields ::= SEQUENCE {
+  message-delivery-time  MessageDeliveryTime,
+  type-of-MTS-user       TypeOfMTSUser,
+  recipient-certificate  [0]  RecipientCertificate OPTIONAL
+--  proof-of-delivery      [1]  ProofOfDelivery OPTIONAL
+}
+
+PerRecipientNonDeliveryReportFields ::= SEQUENCE {
+  non-delivery-reason-code      NonDeliveryReasonCode,
+  non-delivery-diagnostic-code  NonDeliveryDiagnosticCode OPTIONAL
+}
+
+--originating-MTA-certificate EXTENSION ::= {
+--  OriginatingMTACertificate,
+--  IDENTIFIED BY  standard-extension:34
+--}
+
+OriginatingMTACertificate ::= Certificates
+
+--proof-of-submission EXTENSION ::= {
+--  ProofOfSubmission,
+--  IDENTIFIED BY  standard-extension:35
+--}
+
+--ProofOfSubmission ::=
+--  SIGNATURE
+--    {SEQUENCE {algorithm-identifier
+--                 ProofOfSubmissionAlgorithmIdentifier,
+--               message-submission-envelope    MessageSubmissionEnvelope,
+--               content                        Content,
+--               message-submission-identifier  MessageSubmissionIdentifier,
+--               message-submission-time        MessageSubmissionTime}}
+
+ProofOfSubmissionAlgorithmIdentifier ::= AlgorithmIdentifier
+
+--reporting-MTA-name EXTENSION ::= {
+--  ReportingMTAName,
+--  IDENTIFIED BY  standard-extension:39
+--}
+
+ReportingMTAName ::= SEQUENCE {
+  domain              GlobalDomainIdentifier,
+  mta-name            MTAName,
+  mta-directory-name  [0]  Name OPTIONAL
+}
+
+--multiple-originator-certificates EXTENSION ::= {
+--  ExtendedCertificates,
+--  IDENTIFIED BY  standard-extension:40
+--}
+
+ExtendedCertificates ::= SET --SIZE (1..ub-certificates)-- OF ExtendedCertificate
+
+ExtendedCertificate ::= CHOICE {
+  directory-entry  [0]  Name, -- Name of a Directory entry where the certificate can be found
+  certificate      [1]  Certificates
+}
+
+--dl-exempted-recipients EXTENSION ::= {
+--  DLExemptedRecipients,
+--  IDENTIFIED BY  standard-extension:42
+--}
+
+DLExemptedRecipients ::= SET OF ORAddressAndOrDirectoryName
+
+--certificate-selectors EXTENSION ::= {
+--  CertificateSelectors,
+--  IDENTIFIED BY  standard-extension:45
+--}
+
+CertificateSelectors ::= SET {
+  encryption-recipient           [0]  CertificateAssertion OPTIONAL,
+  encryption-originator          [1]  CertificateAssertion OPTIONAL,
+  content-integrity-check        [2]  CertificateAssertion OPTIONAL,
+  token-signature                [3]  CertificateAssertion OPTIONAL,
+  message-origin-authentication  [4]  CertificateAssertion OPTIONAL
+}
+
+--certificate-selectors-override EXTENSION ::= {
+--  CertificateSelectors
+--    (WITH COMPONENTS {
+--       ...,
+--       message-origin-authentication  ABSENT
+--     }),
+--  IDENTIFIED BY  standard-extension:46
+--}
+
+-- Some standard-extensions are defined elsewhere:
+--     36 (forwarding-request) in ITU-T Rec. X.413 | ISO/IEC 10021-5;
+--     37 (trace-information), and 38 (internal-trace-information) in Figure 4;
+--     41 (blind-copy-recipients), 43 (body-part-encryption-token), and 44 (forwarded-content-token) in 
+--             ITU-T Rec. X.420 | ISO/IEC 10021-7
+--     Common Parameter Types
+Content ::=
+  OCTET
+    STRING -- when the content-type has the integer value external, the value of the
+
+-- content octet string is the ASN.1 encoding of the external-content;
+-- an external-content is a data type EXTERNAL
+MTSIdentifier ::= [APPLICATION 4]  SEQUENCE {
+  global-domain-identifier  GlobalDomainIdentifier,
+  local-identifier          LocalIdentifier
+}
+
+LocalIdentifier ::= IA5String --(SIZE (1..ub-local-id-length))
+
+GlobalDomainIdentifier ::= [APPLICATION 3]  SEQUENCE {
+  country-name                CountryName,
+  administration-domain-name  AdministrationDomainName,
+  private-domain-identifier   PrivateDomainIdentifier OPTIONAL
+}
+
+PrivateDomainIdentifier ::= CHOICE {
+  numeric    NumericString --(SIZE (1..ub-domain-name-length))--,
+  printable  PrintableString --(SIZE (1..ub-domain-name-length))
+}
+
+MTAName ::= IA5String --(SIZE (1..ub-mta-name-length))
+
+Time ::= UTCTime
+
+
+--     OR Names
+ORAddressAndOrDirectoryName ::= ORName
+
+ORAddressAndOptionalDirectoryName ::= ORName
+
+ORName ::= [APPLICATION 0]  SEQUENCE {
+  -- address - -COMPONENTS OF ORAddress,
+  built-in-standard-attributes        BuiltInStandardAttributes,
+  built-in-domain-defined-attributes  BuiltInDomainDefinedAttributes OPTIONAL,
+  -- see also teletex-domain-defined-attributes
+  extension-attributes                ExtensionAttributes OPTIONAL,
+  directory-name  [0]  Name OPTIONAL
+}
+
+ORAddress ::= SEQUENCE {
+  built-in-standard-attributes        BuiltInStandardAttributes,
+  built-in-domain-defined-attributes  BuiltInDomainDefinedAttributes OPTIONAL,
+  -- see also teletex-domain-defined-attributes
+  extension-attributes                ExtensionAttributes OPTIONAL
+}
+
+--     The OR-address is semantically absent from the OR-name if the built-in-standard-attribute
+--     sequence is empty and the built-in-domain-defined-attributes and extension-attributes are both omitted.
+--     Built-in Standard Attributes
+BuiltInStandardAttributes ::= SEQUENCE {
+  country-name                CountryName OPTIONAL,
+  administration-domain-name  AdministrationDomainName OPTIONAL,
+  network-address             [0]  NetworkAddress OPTIONAL,
+  -- see also extended-network-address
+  terminal-identifier         [1]  TerminalIdentifier OPTIONAL,
+  private-domain-name         [2]  PrivateDomainName OPTIONAL,
+  organization-name           [3]  OrganizationName OPTIONAL,
+  -- see also teletex-organization-name
+  numeric-user-identifier     [4]  NumericUserIdentifier OPTIONAL,
+  personal-name               [5]  PersonalName OPTIONAL,
+  -- see also teletex-personal-name
+  organizational-unit-names   [6]  OrganizationalUnitNames OPTIONAL
+  -- see also teletex-organizational-unit-names 
+}
+
+CountryName ::= [APPLICATION 1]  CHOICE {
+  x121-dcc-code         NumericString --(SIZE (ub-country-name-numeric-length))--,
+  iso-3166-alpha2-code  PrintableString --(SIZE (ub-country-name-alpha-length))
+}
+
+AdministrationDomainName ::= [APPLICATION 2]  CHOICE {
+  numeric    NumericString --(SIZE (0..ub-domain-name-length))--,
+  printable  PrintableString --(SIZE (0..ub-domain-name-length))
+}
+
+NetworkAddress ::= X121Address
+
+-- see also extended-network-address
+X121Address ::= NumericString --(SIZE (1..ub-x121-address-length))
+
+TerminalIdentifier ::= PrintableString --(SIZE (1..ub-terminal-id-length))
+
+PrivateDomainName ::= CHOICE {
+  numeric    NumericString --(SIZE (1..ub-domain-name-length))--,
+  printable  PrintableString --(SIZE (1..ub-domain-name-length))
+}
+
+OrganizationName ::= PrintableString --(SIZE (1..ub-organization-name-length))
+
+-- see also teletex-organization-name
+NumericUserIdentifier ::= NumericString --(SIZE (1..ub-numeric-user-id-length))
+
+PersonalName ::= SET {
+  surname               [0]  PrintableString --(SIZE (1..ub-surname-length)) --,
+  given-name
+    [1]  PrintableString --(SIZE (1..ub-given-name-length))-- OPTIONAL,
+  initials
+    [2]  PrintableString --(SIZE (1..ub-initials-length))-- OPTIONAL,
+  generation-qualifier
+    [3]  PrintableString --(SIZE (1..ub-generation-qualifier-length))-- OPTIONAL
+}
+
+-- see also teletex-personal-name
+OrganizationalUnitNames ::=
+  SEQUENCE --SIZE (1..ub-organizational-units)-- OF OrganizationalUnitName
+
+-- see also teletex-organizational-unit-names
+OrganizationalUnitName ::=
+  PrintableString --(SIZE (1..ub-organizational-unit-name-length))
+
+--     Built-in Domain-defined Attributes
+BuiltInDomainDefinedAttributes ::=
+  SEQUENCE --SIZE (1..ub-domain-defined-attributes)-- OF
+    BuiltInDomainDefinedAttribute
+
+BuiltInDomainDefinedAttribute ::= SEQUENCE {
+  type   PrintableString--(SIZE (1..ub-domain-defined-attribute-type-length))--,
+  value  PrintableString --(SIZE (1..ub-domain-defined-attribute-value-length))
+}
+
+--     Extension Attributes
+ExtensionAttributes ::=
+  SET --SIZE (1..ub-extension-attributes)-- OF ExtensionAttribute
+
+ExtensionAttribute ::= SEQUENCE {
+  extension-attribute-type
+    [0]  INTEGER --EXTENSION-ATTRIBUTE.&id({ExtensionAttributeTable}) --,
+  extension-attribute-value
+    [1]  ANY --EXTENSION-ATTRIBUTE.&Type
+--           ({ExtensionAttributeTable}{@extension-attribute-type})
+}
+
+--EXTENSION-ATTRIBUTE ::= CLASS {
+--  &id    INTEGER(0..ub-extension-attributes) UNIQUE,
+--  &Type  
+--}WITH SYNTAX {&Type
+--              IDENTIFIED BY &id
+--}
+
+--ExtensionAttributeTable EXTENSION-ATTRIBUTE ::=
+--  {common-name | teletex-common-name | universal-common-name |
+--   teletex-organization-name | universal-organization-name |
+--   teletex-personal-name | universal-personal-name |
+--   teletex-organizational-unit-names | universal-organizational-unit-names |
+--   teletex-domain-defined-attributes | universal-domain-defined-attributes |
+--   pds-name | physical-delivery-country-name | postal-code |
+--   physical-delivery-office-name | universal-physical-delivery-office-name |
+--   physical-delivery-office-number | universal-physical-delivery-office-number
+--   | extension-OR-address-components |
+--   universal-extension-OR-address-components | physical-delivery-personal-name
+--   | universal-physical-delivery-personal-name |
+--   physical-delivery-organization-name |
+--   universal-physical-delivery-organization-name |
+--   extension-physical-delivery-address-components |
+--   universal-extension-physical-delivery-address-components |
+--   unformatted-postal-address | universal-unformatted-postal-address |
+--   street-address | universal-street-address | post-office-box-address |
+--   universal-post-office-box-address | poste-restante-address |
+--   universal-poste-restante-address | unique-postal-name |
+--   universal-unique-postal-name | local-postal-attributes |
+--   universal-local-postal-attributes | extended-network-address | terminal-type
+--  }
+
+--     Extension Standard Attributes
+--common-name EXTENSION-ATTRIBUTE ::= {CommonName
+--                                     IDENTIFIED BY  1
+--}
+
+CommonName ::= PrintableString --(SIZE (1..ub-common-name-length))
+
+--teletex-common-name EXTENSION-ATTRIBUTE ::= {TeletexCommonName
+--                                             IDENTIFIED BY  2
+--}
+
+TeletexCommonName ::= TeletexString --(SIZE (1..ub-common-name-length))
+
+--universal-common-name EXTENSION-ATTRIBUTE ::= {
+--  UniversalCommonName
+--  IDENTIFIED BY  24
+--}
+
+UniversalCommonName ::= UniversalOrBMPString --{ub-common-name-length}
+
+--teletex-organization-name EXTENSION-ATTRIBUTE ::= {
+--  TeletexOrganizationName
+--  IDENTIFIED BY  3
+--}
+
+TeletexOrganizationName ::=
+  TeletexString --(SIZE (1..ub-organization-name-length))
+
+--universal-organization-name EXTENSION-ATTRIBUTE ::= {
+--  UniversalOrganizationName
+--  IDENTIFIED BY  25
+--}
+
+UniversalOrganizationName ::= UniversalOrBMPString --{ub-organization-name-length}
+
+--teletex-personal-name EXTENSION-ATTRIBUTE ::= {
+--  TeletexPersonalName
+--  IDENTIFIED BY  4
+--}
+
+TeletexPersonalName ::= SET {
+  surname               [0]  TeletexString --(SIZE (1..ub-surname-length))--,
+  given-name
+    [1]  TeletexString --(SIZE (1..ub-given-name-length))-- OPTIONAL,
+  initials
+    [2]  TeletexString --(SIZE (1..ub-initials-length))-- OPTIONAL,
+  generation-qualifier
+    [3]  TeletexString --(SIZE (1..ub-generation-qualifier-length))-- OPTIONAL
+}
+
+--universal-personal-name EXTENSION-ATTRIBUTE ::= {
+--  UniversalPersonalName
+--  IDENTIFIED BY  26
+--}
+
+UniversalPersonalName ::= SET {
+  surname               [0]  UniversalOrBMPString --{ub-universal-surname-length}--,
+  --   If a language is specified within surname, then that language applies to each of the following
+  --   optional components unless the component specifies another language.
+  given-name
+    [1]  UniversalOrBMPString --{ub-universal-given-name-length}-- OPTIONAL,
+  initials
+    [2]  UniversalOrBMPString --{ub-universal-initials-length}-- OPTIONAL,
+  generation-qualifier
+    [3]  UniversalOrBMPString --{ub-universal-generation-qualifier-length}
+      OPTIONAL
+}
+
+--teletex-organizational-unit-names EXTENSION-ATTRIBUTE ::= {
+--  TeletexOrganizationalUnitNames
+--  IDENTIFIED BY  5
+--}
+
+TeletexOrganizationalUnitNames ::=
+  SEQUENCE --SIZE (1..ub-organizational-units)-- OF TeletexOrganizationalUnitName
+
+TeletexOrganizationalUnitName ::=
+  TeletexString --(SIZE (1..ub-organizational-unit-name-length))
+
+--universal-organizational-unit-names EXTENSION-ATTRIBUTE ::= {
+--  UniversalOrganizationalUnitNames
+--  IDENTIFIED BY  27
+--}
+
+UniversalOrganizationalUnitNames ::=
+  SEQUENCE --SIZE (1..ub-organizational-units)-- OF UniversalOrganizationalUnitName
+
+--     If a unit name specifies a language, then that language applies to subordinate unit names unless
+--     the subordinate specifies another language.
+UniversalOrganizationalUnitName ::=
+  UniversalOrBMPString --{ub-organizational-unit-name-length}
+
+UniversalOrBMPString --{INTEGER:ub-string-length}-- ::= SET {
+  character-encoding
+    CHOICE {two-octets   BMPString --(SIZE (1..ub-string-length))--,
+            four-octets  UniversalString --(SIZE (1..ub-string-length))-- },
+  iso-639-language-code  PrintableString --(SIZE (2 | 5))-- OPTIONAL
+}
+
+--pds-name EXTENSION-ATTRIBUTE ::= {PDSName
+--                                  IDENTIFIED BY  7
+--}
+
+PDSName ::= PrintableString --(SIZE (1..ub-pds-name-length))
+
+--physical-delivery-country-name EXTENSION-ATTRIBUTE ::= {
+--  PhysicalDeliveryCountryName
+--  IDENTIFIED BY  8
+--}
+
+PhysicalDeliveryCountryName ::= CHOICE {
+  x121-dcc-code         NumericString --(SIZE (ub-country-name-numeric-length)) --,
+  iso-3166-alpha2-code  PrintableString --(SIZE (ub-country-name-alpha-length))
+}
+
+--postal-code EXTENSION-ATTRIBUTE ::= {PostalCode
+--                                     IDENTIFIED BY  9
+--}
+
+PostalCode ::= CHOICE {
+  numeric-code    NumericString --(SIZE (1..ub-postal-code-length))--,
+  printable-code  PrintableString --(SIZE (1..ub-postal-code-length))
+}
+
+--physical-delivery-office-name EXTENSION-ATTRIBUTE ::= {
+--  PhysicalDeliveryOfficeName
+--  IDENTIFIED BY  10
+--}
+
+PhysicalDeliveryOfficeName ::= PDSParameter
+
+--universal-physical-delivery-office-name EXTENSION-ATTRIBUTE ::= {
+--  UniversalPhysicalDeliveryOfficeName
+--  IDENTIFIED BY  29
+--}
+
+UniversalPhysicalDeliveryOfficeName ::= UniversalPDSParameter
+
+--physical-delivery-office-number EXTENSION-ATTRIBUTE ::= {
+--  PhysicalDeliveryOfficeNumber
+--  IDENTIFIED BY  11
+--}
+
+PhysicalDeliveryOfficeNumber ::= PDSParameter
+
+--universal-physical-delivery-office-number EXTENSION-ATTRIBUTE ::= {
+--  UniversalPhysicalDeliveryOfficeNumber
+--  IDENTIFIED BY  30
+--}
+
+UniversalPhysicalDeliveryOfficeNumber ::= UniversalPDSParameter
+
+--extension-OR-address-components EXTENSION-ATTRIBUTE ::= {
+--  ExtensionORAddressComponents
+--  IDENTIFIED BY  12
+--}
+
+ExtensionORAddressComponents ::= PDSParameter
+
+--universal-extension-OR-address-components EXTENSION-ATTRIBUTE ::= {
+--  UniversalExtensionORAddressComponents
+--  IDENTIFIED BY  31
+--}
+
+UniversalExtensionORAddressComponents ::= UniversalPDSParameter
+
+--physical-delivery-personal-name EXTENSION-ATTRIBUTE ::= {
+--  PhysicalDeliveryPersonalName
+--  IDENTIFIED BY  13
+--}
+
+PhysicalDeliveryPersonalName ::= PDSParameter
+
+--universal-physical-delivery-personal-name EXTENSION-ATTRIBUTE ::= {
+--  UniversalPhysicalDeliveryPersonalName
+--  IDENTIFIED BY  32
+--}
+
+UniversalPhysicalDeliveryPersonalName ::= UniversalPDSParameter
+
+--physical-delivery-organization-name EXTENSION-ATTRIBUTE ::= {
+--  PhysicalDeliveryOrganizationName
+--  IDENTIFIED BY  14
+--}
+
+PhysicalDeliveryOrganizationName ::= PDSParameter
+
+--universal-physical-delivery-organization-name EXTENSION-ATTRIBUTE ::= 
+--{UniversalPhysicalDeliveryOrganizationName
+-- IDENTIFIED BY  33
+--}
+
+UniversalPhysicalDeliveryOrganizationName ::= UniversalPDSParameter
+
+--extension-physical-delivery-address-components EXTENSION-ATTRIBUTE ::= 
+--{ExtensionPhysicalDeliveryAddressComponents
+-- IDENTIFIED BY  15
+--}
+
+ExtensionPhysicalDeliveryAddressComponents ::= PDSParameter
+
+--universal-extension-physical-delivery-address-components EXTENSION-ATTRIBUTE
+--  ::= {UniversalExtensionPhysicalDeliveryAddressComponents
+--       IDENTIFIED BY  34
+--}
+
+UniversalExtensionPhysicalDeliveryAddressComponents ::= UniversalPDSParameter
+
+--unformatted-postal-address EXTENSION-ATTRIBUTE ::= {
+--  UnformattedPostalAddress
+--  IDENTIFIED BY  16
+--}
+
+UnformattedPostalAddress ::= SET {
+  printable-address
+    SEQUENCE --SIZE (1..ub-pds-physical-address-lines)-- OF
+      PrintableString --(SIZE (1..ub-pds-parameter-length))-- OPTIONAL,
+  teletex-string
+    TeletexString --(SIZE (1..ub-unformatted-address-length))-- OPTIONAL
+}
+
+--universal-unformatted-postal-address EXTENSION-ATTRIBUTE ::= {
+--  UniversalUnformattedPostalAddress
+--  IDENTIFIED BY  35
+--}
+
+UniversalUnformattedPostalAddress ::=
+  UniversalOrBMPString --{ub-unformatted-address-length}
+
+--street-address EXTENSION-ATTRIBUTE ::= {StreetAddress
+--                                        IDENTIFIED BY  17
+--}
+
+StreetAddress ::= PDSParameter
+
+--universal-street-address EXTENSION-ATTRIBUTE ::= {
+--  UniversalStreetAddress
+--  IDENTIFIED BY  36
+--}
+
+UniversalStreetAddress ::= UniversalPDSParameter
+
+--post-office-box-address EXTENSION-ATTRIBUTE ::= {
+--  PostOfficeBoxAddress
+--  IDENTIFIED BY  18
+--}
+
+PostOfficeBoxAddress ::= PDSParameter
+
+--universal-post-office-box-address EXTENSION-ATTRIBUTE ::= {
+--  UniversalPostOfficeBoxAddress
+--  IDENTIFIED BY  37
+--}
+
+UniversalPostOfficeBoxAddress ::= UniversalPDSParameter
+
+--poste-restante-address EXTENSION-ATTRIBUTE ::= {
+--  PosteRestanteAddress
+--  IDENTIFIED BY  19
+--}
+
+--PosteRestanteAddress ::= PDSParameter
+
+--universal-poste-restante-address EXTENSION-ATTRIBUTE ::= {
+--  UniversalPosteRestanteAddress
+--  IDENTIFIED BY  38
+--}
+
+UniversalPosteRestanteAddress ::= UniversalPDSParameter
+
+--unique-postal-name EXTENSION-ATTRIBUTE ::= {UniquePostalName
+--                                            IDENTIFIED BY  20
+--}
+
+UniquePostalName ::= PDSParameter
+
+--universal-unique-postal-name EXTENSION-ATTRIBUTE ::= {
+--  UniversalUniquePostalName
+--  IDENTIFIED BY  39
+--}
+
+UniversalUniquePostalName ::= UniversalPDSParameter
+
+--local-postal-attributes EXTENSION-ATTRIBUTE ::= {
+--  LocalPostalAttributes
+--  IDENTIFIED BY  21
+--}
+
+LocalPostalAttributes ::= PDSParameter
+
+--universal-local-postal-attributes EXTENSION-ATTRIBUTE ::= {
+--  UniversalLocalPostalAttributes
+--  IDENTIFIED BY  40
+--}
+
+UniversalLocalPostalAttributes ::= UniversalPDSParameter
+
+PDSParameter ::= SET {
+  printable-string  PrintableString --(SIZE (1..ub-pds-parameter-length))-- OPTIONAL,
+  teletex-string    TeletexString --(SIZE (1..ub-pds-parameter-length))-- OPTIONAL
+}
+
+UniversalPDSParameter ::= UniversalOrBMPString --{ub-pds-parameter-length}
+
+--extended-network-address EXTENSION-ATTRIBUTE ::= {
+--  ExtendedNetworkAddress
+--  IDENTIFIED BY  22
+--}
+
+ExtendedNetworkAddress ::= CHOICE {
+  e163-4-address
+    SEQUENCE {number
+                [0]  NumericString --(SIZE (1..ub-e163-4-number-length))--,
+              sub-address
+                [1]  NumericString --(SIZE (1..ub-e163-4-sub-address-length))--
+                  OPTIONAL},
+  psap-address    [0]  PresentationAddress
+}
+
+--terminal-type EXTENSION-ATTRIBUTE ::= {TerminalType
+--                                       IDENTIFIED BY  23
+--}
+
+TerminalType ::= INTEGER {
+  telex(3), teletex(4), g3-facsimile(5), g4-facsimile(6), ia5-terminal(7),
+  videotex(8)} --(0..ub-integer-options)
+
+--     Extension Domain-defined Attributes
+--teletex-domain-defined-attributes EXTENSION-ATTRIBUTE ::= {
+--  TeletexDomainDefinedAttributes
+--  IDENTIFIED BY  6
+--}
+
+TeletexDomainDefinedAttributes ::=
+  SEQUENCE --SIZE (1..ub-domain-defined-attributes)-- OF
+    TeletexDomainDefinedAttribute
+
+TeletexDomainDefinedAttribute ::= SEQUENCE {
+  type   TeletexString --(SIZE (1..ub-domain-defined-attribute-type-length))--,
+  value  TeletexString --(SIZE (1..ub-domain-defined-attribute-value-length))
+
+}
+
+--universal-domain-defined-attributes EXTENSION-ATTRIBUTE ::= {
+--  UniversalDomainDefinedAttributes
+--  IDENTIFIED BY  28
+--}
+
+UniversalDomainDefinedAttributes ::=
+  SEQUENCE --SIZE (1..ub-domain-defined-attributes)-- OF
+    UniversalDomainDefinedAttribute
+
+UniversalDomainDefinedAttribute ::= SEQUENCE {
+  type   UniversalOrBMPString --{ub-domain-defined-attribute-type-length}--,
+  value  UniversalOrBMPString --{ub-domain-defined-attribute-value-length}
+}
+
+--     Encoded Information Types
+EncodedInformationTypes ::= [APPLICATION 5]  SET {
+  built-in-encoded-information-types  [0]  BuiltInEncodedInformationTypes,
+  -- non-basic-parameters - -COMPONENTS OF NonBasicParameters,
+  g3-facsimile  [1]  G3FacsimileNonBasicParameters DEFAULT {},
+  teletex       [2]  TeletexNonBasicParameters DEFAULT {},
+  extended-encoded-information-types
+    [4]  ExtendedEncodedInformationTypes OPTIONAL
+}
+
+--     Built-in Encoded Information Types
+BuiltInEncodedInformationTypes ::= BIT STRING {
+  unknown(0), ia5-text(2), g3-facsimile(3), g4-class-1(4), teletex(5),
+  videotex(6), voice(7), sfd(8), mixed-mode(9)
+} --(SIZE (0..ub-built-in-encoded-information-types))
+
+--     Extended Encoded Information Types
+ExtendedEncodedInformationTypes ::=
+  SET --SIZE (1..ub-encoded-information-types)-- OF ExtendedEncodedInformationType
+
+ExtendedEncodedInformationType ::= OBJECT IDENTIFIER
+
+--     Non-basic Parameters
+NonBasicParameters ::= SET {
+  g3-facsimile  [1]  G3FacsimileNonBasicParameters DEFAULT {},
+  teletex       [2]  TeletexNonBasicParameters DEFAULT {}
+}
+
+G3FacsimileNonBasicParameters ::= BIT STRING {
+  two-dimensional(8), -- As defined in ITU-T Recommendation T.30
+  fine-resolution(9), --
+  unlimited-length(20), -- These bit values are chosen such that when
+  b4-length(21), -- encoded using ASN.1 Basic Encoding Rules
+  a3-width(22), -- the resulting octets have the same values
+  b4-width(23), -- as for T.30 encoding
+  t6-coding(25), --
+  uncompressed(30), -- Trailing zero bits are not significant.
+  width-middle-864-of-1728(37), -- It is recommended that implementations
+  width-middle-1216-of-1728(38), -- should not encode more than 32 bits unless
+  resolution-type(44), -- higher numbered bits are non-zero.
+  resolution-400x400(45), resolution-300x300(46), resolution-8x15(47), 
+  edi(49), dtm(50), bft(51), mixed-mode(58), character-mode(60),
+  twelve-bits(65), preferred-huffmann(66), full-colour(67), jpeg(68),
+  processable-mode-26(71)}
+
+TeletexNonBasicParameters ::= SET {
+  graphic-character-sets               [0]  TeletexString OPTIONAL,
+  control-character-sets               [1]  TeletexString OPTIONAL,
+  page-formats                         [2]  OCTET STRING OPTIONAL,
+  miscellaneous-terminal-capabilities  [3]  TeletexString OPTIONAL,
+  private-use
+    [4]  OCTET STRING
+      OPTIONAL -- maximum ub-teletex-private-use-length octets --
+}
+
+-- as defined in CCITT Recommendation T.62
+--     Token
+--Token ::= SEQUENCE {
+--  token-type-identifier  [0]  TOKEN.&id({TokensTable}),
+--  token
+--    [1]  TOKEN.&Type({TokensTable}{@token-type-identifier})
+--}
+
+--TOKEN ::= TYPE-IDENTIFIER
+
+--TokensTable TOKEN ::= {asymmetric-token, ...}
+
+--asymmetric-token TOKEN ::= {
+--  AsymmetricToken
+--  IDENTIFIED BY  id-tok-asymmetricToken
+--}
+
+--AsymmetricToken ::=
+--  SIGNED
+--    {SEQUENCE {signature-algorithm-identifier   AlgorithmIdentifier,
+--               name
+--                 CHOICE {recipient-name  RecipientName,
+--                         mta
+--                           [3]  SEQUENCE {global-domain-identifier
+--                                            GlobalDomainIdentifier OPTIONAL,
+--                                          mta-name                  MTAName
+--                         }},
+--               time                             Time,
+--               signed-data                      [0]  TokenData OPTIONAL,
+--               encryption-algorithm-identifier
+--                 [1]  AlgorithmIdentifier OPTIONAL,
+--               encrypted-data
+--                 [2]  ENCRYPTED{TokenData} OPTIONAL}}
+
+--TokenData ::= SEQUENCE {
+--  type   [0]  TOKEN-DATA.&id({TokenDataTable}),
+--  value  [1]  TOKEN-DATA.&Type({TokenDataTable}{@type})
+--}
+
+--TOKEN-DATA ::= CLASS {&id    INTEGER UNIQUE,
+--                      &Type  
+--}WITH SYNTAX {&Type
+--              IDENTIFIED BY &id
+--}
+
+--TokenDataTable TOKEN-DATA ::=
+--  {bind-token-signed-data | message-token-signed-data |
+--   message-token-encrypted-data | bind-token-encrypted-data, ...}
+
+--bind-token-signed-data TOKEN-DATA ::= {BindTokenSignedData
+--                                       IDENTIFIED BY  1
+--}
+
+--BindTokenSignedData ::= RandomNumber
+
+--RandomNumber ::= BIT STRING
+
+--message-token-signed-data TOKEN-DATA ::= {
+--  MessageTokenSignedData
+--  IDENTIFIED BY  2
+--}
+
+--MessageTokenSignedData ::= SEQUENCE {
+--  content-confidentiality-algorithm-identifier
+--    [0]  ContentConfidentialityAlgorithmIdentifier OPTIONAL,
+--  content-integrity-check
+--    [1]  ContentIntegrityCheck OPTIONAL,
+--  message-security-label
+--    [2]  MessageSecurityLabel OPTIONAL,
+--  proof-of-delivery-request
+--    [3]  ProofOfDeliveryRequest OPTIONAL,
+--  message-sequence-number                       [4]  INTEGER OPTIONAL
+--}
+
+--message-token-encrypted-data TOKEN-DATA ::= {
+--  MessageTokenEncryptedData
+--  IDENTIFIED BY  3
+--}
+
+--MessageTokenEncryptedData ::= SEQUENCE {
+--  content-confidentiality-key  [0]  EncryptionKey OPTIONAL,
+--  content-integrity-check      [1]  ContentIntegrityCheck OPTIONAL,
+--  message-security-label       [2]  MessageSecurityLabel OPTIONAL,
+--  content-integrity-key        [3]  EncryptionKey OPTIONAL,
+--  message-sequence-number      [4]  INTEGER OPTIONAL
+--}
+
+--EncryptionKey ::= BIT STRING
+
+--bind-token-encrypted-data TOKEN-DATA ::= {
+--  BindTokenEncryptedData
+--  IDENTIFIED BY  4
+--}
+
+--BindTokenEncryptedData ::= EXTERNAL
+
+--     Security Label
+SecurityLabel ::= SET {
+  security-policy-identifier  SecurityPolicyIdentifier OPTIONAL,
+  security-classification     SecurityClassification OPTIONAL,
+  privacy-mark                PrivacyMark OPTIONAL,
+  security-categories         SecurityCategories OPTIONAL
+}
+
+SecurityPolicyIdentifier ::= OBJECT IDENTIFIER
+
+SecurityClassification ::= INTEGER {
+  unmarked(0), unclassified(1), restricted(2), confidential(3), secret(4),
+  top-secret(5)}(0..ub-integer-options)
+
+PrivacyMark ::= PrintableString(SIZE (1..ub-privacy-mark-length))
+
+SecurityCategories ::= SET SIZE (1..ub-security-categories) OF SecurityCategory
+
+SecurityCategory ::= SEQUENCE {
+  type   [0]  OBJECT IDENTIFIER --SECURITY-CATEGORY.&id({SecurityCategoriesTable})--,
+  value  [1]  ANY -- SECURITY-CATEGORY.&Type({SecurityCategoriesTable}{@type})
+}
+
+--SECURITY-CATEGORY ::= TYPE-IDENTIFIER
+
+--SecurityCategoriesTable SECURITY-CATEGORY ::=
+--  {...}
+
+END -- of MTSAbstractService
+
+-- Generated by Asnp, the ASN.1 pretty-printer of France Telecom R&D
+
diff --git a/asn1/x411/x411.cnf b/asn1/x411/x411.cnf
new file mode 100644 (file)
index 0000000..80544e0
--- /dev/null
@@ -0,0 +1,292 @@
+#.TYPE_ATTR
+CountryName            TYPE = FT_UINT32  DISPLAY = BASE_DEC   STRINGS = VALS(x411_CountryName_vals)  BITMASK = 0
+Time                   TYPE = FT_STRING  DISPLAY = BASE_NONE  STRING = NULL BITMASK = 0
+
+#.MODULE_IMPORT
+InformationFramework x509if
+CertificateExtensions x509ce
+SelectedAttributeTypes x509sat
+AuthenticationFramework x509af
+
+#.INCLUDE ../x509ce/x509ce-exp.cnf
+#.INCLUDE ../x509if/x509if-exp.cnf
+#.INCLUDE ../x509sat/x509sat-exp.cnf
+#.INCLUDE ../x509af/x509af-exp.cnf
+
+#.EXPORTS
+EncodedInformationTypes
+ExtendedCertificates
+G3FacsimileNonBasicParameters
+MessageDeliveryTime
+ORName
+OtherMessageDeliveryFields
+SupplementaryInformation
+TeletexNonBasicParameters
+SecurityLabel
+
+#.TYPE_RENAME
+MTABindArgument/authenticated  AuthenticatedArgument
+MTABindResult/authenticated    AuthenticatedResult
+
+ExtensionField/value           ExtensionValue
+SecurityCategory/value         CategoryValue
+
+#.FIELD_RENAME
+TeletexPersonalName/surname    teletex-surname
+PersonalName/surname           printable-surname
+UniversalPersonalName/surname  universal-surname
+
+TeletexPersonalName/given-name teletex-given-name
+PersonalName/given-name                printable-given-name
+UniversalPersonalName/given-name       universal-given-name
+
+TeletexPersonalName/initials   teletex-initials
+PersonalName/initials          printable-initials
+UniversalPersonalName/initials universal-initials
+
+TeletexPersonalName/generation-qualifier       teletex-generation-qualifier
+PersonalName/generation-qualifier              printable-generation-qualifier
+UniversalPersonalName/generation-qualifier     universal-generation-qualifier
+
+BuiltInDomainDefinedAttribute/type     printable-type
+UniversalDomainDefinedAttribute/type   universal-type
+SecurityCategory/type                  category-type
+ExtensionField/type                    extension-type
+
+TeletexDomainDefinedAttribute/value    teletex-value
+BuiltInDomainDefinedAttribute/value    printable-value
+UniversalDomainDefinedAttribute/value  universal-value
+SecurityCategory/value                 category-value
+ExtensionField/value                   extension-value
+
+LastTraceInformation/report-type       trace-report-type
+PerRecipientReportDeliveryFields/report-type   delivery-report-type
+PerRecipientReportFields/report-type/delivery          report-type-delivery
+
+PerRecipientMessageSubmissionFields/recipient-name     submission-recipient-name
+PerRecipientProbeSubmissionFields/recipient-name       probe-recipient-name
+
+PerRecipientReportTransferFields/actual-recipient-name mta-actual-recipient-name
+
+MessageClass/priority                  class-priority
+DeliveryQueue/octets                   delivery-queue-octets
+PerRecipientReportFields/report-type/non-delivery      non-delivery-report
+
+MTABindResult/authenticated    authenticated-result
+MTABindArgument/authenticated  authenticated-argument
+
+MTABindResult/authenticated/responder-name     authenticated-responder-name
+MTABindArgument/authenticated/initiator-name   authenticated-initiator-name
+
+RegistrationTypes/extensions           type-extensions
+RegistrationTypes/extensions/_item     type-extensions-item
+
+MessageSubmissionArgument/envelope     message-submission-envelope
+
+OtherMessageDeliveryFields/content-type        delivered-content-type
+Report/content                         report-content
+
+PerDomainBilateralInformation/domain   bilateral-domain
+
+Report/envelope                                report-envelope
+Message/envelope                       message-envelope
+
+PerRecipientReportTransferFields/originally-intended-recipient-name    report-originally-intended-recipient-name
+
+MessageSubmissionEnvelope/originator-name      mts-originator-name
+ProbeSubmissionEnvelope/originator-name                mts-originator-name
+
+MessageTransferEnvelope/originator-name                mta-originator-name
+ProbeTransferEnvelope/originator-name          mta-originator-name
+
+MessageSubmissionEnvelope/per-recipient-fields per-recipient-message-submission-fields
+ProbeTransferEnvelope/per-recipient-fields     per-recipient-probe-transfer-fields
+ProbeSubmissionEnvelope/per-recipient-fields   per-recipient-probe-submission-fields
+ReportDeliveryArgument/per-recipient-fields    per-recipient-report-delivery-fields
+ReportDeliveryEnvelope/per-recipient-fields    per-recipient-report-delivery-fields
+
+MessageSubmissionEnvelope/per-recipient-fields/_item   per-recipient-message-submission-fields-item
+ProbeTransferEnvelope/per-recipient-fields/_item       per-recipient-probe-transfer-fields-item
+ProbeSubmissionEnvelope/per-recipient-fields/_item     per-recipient-probe-submission-fields-item
+ReportDeliveryArgument/per-recipient-fields/_item      per-recipient-report-delivery-fields-item
+ReportDeliveryEnvelope/per-recipient-fields/_item      per-recipient-report-delivery-fields-item
+
+MessageTransferEnvelope/per-recipient-fields/_item     per-recipient-message-fields-item
+
+
+
+MessageTransferEnvelope/per-recipient-fields           per-recipient-message-fields
+ReportTransferContent/per-recipient-fields             per-recipient-report-fields
+
+#.REGISTER
+RecipientReassignmentProhibited B "x411.extension.1" "recipient-reassignment-prohibited"
+MTSOriginatorRequestedAlternateRecipient B "x411.extension.2" "originator-requested-alternate-recipient"
+DLExpansionProhibited B "x411.extension.3" "dl-expansion-prohibited"
+ConversionWithLossProhibited B "x411.extension.4" "conversion-with-loss-prohibited"
+LatestDeliveryTime B "x411.extension.5" "latest-delivery-time"
+RequestedDeliveryMethod B "x411.extension.6" "requested-delivery-method"
+PhysicalForwardingProhibited B "x411.extension.7" "physical-forwarding-prohibited"
+PhysicalForwardingAddressRequest B "x411.extension.8" "physical-forwarding-address-request"
+PhysicalDeliveryModes B "x411.extension.9" "physical-delivery-modes"
+RegisteredMailType B "x411.extension.10" "registered-mail-type"
+RecipientNumberForAdvice B "x411.extension.11" "recipient-number-for-advice"
+PhysicalRenditionAttributes B "x411.extension.12" "physical-rendition-attributes"
+OriginatorReturnAddress B "x411.extension.13" "originator-return-address"
+PhysicalDeliveryReportRequest B "x411.extension.14" "physical-delivery-report-request"
+OriginatorCertificate B "x411.extension.15" "originator-certificate"
+
+ContentConfidentialityAlgorithmIdentifier B "x411.extension.17" "content-confidentiality-algorithm-identifier"
+
+
+MessageSecurityLabel B "x411.extension.20" "message-security-label"
+ProofOfSubmissionRequest B "x411.extension.21" "proof-of-submission-request"
+ProofOfDeliveryRequest B "x411.extension.22" "proof-of-delivery-request"
+ContentCorrelator B "x411.extension.23" "content-correlator"
+
+RedirectionHistory B "x411.extension.25" "redirection-history"
+DLExpansionHistory B "x411.extension.26" "dl-expansion-history"
+PhysicalForwardingAddress B "x411.extension.27" "physical-forwarding-address"
+
+
+OriginatorAndDLExpansionHistory B "x411.extension.30" "originator-and-DL-expansion-history"
+ReportingDLName B "x411.extension.31" "reporting-DL-name"
+ReportingMTACertificate B "x411.extension.32" "reporting-MTA-certificate"
+
+TraceInformation B "x411.extension.37" "trace-information"
+InternalTraceInformation B "x411.extension.38" "internal-trace-information"
+ReportingMTAName B "x411.extension.39" "reporting-MTA-name"
+ExtendedCertificates B "x411.extension.40" "multiple-originator-certificates"
+
+DLExemptedRecipients B "x411.extension.42" "dl-exempted-recipients"
+
+
+CertificateSelectors B "x411.extension.45" "certificate-selectors"
+
+CommonName B "x411.extension-attribute.1" "common-name"
+TeletexCommonName B "x411.extension-attribute.2" "teletex-common-name"
+TeletexOrganizationName B "x411.extension-attribute.3" "teletex-organization-name"
+TeletexPersonalName B "x411.extension-attribute.4" "teletex-personal-name"
+TeletexOrganizationalUnitNames B "x411.extension-attribute.5" "teletex-organizational-unit-names"
+
+PDSName B "x411.extension-attribute.7" "pds-name"
+PhysicalDeliveryCountryName B "x411.extension-attribute.8" "physical-delivery-country-name"
+PostalCode B "x411.extension-attribute.9" "postal-code"
+PhysicalDeliveryOfficeName B "x411.extension-attribute.10" "physical-delivery-office-name"
+
+
+UniversalCommonName B "x411.extension-attribute.24" "universal-common-name"
+UniversalOrganizationName B "x411.extension-attribute.25" "universal-organization-name"
+UniversalPersonalName B "x411.extension-attribute.26" "universal-personal-name"
+UniversalOrganizationalUnitNames B "x411.extension-attribute.27" "universal-organizational-unit-names"
+
+#.FN_BODY AdditionalInformation
+/*XXX not implemented yet */
+
+#.FN_BODY T_extensions_item
+/*XXX not implemented yet */
+
+#.FN_BODY ExtensionValue
+
+       offset=call_x411_oid_callback("x411.extension", tvb, offset, pinfo, tree);
+
+#.FN_BODY CategoryValue
+
+       offset = dissect_unknown_ber(pinfo, tvb, offset, tree);
+
+#.FN_BODY T_extension_attribute_value
+
+       offset=call_x411_oid_callback("x411.extension-attribute", tvb, offset, pinfo, tree);
+
+#.FN_BODY T_refused_extension
+/*XXX not implemented yet */
+
+#.FN_BODY CountryName
+ gint8 class;
+ gboolean pc, ind_field;
+ gint32 tag;
+ gint32 len1;
+
+ if(!implicit_tag){
+   /* XXX  asn2eth can not yet handle tagged assignment yes so this
+    * XXX is some conformance file magic to work around that bug
+    */
+    offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
+    offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
+ }
+  offset = dissect_ber_choice(pinfo, tree, tvb, offset,
+                              CountryName_choice, hf_index, ett_x411_CountryName, NULL);
+
+#.FN_BODY AdministrationDomainName
+ gint8 class;
+ gboolean pc, ind_field;
+ gint32 tag;
+ gint32 len1;
+
+ if(!implicit_tag){
+   /* XXX  asn2eth can not yet handle tagged assignment yes so this
+    * XXX is some conformance file magic to work around that bug
+    */
+    offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
+    offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
+ }
+
+  offset = dissect_ber_choice(pinfo, tree, tvb, offset,
+                              AdministrationDomainName_choice, hf_index, ett_x411_AdministrationDomainName, NULL);
+
+#.FN_BODY ContentIdentifier
+ gint8 class;
+ gboolean pc, ind_field;
+ gint32 tag;
+ gint32 len1;
+
+ if(!implicit_tag){
+   /* XXX  asn2eth can not yet handle tagged assignment yes so this
+    * XXX is some conformance file magic to work around that bug
+    */
+    offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
+    offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
+ }
+
+  /* this is magic I haven't seen used before - I've stripped the tag - but now I'm going to say it is IMPLICIT! */
+  offset = dissect_ber_restricted_string(TRUE, BER_UNI_TAG_PrintableString,
+                                         pinfo, tree, tvb, offset, hf_index,
+                                         NULL);
+
+
+#.FN_BODY INTEGER
+
+  offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
+                                  &extension_id);
+
+#.FN_BODY ExtendedContentType
+  offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset,
+                                         hf_index, object_identifier_id);
+
+
+#.FN_BODY BuiltInContentType
+  guint32      ict = -1;       
+
+  offset = dissect_ber_integer(implicit_tag, pinfo, tree, tvb, offset, hf_index,
+                                  &ict);
+
+  /* convert integer content type to oid for dispatch when the content is found */
+  switch(ict) {
+       case 2:
+       strcpy(object_identifier_id, "2.6.1.10.0");
+       break;
+       case 22:
+       strcpy(object_identifier_id, "2.6.1.10.1");
+       break;
+       default:
+       break;
+       }
+
+#.FN_BODY Content
+  tvbuff_t *next_tvb;
+
+  /* we can do this now constructed octet strings are supported */
+  offset = dissect_ber_octet_string(FALSE, pinfo, tree, tvb, offset, hf_index, &next_tvb);
+
+  (void) call_ber_oid_callback(object_identifier_id, next_tvb, 0, pinfo, tree);
+
+#.END
diff --git a/asn1/x420/Makefile b/asn1/x420/Makefile
new file mode 100644 (file)
index 0000000..1dfe7a3
--- /dev/null
@@ -0,0 +1,17 @@
+# $Id$
+
+DISSECTOR_FILES=packet-x420.c packet-x420.h
+
+all: generate_dissector
+
+generate_dissector: $(DISSECTOR_FILES)
+
+$(DISSECTOR_FILES): ../../tools/asn2eth.py x420.asn packet-x420-template.c packet-x420-template.h x420.cnf
+       python ../../tools/asn2eth.py -X -b -e -p x420 -c x420.cnf -s packet-x420-template  x420.asn
+
+clean:
+       rm -f parsetab.py $(DISSECTOR_FILES)
+
+copy_files: generate_dissector
+       cp $(DISSECTOR_FILES) ../../epan/dissectors
+
diff --git a/asn1/x420/Makefile.nmake b/asn1/x420/Makefile.nmake
new file mode 100644 (file)
index 0000000..787c3c3
--- /dev/null
@@ -0,0 +1,42 @@
+## Use: $(MAKE) /$(MAKEFLAGS) -f makefile.nmake
+#
+# $Id$
+
+include ../../config.nmake
+
+UNIX2DOS=$(PERL) ../../tools/unix2dos.pl
+
+PROTOCOL_NAME=x420
+DISSECTOR_FILES=packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).h
+
+all: generate_dissector
+
+generate_dissector: $(DISSECTOR_FILES)
+
+$(DISSECTOR_FILES): ../../tools/asn2eth.py $(PROTOCOL_NAME).asn packet-$(PROTOCOL_NAME)-template.c packet-$(PROTOCOL_NAME)-template.h $(PROTOCOL_NAME).cnf
+!IFDEF PYTHON
+       $(PYTHON) ../../tools/asn2eth.py -X -b -e -p $(PROTOCOL_NAME) -c $(PROTOCOL_NAME).cnf -s packet-$(PROTOCOL_NAME)-template $(PROTOCOL_NAME).asn
+!ELSE
+       @echo Error: You need Python to use asn2eth.py
+       @exit 1
+!ENDIF
+
+clean:
+       rm -f parsetab.py $(DISSECTOR_FILES)
+
+# Fix EOL in generated dissectors. Cygwin's python generates files with 
+# mixed EOL styles, which can't be commited to the SVN repository.
+# Stuff included from template and "cnf" files has "\r\n" on windows, while 
+# the generated stuff has "\n".
+
+fix_eol: generate_dissector
+       move packet-$(PROTOCOL_NAME).c packet-$(PROTOCOL_NAME).c.tmp
+       move packet-$(PROTOCOL_NAME).h packet-$(PROTOCOL_NAME).h.tmp
+       $(UNIX2DOS) < packet-$(PROTOCOL_NAME).c.tmp > packet-$(PROTOCOL_NAME).c
+       $(UNIX2DOS) < packet-$(PROTOCOL_NAME).h.tmp > packet-$(PROTOCOL_NAME).h
+       del /f packet-$(PROTOCOL_NAME).c.tmp packet-$(PROTOCOL_NAME).h.tmp
+
+copy_files: generate_dissector fix_eol
+       xcopy packet-$(PROTOCOL_NAME).c ..\..\epan\dissectors /d /y
+       xcopy packet-$(PROTOCOL_NAME).h ..\..\epan\dissectors /d /y
+
diff --git a/asn1/x420/packet-x420-template.c b/asn1/x420/packet-x420-template.c
new file mode 100644 (file)
index 0000000..d7a55fd
--- /dev/null
@@ -0,0 +1,123 @@
+/* packet-x420.c
+ * Routines for X.420 (X.400 Message Transfer)  packet dissection
+ * Graeme Lunt 2005
+ *
+ * $Id$
+ *
+ * Ethereal - Network traffic analyzer
+ * By Gerald Combs <gerald@ethereal.com>
+ * Copyright 1998 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+#include <glib.h>
+#include <epan/packet.h>
+#include <epan/conversation.h>
+
+#include <stdio.h>
+#include <string.h>
+
+#include "packet-ber.h"
+#include "packet-acse.h"
+#include "packet-ros.h"
+
+#include "packet-x509af.h"
+#include "packet-x411.h"
+
+#include "packet-x420.h"
+
+#define PNAME  "X.420 OSI Information Object"
+#define PSNAME "X420"
+#define PFNAME "x420"
+
+/* Initialize the protocol and registered fields */
+int proto_x420 = -1;
+
+static char object_identifier_id[BER_MAX_OID_STR_LEN]; /* content type identifier */
+
+#include "packet-x420-hf.c"
+
+/* Initialize the subtree pointers */
+static gint ett_x420 = -1;
+#include "packet-x420-ett.c"
+
+#include "packet-x420-fn.c"
+
+/*
+* Dissect X420 PDUs inside a PPDU.
+*/
+static void
+dissect_x420(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
+{
+       int offset = 0;
+       int old_offset;
+       proto_item *item=NULL;
+       proto_tree *tree=NULL;
+       int (*x420_dissector)(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) = NULL;
+       char *x420_op_name;
+
+       if(parent_tree){
+               item = proto_tree_add_item(parent_tree, proto_x420, tvb, 0, -1, FALSE);
+               tree = proto_item_add_subtree(item, ett_x420);
+       }
+       if (check_col(pinfo->cinfo, COL_PROTOCOL))
+               col_set_str(pinfo->cinfo, COL_PROTOCOL, "X420");
+       if (check_col(pinfo->cinfo, COL_INFO))
+         col_add_str(pinfo->cinfo, COL_INFO, "Interpersonal Message");
+
+       dissect_x420_InformationObject(TRUE, tvb, offset, pinfo , tree, -1);
+}
+
+
+/*--- proto_register_x420 -------------------------------------------*/
+void proto_register_x420(void) {
+
+  /* List of fields */
+  static hf_register_info hf[] =
+  {
+#include "packet-x420-hfarr.c"
+  };
+
+  /* List of subtrees */
+  static gint *ett[] = {
+    &ett_x420,
+#include "packet-x420-ettarr.c"
+  };
+
+  /* Register protocol */
+  proto_x420 = proto_register_protocol(PNAME, PSNAME, PFNAME);
+  register_dissector("x420", dissect_x420, proto_x420);
+  /* Register fields and subtrees */
+  proto_register_field_array(proto_x420, hf, array_length(hf));
+  proto_register_subtree_array(ett, array_length(ett));
+
+}
+
+
+/*--- proto_reg_handoff_x420 --- */
+void proto_reg_handoff_x420(void) {
+
+#include "packet-x420-dis-tab.c" 
+
+  register_ber_oid_dissector("2.6.1.10.0", dissect_x420, proto_x420, "InterPersonal Message (1984)");
+  register_ber_oid_dissector("2.6.1.10.1", dissect_x420, proto_x420, "InterPersonal Message (1988)");
+  register_ber_oid_dissector("1.3.26.0.4406.0.4.1", dissect_x420, proto_x420, "Military Message");
+
+}
diff --git a/asn1/x420/packet-x420-template.h b/asn1/x420/packet-x420-template.h
new file mode 100644 (file)
index 0000000..68c9880
--- /dev/null
@@ -0,0 +1,31 @@
+/* packet-x420.h
+ * Routines for X.420 (X.400 Message Transfer) packet dissection
+ * Graeme Lunt 2005
+ *
+ * $Id$
+ *
+ * Ethereal - Network traffic analyzer
+ * By Gerald Combs <gerald@ethereal.com>
+ * Copyright 1998 Gerald Combs
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
+#ifndef PACKET_X420_H
+#define PACKET_X420_H
+
+/*#include "packet-x420-exp.h"*/
+
+#endif  /* PACKET_X420_H */
diff --git a/asn1/x420/x420-exp.cnf b/asn1/x420/x420-exp.cnf
new file mode 100644 (file)
index 0000000..d515220
--- /dev/null
@@ -0,0 +1,8 @@
+#.IMPORT_TAG
+ORDescriptor             BER_CLASS_UNI BER_UNI_TAG_SET
+#.END
+
+#.TYPE_ATTR
+ORDescriptor             TYPE = FT_NONE    DISPLAY = BASE_NONE  STRINGS = NULL  BITMASK = 0
+#.END
+
diff --git a/asn1/x420/x420.asn b/asn1/x420/x420.asn
new file mode 100644 (file)
index 0000000..2e24e21
--- /dev/null
@@ -0,0 +1,640 @@
+-- Module IPMSInformationObjects (X.420:06/1999)
+IPMSInformationObjects {joint-iso-itu-t mhs(6) ipms(1) modules(0)
+  information-objects(2) version-1999(1)} DEFINITIONS IMPLICIT TAGS ::=
+BEGIN
+
+-- Prologue
+-- Exports everything.
+IMPORTS
+  -- IPMS Extended Body Parts
+--  bilaterally-defined-body-part, encrypted-body-part, g3-facsimile-body-part,
+--    g4-class1-body-part, ia5-text-body-part, message-body-part,
+--    mixed-mode-body-part, nationally-defined-body-part, teletex-body-part,
+--    videotex-body-part
+    --==
+--    FROM IPMSExtendedBodyPartTypes {joint-iso-itu-t mhs(6) ipms(1) modules(0)
+--      extended-body-part-types(7) version-1994(0)}
+--  general-text-body-part
+    --==
+--    FROM IPMSExtendedBodyPartTypes2 {iso standard mhs(10021) ipms(7) 
+--      modules(0) extended-body-part-types-2(1)}
+--  file-transfer-body-part
+    --==
+--    FROM IPMSFileTransferBodyPartType {joint-iso-itu-t mhs(6) ipms(1)
+--      modules(0) file-transfer-body-part-type(9)}
+--  voice-body-part
+    --==
+--    FROM IPMSExtendedVoiceBodyPartType {joint-iso-itu-t mhs(6) ipms(1)
+--      modules(0) extended-voice-body-part-type(11)}
+--  notification-body-part, report-body-part
+    --==
+--    FROM IPMSForwardedReportBodyPartType {joint-iso-itu-t mhs(6) ipms(1)
+--      modules(0) forwarded-report-body-part-type(12)}
+--  content-body-part{}
+    --==
+--    FROM IPMSForwardedContentBodyPartType {joint-iso-itu-t mhs(6) ipms(1)
+--      modules(0) forwarded-content-body-part-type(15)}
+--  pkcs7-body-part
+    --==
+--    FROM PKCS7BodyPartType {joint-iso-itu-t mhs(6) ipms(1) modules(0)
+--      pkcs7-body-part-type(16)}
+  -- IPMS Heading Extensions
+--  authorization-time, auto-submitted, body-part-signatures,
+--    circulation-list-indicator, circulation-list-recipients,
+--    distribution-codes, extended-subject, incomplete-copy,
+--    information-category, ipm-security-label, languages,
+--    manual-handling-instructions, originators-reference, precedence,
+--    precedence-policy-identifier
+    --==
+--    FROM IPMSHeadingExtensions {joint-iso-itu-t mhs(6) ipms(1) modules(0)
+--      heading-extensions(6) version-1999(1)}
+  -- IPMS Security Extensions
+--  body-part-encryption-token, BodyPartTokens, forwarded-content-token,
+--    ForwardedContentToken, ipn-security-response, recipient-security-request
+    --==
+--    FROM IPMSSecurityExtensions {joint-iso-itu-t mhs(6) ipms(1) modules(0)
+--      ipm-security-extensions(14) version-1999(1)}
+  -- IPMS Upper bounds
+--  ub-auto-forward-comment, ub-free-form-name, ub-local-ipm-identifier,
+--    ub-subject-field, ub-telephone-number
+    --==
+--    FROM IPMSUpperBounds {joint-iso-itu-t mhs(6) ipms(1) modules(0)
+--      upper-bounds(10) version-1999(1)}
+  -- ODIF
+--  Interchange-Data-Element
+    --==
+--    FROM Interchange-Data-Elements {2 8 1 5 5}
+  -- MTS Abstract Service
+  EncodedInformationTypes, ExtendedCertificates, EXTENSION,
+    G3FacsimileNonBasicParameters, MessageDeliveryTime, ORName,
+    OtherMessageDeliveryFields, SupplementaryInformation,
+    TeletexNonBasicParameters
+    --==
+    FROM MTSAbstractService {joint-iso-itu-t mhs(6) mts(3) modules(0)
+      mts-abstract-service(1) version-1999(1)}
+  -- MS Abstract Service
+--  MS-EXTENSION, SequenceNumber
+    --==
+--    FROM MSAbstractService {joint-iso-itu-t mhs(6) ms(4) modules(0)
+--      abstract-service(1) version-1999(1)}
+  -- Directory Authentication Framework
+  AlgorithmIdentifier, ENCRYPTED{}
+    --==
+    FROM AuthenticationFramework {joint-iso-itu-t ds(5) module(1)
+      authenticationFramework(7) 3}
+  -- IPMS Object Identifiers
+--  id-mst-assembly-capability, id-mst-assembly-instructions,
+--    id-mst-invalid-assembly-instructions, id-mst-invalid-ipn,
+--    id-mst-originator-body-part-encryption-token,
+--    id-mst-originator-forwarded-content-token,
+--    id-mst-suspend-auto-acknowledgement, id-mst-prevent-nrn-generation,
+--    id-on-absence-advice, id-on-change-of-address-advice
+    --==
+--    FROM IPMSObjectIdentifiers {joint-iso-itu-t mhs(6) ipms(1) modules(0)
+--      object-identifiers(0) version-1999(1)} --;
+
+Time ::= UTCTime
+
+-- Information object
+InformationObject ::= CHOICE {ipm  [0]  IPM,
+                              ipn  [1]  IPN
+}
+
+-- IPM
+IPM ::= SEQUENCE {heading  Heading,
+                  body     Body
+}
+
+-- MTS Extensions
+--IPMPerRecipientEnvelopeExtensions EXTENSION ::=
+--  {blind-copy-recipients | body-part-encryption-token |
+--   forwarded-content-token, ...}
+
+-- IPMS Extensions
+IPMSExtension --{IPMS-EXTENSION:ChosenFrom}-- ::= SEQUENCE {
+  type   OBJECT IDENTIFIER, --IPMS-EXTENSION.&id({ChosenFrom}),
+  value  ANY --IPMS-EXTENSION.&Type({ChosenFrom}{@type}) DEFAULT NULL:NULL
+}
+
+--IPMS-EXTENSION ::= CLASS {&id    OBJECT IDENTIFIER UNIQUE,
+--                          &Type  DEFAULT NULL
+--}WITH SYNTAX {[VALUE &Type,]
+--              IDENTIFIED BY &id
+--}
+
+--PrivateIPMSExtensions IPMS-EXTENSION ::=
+--  {...}
+
+-- Heading
+Heading ::= SET {
+  this-IPM               ThisIPMField,
+  originator             [0]  OriginatorField OPTIONAL,
+  authorizing-users      [1]  AuthorizingUsersField OPTIONAL,
+  primary-recipients     [2]  PrimaryRecipientsField DEFAULT {},
+  copy-recipients        [3]  CopyRecipientsField DEFAULT {},
+  blind-copy-recipients  [4]  BlindCopyRecipientsField OPTIONAL,
+  replied-to-IPM         [5]  RepliedToIPMField OPTIONAL,
+  obsoleted-IPMs         [6]  ObsoletedIPMsField DEFAULT {},
+  related-IPMs           [7]  RelatedIPMsField DEFAULT {},
+  subject                [8] EXPLICIT SubjectField OPTIONAL,
+  expiry-time            [9]  ExpiryTimeField OPTIONAL,
+  reply-time             [10]  ReplyTimeField OPTIONAL,
+  reply-recipients       [11]  ReplyRecipientsField OPTIONAL,
+  importance             [12]  ImportanceField DEFAULT normal,
+  sensitivity            [13]  SensitivityField OPTIONAL,
+  auto-forwarded         [14]  AutoForwardedField DEFAULT FALSE,
+  extensions             [15]  ExtensionsField DEFAULT {}
+}
+
+-- Heading component types
+IPMIdentifier ::= [APPLICATION 11]  SET {
+  user                      ORName OPTIONAL,
+  user-relative-identifier  LocalIPMIdentifier
+}
+
+LocalIPMIdentifier ::= PrintableString(SIZE (0..ub-local-ipm-identifier))
+
+RecipientSpecifier ::= SET {
+  recipient              [0]  ORDescriptor,
+  notification-requests  [1]  NotificationRequests DEFAULT {},
+  reply-requested        [2]  BOOLEAN DEFAULT FALSE,
+  recipient-extensions   [3]  RecipientExtensionsField OPTIONAL
+}
+
+ORDescriptor ::= SET {
+  formal-name       ORName OPTIONAL,
+  free-form-name    [0]  FreeFormName OPTIONAL,
+  telephone-number  [1]  TelephoneNumber OPTIONAL
+}
+
+FreeFormName ::= TeletexString(SIZE (0..ub-free-form-name))
+
+TelephoneNumber ::= PrintableString(SIZE (0..ub-telephone-number))
+
+NotificationRequests ::= BIT STRING {
+  rn(0), nrn(1), ipm-return(2), an-supported(3), suppress-an(4)}
+
+RecipientExtensionsField ::= SET OF IPMSExtension --{{RecipientExtensions}}
+
+--RecipientExtensions IPMS-EXTENSION ::=
+--  {circulation-list-indicator | precedence | recipient-security-request |
+--   PrivateIPMSExtensions, ...}
+
+-- This IPM heading field
+ThisIPMField ::= IPMIdentifier
+
+-- Originator heading field
+OriginatorField ::= ORDescriptor
+
+-- Authorizing Users heading field
+AuthorizingUsersField ::= SEQUENCE OF AuthorizingUsersSubfield
+
+AuthorizingUsersSubfield ::= ORDescriptor
+
+-- Primary Recipients heading field
+PrimaryRecipientsField ::= SEQUENCE OF PrimaryRecipientsSubfield
+
+PrimaryRecipientsSubfield ::= RecipientSpecifier
+
+-- Copy Recipients heading field
+CopyRecipientsField ::= SEQUENCE OF CopyRecipientsSubfield
+
+CopyRecipientsSubfield ::= RecipientSpecifier
+
+-- Blind Copy Recipients heading field
+BlindCopyRecipientsField ::= SEQUENCE OF BlindCopyRecipientsSubfield
+
+BlindCopyRecipientsSubfield ::= RecipientSpecifier
+
+-- Blind Copy Recipients envelope field
+--blind-copy-recipients EXTENSION ::= {
+--  BlindCopyRecipientsField,
+--  IDENTIFIED BY  standard-extension:41
+--}
+
+-- Replied-to IPM heading field
+RepliedToIPMField ::= IPMIdentifier
+
+-- Obsoleted IPMs heading field
+ObsoletedIPMsField ::= SEQUENCE OF ObsoletedIPMsSubfield
+
+ObsoletedIPMsSubfield ::= IPMIdentifier
+
+-- Related IPMs heading field
+RelatedIPMsField ::= SEQUENCE OF RelatedIPMsSubfield
+
+RelatedIPMsSubfield ::= IPMIdentifier
+
+-- Subject heading field
+SubjectField ::= TeletexString(SIZE (0..ub-subject-field))
+
+-- Expiry Time heading field
+ExpiryTimeField ::= Time
+
+-- Reply Time heading field
+ReplyTimeField ::= Time
+
+-- Reply Recipients heading field
+ReplyRecipientsField ::= SEQUENCE OF ReplyRecipientsSubfield
+
+ReplyRecipientsSubfield ::=
+  ORDescriptor --(WITH COMPONENTS {
+--                 ...,
+--                 formal-name  PRESENT
+--               })
+
+-- Importance heading field
+ImportanceField ::= ENUMERATED {low(0), normal(1), high(2)}
+
+-- Sensitivity heading field
+SensitivityField ::= ENUMERATED {
+  personal(1), private(2), company-confidential(3)}
+
+-- Auto-forwarded heading field
+AutoForwardedField ::= BOOLEAN
+
+-- Extensions heading field
+ExtensionsField ::= SET OF IPMSExtension --{{HeadingExtensions}}
+
+--HeadingExtensions IPMS-EXTENSION ::=
+--  {authorization-time | auto-submitted | body-part-signatures |
+--   circulation-list-recipients | distribution-codes | extended-subject |
+--   incomplete-copy | information-category | ipm-security-label | languages |
+--   manual-handling-instructions | originators-reference |
+--   precedence-policy-identifier | PrivateIPMSExtensions, ...}
+
+-- Body
+Body ::= SEQUENCE OF BodyPart
+
+-- asn2eth seems to have problems with this CHOICE CHOICE
+BodyPart ::= CHOICE {
+--  basic
+--    CHOICE { -- ia5-text             [0]  IA5TextBodyPart,
+            g3-facsimile         [3]  G3FacsimileBodyPart,
+            g4-class1            [4]  G4Class1BodyPart,
+            teletex              [5]  TeletexBodyPart,
+            videotex             [6]  VideotexBodyPart,
+            encrypted            [8]  EncryptedBodyPart,
+            message              [9]  MessageBodyPart,
+            mixed-mode           [11]  MixedModeBodyPart,
+            bilaterally-defined  [14]  BilaterallyDefinedBodyPart,
+            nationally-defined   [7]  NationallyDefinedBodyPart --} --,
+           extended  [15]  ExtendedBodyPart --{{IPMBodyPartTable}}
+}
+
+
+-- Extended body part
+ExtendedBodyPart --{EXTENDED-BODY-PART-TYPE:IPMBodyPartTable}-- ::= SEQUENCE {
+  parameters  [0]  OBJECT IDENTIFIER, --INSTANCE OF TYPE-IDENTIFIER OPTIONAL,
+  data        ANY -- INSTANCE OF TYPE-IDENTIFIER
+}
+--(CONSTRAINED BY { - - must correspond to the &parameters field and &data field of a member of --
+--   IPMBodyPartTable})
+
+--IPMBodyPartTable EXTENDED-BODY-PART-TYPE ::=
+--  {StandardBodyParts | ApplicationSpecificBodyParts}
+
+--StandardBodyParts EXTENDED-BODY-PART-TYPE ::=
+--  {ia5-text-body-part | g3-facsimile-body-part | g4-class1-body-part |
+--   teletex-body-part | videotex-body-part | encrypted-body-part |
+--   message-body-part | mixed-mode-body-part | bilaterally-defined-body-part |
+--   nationally-defined-body-part | general-text-body-part |
+--   file-transfer-body-part | voice-body-part | report-body-part |
+--   notification-body-part |
+--   content-body-part{{1 2 3 - - RELATIVE-OID to be provided - -}} |
+--   pkcs7-body-part, ...}
+
+--ApplicationSpecificBodyParts EXTENDED-BODY-PART-TYPE ::=
+--  {- -any body part defined in other Specifications, or for proprietary or private use 
+--   ...}
+
+--EXTENDED-BODY-PART-TYPE ::= CLASS {
+--  &parameters  TYPE-IDENTIFIER OPTIONAL,
+--  &data        TYPE-IDENTIFIER
+--}WITH SYNTAX {[PARAMETERS &parameters,]
+--              DATA &data
+--}
+
+-- IA5 Text body part
+IA5TextBodyPart ::= SEQUENCE {
+  parameters  IA5TextParameters,
+  data        IA5TextData
+}
+
+IA5TextParameters ::= SET {repertoire  [0]  Repertoire DEFAULT ia5
+}
+
+IA5TextData ::= IA5String
+
+Repertoire ::= ENUMERATED {ita2(2), ia5(5)}
+
+-- G3 Facsimile body part
+G3FacsimileBodyPart ::= SEQUENCE {
+  parameters  G3FacsimileParameters,
+  data        G3FacsimileData
+}
+
+G3FacsimileParameters ::= SET {
+  number-of-pages       [0]  INTEGER OPTIONAL,
+  non-basic-parameters  [1]  G3FacsimileNonBasicParameters OPTIONAL
+}
+
+G3FacsimileData ::= SEQUENCE OF BIT STRING
+
+-- G4 Class 1 and Mixed-mode body parts
+G4Class1BodyPart ::= SEQUENCE OF Interchange-Data-Element
+
+MixedModeBodyPart ::= SEQUENCE OF Interchange-Data-Element
+
+-- Teletex body part
+TeletexBodyPart ::= SEQUENCE {
+  parameters  TeletexParameters,
+  data        TeletexData
+}
+
+TeletexParameters ::= SET {
+  number-of-pages       [0]  INTEGER OPTIONAL,
+  telex-compatible      [1]  BOOLEAN DEFAULT FALSE,
+  non-basic-parameters  [2]  TeletexNonBasicParameters OPTIONAL
+}
+
+TeletexData ::= SEQUENCE OF TeletexString
+
+-- Videotex body part
+VideotexBodyPart ::= SEQUENCE {
+  parameters  VideotexParameters,
+  data        VideotexData
+}
+
+VideotexParameters ::= SET {syntax  [0]  VideotexSyntax OPTIONAL
+}
+
+VideotexSyntax ::= INTEGER {
+  ids(0), data-syntax1(1), data-syntax2(2), data-syntax3(3)}
+
+VideotexData ::= VideotexString
+
+-- Encrypted body part
+EncryptedBodyPart ::= SEQUENCE {
+  parameters  EncryptedParameters,
+  data        EncryptedData
+}
+
+EncryptedParameters ::= SET {
+  algorithm-identifier     AlgorithmIdentifier,
+  originator-certificates  ExtendedCertificates OPTIONAL,
+  ...
+}
+
+EncryptedData ::= BIT STRING(CONSTRAINED BY {BodyPart})
+
+-- Message body part
+MessageBodyPart ::= SEQUENCE {
+  parameters  MessageParameters,
+  data        MessageData
+}
+
+MessageParameters ::= SET {
+  delivery-time      [0]  MessageDeliveryTime OPTIONAL,
+  delivery-envelope  [1]  OtherMessageDeliveryFields OPTIONAL
+}
+
+MessageData ::= IPM
+
+-- Bilaterally Defined body part
+BilaterallyDefinedBodyPart ::= OCTET STRING
+
+-- Nationally Defined body part
+--NATIONAL-BODY-PARTS ::= CLASS {&Type  
+--}
+
+--NationallyDefinedBodyPart ::= NATIONAL-BODY-PARTS.&Type
+
+-- Provided for Historic reasons. Use is strongly deprecated.
+-- IPN
+IPN ::= SET {
+  -- common-fields - -COMPONENTS OF CommonFields,
+  subject-ipm              SubjectIPMField,
+  ipn-originator           [1]  IPNOriginatorField OPTIONAL,
+  ipm-intended-recipient   [2]  IPMIntendedRecipientField OPTIONAL,
+  conversion-eits          ConversionEITsField OPTIONAL,
+  notification-extensions  [3]  NotificationExtensionsField OPTIONAL,
+  choice
+    [0]  CHOICE {non-receipt-fields              [0]  NonReceiptFields,
+                 receipt-fields                  [1]  ReceiptFields,
+                 other-notification-type-fields
+                   [2]  OtherNotificationTypeFields}
+}
+
+--RN ::=
+--  IPN
+--    (WITH COMPONENTS {
+--       ...,
+--       choice  (WITH COMPONENTS {
+--                  receipt-fields  PRESENT
+--                })
+--     })
+
+--NRN ::=
+--  IPN
+--    (WITH COMPONENTS {
+--       ...,
+--       choice  (WITH COMPONENTS {
+--                  non-receipt-fields  PRESENT
+--                })
+--     })
+
+--ON ::=
+--  IPN
+--    (WITH COMPONENTS {
+--       ...,
+--       choice  (WITH COMPONENTS {
+--                  other-notification-type-fields  PRESENT
+--                })
+--     })
+
+CommonFields ::= SET {
+  subject-ipm              SubjectIPMField,
+  ipn-originator           [1]  IPNOriginatorField OPTIONAL,
+  ipm-intended-recipient   [2]  IPMIntendedRecipientField OPTIONAL,
+  conversion-eits          ConversionEITsField OPTIONAL,
+  notification-extensions  [3]  NotificationExtensionsField OPTIONAL
+}
+
+NonReceiptFields ::= SET {
+  non-receipt-reason    [0]  NonReceiptReasonField,
+  discard-reason        [1]  DiscardReasonField OPTIONAL,
+  auto-forward-comment  [2]  AutoForwardCommentField OPTIONAL,
+  returned-ipm          [3]  ReturnedIPMField OPTIONAL,
+  nrn-extensions        [4]  NRNExtensionsField OPTIONAL
+}
+
+ReceiptFields ::= SET {
+  receipt-time         [0]  ReceiptTimeField,
+  acknowledgment-mode  [1]  AcknowledgmentModeField DEFAULT manual,
+  suppl-receipt-info   [2]  SupplReceiptInfoField OPTIONAL,
+  rn-extensions        [3]  RNExtensionsField OPTIONAL
+}
+
+-- Common fields
+SubjectIPMField ::= IPMIdentifier
+
+IPNOriginatorField ::= ORDescriptor
+
+IPMIntendedRecipientField ::= ORDescriptor
+
+ConversionEITsField ::= EncodedInformationTypes
+
+NotificationExtensionsField ::= SET OF IPMSExtension --{{NotificationExtensions}}
+
+--NotificationExtensions IPMS-EXTENSION ::=
+--  {ipn-security-response | PrivateIPMSExtensions, ...}
+
+-- Non-receipt fields
+NonReceiptReasonField ::= ENUMERATED {
+  ipm-discarded(0), ipm-auto-forwarded(1), ...
+  }
+
+-- ITU-T version: 
+DiscardReasonField ::= ENUMERATED {
+  ipm-expired(0), ipm-obsoleted(1), user-subscription-terminated(2),
+  not-used(3)}
+
+-- ISO/IEC version: 
+--DiscardReasonField ::= ENUMERATED {
+--     ipm-expired                  (0),
+--     ipm-obsoleted                (1),
+--     user-subscription-terminated (2),
+-- The following value may not be supported by implementations of earlier versions of this Specification
+--     ipm-deleted                  (3),
+--     ... }
+AutoForwardCommentField ::=
+  AutoForwardComment
+
+AutoForwardComment ::= PrintableString(SIZE (0..ub-auto-forward-comment))
+
+ReturnedIPMField ::= IPM
+
+NRNExtensionsField ::= SET OF IPMSExtension --{{NRNExtensions}}
+
+--NRNExtensions IPMS-EXTENSION ::= {PrivateIPMSExtensions, ...}
+
+-- Receipt fields
+ReceiptTimeField ::= Time
+
+AcknowledgmentModeField ::= ENUMERATED {manual(0), automatic(1)}
+
+SupplReceiptInfoField ::= SupplementaryInformation
+
+RNExtensionsField ::= SET OF IPMSExtension --{{RNExtensions}}
+
+--RNExtensions IPMS-EXTENSION ::= {PrivateIPMSExtensions, ...}
+
+-- Other Notification Type fields
+OtherNotificationTypeFields ::= SET OF IPMSExtension --{{OtherNotifications}}
+
+--OtherNotifications IPMS-EXTENSION ::=
+--  {AdviceNotifications | PrivateIPMSExtensions, ...}
+
+--AdviceNotifications IPMS-EXTENSION ::=
+--  {absence-advice | change-of-address-advice, ...}
+
+-- Advice Notification fields
+--absence-advice IPMS-EXTENSION ::= {
+--  VALUE          AbsenceAdvice,
+--  IDENTIFIED BY  id-on-absence-advice
+--}
+
+AbsenceAdvice ::= SEQUENCE {
+  advice          BodyPart OPTIONAL,
+  next-available  Time OPTIONAL
+}
+
+-- at least one component shall be present 
+--change-of-address-advice IPMS-EXTENSION ::= {
+--  VALUE          ChangeOfAddressAdvice,
+--  IDENTIFIED BY  id-on-change-of-address-advice
+--}
+
+ChangeOfAddressAdvice ::= SEQUENCE {
+  new-address
+    [0]  ORDescriptor --(WITH COMPONENTS {
+--                        ...,
+--                        formal-name  PRESENT
+--                      }) --,
+  effective-from  [1]  Time OPTIONAL
+}
+
+-- Message Store Realization
+--prevent-nrn-generation MS-EXTENSION ::= {
+--  NULL
+--  IDENTIFIED BY  id-mst-prevent-nrn-generation
+--}
+
+--suspend-auto-acknowledgement MS-EXTENSION ::= {
+--  NULL
+--  IDENTIFIED BY  id-mst-suspend-auto-acknowledgement
+--}
+
+--assembly-capability MS-EXTENSION ::= {
+--  NULL
+--  IDENTIFIED BY  id-mst-assembly-capability
+--}
+
+--IPMSubmissionOptions MS-EXTENSION ::=
+--  {ipm-assembly-instructions | originator-body-part-encryption-token |
+--   originator-forwarded-content-token, ...} - - For future extension additions 
+
+--ipm-assembly-instructions MS-EXTENSION ::= {
+--  IPMAssemblyInstructions
+--  IDENTIFIED BY  id-mst-assembly-instructions
+--}
+
+IPMAssemblyInstructions ::= SET {assembly-instructions  [0]  BodyPartReferences
+}
+
+BodyPartReferences ::= SEQUENCE OF BodyPartReference
+
+BodyPartReference ::= CHOICE {
+  stored-entry         [0]  SequenceNumber,
+  stored-content       [1]  SequenceNumber,
+  submitted-body-part  [2]  INTEGER(1..MAX),
+  stored-body-part
+    [3]  SEQUENCE {message-entry     SequenceNumber,
+                   body-part-number  INTEGER(1..MAX)}
+}
+
+--originator-body-part-encryption-token MS-EXTENSION ::= {
+--  BodyPartTokens
+--  IDENTIFIED BY  id-mst-originator-body-part-encryption-token
+--}
+
+--originator-forwarded-content-token MS-EXTENSION ::= {
+--  ForwardedContentToken
+--  IDENTIFIED BY  id-mst-originator-forwarded-content-token
+--}
+
+--IPMSubmissionErrors MS-EXTENSION ::=
+--  {invalid-assembly-instructions | invalid-ipn, ...
+--  } - - For future extension additions 
+
+--invalid-assembly-instructions MS-EXTENSION ::= {
+--  BodyPartReferences
+--  IDENTIFIED BY  id-mst-invalid-assembly-instructions
+--}
+
+--invalid-ipn MS-EXTENSION ::= {NULL
+--                              IDENTIFIED BY  id-mst-invalid-ipn
+--}
+
+SequenceNumber ::= INTEGER
+Interchange-Data-Element ::= ANY
+NationallyDefinedBodyPart ::= ANY
+
+-- cannot refer to basic types in .cnf .#REGISTER - so we create an intermediate type
+OriginatingUA ::= IA5String
+
+END -- of IPMSInformationObjects
+
+-- Generated by Asnp, the ASN.1 pretty-printer of France Telecom R&D
+
diff --git a/asn1/x420/x420.cnf b/asn1/x420/x420.cnf
new file mode 100644 (file)
index 0000000..3747f78
--- /dev/null
@@ -0,0 +1,52 @@
+#.MODULE_IMPORT
+MTSAbstractService     x411
+AuthenticationFramework        x509af
+
+#.INCLUDE ../x411/x411-exp.cnf
+#.INCLUDE ../x509af/x509af-exp.cnf
+
+#.EXPORTS
+ORDescriptor
+
+#.FIELD_RENAME
+
+G3FacsimileBodyPart/data       g3facsimile_data
+VideotexBodyPart/data  videotex_data
+ExtendedBodyPart/data  extended_data
+TeletexBodyPart/data   teletex_data
+IA5TextBodyPart/data   ia5text_data
+MessageBodyPart/data   message_data
+EncryptedBodyPart/data encrypted_data
+
+G3FacsimileBodyPart/parameters g3facsimile_parameters
+VideotexBodyPart/parameters    videotex_parameters
+ExtendedBodyPart/parameters    extended_parameters
+TeletexBodyPart/parameters     teletex_parameters
+IA5TextBodyPart/parameters     ia5text_parameters
+MessageBodyPart/parameters     message_parameters
+EncryptedBodyPart/parameters   encrypted_parameters
+
+TeletexParameters/non-basic-parameters         teletex_non_basic_parameters
+G3FacsimileParameters/non-basic-parameters     g3facsimile_non_basic_parameters
+
+#.REGISTER
+OriginatingUA B "1.2.826.0.1004.10.1.1" "nexor-originating-ua"
+
+#.FN_BODY IPMSExtension/type
+
+  offset = dissect_ber_object_identifier(implicit_tag, pinfo, tree, tvb, offset, hf_index,
+                                            object_identifier_id);
+
+#.FN_BODY T_value
+
+  offset=call_ber_oid_callback(object_identifier_id, tvb, offset, pinfo, tree);
+
+#.FN_BODY T_data
+/* XXX Not implemented yet */
+
+#.FN_BODY Interchange_Data_Element
+/* XXX Not implemented yet */
+
+#.FN_BODY NationallyDefinedBodyPart
+/* XXX Not implemented yet */
+