Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef _LINUX_BPFILTER_H
0003 #define _LINUX_BPFILTER_H
0004 
0005 #include <uapi/linux/bpfilter.h>
0006 #include <linux/usermode_driver.h>
0007 #include <linux/sockptr.h>
0008 
0009 struct sock;
0010 int bpfilter_ip_set_sockopt(struct sock *sk, int optname, sockptr_t optval,
0011                 unsigned int optlen);
0012 int bpfilter_ip_get_sockopt(struct sock *sk, int optname, char __user *optval,
0013                 int __user *optlen);
0014 void bpfilter_umh_cleanup(struct umd_info *info);
0015 
0016 struct bpfilter_umh_ops {
0017     struct umd_info info;
0018     /* since ip_getsockopt() can run in parallel, serialize access to umh */
0019     struct mutex lock;
0020     int (*sockopt)(struct sock *sk, int optname, sockptr_t optval,
0021                unsigned int optlen, bool is_set);
0022     int (*start)(void);
0023 };
0024 extern struct bpfilter_umh_ops bpfilter_ops;
0025 #endif