From 14824e6adf07a1c3cfb6537ce8723d873ecd0d0f Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Thu, 19 Jun 2014 17:18:16 +0000 Subject: Revert "Fixup: tvb_* -> tvb_captured" https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html This reverts commit 246fe2ca4c67d8c98caa84e2f57694f6322e2f96. Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f Reviewed-on: https://code.wireshark.org/review/2430 Reviewed-by: Michael Mann --- epan/dissectors/packet-bssap.c | 114 ++++++++++++++++++++--------------------- 1 file changed, 57 insertions(+), 57 deletions(-) (limited to 'epan/dissectors/packet-bssap.c') diff --git a/epan/dissectors/packet-bssap.c b/epan/dissectors/packet-bssap.c index 870c72b190..e309bf7ff3 100644 --- a/epan/dissectors/packet-bssap.c +++ b/epan/dissectors/packet-bssap.c @@ -371,7 +371,7 @@ dissect_bssap_unknown_message(tvbuff_t *message_tvb, proto_tree *bssap_tree) { guint32 message_length; - message_length = tvb_captured_length(message_tvb); + message_length = tvb_length(message_tvb); proto_tree_add_text(bssap_tree, message_tvb, 0, message_length, "Unknown message (%u byte%s)", @@ -639,7 +639,7 @@ unpack_digits(tvbuff_t *tvb, int offset, dgt_set_t *dgt, gboolean skip_first) int i = 0; char *digit_str; - length = tvb_captured_length(tvb); + length = tvb_length(tvb); if (length < offset) return ""; digit_str = (char *)wmem_alloc(wmem_packet_scope(), (length - offset)*2+1); @@ -1663,37 +1663,37 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr offset = dissect_bssap_vlr_number(tvb, bssap_tree, offset); /* End of mandatory elements */ - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; /* TMSI TMSI 18.4.23 O TLV 6 */ if (check_optional_ie(tvb, offset, BSSAP_TMSI)) offset = dissect_bssap_tmsi(tvb, bssap_tree, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; /* Location area identifier Location area identifier 18.4.14 O TLV 7 */ if (check_optional_ie(tvb, offset, BSSAP_LOC_AREA_ID)) offset = dissect_bssap_loc_area_id(tvb, bssap_tree, pinfo, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; /* Channel needed Channel needed 18.4.2 O TLV 3 */ if (check_optional_ie(tvb, offset, BSSAP_CHANNEL_NEEDED)) offset = dissect_bssap_channel_needed(tvb, bssap_tree, pinfo, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; /* eMLPP Priority eMLPP Priority 18.4.4 O TLV 3 */ if (check_optional_ie(tvb, offset, BSSAP_EMLPP_PRIORITY)) offset = dissect_bssap_emlpp_priority(tvb, bssap_tree, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; /* Global CN-Id Global CN-Id 18.4.27 O TLV 7 */ if (check_optional_ie(tvb, offset, BSSAP_GLOBAL_CN_ID)) offset = dissect_bssap_global_cn_id(tvb, pinfo, bssap_tree, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data"); @@ -1706,7 +1706,7 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr if (check_ie(tvb, tree, &offset, BSSAP_GS_CAUSE)) offset = dissect_bssap_Gs_cause(tvb, bssap_tree, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data"); break; @@ -1723,7 +1723,7 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr if (check_ie(tvb, tree, &offset, BSSAP_DLINK_TNL_PLD_CTR_AND_INF)) offset = dissect_bssap_dlink_tunnel_payload_control_and_info(tvb, pinfo, bssap_tree, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data"); break; @@ -1736,7 +1736,7 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr if (check_ie(tvb, tree, &offset, BSSAP_ULINK_TNL_PLD_CTR_AND_INF)) offset = dissect_bssap_ulink_tunnel_payload_control_and_info(tvb, pinfo, bssap_tree, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data"); break; @@ -1760,31 +1760,31 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr /* Mobile station classmark Mobile station classmark 1 18.4.18 M TLV 3 */ if (check_ie(tvb, tree, &offset, BSSAP_MOBILE_STN_CLS_MRK1)) offset = dissect_bssap_mobile_stn_cls_mrk1(tvb, bssap_tree, pinfo, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; /* Old location area identifier Location area identifier 18.4.14 O TLV 7 */ if (check_optional_ie(tvb, offset, BSSAP_LOC_AREA_ID)) offset = dissect_bssap_loc_area_id(tvb, bssap_tree, pinfo, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; /* TMSI status TMSI status 18.4.24 O TLV 3 */ if (check_optional_ie(tvb, offset, BSSAP_TMSI_STATUS)) offset = dissect_bssap_tmsi_status(tvb, bssap_tree, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; /* New service area identification Service area identification 18.4.21b O TLV 9 */ if (check_optional_ie(tvb, offset, BSSAP_SERVICE_AREA_ID)) offset = dissect_bssap_service_area_id(tvb, bssap_tree, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; /* IMEISV IMEISV 18.4.9 O TLV 10 */ if (check_optional_ie(tvb, offset, BSSAP_IMEISV)) offset = dissect_bssap_imesiv(tvb, bssap_tree, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data"); break; @@ -1797,13 +1797,13 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr if (check_ie(tvb, tree, &offset, BSSAP_LOC_AREA_ID)) offset = dissect_bssap_loc_area_id(tvb, bssap_tree, pinfo, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; /* New TMSI, or IMSI Mobile identity 18.4.17 O TLV 6-10 */ if (check_optional_ie(tvb, offset, BSSAP_MOBILE_ID)) offset = dissect_bssap_mobile_id(tvb, bssap_tree, pinfo, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data"); break; @@ -1814,7 +1814,7 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr /* Reject cause Reject cause 18.4.21 M TLV 3 */ if (check_ie(tvb, tree, &offset, BSSAP_REJECT_CAUSE)) offset = dissect_bssap_reject_cause(tvb, bssap_tree, pinfo, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data"); break; @@ -1823,20 +1823,20 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr if (check_ie(tvb, tree, &offset, BSSAP_IMSI)) offset = dissect_bssap_imsi(tvb, bssap_tree, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; /* Cell global identity Cell global identity 18.4.1 O TLV 10 */ if (check_optional_ie(tvb, offset, BSSAP_CELL_GBL_ID)) offset = dissect_bssap_cell_global_id(tvb, bssap_tree, pinfo, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; /* Service area identification Service area identification 18.4.21b O TLV 9 */ if (check_optional_ie(tvb, offset, BSSAP_SERVICE_AREA_ID)) offset = dissect_bssap_service_area_id(tvb, bssap_tree, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data"); break; @@ -1845,7 +1845,7 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr if (check_ie(tvb, tree, &offset, BSSAP_IMSI)) offset = dissect_bssap_imsi(tvb, bssap_tree, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data"); break; @@ -1854,7 +1854,7 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr if (check_ie(tvb, tree, &offset, BSSAP_IMSI)) offset = dissect_bssap_imsi(tvb, bssap_tree, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data"); break; @@ -1867,7 +1867,7 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr if (check_ie(tvb, tree, &offset, BSSAP_GS_CAUSE)) offset = dissect_bssap_Gs_cause(tvb, bssap_tree, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data"); break; @@ -1876,20 +1876,20 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr if (check_ie(tvb, tree, &offset, BSSAP_IMSI)) offset = dissect_bssap_imsi(tvb, bssap_tree, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; /* Cell global identity Cell global identity 18.4.1 O TLV 10 */ if (check_optional_ie(tvb, offset, BSSAP_CELL_GBL_ID)) offset = dissect_bssap_cell_global_id(tvb, bssap_tree, pinfo, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; /* Service area identification Service area identification 18.4.21b O TLV 9 */ if (check_optional_ie(tvb, offset, BSSAP_SERVICE_AREA_ID)) offset = dissect_bssap_service_area_id(tvb, bssap_tree, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data"); break; @@ -1906,20 +1906,20 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr if (check_ie(tvb, tree, &offset, BSSAP_IMSI_DET_FROM_GPRS_SERV_TYPE)) offset = dissect_bssap_imsi_det_from_gprs_serv_type(tvb, bssap_tree, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; /* Cell global identity Cell global identity 18.4.1 O TLV 10 */ if (check_optional_ie(tvb, offset, BSSAP_CELL_GBL_ID)) offset = dissect_bssap_cell_global_id(tvb, bssap_tree, pinfo, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; /* Service area identification Service area identification 18.4.21b O TLV 9 */ if (check_optional_ie(tvb, offset, BSSAP_SERVICE_AREA_ID)) offset = dissect_bssap_service_area_id(tvb, bssap_tree, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data"); break; @@ -1928,7 +1928,7 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr if (check_ie(tvb, tree, &offset, BSSAP_IMSI)) offset = dissect_bssap_imsi(tvb, bssap_tree, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data"); break; @@ -1945,27 +1945,27 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr if (check_ie(tvb, tree, &offset, BSSAP_IMSI_DET_FROM_NON_GPRS_SERV_TYPE)) offset = dissect_bssap_imsi_det_from_non_gprs_serv_type(tvb, bssap_tree, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; /* Cell global identity Cell global identity 18.4.1 O TLV 10 */ if (check_optional_ie(tvb, offset, BSSAP_CELL_GBL_ID)) offset = dissect_bssap_cell_global_id(tvb, bssap_tree, pinfo, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; /* Location information age Location information age 18.4.14 O TLV 4 */ if (check_optional_ie(tvb, offset, BSSAP_LOC_INF_AGE)) offset = dissect_bssap_location_information_age(tvb, bssap_tree, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; /* Service area identification Service area identification 18.4.21b O TLV 9 */ if (check_optional_ie(tvb, offset, BSSAP_SERVICE_AREA_ID)) offset = dissect_bssap_service_area_id(tvb, bssap_tree, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data"); break; @@ -1974,7 +1974,7 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr if (check_ie(tvb, tree, &offset, BSSAP_IMSI)) offset = dissect_bssap_imsi(tvb, bssap_tree, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data"); break; @@ -1983,14 +1983,14 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr /* SGSN number SGSN number 18.4.22 C TLV 5-11 */ if (check_optional_ie(tvb, offset, BSSAP_SGSN_NUMBER)) { offset = dissect_bssap_sgsn_number(tvb, bssap_tree, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data"); }else{ /* VLR number VLR number 18.4.26 C TLV 5-11 */ if (check_optional_ie(tvb, offset, BSSAP_VLR_NUMBER)) { offset = dissect_bssap_vlr_number(tvb, bssap_tree, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data"); } @@ -2002,14 +2002,14 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr /* SGSN number SGSN number 18.4.22 C TLV 5-11 */ if (check_optional_ie(tvb, offset, BSSAP_SGSN_NUMBER)) { offset = dissect_bssap_sgsn_number(tvb, bssap_tree, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data"); }else{ /* VLR number VLR number 18.4.26 C TLV 5-11 */ if (check_optional_ie(tvb, offset, BSSAP_VLR_NUMBER)) { offset = dissect_bssap_vlr_number(tvb, bssap_tree, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data"); } @@ -2025,7 +2025,7 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr if (check_ie(tvb, tree, &offset, BSSAP_INFO_REQ)) offset = dissect_bssap_info_req(tvb, bssap_tree, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data"); @@ -2034,56 +2034,56 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr /* IMSI IMSI 18.4.10 M TLV 6-10 */ if (check_ie(tvb, tree, &offset, BSSAP_IMSI)) offset = dissect_bssap_imsi(tvb, bssap_tree, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; /* TMSI TMSI 18.4.23 O TLV 6 */ if (check_optional_ie(tvb, offset, BSSAP_TMSI)) offset = dissect_bssap_tmsi(tvb, bssap_tree, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; /* PTMSI PTMSI 18.4.20 O TLV 6 BSSAP_PTMSI*/ if (check_optional_ie(tvb, offset, BSSAP_PTMSI)) offset = dissect_bssap_ptmsi(tvb, bssap_tree, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; /* IMEI IMEI 18.4.8 O TLV 10 */ if (check_optional_ie(tvb, offset, BSSAP_IMEI)) offset = dissect_bssap_imei(tvb, bssap_tree, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; /* IMEISV IMEISV 18.4.9 O TLV 10 BSSAP_IMEISV*/ if (check_optional_ie(tvb, offset, BSSAP_IMEISV)) offset = dissect_bssap_imesiv(tvb, bssap_tree, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; /* Cell global identity Cell global identity 18.4.1 O TLV 10 */ if (check_optional_ie(tvb, offset, BSSAP_CELL_GBL_ID)) offset = dissect_bssap_cell_global_id(tvb, bssap_tree, pinfo, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; /* Location information age Location information age 18.4.15 O TLV 4 */ if (check_optional_ie(tvb, offset, BSSAP_LOC_INF_AGE)) offset = dissect_bssap_location_information_age(tvb, bssap_tree, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; /* Mobile station state Mobile station state 18.4.19 O TLV 3 */ if (check_optional_ie(tvb, offset, BSSAP_MOBILE_STN_STATE)) offset = dissect_bssap_mobile_station_state(tvb, bssap_tree, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; /* Service area identification Service area identification 18.4.21b O TLV 9 */ if (check_optional_ie(tvb, offset, BSSAP_SERVICE_AREA_ID)) offset = dissect_bssap_service_area_id(tvb, bssap_tree, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data"); break; @@ -2092,12 +2092,12 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr if (check_ie(tvb, tree, &offset, BSSAP_IMSI)) offset = dissect_bssap_imsi(tvb, bssap_tree, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; /* MM information MM information 18.4.16 O TLV 3-n */ if (check_optional_ie(tvb, offset, BSSAP_MM_INFORMATION)) offset = dissect_bssap_MM_information(tvb, bssap_tree, pinfo, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data"); break; @@ -2113,7 +2113,7 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr if (check_ie(tvb, tree, &offset, BSSAP_ERRONEOUS_MSG)) offset = dissect_bssap_gprs_erroneous_msg(tvb, bssap_tree, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data"); break; @@ -2126,7 +2126,7 @@ static void dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr if (check_ie(tvb, tree, &offset, BSSAP_GS_CAUSE)) offset = dissect_bssap_Gs_cause(tvb, bssap_tree, offset); - if (tvb_captured_length_remaining(tvb, offset) <= 0) + if (tvb_length_remaining(tvb, offset) <= 0) return; proto_tree_add_text(tree, tvb, offset, -1, "Extraneous data"); break; @@ -2149,7 +2149,7 @@ dissect_bssap_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da switch (tvb_get_guint8(tvb, 0)) { case 0x00: - if (tvb_get_guint8(tvb, 1) != (tvb_captured_length(tvb) - 2)) { + if (tvb_get_guint8(tvb, 1) != (tvb_length(tvb) - 2)) { return(FALSE); } if (tvb_get_guint8(tvb, 2) == 0x40 && tvb_get_guint8(tvb, 3) != 0x01) { @@ -2158,7 +2158,7 @@ dissect_bssap_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da break; case 0x01: - if (tvb_get_guint8(tvb, 2) != (tvb_captured_length(tvb) - 3)) { + if (tvb_get_guint8(tvb, 2) != (tvb_length(tvb) - 3)) { return(FALSE); } break; -- cgit v1.2.1