aboutsummaryrefslogtreecommitdiffstats
path: root/tools/idl2wrs.sh.in
diff options
context:
space:
mode:
authorJörg Mayer <jmayer@loplof.de>2006-10-30 18:17:10 +0000
committerJörg Mayer <jmayer@loplof.de>2006-10-30 18:17:10 +0000
commit1069b24680de145e798688b15026770227f4a1b6 (patch)
tree71cf923e6e2a9c4f232f437206d4283de41122fa /tools/idl2wrs.sh.in
parent9a0a626449e9ea910127b0dc4f169e110afe8adb (diff)
carsten.prescher@eads.com:
Fix for http://bugs.wireshark.org/bugzilla/show_bug.cgi?id=1114 @SHELL@ not replaced in idl2wrs svn path=/trunk/; revision=19742
Diffstat (limited to 'tools/idl2wrs.sh.in')
-rw-r--r--tools/idl2wrs.sh.in87
1 files changed, 87 insertions, 0 deletions
diff --git a/tools/idl2wrs.sh.in b/tools/idl2wrs.sh.in
new file mode 100644
index 0000000000..9fa33ba0be
--- /dev/null
+++ b/tools/idl2wrs.sh.in
@@ -0,0 +1,87 @@
+#! @SHELL@
+#
+# $Id$
+#
+# File : idl2wrs
+#
+# Author : Frank Singleton (frank.singleton@ericsson.com)
+#
+# Copyright (C) 2001 Frank Singleton, Ericsson Inc.
+#
+# This file is a simple shell script wrapper for the IDL to
+# Wireshark dissector code.
+#
+# ie: wireshark_be.py and wireshark_gen.py
+#
+# This file is used to generate "Wireshark" dissectors from IDL descriptions.
+# The output language generated is "C". It will generate code to use the
+# GIOP/IIOP get_CDR_XXX API.
+#
+# Please see packet-giop.h in Wireshark distro for API description.
+# Wireshark is available at http://www.wireshark.org/
+#
+# Omniidl is part of the OmniOrb distribution, and is available at
+# http://omniorb.sourceforge.net/
+#
+# This program is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+#
+
+
+# Must at least supply an IDL file
+
+if [ $# -lt 1 ]; then
+ echo "idl2wrs Error: no IDL file specified."
+ echo "Usage: idl2wrs idl_file_name"
+ exit 1;
+fi
+
+#
+# Run wireshark backend, looking for wireshark_be.py and wireshark_gen.py
+# in pythons's "site-packages" directory. If cannot find that, then
+# try looking in current directory. If still cannot, then exit with
+# error.
+
+if [ -f $PYTHONPATH/site-packages/wireshark_be.py ] && [ -f $PYTHONPATH/site-packages/wireshark_gen.py ]; then
+ exec omniidl -p $PYTHONPATH/site-packages -b wireshark_be $@
+ /* not reached */
+fi
+
+# Try current directory.
+
+if [ -f ./wireshark_be.py ] && [ -f ./wireshark_gen.py ]; then
+ exec omniidl -p ./ -b wireshark_be $@
+ /* not reached */
+fi
+
+# Could not find both wireshark_be.py AND wireshark_gen.py
+# So let's just try to run it without -p, hoping that the installation
+# set up a valid path.
+
+exec omniidl -b wireshark_be $@
+
+old code: not reached
+
+echo "idl2wrs Error: Could not find both wireshark_be.py AND wireshark_gen.py."
+echo "Please ensure you have the PYTHONPATH variable set, or that wireshark_be.py "
+echo "and wireshark_gen.py exist in the current directory. "
+echo
+echo "On this system, PYTHONPATH is : $PYTHONPATH"
+echo
+
+exit 2
+
+
+