blob: 379d5dccf8e1c6af8a2d65411a7739a747c0587c [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
4#define SOCK_DIAG_BY_FAMILY 20
5
Pavel Emelyanovd3664772011-12-06 07:58:03 +00006struct sk_buff;
7struct nlmsghdr;
8
9struct sock_diag_req {
10 __u8 sdiag_family;
11 __u8 sdiag_protocol;
12};
13
14struct sock_diag_handler {
15 __u8 family;
16 int (*dump)(struct sk_buff *skb, struct nlmsghdr *nlh);
17};
18
19int sock_diag_register(struct sock_diag_handler *h);
20void sock_diag_unregister(struct sock_diag_handler *h);
21
22void sock_diag_register_inet_compat(int (*fn)(struct sk_buff *skb, struct nlmsghdr *nlh));
23void sock_diag_unregister_inet_compat(int (*fn)(struct sk_buff *skb, struct nlmsghdr *nlh));
24
Pavel Emelyanovf65c1b52011-12-15 02:43:44 +000025int sock_diag_check_cookie(void *sk, __u32 *cookie);
26void sock_diag_save_cookie(void *sk, __u32 *cookie);
27
Pavel Emelyanovd3664772011-12-06 07:58:03 +000028extern struct sock *sock_diag_nlsk;
29#endif