aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-fip.c
diff options
context:
space:
mode:
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");
}