diff options
author | Anders Broman <anders.broman@ericsson.com> | 2007-08-13 16:41:16 +0000 |
---|---|---|
committer | Anders Broman <anders.broman@ericsson.com> | 2007-08-13 16:41:16 +0000 |
commit | 57592cb2aad7af0320cfe3446c371366f367dc2f (patch) | |
tree | 8b221916459ce43f6576abf3a9d1bc07ef215546 | |
parent | e5d21a06fa66c53509d4feb65de42be01f43d50d (diff) |
http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1739
Fro Stig Bjørlykke:
1. BER: Added support for empty indef SET
2. RTSE: Added fragment length in COL_INFO
3. IMF: Use correct hf_id for extension value
4. DOP: Fix typo in COL_INFO oid name
svn path=/trunk/; revision=22492
-rw-r--r-- | asn1/dop/packet-dop-template.c | 2 | ||||
-rw-r--r-- | asn1/rtse/packet-rtse-template.c | 9 | ||||
-rw-r--r-- | epan/dissectors/packet-ber.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-dop.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-imf.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-rtse.c | 17 |
6 files changed, 21 insertions, 15 deletions
diff --git a/asn1/dop/packet-dop-template.c b/asn1/dop/packet-dop-template.c index 8f3524ce0f..f0733480ac 100644 --- a/asn1/dop/packet-dop-template.c +++ b/asn1/dop/packet-dop-template.c @@ -80,7 +80,7 @@ static void append_oid(packet_info *pinfo, const char *oid) if(check_col(pinfo->cinfo, COL_INFO)) { name = get_oid_str_name(oid); - col_append_fstr(pinfo->cinfo, COL_INFO, " %%s", name ? name : oid); + col_append_fstr(pinfo->cinfo, COL_INFO, " %s", name ? name : oid); } } diff --git a/asn1/rtse/packet-rtse-template.c b/asn1/rtse/packet-rtse-template.c index 765e335b46..2b933adf60 100644 --- a/asn1/rtse/packet-rtse-template.c +++ b/asn1/rtse/packet-rtse-template.c @@ -225,9 +225,6 @@ dissect_rtse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) tree = proto_item_add_subtree(item, ett_rtse); } if (rtse_reassemble && session->spdu_type == SES_DATA_TRANSFER) { - if (check_col(pinfo->cinfo, COL_INFO)) - col_append_fstr(pinfo->cinfo, COL_INFO, "[RTSE Fragment]"); - /* strip off the OCTET STRING encoding - including any CONSTRUCTED OCTET STRING */ dissect_ber_octet_string(FALSE, &asn1_ctx, NULL, tvb, offset, 0, &data_tvb); @@ -246,7 +243,13 @@ dissect_rtse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) } pinfo->fragmented = TRUE; data_handled = TRUE; + } else { + fragment_length = tvb_length_remaining (tvb, offset); } + + if (check_col(pinfo->cinfo, COL_INFO)) + col_append_fstr(pinfo->cinfo, COL_INFO, "[RTSE fragment, %u byte%s]", + fragment_length, plurality(fragment_length, "", "s")); } else if (rtse_reassemble && session->spdu_type == SES_MAJOR_SYNC_POINT) { if (next_tvb) { /* ROS won't do this for us */ diff --git a/epan/dissectors/packet-ber.c b/epan/dissectors/packet-ber.c index 50b4064191..32f112c08a 100644 --- a/epan/dissectors/packet-ber.c +++ b/epan/dissectors/packet-ber.c @@ -2117,7 +2117,7 @@ printf("SET dissect_ber_set(%s) calling subdissector\n",name); /* if we consumed some bytes, or we knew the length was zero (during the first pass only) */ - if(count || (first_pass && (len == 0))) { + if(count || (first_pass && (len == 0 || (ind_field == 1 && len == 2)))) { /* we found it! */ if(set_idx < MAX_SET_ELEMENTS) mandatory_fields &= ~(1 << set_idx); @@ -2378,7 +2378,7 @@ printf("SET dissect_old_ber_set(%s) calling subdissector\n",name); /* if we consumed some bytes, or we knew the length was zero (during the first pass only) */ - if(count || (first_pass && (len == 0))) { + if(count || (first_pass && (len == 0 || (ind_field == 1 && len == 2)))) { /* we found it! */ if(set_idx < MAX_SET_ELEMENTS) mandatory_fields &= ~(1 << set_idx); diff --git a/epan/dissectors/packet-dop.c b/epan/dissectors/packet-dop.c index 4e298245c0..450f236538 100644 --- a/epan/dissectors/packet-dop.c +++ b/epan/dissectors/packet-dop.c @@ -354,7 +354,7 @@ static void append_oid(packet_info *pinfo, const char *oid) if(check_col(pinfo->cinfo, COL_INFO)) { name = get_oid_str_name(oid); - col_append_fstr(pinfo->cinfo, COL_INFO, " %%s", name ? name : oid); + col_append_fstr(pinfo->cinfo, COL_INFO, " %s", name ? name : oid); } } diff --git a/epan/dissectors/packet-imf.c b/epan/dissectors/packet-imf.c index c9a97daf0d..1c5e6aa8a9 100644 --- a/epan/dissectors/packet-imf.c +++ b/epan/dissectors/packet-imf.c @@ -553,7 +553,7 @@ static void dissect_imf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) item = proto_tree_add_item(unknown_tree, hf_imf_extension_type, tvb, unknown_offset, start_offset - 1 - unknown_offset, FALSE); /* remove 2 bytes to take off the final CRLF to make things a little prettier */ - item = proto_tree_add_item(unknown_tree, hf_id, tvb, start_offset, end_offset - start_offset - 2, FALSE); + item = proto_tree_add_item(unknown_tree, hf_imf_extension_value, tvb, start_offset, end_offset - start_offset - 2, FALSE); } else diff --git a/epan/dissectors/packet-rtse.c b/epan/dissectors/packet-rtse.c index 20ac0eaa60..9b9aeb5c19 100644 --- a/epan/dissectors/packet-rtse.c +++ b/epan/dissectors/packet-rtse.c @@ -1,6 +1,6 @@ /* Do not modify this file. */ /* It is created automatically by the ASN.1 to Wireshark dissector compiler */ -/* ./packet-rtse.c */ +/* .\packet-rtse.c */ /* ../../tools/asn2wrs.py -b -e -p rtse -c rtse.cnf -s packet-rtse-template rtse.asn */ /* Input file: packet-rtse-template.c */ @@ -891,7 +891,7 @@ dissect_rtse_EXTERNALt(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset } offset = dissect_ber_old_sequence(TRUE, actx, tree, tvb, offset, - EXTERNALt_sequence, hf_index, ett_rtse_EXTERNALt); + EXTERNALt_sequence, hf_index, ett_rtse_EXTERNALt); @@ -965,9 +965,6 @@ dissect_rtse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) tree = proto_item_add_subtree(item, ett_rtse); } if (rtse_reassemble && session->spdu_type == SES_DATA_TRANSFER) { - if (check_col(pinfo->cinfo, COL_INFO)) - col_append_fstr(pinfo->cinfo, COL_INFO, "[RTSE Fragment]"); - /* strip off the OCTET STRING encoding - including any CONSTRUCTED OCTET STRING */ dissect_ber_octet_string(FALSE, &asn1_ctx, NULL, tvb, offset, 0, &data_tvb); @@ -986,7 +983,13 @@ dissect_rtse(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) } pinfo->fragmented = TRUE; data_handled = TRUE; + } else { + fragment_length = tvb_length_remaining (tvb, offset); } + + if (check_col(pinfo->cinfo, COL_INFO)) + col_append_fstr(pinfo->cinfo, COL_INFO, "[RTSE fragment, %u byte%s]", + fragment_length, plurality(fragment_length, "", "s")); } else if (rtse_reassemble && session->spdu_type == SES_MAJOR_SYNC_POINT) { if (next_tvb) { /* ROS won't do this for us */ @@ -1184,7 +1187,7 @@ void proto_register_rtse(void) { "rtse.BIT_STRING", HFILL }}, /*--- End of included file: packet-rtse-hfarr.c ---*/ -#line 319 "packet-rtse-template.c" +#line 322 "packet-rtse-template.c" }; /* List of subtrees */ @@ -1208,7 +1211,7 @@ void proto_register_rtse(void) { &ett_rtse_T_encoding, /*--- End of included file: packet-rtse-ettarr.c ---*/ -#line 328 "packet-rtse-template.c" +#line 331 "packet-rtse-template.c" }; module_t *rtse_module; |