Deleted Added
full compact
if_disc.c (15117) if_disc.c (16287)
1/*
2 * Copyright (c) 1982, 1986, 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_loop.c 8.1 (Berkeley) 6/10/93
1/*
2 * Copyright (c) 1982, 1986, 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_loop.c 8.1 (Berkeley) 6/10/93
34 * $Id: if_disc.c,v 1.11 1996/02/06 18:51:11 wollman Exp $
34 * $Id: if_disc.c,v 1.12 1996/04/07 17:39:03 bde Exp $
35 */
36
37/*
38 * Discard interface driver for protocol testing and timing.
39 * (Based on the loopback.)
40 */
41
42#include <sys/param.h>

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

113dsoutput(ifp, m, dst, rt)
114 struct ifnet *ifp;
115 register struct mbuf *m;
116 struct sockaddr *dst;
117 register struct rtentry *rt;
118{
119 if ((m->m_flags & M_PKTHDR) == 0)
120 panic("dsoutput no HDR");
35 */
36
37/*
38 * Discard interface driver for protocol testing and timing.
39 * (Based on the loopback.)
40 */
41
42#include <sys/param.h>

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

113dsoutput(ifp, m, dst, rt)
114 struct ifnet *ifp;
115 register struct mbuf *m;
116 struct sockaddr *dst;
117 register struct rtentry *rt;
118{
119 if ((m->m_flags & M_PKTHDR) == 0)
120 panic("dsoutput no HDR");
121 ifp->if_lastchange = time;
122#if NBPFILTER > 0
123 /* BPF write needs to be handled specially */
124 if (dst->sa_family == AF_UNSPEC) {
125 dst->sa_family = *(mtod(m, int *));
126 m->m_len -= sizeof(int);
127 m->m_pkthdr.len -= sizeof(int);
128 m->m_data += sizeof(int);
129 }

--- 98 unchanged lines hidden ---
121#if NBPFILTER > 0
122 /* BPF write needs to be handled specially */
123 if (dst->sa_family == AF_UNSPEC) {
124 dst->sa_family = *(mtod(m, int *));
125 m->m_len -= sizeof(int);
126 m->m_pkthdr.len -= sizeof(int);
127 m->m_data += sizeof(int);
128 }

--- 98 unchanged lines hidden ---