diag.c (57b8628bb0ac4e47c806e45c5bbd89282e93869b) diag.c (8dcf01fc009d12d01fd195ed95eaaee61178f21a)
1#include <linux/types.h>
2#include <linux/spinlock.h>
3#include <linux/sock_diag.h>
4#include <linux/unix_diag.h>
5#include <linux/skbuff.h>
6#include <linux/module.h>
7#include <net/netlink.h>
8#include <net/af_unix.h>

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

305 struct netlink_dump_control c = {
306 .dump = unix_diag_dump,
307 };
308 return netlink_dump_start(sock_diag_nlsk, skb, h, &c);
309 } else
310 return unix_diag_get_exact(skb, h, (struct unix_diag_req *)NLMSG_DATA(h));
311}
312
1#include <linux/types.h>
2#include <linux/spinlock.h>
3#include <linux/sock_diag.h>
4#include <linux/unix_diag.h>
5#include <linux/skbuff.h>
6#include <linux/module.h>
7#include <net/netlink.h>
8#include <net/af_unix.h>

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

305 struct netlink_dump_control c = {
306 .dump = unix_diag_dump,
307 };
308 return netlink_dump_start(sock_diag_nlsk, skb, h, &c);
309 } else
310 return unix_diag_get_exact(skb, h, (struct unix_diag_req *)NLMSG_DATA(h));
311}
312
313static struct sock_diag_handler unix_diag_handler = {
313static const struct sock_diag_handler unix_diag_handler = {
314 .family = AF_UNIX,
315 .dump = unix_diag_handler_dump,
316};
317
318static int __init unix_diag_init(void)
319{
320 return sock_diag_register(&unix_diag_handler);
321}
322
323static void __exit unix_diag_exit(void)
324{
325 sock_diag_unregister(&unix_diag_handler);
326}
327
328module_init(unix_diag_init);
329module_exit(unix_diag_exit);
330MODULE_LICENSE("GPL");
331MODULE_ALIAS_NET_PF_PROTO_TYPE(PF_NETLINK, NETLINK_SOCK_DIAG, 1 /* AF_LOCAL */);
314 .family = AF_UNIX,
315 .dump = unix_diag_handler_dump,
316};
317
318static int __init unix_diag_init(void)
319{
320 return sock_diag_register(&unix_diag_handler);
321}
322
323static void __exit unix_diag_exit(void)
324{
325 sock_diag_unregister(&unix_diag_handler);
326}
327
328module_init(unix_diag_init);
329module_exit(unix_diag_exit);
330MODULE_LICENSE("GPL");
331MODULE_ALIAS_NET_PF_PROTO_TYPE(PF_NETLINK, NETLINK_SOCK_DIAG, 1 /* AF_LOCAL */);