docsis: remove tvb_length calls

Change-Id: Ib35c6436876aa7f933dcec0a97a70ccbbc823905
Reviewed-on: https://code.wireshark.org/review/7913
Reviewed-by: Evan Huus <eapache@gmail.com>
This commit is contained in:
Evan Huus 2015-04-04 13:46:01 -04:00
parent 32d0fc0673
commit 4c5b53f044
8 changed files with 10 additions and 10 deletions

View File

@ -57,7 +57,7 @@ dissect_bintrngreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
{
guint16 offset = 0;
bintrngreq_item = proto_tree_add_protocol_format (tree, proto_docsis_bintrngreq,
tvb, offset, tvb_length_remaining (tvb, 0),
tvb, offset, tvb_captured_length(tvb),
"Bonded Initial Ranging Request");
bintrngreq_tree = proto_item_add_subtree (bintrngreq_item, ett_docsis_bintrngreq);
proto_tree_add_item (bintrngreq_tree, hf_docsis_bintrngreq_capflags,

View File

@ -52,7 +52,7 @@ dissect_dccack (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
proto_item *dcc_item;
guint16 len;
len = tvb_length_remaining (tvb, 0);
len = tvb_reported_length(tvb);
col_set_str(pinfo->cinfo, COL_INFO, "DCC-ACK Message: ");

View File

@ -262,7 +262,7 @@ dissect_dccreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
proto_item *dcc_item;
guint16 len;
len = tvb_length_remaining (tvb, 0);
len = tvb_reported_length(tvb);
col_set_str(pinfo->cinfo, COL_INFO, "DCC-REQ Message: ");

View File

@ -108,7 +108,7 @@ dissect_dccrsp (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
proto_item *dcc_item;
guint16 len;
len = tvb_length_remaining (tvb, 0);
len = tvb_reported_length(tvb);
col_set_str(pinfo->cinfo, COL_INFO, "DCC-RSP Message: ");

View File

@ -518,7 +518,7 @@ dissect_dcd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
proto_item *dcd_item;
guint16 len;
len = tvb_length_remaining (tvb, 0);
len = tvb_reported_length(tvb);
col_set_str(pinfo->cinfo, COL_INFO, "DCD Message: ");
@ -526,7 +526,7 @@ dissect_dcd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
{
dcd_item =
proto_tree_add_protocol_format (tree, proto_docsis_dcd, tvb, 0,
tvb_length_remaining (tvb, 0),
tvb_captured_length(tvb),
"DCD Message");
dcd_tree = proto_item_add_subtree (dcd_item, ett_docsis_dcd);
proto_tree_add_item (dcd_tree, hf_docsis_dcd_config_ch_cnt, tvb, 0, 1, ENC_BIG_ENDIAN);

View File

@ -375,7 +375,7 @@ dissect_docsis (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
hdrlen = 6 + mac_parm;
/* Captured PDU Length is based on the length of the header */
captured_length = tvb_length_remaining (tvb, hdrlen);
captured_length = tvb_captured_length_remaining (tvb, hdrlen);
/* If this is a Request Frame, then pdulen is 0 and framelen is 6 */
if ((fctype == FCTYPE_MACSPC) && fcparm == 0x02)

View File

@ -53,7 +53,7 @@ dissect_intrngreq (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
{
intrngreq_item =
proto_tree_add_protocol_format (tree, proto_docsis_intrngreq, tvb, 0,
tvb_length_remaining (tvb, 0),
tvb_captured_length(tvb),
"Initial Ranging Request");
intrngreq_tree = proto_item_add_subtree (intrngreq_item, ett_docsis_intrngreq);
proto_tree_add_item (intrngreq_tree, hf_docsis_intrngreq_sid, tvb, 0, 2,

View File

@ -202,7 +202,7 @@ dissect_type29ucd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
guint16 len;
guint8 upchid, symrate;
len = tvb_length_remaining (tvb, 0);
len = tvb_reported_length(tvb);
upchid = tvb_get_guint8 (tvb, 0);
/* if the upstream Channel ID is 0 then this is for Telephony Return) */
@ -219,7 +219,7 @@ dissect_type29ucd (tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree)
{
type29ucd_item =
proto_tree_add_protocol_format (tree, proto_docsis_type29ucd, tvb, 0,
tvb_length_remaining (tvb, 0),
tvb_captured_length(tvb),
"type29ucd Message");
type29ucd_tree = proto_item_add_subtree (type29ucd_item, ett_docsis_type29ucd);
proto_tree_add_item (type29ucd_tree, hf_docsis_type29ucd_upstream_chid, tvb, 0, 1,