From 3ca5e3ec7d9ad8c2b1ccb0cf9a5d56a1949766fa Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Wed, 18 Nov 2015 08:38:23 -0500 Subject: create_dissector_handle -> new_create_dissector_handle for plugins Was able to actually convert all calls to "new style" Change-Id: If9916a4762d410f2ad12aa5431174d7462dc7ac4 Reviewed-on: https://code.wireshark.org/review/11941 Petri-Dish: Michael Mann Reviewed-by: Michael Mann --- plugins/profinet/packet-pn-mrp.c | 7 ++++--- plugins/profinet/packet-pn-rt.c | 11 +++++------ 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'plugins/profinet') diff --git a/plugins/profinet/packet-pn-mrp.c b/plugins/profinet/packet-pn-mrp.c index 534f68b167..90d97202fc 100644 --- a/plugins/profinet/packet-pn-mrp.c +++ b/plugins/profinet/packet-pn-mrp.c @@ -405,8 +405,8 @@ dissect_PNMRP_PDU(tvbuff_t *tvb, int offset, /* Dissect MRP packets */ -static void -dissect_PNMRP(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_PNMRP(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { proto_item *ti = NULL; proto_tree *mrp_tree = NULL; @@ -425,6 +425,7 @@ dissect_PNMRP(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } dissect_PNMRP_PDU(tvb, offset, pinfo, mrp_tree, ti); + return tvb_captured_length(tvb); } @@ -525,7 +526,7 @@ proto_reg_handoff_pn_mrp (void) dissector_handle_t mrp_handle; - mrp_handle = create_dissector_handle(dissect_PNMRP,proto_pn_mrp); + mrp_handle = new_create_dissector_handle(dissect_PNMRP,proto_pn_mrp); dissector_add_uint("ethertype", ETHERTYPE_MRP, mrp_handle); } diff --git a/plugins/profinet/packet-pn-rt.c b/plugins/profinet/packet-pn-rt.c index 210f9e5428..229594e81c 100644 --- a/plugins/profinet/packet-pn-rt.c +++ b/plugins/profinet/packet-pn-rt.c @@ -323,8 +323,6 @@ dissect_CSF_SDU_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void * return FALSE; } -static void -dissect_pn_rt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree); /* for reasemble processing we need some inits.. */ /* Register PNIO defrag table init routine. */ @@ -464,8 +462,8 @@ dissect_FRAG_PDU_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void /* * dissect_pn_rt - The dissector for the Soft-Real-Time protocol */ -static void -dissect_pn_rt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int +dissect_pn_rt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { gint pdu_len; gint data_len; @@ -520,7 +518,7 @@ dissect_pn_rt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) pdu_len = tvb_reported_length(tvb); if (pdu_len < 6) { dissect_pn_malformed(tvb, 0, pinfo, tree, pdu_len); - return; + return 0; } /* build some "raw" data */ @@ -797,6 +795,7 @@ dissect_pn_rt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) /* Oh, well, we don't know this; dissect it as data. */ dissect_pn_undecoded(next_tvb, 0, pinfo, tree, tvb_captured_length(next_tvb)); } + return tvb_captured_length(tvb); } @@ -995,7 +994,7 @@ proto_reg_handoff_pn_rt(void) { dissector_handle_t pn_rt_handle; - pn_rt_handle = create_dissector_handle(dissect_pn_rt, proto_pn_rt); + pn_rt_handle = new_create_dissector_handle(dissect_pn_rt, proto_pn_rt); dissector_add_uint("ethertype", ETHERTYPE_PROFINET, pn_rt_handle); dissector_add_uint("udp.port", 0x8892, pn_rt_handle); -- cgit v1.2.3