if_fddisubr.c (30834) | if_fddisubr.c (31264) |
---|---|
1/* 2 * Copyright (c) 1995, 1996 3 * Matt Thomas <matt@3am-software.com>. All rights reserved. 4 * Copyright (c) 1982, 1989, 1993 5 * The Regents of the University of California. All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 19 unchanged lines hidden (view full) --- 28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * SUCH DAMAGE. 34 * 35 * from: if_ethersubr.c,v 1.5 1994/12/13 22:31:45 wollman Exp | 1/* 2 * Copyright (c) 1995, 1996 3 * Matt Thomas <matt@3am-software.com>. All rights reserved. 4 * Copyright (c) 1982, 1989, 1993 5 * The Regents of the University of California. All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 19 unchanged lines hidden (view full) --- 28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * SUCH DAMAGE. 34 * 35 * from: if_ethersubr.c,v 1.5 1994/12/13 22:31:45 wollman Exp |
36 * $Id: if_fddisubr.c,v 1.20 1997/08/02 14:32:36 bde Exp $ | 36 * $Id: if_fddisubr.c,v 1.21 1997/10/29 07:59:27 julian Exp $ |
37 */ 38 39#include <sys/param.h> 40#include <sys/systm.h> 41#include <sys/kernel.h> 42#include <sys/mbuf.h> 43#include <sys/socket.h> 44 --- 95 unchanged lines hidden (view full) --- 140 register struct mbuf *m = m0; 141 register struct rtentry *rt; 142 register struct fddi_header *fh; 143 struct mbuf *mcopy = (struct mbuf *)0; 144 struct arpcom *ac = (struct arpcom *)ifp; 145 146 if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING)) 147 senderr(ENETDOWN); | 37 */ 38 39#include <sys/param.h> 40#include <sys/systm.h> 41#include <sys/kernel.h> 42#include <sys/mbuf.h> 43#include <sys/socket.h> 44 --- 95 unchanged lines hidden (view full) --- 140 register struct mbuf *m = m0; 141 register struct rtentry *rt; 142 register struct fddi_header *fh; 143 struct mbuf *mcopy = (struct mbuf *)0; 144 struct arpcom *ac = (struct arpcom *)ifp; 145 146 if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING)) 147 senderr(ENETDOWN); |
148 ifp->if_lastchange = time; | 148 gettime(&ifp->if_lastchange); |
149#if !defined(__bsdi__) || _BSDI_VERSION >= 199401 150 if (rt = rt0) { 151 if ((rt->rt_flags & RTF_UP) == 0) { 152 if (rt0 = rt = RTALLOC1(dst, 1)) 153 rt->rt_refcnt--; 154 else 155 senderr(EHOSTUNREACH); 156 } --- 308 unchanged lines hidden (view full) --- 465 register struct ifqueue *inq; 466 register struct llc *l; 467 int s; 468 469 if ((ifp->if_flags & IFF_UP) == 0) { 470 m_freem(m); 471 return; 472 } | 149#if !defined(__bsdi__) || _BSDI_VERSION >= 199401 150 if (rt = rt0) { 151 if ((rt->rt_flags & RTF_UP) == 0) { 152 if (rt0 = rt = RTALLOC1(dst, 1)) 153 rt->rt_refcnt--; 154 else 155 senderr(EHOSTUNREACH); 156 } --- 308 unchanged lines hidden (view full) --- 465 register struct ifqueue *inq; 466 register struct llc *l; 467 int s; 468 469 if ((ifp->if_flags & IFF_UP) == 0) { 470 m_freem(m); 471 return; 472 } |
473 ifp->if_lastchange = time; | 473 gettime(&ifp->if_lastchange); |
474 ifp->if_ibytes += m->m_pkthdr.len + sizeof (*fh); 475 if (fh->fddi_dhost[0] & 1) { 476 if (bcmp((caddr_t)fddibroadcastaddr, (caddr_t)fh->fddi_dhost, 477 sizeof(fddibroadcastaddr)) == 0) 478 m->m_flags |= M_BCAST; 479 else 480 m->m_flags |= M_MCAST; 481 ifp->if_imcasts++; --- 245 unchanged lines hidden --- | 474 ifp->if_ibytes += m->m_pkthdr.len + sizeof (*fh); 475 if (fh->fddi_dhost[0] & 1) { 476 if (bcmp((caddr_t)fddibroadcastaddr, (caddr_t)fh->fddi_dhost, 477 sizeof(fddibroadcastaddr)) == 0) 478 m->m_flags |= M_BCAST; 479 else 480 m->m_flags |= M_MCAST; 481 ifp->if_imcasts++; --- 245 unchanged lines hidden --- |