Added handling of ISO FTAM unstructured binary, as this OID is used in
authorstig <stig@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 16 Aug 2007 17:59:27 +0000 (17:59 +0000)
committerstig <stig@f5534014-38df-0310-8fa8-9805f1628bb7>
Thu, 16 Aug 2007 17:59:27 +0000 (17:59 +0000)
X.420 FileTransferBodyPart for generic binary bodyparts.
Also added handling of ISO FTAM unstructured text.

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

asn1/ftam/packet-ftam-template.c
epan/dissectors/packet-ftam.c

index fe44af82dd861a0da6016aaf914d926a4c667421..7d8317cd9829f3766925e6c9ed0dd8016d269c4f 100644 (file)
@@ -56,6 +56,8 @@ static const char *object_identifier_id;
 /* Declare the function to avoid a compiler warning */
 static int dissect_ftam_OR_Set(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index _U_);
 
+static int hf_ftam_unstructured_text = -1;              /* ISO FTAM unstructured text */
+static int hf_ftam_unstructured_binary = -1;            /* ISO FTAM unstructured binary */
 #include "packet-ftam-hf.c"
 
 /* Initialize the subtree pointers */
@@ -64,6 +66,24 @@ static gint ett_ftam = -1;
 
 #include "packet-ftam-fn.c"
 
+/*
+* Dissect FTAM unstructured text
+*/
+static void
+dissect_ftam_unstructured_text(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *parent_tree)
+{
+       proto_tree_add_item (parent_tree, hf_ftam_unstructured_text, tvb, 0, tvb_length_remaining(tvb, 0), FALSE); 
+}
+
+/*
+* Dissect FTAM unstructured binary
+*/
+static void
+dissect_ftam_unstructured_binary(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *parent_tree)
+{
+       proto_tree_add_item (parent_tree, hf_ftam_unstructured_binary, tvb, 0, tvb_length_remaining(tvb, 0), FALSE); 
+}
+
 /*
 * Dissect FTAM PDUs inside a PPDU.
 */
@@ -105,6 +125,12 @@ void proto_register_ftam(void) {
   /* List of fields */
   static hf_register_info hf[] =
   {
+     { &hf_ftam_unstructured_text,
+       { "ISO FTAM unstructured text", "ftam.unstructured_text", FT_STRING,
+          BASE_DEC, NULL, 0x0, "ISO FTAM unstructured text", HFILL } },
+     { &hf_ftam_unstructured_binary,
+       { "ISO FTAM unstructured binary", "ftam.unstructured_binary", FT_BYTES,
+          BASE_DEC, NULL, 0x0, "ISO FTAM unstructured binary", HFILL } },
 #include "packet-ftam-hfarr.c"
   };
 
@@ -131,7 +157,7 @@ void proto_reg_handoff_ftam(void) {
        register_ber_oid_dissector("1.3.14.5.2.2", dissect_ftam, proto_ftam,"NIST file directory entry abstract syntax");
 
        /* Unstructured text file document type FTAM-1 */
-       add_oid_str_name("1.0.8571.5.1","ISO FTAM unstructured text");
+       register_ber_oid_dissector("1.0.8571.5.1", dissect_ftam_unstructured_text, proto_ftam,"ISO FTAM unstructured text");
        add_oid_str_name("1.0.8571.5.2","ISO FTAM sequential text");
        add_oid_str_name("1.0.8571.2.3","FTAM unstructured text abstract syntax");
        add_oid_str_name("1.0.8571.2.4","FTAM sequential text abstract syntax");
@@ -140,7 +166,7 @@ void proto_reg_handoff_ftam(void) {
        add_oid_str_name("1.0.8571.4.1","FTAM unstructured constraint set");
 
        /* Unstructured text file document type FTAM-3 */
-       add_oid_str_name("1.0.8571.5.3","ISO FTAM unstructured binary");
+       register_ber_oid_dissector("1.0.8571.5.3", dissect_ftam_unstructured_binary, proto_ftam,"ISO FTAM unstructured binary");
        add_oid_str_name("1.0.8571.2.4","FTAM unstructured binary abstract syntax");
 
        /* Filedirectory file document type NBS-9 */
index 8870317dad2b68d5765a389f8c60ed746b8048d5..0960baf1f8c82a8fcd4d2569ffa6d9c9d29e5d59 100644 (file)
@@ -1,6 +1,6 @@
 /* Do not modify this file.                                                   */
 /* It is created automatically by the ASN.1 to Wireshark dissector compiler   */
-/* .\packet-ftam.c                                                            */
+/* ./packet-ftam.c                                                            */
 /* ../../tools/asn2wrs.py -b -X -T -e -p ftam -c ftam.cnf -s packet-ftam-template ISO8571-FTAM.asn */
 
 /* Input file: packet-ftam-template.c */
@@ -64,6 +64,8 @@ static const char *object_identifier_id;
 /* Declare the function to avoid a compiler warning */
 static int dissect_ftam_OR_Set(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index _U_);
 
+static int hf_ftam_unstructured_text = -1;              /* ISO FTAM unstructured text */
+static int hf_ftam_unstructured_binary = -1;            /* ISO FTAM unstructured binary */
 
 /*--- Included file: packet-ftam-hf.c ---*/
 #line 1 "packet-ftam-hf.c"
@@ -486,7 +488,7 @@ static int hf_ftam_Attribute_Names_read_legal_qualifiCatiOnS = -1;
 static int hf_ftam_Attribute_Names_read_private_use = -1;
 
 /*--- End of included file: packet-ftam-hf.c ---*/
-#line 60 "packet-ftam-template.c"
+#line 62 "packet-ftam-template.c"
 
 /* Initialize the subtree pointers */
 static gint ett_ftam = -1;
@@ -660,7 +662,7 @@ static gint ett_ftam_AE_title = -1;
 static gint ett_ftam_SEQUENCE_OF_AND_Set = -1;
 
 /*--- End of included file: packet-ftam-ett.c ---*/
-#line 64 "packet-ftam-template.c"
+#line 66 "packet-ftam-template.c"
 
 
 /*--- Included file: packet-ftam-fn.c ---*/
@@ -4804,7 +4806,25 @@ dissect_ftam_Other_Pattern(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int off
 
 
 /*--- End of included file: packet-ftam-fn.c ---*/
-#line 66 "packet-ftam-template.c"
+#line 68 "packet-ftam-template.c"
+
+/*
+* Dissect FTAM unstructured text
+*/
+static void
+dissect_ftam_unstructured_text(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *parent_tree)
+{
+       proto_tree_add_item (parent_tree, hf_ftam_unstructured_text, tvb, 0, tvb_length_remaining(tvb, 0), FALSE); 
+}
+
+/*
+* Dissect FTAM unstructured binary
+*/
+static void
+dissect_ftam_unstructured_binary(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *parent_tree)
+{
+       proto_tree_add_item (parent_tree, hf_ftam_unstructured_binary, tvb, 0, tvb_length_remaining(tvb, 0), FALSE); 
+}
 
 /*
 * Dissect FTAM PDUs inside a PPDU.
@@ -4847,6 +4867,12 @@ void proto_register_ftam(void) {
   /* List of fields */
   static hf_register_info hf[] =
   {
+     { &hf_ftam_unstructured_text,
+       { "ISO FTAM unstructured text", "ftam.unstructured_text", FT_STRING,
+          BASE_DEC, NULL, 0x0, "ISO FTAM unstructured text", HFILL } },
+     { &hf_ftam_unstructured_binary,
+       { "ISO FTAM unstructured binary", "ftam.unstructured_binary", FT_BYTES,
+          BASE_DEC, NULL, 0x0, "ISO FTAM unstructured binary", HFILL } },
 
 /*--- Included file: packet-ftam-hfarr.c ---*/
 #line 1 "packet-ftam-hfarr.c"
@@ -6516,7 +6542,7 @@ void proto_register_ftam(void) {
         "", HFILL }},
 
 /*--- End of included file: packet-ftam-hfarr.c ---*/
-#line 109 "packet-ftam-template.c"
+#line 135 "packet-ftam-template.c"
   };
 
   /* List of subtrees */
@@ -6692,7 +6718,7 @@ void proto_register_ftam(void) {
     &ett_ftam_SEQUENCE_OF_AND_Set,
 
 /*--- End of included file: packet-ftam-ettarr.c ---*/
-#line 115 "packet-ftam-template.c"
+#line 141 "packet-ftam-template.c"
   };
 
   /* Register protocol */
@@ -6712,7 +6738,7 @@ void proto_reg_handoff_ftam(void) {
        register_ber_oid_dissector("1.3.14.5.2.2", dissect_ftam, proto_ftam,"NIST file directory entry abstract syntax");
 
        /* Unstructured text file document type FTAM-1 */
-       add_oid_str_name("1.0.8571.5.1","ISO FTAM unstructured text");
+       register_ber_oid_dissector("1.0.8571.5.1", dissect_ftam_unstructured_text, proto_ftam,"ISO FTAM unstructured text");
        add_oid_str_name("1.0.8571.5.2","ISO FTAM sequential text");
        add_oid_str_name("1.0.8571.2.3","FTAM unstructured text abstract syntax");
        add_oid_str_name("1.0.8571.2.4","FTAM sequential text abstract syntax");
@@ -6721,7 +6747,7 @@ void proto_reg_handoff_ftam(void) {
        add_oid_str_name("1.0.8571.4.1","FTAM unstructured constraint set");
 
        /* Unstructured text file document type FTAM-3 */
-       add_oid_str_name("1.0.8571.5.3","ISO FTAM unstructured binary");
+       register_ber_oid_dissector("1.0.8571.5.3", dissect_ftam_unstructured_binary, proto_ftam,"ISO FTAM unstructured binary");
        add_oid_str_name("1.0.8571.2.4","FTAM unstructured binary abstract syntax");
 
        /* Filedirectory file document type NBS-9 */