diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2019-09-12 01:17:39 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2019-09-12 01:17:39 +0000 |
commit | 0b5ca35b5bdac23f8cb23b7f012a4984078781a3 (patch) | |
tree | 8e7e9bc955e779dd68e0d32c7a841aa291194b83 /sys | |
parent | d4b5a8cc7d9f6472b04f6dc5408cf0441ba4ab2d (diff) |
make bpf_mtap_hdr take a const void *, not a caddr_t.
this makes it easier to call at least, and makes it consistent with
bpf_tap_hdr.
ok stsp@ sashan@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/bpf.c | 6 | ||||
-rw-r--r-- | sys/net/bpf.h | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 1bb6178872c..08ffcd2cbe8 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bpf.c,v 1.177 2019/06/13 21:14:53 mpi Exp $ */ +/* $OpenBSD: bpf.c,v 1.178 2019/09/12 01:17:38 dlg Exp $ */ /* $NetBSD: bpf.c,v 1.33 1997/02/21 23:59:35 thorpej Exp $ */ /* @@ -1367,7 +1367,7 @@ bpf_mtap(caddr_t arg, const struct mbuf *m, u_int direction) * it or keep a pointer to it. */ int -bpf_mtap_hdr(caddr_t arg, caddr_t data, u_int dlen, const struct mbuf *m, +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)) { struct m_hdr mh; @@ -1377,7 +1377,7 @@ bpf_mtap_hdr(caddr_t arg, caddr_t data, u_int dlen, const struct mbuf *m, mh.mh_flags = 0; mh.mh_next = (struct mbuf *)m; mh.mh_len = dlen; - mh.mh_data = data; + mh.mh_data = (void *)data; m0 = (struct mbuf *)&mh; } else m0 = m; diff --git a/sys/net/bpf.h b/sys/net/bpf.h index 967d061f898..bc09b5b43ee 100644 --- a/sys/net/bpf.h +++ b/sys/net/bpf.h @@ -1,4 +1,4 @@ -/* $OpenBSD: bpf.h,v 1.66 2019/03/17 23:57:12 dlg Exp $ */ +/* $OpenBSD: bpf.h,v 1.67 2019/09/12 01:17:38 dlg Exp $ */ /* $NetBSD: bpf.h,v 1.15 1996/12/13 07:57:33 mikel Exp $ */ /* @@ -315,7 +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, caddr_t, u_int, 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_af(caddr_t, u_int32_t, const struct mbuf *, u_int); int bpf_mtap_ether(caddr_t, const struct mbuf *, u_int); |