From 00f08adddbf8cef7ba7ec550afd50227ede08d88 Mon Sep 17 00:00:00 2001 From: Jaap Keuter Date: Mon, 22 Sep 2008 22:15:26 +0000 Subject: [PATCH] Polish up the proto_tree_add_bitmask() description example. svn path=/trunk/; revision=26249 --- doc/README.developer | 8 ++++++++ 1 file changed, 8 insertions(+) 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