[Spice-devel] What is the size of brush type field?

Yaniv Kaul ykaul at redhat.com
Thu May 26 14:06:55 PDT 2011


While trying to improve the Wireshark dissector for Spice, bumped into 
the following:
spice - common/draw.h:
typedef struct SpiceBrush {
*uint32_t type;*
     union {
         uint32_t color;
         SpicePattern pattern;
     } u;
} SpiceBrush;


However, when you look at spice - server/generated_marshallers.c:
void spice_marshall_Fill(SpiceMarshaller *m, SpiceFill *ptr, 
SpiceMarshaller **brush_pat_out, SpiceMarshaller **mask_bitmap_out)
...
     /* brush */ {
*spice_marshaller_add_uint8(m, src->brush.type);*


And a network capture indeed confirms its 1 byte.
Bug in draw.h ?
Perhaps remains from spice-protocol - spice/qxl_dev.h:

typedef struct SPICE_ATTR_PACKED QXLBrush {
*uint32_t type;*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20110527/56d596c2/attachment.html>


More information about the Spice-devel mailing list