Deleted Added
full compact
if_my.c (165632) if_my.c (165640)
1/*-
2 * Written by: yen_cw@myson.com.tw
3 * Copyright (c) 2002 Myson Technology Inc.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 *
27 * Myson fast ethernet PCI NIC driver, available at: http://www.myson.com.tw/
28 */
29
30#include <sys/cdefs.h>
1/*-
2 * Written by: yen_cw@myson.com.tw
3 * Copyright (c) 2002 Myson Technology Inc.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 *
27 * Myson fast ethernet PCI NIC driver, available at: http://www.myson.com.tw/
28 */
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: head/sys/dev/my/if_my.c 165632 2006-12-29 13:59:50Z jhb $");
31__FBSDID("$FreeBSD: head/sys/dev/my/if_my.c 165640 2006-12-29 16:38:22Z jhb $");
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/sockio.h>
36#include <sys/mbuf.h>
37#include <sys/malloc.h>
38#include <sys/kernel.h>
39#include <sys/socket.h>

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

1157#if NBPFILTER > 0
1158 /*
1159 * Handle BPF listeners. Let the BPF user see the packet, but
1160 * don't pass it up to the ether_input() layer unless it's a
1161 * broadcast packet, multicast packet, matches our ethernet
1162 * address or the interface is in promiscuous mode.
1163 */
1164 if (bpf_peers_present(ifp->if_bpf)) {
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/sockio.h>
36#include <sys/mbuf.h>
37#include <sys/malloc.h>
38#include <sys/kernel.h>
39#include <sys/socket.h>

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

1157#if NBPFILTER > 0
1158 /*
1159 * Handle BPF listeners. Let the BPF user see the packet, but
1160 * don't pass it up to the ether_input() layer unless it's a
1161 * broadcast packet, multicast packet, matches our ethernet
1162 * address or the interface is in promiscuous mode.
1163 */
1164 if (bpf_peers_present(ifp->if_bpf)) {
1165 bpf_mtap(ifp, m);
1165 bpf_mtap(ifp->if_bpf, m);
1166 if (ifp->if_flags & IFF_PROMISC &&
1167 (bcmp(eh->ether_dhost, IF_LLADDR(sc->my_ifp),
1168 ETHER_ADDR_LEN) &&
1169 (eh->ether_dhost[0] & 1) == 0)) {
1170 m_freem(m);
1171 continue;
1172 }
1173 }

--- 598 unchanged lines hidden ---
1166 if (ifp->if_flags & IFF_PROMISC &&
1167 (bcmp(eh->ether_dhost, IF_LLADDR(sc->my_ifp),
1168 ETHER_ADDR_LEN) &&
1169 (eh->ether_dhost[0] & 1) == 0)) {
1170 m_freem(m);
1171 continue;
1172 }
1173 }

--- 598 unchanged lines hidden ---