aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sunrpc
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2006-08-22 20:06:18 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-09-22 23:24:47 -0400
commitedb267a688fcee5335d596752f117a30c7152e44 (patch)
treeb73a91f17f22baa81a3c0a4df1b01929680a2807 /include/linux/sunrpc
parent39d7bbcb5ba5e9d8d658b70903dd7939400e57db (diff)
SUNRPC: add xprt switch API for printing formatted remote peer addresses
Add a new method to the transport switch API to provide a way to convert the opaque contents of xprt->addr to a human-readable string. Test plan: Compile kernel with CONFIG_NFS enabled. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include/linux/sunrpc')
-rw-r--r--include/linux/sunrpc/xprt.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h
index 84122559fa17..8372ab8fc9b5 100644
--- a/include/linux/sunrpc/xprt.h
+++ b/include/linux/sunrpc/xprt.h
@@ -51,6 +51,14 @@ struct rpc_timeout {
51 unsigned char to_exponential; 51 unsigned char to_exponential;
52}; 52};
53 53
54enum rpc_display_format_t {
55 RPC_DISPLAY_ADDR = 0,
56 RPC_DISPLAY_PORT,
57 RPC_DISPLAY_PROTO,
58 RPC_DISPLAY_ALL,
59 RPC_DISPLAY_MAX,
60};
61
54struct rpc_task; 62struct rpc_task;
55struct rpc_xprt; 63struct rpc_xprt;
56struct seq_file; 64struct seq_file;
@@ -103,6 +111,7 @@ struct rpc_rqst {
103 111
104struct rpc_xprt_ops { 112struct rpc_xprt_ops {
105 void (*set_buffer_size)(struct rpc_xprt *xprt, size_t sndsize, size_t rcvsize); 113 void (*set_buffer_size)(struct rpc_xprt *xprt, size_t sndsize, size_t rcvsize);
114 char * (*print_addr)(struct rpc_xprt *xprt, enum rpc_display_format_t format);
106 int (*reserve_xprt)(struct rpc_task *task); 115 int (*reserve_xprt)(struct rpc_task *task);
107 void (*release_xprt)(struct rpc_xprt *xprt, struct rpc_task *task); 116 void (*release_xprt)(struct rpc_xprt *xprt, struct rpc_task *task);
108 void (*rpcbind)(struct rpc_task *task); 117 void (*rpcbind)(struct rpc_task *task);
@@ -207,6 +216,8 @@ struct rpc_xprt {
207 void (*old_data_ready)(struct sock *, int); 216 void (*old_data_ready)(struct sock *, int);
208 void (*old_state_change)(struct sock *); 217 void (*old_state_change)(struct sock *);
209 void (*old_write_space)(struct sock *); 218 void (*old_write_space)(struct sock *);
219
220 char * address_strings[RPC_DISPLAY_MAX];
210}; 221};
211 222
212#define XPRT_LAST_FRAG (1 << 0) 223#define XPRT_LAST_FRAG (1 << 0)