summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2019-09-30 01:53:06 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2019-09-30 01:53:06 +0000
commit2e94edf8d3329a76b2efd0b561196b9ca70b3bf8 (patch)
tree9a36df6a40732f924746ac29d58b8f008ac70332 /sys
parenta2ace3df863ed064c9012c07f26dbdae274f782d (diff)
remove the "copy function" argument to bpf_mtap_hdr.
it was previously (ab)used by pflog, which has since been fixed. apart from that nothing else used it, so we can trim the cruft. ok kn@ claudio@ visa@ visa@ also made sure i fixed ipw(4) so i386 won't break.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/if_ipw.c6
-rw-r--r--sys/dev/pci/if_iwi.c6
-rw-r--r--sys/dev/pci/if_iwm.c6
-rw-r--r--sys/dev/pci/if_iwn.c6
-rw-r--r--sys/dev/pci/if_mcx.c4
-rw-r--r--sys/dev/pci/if_wpi.c6
-rw-r--r--sys/net/bpf.c10
-rw-r--r--sys/net/bpf.h5
-rw-r--r--sys/net/if_pflog.c4
-rw-r--r--sys/net/if_switch.c4
-rw-r--r--sys/netinet/ip_ah.c4
-rw-r--r--sys/netinet/ip_esp.c4
-rw-r--r--sys/netinet/ip_ipcomp.c4
-rw-r--r--sys/netinet/ipsec_input.c4
14 files changed, 36 insertions, 37 deletions
diff --git a/sys/dev/pci/if_ipw.c b/sys/dev/pci/if_ipw.c
index b0e8a3e778e..89d0fac49ce 100644
--- a/sys/dev/pci/if_ipw.c
+++ b/sys/dev/pci/if_ipw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ipw.c,v 1.125 2019/09/18 23:52:32 dlg Exp $ */
+/* $OpenBSD: if_ipw.c,v 1.126 2019/09/30 01:53:05 dlg Exp $ */
/*-
* Copyright (c) 2004-2008
@@ -887,7 +887,7 @@ ipw_data_intr(struct ipw_softc *sc, struct ipw_status *status,
tap->wr_chan_flags = htole16(ic->ic_ibss_chan->ic_flags);
bpf_mtap_hdr(sc->sc_drvbpf, tap, sc->sc_rxtap_len,
- m, BPF_DIRECTION_IN, NULL);
+ m, BPF_DIRECTION_IN);
}
#endif
@@ -1157,7 +1157,7 @@ ipw_tx_start(struct ifnet *ifp, struct mbuf *m, struct ieee80211_node *ni)
tap->wt_chan_flags = htole16(ic->ic_ibss_chan->ic_flags);
bpf_mtap_hdr(sc->sc_drvbpf, tap, sc->sc_txtap_len,
- m, BPF_DIRECTION_OUT, NULL);
+ m, BPF_DIRECTION_OUT);
}
#endif
diff --git a/sys/dev/pci/if_iwi.c b/sys/dev/pci/if_iwi.c
index 8b5f9119a60..e7093399642 100644
--- a/sys/dev/pci/if_iwi.c
+++ b/sys/dev/pci/if_iwi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwi.c,v 1.142 2019/09/18 23:52:32 dlg Exp $ */
+/* $OpenBSD: if_iwi.c,v 1.143 2019/09/30 01:53:05 dlg Exp $ */
/*-
* Copyright (c) 2004-2008
@@ -937,7 +937,7 @@ iwi_frame_intr(struct iwi_softc *sc, struct iwi_rx_data *data,
tap->wr_flags |= IEEE80211_RADIOTAP_F_SHORTPRE;
bpf_mtap_hdr(sc->sc_drvbpf, tap, sc->sc_rxtap_len,
- m, BPF_DIRECTION_IN, NULL);
+ m, BPF_DIRECTION_IN);
}
#endif
@@ -1268,7 +1268,7 @@ iwi_tx_start(struct ifnet *ifp, struct mbuf *m0, struct ieee80211_node *ni)
tap->wt_chan_flags = htole16(ic->ic_bss->ni_chan->ic_flags);
bpf_mtap_hdr(sc->sc_drvbpf, tap, sc->sc_txtap_len,
- m0, BPF_DIRECTION_OUT, NULL);
+ m0, BPF_DIRECTION_OUT);
}
#endif
diff --git a/sys/dev/pci/if_iwm.c b/sys/dev/pci/if_iwm.c
index 1c024bb0bcc..94d4f26f861 100644
--- a/sys/dev/pci/if_iwm.c
+++ b/sys/dev/pci/if_iwm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwm.c,v 1.251 2019/09/18 23:52:32 dlg Exp $ */
+/* $OpenBSD: if_iwm.c,v 1.252 2019/09/30 01:53:05 dlg Exp $ */
/*
* Copyright (c) 2014, 2016 genua gmbh <info@genua.de>
@@ -3555,7 +3555,7 @@ iwm_rx_rx_mpdu(struct iwm_softc *sc, struct iwm_rx_packet *pkt,
}
bpf_mtap_hdr(sc->sc_drvbpf, tap, sc->sc_rxtap_len,
- m, BPF_DIRECTION_IN, NULL);
+ m, BPF_DIRECTION_IN);
}
#endif
ieee80211_inputm(IC2IFP(ic), m, ni, &rxi, ml);
@@ -4262,7 +4262,7 @@ iwm_tx(struct iwm_softc *sc, struct mbuf *m, struct ieee80211_node *ni, int ac)
tap->wt_flags |= IEEE80211_RADIOTAP_F_WEP;
bpf_mtap_hdr(sc->sc_drvbpf, tap, sc->sc_txtap_len,
- m, BPF_DIRECTION_OUT, NULL);
+ m, BPF_DIRECTION_OUT);
}
#endif
diff --git a/sys/dev/pci/if_iwn.c b/sys/dev/pci/if_iwn.c
index e4ca02e0398..e9ca16a6f82 100644
--- a/sys/dev/pci/if_iwn.c
+++ b/sys/dev/pci/if_iwn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwn.c,v 1.217 2019/09/18 23:52:32 dlg Exp $ */
+/* $OpenBSD: if_iwn.c,v 1.218 2019/09/30 01:53:05 dlg Exp $ */
/*-
* Copyright (c) 2007-2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -2227,7 +2227,7 @@ iwn_rx_done(struct iwn_softc *sc, struct iwn_rx_desc *desc,
}
bpf_mtap_hdr(sc->sc_drvbpf, tap, sc->sc_rxtap_len,
- m, BPF_DIRECTION_IN, NULL);
+ m, BPF_DIRECTION_IN);
}
#endif
@@ -3277,7 +3277,7 @@ iwn_tx(struct iwn_softc *sc, struct mbuf *m, struct ieee80211_node *ni)
tap->wt_flags |= IEEE80211_RADIOTAP_F_WEP;
bpf_mtap_hdr(sc->sc_drvbpf, tap, sc->sc_txtap_len,
- m, BPF_DIRECTION_OUT, NULL);
+ m, BPF_DIRECTION_OUT);
}
#endif
diff --git a/sys/dev/pci/if_mcx.c b/sys/dev/pci/if_mcx.c
index 6c1d6e93d27..90d5e05fef7 100644
--- a/sys/dev/pci/if_mcx.c
+++ b/sys/dev/pci/if_mcx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_mcx.c,v 1.33 2019/09/12 04:23:59 jmatthew Exp $ */
+/* $OpenBSD: if_mcx.c,v 1.34 2019/09/30 01:53:05 dlg Exp $ */
/*
* Copyright (c) 2017 David Gwynne <dlg@openbsd.org>
@@ -6352,7 +6352,7 @@ mcx_start(struct ifqueue *ifq)
if (ifp->if_bpf)
bpf_mtap_hdr(ifp->if_bpf,
(caddr_t)sqe->sqe_inline_headers,
- MCX_SQ_INLINE_SIZE, m, BPF_DIRECTION_OUT, NULL);
+ MCX_SQ_INLINE_SIZE, m, BPF_DIRECTION_OUT);
#endif
map = ms->ms_map;
bus_dmamap_sync(sc->sc_dmat, map, 0, map->dm_mapsize,
diff --git a/sys/dev/pci/if_wpi.c b/sys/dev/pci/if_wpi.c
index cbf2b816a62..23514161af1 100644
--- a/sys/dev/pci/if_wpi.c
+++ b/sys/dev/pci/if_wpi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_wpi.c,v 1.148 2019/09/18 23:52:32 dlg Exp $ */
+/* $OpenBSD: if_wpi.c,v 1.149 2019/09/30 01:53:05 dlg Exp $ */
/*-
* Copyright (c) 2006-2008
@@ -1331,7 +1331,7 @@ wpi_rx_done(struct wpi_softc *sc, struct wpi_rx_desc *desc,
}
bpf_mtap_hdr(sc->sc_drvbpf, tap, sc->sc_rxtap_len,
- m, BPF_DIRECTION_IN, NULL);
+ m, BPF_DIRECTION_IN);
}
#endif
@@ -1711,7 +1711,7 @@ wpi_tx(struct wpi_softc *sc, struct mbuf *m, struct ieee80211_node *ni)
tap->wt_flags |= IEEE80211_RADIOTAP_F_WEP;
bpf_mtap_hdr(sc->sc_drvbpf, tap, sc->sc_txtap_len,
- m, BPF_DIRECTION_OUT, NULL);
+ m, BPF_DIRECTION_OUT);
}
#endif
diff --git a/sys/net/bpf.c b/sys/net/bpf.c
index 353633a4e69..b8bce30baa6 100644
--- a/sys/net/bpf.c
+++ b/sys/net/bpf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bpf.c,v 1.179 2019/09/12 01:25:14 dlg Exp $ */
+/* $OpenBSD: bpf.c,v 1.180 2019/09/30 01:53:05 dlg Exp $ */
/* $NetBSD: bpf.c,v 1.33 1997/02/21 23:59:35 thorpej Exp $ */
/*
@@ -1368,7 +1368,7 @@ bpf_mtap(caddr_t arg, const struct mbuf *m, u_int direction)
*/
int
bpf_mtap_hdr(caddr_t arg, const void *data, u_int dlen, const struct mbuf *m,
- u_int direction, void (*cpfn)(const void *, void *, size_t))
+ u_int direction)
{
struct m_hdr mh;
const struct mbuf *m0;
@@ -1382,7 +1382,7 @@ bpf_mtap_hdr(caddr_t arg, const void *data, u_int dlen, const struct mbuf *m,
} else
m0 = m;
- return _bpf_mtap(arg, m0, direction, cpfn);
+ return _bpf_mtap(arg, m0, direction, NULL);
}
/*
@@ -1401,7 +1401,7 @@ bpf_mtap_af(caddr_t arg, u_int32_t af, const struct mbuf *m, u_int direction)
afh = htonl(af);
- return bpf_mtap_hdr(arg, &afh, sizeof(afh), m, direction, NULL);
+ return bpf_mtap_hdr(arg, &afh, sizeof(afh), m, direction);
}
/*
@@ -1446,7 +1446,7 @@ bpf_mtap_ether(caddr_t arg, const struct mbuf *m, u_int direction)
mh.mh_next = m->m_next;
return bpf_mtap_hdr(arg, &evh, sizeof(evh),
- (struct mbuf *)&mh, direction, NULL);
+ (struct mbuf *)&mh, direction);
#endif
}
diff --git a/sys/net/bpf.h b/sys/net/bpf.h
index bc09b5b43ee..90102fc2f29 100644
--- a/sys/net/bpf.h
+++ b/sys/net/bpf.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bpf.h,v 1.67 2019/09/12 01:17:38 dlg Exp $ */
+/* $OpenBSD: bpf.h,v 1.68 2019/09/30 01:53:04 dlg Exp $ */
/* $NetBSD: bpf.h,v 1.15 1996/12/13 07:57:33 mikel Exp $ */
/*
@@ -315,8 +315,7 @@ struct mbuf;
int bpf_validate(struct bpf_insn *, int);
int bpf_mtap(caddr_t, const struct mbuf *, u_int);
-int bpf_mtap_hdr(caddr_t, const void *, u_int, const struct mbuf *, u_int,
- void (*)(const void *, void *, size_t));
+int bpf_mtap_hdr(caddr_t, const void *, u_int, const struct mbuf *, u_int);
int bpf_mtap_af(caddr_t, u_int32_t, const struct mbuf *, u_int);
int bpf_mtap_ether(caddr_t, const struct mbuf *, u_int);
int bpf_tap_hdr(caddr_t, const void *, u_int, const void *, u_int, u_int);
diff --git a/sys/net/if_pflog.c b/sys/net/if_pflog.c
index 6c199f00086..c0cb408a146 100644
--- a/sys/net/if_pflog.c
+++ b/sys/net/if_pflog.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_pflog.c,v 1.84 2019/09/13 01:47:51 dlg Exp $ */
+/* $OpenBSD: if_pflog.c,v 1.85 2019/09/30 01:53:05 dlg Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr) and
@@ -418,5 +418,5 @@ pflog_mtap(caddr_t if_bpf, struct pfloghdr *pfloghdr, struct mbuf *m)
m = pd.m;
copy:
bpf_mtap_hdr(if_bpf, pfloghdr, sizeof(*pfloghdr), m,
- BPF_DIRECTION_OUT, NULL);
+ BPF_DIRECTION_OUT);
}
diff --git a/sys/net/if_switch.c b/sys/net/if_switch.c
index 1a9d184e918..97ff1d1fbba 100644
--- a/sys/net/if_switch.c
+++ b/sys/net/if_switch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_switch.c,v 1.28 2019/05/12 16:24:44 akoshibe Exp $ */
+/* $OpenBSD: if_switch.c,v 1.29 2019/09/30 01:53:05 dlg Exp $ */
/*
* Copyright (c) 2016 Kazuya GODA <goda@openbsd.org>
@@ -1494,7 +1494,7 @@ switch_mtap(caddr_t arg, struct mbuf *m, int dir, uint64_t datapath_id)
of.of_direction = htonl(dir == BPF_DIRECTION_IN ?
DLT_OPENFLOW_TO_SWITCH : DLT_OPENFLOW_TO_CONTROLLER);
- return (bpf_mtap_hdr(arg, (caddr_t)&of, sizeof(of), m, dir, NULL));
+ return (bpf_mtap_hdr(arg, (caddr_t)&of, sizeof(of), m, dir));
}
int
diff --git a/sys/netinet/ip_ah.c b/sys/netinet/ip_ah.c
index 533cdf32f4f..e94b9ead813 100644
--- a/sys/netinet/ip_ah.c
+++ b/sys/netinet/ip_ah.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ah.c,v 1.143 2018/08/28 15:15:02 mpi Exp $ */
+/* $OpenBSD: ip_ah.c,v 1.144 2019/09/30 01:53:05 dlg Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr) and
@@ -914,7 +914,7 @@ ah_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int skip,
hdr.flags |= M_AUTH;
bpf_mtap_hdr(encif->if_bpf, (char *)&hdr,
- ENC_HDRLEN, m, BPF_DIRECTION_OUT, NULL);
+ ENC_HDRLEN, m, BPF_DIRECTION_OUT);
}
}
#endif
diff --git a/sys/netinet/ip_esp.c b/sys/netinet/ip_esp.c
index 03c24919305..bf44aa8bbb0 100644
--- a/sys/netinet/ip_esp.c
+++ b/sys/netinet/ip_esp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_esp.c,v 1.158 2018/08/28 15:15:02 mpi Exp $ */
+/* $OpenBSD: ip_esp.c,v 1.159 2019/09/30 01:53:05 dlg Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr) and
@@ -767,7 +767,7 @@ esp_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int skip,
hdr.flags |= M_AUTH;
bpf_mtap_hdr(encif->if_bpf, (char *)&hdr,
- ENC_HDRLEN, m, BPF_DIRECTION_OUT, NULL);
+ ENC_HDRLEN, m, BPF_DIRECTION_OUT);
}
}
#endif
diff --git a/sys/netinet/ip_ipcomp.c b/sys/netinet/ip_ipcomp.c
index dac65a0344f..37bb95ea4b9 100644
--- a/sys/netinet/ip_ipcomp.c
+++ b/sys/netinet/ip_ipcomp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_ipcomp.c,v 1.66 2018/09/13 12:29:43 mpi Exp $ */
+/* $OpenBSD: ip_ipcomp.c,v 1.67 2019/09/30 01:53:05 dlg Exp $ */
/*
* Copyright (c) 2001 Jean-Jacques Bernard-Gundol (jj@wabbitt.org)
@@ -337,7 +337,7 @@ ipcomp_output(struct mbuf *m, struct tdb *tdb, struct mbuf **mp, int skip,
hdr.spi = tdb->tdb_spi;
bpf_mtap_hdr(encif->if_bpf, (char *)&hdr,
- ENC_HDRLEN, m, BPF_DIRECTION_OUT, NULL);
+ ENC_HDRLEN, m, BPF_DIRECTION_OUT);
}
}
#endif
diff --git a/sys/netinet/ipsec_input.c b/sys/netinet/ipsec_input.c
index 0e251fc4e3d..b6d0083af40 100644
--- a/sys/netinet/ipsec_input.c
+++ b/sys/netinet/ipsec_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ipsec_input.c,v 1.168 2018/11/09 13:26:12 claudio Exp $ */
+/* $OpenBSD: ipsec_input.c,v 1.169 2019/09/30 01:53:05 dlg Exp $ */
/*
* The authors of this code are John Ioannidis (ji@tla.org),
* Angelos D. Keromytis (kermit@csd.uch.gr) and
@@ -677,7 +677,7 @@ ipsec_common_input_cb(struct mbuf *m, struct tdb *tdbp, int skip, int protoff)
hdr.flags = m->m_flags & (M_AUTH|M_CONF);
bpf_mtap_hdr(encif->if_bpf, (char *)&hdr,
- ENC_HDRLEN, m, BPF_DIRECTION_IN, NULL);
+ ENC_HDRLEN, m, BPF_DIRECTION_IN);
}
}
#endif