aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2006-08-22 20:06:20 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-09-22 23:24:49 -0400
commitc2866763b4029411d166040306691773c12d4caf (patch)
tree5b16b3a293843062234c5eaf377da2af93365266 /include
parent6ca948238724c945bd353f51d54ae7d285f3889f (diff)
SUNRPC: use sockaddr + size when creating remote transport endpoints
Prepare for more generic transport endpoint handling needed by transports that might use different forms of addressing, such as IPv6. Introduce a single function call to replace the two-call xprt_create_proto/rpc_create_client API. Define a new rpc_create_args structure that allows callers to pass in remote endpoint addresses of varying length. Test-plan: Compile kernel with CONFIG_NFS enabled. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/sunrpc/clnt.h22
-rw-r--r--include/linux/sunrpc/xprt.h1
2 files changed, 23 insertions, 0 deletions
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h
index a26d69583c7a..7817ba82f1b2 100644
--- a/include/linux/sunrpc/clnt.h
+++ b/include/linux/sunrpc/clnt.h
@@ -97,6 +97,28 @@ struct rpc_clnt *rpc_create_client(struct rpc_xprt *xprt, char *servname,
97struct rpc_clnt *rpc_new_client(struct rpc_xprt *xprt, char *servname, 97struct rpc_clnt *rpc_new_client(struct rpc_xprt *xprt, char *servname,
98 struct rpc_program *info, 98 struct rpc_program *info,
99 u32 version, rpc_authflavor_t authflavor); 99 u32 version, rpc_authflavor_t authflavor);
100
101struct rpc_create_args {
102 int protocol;
103 struct sockaddr *address;
104 size_t addrsize;
105 struct rpc_timeout *timeout;
106 char *servername;
107 struct rpc_program *program;
108 u32 version;
109 rpc_authflavor_t authflavor;
110 unsigned long flags;
111};
112
113/* Values for "flags" field */
114#define RPC_CLNT_CREATE_HARDRTRY (1UL << 0)
115#define RPC_CLNT_CREATE_INTR (1UL << 1)
116#define RPC_CLNT_CREATE_AUTOBIND (1UL << 2)
117#define RPC_CLNT_CREATE_ONESHOT (1UL << 3)
118#define RPC_CLNT_CREATE_NONPRIVPORT (1UL << 4)
119#define RPC_CLNT_CREATE_NOPING (1UL << 5)
120
121struct rpc_clnt *rpc_create(struct rpc_create_args *args);
100struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *, 122struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *,
101 struct rpc_program *, int); 123 struct rpc_program *, int);
102struct rpc_clnt *rpc_clone_client(struct rpc_clnt *); 124struct rpc_clnt *rpc_clone_client(struct rpc_clnt *);
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h
index fc05cfbd5805..bc80fcfdd892 100644
--- a/include/linux/sunrpc/xprt.h
+++ b/include/linux/sunrpc/xprt.h
@@ -237,6 +237,7 @@ void xprt_set_timeout(struct rpc_timeout *to, unsigned int retr, unsigned long
237/* 237/*
238 * Generic internal transport functions 238 * Generic internal transport functions
239 */ 239 */
240struct rpc_xprt * xprt_create_transport(int proto, struct sockaddr *addr, size_t size, struct rpc_timeout *toparms);
240void xprt_connect(struct rpc_task *task); 241void xprt_connect(struct rpc_task *task);
241void xprt_reserve(struct rpc_task *task); 242void xprt_reserve(struct rpc_task *task);
242int xprt_reserve_xprt(struct rpc_task *task); 243int xprt_reserve_xprt(struct rpc_task *task);