Deleted Added
sdiff udiff text old ( 27845 ) new ( 31264 )
full compact
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);
109 ifp->if_lastchange = time;
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 }
264 ifp->if_lastchange = time;
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 ---