Re: [Spice-devel] [spice-protocol] Rename SpiceImageCompress constants

2015-07-23 Thread Christophe Fergeau
Hey, On Thu, Jul 23, 2015 at 07:42:51PM +0300, Uri Lublin wrote: > On 07/23/2015 05:23 PM, Christophe Fergeau wrote: > >Having these constants use the same name as the ones in spice-server > >0.12.5 causes compilation issues for spice-server users when using > >spice-server 0.12.5 or older, and sp

Re: [Spice-devel] [PATCH v3 16/51] Allows to specify some new attributes for wireshark

2015-07-23 Thread Christophe Fergeau
On Thu, Jul 23, 2015 at 11:15:14AM -0400, Frediano Ziglio wrote: > > On Thu, Jul 23, 2015 at 10:49:58AM -0400, Frediano Ziglio wrote: > > > > > > > > On Tue, Jul 21, 2015 at 05:45:46PM +0100, Frediano Ziglio wrote: > > > > > To make output more useful fields from the protocol should have > > > > >

Re: [Spice-devel] [spice-protocol] Rename SpiceImageCompress constants

2015-07-23 Thread Uri Lublin
On 07/23/2015 05:23 PM, Christophe Fergeau wrote: Having these constants use the same name as the ones in spice-server 0.12.5 causes compilation issues for spice-server users when using spice-server 0.12.5 or older, and spice-protocol 0.12.8. Hi Christophe, We should not have two sets of these

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

2015-07-23 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- 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 @@ typed

[Spice-devel] [PATCH v4 35/41] codegen: Allows to specify wireshark name for enumerators

2015-07-23 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- python_modules/dissector.py| 2 +- python_modules/ptypes.py | 4 python_modules/spice_parser.py | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/python_modules/dissector.py b/python_modules/dissector.py index 08adefd..8580ca8

[Spice-devel] [PATCH v4 06/41] codegen: Allows to specify some new attributes for wireshark

2015-07-23 Thread Frediano Ziglio
To make output more useful fields from the protocol should have additional information like description, name, type and so on. List of attributes added: - ws_desc, just a simple description; - ws allow to specify a description and a name. Useful as easier to type instead of using two attributes;

[Spice-devel] [PATCH v4 29/41] dissector: Handle flags

2015-07-23 Thread Frediano Ziglio
Instead of only showing the hexadecimal value show all bits. Every bit is displayed as a different field (usually displayed in a different line indented under the main one). This also allows to use wireshark filter to target specific bits. Signed-off-by: Frediano Ziglio --- codegen/Makefile.am

[Spice-devel] [PATCH v4 08/41] codegen: Allows to specify attributes for array items and pointers

2015-07-23 Thread Frediano Ziglio
Specifying attributes for items allows to specify different attribute for the same member where some are specific to the item while the other to the array. The element attributes are attached to the array as they cannot be attached to the type as the object is unique for each type. Same for pointer

[Spice-devel] [PATCH v4 25/41] dissector: Allows to override default values generated for the fields

2015-07-23 Thread Frediano Ziglio
ws_type overrides the type (BOOLEAN -> FT_BOOLEAN). ws_base overrides the base (DEC -> BASE_HEX). ws_desc overrides the description. ws allows to specify description and name for wireshark. Name is important as this can be used in wireshark filters. Having a single attribute with 2 values allows to

[Spice-devel] [PATCH v4 20/41] dissector: Handle arrays

2015-07-23 Thread Frediano Ziglio
If just raw data add a single field. If more complex loop through them. Signed-off-by: Frediano Ziglio --- codegen/Makefile.am | 4 codegen/check_dissector | 4 codegen/data_u16s | Bin 0 -> 2000 bytes codegen/out_array_primitive.txt | 25

[Spice-devel] [PATCH v4 30/41] dissector: Handle text formatting of different elements

2015-07-23 Thread Frediano Ziglio
Support ws_txt and ws_txt_n attributes. These attributes are there to allow to set specific text based on the values of different elements. For instance a text of a Point structure could explicitly display the coordinated (like "Point (12,32)") instead of just a fixed string (like "Point"). They ca

[Spice-devel] [PATCH v4 05/41] dissector: Generate skeleton for messages and channels

2015-07-23 Thread Frediano Ziglio
Messages are not generated as stub. Code partially from demarshaller. Signed-off-by: Frediano Ziglio --- codegen/Makefile.am | 3 +- codegen/check_dissector | 13 + codegen/dissector_test.c| 54 - python_modules/dissector.py | 138 +

[Spice-devel] [PATCH v4 36/41] codegen: Allows to specify ws_as attribute for messages

2015-07-23 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- python_modules/dissector.py| 7 ++- python_modules/ptypes.py | 3 ++- python_modules/spice_parser.py | 4 ++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/python_modules/dissector.py b/python_modules/dissector.py index 8580ca8..

[Spice-devel] [PATCH v4 19/41] dissector: Handle structures

2015-07-23 Thread Frediano Ziglio
Generate a function to parse the structure and call it to be able to reuse it. Signed-off-by: Frediano Ziglio --- codegen/Makefile.am | 1 + codegen/check_dissector | 2 ++ codegen/out_struct1.txt | 7 +++ codegen/test.proto | 9 + python_modules/dissecto

[Spice-devel] [PATCH v4 13/41] dissector: Write function to write members

2015-07-23 Thread Frediano Ziglio
Check members are all of a given type and call stubs for each type. Signed-off-by: Frediano Ziglio --- python_modules/dissector.py | 50 +++-- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/python_modules/dissector.py b/python_modules/disse

[Spice-devel] [PATCH v4 15/41] dissector: Allows to write items to tree and dump saved tree

2015-07-23 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- codegen/dissector_test.c | 424 ++- 1 file changed, 423 insertions(+), 1 deletion(-) diff --git a/codegen/dissector_test.c b/codegen/dissector_test.c index 25a33b5..5a49f40 100644 --- a/codegen/dissector_test.c +++ b/

[Spice-devel] [PATCH v4 18/41] dissector: Read array size

2015-07-23 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- python_modules/dissector.py | 48 +++-- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/python_modules/dissector.py b/python_modules/dissector.py index 5ba1fab..3a4caaf 100644 --- a/python_modules/dissector.

[Spice-devel] [PATCH v4 39/41] dissector: Allows ws_as attribute on switch members

2015-07-23 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- python_modules/dissector.py | 4 1 file changed, 4 insertions(+) diff --git a/python_modules/dissector.py b/python_modules/dissector.py index 064ed64..9b84561 100644 --- a/python_modules/dissector.py +++ b/python_modules/dissector.py @@ -429,6 +429,10 @@ d

[Spice-devel] [PATCH v4 23/41] dissector: Handle pointers

2015-07-23 Thread Frediano Ziglio
Read the pointer and if not 0 create a function to parse it and call it. Signed-off-by: Frediano Ziglio --- python_modules/dissector.py | 49 + 1 file changed, 49 insertions(+) diff --git a/python_modules/dissector.py b/python_modules/dissector.py ind

[Spice-devel] [PATCH v4 17/41] dissector: Handle base fields

2015-07-23 Thread Frediano Ziglio
Add fields to base tree (so basically there is no tree). Names is now generated from container + member name. The check for duplicate is not that strong, should check if same field is defined with same attributes. This patch also introduce a test.proto file. This allows to do tests which are not fo

[Spice-devel] [PATCH v4 03/41] dissector: Add new_ett function to be able to create new trees

2015-07-23 Thread Frediano Ziglio
Use an array to declare tree items instead of allocating it statically. This save a bit of memory and it also generates smaller code to read. A tree in wireshark represents an item which could be expanded. Possibly wireshark is using these registrations to save expansion state in the user interface

[Spice-devel] [PATCH v4 24/41] dissector: Introduce a class to handle wireshark attributes

2015-07-23 Thread Frediano Ziglio
This class will allow to handle wireshark attributes in a simpler way. This as different elements handle attributes in a slightly different way so handle the logic in a single class. Signed-off-by: Frediano Ziglio --- python_modules/dissector.py | 37 + 1 file

[Spice-devel] [PATCH v4 22/41] dissector: Implement ws_inline attribute

2015-07-23 Thread Frediano Ziglio
This attribute allows the structure parsing code to be inlined instead of being contained in a separate function. This is helpful as variable are declared in the function so allows other members to access to a nested structure. For instance in this example MouseState structure text (ws_txt) access

[Spice-devel] [PATCH v4 12/41] dissector: Parse containers

2015-07-23 Thread Frediano Ziglio
Parse all members of the containers Signed-off-by: Frediano Ziglio --- python_modules/dissector.py | 19 +++ 1 file changed, 19 insertions(+) diff --git a/python_modules/dissector.py b/python_modules/dissector.py index 10da2e7..b6dd203 100644 --- a/python_modules/dissector.py ++

[Spice-devel] [PATCH v4 07/41] codegen: Allows to specify descriptions for enumerations

2015-07-23 Thread Frediano Ziglio
These descriptions will be used to show in wireshark dissector. Signed-off-by: Frediano Ziglio --- python_modules/ptypes.py | 16 python_modules/spice_parser.py | 2 +- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/python_modules/ptypes.py b/python_modul

[Spice-devel] [PATCH v4 11/41] dissector: Add code to handle destination variable

2015-07-23 Thread Frediano Ziglio
Add some classes to be able to store retrieved data from structure and messages. The idea is to generate code dynamically when variable are read. Signed-off-by: Frediano Ziglio --- python_modules/dissector.py | 104 +++- 1 file changed, 103 insertions(+),

[Spice-devel] [PATCH v4 27/41] dissector: Use a class to register wireshark fields

2015-07-23 Thread Frediano Ziglio
Allow to reuse code and check better if field was already registered Signed-off-by: Frediano Ziglio --- python_modules/dissector.py | 58 + 1 file changed, 48 insertions(+), 10 deletions(-) diff --git a/python_modules/dissector.py b/python_modules/dis

[Spice-devel] [PATCH v4 26/41] dissector: Allows to specify 'CHANNEL' as type

2015-07-23 Thread Frediano Ziglio
Type will be mapped to an enumerator containing all channel types. Signed-off-by: Frediano Ziglio --- codegen/Makefile.am | 1 + codegen/check_dissector | 2 ++ codegen/out_channel.txt | 7 +++ codegen/test.proto | 15 +++ python_modules/dissector.py |

[Spice-devel] [PATCH v4 38/41] dissector: Test we don't override text handling other fields

2015-07-23 Thread Frediano Ziglio
Is possible the nested fields override text as text could be updated at the end of container. Check we don't do it and we correctly nest protocol items. Signed-off-by: Frediano Ziglio --- codegen/check_dissector | 1 + codegen/data_struct2| Bin 0 -> 9 bytes codegen/out_struct2.txt | 28 +

[Spice-devel] [PATCH v4 40/41] dissector: Allows to use bytes_count and bytes array length in dissector

2015-07-23 Thread Frediano Ziglio
Was not implemented. These attributes allows to specify length of other fields in bytes. Previously was possibly only to specify arrays length in number of elements. Signed-off-by: Frediano Ziglio --- python_modules/dissector.py | 64 + 1 file changed,

[Spice-devel] [PATCH v4 33/41] dissector: Add check on output strings

2015-07-23 Thread Frediano Ziglio
Make sure the generated dissector contains all strings from the protocol file. Signed-off-by: Frediano Ziglio --- codegen/Makefile.am | 2 +- codegen/check_strings | 33 + 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100755 codegen/check_string

[Spice-devel] [PATCH v4 34/41] codegen: Reuse enumarators constructor

2015-07-23 Thread Frediano Ziglio
EnumType.__init__ and FlagsType.__init__ was equivalents, merge into the base class EnumBaseType. Signed-off-by: Frediano Ziglio --- python_modules/ptypes.py | 87 1 file changed, 29 insertions(+), 58 deletions(-) diff --git a/python_modules/ptyp

[Spice-devel] [PATCH v4 14/41] dissector: Read values from primitive fields

2015-07-23 Thread Frediano Ziglio
Store into references for future usage. Signed-off-by: Frediano Ziglio --- python_modules/dissector.py | 32 1 file changed, 32 insertions(+) diff --git a/python_modules/dissector.py b/python_modules/dissector.py index 128e157..29b098a 100644 --- a/python_module

[Spice-devel] [PATCH v4 41/41] proto: Describe Quic image format from dissector

2015-07-23 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- spice.proto | 25 - 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/spice.proto b/spice.proto index 880a8be..270464f 100644 --- a/spice.proto +++ b/spice.proto @@ -687,6 +687,29 @@ struct Surface { uint32 surface_id; }

[Spice-devel] [PATCH v4 37/41] proto: Improve agent dissectors

2015-07-23 Thread Frediano Ziglio
Before was dump as raw data Signed-off-by: Frediano Ziglio --- spice.proto | 128 1 file changed, 120 insertions(+), 8 deletions(-) diff --git a/spice.proto b/spice.proto index fe0eb34..880a8be 100644 --- a/spice.proto +++ b/spice.pro

[Spice-devel] [PATCH v4 10/41] dissector: Change code generated index type

2015-07-23 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- python_modules/dissector.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python_modules/dissector.py b/python_modules/dissector.py index b93b9ce..ea13033 100644 --- a/python_modules/dissector.py +++ b/python_modules/dissector.py @@ -239,6 +239,8 @@ def

[Spice-devel] [PATCH v4 31/41] dissector: Test decorated array

2015-07-23 Thread Frediano Ziglio
Try to test possible combinations of different attributes with arrays to make sure output is what is expected. Signed-off-by: Frediano Ziglio --- codegen/out_array_primitive.txt | 109 + codegen/out_array_raw.txt | 12 +++- codegen/out_array_struct.txt|

[Spice-devel] [PATCH v4 32/41] dissector: Add some format checks with arrays

2015-07-23 Thread Frediano Ziglio
Check different format or small arrays formatting. Is possible to omit to have a tree and dump just the elements. This is useful for small arrays or if is possible to format all the item (for instance having a small structure) in a single line. Signed-off-by: Frediano Ziglio --- codegen/Makefile

[Spice-devel] [PATCH v4 28/41] dissector: Allows to have two type with different size to point to same field name

2015-07-23 Thread Frediano Ziglio
This is used sometimes to make possible to specify a wireshark filter. Let say for instance that an initial size of a specific id is 16 bit. Then on a later version new messages are added were the id to the same type is added as 32 bit. Allowing different sizes on the same field name (for instance

[Spice-devel] [PATCH v4 21/41] dissector: Handle switches

2015-07-23 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- python_modules/dissector.py | 41 - 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/python_modules/dissector.py b/python_modules/dissector.py index e435203..2d96283 100644 --- a/python_modules/dissector.py ++

[Spice-devel] [PATCH v4 04/41] dissector: Decorate writer class to make easier ifdef/endif handling

2015-07-23 Thread Frediano Ziglio
I'm generating code for dissector from demarshaller. Make simple to hangle ifdef/endif not having to check manually attribute. Signed-off-by: Frediano Ziglio --- python_modules/dissector.py | 21 + 1 file changed, 21 insertions(+) diff --git a/python_modules/dissector.py b/p

[Spice-devel] [PATCH v4 16/41] dissector: Add code to read input from a file (or stdin)

2015-07-23 Thread Frediano Ziglio
This allows to emulate reading from network Signed-off-by: Frediano Ziglio --- codegen/check_dissector | 4 ++-- codegen/dissector_test.c | 32 +--- 2 files changed, 31 insertions(+), 5 deletions(-) diff --git a/codegen/check_dissector b/codegen/check_dissector ind

[Spice-devel] [PATCH v4 00/41] Implements partial wireshark dissector from protocol specifications

2015-07-23 Thread Frediano Ziglio
As we have a file to specify the protocol and as is hard to align wireshark dissector for each change we made I'm trying to do part of this job to a code generator. The idea is to have the dissector split in two part, one hand written and the other automatic. I tested that changing the code and p

[Spice-devel] [PATCH v4 01/41] dissector: Start adding code to generate wireshark dissector

2015-07-23 Thread Frediano Ziglio
Added a stub dissector.py code. Added file to Makefiles. Add option to call dissector and code to call it. Signed-off-by: Frediano Ziglio --- common/Makefile.am | 1 + python_modules/Makefile.am | 1 + python_modules/dissector.py | 14 ++ spice_codegen.py| 17

[Spice-devel] [PATCH v4 02/41] dissector: Generate some definition for dissector

2015-07-23 Thread Frediano Ziglio
Generate global definitions. Generate function to registers various dissector components. For the moment the field array is empty but we save some global to be able to register new ones. Add a base test for generated dissector. Signed-off-by: Frediano Ziglio --- Makefile.am | 2

Re: [Spice-devel] [PATCH v3 16/51] Allows to specify some new attributes for wireshark

2015-07-23 Thread Frediano Ziglio
> On Thu, Jul 23, 2015 at 11:15:14AM -0400, Frediano Ziglio wrote: > > > On Thu, Jul 23, 2015 at 10:49:58AM -0400, Frediano Ziglio wrote: > > > > > > > > > > On Tue, Jul 21, 2015 at 05:45:46PM +0100, Frediano Ziglio wrote: > > > > > > To make output more useful fields from the protocol should have

Re: [Spice-devel] [PATCH v3 16/51] Allows to specify some new attributes for wireshark

2015-07-23 Thread Frediano Ziglio
> On Thu, Jul 23, 2015 at 10:49:58AM -0400, Frediano Ziglio wrote: > > > > > > On Tue, Jul 21, 2015 at 05:45:46PM +0100, Frediano Ziglio wrote: > > > > To make output more useful fields from the protocol should have > > > > additional information like description, name, type and so on. > > > > >

[Spice-devel] [spice-common 2/2] proto: Use proper type for preferred_compression field

2015-07-23 Thread Christophe Fergeau
No need to use an uint8 typed member, we can directly use the appropriate enum8 type here, which makes everything more explicit. --- spice.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spice.proto b/spice.proto index db015a5..3bca900 100644 --- a/spice.proto +++ b/spice

Re: [Spice-devel] [PATCH v3 16/51] Allows to specify some new attributes for wireshark

2015-07-23 Thread Christophe Fergeau
On Thu, Jul 23, 2015 at 10:49:58AM -0400, Frediano Ziglio wrote: > > > > On Tue, Jul 21, 2015 at 05:45:46PM +0100, Frediano Ziglio wrote: > > > To make output more useful fields from the protocol should have > > > additional information like description, name, type and so on. > > > > > > List of

Re: [Spice-devel] [PATCH v3 16/51] Allows to specify some new attributes for wireshark

2015-07-23 Thread Frediano Ziglio
> > On Tue, Jul 21, 2015 at 05:45:46PM +0100, Frediano Ziglio wrote: > > To make output more useful fields from the protocol should have > > additional information like description, name, type and so on. > > > > List of attributes added: > > - ws_desc, just a simple description > > - ws_name name

[Spice-devel] [PATCH] Adjust to new SpiceImageCompress name

2015-07-23 Thread Christophe Fergeau
This has been renamed to SpiceImageCompression in order to avoid clashes with older spice-server in the SPICE_IMAGE_COMPRESS_ namespace. This commit is a straight rename of SpiceImageCompress to SpiceImageCompression and SPICE_IMAGE_COMPRESS_ to SPICE_IMAGE_COMPRESSION_ --- server/red_dispatcher.c

[Spice-devel] [spice-common 1/2] proto: Rename image_compress to image_compression

2015-07-23 Thread Christophe Fergeau
Re-using the SPICE_IMAGE_COMPRESS_ prefix in newer spice-protocol releases is going to cause issues as there will be clashing enum members in older spice-server releases. Using SPICE_IMAGE_COMPRESSION_ as a prefix sidesteps these backward compability issues. --- spice.proto | 2 +- 1 file changed,

[Spice-devel] [spice-protocol] Rename SpiceImageCompress constants

2015-07-23 Thread Christophe Fergeau
Having these constants use the same name as the ones in spice-server 0.12.5 causes compilation issues for spice-server users when using spice-server 0.12.5 or older, and spice-protocol 0.12.8. --- spice/enums.h | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --

Re: [Spice-devel] [PATCH v3 28/51] show primitive as primitive

2015-07-23 Thread Frediano Ziglio
> On Tue, Jul 21, 2015 at 05:45:58PM +0100, Frediano Ziglio wrote: > > --- > > python_modules/dissector.py | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/python_modules/dissector.py b/python_modules/dissector.py > > index 413aca4..a7add96 100644 > > --- a/python_mo

Re: [Spice-devel] [PATCH v3 16/51] Allows to specify some new attributes for wireshark

2015-07-23 Thread Christophe Fergeau
On Tue, Jul 21, 2015 at 05:45:46PM +0100, Frediano Ziglio wrote: > To make output more useful fields from the protocol should have > additional information like description, name, type and so on. > > List of attributes added: > - ws_desc, just a simple description > - ws_name name of the field. Se

Re: [Spice-devel] [PATCH v3 47/51] Improve agent dissectors

2015-07-23 Thread Frediano Ziglio
> > Hey, > > Not fully sure about adding data to spice.proto which is exclusively > used by the dissector, could get a bit confusing. Do you have any idea > if these new protocol bits could be used by spice-gtk/spice-server for > agent message parsing, or will it always be limited to wireshark u

Re: [Spice-devel] [PATCH v3 47/51] Improve agent dissectors

2015-07-23 Thread Christophe Fergeau
Hey, Not fully sure about adding data to spice.proto which is exclusively used by the dissector, could get a bit confusing. Do you have any idea if these new protocol bits could be used by spice-gtk/spice-server for agent message parsing, or will it always be limited to wireshark use for some reas

Re: [Spice-devel] [PATCH v3 38/51] Use a class to register wireshark fields

2015-07-23 Thread Frediano Ziglio
> > On Tue, Jul 21, 2015 at 05:46:08PM +0100, Frediano Ziglio wrote: > > Allow to reuse code and check better if field was already registered > > > > Signed-off-by: Frediano Ziglio > > --- > > python_modules/dissector.py | 58 > > + > > 1 file change

Re: [Spice-devel] [PATCH v3 45/51] Allows to specify wireshark name for enumerators

2015-07-23 Thread Christophe Fergeau
On Tue, Jul 21, 2015 at 05:46:15PM +0100, Frediano Ziglio wrote: > Signed-off-by: Frediano Ziglio > --- > python_modules/dissector.py| 2 +- > python_modules/ptypes.py | 91 > +++--- > python_modules/spice_parser.py | 2 +- > 3 files changed, 35 in

Re: [Spice-devel] [PATCH v3 41/51] Handle text formatting of different elements

2015-07-23 Thread Christophe Fergeau
On Thu, Jul 23, 2015 at 08:07:32AM -0400, Frediano Ziglio wrote: > Support ws_txt and ws_txt_n attributes. > These attributes are there to allow to set specific text to different > elements. 'on different elements' ? > The can be used to output in a single line the features of a structure. 'They

Re: [Spice-devel] [PATCH v3 40/51] Handle flags

2015-07-23 Thread Christophe Fergeau
On Tue, Jul 21, 2015 at 05:46:10PM +0100, Frediano Ziglio wrote: > Instead of only show the hexadecimal value show all bits. 'Instead of only showing the hexadecimal value, show all bits' It might also be worth being more explicit what you mean by 'show all bits'? The symbolic flag value rather th

Re: [Spice-devel] [PATCH v3 39/51] Allows to have two type with different size to point to same field name

2015-07-23 Thread Christophe Fergeau
Can you add a short "why ?" explanation to the commit log ? On Tue, Jul 21, 2015 at 05:46:09PM +0100, Frediano Ziglio wrote: > Signed-off-by: Frediano Ziglio > --- > python_modules/dissector.py | 14 +++--- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/python_modul

Re: [Spice-devel] [PATCH v3 38/51] Use a class to register wireshark fields

2015-07-23 Thread Christophe Fergeau
On Tue, Jul 21, 2015 at 05:46:08PM +0100, Frediano Ziglio wrote: > Allow to reuse code and check better if field was already registered > > Signed-off-by: Frediano Ziglio > --- > python_modules/dissector.py | 58 > + > 1 file changed, 48 insertions(+)

Re: [Spice-devel] [PATCH v3 36/51] Allow to override default values generated for the fields

2015-07-23 Thread Christophe Fergeau
On Tue, Jul 21, 2015 at 05:46:06PM +0100, Frediano Ziglio wrote: > ws_type override the type (BOOLEAN -> FT_BOOLEAN). > ws_base override the base (DEC -> BASE_HEX). > ws_desc override the description. 'overrides' > ws allow to specify description and name for wireshark. Name is 'allows' > impor

Re: [Spice-devel] [PATCH v3 33/51] Implement ws_inline attribute

2015-07-23 Thread Christophe Fergeau
On Tue, Jul 21, 2015 at 05:46:03PM +0100, Frediano Ziglio wrote: > This attribute allow structure to be aligned instead of be contained 'allows the structure parsing code to be inlined instead of being contained ...' ? > in a separate function. > This is helpful as variable are declared in the

Re: [Spice-devel] [PATCH v3 30/51] Generate code to output parse structure

2015-07-23 Thread Christophe Fergeau
I'm not sure how to parse "to output parse structure", "to output structure parsing code" ? Christophe On Tue, Jul 21, 2015 at 05:46:00PM +0100, Frediano Ziglio wrote: > Write a function and call it to be able to reuse it. > > Signed-off-by: Frediano Ziglio > --- > codegen/Makefile.am

Re: [Spice-devel] [PATCH v3 27/51] Handle base fields

2015-07-23 Thread Christophe Fergeau
On Tue, Jul 21, 2015 at 05:45:57PM +0100, Frediano Ziglio wrote: > Add fields to base tree (so basically there is no tree). > Names is now generated from container + member name. > The check for duplicate is not that strong, should check if same field > is defined with same attributes. > > Signed-

Re: [Spice-devel] [PATCH v3 28/51] show primitive as primitive

2015-07-23 Thread Christophe Fergeau
On Tue, Jul 21, 2015 at 05:45:58PM +0100, Frediano Ziglio wrote: > --- > python_modules/dissector.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/python_modules/dissector.py b/python_modules/dissector.py > index 413aca4..a7add96 100644 > --- a/python_modules/dissector.

Re: [Spice-devel] [PATCH v3 26/51] test: Add code to read input from a file (or stdin)

2015-07-23 Thread Christophe Fergeau
On Tue, Jul 21, 2015 at 05:45:56PM +0100, Frediano Ziglio wrote: > This allow to emulate reading from network 'allows' > @@ -540,10 +551,25 @@ int main(int argc, char **argv) > hfs = g_ptr_array_new_with_free_func(free); > spice_register_fields(1, NULL); > > + /* read message fr

Re: [Spice-devel] [PATCH v3 23/51] Write function to write members

2015-07-23 Thread Christophe Fergeau
On Tue, Jul 21, 2015 at 05:45:53PM +0100, Frediano Ziglio wrote: > Check members are all of a giver type and call stubs for each type. 'given' > > Signed-off-by: Frediano Ziglio > --- > python_modules/dissector.py | 50 > +++-- > 1 file changed, 48 inse

Re: [Spice-devel] [PATCH v3 15/51] Generate scheleton for messages and channels

2015-07-23 Thread Christophe Fergeau
'skeleton' in the subject. On Tue, Jul 21, 2015 at 05:45:45PM +0100, Frediano Ziglio wrote: > Messages are not generated as stub. > Code partially from demarshaller. > > Signed-off-by: Frediano Ziglio > --- > codegen/Makefile.am | 3 +- > codegen/check_dissector | 13 + > cod

Re: [Spice-devel] [PATCH v3 21/51] Add code to handle destination variable

2015-07-23 Thread Christophe Fergeau
On Tue, Jul 21, 2015 at 05:45:51PM +0100, Frediano Ziglio wrote: > Add some classes to be able to store retrieved data from structure > and messages. > The idea is to generate code dynamically when variable are readed. 'are read' > > Signed-off-by: Frediano Ziglio > --- > python_modules/dissec

Re: [Spice-devel] [PATCH v3 13/51] Add new_ett function to be able to create new trees

2015-07-23 Thread Christophe Fergeau
On Tue, Jul 21, 2015 at 05:45:43PM +0100, Frediano Ziglio wrote: > Use an array to declare tree items instead of allocating it statically. > This save a bit of memory and it also generate smaller code to read. 'generates' > A tree in wireshark represent an item which could be expanded. 'represen

Re: [Spice-devel] [PATCH v3 18/51] Allows to specify attributes for array items and pointers

2015-07-23 Thread Christophe Fergeau
Hey, Can you prefix all your commits with either dissector: or codegen: ? dissector: if it touches dissector.py or the tests in codegen/, and codegen: if it touches python_modules.py? (and when it touches both, make it 'dissector:'). On Tue, Jul 21, 2015 at 05:45:48PM +0100, Frediano Ziglio wrote

Re: [Spice-devel] [PATCH v3 41/51] Handle text formatting of different elements

2015-07-23 Thread Frediano Ziglio
Support ws_txt and ws_txt_n attributes. These attributes are there to allow to set specific text to different elements. The can be used to output in a single line the features of a structure. Or they can be used to format small array items. They can applied to almost everything from primitives, arr

Re: [Spice-devel] [PATCH v3 14/51] Decorate writer class to make easier ifdef/endif handling

2015-07-23 Thread Frediano Ziglio
I'm generating code for dissector from demarshaller. Make simple to hangle ifdef/endif not having to check manually attribute. Signed-off-by: Frediano Ziglio --- python_modules/dissector.py | 21 + 1 file changed, 21 insertions(+) Changed: - compatibility for Python 3 diff

Re: [Spice-devel] jpeg problem

2015-07-23 Thread Victor Toso
Hi, On Wed, Jul 22, 2015 at 04:14:23PM +0800, 乱舞 wrote: > hi,all: > When I transport images with jpeg in spice to reduce bandwidth. > i modify the spice-server red_worker.c > > worker->jpeg_state = SPICE_WAN_COMPRESSION_ALWAYS; > it worked, but caused some image visual problems, > if use

Re: [Spice-devel] [PATCH v3 10/51] codegen: Allows to specify C type for index variable

2015-07-23 Thread Christophe Fergeau
Hey, I've pushed these patches up to this point. Christophe On Tue, Jul 21, 2015 at 05:45:40PM +0100, Frediano Ziglio wrote: > This to prepare to generate wireshark dissector which use > glib types instead of new C ones (for compatibility with some > compiler). > > Signed-off-by: Frediano Zigli

Re: [Spice-devel] [PATCH v2 14/43] Decorate writer class to make easier ifdef/endif handling

2015-07-23 Thread Christophe Fergeau
On Thu, Jul 23, 2015 at 10:41:52AM +0200, Christophe Fergeau wrote: > On Wed, Jul 08, 2015 at 02:53:47PM +0100, Frediano Ziglio wrote: > > I'm generating code for dissector from demarshaller. > > Make simple to hangle ifdef/endif not having to check manually attribute. > > > > Signed-off-by: Fred

Re: [Spice-devel] [PATCH v2 14/43] Decorate writer class to make easier ifdef/endif handling

2015-07-23 Thread Christophe Fergeau
On Wed, Jul 08, 2015 at 02:53:47PM +0100, Frediano Ziglio wrote: > I'm generating code for dissector from demarshaller. > Make simple to hangle ifdef/endif not having to check manually attribute. > > Signed-off-by: Frediano Ziglio > --- > python_modules/dissector.py | 18 ++ > 1

Re: [Spice-devel] [RFC PATCH 1/1] Add a usbredir kernel module to remotely connect USB devices over IP.

2015-07-23 Thread Sean O. Stalley
On Wed, Jul 22, 2015 at 11:55:32AM -0500, Jeremy White wrote: > I privately wrote to the Intel authors of that patch a week ago; I've > publicly included them in this thread as well. As far as I can tell, > they've been silent on this front since November; I fear that they may > have moved on, or