svc_xprt.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * linux/include/linux/sunrpc/svc_xprt.h
  3. *
  4. * RPC server transport I/O
  5. */
  6. #ifndef SUNRPC_SVC_XPRT_H
  7. #define SUNRPC_SVC_XPRT_H
  8. #include <linux/sunrpc/svc.h>
  9. struct svc_xprt_ops {
  10. struct svc_xprt *(*xpo_create)(struct svc_serv *,
  11. struct sockaddr *, int,
  12. int);
  13. struct svc_xprt *(*xpo_accept)(struct svc_xprt *);
  14. int (*xpo_has_wspace)(struct svc_xprt *);
  15. int (*xpo_recvfrom)(struct svc_rqst *);
  16. void (*xpo_prep_reply_hdr)(struct svc_rqst *);
  17. int (*xpo_sendto)(struct svc_rqst *);
  18. void (*xpo_release_rqst)(struct svc_rqst *);
  19. void (*xpo_detach)(struct svc_xprt *);
  20. void (*xpo_free)(struct svc_xprt *);
  21. };
  22. struct svc_xprt_class {
  23. const char *xcl_name;
  24. struct module *xcl_owner;
  25. struct svc_xprt_ops *xcl_ops;
  26. struct list_head xcl_list;
  27. u32 xcl_max_payload;
  28. };
  29. struct svc_xprt {
  30. struct svc_xprt_class *xpt_class;
  31. struct svc_xprt_ops *xpt_ops;
  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. int svc_create_xprt(struct svc_serv *, char *, unsigned short, int);
  37. #endif /* SUNRPC_SVC_XPRT_H */