aboutsummaryrefslogtreecommitdiffstats
path: root/asn1
diff options
context:
space:
mode:
authorAndersBroman <anders.broman@ericsson.com>2015-04-10 14:57:55 +0200
committerAnders Broman <a.broman58@gmail.com>2015-04-10 13:19:33 +0000
commit1785d4206111dcbd0ef7ced3a1aad55da76c7b91 (patch)
treeb2f250c1f8e3656a304a4907b1a4c1e6acad9f47 /asn1
parent38d3e063d3fb3d007e61b5e8681372c247171218 (diff)
Remove depricated API tvb_length -> tvb_reported_length
Change-Id: I78b1d2accf4fd0b37eaa16cb8bf515422565e98a Reviewed-on: https://code.wireshark.org/review/8011 Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'asn1')
-rw-r--r--asn1/p22/p22.cnf2
-rw-r--r--asn1/pkix1explicit/pkix1explicit.cnf2
-rw-r--r--asn1/rrc/rrc.cnf10
-rw-r--r--asn1/rtse/rtse.cnf6
-rw-r--r--asn1/rua/rua.cnf2
-rw-r--r--asn1/sbc-ap/sbc-ap.cnf2
-rw-r--r--asn1/snmp/packet-snmp-template.c2
-rw-r--r--asn1/snmp/snmp.cnf4
-rw-r--r--asn1/spnego/spnego.cnf4
-rw-r--r--asn1/sv/sv.cnf2
-rw-r--r--asn1/t124/t124.cnf4
-rw-r--r--asn1/t38/packet-t38-template.c6
-rw-r--r--asn1/t38/t38.cnf2
-rw-r--r--asn1/x509if/x509if.cnf2
-rw-r--r--asn1/x509sat/x509sat.cnf2
15 files changed, 26 insertions, 26 deletions
diff --git a/asn1/p22/p22.cnf b/asn1/p22/p22.cnf
index 92f57c8ba6..f4a1bda42e 100644
--- a/asn1/p22/p22.cnf
+++ b/asn1/p22/p22.cnf
@@ -250,7 +250,7 @@ IpnSecurityResponse B "2.6.1.18.1" "id-sec-security-common-fields"
%(DEFAULT_BODY)s
if(subject)
- col_append_fstr(actx->pinfo->cinfo, COL_INFO, " (%%s)", tvb_format_text(subject, 0, tvb_length(subject)));
+ col_append_fstr(actx->pinfo->cinfo, COL_INFO, " (%%s)", tvb_format_text(subject, 0, tvb_reported_length(subject)));
#.FN_PARS CharacterSetRegistration
VAL_PTR=&crs
diff --git a/asn1/pkix1explicit/pkix1explicit.cnf b/asn1/pkix1explicit/pkix1explicit.cnf
index ba03c0f18d..a86cd9dc4e 100644
--- a/asn1/pkix1explicit/pkix1explicit.cnf
+++ b/asn1/pkix1explicit/pkix1explicit.cnf
@@ -82,7 +82,7 @@ ASIdentifiers B "1.3.6.1.5.5.7.1.8" "id-pe-autonomousSysIds"
return offset;
subtree = proto_item_add_subtree(actx->created_item, ett_pkix1explicit_addressFamily);
proto_tree_add_item(subtree, hf_pkix1explicit_addressFamily_afn, parameter_tvb, 0, 2, ENC_BIG_ENDIAN);
- if(tvb_length(parameter_tvb)>2)
+ if(tvb_reported_length(parameter_tvb)>2)
proto_tree_add_item(subtree, hf_pkix1explicit_addressFamily_safi, parameter_tvb, 0, 2, ENC_BIG_ENDIAN);
diff --git a/asn1/rrc/rrc.cnf b/asn1/rrc/rrc.cnf
index 1a212a3621..35059a634b 100644
--- a/asn1/rrc/rrc.cnf
+++ b/asn1/rrc/rrc.cnf
@@ -527,7 +527,7 @@ fp_info *fpinf ;
%(DEFAULT_BODY)s
- bits_remaining = 8*tvb_length(tvb) - offset;
+ bits_remaining = 8*tvb_reported_length(tvb) - offset;
whole_octets_remaining = bits_remaining / 8;
gsm_message_tvb = tvb_new_octet_aligned(tvb, offset, 8*whole_octets_remaining);
@@ -542,7 +542,7 @@ fp_info *fpinf ;
%(DEFAULT_BODY)s
- bits_remaining = 8*tvb_length(tvb) - offset;
+ bits_remaining = 8*tvb_reported_length(tvb) - offset;
whole_octets_remaining = bits_remaining / 8;
gsm_message_tvb = tvb_new_octet_aligned(tvb, offset, 8*whole_octets_remaining);
@@ -582,7 +582,7 @@ fp_info *fpinf ;
%(DEFAULT_BODY)s
if (parameter_tvb){
- de_ms_cm_3(parameter_tvb, tree, actx->pinfo, 0, tvb_length(parameter_tvb), NULL, 0);
+ de_ms_cm_3(parameter_tvb, tree, actx->pinfo, 0, tvb_reported_length(parameter_tvb), NULL, 0);
}
#.FN_BODY GSM-MS-RadioAccessCapability VAL_PTR = &parameter_tvb
@@ -590,7 +590,7 @@ fp_info *fpinf ;
%(DEFAULT_BODY)s
if (parameter_tvb){
- de_gmm_ms_radio_acc_cap(parameter_tvb, tree, actx->pinfo, 0, tvb_length(parameter_tvb), NULL, 0);
+ de_gmm_ms_radio_acc_cap(parameter_tvb, tree, actx->pinfo, 0, tvb_reported_length(parameter_tvb), NULL, 0);
}
#.FN_BODY InterRATHandoverInfoWithInterRATCapabilities-r3-IEs/interRATHandoverInfo VAL_PTR = &parameter_tvb
@@ -708,7 +708,7 @@ HNBName TYPE=FT_STRING DISPLAY=STR_UNICODE
proto_tree *subtree;
%(DEFAULT_BODY)s
- length = tvb_length(nas_sys_info_gsm_map_tvb);
+ length = tvb_reported_length(nas_sys_info_gsm_map_tvb);
if (length) {
if (actx->private_data) {
switch (GPOINTER_TO_UINT(actx->private_data)-1) {
diff --git a/asn1/rtse/rtse.cnf b/asn1/rtse/rtse.cnf
index ffda446a9e..ad72cb4973 100644
--- a/asn1/rtse/rtse.cnf
+++ b/asn1/rtse/rtse.cnf
@@ -116,7 +116,7 @@ RTSE-apdus
tvbuff_t *string = NULL;
%(DEFAULT_BODY)s
if(open_request && string)
- col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", tvb_format_text(string, 0, tvb_length(string)));
+ col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", tvb_format_text(string, 0, tvb_reported_length(string)));
#.FN_PARS CommonReference
VAL_PTR=&string
@@ -124,7 +124,7 @@ RTSE-apdus
tvbuff_t *string = NULL;
%(DEFAULT_BODY)s
if(open_request && string)
- col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", tvb_format_text(string, 0, tvb_length(string)));
+ col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", tvb_format_text(string, 0, tvb_reported_length(string)));
#.END
@@ -132,7 +132,7 @@ RTSE-apdus
tvbuff_t *string = NULL;
%(DEFAULT_BODY)s
if(open_request && string)
- col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", tvb_format_text(string, 0, tvb_length(string)));
+ col_append_fstr(actx->pinfo->cinfo, COL_INFO, " %%s", tvb_format_text(string, 0, tvb_reported_length(string)));
#.FN_BODY RTTPapdu VAL_PTR=&priority
int priority = -1;
diff --git a/asn1/rua/rua.cnf b/asn1/rua/rua.cnf
index 96948c77b6..5796355958 100644
--- a/asn1/rua/rua.cnf
+++ b/asn1/rua/rua.cnf
@@ -94,7 +94,7 @@ ProtocolIE-Single-Container
#.FN_BODY RANAP-Message VAL_PTR = &ranap_message_tvb
tvbuff_t *ranap_message_tvb=NULL;
%(DEFAULT_BODY)s
- if ((tvb_length(ranap_message_tvb)>0)&&(ranap_handle)) { /* RUA has a RANAP-PDU */
+ if ((tvb_reported_length(ranap_message_tvb)>0)&&(ranap_handle)) { /* RUA has a RANAP-PDU */
col_set_str(actx->pinfo->cinfo, COL_INFO,
"(RUA) "); /* Set info to (RUA) to make room for RANAP */
col_set_fence(actx->pinfo->cinfo, COL_INFO);
diff --git a/asn1/sbc-ap/sbc-ap.cnf b/asn1/sbc-ap/sbc-ap.cnf
index e8e33ad886..cbeeec8a7f 100644
--- a/asn1/sbc-ap/sbc-ap.cnf
+++ b/asn1/sbc-ap/sbc-ap.cnf
@@ -100,7 +100,7 @@ ProtocolIE-Field/value ie_field_value
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
3, 3, FALSE, &parameter_tvb);
- if(tvb_length(tvb)==0)
+ if(tvb_reported_length(tvb)==0)
return offset;
if (!parameter_tvb)
diff --git a/asn1/snmp/packet-snmp-template.c b/asn1/snmp/packet-snmp-template.c
index cf2d8b7bfe..eb676407db 100644
--- a/asn1/snmp/packet-snmp-template.c
+++ b/asn1/snmp/packet-snmp-template.c
@@ -1909,7 +1909,7 @@ dissect_snmp_pdu(tvbuff_t *tvb, int offset, packet_info *pinfo,
* have that routine deal with ASN.1, and just use
* "tcp_dissect_pdus()"?)
*/
- length_remaining = tvb_ensure_length_remaining(tvb, offset);
+ length_remaining = tvb_ensure_captured_length_remaining(tvb, offset);
/* NOTE: we have to parse the message piece by piece, since the
* capture length may be less than the message length: a 'global'
diff --git a/asn1/snmp/snmp.cnf b/asn1/snmp/snmp.cnf
index 715a1b6934..bf7010ba41 100644
--- a/asn1/snmp/snmp.cnf
+++ b/asn1/snmp/snmp.cnf
@@ -95,7 +95,7 @@ gint pdu_type=-1;
offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, &usm_p.engine_tvb);
if (usm_p.engine_tvb) {
proto_tree* engine_tree = proto_item_add_subtree(%(ACTX)s->created_item,ett_engineid);
- dissect_snmp_engineid(engine_tree, actx->pinfo, usm_p.engine_tvb, 0, tvb_length_remaining(usm_p.engine_tvb,0));
+ dissect_snmp_engineid(engine_tree, actx->pinfo, usm_p.engine_tvb, 0, tvb_reported_length_remaining(usm_p.engine_tvb,0));
}
#.FN_BODY SnmpEngineID
@@ -104,7 +104,7 @@ gint pdu_type=-1;
offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, &param_tvb);
if (param_tvb) {
proto_tree* engine_tree = proto_item_add_subtree(%(ACTX)s->created_item,ett_engineid);
- dissect_snmp_engineid(engine_tree, actx->pinfo, param_tvb, 0, tvb_length_remaining(param_tvb,0));
+ dissect_snmp_engineid(engine_tree, actx->pinfo, param_tvb, 0, tvb_reported_length_remaining(param_tvb,0));
}
#.FN_PARS UsmSecurityParameters/msgUserName
diff --git a/asn1/spnego/spnego.cnf b/asn1/spnego/spnego.cnf
index e9f5251db2..a765415290 100644
--- a/asn1/spnego/spnego.cnf
+++ b/asn1/spnego/spnego.cnf
@@ -91,11 +91,11 @@ NegotiationToken
len = call_dissector(next_level_value_lcl->wrap_handle, token_tvb, actx->pinfo,
subtree);
if (len == 0)
- offset = tvb_length(tvb);
+ offset = tvb_reported_length(tvb);
else
offset = offset + len;
} else
- offset = tvb_length(tvb);
+ offset = tvb_reported_length(tvb);
#.FN_BODY MechTypeList
diff --git a/asn1/sv/sv.cnf b/asn1/sv/sv.cnf
index 0b04cabd8c..82b2c00bde 100644
--- a/asn1/sv/sv.cnf
+++ b/asn1/sv/sv.cnf
@@ -28,7 +28,7 @@ SampledValues
nstime_t ts;
gchar * ptime;
- len = tvb_length_remaining(tvb, offset);
+ len = tvb_reported_length_remaining(tvb, offset);
if(len != 8)
{
diff --git a/asn1/t124/t124.cnf b/asn1/t124/t124.cnf
index 0a4faea114..e8ac286e4a 100644
--- a/asn1/t124/t124.cnf
+++ b/asn1/t124/t124.cnf
@@ -133,7 +133,7 @@ RegistryAllocateHandleResponse/result AllocateHandleResponseResult
/* Not sure why - but lets ignore the length. */
/* We assume the OCTET STRING is all of the remaining bytes */
- if(tvb_length(next_tvb) == 42) {
+ if(tvb_reported_length(next_tvb) == 42) {
/* this is perhaps a naive ... */
next_tvb = tvb_new_subset_remaining(tvb, (old_offset>>3)+1);
}
@@ -153,7 +153,7 @@ RegistryAllocateHandleResponse/result AllocateHandleResponseResult
if(next_tvb) {
- ns = tvb_get_string_enc(NULL, t124NSIdentifier, 0, tvb_length(t124NSIdentifier), ENC_ASCII|ENC_NA);
+ ns = tvb_get_string_enc(NULL, t124NSIdentifier, 0, tvb_reported_length(t124NSIdentifier), ENC_ASCII|ENC_NA);
if(ns != NULL) {
dissector_try_string(t124_ns_dissector_table, ns, next_tvb, actx->pinfo, top_tree, NULL);
g_free(ns);
diff --git a/asn1/t38/packet-t38-template.c b/asn1/t38/packet-t38-template.c
index 09d1154a6b..edf59060da 100644
--- a/asn1/t38/packet-t38-template.c
+++ b/asn1/t38/packet-t38-template.c
@@ -538,7 +538,7 @@ dissect_t38_udp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
offset = dissect_UDPTLPacket_PDU(tvb, pinfo, tr, NULL);
- if (tvb_length_remaining(tvb,offset)>0){
+ if (tvb_reported_length_remaining(tvb,offset)>0){
proto_tree_add_expert_format(tr, pinfo, &ei_t38_malformed, tvb, offset, tvb_reported_length_remaining(tvb, offset),
"[MALFORMED PACKET or wrong preference settings]");
col_append_str(pinfo->cinfo, COL_INFO, " [Malformed?]");
@@ -575,13 +575,13 @@ dissect_t38_tcp_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
col_append_str(pinfo->cinfo, COL_INFO, "TCP: IFPPacket");
- while(tvb_length_remaining(tvb,offset)>0)
+ while(tvb_reported_length_remaining(tvb,offset)>0)
{
next_tvb = tvb_new_subset_remaining(tvb, offset);
offset += dissect_IFPPacket_PDU(next_tvb, pinfo, tr, NULL);
ifp_packet_number++;
- if(tvb_length_remaining(tvb,offset)>0){
+ if(tvb_reported_length_remaining(tvb,offset)>0){
if(t38_tpkt_usage == T38_TPKT_ALWAYS){
proto_tree_add_expert_format(tr, pinfo, &ei_t38_malformed, tvb, offset, tvb_reported_length_remaining(tvb, offset),
"[MALFORMED PACKET or wrong preference settings]");
diff --git a/asn1/t38/t38.cnf b/asn1/t38/t38.cnf
index 7fa29ee1c7..aef2791aea 100644
--- a/asn1/t38/t38.cnf
+++ b/asn1/t38/t38.cnf
@@ -152,7 +152,7 @@ VAL_PTR=&Data_Field_field_type_value
guint32 value_len;
%(DEFAULT_BODY)s
- value_len = tvb_length(value_tvb);
+ value_len = tvb_reported_length(value_tvb);
#.FN_FTR Data-Field/_item/field-data
if (primary_part){
diff --git a/asn1/x509if/x509if.cnf b/asn1/x509if/x509if.cnf
index 0c4137f7a7..92fa3fa211 100644
--- a/asn1/x509if/x509if.cnf
+++ b/asn1/x509if/x509if.cnf
@@ -242,7 +242,7 @@ DistinguishedName B "2.16.840.1.101.2.2.1.188" "id-at-primaryMember"
if(out_tvb) {
/* it was a string - format it */
- value = tvb_format_text(out_tvb, 0, tvb_length(out_tvb));
+ value = tvb_format_text(out_tvb, 0, tvb_reported_length(out_tvb));
if(last_rdn) {
g_strlcat(last_rdn, value, MAX_RDN_STR_LEN);
diff --git a/asn1/x509sat/x509sat.cnf b/asn1/x509sat/x509sat.cnf
index 036a410a85..ee3422770b 100644
--- a/asn1/x509sat/x509sat.cnf
+++ b/asn1/x509sat/x509sat.cnf
@@ -385,7 +385,7 @@ XDayOf/fifth fifth_dayof
offset=dissect_ber_identifier(actx->pinfo, tree, tvb, offset, &ber_class, &pc, &tag);
offset=dissect_ber_length(actx->pinfo, tree, tvb, offset, &len, NULL);
} else {
- gint32 remaining=tvb_length_remaining(tvb, offset);
+ gint32 remaining=tvb_reported_length_remaining(tvb, offset);
len=remaining>0 ? remaining : 0;
}