aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/profinet
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2015-11-18 08:38:23 -0500
committerMichael Mann <mmann78@netscape.net>2015-11-18 17:44:49 +0000
commit3ca5e3ec7d9ad8c2b1ccb0cf9a5d56a1949766fa (patch)
treef2289c6eb8694894a6a89c21fe5ce5e91b1b2178 /plugins/profinet
parent8826db5823480697b73103de3434f5c662517e9a (diff)
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 <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
Diffstat (limited to 'plugins/profinet')
-rw-r--r--plugins/profinet/packet-pn-mrp.c7
-rw-r--r--plugins/profinet/packet-pn-rt.c11
2 files changed, 9 insertions, 9 deletions
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);