aboutsummaryrefslogtreecommitdiffstats
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
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>
-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
-rw-r--r--epan/dissectors/packet-h225.c8
-rw-r--r--epan/dissectors/packet-h245.c4
-rw-r--r--epan/dissectors/packet-h283.c4
-rw-r--r--epan/dissectors/packet-h450.c18
-rw-r--r--epan/dissectors/packet-h460.c4
-rw-r--r--epan/dissectors/packet-q932-ros.c12
-rw-r--r--epan/dissectors/packet-q932.c2
-rw-r--r--epan/dissectors/packet-qsig.c4
16 files changed, 56 insertions, 56 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
diff --git a/epan/dissectors/packet-h225.c b/epan/dissectors/packet-h225.c
index 43d7a27ff4..0b9b789a93 100644
--- a/epan/dissectors/packet-h225.c
+++ b/epan/dissectors/packet-h225.c
@@ -1511,7 +1511,7 @@ dissect_h225_T_nsp_data(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_,
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
NO_BOUND, NO_BOUND, FALSE, &next_tvb);
- 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->pinfo, tree);
}
@@ -1608,7 +1608,7 @@ dissect_h225_DialedDigits(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U
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;
@@ -3120,7 +3120,7 @@ dissect_h225_FastStart_item(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
NO_BOUND, NO_BOUND, FALSE, &value_tvb);
- if (value_tvb && tvb_length(value_tvb)) {
+ if (value_tvb && tvb_reported_length(value_tvb)) {
dissect_h245_FastStart_OLC(value_tvb, actx->pinfo, tree, codec_str);
}
@@ -4796,7 +4796,7 @@ dissect_h225_T_h4501SupplementaryService_item(tvbuff_t *tvb _U_, int offset _U_,
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
NO_BOUND, NO_BOUND, FALSE, &h4501_tvb);
- if (h4501_tvb && tvb_length(h4501_tvb)) {
+ if (h4501_tvb && tvb_reported_length(h4501_tvb)) {
call_dissector(h4501_handle, h4501_tvb, actx->pinfo, tree);
}
diff --git a/epan/dissectors/packet-h245.c b/epan/dissectors/packet-h245.c
index d609f90527..13098dd798 100644
--- a/epan/dissectors/packet-h245.c
+++ b/epan/dissectors/packet-h245.c
@@ -2571,7 +2571,7 @@ dissect_h245_T_nsd_data(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_,
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
NO_BOUND, NO_BOUND, FALSE, &next_tvb);
- 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->pinfo, tree);
}
@@ -14249,7 +14249,7 @@ dissect_h245_T_returnedFunction(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *a
NO_BOUND, NO_BOUND, FALSE, &next_tvb);
- 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/epan/dissectors/packet-h283.c b/epan/dissectors/packet-h283.c
index d991e791a5..7ebd449a5c 100644
--- a/epan/dissectors/packet-h283.c
+++ b/epan/dissectors/packet-h283.c
@@ -296,7 +296,7 @@ dissect_h283_T_deviceListResp(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *act
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
NO_BOUND, NO_BOUND, FALSE, &next_tvb);
- 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->pinfo, tree);
}
@@ -442,7 +442,7 @@ dissect_h283_T_rdcPDU(tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, p
offset = dissect_per_octet_string(tvb, offset, actx, tree, hf_index,
NO_BOUND, NO_BOUND, FALSE, &next_tvb);
- 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->pinfo, proto_tree_get_root(tree));
}
info_is_set = TRUE;
diff --git a/epan/dissectors/packet-h450.c b/epan/dissectors/packet-h450.c
index 1ff0f345c8..5926dbb2e6 100644
--- a/epan/dissectors/packet-h450.c
+++ b/epan/dissectors/packet-h450.c
@@ -4743,12 +4743,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;
@@ -4788,12 +4788,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;
@@ -4833,12 +4833,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/epan/dissectors/packet-h460.c b/epan/dissectors/packet-h460.c
index dc2937aaf0..74fb2c9615 100644
--- a/epan/dissectors/packet-h460.c
+++ b/epan/dissectors/packet-h460.c
@@ -1970,7 +1970,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;
}
@@ -1981,7 +1981,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/epan/dissectors/packet-q932-ros.c b/epan/dissectors/packet-q932-ros.c
index 0133ae5571..eaa0e39120 100644
--- a/epan/dissectors/packet-q932-ros.c
+++ b/epan/dissectors/packet-q932-ros.c
@@ -247,12 +247,12 @@ dissect_q932_ros_InvokeArgument(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, in
#line 68 "../../asn1/q932-ros/q932-ros.cnf"
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);
return offset;
@@ -325,12 +325,12 @@ dissect_q932_ros_ResultArgument(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, in
#line 86 "../../asn1/q932-ros/q932-ros.cnf"
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);
@@ -421,12 +421,12 @@ dissect_q932_ros_T_parameter(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int o
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);
return offset;
diff --git a/epan/dissectors/packet-q932.c b/epan/dissectors/packet-q932.c
index 88d8ff4ba0..f058f73b24 100644
--- a/epan/dissectors/packet-q932.c
+++ b/epan/dissectors/packet-q932.c
@@ -784,7 +784,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/epan/dissectors/packet-qsig.c b/epan/dissectors/packet-qsig.c
index 080c50a474..02bc45af8b 100644
--- a/epan/dissectors/packet-qsig.c
+++ b/epan/dissectors/packet-qsig.c
@@ -2089,7 +2089,7 @@ dissect_qsig_T_extensionArgument(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, i
dissect_unknown_ber(actx->pinfo, next_tvb, offset, next_tree);
}
- offset+=tvb_length_remaining(tvb, offset);
+ offset+=tvb_reported_length_remaining(tvb, offset);
return offset;
@@ -2125,7 +2125,7 @@ dissect_qsig_PSS1InformationElement_U(gboolean implicit_tag _U_, tvbuff_t *tvb _
&out_tvb);
data_tree = proto_item_add_subtree(actx->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->pinfo, data_tree);