aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-iscsi.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-iscsi.c')
-rw-r--r--epan/dissectors/packet-iscsi.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/epan/dissectors/packet-iscsi.c b/epan/dissectors/packet-iscsi.c
index 7cb68aaa1d..a18fd5efe9 100644
--- a/epan/dissectors/packet-iscsi.c
+++ b/epan/dissectors/packet-iscsi.c
@@ -633,7 +633,7 @@ addTextKeys(packet_info *pinfo, proto_tree *tt, tvbuff_t *tvb, gint offset, guin
static gint
handleHeaderDigest(iscsi_session_t *iscsi_session, proto_item *ti, tvbuff_t *tvb, guint offset, int headerLen) {
- int available_bytes = tvb_length_remaining(tvb, offset);
+ int available_bytes = tvb_captured_length_remaining(tvb, offset);
switch(iscsi_session->header_digest){
case ISCSI_HEADER_DIGEST_CRC32:
@@ -653,7 +653,7 @@ handleHeaderDigest(iscsi_session_t *iscsi_session, proto_item *ti, tvbuff_t *tvb
static gint
handleDataDigest(proto_item *ti, tvbuff_t *tvb, guint offset, int dataLen) {
- int available_bytes = tvb_length_remaining(tvb, offset);
+ int available_bytes = tvb_captured_length_remaining(tvb, offset);
if(enableDataDigests) {
if(dataDigestIsCRC32) {
if(available_bytes >= (dataLen + 4)) {
@@ -728,7 +728,7 @@ dissect_iscsi_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint off
gboolean S_bit=FALSE;
gboolean A_bit=FALSE;
guint cdb_offset = offset + 32; /* offset of CDB from start of PDU */
- guint end_offset = offset + tvb_length_remaining(tvb, offset);
+ guint end_offset = offset + tvb_captured_length_remaining(tvb, offset);
iscsi_conv_data_t *cdata = NULL;
int paddedDataSegmentLength = data_segment_len;
guint16 lun=0xffff;
@@ -1468,7 +1468,7 @@ dissect_iscsi_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint off
tvbuff_t *data_tvb;
int tvb_len, tvb_rlen;
- tvb_len=tvb_length_remaining(tvb, offset);
+ tvb_len=tvb_captured_length_remaining(tvb, offset);
if(tvb_len>snsl)
tvb_len=snsl;
tvb_rlen=tvb_reported_length_remaining(tvb, offset);
@@ -1590,7 +1590,7 @@ dissect_iscsi_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint off
int tvb_len, tvb_rlen;
/* SCSI Command */
- tvb_len=tvb_length_remaining(tvb, cdb_offset);
+ tvb_len=tvb_captured_length_remaining(tvb, cdb_offset);
tvb_rlen=tvb_reported_length_remaining(tvb, cdb_offset);
if(ahs_cdb_length && ahs_cdb_length<1024){
guint8 *cdb_buf;
@@ -1625,7 +1625,7 @@ dissect_iscsi_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint off
/* where there any ImmediateData ? */
if(immediate_data_length){
/* Immediate Data TVB */
- tvb_len=tvb_length_remaining(tvb, immediate_data_offset);
+ tvb_len=tvb_captured_length_remaining(tvb, immediate_data_offset);
if(tvb_len>(int)immediate_data_length)
tvb_len=immediate_data_length;
tvb_rlen=tvb_reported_length_remaining(tvb, immediate_data_offset);
@@ -1651,7 +1651,7 @@ dissect_iscsi_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint off
tvbuff_t *data_tvb;
int tvb_len, tvb_rlen;
- tvb_len=tvb_length_remaining(tvb, offset);
+ tvb_len=tvb_captured_length_remaining(tvb, offset);
if(tvb_len>senseLen)
tvb_len=senseLen;
tvb_rlen=tvb_reported_length_remaining(tvb, offset);
@@ -1674,7 +1674,7 @@ dissect_iscsi_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint off
int tvb_len, tvb_rlen;
/* offset is setup correctly by the iscsi code for response above */
- tvb_len=tvb_length_remaining(tvb, offset);
+ tvb_len=tvb_captured_length_remaining(tvb, offset);
if(tvb_len>(int)data_segment_len)
tvb_len=data_segment_len;
tvb_rlen=tvb_reported_length_remaining(tvb, offset);
@@ -1697,7 +1697,7 @@ dissect_iscsi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean chec
/* Set up structures needed to add the protocol subtree and manage it */
guint iSCSIPdusDissected = 0;
guint offset = 0;
- guint32 available_bytes = tvb_length(tvb);
+ guint32 available_bytes = tvb_captured_length(tvb);
int digestsActive = 1;
conversation_t *conversation = NULL;
iscsi_session_t *iscsi_session=NULL;
@@ -2458,7 +2458,7 @@ dissect_iscsi_handle(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *
*/
static gboolean
dissect_iscsi_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) {
- guint32 available_bytes = tvb_length(tvb);
+ guint32 available_bytes = tvb_captured_length(tvb);
/* quick check to see if the packet is long enough to contain the
* minimum amount of information we need */