aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sunrpc/svc_xprt.h
diff options
context:
space:
mode:
authorTom Tucker <tom@opengridcomputing.com>2007-12-30 22:07:15 -0500
committerJ. Bruce Fields <bfields@citi.umich.edu>2008-02-01 16:42:07 -0500
commit1d8206b97a09e7ff2fbef17d8d1ea008d764eeaa (patch)
tree0975483e82fab57c25fdbb19a9946985659a8ca2 /include/linux/sunrpc/svc_xprt.h
parentcb5c7d668e1af269a9409721268f027b86abf29c (diff)
svc: Add an svc transport class
The transport class (svc_xprt_class) represents a type of transport, e.g. udp, tcp, rdma. A transport class has a unique name and a set of transport operations kept in the svc_xprt_ops structure. A transport class can be dynamically registered and unregisterd. The svc_xprt_class represents the module that implements the transport type and keeps reference counts on the module to avoid unloading while there are active users. The endpoint (svc_xprt) is a generic, transport independent endpoint that can be used to send and receive data for an RPC service. It inherits it's operations from the transport class. A transport driver module registers and unregisters itself with svc sunrpc by calling svc_reg_xprt_class, and svc_unreg_xprt_class respectively. Signed-off-by: Tom Tucker <tom@opengridcomputing.com> Acked-by: Neil Brown <neilb@suse.de> Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Reviewed-by: Greg Banks <gnb@sgi.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'include/linux/sunrpc/svc_xprt.h')
-rw-r--r--include/linux/sunrpc/svc_xprt.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/include/linux/sunrpc/svc_xprt.h b/include/linux/sunrpc/svc_xprt.h
new file mode 100644
index 000000000000..fe8e787bb95d
--- /dev/null
+++ b/include/linux/sunrpc/svc_xprt.h
@@ -0,0 +1,31 @@
1/*
2 * linux/include/linux/sunrpc/svc_xprt.h
3 *
4 * RPC server transport I/O
5 */
6
7#ifndef SUNRPC_SVC_XPRT_H
8#define SUNRPC_SVC_XPRT_H
9
10#include <linux/sunrpc/svc.h>
11
12struct svc_xprt_ops {
13};
14
15struct svc_xprt_class {
16 const char *xcl_name;
17 struct module *xcl_owner;
18 struct svc_xprt_ops *xcl_ops;
19 struct list_head xcl_list;
20};
21
22struct svc_xprt {
23 struct svc_xprt_class *xpt_class;
24 struct svc_xprt_ops *xpt_ops;
25};
26
27int svc_reg_xprt_class(struct svc_xprt_class *);
28void svc_unreg_xprt_class(struct svc_xprt_class *);
29void svc_xprt_init(struct svc_xprt_class *, struct svc_xprt *);
30
31#endif /* SUNRPC_SVC_XPRT_H */