Update some soft-deprecated APIs.

Change-Id: I0e255e72dd4cd9a94a4f92af409c4b34c0a266ed
Reviewed-on: https://code.wireshark.org/review/1491
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
AndersBroman 2014-05-04 21:20:54 +02:00 committed by Anders Broman
parent e7a51d75ee
commit 1d1730fc56
7 changed files with 13 additions and 13 deletions

View File

@ -2084,7 +2084,7 @@ dissect_a11( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_
if (tvb_reported_length_remaining(tvb, offset) > 0)
dissect_a11_extensions(tvb, pinfo, offset, a11_tree);
}
return tvb_length(tvb);
return tvb_reported_length(tvb);
} /* dissect_a11 */
/* Register the protocol with Wireshark */

View File

@ -100,7 +100,7 @@ dissect_openflow_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo
proto_tree_add_text(tree, tvb, offset, -1, "Unsuported version not dissected");
break;
}
return tvb_length(tvb);
return tvb_reported_length(tvb);
}
#define OFP_HEADER_LEN 8

View File

@ -781,7 +781,7 @@ dissect_openflow_v1(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *d
break;
}
return tvb_length(tvb);
return tvb_reported_length(tvb);
}

View File

@ -4688,7 +4688,7 @@ dissect_openflow_v4(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *d
break;
}
return tvb_length(tvb);
return tvb_reported_length(tvb);
}
/*

View File

@ -5994,7 +5994,7 @@ dissect_openflow_v5(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *d
dissect_openflow_message_v5(tvb, pinfo, openflow_tree, 0);
return tvb_length(tvb);
return tvb_reported_length(tvb);
}

View File

@ -162,7 +162,7 @@ dissect_ppcap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
ti = proto_tree_add_item(tree, proto_ppcap, tvb, 0, -1, ENC_NA);
ppcap_tree = proto_item_add_subtree(ti, ett_ppcap);
while (tvb_length_remaining(tvb, offset) > 0)
while (tvb_reported_length_remaining(tvb, offset) > 0)
{
msg_type = tvb_get_ntohs(tvb, offset);
ti1 = proto_tree_add_text(ppcap_tree, tvb, offset, 2, "%s",
@ -223,7 +223,7 @@ dissect_ppcap_payload_type(tvbuff_t *tvb, proto_tree * ppcap_tree1, int offset,
msg_len = tvb_get_ntohs(tvb, offset);
proto_tree_add_item( ppcap_tree1, hf_ppcap_length, tvb, offset, 2, ENC_BIG_ENDIAN);
offset = offset + 2;
string = tvb_get_string(wmem_packet_scope(), tvb, offset, msg_len);
string = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, msg_len, ENC_UTF_8|ENC_NA);
if (strcmp(string,"mtp3") == 0) {
*payload_type = PPCAP_MTP3;
}else if (strcmp(string,"tcap") == 0) {
@ -240,7 +240,7 @@ dissect_ppcap_payload_type(tvbuff_t *tvb, proto_tree * ppcap_tree1, int offset,
*payload_type = PPCAP_SCCP;
}
proto_tree_add_item(ppcap_tree1, hf_ppcap_payload_type, tvb, offset, msg_len, ENC_BIG_ENDIAN|ENC_ASCII);
proto_tree_add_item(ppcap_tree1, hf_ppcap_payload_type, tvb, offset, msg_len, ENC_UTF_8|ENC_NA);
if (msg_len%4)
msg_len = msg_len+(4-(msg_len%4));
@ -420,7 +420,7 @@ dissect_ppcap_destination_address(tvbuff_t *tvb, packet_info * pinfo, proto_tree
else if (key2 == 4)
{
char *string;
string = tvb_get_string(wmem_packet_scope(), tvb, offset, msg_len);
string = tvb_get_string_enc(wmem_packet_scope(), tvb, offset, msg_len, ENC_UTF_8|ENC_NA);
proto_tree_add_string(ppcap_tree1, hf_ppcap_destination_nodeid, tvb, offset, msg_len, string);
TVB_SET_ADDRESS(&pinfo->net_dst, AT_STRINGZ, tvb, offset, msg_len);
COPY_ADDRESS_SHALLOW(&pinfo->dst, &pinfo->net_dst);

View File

@ -2247,7 +2247,7 @@ dissect_sip(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
octet = tvb_get_guint8(tvb,0);
if ((octet & 0xf8) == 0xf8){
call_dissector(sigcomp_handle, tvb, pinfo, tree);
return tvb_length(tvb);
return tvb_reported_length(tvb);
}
len = dissect_sip_common(tvb, 0, pinfo, tree, FALSE, FALSE);
@ -2485,13 +2485,13 @@ dissect_sip_common(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr
/* XXX: Is adding to 'reqresp_tree as intended ? Changed from original 'sip_tree' */
proto_tree_add_text(reqresp_tree, tvb, offset, -1, "Continuation data");
}
return tvb_length_remaining(tvb, offset);
return tvb_reported_length_remaining(tvb, offset);
}
offset = next_offset;
if (sip_tree) {
th = proto_tree_add_item(sip_tree, hf_sip_msg_hdr, tvb, offset,
tvb_length_remaining(tvb, offset), ENC_UTF_8|ENC_NA);
tvb_reported_length_remaining(tvb, offset), ENC_UTF_8|ENC_NA);
proto_item_set_text(th, "Message Header");
hdr_tree = proto_item_add_subtree(th, ett_sip_hdr);
}
@ -3370,7 +3370,7 @@ dissect_sip_common(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tr
offset = next_offset;
}/* End while */
datalen = tvb_length_remaining(tvb, offset);
datalen = tvb_captured_length_remaining(tvb, offset);
reported_datalen = tvb_reported_length_remaining(tvb, offset);
if (content_length != -1) {
if (datalen > content_length)