diff options
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/bpf.c | 10 | ||||
-rw-r--r-- | sys/net/if_pppx.c | 22 | ||||
-rw-r--r-- | sys/net/if_tun.c | 18 | ||||
-rw-r--r-- | sys/net/switchctl.c | 17 |
4 files changed, 43 insertions, 24 deletions
diff --git a/sys/net/bpf.c b/sys/net/bpf.c index 365ce900860..6c23b4581b7 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bpf.c,v 1.182 2019/10/21 23:02:05 sashan Exp $ */ +/* $OpenBSD: bpf.c,v 1.183 2019/12/31 13:48:32 visa Exp $ */ /* $NetBSD: bpf.c,v 1.33 1997/02/21 23:59:35 thorpej Exp $ */ /* @@ -1170,8 +1170,12 @@ bpfpoll(dev_t dev, int events, struct proc *p) return (revents); } -struct filterops bpfread_filtops = - { 1, NULL, filt_bpfrdetach, filt_bpfread }; +const struct filterops bpfread_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_bpfrdetach, + .f_event = filt_bpfread, +}; int bpfkqfilter(dev_t dev, struct knote *kn) diff --git a/sys/net/if_pppx.c b/sys/net/if_pppx.c index 0bd206b1e8d..9bdbee78e6a 100644 --- a/sys/net/if_pppx.c +++ b/sys/net/if_pppx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pppx.c,v 1.69 2019/11/08 07:16:29 dlg Exp $ */ +/* $OpenBSD: if_pppx.c,v 1.70 2019/12/31 13:48:32 visa Exp $ */ /* * Copyright (c) 2010 Claudio Jeker <claudio@openbsd.org> @@ -185,21 +185,21 @@ void pppxattach(int); void filt_pppx_rdetach(struct knote *); int filt_pppx_read(struct knote *, long); -struct filterops pppx_rd_filtops = { - 1, - NULL, - filt_pppx_rdetach, - filt_pppx_read +const struct filterops pppx_rd_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_pppx_rdetach, + .f_event = filt_pppx_read, }; void filt_pppx_wdetach(struct knote *); int filt_pppx_write(struct knote *, long); -struct filterops pppx_wr_filtops = { - 1, - NULL, - filt_pppx_wdetach, - filt_pppx_write +const struct filterops pppx_wr_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_pppx_wdetach, + .f_event = filt_pppx_write, }; struct pppx_dev * diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c index c1339ad5ce4..f508954bae8 100644 --- a/sys/net/if_tun.c +++ b/sys/net/if_tun.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tun.c,v 1.195 2019/11/26 06:23:30 dlg Exp $ */ +/* $OpenBSD: if_tun.c,v 1.196 2019/12/31 13:48:32 visa Exp $ */ /* $NetBSD: if_tun.c,v 1.24 1996/05/07 02:40:48 thorpej Exp $ */ /* @@ -153,11 +153,19 @@ void filt_tunrdetach(struct knote *); void filt_tunwdetach(struct knote *); void tun_link_state(struct tun_softc *); -struct filterops tunread_filtops = - { 1, NULL, filt_tunrdetach, filt_tunread}; +const struct filterops tunread_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_tunrdetach, + .f_event = filt_tunread, +}; -struct filterops tunwrite_filtops = - { 1, NULL, filt_tunwdetach, filt_tunwrite}; +const struct filterops tunwrite_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_tunwdetach, + .f_event = filt_tunwrite, +}; LIST_HEAD(tun_list, tun_softc); diff --git a/sys/net/switchctl.c b/sys/net/switchctl.c index 7a8f746cc87..a3b51481bd5 100644 --- a/sys/net/switchctl.c +++ b/sys/net/switchctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: switchctl.c,v 1.17 2019/12/19 12:04:38 reyk Exp $ */ +/* $OpenBSD: switchctl.c,v 1.18 2019/12/31 13:48:32 visa Exp $ */ /* * Copyright (c) 2016 Kazuya GODA <goda@openbsd.org> @@ -59,11 +59,18 @@ int filt_switch_write(struct knote *, long); int switch_dev_output(struct switch_softc *, struct mbuf *); void switch_dev_wakeup(struct switch_softc *); -struct filterops switch_rd_filtops = { - 1, NULL, filt_switch_rdetach, filt_switch_read +const struct filterops switch_rd_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_switch_rdetach, + .f_event = filt_switch_read, }; -struct filterops switch_wr_filtops = { - 1, NULL, filt_switch_wdetach, filt_switch_write + +const struct filterops switch_wr_filtops = { + .f_isfd = 1, + .f_attach = NULL, + .f_detach = filt_switch_wdetach, + .f_event = filt_switch_write, }; struct switch_softc * |