head 1.10; access; symbols pkgsrc-2026Q1:1.10.0.164 pkgsrc-2026Q1-base:1.10 pkgsrc-2025Q4:1.10.0.162 pkgsrc-2025Q4-base:1.10 pkgsrc-2025Q3:1.10.0.160 pkgsrc-2025Q3-base:1.10 pkgsrc-2025Q2:1.10.0.158 pkgsrc-2025Q2-base:1.10 pkgsrc-2025Q1:1.10.0.156 pkgsrc-2025Q1-base:1.10 pkgsrc-2024Q4:1.10.0.154 pkgsrc-2024Q4-base:1.10 pkgsrc-2024Q3:1.10.0.152 pkgsrc-2024Q3-base:1.10 pkgsrc-2024Q2:1.10.0.150 pkgsrc-2024Q2-base:1.10 pkgsrc-2024Q1:1.10.0.148 pkgsrc-2024Q1-base:1.10 pkgsrc-2023Q4:1.10.0.146 pkgsrc-2023Q4-base:1.10 pkgsrc-2023Q3:1.10.0.144 pkgsrc-2023Q3-base:1.10 pkgsrc-2023Q2:1.10.0.142 pkgsrc-2023Q2-base:1.10 pkgsrc-2023Q1:1.10.0.140 pkgsrc-2023Q1-base:1.10 pkgsrc-2022Q4:1.10.0.138 pkgsrc-2022Q4-base:1.10 pkgsrc-2022Q3:1.10.0.136 pkgsrc-2022Q3-base:1.10 pkgsrc-2022Q2:1.10.0.134 pkgsrc-2022Q2-base:1.10 pkgsrc-2022Q1:1.10.0.132 pkgsrc-2022Q1-base:1.10 pkgsrc-2021Q4:1.10.0.130 pkgsrc-2021Q4-base:1.10 pkgsrc-2021Q3:1.10.0.128 pkgsrc-2021Q3-base:1.10 pkgsrc-2021Q2:1.10.0.126 pkgsrc-2021Q2-base:1.10 pkgsrc-2021Q1:1.10.0.124 pkgsrc-2021Q1-base:1.10 pkgsrc-2020Q4:1.10.0.122 pkgsrc-2020Q4-base:1.10 pkgsrc-2020Q3:1.10.0.120 pkgsrc-2020Q3-base:1.10 pkgsrc-2020Q2:1.10.0.116 pkgsrc-2020Q2-base:1.10 pkgsrc-2020Q1:1.10.0.96 pkgsrc-2020Q1-base:1.10 pkgsrc-2019Q4:1.10.0.118 pkgsrc-2019Q4-base:1.10 pkgsrc-2019Q3:1.10.0.114 pkgsrc-2019Q3-base:1.10 pkgsrc-2019Q2:1.10.0.112 pkgsrc-2019Q2-base:1.10 pkgsrc-2019Q1:1.10.0.110 pkgsrc-2019Q1-base:1.10 pkgsrc-2018Q4:1.10.0.108 pkgsrc-2018Q4-base:1.10 pkgsrc-2018Q3:1.10.0.106 pkgsrc-2018Q3-base:1.10 pkgsrc-2018Q2:1.10.0.104 pkgsrc-2018Q2-base:1.10 pkgsrc-2018Q1:1.10.0.102 pkgsrc-2018Q1-base:1.10 pkgsrc-2017Q4:1.10.0.100 pkgsrc-2017Q4-base:1.10 pkgsrc-2017Q3:1.10.0.98 pkgsrc-2017Q3-base:1.10 pkgsrc-2017Q2:1.10.0.94 pkgsrc-2017Q2-base:1.10 pkgsrc-2017Q1:1.10.0.92 pkgsrc-2017Q1-base:1.10 pkgsrc-2016Q4:1.10.0.90 pkgsrc-2016Q4-base:1.10 pkgsrc-2016Q3:1.10.0.88 pkgsrc-2016Q3-base:1.10 pkgsrc-2016Q2:1.10.0.86 pkgsrc-2016Q2-base:1.10 pkgsrc-2016Q1:1.10.0.84 pkgsrc-2016Q1-base:1.10 pkgsrc-2015Q4:1.10.0.82 pkgsrc-2015Q4-base:1.10 pkgsrc-2015Q3:1.10.0.80 pkgsrc-2015Q3-base:1.10 pkgsrc-2015Q2:1.10.0.78 pkgsrc-2015Q2-base:1.10 pkgsrc-2015Q1:1.10.0.76 pkgsrc-2015Q1-base:1.10 pkgsrc-2014Q4:1.10.0.74 pkgsrc-2014Q4-base:1.10 pkgsrc-2014Q3:1.10.0.72 pkgsrc-2014Q3-base:1.10 pkgsrc-2014Q2:1.10.0.70 pkgsrc-2014Q2-base:1.10 pkgsrc-2014Q1:1.10.0.68 pkgsrc-2014Q1-base:1.10 pkgsrc-2013Q4:1.10.0.66 pkgsrc-2013Q4-base:1.10 pkgsrc-2013Q3:1.10.0.64 pkgsrc-2013Q3-base:1.10 pkgsrc-2013Q2:1.10.0.62 pkgsrc-2013Q2-base:1.10 pkgsrc-2013Q1:1.10.0.60 pkgsrc-2013Q1-base:1.10 pkgsrc-2012Q4:1.10.0.58 pkgsrc-2012Q4-base:1.10 pkgsrc-2012Q3:1.10.0.56 pkgsrc-2012Q3-base:1.10 pkgsrc-2012Q2:1.10.0.54 pkgsrc-2012Q2-base:1.10 pkgsrc-2012Q1:1.10.0.52 pkgsrc-2012Q1-base:1.10 pkgsrc-2011Q4:1.10.0.50 pkgsrc-2011Q4-base:1.10 pkgsrc-2011Q3:1.10.0.48 pkgsrc-2011Q3-base:1.10 pkgsrc-2011Q2:1.10.0.46 pkgsrc-2011Q2-base:1.10 pkgsrc-2011Q1:1.10.0.44 pkgsrc-2011Q1-base:1.10 pkgsrc-2010Q4:1.10.0.42 pkgsrc-2010Q4-base:1.10 pkgsrc-2010Q3:1.10.0.40 pkgsrc-2010Q3-base:1.10 pkgsrc-2010Q2:1.10.0.38 pkgsrc-2010Q2-base:1.10 pkgsrc-2010Q1:1.10.0.36 pkgsrc-2010Q1-base:1.10 pkgsrc-2009Q4:1.10.0.34 pkgsrc-2009Q4-base:1.10 pkgsrc-2009Q3:1.10.0.32 pkgsrc-2009Q3-base:1.10 pkgsrc-2009Q2:1.10.0.30 pkgsrc-2009Q2-base:1.10 pkgsrc-2009Q1:1.10.0.28 pkgsrc-2009Q1-base:1.10 pkgsrc-2008Q4:1.10.0.26 pkgsrc-2008Q4-base:1.10 pkgsrc-2008Q3:1.10.0.24 pkgsrc-2008Q3-base:1.10 cube-native-xorg:1.10.0.22 cube-native-xorg-base:1.10 pkgsrc-2008Q2:1.10.0.20 pkgsrc-2008Q2-base:1.10 cwrapper:1.10.0.18 pkgsrc-2008Q1:1.10.0.16 pkgsrc-2008Q1-base:1.10 pkgsrc-2007Q4:1.10.0.14 pkgsrc-2007Q4-base:1.10 pkgsrc-2007Q3:1.10.0.12 pkgsrc-2007Q3-base:1.10 pkgsrc-2007Q2:1.10.0.10 pkgsrc-2007Q2-base:1.10 pkgsrc-2007Q1:1.10.0.8 pkgsrc-2007Q1-base:1.10 pkgsrc-2006Q4:1.10.0.6 pkgsrc-2006Q4-base:1.10 pkgsrc-2006Q3:1.10.0.4 pkgsrc-2006Q3-base:1.10 pkgsrc-2006Q2:1.10.0.2 pkgsrc-2006Q2-base:1.10 pkgsrc-2006Q1:1.9.0.4 pkgsrc-2006Q1-base:1.9 pkgsrc-2005Q4:1.9.0.2 pkgsrc-2005Q4-base:1.9 pkgsrc-2005Q3:1.7.0.8 pkgsrc-2005Q3-base:1.7 pkgsrc-2005Q2:1.7.0.6 pkgsrc-2005Q2-base:1.7 pkgsrc-2005Q1:1.7.0.4 pkgsrc-2005Q1-base:1.7 pkgsrc-2004Q4:1.7.0.2 pkgsrc-2004Q4-base:1.7 pkgsrc-2004Q3:1.6.0.12 pkgsrc-2004Q3-base:1.6 pkgsrc-2004Q2:1.6.0.10 pkgsrc-2004Q2-base:1.6 pkgsrc-2004Q1:1.6.0.8 pkgsrc-2004Q1-base:1.6 pkgsrc-2003Q4:1.6.0.6 pkgsrc-2003Q4-base:1.6 netbsd-1-6-1:1.6.0.2 netbsd-1-6-1-base:1.6 netbsd-1-6:1.6.0.4 netbsd-1-6-RELEASE-base:1.6 pkgviews:1.5.0.4 pkgviews-base:1.5 buildlink2:1.5.0.2 buildlink2-base:1.5 netbsd-1-5-PATCH003:1.5 netbsd-1-5-PATCH001:1.4 netbsd-1-5-RELEASE:1.4 netbsd-1-4-PATCH003:1.4 netbsd-1-4-PATCH002:1.4 comdex-fall-1999:1.3 netbsd-1-4-PATCH001:1.3 netbsd-1-4-RELEASE:1.3 netbsd-1-3-PATCH003:1.2 netbsd-1-3-PATCH002:1.1; locks; strict; comment @# @; 1.10 date 2006.04.15.09.54.20; author bouyer; state Exp; branches; next 1.9; 1.9 date 2005.12.05.20.50.44; author rillig; state Exp; branches; next 1.8; 1.8 date 2005.11.30.22.36.43; author bouyer; state Exp; branches; next 1.7; 1.7 date 2004.12.10.23.32.34; author minskim; state dead; branches; next 1.6; 1.6 date 2002.08.05.17.54.04; author wiz; state Exp; branches; next 1.5; 1.5 date 2001.08.24.11.37.08; author abs; state Exp; branches; next 1.4; 1.4 date 99.11.19.12.32.27; author agc; state Exp; branches; next 1.3; 1.3 date 98.11.04.17.25.12; author mycroft; state Exp; branches; next 1.2; 1.2 date 98.08.07.11.10.36; author agc; state Exp; branches; next 1.1; 1.1 date 98.04.27.18.06.38; author bouyer; state Exp; branches; next ; desc @@ 1.10 log @If the interface doesn't have an ipv4 address and we provided a network via -n, use it instead of bailing out. Allows to run arpwatch on interface without IP address. Bump pkgrevision. @ text @$NetBSD: patch-ac,v 1.9 2005/12/05 20:50:44 rillig Exp $ --- arpwatch.c.orig 2004-01-22 23:18:20.000000000 +0100 +++ arpwatch.c 2006-04-12 12:36:25.000000000 +0200 @@@@ -107,6 +107,8 @@@@ char *prog; +char *Watcher = NULL; + int can_checkpoint; int swapped; int nobogons; @@@@ -119,9 +121,9 @@@@ u_int32_t netmask; }; -static struct nets *nets; -static int nets_ind; -static int nets_size; +static struct nets *nets = NULL; +static int nets_ind = 0; +static int nets_size = 0; extern int optind; extern int opterr; @@@@ -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': @@@@ -189,6 +191,10 @@@@ interface = optarg; break; + case 'm': + Watcher = optarg; + break; + case 'n': if (!addnet(optarg)) usage(); @@@@ -223,9 +229,24 @@@@ /* Determine network and netmask */ if (pcap_lookupnet(interface, &net, &netmask, errbuf) < 0) { - (void)fprintf(stderr, "%s: bad interface %s: %s\n", - prog, interface, errbuf); - exit(1); + /* use the first -n parameter if available */ + if (nets != NULL) { + net = nets[0].net; + netmask = nets[0].netmask; + /* + * use 2 separate printf, intoa() uses + * a static buffer. + */ + printf("%s %s: %s, using %s", + prog, interface, errbuf, + intoa(net)); + printf("/%s\n", intoa(netmask)); + } else { + (void)fprintf(stderr, + "%s: bad interface %s: %s\n", + prog, interface, errbuf); + exit(1); + } } /* Drop into the background if not debugging */ @@@@ -751,6 +772,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); } @ 1.9 log @Fixed pkglint warnings. The warnings are mostly quoting issues, for example MAKE_ENV+=FOO=${BAR} is changed to MAKE_ENV+=FOO=${BAR:Q}. Some other changes are outlined in http://mail-index.netbsd.org/tech-pkg/2005/12/02/0034.html @ text @d1 1 a1 1 $NetBSD$ d3 2 a4 2 --- arpwatch.c.orig 2005-10-25 12:53:57.000000000 +0200 +++ arpwatch.c 2005-10-25 12:56:40.000000000 +0200 d14 13 d47 29 a75 1 @@@@ -751,6 +757,6 @@@@ @ 1.8 log @Update to 2.1a13, from Geert Hendrickx and William Fletcher. arpwatch changes: - Convert arp2ethers from csh to sh - updated ethercode.dat - misc minor bugfixes Changes from Geert Hendrickx: - move ethercodes.dat to share/arpwatch (from etc) - Use ${VARBASE:Q} instead of ${VARBASE} as suggested by pkglint - Use OWN_DIRS to note the admin about the stale db directory after deinstallation Changes from William Fletcher: - add a rc.d script - add a '-m' option to specify the recipient for email messages (still defaults to root) Fix pkg/32151 by Geert Hendrickx @ text @d1 2 @ 1.7 log @Use VARBASE instead of hardcoding /var. @ text @d1 39 a39 13 $NetBSD: patch-ac,v 1.6 2002/08/05 17:54:04 wiz Exp $ --- arpwatch.8.orig Sun Oct 8 21:31:28 2000 +++ arpwatch.8 @@@@ -152,7 +160,7 @@@@ .na .nh .nf -/usr/operator/arpwatch - default directory +/var/db/arpwatch - default directory arp.dat - ethernet/ip address database ethercodes.dat - vendor ethernet block list .ad @ 1.6 log @Don't document non-existing '-a' flag. Bump PKGREVISION. @ text @d1 1 a1 1 $NetBSD: patch-ac,v 1.5 2001/08/24 11:37:08 abs Exp $ @ 1.5 log @Updated arpwatch to 2.1a11. No changelog available, old distfile removed. @ text @d1 1 a1 1 $NetBSD$ a4 22 @@@@ -27,6 +27,8 @@@@ .na .B arpwatch [ +.B -a +] [ .B -dN ] [ .B -f @@@@ -55,6 +57,12 @@@@ to listen for arp packets on a local ethernet interface. .LP The +.B -a +flag supress check for local network. By default, arp traffic for IP addresses +which don't belong to the local network are logged as bogons, and not added +to the database. +.LP +The .B -d flag is used enable debugging. This also inhibits forking into the background and emailing the reports. Instead, they are sent to @ 1.4 log @Unfortunately, one of the files that is patched contains an RCS Id in the surrounding context. Introduce a pre-patch stage which removes the magic '$' characters from the source file, which allows us to have package patch files which do not contain any RCS Ids, and which allows us to patch without a fuzz factor. @ text @d1 1 a1 1 $NetBSD: patch-ac,v 1.3 1998/11/04 17:25:12 mycroft Exp $ d3 33 a35 12 --- arpwatch.h.orig Fri Nov 19 12:22:02 1999 +++ arpwatch.h Fri Nov 19 12:22:02 1999 @@@@ -1,7 +1,9 @@@@ /* @@(#) Header: arpwatch.h,v 1.28 98/02/09 16:35:15 leres Exp (LBL) */ #define ARPFILE "arp.dat" +#ifndef ETHERCODES #define ETHERCODES "ethercodes.dat" +#endif #define CHECKPOINT (15*60) /* Checkpoint time in seconds */ #define MEMCMP(a, b, n) memcmp((char *)a, (char *)b, n) @ 1.3 log @2.1a4 @ text @d1 1 a1 1 $NetBSD$ d3 2 a4 2 --- arpwatch.h.orig Mon Feb 9 19:35:15 1998 +++ arpwatch.h Wed Nov 4 12:15:33 1998 d6 1 a6 1 /* @@(#) $Header: arpwatch.h,v 1.28 98/02/09 16:35:15 leres Exp $ (LBL) */ @ 1.2 log @Add NetBSD RCS Ids. @ text @d3 5 a7 4 --- arpwatch.h.orig Mon Apr 27 19:41:46 1998 +++ arpwatch.h Mon Apr 27 19:42:16 1998 @@@@ -3,7 +3,9 @@@@ #define NEWARPFILE "arp.dat.new" a8 1 #define OLDARPFILE "arp.dat-" @ 1.1 log @arpwatch 2.0.2, an arp activity monitoring tool. Maintain a database of MAC <-> IP adresses mapping, and warns about changes. @ text @d1 2 @