aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-tftp.c
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-11-23 10:56:36 -0500
committerMichael Mann <mmann78@netscape.net>2015-11-23 17:36:39 +0000
commit57e18b00346f86f0b5d182fcc749a1a005fadb96 (patch)
tree9e588cfef7c1110e8f7423a550787e8c06c35e69 /epan/dissectors/packet-tftp.c
parent5afbf7e0e5c8116002cbd06abce48b410855d5e1 (diff)
register_dissector -> new_register_dissector
Change-Id: Ifc8208e1b96e2a3bf297912500a5f252bfa8eed9 Reviewed-on: https://code.wireshark.org/review/12073 Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'epan/dissectors/packet-tftp.c')
-rw-r--r--epan/dissectors/packet-tftp.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/epan/dissectors/packet-tftp.c b/epan/dissectors/packet-tftp.c
index cd91bbdecf..96f39bd758 100644
--- a/epan/dissectors/packet-tftp.c
+++ b/epan/dissectors/packet-tftp.c
@@ -539,8 +539,8 @@ dissect_embeddedtftp_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, v
return TRUE;
}
-static void
-dissect_tftp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
+static int
+dissect_tftp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_)
{
conversation_t *conversation = NULL;
tftp_conv_info_t *tftp_info;
@@ -584,7 +584,7 @@ dissect_tftp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
if (pinfo->destport == conversation->key_ptr->port1)
conversation_set_port2(conversation, pinfo->srcport);
else
- return;
+ return 0;
}
}
tftp_info = (tftp_conv_info_t *)conversation_get_proto_data(conversation, proto_tftp);
@@ -602,6 +602,7 @@ dissect_tftp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
}
dissect_tftp_message(tftp_info, tvb, pinfo, tree);
+ return tvb_captured_length(tvb);
}
@@ -678,7 +679,7 @@ proto_register_tftp(void)
expert_tftp = expert_register_protocol(proto_tftp);
expert_register_field_array(expert_tftp, ei, array_length(ei));
- register_dissector("tftp", dissect_tftp, proto_tftp);
+ new_register_dissector("tftp", dissect_tftp, proto_tftp);
/* Set default UDP ports */
range_convert_str(&global_tftp_port_range, UDP_PORT_TFTP_RANGE, MAX_UDP_PORT);