blob: e8d702e0fd89951baaf4f8f3b62f2dce559ac1ce [file] [log] [blame]
Pavel Emelyanovd3664772011-12-06 07:58:03 +00001#ifndef __SOCK_DIAG_H__
2#define __SOCK_DIAG_H__
Pavel Emelyanove7c466e2011-12-15 02:42:42 +00003
David Howells607ca462012-10-13 10:46:48 +01004#include <uapi/linux/sock_diag.h>
Pavel Emelyanove7c466e2011-12-15 02:42:42 +00005
Pavel Emelyanove6fe2372011-12-30 00:52:21 +00006struct sk_buff;
7struct nlmsghdr;
Pavel Emelyanov5d2e5f22011-12-30 00:53:13 +00008struct sock;
Pavel Emelyanove6fe2372011-12-30 00:52:21 +00009
Pavel Emelyanovd3664772011-12-06 07:58:03 +000010struct sock_diag_handler {
11 __u8 family;
12 int (*dump)(struct sk_buff *skb, struct nlmsghdr *nlh);
13};
14
Shan Wei8dcf01f2012-04-24 18:21:07 +000015int sock_diag_register(const struct sock_diag_handler *h);
16void sock_diag_unregister(const struct sock_diag_handler *h);
Pavel Emelyanovd3664772011-12-06 07:58:03 +000017
18void sock_diag_register_inet_compat(int (*fn)(struct sk_buff *skb, struct nlmsghdr *nlh));
19void sock_diag_unregister_inet_compat(int (*fn)(struct sk_buff *skb, struct nlmsghdr *nlh));
20
Pavel Emelyanovf65c1b52011-12-15 02:43:44 +000021int sock_diag_check_cookie(void *sk, __u32 *cookie);
22void sock_diag_save_cookie(void *sk, __u32 *cookie);
23
Pavel Emelyanov5d2e5f22011-12-30 00:53:13 +000024int sock_diag_put_meminfo(struct sock *sk, struct sk_buff *skb, int attr);
25
Pavel Emelyanovd3664772011-12-06 07:58:03 +000026#endif