diff options
Diffstat (limited to 'epan/dissectors/packet-zbee-nwk.c')
-rw-r--r-- | epan/dissectors/packet-zbee-nwk.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/epan/dissectors/packet-zbee-nwk.c b/epan/dissectors/packet-zbee-nwk.c index 9527a6260f..1000a55ee4 100644 --- a/epan/dissectors/packet-zbee-nwk.c +++ b/epan/dissectors/packet-zbee-nwk.c @@ -395,7 +395,7 @@ dissect_zbee_nwk_full(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void col_clear(pinfo->cinfo, COL_INFO); if (tree) { proto_root = proto_tree_add_protocol_format(tree, proto_zbee_nwk, tvb, offset, - tvb_length(tvb), "ZigBee Network Layer"); + tvb_captured_length(tvb), "ZigBee Network Layer"); nwk_tree = proto_item_add_subtree(proto_root, ett_zbee_nwk); } @@ -652,7 +652,7 @@ dissect_zbee_nwk_full(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void * Ensure that the payload exists. There are no valid ZigBee network * packets that have no payload. */ - if (offset >= tvb_length(tvb)) { + if (offset >= tvb_captured_length(tvb)) { /* Non-existent or truncated payload. */ expert_add_info(pinfo, proto_root, &ei_zbee_nwk_missing_payload); THROW(BoundsError); @@ -662,7 +662,7 @@ dissect_zbee_nwk_full(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void payload_tvb = dissect_zbee_secure(tvb, pinfo, nwk_tree, offset); if (payload_tvb == NULL) { /* If Payload_tvb is NULL, then the security dissector cleaned up. */ - return tvb_length(tvb); + return tvb_captured_length(tvb); } } /* Plaintext payload. */ @@ -683,7 +683,7 @@ dissect_zbee_nwk_full(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void call_dissector(data_handle, payload_tvb, pinfo, tree); } - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* dissect_zbee_nwk */ /*FUNCTION:------------------------------------------------------ @@ -742,7 +742,7 @@ static void dissect_zbee_nwk_cmd(tvbuff_t *tvb, packet_info *pinfo, proto_tree * /* Create a subtree for this command. */ if (tree) { - cmd_root = proto_tree_add_text(tree, tvb, offset, tvb_length(tvb), "Command Frame: %s", + cmd_root = proto_tree_add_text(tree, tvb, offset, tvb_captured_length(tvb), "Command Frame: %s", val_to_str_const(cmd_id, zbee_nwk_cmd_names, "Unknown")); cmd_tree = proto_item_add_subtree(cmd_root, ett_zbee_nwk_cmd); @@ -813,7 +813,7 @@ static void dissect_zbee_nwk_cmd(tvbuff_t *tvb, packet_info *pinfo, proto_tree * } /* switch */ /* There is excess data in the packet. */ - if (offset < tvb_length(tvb)) { + if (offset < tvb_captured_length(tvb)) { /* There are leftover bytes! */ tvbuff_t *leftover_tvb = tvb_new_subset_remaining(tvb, offset); proto_tree *root = NULL; @@ -1464,7 +1464,7 @@ static int dissect_zbee_beacon(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr col_set_str(pinfo->cinfo, COL_PROTOCOL, "ZigBee"); /* Create the tree for this beacon. */ if (tree) { - beacon_root = proto_tree_add_protocol_format(tree, proto_zbee_nwk, tvb, 0, tvb_length(tvb), "ZigBee Beacon"); + beacon_root = proto_tree_add_protocol_format(tree, proto_zbee_nwk, tvb, 0, tvb_captured_length(tvb), "ZigBee Beacon"); beacon_tree = proto_item_add_subtree(beacon_root, ett_zbee_beacon); } @@ -1511,7 +1511,7 @@ static int dissect_zbee_beacon(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr offset += 3; /* Get and display the update ID. */ - if(tvb_length_remaining(tvb, offset)) { + if(tvb_captured_length_remaining(tvb, offset)) { proto_tree_add_item(beacon_tree, hf_zbee_beacon_update_id, tvb, offset, 1, ENC_NA); offset += 1; } @@ -1527,7 +1527,7 @@ static int dissect_zbee_beacon(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr } /* Check for leftover bytes. */ - if (offset < tvb_length(tvb)) { + if (offset < tvb_captured_length(tvb)) { /* Bytes leftover! */ tvbuff_t *leftover_tvb = tvb_new_subset_remaining(tvb, offset); proto_tree *root = NULL; @@ -1542,7 +1542,7 @@ static int dissect_zbee_beacon(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr call_dissector(data_handle, leftover_tvb, pinfo, root); } - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* dissect_zbee_beacon */ /*FUNCTION:------------------------------------------------------ @@ -1603,7 +1603,7 @@ static int dissect_zbip_beacon(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr col_set_str(pinfo->cinfo, COL_PROTOCOL, "ZigBee IP"); /* Create the tree for this beacon. */ if (tree) { - beacon_root = proto_tree_add_protocol_format(tree, proto_zbee_nwk, tvb, 0, tvb_length(tvb), "ZigBee IP Beacon"); + beacon_root = proto_tree_add_protocol_format(tree, proto_zbee_nwk, tvb, 0, tvb_captured_length(tvb), "ZigBee IP Beacon"); beacon_tree = proto_item_add_subtree(beacon_root, ett_zbee_beacon); } @@ -1637,7 +1637,7 @@ static int dissect_zbip_beacon(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr offset += 16; /* Check for leftover bytes. */ - if (offset < tvb_length(tvb)) { + if (offset < tvb_captured_length(tvb)) { /* TODO: There are TLV's to parse. */ /* Bytes leftover! */ tvbuff_t *leftover_tvb = tvb_new_subset_remaining(tvb, offset); @@ -1652,7 +1652,7 @@ static int dissect_zbip_beacon(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tr /* Dump the leftover to the data dissector. */ call_dissector(data_handle, leftover_tvb, pinfo, root); } - return tvb_length(tvb); + return tvb_captured_length(tvb); } /* dissect_zbip_beacon */ /*FUNCTION:------------------------------------------------------ |