From b1f6df534a6308095bdd0e22e464061a72251cb6 Mon Sep 17 00:00:00 2001 From: Anders Broman Date: Thu, 19 Nov 2009 21:44:28 +0000 Subject: From Michael Lum: The attached patch calls the tap to allow the number of each type of message to be counted. The patch does not fix the "size"/number of octets column that is all zeroes. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4253 svn path=/trunk/; revision=31027 --- asn1/ansi_map/packet-ansi_map-template.c | 47 ++++++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) (limited to 'asn1/ansi_map/packet-ansi_map-template.c') diff --git a/asn1/ansi_map/packet-ansi_map-template.c b/asn1/ansi_map/packet-ansi_map-template.c index 2cc59c0e0f..1985683d5d 100644 --- a/asn1/ansi_map/packet-ansi_map-template.c +++ b/asn1/ansi_map/packet-ansi_map-template.c @@ -3677,7 +3677,20 @@ dissect_ansi_map_win_trigger_list(tvbuff_t *tvb, packet_info *pinfo _U_, proto_t static int dissect_invokeData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx) { + static gboolean opCodeKnown = TRUE; + static ansi_map_tap_rec_t tap_rec[16]; + static ansi_map_tap_rec_t *tap_p; + static int tap_current=0; + /* + * set tap record pointer + */ + tap_current++; + if (tap_current == array_length(tap_rec)) + { + tap_current = 0; + } + tap_p = &tap_rec[tap_current]; switch(OperationCode){ case 1: /*Handoff Measurement Request*/ @@ -4030,14 +4043,36 @@ static int dissect_invokeData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ break; default: proto_tree_add_text(tree, tvb, offset, -1, "Unknown invokeData blob"); + opCodeKnown = FALSE; break; } - return offset; + if (opCodeKnown) + { + tap_p->message_type = OperationCode; + tap_p->size = 0; /* should be number of octets in message */ + + tap_queue_packet(ansi_map_tap, g_pinfo, tap_p); + } + return offset; } static int dissect_returnData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx) { + static gboolean opCodeKnown = TRUE; + static ansi_map_tap_rec_t tap_rec[16]; + static ansi_map_tap_rec_t *tap_p; + static int tap_current=0; + + /* + * set tap record pointer + */ + tap_current++; + if (tap_current == array_length(tap_rec)) + { + tap_current = 0; + } + tap_p = &tap_rec[tap_current]; switch(OperationCode){ case 1: /*Handoff Measurement Request*/ @@ -4271,11 +4306,19 @@ static int dissect_returnData(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ break; default: proto_tree_add_text(tree, tvb, offset, -1, "Unknown invokeData blob"); + opCodeKnown = FALSE; break; } - return offset; + if (opCodeKnown) + { + tap_p->message_type = OperationCode; + tap_p->size = 0; /* should be number of octets in message */ + + tap_queue_packet(ansi_map_tap, g_pinfo, tap_p); + } + return offset; } static int -- cgit v1.2.3