diff options
Diffstat (limited to 'epan/dissectors/packet-ptp.c')
-rw-r--r-- | epan/dissectors/packet-ptp.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/epan/dissectors/packet-ptp.c b/epan/dissectors/packet-ptp.c index e9ced18d7a..0b416f747e 100644 --- a/epan/dissectors/packet-ptp.c +++ b/epan/dissectors/packet-ptp.c @@ -1566,9 +1566,6 @@ static expert_field ei_ptp_v2_msg_len_too_small = EI_INIT; /* forward declaration of local functions for v1 and v2 */ -static void -dissect_ptp_oE(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); - static int is_ptp_v1(tvbuff_t *tvb); @@ -1588,20 +1585,23 @@ dissect_ptp_v2(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean ptp /* Code to dissect the packet */ -static void -dissect_ptp_oE(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_ptp_oE(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { /* PTP over Ethernet only available with PTPv2 */ dissect_ptp_v2(tvb, pinfo, tree, TRUE); + return tvb_captured_length(tvb); } -static void -dissect_ptp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_ptp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { if(is_ptp_v1(tvb)) dissect_ptp_v1(tvb, pinfo, tree); else if(is_ptp_v2(tvb)) dissect_ptp_v2(tvb, pinfo, tree, FALSE); + + return tvb_captured_length(tvb); } @@ -5983,8 +5983,8 @@ proto_reg_handoff_ptp(void) dissector_handle_t ptp_handle; dissector_handle_t ethertype_ptp_handle; - ptp_handle = create_dissector_handle(dissect_ptp, proto_ptp); - ethertype_ptp_handle = create_dissector_handle(dissect_ptp_oE, proto_ptp); + ptp_handle = new_create_dissector_handle(dissect_ptp, proto_ptp); + ethertype_ptp_handle = new_create_dissector_handle(dissect_ptp_oE, proto_ptp); dissector_add_uint("udp.port", EVENT_PORT_PTP, ptp_handle); dissector_add_uint("udp.port", GENERAL_PORT_PTP, ptp_handle); |