Commit | Line | Data |
---|---|---|
73c1f4a0 ACM |
1 | #ifndef _INET_DIAG_H_ |
2 | #define _INET_DIAG_H_ 1 | |
1da177e4 | 3 | |
607ca46e | 4 | #include <uapi/linux/inet_diag.h> |
2df005b7 | 5 | |
4f5736c4 ACM |
6 | struct sock; |
7 | struct inet_hashinfo; | |
8d07d151 | 8 | struct nlattr; |
3c4d05c8 PE |
9 | struct nlmsghdr; |
10 | struct sk_buff; | |
1942c518 | 11 | struct netlink_callback; |
4f5736c4 ACM |
12 | |
13 | struct inet_diag_handler { | |
1942c518 PE |
14 | void (*dump)(struct sk_buff *skb, |
15 | struct netlink_callback *cb, | |
c8991362 | 16 | struct inet_diag_req_v2 *r, |
1942c518 PE |
17 | struct nlattr *bc); |
18 | ||
19 | int (*dump_one)(struct sk_buff *in_skb, | |
20 | const struct nlmsghdr *nlh, | |
c8991362 | 21 | struct inet_diag_req_v2 *req); |
1942c518 | 22 | |
4f5736c4 | 23 | void (*idiag_get_info)(struct sock *sk, |
73c1f4a0 | 24 | struct inet_diag_msg *r, |
4f5736c4 | 25 | void *info); |
4f5736c4 ACM |
26 | __u16 idiag_type; |
27 | }; | |
28 | ||
3c4d05c8 PE |
29 | struct inet_connection_sock; |
30 | int inet_sk_diag_fill(struct sock *sk, struct inet_connection_sock *icsk, | |
c8991362 | 31 | struct sk_buff *skb, struct inet_diag_req_v2 *req, |
d06ca956 | 32 | struct user_namespace *user_ns, |
3c4d05c8 PE |
33 | u32 pid, u32 seq, u16 nlmsg_flags, |
34 | const struct nlmsghdr *unlh); | |
1942c518 | 35 | void inet_diag_dump_icsk(struct inet_hashinfo *h, struct sk_buff *skb, |
c8991362 | 36 | struct netlink_callback *cb, struct inet_diag_req_v2 *r, |
1942c518 PE |
37 | struct nlattr *bc); |
38 | int inet_diag_dump_one_icsk(struct inet_hashinfo *hashinfo, | |
39 | struct sk_buff *in_skb, const struct nlmsghdr *nlh, | |
c8991362 | 40 | struct inet_diag_req_v2 *req); |
1942c518 | 41 | |
8d07d151 | 42 | int inet_diag_bc_sk(const struct nlattr *_bc, struct sock *sk); |
b005ab4e | 43 | |
4f5736c4 ACM |
44 | extern int inet_diag_register(const struct inet_diag_handler *handler); |
45 | extern void inet_diag_unregister(const struct inet_diag_handler *handler); | |
73c1f4a0 | 46 | #endif /* _INET_DIAG_H_ */ |