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 | |
David Howells | 607ca46 | 2012-10-13 10:46:48 +0100 | [diff] [blame] | 4 | #include <uapi/linux/sock_diag.h> |
Pavel Emelyanov | e7c466e | 2011-12-15 02:42:42 +0000 | [diff] [blame] | 5 | |
Pavel Emelyanov | e6fe237 | 2011-12-30 00:52:21 +0000 | [diff] [blame] | 6 | struct sk_buff; |
| 7 | struct nlmsghdr; |
Pavel Emelyanov | 5d2e5f2 | 2011-12-30 00:53:13 +0000 | [diff] [blame] | 8 | struct sock; |
Pavel Emelyanov | e6fe237 | 2011-12-30 00:52:21 +0000 | [diff] [blame] | 9 | |
Pavel Emelyanov | d366477 | 2011-12-06 07:58:03 +0000 | [diff] [blame] | 10 | struct sock_diag_handler { |
| 11 | __u8 family; |
| 12 | int (*dump)(struct sk_buff *skb, struct nlmsghdr *nlh); |
| 13 | }; |
| 14 | |
Shan Wei | 8dcf01f | 2012-04-24 18:21:07 +0000 | [diff] [blame] | 15 | int sock_diag_register(const struct sock_diag_handler *h); |
| 16 | void sock_diag_unregister(const struct sock_diag_handler *h); |
Pavel Emelyanov | d366477 | 2011-12-06 07:58:03 +0000 | [diff] [blame] | 17 | |
| 18 | void sock_diag_register_inet_compat(int (*fn)(struct sk_buff *skb, struct nlmsghdr *nlh)); |
| 19 | void sock_diag_unregister_inet_compat(int (*fn)(struct sk_buff *skb, struct nlmsghdr *nlh)); |
| 20 | |
Pavel Emelyanov | f65c1b5 | 2011-12-15 02:43:44 +0000 | [diff] [blame] | 21 | int sock_diag_check_cookie(void *sk, __u32 *cookie); |
| 22 | void sock_diag_save_cookie(void *sk, __u32 *cookie); |
| 23 | |
Pavel Emelyanov | 5d2e5f2 | 2011-12-30 00:53:13 +0000 | [diff] [blame] | 24 | int sock_diag_put_meminfo(struct sock *sk, struct sk_buff *skb, int attr); |
| 25 | |
Pavel Emelyanov | d366477 | 2011-12-06 07:58:03 +0000 | [diff] [blame] | 26 | #endif |