xprtsock.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. int init_socket_xprt(void);
  10. void cleanup_socket_xprt(void);
  11. /*
  12. * RPC transport identifiers for UDP, TCP
  13. *
  14. * To preserve compatibility with the historical use of raw IP protocol
  15. * id's for transport selection, these are specified with the previous
  16. * values. No such restriction exists for new transports, except that
  17. * they may not collide with these values (17 and 6, respectively).
  18. */
  19. #define XPRT_TRANSPORT_UDP IPPROTO_UDP
  20. #define XPRT_TRANSPORT_TCP IPPROTO_TCP
  21. /*
  22. * RPC slot table sizes for UDP, TCP transports
  23. */
  24. extern unsigned int xprt_udp_slot_table_entries;
  25. extern unsigned int xprt_tcp_slot_table_entries;
  26. /*
  27. * Parameters for choosing a free port
  28. */
  29. extern unsigned int xprt_min_resvport;
  30. extern unsigned int xprt_max_resvport;
  31. #define RPC_MIN_RESVPORT (1U)
  32. #define RPC_MAX_RESVPORT (65535U)
  33. #define RPC_DEF_MIN_RESVPORT (665U)
  34. #define RPC_DEF_MAX_RESVPORT (1023U)
  35. #endif /* __KERNEL__ */
  36. #endif /* _LINUX_SUNRPC_XPRTSOCK_H */