summaryrefslogtreecommitdiff
path: root/net/arpwatch-devel/files/patch-ac
diff options
context:
space:
mode:
authorKirill Ponomarev <krion@FreeBSD.org>2004-01-19 23:34:48 +0000
committerKirill Ponomarev <krion@FreeBSD.org>2004-01-19 23:34:48 +0000
commit486518fcaaa4b373ad28bfaa87b26523a50d9cd2 (patch)
treef353e6fbb8a862121294775d61b335e29d780799 /net/arpwatch-devel/files/patch-ac
parentAdd p5-DBI-Shell 11.93, interactive command shell for the DBI. (diff)
This is a development fork of arpwatch. This has been
threaded in order to better deal with the requirements of multi-interface routers. Information regarding MAC addresses and interfaces is maintained by the program, and an alert is issued should a device move between interfaces. In addition, event processing has been refactored, and some bugs have been fixed. PR: 59180 Submitted by: Matthew George <mdg@secureworks.net> Approved by: portmgr
Notes
Notes: svn path=/head/; revision=98614
Diffstat (limited to 'net/arpwatch-devel/files/patch-ac')
-rw-r--r--net/arpwatch-devel/files/patch-ac67
1 files changed, 67 insertions, 0 deletions
diff --git a/net/arpwatch-devel/files/patch-ac b/net/arpwatch-devel/files/patch-ac
new file mode 100644
index 000000000000..b15e941c5bf6
--- /dev/null
+++ b/net/arpwatch-devel/files/patch-ac
@@ -0,0 +1,67 @@
+--- ../arpwatch.orig/arpsnmp.c Sun Jan 17 20:47:40 1999
++++ ./arpsnmp.c Mon Sep 15 14:31:33 2003
+@@ -63,14 +63,17 @@
+ /* Forwards */
+ int main(int, char **);
+ int readsnmp(char *);
+-int snmp_add(u_int32_t, u_char *, time_t, char *);
++int snmp_add(u_int32_t, u_char *, time_t, char *, char *);
+ __dead void usage(void) __attribute__((volatile));
+
+ char *prog;
+
++char *Watcher;
++
+ extern int optind;
+ extern int opterr;
+ extern char *optarg;
++char *interface = NULL;
+
+ int
+ main(int argc, char **argv)
+@@ -90,7 +93,7 @@
+ }
+
+ opterr = 0;
+- while ((op = getopt(argc, argv, "df:")) != EOF)
++ while ((op = getopt(argc, argv, "df:m:")) != EOF)
+ switch (op) {
+
+ case 'd':
+@@ -105,6 +108,10 @@
+ arpfile = optarg;
+ break;
+
++ case 'm':
++ Watcher = optarg;
++ break;
++
+ default:
+ usage();
+ }
+@@ -138,7 +145,7 @@
+ static time_t now;
+
+ int
+-snmp_add(register u_int32_t a, register u_char *e, time_t t, register char *h)
++snmp_add(register u_int32_t a, register u_char *e, time_t t, register char *h, register char *i)
+ {
+ /* Watch for ethernet broadcast */
+ if (MEMCMP(e, zero, 6) == 0 || MEMCMP(e, allones, 6) == 0) {
+@@ -153,7 +160,7 @@
+ }
+
+ /* Use current time (although it would be nice to subtract idle time) */
+- return (ent_add(a, e, now, h));
++ return (ent_add(a, e, now, h, interface));
+ }
+
+ /* Process an snmp file */
+@@ -184,6 +191,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);
+ }