summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Holzer <mholzer@gentoo.org>2003-01-08 12:45:50 +0000
committerMartin Holzer <mholzer@gentoo.org>2003-01-08 12:45:50 +0000
commit78e2750246acf54fa16406b34d794b4ca43aa5e6 (patch)
tree178e7c6f16c71fbac94dca69b955ef28217c15d2 /net-analyzer
parentForgot save() function in initscript (diff)
downloadhistorical-78e2750246acf54fa16406b34d794b4ca43aa5e6.tar.gz
historical-78e2750246acf54fa16406b34d794b4ca43aa5e6.tar.bz2
historical-78e2750246acf54fa16406b34d794b4ca43aa5e6.zip
Added initial version
Diffstat (limited to 'net-analyzer')
-rw-r--r--net-analyzer/arpwatch/ChangeLog10
-rw-r--r--net-analyzer/arpwatch/arpwatch-2.1.11.ebuild46
-rw-r--r--net-analyzer/arpwatch/files/arpwatch-2.1.11-gentoo.diff204
-rw-r--r--net-analyzer/arpwatch/files/arpwatch.init25
-rw-r--r--net-analyzer/arpwatch/files/digest-arpwatch-2.1.111
5 files changed, 286 insertions, 0 deletions
diff --git a/net-analyzer/arpwatch/ChangeLog b/net-analyzer/arpwatch/ChangeLog
new file mode 100644
index 000000000000..53c2e940e6cb
--- /dev/null
+++ b/net-analyzer/arpwatch/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for net-analyzer/nmap
+# Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/arpwatch/ChangeLog,v 1.1 2003/01/08 12:45:50 mholzer Exp $
+
+*arpwatch-2.1.11 (08 Jan 2003)
+
+ 08 Jan 2003; Martin Holzer <mholzer@gentoo.org> arpwatch-2.1.11.ebuild files/arpwatch-2.1.11-gentoo.diff files/arpwatch.init files/digest-arpwatch-2.1.11 ChangeLog :
+
+ Added initial version. Submitted by asen@warlock.ru in #13484.
+
diff --git a/net-analyzer/arpwatch/arpwatch-2.1.11.ebuild b/net-analyzer/arpwatch/arpwatch-2.1.11.ebuild
new file mode 100644
index 000000000000..bca70e06993d
--- /dev/null
+++ b/net-analyzer/arpwatch/arpwatch-2.1.11.ebuild
@@ -0,0 +1,46 @@
+# Copyright 2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/arpwatch/arpwatch-2.1.11.ebuild,v 1.1 2003/01/08 12:45:50 mholzer Exp $
+
+P=arpwatch-2.1a11
+S=${WORKDIR}/$P
+DESCRIPTION="An ethernet monitor program that keeps track of ethernet/ip address pairings"
+SRC_URI="ftp://ftp.ee.lbl.gov/${P}.tar.gz"
+HOMEPAGE="http://www-nrg.ee.lbl.gov/"
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~x86"
+
+DEPEND="net-libs/libpcap
+ sys-libs/ncurses"
+
+
+src_unpack() {
+ unpack $A
+ cd ${S}
+ patch -p0 < ${FILESDIR}/${PF}-gentoo.diff
+}
+
+src_compile() {
+
+ ./configure \
+ --prefix=/usr \
+ --infodir=/usr/share/info \
+ --mandir=/usr/share/man \
+ || die "./configure failed"
+ emake || die
+}
+
+src_install () {
+ dodir /usr/sbin /etc /var /var/arpwatch /etc /etc/init.d
+ keepdir /var/arpwatch
+ make DESTDIR=${D} install || die
+ exeinto /etc/init.d ; newexe ${FILESDIR}/arpwatch.init arpwatch
+
+}
+pkg_postinst() {
+ ewarn "NOTE: if you want to run arpwatch on boot then execute"
+ ewarn " rc-update add arpwatch default "
+}
+
+
diff --git a/net-analyzer/arpwatch/files/arpwatch-2.1.11-gentoo.diff b/net-analyzer/arpwatch/files/arpwatch-2.1.11-gentoo.diff
new file mode 100644
index 000000000000..f6e488de1a81
--- /dev/null
+++ b/net-analyzer/arpwatch/files/arpwatch-2.1.11-gentoo.diff
@@ -0,0 +1,204 @@
+--- Makefile.in.orig Wed Jul 29 06:16:45 1998
++++ Makefile.in Fri Aug 21 10:57:51 1998
+@@ -109,8 +109,8 @@
+ $(CC) $(CFLAGS) -o $@ zap.o intoa.o -lutil
+
+ install: force
+- $(INSTALL) -m 555 -o bin -g bin arpwatch $(DESTDIR)$(BINDEST)
+- $(INSTALL) -m 555 -o bin -g bin arpsnmp $(DESTDIR)$(BINDEST)
++ $(INSTALL) -s -m 555 -o bin -g bin arpwatch $(DESTDIR)$(BINDEST)
++ $(INSTALL) -s -m 555 -o bin -g bin arpsnmp $(DESTDIR)$(BINDEST)
+
+ install-man: force
+ $(INSTALL) -m 444 -o bin -g bin $(srcdir)/arpwatch.8 \
+--- ethercodes.dat.orig Tue Mar 21 02:37:05 2000
++++ ethercodes.dat Thu Sep 14 11:18:09 2000
+@@ -897,3 +897,5 @@
+ c0:0:0 Western Digital (may be reversed 00 00 C0?)
+ e2:c:f Kingston Technologies
+ ec:10:0 Enance Source Co., Ltd. PC clones(?)
++0:bd:11 VMWare Inc
++0:bd:fb VMWare Inc
+--- arpwatch.c.orig Thu Feb 22 22:47:29 2001
++++ arpwatch.c Thu Feb 22 22:47:29 2001
+@@ -107,6 +107,8 @@
+
+ char *prog;
+
++char *Watcher = NULL;
++
+ int can_checkpoint;
+ int swapped;
+ int nobogons;
+@@ -170,7 +172,7 @@
+ interface = NULL;
+ rfilename = NULL;
+ pd = NULL;
+- while ((op = getopt(argc, argv, "df:i:n:Nr:")) != EOF)
++ while ((op = getopt(argc, argv, "df:i:m:n:Nr:")) != EOF)
+ switch (op) {
+
+ case 'd':
+@@ -202,6 +204,10 @@
+ rfilename = optarg;
+ break;
+
++ case 'm':
++ Watcher = optarg;
++ break;
++
+ default:
+ usage();
+ }
+@@ -751,6 +757,6 @@
+
+ (void)fprintf(stderr, "Version %s\n", version);
+ (void)fprintf(stderr, "usage: %s [-dN] [-f datafile] [-i interface]"
+- " [-n net[/width]] [-r file]\n", prog);
++ " [-m email] [-n net[/width]] [-r file]\n", prog);
+ exit(1);
+ }
+--- report.c.orig Sun Oct 1 00:41:10 2000
++++ report.c Thu May 16 11:34:33 2002
+@@ -45,6 +45,8 @@
+
+ #include <ctype.h>
+ #include <errno.h>
++#include <fcntl.h>
++#include <paths.h>
+ #include <signal.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+@@ -70,6 +72,8 @@
+
+ #define PLURAL(n) ((n) == 1 || (n) == -1 ? "" : "s")
+
++extern char *Watcher;
++
+ static int cdepth; /* number of outstanding children */
+
+ static char *fmtdate(time_t);
+@@ -240,7 +244,7 @@
+ register FILE *f;
+ char tempfile[64], cpu[64], os[64];
+ char *fmt = "%20s: %s\n";
+- char *watcher = WATCHER;
++ char *watcher = Watcher ? Watcher : WATCHER;
+ char *watchee = WATCHEE;
+ char *sendmail = PATH_SENDMAIL;
+ char *unknown = "<unknown>";
+@@ -344,6 +348,25 @@
+ exit(1);
+ }
+ /* XXX Need to freopen()? */
++
++ /*
++ * Open /dev/null as stdout and stderr so that sendmail 8.12.1 (and
++ * above ?) won't complain about missing file descriptors.
++ */
++ if ((fd = open(_PATH_DEVNULL, O_RDWR)) == -1) {
++ syslog(LOG_ERR, "Cannot open %s: %m", _PATH_DEVNULL);
++ exit(1);
++ }
++ if (dup2(fd, STDOUT_FILENO) == -1) {
++ syslog(LOG_ERR, "Cannot dup2 %s to stdout: %m", _PATH_DEVNULL);
++ exit(1);
++ }
++ if (dup2(fd, STDERR_FILENO) == -1) {
++ syslog(LOG_ERR, "Cannot dup2 %s to stderr: %m", _PATH_DEVNULL);
++ exit(1);
++ }
++ close(fd);
++
+ /* Always Deliver interactively (pause when child depth gets large) */
+ execl(sendmail, "sendmail", "-odi", watcher, NULL);
+ syslog(LOG_ERR, "execl: %s: %m", sendmail);
+--- arpsnmp.c.orig Mon Jan 18 01:47:40 1999
++++ arpsnmp.c Thu Feb 22 22:47:29 2001
+@@ -68,6 +68,8 @@
+
+ char *prog;
+
++char *Watcher;
++
+ extern int optind;
+ extern int opterr;
+ extern char *optarg;
+@@ -90,7 +92,7 @@
+ }
+
+ opterr = 0;
+- while ((op = getopt(argc, argv, "df:")) != EOF)
++ while ((op = getopt(argc, argv, "df:m:")) != EOF)
+ switch (op) {
+
+ case 'd':
+@@ -105,6 +107,10 @@
+ arpfile = optarg;
+ break;
+
++ case 'm':
++ Watcher = optarg;
++ break;
++
+ default:
+ usage();
+ }
+@@ -184,6 +190,6 @@
+
+ (void)fprintf(stderr, "Version %s\n", version);
+ (void)fprintf(stderr,
+- "usage: %s [-d] [-f datafile] file [...]\n", prog);
++ "usage: %s [-d] [-f datafile] [-m email] file [...]\n", prog);
+ exit(1);
+ }
+--- arpwatch.8.orig Sun Oct 8 21:31:28 2000
++++ arpwatch.8 Thu Feb 22 22:47:29 2001
+@@ -38,6 +38,9 @@
+ .br
+ .ti +8
+ [
++.B -m
++.I email
++] [
+ .B -n
+ .IR net [/ width
+ ]] [
+@@ -69,6 +72,12 @@
+ The
+ .B -i
+ flag is used to override the default interface.
++.LP
++The
++.B -m
++flag specifies the address that will receive the emails.
++The default is
++.IR root .
+ .LP
+ The
+ .B -n
+--- arpsnmp.8.orig Sun Sep 17 21:34:48 2000
++++ arpsnmp.8 Thu Feb 22 22:47:29 2001
+@@ -30,6 +30,9 @@
+ ] [
+ .B -f
+ .I datafile
++] [
++.B -m
++.I email
+ ]
+ .I file
+ [
+@@ -54,6 +57,12 @@
+ flag is used to set the ethernet/ip address database filename.
+ The default is
+ .IR arp.dat .
++.LP
++The
++.B -m
++flag specifies the address that will receive the emails.
++The default is
++.IR root .
+ .LP
+ Note that an empty
+ .I arp.dat
diff --git a/net-analyzer/arpwatch/files/arpwatch.init b/net-analyzer/arpwatch/files/arpwatch.init
new file mode 100644
index 000000000000..22ff5b4c4eb3
--- /dev/null
+++ b/net-analyzer/arpwatch/files/arpwatch.init
@@ -0,0 +1,25 @@
+#!/sbin/runscript
+# Copyright 1999-2002 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+depend() {
+ need net
+ use cupsd
+}
+
+start() {
+ ebegin "Starting arpwatch"
+ if [ ! -e /var/arpwatch/arp.dat ]; then
+ touch /var/arpwatch/arp.dat
+ fi
+ /usr/sbin/arpwatch -i eth0 -f /var/arpwatch/arp.dat
+ result=$?
+ eend $result
+}
+
+stop() {
+ ebegin "Stopping arpwatch"
+ killall arpwatch > /dev/null
+ result=$?
+ eend $result
+}
diff --git a/net-analyzer/arpwatch/files/digest-arpwatch-2.1.11 b/net-analyzer/arpwatch/files/digest-arpwatch-2.1.11
new file mode 100644
index 000000000000..b6206100df76
--- /dev/null
+++ b/net-analyzer/arpwatch/files/digest-arpwatch-2.1.11
@@ -0,0 +1 @@
+MD5 9ecd00db892737431b0e524f3e52e19e arpwatch-2.1a11.tar.gz 126550