diff options
author | David Woodhouse <dwmw2@infradead.org> | 2006-09-24 17:05:59 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2006-09-24 17:05:59 -0400 |
commit | 02b25fcff676125a88169c8a78d4c6dd647574ed (patch) | |
tree | 372fc8e885be41ba1819b2767c8889ecd97ff948 /include/linux/sunrpc | |
parent | 1694176a210189312e31b083bac1e1688981219a (diff) | |
parent | a68aa1cc6f3203b8a332683ebde67a00f39eec43 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'include/linux/sunrpc')
-rw-r--r-- | include/linux/sunrpc/clnt.h | 57 | ||||
-rw-r--r-- | include/linux/sunrpc/gss_krb5.h | 19 | ||||
-rw-r--r-- | include/linux/sunrpc/gss_spkm3.h | 4 | ||||
-rw-r--r-- | include/linux/sunrpc/rpc_pipe_fs.h | 2 | ||||
-rw-r--r-- | include/linux/sunrpc/sched.h | 5 | ||||
-rw-r--r-- | include/linux/sunrpc/xprt.h | 52 |
6 files changed, 89 insertions, 50 deletions
diff --git a/include/linux/sunrpc/clnt.h b/include/linux/sunrpc/clnt.h index 8fe9f35eba31..f6d1d646ce05 100644 --- a/include/linux/sunrpc/clnt.h +++ b/include/linux/sunrpc/clnt.h | |||
@@ -18,18 +18,6 @@ | |||
18 | #include <linux/sunrpc/timer.h> | 18 | #include <linux/sunrpc/timer.h> |
19 | #include <asm/signal.h> | 19 | #include <asm/signal.h> |
20 | 20 | ||
21 | /* | ||
22 | * This defines an RPC port mapping | ||
23 | */ | ||
24 | struct rpc_portmap { | ||
25 | __u32 pm_prog; | ||
26 | __u32 pm_vers; | ||
27 | __u32 pm_prot; | ||
28 | __u16 pm_port; | ||
29 | unsigned char pm_binding : 1; /* doing a getport() */ | ||
30 | struct rpc_wait_queue pm_bindwait; /* waiting on getport() */ | ||
31 | }; | ||
32 | |||
33 | struct rpc_inode; | 21 | struct rpc_inode; |
34 | 22 | ||
35 | /* | 23 | /* |
@@ -40,7 +28,9 @@ struct rpc_clnt { | |||
40 | atomic_t cl_users; /* number of references */ | 28 | atomic_t cl_users; /* number of references */ |
41 | struct rpc_xprt * cl_xprt; /* transport */ | 29 | struct rpc_xprt * cl_xprt; /* transport */ |
42 | struct rpc_procinfo * cl_procinfo; /* procedure info */ | 30 | struct rpc_procinfo * cl_procinfo; /* procedure info */ |
43 | u32 cl_maxproc; /* max procedure number */ | 31 | u32 cl_prog, /* RPC program number */ |
32 | cl_vers, /* RPC version number */ | ||
33 | cl_maxproc; /* max procedure number */ | ||
44 | 34 | ||
45 | char * cl_server; /* server machine name */ | 35 | char * cl_server; /* server machine name */ |
46 | char * cl_protname; /* protocol name */ | 36 | char * cl_protname; /* protocol name */ |
@@ -55,7 +45,6 @@ struct rpc_clnt { | |||
55 | cl_dead : 1;/* abandoned */ | 45 | cl_dead : 1;/* abandoned */ |
56 | 46 | ||
57 | struct rpc_rtt * cl_rtt; /* RTO estimator data */ | 47 | struct rpc_rtt * cl_rtt; /* RTO estimator data */ |
58 | struct rpc_portmap * cl_pmap; /* port mapping */ | ||
59 | 48 | ||
60 | int cl_nodelen; /* nodename length */ | 49 | int cl_nodelen; /* nodename length */ |
61 | char cl_nodename[UNX_MAXNODENAME]; | 50 | char cl_nodename[UNX_MAXNODENAME]; |
@@ -64,14 +53,8 @@ struct rpc_clnt { | |||
64 | struct dentry * cl_dentry; /* inode */ | 53 | struct dentry * cl_dentry; /* inode */ |
65 | struct rpc_clnt * cl_parent; /* Points to parent of clones */ | 54 | struct rpc_clnt * cl_parent; /* Points to parent of clones */ |
66 | struct rpc_rtt cl_rtt_default; | 55 | struct rpc_rtt cl_rtt_default; |
67 | struct rpc_portmap cl_pmap_default; | ||
68 | char cl_inline_name[32]; | 56 | char cl_inline_name[32]; |
69 | }; | 57 | }; |
70 | #define cl_timeout cl_xprt->timeout | ||
71 | #define cl_prog cl_pmap->pm_prog | ||
72 | #define cl_vers cl_pmap->pm_vers | ||
73 | #define cl_port cl_pmap->pm_port | ||
74 | #define cl_prot cl_pmap->pm_prot | ||
75 | 58 | ||
76 | /* | 59 | /* |
77 | * General RPC program info | 60 | * General RPC program info |
@@ -106,24 +89,36 @@ struct rpc_procinfo { | |||
106 | char * p_name; /* name of procedure */ | 89 | char * p_name; /* name of procedure */ |
107 | }; | 90 | }; |
108 | 91 | ||
109 | #define RPC_CONGESTED(clnt) (RPCXPRT_CONGESTED((clnt)->cl_xprt)) | ||
110 | #define RPC_PEERADDR(clnt) (&(clnt)->cl_xprt->addr) | ||
111 | |||
112 | #ifdef __KERNEL__ | 92 | #ifdef __KERNEL__ |
113 | 93 | ||
114 | struct rpc_clnt *rpc_create_client(struct rpc_xprt *xprt, char *servname, | 94 | struct rpc_create_args { |
115 | struct rpc_program *info, | 95 | int protocol; |
116 | u32 version, rpc_authflavor_t authflavor); | 96 | struct sockaddr *address; |
117 | struct rpc_clnt *rpc_new_client(struct rpc_xprt *xprt, char *servname, | 97 | size_t addrsize; |
118 | struct rpc_program *info, | 98 | struct rpc_timeout *timeout; |
119 | u32 version, rpc_authflavor_t authflavor); | 99 | char *servername; |
100 | struct rpc_program *program; | ||
101 | u32 version; | ||
102 | rpc_authflavor_t authflavor; | ||
103 | unsigned long flags; | ||
104 | }; | ||
105 | |||
106 | /* Values for "flags" field */ | ||
107 | #define RPC_CLNT_CREATE_HARDRTRY (1UL << 0) | ||
108 | #define RPC_CLNT_CREATE_INTR (1UL << 1) | ||
109 | #define RPC_CLNT_CREATE_AUTOBIND (1UL << 2) | ||
110 | #define RPC_CLNT_CREATE_ONESHOT (1UL << 3) | ||
111 | #define RPC_CLNT_CREATE_NONPRIVPORT (1UL << 4) | ||
112 | #define RPC_CLNT_CREATE_NOPING (1UL << 5) | ||
113 | |||
114 | struct rpc_clnt *rpc_create(struct rpc_create_args *args); | ||
120 | struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *, | 115 | struct rpc_clnt *rpc_bind_new_program(struct rpc_clnt *, |
121 | struct rpc_program *, int); | 116 | struct rpc_program *, int); |
122 | struct rpc_clnt *rpc_clone_client(struct rpc_clnt *); | 117 | struct rpc_clnt *rpc_clone_client(struct rpc_clnt *); |
123 | int rpc_shutdown_client(struct rpc_clnt *); | 118 | int rpc_shutdown_client(struct rpc_clnt *); |
124 | int rpc_destroy_client(struct rpc_clnt *); | 119 | int rpc_destroy_client(struct rpc_clnt *); |
125 | void rpc_release_client(struct rpc_clnt *); | 120 | void rpc_release_client(struct rpc_clnt *); |
126 | void rpc_getport(struct rpc_task *, struct rpc_clnt *); | 121 | void rpc_getport(struct rpc_task *); |
127 | int rpc_register(u32, u32, int, unsigned short, int *); | 122 | int rpc_register(u32, u32, int, unsigned short, int *); |
128 | 123 | ||
129 | void rpc_call_setup(struct rpc_task *, struct rpc_message *, int); | 124 | void rpc_call_setup(struct rpc_task *, struct rpc_message *, int); |
@@ -140,6 +135,8 @@ void rpc_setbufsize(struct rpc_clnt *, unsigned int, unsigned int); | |||
140 | size_t rpc_max_payload(struct rpc_clnt *); | 135 | size_t rpc_max_payload(struct rpc_clnt *); |
141 | void rpc_force_rebind(struct rpc_clnt *); | 136 | void rpc_force_rebind(struct rpc_clnt *); |
142 | int rpc_ping(struct rpc_clnt *clnt, int flags); | 137 | int rpc_ping(struct rpc_clnt *clnt, int flags); |
138 | size_t rpc_peeraddr(struct rpc_clnt *, struct sockaddr *, size_t); | ||
139 | char * rpc_peeraddr2str(struct rpc_clnt *, enum rpc_display_format_t); | ||
143 | 140 | ||
144 | /* | 141 | /* |
145 | * Helper function for NFSroot support | 142 | * Helper function for NFSroot support |
diff --git a/include/linux/sunrpc/gss_krb5.h b/include/linux/sunrpc/gss_krb5.h index 1279280d7196..e30ba201910a 100644 --- a/include/linux/sunrpc/gss_krb5.h +++ b/include/linux/sunrpc/gss_krb5.h | |||
@@ -46,8 +46,8 @@ struct krb5_ctx { | |||
46 | unsigned char seed[16]; | 46 | unsigned char seed[16]; |
47 | int signalg; | 47 | int signalg; |
48 | int sealalg; | 48 | int sealalg; |
49 | struct crypto_tfm *enc; | 49 | struct crypto_blkcipher *enc; |
50 | struct crypto_tfm *seq; | 50 | struct crypto_blkcipher *seq; |
51 | s32 endtime; | 51 | s32 endtime; |
52 | u32 seq_send; | 52 | u32 seq_send; |
53 | struct xdr_netobj mech_used; | 53 | struct xdr_netobj mech_used; |
@@ -136,26 +136,27 @@ gss_unwrap_kerberos(struct gss_ctx *ctx_id, int offset, | |||
136 | 136 | ||
137 | 137 | ||
138 | u32 | 138 | u32 |
139 | krb5_encrypt(struct crypto_tfm * key, | 139 | krb5_encrypt(struct crypto_blkcipher *key, |
140 | void *iv, void *in, void *out, int length); | 140 | void *iv, void *in, void *out, int length); |
141 | 141 | ||
142 | u32 | 142 | u32 |
143 | krb5_decrypt(struct crypto_tfm * key, | 143 | krb5_decrypt(struct crypto_blkcipher *key, |
144 | void *iv, void *in, void *out, int length); | 144 | void *iv, void *in, void *out, int length); |
145 | 145 | ||
146 | int | 146 | int |
147 | gss_encrypt_xdr_buf(struct crypto_tfm *tfm, struct xdr_buf *outbuf, int offset, | 147 | gss_encrypt_xdr_buf(struct crypto_blkcipher *tfm, struct xdr_buf *outbuf, |
148 | struct page **pages); | 148 | int offset, struct page **pages); |
149 | 149 | ||
150 | int | 150 | int |
151 | gss_decrypt_xdr_buf(struct crypto_tfm *tfm, struct xdr_buf *inbuf, int offset); | 151 | gss_decrypt_xdr_buf(struct crypto_blkcipher *tfm, struct xdr_buf *inbuf, |
152 | int offset); | ||
152 | 153 | ||
153 | s32 | 154 | s32 |
154 | krb5_make_seq_num(struct crypto_tfm * key, | 155 | krb5_make_seq_num(struct crypto_blkcipher *key, |
155 | int direction, | 156 | int direction, |
156 | s32 seqnum, unsigned char *cksum, unsigned char *buf); | 157 | s32 seqnum, unsigned char *cksum, unsigned char *buf); |
157 | 158 | ||
158 | s32 | 159 | s32 |
159 | krb5_get_seq_num(struct crypto_tfm * key, | 160 | krb5_get_seq_num(struct crypto_blkcipher *key, |
160 | unsigned char *cksum, | 161 | unsigned char *cksum, |
161 | unsigned char *buf, int *direction, s32 * seqnum); | 162 | unsigned char *buf, int *direction, s32 * seqnum); |
diff --git a/include/linux/sunrpc/gss_spkm3.h b/include/linux/sunrpc/gss_spkm3.h index 336e218c2782..2cf3fbb40b4f 100644 --- a/include/linux/sunrpc/gss_spkm3.h +++ b/include/linux/sunrpc/gss_spkm3.h | |||
@@ -19,9 +19,9 @@ struct spkm3_ctx { | |||
19 | unsigned int req_flags ; | 19 | unsigned int req_flags ; |
20 | struct xdr_netobj share_key; | 20 | struct xdr_netobj share_key; |
21 | int conf_alg; | 21 | int conf_alg; |
22 | struct crypto_tfm* derived_conf_key; | 22 | struct crypto_blkcipher *derived_conf_key; |
23 | int intg_alg; | 23 | int intg_alg; |
24 | struct crypto_tfm* derived_integ_key; | 24 | struct crypto_blkcipher *derived_integ_key; |
25 | int keyestb_alg; /* alg used to get share_key */ | 25 | int keyestb_alg; /* alg used to get share_key */ |
26 | int owf_alg; /* one way function */ | 26 | int owf_alg; /* one way function */ |
27 | }; | 27 | }; |
diff --git a/include/linux/sunrpc/rpc_pipe_fs.h b/include/linux/sunrpc/rpc_pipe_fs.h index a481472c9484..a2eb9b4a9de3 100644 --- a/include/linux/sunrpc/rpc_pipe_fs.h +++ b/include/linux/sunrpc/rpc_pipe_fs.h | |||
@@ -43,7 +43,7 @@ extern int rpc_queue_upcall(struct inode *, struct rpc_pipe_msg *); | |||
43 | 43 | ||
44 | extern struct dentry *rpc_mkdir(char *, struct rpc_clnt *); | 44 | extern struct dentry *rpc_mkdir(char *, struct rpc_clnt *); |
45 | extern int rpc_rmdir(struct dentry *); | 45 | extern int rpc_rmdir(struct dentry *); |
46 | extern struct dentry *rpc_mkpipe(char *, void *, struct rpc_pipe_ops *, int flags); | 46 | extern struct dentry *rpc_mkpipe(struct dentry *, const char *, void *, struct rpc_pipe_ops *, int flags); |
47 | extern int rpc_unlink(struct dentry *); | 47 | extern int rpc_unlink(struct dentry *); |
48 | extern struct vfsmount *rpc_get_mount(void); | 48 | extern struct vfsmount *rpc_get_mount(void); |
49 | extern void rpc_put_mount(void); | 49 | extern void rpc_put_mount(void); |
diff --git a/include/linux/sunrpc/sched.h b/include/linux/sunrpc/sched.h index 82a91bb22362..f399c138f79d 100644 --- a/include/linux/sunrpc/sched.h +++ b/include/linux/sunrpc/sched.h | |||
@@ -127,7 +127,6 @@ struct rpc_call_ops { | |||
127 | */ | 127 | */ |
128 | #define RPC_TASK_ASYNC 0x0001 /* is an async task */ | 128 | #define RPC_TASK_ASYNC 0x0001 /* is an async task */ |
129 | #define RPC_TASK_SWAPPER 0x0002 /* is swapping in/out */ | 129 | #define RPC_TASK_SWAPPER 0x0002 /* is swapping in/out */ |
130 | #define RPC_TASK_CHILD 0x0008 /* is child of other task */ | ||
131 | #define RPC_CALL_MAJORSEEN 0x0020 /* major timeout seen */ | 130 | #define RPC_CALL_MAJORSEEN 0x0020 /* major timeout seen */ |
132 | #define RPC_TASK_ROOTCREDS 0x0040 /* force root creds */ | 131 | #define RPC_TASK_ROOTCREDS 0x0040 /* force root creds */ |
133 | #define RPC_TASK_DYNAMIC 0x0080 /* task was kmalloc'ed */ | 132 | #define RPC_TASK_DYNAMIC 0x0080 /* task was kmalloc'ed */ |
@@ -136,7 +135,6 @@ struct rpc_call_ops { | |||
136 | #define RPC_TASK_NOINTR 0x0400 /* uninterruptible task */ | 135 | #define RPC_TASK_NOINTR 0x0400 /* uninterruptible task */ |
137 | 136 | ||
138 | #define RPC_IS_ASYNC(t) ((t)->tk_flags & RPC_TASK_ASYNC) | 137 | #define RPC_IS_ASYNC(t) ((t)->tk_flags & RPC_TASK_ASYNC) |
139 | #define RPC_IS_CHILD(t) ((t)->tk_flags & RPC_TASK_CHILD) | ||
140 | #define RPC_IS_SWAPPER(t) ((t)->tk_flags & RPC_TASK_SWAPPER) | 138 | #define RPC_IS_SWAPPER(t) ((t)->tk_flags & RPC_TASK_SWAPPER) |
141 | #define RPC_DO_ROOTOVERRIDE(t) ((t)->tk_flags & RPC_TASK_ROOTCREDS) | 139 | #define RPC_DO_ROOTOVERRIDE(t) ((t)->tk_flags & RPC_TASK_ROOTCREDS) |
142 | #define RPC_ASSASSINATED(t) ((t)->tk_flags & RPC_TASK_KILLED) | 140 | #define RPC_ASSASSINATED(t) ((t)->tk_flags & RPC_TASK_KILLED) |
@@ -253,7 +251,6 @@ struct rpc_task *rpc_new_task(struct rpc_clnt *, int flags, | |||
253 | const struct rpc_call_ops *ops, void *data); | 251 | const struct rpc_call_ops *ops, void *data); |
254 | struct rpc_task *rpc_run_task(struct rpc_clnt *clnt, int flags, | 252 | struct rpc_task *rpc_run_task(struct rpc_clnt *clnt, int flags, |
255 | const struct rpc_call_ops *ops, void *data); | 253 | const struct rpc_call_ops *ops, void *data); |
256 | struct rpc_task *rpc_new_child(struct rpc_clnt *, struct rpc_task *parent); | ||
257 | void rpc_init_task(struct rpc_task *task, struct rpc_clnt *clnt, | 254 | void rpc_init_task(struct rpc_task *task, struct rpc_clnt *clnt, |
258 | int flags, const struct rpc_call_ops *ops, | 255 | int flags, const struct rpc_call_ops *ops, |
259 | void *data); | 256 | void *data); |
@@ -261,8 +258,6 @@ void rpc_release_task(struct rpc_task *); | |||
261 | void rpc_exit_task(struct rpc_task *); | 258 | void rpc_exit_task(struct rpc_task *); |
262 | void rpc_killall_tasks(struct rpc_clnt *); | 259 | void rpc_killall_tasks(struct rpc_clnt *); |
263 | int rpc_execute(struct rpc_task *); | 260 | int rpc_execute(struct rpc_task *); |
264 | void rpc_run_child(struct rpc_task *parent, struct rpc_task *child, | ||
265 | rpc_action action); | ||
266 | void rpc_init_priority_wait_queue(struct rpc_wait_queue *, const char *); | 261 | void rpc_init_priority_wait_queue(struct rpc_wait_queue *, const char *); |
267 | void rpc_init_wait_queue(struct rpc_wait_queue *, const char *); | 262 | void rpc_init_wait_queue(struct rpc_wait_queue *, const char *); |
268 | void rpc_sleep_on(struct rpc_wait_queue *, struct rpc_task *, | 263 | void rpc_sleep_on(struct rpc_wait_queue *, struct rpc_task *, |
diff --git a/include/linux/sunrpc/xprt.h b/include/linux/sunrpc/xprt.h index 3a0cca255b76..bdeba8538c71 100644 --- a/include/linux/sunrpc/xprt.h +++ b/include/linux/sunrpc/xprt.h | |||
@@ -12,6 +12,7 @@ | |||
12 | #include <linux/uio.h> | 12 | #include <linux/uio.h> |
13 | #include <linux/socket.h> | 13 | #include <linux/socket.h> |
14 | #include <linux/in.h> | 14 | #include <linux/in.h> |
15 | #include <linux/kref.h> | ||
15 | #include <linux/sunrpc/sched.h> | 16 | #include <linux/sunrpc/sched.h> |
16 | #include <linux/sunrpc/xdr.h> | 17 | #include <linux/sunrpc/xdr.h> |
17 | 18 | ||
@@ -51,6 +52,14 @@ struct rpc_timeout { | |||
51 | unsigned char to_exponential; | 52 | unsigned char to_exponential; |
52 | }; | 53 | }; |
53 | 54 | ||
55 | enum rpc_display_format_t { | ||
56 | RPC_DISPLAY_ADDR = 0, | ||
57 | RPC_DISPLAY_PORT, | ||
58 | RPC_DISPLAY_PROTO, | ||
59 | RPC_DISPLAY_ALL, | ||
60 | RPC_DISPLAY_MAX, | ||
61 | }; | ||
62 | |||
54 | struct rpc_task; | 63 | struct rpc_task; |
55 | struct rpc_xprt; | 64 | struct rpc_xprt; |
56 | struct seq_file; | 65 | struct seq_file; |
@@ -103,8 +112,10 @@ struct rpc_rqst { | |||
103 | 112 | ||
104 | struct rpc_xprt_ops { | 113 | struct rpc_xprt_ops { |
105 | void (*set_buffer_size)(struct rpc_xprt *xprt, size_t sndsize, size_t rcvsize); | 114 | void (*set_buffer_size)(struct rpc_xprt *xprt, size_t sndsize, size_t rcvsize); |
115 | char * (*print_addr)(struct rpc_xprt *xprt, enum rpc_display_format_t format); | ||
106 | int (*reserve_xprt)(struct rpc_task *task); | 116 | int (*reserve_xprt)(struct rpc_task *task); |
107 | void (*release_xprt)(struct rpc_xprt *xprt, struct rpc_task *task); | 117 | void (*release_xprt)(struct rpc_xprt *xprt, struct rpc_task *task); |
118 | void (*rpcbind)(struct rpc_task *task); | ||
108 | void (*set_port)(struct rpc_xprt *xprt, unsigned short port); | 119 | void (*set_port)(struct rpc_xprt *xprt, unsigned short port); |
109 | void (*connect)(struct rpc_task *task); | 120 | void (*connect)(struct rpc_task *task); |
110 | void * (*buf_alloc)(struct rpc_task *task, size_t size); | 121 | void * (*buf_alloc)(struct rpc_task *task, size_t size); |
@@ -119,12 +130,14 @@ struct rpc_xprt_ops { | |||
119 | }; | 130 | }; |
120 | 131 | ||
121 | struct rpc_xprt { | 132 | struct rpc_xprt { |
133 | struct kref kref; /* Reference count */ | ||
122 | struct rpc_xprt_ops * ops; /* transport methods */ | 134 | struct rpc_xprt_ops * ops; /* transport methods */ |
123 | struct socket * sock; /* BSD socket layer */ | 135 | struct socket * sock; /* BSD socket layer */ |
124 | struct sock * inet; /* INET layer */ | 136 | struct sock * inet; /* INET layer */ |
125 | 137 | ||
126 | struct rpc_timeout timeout; /* timeout parms */ | 138 | struct rpc_timeout timeout; /* timeout parms */ |
127 | struct sockaddr_in addr; /* server address */ | 139 | struct sockaddr_storage addr; /* server address */ |
140 | size_t addrlen; /* size of server address */ | ||
128 | int prot; /* IP protocol */ | 141 | int prot; /* IP protocol */ |
129 | 142 | ||
130 | unsigned long cong; /* current congestion */ | 143 | unsigned long cong; /* current congestion */ |
@@ -138,6 +151,7 @@ struct rpc_xprt { | |||
138 | unsigned int tsh_size; /* size of transport specific | 151 | unsigned int tsh_size; /* size of transport specific |
139 | header */ | 152 | header */ |
140 | 153 | ||
154 | struct rpc_wait_queue binding; /* requests waiting on rpcbind */ | ||
141 | struct rpc_wait_queue sending; /* requests waiting to send */ | 155 | struct rpc_wait_queue sending; /* requests waiting to send */ |
142 | struct rpc_wait_queue resend; /* requests waiting to resend */ | 156 | struct rpc_wait_queue resend; /* requests waiting to resend */ |
143 | struct rpc_wait_queue pending; /* requests in flight */ | 157 | struct rpc_wait_queue pending; /* requests in flight */ |
@@ -205,6 +219,8 @@ struct rpc_xprt { | |||
205 | void (*old_data_ready)(struct sock *, int); | 219 | void (*old_data_ready)(struct sock *, int); |
206 | void (*old_state_change)(struct sock *); | 220 | void (*old_state_change)(struct sock *); |
207 | void (*old_write_space)(struct sock *); | 221 | void (*old_write_space)(struct sock *); |
222 | |||
223 | char * address_strings[RPC_DISPLAY_MAX]; | ||
208 | }; | 224 | }; |
209 | 225 | ||
210 | #define XPRT_LAST_FRAG (1 << 0) | 226 | #define XPRT_LAST_FRAG (1 << 0) |
@@ -217,12 +233,12 @@ struct rpc_xprt { | |||
217 | /* | 233 | /* |
218 | * Transport operations used by ULPs | 234 | * Transport operations used by ULPs |
219 | */ | 235 | */ |
220 | struct rpc_xprt * xprt_create_proto(int proto, struct sockaddr_in *addr, struct rpc_timeout *to); | ||
221 | void xprt_set_timeout(struct rpc_timeout *to, unsigned int retr, unsigned long incr); | 236 | void xprt_set_timeout(struct rpc_timeout *to, unsigned int retr, unsigned long incr); |
222 | 237 | ||
223 | /* | 238 | /* |
224 | * Generic internal transport functions | 239 | * Generic internal transport functions |
225 | */ | 240 | */ |
241 | struct rpc_xprt * xprt_create_transport(int proto, struct sockaddr *addr, size_t size, struct rpc_timeout *toparms); | ||
226 | void xprt_connect(struct rpc_task *task); | 242 | void xprt_connect(struct rpc_task *task); |
227 | void xprt_reserve(struct rpc_task *task); | 243 | void xprt_reserve(struct rpc_task *task); |
228 | int xprt_reserve_xprt(struct rpc_task *task); | 244 | int xprt_reserve_xprt(struct rpc_task *task); |
@@ -234,7 +250,8 @@ int xprt_adjust_timeout(struct rpc_rqst *req); | |||
234 | void xprt_release_xprt(struct rpc_xprt *xprt, struct rpc_task *task); | 250 | void xprt_release_xprt(struct rpc_xprt *xprt, struct rpc_task *task); |
235 | void xprt_release_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task); | 251 | void xprt_release_xprt_cong(struct rpc_xprt *xprt, struct rpc_task *task); |
236 | void xprt_release(struct rpc_task *task); | 252 | void xprt_release(struct rpc_task *task); |
237 | int xprt_destroy(struct rpc_xprt *xprt); | 253 | struct rpc_xprt * xprt_get(struct rpc_xprt *xprt); |
254 | void xprt_put(struct rpc_xprt *xprt); | ||
238 | 255 | ||
239 | static inline u32 *xprt_skip_transport_header(struct rpc_xprt *xprt, u32 *p) | 256 | static inline u32 *xprt_skip_transport_header(struct rpc_xprt *xprt, u32 *p) |
240 | { | 257 | { |
@@ -269,6 +286,8 @@ int xs_setup_tcp(struct rpc_xprt *xprt, struct rpc_timeout *to); | |||
269 | #define XPRT_CONNECTED (1) | 286 | #define XPRT_CONNECTED (1) |
270 | #define XPRT_CONNECTING (2) | 287 | #define XPRT_CONNECTING (2) |
271 | #define XPRT_CLOSE_WAIT (3) | 288 | #define XPRT_CLOSE_WAIT (3) |
289 | #define XPRT_BOUND (4) | ||
290 | #define XPRT_BINDING (5) | ||
272 | 291 | ||
273 | static inline void xprt_set_connected(struct rpc_xprt *xprt) | 292 | static inline void xprt_set_connected(struct rpc_xprt *xprt) |
274 | { | 293 | { |
@@ -312,6 +331,33 @@ static inline int xprt_test_and_set_connecting(struct rpc_xprt *xprt) | |||
312 | return test_and_set_bit(XPRT_CONNECTING, &xprt->state); | 331 | return test_and_set_bit(XPRT_CONNECTING, &xprt->state); |
313 | } | 332 | } |
314 | 333 | ||
334 | static inline void xprt_set_bound(struct rpc_xprt *xprt) | ||
335 | { | ||
336 | test_and_set_bit(XPRT_BOUND, &xprt->state); | ||
337 | } | ||
338 | |||
339 | static inline int xprt_bound(struct rpc_xprt *xprt) | ||
340 | { | ||
341 | return test_bit(XPRT_BOUND, &xprt->state); | ||
342 | } | ||
343 | |||
344 | static inline void xprt_clear_bound(struct rpc_xprt *xprt) | ||
345 | { | ||
346 | clear_bit(XPRT_BOUND, &xprt->state); | ||
347 | } | ||
348 | |||
349 | static inline void xprt_clear_binding(struct rpc_xprt *xprt) | ||
350 | { | ||
351 | smp_mb__before_clear_bit(); | ||
352 | clear_bit(XPRT_BINDING, &xprt->state); | ||
353 | smp_mb__after_clear_bit(); | ||
354 | } | ||
355 | |||
356 | static inline int xprt_test_and_set_binding(struct rpc_xprt *xprt) | ||
357 | { | ||
358 | return test_and_set_bit(XPRT_BINDING, &xprt->state); | ||
359 | } | ||
360 | |||
315 | #endif /* __KERNEL__*/ | 361 | #endif /* __KERNEL__*/ |
316 | 362 | ||
317 | #endif /* _LINUX_SUNRPC_XPRT_H */ | 363 | #endif /* _LINUX_SUNRPC_XPRT_H */ |