diff options
author | Dario Lombardo <lomato@gmail.com> | 2014-06-17 17:45:00 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2014-06-18 14:14:58 +0000 |
commit | 246fe2ca4c67d8c98caa84e2f57694f6322e2f96 (patch) | |
tree | 5f8651517a3423cce11c50e18371d8a73c3c7665 /epan/dissectors/packet-ndmp.c | |
parent | 971ffd683ea23362bd8009567ff7860371e6e2cc (diff) |
Fixup: tvb_* -> tvb_captured
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f
Reviewed-on: https://code.wireshark.org/review/2377
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-ndmp.c')
-rw-r--r-- | epan/dissectors/packet-ndmp.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/epan/dissectors/packet-ndmp.c b/epan/dissectors/packet-ndmp.c index dd20555d79..08b40c9883 100644 --- a/epan/dissectors/packet-ndmp.c +++ b/epan/dissectors/packet-ndmp.c @@ -572,7 +572,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 */ @@ -592,7 +592,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 */ @@ -1395,7 +1395,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); @@ -1453,7 +1453,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); @@ -3051,7 +3051,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 */ proto_tree_add_text(tree, tvb, offset, -1, "Unknown type of NDMP message: 0x%02x", nh->msg); - offset+=tvb_length_remaining(tvb, offset); + offset+=tvb_captured_length_remaining(tvb, offset); return offset; } @@ -3243,7 +3243,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); @@ -3282,7 +3282,7 @@ dissect_ndmp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* proto_tree_add_text(ndmp_tree, tvb, 4, nbytes, "NDMP fragment data (%u byte%s)", nbytes, plurality(nbytes, "", "s")); pinfo->fragmented = save_fragmented; - return tvb_length(tvb); + return tvb_captured_length(tvb); } } else @@ -3292,11 +3292,11 @@ 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; - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* @@ -3306,7 +3306,7 @@ dissect_ndmp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* if (!check_ndmp_hdr(new_tvb)) { pinfo->fragmented = save_fragmented; - return tvb_length(tvb); + return tvb_captured_length(tvb); } nh.seq = tvb_get_ntohl(new_tvb, offset); @@ -3403,7 +3403,7 @@ dissect_ndmp_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* pinfo->fragmented = save_fragmented; col_set_writable(pinfo->cinfo, save_writable); - return tvb_length(tvb); + return tvb_captured_length(tvb); } static guint @@ -3430,7 +3430,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 */ @@ -3500,7 +3500,7 @@ dissect_ndmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data) tcp_dissect_pdus(tvb, pinfo, tree, ndmp_desegment, 4, get_ndmp_pdu_len, dissect_ndmp_message, data); - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* Called when doing a heuristic check; @@ -3512,14 +3512,14 @@ 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; tcp_dissect_pdus(tvb, pinfo, tree, ndmp_desegment, 28, get_ndmp_pdu_len, dissect_ndmp_message, data); - return tvb_length(tvb); + return tvb_captured_length(tvb); } static void |