X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/32631928f6b9a3637bf84637adad2abe0a85b1a3..033b73edc63d96106cd4bb63d2cf3ee065abad26:/sys/net/if_loop.c diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c index fee81ac61b..037d99f461 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.5 1993/11/25 01:34:03 wollman Exp $ + * $Id: if_loop.c,v 1.6 1993/12/20 19:31:29 wollman 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; }