Wireshark-bugs: [Wireshark-bugs] [Bug 9423] Improved ZCL dissectors

Date: Thu, 21 Nov 2013 08:50:10 +0000

Comment # 5 on bug 9423 from
Please look at this code sample:

if (zcl_tree) {
    proto_tree_add_uint(zcl_tree, hf_zbee_zcl_ias_zone_client_cmd_id, tvb,
offset, 1, packet.cmd_id);
    offset += 1;
    switch (packet.cmd_id) {
        case ZBEE_ZCL_CSC_IAS_ZONE_C_ZER:
            /* Zone Enroll Response. */
            proto_tree_add_item(zcl_tree, hf_zbee_zcl_ias_zone_client_zer_erc,
tvb, offset, 1, ENC_NA);
            offset += 1;
            proto_tree_add_item(zcl_tree,
hf_zbee_zcl_ias_zone_client_zer_zone_id, tvb, offset, 1, ENC_NA);
            offset += 1;
            proto_tree_add_item(zcl_tree, ..., ..., offset, 1, ...);
            offset += 1;
            break;
        case OTHER_COMMAND:
            /* ... */
    }
}

Is this offset incrementation method right?


You are receiving this mail because:
  • You are watching all bug changes.