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

Date: Wed, 20 Nov 2013 10:30:41 +0000

Comment # 4 on bug 9423 from
> and also increment will be no in if(zcl_tree)

What do you mean? For example, we have the code:

if (zcl_tree) {
    proto_tree_add_uint(zcl_tree, hf_zbee_zcl_ias_zone_client_cmd_id, tvb,
offset, 1, packet.cmd_id);
    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, 1, ENC_NA);
            proto_tree_add_item(zcl_tree,
hf_zbee_zcl_ias_zone_client_zer_zone_id, tvb, offset + 2, 1, ENC_NA);
            offset += 3;
            break;
        /* ... */
    }
}

Should we simply increment the offset after each proto_tree_add_*? Or we should
close "if (zcl_tree)" after each proto_tree_add_*, increment the offset and
then reopen "if (zcl_tree)" each time?


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