3 # $Id: idl2eth.sh,v 1.1 2001/09/15 23:01:12 guy Exp $
7 # Author : Frank Singleton (frank.singleton@ericsson.com)
9 # Copyright (C) 2001 Frank Singleton, Ericsson Inc.
11 # This file is a simple shell script wrapper for the IDL to
12 # Ethereal dissector code.
14 # ie: ethereal_be.py and ethereal_gen.py
16 # This file is used to generate "Ethereal" dissectors from IDL descriptions.
17 # The output language generated is "C". It will generate code to use the
18 # GIOP/IIOP get_CDR_XXX API.
20 # Please see packet-giop.h in Ethereal distro for API description.
21 # Ethereal is available at http://www.ethereal.com/
23 # Omniidl is part of the OmniOrb distribution, and is available at
24 # http://www.uk.research.att.com/omniORB/omniORB.html
26 # This program is free software; you can redistribute it and/or modify it
27 # under the terms of the GNU General Public License as published by
28 # the Free Software Foundation; either version 2 of the License, or
29 # (at your option) any later version.
31 # This program is distributed in the hope that it will be useful,
32 # but WITHOUT ANY WARRANTY; without even the implied warranty of
33 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
34 # General Public License for more details.
36 # You should have received a copy of the GNU General Public License
37 # along with this program; if not, write to the Free Software
38 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
43 # Must at least supply an IDL file
46 echo "idl2eth Error: no IDL file specified."
47 echo "Usage: idl2eth idl_file_name"
52 # Run ethereal backend, looking for ethereal_be.py and ethereal_gen.py
53 # in pythons's "site-packages" directory. If cannot find that, then
54 # try looking in current directory. If still cannot, then exit with
57 if [ -f $PYTHONPATH/site-packages/ethereal_be.py ] && [ -f $PYTHONPATH/site-packages/ethereal_gen.py ]; then
58 omniidl -p $PYTHONPATH/site-packages -b ethereal_be $1
62 # Try current directory.
64 if [ -f ./ethereal_be.py ] && [ -f ./ethereal_gen.py ]; then
65 omniidl -p ./ -b ethereal_be $1
69 # Could not find both ethereal_be.py AND ethereal_gen.py
71 echo "idl2eth Error: Could not find both ethereal_be.py AND ethereal_gen.py."
72 echo "Please ensure you have the PYTHONPATH variable set, or that ethereal_be.py "
73 echo "and ethereal_gen.py exist in the current directory. "
75 echo "On this system, PYTHONPATH is : $PYTHONPATH"