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