diff options
author | Anders Broman <anders.broman@ericsson.com> | 2012-04-16 14:11:32 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2012-04-16 14:11:32 +0000 |
commit | d7192a8bacd968e2297cd4e537722d7ed0eeb3e2 (patch) | |
tree | 14a7ebca85618a1c1f510af1053f147803a2e8d5 /epan/dissectors/packet-isup.c | |
parent | 4d897229f6bc60bd5db031780881f4266e5e3f36 (diff) |
Use content_type_parameter_str in dissect_application_isup()
to determine ISUP standard and ISUP variant(French).
Also fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6258
svn path=/trunk/; revision=42095
Diffstat (limited to 'epan/dissectors/packet-isup.c')
-rw-r--r-- | epan/dissectors/packet-isup.c | 62 |
1 files changed, 56 insertions, 6 deletions
diff --git a/epan/dissectors/packet-isup.c b/epan/dissectors/packet-isup.c index 82ab2b1162..5e58230895 100644 --- a/epan/dissectors/packet-isup.c +++ b/epan/dissectors/packet-isup.c @@ -45,6 +45,7 @@ #include <epan/packet.h> #include <epan/stats_tree.h> #include <epan/asn1.h> +#include <wsutil/str_util.h> #include <prefs.h> #include "packet-q931.h" #include "packet-isup.h" @@ -7601,16 +7602,65 @@ dissect_application_isup(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree *isup_tree = NULL; tvbuff_t *message_tvb; guint8 message_type; + gchar *content_type_parameter_str; + guint8 itu_isup_variant = 0; /* Default ITU_STANDARD_VARIANT */ + + if(pinfo->private_data){ + content_type_parameter_str = ascii_strdown_inplace(pinfo->private_data); + if(strstr(content_type_parameter_str,"ansi")){ + isup_standard=ANSI_STANDARD; + col_append_str(pinfo->cinfo, COL_PROTOCOL, "/ISUP(ANSI)"); + message_type = tvb_get_guint8(tvb, 0); + /* application/ISUP has no CIC */ + col_append_sep_fstr(pinfo->cinfo, COL_INFO, ", ", + "ISUP:%s", + val_to_str_ext_const(message_type, &ansi_isup_message_type_value_acro_ext, "reserved")); + /* In the interest of speed, if "tree" is NULL, don't do any work not + * necessary to generate protocol tree items. + */ + if (tree) { + ti = proto_tree_add_item(tree, proto_isup, tvb, 0, -1, ENC_NA); + isup_tree = proto_item_add_subtree(ti, ett_isup); + } + + message_tvb = tvb_new_subset_remaining(tvb, 0); + dissect_ansi_isup_message(message_tvb, pinfo, isup_tree); + return; + }else if(strstr(content_type_parameter_str,"spirou")){ + isup_standard=ITU_STANDARD; + itu_isup_variant = 1; /* ISUP_VARIANT_FRENCH */ + }else{ + isup_standard=ITU_STANDARD; + } + }else{ + /* default to ITU */ + isup_standard=ITU_STANDARD; + } -/* Make entries in Protocol column and Info column on summary display */ - col_append_str(pinfo->cinfo, COL_PROTOCOL, "/ISUP(ITU)"); /* Extract message type field */ message_type = tvb_get_guint8(tvb, 0); - /* application/ISUP has no CIC */ - col_append_sep_fstr(pinfo->cinfo, COL_INFO, ", ", - "ISUP:%s", - val_to_str_ext_const(message_type, &isup_message_type_value_acro_ext, "reserved")); + + switch(itu_isup_variant){ + case 0: + /* Make entries in Protocol column and Info column on summary display */ + col_append_str(pinfo->cinfo, COL_PROTOCOL, "/ISUP(ITU)"); + + /* application/ISUP has no CIC */ + col_append_sep_fstr(pinfo->cinfo, COL_INFO, ", ", + "ISUP:%s", + val_to_str_ext_const(message_type, &isup_message_type_value_acro_ext, "reserved")); + break; + case 1: + /* Make entries in Protocol column and Info column on summary display */ + col_append_str(pinfo->cinfo, COL_PROTOCOL, "/ISUP(French)"); + + /* application/ISUP has no CIC */ + col_append_sep_fstr(pinfo->cinfo, COL_INFO, ", ", + "ISUP:%s", + val_to_str_ext_const(message_type, &isup_message_type_value_acro_ext, "reserved")); + break; + } /* In the interest of speed, if "tree" is NULL, don't do any work not necessary to generate protocol tree items. */ |