Deleted Added
full compact
if_fddisubr.c (16063) if_fddisubr.c (16287)
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.7 1996/04/07 17:39:04 bde Exp $
34 * $Id: if_fddisubr.c,v 1.8 1996/06/01 23:23:55 gpalmer 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>

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

127 register struct mbuf *m = m0;
128 register struct rtentry *rt;
129 struct mbuf *mcopy = (struct mbuf *)0;
130 register struct fddi_header *fh;
131 struct arpcom *ac = (struct arpcom *)ifp;
132
133 if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING))
134 senderr(ENETDOWN);
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>

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

127 register struct mbuf *m = m0;
128 register struct rtentry *rt;
129 struct mbuf *mcopy = (struct mbuf *)0;
130 register struct fddi_header *fh;
131 struct arpcom *ac = (struct arpcom *)ifp;
132
133 if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING))
134 senderr(ENETDOWN);
135 ifp->if_lastchange = time;
136 if (rt = rt0) {
137 if ((rt->rt_flags & RTF_UP) == 0) {
138 if (rt0 = rt = RTALLOC1(dst, 1))
139 rt->rt_refcnt--;
140 else
141 senderr(EHOSTUNREACH);
142 }
143 if (rt->rt_flags & RTF_GATEWAY) {

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

395 register struct ifqueue *inq;
396 register struct llc *l;
397 int s;
398
399 if ((ifp->if_flags & IFF_UP) == 0) {
400 m_freem(m);
401 return;
402 }
135 if (rt = rt0) {
136 if ((rt->rt_flags & RTF_UP) == 0) {
137 if (rt0 = rt = RTALLOC1(dst, 1))
138 rt->rt_refcnt--;
139 else
140 senderr(EHOSTUNREACH);
141 }
142 if (rt->rt_flags & RTF_GATEWAY) {

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

394 register struct ifqueue *inq;
395 register struct llc *l;
396 int s;
397
398 if ((ifp->if_flags & IFF_UP) == 0) {
399 m_freem(m);
400 return;
401 }
403 ifp->if_lastchange = time;
404 ifp->if_ibytes += m->m_pkthdr.len + sizeof (*fh);
405 if (bcmp((caddr_t)fddibroadcastaddr, (caddr_t)fh->fddi_dhost,
406 sizeof(fddibroadcastaddr)) == 0)
407 m->m_flags |= M_BCAST;
408 else if (fh->fddi_dhost[0] & 1)
409 m->m_flags |= M_MCAST;
410 if (m->m_flags & (M_BCAST|M_MCAST))
411 ifp->if_imcasts++;

--- 171 unchanged lines hidden ---
402 ifp->if_ibytes += m->m_pkthdr.len + sizeof (*fh);
403 if (bcmp((caddr_t)fddibroadcastaddr, (caddr_t)fh->fddi_dhost,
404 sizeof(fddibroadcastaddr)) == 0)
405 m->m_flags |= M_BCAST;
406 else if (fh->fddi_dhost[0] & 1)
407 m->m_flags |= M_MCAST;
408 if (m->m_flags & (M_BCAST|M_MCAST))
409 ifp->if_imcasts++;

--- 171 unchanged lines hidden ---