diff options
author | svn2git <svn2git@FreeBSD.org> | 1994-07-01 08:00:00 +0000 |
---|---|---|
committer | svn2git <svn2git@FreeBSD.org> | 1994-07-01 08:00:00 +0000 |
commit | 5e0e9b99dc3fc0ecd49d929db0d57c784b66f481 (patch) | |
tree | e779b5a6edddbb949b7990751b12d6f25304ba86 /sys/net/if_loop.c | |
parent | a16f65c7d117419bd266c28a1901ef129a337569 (diff) |
Diffstat (limited to 'sys/net/if_loop.c')
-rw-r--r-- | sys/net/if_loop.c | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c index 163712a66fd1..d9f5028b7e1d 100644 --- a/sys/net/if_loop.c +++ b/sys/net/if_loop.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)if_loop.c 7.13 (Berkeley) 4/26/91 - * $Id: if_loop.c,v 1.6 1993/12/20 19:31:29 wollman Exp $ + * $Id: if_loop.c,v 1.7 1994/05/17 22:30:55 jkh Exp $ */ /* @@ -95,7 +95,11 @@ loattach(void) ifp->if_name = "lo"; ifp->if_mtu = LOMTU; +#ifdef MULTICAST + ifp->if_flags = IFF_LOOPBACK|IFF_MULTICAST; +#else ifp->if_flags = IFF_LOOPBACK; +#endif ifp->if_ioctl = loioctl; ifp->if_output = looutput; ifp->if_type = IFT_LOOP; @@ -216,6 +220,9 @@ loioctl(ifp, cmd, data) caddr_t data; { register struct ifaddr *ifa; +#ifdef MULTICAST + register struct ifreq *ifr; +#endif int error = 0; switch (cmd) { @@ -230,6 +237,27 @@ loioctl(ifp, cmd, data) */ break; +#ifdef MULTICAST + case SIOCADDMULTI: + case SIOCDELMULTI: + ifr = (struct ifreq *)data; + if (ifr == 0) { + error = EAFNOSUPPORT; /* XXX */ + break; + } + switch (ifr->ifr_addr.sa_family) { + +#ifdef INET + case AF_INET: + break; +#endif + + default: + error = EAFNOSUPPORT; + break; + } + break; +#endif default: error = EINVAL; } |