diff options
author | etxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7> | 2006-11-07 19:25:59 +0000 |
---|---|---|
committer | etxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7> | 2006-11-07 19:25:59 +0000 |
commit | f2c83b44dbdfe6978aa8c1586f6a166756f61437 (patch) | |
tree | e3aa58eaafe9c9e4b49f976da184b308644618cd /asn1 | |
parent | 6e969f1be2e9cfed8566eca2a79393d560886b39 (diff) |
Fix bug http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1206
MEGACO message cannot be decoded correctly for ServiceChange Command
And decoding of serviceChangeReason.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@19861 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'asn1')
-rw-r--r-- | asn1/h248/h248.cnf | 11 | ||||
-rw-r--r-- | asn1/h248/h248v3.asn | 15 | ||||
-rw-r--r-- | asn1/h248/packet-h248-template.c | 13 |
3 files changed, 33 insertions, 6 deletions
diff --git a/asn1/h248/h248.cnf b/asn1/h248/h248.cnf index f5aa0ab66b..36d4f49d5b 100644 --- a/asn1/h248/h248.cnf +++ b/asn1/h248/h248.cnf @@ -266,6 +266,17 @@ IndAudStatisticsDescriptor/statName iAStatName } #.END + +#.FN_BODY SCreasonValueOctetStr VAL_PTR = ¶meter_tvb + + tvbuff_t *parameter_tvb; + %(DEFAULT_BODY)s + + if (!parameter_tvb) + return offset; + + dissect_h248_ServiceChangeReasonStr(FALSE, parameter_tvb, 0, pinfo _U_, tree, hf_h248_serviceChangeReasonStr); + #.TYPE_ATTR IP4Address/address TYPE = FT_IPv4 DISPLAY = BASE_NONE STRINGS = NULL IP6Address/address TYPE = FT_IPv6 DISPLAY = BASE_NONE STRINGS = NULL diff --git a/asn1/h248/h248v3.asn b/asn1/h248/h248v3.asn index e7fb9bdbca..a5ba74b499 100644 --- a/asn1/h248/h248v3.asn +++ b/asn1/h248/h248v3.asn @@ -1,7 +1,7 @@ MEDIA-GATEWAY-CONTROL {itu-t(0) recommendation(0) h(8) h248(248) modules(0) media-gateway-control(0) version3(3)} -- --- $Id$ +-- $Id:$ --DEFINITIONS AUTOMATIC TAGS ::= --BEGIN -- Has been modified to pass through the ASN2ETH compiler @@ -52,7 +52,7 @@ BEGIN -- 25 - 15 0 -- | PC | NI | -- 24 - 14 bits 2 bits - -- NOTE 14 bits are defined for international use. + -- NOTE - 14 bits are defined for international use. -- Two national options exist where the point code is 16 or 24 bits. -- To octet align the mtpAddress, the MSBs shall be encoded as 0s. ... @@ -971,7 +971,8 @@ BEGIN serviceChangeAddress [1] ServiceChangeAddress OPTIONAL, serviceChangeVersion [2] INTEGER(0..99) OPTIONAL, serviceChangeProfile [3] ServiceChangeProfile OPTIONAL, - serviceChangeReason [4] Value, +-- serviceChangeReason [4] Value, + serviceChangeReason [4] SCreasonValue, -- A serviceChangeReason consists of a numeric reason code -- and an optional text description. -- The serviceChangeReason shall be a string consisting of @@ -992,6 +993,12 @@ BEGIN serviceChangeIncompleteFlag [10] NULL OPTIONAL } +-- WsĦreshark extension to decode serviceChangeReason + SCreasonValue ::= SEQUENCE OF SCreasonValueOctetStr + SCreasonValueOctetStr ::= OCTET STRING + ServiceChangeReasonStr ::= IA5String +-- end + ServiceChangeAddress ::= CHOICE { portNumber [0] INTEGER(0..65535), -- TCP/UDP port number @@ -1026,7 +1033,7 @@ BEGIN ServiceChangeProfile ::= SEQUENCE { - profileName IA5String(SIZE (1..67)) + profileName [0] IA5String(SIZE (1..67)) -- 64 characters for name, 1 for "/", 2 for version to match ABNF } diff --git a/asn1/h248/packet-h248-template.c b/asn1/h248/packet-h248-template.c index a100e58cf6..95ac64b4f9 100644 --- a/asn1/h248/packet-h248-template.c +++ b/asn1/h248/packet-h248-template.c @@ -65,6 +65,8 @@ static int hf_h248_no_sig = -1; static int hf_h248_no_evt = -1; static int hf_h248_no_param = -1; +static int hf_h248_serviceChangeReasonStr = -1; + #include "packet-h248-hf.c" /* Initialize the subtree pointers */ @@ -114,6 +116,9 @@ static tvbuff_t* h248_tvb; static dissector_handle_t h248_handle; static dissector_handle_t h248_term_handle; +/* Forward declarations */ +dissect_h248_ServiceChangeReasonStr(gboolean implicit_tag, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, int hf_index); + static const value_string package_name_vals[] = { { 0x0000, "Media stream properties H.248.1 Annex C" }, @@ -505,8 +510,8 @@ static const value_string h248_reasons[] = { }; static const value_string wildcard_modes[] = { - { 0, "Choose" }, - { 1, "All" }, + { 0, "All" }, + { 1, "Choose" }, { 0, NULL } }; @@ -1889,6 +1894,10 @@ void proto_register_h248(void) { { "Unknown Parameter", "h248.pkg.unknown.param", FT_BYTES, BASE_HEX, NULL, 0, "", HFILL }}, + { &hf_h248_serviceChangeReasonStr, + { "ServiceChangeReasonStr", "h248.serviceChangeReasonstr", + FT_STRING, BASE_NONE, NULL, 0, + "h248.IA5String", HFILL }}, #include "packet-h248-hfarr.c" |