xprtsock.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * linux/include/linux/sunrpc/xprtsock.h
  3. *
  4. * Declarations for the RPC transport socket provider.
  5. */
  6. #ifndef _LINUX_SUNRPC_XPRTSOCK_H
  7. #define _LINUX_SUNRPC_XPRTSOCK_H
  8. #ifdef __KERNEL__
  9. /*
  10. * Socket transport setup operations
  11. */
  12. struct rpc_xprt *xs_setup_udp(struct xprt_create *args);
  13. struct rpc_xprt *xs_setup_tcp(struct xprt_create *args);
  14. int init_socket_xprt(void);
  15. void cleanup_socket_xprt(void);
  16. /*
  17. * RPC transport identifiers for UDP, TCP
  18. *
  19. * To preserve compatibility with the historical use of raw IP protocol
  20. * id's for transport selection, these are specified with the previous
  21. * values. No such restriction exists for new transports, except that
  22. * they may not collide with these values (17 and 6, respectively).
  23. */
  24. #define XPRT_TRANSPORT_UDP IPPROTO_UDP
  25. #define XPRT_TRANSPORT_TCP IPPROTO_TCP
  26. /*
  27. * RPC slot table sizes for UDP, TCP transports
  28. */
  29. extern unsigned int xprt_udp_slot_table_entries;
  30. extern unsigned int xprt_tcp_slot_table_entries;
  31. /*
  32. * Parameters for choosing a free port
  33. */
  34. extern unsigned int xprt_min_resvport;
  35. extern unsigned int xprt_max_resvport;
  36. #define RPC_MIN_RESVPORT (1U)
  37. #define RPC_MAX_RESVPORT (65535U)
  38. #define RPC_DEF_MIN_RESVPORT (665U)
  39. #define RPC_DEF_MAX_RESVPORT (1023U)
  40. #endif /* __KERNEL__ */
  41. #endif /* _LINUX_SUNRPC_XPRTSOCK_H */