diff options
Diffstat (limited to 'include/linux/inet_diag.h')
| -rw-r--r-- | include/linux/inet_diag.h | 41 |
1 files changed, 38 insertions, 3 deletions
diff --git a/include/linux/inet_diag.h b/include/linux/inet_diag.h index abf5028db981..f1362b5447fc 100644 --- a/include/linux/inet_diag.h +++ b/include/linux/inet_diag.h | |||
| @@ -34,6 +34,15 @@ struct inet_diag_req { | |||
| 34 | __u32 idiag_dbs; /* Tables to dump (NI) */ | 34 | __u32 idiag_dbs; /* Tables to dump (NI) */ |
| 35 | }; | 35 | }; |
| 36 | 36 | ||
| 37 | struct inet_diag_req_v2 { | ||
| 38 | __u8 sdiag_family; | ||
| 39 | __u8 sdiag_protocol; | ||
| 40 | __u8 idiag_ext; | ||
| 41 | __u8 pad; | ||
| 42 | __u32 idiag_states; | ||
| 43 | struct inet_diag_sockid id; | ||
| 44 | }; | ||
| 45 | |||
| 37 | enum { | 46 | enum { |
| 38 | INET_DIAG_REQ_NONE, | 47 | INET_DIAG_REQ_NONE, |
| 39 | INET_DIAG_REQ_BYTECODE, | 48 | INET_DIAG_REQ_BYTECODE, |
| @@ -99,9 +108,10 @@ enum { | |||
| 99 | INET_DIAG_CONG, | 108 | INET_DIAG_CONG, |
| 100 | INET_DIAG_TOS, | 109 | INET_DIAG_TOS, |
| 101 | INET_DIAG_TCLASS, | 110 | INET_DIAG_TCLASS, |
| 111 | INET_DIAG_SKMEMINFO, | ||
| 102 | }; | 112 | }; |
| 103 | 113 | ||
| 104 | #define INET_DIAG_MAX INET_DIAG_TCLASS | 114 | #define INET_DIAG_MAX INET_DIAG_SKMEMINFO |
| 105 | 115 | ||
| 106 | 116 | ||
| 107 | /* INET_DIAG_MEM */ | 117 | /* INET_DIAG_MEM */ |
| @@ -125,16 +135,41 @@ struct tcpvegas_info { | |||
| 125 | #ifdef __KERNEL__ | 135 | #ifdef __KERNEL__ |
| 126 | struct sock; | 136 | struct sock; |
| 127 | struct inet_hashinfo; | 137 | struct inet_hashinfo; |
| 138 | struct nlattr; | ||
| 139 | struct nlmsghdr; | ||
| 140 | struct sk_buff; | ||
| 141 | struct netlink_callback; | ||
| 128 | 142 | ||
| 129 | struct inet_diag_handler { | 143 | struct inet_diag_handler { |
| 130 | struct inet_hashinfo *idiag_hashinfo; | 144 | void (*dump)(struct sk_buff *skb, |
| 145 | struct netlink_callback *cb, | ||
| 146 | struct inet_diag_req_v2 *r, | ||
| 147 | struct nlattr *bc); | ||
| 148 | |||
| 149 | int (*dump_one)(struct sk_buff *in_skb, | ||
| 150 | const struct nlmsghdr *nlh, | ||
| 151 | struct inet_diag_req_v2 *req); | ||
| 152 | |||
| 131 | void (*idiag_get_info)(struct sock *sk, | 153 | void (*idiag_get_info)(struct sock *sk, |
| 132 | struct inet_diag_msg *r, | 154 | struct inet_diag_msg *r, |
| 133 | void *info); | 155 | void *info); |
| 134 | __u16 idiag_info_size; | ||
| 135 | __u16 idiag_type; | 156 | __u16 idiag_type; |
| 136 | }; | 157 | }; |
| 137 | 158 | ||
| 159 | struct inet_connection_sock; | ||
| 160 | int inet_sk_diag_fill(struct sock *sk, struct inet_connection_sock *icsk, | ||
| 161 | struct sk_buff *skb, struct inet_diag_req_v2 *req, | ||
| 162 | u32 pid, u32 seq, u16 nlmsg_flags, | ||
| 163 | const struct nlmsghdr *unlh); | ||
| 164 | void inet_diag_dump_icsk(struct inet_hashinfo *h, struct sk_buff *skb, | ||
| 165 | struct netlink_callback *cb, struct inet_diag_req_v2 *r, | ||
| 166 | struct nlattr *bc); | ||
| 167 | int inet_diag_dump_one_icsk(struct inet_hashinfo *hashinfo, | ||
| 168 | struct sk_buff *in_skb, const struct nlmsghdr *nlh, | ||
| 169 | struct inet_diag_req_v2 *req); | ||
| 170 | |||
| 171 | int inet_diag_bc_sk(const struct nlattr *_bc, struct sock *sk); | ||
| 172 | |||
| 138 | extern int inet_diag_register(const struct inet_diag_handler *handler); | 173 | extern int inet_diag_register(const struct inet_diag_handler *handler); |
| 139 | extern void inet_diag_unregister(const struct inet_diag_handler *handler); | 174 | extern void inet_diag_unregister(const struct inet_diag_handler *handler); |
| 140 | #endif /* __KERNEL__ */ | 175 | #endif /* __KERNEL__ */ |
