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
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
> > > > >
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
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
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
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;
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
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
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
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
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
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 +
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..
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
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
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/
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.
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
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
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
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
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
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
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
++
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
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(+),
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
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 |
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 +
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,
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
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
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
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;
}
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
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
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|
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
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
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
++
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
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
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
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
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
> 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
> 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.
> > > >
>
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
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
>
> 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
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
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,
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 --
> 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
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
>
> 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
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
>
> 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
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
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
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
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
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(+)
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
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
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
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-
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.
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
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
'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
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
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
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
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
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
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
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
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
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
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
81 matches
Mail list logo