diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2006-03-25 22:41:49 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2006-03-25 22:41:49 +0000 |
commit | 24436414aab60dc84348ec54f23b324b4ae862a3 (patch) | |
tree | ee35283622a78eeac5656cb5661954771faf6520 /sys/dev/pcmcia | |
parent | d1265a1a72755bd0209950654a6df47287781241 (diff) |
allow bpf(4) to ignore packets based on their direction (inbound or
outbound), using a new BIOCSDIRFILT ioctl;
guidance, feedback and ok canacar@
Diffstat (limited to 'sys/dev/pcmcia')
-rw-r--r-- | sys/dev/pcmcia/if_cnw.c | 6 | ||||
-rw-r--r-- | sys/dev/pcmcia/if_ray.c | 6 | ||||
-rw-r--r-- | sys/dev/pcmcia/if_xe.c | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/sys/dev/pcmcia/if_cnw.c b/sys/dev/pcmcia/if_cnw.c index fdf7b662f8f..aa92f42f7b2 100644 --- a/sys/dev/pcmcia/if_cnw.c +++ b/sys/dev/pcmcia/if_cnw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_cnw.c,v 1.15 2005/01/27 17:04:55 millert Exp $ */ +/* $OpenBSD: if_cnw.c,v 1.16 2006/03/25 22:41:46 djm Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. @@ -477,7 +477,7 @@ cnw_start(ifp) #if NBPFILTER > 0 if (ifp->if_bpf) - bpf_mtap(ifp->if_bpf, m0); + bpf_mtap(ifp->if_bpf, m0, BPF_DIRECTION_OUT); #endif cnw_transmit(sc, m0); @@ -667,7 +667,7 @@ cnw_recv(sc) #if NBPFILTER > 0 if (ifp->if_bpf) - bpf_mtap(ifp->if_bpf, m); + bpf_mtap(ifp->if_bpf, m, BPF_DIRECTION_IN); #endif /* diff --git a/sys/dev/pcmcia/if_ray.c b/sys/dev/pcmcia/if_ray.c index 64364139125..1f7acae9c00 100644 --- a/sys/dev/pcmcia/if_ray.c +++ b/sys/dev/pcmcia/if_ray.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ray.c,v 1.30 2005/11/23 11:39:37 mickey Exp $ */ +/* $OpenBSD: if_ray.c,v 1.31 2006/03/25 22:41:46 djm Exp $ */ /* $NetBSD: if_ray.c,v 1.21 2000/07/05 02:35:54 onoe Exp $ */ /* @@ -1342,7 +1342,7 @@ ray_intr_start(sc) m0->m_len -= sizeof(struct ieee80211_frame); m0->m_pkthdr.len -= sizeof(struct ieee80211_frame); } - bpf_mtap(ifp->if_bpf, m0); + bpf_mtap(ifp->if_bpf, m0, BPF_DIRECTION_OUT); if (ifp->if_flags & IFF_LINK0) { m0->m_data -= sizeof(struct ieee80211_frame); m0->m_len += sizeof(struct ieee80211_frame); @@ -1633,7 +1633,7 @@ done: m_adj(m, (caddr_t)eh - (caddr_t)frame); #if NBPFILTER > 0 if (ifp->if_bpf) - bpf_mtap(ifp->if_bpf, m); + bpf_mtap(ifp->if_bpf, m, BPF_DIRECTION_IN); #endif ifp->if_ipackets++; diff --git a/sys/dev/pcmcia/if_xe.c b/sys/dev/pcmcia/if_xe.c index b1c0514df72..ab00415a002 100644 --- a/sys/dev/pcmcia/if_xe.c +++ b/sys/dev/pcmcia/if_xe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_xe.c,v 1.31 2005/11/23 11:39:37 mickey Exp $ */ +/* $OpenBSD: if_xe.c,v 1.32 2006/03/25 22:41:46 djm Exp $ */ /* * Copyright (c) 1999 Niklas Hallqvist, Brandon Creighton, Job de Haas @@ -837,7 +837,7 @@ xe_get(sc) #if NBPFILTER > 0 if (ifp->if_bpf) - bpf_mtap(ifp->if_bpf, top); + bpf_mtap(ifp->if_bpf, top, BPF_DIRECTION_IN); #endif ether_input_mbuf(ifp, top); @@ -1133,7 +1133,7 @@ xe_start(ifp) #if NBPFILTER > 0 if (ifp->if_bpf) - bpf_mtap(ifp->if_bpf, m0); + bpf_mtap(ifp->if_bpf, m0, BPF_DIRECTION_OUT); #endif /* |