]> git.pld-linux.org Git - packages/arpwatch.git/blame - arpwatch-debian_12opt_nopromisc.patch
- added ac264.patch
[packages/arpwatch.git] / arpwatch-debian_12opt_nopromisc.patch
CommitLineData
e2fb63d0
TP
1Index: arpwatch/arpwatch.8
2diff -u arpwatch/arpwatch.8:1.1.1.1.2.2 arpwatch/arpwatch.8:1.1.1.1.6.4
3--- arpwatch/arpwatch.8:1.1.1.1.2.2 Thu Aug 12 22:31:09 2004
4+++ arpwatch/arpwatch.8 Thu Aug 12 22:30:19 2004
5@@ -63,6 +63,13 @@
6 ]
7 .\" **
8 .\" **
9+.br
10+.ti +8
11+[
12+.B -p
13+]
14+.\" **
15+.\" **
16 .ad
17 .SH DESCRIPTION
18 .B Arpwatch
19@@ -127,6 +134,17 @@
20 .\" **
21 .\" **
22 .LP
23+(Debian) The
24+.B -p
25+flag disables promiscuous operation. ARP broadcasts get through hubs without
26+having the interface in promiscuous mode, while saving considerable resources
27+that would be wasted on processing gigabytes of non-broadcast traffic. OTOH,
28+setting promiscuous mode does not mean getting 100% traffic that would concern
29+.B arpwatch .
30+YMMV.
31+.\" **
32+.\" **
33+.LP
34 Note that an empty
35 .I arp.dat
36 file must be created before the first time you run
37Index: arpwatch/arpwatch.c
38diff -u arpwatch/arpwatch.c:1.1.1.1.2.5 arpwatch/arpwatch.c:1.1.1.1.2.1.4.3
39--- arpwatch/arpwatch.c:1.1.1.1.2.5 Sat Aug 14 02:33:07 2004
40+++ arpwatch/arpwatch.c Fri Aug 13 00:14:41 2004
41@@ -172,6 +172,9 @@
42 "r:"
43 /**/
44 /**/
45+ "p"
46+ /**/
47+ /**/
48 ;
49
50 if (argv[0] == NULL)
51@@ -223,6 +226,11 @@
52 break;
53 /**/
54 /**/
55+ case 'p':
56+ ++nopromisc;
57+ break;
58+ /**/
59+ /**/
60 default:
61 usage();
62 }
63@@ -290,7 +298,7 @@
64 snaplen = max(sizeof(struct ether_header),
65 sizeof(struct fddi_header)) + sizeof(struct ether_arp);
66 timeout = 1000;
67- pd = pcap_open_live(interface, snaplen, 1, timeout, errbuf);
68+ pd = pcap_open_live(interface, snaplen, !nopromisc, timeout, errbuf);
69 if (pd == NULL) {
70 syslog(LOG_ERR, "pcap open %s: %s", interface, errbuf);
71 exit(1);
72@@ -785,6 +793,9 @@
73 "[-r file] "
74 /**/
75 /**/
76+ "[-p] "
77+ /**/
78+ /**/
79 "\n"
80 ;
81
82Index: arpwatch/util.c
83diff -u arpwatch/util.c:1.1.1.1.2.2 arpwatch/util.c:1.1.1.1.6.3
84--- arpwatch/util.c:1.1.1.1.2.2 Fri Aug 13 00:06:49 2004
85+++ arpwatch/util.c Fri Aug 13 00:14:41 2004
86@@ -63,6 +63,9 @@
87 int initializing = 1; /* true if initializing */
88 /**/
89 /**/
90+int nopromisc = 0; /* don't activate promisc mode */
91+/**/
92+/**/
93
94 /* syslog() helper routine */
95 void
96Index: arpwatch/util.h
97diff -u arpwatch/util.h:1.1.1.1.2.1 arpwatch/util.h:1.1.1.1.6.2
98--- arpwatch/util.h:1.1.1.1.2.1 Fri Aug 13 00:06:49 2004
99+++ arpwatch/util.h Fri Aug 13 00:14:41 2004
100@@ -19,3 +19,6 @@
101 extern int initializing;
102 /**/
103 /**/
104+extern int nopromisc;
105+/**/
106+/**/
This page took 0.081291 seconds and 4 git commands to generate.