9 #ifndef _LINUX_SUNRPC_CLNT_H
10 #define _LINUX_SUNRPC_CLNT_H
12 #include <linux/types.h>
13 #include <linux/socket.h>
15 #include <linux/in6.h>
24 #include <asm/signal.h>
70 #define RPC_MAXVERSION 4
103 struct rpc_create_args {
109 const struct rpc_timeout *
timeout;
110 const char *servername;
114 rpc_authflavor_t authflavor;
121 #define RPC_CLNT_CREATE_HARDRTRY (1UL << 0)
122 #define RPC_CLNT_CREATE_AUTOBIND (1UL << 2)
123 #define RPC_CLNT_CREATE_NONPRIVPORT (1UL << 3)
124 #define RPC_CLNT_CREATE_NOPING (1UL << 4)
125 #define RPC_CLNT_CREATE_DISCRTRY (1UL << 5)
126 #define RPC_CLNT_CREATE_QUIET (1UL << 6)
169 size_t rpc_pton(
struct net *,
const char *,
const size_t,
175 static inline unsigned short rpc_get_port(
const struct sockaddr *sap)
186 static inline void rpc_set_port(
struct sockaddr *sap,
187 const unsigned short port)
199 #define IPV6_SCOPE_DELIMITER '%'
200 #define IPV6_SCOPE_ID_LEN sizeof("%nnnnnnnnnn")
202 static inline bool __rpc_cmp_addr4(
const struct sockaddr *sap1,
211 static inline bool __rpc_copy_addr4(
struct sockaddr *
dst,
222 #if IS_ENABLED(CONFIG_IPV6)
223 static inline bool __rpc_cmp_addr6(
const struct sockaddr *sap1,
237 static inline bool __rpc_copy_addr6(
struct sockaddr *
dst,
248 static inline bool __rpc_cmp_addr6(
const struct sockaddr *sap1,
254 static inline bool __rpc_copy_addr6(
struct sockaddr *
dst,
269 static inline bool rpc_cmp_addr(
const struct sockaddr *sap1,
275 return __rpc_cmp_addr4(sap1, sap2);
277 return __rpc_cmp_addr6(sap1, sap2);
293 static inline bool rpc_copy_addr(
struct sockaddr *
dst,
298 return __rpc_copy_addr4(dst, src);
300 return __rpc_copy_addr6(dst, src);
312 static inline u32 rpc_get_scope_id(
const struct sockaddr *
sa)