summaryrefslogtreecommitdiffstats
path: root/sbin/ifconfig/ifconfig.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2002-09-27 18:57:47 +0000
committerphk <phk@FreeBSD.org>2002-09-27 18:57:47 +0000
commitd61cac74b0dc667b645880b386219cacfb3c53f6 (patch)
tree2e0b7f0095d2053a63219572fbeafde682841ff6 /sbin/ifconfig/ifconfig.c
parent834ddd1bcc092e4a26f16724892636b249316d70 (diff)
downloadFreeBSD-src-d61cac74b0dc667b645880b386219cacfb3c53f6.zip
FreeBSD-src-d61cac74b0dc667b645880b386219cacfb3c53f6.tar.gz
Add the "Monitor" interface flag.
Setting this flag on an ethernet interface blocks transmission of packets and discards incoming packets after BPF processing. This is useful if you want to monitor network trafic but not interact with the network in question. Sponsored by: http://www.babeltech.dk
Diffstat (limited to 'sbin/ifconfig/ifconfig.c')
-rw-r--r--sbin/ifconfig/ifconfig.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index c9ab382..35ac555 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -241,6 +241,8 @@ struct cmd {
{ "-link1", -IFF_LINK1, setifflags },
{ "link2", IFF_LINK2, setifflags },
{ "-link2", -IFF_LINK2, setifflags },
+ { "monitor", IFF_MONITOR, setifflags },
+ { "-monitor", -IFF_MONITOR, setifflags },
#ifdef USE_IF_MEDIA
{ "media", NEXTARG, setmedia },
{ "mediaopt", NEXTARG, setmediaopt },
OpenPOWER on IntegriCloud