summaryrefslogtreecommitdiffstats
path: root/sys/net/if.h
diff options
context:
space:
mode:
authorsobomax <sobomax@FreeBSD.org>2002-08-19 15:16:38 +0000
committersobomax <sobomax@FreeBSD.org>2002-08-19 15:16:38 +0000
commite50e3b03ec109b238fb7d960a5be0b08961b41d4 (patch)
tree2e1436eccf89dbd4a420091b15a0d5dd78911874 /sys/net/if.h
parentbe3fb716390064e92134d98e272ab35537b33ce9 (diff)
downloadFreeBSD-src-e50e3b03ec109b238fb7d960a5be0b08961b41d4.zip
FreeBSD-src-e50e3b03ec109b238fb7d960a5be0b08961b41d4.tar.gz
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 <pa3op@ukr-link.net> Valuable suggestions by: fenner
Diffstat (limited to 'sys/net/if.h')
-rw-r--r--sys/net/if.h3
1 files changed, 2 insertions, 1 deletions
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 */
OpenPOWER on IntegriCloud