aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2015-04-05 21:28:10 -0400
committerEvan Huus <eapache@gmail.com>2015-04-06 17:17:47 +0000
commitc1e6a19f279d31e8a42ddcfae958e8e44ff5292b (patch)
treecebd208cbaf36864a9523f19342363fa5888260b /plugins
parent686d3ef1a88a89278ea44988dcc5309e5f8e213d (diff)
ethercat: remove deprecated tvb_length API
Change-Id: I76916948fc06c5a4df5a1188fde164d516b4105d Reviewed-on: https://code.wireshark.org/review/7938 Petri-Dish: Evan Huus <eapache@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/ethercat/packet-esl.c4
-rw-r--r--plugins/ethercat/packet-ethercat-datagram.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/plugins/ethercat/packet-esl.c b/plugins/ethercat/packet-esl.c
index e2322025d8..73ff29cf79 100644
--- a/plugins/ethercat/packet-esl.c
+++ b/plugins/ethercat/packet-esl.c
@@ -259,7 +259,7 @@ dissect_esl_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
static gboolean in_heur = FALSE;
gboolean result;
tvbuff_t *next_tvb;
- guint esl_length = tvb_length(tvb);
+ guint esl_length = tvb_captured_length(tvb);
if ( in_heur )
return FALSE;
@@ -271,7 +271,7 @@ dissect_esl_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
ref_time_frame.fd = NULL;
/* Check that there's enough data */
- if ( tvb_length(tvb) < SIZEOF_ESLHEADER )
+ if ( esl_length < SIZEOF_ESLHEADER )
return FALSE;
/* check for Esl frame, this has a unique destination MAC from Beckhoff range
diff --git a/plugins/ethercat/packet-ethercat-datagram.c b/plugins/ethercat/packet-ethercat-datagram.c
index d3ef62d94f..cdb0ccb0c0 100644
--- a/plugins/ethercat/packet-ethercat-datagram.c
+++ b/plugins/ethercat/packet-ethercat-datagram.c
@@ -447,7 +447,7 @@ static void dissect_ecat_datagram(tvbuff_t *tvb, packet_info *pinfo, proto_tree
guint ecLength=0;
guint subCount = 0;
- const guint datagram_length = tvb_length_remaining(tvb, offset);
+ const guint datagram_length = tvb_captured_length(tvb);
guint datagram_padding_bytes = 0;
EcParserHDR ecHdr;
heur_dtbl_entry_t *hdtbl_entry;
@@ -861,7 +861,7 @@ static void dissect_ecat_datagram(tvbuff_t *tvb, packet_info *pinfo, proto_tree
which is required by the protocol specification */
if(datagram_padding_bytes > 0)
{
- proto_tree_add_item(tree, hf_ecat_padding, tvb, offset, tvb_length_remaining(tvb, offset), ENC_NA);
+ proto_tree_add_item(tree, hf_ecat_padding, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_NA);
}
}