aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorJaap Keuter <jaap.keuter@xs4all.nl>2008-09-22 22:15:26 +0000
committerJaap Keuter <jaap.keuter@xs4all.nl>2008-09-22 22:15:26 +0000
commit00f08adddbf8cef7ba7ec550afd50227ede08d88 (patch)
tree31cb6c32ea09976926925ac1298497d31d49a09b /doc
parentcc692da9971bd62128cac1728279ad200f63d6c0 (diff)
Polish up the proto_tree_add_bitmask() description example.
svn path=/trunk/; revision=26249
Diffstat (limited to 'doc')
-rw-r--r--doc/README.developer8
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/README.developer b/doc/README.developer
index 6792617c0c..9e9f53fbb1 100644
--- a/doc/README.developer
+++ b/doc/README.developer
@@ -2358,6 +2358,7 @@ matched string from that value_string will be printed on the expansion line as w
Example: (from the scsi dissector)
static int hf_scsi_inq_peripheral = -1;
static int hf_scsi_inq_qualifier = -1;
+ static int hf_scsi_inq_devtype = -1;
static gint ett_scsi_inq_peripheral = -1;
...
static const int *peripheal_fields[] = {
@@ -2376,10 +2377,17 @@ Example: (from the scsi dissector)
{ &hf_scsi_inq_qualifier,
{"Qualifier", "scsi.inquiry.qualifier", FT_UINT8, BASE_HEX,
VALS (scsi_qualifier_val), 0xE0, NULL, HFILL}},
+ { &hf_scsi_inq_devtype,
+ {"Device Type", "scsi.inquiry.devtype", FT_UINT8, BASE_HEX,
+ VALS (scsi_devtype_val), SCSI_DEV_BITS, "", HFILL}},
...
Which provides very pretty dissection of this one byte bitmask.
+ Peripheral: 0x05, Qualifier: Device type is connected to logical unit, Device Type: CD-ROM
+ 000. .... = Qualifier: Device type is connected to logical unit (0x00)
+ ...0 0101 = Device Type: CD-ROM (0x05)
+
PROTO_ITEM_SET_HIDDEN()
-----------------------
PROTO_ITEM_SET_HIDDEN is used to hide fields, which have already been added