3 Copyright (C) 2001 Frank Singleton <frank.singleton@ericsson.com>
9 As you have probably guessed from the name, "idl2wrs" takes a
10 user specified IDL file and attempts to build a dissector that
11 can decode the IDL traffic over GIOP. The resulting file is
12 "C" code that should compile okay as a wireshark dissector.
14 idl2wrs basically parses the data struct given to it by
15 the omniidl compiler, and using the GIOP API available in packet-giop.[ch],
16 generates get_CDR_xxx calls to decode the CORBA traffic on the wire.
18 It consists of 4 main files.
20 README.idl2wrs - This document
21 wireshark_be.py - The main compiler backend
22 wireshark_gen.py - A helper class that generates the C code.
23 idl2wrs - A simple shell script wrapper that the end user should
24 use to generate the dissector from the IDL file(s).
29 It is important to understand how CORBA traffic looks
30 like over GIOP/IIOP, and to help build a tool that can assist
31 in troubleshooting CORBA interworking. This was especially the
32 case after seeing a lot of discussions about how particular
33 IDL types are represented inside an octet stream.
35 I have also had comments/feedback that this tool would be good for say
36 a CORBA class when teaching students how CORBA traffic looks like
39 It is also COOL to work on a great Open Source project such as
40 the case with "Wireshark" (http://www.wireshark.org)
46 To use the idl2wrs to generate wireshark dissectors, you
50 1. Python must be installed
53 2. omniidl from the omniORB package must be available.
54 http://omniorb.sourceforge.net/
56 3. Of course you need wireshark installed to compile the
57 code and tweak it if required. idl2wrs is part of the
58 standard Wireshark distribution.
64 1. To write the C code to stdout.
66 idl2wrs <your_file.idl>
71 2. To write to a file, just redirect the output.
73 idl2wrs echo.idl > packet-test-idl.c
75 You may wish to comment out the register_giop_user_module() code
76 and that will leave you with heuristic dissection.
79 If you don't want to use the shell script wrapper, then try
82 3. To write the C code to stdout.
84 Usage: omniidl -p ./ -b wireshark_be <your_file.idl>
86 eg: omniidl -p ./ -b wireshark_be echo.idl
89 4. To write to a file, just redirect the output.
91 omniidl -p ./ -b wireshark_be echo.idl > packet-test-idl.c
93 You may wish to comment out the register_giop_user_module() code
94 and that will leave you with heuristic dissection.
97 5. Copy the resulting C code to your wireshark src directory, edit the
98 following files to include the packet-test-idl.c
100 cp packet-test-idl.c /dir/where/wireshark/lives/epan/dissectors/
101 edit epan/dissectors/Makefile.common
102 edit epan/CMakeLists.txt
106 ./configure (or ./autogen.sh)
118 1. Exception code not generated (yet), but can be added manually.
119 2. Enums not converted to symbolic values (yet), but can be added manually.
120 3. Add command line options, etc.
121 4. More I am sure :-)
127 See TODO list inside packet-giop.c
133 1. The "-p ./" option passed to omniidl indicates that the wireshark_be.py
134 and wireshark_gen.py are residing in the current directory. This may need
135 tweaking if you place these files somewhere else.
137 2. If it complains about being unable to find some modules (eg tempfile.py),
138 you may want to check if PYTHONPATH is set correctly.
139 On my Linux box, it is PYTHONPATH=/usr/lib/python1.5/