[PATCH] nodiscriminant support for pidl wireshark.pm

Julien Kerihuel j.kerihuel at openchange.org
Thu Jan 14 07:09:37 MST 2010


Hi List,

This one is pidl only, so probably better fits here ;-)

One of the first issue I encountered while working on the MAPI dissector
using PIDL is that OpenChange is widely using nodiscriminant unions.
These kind of unions are not NDR compatible and logically not supported
in the existing ws-parser.

This patch implements support for nodiscriminant union in pidl only and
generates code wireshark compiles properly + decode nicely.

Please note this patch has a limited scope:
- it does only work on elements within structures
- it does not deal with switch_is at different sublevels such as
switch_type(Type.my_switch_field) where Type is an element structure
- it assumes the switch_is is an element only with no additional code
such as switch_is(Type & 0xFF).

The overall logic behind the patch is to tag the needed elements with
keywords we next use to generate appropriate wireshark code. I couldn't
come up with a better approach so far.

The remaining TODO list can be applied in the future and won't
presumably require lot of work.

Further and detailed explanations including IDL snipset and generated
code are available within the docpatch folder on the openchange
dissector repository:

http://websvn.openchange.org/filedetails.php?repname=dissector&path=%
2Fpidl%2Fdocpatch%2F001_nodiscriminant_support.txt


Cheers,
Julien.

-- 
Julien Kerihuel
j.kerihuel at openchange.org
OpenChange Project Manager

GPG Fingerprint: 0B55 783D A781 6329 108A  B609 7EF6 FE11 A35F 1F79

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pidl_nodiscriminant_wireshark_support.diff
Type: text/x-patch
Size: 7092 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20100114/1db40fc0/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20100114/1db40fc0/attachment.pgp>


More information about the samba-technical mailing list