Ethereal User's Guide: V1.1 for Ethereal 0.8.19 | ||
---|---|---|
<<< Previous | Related tools | Next >>> |
In an ideal world idl2eth would be mentioned in the users guide in passing and documented in the developers guide. As the developers guide has not yet been completed it will be documented here.
As you have probably guessed from the name, idl2eth takes a user specified IDL file and attempts to build a dissector that can decode the IDL traffic over GIOP. The resulting file is "C" code, that should compile okay as an ethereal dissector.
idl2ethbasically parses the data struct given to it by the omniidl compiler, and using the GIOP API available in packet-giop.[ch], generates get_CDR_xxx calls to decode the CORBA traffic on the wire.
It consists of 4 main files.
This document
The main compiler backend
A helper class, that generates the C code.
A simple shell script wrapper that the end user should use to generate the dissector from the IDL file(s).
It is important to understand how CORBA traffic looks like over GIOP/IIOP, and to help build a tool that can assist in troubleshooting CORBA interworking. This was especially the case after seeing a lot of discussions about how particular IDL types are represented inside an octet stream.
I have also had comments/feedback that this tool would be good for say a CORBA class when teaching students how CORBA traffic looks like "on the wire".
It is also COOL to work on a great Open Source project such as the case with "Ethereal" (http://www.ethereal.com)
To use the idl2eth to generate ethereal dissectors, you need the following:
Prerequisites to using idl2eth
Python must be installed. See http://python.org/
omniidl from the the omniORB package must be available. http://www.uk.research.att.com/omniORB/omniORB.html
Of course you need ethereal installed to compile the code an tweak it if required. idl2eth is part of the standard Ethereal distribution
To use idl2eth to generate an ethereal dissector from an idl file use the following proceedure:
Proceedure for converting a Corba idl file into an ethereal dissector
To write the C code to stdout.
idl2eth <your file.idl> |
idl2eth echo.idl |
To write to a file, just redirect the output.
idl2eth echo.idl > packet-test-idl.c |
If you dont want to use the shell script wrapper, then try steps 3 or 4 instead.
To write the C code to stdout.
Usage: omniidl -p ./ -b ethereal_be <your file.idl> |
omniidl -p ./ -b ethereal_be echo.idl |
To write to a file, just redirect the output.
omniidl -p ./ -b ethereal_be echo.idl > packet-test-idl.c |
Copy the resulting C code to your ethereal src directory, edit the 2 make files to include the packet-test-idl.c
cp packet-test-idl.c /dir/where/ethereal/lives/ edit Makefile.am edit Makefile.nmake |
Run configure
./configure (or ./autogen.sh) |
Compile the code
make |
Good Luck !!
Exception code not generated (yet), but can be added manually.
Enums not converted to symbolic values (yet), but can be added manually.
Add command line options etc
More I am sure :-)
See the TODO list inside packet-giop.c
The "-p ./" option passed to omniidl indicates that the ethereal_be.py and ethereal_gen.py are residing in the current directory. This may need tweaking if you place these files somewhere else.
If it complains about being unable to find some modules (eg tempfile.py), you may want to check if PYTHONPATH is set correctly. On my Linux box, it is PYTHONPATH=/usr/lib/python1.5/
<<< Previous | Home | Next >>> |
Converting ASCII hexdumps to network captures with text2pcap | Up | Ethereal Display Filter Fields |