<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body text="#000000" bgcolor="#ffffff">
    While trying to improve the Wireshark dissector for Spice, bumped
    into the following:<br>
    spice - common/draw.h:<br>
    typedef struct SpiceBrush {<br>
    &nbsp;&nbsp;&nbsp; <b>uint32_t type;</b><br>
    &nbsp;&nbsp;&nbsp; union {<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; uint32_t color;<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SpicePattern pattern;<br>
    &nbsp;&nbsp;&nbsp; } u;<br>
    } SpiceBrush;<br>
    <br>
    <br>
    However, when you look at spice - server/generated_marshallers.c:<br>
    void spice_marshall_Fill(SpiceMarshaller *m, SpiceFill *ptr,
    SpiceMarshaller **brush_pat_out, SpiceMarshaller **mask_bitmap_out)<br>
    ...<br>
    &nbsp;&nbsp;&nbsp; /* brush */ {<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <b>spice_marshaller_add_uint8(m, src-&gt;brush.type);</b><br>
    <br>
    <br>
    And a network capture indeed confirms its 1 byte.<br>
    Bug in draw.h ? <br>
    Perhaps remains from spice-protocol - spice/qxl_dev.h:<br>
    <br>
    typedef struct SPICE_ATTR_PACKED QXLBrush {<br>
    &nbsp;&nbsp;&nbsp; <b>uint32_t type;</b><br>
  </body>
</html>