if_atmsubr.c (27845) | if_atmsubr.c (31264) |
---|---|
1/* $NetBSD: if_atmsubr.c,v 1.10 1997/03/11 23:19:51 chuck Exp $ */ 2 3/* 4 * 5 * Copyright (c) 1996 Charles D. Cranor and Washington University. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 24 unchanged lines hidden (view full) --- 33 */ 34 35/* 36 * if_atmsubr.c 37 */ 38 39#include <sys/param.h> 40#include <sys/systm.h> | 1/* $NetBSD: if_atmsubr.c,v 1.10 1997/03/11 23:19:51 chuck Exp $ */ 2 3/* 4 * 5 * Copyright (c) 1996 Charles D. Cranor and Washington University. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 24 unchanged lines hidden (view full) --- 33 */ 34 35/* 36 * if_atmsubr.c 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 45#include <net/if.h> 46#include <net/netisr.h> 47#include <net/route.h> 48#include <net/if_dl.h> 49#include <net/if_types.h> --- 51 unchanged lines hidden (view full) --- 101 struct atm_pseudohdr atmdst, *ad; 102 register struct mbuf *m = m0; 103 register struct rtentry *rt; 104 struct atmllc *atmllc; 105 u_int32_t atm_flags; 106 107 if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING)) 108 senderr(ENETDOWN); | 41#include <sys/mbuf.h> 42#include <sys/socket.h> 43 44#include <net/if.h> 45#include <net/netisr.h> 46#include <net/route.h> 47#include <net/if_dl.h> 48#include <net/if_types.h> --- 51 unchanged lines hidden (view full) --- 100 struct atm_pseudohdr atmdst, *ad; 101 register struct mbuf *m = m0; 102 register struct rtentry *rt; 103 struct atmllc *atmllc; 104 u_int32_t atm_flags; 105 106 if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING)) 107 senderr(ENETDOWN); |
109 ifp->if_lastchange = time; | 108 gettime(&ifp->if_lastchange); |
110 111 /* 112 * check route 113 */ 114 if ((rt = rt0) != NULL) { 115 116 if ((rt->rt_flags & RTF_UP) == 0) { /* route went down! */ 117 if ((rt0 = rt = RTALLOC1(dst, 0)) != NULL) --- 138 unchanged lines hidden (view full) --- 256 register struct ifqueue *inq; 257 u_int16_t etype = ETHERTYPE_IP; /* default */ 258 int s; 259 260 if ((ifp->if_flags & IFF_UP) == 0) { 261 m_freem(m); 262 return; 263 } | 109 110 /* 111 * check route 112 */ 113 if ((rt = rt0) != NULL) { 114 115 if ((rt->rt_flags & RTF_UP) == 0) { /* route went down! */ 116 if ((rt0 = rt = RTALLOC1(dst, 0)) != NULL) --- 138 unchanged lines hidden (view full) --- 255 register struct ifqueue *inq; 256 u_int16_t etype = ETHERTYPE_IP; /* default */ 257 int s; 258 259 if ((ifp->if_flags & IFF_UP) == 0) { 260 m_freem(m); 261 return; 262 } |
264 ifp->if_lastchange = time; | 263 gettime(&ifp->if_lastchange); |
265 ifp->if_ibytes += m->m_pkthdr.len; 266 267#if NBPFILTER > 0 268 if (ifp->if_bpf) { 269 /* 270 * We need to prepend the address family as 271 * a four byte field. Cons up a dummy header 272 * to pacify bpf. This is safe because bpf --- 126 unchanged lines hidden --- | 264 ifp->if_ibytes += m->m_pkthdr.len; 265 266#if NBPFILTER > 0 267 if (ifp->if_bpf) { 268 /* 269 * We need to prepend the address family as 270 * a four byte field. Cons up a dummy header 271 * to pacify bpf. This is safe because bpf --- 126 unchanged lines hidden --- |