summaryrefslogtreecommitdiffstats
path: root/openwrt/package/arpwatch/patches/014_debian_opt_mailto
blob: 50e7491af25a97871bf4b927dcac8339d2259044 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
Index: arpwatch/arpsnmp.8
diff -u arpwatch/arpsnmp.8:1.1.1.1 arpwatch/arpsnmp.8:1.1.1.1.12.1
--- arpwatch/arpsnmp.8:1.1.1.1	Tue Apr 17 13:31:36 2001
+++ arpwatch/arpsnmp.8	Tue Apr 17 13:54:38 2001
@@ -28,6 +28,9 @@
 [
 .B -d
 ] [
+.B -m
+.I addr
+] [
 .B -f
 .I datafile
 ]
@@ -48,6 +51,13 @@
 flag is used enable debugging. This also inhibits mailing the reports.
 Instead, they are sent to
 .IR stderr .
+.LP
+The
+.B -m
+option is used to specify the e-mail address to which reports will be
+sent.  By default, reports are sent to
+.I root
+on the local machine. (Debian specific)
 .LP
 The
 .B -f
Index: arpwatch/arpsnmp.c
diff -u arpwatch/arpsnmp.c:1.1.1.1.2.1 arpwatch/arpsnmp.c:1.1.1.1.2.1.8.1
--- arpwatch/arpsnmp.c:1.1.1.1.2.1	Tue Apr 17 13:47:57 2001
+++ arpwatch/arpsnmp.c	Tue Apr 17 13:54:38 2001
@@ -80,6 +80,7 @@
 	char errbuf[256];
 	char options[] =
 		"d"
+		"m:"
 		"f:"
 	;
 
@@ -105,6 +106,10 @@
 #endif
 			break;
 
+		case 'm':
+			mailaddress = optarg;
+			break;
+
 		case 'f':
 			arpfile = optarg;
 			break;
@@ -187,6 +192,7 @@
 	extern char version[];
 	char usage[] =
 		"[-d] "
+		"[-m addr ] "
 		"[-f datafile] "
 		"file [...]\n"
 	;
Index: arpwatch/arpwatch.8
diff -u arpwatch/arpwatch.8:1.1.1.1 arpwatch/arpwatch.8:1.1.1.1.12.1
--- arpwatch/arpwatch.8:1.1.1.1	Tue Apr 17 13:31:36 2001
+++ arpwatch/arpwatch.8	Tue Apr 17 13:54:38 2001
@@ -38,6 +38,10 @@
 .br
 .ti +8
 [
+.B -m
+.I addr
+]
+[
 .B -n
 .IR net [/ width
 ]] [
@@ -69,6 +73,13 @@
 The
 .B -i
 flag is used to override the default interface.
+.LP
+The
+.B -m
+option is used to specify the e-mail address to which reports will be
+sent.  By default, reports are sent to
+.I root
+on the local machine. (Debian specific)
 .LP
 The
 .B -n
Index: arpwatch/arpwatch.c
diff -u arpwatch/arpwatch.c:1.1.1.1.2.1 arpwatch/arpwatch.c:1.1.1.1.2.1.8.1
--- arpwatch/arpwatch.c:1.1.1.1.2.1	Tue Apr 17 13:47:57 2001
+++ arpwatch/arpwatch.c	Tue Apr 17 13:54:38 2001
@@ -157,6 +157,7 @@
 		"d"
 		"f:"
 		"i:"
+		"m:"
 		"n:"
 		"N"
 		"r:"
@@ -197,6 +198,10 @@
 			interface = optarg;
 			break;
 
+		case 'm':
+			mailaddress = optarg;
+			break;
+
 		case 'n':
 			if (!addnet(optarg))
 				usage();
@@ -760,6 +765,7 @@
 		"[-dN] "
 		"[-f datafile] "
 		"[-i interface] "
+		"[-m addr] "
 		"[-n net[/width]] "
 		"[-r file] "
 		"\n"
Index: arpwatch/report.c
diff -u arpwatch/report.c:1.1.1.1 arpwatch/report.c:1.1.1.1.12.1
--- arpwatch/report.c:1.1.1.1	Tue Apr 17 13:31:37 2001
+++ arpwatch/report.c	Tue Apr 17 13:54:38 2001
@@ -240,7 +240,7 @@
 	register FILE *f;
 	char tempfile[64], cpu[64], os[64];
 	char *fmt = "%20s: %s\n";
-	char *watcher = WATCHER;
+	char *watcher = mailaddress;
 	char *watchee = WATCHEE;
 	char *sendmail = PATH_SENDMAIL;
 	char *unknown = "<unknown>";
Index: arpwatch/util.c
diff -u arpwatch/util.c:1.1.1.1 arpwatch/util.c:1.1.1.1.12.1
--- arpwatch/util.c:1.1.1.1	Tue Apr 17 13:31:37 2001
+++ arpwatch/util.c	Tue Apr 17 13:54:38 2001
@@ -50,10 +50,12 @@
 #include "ec.h"
 #include "file.h"
 #include "util.h"
+#include "addresses.h"
 
 char *arpdir = ARPDIR;
 char *arpfile = ARPFILE;
 char *ethercodes = ETHERCODES;
+char *mailaddress = WATCHER;
 
 /* Broadcast ethernet addresses */
 u_char zero[6] = { 0, 0, 0, 0, 0, 0 };
Index: arpwatch/util.h
diff -u arpwatch/util.h:1.1.1.1 arpwatch/util.h:1.1.1.1.12.1
--- arpwatch/util.h:1.1.1.1	Tue Apr 17 13:31:37 2001
+++ arpwatch/util.h	Tue Apr 17 13:54:38 2001
@@ -11,6 +11,7 @@
 extern char *arpfile;
 extern char *oldarpfile;
 extern char *ethercodes;
+extern char *mailaddress;
 
 extern u_char zero[6];
 extern u_char allones[6];