Ethereal-dev: Re: [Ethereal-dev] DOP Protocol Dissection

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Graeme Lunt <graeme.lunt@xxxxxxxxx>
Date: Mon, 5 Dec 2005 17:45:48 +0100
> > I'll have a look at it as, as you say, it would be good to complete
> > the set.
> > Any chance you could send me a DOP capture to do some initial
> > verification?
>
> Yes, I can try to make a capture in a day or two.
>
> > As a matter of interest, which DSA do you use?
>
> I am using XOmail to get the DOP capture.

Attached are the updated X.500 dissectors to include DOP support.

The "dop" dissector is the renamed "x501" dissector consequently the
asn/x501 directory should be removed. The patch includes the changes
to epan/dissectors/Makefile.common to reflect this.

As the DOP dissection is not fully tested, I have disabled it by
default for now (like DSP) but it can be enabled by the user.

Graeme

Attachment: dop.tar.gz
Description: GNU Zip compressed data

Index: epan/dissectors/Makefile.common
===================================================================
--- epan/dissectors/Makefile.common	(revision 16673)
+++ epan/dissectors/Makefile.common	(working copy)
@@ -254,6 +254,7 @@
 	packet-dlsw.c	\
 	packet-dnp.c	\
 	packet-dns.c	\
+	packet-dop.c	\
 	packet-dsi.c	\
 	packet-dsp.c	\
 	packet-dtp.c	\
@@ -633,7 +634,6 @@
 	packet-x29.c	\
 	packet-x411.c	\
 	packet-x420.c	\
-	packet-x501.c	\
 	packet-x509af.c	\
 	packet-x509ce.c	\
 	packet-x509if.c	\
@@ -723,6 +723,7 @@
 	packet-dis-fields.h	\
 	packet-dis-pdus.h	\
 	packet-dns.h	\
+	packet-dop.h	\
 	packet-dsp.h	\
 	packet-dvmrp.h	\
 	packet-e164.h   \
@@ -897,7 +898,6 @@
 	packet-x11-keysymdef.h	\
 	packet-x411.h	\
 	packet-x420.h	\
-	packet-x501.h	\
 	packet-x509af.h	\
 	packet-x509ce.h	\
 	packet-x509if.h	\
Index: asn1/dap/packet-dap-template.c
===================================================================
--- asn1/dap/packet-dap-template.c	(revision 16673)
+++ asn1/dap/packet-dap-template.c	(working copy)
@@ -48,7 +48,6 @@
 #include "packet-dap.h"
 #include <epan/strutil.h>
 
-
 /* we don't have a separate dissector for X519 - 
    most of DAP is defined in X511 */
 #define PNAME  "X.519 Directory Access Protocol"
@@ -294,7 +293,11 @@
 
   /* Register our configuration options for DAP, particularly our port */
 
+#ifdef PREFERENCE_GROUPING
+  dap_module = prefs_register_protocol_subtree("OSI/X.500", proto_dap, prefs_register_dap);
+#else
   dap_module = prefs_register_protocol(proto_dap, prefs_register_dap);
+#endif
 
   prefs_register_uint_preference(dap_module, "tcp.port", "DAP TCP Port",
 				 "Set the port for DAP operations (if other"
Index: asn1/disp/disp.asn
===================================================================
--- asn1/disp/disp.asn	(revision 16673)
+++ asn1/disp/disp.asn	(working copy)
@@ -93,6 +93,9 @@
 --}
 
 -- types 
+
+EstablishParameter ::= NULL
+
 ModificationParameter ::= SEQUENCE {
   secondaryShadows  SET OF SupplierAndConsumers
 }
Index: asn1/disp/disp.cnf
===================================================================
--- asn1/disp/disp.cnf	(revision 16673)
+++ asn1/disp/disp.cnf	(working copy)
@@ -7,14 +7,14 @@
 ACSE-1			acse
 DirectoryAbstractService	dap
 DistributedOperations		dsp
-DSAOperationalAttributeTypes	x501
+DSAOperationalAttributeTypes	dop
 OperationalBindingManagement	dap
 
-#.INCLUDE ../x501/x501-exp.cnf
 #.INCLUDE ../x509if/x509if-exp.cnf
 #.INCLUDE ../x509af/x509af-exp.cnf
 #.INCLUDE ../dap/dap-exp.cnf
 #.INCLUDE ../dsp/dsp-exp.cnf
+#.INCLUDE ../dop/dop-exp.cnf
 #.INCLUDE ../acse/acse-exp.cnf
 
 #.TYPE_RENAME
@@ -27,6 +27,21 @@
 CoordinateShadowUpdateArgumentData/updateStrategy/standard	standardUpdate
 Information/signedInformation/information	information-data
 
+#.REGISTER
+
+ShadowingAgreementInfo	B "dop.agreement.2.5.19.1" 	"shadow-agreement"
+EstablishParameter	B "dop.establish.rolea.2.5.19.1" 	"shadow-establish-rolea"
+EstablishParameter	B "dop.establish.roleb.2.5.19.1" 	"shadow-establish-roleb"
+ModificationParameter 	B "dop.modify.rolea.2.5.19.1" 	"shadow-modify-rolea"
+ModificationParameter 	B "dop.modify.roleb.2.5.19.1" 	"shadow-modify-roleb"
+
+# these are useful to Thales DOP 
+ShadowingAgreementInfo	B "dop.agreement.2.5.1.0.2.1" 	"shadow-agreement"
+EstablishParameter	B "dop.establish.rolea.2.5.1.0.2.1" 	"shadow-establish-rolea"
+EstablishParameter	B "dop.establish.roleb.2.5.1.0.2.1" 	"shadow-establish-roleb"
+ModificationParameter 	B "dop.modify.rolea.2.5.1.0.2.1" 	"shadow-modify-rolea"
+ModificationParameter 	B "dop.modify.roleb.2.5.1.0.2.1" 	"shadow-modify-roleb"
+
 #.FN_PARS T_standard
 	VAL_PTR = &update
 
Index: asn1/disp/packet-disp-template.c
===================================================================
--- asn1/disp/packet-disp-template.c	(revision 16673)
+++ asn1/disp/packet-disp-template.c	(working copy)
@@ -45,7 +45,7 @@
 #include "packet-x509sat.h"
 #include "packet-crmf.h"
 
-#include "packet-x501.h"
+#include "packet-dop.h"
 #include "packet-dap.h"
 #include "packet-dsp.h"
 #include "packet-disp.h"
@@ -221,7 +221,11 @@
 
   /* Register our configuration options for DISP, particularly our port */
 
+#ifdef PREFERENCE_GROUPING
+  disp_module = prefs_register_protocol_subtree("OSI/X.500", proto_disp, prefs_register_disp);
+#else
   disp_module = prefs_register_protocol(proto_disp, prefs_register_disp);
+#endif
 
   prefs_register_uint_preference(disp_module, "tcp.port", "DISP TCP Port",
 				 "Set the port for DISP operations (if other"
@@ -235,7 +239,7 @@
 void proto_reg_handoff_disp(void) {
   dissector_handle_t handle = NULL;
 
-  /* #include "packet-disp-dis-tab.c" */
+  #include "packet-disp-dis-tab.c"
 
   /* APPLICATION CONTEXT */
 
@@ -254,6 +258,9 @@
     register_rtse_oid_dissector_handle("2.5.9.6", handle, 0, "id-as-directory-reliable-binding", FALSE); 
   } 
 
+  /* OPERATIONAL BINDING */
+  register_ber_oid_name("2.5.1.0.5.1", "id-op-binding-shadow");
+
   tpkt_handle = find_dissector("tpkt");
 
 }
Index: asn1/dsp/dsp-exp.cnf
===================================================================
--- asn1/dsp/dsp-exp.cnf	(revision 16673)
+++ asn1/dsp/dsp-exp.cnf	(working copy)
@@ -2,6 +2,7 @@
 OperationProgress        BER_CLASS_UNI BER_UNI_TAG_SET
 ReferenceType            BER_CLASS_UNI BER_UNI_TAG_ENUMERATED
 AccessPoint              BER_CLASS_UNI BER_UNI_TAG_SET
+MasterAndShadowAccessPoints BER_CLASS_UNI BER_UNI_TAG_SET
 ContinuationReference    BER_CLASS_UNI BER_UNI_TAG_SET
 #.END
 
@@ -9,6 +10,7 @@
 OperationProgress        TYPE = FT_NONE    DISPLAY = BASE_NONE  STRINGS = NULL  BITMASK = 0
 ReferenceType            TYPE = FT_UINT32  DISPLAY = BASE_DEC   STRINGS = VALS(dsp_ReferenceType_vals)  BITMASK = 0
 AccessPoint              TYPE = FT_NONE    DISPLAY = BASE_NONE  STRINGS = NULL  BITMASK = 0
+MasterAndShadowAccessPoints TYPE = FT_UINT32  DISPLAY = BASE_DEC   STRINGS = NULL  BITMASK = 0
 ContinuationReference    TYPE = FT_NONE    DISPLAY = BASE_NONE  STRINGS = NULL  BITMASK = 0
 #.END
 
Index: asn1/dsp/packet-dsp-template.c
===================================================================
--- asn1/dsp/packet-dsp-template.c	(revision 16673)
+++ asn1/dsp/packet-dsp-template.c	(working copy)
@@ -298,7 +298,11 @@
 
   /* Register our configuration options for DSP, particularly our port */
 
+#ifdef PREFERENCE_GROUPING
+  dsp_module = prefs_register_protocol_subtree("OSI/X.500", proto_dsp, prefs_register_dsp);
+#else
   dsp_module = prefs_register_protocol(proto_dsp, prefs_register_dsp);
+#endif
 
   prefs_register_uint_preference(dsp_module, "tcp.port", "DSP TCP Port",
 				 "Set the port for DSP operations (if other"
Index: asn1/dsp/dsp.asn
===================================================================
--- asn1/dsp/dsp.asn	(revision 16673)
+++ asn1/dsp/dsp.asn	(working copy)
@@ -424,6 +424,8 @@
   supplier(5), master(6), immediateSuperior(7), self(8)}
 
 AccessPoint ::= SET {
+-- The following line, whilst wrong, helps with Thales DOP dissection
+--  ae-title             [0] IMPLICIT NULL,
   ae-title             [0]  Name,
   address              [1]  PresentationAddress,
   protocolInformation  [2]  SET --SIZE (1..MAX)-- OF ProtocolInformation OPTIONAL
Index: asn1/dsp/dsp.cnf
===================================================================
--- asn1/dsp/dsp.cnf	(revision 16673)
+++ asn1/dsp/dsp.cnf	(working copy)
@@ -19,6 +19,7 @@
 ReferenceType
 ContinuationReference
 AccessPoint
+MasterAndShadowAccessPoints 
 
 #.TYPE_RENAME