1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _LINUX_BPFILTER_H
3 #define _LINUX_BPFILTER_H
5 #include <uapi/linux/bpfilter.h>
6 #include <linux/usermode_driver.h>
7 #include <linux/sockptr.h>
10 int bpfilter_ip_set_sockopt(struct sock *sk, int optname, sockptr_t optval,
12 int bpfilter_ip_get_sockopt(struct sock *sk, int optname, char __user *optval,
15 struct bpfilter_umh_ops {
17 /* since ip_getsockopt() can run in parallel, serialize access to umh */
19 int (*sockopt)(struct sock *sk, int optname, sockptr_t optval,
20 unsigned int optlen, bool is_set);
23 extern struct bpfilter_umh_ops bpfilter_ops;