Subject: nul interface?
To: None <tech-net@netbsd.org>
From: Andrew Brown <atatat@atatdot.net>
List: tech-net
Date: 10/24/2001 21:41:42
i was thinking that having a nul network interface might be useful for
some purposes. at the very least, all the reject routes that get
installed could be changed to dump traffic out a nul interface
instead, which might make visual inspection of the routing table easier.
i made one a while back, and while i don't have the code any more, i
seem to recall it being not much more than a pseudo-device (just like
lo), and a copy of net/if_loop.c with the names all changed to
nulfoo()) instead of lofoo(). the one difference was the nuloutput()
routine which turned into something like this:
/* ARGSUSED */
int
nuloutput(ifp, m, dst, rt)
struct ifnet *ifp;
struct mbuf *m;
struct sockaddr *dst;
struct rtentry *rt;
{
m_freem(m);
return (0);
}
so that all traffic that went that way would just disappear.
how many people think this is a silly idea?
--
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org * "ah! i see you have the internet
twofsonet@graffiti.com (Andrew Brown) that goes *ping*!"
andrew@crossbar.com * "information is power -- share the wealth."