Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Removal of bpf_tap().



details:   https://anonhg.NetBSD.org/src/rev/1bf8e92fdbed
branches:  trunk
changeset: 323665:1bf8e92fdbed
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Mon Jun 25 03:22:14 2018 +0000

description:
Removal of bpf_tap().

diffstat:

 share/man/man9/bpf.9 |   5 ++---
 sys/net/bpf.c        |  18 ++----------------
 sys/net/bpf.h        |  10 +---------
 sys/net/bpf_stub.c   |   5 ++---
 4 files changed, 7 insertions(+), 31 deletions(-)

diffs (129 lines):

diff -r b4e767fe9073 -r 1bf8e92fdbed share/man/man9/bpf.9
--- a/share/man/man9/bpf.9      Mon Jun 25 01:21:21 2018 +0000
+++ b/share/man/man9/bpf.9      Mon Jun 25 03:22:14 2018 +0000
@@ -1,4 +1,4 @@
-.\"     $NetBSD: bpf.9,v 1.3 2010/12/02 12:54:13 wiz Exp $
+.\"     $NetBSD: bpf.9,v 1.4 2018/06/25 03:22:14 msaitoh Exp $
 .\"
 .\" Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -24,7 +24,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd June 8, 2010
+.Dd June 25, 2018
 .Dt BPF 9
 .Os
 .Sh NAME
@@ -43,7 +43,6 @@
         void (*bpf_detach)(struct ifnet *);
         void (*bpf_change_type)(struct ifnet *, u_int, u_int);
 
-        void (*bpf_tap)(struct bpf_if *, u_char *, u_int);
         void (*bpf_mtap)(struct bpf_if *, struct mbuf *);
         void (*bpf_mtap2)(struct bpf_if *, void *, u_int, struct mbuf *);
         void (*bpf_mtap_af)(struct bpf_if *, uint32_t, struct mbuf *);
diff -r b4e767fe9073 -r 1bf8e92fdbed sys/net/bpf.c
--- a/sys/net/bpf.c     Mon Jun 25 01:21:21 2018 +0000
+++ b/sys/net/bpf.c     Mon Jun 25 03:22:14 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bpf.c,v 1.224 2018/05/14 02:55:03 ozaki-r Exp $        */
+/*     $NetBSD: bpf.c,v 1.225 2018/06/25 03:22:14 msaitoh Exp $        */
 
 /*
  * Copyright (c) 1990, 1991, 1993
@@ -39,7 +39,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bpf.c,v 1.224 2018/05/14 02:55:03 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bpf.c,v 1.225 2018/06/25 03:22:14 msaitoh Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_bpf.h"
@@ -1608,19 +1608,6 @@
 }
 
 /*
- * Incoming linkage from device drivers.  Process the packet pkt, of length
- * pktlen, which is stored in a contiguous buffer.  The packet is parsed
- * by each process' filter, and if accepted, stashed into the corresponding
- * buffer.
- */
-static void
-_bpf_tap(struct bpf_if *bp, u_char *pkt, u_int pktlen)
-{
-
-       bpf_deliver(bp, memcpy, pkt, pktlen, pktlen, true);
-}
-
-/*
  * Incoming linkage from device drivers, when the head of the packet is in
  * a buffer, and the tail is in an mbuf chain.
  */
@@ -2453,7 +2440,6 @@
        .bpf_detach =           _bpfdetach,
        .bpf_change_type =      _bpf_change_type,
 
-       .bpf_tap =              _bpf_tap,
        .bpf_mtap =             _bpf_mtap,
        .bpf_mtap2 =            _bpf_mtap2,
        .bpf_mtap_af =          _bpf_mtap_af,
diff -r b4e767fe9073 -r 1bf8e92fdbed sys/net/bpf.h
--- a/sys/net/bpf.h     Mon Jun 25 01:21:21 2018 +0000
+++ b/sys/net/bpf.h     Mon Jun 25 03:22:14 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bpf.h,v 1.70 2018/04/19 21:20:43 christos Exp $        */
+/*     $NetBSD: bpf.h,v 1.71 2018/06/25 03:22:14 msaitoh Exp $ */
 
 /*
  * Copyright (c) 1990, 1991, 1993
@@ -417,7 +417,6 @@
        void (*bpf_detach)(struct ifnet *);
        void (*bpf_change_type)(struct ifnet *, u_int, u_int);
 
-       void (*bpf_tap)(struct bpf_if *, u_char *, u_int);
        void (*bpf_mtap)(struct bpf_if *, struct mbuf *);
        void (*bpf_mtap2)(struct bpf_if *, void *, u_int, struct mbuf *);
        void (*bpf_mtap_af)(struct bpf_if *, uint32_t, struct mbuf *);
@@ -443,13 +442,6 @@
 }
 
 static __inline void
-bpf_tap(struct ifnet *_ifp, u_char *_pkt, u_int _len)
-{
-       if (_ifp->if_bpf)
-               bpf_ops->bpf_tap(_ifp->if_bpf, _pkt, _len);
-}
-
-static __inline void
 bpf_mtap(struct ifnet *_ifp, struct mbuf *_m)
 {
        if (_ifp->if_bpf)
diff -r b4e767fe9073 -r 1bf8e92fdbed sys/net/bpf_stub.c
--- a/sys/net/bpf_stub.c        Mon Jun 25 01:21:21 2018 +0000
+++ b/sys/net/bpf_stub.c        Mon Jun 25 03:22:14 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bpf_stub.c,v 1.7 2017/01/25 01:04:23 ozaki-r Exp $     */
+/*     $NetBSD: bpf_stub.c,v 1.8 2018/06/25 03:22:14 msaitoh Exp $     */
 
 /*
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bpf_stub.c,v 1.7 2017/01/25 01:04:23 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bpf_stub.c,v 1.8 2018/06/25 03:22:14 msaitoh Exp $");
 
 #include <sys/param.h>
 #include <sys/kmem.h>
@@ -61,7 +61,6 @@
        .bpf_detach =           bpf_stub_detach,
        .bpf_change_type =      (void *)bpf_stub_null,
 
-       .bpf_tap =              (void *)bpf_stub_warn,
        .bpf_mtap =             (void *)bpf_stub_warn,
        .bpf_mtap2 =            (void *)bpf_stub_warn,
        .bpf_mtap_af =          (void *)bpf_stub_warn,



Home | Main Index | Thread Index | Old Index