Merge tag 'pull-work.iov_iter-rebased' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-block.git] / include / linux / bpfilter.h
CommitLineData
d2ba09c1
AS
1/* SPDX-License-Identifier: GPL-2.0 */
2#ifndef _LINUX_BPFILTER_H
3#define _LINUX_BPFILTER_H
4
5#include <uapi/linux/bpfilter.h>
884c5e68 6#include <linux/usermode_driver.h>
b03afaa8 7#include <linux/sockptr.h>
d2ba09c1
AS
8
9struct sock;
b03afaa8 10int bpfilter_ip_set_sockopt(struct sock *sk, int optname, sockptr_t optval,
d2ba09c1 11 unsigned int optlen);
f95de8aa
Y
12int bpfilter_ip_get_sockopt(struct sock *sk, int optname, char __user *optval,
13 int __user *optlen);
e80eb1dc
EB
14void bpfilter_umh_cleanup(struct umd_info *info);
15
5b4cb650 16struct bpfilter_umh_ops {
74be2d3b 17 struct umd_info info;
71a85084
TY
18 /* since ip_getsockopt() can run in parallel, serialize access to umh */
19 struct mutex lock;
b03afaa8 20 int (*sockopt)(struct sock *sk, int optname, sockptr_t optval,
5b4cb650 21 unsigned int optlen, bool is_set);
61fbf593 22 int (*start)(void);
5b4cb650
TY
23};
24extern struct bpfilter_umh_ops bpfilter_ops;
d2ba09c1 25#endif