]> git.pld-linux.org Git - packages/arpwatch.git/blame - arpwatch-debian_10getopt_patchable.patch
- 2.1a15
[packages/arpwatch.git] / arpwatch-debian_10getopt_patchable.patch
CommitLineData
e2fb63d0
TP
1Index: arpwatch/arpsnmp.8
2diff -u arpwatch/arpsnmp.8:1.1.1.1 arpwatch/arpsnmp.8:1.1.1.1.2.1
3--- arpwatch/arpsnmp.8:1.1.1.1 Tue Apr 17 13:31:36 2001
4+++ arpwatch/arpsnmp.8 Thu Aug 12 22:16:18 2004
5@@ -27,10 +27,19 @@
6 .B arpsnmp
7 [
8 .B -d
9-] [
10+]
11+.\" **
12+.\" **
13+.br
14+.ti +8
15+[
16 .B -f
17 .I datafile
18 ]
19+.\" **
20+.\" **
21+.br
22+.ti +8
23 .I file
24 [
25 .I ...
26@@ -42,18 +51,24 @@
27 .B Arpsnmp
28 reads information from a file (usually generated by
29 .BR snmpwalk (8)).
30+.\" **
31+.\" **
32 .LP
33 The
34 .B -d
35 flag is used enable debugging. This also inhibits mailing the reports.
36 Instead, they are sent to
37 .IR stderr .
38+.\" **
39+.\" **
40 .LP
41 The
42 .B -f
43 flag is used to set the ethernet/ip address database filename.
44 The default is
45 .IR arp.dat .
46+.\" **
47+.\" **
48 .LP
49 Note that an empty
50 .I arp.dat
51Index: arpwatch/arpsnmp.c
52diff -u arpwatch/arpsnmp.c:1.1.1.2 arpwatch/arpsnmp.c:1.1.1.1.2.2
53--- arpwatch/arpsnmp.c:1.1.1.2 Tue Aug 10 10:53:34 2004
54+++ arpwatch/arpsnmp.c Tue Aug 10 11:14:13 2004
55@@ -78,6 +78,10 @@
56 register char *cp;
57 register int op, i;
58 char errbuf[256];
59+ char options[] =
60+ "d"
61+ "f:"
62+ ;
63
64 if ((cp = strrchr(argv[0], '/')) != NULL)
65 prog = cp + 1;
66@@ -90,7 +94,7 @@
67 }
68
69 opterr = 0;
70- while ((op = getopt(argc, argv, "df:")) != EOF)
71+ while ((op = getopt(argc, argv, options)) != EOF)
72 switch (op) {
73
74 case 'd':
75@@ -182,9 +186,14 @@
76 usage(void)
77 {
78 extern char version[];
79+ char usage[] =
80+ "[-d] "
81+ "[-f datafile] "
82+ "file [...]\n"
83+ ;
84
85 (void)fprintf(stderr, "Version %s\n", version);
86 (void)fprintf(stderr,
87- "usage: %s [-d] [-f datafile] file [...]\n", prog);
88+ "usage: %s %s", prog, usage);
89 exit(1);
90 }
91Index: arpwatch/arpwatch.8
92diff -u arpwatch/arpwatch.8:1.1.1.1 arpwatch/arpwatch.8:1.1.1.1.2.2
93--- arpwatch/arpwatch.8:1.1.1.1 Tue Apr 17 13:31:36 2001
94+++ arpwatch/arpwatch.8 Thu Aug 12 22:31:09 2004
95@@ -26,12 +26,24 @@
96 .SH SYNOPSIS
97 .na
98 .B arpwatch
99+.\" **
100+.\" **
101 [
102 .B -dN
103-] [
104+]
105+.\" **
106+.\" **
107+.br
108+.ti +8
109+[
110 .B -f
111 .I datafile
112-] [
113+]
114+.\" **
115+.\" **
116+.br
117+.ti +8
118+[
119 .B -i
120 .I interface
121 ]
122@@ -40,10 +52,17 @@
123 [
124 .B -n
125 .IR net [/ width
126-]] [
127+]]
128+.\" **
129+.\" **
130+.br
131+.ti +8
132+[
133 .B -r
134 .I file
135 ]
136+.\" **
137+.\" **
138 .ad
139 .SH DESCRIPTION
140 .B Arpwatch
141@@ -53,22 +72,30 @@
142 uses
143 .BR pcap (3)
144 to listen for arp packets on a local ethernet interface.
145+.\" **
146+.\" **
147 .LP
148 The
149 .B -d
150 flag is used enable debugging. This also inhibits forking into the
151 background and emailing the reports. Instead, they are sent to
152 .IR stderr .
153+.\" **
154+.\" **
155 .LP
156 The
157 .B -f
158 flag is used to set the ethernet/ip address database filename.
159 The default is
160 .IR arp.dat .
161+.\" **
162+.\" **
163 .LP
164 The
165 .B -i
166 flag is used to override the default interface.
167+.\" **
168+.\" **
169 .LP
170 The
171 .B -n
172@@ -77,10 +104,14 @@
173 on the same wire. If the optional
174 .I width
175 is not specified, the default netmask for the network's class is used.
176+.\" **
177+.\" **
178 .LP
179 The
180 .B -N
181 flag disables reporting any bogons.
182+.\" **
183+.\" **
184 .LP
185 The
186 .B -r
187@@ -93,11 +124,15 @@
188 of reading from the network. In this case,
189 .B arpwatch
190 does not fork.
191+.\" **
192+.\" **
193 .LP
194 Note that an empty
195 .I arp.dat
196 file must be created before the first time you run
197 .BR arpwatch .
198+.\" **
199+.\" **
200 .LP
201 .SH "REPORT MESSAGES"
202 Here's a quick list of the report messages generated by
203Index: arpwatch/arpwatch.c
204diff -u arpwatch/arpwatch.c:1.1.1.1 arpwatch/arpwatch.c:1.1.1.1.2.5
205--- arpwatch/arpwatch.c:1.1.1.1 Tue Apr 17 13:31:36 2001
206+++ arpwatch/arpwatch.c Sat Aug 14 02:33:07 2004
207@@ -153,6 +153,26 @@
208 register char *interface, *rfilename;
209 struct bpf_program code;
210 char errbuf[PCAP_ERRBUF_SIZE];
211+ char options[] =
212+ "d"
213+ /**/
214+ /**/
215+ "f:"
216+ /**/
217+ /**/
218+ "i:"
219+ /**/
220+ /**/
221+ "n:"
222+ /**/
223+ /**/
224+ "N"
225+ /**/
226+ /**/
227+ "r:"
228+ /**/
229+ /**/
230+ ;
231
232 if (argv[0] == NULL)
233 prog = "arpwatch";
234@@ -170,7 +190,7 @@
235 interface = NULL;
236 rfilename = NULL;
237 pd = NULL;
238- while ((op = getopt(argc, argv, "df:i:n:Nr:")) != EOF)
239+ while ((op = getopt(argc, argv, options)) != EOF)
240 switch (op) {
241
242 case 'd':
243@@ -201,7 +221,8 @@
244 case 'r':
245 rfilename = optarg;
246 break;
247-
248+ /**/
249+ /**/
250 default:
251 usage();
252 }
253@@ -748,9 +769,26 @@
254 usage(void)
255 {
256 extern char version[];
257+ char usage[] =
258+ "[-dN] "
259+ /**/
260+ /**/
261+ "[-f datafile] "
262+ /**/
263+ /**/
264+ "[-i interface] "
265+ /**/
266+ /**/
267+ "[-n net[/width]] "
268+ /**/
269+ /**/
270+ "[-r file] "
271+ /**/
272+ /**/
273+ "\n"
274+ ;
275
276 (void)fprintf(stderr, "Version %s\n", version);
277- (void)fprintf(stderr, "usage: %s [-dN] [-f datafile] [-i interface]"
278- " [-n net[/width]] [-r file]\n", prog);
279+ (void)fprintf(stderr, "usage: %s %s", prog, usage);
280 exit(1);
281 }
282Index: arpwatch/util.c
283diff -u arpwatch/util.c:1.1.1.2 arpwatch/util.c:1.1.1.1.2.2
284--- arpwatch/util.c:1.1.1.2 Tue Aug 10 10:53:34 2004
285+++ arpwatch/util.c Fri Aug 13 00:06:49 2004
286@@ -61,6 +61,8 @@
287
288 int debug = 0;
289 int initializing = 1; /* true if initializing */
290+/**/
291+/**/
292
293 /* syslog() helper routine */
294 void
295Index: arpwatch/util.h
296diff -u arpwatch/util.h:1.1.1.1 arpwatch/util.h:1.1.1.1.2.1
297--- arpwatch/util.h:1.1.1.1 Tue Apr 17 13:31:37 2001
298+++ arpwatch/util.h Fri Aug 13 00:06:49 2004
299@@ -17,3 +17,5 @@
300
301 extern int debug;
302 extern int initializing;
303+/**/
304+/**/
This page took 0.662442 seconds and 4 git commands to generate.