diff --git a/sys/arch/i386/isa/if_ed.c b/sys/arch/i386/isa/if_ed.c index 022a62f0630a..3410361a3647 100644 --- a/sys/arch/i386/isa/if_ed.c +++ b/sys/arch/i386/isa/if_ed.c @@ -20,7 +20,7 @@ */ /* - * $Id: if_ed.c,v 1.19 1994/02/01 17:22:22 ws Exp $ + * $Id: if_ed.c,v 1.20 1994/02/02 06:14:54 hpeyerl Exp $ */ /* @@ -997,9 +997,7 @@ ed_attach(isa_dev) | IFF_ALTPHYS); else ifp->if_flags = (IFF_BROADCAST | IFF_SIMPLEX | IFF_NOTRAILERS); -#ifdef MULTICAST ifp->if_flags |= IFF_MULTICAST; -#endif /* * Attach the interface @@ -1225,7 +1223,6 @@ ed_init(unit) for (i = 0; i < ETHER_ADDR_LEN; ++i) outb(sc->nic_addr + ED_P1_PAR0 + i, sc->arpcom.ac_enaddr[i]); -#ifdef MULTICAST /* set up multicast addresses and filter modes */ if (sc != 0 && (ifp->if_flags & IFF_MULTICAST) != 0) { u_long mcaf[2]; @@ -1242,7 +1239,6 @@ ed_init(unit) for (i = 0; i < 8; i++) outb(sc->nic_addr + ED_P1_MAR0 + i, ((u_char *)mcaf)[i]); } -#endif /* * Set Current Page pointer to next_packet (initialized above) */ @@ -1289,9 +1285,7 @@ ed_init(unit) for (j = 0; j < 8; j++) outb(sc->nic_addr + ED_P1_MAR0 + j, 0xff); } -#ifdef MULTICAST i |= ED_RCR_AM; -#endif } outb(sc->nic_addr + ED_P0_RCR, i); @@ -1942,7 +1936,6 @@ ed_ioctl(ifp, command, data) */ break; -#ifdef MULTICAST case SIOCADDMULTI: case SIOCDELMULTI: /* @@ -1962,7 +1955,6 @@ ed_ioctl(ifp, command, data) error = 0; } break; -#endif default: error = EINVAL; } @@ -2422,7 +2414,6 @@ ed_ring_to_mbuf(sc,src,dst,total_len) return (m); } -#ifdef MULTICAST /* * Compute crc for ethernet address */ @@ -2480,5 +2471,3 @@ ds_getmcaf(sc, mcaf) } } #endif -#endif - diff --git a/sys/dev/isa/if_ed.c b/sys/dev/isa/if_ed.c index 022a62f0630a..3410361a3647 100644 --- a/sys/dev/isa/if_ed.c +++ b/sys/dev/isa/if_ed.c @@ -20,7 +20,7 @@ */ /* - * $Id: if_ed.c,v 1.19 1994/02/01 17:22:22 ws Exp $ + * $Id: if_ed.c,v 1.20 1994/02/02 06:14:54 hpeyerl Exp $ */ /* @@ -997,9 +997,7 @@ ed_attach(isa_dev) | IFF_ALTPHYS); else ifp->if_flags = (IFF_BROADCAST | IFF_SIMPLEX | IFF_NOTRAILERS); -#ifdef MULTICAST ifp->if_flags |= IFF_MULTICAST; -#endif /* * Attach the interface @@ -1225,7 +1223,6 @@ ed_init(unit) for (i = 0; i < ETHER_ADDR_LEN; ++i) outb(sc->nic_addr + ED_P1_PAR0 + i, sc->arpcom.ac_enaddr[i]); -#ifdef MULTICAST /* set up multicast addresses and filter modes */ if (sc != 0 && (ifp->if_flags & IFF_MULTICAST) != 0) { u_long mcaf[2]; @@ -1242,7 +1239,6 @@ ed_init(unit) for (i = 0; i < 8; i++) outb(sc->nic_addr + ED_P1_MAR0 + i, ((u_char *)mcaf)[i]); } -#endif /* * Set Current Page pointer to next_packet (initialized above) */ @@ -1289,9 +1285,7 @@ ed_init(unit) for (j = 0; j < 8; j++) outb(sc->nic_addr + ED_P1_MAR0 + j, 0xff); } -#ifdef MULTICAST i |= ED_RCR_AM; -#endif } outb(sc->nic_addr + ED_P0_RCR, i); @@ -1942,7 +1936,6 @@ ed_ioctl(ifp, command, data) */ break; -#ifdef MULTICAST case SIOCADDMULTI: case SIOCDELMULTI: /* @@ -1962,7 +1955,6 @@ ed_ioctl(ifp, command, data) error = 0; } break; -#endif default: error = EINVAL; } @@ -2422,7 +2414,6 @@ ed_ring_to_mbuf(sc,src,dst,total_len) return (m); } -#ifdef MULTICAST /* * Compute crc for ethernet address */ @@ -2480,5 +2471,3 @@ ds_getmcaf(sc, mcaf) } } #endif -#endif - diff --git a/sys/lib/libsa/if_ether.h b/sys/lib/libsa/if_ether.h index ac43d87be166..774b4d8bc090 100644 --- a/sys/lib/libsa/if_ether.h +++ b/sys/lib/libsa/if_ether.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)if_ether.h 7.5 (Berkeley) 6/28/90 - * $Id: if_ether.h,v 1.7 1994/01/08 21:21:31 mycroft Exp $ + * $Id: if_ether.h,v 1.8 1994/02/02 05:58:54 hpeyerl Exp $ */ #ifndef _NETINET_IF_ETHER_H_ @@ -120,10 +120,8 @@ struct arpcom { struct ifnet ac_if; /* network-visible interface */ u_char ac_enaddr[6]; /* ethernet hardware address */ struct in_addr ac_ipaddr; /* copy of ip address- XXX */ -#ifdef MULTICAST struct ether_multi *ac_multiaddrs; /* list of ether multicast addrs */ int ac_multicnt; /* length of ac_multiaddrs list */ -#endif }; /* @@ -139,18 +137,12 @@ struct arptab { #ifdef KERNEL u_char etherbroadcastaddr[6]; -#if defined(ISO) && !defined(MULTICAST) -#define MULTICAST 1 -#endif -#ifdef MULTICAST u_char ether_ipmulticast_min[6]; u_char ether_ipmulticast_max[6]; -#endif struct arptab *arptnew(); int ether_output(), ether_input(); char *ether_sprintf(); -#ifdef MULTICAST /* * Ethernet multicast address structure. There is one of these for each * multicast address or range of multicast addresses that we are supposed @@ -217,6 +209,5 @@ struct ether_multistep { ETHER_NEXT_MULTI((step), (enm)); \ } #endif -#endif #endif /* !_NETINET_IF_ETHER_H_ */ diff --git a/sys/netinet/if_arp.c b/sys/netinet/if_arp.c index e5162631c011..e48395ea569a 100644 --- a/sys/netinet/if_arp.c +++ b/sys/netinet/if_arp.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)if_ether.c 7.13 (Berkeley) 10/31/90 - * $Id: if_arp.c,v 1.7 1994/01/23 23:42:50 deraadt Exp $ + * $Id: if_arp.c,v 1.8 1994/02/02 05:58:50 hpeyerl Exp $ */ /* @@ -194,12 +194,10 @@ arpresolve(ac, m, destip, desten, usetrailers) sizeof(etherbroadcastaddr)); return (1); } -#ifdef MULTICAST if (m->m_flags & M_MCAST) { /* multicast */ ETHER_MAP_IP_MULTICAST(destip, desten); return(1); } -#endif lna = in_lnaof(*destip); /* if for us, use software loopback driver if up */ for (ia = in_ifaddr; ia; ia = ia->ia_next) diff --git a/sys/netinet/if_arp.h b/sys/netinet/if_arp.h index 6896ef75a963..d64f8f152e57 100644 --- a/sys/netinet/if_arp.h +++ b/sys/netinet/if_arp.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)if_ether.h 7.5 (Berkeley) 6/28/90 - * $Id: if_arp.h,v 1.7 1994/01/08 21:21:31 mycroft Exp $ + * $Id: if_arp.h,v 1.8 1994/02/02 05:58:54 hpeyerl Exp $ */ #ifndef _NETINET_IF_ETHER_H_ @@ -120,10 +120,8 @@ struct arpcom { struct ifnet ac_if; /* network-visible interface */ u_char ac_enaddr[6]; /* ethernet hardware address */ struct in_addr ac_ipaddr; /* copy of ip address- XXX */ -#ifdef MULTICAST struct ether_multi *ac_multiaddrs; /* list of ether multicast addrs */ int ac_multicnt; /* length of ac_multiaddrs list */ -#endif }; /* @@ -139,18 +137,12 @@ struct arptab { #ifdef KERNEL u_char etherbroadcastaddr[6]; -#if defined(ISO) && !defined(MULTICAST) -#define MULTICAST 1 -#endif -#ifdef MULTICAST u_char ether_ipmulticast_min[6]; u_char ether_ipmulticast_max[6]; -#endif struct arptab *arptnew(); int ether_output(), ether_input(); char *ether_sprintf(); -#ifdef MULTICAST /* * Ethernet multicast address structure. There is one of these for each * multicast address or range of multicast addresses that we are supposed @@ -217,6 +209,5 @@ struct ether_multistep { ETHER_NEXT_MULTI((step), (enm)); \ } #endif -#endif #endif /* !_NETINET_IF_ETHER_H_ */ diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c index b9e3a553a24a..6c39f85df438 100644 --- a/sys/netinet/if_ether.c +++ b/sys/netinet/if_ether.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)if_ether.c 7.13 (Berkeley) 10/31/90 - * $Id: if_ether.c,v 1.7 1994/01/23 23:42:50 deraadt Exp $ + * $Id: if_ether.c,v 1.8 1994/02/02 05:58:50 hpeyerl Exp $ */ /* @@ -194,12 +194,10 @@ arpresolve(ac, m, destip, desten, usetrailers) sizeof(etherbroadcastaddr)); return (1); } -#ifdef MULTICAST if (m->m_flags & M_MCAST) { /* multicast */ ETHER_MAP_IP_MULTICAST(destip, desten); return(1); } -#endif lna = in_lnaof(*destip); /* if for us, use software loopback driver if up */ for (ia = in_ifaddr; ia; ia = ia->ia_next) diff --git a/sys/netinet/if_ether.h b/sys/netinet/if_ether.h index ac43d87be166..774b4d8bc090 100644 --- a/sys/netinet/if_ether.h +++ b/sys/netinet/if_ether.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)if_ether.h 7.5 (Berkeley) 6/28/90 - * $Id: if_ether.h,v 1.7 1994/01/08 21:21:31 mycroft Exp $ + * $Id: if_ether.h,v 1.8 1994/02/02 05:58:54 hpeyerl Exp $ */ #ifndef _NETINET_IF_ETHER_H_ @@ -120,10 +120,8 @@ struct arpcom { struct ifnet ac_if; /* network-visible interface */ u_char ac_enaddr[6]; /* ethernet hardware address */ struct in_addr ac_ipaddr; /* copy of ip address- XXX */ -#ifdef MULTICAST struct ether_multi *ac_multiaddrs; /* list of ether multicast addrs */ int ac_multicnt; /* length of ac_multiaddrs list */ -#endif }; /* @@ -139,18 +137,12 @@ struct arptab { #ifdef KERNEL u_char etherbroadcastaddr[6]; -#if defined(ISO) && !defined(MULTICAST) -#define MULTICAST 1 -#endif -#ifdef MULTICAST u_char ether_ipmulticast_min[6]; u_char ether_ipmulticast_max[6]; -#endif struct arptab *arptnew(); int ether_output(), ether_input(); char *ether_sprintf(); -#ifdef MULTICAST /* * Ethernet multicast address structure. There is one of these for each * multicast address or range of multicast addresses that we are supposed @@ -217,6 +209,5 @@ struct ether_multistep { ETHER_NEXT_MULTI((step), (enm)); \ } #endif -#endif #endif /* !_NETINET_IF_ETHER_H_ */ diff --git a/sys/netinet/if_inarp.h b/sys/netinet/if_inarp.h index c50f005a27ef..62097a12bbd2 100644 --- a/sys/netinet/if_inarp.h +++ b/sys/netinet/if_inarp.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)if_ether.h 7.5 (Berkeley) 6/28/90 - * $Id: if_inarp.h,v 1.7 1994/01/08 21:21:31 mycroft Exp $ + * $Id: if_inarp.h,v 1.8 1994/02/02 05:58:54 hpeyerl Exp $ */ #ifndef _NETINET_IF_ETHER_H_ @@ -120,10 +120,8 @@ struct arpcom { struct ifnet ac_if; /* network-visible interface */ u_char ac_enaddr[6]; /* ethernet hardware address */ struct in_addr ac_ipaddr; /* copy of ip address- XXX */ -#ifdef MULTICAST struct ether_multi *ac_multiaddrs; /* list of ether multicast addrs */ int ac_multicnt; /* length of ac_multiaddrs list */ -#endif }; /* @@ -139,18 +137,12 @@ struct arptab { #ifdef KERNEL u_char etherbroadcastaddr[6]; -#if defined(ISO) && !defined(MULTICAST) -#define MULTICAST 1 -#endif -#ifdef MULTICAST u_char ether_ipmulticast_min[6]; u_char ether_ipmulticast_max[6]; -#endif struct arptab *arptnew(); int ether_output(), ether_input(); char *ether_sprintf(); -#ifdef MULTICAST /* * Ethernet multicast address structure. There is one of these for each * multicast address or range of multicast addresses that we are supposed @@ -217,6 +209,5 @@ struct ether_multistep { ETHER_NEXT_MULTI((step), (enm)); \ } #endif -#endif #endif /* !_NETINET_IF_ETHER_H_ */ diff --git a/sys/netinet/igmp.c b/sys/netinet/igmp.c index 36370620037c..3903f42afca3 100644 --- a/sys/netinet/igmp.c +++ b/sys/netinet/igmp.c @@ -39,7 +39,6 @@ /* Internet Group Management Protocol (IGMP) routines. */ -#ifdef MULTICAST #include #include @@ -317,4 +316,3 @@ igmp_sendreport(inm) ++igmpstat.igps_snd_reports; } -#endif diff --git a/sys/netinet/in.c b/sys/netinet/in.c index 3f0e867b3901..b2533298870a 100644 --- a/sys/netinet/in.c +++ b/sys/netinet/in.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)in.c 7.17 (Berkeley) 4/20/91 - * $Id: in.c,v 1.8 1994/01/09 01:06:05 mycroft Exp $ + * $Id: in.c,v 1.9 1994/02/02 05:59:13 hpeyerl Exp $ */ #include @@ -94,10 +94,8 @@ in_netof(in) net = i & IN_CLASSA_NET; else if (IN_CLASSB(i)) net = i & IN_CLASSB_NET; -#ifdef MULTICAST else if (IN_CLASSD(i)) net = i & IN_CLASSD_NET; -#endif else if (IN_CLASSC(i)) net = i & IN_CLASSC_NET; else @@ -181,11 +179,9 @@ in_lnaof(in) } else if (IN_CLASSC(i)) { net = i & IN_CLASSC_NET; host = i & IN_CLASSC_HOST; -#ifdef MULTICAST } else if (IN_CLASSD(i)) { net = i & IN_CLASSD_NET; host = i & IN_CLASSD_HOST; -#endif } else return (i); @@ -571,7 +567,6 @@ in_ifinit(ifp, ia, sin, scrub) } if ((error = rtinit(&(ia->ia_ifa), (int)RTM_ADD, flags)) == 0) ia->ia_flags |= IFA_ROUTE; -#ifdef MULTICAST /* * If the interface supports multicast, join the "all hosts" * multicast group on that interface. @@ -582,7 +577,6 @@ in_ifinit(ifp, ia, sin, scrub) addr.s_addr = htonl(INADDR_ALLHOSTS_GROUP); in_addmulti(&addr, ifp); } -#endif return (error); } @@ -630,7 +624,6 @@ in_broadcast(in) return (0); } -#ifdef MULTICAST /* * Add an address to the list of IP multicast addresses for a given interface. */ @@ -738,4 +731,3 @@ in_delmulti(inm) splx(s); } #endif -#endif diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index 06cf6c6c6d07..50e1033593c4 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)in_pcb.c 7.14 (Berkeley) 4/20/91 - * $Id: in_pcb.c,v 1.8 1994/01/08 21:21:40 mycroft Exp $ + * $Id: in_pcb.c,v 1.9 1994/02/02 05:58:59 hpeyerl Exp $ */ #include @@ -51,9 +51,7 @@ #include #include #include -#ifdef MULTICAST #include -#endif struct in_addr zeroin_addr; @@ -220,7 +218,6 @@ in_pcbconnect(inp, nam) if (ia == 0) return (EADDRNOTAVAIL); } -#ifdef MULTICAST /* * If the destination address is multicast and an outgoing * interface has been set as a multicast option, use the @@ -241,7 +238,6 @@ in_pcbconnect(inp, nam) return (EADDRNOTAVAIL); } } -#endif ifaddr = (struct sockaddr_in *)&ia->ia_addr; } if (in_pcblookup(inp->inp_head, @@ -282,9 +278,7 @@ in_pcbdetach(inp) (void)m_free(inp->inp_options); if (inp->inp_route.ro_rt) rtfree(inp->inp_route.ro_rt); -#ifdef MULTICAST ip_freemoptions(inp->inp_moptions); -#endif remque(inp); (void) m_free(dtom(inp)); } diff --git a/sys/netinet/in_proto.c b/sys/netinet/in_proto.c index 87d8712e15f2..496784823e26 100644 --- a/sys/netinet/in_proto.c +++ b/sys/netinet/in_proto.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)in_proto.c 7.5 (Berkeley) 6/28/90 - * $Id: in_proto.c,v 1.6 1994/01/08 21:21:42 mycroft Exp $ + * $Id: in_proto.c,v 1.7 1994/02/02 05:59:00 hpeyerl Exp $ */ #include @@ -49,9 +49,7 @@ int ip_output(),ip_ctloutput(); int ip_init(),ip_slowtimo(),ip_drain(); int icmp_input(); -#ifdef MULTICAST - int igmp_init(), igmp_input(), igmp_fasttimo(); -#endif +int igmp_init(), igmp_input(), igmp_fasttimo(); int udp_input(),udp_ctlinput(); int udp_usrreq(); int udp_init(); @@ -124,13 +122,11 @@ struct protosw inetsw[] = { eonprotoinit, 0, 0, 0, }, #endif -#ifdef MULTICAST { SOCK_RAW, &inetdomain, IPPROTO_IGMP, PR_ATOMIC|PR_ADDR, igmp_input, rip_output, 0, rip_ctloutput, rip_usrreq, igmp_init, igmp_fasttimo, 0, 0, }, -#endif #ifdef NSIP { SOCK_RAW, &inetdomain, IPPROTO_IDP, PR_ATOMIC|PR_ADDR, idpip_input, rip_output, nsip_ctlinput, 0, diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c index 2ab89e2c9e5c..3a9782188407 100644 --- a/sys/netinet/ip_icmp.c +++ b/sys/netinet/ip_icmp.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)ip_icmp.c 7.15 (Berkeley) 4/20/91 - * $Id: ip_icmp.c,v 1.7 1994/01/10 20:14:18 mycroft Exp $ + * $Id: ip_icmp.c,v 1.8 1994/02/02 05:59:02 hpeyerl Exp $ */ #include @@ -100,11 +100,9 @@ icmp_error(n, type, code, dest) icmpstat.icps_oldicmp++; goto freeit; } -#ifdef MULTICAST /* Don't send error in response to a multicast or broadcast packet */ if (n->m_flags & (M_MCAST | M_BCAST)) goto freeit; -#endif /* * First, formulate icmp message */ diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 16e427dba727..6255edfd3e24 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)ip_input.c 7.19 (Berkeley) 5/25/91 - * $Id: ip_input.c,v 1.10 1994/01/29 11:58:01 brezak Exp $ + * $Id: ip_input.c,v 1.11 1994/02/02 05:59:04 hpeyerl Exp $ */ #include @@ -273,7 +273,6 @@ next: goto ours; } } -#ifdef MULTICAST if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr))) { struct in_multi *inm; #ifdef MROUTING @@ -327,7 +326,6 @@ next: } goto ours; } -#endif if (ip->ip_dst.s_addr == (u_long)INADDR_BROADCAST) goto ours; if (ip->ip_dst.s_addr == INADDR_ANY) diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index 261c39c2b219..7bd0a177ca2e 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)ip_output.c 7.23 (Berkeley) 11/12/90 - * $Id: ip_output.c,v 1.16 1994/01/19 21:36:56 brezak Exp $ + * $Id: ip_output.c,v 1.17 1994/02/02 05:59:06 hpeyerl Exp $ */ #include @@ -155,7 +155,6 @@ ip_output(m0, opt, ro, flags, imo) if (ro->ro_rt->rt_flags & RTF_GATEWAY) dst = (struct sockaddr_in *)ro->ro_rt->rt_gateway; } -#ifdef MULTICAST if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr))) { struct in_multi *inm; extern struct ifnet loif; @@ -245,7 +244,6 @@ ip_output(m0, opt, ro, flags, imo) goto sendit; } -#endif #ifndef notdef /* * If source address not specified yet, use address @@ -286,9 +284,7 @@ ip_output(m0, opt, ro, flags, imo) } m->m_flags |= M_BCAST; } -#ifdef MULTICAST sendit: -#endif /* * If small enough for interface, can just send directly. @@ -543,7 +539,6 @@ ip_ctloutput(op, so, level, optname, mp) } break; #undef OPTSET -#ifdef MULTICAST case IP_MULTICAST_IF: case IP_MULTICAST_TTL: case IP_MULTICAST_LOOP: @@ -551,7 +546,6 @@ ip_ctloutput(op, so, level, optname, mp) case IP_DROP_MEMBERSHIP: error = ip_setmoptions(optname, &inp->inp_moptions, m); break; -#endif default: error = EINVAL; @@ -607,7 +601,6 @@ ip_ctloutput(op, so, level, optname, mp) } *mtod(m, int *) = optval; break; -#ifdef MULTICAST case IP_MULTICAST_IF: case IP_MULTICAST_TTL: case IP_MULTICAST_LOOP: @@ -615,7 +608,6 @@ ip_ctloutput(op, so, level, optname, mp) case IP_DROP_MEMBERSHIP: error = ip_getmoptions(optname, inp->inp_moptions, mp); break; -#endif default: error = EINVAL; @@ -733,7 +725,6 @@ bad: return (EINVAL); } -#ifdef MULTICAST /* * Set the IP multicast options in response to user setsockopt(). */ @@ -1067,4 +1058,3 @@ ip_mloopback(ifp, m, dst) (void) looutput(ifp, copym, (struct sockaddr *)dst, 0); } } -#endif diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c index 7e2cdd3fe6f9..4779b7f9d949 100644 --- a/sys/netinet/raw_ip.c +++ b/sys/netinet/raw_ip.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)raw_ip.c 7.8 (Berkeley) 7/25/90 - * $Id: raw_ip.c,v 1.10 1994/01/10 20:14:28 mycroft Exp $ + * $Id: raw_ip.c,v 1.11 1994/02/02 05:59:08 hpeyerl Exp $ */ #include @@ -124,12 +124,7 @@ rip_output(m, so) } return (ip_output(m, opts, &rp->rinp_route, (so->so_options & SO_DONTROUTE) | IP_ALLOWBROADCAST -#ifdef MULTICAST - , rp->rinp_rcb.rcb_moptions -#else - , NULL -#endif - )); + , rp->rinp_rcb.rcb_moptions )); } /* @@ -165,7 +160,6 @@ rip_ctloutput(op, so, level, optname, m) else rp->rinp_flags &= ~RINPF_HDRINCL; break; -#ifdef MULTICAST case IP_MULTICAST_IF: case IP_MULTICAST_TTL: case IP_MULTICAST_LOOP: @@ -181,11 +175,6 @@ rip_ctloutput(op, so, level, optname, m) error = EINVAL; #endif break; -#else - default: - error = EINVAL; - break; -#endif } break; @@ -206,7 +195,6 @@ rip_ctloutput(op, so, level, optname, m) (*m)->m_len = sizeof (int); *mtod(*m, int *) = rp->rinp_flags & RINPF_HDRINCL; break; -#ifdef MULTICAST case IP_MULTICAST_IF: case IP_MULTICAST_TTL: case IP_MULTICAST_LOOP: @@ -215,7 +203,6 @@ rip_ctloutput(op, so, level, optname, m) error = ip_getmoptions(optname, rp->rinp_rcb.rcb_moptions, m); break; -#endif default: error = EINVAL; m_freem(*m); @@ -238,7 +225,7 @@ rip_usrreq(so, req, m, nam, control) { register int error = 0; register struct raw_inpcb *rp = sotorawinpcb(so); -#if defined(MULTICAST) && defined(MROUTING) +#if defined(MROUTING) extern struct socket *ip_mrouter; #endif switch (req) { @@ -256,16 +243,14 @@ rip_usrreq(so, req, m, nam, control) case PRU_DETACH: if (rp == 0) panic("rip_detach"); -#if defined(MULTICAST) && defined(MROUTING) +#if defined(MROUTING) if (so == ip_mrouter) ip_mrouter_done(); #endif if (rp->rinp_options) m_freem(rp->rinp_options); -#ifdef MULTICAST if (rp->rinp_rcb.rcb_moptions) ip_freemoptions(rp->rinp_rcb.rcb_moptions); -#endif if (rp->rinp_route.ro_rt) RTFREE(rp->rinp_route.ro_rt); if (rp->rinp_rcb.rcb_laddr) diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index d7b393bd1e68..88b385aa4034 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * from: @(#)udp_usrreq.c 7.20 (Berkeley) 4/20/91 - * $Id: udp_usrreq.c,v 1.10 1994/01/10 20:14:34 mycroft Exp $ + * $Id: udp_usrreq.c,v 1.11 1994/02/02 05:59:10 hpeyerl Exp $ */ #include @@ -151,7 +151,6 @@ udp_input(m, iphlen) return; } } -#ifdef MULTICAST if (IN_MULTICAST(ntohl(ip->ip_dst.s_addr)) || in_broadcast(ip->ip_dst)) { struct socket *last; @@ -236,7 +235,6 @@ udp_input(m, iphlen) sorwakeup(last); return; } -#endif /* * Locate pcb for datagram. */ @@ -254,13 +252,6 @@ udp_input(m, iphlen) if (inp == 0) { /* don't send ICMP response for broadcast packet */ udpstat.udps_noport++; -#ifndef MULTICAST - /* XXX why don't we do this with MULTICAST? */ - if (m->m_flags & (M_BCAST | M_MCAST)) { - udpstat.udps_noportbcast++; - goto bad; - } -#endif *ip = save_ip; ip->ip_len += iphlen; { @@ -449,12 +440,7 @@ udp_output(inp, m, addr, control) udpstat.udps_opackets++; error = ip_output(m, inp->inp_options, &inp->inp_route, inp->inp_socket->so_options & (SO_DONTROUTE | SO_BROADCAST) -#ifdef MULTICAST - , inp->inp_moptions -#else - , NULL -#endif - ); + , inp->inp_moptions ); if (addr) { in_pcbdisconnect(inp);