add arpwatch and nocatsplash
[openwrt.git] / openwrt / package / arpwatch / patches / 012_debian_opt_nopromisc
1 Index: arpwatch/arpwatch.8
2 diff -u arpwatch/arpwatch.8:1.1.1.1 arpwatch/arpwatch.8:1.1.1.1.6.1
3 --- arpwatch/arpwatch.8:1.1.1.1 Tue Apr 17 13:31:36 2001
4 +++ arpwatch/arpwatch.8 Tue Apr 17 13:50:23 2001
5 @@ -29,6 +29,8 @@
6 [
7 .B -dN
8 ] [
9 +.B -p
10 +] [
11 .B -f
12 .I datafile
13 ] [
14 @@ -81,6 +83,15 @@
15 The
16 .B -N
17 flag disables reporting any bogons.
18 +.LP
19 +The
20 +.B -p
21 +flag disables promiscuous operation. ARP broadcasts get through hubs without
22 +having the interface in promiscuous mode, while saving considerable resources
23 +that would be wasted on processing gigabytes of non-broadcast traffic. OTOH,
24 +setting promiscuous mode does not mean getting 100% traffic that would concern
25 +.B arpwatch .
26 +YMMV. (Debian specific)
27 .LP
28 The
29 .B -r
30 Index: arpwatch/arpwatch.c
31 diff -u arpwatch/arpwatch.c:1.1.1.1.2.1 arpwatch/arpwatch.c:1.1.1.1.2.1.4.1
32 --- arpwatch/arpwatch.c:1.1.1.1.2.1 Tue Apr 17 13:47:57 2001
33 +++ arpwatch/arpwatch.c Tue Apr 17 13:50:23 2001
34 @@ -159,6 +159,7 @@
35 "i:"
36 "n:"
37 "N"
38 + "p"
39 "r:"
40 ;
41
42 @@ -206,6 +207,10 @@
43 ++nobogons;
44 break;
45
46 + case 'p':
47 + ++nopromisc;
48 + break;
49 +
50 case 'r':
51 rfilename = optarg;
52 break;
53 @@ -277,7 +282,7 @@
54 snaplen = max(sizeof(struct ether_header),
55 sizeof(struct fddi_header)) + sizeof(struct ether_arp);
56 timeout = 1000;
57 - pd = pcap_open_live(interface, snaplen, 1, timeout, errbuf);
58 + pd = pcap_open_live(interface, snaplen, !nopromisc, timeout, errbuf);
59 if (pd == NULL) {
60 syslog(LOG_ERR, "pcap open %s: %s", interface, errbuf);
61 exit(1);
62 @@ -758,6 +763,7 @@
63 extern char version[];
64 char usage[] =
65 "[-dN] "
66 + "[-p] "
67 "[-f datafile] "
68 "[-i interface] "
69 "[-n net[/width]] "
70 Index: arpwatch/util.c
71 diff -u arpwatch/util.c:1.1.1.1 arpwatch/util.c:1.1.1.1.6.1
72 --- arpwatch/util.c:1.1.1.1 Tue Apr 17 13:31:37 2001
73 +++ arpwatch/util.c Tue Apr 17 13:50:23 2001
74 @@ -61,6 +61,7 @@
75
76 int debug = 0;
77 int initializing = 1; /* true if initializing */
78 +int nopromisc = 0; /* don't activate promisc mode */
79
80 /* syslog() helper routine */
81 void
82 Index: arpwatch/util.h
83 diff -u arpwatch/util.h:1.1.1.1 arpwatch/util.h:1.1.1.1.6.1
84 --- arpwatch/util.h:1.1.1.1 Tue Apr 17 13:31:37 2001
85 +++ arpwatch/util.h Tue Apr 17 13:50:23 2001
86 @@ -17,3 +17,4 @@
87
88 extern int debug;
89 extern int initializing;
90 +extern int nopromisc;
This page took 0.054115 seconds and 5 git commands to generate.