Deleted Added
full compact
if_loop.c (158471) if_loop.c (159180)
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

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

22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * @(#)if_loop.c 8.2 (Berkeley) 1/9/95
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

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

22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
29 * @(#)if_loop.c 8.2 (Berkeley) 1/9/95
30 * $FreeBSD: head/sys/net/if_loop.c 158471 2006-05-12 05:04:46Z jhb $
30 * $FreeBSD: head/sys/net/if_loop.c 159180 2006-06-02 19:59:33Z csjp $
31 */
32
33/*
34 * Loopback interface driver for protocol testing and timing.
35 */
36
37#include "opt_atalk.h"
38#include "opt_inet.h"

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

254{
255 int isr;
256
257 M_ASSERTPKTHDR(m);
258 m_tag_delete_nonpersistent(m);
259 m->m_pkthdr.rcvif = ifp;
260
261 /* Let BPF see incoming packet */
31 */
32
33/*
34 * Loopback interface driver for protocol testing and timing.
35 */
36
37#include "opt_atalk.h"
38#include "opt_inet.h"

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

254{
255 int isr;
256
257 M_ASSERTPKTHDR(m);
258 m_tag_delete_nonpersistent(m);
259 m->m_pkthdr.rcvif = ifp;
260
261 /* Let BPF see incoming packet */
262 if (ifp->if_bpf) {
262 if (bpf_peers_present(ifp->if_bpf)) {
263 if (ifp->if_bpf->bif_dlt == DLT_NULL) {
264 u_int32_t af1 = af; /* XXX beware sizeof(af) != 4 */
265 /*
266 * We need to prepend the address family.
267 */
268 bpf_mtap2(ifp->if_bpf, &af1, sizeof(af1), m);
269 } else
270 bpf_mtap(ifp->if_bpf, m);

--- 127 unchanged lines hidden ---
263 if (ifp->if_bpf->bif_dlt == DLT_NULL) {
264 u_int32_t af1 = af; /* XXX beware sizeof(af) != 4 */
265 /*
266 * We need to prepend the address family.
267 */
268 bpf_mtap2(ifp->if_bpf, &af1, sizeof(af1), m);
269 } else
270 bpf_mtap(ifp->if_bpf, m);

--- 127 unchanged lines hidden ---