diff options
Diffstat (limited to 'plugins/ethercat')
-rw-r--r-- | plugins/ethercat/packet-esl.c | 4 | ||||
-rw-r--r-- | plugins/ethercat/packet-ethercat-datagram.c | 4 |
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); } } |