diff options
author | \"Talpey, Thomas\ <Thomas.Talpey@netapp.com> | 2007-09-10 17:46:00 (GMT) |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-10-09 21:17:40 (GMT) |
commit | 81c098af3da7981902e9f8163aeccc2467c4ba6d (patch) | |
tree | b98e3c8c9e519e34abf721410de70373cedb4a9f /include | |
parent | 1244480976d357447aeddd3f44977586bfa0462b (diff) | |
download | linux-fsl-qoriq-81c098af3da7981902e9f8163aeccc2467c4ba6d.tar.xz |
SUNRPC: Provide a new API for registering transport implementations
To allow transport capabilities to be loaded dynamically, provide an API
for registering and unregistering the transports with the RPC client.
Eventually xprt_create_transport() will be changed to search the list of
registered transports when initializing a fresh transport.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Tom Talpey <tmt@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/sunrpc/xprt.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 513b065..7b6b137 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h @@ -208,6 +208,15 @@ struct rpc_xprtsock_create { struct rpc_timeout * timeout; /* optional timeout parameters */ }; +struct xprt_class { + struct list_head list; + unsigned short family; + int protocol; + struct rpc_xprt * (*setup)(struct rpc_xprtsock_create *); + struct module *owner; + char name[32]; +}; + /* * Transport operations used by ULPs */ @@ -239,6 +248,8 @@ static inline __be32 *xprt_skip_transport_header(struct rpc_xprt *xprt, __be32 * /* * Transport switch helper functions */ +int xprt_register_transport(struct xprt_class *type); +int xprt_unregister_transport(struct xprt_class *type); void xprt_set_retrans_timeout_def(struct rpc_task *task); void xprt_set_retrans_timeout_rtt(struct rpc_task *task); void xprt_wake_pending_tasks(struct rpc_xprt *xprt, int status); |