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/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); |
108 gettime(&ifp->if_lastchange); |
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 } |
263 gettime(&ifp->if_lastchange); |
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 --- |