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>
This commit is contained in:
Evan Huus 2015-04-05 21:28:10 -04:00
parent 686d3ef1a8
commit c1e6a19f27
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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);
}
}