The Android Open Source Project | a27d2ba | 2008-10-21 07:00:00 -0700 | [diff] [blame^] | 1 | /**************************************************************************** |
| 2 | **************************************************************************** |
| 3 | *** |
| 4 | *** This header was automatically generated from a Linux kernel header |
| 5 | *** of the same name, to make information necessary for userspace to |
| 6 | *** call into the kernel available to libc. It contains only constants, |
| 7 | *** structures, and macros generated from the original header, and thus, |
| 8 | *** contains no copyrightable information. |
| 9 | *** |
| 10 | **************************************************************************** |
| 11 | ****************************************************************************/ |
| 12 | #ifndef _LINUX_SUNRPC_CLNT_H |
| 13 | #define _LINUX_SUNRPC_CLNT_H |
| 14 | |
| 15 | #include <linux/sunrpc/msg_prot.h> |
| 16 | #include <linux/sunrpc/sched.h> |
| 17 | #include <linux/sunrpc/xprt.h> |
| 18 | #include <linux/sunrpc/auth.h> |
| 19 | #include <linux/sunrpc/stats.h> |
| 20 | #include <linux/sunrpc/xdr.h> |
| 21 | #include <linux/sunrpc/timer.h> |
| 22 | #include <asm/signal.h> |
| 23 | |
| 24 | struct rpc_portmap { |
| 25 | __u32 pm_prog; |
| 26 | __u32 pm_vers; |
| 27 | __u32 pm_prot; |
| 28 | __u16 pm_port; |
| 29 | unsigned char pm_binding : 1; |
| 30 | struct rpc_wait_queue pm_bindwait; |
| 31 | }; |
| 32 | |
| 33 | struct rpc_inode; |
| 34 | |
| 35 | struct rpc_clnt { |
| 36 | atomic_t cl_count; |
| 37 | atomic_t cl_users; |
| 38 | struct rpc_xprt * cl_xprt; |
| 39 | struct rpc_procinfo * cl_procinfo; |
| 40 | u32 cl_maxproc; |
| 41 | |
| 42 | char * cl_server; |
| 43 | char * cl_protname; |
| 44 | struct rpc_auth * cl_auth; |
| 45 | struct rpc_stat * cl_stats; |
| 46 | struct rpc_iostats * cl_metrics; |
| 47 | |
| 48 | unsigned int cl_softrtry : 1, |
| 49 | cl_intr : 1, |
| 50 | cl_autobind : 1, |
| 51 | cl_oneshot : 1, |
| 52 | cl_dead : 1; |
| 53 | |
| 54 | struct rpc_rtt * cl_rtt; |
| 55 | struct rpc_portmap * cl_pmap; |
| 56 | |
| 57 | int cl_nodelen; |
| 58 | char cl_nodename[UNX_MAXNODENAME]; |
| 59 | char cl_pathname[30]; |
| 60 | struct vfsmount * cl_vfsmnt; |
| 61 | struct dentry * cl_dentry; |
| 62 | struct rpc_clnt * cl_parent; |
| 63 | struct rpc_rtt cl_rtt_default; |
| 64 | struct rpc_portmap cl_pmap_default; |
| 65 | char cl_inline_name[32]; |
| 66 | }; |
| 67 | #define cl_timeout cl_xprt->timeout |
| 68 | #define cl_prog cl_pmap->pm_prog |
| 69 | #define cl_vers cl_pmap->pm_vers |
| 70 | #define cl_port cl_pmap->pm_port |
| 71 | #define cl_prot cl_pmap->pm_prot |
| 72 | |
| 73 | #define RPC_MAXVERSION 4 |
| 74 | struct rpc_program { |
| 75 | char * name; |
| 76 | u32 number; |
| 77 | unsigned int nrvers; |
| 78 | struct rpc_version ** version; |
| 79 | struct rpc_stat * stats; |
| 80 | char * pipe_dir_name; |
| 81 | }; |
| 82 | |
| 83 | struct rpc_version { |
| 84 | u32 number; |
| 85 | unsigned int nrprocs; |
| 86 | struct rpc_procinfo * procs; |
| 87 | }; |
| 88 | |
| 89 | struct rpc_procinfo { |
| 90 | u32 p_proc; |
| 91 | kxdrproc_t p_encode; |
| 92 | kxdrproc_t p_decode; |
| 93 | unsigned int p_bufsiz; |
| 94 | unsigned int p_count; |
| 95 | unsigned int p_timer; |
| 96 | u32 p_statidx; |
| 97 | char * p_name; |
| 98 | }; |
| 99 | |
| 100 | #define RPC_CONGESTED(clnt) (RPCXPRT_CONGESTED((clnt)->cl_xprt)) |
| 101 | #define RPC_PEERADDR(clnt) (&(clnt)->cl_xprt->addr) |
| 102 | |
| 103 | #endif |