3 Copyright (C) 2001 Frank Singleton <frank.singleton@ericsson.com>
9 As you have probably guessed from the name, "idl2eth" 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 an ethereal dissector.
14 idl2eth 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.idl2eth - This document
21 ethereal_be.py - The main compiler backend
22 ethereal_gen.py - A helper class, that generates the C code.
23 idl2eth - 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 "Ethereal" (http://www.ethereal.com)
46 To use the idl2eth to generate ethereal dissectors, you
50 1. Python must be installed
53 2. omniidl from the the omniORB package must be available.
54 http://omniorb.sourceforge.net/
56 3 Of course you need ethereal installed to compile the
57 code an tweak it if required. idl2eth is part of the
58 standard Ethereal distribution
64 1. To write the C code to stdout.
66 idl2eth <your file.idl>
71 2. To write to a file, just redirect the output.
73 idl2eth 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 dont want to use the shell script wrapper, then try
82 3. To write the C code to stdout.
84 Usage: omniidl -p ./ -b ethereal_be <your file.idl>
86 eg: omniidl -p ./ -b ethereal_be echo.idl
89 4. To write to a file, just redirect the output.
91 omniidl -p ./ -b ethereal_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 ethereal src directory, edit the 2 make files
98 to include the packet-test-idl.c
100 cp packet-test-idl.c /dir/where/ethereal/lives/
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 ethereal_be.py
134 and ethereal_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/