Tom Tucker | 1d8206b9 | 2007-12-30 21:07:15 -0600 | [diff] [blame] | 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 | |
| 12 | struct svc_xprt_ops { |
Tom Tucker | 5d13799 | 2007-12-30 21:07:23 -0600 | [diff] [blame] | 13 | int (*xpo_recvfrom)(struct svc_rqst *); |
| 14 | int (*xpo_sendto)(struct svc_rqst *); |
Tom Tucker | 5148bf4 | 2007-12-30 21:07:25 -0600 | [diff] [blame] | 15 | void (*xpo_release_rqst)(struct svc_rqst *); |
Tom Tucker | 755ccea | 2007-12-30 21:07:27 -0600 | [diff] [blame^] | 16 | void (*xpo_detach)(struct svc_xprt *); |
| 17 | void (*xpo_free)(struct svc_xprt *); |
Tom Tucker | 1d8206b9 | 2007-12-30 21:07:15 -0600 | [diff] [blame] | 18 | }; |
| 19 | |
| 20 | struct svc_xprt_class { |
| 21 | const char *xcl_name; |
| 22 | struct module *xcl_owner; |
| 23 | struct svc_xprt_ops *xcl_ops; |
| 24 | struct list_head xcl_list; |
Tom Tucker | 4902315 | 2007-12-30 21:07:21 -0600 | [diff] [blame] | 25 | u32 xcl_max_payload; |
Tom Tucker | 1d8206b9 | 2007-12-30 21:07:15 -0600 | [diff] [blame] | 26 | }; |
| 27 | |
| 28 | struct svc_xprt { |
| 29 | struct svc_xprt_class *xpt_class; |
| 30 | struct svc_xprt_ops *xpt_ops; |
| 31 | }; |
| 32 | |
| 33 | int svc_reg_xprt_class(struct svc_xprt_class *); |
| 34 | void svc_unreg_xprt_class(struct svc_xprt_class *); |
| 35 | void svc_xprt_init(struct svc_xprt_class *, struct svc_xprt *); |
| 36 | |
| 37 | #endif /* SUNRPC_SVC_XPRT_H */ |