Polish up the proto_tree_add_bitmask() description example.
authorjake <jake@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 22 Sep 2008 22:15:26 +0000 (22:15 +0000)
committerjake <jake@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 22 Sep 2008 22:15:26 +0000 (22:15 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26249 f5534014-38df-0310-8fa8-9805f1628bb7

doc/README.developer

index 6792617c0c95fee1ce531cb487092c70405217ad..9e9f53fbb135a6b1244559f9d9891073b1e97adf 100644 (file)
@@ -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