Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 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 Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 9 | #include <linux/module.h> |
| 10 | |
| 11 | #include <linux/types.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 12 | #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\ | 49c36fc | 2007-09-10 13:47:31 -0400 | [diff] [blame] | 23 | #include <linux/sunrpc/xprtsock.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 24 | |
| 25 | /* RPC scheduler */ |
| 26 | EXPORT_SYMBOL(rpc_execute); |
| 27 | EXPORT_SYMBOL(rpc_init_task); |
| 28 | EXPORT_SYMBOL(rpc_sleep_on); |
| 29 | EXPORT_SYMBOL(rpc_wake_up_next); |
| 30 | EXPORT_SYMBOL(rpc_wake_up_task); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 31 | EXPORT_SYMBOL(rpc_wake_up_status); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 32 | |
| 33 | /* RPC client functions */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 34 | EXPORT_SYMBOL(rpc_clone_client); |
Andreas Gruenbacher | 007e251 | 2005-06-22 17:16:23 +0000 | [diff] [blame] | 35 | EXPORT_SYMBOL(rpc_bind_new_program); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 36 | EXPORT_SYMBOL(rpc_shutdown_client); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 37 | EXPORT_SYMBOL(rpc_killall_tasks); |
| 38 | EXPORT_SYMBOL(rpc_call_sync); |
| 39 | EXPORT_SYMBOL(rpc_call_async); |
| 40 | EXPORT_SYMBOL(rpc_call_setup); |
| 41 | EXPORT_SYMBOL(rpc_clnt_sigmask); |
| 42 | EXPORT_SYMBOL(rpc_clnt_sigunmask); |
| 43 | EXPORT_SYMBOL(rpc_delay); |
| 44 | EXPORT_SYMBOL(rpc_restart_call); |
| 45 | EXPORT_SYMBOL(rpc_setbufsize); |
| 46 | EXPORT_SYMBOL(rpc_unlink); |
| 47 | EXPORT_SYMBOL(rpc_wake_up); |
| 48 | EXPORT_SYMBOL(rpc_queue_upcall); |
| 49 | EXPORT_SYMBOL(rpc_mkpipe); |
| 50 | |
| 51 | /* Client transport */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 52 | EXPORT_SYMBOL(xprt_set_timeout); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 53 | |
| 54 | /* Client credential cache */ |
| 55 | EXPORT_SYMBOL(rpcauth_register); |
| 56 | EXPORT_SYMBOL(rpcauth_unregister); |
| 57 | EXPORT_SYMBOL(rpcauth_create); |
| 58 | EXPORT_SYMBOL(rpcauth_lookupcred); |
| 59 | EXPORT_SYMBOL(rpcauth_lookup_credcache); |
Trond Myklebust | 3ab9bb7 | 2007-06-09 15:41:42 -0400 | [diff] [blame] | 60 | EXPORT_SYMBOL(rpcauth_destroy_credcache); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 61 | EXPORT_SYMBOL(rpcauth_init_credcache); |
| 62 | EXPORT_SYMBOL(put_rpccred); |
| 63 | |
| 64 | /* RPC server stuff */ |
| 65 | EXPORT_SYMBOL(svc_create); |
| 66 | EXPORT_SYMBOL(svc_create_thread); |
Greg Banks | a745544 | 2006-10-02 02:17:59 -0700 | [diff] [blame] | 67 | EXPORT_SYMBOL(svc_create_pooled); |
| 68 | EXPORT_SYMBOL(svc_set_num_threads); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 69 | EXPORT_SYMBOL(svc_exit_thread); |
| 70 | EXPORT_SYMBOL(svc_destroy); |
| 71 | EXPORT_SYMBOL(svc_drop); |
| 72 | EXPORT_SYMBOL(svc_process); |
| 73 | EXPORT_SYMBOL(svc_recv); |
| 74 | EXPORT_SYMBOL(svc_wake_up); |
| 75 | EXPORT_SYMBOL(svc_makesock); |
| 76 | EXPORT_SYMBOL(svc_reserve); |
| 77 | EXPORT_SYMBOL(svc_auth_register); |
| 78 | EXPORT_SYMBOL(auth_domain_lookup); |
| 79 | EXPORT_SYMBOL(svc_authenticate); |
| 80 | EXPORT_SYMBOL(svc_set_client); |
| 81 | |
| 82 | /* RPC statistics */ |
| 83 | #ifdef CONFIG_PROC_FS |
| 84 | EXPORT_SYMBOL(rpc_proc_register); |
| 85 | EXPORT_SYMBOL(rpc_proc_unregister); |
| 86 | EXPORT_SYMBOL(svc_proc_register); |
| 87 | EXPORT_SYMBOL(svc_proc_unregister); |
| 88 | EXPORT_SYMBOL(svc_seq_show); |
| 89 | #endif |
| 90 | |
| 91 | /* caching... */ |
| 92 | EXPORT_SYMBOL(auth_domain_find); |
| 93 | EXPORT_SYMBOL(auth_domain_put); |
| 94 | EXPORT_SYMBOL(auth_unix_add_addr); |
| 95 | EXPORT_SYMBOL(auth_unix_forget_old); |
| 96 | EXPORT_SYMBOL(auth_unix_lookup); |
| 97 | EXPORT_SYMBOL(cache_check); |
| 98 | EXPORT_SYMBOL(cache_flush); |
| 99 | EXPORT_SYMBOL(cache_purge); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 100 | EXPORT_SYMBOL(cache_register); |
| 101 | EXPORT_SYMBOL(cache_unregister); |
| 102 | EXPORT_SYMBOL(qword_add); |
| 103 | EXPORT_SYMBOL(qword_addhex); |
| 104 | EXPORT_SYMBOL(qword_get); |
| 105 | EXPORT_SYMBOL(svcauth_unix_purge); |
| 106 | EXPORT_SYMBOL(unix_domain_find); |
| 107 | |
| 108 | /* Generic XDR */ |
| 109 | EXPORT_SYMBOL(xdr_encode_string); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 110 | EXPORT_SYMBOL(xdr_decode_string_inplace); |
| 111 | EXPORT_SYMBOL(xdr_decode_netobj); |
| 112 | EXPORT_SYMBOL(xdr_encode_netobj); |
| 113 | EXPORT_SYMBOL(xdr_encode_pages); |
| 114 | EXPORT_SYMBOL(xdr_inline_pages); |
| 115 | EXPORT_SYMBOL(xdr_shift_buf); |
Andreas Gruenbacher | bd8100e | 2005-06-22 17:16:24 +0000 | [diff] [blame] | 116 | EXPORT_SYMBOL(xdr_encode_word); |
| 117 | EXPORT_SYMBOL(xdr_decode_word); |
| 118 | EXPORT_SYMBOL(xdr_encode_array2); |
| 119 | EXPORT_SYMBOL(xdr_decode_array2); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 120 | EXPORT_SYMBOL(xdr_buf_from_iov); |
| 121 | EXPORT_SYMBOL(xdr_buf_subsegment); |
| 122 | EXPORT_SYMBOL(xdr_buf_read_netobj); |
| 123 | EXPORT_SYMBOL(read_bytes_from_xdr_buf); |
| 124 | |
| 125 | /* Debugging symbols */ |
| 126 | #ifdef RPC_DEBUG |
| 127 | EXPORT_SYMBOL(rpc_debug); |
| 128 | EXPORT_SYMBOL(nfs_debug); |
| 129 | EXPORT_SYMBOL(nfsd_debug); |
| 130 | EXPORT_SYMBOL(nlm_debug); |
| 131 | #endif |
| 132 | |
NeilBrown | 3fc605a | 2007-02-14 00:33:13 -0800 | [diff] [blame] | 133 | extern struct cache_detail ip_map_cache, unix_gid_cache; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 134 | |
| 135 | static int __init |
| 136 | init_sunrpc(void) |
| 137 | { |
| 138 | int err = register_rpc_pipefs(); |
| 139 | if (err) |
| 140 | goto out; |
Akinobu Mita | 5bd5f58 | 2007-05-09 02:34:51 -0700 | [diff] [blame] | 141 | err = rpc_init_mempool(); |
| 142 | if (err) { |
| 143 | unregister_rpc_pipefs(); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 144 | goto out; |
Akinobu Mita | 5bd5f58 | 2007-05-09 02:34:51 -0700 | [diff] [blame] | 145 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 146 | #ifdef RPC_DEBUG |
| 147 | rpc_register_sysctl(); |
| 148 | #endif |
| 149 | #ifdef CONFIG_PROC_FS |
| 150 | rpc_proc_init(); |
| 151 | #endif |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 152 | cache_register(&ip_map_cache); |
NeilBrown | 3fc605a | 2007-02-14 00:33:13 -0800 | [diff] [blame] | 153 | cache_register(&unix_gid_cache); |
Chuck Lever | 282b32e | 2006-12-05 16:35:51 -0500 | [diff] [blame] | 154 | init_socket_xprt(); |
Trond Myklebust | f5c2187 | 2007-06-25 17:11:20 -0400 | [diff] [blame] | 155 | rpcauth_init_module(); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 156 | out: |
| 157 | return err; |
| 158 | } |
| 159 | |
| 160 | static void __exit |
| 161 | cleanup_sunrpc(void) |
| 162 | { |
Trond Myklebust | f5c2187 | 2007-06-25 17:11:20 -0400 | [diff] [blame] | 163 | rpcauth_remove_module(); |
Chuck Lever | 282b32e | 2006-12-05 16:35:51 -0500 | [diff] [blame] | 164 | cleanup_socket_xprt(); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 165 | unregister_rpc_pipefs(); |
| 166 | rpc_destroy_mempool(); |
Bruce Allan | f35279d | 2005-09-06 15:17:08 -0700 | [diff] [blame] | 167 | if (cache_unregister(&ip_map_cache)) |
| 168 | printk(KERN_ERR "sunrpc: failed to unregister ip_map cache\n"); |
NeilBrown | 3fc605a | 2007-02-14 00:33:13 -0800 | [diff] [blame] | 169 | if (cache_unregister(&unix_gid_cache)) |
| 170 | printk(KERN_ERR "sunrpc: failed to unregister unix_gid cache\n"); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 171 | #ifdef RPC_DEBUG |
| 172 | rpc_unregister_sysctl(); |
| 173 | #endif |
| 174 | #ifdef CONFIG_PROC_FS |
| 175 | rpc_proc_exit(); |
| 176 | #endif |
| 177 | } |
| 178 | MODULE_LICENSE("GPL"); |
| 179 | module_init(init_sunrpc); |
| 180 | module_exit(cleanup_sunrpc); |