add screen
[openwrt.git] / package / arpwatch / patches / 013_debian_opt_allsubnets
1 Index: arpwatch/arpwatch.8
2 diff -u arpwatch/arpwatch.8:1.1.1.1 arpwatch/arpwatch.8:1.1.1.1.8.1
3 --- arpwatch/arpwatch.8:1.1.1.1 Tue Apr 17 13:31:36 2001
4 +++ arpwatch/arpwatch.8 Tue Apr 17 13:51:23 2001
5 @@ -27,6 +27,8 @@
6 .na
7 .B arpwatch
8 [
9 +.B -a
10 +] [
11 .B -dN
12 ] [
13 .B -f
14 @@ -53,6 +55,17 @@
15 uses
16 .BR pcap (3)
17 to listen for arp packets on a local ethernet interface.
18 +.LP
19 +.B -a
20 +By default,
21 +.B arpwatch
22 +reports bogons (unless
23 +.B -N
24 +is given) for IP addresses that are in the same subnet than the
25 +first IP address of the default interface. If this option is
26 +specified,
27 +.B arpwatch
28 +will report bogons about every IP addresses. (Debian specific)
29 .LP
30 The
31 .B -d
32 Index: arpwatch/arpwatch.c
33 diff -u arpwatch/arpwatch.c:1.1.1.1.2.1 arpwatch/arpwatch.c:1.1.1.1.2.1.6.1
34 --- arpwatch/arpwatch.c:1.1.1.1.2.1 Tue Apr 17 13:47:57 2001
35 +++ arpwatch/arpwatch.c Tue Apr 17 13:51:23 2001
36 @@ -154,6 +154,7 @@
37 struct bpf_program code;
38 char errbuf[PCAP_ERRBUF_SIZE];
39 char options[] =
40 + "a"
41 "d"
42 "f:"
43 "i:"
44 @@ -181,6 +182,10 @@
45 while ((op = getopt(argc, argv, options)) != EOF)
46 switch (op) {
47
48 + case 'a':
49 + ++allsubnets;
50 + break;
51 +
52 case 'd':
53 ++debug;
54 #ifndef DEBUG
55 @@ -389,7 +394,7 @@
56 /* Watch for bogons */
57 if (isbogon(sia)) {
58 dosyslog(LOG_INFO, "bogon", sia, sea, sha);
59 - return;
60 + if (!allsubnets) return;
61 }
62
63 /* Watch for ethernet broadcast */
64 @@ -538,7 +543,7 @@
65 /* Watch for bogons */
66 if (isbogon(sia)) {
67 dosyslog(LOG_INFO, "bogon", sia, sea, sha);
68 - return;
69 + if (!allsubnets) return;
70 }
71
72 /* Watch for ethernet broadcast */
73 @@ -757,6 +762,7 @@
74 {
75 extern char version[];
76 char usage[] =
77 + "[-a] "
78 "[-dN] "
79 "[-f datafile] "
80 "[-i interface] "
81 Index: arpwatch/util.c
82 diff -u arpwatch/util.c:1.1.1.1 arpwatch/util.c:1.1.1.1.8.1
83 --- arpwatch/util.c:1.1.1.1 Tue Apr 17 13:31:37 2001
84 +++ arpwatch/util.c Tue Apr 17 13:51:24 2001
85 @@ -59,6 +59,7 @@
86 u_char zero[6] = { 0, 0, 0, 0, 0, 0 };
87 u_char allones[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
88
89 +int allsubnets = 0; /* watch all attached subnets */
90 int debug = 0;
91 int initializing = 1; /* true if initializing */
92
93 Index: arpwatch/util.h
94 diff -u arpwatch/util.h:1.1.1.1 arpwatch/util.h:1.1.1.1.8.1
95 --- arpwatch/util.h:1.1.1.1 Tue Apr 17 13:31:37 2001
96 +++ arpwatch/util.h Tue Apr 17 13:51:24 2001
97 @@ -15,5 +15,6 @@
98 extern u_char zero[6];
99 extern u_char allones[6];
100
101 +extern int allsubnets;
102 extern int debug;
103 extern int initializing;
This page took 0.04443 seconds and 5 git commands to generate.