blob: 1a7e309d008bcd9624dff48195c8052c515a3791 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * linux/net/sunrpc/sunrpc_syms.c
3 *
4 * Symbols exported by the sunrpc module.
5 *
6 * Copyright (C) 1997 Olaf Kirch <okir@monad.swb.de>
7 */
8
Linus Torvalds1da177e2005-04-16 15:20:36 -07009#include <linux/module.h>
10
11#include <linux/types.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070012#include <linux/uio.h>
13#include <linux/unistd.h>
14#include <linux/init.h>
15
16#include <linux/sunrpc/sched.h>
17#include <linux/sunrpc/clnt.h>
18#include <linux/sunrpc/svc.h>
19#include <linux/sunrpc/svcsock.h>
20#include <linux/sunrpc/auth.h>
21#include <linux/workqueue.h>
22#include <linux/sunrpc/rpc_pipe_fs.h>
\"Talpey, Thomas\49c36fc2007-09-10 13:47:31 -040023#include <linux/sunrpc/xprtsock.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070024
Linus Torvalds1da177e2005-04-16 15:20:36 -070025/* RPC server stuff */
26EXPORT_SYMBOL(svc_create);
27EXPORT_SYMBOL(svc_create_thread);
Greg Banksa7455442006-10-02 02:17:59 -070028EXPORT_SYMBOL(svc_create_pooled);
29EXPORT_SYMBOL(svc_set_num_threads);
Linus Torvalds1da177e2005-04-16 15:20:36 -070030EXPORT_SYMBOL(svc_exit_thread);
31EXPORT_SYMBOL(svc_destroy);
32EXPORT_SYMBOL(svc_drop);
33EXPORT_SYMBOL(svc_process);
34EXPORT_SYMBOL(svc_recv);
35EXPORT_SYMBOL(svc_wake_up);
36EXPORT_SYMBOL(svc_makesock);
37EXPORT_SYMBOL(svc_reserve);
38EXPORT_SYMBOL(svc_auth_register);
39EXPORT_SYMBOL(auth_domain_lookup);
40EXPORT_SYMBOL(svc_authenticate);
41EXPORT_SYMBOL(svc_set_client);
42
43/* RPC statistics */
44#ifdef CONFIG_PROC_FS
Linus Torvalds1da177e2005-04-16 15:20:36 -070045EXPORT_SYMBOL(svc_proc_register);
46EXPORT_SYMBOL(svc_proc_unregister);
47EXPORT_SYMBOL(svc_seq_show);
48#endif
49
50/* caching... */
51EXPORT_SYMBOL(auth_domain_find);
52EXPORT_SYMBOL(auth_domain_put);
53EXPORT_SYMBOL(auth_unix_add_addr);
54EXPORT_SYMBOL(auth_unix_forget_old);
55EXPORT_SYMBOL(auth_unix_lookup);
56EXPORT_SYMBOL(cache_check);
57EXPORT_SYMBOL(cache_flush);
58EXPORT_SYMBOL(cache_purge);
Linus Torvalds1da177e2005-04-16 15:20:36 -070059EXPORT_SYMBOL(cache_register);
60EXPORT_SYMBOL(cache_unregister);
61EXPORT_SYMBOL(qword_add);
62EXPORT_SYMBOL(qword_addhex);
63EXPORT_SYMBOL(qword_get);
64EXPORT_SYMBOL(svcauth_unix_purge);
65EXPORT_SYMBOL(unix_domain_find);
66
NeilBrown3fc605a2007-02-14 00:33:13 -080067extern struct cache_detail ip_map_cache, unix_gid_cache;
Linus Torvalds1da177e2005-04-16 15:20:36 -070068
69static int __init
70init_sunrpc(void)
71{
72 int err = register_rpc_pipefs();
73 if (err)
74 goto out;
Akinobu Mita5bd5f582007-05-09 02:34:51 -070075 err = rpc_init_mempool();
76 if (err) {
77 unregister_rpc_pipefs();
Linus Torvalds1da177e2005-04-16 15:20:36 -070078 goto out;
Akinobu Mita5bd5f582007-05-09 02:34:51 -070079 }
Linus Torvalds1da177e2005-04-16 15:20:36 -070080#ifdef RPC_DEBUG
81 rpc_register_sysctl();
82#endif
83#ifdef CONFIG_PROC_FS
84 rpc_proc_init();
85#endif
Linus Torvalds1da177e2005-04-16 15:20:36 -070086 cache_register(&ip_map_cache);
NeilBrown3fc605a2007-02-14 00:33:13 -080087 cache_register(&unix_gid_cache);
Chuck Lever282b32e2006-12-05 16:35:51 -050088 init_socket_xprt();
Trond Myklebustf5c21872007-06-25 17:11:20 -040089 rpcauth_init_module();
Linus Torvalds1da177e2005-04-16 15:20:36 -070090out:
91 return err;
92}
93
94static void __exit
95cleanup_sunrpc(void)
96{
Trond Myklebustf5c21872007-06-25 17:11:20 -040097 rpcauth_remove_module();
Chuck Lever282b32e2006-12-05 16:35:51 -050098 cleanup_socket_xprt();
Linus Torvalds1da177e2005-04-16 15:20:36 -070099 unregister_rpc_pipefs();
100 rpc_destroy_mempool();
Bruce Allanf35279d2005-09-06 15:17:08 -0700101 if (cache_unregister(&ip_map_cache))
102 printk(KERN_ERR "sunrpc: failed to unregister ip_map cache\n");
NeilBrown3fc605a2007-02-14 00:33:13 -0800103 if (cache_unregister(&unix_gid_cache))
104 printk(KERN_ERR "sunrpc: failed to unregister unix_gid cache\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700105#ifdef RPC_DEBUG
106 rpc_unregister_sysctl();
107#endif
108#ifdef CONFIG_PROC_FS
109 rpc_proc_exit();
110#endif
111}
112MODULE_LICENSE("GPL");
113module_init(init_sunrpc);
114module_exit(cleanup_sunrpc);