aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sunrpc/xprt.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/sunrpc/xprt.h')
-rw-r--r--include/linux/sunrpc/xprt.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h
index 34f7590506fa..d11cedd14f0f 100644
--- a/include/linux/sunrpc/xprt.h
+++ b/include/linux/sunrpc/xprt.h
@@ -17,6 +17,8 @@
17#include <linux/sunrpc/xdr.h> 17#include <linux/sunrpc/xdr.h>
18#include <linux/sunrpc/msg_prot.h> 18#include <linux/sunrpc/msg_prot.h>
19 19
20#ifdef __KERNEL__
21
20extern unsigned int xprt_udp_slot_table_entries; 22extern unsigned int xprt_udp_slot_table_entries;
21extern unsigned int xprt_tcp_slot_table_entries; 23extern unsigned int xprt_tcp_slot_table_entries;
22 24
@@ -194,7 +196,13 @@ struct rpc_xprt {
194 char * address_strings[RPC_DISPLAY_MAX]; 196 char * address_strings[RPC_DISPLAY_MAX];
195}; 197};
196 198
197#ifdef __KERNEL__ 199struct rpc_xprtsock_create {
200 int proto; /* IPPROTO_UDP or IPPROTO_TCP */
201 struct sockaddr * srcaddr; /* optional local address */
202 struct sockaddr * dstaddr; /* remote peer address */
203 size_t addrlen;
204 struct rpc_timeout * timeout; /* optional timeout parameters */
205};
198 206
199/* 207/*
200 * Transport operations used by ULPs 208 * Transport operations used by ULPs
@@ -204,7 +212,7 @@ void xprt_set_timeout(struct rpc_timeout *to, unsigned int retr, unsigned long
204/* 212/*
205 * Generic internal transport functions 213 * Generic internal transport functions
206 */ 214 */
207struct rpc_xprt * xprt_create_transport(int proto, struct sockaddr *addr, size_t size, struct rpc_timeout *toparms); 215struct rpc_xprt * xprt_create_transport(struct rpc_xprtsock_create *args);
208void xprt_connect(struct rpc_task *task); 216void xprt_connect(struct rpc_task *task);
209void xprt_reserve(struct rpc_task *task); 217void xprt_reserve(struct rpc_task *task);
210int xprt_reserve_xprt(struct rpc_task *task); 218int xprt_reserve_xprt(struct rpc_task *task);
@@ -242,8 +250,8 @@ void xprt_disconnect(struct rpc_xprt *xprt);
242/* 250/*
243 * Socket transport setup operations 251 * Socket transport setup operations
244 */ 252 */
245struct rpc_xprt * xs_setup_udp(struct sockaddr *addr, size_t addrlen, struct rpc_timeout *to); 253struct rpc_xprt * xs_setup_udp(struct rpc_xprtsock_create *args);
246struct rpc_xprt * xs_setup_tcp(struct sockaddr *addr, size_t addrlen, struct rpc_timeout *to); 254struct rpc_xprt * xs_setup_tcp(struct rpc_xprtsock_create *args);
247int init_socket_xprt(void); 255int init_socket_xprt(void);
248void cleanup_socket_xprt(void); 256void cleanup_socket_xprt(void);
249 257