tcp_diag.c (7f1fb60c4fc9fb29fbb406ac8c4cfb4e59e168d6) tcp_diag.c (f13c95f0e255e6d21762259875295cc212e6bc32)
1/*
2 * tcp_diag.c Module for monitoring TCP transport protocols sockets.
3 *
4 * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version

--- 23 unchanged lines hidden (view full) ---

32 }
33 if (info != NULL)
34 tcp_get_info(sk, info);
35}
36
37static const struct inet_diag_handler tcp_diag_handler = {
38 .idiag_hashinfo = &tcp_hashinfo,
39 .idiag_get_info = tcp_diag_get_info,
1/*
2 * tcp_diag.c Module for monitoring TCP transport protocols sockets.
3 *
4 * Authors: Alexey Kuznetsov, <kuznet@ms2.inr.ac.ru>
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version

--- 23 unchanged lines hidden (view full) ---

32 }
33 if (info != NULL)
34 tcp_get_info(sk, info);
35}
36
37static const struct inet_diag_handler tcp_diag_handler = {
38 .idiag_hashinfo = &tcp_hashinfo,
39 .idiag_get_info = tcp_diag_get_info,
40 .idiag_type = TCPDIAG_GETSOCK,
40 .idiag_type = IPPROTO_TCP,
41 .idiag_info_size = sizeof(struct tcp_info),
42};
43
44static int __init tcp_diag_init(void)
45{
46 return inet_diag_register(&tcp_diag_handler);
47}
48
49static void __exit tcp_diag_exit(void)
50{
51 inet_diag_unregister(&tcp_diag_handler);
52}
53
54module_init(tcp_diag_init);
55module_exit(tcp_diag_exit);
56MODULE_LICENSE("GPL");
41 .idiag_info_size = sizeof(struct tcp_info),
42};
43
44static int __init tcp_diag_init(void)
45{
46 return inet_diag_register(&tcp_diag_handler);
47}
48
49static void __exit tcp_diag_exit(void)
50{
51 inet_diag_unregister(&tcp_diag_handler);
52}
53
54module_init(tcp_diag_init);
55module_exit(tcp_diag_exit);
56MODULE_LICENSE("GPL");
57MODULE_ALIAS_NET_PF_PROTO_TYPE(PF_NETLINK, NETLINK_SOCK_DIAG, TCPDIAG_GETSOCK);
57MODULE_ALIAS_NET_PF_PROTO_TYPE(PF_NETLINK, NETLINK_SOCK_DIAG, 6);