forked from osmocom/wireshark
REplace deprecated API tvb_length -> tvb_reported_length
Change-Id: I6090055a9c31f6787626b810de655d1cc71b99de Reviewed-on: https://code.wireshark.org/review/8002 Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
parent
db92f393d8
commit
5fa267e870
|
@ -944,7 +944,7 @@ dissect_epsem(tvbuff_t *tvb, int offset, guint32 len, packet_info *pinfo, proto_
|
|||
case EAX_MODE_CIPHERTEXT_AUTH:
|
||||
/* mode is ciphertext with authentication */
|
||||
hasmac = TRUE;
|
||||
len2 = tvb_length_remaining(tvb, offset);
|
||||
len2 = tvb_reported_length_remaining(tvb, offset);
|
||||
if (len2 <= 0)
|
||||
return offset;
|
||||
encrypted = TRUE;
|
||||
|
@ -964,7 +964,7 @@ dissect_epsem(tvbuff_t *tvb, int offset, guint32 len, packet_info *pinfo, proto_
|
|||
case EAX_MODE_CLEARTEXT_AUTH:
|
||||
/* mode is cleartext with authentication */
|
||||
hasmac = TRUE;
|
||||
len2 = tvb_length_remaining(tvb, offset);
|
||||
len2 = tvb_reported_length_remaining(tvb, offset);
|
||||
if (len2 <= 0)
|
||||
return offset;
|
||||
buffer = (guchar *)tvb_memdup(wmem_packet_scope(), tvb, offset, len2);
|
||||
|
|
|
@ -76,7 +76,7 @@ CompressedData B "1.3.26.0.4406.0.4.2" "cdt"
|
|||
return offset;
|
||||
}
|
||||
|
||||
next_tvb = tvb_child_uncompress (tvb, compr_tvb, 0, tvb_length (compr_tvb));
|
||||
next_tvb = tvb_child_uncompress (tvb, compr_tvb, 0, tvb_reported_length (compr_tvb));
|
||||
|
||||
if (next_tvb == NULL) {
|
||||
proto_tree_add_expert(top_tree, actx->pinfo, &ei_cdt_unable_uncompress_content,
|
||||
|
|
|
@ -12,5 +12,5 @@ ChargingMessageType
|
|||
#.FN_BODY ExtensionField/value
|
||||
|
||||
proto_tree_add_expert(tree, actx->pinfo, &ei_charging_ase_extensions_not_dissected, tvb, offset, -1);
|
||||
return tvb_length(tvb);
|
||||
return tvb_reported_length(tvb);
|
||||
#.END
|
||||
|
|
|
@ -276,7 +276,7 @@ RejectProblem
|
|||
offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree, actx->private_data);
|
||||
} else if (actx->external.indirect_ref_present &&
|
||||
dissector_try_uint(attribute_id_dissector_table, actx->external.indirect_reference, tvb, actx->pinfo, tree)) {
|
||||
offset=tvb_length (tvb);
|
||||
offset=tvb_reported_length (tvb);
|
||||
} else {
|
||||
offset=dissect_unknown_ber(actx->pinfo, tvb, offset, tree);
|
||||
}
|
||||
|
@ -456,7 +456,7 @@ RejectProblem
|
|||
offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree, NULL);
|
||||
} else if (actx->external.indirect_ref_present &&
|
||||
dissector_try_uint(attribute_id_dissector_table, actx->external.indirect_reference, tvb, actx->pinfo, tree)) {
|
||||
offset=tvb_length (tvb);
|
||||
offset=tvb_reported_length (tvb);
|
||||
} else {
|
||||
offset=dissect_unknown_ber(actx->pinfo, tvb, offset, tree);
|
||||
}
|
||||
|
|
|
@ -145,9 +145,9 @@ static int dissect_cmp_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pa
|
|||
|
||||
switch(pdu_type){
|
||||
case CMP_TYPE_PKIMSG:
|
||||
next_tvb = tvb_new_subset(tvb, offset, tvb_length_remaining(tvb, offset), pdu_len);
|
||||
next_tvb = tvb_new_subset(tvb, offset, tvb_reported_length_remaining(tvb, offset), pdu_len);
|
||||
dissect_cmp_pdu(next_tvb, tree, &asn1_ctx);
|
||||
offset += tvb_length_remaining(tvb, offset);
|
||||
offset += tvb_reported_length_remaining(tvb, offset);
|
||||
break;
|
||||
case CMP_TYPE_POLLREP:
|
||||
proto_tree_add_item(tcptrans_tree, hf_cmp_tcptrans_poll_ref, tvb, offset, 4, ENC_BIG_ENDIAN);
|
||||
|
@ -173,14 +173,14 @@ static int dissect_cmp_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pa
|
|||
proto_tree_add_time(tcptrans_tree, hf_cmp_tcptrans_ttcb, tvb, offset, 4, &ts);
|
||||
offset += 4;
|
||||
|
||||
next_tvb = tvb_new_subset(tvb, offset, tvb_length_remaining(tvb, offset), pdu_len);
|
||||
next_tvb = tvb_new_subset(tvb, offset, tvb_reported_length_remaining(tvb, offset), pdu_len);
|
||||
dissect_cmp_pdu(next_tvb, tree, &asn1_ctx);
|
||||
offset += tvb_length_remaining(tvb, offset);
|
||||
offset += tvb_reported_length_remaining(tvb, offset);
|
||||
break;
|
||||
case CMP_TYPE_FINALMSGREP:
|
||||
next_tvb = tvb_new_subset(tvb, offset, tvb_length_remaining(tvb, offset), pdu_len);
|
||||
next_tvb = tvb_new_subset(tvb, offset, tvb_reported_length_remaining(tvb, offset), pdu_len);
|
||||
dissect_cmp_pdu(next_tvb, tree, &asn1_ctx);
|
||||
offset += tvb_length_remaining(tvb, offset);
|
||||
offset += tvb_reported_length_remaining(tvb, offset);
|
||||
break;
|
||||
case CMP_TYPE_ERRORMSGREP:
|
||||
/*XXX to be added*/
|
||||
|
|
|
@ -101,7 +101,7 @@ RevocationInfoChoice/other otherRIC
|
|||
#.FN_BODY EncapsulatedContentInfo/eContent
|
||||
|
||||
offset = dissect_ber_octet_string(FALSE, actx, tree, tvb, offset, hf_index, &content_tvb);
|
||||
proto_item_set_text(actx->created_item, "eContent (%%u bytes)", tvb_length (content_tvb));
|
||||
proto_item_set_text(actx->created_item, "eContent (%%u bytes)", tvb_reported_length (content_tvb));
|
||||
|
||||
call_ber_oid_callback(object_identifier_id, content_tvb, 0, actx->pinfo, top_tree ? top_tree : tree, NULL);
|
||||
|
||||
|
|
|
@ -995,7 +995,7 @@ dissect_epsem(tvbuff_t *tvb, int offset, guint32 len, packet_info *pinfo, proto_
|
|||
case EAX_MODE_CIPHERTEXT_AUTH:
|
||||
/* mode is ciphertext with authentication */
|
||||
hasmac = TRUE;
|
||||
len2 = tvb_length_remaining(tvb, offset);
|
||||
len2 = tvb_reported_length_remaining(tvb, offset);
|
||||
if (len2 <= 0)
|
||||
return offset;
|
||||
encrypted = TRUE;
|
||||
|
@ -1015,7 +1015,7 @@ dissect_epsem(tvbuff_t *tvb, int offset, guint32 len, packet_info *pinfo, proto_
|
|||
case EAX_MODE_CLEARTEXT_AUTH:
|
||||
/* mode is cleartext with authentication */
|
||||
hasmac = TRUE;
|
||||
len2 = tvb_length_remaining(tvb, offset);
|
||||
len2 = tvb_reported_length_remaining(tvb, offset);
|
||||
if (len2 <= 0)
|
||||
return offset;
|
||||
buffer = (guchar *)tvb_memdup(wmem_packet_scope(), tvb, offset, len2);
|
||||
|
|
|
@ -258,7 +258,7 @@ dissect_cdt_CompressedContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int
|
|||
return offset;
|
||||
}
|
||||
|
||||
next_tvb = tvb_child_uncompress (tvb, compr_tvb, 0, tvb_length (compr_tvb));
|
||||
next_tvb = tvb_child_uncompress (tvb, compr_tvb, 0, tvb_reported_length (compr_tvb));
|
||||
|
||||
if (next_tvb == NULL) {
|
||||
proto_tree_add_expert(top_tree, actx->pinfo, &ei_cdt_unable_uncompress_content,
|
||||
|
|
|
@ -537,7 +537,7 @@ dissect_charging_ase_T_value(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o
|
|||
#line 13 "../../asn1/charging_ase/charging_ase.cnf"
|
||||
|
||||
proto_tree_add_expert(tree, actx->pinfo, &ei_charging_ase_extensions_not_dissected, tvb, offset, -1);
|
||||
return tvb_length(tvb);
|
||||
return tvb_reported_length(tvb);
|
||||
|
||||
|
||||
return offset;
|
||||
|
|
|
@ -935,7 +935,7 @@ dissect_cmip_AttributeValue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int of
|
|||
offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree, actx->private_data);
|
||||
} else if (actx->external.indirect_ref_present &&
|
||||
dissector_try_uint(attribute_id_dissector_table, actx->external.indirect_reference, tvb, actx->pinfo, tree)) {
|
||||
offset=tvb_length (tvb);
|
||||
offset=tvb_reported_length (tvb);
|
||||
} else {
|
||||
offset=dissect_unknown_ber(actx->pinfo, tvb, offset, tree);
|
||||
}
|
||||
|
@ -2072,7 +2072,7 @@ dissect_cmip_T_attributevalue(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int
|
|||
offset=call_ber_oid_callback(actx->external.direct_reference, tvb, offset, actx->pinfo, tree, NULL);
|
||||
} else if (actx->external.indirect_ref_present &&
|
||||
dissector_try_uint(attribute_id_dissector_table, actx->external.indirect_reference, tvb, actx->pinfo, tree)) {
|
||||
offset=tvb_length (tvb);
|
||||
offset=tvb_reported_length (tvb);
|
||||
} else {
|
||||
offset=dissect_unknown_ber(actx->pinfo, tvb, offset, tree);
|
||||
}
|
||||
|
|
|
@ -1559,9 +1559,9 @@ static int dissect_cmp_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pa
|
|||
|
||||
switch(pdu_type){
|
||||
case CMP_TYPE_PKIMSG:
|
||||
next_tvb = tvb_new_subset(tvb, offset, tvb_length_remaining(tvb, offset), pdu_len);
|
||||
next_tvb = tvb_new_subset(tvb, offset, tvb_reported_length_remaining(tvb, offset), pdu_len);
|
||||
dissect_cmp_pdu(next_tvb, tree, &asn1_ctx);
|
||||
offset += tvb_length_remaining(tvb, offset);
|
||||
offset += tvb_reported_length_remaining(tvb, offset);
|
||||
break;
|
||||
case CMP_TYPE_POLLREP:
|
||||
proto_tree_add_item(tcptrans_tree, hf_cmp_tcptrans_poll_ref, tvb, offset, 4, ENC_BIG_ENDIAN);
|
||||
|
@ -1587,14 +1587,14 @@ static int dissect_cmp_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *pa
|
|||
proto_tree_add_time(tcptrans_tree, hf_cmp_tcptrans_ttcb, tvb, offset, 4, &ts);
|
||||
offset += 4;
|
||||
|
||||
next_tvb = tvb_new_subset(tvb, offset, tvb_length_remaining(tvb, offset), pdu_len);
|
||||
next_tvb = tvb_new_subset(tvb, offset, tvb_reported_length_remaining(tvb, offset), pdu_len);
|
||||
dissect_cmp_pdu(next_tvb, tree, &asn1_ctx);
|
||||
offset += tvb_length_remaining(tvb, offset);
|
||||
offset += tvb_reported_length_remaining(tvb, offset);
|
||||
break;
|
||||
case CMP_TYPE_FINALMSGREP:
|
||||
next_tvb = tvb_new_subset(tvb, offset, tvb_length_remaining(tvb, offset), pdu_len);
|
||||
next_tvb = tvb_new_subset(tvb, offset, tvb_reported_length_remaining(tvb, offset), pdu_len);
|
||||
dissect_cmp_pdu(next_tvb, tree, &asn1_ctx);
|
||||
offset += tvb_length_remaining(tvb, offset);
|
||||
offset += tvb_reported_length_remaining(tvb, offset);
|
||||
break;
|
||||
case CMP_TYPE_ERRORMSGREP:
|
||||
/*XXX to be added*/
|
||||
|
@ -2368,7 +2368,7 @@ void proto_register_cmp(void) {
|
|||
NULL, HFILL }},
|
||||
|
||||
/*--- End of included file: packet-cmp-hfarr.c ---*/
|
||||
#line 324 "../../asn1/cmp/packet-cmp-template.c"
|
||||
#line 325 "../../asn1/cmp/packet-cmp-template.c"
|
||||
};
|
||||
|
||||
/* List of subtrees */
|
||||
|
@ -2426,7 +2426,7 @@ void proto_register_cmp(void) {
|
|||
&ett_cmp_PollRepContent_item,
|
||||
|
||||
/*--- End of included file: packet-cmp-ettarr.c ---*/
|
||||
#line 330 "../../asn1/cmp/packet-cmp-template.c"
|
||||
#line 331 "../../asn1/cmp/packet-cmp-template.c"
|
||||
};
|
||||
module_t *cmp_module;
|
||||
|
||||
|
@ -2520,7 +2520,7 @@ void proto_reg_handoff_cmp(void) {
|
|||
|
||||
|
||||
/*--- End of included file: packet-cmp-dis-tab.c ---*/
|
||||
#line 402 "../../asn1/cmp/packet-cmp-template.c"
|
||||
#line 403 "../../asn1/cmp/packet-cmp-template.c"
|
||||
inited = TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -431,7 +431,7 @@ dissect_cms_T_eContent(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset
|
|||
#line 102 "../../asn1/cms/cms.cnf"
|
||||
|
||||
offset = dissect_ber_octet_string(FALSE, actx, tree, tvb, offset, hf_index, &content_tvb);
|
||||
proto_item_set_text(actx->created_item, "eContent (%u bytes)", tvb_length (content_tvb));
|
||||
proto_item_set_text(actx->created_item, "eContent (%u bytes)", tvb_reported_length (content_tvb));
|
||||
|
||||
call_ber_oid_callback(object_identifier_id, content_tvb, 0, actx->pinfo, top_tree ? top_tree : tree, NULL);
|
||||
|
||||
|
|
Loading…
Reference in New Issue