aboutsummaryrefslogtreecommitdiffstats
path: root/asn1
diff options
context:
space:
mode:
authorAndersBroman <anders.broman@ericsson.com>2015-04-08 10:03:08 +0200
committerAnders Broman <a.broman58@gmail.com>2015-04-08 08:18:50 +0000
commitf6a183d034c01fb23bdcd560a13272dc0dcd668c (patch)
treea8cbdf62d7f4785a0d217d4e85306ee2ac8a5115 /asn1
parent9721a2a5092747886ca520b6813844974e6e9698 (diff)
Replace deprecated tvb_length with tvb_reported_length.
Change-Id: I45d2ae41da823c50ba383a8e2aaec570ee3ad842 Reviewed-on: https://code.wireshark.org/review/7979 Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'asn1')
-rw-r--r--asn1/h225/h225.cnf8
-rw-r--r--asn1/h245/h245.cnf4
-rw-r--r--asn1/h283/h283.cnf4
-rw-r--r--asn1/h450/packet-h450-template.c18
-rw-r--r--asn1/h460/packet-h460-template.c4
-rw-r--r--asn1/q932-ros/q932-ros.cnf12
-rw-r--r--asn1/q932/packet-q932-template.c2
-rw-r--r--asn1/qsig/qsig.cnf4
8 files changed, 28 insertions, 28 deletions
diff --git a/asn1/h225/h225.cnf b/asn1/h225/h225.cnf
index b34a6dee49..485d9cb589 100644
--- a/asn1/h225/h225.cnf
+++ b/asn1/h225/h225.cnf
@@ -270,7 +270,7 @@ IsupNumber/nationalStandardPartyNumber isupNationalStandardPartyNumber
codec_str[0] = '\0';
%(DEFAULT_BODY)s
- if (value_tvb && tvb_length(value_tvb)) {
+ if (value_tvb && tvb_reported_length(value_tvb)) {
dissect_h245_FastStart_OLC(value_tvb, %(ACTX)s->pinfo, tree, codec_str);
}
@@ -307,7 +307,7 @@ IsupNumber/nationalStandardPartyNumber isupNationalStandardPartyNumber
%(DEFAULT_BODY)s
if (h225_pi && h225_pi->is_destinationInfo == TRUE) {
if (value_tvb) {
- len = tvb_length(value_tvb);
+ len = tvb_reported_length(value_tvb);
/* XXX - should this be allocated as an ephemeral string? */
if (len > sizeof h225_pi->dialedDigits - 1)
len = sizeof h225_pi->dialedDigits - 1;
@@ -556,7 +556,7 @@ IsupNumber/nationalStandardPartyNumber isupNationalStandardPartyNumber
tvbuff_t *h4501_tvb = NULL;
%(DEFAULT_BODY)s
- if (h4501_tvb && tvb_length(h4501_tvb)) {
+ if (h4501_tvb && tvb_reported_length(h4501_tvb)) {
call_dissector(h4501_handle, h4501_tvb, %(ACTX)s->pinfo, tree);
}
#.END
@@ -625,7 +625,7 @@ H221NonStandard/manufacturerCode VAL_PTR = &manufacturerCode
tvbuff_t *next_tvb = NULL;
%(DEFAULT_BODY)s
- if (next_tvb && tvb_length(next_tvb)) {
+ if (next_tvb && tvb_reported_length(next_tvb)) {
call_dissector((nsp_handle)?nsp_handle:data_handle, next_tvb, %(ACTX)s->pinfo, tree);
}
#.END
diff --git a/asn1/h245/h245.cnf b/asn1/h245/h245.cnf
index 713a51cd1b..8c5f9acb55 100644
--- a/asn1/h245/h245.cnf
+++ b/asn1/h245/h245.cnf
@@ -997,7 +997,7 @@ NonStandardIdentifier/h221NonStandard/manufacturerCode VAL_PTR = &manufacturerC
tvbuff_t *next_tvb = NULL;
%(DEFAULT_BODY)s
- if (next_tvb && tvb_length(next_tvb)) {
+ if (next_tvb && tvb_reported_length(next_tvb)) {
call_dissector((nsp_handle)?nsp_handle:data_handle, next_tvb, %(ACTX)s->pinfo, tree);
}
#.END
@@ -1010,7 +1010,7 @@ NonStandardIdentifier/h221NonStandard/manufacturerCode VAL_PTR = &manufacturerC
%(DEFAULT_BODY)s
- if (next_tvb && tvb_length(next_tvb)) {
+ if (next_tvb && tvb_reported_length(next_tvb)) {
saved_h245_pi = h245_pi;
h245_pi = NULL;
subtree = proto_tree_add_subtree(tree, next_tvb, 0, -1, ett_h245_returnedFunction, &item, "The returned function");
diff --git a/asn1/h283/h283.cnf b/asn1/h283/h283.cnf
index f1d5844ea7..1e4f949462 100644
--- a/asn1/h283/h283.cnf
+++ b/asn1/h283/h283.cnf
@@ -93,7 +93,7 @@ LCTPDU
tvbuff_t *next_tvb = NULL;
%(DEFAULT_BODY)s
- if (next_tvb && tvb_length(next_tvb)) {
+ if (next_tvb && tvb_reported_length(next_tvb)) {
call_dissector((rdc_pdu_handle)?rdc_pdu_handle:data_handle, next_tvb, %(ACTX)s->pinfo, proto_tree_get_root(tree));
}
info_is_set = TRUE;
@@ -103,7 +103,7 @@ LCTPDU
tvbuff_t *next_tvb = NULL;
%(DEFAULT_BODY)s
- if (next_tvb && tvb_length(next_tvb)) {
+ if (next_tvb && tvb_reported_length(next_tvb)) {
call_dissector((rdc_device_list_handle)?rdc_device_list_handle:data_handle, next_tvb, %(ACTX)s->pinfo, tree);
}
#.END
diff --git a/asn1/h450/packet-h450-template.c b/asn1/h450/packet-h450-template.c
index 1f0f1cce20..f179e6b746 100644
--- a/asn1/h450/packet-h450-template.c
+++ b/asn1/h450/packet-h450-template.c
@@ -149,12 +149,12 @@ dissect_h450_arg(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), rctx->apdu_depth), " %s", p);
}
- if (op_ptr->arg_pdu && (tvb_length_remaining(tvb, offset) > 0))
+ if (op_ptr->arg_pdu && (tvb_reported_length_remaining(tvb, offset) > 0))
offset = op_ptr->arg_pdu(tvb, pinfo, tree, NULL);
else
- if (tvb_length_remaining(tvb, offset) > 0) {
+ if (tvb_reported_length_remaining(tvb, offset) > 0) {
proto_tree_add_expert(tree, pinfo, &ei_h450_unsupported_arg_type, tvb, offset, -1);
- offset += tvb_length_remaining(tvb, offset);
+ offset += tvb_reported_length_remaining(tvb, offset);
}
return offset;
@@ -194,12 +194,12 @@ dissect_h450_res(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), rctx->apdu_depth), " %s", p);
}
- if (op_ptr->res_pdu && (tvb_length_remaining(tvb, offset) > 0))
+ if (op_ptr->res_pdu && (tvb_reported_length_remaining(tvb, offset) > 0))
offset = op_ptr->res_pdu(tvb, pinfo, tree, NULL);
else
- if (tvb_length_remaining(tvb, offset) > 0) {
+ if (tvb_reported_length_remaining(tvb, offset) > 0) {
proto_tree_add_expert(tree, pinfo, &ei_h450_unsupported_result_type, tvb, offset, -1);
- offset += tvb_length_remaining(tvb, offset);
+ offset += tvb_reported_length_remaining(tvb, offset);
}
return offset;
@@ -239,12 +239,12 @@ dissect_h450_err(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data
proto_item_append_text(proto_item_get_parent_nth(proto_tree_get_parent(tree), rctx->apdu_depth), " %s", p);
}
- if (err_ptr->err_pdu && (tvb_length_remaining(tvb, offset) > 0))
+ if (err_ptr->err_pdu && (tvb_reported_length_remaining(tvb, offset) > 0))
offset = err_ptr->err_pdu(tvb, pinfo, tree, NULL);
else
- if (tvb_length_remaining(tvb, offset) > 0) {
+ if (tvb_reported_length_remaining(tvb, offset) > 0) {
proto_tree_add_expert(tree, pinfo, &ei_h450_unsupported_error_type, tvb, offset, -1);
- offset += tvb_length_remaining(tvb, offset);
+ offset += tvb_reported_length_remaining(tvb, offset);
}
return offset;
diff --git a/asn1/h460/packet-h460-template.c b/asn1/h460/packet-h460-template.c
index 4edca932ad..e608d2879f 100644
--- a/asn1/h460/packet-h460-template.c
+++ b/asn1/h460/packet-h460-template.c
@@ -58,7 +58,7 @@ dissect_ies(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
if (q931_ie_handle) {
call_dissector(q931_ie_handle, tvb, pinfo, tree);
- offset += tvb_length_remaining(tvb, offset);
+ offset += tvb_reported_length_remaining(tvb, offset);
}
return offset;
}
@@ -69,7 +69,7 @@ dissect_ras(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_)
if (h225_ras_handle) {
call_dissector(h225_ras_handle, tvb, pinfo, tree);
- offset += tvb_length_remaining(tvb, offset);
+ offset += tvb_reported_length_remaining(tvb, offset);
}
return offset;
}
diff --git a/asn1/q932-ros/q932-ros.cnf b/asn1/q932-ros/q932-ros.cnf
index 4ad7c7397e..355653a768 100644
--- a/asn1/q932-ros/q932-ros.cnf
+++ b/asn1/q932-ros/q932-ros.cnf
@@ -67,12 +67,12 @@ Invoke/argument TYPE = FT_BYTES DISPLAY = BASE_NONE
#.FN_BODY Invoke/argument
gint len;
- len = tvb_length_remaining(tvb, offset);
+ len = tvb_reported_length_remaining(tvb, offset);
if (len)
proto_tree_add_item(tree, hf_index, tvb, offset, len, ENC_NA);
arg_next_tvb = tvb_new_subset_remaining(tvb, offset);
- offset += tvb_length_remaining(tvb, offset);
+ offset += tvb_reported_length_remaining(tvb, offset);
#.END
#.INCLUDE ../ros/ros-inv.cnf
@@ -85,12 +85,12 @@ ReturnResult/result/result TYPE = FT_BYTES DISPLAY = BASE_NONE
#.FN_BODY ReturnResult/result/result
gint len;
- len = tvb_length_remaining(tvb, offset);
+ len = tvb_reported_length_remaining(tvb, offset);
if (len)
proto_tree_add_item(tree, hf_index, tvb, offset, len, ENC_NA);
res_next_tvb = tvb_new_subset_remaining(tvb, offset);
- offset += tvb_length_remaining(tvb, offset);
+ offset += tvb_reported_length_remaining(tvb, offset);
#.END
@@ -105,12 +105,12 @@ ReturnError/parameter TYPE = FT_BYTES DISPLAY = BASE_NONE
gint len;
- len = tvb_length_remaining(tvb, offset);
+ len = tvb_reported_length_remaining(tvb, offset);
if (len)
proto_tree_add_item(tree, hf_index, tvb, offset, len, ENC_NA);
err_next_tvb = tvb_new_subset_remaining(tvb, offset);
- offset += tvb_length_remaining(tvb, offset);
+ offset += tvb_reported_length_remaining(tvb, offset);
#.END
#.INCLUDE ../ros/ros-err.cnf
diff --git a/asn1/q932/packet-q932-template.c b/asn1/q932/packet-q932-template.c
index 5dbf523f72..6c58a592cc 100644
--- a/asn1/q932/packet-q932-template.c
+++ b/asn1/q932/packet-q932-template.c
@@ -264,7 +264,7 @@ dissect_q932_ie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
proto_tree_add_item(ie_tree, hf_q932_ie_type, tvb, offset, 1, ENC_BIG_ENDIAN);
proto_tree_add_item(ie_tree, hf_q932_ie_len, tvb, offset + 1, 1, ENC_BIG_ENDIAN);
offset += 2;
- if (tvb_length_remaining(tvb, offset) <= 0)
+ if (tvb_reported_length_remaining(tvb, offset) <= 0)
return;
switch (ie_type) {
case Q932_IE_FACILITY :
diff --git a/asn1/qsig/qsig.cnf b/asn1/qsig/qsig.cnf
index 547cc31ec1..59ed83a1ba 100644
--- a/asn1/qsig/qsig.cnf
+++ b/asn1/qsig/qsig.cnf
@@ -153,7 +153,7 @@ NameData TYPE = FT_STRING DISPLAY = BASE_NONE
dissect_unknown_ber(actx->pinfo, next_tvb, offset, next_tree);
}
- offset+=tvb_length_remaining(tvb, offset);
+ offset+=tvb_reported_length_remaining(tvb, offset);
#.END
#.FN_BODY AuthAlgorithm/param
@@ -166,7 +166,7 @@ NameData TYPE = FT_STRING DISPLAY = BASE_NONE
%(DEFAULT_BODY)s
data_tree = proto_item_add_subtree(%(ACTX)s->created_item, ett_cnq_PSS1InformationElement);
- if (out_tvb && (tvb_length(out_tvb) > 0) && q931_ie_handle)
+ if (out_tvb && (tvb_reported_length(out_tvb) > 0) && q931_ie_handle)
call_dissector(q931_ie_handle, out_tvb, %(ACTX)s->pinfo, data_tree);
#.END