aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sunrpc/clnt.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/sunrpc/clnt.h')
-rw-r--r--include/linux/sunrpc/clnt.h33
1 files changed, 15 insertions, 18 deletions
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h
index 66611423c8ee..c0d9d14983b3 100644
--- a/include/linux/sunrpc/clnt.h
+++ b/include/linux/sunrpc/clnt.h
@@ -24,8 +24,10 @@ struct rpc_inode;
24 * The high-level client handle 24 * The high-level client handle
25 */ 25 */
26struct rpc_clnt { 26struct rpc_clnt {
27 atomic_t cl_count; /* Number of clones */ 27 struct kref cl_kref; /* Number of references */
28 atomic_t cl_users; /* number of references */ 28 struct list_head cl_clients; /* Global list of clients */
29 struct list_head cl_tasks; /* List of tasks */
30 spinlock_t cl_lock; /* spinlock */
29 struct rpc_xprt * cl_xprt; /* transport */ 31 struct rpc_xprt * cl_xprt; /* transport */
30 struct rpc_procinfo * cl_procinfo; /* procedure info */ 32 struct rpc_procinfo * cl_procinfo; /* procedure info */
31 u32 cl_prog, /* RPC program number */ 33 u32 cl_prog, /* RPC program number */
@@ -41,9 +43,7 @@ struct rpc_clnt {
41 unsigned int cl_softrtry : 1,/* soft timeouts */ 43 unsigned int cl_softrtry : 1,/* soft timeouts */
42 cl_intr : 1,/* interruptible */ 44 cl_intr : 1,/* interruptible */
43 cl_discrtry : 1,/* disconnect before retry */ 45 cl_discrtry : 1,/* disconnect before retry */
44 cl_autobind : 1,/* use getport() */ 46 cl_autobind : 1;/* use getport() */
45 cl_oneshot : 1,/* dispose after use */
46 cl_dead : 1;/* abandoned */
47 47
48 struct rpc_rtt * cl_rtt; /* RTO estimator data */ 48 struct rpc_rtt * cl_rtt; /* RTO estimator data */
49 49
@@ -98,6 +98,7 @@ struct rpc_create_args {
98 int protocol; 98 int protocol;
99 struct sockaddr *address; 99 struct sockaddr *address;
100 size_t addrsize; 100 size_t addrsize;
101 struct sockaddr *saddress;
101 struct rpc_timeout *timeout; 102 struct rpc_timeout *timeout;
102 char *servername; 103 char *servername;
103 struct rpc_program *program; 104 struct rpc_program *program;
@@ -110,20 +111,20 @@ struct rpc_create_args {
110#define RPC_CLNT_CREATE_HARDRTRY (1UL << 0) 111#define RPC_CLNT_CREATE_HARDRTRY (1UL << 0)
111#define RPC_CLNT_CREATE_INTR (1UL << 1) 112#define RPC_CLNT_CREATE_INTR (1UL << 1)
112#define RPC_CLNT_CREATE_AUTOBIND (1UL << 2) 113#define RPC_CLNT_CREATE_AUTOBIND (1UL << 2)
113#define RPC_CLNT_CREATE_ONESHOT (1UL << 3) 114#define RPC_CLNT_CREATE_NONPRIVPORT (1UL << 3)
114#define RPC_CLNT_CREATE_NONPRIVPORT (1UL << 4) 115#define RPC_CLNT_CREATE_NOPING (1UL << 4)
115#define RPC_CLNT_CREATE_NOPING (1UL << 5) 116#define RPC_CLNT_CREATE_DISCRTRY (1UL << 5)
116#define RPC_CLNT_CREATE_DISCRTRY (1UL << 6)
117 117
118struct rpc_clnt *rpc_create(struct rpc_create_args *args); 118struct rpc_clnt *rpc_create(struct rpc_create_args *args);
119struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *, 119struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *,
120 struct rpc_program *, int); 120 struct rpc_program *, int);
121struct rpc_clnt *rpc_clone_client(struct rpc_clnt *); 121struct rpc_clnt *rpc_clone_client(struct rpc_clnt *);
122int rpc_shutdown_client(struct rpc_clnt *); 122void rpc_shutdown_client(struct rpc_clnt *);
123int rpc_destroy_client(struct rpc_clnt *);
124void rpc_release_client(struct rpc_clnt *); 123void rpc_release_client(struct rpc_clnt *);
124
125int rpcb_register(u32, u32, int, unsigned short, int *); 125int rpcb_register(u32, u32, int, unsigned short, int *);
126void rpcb_getport(struct rpc_task *); 126int rpcb_getport_sync(struct sockaddr_in *, __u32, __u32, int);
127void rpcb_getport_async(struct rpc_task *);
127 128
128void rpc_call_setup(struct rpc_task *, struct rpc_message *, int); 129void rpc_call_setup(struct rpc_task *, struct rpc_message *, int);
129 130
@@ -132,20 +133,16 @@ int rpc_call_async(struct rpc_clnt *clnt, struct rpc_message *msg,
132 void *calldata); 133 void *calldata);
133int rpc_call_sync(struct rpc_clnt *clnt, struct rpc_message *msg, 134int rpc_call_sync(struct rpc_clnt *clnt, struct rpc_message *msg,
134 int flags); 135 int flags);
136struct rpc_task *rpc_call_null(struct rpc_clnt *clnt, struct rpc_cred *cred,
137 int flags);
135void rpc_restart_call(struct rpc_task *); 138void rpc_restart_call(struct rpc_task *);
136void rpc_clnt_sigmask(struct rpc_clnt *clnt, sigset_t *oldset); 139void rpc_clnt_sigmask(struct rpc_clnt *clnt, sigset_t *oldset);
137void rpc_clnt_sigunmask(struct rpc_clnt *clnt, sigset_t *oldset); 140void rpc_clnt_sigunmask(struct rpc_clnt *clnt, sigset_t *oldset);
138void rpc_setbufsize(struct rpc_clnt *, unsigned int, unsigned int); 141void rpc_setbufsize(struct rpc_clnt *, unsigned int, unsigned int);
139size_t rpc_max_payload(struct rpc_clnt *); 142size_t rpc_max_payload(struct rpc_clnt *);
140void rpc_force_rebind(struct rpc_clnt *); 143void rpc_force_rebind(struct rpc_clnt *);
141int rpc_ping(struct rpc_clnt *clnt, int flags);
142size_t rpc_peeraddr(struct rpc_clnt *, struct sockaddr *, size_t); 144size_t rpc_peeraddr(struct rpc_clnt *, struct sockaddr *, size_t);
143char * rpc_peeraddr2str(struct rpc_clnt *, enum rpc_display_format_t); 145char * rpc_peeraddr2str(struct rpc_clnt *, enum rpc_display_format_t);
144 146
145/*
146 * Helper function for NFSroot support
147 */
148int rpcb_getport_external(struct sockaddr_in *, __u32, __u32, int);
149
150#endif /* __KERNEL__ */ 147#endif /* __KERNEL__ */
151#endif /* _LINUX_SUNRPC_CLNT_H */ 148#endif /* _LINUX_SUNRPC_CLNT_H */