Re: [PATCH v4 09/41] proto: Decorate protocol file with attributes for wireshark

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> On Thu, Jul 23, 2015 at 04:54:26PM +0100, Frediano Ziglio wrote:
> > Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
> > ---
> >  spice.proto | 416
> >  ++++++++++++++++++++++++++++++++----------------------------
> >  1 file changed, 219 insertions(+), 197 deletions(-)
> > 
> > diff --git a/spice.proto b/spice.proto
> > index 4ea1263..52d6971 100644
> > --- a/spice.proto
> > +++ b/spice.proto
> > @@ -5,14 +5,14 @@
> >  typedef fixed28_4 int32 @ctype(SPICE_FIXED28_4);
> >  
> >  struct Point {
> > -    int32 x;
> > -    int32 y;
> > -};
> > +    int32 x @ws("x", point32.x);
> > +    int32 y @ws("y", point32.y);
> > +} @ws_txt("POINT (%d, %d)", x, y);
> >  
> >  struct Point16 {
> > -    int16 x;
> > -    int16 y;
> > -};
> > +    int16 x @ws("x", point16.x);
> > +    int16 y @ws("y", point16.y);
> > +} @ws_txt("POINT16 (%d, %d)", x, y);
> >  
> >  struct PointFix {
> >      fixed28_4 x;
> > @@ -20,11 +20,14 @@ struct PointFix {
> >  };
> >  
> >  struct Rect {
> > -    int32 top;
> > -    int32 left;
> > -    int32 bottom;
> > -    int32 right;
> > -};
> > +    int32 top @ws("top", rect.top);
> > +    int32 left @ws("left", rect.left);
> > +    int32 bottom @ws("bottom", rect.bottom);
> > +    int32 right @ws("right", rect.right);
> > +}
> > +@ws_txt("RECT: (%d-%d, %d-%d)", left, top, right, bottom)
> > +@ws_txt_n("RECT %u: (%d-%d, %d-%d)", INDEX, left, top, right, bottom)
> > +;
> >  
> >  struct Transform {
> >      uint32 t00;
> > @@ -96,10 +99,15 @@ enum32 notify_visibility {
> >  };
> >  
> >  flags16 mouse_mode {
> > -    SERVER,
> > -    CLIENT,
> > +    SERVER @ws_desc("Server mode"),
> > +    CLIENT @ws_desc("Client mode"),
> >  };
> >  
> > +flags32 mouse_mode32 {
> > +    SERVER @ws_desc("Server mode"),
> > +    CLIENT @ws_desc("Client mode"),
> > +} @ws("Supported mouse modes", supported_mouse_modes);
> > +
> 
> This one should be split as this is an addition rather than a decoration
> 

Yes, perhaps was added before the ws_as implementation (actually I'm not sure it works for primitive types).

...

Frediano
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]