aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-gsm_a_dtap.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2014-11-22 11:54:54 -0500
committerAnders Broman <a.broman58@gmail.com>2014-11-26 09:20:44 +0000
commitab8cad28160cef32889abdc498f9c657bb31024f (patch)
tree66ba08b9079aada6f3d95419cf1681759c4d6493 /epan/dissectors/packet-gsm_a_dtap.c
parent7c475037e4b58d75a513f206896db1885cdb9ada (diff)
Remove sccp_info member from packet_info structure.
sccp_msg_info_t* is now passed from SCCP dissector to its subdissectors through dissector data parameter. Change-Id: Iab4aae58f8995e844f72e02e9f2de36e83589fc0 Reviewed-on: https://code.wireshark.org/review/5442 Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-gsm_a_dtap.c')
-rw-r--r--epan/dissectors/packet-gsm_a_dtap.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/epan/dissectors/packet-gsm_a_dtap.c b/epan/dissectors/packet-gsm_a_dtap.c
index 93ded877ca..91861a4a0f 100644
--- a/epan/dissectors/packet-gsm_a_dtap.c
+++ b/epan/dissectors/packet-gsm_a_dtap.c
@@ -5805,8 +5805,8 @@ static void (*dtap_msg_tp_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *p
/* GENERIC DISSECTOR FUNCTIONS */
-static void
-dissect_dtap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int
+dissect_dtap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
{
static gsm_a_tap_rec_t tap_rec[4];
static gsm_a_tap_rec_t *tap_p;
@@ -5829,6 +5829,7 @@ dissect_dtap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
gint ti;
int hf_idx;
gboolean nsd;
+ sccp_msg_info_t* sccp_msg = (sccp_msg_info_t*)data;
len = tvb_reported_length(tvb);
@@ -5839,7 +5840,7 @@ dissect_dtap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
* too short to be DTAP
*/
call_dissector(data_handle, tvb, pinfo, tree);
- return;
+ return len;
}
col_append_str(pinfo->cinfo, COL_INFO, "(DTAP) ");
@@ -5964,11 +5965,9 @@ dissect_dtap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
default:
/* XXX - hf_idx is still -1! this is a bug in the implementation, and I don't know how to fix it so simple return here */
- return;
+ return len;
}
- sccp_msg = pinfo->sccp_info;
-
if (sccp_msg && sccp_msg->data.co.assoc) {
sccp_assoc = sccp_msg->data.co.assoc;
}
@@ -6077,9 +6076,9 @@ dissect_dtap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
tap_queue_packet(gsm_a_tap, pinfo, tap_p);
- if (msg_str == NULL) return;
+ if (msg_str == NULL) return len;
- if (offset >= len) return;
+ if (offset >= len) return len;
/*
* decode elements
@@ -6094,6 +6093,8 @@ dissect_dtap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
(*dtap_msg_fcn)(tvb, dtap_tree, pinfo, offset, len - offset);
}
+
+ return len;
}
@@ -7141,7 +7142,7 @@ proto_register_gsm_a_dtap(void)
/* subdissector code */
- register_dissector("gsm_a_dtap", dissect_dtap, proto_a_dtap);
+ new_register_dissector("gsm_a_dtap", dissect_dtap, proto_a_dtap);
}
void