aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-fip.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-11-24 21:59:51 -0500
committerMichael Mann <mmann78@netscape.net>2015-11-25 13:15:11 +0000
commitdcfea6a06ddf7adeafc8613efe74310251201789 (patch)
tree04c70020bc89a90670634230a5be0560af7c9c3e /epan/dissectors/packet-fip.c
parent479ab3bcdc8d79b27bfc99fcde073457f72126ac (diff)
create_dissector_handle -> new_create_dissector_handle
This finalizes the transformation for dissectors. Change-Id: Ie5986b72bb69a6e8779ca3f5e20a80357c9e6fea Reviewed-on: https://code.wireshark.org/review/12122 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-fip.c')
-rw-r--r--epan/dissectors/packet-fip.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/epan/dissectors/packet-fip.c b/epan/dissectors/packet-fip.c
index 1a2fa2a9bd..6805414fb9 100644
--- a/epan/dissectors/packet-fip.c
+++ b/epan/dissectors/packet-fip.c
@@ -339,8 +339,8 @@ fip_desc_fc4f(tvbuff_t *tvb, proto_tree *tree, proto_item *item)
}
}
-static void
-dissect_fip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int
+dissect_fip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
guint op;
guint sub;
@@ -361,10 +361,9 @@ dissect_fip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (!tvb_bytes_exist(tvb, 0, FIP_HEADER_LEN)) {
col_set_str(pinfo->cinfo, COL_INFO, "[packet too short]");
- if (tree)
- proto_tree_add_protocol_format(tree, proto_fip, tvb, 0,
+ proto_tree_add_protocol_format(tree, proto_fip, tvb, 0,
-1, "FIP [packet too short]");
- return;
+ return tvb_captured_length(tvb);
}
op = tvb_get_ntohs(tvb, 2);
@@ -544,6 +543,7 @@ dissect_fip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
break;
}
}
+ return tvb_captured_length(tvb);
}
void
@@ -825,7 +825,7 @@ proto_reg_handoff_fip(void)
{
dissector_handle_t fip_handle;
- fip_handle = create_dissector_handle(dissect_fip, proto_fip);
+ fip_handle = new_create_dissector_handle(dissect_fip, proto_fip);
dissector_add_uint("ethertype", ETHERTYPE_FIP, fip_handle);
fc_handle = find_dissector("fc");
}