[TCPDIAG]: Introduce inet_diag_{register,unregister}
Next changeset will rename tcp_diag to inet_diag and move the tcp_diag code out of it and into a new tcp_diag.c, similar to the net/dccp/diag.c introduced in this changeset, completing the transition to a generic inet_diag infrastructure. Signed-off-by: Arnaldo Carvalho de Melo <acme@mandriva.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
5324a040cc
commit
4f5736c4c7
6 changed files with 186 additions and 45 deletions
|
|
@ -5,6 +5,8 @@
|
|||
#define TCPDIAG_GETSOCK 18
|
||||
#define DCCPDIAG_GETSOCK 19
|
||||
|
||||
#define INET_DIAG_GETSOCK_MAX 24
|
||||
|
||||
/* Socket identity */
|
||||
struct tcpdiag_sockid
|
||||
{
|
||||
|
|
@ -125,4 +127,21 @@ struct tcpvegas_info {
|
|||
__u32 tcpv_minrtt;
|
||||
};
|
||||
|
||||
#ifdef __KERNEL__
|
||||
struct sock;
|
||||
struct inet_hashinfo;
|
||||
|
||||
struct inet_diag_handler {
|
||||
struct inet_hashinfo *idiag_hashinfo;
|
||||
void (*idiag_get_info)(struct sock *sk,
|
||||
struct tcpdiagmsg *r,
|
||||
void *info);
|
||||
__u16 idiag_info_size;
|
||||
__u16 idiag_type;
|
||||
};
|
||||
|
||||
extern int inet_diag_register(const struct inet_diag_handler *handler);
|
||||
extern void inet_diag_unregister(const struct inet_diag_handler *handler);
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* _TCP_DIAG_H_ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue