chiark / gitweb /
Great reorganization.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 30 Dec 2006 22:43:42 +0000 (22:43 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 30 Dec 2006 23:01:16 +0000 (23:01 +0000)
Split all the sources into subdirectories.  This will look rather more
sensible when we add the Python support stuff.

37 files changed:
Makefile.am
client/Makefile.am [new file with mode: 0644]
client/tripectl.c [moved from client.c with 100% similarity]
common/Makefile.am [new file with mode: 0644]
common/protocol.h [moved from tripe-protocol.h with 100% similarity]
common/util.c [moved from util.c with 100% similarity]
common/util.h [moved from util.h with 100% similarity]
configure.in
debian/rules
init/Makefile.am [new file with mode: 0644]
init/tripe-init.in [moved from tripe-init.in with 100% similarity]
init/tripe.conf [moved from tripe.conf with 100% similarity]
keys/Makefile.am [new file with mode: 0644]
keys/tripe-keys.in [moved from tripe-keys.in with 100% similarity]
keys/tripe-keys.master [moved from tripe-keys.master with 100% similarity]
mon/Makefile.am [new file with mode: 0644]
mon/tripemon.in [moved from tripemon.in with 100% similarity]
pkstream/Makefile.am [new file with mode: 0644]
pkstream/pkstream.c [moved from pkstream.c with 100% similarity]
proxy/Makefile.am [new file with mode: 0644]
proxy/tripe-mitm.c [moved from mallory.c with 99% similarity]
server/Makefile.am [new file with mode: 0644]
server/admin.c [moved from admin.c with 100% similarity]
server/chal.c [moved from chal.c with 100% similarity]
server/keyexch.c [moved from keyexch.c with 100% similarity]
server/keymgmt.c [moved from keymgmt.c with 100% similarity]
server/keyset.c [moved from keyset.c with 100% similarity]
server/peer.c [moved from peer.c with 100% similarity]
server/servutil.c [moved from servutil.c with 100% similarity]
server/tripe.c [moved from tripe.c with 100% similarity]
server/tripe.h [moved from tripe.h with 99% similarity]
server/tun-bsd.c [moved from tun-bsd.c with 100% similarity]
server/tun-linux.c [moved from tun-linux.c with 100% similarity]
server/tun-slip.c [moved from tun-slip.c with 100% similarity]
server/tun-unet.c [moved from tun-unet.c with 100% similarity]
wireshark/Makefile.am
wireshark/packet-tripe.c

index 144671da21e38b9c406c8fa504cc9a6fe5c210c4..11a35083fb5e456af9ad6faf979a2e09fc87c0e6 100644 (file)
 ## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
 AUTOMAKE_OPTIONS = foreign
-SUBDIRS = doc @DIRS@
-configdir = @configdir@
-socketdir = @socketdir@
-logdir = @logdir@
+SUBDIRS = common client server proxy pkstream init doc @DIRS@
 
-CATACOMB_LIBS = @CATACOMB_LIBS@
-tun = @tun@
-
-sbin_PROGRAMS = tripe
-bin_PROGRAMS = tripectl tripe-mitm pkstream
-noinst_SCRIPTS = tripe-init
-bin_SCRIPTS = @pyscripts@ @pygtkscripts@
-PYTHONSCRIPTS = tripe-keys
-PYGTKSCRIPTS = tripemon
-EXTRA_SCRIPTS = ${PYTHONSCRIPTS} ${PYGTKSCRIPTS}
-tripe_SOURCES = \
-       tripe.c tripe.h tripe-protocol.h \
-       admin.c peer.c \
-       keymgmt.c keyexch.c keyset.c chal.c \
-       servutil.c util.c util.h \
-       tun-unet.c tun-bsd.c tun-linux.c tun-slip.c
-tripe_LDADD = $(CATACOMB_LIBS)
-tripectl_SOURCES = \
-       client.c util.c util.h
-tripe_mitm_SOURCES = \
-       mallory.c
-tripe_mitm_LDADD = $(CATACOMB_LIBS)
-pkstream_SOURCES = \
-       pkstream.c
-
-install-hook:
-       for i in "$(configdir)" "$(socketdir)"; do \
-         case "$$i" in /*) $(mkinstalldirs) $(DESTDIR)$$i;; esac; \
-       done
-
-EXTRA_DIST = tripe.conf \
+EXTRA_DIST = \
        debian/rules debian/control debian/changelog debian/copyright \
-       debian/tripe.postinst debian/tripe.prerm debian/tripe.postrm \
-       tripe-keys.in
+       debian/tripe.postinst debian/tripe.prerm debian/tripe.postrm
 
 ##----- That's all, folks ---------------------------------------------------
diff --git a/client/Makefile.am b/client/Makefile.am
new file mode 100644 (file)
index 0000000..199be93
--- /dev/null
@@ -0,0 +1,36 @@
+## -*-makefile-*-
+##
+## $Id$
+##
+## Makefile for TrIPE client
+##
+## (c) 2001 Straylight/Edgeware
+##
+
+##----- Licensing notice ----------------------------------------------------
+##
+## This file is part of Trivial IP Encryption (TrIPE).
+##
+## TrIPE 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.
+## 
+## TrIPE 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 TrIPE; if not, write to the Free Software Foundation,
+## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+AUTOMAKE_OPTIONS = foreign
+INCLUDES = -I$(top_srcdir)/common -I$(top_builddir)/common
+LDADD = ../common/libtripe.a @CATACOMB_LIBS@
+
+bin_PROGRAMS = tripectl
+
+tripectl_SOURCES = tripectl.c
+
+##----- That's all, folks ---------------------------------------------------
similarity index 100%
rename from client.c
rename to client/tripectl.c
diff --git a/common/Makefile.am b/common/Makefile.am
new file mode 100644 (file)
index 0000000..28c3db9
--- /dev/null
@@ -0,0 +1,34 @@
+## -*-makefile-*-
+##
+## $Id$
+##
+## Makefile for TrIPE common source files
+##
+## (c) 2001 Straylight/Edgeware
+##
+
+##----- Licensing notice ----------------------------------------------------
+##
+## This file is part of Trivial IP Encryption (TrIPE).
+##
+## TrIPE 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.
+## 
+## TrIPE 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 TrIPE; if not, write to the Free Software Foundation,
+## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+AUTOMAKE_OPTIONS = foreign
+
+noinst_LIBRARIES = libtripe.a
+
+libtripe_a_SOURCES = protocol.h util.c util.h
+
+##----- That's all, folks ---------------------------------------------------
similarity index 100%
rename from tripe-protocol.h
rename to common/protocol.h
similarity index 100%
rename from util.c
rename to common/util.c
similarity index 100%
rename from util.h
rename to common/util.h
index 739d8d9461c278cf544f9b4768304c7f885b619c..972fcf604574a5845ac600076f4405e845a95612 100644 (file)
@@ -25,18 +25,21 @@ dnl You should have received a copy of the GNU General Public License
 dnl along with TrIPE; if not, write to the Free Software Foundation,
 dnl Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
-AC_INIT(tripe.c)
+AC_INIT(server/tripe.c)
 AM_INIT_AUTOMAKE(tripe, 1.0.0pre7)
-AM_CONFIG_HEADER(config.h)
+AM_CONFIG_HEADER(common/config.h)
 AC_CANONICAL_HOST
 
 AC_PROG_MAKE_SET
 AC_PROG_CC
 AM_PROG_LIBTOOL
+DIRS="" AC_SUBST([DIRS])
+
 python=no
 mdw_PROG_PYTHON([2.3], 
   [python=yes
-   pyscripts='${PYTHONSCRIPTS}' 
+   pyscripts='${PYTHONSCRIPTS}'
+   DIRS="$DIRS keys"
    pymans='${PYTHONMANS}'])
 AC_SUBST([pyscripts]) AC_SUBST([pymans])
 
@@ -52,6 +55,7 @@ import gtk
   ])
   if test $mdw_cv_pygtk = yes; then
     pygtkscripts='${PYGTKSCRIPTS}'
+    DIRS="$DIRS mon"
     pygtkmans='${PYGTKMANS}'
   fi
 fi
@@ -96,7 +100,6 @@ AC_ARG_WITH([logfile],
 [logfile=$withval],
 [logfile=tripe.log])
 
-DIRS=""
 WIRESHARK_CFLAGS=""
 WIRESHARK_PLUGIN_DIR="unknown"
 AC_ARG_WITH([wireshark],
@@ -249,9 +252,14 @@ mdw_DEFINE_PATHS([
   AC_SUBST(socketdir) AC_SUBST(configdir) AC_SUBST(logfile) AC_SUBST(pidfile)
   AC_SUBST(initconfig)
 ])
-AC_SUBST(DIRS)
 AC_OUTPUT( \
-       Makefile doc/Makefile wireshark/Makefile \
-       tripe-init tripe-keys tripemon)
+       Makefile \
+       common/Makefile client/Makefile server/Makefile \
+       proxy/Makefile pkstream/Makefile \
+       doc/Makefile \
+       wireshark/Makefile \
+       init/Makefile init/tripe-init \
+       keys/Makefile keys/tripe-keys \
+       mon/Makefile mon/tripemon)
 
 dnl ----- That's all, folks -------------------------------------------------
index 31ef2954caab2b58dc9c2231101f8e1ceb66eb88..62d860f9a7a55baf3d42c7ddde6b5f2bb76aaa67 100755 (executable)
@@ -27,9 +27,9 @@ install: build
        mkdir -p debian/tripe/etc/tripe/peers
        mkdir -p debian/tripe/etc/default
        mkdir -p debian/tripe/etc/init.d
-       cp deb-build/tripe-init debian/tripe/etc/init.d/tripe
+       cp deb-build/init/tripe-init debian/tripe/etc/init.d/tripe
        chmod 755 debian/tripe/etc/init.d/tripe
-       cp tripe.conf debian/tripe/etc/default/tripe
+       cp init/tripe.conf debian/tripe/etc/default/tripe
        mkdir -p debian/tripe-keys/usr/bin
        mv debian/tripe/usr/bin/tripe-keys debian/tripe-keys/usr/bin
        mkdir -p \
@@ -40,7 +40,7 @@ install: build
        mv debian/tripe/usr/share/man/man8/tripe-keys.8 \
          debian/tripe-keys/usr/share/man/man8
        mkdir -p debian/tripe-keys/usr/share/doc/tripe-keys/examples
-       cp tripe-keys.master \
+       cp keys/tripe-keys.master \
          debian/tripe-keys/usr/share/doc/tripe-keys/examples
        mkdir -p debian/tripemon/usr/bin
        mv debian/tripe/usr/bin/tripemon debian/tripemon/usr/bin
diff --git a/init/Makefile.am b/init/Makefile.am
new file mode 100644 (file)
index 0000000..4173b42
--- /dev/null
@@ -0,0 +1,42 @@
+## -*-makefile-*-
+##
+## $Id$
+##
+## Makefile for TrIPE startup scripts
+##
+## (c) 2001 Straylight/Edgeware
+##
+
+##----- Licensing notice ----------------------------------------------------
+##
+## This file is part of Trivial IP Encryption (TrIPE).
+##
+## TrIPE 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.
+## 
+## TrIPE 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 TrIPE; if not, write to the Free Software Foundation,
+## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+AUTOMAKE_OPTIONS = foreign
+configdir = @configdir@
+socketdir = @socketdir@
+logdir = @logdir@
+
+noinst_SCRIPTS = tripe-init
+
+install-hook:
+       for i in "$(configdir)" "$(socketdir)"; do \
+         case "$$i" in /*) $(mkinstalldirs) $(DESTDIR)$$i;; esac; \
+       done
+
+EXTRA_DIST = tripe.conf
+
+##----- That's all, folks ---------------------------------------------------
similarity index 100%
rename from tripe-init.in
rename to init/tripe-init.in
similarity index 100%
rename from tripe.conf
rename to init/tripe.conf
diff --git a/keys/Makefile.am b/keys/Makefile.am
new file mode 100644 (file)
index 0000000..398a299
--- /dev/null
@@ -0,0 +1,35 @@
+## -*-makefile-*-
+##
+## $Id$
+##
+## Makefile for TrIPE key management tool
+##
+## (c) 2001 Straylight/Edgeware
+##
+
+##----- Licensing notice ----------------------------------------------------
+##
+## This file is part of Trivial IP Encryption (TrIPE).
+##
+## TrIPE 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.
+## 
+## TrIPE 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 TrIPE; if not, write to the Free Software Foundation,
+## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+AUTOMAKE_OPTIONS = foreign
+
+PYTHONSCRIPTS = tripe-keys
+bin_SCRIPTS = @pyscripts@
+
+EXTRA_SCRIPTS = ${PYTHONSCRIPTS}
+
+##----- That's all, folks ---------------------------------------------------
similarity index 100%
rename from tripe-keys.in
rename to keys/tripe-keys.in
similarity index 100%
rename from tripe-keys.master
rename to keys/tripe-keys.master
diff --git a/mon/Makefile.am b/mon/Makefile.am
new file mode 100644 (file)
index 0000000..6c223df
--- /dev/null
@@ -0,0 +1,35 @@
+## -*-makefile-*-
+##
+## $Id$
+##
+## Makefile for TrIPE graphical monitor
+##
+## (c) 2001 Straylight/Edgeware
+##
+
+##----- Licensing notice ----------------------------------------------------
+##
+## This file is part of Trivial IP Encryption (TrIPE).
+##
+## TrIPE 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.
+## 
+## TrIPE 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 TrIPE; if not, write to the Free Software Foundation,
+## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+AUTOMAKE_OPTIONS = foreign
+
+PYGTKSCRIPTS = tripemon
+bin_SCRIPTS = @pygtkscripts@
+
+EXTRA_SCRIPTS = ${PYGTKSCRIPTS}
+
+##----- That's all, folks ---------------------------------------------------
similarity index 100%
rename from tripemon.in
rename to mon/tripemon.in
diff --git a/pkstream/Makefile.am b/pkstream/Makefile.am
new file mode 100644 (file)
index 0000000..ca364c0
--- /dev/null
@@ -0,0 +1,35 @@
+## -*-makefile-*-
+##
+## $Id$
+##
+## Makefile for packets-over-stream proxy
+##
+## (c) 2001 Straylight/Edgeware
+##
+
+##----- Licensing notice ----------------------------------------------------
+##
+## This file is part of Trivial IP Encryption (TrIPE).
+##
+## TrIPE 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.
+## 
+## TrIPE 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 TrIPE; if not, write to the Free Software Foundation,
+## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+AUTOMAKE_OPTIONS = foreign
+INCLUDES = -I$(top_srcdir)/common -I$(top_builddir)/common
+
+bin_PROGRAMS = pkstream
+
+pkstream_SOURCES = pkstream.c
+
+##----- That's all, folks ---------------------------------------------------
similarity index 100%
rename from pkstream.c
rename to pkstream/pkstream.c
diff --git a/proxy/Makefile.am b/proxy/Makefile.am
new file mode 100644 (file)
index 0000000..041b76f
--- /dev/null
@@ -0,0 +1,36 @@
+## -*-makefile-*-
+##
+## $Id$
+##
+## Makefile for TrIPE malicious proxy
+##
+## (c) 2001 Straylight/Edgeware
+##
+
+##----- Licensing notice ----------------------------------------------------
+##
+## This file is part of Trivial IP Encryption (TrIPE).
+##
+## TrIPE 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.
+## 
+## TrIPE 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 TrIPE; if not, write to the Free Software Foundation,
+## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+AUTOMAKE_OPTIONS = foreign
+INCLUDES = -I$(top_srcdir)/common -I$(top_builddir)/common
+LDADD = @CATACOMB_LIBS@
+
+bin_PROGRAMS = tripe-mitm
+
+tripe_mitm_SOURCES = tripe-mitm.c
+
+##----- That's all, folks ---------------------------------------------------
similarity index 99%
rename from mallory.c
rename to proxy/tripe-mitm.c
index 970e18e7c168ae1e3502bce0373182823ed1867b..9aa29901dda5756946376f49bf3db5c738e2fdf5 100644 (file)
--- a/mallory.c
@@ -69,7 +69,6 @@
 #include <catacomb/rand.h>
 #include <catacomb/rc4.h>
 
-
 /*----- Data structures ---------------------------------------------------*/
 
 typedef struct peer {
diff --git a/server/Makefile.am b/server/Makefile.am
new file mode 100644 (file)
index 0000000..01438ea
--- /dev/null
@@ -0,0 +1,42 @@
+## -*-makefile-*-
+##
+## $Id$
+##
+## Makefile for TrIPE server
+##
+## (c) 2001 Straylight/Edgeware
+##
+
+##----- Licensing notice ----------------------------------------------------
+##
+## This file is part of Trivial IP Encryption (TrIPE).
+##
+## TrIPE 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.
+## 
+## TrIPE 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 TrIPE; if not, write to the Free Software Foundation,
+## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+AUTOMAKE_OPTIONS = foreign
+INCLUDES = -I$(top_srcdir)/common -I$(top_builddir)/common
+LDADD = ../common/libtripe.a @CATACOMB_LIBS@
+configdir = @configdir@
+tun = @tun@
+
+sbin_PROGRAMS = tripe
+
+tripe_SOURCES = \
+       tripe.h \
+       servutil.c \
+       tripe.c admin.c peer.c keymgmt.c keyexch.c keyset.c chal.c \
+       tun-unet.c tun-bsd.c tun-linux.c tun-slip.c
+
+##----- That's all, folks ---------------------------------------------------
similarity index 100%
rename from admin.c
rename to server/admin.c
similarity index 100%
rename from chal.c
rename to server/chal.c
similarity index 100%
rename from keyexch.c
rename to server/keyexch.c
similarity index 100%
rename from keymgmt.c
rename to server/keymgmt.c
similarity index 100%
rename from keyset.c
rename to server/keyset.c
similarity index 100%
rename from peer.c
rename to server/peer.c
similarity index 100%
rename from servutil.c
rename to server/servutil.c
similarity index 100%
rename from tripe.c
rename to server/tripe.c
similarity index 99%
rename from tripe.h
rename to server/tripe.h
index 2182b3bff847ef959b4fe8ab98b28357c59557fb..59ae9c94876683ed0dda20f267274badf099e9cc 100644 (file)
--- a/tripe.h
 #include <catacomb/ec-keys.h>
 #include <catacomb/group.h>
 
-#include "tripe-protocol.h"
+#include "protocol.h"
 #include "util.h"
 
 #undef sun
similarity index 100%
rename from tun-bsd.c
rename to server/tun-bsd.c
similarity index 100%
rename from tun-linux.c
rename to server/tun-linux.c
similarity index 100%
rename from tun-slip.c
rename to server/tun-slip.c
similarity index 100%
rename from tun-unet.c
rename to server/tun-unet.c
index fbde1f494dcec28e9e5f3eb76cea68c498a6a851..be9dd915d995070556af50ef28d941b9c2a9c47c 100644 (file)
 ## Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
 AUTOMAKE_OPTIONS = foreign
-
-CFLAGS = -I$(top_srcdir) -I$(top_builddir) @WIRESHARK_CFLAGS@
-
+INCLUDES = -I$(top_srcdir)/common -I$(top_builddir)/common
+CFLAGS = @WIRESHARK_CFLAGS@
 plugindir = @WIRESHARK_PLUGIN_DIR@
+
 plugin_LTLIBRARIES = tripe.la
 
 tripe_la_SOURCES = packet-tripe.c
index ea42d676f34b6e61d36b772cda54f63cc2f9ecd6..5ea7b9788f7fef579c5a840a334ed34c4e7bef01 100644 (file)
@@ -42,7 +42,7 @@
 #include <wireshark/epan/packet.h>
 #include <wireshark/epan/prefs.h>
 
-#include "tripe-protocol.h"
+#include "protocol.h"
 
 /*----- Static variables --------------------------------------------------*/