Deleted Added
full compact
if_ethersubr.c (30822) if_ethersubr.c (31016)
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.37 1997/10/28 15:58:31 bde Exp $
34 * $Id: if_ethersubr.c,v 1.38 1997/10/29 00:30:43 julian 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/socket.h>

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

113ether_output(ifp, m0, dst, rt0)
114 register struct ifnet *ifp;
115 struct mbuf *m0;
116 struct sockaddr *dst;
117 struct rtentry *rt0;
118{
119 short type;
120 int s, error = 0;
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/socket.h>

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

113ether_output(ifp, m0, dst, rt0)
114 register struct ifnet *ifp;
115 struct mbuf *m0;
116 struct sockaddr *dst;
117 struct rtentry *rt0;
118{
119 short type;
120 int s, error = 0;
121 u_char *cp, edst[6];
122 register struct mbuf *m2, *m = m0;
121 u_char edst[6];
122 register struct mbuf *m = m0;
123 register struct rtentry *rt;
124 struct mbuf *mcopy = (struct mbuf *)0;
125 register struct ether_header *eh;
126 int off, len = m->m_pkthdr.len;
127 struct arpcom *ac = (struct arpcom *)ifp;
123 register struct rtentry *rt;
124 struct mbuf *mcopy = (struct mbuf *)0;
125 register struct ether_header *eh;
126 int off, len = m->m_pkthdr.len;
127 struct arpcom *ac = (struct arpcom *)ifp;
128 register struct ifqueue *inq;
129#ifdef NETATALK
130 struct at_ifaddr *aa;
131#endif NETATALK
132
133 if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING))
134 senderr(ENETDOWN);
135 rt = rt0;
136 if (rt) {

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

454 */
455void
456ether_input(ifp, eh, m)
457 struct ifnet *ifp;
458 register struct ether_header *eh;
459 struct mbuf *m;
460{
461 register struct ifqueue *inq;
128#ifdef NETATALK
129 struct at_ifaddr *aa;
130#endif NETATALK
131
132 if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING))
133 senderr(ENETDOWN);
134 rt = rt0;
135 if (rt) {

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

453 */
454void
455ether_input(ifp, eh, m)
456 struct ifnet *ifp;
457 register struct ether_header *eh;
458 struct mbuf *m;
459{
460 register struct ifqueue *inq;
462 u_short ether_type, *checksum;
461 u_short ether_type;
463 int s;
464#if defined (ISO) || defined (LLC) || defined(NETATALK)
465 register struct llc *l;
466#endif
467
468 if ((ifp->if_flags & IFF_UP) == 0) {
469 m_freem(m);
470 return;

--- 383 unchanged lines hidden ---
462 int s;
463#if defined (ISO) || defined (LLC) || defined(NETATALK)
464 register struct llc *l;
465#endif
466
467 if ((ifp->if_flags & IFF_UP) == 0) {
468 m_freem(m);
469 return;

--- 383 unchanged lines hidden ---