diff --git a/net/arpwatch/Makefile b/net/arpwatch/Makefile new file mode 100644 index 00000000000..08cce0fc4fb --- /dev/null +++ b/net/arpwatch/Makefile @@ -0,0 +1,38 @@ +# New ports collection makefile for: arpwatch +# Version required: 2.1a3 +# Date created: March 24 1998 +# Whom: mickey@openbsd.org +# +# $Id: Makefile,v 1.1.1.1 1998/03/25 20:13:23 mickey Exp $ +# + +DISTNAME= arpwatch-2.1a3 +CATEGORIES= net +MASTER_SITES= ftp://ftp.ee.lbl.gov/ \ + ftp://ftp.cso.uiuc.edu/pub/security/coast/unix/arpwatch/ +EXTRACT_SUFX= .tar.Z + +MAINTAINER= ports@openbsd.org + +HAS_CONFIGURE= yes +CONFIGURE_ARGS= --quiet +MAKE_FLAGS= CCOPT="-O2 -DPATH_SENDMAIL=\\\"/usr/sbin/sendmail\\\"" +INSTALL_TARGET= install install-man +MAN8= arpwatch.8 arpsnmp.8 + + +post-install: + if [ ! -d ${PREFIX}/arpwatch ]; then \ + ${MKDIR} ${PREFIX}/arpwatch; \ + chmod 775 ${PREFIX}/arpwatch; \ + /usr/sbin/chown root.operator ${PREFIX}/arpwatch; \ + fi + touch ${PREFIX}/arpwatch/arp.dat + chmod 644 ${PREFIX}/arpwatch/arp.dat + for file in ethercodes.dat d.awk e.awk p.awk; do \ + ${INSTALL_DATA} ${WRKSRC}/$$file ${PREFIX}/arpwatch/.; \ + done + ${INSTALL_SCRIPT} ${WRKSRC}/arp2ethers ${PREFIX}/arpwatch/. + ${INSTALL_SCRIPT} ${FILESDIR}/arpwatch.sh ${PREFIX}/etc/rc.d/. + +.include diff --git a/net/arpwatch/files/arpwatch.sh b/net/arpwatch/files/arpwatch.sh new file mode 100755 index 00000000000..ebaf7946aac --- /dev/null +++ b/net/arpwatch/files/arpwatch.sh @@ -0,0 +1,4 @@ +#!/bin/sh +if [ -x /usr/local/sbin/arpwatch -a -d /usr/local/arpwatch ]; then + /usr/local/sbin/arpwatch && echo -n ' arpwatch' +fi diff --git a/net/arpwatch/files/md5 b/net/arpwatch/files/md5 new file mode 100644 index 00000000000..b2e10b63233 --- /dev/null +++ b/net/arpwatch/files/md5 @@ -0,0 +1 @@ +MD5 (arpwatch-2.1a3.tar.Z) = 168e7974b49d685ebff29b5ce428527a diff --git a/net/arpwatch/patches/patch-aa b/net/arpwatch/patches/patch-aa new file mode 100644 index 00000000000..354bd448d8c --- /dev/null +++ b/net/arpwatch/patches/patch-aa @@ -0,0 +1,19 @@ +*** arp2ethers.orig Tue Mar 29 11:44:52 1994 +--- arp2ethers Tue Jul 1 02:34:40 1997 +*************** +*** 14,20 **** + # + + sort +2rn arp.dat | \ +! awk -e 'NF == 4 { print }' | \ + awk -f p.awk | \ + egrep -v '\.[0-9][0-9]*$' | \ + sed -e 's/ .* / /' | \ +--- 14,20 ---- + # + + sort +2rn arp.dat | \ +! awk 'NF == 4 { print }' | \ + awk -f p.awk | \ + egrep -v '\.[0-9][0-9]*$' | \ + sed -e 's/ .* / /' | \ diff --git a/net/arpwatch/patches/patch-ab b/net/arpwatch/patches/patch-ab new file mode 100644 index 00000000000..8f1d31dc975 --- /dev/null +++ b/net/arpwatch/patches/patch-ab @@ -0,0 +1,11 @@ +--- p.awk.orig Wed Mar 25 15:01:16 1998 ++++ p.awk Wed Mar 25 15:01:43 1998 +@@ -3,7 +3,7 @@ + { + e = $1 + if (seen[e]) +- continue ++ next + seen[e] = 1 + print $0 + } diff --git a/net/arpwatch/pkg/COMMENT b/net/arpwatch/pkg/COMMENT new file mode 100644 index 00000000000..73ccdb9c117 --- /dev/null +++ b/net/arpwatch/pkg/COMMENT @@ -0,0 +1 @@ +Monitor arp & rarp requests diff --git a/net/arpwatch/pkg/DESCR b/net/arpwatch/pkg/DESCR new file mode 100644 index 00000000000..602ba152b2d --- /dev/null +++ b/net/arpwatch/pkg/DESCR @@ -0,0 +1,33 @@ +Maintained under FreeBSD by: brian@awfulhak.org + +ARPWATCH 2.0 +Lawrence Berkeley National Laboratory +Network Research Group +arpwatch@ee.lbl.gov +ftp://ftp.ee.lbl.gov/arpwatch.tar.Z + +This directory contains source code for arpwatch and arpsnmp, tools +that monitors ethernet activity and maintain a database of ethernet/ip +address pairings. It also reports certain changes via email. + +Arpwatch uses libpcap, a system-independent interface for user-level +packet capture. Before building arpwatch, you must first retrieve and +build libpcap, also from LBL, in: + + ftp://ftp.ee.lbl.gov/libpcap.tar.Z. + +Once libpcap is built (either install it or make sure arpwatch and +libpcap share the same parent directory), you can build arpwatch using +the procedure in the INSTALL file. + +Arpsnmp has the same database features of arpwatch but relies on an +external agent to collect the arp data. This distribution contains a +script, arpfetch, that uses snmpwalk from the CMU SNMP package. This +package is available from: + + ftp://ftp.net.cmu.edu/pub/snmp-dist/cmu-snmp*.tar.Z + +It should be trivial to adaptive the output of any snmp query program +for use with arpsnmp. + +Please send bugs and comments to arpwatch@ee.lbl.gov. diff --git a/net/arpwatch/pkg/PLIST b/net/arpwatch/pkg/PLIST new file mode 100644 index 00000000000..7cd10c65b24 --- /dev/null +++ b/net/arpwatch/pkg/PLIST @@ -0,0 +1,10 @@ +sbin/arpwatch +sbin/arpsnmp +man/man8/arpwatch.8.gz +man/man8/arpsnmp.8.gz +arpwatch/arp2ethers +arpwatch/ethercodes.dat +arpwatch/d.awk +arpwatch/e.awk +arpwatch/p.awk +etc/rc.d/arpwatch.sh