aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-ndps.c
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-ndps.c')
-rw-r--r--epan/dissectors/packet-ndps.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/epan/dissectors/packet-ndps.c b/epan/dissectors/packet-ndps.c
index 6d26881607..9485b04237 100644
--- a/epan/dissectors/packet-ndps.c
+++ b/epan/dissectors/packet-ndps.c
@@ -2028,7 +2028,7 @@ static const value_string ndps_get_resman_session_type_enum[] = {
static int
align_4(tvbuff_t *tvb, int aoffset)
{
- if(tvb_length_remaining(tvb, aoffset) > 4 )
+ if(tvb_captured_length_remaining(tvb, aoffset) > 4 )
{
return (aoffset%4);
}
@@ -2331,7 +2331,7 @@ objectidentification(tvbuff_t* tvb, proto_tree *ndps_tree, int foffset)
break;
case 3: /* Object Name */
foffset = ndps_string(tvb, hf_object_name, atree, foffset, NULL);
- if (foffset > tvb_length_remaining(tvb, foffset)) {
+ if (foffset > tvb_captured_length_remaining(tvb, foffset)) {
return foffset;
}
foffset = name_or_id(tvb, atree, foffset);
@@ -4223,7 +4223,7 @@ dissect_ndps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree)
ndps_packet_type = tvb_get_ntohl(tvb, 8);
if (ndps_packet_type != 0 && ndps_packet_type != 1) { /* Packet Type */
col_set_str(pinfo->cinfo, COL_INFO, "(Continuation Data)");
- proto_tree_add_text(ndps_tree, tvb, 0, tvb_length(tvb), "Data - (%d Bytes)", tvb_length(tvb));
+ proto_tree_add_text(ndps_tree, tvb, 0, tvb_captured_length(tvb), "Data - (%d Bytes)", tvb_captured_length(tvb));
return;
}
foffset = 0;
@@ -4342,7 +4342,7 @@ dissect_ndps_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
ndps_tree = proto_item_add_subtree(ti, ett_ndps);
dissect_ndps(tvb, pinfo, ndps_tree);
- return tvb_length(tvb);
+ return tvb_captured_length(tvb);
}
/*
@@ -4425,7 +4425,7 @@ ndps_defrag(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, spx_info *spx_i
*/
tid = (pinfo->srcport+pinfo->destport);
len = tvb_reported_length(tvb);
- if (tvb_length(tvb) >= len)
+ if (tvb_captured_length(tvb) >= len)
{
fd_head = fragment_add_seq_next(&ndps_reassembly_table, tvb, 0, pinfo, tid, NULL, len, !spx_info_p->eom);
if (fd_head != NULL)
@@ -4507,7 +4507,7 @@ static int
dissect_ndps_tcp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
{
tcp_dissect_pdus(tvb, pinfo, tree, ndps_desegment, 4, get_ndps_pdu_len, dissect_ndps_pdu, data);
- return tvb_length(tvb);
+ return tvb_captured_length(tvb);
}
@@ -4529,7 +4529,7 @@ dissect_ndps_ipx(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data
ndps_tree = proto_item_add_subtree(ti, ett_ndps);
ndps_defrag(tvb, pinfo, ndps_tree, (spx_info*)data);
- return tvb_length(tvb);
+ return tvb_captured_length(tvb);
}
static int
@@ -4713,7 +4713,7 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
length = tvb_get_ntohl(tvb, foffset);
proto_tree_add_uint(btree, hf_ndps_included_doc_len, tvb, foffset, 4, length);
foffset += 4;
- length_remaining = tvb_length_remaining(tvb, foffset);
+ length_remaining = tvb_captured_length_remaining(tvb, foffset);
if (length_remaining == -1 || length > (guint32) length_remaining) /* Segmented Data */
{
proto_tree_add_item(btree, hf_ndps_data, tvb, foffset, -1, ENC_NA);
@@ -6457,7 +6457,7 @@ dissect_ndps_request(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, g
aitem = proto_tree_add_text(ndps_tree, tvb, foffset, -1, "Item %d", ii+1);
atree = proto_item_add_subtree(aitem, ett_ndps);
length=tvb_get_ntohl(tvb, foffset);
- length_remaining = tvb_length_remaining(tvb, foffset);
+ length_remaining = tvb_captured_length_remaining(tvb, foffset);
if(length_remaining == -1 || (guint32) length_remaining < length)
{
return foffset;
@@ -6820,7 +6820,7 @@ ndps_error(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int foffset
foffset += 4;
proto_tree_add_item(ndps_tree, hf_ndps_other_error_2, tvb, foffset, 4, ENC_BIG_ENDIAN);
foffset += 4;
- if (tvb_length_remaining(tvb, foffset) >= 4) {
+ if (tvb_captured_length_remaining(tvb, foffset) >= 4) {
foffset = ndps_string(tvb, hf_ndps_other_error_string, ndps_tree, foffset, NULL);
}
break;
@@ -7034,7 +7034,7 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int
request_value->ndps_frame_num);
}
- if (tvb_length_remaining(tvb, foffset) < 12 && tvb_get_ntohl(tvb, foffset) == 0) /* No error and no return data */
+ if (tvb_captured_length_remaining(tvb, foffset) < 12 && tvb_get_ntohl(tvb, foffset) == 0) /* No error and no return data */
{
proto_tree_add_uint(ndps_tree, hf_ndps_error_val, tvb, foffset, 4, error_val);
col_append_str(pinfo->cinfo, COL_INFO, "- Ok");
@@ -7048,13 +7048,13 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int
expert_add_info_format(pinfo, expert_item, &ei_ndps_rpc_acc_stat, "Fault: %s", val_to_str(expert_status, accept_stat, "Unknown NDPS Error (0x%08x)"));
}
foffset += 4;
- if (tvb_length_remaining(tvb,foffset) < 4 ) {
+ if (tvb_captured_length_remaining(tvb,foffset) < 4 ) {
col_append_str(pinfo->cinfo, COL_INFO, "- Error");
return foffset;
}
proto_tree_add_item(ndps_tree, hf_ndps_rpc_acc_results, tvb, foffset, 4, ENC_BIG_ENDIAN);
foffset += 4;
- if (tvb_length_remaining(tvb,foffset) < 4) {
+ if (tvb_captured_length_remaining(tvb,foffset) < 4) {
col_append_str(pinfo->cinfo, COL_INFO, "- Error");
return foffset;
}
@@ -7063,7 +7063,7 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int
proto_tree_add_uint(ndps_tree, hf_ndps_error_val, tvb, foffset, 4, error_val);
foffset += 4;
/* Some functions return an error with no data, 0 is ok */
- if (try_val_to_str_ext(tvb_get_ntohl(tvb, foffset), &ndps_error_types_ext) && tvb_length_remaining(tvb,foffset) < 8 && (tvb_get_ntohl(tvb, foffset)!=0))
+ if (try_val_to_str_ext(tvb_get_ntohl(tvb, foffset), &ndps_error_types_ext) && tvb_captured_length_remaining(tvb,foffset) < 8 && (tvb_get_ntohl(tvb, foffset)!=0))
{
expert_status = tvb_get_ntohl(tvb, foffset);
expert_item = proto_tree_add_item(ndps_tree, hf_ndps_return_code, tvb, foffset, 4, ENC_BIG_ENDIAN);
@@ -7083,7 +7083,7 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int
if(error_val != 0)
{
foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
- if(tvb_length_remaining(tvb, foffset) < 4)
+ if(tvb_captured_length_remaining(tvb, foffset) < 4)
{
break;
}
@@ -7101,7 +7101,7 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int
if(error_val != 0)
{
foffset = ndps_error(tvb, pinfo, ndps_tree, foffset);
- if(tvb_length_remaining(tvb, foffset) < 4)
+ if(tvb_captured_length_remaining(tvb, foffset) < 4)
{
break;
}
@@ -7168,7 +7168,7 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int
bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Option %d", ii+1);
btree = proto_item_add_subtree(bitem, ett_ndps);
length=tvb_get_ntohl(tvb, foffset);
- length_remaining = tvb_length_remaining(tvb, foffset);
+ length_remaining = tvb_captured_length_remaining(tvb, foffset);
if(length_remaining == -1 || (guint32) length_remaining < length)
{
return foffset;
@@ -8328,7 +8328,7 @@ dissect_ndps_reply(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ndps_tree, int
bitem = proto_tree_add_text(atree, tvb, foffset, -1, "Item %d", ii+1);
btree = proto_item_add_subtree(bitem, ett_ndps);
length=tvb_get_ntohl(tvb, foffset);
- length_remaining = tvb_length_remaining(tvb, foffset);
+ length_remaining = tvb_captured_length_remaining(tvb, foffset);
if(length_remaining == -1 || (guint32) length_remaining < length)
{
return foffset;