Arnaldo Carvalho de Melo | 4f5736c | 2005-08-12 09:27:49 -0300 | [diff] [blame^] | 1 | /* |
| 2 | * net/dccp/diag.c |
| 3 | * |
| 4 | * An implementation of the DCCP protocol |
| 5 | * Arnaldo Carvalho de Melo <acme@mandriva.com> |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify it |
| 8 | * under the terms of the GNU General Public License version 2 as |
| 9 | * published by the Free Software Foundation. |
| 10 | */ |
| 11 | |
| 12 | #include <linux/config.h> |
| 13 | |
| 14 | #include <linux/module.h> |
| 15 | #include <linux/tcp_diag.h> |
| 16 | |
| 17 | #include "dccp.h" |
| 18 | |
| 19 | static void dccp_diag_get_info(struct sock *sk, struct tcpdiagmsg *r, |
| 20 | void *_info) |
| 21 | { |
| 22 | r->tcpdiag_rqueue = r->tcpdiag_wqueue = 0; |
| 23 | } |
| 24 | |
| 25 | static struct inet_diag_handler dccp_diag_handler = { |
| 26 | .idiag_hashinfo = &dccp_hashinfo, |
| 27 | .idiag_get_info = dccp_diag_get_info, |
| 28 | .idiag_type = DCCPDIAG_GETSOCK, |
| 29 | .idiag_info_size = 0, |
| 30 | }; |
| 31 | |
| 32 | static int __init dccp_diag_init(void) |
| 33 | { |
| 34 | return inet_diag_register(&dccp_diag_handler); |
| 35 | } |
| 36 | |
| 37 | static void __exit dccp_diag_fini(void) |
| 38 | { |
| 39 | inet_diag_unregister(&dccp_diag_handler); |
| 40 | } |
| 41 | |
| 42 | module_init(dccp_diag_init); |
| 43 | module_exit(dccp_diag_fini); |
| 44 | |
| 45 | MODULE_LICENSE("GPL"); |
| 46 | MODULE_AUTHOR("Arnaldo Carvalho de Melo <acme@mandriva.com>"); |
| 47 | MODULE_DESCRIPTION("DCCP inet_diag handler"); |