[Spice-devel] [PATCH v6 42/42] proto: Describe Quic image format from dissector
Frediano Ziglio
fziglio at redhat.com
Fri Aug 14 05:37:49 PDT 2015
> On Thu, Aug 13, 2015 at 02:12:21PM +0100, Frediano Ziglio wrote:
> > Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> > ---
> > spice.proto | 25 ++++++++++++++++++++++++-
> > 1 file changed, 24 insertions(+), 1 deletion(-)
> >
> > diff --git a/spice.proto b/spice.proto
> > index c7944ac..6a51645 100644
> > --- a/spice.proto
> > +++ b/spice.proto
> > @@ -687,6 +687,29 @@ struct Surface {
> > uint32 surface_id;
> > } @ws_txt("Surface ID: %u", surface_id);
> >
> > +enum32 quic_image_type {
> > + INVALID,
> > + GRAY,
> > + RGB16,
> > + RGB24,
> > + RGB32,
> > + RGBA
> > +} @ws("QUIC image type", quic_type) @prefix(WSQUIC_IMAGE_TYPE_)
> > @ifdef(DISSECTOR);
> > +
> > +struct ImageQuic {
> > + uint32 magic @ws_desc("QUIC magic (QUIC)");
> > + uint16 major @ws("QUIC major version", quic_major_version);
> > + uint16 minor @ws("QUIC minor version", quic_minor_version);
> > + quic_image_type type;
> > + uint32 width @ws("Width", quic_width);
> > + uint32 height @ws("Height", image_height);
> > + uint8 data[] @end @ws_txt("QUIC compressed image data (%u bytes)",
> > data.nelements);
> > +};
>
> Would it make sense to annotate the structs with @ifdef too ?
>
> Christophe
>
Structure are generated as needed for marshall, demarshall and dissector code.
As these structures are references only by @ws_as only dissector code will
use them.
The enumerations are different as there is no such garbage collector.
It would make sense from the visual prospective (users that read spice.proto
could understand fast that are only for dissector).
I think is up to you... what do you think?
Frediano
More information about the Spice-devel
mailing list