Deleted Added
full compact
if_fddisubr.c (8876) if_fddisubr.c (11819)
1/*
2 * Copyright (c) 1982, 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * from: if_ethersubr.c,v 1.5 1994/12/13 22:31:45 wollman Exp
1/*
2 * Copyright (c) 1982, 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 * SUCH DAMAGE.
32 *
33 * from: if_ethersubr.c,v 1.5 1994/12/13 22:31:45 wollman Exp
34 * $Id: if_fddisubr.c,v 1.4 1995/05/09 13:35:40 davidg Exp $
34 * $Id: if_fddisubr.c,v 1.5 1995/05/30 08:08:05 rgrimes Exp $
35 */
36
37#include <sys/param.h>
38#include <sys/systm.h>
39#include <sys/kernel.h>
40#include <sys/malloc.h>
41#include <sys/mbuf.h>
42#include <sys/protosw.h>

--- 13 unchanged lines hidden (view full) ---

56
57#ifdef INET
58#include <netinet/in.h>
59#include <netinet/in_var.h>
60#endif
61#include <netinet/if_ether.h>
62#include <netinet/if_fddi.h>
63
35 */
36
37#include <sys/param.h>
38#include <sys/systm.h>
39#include <sys/kernel.h>
40#include <sys/malloc.h>
41#include <sys/mbuf.h>
42#include <sys/protosw.h>

--- 13 unchanged lines hidden (view full) ---

56
57#ifdef INET
58#include <netinet/in.h>
59#include <netinet/in_var.h>
60#endif
61#include <netinet/if_ether.h>
62#include <netinet/if_fddi.h>
63
64#ifdef IPX
65#include <netipx/ipx.h>
66#include <netipx/ipx_if.h>
67#endif
68
64#ifdef NS
65#include <netns/ns.h>
66#include <netns/ns_if.h>
67#endif
68
69#ifdef DECNET
70#include <netdnet/dn.h>
71#endif

--- 87 unchanged lines hidden (view full) ---

159 if (!ARPRESOLVE(ac, rt, m, dst, edst, rt0))
160 return (0); /* if not yet resolved */
161 /* If broadcasting on a simplex interface, loopback a copy */
162 if ((m->m_flags & M_BCAST) && (ifp->if_flags & IFF_SIMPLEX))
163 mcopy = m_copy(m, 0, (int)M_COPYALL);
164 type = ETHERTYPE_IP;
165 break;
166#endif
69#ifdef NS
70#include <netns/ns.h>
71#include <netns/ns_if.h>
72#endif
73
74#ifdef DECNET
75#include <netdnet/dn.h>
76#endif

--- 87 unchanged lines hidden (view full) ---

164 if (!ARPRESOLVE(ac, rt, m, dst, edst, rt0))
165 return (0); /* if not yet resolved */
166 /* If broadcasting on a simplex interface, loopback a copy */
167 if ((m->m_flags & M_BCAST) && (ifp->if_flags & IFF_SIMPLEX))
168 mcopy = m_copy(m, 0, (int)M_COPYALL);
169 type = ETHERTYPE_IP;
170 break;
171#endif
172#ifdef IPX
173 case AF_IPX:
174 type = ETHERTYPE_IPX;
175 bcopy((caddr_t)&(((struct sockaddr_ipx *)dst)->sipx_addr.x_host),
176 (caddr_t)edst, sizeof (edst));
177 if (!bcmp((caddr_t)edst, (caddr_t)&ipx_thishost, sizeof(edst)))
178 return (looutput(ifp, m, dst, rt));
179 /* If broadcasting on a simplex interface, loopback a copy */
180 if ((m->m_flags & M_BCAST) && (ifp->if_flags & IFF_SIMPLEX))
181 mcopy = m_copy(m, 0, (int)M_COPYALL);
182 break;
183#endif
167#ifdef NS
168 case AF_NS:
169 type = ETHERTYPE_NS;
170 bcopy((caddr_t)&(((struct sockaddr_ns *)dst)->sns_addr.x_host),
171 (caddr_t)edst, sizeof (edst));
172 if (!bcmp((caddr_t)edst, (caddr_t)&ns_thishost, sizeof(edst)))
173 return (looutput(ifp, m, dst, rt));
174 /* If broadcasting on a simplex interface, loopback a copy */

--- 392 unchanged lines hidden ---
184#ifdef NS
185 case AF_NS:
186 type = ETHERTYPE_NS;
187 bcopy((caddr_t)&(((struct sockaddr_ns *)dst)->sns_addr.x_host),
188 (caddr_t)edst, sizeof (edst));
189 if (!bcmp((caddr_t)edst, (caddr_t)&ns_thishost, sizeof(edst)))
190 return (looutput(ifp, m, dst, rt));
191 /* If broadcasting on a simplex interface, loopback a copy */

--- 392 unchanged lines hidden ---