chiark / gitweb /
Rename ethereal -> wireshark.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 11 Dec 2006 13:15:02 +0000 (13:15 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 11 Dec 2006 13:15:02 +0000 (13:15 +0000)
Also make the plugin actually work.  Probably.  Involves messing with
the Debian packaging and search-and-replace on the build system mainly.

configure.in
debian/control
debian/rules
keyexch.c
wireshark/.gitignore [moved from ethereal/.gitignore with 100% similarity]
wireshark/Makefile.am [moved from ethereal/Makefile.am with 89% similarity]
wireshark/cap [moved from ethereal/cap with 100% similarity]
wireshark/packet-tripe.c [moved from ethereal/packet-tripe.c with 97% similarity]

index 690c1934e37bfea8bda73ccb2641df91c0db6442..522ed65692943153bea7910b170f06bc1b6f2bed 100644 (file)
@@ -97,16 +97,16 @@ AC_ARG_WITH([logfile],
 [logfile=tripe.log])
 
 DIRS=""
-ETHEREAL_CFLAGS=""
-ETHEREAL_PLUGIN_DIR="unknown"
-AC_ARG_WITH([ethereal],
-[  --with-ethereal         build and install Ethereal plugin],
+WIRESHARK_CFLAGS=""
+WIRESHARK_PLUGIN_DIR="unknown"
+AC_ARG_WITH([wireshark],
+[  --with-wireshark         build and install Wireshark plugin],
 [case "$withval" in
-   no) ethereal=false requireethereal=false;;
-   yes) ethereal=true; requireethereal=true;;
-   *) ethereal=true requireethereal=true ETHEREAL_PLUGIN_DIR=$withval;;
+   no) wireshark=false requirewireshark=false;;
+   yes) wireshark=true; requirewireshark=true;;
+   *) wireshark=true requirewireshark=true WIRESHARK_PLUGIN_DIR=$withval;;
 esac],
-[ethereal=true requireethereal=false])
+[wireshark=true requirewireshark=false])
 
 tun=auto
 AC_ARG_WITH([tunnel],
@@ -160,83 +160,83 @@ AC_DEFINE_UNQUOTED([TUN_LIST], [$tunnels 0],
 mdw_MLIB(2.0.0)
 mdw_CATACOMB(2.1.0, [CFLAGS="$CFLAGS $CATACOMB_CFLAGS"])
 
-if test "$ethereal" = true -a "$ETHEREAL_PLUGIN_DIR" = unknown; then
-  AC_CACHE_CHECK([where to put Ethereal plugins], 
-    [mdw_cv_ethereal_plugin_dir], [
+if test "$wireshark" = true -a "$WIRESHARK_PLUGIN_DIR" = unknown; then
+  AC_CACHE_CHECK([where to put Wireshark plugins], 
+    [mdw_cv_wireshark_plugin_dir], [
     changequote(,)
-    mdw_cv_ethereal_plugin_dir="failed"
-    ethprefix=none
+    mdw_cv_wireshark_plugin_dir="failed"
+    wsprefix=none
     for i in "${prefix}" /usr/local /usr `echo $PATH | tr : " "`; do
-      if test -x "$i/bin/tethereal"; then
-        ethprefix=$i
+      if test -x "$i/bin/tshark"; then
+        wsprefix=$i
         break
       fi
     done
-    if test "$ethprefix" != none; then
-      ethbin=$ethprefix/bin/tethereal
-      ethver=`$ethbin -v | sed 's/^[^ ]* \([0-9A-Za-z.]*\).*$/\1/;q'`
-      dir=$ethprefix/lib/ethereal/plugins/$ethver
+    if test "$wsprefix" != none; then
+      wsbin=$wsprefix/bin/tshark
+      wsver=`$wsbin -v | sed 's/^[^ ]* \([0-9A-Za-z.]*\).*$/\1/;q'`
+      dir=$wsprefix/lib/wireshark/plugins/$wsver
       if test -d "$dir"; then
-        mdw_cv_ethereal_plugin_dir=$dir
+        mdw_cv_wireshark_plugin_dir=$dir
       fi
     fi
     changequote([, ])
   ])
-  case $mdw_cv_ethereal_plugin_dir in
-    failed) ethereal=false;;
-    *) ETHEREAL_PLUGIN_DIR=$mdw_cv_ethereal_plugin_dir;;
+  case $mdw_cv_wireshark_plugin_dir in
+    failed) wireshark=false;;
+    *) WIRESHARK_PLUGIN_DIR=$mdw_cv_wireshark_plugin_dir;;
   esac
 fi
 
-if test "$ethereal" = true; then
-  AM_PATH_GLIB([1.2.0], [], ethereal=false, [gmodule])
+if test "$wireshark" = true; then
+  AM_PATH_GLIB([1.2.0], [], wireshark=false, [gmodule])
 fi
-if test "$ethereal" = true; then
+if test "$wireshark" = true; then
   bad=true
   mdw_CFLAGS=$CFLAGS
-  ethprefix=`echo $ETHEREAL_PLUGIN_DIR | sed 's:/lib/.*$::'`
-  AC_CACHE_CHECK([how to find the Ethereal headers], 
-    [mdw_cv_ethereal_includes], [
-    mdw_cv_ethereal_includes=failed
+  wsprefix=`echo $WIRESHARK_PLUGIN_DIR | sed 's:/lib/.*$::'`
+  AC_CACHE_CHECK([how to find the Wireshark headers], 
+    [mdw_cv_wireshark_includes], [
+    mdw_cv_wireshark_includes=failed
     for i in \
        "" \
-       "-I${ethprefix}/include/ethereal" \
-       "-I${ethprefix}/include" \
-       "-I${prefix}/include/ethereal" \
+       "-I${wsprefix}/include/wireshark" \
+       "-I${wsprefix}/include" \
+       "-I${prefix}/include/wireshark" \
        "-I${prefix}/include" \
-       "-I/usr/include/ethereal" \
-       "-I/usr/local/include/ethereal" \
+       "-I/usr/include/wireshark" \
+       "-I/usr/local/include/wireshark" \
        "-I/usr/local/include"; do
       CFLAGS="$GLIB_CFLAGS $i"
       AC_TRY_COMPILE([
 #include <netinet/in.h>
 #include <glib.h>
-#include <ethereal/config.h>
-#include <ethereal/epan/packet.h>
+#include <wireshark/config.h>
+#include <wireshark/epan/packet.h>
 ], [
        dissector_handle_t dh;
        dh = create_dissector_handle(0, 0);
       ], [bad=false; break])
     done
     if test $bad = false; then
-      mdw_cv_ethereal_includes=$i
+      mdw_cv_wireshark_includes=$i
     fi
     CFLAGS=$mdw_CFLAGS
   ])
-  case $mdw_cv_ethereal_includes in
-    failed) ethereal=false;;
+  case $mdw_cv_wireshark_includes in
+    failed) wireshark=false;;
   esac  
 fi
 
-if test "$ethereal" = true; then
-  ETHEREAL_CFLAGS="$CFLAGS $GLIB_CFLAGS $mdw_cv_ethereal_includes"
-  AC_SUBST(ETHEREAL_CFLAGS)
-  AC_SUBST(ETHEREAL_PLUGIN_DIR)
-  DIRS="$DIRS ethereal"
+if test "$wireshark" = true; then
+  WIRESHARK_CFLAGS="$CFLAGS $GLIB_CFLAGS $mdw_cv_wireshark_includes"
+  AC_SUBST(WIRESHARK_CFLAGS)
+  AC_SUBST(WIRESHARK_PLUGIN_DIR)
+  DIRS="$DIRS wireshark"
 fi
 
-if test "$ethereal" = false -a "$requireethereal" = true; then
-  AC_MSG_ERROR([failed to configure Ethereal plugin])
+if test "$wireshark" = false -a "$requirewireshark" = true; then
+  AC_MSG_ERROR([failed to configure Wireshark plugin])
 fi
 
 AH_TEMPLATE([CONFIGDIR],
@@ -251,7 +251,7 @@ mdw_DEFINE_PATHS([
 ])
 AC_SUBST(DIRS)
 AC_OUTPUT( \
-       Makefile doc/Makefile ethereal/Makefile \
+       Makefile doc/Makefile wireshark/Makefile \
        tripe-init tripe-keys tripemon)
 
 dnl ----- That's all, folks -------------------------------------------------
index 60caf64f1f6c81cd7cbeb649814b5dc7b9caa2b7..f4679cc4c65ab0abe71535cb22ff738447c4cb2d 100644 (file)
@@ -3,7 +3,7 @@ Section: net
 Priority: extra
 Maintainer: Mark Wooding <mdw@distorted.org.uk>
 Build-Depends: catacomb-dev (>= 2.1.0), mlib-dev (>= 2.0.3),
- tethereal, ethereal-dev (>= 0.10.10), debhelper (>= 4.0.2)
+ tshark, wireshark-dev (>= 0.10.10), debhelper (>= 4.0.2)
 Standards-Version: 3.1.1
 
 Package: tripe
@@ -27,16 +27,28 @@ Description: Forward UDP packets over a stream
  Pkstream is a simple program which transmits and receives UDP datagrams
  over a reliable stream.  By default, it will send and receive the
  packets on standard input and output; it also natively understands TCP
- sockets.  Anything else can probably be fudged up with port forwarder.
+ sockets.  Anything else can probably be fudged up with port forwarder.
 
-Package: tripe-ethereal
+Package: tripe-wireshark
 Architecture: any
-Depends: ${shlibs:Depends}, ethereal-common (= ${tripe:Ethereal-Version})
+Depends: ${shlibs:Depends}, wireshark-common (= ${tripe:Wireshark-Version})
+Description: Trivial IP Encryption: a simple virtual private network
+ TrIPE is a simple VPN protocol.  It uses cryptography to ensure secrecy
+ and authenticity of packets it sends and receives.
+ .
+ This package contains the protocol analysis plug-in for Wireshark (the new
+ name for Ethereal).
+
+Package: tripe-ethereal
+Architecture: all
+Depends: tripe-wireshark
 Description: Trivial IP Encryption: a simple virtual private network
  TrIPE is a simple VPN protocol.  It uses cryptography to ensure secrecy
  and authenticity of packets it sends and receives.
  .
- This package contains the protocol analysis plug-in for Ethereal.
+ This is a dummy package to ease the transition to tripe-wireshark (since
+ Wireshark is apparently the new name for Ethereal).  You should probably
+ remove this package.
 
 Package: tripemon
 Architecture: all
index 7b94252d663f088d43d950a8825d250a1222cd60..31ef2954caab2b58dc9c2231101f8e1ceb66eb88 100755 (executable)
@@ -13,7 +13,7 @@ build:
                --with-logfile=/var/log/tripe.log \
                --with-pidfile=/var/run/tripectl.pid \
                --with-initconfig=/etc/default/tripe \
-               --with-ethereal
+               --with-wireshark
        make -C deb-build
        touch build
 
@@ -53,10 +53,11 @@ install: build
        mkdir -p debian/pkstream/usr/share/man/man1
        mv debian/tripe/usr/share/man/man1/pkstream.1 \
                debian/pkstream/usr/share/man/man1
-       mkdir -p debian/tripe-ethereal/usr/lib
-       mv debian/tripe/usr/lib/ethereal debian/tripe-ethereal/usr/lib
-       rm -f debian/tripe-ethereal/usr/lib/ethereal/plugins/*/*.a
+       mkdir -p debian/tripe-wireshark/usr/lib
+       mv debian/tripe/usr/lib/wireshark debian/tripe-wireshark/usr/lib
+       rm -f debian/tripe-wireshark/usr/lib/wireshark/plugins/*/*.a
        rmdir debian/tripe/usr/lib
+       mkdir -p debian/tripe-ethereal
 
 binary-indep: install
        dh_testdir -i
@@ -71,9 +72,9 @@ binary-indep: install
        dh_builddeb -i
 
 binary-arch: install
-       dpkg --status ethereal | \
-               sed -n 's/^Version: */tripe:Ethereal-Version=/p' \
-               >> debian/tripe-ethereal.substvars
+       dpkg --status wireshark | \
+               sed -n 's/^Version: */tripe:Wireshark-Version=/p' \
+               >> debian/tripe-wireshark.substvars
        dh_testdir -a
        dh_testroot -a
        dh_compress -a
index 3ec122c0d24854ff896e6b51206742a0b87fe246..ae8c9c5d433563858fc36de41a503952e4c3c619 100644 (file)
--- a/keyexch.c
+++ b/keyexch.c
@@ -65,7 +65,7 @@
  * %$\cookie{kx-challenge}, r_A, c_B, v_A$%
  *     Here's a full challenge for you to answer.
  *
- * %$\cookie{kx-reply}, R_A, c_B, v_A, E_K(r_B^\alpha))$%
+ * %$\cookie{kx-reply}, r_A, c_B, v_A, E_K(r_B^\alpha))$%
  *     Challenge accpeted: here's the answer.  Commit to my challenge.  Move
  *     to @KXS_COMMIT@.
  *
similarity index 100%
rename from ethereal/.gitignore
rename to wireshark/.gitignore
similarity index 89%
rename from ethereal/Makefile.am
rename to wireshark/Makefile.am
index fa1608730193508a19b5e44a54454a1ff8310a9b..fbde1f494dcec28e9e5f3eb76cea68c498a6a851 100644 (file)
@@ -2,7 +2,7 @@
 ##
 ## $Id: Makefile.am,v 1.2 2004/04/08 01:36:17 mdw Exp $
 ##
-## Makefile fragment for Ethereal plugin
+## Makefile fragment for Wireshark plugin
 ##
 ## (c) 2003 Straylight/Edgeware
 ##
@@ -27,9 +27,9 @@
 
 AUTOMAKE_OPTIONS = foreign
 
-CFLAGS = -I$(top_srcdir) -I$(top_builddir) @ETHEREAL_CFLAGS@
+CFLAGS = -I$(top_srcdir) -I$(top_builddir) @WIRESHARK_CFLAGS@
 
-plugindir = @ETHEREAL_PLUGIN_DIR@
+plugindir = @WIRESHARK_PLUGIN_DIR@
 plugin_LTLIBRARIES = tripe.la
 
 tripe_la_SOURCES = packet-tripe.c
similarity index 100%
rename from ethereal/cap
rename to wireshark/cap
similarity index 97%
rename from ethereal/packet-tripe.c
rename to wireshark/packet-tripe.c
index 4fa84028ed05d39f1ffb18bd87fa18d33de6d2bf..ea42d676f34b6e61d36b772cda54f63cc2f9ecd6 100644 (file)
@@ -2,7 +2,7 @@
  *
  * $Id$
  *
- * TrIPE protocol dissector for Ethereal
+ * TrIPE protocol dissector for Wireshark
  *
  * (c) 2003 Straylight/Edgeware
  */
@@ -38,9 +38,9 @@
 
 #include <glib.h>
 #include <gmodule.h>
-#include <ethereal/config.h>
-#include <ethereal/epan/packet.h>
-#include <ethereal/epan/prefs.h>
+#include <wireshark/config.h>
+#include <wireshark/epan/packet.h>
+#include <wireshark/epan/prefs.h>
 
 #include "tripe-protocol.h"
 
@@ -158,9 +158,6 @@ static void dissect_tripe(tvbuff_t *b, packet_info *p, proto_tree *t)
          case KX_PRECHAL:
            col_set_str(p->cinfo, COL_INFO, "Key exchange, prechallenge");
            break;
-         case KX_COOKIE:
-           col_set_str(p->cinfo, COL_INFO, "Key exchange, cookie");
-           break;
          case KX_CHAL:
            col_set_str(p->cinfo, COL_INFO, "Key exchange, challenge");
            break;
@@ -243,17 +240,13 @@ static void dissect_tripe(tvbuff_t *b, packet_info *p, proto_tree *t)
          case KX_PRECHAL:
            off = getge(tt, &hf_tripe_kx_mychal, b, off);
            goto tail;
-         case KX_COOKIE:
-           off = getge(tt, &hf_tripe_kx_mychal, b, off);
-           off = gethash(tt, hf_tripe_kx_yourcookie, b, off);
-           goto tail;
          case KX_CHAL:
            off = getge(tt, &hf_tripe_kx_mychal, b, off);
            off = gethash(tt, hf_tripe_kx_yourcookie, b, off);
            off = getmp(tt, &hf_tripe_kx_check, b, off);
            goto tail;
          case KX_REPLY:
-           off = gethash(tt, hf_tripe_kx_mycookie, b, off);
+           off = getge(tt, &hf_tripe_kx_mychal, b, off);
            off = gethash(tt, hf_tripe_kx_yourcookie, b, off);
            off = getmp(tt, &hf_tripe_kx_check, b, off);
            goto ct;
@@ -322,7 +315,6 @@ void proto_register_tripe(void)
 
   static value_string vs_kxtype[] = {
     { KX_PRECHAL,      "KX_PRECHAL (prechallenge)" },
-    { KX_COOKIE,       "KX_COOKIE (cookie)" },
     { KX_CHAL,         "KX_CHAL (challenge)" },
     { KX_REPLY,                "KX_REPLY (reply)" },
     { KX_SWITCH,       "KX_SWITCH (switch request)" },