Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Use bpf_mtap() correctly.
details: https://anonhg.NetBSD.org/src/rev/dcd9a947bfbe
branches: trunk
changeset: 482613:dcd9a947bfbe
user: mycroft <mycroft%NetBSD.org@localhost>
date: Thu Feb 17 05:41:41 2000 +0000
description:
Use bpf_mtap() correctly.
diffstat:
sys/dev/usb/if_aue.c | 14 +++++++-------
sys/dev/usb/if_cue.c | 12 ++++++------
sys/dev/usb/if_kue.c | 12 ++++++------
3 files changed, 19 insertions(+), 19 deletions(-)
diffs (122 lines):
diff -r b654d0e0ecec -r dcd9a947bfbe sys/dev/usb/if_aue.c
--- a/sys/dev/usb/if_aue.c Thu Feb 17 04:28:00 2000 +0000
+++ b/sys/dev/usb/if_aue.c Thu Feb 17 05:41:41 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_aue.c,v 1.22 2000/02/12 15:02:21 augustss Exp $ */
+/* $NetBSD: if_aue.c,v 1.23 2000/02/17 05:41:41 mycroft Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
* Bill Paul <wpaul%ee.columbia.edu@localhost>. All rights reserved.
@@ -115,10 +115,10 @@
#if defined(__NetBSD__) || defined(__OpenBSD__)
#include <net/if_ether.h>
-
-#define bpf_mtap(ifp, m) bpf_tap((ifp)->if_bpf, mtod((m), caddr_t), (m)->m_len)
-
-#endif /* defined(__NetBSD__) || defined(__OpenBSD__) */
+#define BPF_MTAP(ifp, m) bpf_mtap((ifp)->if_bpf, (m))
+#else
+#define BPF_MTAP(ifp, m) bpf_mtap((ifp), (m))
+#endif
#if defined(__FreeBSD__) || NBPFILTER > 0
#include <net/bpf.h>
@@ -1213,7 +1213,7 @@
*/
if (ifp->if_bpf) {
struct ether_header *eh = mtod(m, struct ether_header *);
- bpf_mtap(ifp, m);
+ BPF_MTAP(ifp, m);
if ((ifp->if_flags & IFF_PROMISC) &&
memcmp(eh->ether_dhost, LLADDR(ifp->if_sadl),
ETHER_ADDR_LEN) &&
@@ -1426,7 +1426,7 @@
* to him.
*/
if (ifp->if_bpf)
- bpf_mtap(ifp, m_head);
+ BPF_MTAP(ifp, m_head);
ifp->if_flags |= IFF_OACTIVE;
diff -r b654d0e0ecec -r dcd9a947bfbe sys/dev/usb/if_cue.c
--- a/sys/dev/usb/if_cue.c Thu Feb 17 04:28:00 2000 +0000
+++ b/sys/dev/usb/if_cue.c Thu Feb 17 05:41:41 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_cue.c,v 1.5 2000/02/02 13:19:44 augustss Exp $ */
+/* $NetBSD: if_cue.c,v 1.6 2000/02/17 05:41:41 mycroft Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
* Bill Paul <wpaul%ee.columbia.edu@localhost>. All rights reserved.
@@ -95,9 +95,9 @@
#if defined(__NetBSD__) || defined(__OpenBSD__)
#include <net/if_ether.h>
-
-#define bpf_mtap(ifp, m) bpf_tap((ifp)->if_bpf, mtod((m), caddr_t), (m)->m_len)
-
+#define BPF_MTAP(ifp, m) bpf_mtap((ifp)->if_bpf, (m))
+#else
+#define BPF_MTAP(ifp, m) bpf_mtap((ifp), (m))
#endif
#if defined(__FreeBSD__) || NBPFILTER > 0
@@ -926,7 +926,7 @@
*/
if (ifp->if_bpf) {
struct ether_header *eh = mtod(m, struct ether_header *);
- bpf_mtap(ifp, m);
+ BPF_MTAP(ifp, m);
if ((ifp->if_flags & IFF_PROMISC) &&
memcmp(eh->ether_dhost, LLADDR(ifp->if_sadl),
ETHER_ADDR_LEN) &&
@@ -1112,7 +1112,7 @@
* to him.
*/
if (ifp->if_bpf)
- bpf_mtap(ifp, m_head);
+ BPF_MTAP(ifp, m_head);
ifp->if_flags |= IFF_OACTIVE;
diff -r b654d0e0ecec -r dcd9a947bfbe sys/dev/usb/if_kue.c
--- a/sys/dev/usb/if_kue.c Thu Feb 17 04:28:00 2000 +0000
+++ b/sys/dev/usb/if_kue.c Thu Feb 17 05:41:41 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_kue.c,v 1.6 2000/02/02 13:21:25 augustss Exp $ */
+/* $NetBSD: if_kue.c,v 1.7 2000/02/17 05:41:41 mycroft Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
* Bill Paul <wpaul%ee.columbia.edu@localhost>. All rights reserved.
@@ -111,9 +111,9 @@
#if defined(__NetBSD__) || defined(__OpenBSD__)
#include <net/if_ether.h>
-
-#define bpf_mtap(ifp, m) bpf_tap((ifp)->if_bpf, mtod((m), caddr_t), (m)->m_len)
-
+#define BPF_MTAP(ifp, m) bpf_mtap((ifp)->if_bpf, (m))
+#else
+#define BPF_MTAP(ifp, m) bpf_mtap((ifp), (m))
#endif
#if defined(__FreeBSD__) || NBPFILTER > 0
@@ -988,7 +988,7 @@
*/
if (ifp->if_bpf) {
struct ether_header *eh = mtod(m, struct ether_header *);
- bpf_mtap(ifp, m);
+ BPF_MTAP(ifp, m);
if ((ifp->if_flags & IFF_PROMISC) &&
memcmp(eh->ether_dhost, LLADDR(ifp->if_sadl),
ETHER_ADDR_LEN) &&
@@ -1150,7 +1150,7 @@
* to him.
*/
if (ifp->if_bpf)
- bpf_mtap(ifp, m_head);
+ BPF_MTAP(ifp, m_head);
ifp->if_flags |= IFF_OACTIVE;
Home |
Main Index |
Thread Index |
Old Index