[PATCH 31/33] Allow to specify 'CHANNEL' as type

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

 



Type will be mapped to an enumerator containing all channel types.

Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
 python_modules/dissector.py | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/python_modules/dissector.py b/python_modules/dissector.py
index 5b14b92..edb8533 100644
--- a/python_modules/dissector.py
+++ b/python_modules/dissector.py
@@ -245,11 +245,15 @@ def write_wireshark_field(writer, container, member, t, tree, size, encoding='EN
     # override type
     ws_type = get_member_t_attr('ws_type')
     if ws_type:
-        f_type = 'FT_%s' % ws_type
-        if f_type == 'FT_BOOLEAN':
-            vals = 'TFS(&tfs_set_notset)'
-        base = 'BASE_NONE'
-        vals = 'NULL'
+        if ws_type == 'CHANNEL':
+            base = 'BASE_DEC'
+            vals = 'VALS(channel_types_vs)'
+        else:
+            f_type = 'FT_%s' % ws_type
+            if f_type == 'FT_BOOLEAN':
+                vals = 'TFS(&tfs_set_notset)'
+            base = 'BASE_NONE'
+            vals = 'NULL'
 
     # override base
     ws_base = get_member_t_attr('ws_base')
-- 
2.1.0

_______________________________________________
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]