diff options
-rw-r--r-- | packet-afs-macros.h | 5 | ||||
-rw-r--r-- | packet-h261.c | 4 | ||||
-rw-r--r-- | packet-iscsi.c | 268 | ||||
-rw-r--r-- | packet-ldp.c | 10 | ||||
-rw-r--r-- | packet-mpeg1.c | 4 | ||||
-rw-r--r-- | packet-mrdisc.c | 17 | ||||
-rw-r--r-- | packet-rtp.c | 4 | ||||
-rw-r--r-- | packet-sll.c | 6 | ||||
-rw-r--r-- | packet-x11.c | 6 |
9 files changed, 161 insertions, 163 deletions
diff --git a/packet-afs-macros.h b/packet-afs-macros.h index 846057eec1..71bacac162 100644 --- a/packet-afs-macros.h +++ b/packet-afs-macros.h @@ -8,7 +8,7 @@ * Portions based on information/specs retrieved from the OpenAFS sources at * www.openafs.org, Copyright IBM. * - * $Id: packet-afs-macros.h,v 1.10 2001/06/30 09:32:44 guy Exp $ + * $Id: packet-afs-macros.h,v 1.11 2001/07/16 05:16:57 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -418,8 +418,7 @@ /* Raw data */ #define OUT_BYTES(field, bytes) \ - proto_tree_add_bytes(tree,field, tvb,offset,bytes,\ - tvb_get_ptr(tvb,offset,bytes)); \ + proto_tree_add_item(tree, field, tvb, offset, bytes, FALSE);\ offset += bytes; /* Output a rx style string, up to a maximum length first diff --git a/packet-h261.c b/packet-h261.c index e96d354a6c..453159b341 100644 --- a/packet-h261.c +++ b/packet-h261.c @@ -2,7 +2,7 @@ * * Routines for ITU-T Recommendation H.261 dissection * - * $Id: packet-h261.c,v 1.8 2001/06/18 02:17:46 guy Exp $ + * $Id: packet-h261.c,v 1.9 2001/07/16 05:16:57 guy Exp $ * * Copyright 2000, Philips Electronics N.V. * Andreas Sikkema <andreas.sikkema@philips.com> @@ -117,7 +117,7 @@ dissect_h261( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree ) offset++; /* The rest of the packet is the H.261 stream */ - proto_tree_add_bytes( h261_tree, hf_h261_data, tvb, offset, tvb_length_remaining( tvb, offset ), tvb_get_ptr( tvb, offset, tvb_length_remaining( tvb, offset ) ) ); + proto_tree_add_item( h261_tree, hf_h261_data, tvb, offset, tvb_length_remaining( tvb, offset ), FALSE ); } } diff --git a/packet-iscsi.c b/packet-iscsi.c index 9a70b1b4df..7f369d27a3 100644 --- a/packet-iscsi.c +++ b/packet-iscsi.c @@ -5,7 +5,7 @@ * Conforms to the protocol described in: draft-ietf-ips-iscsi-06.txt * Optionally, supports the protocol described in: draft-ietf-ips-iscsi-03.txt * - * $Id: packet-iscsi.c,v 1.7 2001/06/28 08:05:26 guy Exp $ + * $Id: packet-iscsi.c,v 1.8 2001/07/16 05:16:57 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -758,15 +758,15 @@ dissect_iscsi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { else { proto_tree_add_uint(ti, hf_iscsi_DataSegmentLength, tvb, offset + 5, 3, data_segment_len); } - proto_tree_add_bytes(ti, hf_iscsi_LUN, tvb, offset + 8, 8, tvb_get_ptr(tvb, offset + 8, 8)); - proto_tree_add_uint(ti, hf_iscsi_InitiatorTaskTag, tvb, offset + 16, 4, tvb_get_ntohl(tvb, offset + 16)); - proto_tree_add_uint(ti, hf_iscsi_TargetTransferTag, tvb, offset + 20, 4, tvb_get_ntohl(tvb, offset + 20)); - proto_tree_add_uint(ti, hf_iscsi_CmdSN, tvb, offset + 24, 4, tvb_get_ntohl(tvb, offset + 24)); - proto_tree_add_uint(ti, hf_iscsi_ExpStatSN, tvb, offset + 28, 4, tvb_get_ntohl(tvb, offset + 28)); + proto_tree_add_item(ti, hf_iscsi_LUN, tvb, offset + 8, 8, FALSE); + proto_tree_add_item(ti, hf_iscsi_InitiatorTaskTag, tvb, offset + 16, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_TargetTransferTag, tvb, offset + 20, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_CmdSN, tvb, offset + 24, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_ExpStatSN, tvb, offset + 28, 4, FALSE); if(enable_03_mode) { - proto_tree_add_uint(ti, hf_iscsi_ExpDataSN, tvb, offset + 32, 4, tvb_get_ntohl(tvb, offset + 32)); + proto_tree_add_item(ti, hf_iscsi_ExpDataSN, tvb, offset + 32, 4, FALSE); } - proto_tree_add_uint(ti, hf_iscsi_BufferOffset, tvb, offset + 40, 4, tvb_get_ntohl(tvb, offset + 40)); + proto_tree_add_item(ti, hf_iscsi_BufferOffset, tvb, offset + 40, 4, FALSE); offset += 48 + handleHeaderDigest(ti, tvb, offset, 48); } else if((enable_03_mode && opcode == 0x80) || @@ -792,11 +792,11 @@ dissect_iscsi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { else { proto_tree_add_uint(ti, hf_iscsi_DataSegmentLength, tvb, offset + 5, 3, data_segment_len); } - proto_tree_add_uint(ti, hf_iscsi_InitiatorTaskTag, tvb, offset + 16, 4, tvb_get_ntohl(tvb, offset + 16)); - proto_tree_add_uint(ti, hf_iscsi_TargetTransferTag, tvb, offset + 20, 4, tvb_get_ntohl(tvb, offset + 20)); - proto_tree_add_uint(ti, hf_iscsi_StatSN, tvb, offset + 24, 4, tvb_get_ntohl(tvb, offset + 24)); - proto_tree_add_uint(ti, hf_iscsi_ExpCmdSN, tvb, offset + 28, 4, tvb_get_ntohl(tvb, offset + 28)); - proto_tree_add_uint(ti, hf_iscsi_MaxCmdSN, tvb, offset + 32, 4, tvb_get_ntohl(tvb, offset + 32)); + proto_tree_add_item(ti, hf_iscsi_InitiatorTaskTag, tvb, offset + 16, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_TargetTransferTag, tvb, offset + 20, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_StatSN, tvb, offset + 24, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_ExpCmdSN, tvb, offset + 28, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_MaxCmdSN, tvb, offset + 32, 4, FALSE); offset += 48 + handleHeaderDigest(ti, tvb, offset, 48); } else if((enable_03_mode && opcode == 0x01) || @@ -817,7 +817,7 @@ dissect_iscsi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { proto_tree_add_boolean(tt, hf_iscsi_SCSICommand_W, tvb, offset + 1, 1, b); proto_tree_add_uint(tt, hf_iscsi_SCSICommand_Attr, tvb, offset + 1, 1, b); } - proto_tree_add_uint(ti, hf_iscsi_SCSICommand_AddCDB, tvb, offset + 3, 1, tvb_get_guint8(tvb, offset + 3)); + proto_tree_add_item(ti, hf_iscsi_SCSICommand_AddCDB, tvb, offset + 3, 1, FALSE); proto_tree_add_uint(ti, hf_iscsi_Length03, tvb, offset + 4, 4, data_segment_len); } else { @@ -833,15 +833,15 @@ dissect_iscsi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { proto_tree_add_boolean(tt, hf_iscsi_SCSICommand_W, tvb, offset + 1, 1, b); proto_tree_add_uint(tt, hf_iscsi_SCSICommand_Attr, tvb, offset + 1, 1, b); } - proto_tree_add_uint(ti, hf_iscsi_SCSICommand_CRN, tvb, offset + 3, 1, tvb_get_guint8(tvb, offset + 3)); - proto_tree_add_uint(ti, hf_iscsi_TotalAHSLength, tvb, offset + 4, 1, tvb_get_guint8(tvb, offset + 4)); + proto_tree_add_item(ti, hf_iscsi_SCSICommand_CRN, tvb, offset + 3, 1, FALSE); + proto_tree_add_item(ti, hf_iscsi_TotalAHSLength, tvb, offset + 4, 1, FALSE); proto_tree_add_uint(ti, hf_iscsi_DataSegmentLength, tvb, offset + 5, 3, data_segment_len); } - proto_tree_add_bytes(ti, hf_iscsi_LUN, tvb, offset + 8, 8, tvb_get_ptr(tvb, offset + 8, 8)); - proto_tree_add_uint(ti, hf_iscsi_InitiatorTaskTag, tvb, offset + 16, 4, tvb_get_ntohl(tvb, offset + 16)); - proto_tree_add_uint(ti, hf_iscsi_ExpectedDataTransferLength, tvb, offset + 20, 4, tvb_get_ntohl(tvb, offset + 20)); - proto_tree_add_uint(ti, hf_iscsi_CmdSN, tvb, offset + 24, 4, tvb_get_ntohl(tvb, offset + 24)); - proto_tree_add_uint(ti, hf_iscsi_ExpStatSN, tvb, offset + 28, 4, tvb_get_ntohl(tvb, offset + 28)); + proto_tree_add_item(ti, hf_iscsi_LUN, tvb, offset + 8, 8, FALSE); + proto_tree_add_item(ti, hf_iscsi_InitiatorTaskTag, tvb, offset + 16, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_ExpectedDataTransferLength, tvb, offset + 20, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_CmdSN, tvb, offset + 24, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_ExpStatSN, tvb, offset + 28, 4, FALSE); { /* dissect a little of the CDB for the most common * commands */ @@ -872,7 +872,7 @@ dissect_iscsi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { tf = proto_tree_add_uint(ti, hf_iscsi_SCSICommand_CDB0, tvb, cdb_offset, cdb_len, cdb0); { proto_tree *tt = proto_item_add_subtree(tf, ett_iscsi_CDB); - proto_tree_add_bytes(tt, hf_iscsi_SCSICommand_CDB, tvb, cdb_offset, cdb_len, tvb_get_ptr(tvb, cdb_offset, cdb_len)); + proto_tree_add_item(tt, hf_iscsi_SCSICommand_CDB, tvb, cdb_offset, cdb_len, FALSE); } offset = cdb_offset + cdb_len + handleHeaderDigest(ti, tvb, offset, cdb_offset + cdb_len); } @@ -909,26 +909,26 @@ dissect_iscsi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { proto_tree_add_boolean(tt, hf_iscsi_SCSIResponse_U, tvb, offset + 1, 1, b); proto_tree_add_boolean(tt, hf_iscsi_SCSIResponse_S, tvb, offset + 1, 1, b); if(b & 0x01) - proto_tree_add_uint(ti, hf_iscsi_StatusResponse_is_status, tvb, offset + 3, 1, tvb_get_guint8(tvb, offset + 3)); + proto_tree_add_item(ti, hf_iscsi_StatusResponse_is_status, tvb, offset + 3, 1, FALSE); else - proto_tree_add_uint(ti, hf_iscsi_StatusResponse_is_response, tvb, offset + 3, 1, tvb_get_guint8(tvb, offset + 3)); + proto_tree_add_item(ti, hf_iscsi_StatusResponse_is_response, tvb, offset + 3, 1, FALSE); } proto_tree_add_uint(ti, hf_iscsi_DataSegmentLength, tvb, offset + 5, 3, data_segment_len); } - proto_tree_add_uint(ti, hf_iscsi_InitiatorTaskTag, tvb, offset + 16, 4, tvb_get_ntohl(tvb, offset + 16)); - proto_tree_add_uint(ti, hf_iscsi_SCSIResponse_BasicResidualCount, tvb, offset + 20, 4, tvb_get_ntohl(tvb, offset + 20)); - proto_tree_add_uint(ti, hf_iscsi_StatSN, tvb, offset + 24, 4, tvb_get_ntohl(tvb, offset + 24)); - proto_tree_add_uint(ti, hf_iscsi_ExpCmdSN, tvb, offset + 28, 4, tvb_get_ntohl(tvb, offset + 28)); - proto_tree_add_uint(ti, hf_iscsi_MaxCmdSN, tvb, offset + 32, 4, tvb_get_ntohl(tvb, offset + 32)); + proto_tree_add_item(ti, hf_iscsi_InitiatorTaskTag, tvb, offset + 16, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_SCSIResponse_BasicResidualCount, tvb, offset + 20, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_StatSN, tvb, offset + 24, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_ExpCmdSN, tvb, offset + 28, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_MaxCmdSN, tvb, offset + 32, 4, FALSE); if(enable_03_mode) { - proto_tree_add_uint(ti, hf_iscsi_CommandStatus03, tvb, offset + 36, 1, tvb_get_guint8(tvb, offset + 36)); - proto_tree_add_uint(ti, hf_iscsi_SCSIResponse_SenseLength, tvb, offset + 40, 2, tvb_get_ntohs(tvb, offset + 40)); + proto_tree_add_item(ti, hf_iscsi_CommandStatus03, tvb, offset + 36, 1, FALSE); + proto_tree_add_item(ti, hf_iscsi_SCSIResponse_SenseLength, tvb, offset + 40, 2, FALSE); } else { - proto_tree_add_uint(ti, hf_iscsi_ExpDataSN, tvb, offset + 36, 4, tvb_get_ntohl(tvb, offset + 36)); - proto_tree_add_uint(ti, hf_iscsi_R2TExpDataSN, tvb, offset + 40, 4, tvb_get_ntohl(tvb, offset + 40)); + proto_tree_add_item(ti, hf_iscsi_ExpDataSN, tvb, offset + 36, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_R2TExpDataSN, tvb, offset + 40, 4, FALSE); } - proto_tree_add_uint(ti, hf_iscsi_SCSIResponse_BidiReadResidualCount, tvb, offset + 44, 4, tvb_get_ntohl(tvb, offset + 44)); + proto_tree_add_item(ti, hf_iscsi_SCSIResponse_BidiReadResidualCount, tvb, offset + 44, 4, FALSE); offset += 48 + handleHeaderDigest(ti, tvb, offset, 48); } else if((enable_03_mode && opcode == 0x02) || @@ -944,15 +944,15 @@ dissect_iscsi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { proto_tree_add_uint(ti, hf_iscsi_Opcode, tvb, offset + 0, 1, opcode); } - proto_tree_add_uint(ti, hf_iscsi_SCSITask_Function, tvb, offset + 1, 1, tvb_get_guint8(tvb, offset + 1)); + proto_tree_add_item(ti, hf_iscsi_SCSITask_Function, tvb, offset + 1, 1, FALSE); if(enable_03_mode) { proto_tree_add_uint(ti, hf_iscsi_Length03, tvb, offset + 4, 4, data_segment_len); } - proto_tree_add_bytes(ti, hf_iscsi_LUN, tvb, offset + 8, 8, tvb_get_ptr(tvb, offset + 8, 8)); - proto_tree_add_uint(ti, hf_iscsi_InitiatorTaskTag, tvb, offset + 16, 4, tvb_get_ntohl(tvb, offset + 16)); - proto_tree_add_uint(ti, hf_iscsi_SCSITask_ReferencedTaskTag, tvb, offset + 20, 4, tvb_get_ntohl(tvb, offset + 20)); - proto_tree_add_uint(ti, hf_iscsi_CmdSN, tvb, offset + 24, 4, tvb_get_ntohl(tvb, offset + 24)); - proto_tree_add_uint(ti, hf_iscsi_ExpStatSN, tvb, offset + 28, 4, tvb_get_ntohl(tvb, offset + 28)); + proto_tree_add_item(ti, hf_iscsi_LUN, tvb, offset + 8, 8, FALSE); + proto_tree_add_item(ti, hf_iscsi_InitiatorTaskTag, tvb, offset + 16, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_SCSITask_ReferencedTaskTag, tvb, offset + 20, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_CmdSN, tvb, offset + 24, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_ExpStatSN, tvb, offset + 28, 4, FALSE); offset += 48 + handleHeaderDigest(ti, tvb, offset, 48); } else if((enable_03_mode && opcode == 0x82) || @@ -967,13 +967,13 @@ dissect_iscsi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { proto_tree_add_uint(ti, hf_iscsi_Opcode, tvb, offset + 0, 1, opcode); } - proto_tree_add_bytes(ti, hf_iscsi_LUN, tvb, offset + 8, 8, tvb_get_ptr(tvb, offset + 8, 8)); - proto_tree_add_uint(ti, hf_iscsi_InitiatorTaskTag, tvb, offset + 16, 4, tvb_get_ntohl(tvb, offset + 16)); - proto_tree_add_uint(ti, hf_iscsi_SCSITask_ReferencedTaskTag, tvb, offset + 20, 4, tvb_get_ntohl(tvb, offset + 20)); - proto_tree_add_uint(ti, hf_iscsi_StatSN, tvb, offset + 24, 4, tvb_get_ntohl(tvb, offset + 24)); - proto_tree_add_uint(ti, hf_iscsi_ExpCmdSN, tvb, offset + 28, 4, tvb_get_ntohl(tvb, offset + 28)); - proto_tree_add_uint(ti, hf_iscsi_MaxCmdSN, tvb, offset + 32, 4, tvb_get_ntohl(tvb, offset + 32)); - proto_tree_add_uint(ti, hf_iscsi_SCSITask_Response, tvb, offset + 36, 1, tvb_get_guint8(tvb, offset + 36)); + proto_tree_add_item(ti, hf_iscsi_LUN, tvb, offset + 8, 8, FALSE); + proto_tree_add_item(ti, hf_iscsi_InitiatorTaskTag, tvb, offset + 16, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_SCSITask_ReferencedTaskTag, tvb, offset + 20, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_StatSN, tvb, offset + 24, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_ExpCmdSN, tvb, offset + 28, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_MaxCmdSN, tvb, offset + 32, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_SCSITask_Response, tvb, offset + 36, 1, FALSE); offset += 48 + handleHeaderDigest(ti, tvb, offset, 48); } else if((enable_03_mode && opcode == 0x03) || @@ -995,24 +995,24 @@ dissect_iscsi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { proto_tree_add_boolean(tt, hf_iscsi_Login_F, tvb, offset + 1, 1, b); } } - proto_tree_add_uint(ti, hf_iscsi_VersionMax, tvb, offset + 2, 1, tvb_get_guint8(tvb, offset + 2)); - proto_tree_add_uint(ti, hf_iscsi_VersionMin, tvb, offset + 3, 1, tvb_get_guint8(tvb, offset + 3)); + proto_tree_add_item(ti, hf_iscsi_VersionMax, tvb, offset + 2, 1, FALSE); + proto_tree_add_item(ti, hf_iscsi_VersionMin, tvb, offset + 3, 1, FALSE); if(enable_03_mode) { proto_tree_add_uint(ti, hf_iscsi_Length03, tvb, offset + 4, 4, data_segment_len); } else { proto_tree_add_uint(ti, hf_iscsi_DataSegmentLength, tvb, offset + 5, 3, data_segment_len); } - proto_tree_add_uint(ti, hf_iscsi_CID, tvb, offset + 8, 2, tvb_get_ntohs(tvb, offset + 8)); - proto_tree_add_uint(ti, hf_iscsi_ISID, tvb, offset + 12, 2, tvb_get_ntohs(tvb, offset + 12)); - proto_tree_add_uint(ti, hf_iscsi_TSID, tvb, offset + 14, 2, tvb_get_ntohs(tvb, offset + 14)); - proto_tree_add_uint(ti, hf_iscsi_InitiatorTaskTag, tvb, offset + 16, 4, tvb_get_ntohl(tvb, offset + 16)); + proto_tree_add_item(ti, hf_iscsi_CID, tvb, offset + 8, 2, FALSE); + proto_tree_add_item(ti, hf_iscsi_ISID, tvb, offset + 12, 2, FALSE); + proto_tree_add_item(ti, hf_iscsi_TSID, tvb, offset + 14, 2, FALSE); + proto_tree_add_item(ti, hf_iscsi_InitiatorTaskTag, tvb, offset + 16, 4, FALSE); if(enable_03_mode) { - proto_tree_add_uint(ti, hf_iscsi_InitCmdSN, tvb, offset + 24, 4, tvb_get_ntohl(tvb, offset + 24)); + proto_tree_add_item(ti, hf_iscsi_InitCmdSN, tvb, offset + 24, 4, FALSE); } else { - proto_tree_add_uint(ti, hf_iscsi_CmdSN, tvb, offset + 24, 4, tvb_get_ntohl(tvb, offset + 24)); - proto_tree_add_uint(ti, hf_iscsi_ExpStatSN, tvb, offset + 28, 4, tvb_get_ntohl(tvb, offset + 28)); + proto_tree_add_item(ti, hf_iscsi_CmdSN, tvb, offset + 24, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_ExpStatSN, tvb, offset + 28, 4, FALSE); } offset += 48 + handleHeaderDigest(ti, tvb, offset, 48); if(packet_len > offset) { @@ -1022,7 +1022,7 @@ dissect_iscsi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { offset = addTextKeys(tt, tvb, offset, text_len); if(offset < packet_len) { int padding = 4 - (offset & 3); - proto_tree_add_bytes(ti, hf_iscsi_Padding, tvb, offset, padding, tvb_get_ptr(tvb, offset, padding)); + proto_tree_add_item(ti, hf_iscsi_Padding, tvb, offset, padding, FALSE); offset += padding; } } @@ -1045,25 +1045,25 @@ dissect_iscsi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { proto_tree_add_boolean(tt, hf_iscsi_Login_F, tvb, offset + 1, 1, b); } - proto_tree_add_uint(ti, hf_iscsi_VersionMax, tvb, offset + 2, 1, tvb_get_guint8(tvb, offset + 2)); - proto_tree_add_uint(ti, hf_iscsi_VersionMin, tvb, offset + 3, 1, tvb_get_guint8(tvb, offset + 3)); + proto_tree_add_item(ti, hf_iscsi_VersionMax, tvb, offset + 2, 1, FALSE); + proto_tree_add_item(ti, hf_iscsi_VersionMin, tvb, offset + 3, 1, FALSE); if(enable_03_mode) { proto_tree_add_uint(ti, hf_iscsi_Length03, tvb, offset + 4, 4, data_segment_len); } else { proto_tree_add_uint(ti, hf_iscsi_DataSegmentLength, tvb, offset + 5, 3, data_segment_len); } - proto_tree_add_uint(ti, hf_iscsi_ISID, tvb, offset + 12, 2, tvb_get_ntohs(tvb, offset + 12)); - proto_tree_add_uint(ti, hf_iscsi_TSID, tvb, offset + 14, 2, tvb_get_ntohs(tvb, offset + 14)); - proto_tree_add_uint(ti, hf_iscsi_InitiatorTaskTag, tvb, offset + 16, 4, tvb_get_ntohl(tvb, offset + 16)); - proto_tree_add_uint(ti, hf_iscsi_InitStatSN, tvb, offset + 24, 4, tvb_get_ntohl(tvb, offset + 24)); - proto_tree_add_uint(ti, hf_iscsi_ExpCmdSN, tvb, offset + 28, 4, tvb_get_ntohl(tvb, offset + 28)); - proto_tree_add_uint(ti, hf_iscsi_MaxCmdSN, tvb, offset + 32, 4, tvb_get_ntohl(tvb, offset + 32)); + proto_tree_add_item(ti, hf_iscsi_ISID, tvb, offset + 12, 2, FALSE); + proto_tree_add_item(ti, hf_iscsi_TSID, tvb, offset + 14, 2, FALSE); + proto_tree_add_item(ti, hf_iscsi_InitiatorTaskTag, tvb, offset + 16, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_InitStatSN, tvb, offset + 24, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_ExpCmdSN, tvb, offset + 28, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_MaxCmdSN, tvb, offset + 32, 4, FALSE); if(enable_03_mode) { - proto_tree_add_uint(ti, hf_iscsi_Login_Status03, tvb, offset + 36, 1, tvb_get_guint8(tvb, offset + 36)); + proto_tree_add_item(ti, hf_iscsi_Login_Status03, tvb, offset + 36, 1, FALSE); } else { - proto_tree_add_uint(ti, hf_iscsi_Login_Status, tvb, offset + 36, 1, tvb_get_ntohs(tvb, offset + 36)); + proto_tree_add_item(ti, hf_iscsi_Login_Status, tvb, offset + 36, 1, FALSE); } offset += 48 + handleHeaderDigest(ti, tvb, offset, 48); if(packet_len > offset) { @@ -1073,7 +1073,7 @@ dissect_iscsi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { offset = addTextKeys(tt, tvb, offset, text_len); if(offset < packet_len) { int padding = 4 - (offset & 3); - proto_tree_add_bytes(ti, hf_iscsi_Padding, tvb, offset, padding, tvb_get_ptr(tvb, offset, padding)); + proto_tree_add_item(ti, hf_iscsi_Padding, tvb, offset, padding, FALSE); offset += padding; } } @@ -1100,9 +1100,9 @@ dissect_iscsi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { } proto_tree_add_uint(ti, hf_iscsi_DataSegmentLength, tvb, offset + 5, 3, data_segment_len); } - proto_tree_add_uint(ti, hf_iscsi_InitiatorTaskTag, tvb, offset + 16, 4, tvb_get_ntohl(tvb, offset + 16)); - proto_tree_add_uint(ti, hf_iscsi_CmdSN, tvb, offset + 24, 4, tvb_get_ntohl(tvb, offset + 24)); - proto_tree_add_uint(ti, hf_iscsi_ExpStatSN, tvb, offset + 28, 4, tvb_get_ntohl(tvb, offset + 28)); + proto_tree_add_item(ti, hf_iscsi_InitiatorTaskTag, tvb, offset + 16, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_CmdSN, tvb, offset + 24, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_ExpStatSN, tvb, offset + 28, 4, FALSE); offset += 48 + handleHeaderDigest(ti, tvb, offset, 48); if(packet_len > offset) { int text_len = iscsi_min(data_segment_len, packet_len - offset); @@ -1111,7 +1111,7 @@ dissect_iscsi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { offset = addTextKeys(tt, tvb, offset, text_len); if(offset < packet_len) { int padding = 4 - (offset & 3); - proto_tree_add_bytes(ti, hf_iscsi_Padding, tvb, offset, padding, tvb_get_ptr(tvb, offset, padding)); + proto_tree_add_item(ti, hf_iscsi_Padding, tvb, offset, padding, FALSE); offset += padding; } } @@ -1136,10 +1136,10 @@ dissect_iscsi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { } proto_tree_add_uint(ti, hf_iscsi_DataSegmentLength, tvb, offset + 5, 3, data_segment_len); } - proto_tree_add_uint(ti, hf_iscsi_InitiatorTaskTag, tvb, offset + 16, 4, tvb_get_ntohl(tvb, offset + 16)); - proto_tree_add_uint(ti, hf_iscsi_StatSN, tvb, offset + 24, 4, tvb_get_ntohl(tvb, offset + 24)); - proto_tree_add_uint(ti, hf_iscsi_ExpCmdSN, tvb, offset + 28, 4, tvb_get_ntohl(tvb, offset + 28)); - proto_tree_add_uint(ti, hf_iscsi_MaxCmdSN, tvb, offset + 32, 4, tvb_get_ntohl(tvb, offset + 32)); + proto_tree_add_item(ti, hf_iscsi_InitiatorTaskTag, tvb, offset + 16, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_StatSN, tvb, offset + 24, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_ExpCmdSN, tvb, offset + 28, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_MaxCmdSN, tvb, offset + 32, 4, FALSE); offset += 48 + handleHeaderDigest(ti, tvb, offset, 48); if(packet_len > offset) { int text_len = iscsi_min(data_segment_len, packet_len - offset); @@ -1148,7 +1148,7 @@ dissect_iscsi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { offset = addTextKeys(tt, tvb, offset, text_len); if(offset < packet_len) { int padding = 4 - (offset & 3); - proto_tree_add_bytes(ti, hf_iscsi_Padding, tvb, offset, padding, tvb_get_ptr(tvb, offset, padding)); + proto_tree_add_item(ti, hf_iscsi_Padding, tvb, offset, padding, FALSE); offset += padding; } } @@ -1176,13 +1176,13 @@ dissect_iscsi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { else { proto_tree_add_uint(ti, hf_iscsi_DataSegmentLength, tvb, offset + 5, 3, data_segment_len); } - proto_tree_add_bytes(ti, hf_iscsi_LUN, tvb, offset + 8, 8, tvb_get_ptr(tvb, offset + 8, 8)); - proto_tree_add_uint(ti, hf_iscsi_InitiatorTaskTag, tvb, offset + 16, 4, tvb_get_ntohl(tvb, offset + 16)); - proto_tree_add_uint(ti, hf_iscsi_TargetTransferTag, tvb, offset + 20, 4, tvb_get_ntohl(tvb, offset + 20)); - proto_tree_add_uint(ti, hf_iscsi_ExpStatSN, tvb, offset + 28, 4, tvb_get_ntohl(tvb, offset + 28)); + proto_tree_add_item(ti, hf_iscsi_LUN, tvb, offset + 8, 8, FALSE); + proto_tree_add_item(ti, hf_iscsi_InitiatorTaskTag, tvb, offset + 16, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_TargetTransferTag, tvb, offset + 20, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_ExpStatSN, tvb, offset + 28, 4, FALSE); if(!enable_03_mode) - proto_tree_add_uint(ti, hf_iscsi_DataSN, tvb, offset + 36, 4, tvb_get_ntohl(tvb, offset + 36)); - proto_tree_add_uint(ti, hf_iscsi_BufferOffset, tvb, offset + 40, 4, tvb_get_ntohl(tvb, offset + 40)); + proto_tree_add_item(ti, hf_iscsi_DataSN, tvb, offset + 36, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_BufferOffset, tvb, offset + 40, 4, FALSE); offset += 48 + handleHeaderDigest(ti, tvb, offset, 48); } else if((enable_03_mode && opcode == 0x85) || @@ -1216,24 +1216,24 @@ dissect_iscsi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { proto_tree_add_boolean(tt, hf_iscsi_SCSIData_U, tvb, offset + 1, 1, b); proto_tree_add_boolean(tt, hf_iscsi_SCSIData_S, tvb, offset + 1, 1, b); } - proto_tree_add_uint(ti, hf_iscsi_StatusResponse_is_status, tvb, offset + 3, 1, tvb_get_guint8(tvb, offset + 3)); + proto_tree_add_item(ti, hf_iscsi_StatusResponse_is_status, tvb, offset + 3, 1, FALSE); proto_tree_add_uint(ti, hf_iscsi_DataSegmentLength, tvb, offset + 5, 3, data_segment_len); } - proto_tree_add_uint(ti, hf_iscsi_InitiatorTaskTag, tvb, offset + 16, 4, tvb_get_ntohl(tvb, offset + 16)); + proto_tree_add_item(ti, hf_iscsi_InitiatorTaskTag, tvb, offset + 16, 4, FALSE); if(enable_03_mode) { - proto_tree_add_uint(ti, hf_iscsi_TargetTransferTag, tvb, offset + 20, 4, tvb_get_ntohl(tvb, offset + 20)); + proto_tree_add_item(ti, hf_iscsi_TargetTransferTag, tvb, offset + 20, 4, FALSE); } - proto_tree_add_uint(ti, hf_iscsi_StatSN, tvb, offset + 24, 4, tvb_get_ntohl(tvb, offset + 24)); - proto_tree_add_uint(ti, hf_iscsi_ExpCmdSN, tvb, offset + 28, 4, tvb_get_ntohl(tvb, offset + 28)); - proto_tree_add_uint(ti, hf_iscsi_MaxCmdSN, tvb, offset + 32, 4, tvb_get_ntohl(tvb, offset + 32)); + proto_tree_add_item(ti, hf_iscsi_StatSN, tvb, offset + 24, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_ExpCmdSN, tvb, offset + 28, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_MaxCmdSN, tvb, offset + 32, 4, FALSE); if(enable_03_mode) { - proto_tree_add_uint(ti, hf_iscsi_CommandStatus03, tvb, offset + 36, 1, tvb_get_guint8(tvb, offset + 36)); + proto_tree_add_item(ti, hf_iscsi_CommandStatus03, tvb, offset + 36, 1, FALSE); } else { - proto_tree_add_uint(ti, hf_iscsi_DataSN, tvb, offset + 36, 4, tvb_get_ntohl(tvb, offset + 36)); + proto_tree_add_item(ti, hf_iscsi_DataSN, tvb, offset + 36, 4, FALSE); } - proto_tree_add_uint(ti, hf_iscsi_BufferOffset, tvb, offset + 40, 4, tvb_get_ntohl(tvb, offset + 40)); - proto_tree_add_uint(ti, hf_iscsi_SCSIData_ResidualCount, tvb, offset + 44, 4, tvb_get_ntohl(tvb, offset + 44)); + proto_tree_add_item(ti, hf_iscsi_BufferOffset, tvb, offset + 40, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_SCSIData_ResidualCount, tvb, offset + 44, 4, FALSE); offset += 48 + handleHeaderDigest(ti, tvb, offset, 48); } else if((enable_03_mode && opcode == 0x06) || @@ -1249,14 +1249,14 @@ dissect_iscsi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { offset + 0, 1, opcode); proto_tree_add_uint(ti, hf_iscsi_DataSegmentLength, tvb, offset + 5, 3, data_segment_len); } - proto_tree_add_uint(ti, hf_iscsi_CID, tvb, offset + 8, 2, tvb_get_ntohs(tvb, offset + 8)); + proto_tree_add_item(ti, hf_iscsi_CID, tvb, offset + 8, 2, FALSE); if(enable_03_mode) - proto_tree_add_uint(ti, hf_iscsi_Logout_Reason03, tvb, offset + 11, 1, tvb_get_guint8(tvb, offset + 11)); + proto_tree_add_item(ti, hf_iscsi_Logout_Reason03, tvb, offset + 11, 1, FALSE); else - proto_tree_add_uint(ti, hf_iscsi_Logout_Reason, tvb, offset + 11, 1, tvb_get_guint8(tvb, offset + 11)); - proto_tree_add_uint(ti, hf_iscsi_InitiatorTaskTag, tvb, offset + 16, 4, tvb_get_ntohl(tvb, offset + 16)); + proto_tree_add_item(ti, hf_iscsi_Logout_Reason, tvb, offset + 11, 1, FALSE); + proto_tree_add_item(ti, hf_iscsi_InitiatorTaskTag, tvb, offset + 16, 4, FALSE); if(!enable_03_mode) { - proto_tree_add_uint(ti, hf_iscsi_ExpStatSN, tvb, offset + 28, 4, tvb_get_ntohl(tvb, offset + 28)); + proto_tree_add_item(ti, hf_iscsi_ExpStatSN, tvb, offset + 28, 4, FALSE); } offset += 48 + handleHeaderDigest(ti, tvb, offset, 48); } @@ -1272,10 +1272,10 @@ dissect_iscsi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { proto_tree_add_uint(ti, hf_iscsi_Opcode, tvb, offset + 0, 1, opcode); } - proto_tree_add_uint(ti, hf_iscsi_InitiatorTaskTag, tvb, offset + 16, 4, tvb_get_ntohl(tvb, offset + 16)); - proto_tree_add_uint(ti, hf_iscsi_ExpCmdSN, tvb, offset + 28, 4, tvb_get_ntohl(tvb, offset + 28)); - proto_tree_add_uint(ti, hf_iscsi_MaxCmdSN, tvb, offset + 32, 4, tvb_get_ntohl(tvb, offset + 32)); - proto_tree_add_uint(ti, hf_iscsi_Logout_Response, tvb, offset + 36, 1, tvb_get_guint8(tvb, offset + 36)); + proto_tree_add_item(ti, hf_iscsi_InitiatorTaskTag, tvb, offset + 16, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_ExpCmdSN, tvb, offset + 28, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_MaxCmdSN, tvb, offset + 32, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_Logout_Response, tvb, offset + 36, 1, FALSE); offset += 48 + handleHeaderDigest(ti, tvb, offset, 48); } else if((!enable_03_mode && (opcode == 0x10 || opcode == 0x50))) { @@ -1291,17 +1291,17 @@ dissect_iscsi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { proto_tree_add_boolean(tt, hf_iscsi_SNACK_S, tvb, offset + 1, 1, b); S = b & 0x01; } - proto_tree_add_boolean(ti, hf_iscsi_AddRuns, tvb, offset + 3, 1, tvb_get_guint8(tvb, offset + 3)); - proto_tree_add_uint(ti, hf_iscsi_InitiatorTaskTag, tvb, offset + 16, 4, tvb_get_ntohl(tvb, offset + 16)); - proto_tree_add_uint(ti, hf_iscsi_BegRun, tvb, offset + 20, 4, tvb_get_ntohl(tvb, offset + 20)); - proto_tree_add_uint(ti, hf_iscsi_RunLength, tvb, offset + 24, 4, tvb_get_ntohl(tvb, offset + 24)); + proto_tree_add_item(ti, hf_iscsi_AddRuns, tvb, offset + 3, 1, FALSE); + proto_tree_add_item(ti, hf_iscsi_InitiatorTaskTag, tvb, offset + 16, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_BegRun, tvb, offset + 20, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_RunLength, tvb, offset + 24, 4, FALSE); if(S) { - proto_tree_add_uint(ti, hf_iscsi_ExpStatSN, tvb, offset + 28, 4, tvb_get_ntohl(tvb, offset + 28)); + proto_tree_add_item(ti, hf_iscsi_ExpStatSN, tvb, offset + 28, 4, FALSE); } else { - proto_tree_add_uint(ti, hf_iscsi_ExpDataSN, tvb, offset + 28, 4, tvb_get_ntohl(tvb, offset + 28)); + proto_tree_add_item(ti, hf_iscsi_ExpDataSN, tvb, offset + 28, 4, FALSE); } - proto_tree_add_bytes(ti, hf_iscsi_AdditionalRuns, tvb, offset + 32, 16, tvb_get_ptr(tvb, offset + 32, 16)); + proto_tree_add_item(ti, hf_iscsi_AdditionalRuns, tvb, offset + 32, 16, FALSE); offset += 48 + handleHeaderDigest(ti, tvb, offset, 48); } else if((enable_03_mode && opcode == 0x90) || @@ -1316,21 +1316,21 @@ dissect_iscsi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { proto_tree_add_uint(ti, hf_iscsi_Opcode, tvb, offset + 0, 1, opcode); } - proto_tree_add_uint(ti, hf_iscsi_InitiatorTaskTag, tvb, offset + 16, 4, tvb_get_ntohl(tvb, offset + 16)); - proto_tree_add_uint(ti, hf_iscsi_TargetTransferTag, tvb, offset + 20, 4, tvb_get_ntohl(tvb, offset + 20)); + proto_tree_add_item(ti, hf_iscsi_InitiatorTaskTag, tvb, offset + 16, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_TargetTransferTag, tvb, offset + 20, 4, FALSE); if(!enable_03_mode) { - proto_tree_add_uint(ti, hf_iscsi_StatSN, tvb, offset + 24, 4, tvb_get_ntohl(tvb, offset + 24)); + proto_tree_add_item(ti, hf_iscsi_StatSN, tvb, offset + 24, 4, FALSE); } - proto_tree_add_uint(ti, hf_iscsi_ExpCmdSN, tvb, offset + 28, 4, tvb_get_ntohl(tvb, offset + 28)); - proto_tree_add_uint(ti, hf_iscsi_MaxCmdSN, tvb, offset + 32, 4, tvb_get_ntohl(tvb, offset + 32)); + proto_tree_add_item(ti, hf_iscsi_ExpCmdSN, tvb, offset + 28, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_MaxCmdSN, tvb, offset + 32, 4, FALSE); if(enable_03_mode) { - proto_tree_add_uint(ti, hf_iscsi_DesiredDataLength, tvb, offset + 36, 4, tvb_get_ntohl(tvb, offset + 36)); - proto_tree_add_uint(ti, hf_iscsi_BufferOffset, tvb, offset + 40, 4, tvb_get_ntohl(tvb, offset + 40)); + proto_tree_add_item(ti, hf_iscsi_DesiredDataLength, tvb, offset + 36, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_BufferOffset, tvb, offset + 40, 4, FALSE); } else { - proto_tree_add_uint(ti, hf_iscsi_DataSN, tvb, offset + 36, 4, tvb_get_ntohl(tvb, offset + 36)); - proto_tree_add_uint(ti, hf_iscsi_BufferOffset, tvb, offset + 40, 4, tvb_get_ntohl(tvb, offset + 40)); - proto_tree_add_uint(ti, hf_iscsi_DesiredDataLength, tvb, offset + 44, 4, tvb_get_ntohl(tvb, offset + 44)); + proto_tree_add_item(ti, hf_iscsi_DataSN, tvb, offset + 36, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_BufferOffset, tvb, offset + 40, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_DesiredDataLength, tvb, offset + 44, 4, FALSE); } offset += 48 + handleHeaderDigest(ti, tvb, offset, 48); } @@ -1347,22 +1347,22 @@ dissect_iscsi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { offset + 0, 1, opcode); proto_tree_add_uint(ti, hf_iscsi_DataSegmentLength, tvb, offset + 5, 3, data_segment_len); } - proto_tree_add_bytes(ti, hf_iscsi_LUN, tvb, offset + 8, 8, tvb_get_ptr(tvb, offset + 8, 8)); - proto_tree_add_uint(ti, hf_iscsi_StatSN, tvb, offset + 24, 4, tvb_get_ntohl(tvb, offset + 24)); - proto_tree_add_uint(ti, hf_iscsi_ExpCmdSN, tvb, offset + 28, 4, tvb_get_ntohl(tvb, offset + 28)); - proto_tree_add_uint(ti, hf_iscsi_MaxCmdSN, tvb, offset + 32, 4, tvb_get_ntohl(tvb, offset + 32)); + proto_tree_add_item(ti, hf_iscsi_LUN, tvb, offset + 8, 8, FALSE); + proto_tree_add_item(ti, hf_iscsi_StatSN, tvb, offset + 24, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_ExpCmdSN, tvb, offset + 28, 4, FALSE); + proto_tree_add_item(ti, hf_iscsi_MaxCmdSN, tvb, offset + 32, 4, FALSE); if(enable_03_mode) { - proto_tree_add_uint(ti, hf_iscsi_SCSIEvent03, tvb, offset + 36, 1, tvb_get_guint8(tvb, offset + 36)); - proto_tree_add_uint(ti, hf_iscsi_iSCSIEvent03, tvb, offset + 37, 1, tvb_get_guint8(tvb, offset + 37)); + proto_tree_add_item(ti, hf_iscsi_SCSIEvent03, tvb, offset + 36, 1, FALSE); + proto_tree_add_item(ti, hf_iscsi_iSCSIEvent03, tvb, offset + 37, 1, FALSE); } else { - proto_tree_add_uint(ti, hf_iscsi_SCSIEvent, tvb, offset + 36, 1, tvb_get_guint8(tvb, offset + 36)); - proto_tree_add_uint(ti, hf_iscsi_iSCSIEvent, tvb, offset + 37, 1, tvb_get_guint8(tvb, offset + 37)); + proto_tree_add_item(ti, hf_iscsi_SCSIEvent, tvb, offset + 36, 1, FALSE); + proto_tree_add_item(ti, hf_iscsi_iSCSIEvent, tvb, offset + 37, 1, FALSE); } - proto_tree_add_uint(ti, hf_iscsi_Parameter1, tvb, offset + 38, 2, tvb_get_ntohs(tvb, offset + 38)); - proto_tree_add_uint(ti, hf_iscsi_Parameter2, tvb, offset + 40, 2, tvb_get_ntohs(tvb, offset + 40)); + proto_tree_add_item(ti, hf_iscsi_Parameter1, tvb, offset + 38, 2, FALSE); + proto_tree_add_item(ti, hf_iscsi_Parameter2, tvb, offset + 40, 2, FALSE); if(!enable_03_mode) - proto_tree_add_uint(ti, hf_iscsi_Parameter3, tvb, offset + 42, 2, tvb_get_ntohs(tvb, offset + 40)); + proto_tree_add_item(ti, hf_iscsi_Parameter3, tvb, offset + 42, 2, FALSE); offset += 48 + handleHeaderDigest(ti, tvb, offset, 48); } else if(opcode == 0xef) { @@ -1371,20 +1371,20 @@ dissect_iscsi(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { proto_tree_add_uint(ti, hf_iscsi_Opcode_03, tvb, offset + 0, 1, opcode); proto_tree_add_uint(ti, hf_iscsi_Length03, tvb, offset + 4, 4, data_segment_len); - proto_tree_add_uint(ti, hf_iscsi_Reject_Reason03, tvb, offset + 36, 1, tvb_get_guint8(tvb, offset + 36)); + proto_tree_add_item(ti, hf_iscsi_Reject_Reason03, tvb, offset + 36, 1, FALSE); } else { proto_tree_add_uint(ti, hf_iscsi_Opcode, tvb, offset + 0, 1, opcode); proto_tree_add_uint(ti, hf_iscsi_DataSegmentLength, tvb, offset + 5, 3, data_segment_len); - proto_tree_add_uint(ti, hf_iscsi_Reject_Reason, tvb, offset + 40, 1, tvb_get_guint8(tvb, offset + 40)); - proto_tree_add_uint(ti, hf_iscsi_Reject_FirstBadByte, tvb, offset + 42, 1, tvb_get_ntohs(tvb, offset + 42)); + proto_tree_add_item(ti, hf_iscsi_Reject_Reason, tvb, offset + 40, 1, FALSE); + proto_tree_add_item(ti, hf_iscsi_Reject_FirstBadByte, tvb, offset + 42, 1, FALSE); } offset += 48 + handleHeaderDigest(ti, tvb, offset, 48); } if(packet_len > offset) - proto_tree_add_bytes(ti, hf_iscsi_Payload, tvb, offset, packet_len - offset, tvb_get_ptr(tvb, offset, packet_len - offset)); + proto_tree_add_item(ti, hf_iscsi_Payload, tvb, offset, packet_len - offset, FALSE); } return TRUE; diff --git a/packet-ldp.c b/packet-ldp.c index dde055b989..e41da1949e 100644 --- a/packet-ldp.c +++ b/packet-ldp.c @@ -1,7 +1,7 @@ /* packet-ldp.c * Routines for ldp packet disassembly * - * $Id: packet-ldp.c,v 1.17 2001/06/18 02:17:48 guy Exp $ + * $Id: packet-ldp.c,v 1.18 2001/07/16 05:16:57 guy Exp $ * * Copyright (c) November 2000 by Richard Sharpe <rsharpe@ns.aus.com> * @@ -217,8 +217,8 @@ void dissect_tlv_common_hello_parms(tvbuff_t *tvb, guint offset, proto_tree *tre if (tree) { - ti = proto_tree_add_bytes(tree, hf_ldp_tlv_value, tvb, offset, rem, - tvb_get_ptr(tvb, offset, rem)); + ti = proto_tree_add_item(tree, hf_ldp_tlv_value, tvb, offset, rem, + FALSE); val_tree = proto_item_add_subtree(ti, ett_ldp_tlv_val); @@ -387,8 +387,8 @@ int dissect_tlv(tvbuff_t *tvb, guint offset, proto_tree *tree, int rem) break; default: - proto_tree_add_bytes(tlv_tree, hf_ldp_tlv_value, tvb, offset + 4, - length, tvb_get_ptr(tvb, offset + 4, length)); + proto_tree_add_item(tlv_tree, hf_ldp_tlv_value, tvb, offset + 4, + length, FALSE); break; } diff --git a/packet-mpeg1.c b/packet-mpeg1.c index 6a8187936c..3aaf8eabd1 100644 --- a/packet-mpeg1.c +++ b/packet-mpeg1.c @@ -2,7 +2,7 @@ * * Routines for RFC 2250 MPEG-1 dissection * - * $Id: packet-mpeg1.c,v 1.2 2001/06/18 02:17:49 guy Exp $ + * $Id: packet-mpeg1.c,v 1.3 2001/07/16 05:16:57 guy Exp $ * * Copyright 2001, * Francisco Javier Cabello Torres, <fjcabello@vtools.es> @@ -192,7 +192,7 @@ dissect_mpeg1( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree ) offset += 1; /* The rest of the packet is the MPEG-1 stream */ - proto_tree_add_bytes( mpg_tree, hf_rtp_mpg_data, tvb, offset, tvb_length_remaining( tvb, offset ), tvb_get_ptr( tvb, offset, tvb_length_remaining( tvb, offset ) ) ); + proto_tree_add_item( mpg_tree, hf_rtp_mpg_data, tvb, offset, tvb_length_remaining( tvb, offset ), FALSE ); } } diff --git a/packet-mrdisc.c b/packet-mrdisc.c index 6a4456daaa..a2ea14bb7e 100644 --- a/packet-mrdisc.c +++ b/packet-mrdisc.c @@ -1,7 +1,7 @@ /* packet-mrdisc.c 2001 Ronnie Sahlberg <rsahlber@bigpond.net.au> * Routines for IGMP/MRDISC packet disassembly * - * $Id: packet-mrdisc.c,v 1.1 2001/06/27 20:19:19 guy Exp $ + * $Id: packet-mrdisc.c,v 1.2 2001/07/16 05:16:57 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -116,8 +116,7 @@ dissect_mrdisc_mra(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, i guint16 num; /* Advertising Interval */ - proto_tree_add_uint(parent_tree, hf_advint, tvb, - offset, 1, tvb_get_guint8(tvb, offset)); + proto_tree_add_item(parent_tree, hf_advint, tvb, offset, 1, FALSE); offset += 1; /* checksum */ @@ -160,8 +159,8 @@ dissect_mrdisc_mra(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, i tvb_get_ntohs(tvb, offset)); } - proto_tree_add_uint(tree, hf_qi, tvb, offset, len, - tvb_get_ntohs(tvb, offset)); + proto_tree_add_item(tree, hf_qi, tvb, offset, len, + FALSE); offset += len; break; case MRDISC_RV: @@ -171,8 +170,8 @@ dissect_mrdisc_mra(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, i tvb_get_ntohs(tvb, offset)); } - proto_tree_add_uint(tree, hf_rv, tvb, offset, len, - tvb_get_ntohs(tvb, offset)); + proto_tree_add_item(tree, hf_rv, tvb, offset, len, + FALSE); offset += len; break; default: @@ -180,8 +179,8 @@ dissect_mrdisc_mra(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree, i proto_item_set_text(item,"Option: unknown"); } - proto_tree_add_bytes(tree, hf_option_bytes, - tvb, offset, len, tvb_get_ptr(tvb, offset, len)); + proto_tree_add_item(tree, hf_option_bytes, + tvb, offset, len, FALSE); offset += len; } if (item) { diff --git a/packet-rtp.c b/packet-rtp.c index eaf0151daf..bc0b12135d 100644 --- a/packet-rtp.c +++ b/packet-rtp.c @@ -6,7 +6,7 @@ * Copyright 2000, Philips Electronics N.V. * Written by Andreas Sikkema <andreas.sikkema@philips.com> * - * $Id: packet-rtp.c,v 1.22 2001/07/03 04:56:45 guy Exp $ + * $Id: packet-rtp.c,v 1.23 2001/07/16 05:16:57 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -311,7 +311,7 @@ dissect_rtp_data( tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, break; default: - proto_tree_add_bytes( rtp_tree, hf_rtp_data, tvb, offset, data_len, tvb_get_ptr( tvb, offset, data_len ) ); + proto_tree_add_item( rtp_tree, hf_rtp_data, tvb, offset, data_len, FALSE ); break; } } diff --git a/packet-sll.c b/packet-sll.c index 559995ccac..7a5706af8d 100644 --- a/packet-sll.c +++ b/packet-sll.c @@ -1,7 +1,7 @@ /* packet-sll.c * Routines for disassembly of packets from Linux "cooked mode" captures * - * $Id: packet-sll.c,v 1.10 2001/06/18 02:17:52 guy Exp $ + * $Id: packet-sll.c,v 1.11 2001/07/16 05:16:58 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -180,8 +180,8 @@ dissect_sll(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } } else { if (tree) { - proto_tree_add_bytes(fh_tree, hf_sll_src_other, tvb, - 6, halen, tvb_get_ptr(tvb, 6, halen)); + proto_tree_add_item(fh_tree, hf_sll_src_other, tvb, + 6, halen, FALSE); } } diff --git a/packet-x11.c b/packet-x11.c index a3633d1566..65dc933c5d 100644 --- a/packet-x11.c +++ b/packet-x11.c @@ -2,7 +2,7 @@ * Routines for X11 dissection * Copyright 2000, Christophe Tronche <ch.tronche@computer.org> * - * $Id: packet-x11.c,v 1.21 2001/06/18 02:17:54 guy Exp $ + * $Id: packet-x11.c,v 1.22 2001/07/16 05:16:58 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -825,7 +825,7 @@ static void listOfByte(tvbuff_t *tvb, int hf, int length) length = next_offset - cur_offset; } if (length <= 0) length = 1; - proto_tree_add_bytes(t, hf, tvb, cur_offset, length, tvb_get_ptr(tvb, cur_offset, length)); + proto_tree_add_item(t, hf, tvb, cur_offset, length, little_endian); cur_offset += length; } @@ -1126,7 +1126,7 @@ static void string16_with_buffer_preallocated(tvbuff_t *tvb, proto_tree *t, proto_tree_add_string_format(t, hf, tvb, offset, length, tvb_get_ptr(tvb, offset, length), "%s: %s", proto_registrar_get_nth(hf) -> name, *s); } else - proto_tree_add_bytes(t, hf_bytes, tvb, offset, length, tvb_get_ptr(tvb, offset, length)); + proto_tree_add_item(t, hf_bytes, tvb, offset, length, little_endian); } |