From e50e3b03ec109b238fb7d960a5be0b08961b41d4 Mon Sep 17 00:00:00 2001 From: sobomax Date: Mon, 19 Aug 2002 15:16:38 +0000 Subject: Implement user-setable promiscuous mode (a new `promisc' flag for ifconfig(8)). Also, for all interfaces in this mode pass all ethernet frames to upper layer, even those not addressed to our own MAC, which allows packets encapsulated in those frames be processed with packet filters (ipfw(8) et al). Emphatically requested by: Anton Turygin Valuable suggestions by: fenner --- sys/net/if.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys/net/if.h') diff --git a/sys/net/if.h b/sys/net/if.h index fc95786..8453ff5 100644 --- a/sys/net/if.h +++ b/sys/net/if.h @@ -140,11 +140,12 @@ struct if_data { #define IFF_ALTPHYS IFF_LINK2 /* use alternate physical connection */ #define IFF_MULTICAST 0x8000 /* supports multicast */ #define IFF_POLLING 0x10000 /* Interface is in polling mode. */ +#define IFF_PPROMISC 0x20000 /* user-requested promisc mode */ /* flags set internally only: */ #define IFF_CANTCHANGE \ (IFF_BROADCAST|IFF_POINTOPOINT|IFF_RUNNING|IFF_OACTIVE|\ - IFF_SIMPLEX|IFF_MULTICAST|IFF_ALLMULTI|IFF_SMART) + IFF_SIMPLEX|IFF_MULTICAST|IFF_ALLMULTI|IFF_SMART|IFF_PROMISC) /* Capabilities that interfaces can advertise. */ #define IFCAP_RXCSUM 0x0001 /* can offload checksum on RX */ -- cgit v1.1