aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2015-04-19 15:39:40 -0400
committerAnders Broman <a.broman58@gmail.com>2015-04-20 06:36:38 +0000
commit8844fbc4f64ebef23b70b6d0327b54f328b3e876 (patch)
tree34f23d7ad709e3d2bdfe2140c501c537f3b94d6d
parentd47373f27838236919c4e0938b59c209d801b6a7 (diff)
replace some deprecated tvb_length calls
Change-Id: I18152e75aec2eedccad4d393c1b4b493cd7b406d Reviewed-on: https://code.wireshark.org/review/8125 Reviewed-by: Evan Huus <eapache@gmail.com> Petri-Dish: Evan Huus <eapache@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r--epan/dissectors/packet-packetlogger.c2
-rw-r--r--epan/dissectors/packet-pcep.c4
-rw-r--r--epan/dissectors/packet-pcp.c4
-rw-r--r--epan/dissectors/packet-peekremote.c2
-rw-r--r--epan/dissectors/packet-pgm.c2
-rw-r--r--epan/dissectors/packet-pktc.c2
-rw-r--r--epan/dissectors/packet-pktgen.c6
7 files changed, 11 insertions, 11 deletions
diff --git a/epan/dissectors/packet-packetlogger.c b/epan/dissectors/packet-packetlogger.c
index ff5c5216b5..7b2095be5a 100644
--- a/epan/dissectors/packet-packetlogger.c
+++ b/epan/dissectors/packet-packetlogger.c
@@ -93,7 +93,7 @@ static int dissect_packetlogger(tvbuff_t *tvb, packet_info *pinfo,
proto_tree_add_item (packetlogger_tree, hf_type, tvb, 0, 1, ENC_BIG_ENDIAN);
proto_item_append_text (ti, " %s", val_to_str (pl_type, type_vals, "Unknown 0x%02x"));
- len = tvb_length_remaining (tvb, 1);
+ len = tvb_reported_length_remaining (tvb, 1);
next_tvb = tvb_new_subset_remaining (tvb, 1);
if (pl_type <= PKT_RECV_ACL_DATA) {
diff --git a/epan/dissectors/packet-pcep.c b/epan/dissectors/packet-pcep.c
index 95f8f468e1..3fb6048c0a 100644
--- a/epan/dissectors/packet-pcep.c
+++ b/epan/dissectors/packet-pcep.c
@@ -3054,7 +3054,7 @@ dissect_pcep_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
col_clear(pinfo->cinfo, COL_INFO);
dissect_pcep_msg_tree(tvb, tree, ett_pcep, pinfo);
- return tvb_length(tvb);
+ return tvb_captured_length(tvb);
}
static int
@@ -3062,7 +3062,7 @@ dissect_pcep(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
{
tcp_dissect_pdus(tvb, pinfo, tree, TRUE, 4, get_pcep_message_len,
dissect_pcep_pdu, data);
- return tvb_length(tvb);
+ return tvb_captured_length(tvb);
}
/*Register the protocol with wireshark*/
diff --git a/epan/dissectors/packet-pcp.c b/epan/dissectors/packet-pcp.c
index 95f31f173a..d6ceb2f928 100644
--- a/epan/dissectors/packet-pcp.c
+++ b/epan/dissectors/packet-pcp.c
@@ -1596,14 +1596,14 @@ static int dissect_pcp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
expert_add_info(pinfo, pcp_tree, &ei_pcp_unimplemented_packet_type);
break;
}
- return tvb_length(tvb);
+ return tvb_captured_length(tvb);
}
static int dissect_pcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
{
/* pass all packets through TCP-reassembly */
tcp_dissect_pdus(tvb, pinfo, tree, TRUE, PCP_HEADER_LEN, get_pcp_message_len, dissect_pcp_message, data);
- return tvb_length(tvb);
+ return tvb_captured_length(tvb);
}
/* setup the dissecting */
diff --git a/epan/dissectors/packet-peekremote.c b/epan/dissectors/packet-peekremote.c
index a583cb6989..53c27cbc9d 100644
--- a/epan/dissectors/packet-peekremote.c
+++ b/epan/dissectors/packet-peekremote.c
@@ -478,7 +478,7 @@ dissect_peekremote_legacy(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, v
*/
if (dissect_peekremote_new(tvb, pinfo, tree, u)) {
/* Yup, it was peekremote-ng, and it's been dissected as such. */
- return tvb_length(tvb);
+ return tvb_reported_length(tvb);
}
col_set_str(pinfo->cinfo, COL_PROTOCOL, "PEEKREMOTE");
diff --git a/epan/dissectors/packet-pgm.c b/epan/dissectors/packet-pgm.c
index df118ab622..1a44dadc45 100644
--- a/epan/dissectors/packet-pgm.c
+++ b/epan/dissectors/packet-pgm.c
@@ -918,7 +918,7 @@ dissect_pgm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
ptvcursor_current_offset(cursor), 2, pgmhdr_cksum, "not available");
} else {
reportedlen = tvb_reported_length(tvb);
- pgmlen = tvb_length(tvb);
+ pgmlen = tvb_captured_length(tvb);
if (pgm_check_checksum && pgmlen >= reportedlen) {
vec_t cksum_vec[1];
guint16 computed_cksum;
diff --git a/epan/dissectors/packet-pktc.c b/epan/dissectors/packet-pktc.c
index 5027f0d27e..a4f758719f 100644
--- a/epan/dissectors/packet-pktc.c
+++ b/epan/dissectors/packet-pktc.c
@@ -525,7 +525,7 @@ dissect_pktc_mtafqdn_krbsafeuserdata(packet_info *pinfo, tvbuff_t *tvb, proto_tr
case PKTC_MTAFQDN_REP:
/* MTA FQDN */
- string_len = tvb_length_remaining(tvb, offset) - 4;
+ string_len = tvb_reported_length_remaining(tvb, offset) - 4;
if (string_len <= 0)
THROW(ReportedBoundsError);
proto_tree_add_item(tree, hf_pktc_mtafqdn_fqdn, tvb, offset, string_len, ENC_ASCII|ENC_NA);
diff --git a/epan/dissectors/packet-pktgen.c b/epan/dissectors/packet-pktgen.c
index 476d33a738..c747370ed3 100644
--- a/epan/dissectors/packet-pktgen.c
+++ b/epan/dissectors/packet-pktgen.c
@@ -64,8 +64,8 @@ static gboolean dissect_pktgen(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
guint32 magic;
/* check for min size */
- if (tvb_length(tvb) < 16) { /* Not a PKTGEN packet. */
- return FALSE;
+ if (tvb_reported_length(tvb) < 16) { /* Not a PKTGEN packet. */
+ return FALSE;
}
/* check for magic number */
@@ -110,7 +110,7 @@ static gboolean dissect_pktgen(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr
proto_tree_add_time(pktgen_tree, hf_pktgen_timestamp, tvb, offset - 8, 8, &tstamp);
- if (tvb_length_remaining(tvb, offset)) /* random data */
+ if (tvb_reported_length_remaining(tvb, offset)) /* random data */
call_dissector(data_handle, tvb_new_subset_remaining(tvb, offset), pinfo,
pktgen_tree);
}