aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--epan/dissectors/packet-6lowpan.c10
-rw-r--r--epan/dissectors/packet-aim-buddylist.c2
-rw-r--r--epan/dissectors/packet-aim-chat.c10
-rw-r--r--epan/dissectors/packet-aim-directory.c2
-rw-r--r--epan/dissectors/packet-aim-generic.c14
-rw-r--r--epan/dissectors/packet-aim-location.c2
-rw-r--r--epan/dissectors/packet-aim-messaging.c6
-rw-r--r--epan/dissectors/packet-aim-signon.c4
-rw-r--r--epan/dissectors/packet-aim-ssi.c2
-rw-r--r--epan/dissectors/packet-aim-userlookup.c4
-rw-r--r--epan/dissectors/packet-aim.c18
-rw-r--r--epan/dissectors/packet-ajp13.c4
-rw-r--r--epan/dissectors/packet-alcap.c2
-rw-r--r--epan/dissectors/packet-ancp.c4
-rw-r--r--epan/dissectors/packet-ansi_683.c4
-rw-r--r--epan/dissectors/packet-ansi_801.c12
-rw-r--r--epan/dissectors/packet-ansi_a.c14
17 files changed, 57 insertions, 57 deletions
diff --git a/epan/dissectors/packet-6lowpan.c b/epan/dissectors/packet-6lowpan.c
index b507b54ad1..42cdec82e1 100644
--- a/epan/dissectors/packet-6lowpan.c
+++ b/epan/dissectors/packet-6lowpan.c
@@ -1323,7 +1323,7 @@ dissect_6lowpan_hc1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint dg
/* Construct the next header for the UDP datagram. */
offset = BITS_TO_BYTE_LEN(0, bit_offset);
- length = (gint)tvb_ensure_length_remaining(tvb, offset);
+ length = (gint)tvb_ensure_captured_length_remaining(tvb, offset);
nhdr_list = (struct lowpan_nhdr *)wmem_alloc(wmem_packet_scope(), sizeof(struct lowpan_nhdr) + sizeof(struct udp_hdr) + length);
nhdr_list->next = NULL;
nhdr_list->proto = IP_PROTO_UDP;
@@ -1341,7 +1341,7 @@ dissect_6lowpan_hc1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint dg
else {
gint length;
offset = BITS_TO_BYTE_LEN(0, bit_offset);
- length = (gint)tvb_ensure_length_remaining(tvb, offset);
+ length = (gint)tvb_ensure_captured_length_remaining(tvb, offset);
nhdr_list = (struct lowpan_nhdr *)wmem_alloc(wmem_packet_scope(), sizeof(struct lowpan_nhdr) + length);
nhdr_list->next = NULL;
nhdr_list->proto = ipv6.ip6_nxt;
@@ -1771,7 +1771,7 @@ dissect_6lowpan_iphc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gint d
}
/* Create an extension header for the remaining payload. */
else {
- length = (gint)tvb_ensure_length_remaining(tvb, offset);
+ length = (gint)tvb_ensure_captured_length_remaining(tvb, offset);
nhdr_list = (struct lowpan_nhdr *)wmem_alloc(wmem_packet_scope(), sizeof(struct lowpan_nhdr) + length);
nhdr_list->next = NULL;
nhdr_list->proto = ipv6.ip6_nxt;
@@ -1959,7 +1959,7 @@ dissect_6lowpan_iphc_nhc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gi
}
else {
/* Create another next header structure for the remaining payload. */
- length = (gint)tvb_ensure_length_remaining(tvb, offset);
+ length = (gint)tvb_ensure_captured_length_remaining(tvb, offset);
nhdr->next = (struct lowpan_nhdr *)wmem_alloc(wmem_packet_scope(), sizeof(struct lowpan_nhdr) + length);
nhdr->next->next = NULL;
nhdr->next->proto = ipv6_ext.ip6e_nxt;
@@ -2108,7 +2108,7 @@ dissect_6lowpan_iphc_nhc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gi
#endif
/* Create the next header structure for the UDP datagram. */
- length = (gint)tvb_ensure_length_remaining(tvb, offset);
+ length = (gint)tvb_ensure_captured_length_remaining(tvb, offset);
nhdr = (struct lowpan_nhdr *)wmem_alloc(wmem_packet_scope(), sizeof(struct lowpan_nhdr) + sizeof(struct udp_hdr) + length);
nhdr->next = NULL;
nhdr->proto = IP_PROTO_UDP;
diff --git a/epan/dissectors/packet-aim-buddylist.c b/epan/dissectors/packet-aim-buddylist.c
index bf49e07968..2bc2b136eb 100644
--- a/epan/dissectors/packet-aim-buddylist.c
+++ b/epan/dissectors/packet-aim-buddylist.c
@@ -56,7 +56,7 @@ static gint ett_aim_buddylist = -1;
static int dissect_aim_buddylist_buddylist(tvbuff_t *tvb, packet_info *pinfo, proto_tree *buddy_tree)
{
int offset = 0;
- while (tvb_length_remaining(tvb, offset) > 0) {
+ while (tvb_reported_length_remaining(tvb, offset) > 0) {
offset = dissect_aim_buddyname( tvb, pinfo, offset, buddy_tree);
}
return offset;
diff --git a/epan/dissectors/packet-aim-chat.c b/epan/dissectors/packet-aim-chat.c
index 4a92ed8a23..c73ae2666d 100644
--- a/epan/dissectors/packet-aim-chat.c
+++ b/epan/dissectors/packet-aim-chat.c
@@ -69,7 +69,7 @@ static gint ett_aim_chat = -1;
static int dissect_aim_chat_userinfo_list(tvbuff_t *tvb, packet_info *pinfo, proto_tree *chat_tree)
{
int offset = 0;
- while(tvb_length_remaining(tvb, offset) > 0) {
+ while(tvb_reported_length_remaining(tvb, offset) > 0) {
offset = dissect_aim_userinfo(tvb, pinfo, offset, chat_tree);
}
return offset;
@@ -85,12 +85,12 @@ static int dissect_aim_chat_outgoing_msg(tvbuff_t *tvb, packet_info *pinfo, prot
buddyname_length = aim_get_buddyname( &buddyname, tvb, 30 );
/* channel message from client */
- aim_get_message( msg, tvb, 40 + buddyname_length, tvb_length(tvb)
+ aim_get_message( msg, tvb, 40 + buddyname_length, tvb_reported_length(tvb)
- 40 - buddyname_length );
col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", msg);
- return tvb_length(tvb);
+ return tvb_reported_length(tvb);
}
@@ -104,7 +104,7 @@ static int dissect_aim_chat_incoming_msg(tvbuff_t *tvb, packet_info *pinfo, prot
msg=(guchar *)wmem_alloc(wmem_packet_scope(), 1000);
buddyname_length = aim_get_buddyname( &buddyname, tvb, 30 );
- aim_get_message( msg, tvb, 36 + buddyname_length, tvb_length(tvb)
+ aim_get_message( msg, tvb, 36 + buddyname_length, tvb_reported_length(tvb)
- 36 - buddyname_length );
col_append_fstr(pinfo->cinfo, COL_INFO, "from: %s", buddyname);
@@ -112,7 +112,7 @@ static int dissect_aim_chat_incoming_msg(tvbuff_t *tvb, packet_info *pinfo, prot
proto_tree_add_string(chat_tree, hf_aim_chat_screen_name, tvb, 31, buddyname_length, buddyname);
- return tvb_length(tvb);
+ return tvb_reported_length(tvb);
}
static const aim_subtype aim_fnac_family_chat[] = {
diff --git a/epan/dissectors/packet-aim-directory.c b/epan/dissectors/packet-aim-directory.c
index 76d6232fd7..eec469e812 100644
--- a/epan/dissectors/packet-aim-directory.c
+++ b/epan/dissectors/packet-aim-directory.c
@@ -38,7 +38,7 @@ static int ett_aim_directory = -1;
static int dissect_aim_directory_user_repl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
{
int offset = 0;
- while (tvb_length_remaining(tvb, offset) > 0) {
+ while (tvb_reported_length_remaining(tvb, offset) > 0) {
offset = dissect_aim_tlv(tvb, pinfo, offset, tree, aim_client_tlvs);
}
return offset;
diff --git a/epan/dissectors/packet-aim-generic.c b/epan/dissectors/packet-aim-generic.c
index b21c79f03c..4bcd46fcac 100644
--- a/epan/dissectors/packet-aim-generic.c
+++ b/epan/dissectors/packet-aim-generic.c
@@ -220,7 +220,7 @@ static int dissect_aim_generic_clientready(tvbuff_t *tvb, packet_info *pinfo _U_
int offset = 0;
proto_tree *entry = proto_tree_add_subtree(gen_tree, tvb, 0, -1, ett_generic_clientready, NULL, "Supported services");
- while(tvb_length_remaining(tvb, offset) > 0) {
+ while(tvb_reported_length_remaining(tvb, offset) > 0) {
proto_item *ti;
proto_tree *subtree;
@@ -244,7 +244,7 @@ static int dissect_aim_generic_serverready(tvbuff_t *tvb, packet_info *pinfo _U_
int offset = 0;
proto_tree *entry = proto_tree_add_subtree(gen_tree, tvb, offset, -1, ett_generic_clientready, NULL, "Supported services");
- while(tvb_length_remaining(tvb, offset) > 0) {
+ while(tvb_reported_length_remaining(tvb, offset) > 0) {
proto_tree_add_item(entry, hf_generic_family, tvb, offset, 2, ENC_BIG_ENDIAN);
offset+=2;
}
@@ -272,7 +272,7 @@ static int dissect_aim_generic_capabilities(tvbuff_t *tvb, packet_info *pinfo _U
int offset = 0;
proto_tree *entry = proto_tree_add_subtree(gen_tree, tvb, offset, -1, ett_generic_clientready, NULL, "Requested services");
- while(tvb_length_remaining(tvb, offset) > 0) {
+ while(tvb_reported_length_remaining(tvb, offset) > 0) {
proto_tree_add_item(entry, hf_generic_family, tvb, offset, 2, ENC_BIG_ENDIAN);
offset+=2;
proto_tree_add_item(entry, hf_generic_version, tvb, offset, 2, ENC_BIG_ENDIAN);
@@ -286,7 +286,7 @@ static int dissect_aim_generic_capack(tvbuff_t *tvb, packet_info *pinfo _U_, pro
int offset = 0;
proto_tree *entry = proto_tree_add_subtree(gen_tree, tvb, offset, -1, ett_generic_clientready, NULL, "Accepted requested services");
- while(tvb_length_remaining(tvb, offset) > 0) {
+ while(tvb_reported_length_remaining(tvb, offset) > 0) {
proto_tree_add_item(entry, hf_generic_family, tvb, offset, 2, ENC_BIG_ENDIAN);
offset+=2;
proto_tree_add_item(entry, hf_generic_version, tvb, offset, 2, ENC_BIG_ENDIAN);
@@ -307,7 +307,7 @@ static int dissect_aim_generic_motd(tvbuff_t *tvb, packet_info *pinfo, proto_tre
static int dissect_aim_generic_rateinfoack(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *gen_tree)
{
int offset = 0;
- while(tvb_length_remaining(tvb, offset) > 0) {
+ while(tvb_reported_length_remaining(tvb, offset) > 0) {
proto_tree_add_uint(gen_tree, hf_generic_rateinfoack_group, tvb, offset, 2, tvb_get_ntohs(tvb, offset));
offset+=2;
}
@@ -327,7 +327,7 @@ static int dissect_aim_generic_ratechange(tvbuff_t *tvb, packet_info *pinfo, pro
static int dissect_aim_generic_clientpauseack(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *gen_tree)
{
int offset = 0;
- while(tvb_length_remaining(tvb, offset) > 0) {
+ while(tvb_reported_length_remaining(tvb, offset) > 0) {
proto_tree_add_item(gen_tree, hf_generic_family, tvb, offset, 2, ENC_BIG_ENDIAN);
offset += 2;
}
@@ -376,7 +376,7 @@ static int dissect_aim_generic_evil(tvbuff_t *tvb, packet_info *pinfo, proto_tre
{
int offset = 0;
proto_tree_add_item(gen_tree, hf_generic_evil_new_warn_level, tvb, offset, 2, ENC_BIG_ENDIAN);
- while(tvb_length_remaining(tvb, offset) > 0) {
+ while(tvb_reported_length_remaining(tvb, offset) > 0) {
offset = dissect_aim_userinfo(tvb, pinfo, offset, gen_tree);
}
return offset;
diff --git a/epan/dissectors/packet-aim-location.c b/epan/dissectors/packet-aim-location.c
index b7f379e05a..7a5d86c09e 100644
--- a/epan/dissectors/packet-aim-location.c
+++ b/epan/dissectors/packet-aim-location.c
@@ -102,7 +102,7 @@ static int dissect_aim_location_setuserinfo(tvbuff_t *tvb, packet_info *pinfo, p
static int dissect_aim_location_watcher_notification(tvbuff_t *tvb, packet_info *pinfo, proto_tree *loc_tree)
{
int offset = 0;
- while (tvb_length_remaining(tvb, offset) > 0) {
+ while (tvb_reported_length_remaining(tvb, offset) > 0) {
offset = dissect_aim_buddyname(tvb, pinfo, offset, loc_tree);
}
return offset;
diff --git a/epan/dissectors/packet-aim-messaging.c b/epan/dissectors/packet-aim-messaging.c
index 42572653be..1213ce4ebe 100644
--- a/epan/dissectors/packet-aim-messaging.c
+++ b/epan/dissectors/packet-aim-messaging.c
@@ -500,7 +500,7 @@ dissect_aim_rendezvous_extended_message(tvbuff_t *tvb, proto_tree *msg_tree)
text = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, text_length, ENC_ASCII|ENC_NA);
proto_tree_add_text(msg_tree, tvb, offset, text_length, "Text: %s", text); /* offset+=text_length; */
- offset = tvb_length(tvb);
+ offset = tvb_reported_length(tvb);
return offset;
}
@@ -562,7 +562,7 @@ dissect_aim_tlv_value_extended_data(proto_tree *entry, guint16 valueid _U_, tvbu
/* plugin-specific data follows */
proto_tree_add_text(entry, tvb, offset, -1, "Plugin-specific data");
}
- offset = tvb_length(tvb);
+ offset = tvb_reported_length(tvb);
return offset;
}
@@ -595,7 +595,7 @@ dissect_aim_msg_client_err(tvbuff_t *tvb, packet_info *pinfo, proto_tree *msg_tr
reason = tvb_get_ntohs(tvb, offset);
proto_tree_add_item(msg_tree, hf_aim_icbm_client_err_reason, tvb, offset, 2, ENC_BIG_ENDIAN); offset+=2;
- if (reason == CLIENT_ERR__REASON_CHANNEL_SPECIFIC && tvb_length_remaining(tvb, offset) > 0)
+ if (reason == CLIENT_ERR__REASON_CHANNEL_SPECIFIC && tvb_reported_length_remaining(tvb, offset) > 0)
{
switch (channel)
{
diff --git a/epan/dissectors/packet-aim-signon.c b/epan/dissectors/packet-aim-signon.c
index 5acfa98b17..97861650b1 100644
--- a/epan/dissectors/packet-aim-signon.c
+++ b/epan/dissectors/packet-aim-signon.c
@@ -49,7 +49,7 @@ static int dissect_aim_snac_signon_logon(tvbuff_t *tvb, packet_info *pinfo,
proto_tree *tree)
{
int offset = 0;
- while (tvb_length_remaining(tvb, offset) > 0) {
+ while (tvb_reported_length_remaining(tvb, offset) > 0) {
offset = dissect_aim_tlv(tvb, pinfo, offset, tree, aim_client_tlvs);
}
return offset;
@@ -60,7 +60,7 @@ static int dissect_aim_snac_signon_logon_reply(tvbuff_t *tvb,
proto_tree *tree)
{
int offset = 0;
- while (tvb_length_remaining(tvb, offset) > 0) {
+ while (tvb_reported_length_remaining(tvb, offset) > 0) {
offset = dissect_aim_tlv(tvb, pinfo, offset, tree, aim_client_tlvs);
}
return offset;
diff --git a/epan/dissectors/packet-aim-ssi.c b/epan/dissectors/packet-aim-ssi.c
index bf4861d047..24540d7741 100644
--- a/epan/dissectors/packet-aim-ssi.c
+++ b/epan/dissectors/packet-aim-ssi.c
@@ -154,7 +154,7 @@ static int dissect_ssi_ssi_items(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
int offset = 0;
gint ssi_entry_size;
proto_tree *ssi_entry = NULL;
- int size = tvb_length(tvb);
+ int size = tvb_reported_length(tvb);
while (size > offset)
{
ssi_entry_size = calc_ssi_entry_size(tvb, offset);
diff --git a/epan/dissectors/packet-aim-userlookup.c b/epan/dissectors/packet-aim-userlookup.c
index f41b2af4f1..09eb763744 100644
--- a/epan/dissectors/packet-aim-userlookup.c
+++ b/epan/dissectors/packet-aim-userlookup.c
@@ -41,8 +41,8 @@ static gint ett_aim_userlookup = -1;
static int dissect_aim_userlookup_search(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *lookup_tree)
{
- proto_tree_add_item(lookup_tree, hf_aim_userlookup_email, tvb, 0, tvb_length(tvb), ENC_UTF_8|ENC_NA);
- return tvb_length(tvb);
+ proto_tree_add_item(lookup_tree, hf_aim_userlookup_email, tvb, 0, tvb_reported_length(tvb), ENC_UTF_8|ENC_NA);
+ return tvb_reported_length(tvb);
}
diff --git a/epan/dissectors/packet-aim.c b/epan/dissectors/packet-aim.c
index b6d99cb4d6..7b66e1f8c0 100644
--- a/epan/dissectors/packet-aim.c
+++ b/epan/dissectors/packet-aim.c
@@ -1034,7 +1034,7 @@ dissect_aim_tlv_value_client_capabilities(proto_item *ti _U_, guint16 valueid _U
offset = dissect_aim_capability(entry, tvb, offset);
}
- return tvb_length(tvb);
+ return tvb_reported_length(tvb);
}
static int
@@ -1051,14 +1051,14 @@ dissect_aim_tlv_value_client_short_capabilities(proto_item *ti _U_, guint16 valu
offset = dissect_aim_short_capability(entry, tvb, offset);
}
- return tvb_length(tvb);
+ return tvb_reported_length(tvb);
}
int
dissect_aim_tlv_value_time(proto_item *ti _U_, guint16 valueid _U_, tvbuff_t *tvb, packet_info *pinfo _U_)
{
/* FIXME */
- return tvb_length(tvb);
+ return tvb_reported_length(tvb);
}
int
@@ -1103,7 +1103,7 @@ static int
dissect_aim_tlv_value_userstatus(proto_item *ti _U_, guint16 valueid _U_, tvbuff_t *tvb, packet_info *pinfo _U_)
{
/* FIXME */
- return tvb_length(tvb);
+ return tvb_reported_length(tvb);
}
static int
@@ -1134,7 +1134,7 @@ dissect_aim_tlv_value_string (proto_item *ti, guint16 valueid _U_, tvbuff_t *tvb
guint8 *buf;
gint string_len;
- string_len = tvb_length(tvb);
+ string_len = tvb_reported_length(tvb);
buf = tvb_get_string_enc(wmem_packet_scope(), tvb, 0, string_len, ENC_UTF_8|ENC_NA);
proto_item_set_text(ti, "Value: %s", format_text(buf, string_len));
@@ -1164,7 +1164,7 @@ dissect_aim_tlv_value_string08_array (proto_item *ti, guint16 valueid _U_, tvbuf
int
dissect_aim_tlv_value_bytes (proto_item *ti _U_, guint16 valueid _U_, tvbuff_t *tvb _U_, packet_info *pinfo _U_)
{
- return tvb_length(tvb);
+ return tvb_reported_length(tvb);
}
int
@@ -1445,7 +1445,7 @@ dissect_aim_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
break;
}
- return tvb_length(tvb);
+ return tvb_reported_length(tvb);
}
/* Code to actually dissect the packets */
@@ -1455,7 +1455,7 @@ dissect_aim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
/* check, if this is really an AIM packet, they start with 0x2a */
/* XXX - I've seen some stuff starting with 0x5a followed by 0x2a */
- if(tvb_length(tvb) >= 1 && tvb_get_guint8(tvb, 0) != 0x2a)
+ if(tvb_reported_length(tvb) >= 1 && tvb_get_guint8(tvb, 0) != 0x2a)
{
/* Not an instant messenger packet, just happened to use the
* same port
@@ -1468,7 +1468,7 @@ dissect_aim(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
tcp_dissect_pdus(tvb, pinfo, tree, aim_desegment, 6, get_aim_pdu_len,
dissect_aim_pdu, data);
- return tvb_length(tvb);
+ return tvb_reported_length(tvb);
}
diff --git a/epan/dissectors/packet-ajp13.c b/epan/dissectors/packet-ajp13.c
index 7bbb616246..7cfa2bafa1 100644
--- a/epan/dissectors/packet-ajp13.c
+++ b/epan/dissectors/packet-ajp13.c
@@ -824,7 +824,7 @@ dissect_ajp13_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
}
- return tvb_length(tvb);
+ return tvb_reported_length(tvb);
}
@@ -858,7 +858,7 @@ dissect_ajp13(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
get_ajp13_pdu_len, /* use first 4, calc data len */
dissect_ajp13_tcp_pdu, data); /* the naive dissector */
- return tvb_length(tvb);
+ return tvb_reported_length(tvb);
}
diff --git a/epan/dissectors/packet-alcap.c b/epan/dissectors/packet-alcap.c
index 147a1fdb51..032234cfd1 100644
--- a/epan/dissectors/packet-alcap.c
+++ b/epan/dissectors/packet-alcap.c
@@ -1322,7 +1322,7 @@ extern void alcap_tree_from_bearer_key(proto_tree* tree, tvbuff_t* tvb, packet_i
static void dissect_alcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
proto_tree *alcap_tree = NULL;
alcap_message_info_t* msg_info = wmem_new0(wmem_packet_scope(), alcap_message_info_t);
- int len = tvb_length(tvb);
+ int len = tvb_reported_length(tvb);
int offset;
proto_item* pi;
proto_tree* compat_tree;
diff --git a/epan/dissectors/packet-ancp.c b/epan/dissectors/packet-ancp.c
index f741869b19..c115d7373b 100644
--- a/epan/dissectors/packet-ancp.c
+++ b/epan/dissectors/packet-ancp.c
@@ -632,7 +632,7 @@ dissect_ancp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void*
}
tap_queue_packet(ancp_tap, pinfo, ancp_info);
- return tvb_length(tvb);
+ return tvb_reported_length(tvb);
}
static guint
@@ -647,7 +647,7 @@ dissect_ancp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
tcp_dissect_pdus(tvb, pinfo, tree, TRUE, ANCP_MIN_HDR,
get_ancp_msg_len, dissect_ancp_message, data);
- return tvb_length(tvb);
+ return tvb_reported_length(tvb);
}
void
diff --git a/epan/dissectors/packet-ansi_683.c b/epan/dissectors/packet-ansi_683.c
index 0cf7d2718c..fdb9b2cd9e 100644
--- a/epan/dissectors/packet-ansi_683.c
+++ b/epan/dissectors/packet-ansi_683.c
@@ -3286,7 +3286,7 @@ dissect_ansi_683_for_message(tvbuff_t *tvb, packet_info* pinfo, proto_tree *ansi
if (ansi_683_for_msg_fcn[idx] != NULL)
{
- (*ansi_683_for_msg_fcn[idx])(tvb, pinfo, ansi_683_tree, tvb_length(tvb) - 1, 1);
+ (*ansi_683_for_msg_fcn[idx])(tvb, pinfo, ansi_683_tree, tvb_reported_length(tvb) - 1, 1);
}
}
@@ -3314,7 +3314,7 @@ dissect_ansi_683_rev_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ansi
proto_tree_add_uint(ansi_683_tree, hf_ansi_683_rev_msg_type,
tvb, 0, 1, msg_type);
- (*ansi_683_rev_msg_fcn[idx])(tvb, pinfo, ansi_683_tree, tvb_length(tvb) - 1, 1);
+ (*ansi_683_rev_msg_fcn[idx])(tvb, pinfo, ansi_683_tree, tvb_reported_length(tvb) - 1, 1);
}
static void
diff --git a/epan/dissectors/packet-ansi_801.c b/epan/dissectors/packet-ansi_801.c
index 74d8847468..1a3f6870df 100644
--- a/epan/dissectors/packet-ansi_801.c
+++ b/epan/dissectors/packet-ansi_801.c
@@ -1400,14 +1400,14 @@ dissect_ansi_801_for_message(tvbuff_t *tvb, proto_tree *tree)
}
offset++;
- rem_len = tvb_length_remaining(tvb, offset);
+ rem_len = tvb_reported_length_remaining(tvb, offset);
while ((num_req > 0) &&
(rem_len >= 2))
{
for_request(tvb, tree, &offset, pd_msg_type);
- rem_len = tvb_length_remaining(tvb, offset);
+ rem_len = tvb_reported_length_remaining(tvb, offset);
num_req--;
}
@@ -1423,7 +1423,7 @@ dissect_ansi_801_for_message(tvbuff_t *tvb, proto_tree *tree)
{
for_response(tvb, tree, &offset);
- rem_len = tvb_length_remaining(tvb, offset);
+ rem_len = tvb_reported_length_remaining(tvb, offset);
num_rsp--;
}
@@ -1524,14 +1524,14 @@ dissect_ansi_801_rev_message(tvbuff_t *tvb, proto_tree *tree)
offset++;
}
- rem_len = tvb_length_remaining(tvb, offset);
+ rem_len = tvb_reported_length_remaining(tvb, offset);
while ((num_req > 0) &&
(rem_len >= 2))
{
rev_request(tvb, tree, &offset, pd_msg_type);
- rem_len = tvb_length_remaining(tvb, offset);
+ rem_len = tvb_reported_length_remaining(tvb, offset);
num_req--;
}
@@ -1547,7 +1547,7 @@ dissect_ansi_801_rev_message(tvbuff_t *tvb, proto_tree *tree)
{
rev_response(tvb, tree, &offset);
- rem_len = tvb_length_remaining(tvb, offset);
+ rem_len = tvb_reported_length_remaining(tvb, offset);
num_rsp--;
}
diff --git a/epan/dissectors/packet-ansi_a.c b/epan/dissectors/packet-ansi_a.c
index 1d99c79d5a..7f68df2002 100644
--- a/epan/dissectors/packet-ansi_a.c
+++ b/epan/dissectors/packet-ansi_a.c
@@ -7433,7 +7433,7 @@ elem_tlv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, elem_idx_t idx, gu
if ((int) idx < 0 || idx >= ansi_a_elem_1_max-1)
{
/* Unknown index, skip the element */
- return tvb_length_remaining(tvb, offset);
+ return tvb_reported_length_remaining(tvb, offset);
}
oct = tvb_get_guint8(tvb, curr_offset);
@@ -7497,7 +7497,7 @@ elem_tv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, elem_idx_t idx, gui
if ((int) idx < 0 || idx >= ansi_a_elem_1_max-1)
{
/* Unknown index, skip the element */
- return tvb_length_remaining(tvb, offset);
+ return tvb_reported_length_remaining(tvb, offset);
}
oct = tvb_get_guint8(tvb, curr_offset);
@@ -7557,7 +7557,7 @@ elem_t(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, elem_idx_t idx,
if ((int) idx < 0 || idx >= ansi_a_elem_1_max-1)
{
/* Unknown index, skip the element */
- return tvb_length_remaining(tvb, offset);
+ return tvb_reported_length_remaining(tvb, offset);
}
oct = tvb_get_guint8(tvb, curr_offset);
@@ -7594,7 +7594,7 @@ elem_lv(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, elem_idx_t idx, gui
if ((int) idx < 0 || idx >= ansi_a_elem_1_max-1)
{
/* Unknown index, skip the element */
- return tvb_length_remaining(tvb, offset);
+ return tvb_reported_length_remaining(tvb, offset);
}
dec_idx = ansi_a_elem_1_strings[idx].dec_index;
@@ -7646,7 +7646,7 @@ elem_v(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, elem_idx_t idx, guin
if ((int) idx < 0 || idx >= ansi_a_elem_1_max-1)
{
/* Unknown index, skip the element */
- return tvb_length_remaining(tvb, offset) ;
+ return tvb_reported_length_remaining(tvb, offset) ;
}
dec_idx = ansi_a_elem_1_strings[idx].dec_index;
@@ -10438,7 +10438,7 @@ dissect_bsmap_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboole
}
tap_p = &tap_rec[tap_current];
- len = tvb_length(tvb);
+ len = tvb_reported_length(tvb);
offset = 0;
/*
@@ -10525,7 +10525,7 @@ dissect_dtap_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolea
const gchar *str;
ansi_a_shared_data_t shared_data;
- len = tvb_length(tvb);
+ len = tvb_reported_length(tvb);
if ((len < 3) && !from_sip)
{