aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-enip.c
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2015-06-22 20:53:46 -0700
committerEvan Huus <eapache@gmail.com>2015-06-23 03:54:13 +0000
commit6fd7e5ba33dd9104803173086c1e79c42c2e3754 (patch)
treeeb0e9e98d6dda61eeaa83457a606e772543a940d /epan/dissectors/packet-enip.c
parent46e5fd833eb3e38cab9a10e5d93ce538558196d0 (diff)
Remove more deprecated tvb_length calls
Change-Id: I56260a82b19001ab2f87f4be34a9510f127f841f Reviewed-on: https://code.wireshark.org/review/9050 Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-enip.c')
-rw-r--r--epan/dissectors/packet-enip.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/epan/dissectors/packet-enip.c b/epan/dissectors/packet-enip.c
index cf3657e232..398aa52ca0 100644
--- a/epan/dissectors/packet-enip.c
+++ b/epan/dissectors/packet-enip.c
@@ -1829,10 +1829,10 @@ dissect_cpf(enip_request_key_t *request_key, int command, tvbuff_t *tvb,
/* Call dissector for interface */
next_tvb = tvb_new_subset_length( tvb, offset+6, item_length);
p_add_proto_data(wmem_file_scope(), pinfo, proto_enip, ENIP_REQUEST_INFO, request_info);
- if ( tvb_length_remaining(next_tvb, 0) <= 0 || !dissector_try_uint(subdissector_srrd_table, ifacehndl, next_tvb, pinfo, dissector_tree) )
+ if ( tvb_reported_length_remaining(next_tvb, 0) <= 0 || !dissector_try_uint(subdissector_srrd_table, ifacehndl, next_tvb, pinfo, dissector_tree) )
{
/* Show the undissected payload */
- if ( tvb_length_remaining(tvb, offset) > 0 )
+ if ( tvb_reported_length_remaining(tvb, offset) > 0 )
call_dissector( data_handle, next_tvb, pinfo, dissector_tree);
}
@@ -1888,10 +1888,10 @@ dissect_cpf(enip_request_key_t *request_key, int command, tvbuff_t *tvb,
/* Call dissector for interface */
next_tvb = tvb_new_subset_length (tvb, offset+8, item_length-2);
p_add_proto_data(wmem_file_scope(), pinfo, proto_enip, ENIP_REQUEST_INFO, request_info);
- if ( tvb_length_remaining(next_tvb, 0) <= 0 || !dissector_try_uint(subdissector_sud_table, ifacehndl, next_tvb, pinfo, dissector_tree) )
+ if ( tvb_reported_length_remaining(next_tvb, 0) <= 0 || !dissector_try_uint(subdissector_sud_table, ifacehndl, next_tvb, pinfo, dissector_tree) )
{
/* Show the undissected payload */
- if ( tvb_length_remaining(tvb, offset) > 0 )
+ if ( tvb_reported_length_remaining(tvb, offset) > 0 )
call_dissector( data_handle, next_tvb, pinfo, dissector_tree );
}
p_remove_proto_data(wmem_file_scope(), pinfo, proto_enip, ENIP_REQUEST_INFO);
@@ -1899,7 +1899,7 @@ dissect_cpf(enip_request_key_t *request_key, int command, tvbuff_t *tvb,
else
{
/* Display data */
- if (tvb_length_remaining(tvb, offset+6) > 0)
+ if (tvb_reported_length_remaining(tvb, offset+6) > 0)
{
next_tvb = tvb_new_subset_length(tvb, offset+6, item_length);
if (conn_info != NULL)
@@ -2343,7 +2343,7 @@ dissect_enip_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
} /* end of if ( encapsulated data ) */
- return tvb_length(tvb);
+ return tvb_captured_length(tvb);
} /* end of dissect_enip_pdu() */
static int
@@ -2378,7 +2378,7 @@ dissect_enip_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
return 0; /* not a known command */
tcp_dissect_pdus(tvb, pinfo, tree, enip_desegment, 4, get_enip_pdu_len, dissect_enip_pdu, data);
- return tvb_length(tvb);
+ return tvb_captured_length(tvb);
}
/* Code to actually dissect the io packets*/
@@ -2542,7 +2542,7 @@ dissect_dlr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
/* Unknown Frame type */
}
- return tvb_length(tvb);
+ return tvb_captured_length(tvb);
} /* end of dissect_dlr() */