diff options
author | Michael Mann <mmann78@netscape.net> | 2015-11-18 08:38:23 -0500 |
---|---|---|
committer | Michael Mann <mmann78@netscape.net> | 2015-11-18 17:44:49 +0000 |
commit | 3ca5e3ec7d9ad8c2b1ccb0cf9a5d56a1949766fa (patch) | |
tree | f2289c6eb8694894a6a89c21fe5ce5e91b1b2178 /plugins/ethercat | |
parent | 8826db5823480697b73103de3434f5c662517e9a (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/ethercat')
-rw-r--r-- | plugins/ethercat/packet-ethercat-datagram.c | 5 | ||||
-rw-r--r-- | plugins/ethercat/packet-ioraw.c | 5 | ||||
-rw-r--r-- | plugins/ethercat/packet-nv.c | 5 |
3 files changed, 9 insertions, 6 deletions
diff --git a/plugins/ethercat/packet-ethercat-datagram.c b/plugins/ethercat/packet-ethercat-datagram.c index cd7761b49d..e6e8ed3898 100644 --- a/plugins/ethercat/packet-ethercat-datagram.c +++ b/plugins/ethercat/packet-ethercat-datagram.c @@ -435,7 +435,7 @@ static void EcSubFormatter(tvbuff_t *tvb, gint offset, char *szText, gint nMax) } /* Ethercat Datagram */ -static void dissect_ecat_datagram(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int dissect_ecat_datagram(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { tvbuff_t *next_tvb; proto_item *ti, *aitem = NULL; @@ -863,6 +863,7 @@ static void dissect_ecat_datagram(tvbuff_t *tvb, packet_info *pinfo, proto_tree { proto_tree_add_item(tree, hf_ecat_padding, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_NA); } + return tvb_captured_length(tvb); } void proto_register_ecat(void) @@ -1711,7 +1712,7 @@ void proto_reg_handoff_ecat(void) /* Register this dissector as a sub dissector to EtherCAT frame based on ether type. */ - ecat_handle = create_dissector_handle(dissect_ecat_datagram, proto_ecat_datagram); + ecat_handle = new_create_dissector_handle(dissect_ecat_datagram, proto_ecat_datagram); dissector_add_uint("ecatf.type", 1 /* EtherCAT type */, ecat_handle); ecat_mailbox_handle = find_dissector("ecat_mailbox"); diff --git a/plugins/ethercat/packet-ioraw.c b/plugins/ethercat/packet-ioraw.c index e8c4c823e3..5171f802b2 100644 --- a/plugins/ethercat/packet-ioraw.c +++ b/plugins/ethercat/packet-ioraw.c @@ -48,7 +48,7 @@ static void IoRawSummaryFormater( char *szText, int nMax) g_snprintf ( szText, nMax, "Raw IO Data" ); } -static void dissect_ioraw(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int dissect_ioraw(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { proto_item *ti; proto_tree *ioraw_tree; @@ -74,6 +74,7 @@ static void dissect_ioraw(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_item(ioraw_tree, hf_ioraw_data, tvb, offset, ioraw_length - offset, ENC_NA); } + return tvb_captured_length(tvb); } void proto_register_ioraw(void) @@ -112,7 +113,7 @@ void proto_reg_handoff_ioraw(void) { dissector_handle_t ioraw_handle; - ioraw_handle = create_dissector_handle(dissect_ioraw, proto_ioraw); + ioraw_handle = new_create_dissector_handle(dissect_ioraw, proto_ioraw); dissector_add_uint("ecatf.type", 3, ioraw_handle); } diff --git a/plugins/ethercat/packet-nv.c b/plugins/ethercat/packet-nv.c index a897051210..73080405d3 100644 --- a/plugins/ethercat/packet-nv.c +++ b/plugins/ethercat/packet-nv.c @@ -89,7 +89,7 @@ static void NvVarHeaderFormater(tvbuff_t *tvb, gint offset, char *szText, int nM tvb_get_letohs(tvb, offset+4)); } -static void dissect_nv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static int dissect_nv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data _U_) { proto_item *ti; proto_tree *nv_tree, *nv_header_tree, *nv_var_tree,*nv_varheader_tree; @@ -158,6 +158,7 @@ static void dissect_nv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) offset+=var_length; } } + return tvb_captured_length(tvb); } void proto_register_nv(void) @@ -234,7 +235,7 @@ void proto_reg_handoff_nv(void) { dissector_handle_t nv_handle; - nv_handle = create_dissector_handle(dissect_nv, proto_nv); + nv_handle = new_create_dissector_handle(dissect_nv, proto_nv); dissector_add_uint("ecatf.type", 4, nv_handle); } |