From 2f73ac0c8c10c151ffe7529a63dbe7c82ee1c891 Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Tue, 24 Nov 2015 13:34:11 -0500 Subject: Remove support for "old style" dissectors in PER API. Most of it wasn't used in current Wireshark source anyway. Change-Id: If395e4e940adc76a2701d226ba4f7c9b17cb795d Reviewed-on: https://code.wireshark.org/review/12108 Petri-Dish: Michael Mann Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann --- epan/dissectors/packet-per.c | 41 +---------------------------------------- 1 file changed, 1 insertion(+), 40 deletions(-) (limited to 'epan/dissectors/packet-per.c') diff --git a/epan/dissectors/packet-per.c b/epan/dissectors/packet-per.c index ffc27b5724..d769c24052 100644 --- a/epan/dissectors/packet-per.c +++ b/epan/dissectors/packet-per.c @@ -217,7 +217,7 @@ dissect_per_open_type_internal(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, if (actx->aligned) BYTE_ALIGN_OFFSET(offset); end_offset = offset + type_length * 8; - if ((variant==CB_DISSECTOR)||(variant==CB_NEW_DISSECTOR)) { + if (variant==CB_NEW_DISSECTOR) { val_tvb = new_octet_aligned_subset(tvb, offset, actx, type_length); if (hfi) { if (IS_FT_UINT(hfi->type)||IS_FT_INT(hfi->type)) { @@ -238,9 +238,6 @@ dissect_per_open_type_internal(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, case CB_ASN1_ENC: ((per_type_fn)type_cb)(tvb, offset, actx, tree, hf_index); break; - case CB_DISSECTOR: - ((dissector_t)type_cb)(val_tvb, actx->pinfo, subtree); - break; case CB_NEW_DISSECTOR: ((new_dissector_t)type_cb)(val_tvb, actx->pinfo, subtree, NULL); break; @@ -260,12 +257,6 @@ dissect_per_open_type(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tre return dissect_per_open_type_internal(tvb, offset, actx, tree, hf_index, (void*)type_cb, CB_ASN1_ENC); } -guint32 -dissect_per_open_type_pdu(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, dissector_t type_cb) -{ - return dissect_per_open_type_internal(tvb, offset, actx, tree, hf_index, (void*)type_cb, CB_DISSECTOR); -} - guint32 dissect_per_open_type_pdu_new(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, new_dissector_t type_cb) { @@ -2210,21 +2201,6 @@ DEBUG_ENTRY("dissect_per_bit_string"); return offset; } -guint32 dissect_per_bit_string_containing_pdu(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, int min_len, int max_len, gboolean has_extension, dissector_t type_cb) -{ - tvbuff_t *val_tvb = NULL; - proto_tree *subtree = tree; - - offset = dissect_per_bit_string(tvb, offset, actx, tree, hf_index, min_len, max_len, has_extension, &val_tvb, NULL); - - if (type_cb && val_tvb) { - subtree = proto_item_add_subtree(actx->created_item, ett_per_containing); - type_cb(val_tvb, actx->pinfo, subtree); - } - - return offset; -} - guint32 dissect_per_bit_string_containing_pdu_new(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, int min_len, int max_len, gboolean has_extension, new_dissector_t type_cb) { tvbuff_t *val_tvb = NULL; @@ -2350,21 +2326,6 @@ DEBUG_ENTRY("dissect_per_octet_string"); return offset; } -guint32 dissect_per_octet_string_containing_pdu(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, int min_len, int max_len, gboolean has_extension, dissector_t type_cb) -{ - tvbuff_t *val_tvb = NULL; - proto_tree *subtree = tree; - - offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index, min_len, max_len, has_extension, &val_tvb); - - if (type_cb && val_tvb) { - subtree = proto_item_add_subtree(actx->created_item, ett_per_containing); - type_cb(val_tvb, actx->pinfo, subtree); - } - - return offset; -} - guint32 dissect_per_octet_string_containing_pdu_new(tvbuff_t *tvb, guint32 offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, int min_len, int max_len, gboolean has_extension, new_dissector_t type_cb) { tvbuff_t *val_tvb = NULL; -- cgit v1.2.3