diff options
author | Evan Huus <eapache@gmail.com> | 2015-06-23 15:17:27 -0700 |
---|---|---|
committer | Evan Huus <eapache@gmail.com> | 2015-06-23 22:17:56 +0000 |
commit | 0a9a2554a46ce4e040dba669a3ed22f0e9ab709e (patch) | |
tree | 931067907b96dc2f2ad7bf815f28aad90f6a0f6b /epan/dissectors/packet-ndmp.c | |
parent | d4f6480253cf303f70c3d831098adf7582403b8f (diff) |
Remove more deprecated tvb_length calls
Change-Id: Ie137e6f4e20fe26b1a4d9510e267896219c1c631
Reviewed-on: https://code.wireshark.org/review/9075
Reviewed-by: Evan Huus <eapache@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-ndmp.c')
-rw-r--r-- | epan/dissectors/packet-ndmp.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/epan/dissectors/packet-ndmp.c b/epan/dissectors/packet-ndmp.c index 3b97ae6612..612ca9a707 100644 --- a/epan/dissectors/packet-ndmp.c +++ b/epan/dissectors/packet-ndmp.c @@ -579,7 +579,7 @@ check_ndmp_rm(tvbuff_t *tvb, packet_info *pinfo) } /* check that the header looks sane */ - len=tvb_length(tvb); + len=tvb_captured_length(tvb); /* check the record marker that it looks sane. * It has to be >=0 bytes or (arbitrary limit) <1Mbyte */ @@ -599,7 +599,7 @@ check_ndmp_hdr(tvbuff_t *tvb ) guint len; guint32 tmp; - len=tvb_length(tvb); + len=tvb_captured_length(tvb); /* If the length is less than 24, it isn't a valid header */ @@ -1357,7 +1357,7 @@ dissect_execute_cdb_cdb(tvbuff_t *tvb, int offset, packet_info *pinfo, tvbuff_t *cdb_tvb; int tvb_len, tvb_rlen; - tvb_len=tvb_length_remaining(tvb, offset); + tvb_len=tvb_captured_length_remaining(tvb, offset); if(tvb_len>16) tvb_len=16; tvb_rlen=tvb_reported_length_remaining(tvb, offset); @@ -1410,7 +1410,7 @@ dissect_execute_cdb_payload(tvbuff_t *tvb, int offset, packet_info *pinfo, proto tvbuff_t *data_tvb; int tvb_len, tvb_rlen; - tvb_len=tvb_length_remaining(tvb, offset); + tvb_len=tvb_captured_length_remaining(tvb, offset); if(tvb_len>(int)payload_len) tvb_len=payload_len; tvb_rlen=tvb_reported_length_remaining(tvb, offset); @@ -2948,7 +2948,7 @@ dissect_ndmp_cmd(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree if(ndmp_commands[i].cmd==0){ /* we do not know this message */ expert_add_info(pinfo, msg_item, &ei_ndmp_msg); - offset+=tvb_length_remaining(tvb, offset); + offset+=tvb_captured_length_remaining(tvb, offset); return offset; } @@ -3136,7 +3136,7 @@ dissect_ndmp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* frag_msg = fragment_add_seq_check(&ndmp_reassembly_table, tvb, 4, pinfo, seq, NULL, frag_num, - tvb_length_remaining(tvb, offset)-4, + tvb_captured_length_remaining(tvb, offset)-4, !(ndmp_rm & RPC_RM_LASTFRAG)); new_tvb = process_reassembled_data(tvb, 4, pinfo, "Reassembled NDMP", frag_msg, &ndmp_frag_items, NULL, tree); @@ -3183,7 +3183,7 @@ dissect_ndmp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* /* size of this NDMP PDU */ - size = tvb_length_remaining(new_tvb, offset); + size = tvb_captured_length_remaining(new_tvb, offset); if (size < 24) { /* too short to be NDMP */ pinfo->fragmented = save_fragmented; @@ -3320,7 +3320,7 @@ check_if_ndmp(tvbuff_t *tvb, packet_info *pinfo) } /* check that the header looks sane */ - len=tvb_length(tvb); + len=tvb_captured_length(tvb); /* check the record marker that it looks sane. * It has to be >=24 bytes or (arbitrary limit) <1Mbyte */ @@ -3402,7 +3402,7 @@ dissect_ndmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) static int dissect_ndmp_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) { - if (tvb_length(tvb) < 28) + if (tvb_captured_length(tvb) < 28) return 0; if (!check_if_ndmp(tvb, pinfo)) return 0; |