2005-08-12 23:51:49 +08:00
|
|
|
#ifndef _INET_DIAG_H_
|
|
|
|
#define _INET_DIAG_H_ 1
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2012-10-13 17:46:48 +08:00
|
|
|
#include <uapi/linux/inet_diag.h>
|
2009-01-31 00:12:47 +08:00
|
|
|
|
2005-08-12 20:27:49 +08:00
|
|
|
struct sock;
|
|
|
|
struct inet_hashinfo;
|
2011-12-09 14:22:44 +08:00
|
|
|
struct nlattr;
|
2011-12-09 14:23:00 +08:00
|
|
|
struct nlmsghdr;
|
|
|
|
struct sk_buff;
|
2011-12-09 14:23:18 +08:00
|
|
|
struct netlink_callback;
|
2005-08-12 20:27:49 +08:00
|
|
|
|
|
|
|
struct inet_diag_handler {
|
2011-12-09 14:23:18 +08:00
|
|
|
void (*dump)(struct sk_buff *skb,
|
|
|
|
struct netlink_callback *cb,
|
2012-01-11 06:36:35 +08:00
|
|
|
struct inet_diag_req_v2 *r,
|
2011-12-09 14:23:18 +08:00
|
|
|
struct nlattr *bc);
|
|
|
|
|
|
|
|
int (*dump_one)(struct sk_buff *in_skb,
|
|
|
|
const struct nlmsghdr *nlh,
|
2012-01-11 06:36:35 +08:00
|
|
|
struct inet_diag_req_v2 *req);
|
2011-12-09 14:23:18 +08:00
|
|
|
|
2005-08-12 20:27:49 +08:00
|
|
|
void (*idiag_get_info)(struct sock *sk,
|
2005-08-12 23:51:49 +08:00
|
|
|
struct inet_diag_msg *r,
|
2005-08-12 20:27:49 +08:00
|
|
|
void *info);
|
|
|
|
__u16 idiag_type;
|
|
|
|
};
|
|
|
|
|
2011-12-09 14:23:00 +08:00
|
|
|
struct inet_connection_sock;
|
|
|
|
int inet_sk_diag_fill(struct sock *sk, struct inet_connection_sock *icsk,
|
2012-01-11 06:36:35 +08:00
|
|
|
struct sk_buff *skb, struct inet_diag_req_v2 *req,
|
2012-05-25 07:58:08 +08:00
|
|
|
struct user_namespace *user_ns,
|
2011-12-09 14:23:00 +08:00
|
|
|
u32 pid, u32 seq, u16 nlmsg_flags,
|
|
|
|
const struct nlmsghdr *unlh);
|
2011-12-09 14:23:18 +08:00
|
|
|
void inet_diag_dump_icsk(struct inet_hashinfo *h, struct sk_buff *skb,
|
2012-01-11 06:36:35 +08:00
|
|
|
struct netlink_callback *cb, struct inet_diag_req_v2 *r,
|
2011-12-09 14:23:18 +08:00
|
|
|
struct nlattr *bc);
|
|
|
|
int inet_diag_dump_one_icsk(struct inet_hashinfo *hashinfo,
|
|
|
|
struct sk_buff *in_skb, const struct nlmsghdr *nlh,
|
2012-01-11 06:36:35 +08:00
|
|
|
struct inet_diag_req_v2 *req);
|
2011-12-09 14:23:18 +08:00
|
|
|
|
2011-12-09 14:22:44 +08:00
|
|
|
int inet_diag_bc_sk(const struct nlattr *_bc, struct sock *sk);
|
2011-12-09 14:21:53 +08:00
|
|
|
|
2005-08-12 20:27:49 +08:00
|
|
|
extern int inet_diag_register(const struct inet_diag_handler *handler);
|
|
|
|
extern void inet_diag_unregister(const struct inet_diag_handler *handler);
|
2005-08-12 23:51:49 +08:00
|
|
|
#endif /* _INET_DIAG_H_ */
|