]>
Commit | Line | Data |
---|---|---|
d366477a PE |
1 | #ifndef __SOCK_DIAG_H__ |
2 | #define __SOCK_DIAG_H__ | |
e7c466e5 | 3 | |
e6fe2371 | 4 | #include <linux/types.h> |
e7c466e5 | 5 | |
e6fe2371 | 6 | #define SOCK_DIAG_BY_FAMILY 20 |
d366477a PE |
7 | |
8 | struct sock_diag_req { | |
9 | __u8 sdiag_family; | |
10 | __u8 sdiag_protocol; | |
11 | }; | |
12 | ||
e6fe2371 PE |
13 | #ifdef __KERNEL__ |
14 | struct sk_buff; | |
15 | struct nlmsghdr; | |
16 | ||
d366477a PE |
17 | struct sock_diag_handler { |
18 | __u8 family; | |
19 | int (*dump)(struct sk_buff *skb, struct nlmsghdr *nlh); | |
20 | }; | |
21 | ||
22 | int sock_diag_register(struct sock_diag_handler *h); | |
23 | void sock_diag_unregister(struct sock_diag_handler *h); | |
24 | ||
25 | void sock_diag_register_inet_compat(int (*fn)(struct sk_buff *skb, struct nlmsghdr *nlh)); | |
26 | void sock_diag_unregister_inet_compat(int (*fn)(struct sk_buff *skb, struct nlmsghdr *nlh)); | |
27 | ||
f65c1b53 PE |
28 | int sock_diag_check_cookie(void *sk, __u32 *cookie); |
29 | void sock_diag_save_cookie(void *sk, __u32 *cookie); | |
30 | ||
d366477a | 31 | extern struct sock *sock_diag_nlsk; |
e6fe2371 | 32 | #endif /* KERNEL */ |
d366477a | 33 | #endif |