Re: Too Much ARP-ing

Erik Walthinsen (omega@teleport.com)
Sun, 26 Jan 1997 20:07:50 -0800 (PST)


On Sun, 26 Jan 1997, Phil Lewis wrote:

> Your ethernet card is in promiscuous mode.

I checked the code for tcpdump, and found the code that turns promiscuous
mode on in tcpdump-3.0.4-1/libpcap-0.0.6/pcap-bpf.c:

if (promisc)
/* set promiscuous mode, okay if it fails */
(void)ioctl(p->fd, BIOCPROMISC, NULL);

But I can't find BIOCPROMISC anywhere! In /usr/include/linux/if.h
there's:

#define IFF_PROMISC 0x100 /* receive all packets */

...but that's just part of a bitfield. I then checked the kernel code and
found 'PROMISC' in net/802/{fddi,tr}.c, but that's for FDDI and TokenRing,
not ether. And of course it's all over the drivers/net/* files...

Anyone care to explain how promiscuous mode is set/unset?

TIA,
Omega

Erik Walthinsen - Programmer, webmaster, 3D artist, etc. __
__ / /\
/ \ omega@sequent.com Work: (503)578-5314 / / \
| | M E G A omega@teleport.com Home: (503)281-4281 / / /\ \
_\ /_ psu12113@odin.cc.pdx.edu Majoring in CS / / /\ \ \
/ /_/__\ \ \
Omega Station: http://www.teleport.com/~omega/ /________\ \ \
Info on Linux, Graphics, Descent, Laptops, etc. \___________\/