aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ansi_map.c
diff options
context:
space:
mode:
authoretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>2009-11-19 21:44:28 +0000
committeretxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7>2009-11-19 21:44:28 +0000
commita450987389c12a896e0d0363cf5fe63feb86ea9d (patch)
treeedd231830c450ba1abe6c7752912f91c7c57f8c4 /epan/dissectors/packet-ansi_map.c
parent1a56e35873e360d6daaac34b7768a2666fcd0a7c (diff)
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 git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@31027 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-ansi_map.c')
-rw-r--r--epan/dissectors/packet-ansi_map.c51
1 files changed, 47 insertions, 4 deletions
diff --git a/epan/dissectors/packet-ansi_map.c b/epan/dissectors/packet-ansi_map.c
index ba35d13d0b..b2dd25b26e 100644
--- a/epan/dissectors/packet-ansi_map.c
+++ b/epan/dissectors/packet-ansi_map.c
@@ -15517,7 +15517,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*/
@@ -15870,14 +15883,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*/
@@ -16111,11 +16146,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
@@ -19261,7 +19304,7 @@ void proto_register_ansi_map(void) {
"ansi_map.QualificationRequest2Res", HFILL }},
/*--- End of included file: packet-ansi_map-hfarr.c ---*/
-#line 5236 "packet-ansi_map-template.c"
+#line 5279 "packet-ansi_map-template.c"
};
/* List of subtrees */
@@ -19521,7 +19564,7 @@ void proto_register_ansi_map(void) {
&ett_ansi_map_ReturnData,
/*--- End of included file: packet-ansi_map-ettarr.c ---*/
-#line 5269 "packet-ansi_map-template.c"
+#line 5312 "packet-ansi_map-template.c"
};