diff options
author | AndersBroman <a.broman@bredband.net> | 2015-04-13 12:13:05 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2015-04-13 10:17:47 +0000 |
commit | aaf347c029fd4c08881f79bb668f9f02530baf88 (patch) | |
tree | fd1a9a36ec58dcf6232964a8775f0b3feb0e65fe /epan | |
parent | 502eef945b47e55b998d915fe853f436cec68abe (diff) |
Remove deprecated API tvb_lengtRemove deprecated API tvb_length
Change-Id: Iea7dd7d13ce1a2ee375a2c4a75f897ba2c936921
Reviewed-on: https://code.wireshark.org/review/8048
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-tpncp.c | 8 | ||||
-rw-r--r-- | epan/dissectors/packet-tr.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-trill.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-tte-pcf.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-tte.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-turbocell.c | 6 |
6 files changed, 12 insertions, 12 deletions
diff --git a/epan/dissectors/packet-tpncp.c b/epan/dissectors/packet-tpncp.c index f36116d474..b4572dc9d0 100644 --- a/epan/dissectors/packet-tpncp.c +++ b/epan/dissectors/packet-tpncp.c @@ -148,7 +148,7 @@ static void dissect_tpncp_data(gint data_id, tvbuff_t *tvb, proto_tree *ltree, case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: if ((g_str_len = current_tpncp_data_field_info->tpncp_data_field_array_dim)) { /* add char array */ - g_str_len = MIN(g_str_len, tvb_length_remaining(tvb, *offset)); + g_str_len = MIN(g_str_len, tvb_reported_length_remaining(tvb, *offset)); proto_tree_add_item(ltree, current_tpncp_data_field_info->tpncp_data_field_descr, tvb, *offset, g_str_len, ENC_NA|ENC_ASCII); (*offset) += g_str_len; @@ -213,7 +213,7 @@ static void dissect_tpncp_data(gint data_id, tvbuff_t *tvb, proto_tree *ltree, break; } current_tpncp_data_field_info = current_tpncp_data_field_info->p_next; - if (tvb_length_remaining(tvb, *offset) <= 0) { + if (tvb_reported_length_remaining(tvb, *offset) <= 0) { break; } } @@ -309,7 +309,7 @@ static int dissect_tpncp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, vo } } - return tvb_length(tvb); + return tvb_reported_length(tvb); } /*-------------------------------------------------------------------------------------------------------------------------------------------*/ @@ -337,7 +337,7 @@ static int dissect_tpncp_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree /* Otherwise use the regular dissector (might not give correct dissection). */ dissect_tpncp(tvb, pinfo, tree, data); - return tvb_length(tvb); + return tvb_reported_length(tvb); } /*-------------------------------------------------------------------------------------------------------------------------------------------*/ diff --git a/epan/dissectors/packet-tr.c b/epan/dissectors/packet-tr.c index c4e2ddde01..857718ff8c 100644 --- a/epan/dissectors/packet-tr.c +++ b/epan/dissectors/packet-tr.c @@ -210,7 +210,7 @@ int check_for_old_linux_tvb(tvbuff_t *tvb) int x, bytes; /* Restrict our looping to the boundaries of the frame */ - bytes = tvb_length(tvb); + bytes = tvb_captured_length(tvb); if (bytes > 19) { bytes = 19; } diff --git a/epan/dissectors/packet-trill.c b/epan/dissectors/packet-trill.c index 4f1cb4683b..94f11e9107 100644 --- a/epan/dissectors/packet-trill.c +++ b/epan/dissectors/packet-trill.c @@ -144,7 +144,7 @@ dissect_trill( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _ next_tvb = tvb_new_subset_remaining( tvb, TRILL_MIN_FRAME_LENGTH + op_len ) ; call_dissector( eth_dissector, next_tvb, pinfo, tree ) ; - return tvb_length( tvb ) ; + return tvb_reported_length( tvb ) ; } /* Register the protocol with Wireshark */ diff --git a/epan/dissectors/packet-tte-pcf.c b/epan/dissectors/packet-tte-pcf.c index 20d98d81ee..407c6bd81c 100644 --- a/epan/dissectors/packet-tte-pcf.c +++ b/epan/dissectors/packet-tte-pcf.c @@ -73,7 +73,7 @@ dissect_tte_pcf(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) guint8 sync_domain = 0; /* Check that there's enough data */ - if (tvb_length(tvb) < TTE_PCF_LENGTH ) + if (tvb_reported_length(tvb) < TTE_PCF_LENGTH ) { return; } diff --git a/epan/dissectors/packet-tte.c b/epan/dissectors/packet-tte.c index 71a4b98772..f0c3e046df 100644 --- a/epan/dissectors/packet-tte.c +++ b/epan/dissectors/packet-tte.c @@ -70,7 +70,7 @@ dissect_tte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) proto_tree *tte_tree, *tte_macdest_tree; /* Check that there's enough data */ - if (tvb_length(tvb) < TTE_HEADER_LENGTH) + if (tvb_reported_length(tvb) < TTE_HEADER_LENGTH) return 0; /* check if data of pcf frame */ @@ -130,7 +130,7 @@ dissect_tte(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) ethertype_data.fcs_len = 0; call_dissector_with_data(ethertype_handle, tvb, pinfo, tree, ðertype_data); - return tvb_length(tvb); + return tvb_reported_length(tvb); } diff --git a/epan/dissectors/packet-turbocell.c b/epan/dissectors/packet-turbocell.c index ccc0a5faa1..d1fcfae920 100644 --- a/epan/dissectors/packet-turbocell.c +++ b/epan/dissectors/packet-turbocell.c @@ -166,7 +166,7 @@ static void dissect_turbocell(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre } - remaining_length=tvb_length_remaining(tvb, 0x14); + remaining_length=tvb_reported_length_remaining(tvb, 0x14); if (remaining_length > 6) { @@ -181,7 +181,7 @@ static void dissect_turbocell(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre str_name=tvb_get_stringz_enc(wmem_packet_scope(), tvb, 0x14, &str_len, ENC_ASCII); col_append_fstr(pinfo->cinfo, COL_INFO, ", Network=\"%s\"",format_text(str_name, str_len-1)); - while(tvb_get_guint8(tvb, 0x34 + 8*i)==0x00 && (tvb_length_remaining(tvb,0x34 + 8*i) > 6) && (i<32)) { + while(tvb_get_guint8(tvb, 0x34 + 8*i)==0x00 && (tvb_reported_length_remaining(tvb,0x34 + 8*i) > 6) && (i<32)) { proto_tree_add_item(network_tree, hf_turbocell_station[i], tvb, 0x34+8*i, 6, ENC_NA); i++; } @@ -209,7 +209,7 @@ static void dissect_turbocell(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre proto_tree_add_item(mpdu_tree, hf_turbocell_aggregate_len, next_tvb, 0x00, 2, ENC_BIG_ENDIAN); proto_tree_add_item(mpdu_tree, hf_turbocell_aggregate_unknown1, next_tvb, 0x02, 2, ENC_BIG_ENDIAN); - remaining_length=tvb_length_remaining(next_tvb, msdu_offset); + remaining_length=tvb_reported_length_remaining(next_tvb, msdu_offset); do { msdu_length = (tvb_get_letohs(next_tvb, msdu_offset) & 0x0FFF); |