Deleted Added
full compact
if_ethersubr.c (9202) if_ethersubr.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 * @(#)if_ethersubr.c 8.1 (Berkeley) 6/10/93
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 * @(#)if_ethersubr.c 8.1 (Berkeley) 6/10/93
34 * $Id: if_ethersubr.c,v 1.8.2.1 1995/06/03 04:46:21 davidg Exp $
34 * $Id: if_ethersubr.c,v 1.9 1995/06/11 19:31:39 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>

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

55#include <net/if_types.h>
56
57#ifdef INET
58#include <netinet/in.h>
59#include <netinet/in_var.h>
60#endif
61#include <netinet/if_ether.h>
62
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>

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

55#include <net/if_types.h>
56
57#ifdef INET
58#include <netinet/in.h>
59#include <netinet/in_var.h>
60#endif
61#include <netinet/if_ether.h>
62
63#ifdef IPX
64#include <netipx/ipx.h>
65#include <netipx/ipx_if.h>
66#endif
67
63#ifdef NS
64#include <netns/ns.h>
65#include <netns/ns_if.h>
66#endif
67
68#ifdef ISO
69#include <netiso/argo_debug.h>
70#include <netiso/iso.h>

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

142 return (0); /* if not yet resolved */
143 /* If broadcasting on a simplex interface, loopback a copy */
144 if ((m->m_flags & M_BCAST) && (ifp->if_flags & IFF_SIMPLEX))
145 mcopy = m_copy(m, 0, (int)M_COPYALL);
146 off = m->m_pkthdr.len - m->m_len;
147 type = ETHERTYPE_IP;
148 break;
149#endif
68#ifdef NS
69#include <netns/ns.h>
70#include <netns/ns_if.h>
71#endif
72
73#ifdef ISO
74#include <netiso/argo_debug.h>
75#include <netiso/iso.h>

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

147 return (0); /* if not yet resolved */
148 /* If broadcasting on a simplex interface, loopback a copy */
149 if ((m->m_flags & M_BCAST) && (ifp->if_flags & IFF_SIMPLEX))
150 mcopy = m_copy(m, 0, (int)M_COPYALL);
151 off = m->m_pkthdr.len - m->m_len;
152 type = ETHERTYPE_IP;
153 break;
154#endif
155#ifdef IPX
156 case AF_IPX:
157 type = ETHERTYPE_IPX;
158 bcopy((caddr_t)&(((struct sockaddr_ipx *)dst)->sipx_addr.x_host),
159 (caddr_t)edst, sizeof (edst));
160 if (!bcmp((caddr_t)edst, (caddr_t)&ipx_thishost, sizeof(edst)))
161 return (looutput(ifp, m, dst, rt));
162 /* If broadcasting on a simplex interface, loopback a copy */
163 if ((m->m_flags & M_BCAST) && (ifp->if_flags & IFF_SIMPLEX))
164 mcopy = m_copy(m, 0, (int)M_COPYALL);
165 break;
166#endif
150#ifdef NS
151 case AF_NS:
152 type = ETHERTYPE_NS;
153 bcopy((caddr_t)&(((struct sockaddr_ns *)dst)->sns_addr.x_host),
154 (caddr_t)edst, sizeof (edst));
155 if (!bcmp((caddr_t)edst, (caddr_t)&ns_thishost, sizeof(edst)))
156 return (looutput(ifp, m, dst, rt));
157 /* If broadcasting on a simplex interface, loopback a copy */

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

337 inq = &ipintrq;
338 break;
339
340 case ETHERTYPE_ARP:
341 schednetisr(NETISR_ARP);
342 inq = &arpintrq;
343 break;
344#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 */

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

354 inq = &ipintrq;
355 break;
356
357 case ETHERTYPE_ARP:
358 schednetisr(NETISR_ARP);
359 inq = &arpintrq;
360 break;
361#endif
362#ifdef IPX
363 case ETHERTYPE_IPX:
364 schednetisr(NETISR_IPX);
365 inq = &ipxintrq;
366 break;
367#endif
345#ifdef NS
346 case ETHERTYPE_NS:
347 schednetisr(NETISR_NS);
348 inq = &nsintrq;
349 break;
368#ifdef NS
369 case ETHERTYPE_NS:
370 schednetisr(NETISR_NS);
371 inq = &nsintrq;
372 break;
350
351#endif
352 default:
353#if defined (ISO) || defined (LLC)
354 if (ether_type > ETHERMTU)
355 goto dropanyway;
356 l = mtod(m, struct llc *);
357 switch (l->llc_dsap) {
358#ifdef ISO

--- 331 unchanged lines hidden ---
373#endif
374 default:
375#if defined (ISO) || defined (LLC)
376 if (ether_type > ETHERMTU)
377 goto dropanyway;
378 l = mtod(m, struct llc *);
379 switch (l->llc_dsap) {
380#ifdef ISO

--- 331 unchanged lines hidden ---