Merge branch 'printk-rework' into for-linus
[linux-2.6-microblaze.git] / include / linux / bpfilter.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _LINUX_BPFILTER_H
3 #define _LINUX_BPFILTER_H
4
5 #include <uapi/linux/bpfilter.h>
6 #include <linux/usermode_driver.h>
7
8 struct sock;
9 int bpfilter_ip_set_sockopt(struct sock *sk, int optname, char __user *optval,
10                             unsigned int optlen);
11 int bpfilter_ip_get_sockopt(struct sock *sk, int optname, char __user *optval,
12                             int __user *optlen);
13 void bpfilter_umh_cleanup(struct umd_info *info);
14
15 struct bpfilter_umh_ops {
16         struct umd_info info;
17         /* since ip_getsockopt() can run in parallel, serialize access to umh */
18         struct mutex lock;
19         int (*sockopt)(struct sock *sk, int optname,
20                        char __user *optval,
21                        unsigned int optlen, bool is_set);
22         int (*start)(void);
23 };
24 extern struct bpfilter_umh_ops bpfilter_ops;
25 #endif