Pavel Emelyanov | d366477 | 2011-12-06 07:58:03 +0000 | [diff] [blame] | 1 | #ifndef __SOCK_DIAG_H__ |
| 2 | #define __SOCK_DIAG_H__ |
Pavel Emelyanov | e7c466e | 2011-12-15 02:42:42 +0000 | [diff] [blame] | 3 | |
Nicolas Dichtel | e8d9612 | 2013-04-25 06:53:54 +0000 | [diff] [blame] | 4 | #include <linux/user_namespace.h> |
David Howells | 607ca46 | 2012-10-13 10:46:48 +0100 | [diff] [blame] | 5 | #include <uapi/linux/sock_diag.h> |
Pavel Emelyanov | e7c466e | 2011-12-15 02:42:42 +0000 | [diff] [blame] | 6 | |
Pavel Emelyanov | e6fe237 | 2011-12-30 00:52:21 +0000 | [diff] [blame] | 7 | struct sk_buff; |
| 8 | struct nlmsghdr; |
Pavel Emelyanov | 5d2e5f2 | 2011-12-30 00:53:13 +0000 | [diff] [blame] | 9 | struct sock; |
Pavel Emelyanov | e6fe237 | 2011-12-30 00:52:21 +0000 | [diff] [blame] | 10 | |
Pavel Emelyanov | d366477 | 2011-12-06 07:58:03 +0000 | [diff] [blame] | 11 | struct sock_diag_handler { |
| 12 | __u8 family; |
| 13 | int (*dump)(struct sk_buff *skb, struct nlmsghdr *nlh); |
| 14 | }; |
| 15 | |
Shan Wei | 8dcf01f | 2012-04-24 18:21:07 +0000 | [diff] [blame] | 16 | int sock_diag_register(const struct sock_diag_handler *h); |
| 17 | void sock_diag_unregister(const struct sock_diag_handler *h); |
Pavel Emelyanov | d366477 | 2011-12-06 07:58:03 +0000 | [diff] [blame] | 18 | |
| 19 | void sock_diag_register_inet_compat(int (*fn)(struct sk_buff *skb, struct nlmsghdr *nlh)); |
| 20 | void sock_diag_unregister_inet_compat(int (*fn)(struct sk_buff *skb, struct nlmsghdr *nlh)); |
| 21 | |
Pavel Emelyanov | f65c1b5 | 2011-12-15 02:43:44 +0000 | [diff] [blame] | 22 | int sock_diag_check_cookie(void *sk, __u32 *cookie); |
| 23 | void sock_diag_save_cookie(void *sk, __u32 *cookie); |
| 24 | |
Pavel Emelyanov | 5d2e5f2 | 2011-12-30 00:53:13 +0000 | [diff] [blame] | 25 | int sock_diag_put_meminfo(struct sock *sk, struct sk_buff *skb, int attr); |
Eric W. Biederman | a53b72c | 2014-04-23 14:26:25 -0700 | [diff] [blame] | 26 | int sock_diag_put_filterinfo(bool may_report_filterinfo, struct sock *sk, |
Nicolas Dichtel | e8d9612 | 2013-04-25 06:53:54 +0000 | [diff] [blame] | 27 | struct sk_buff *skb, int attrtype); |
Pavel Emelyanov | 5d2e5f2 | 2011-12-30 00:53:13 +0000 | [diff] [blame] | 28 | |
Pavel Emelyanov | d366477 | 2011-12-06 07:58:03 +0000 | [diff] [blame] | 29 | #endif |