/* ZigBee Device Profile dissector for the leave request. */
void dissect_zbee_zdp_req_mgmt_leave(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint8 version)
/* ZigBee Device Profile dissector for the leave request. */
void dissect_zbee_zdp_req_mgmt_leave(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint8 version)
{
    guint   offset = 0;
    guint64 ext_addr;
    static const int * flags[] = {
        &hf_zbee_zdp_leave_children,
        &hf_zbee_zdp_leave_rejoin,
        NULL
    };
    ext_addr = zbee_parse_eui64(tree, hf_zbee_zdp_ext_addr, tvb, &offset, 8, NULL);
    if (version >= ZBEE_VERSION_2007) {
        proto_tree_add_bitmask_list(tree, tvb, offset, 1, flags, ENC_NA);
        offset += 1;
    }
    zbee_append_info(tree, pinfo, ", Device: %s", eui64_to_display(wmem_packet_scope(), ext_addr));
    zdp_dump_excess(tvb, offset, pinfo, tree);
}