X-Git-Url: http://git.samba.org/samba.git/?p=obnox%2Fwireshark%2Fwip.git;a=blobdiff_plain;f=asn1%2Fftam%2Fpacket-ftam-template.c;fp=asn1%2Fftam%2Fpacket-ftam-template.c;h=7d8317cd9829f3766925e6c9ed0dd8016d269c4f;hp=fe44af82dd861a0da6016aaf914d926a4c667421;hb=a81e56a1928a825b1110eceeeeeb702062a15d28;hpb=6fa999d73550bcecc3fb3ac13cf9a703c3184935 diff --git a/asn1/ftam/packet-ftam-template.c b/asn1/ftam/packet-ftam-template.c index fe44af82dd..7d8317cd98 100644 --- a/asn1/ftam/packet-ftam-template.c +++ b/asn1/ftam/packet-ftam-template.c @@ -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 */