Deleted Added
full compact
if_disc.c (152308) if_disc.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 * 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

--- 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 * From: @(#)if_loop.c 8.1 (Berkeley) 6/10/93
30 * $FreeBSD: head/sys/net/if_disc.c 152308 2005-11-11 11:17:57Z glebius $
30 * $FreeBSD: head/sys/net/if_disc.c 159180 2006-06-02 19:59:33Z csjp $
31 */
32
33/*
34 * Discard interface driver for protocol testing and timing.
35 * (Based on the loopback.)
36 */
37
38#include <sys/param.h>

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

153 M_ASSERTPKTHDR(m);
154
155 /* BPF writes need to be handled specially. */
156 if (dst->sa_family == AF_UNSPEC) {
157 bcopy(dst->sa_data, &af, sizeof(af));
158 dst->sa_family = af;
159 }
160
31 */
32
33/*
34 * Discard interface driver for protocol testing and timing.
35 * (Based on the loopback.)
36 */
37
38#include <sys/param.h>

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

153 M_ASSERTPKTHDR(m);
154
155 /* BPF writes need to be handled specially. */
156 if (dst->sa_family == AF_UNSPEC) {
157 bcopy(dst->sa_data, &af, sizeof(af));
158 dst->sa_family = af;
159 }
160
161 if (ifp->if_bpf) {
161 if (bpf_peers_present(ifp->if_bpf)) {
162 u_int af = dst->sa_family;
163 bpf_mtap2(ifp->if_bpf, &af, sizeof(af), m);
164 }
165 m->m_pkthdr.rcvif = ifp;
166
167 ifp->if_opackets++;
168 ifp->if_obytes += m->m_pkthdr.len;
169

--- 66 unchanged lines hidden ---
162 u_int af = dst->sa_family;
163 bpf_mtap2(ifp->if_bpf, &af, sizeof(af), m);
164 }
165 m->m_pkthdr.rcvif = ifp;
166
167 ifp->if_opackets++;
168 ifp->if_obytes += m->m_pkthdr.len;
169

--- 66 unchanged lines hidden ---