aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-fcp.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2013-10-21 03:13:47 +0000
committerMichael Mann <mmann78@netscape.net>2013-10-21 03:13:47 +0000
commitbe62b39687b3cdd2a206d5421e26588f90e461aa (patch)
tree5b60b0c5d07458f54652c039a52af498e9f9d42f /epan/dissectors/packet-fcp.c
parent77837d2c9e790f0eebd5c48fa4128bb175d18c94 (diff)
Pass fc_hdr "private data" into subdissectors instead of using pinfo->private_data.
svn path=/trunk/; revision=52729
Diffstat (limited to 'epan/dissectors/packet-fcp.c')
-rw-r--r--epan/dissectors/packet-fcp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/epan/dissectors/packet-fcp.c b/epan/dissectors/packet-fcp.c
index 2ea1d8efd4..ac604a0a6e 100644
--- a/epan/dissectors/packet-fcp.c
+++ b/epan/dissectors/packet-fcp.c
@@ -663,8 +663,8 @@ dissect_fcp_els(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
}
-static void
-dissect_fcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int
+dissect_fcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
{
proto_item *ti = NULL;
proto_tree *fcp_tree = NULL;
@@ -676,7 +676,7 @@ dissect_fcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
gboolean els;
fcp_proto_data_t *proto_data;
- fchdr = (fc_hdr *)pinfo->private_data;
+ fchdr = (fc_hdr *)data;
/* Make entries in Protocol column and Info column on summary display */
col_set_str(pinfo->cinfo, COL_PROTOCOL, "FCP");
@@ -752,7 +752,7 @@ dissect_fcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (els) {
dissect_fcp_els(tvb, pinfo, fcp_tree);
- return;
+ return tvb_length(tvb);
}
switch (r_ctl) {
@@ -776,7 +776,7 @@ dissect_fcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
break;
}
/*xxx once the subdissectors return bytes consumed: proto_item_set_end(ti, tvb, offset);*/
-
+ return tvb_length(tvb);
}
/* Register the protocol with Wireshark */
@@ -1030,7 +1030,7 @@ proto_reg_handoff_fcp(void)
{
dissector_handle_t fcp_handle;
- fcp_handle = create_dissector_handle(dissect_fcp, proto_fcp);
+ fcp_handle = new_create_dissector_handle(dissect_fcp, proto_fcp);
dissector_add_uint("fc.ftype", FC_FTYPE_SCSI, fcp_handle);
data_handle = find_dissector("data");