diff options
Diffstat (limited to 'include/linux/sunrpc/xdr.h')
-rw-r--r-- | include/linux/sunrpc/xdr.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h index 498ab93a81e4..fc84b7a19ca3 100644 --- a/include/linux/sunrpc/xdr.h +++ b/include/linux/sunrpc/xdr.h | |||
@@ -33,8 +33,8 @@ struct xdr_netobj { | |||
33 | }; | 33 | }; |
34 | 34 | ||
35 | /* | 35 | /* |
36 | * This is the generic XDR function. rqstp is either a rpc_rqst (client | 36 | * This is the legacy generic XDR function. rqstp is either a rpc_rqst |
37 | * side) or svc_rqst pointer (server side). | 37 | * (client side) or svc_rqst pointer (server side). |
38 | * Encode functions always assume there's enough room in the buffer. | 38 | * Encode functions always assume there's enough room in the buffer. |
39 | */ | 39 | */ |
40 | typedef int (*kxdrproc_t)(void *rqstp, __be32 *data, void *obj); | 40 | typedef int (*kxdrproc_t)(void *rqstp, __be32 *data, void *obj); |
@@ -201,14 +201,22 @@ struct xdr_stream { | |||
201 | 201 | ||
202 | __be32 *end; /* end of available buffer space */ | 202 | __be32 *end; /* end of available buffer space */ |
203 | struct kvec *iov; /* pointer to the current kvec */ | 203 | struct kvec *iov; /* pointer to the current kvec */ |
204 | struct kvec scratch; /* Scratch buffer */ | ||
205 | struct page **page_ptr; /* pointer to the current page */ | ||
204 | }; | 206 | }; |
205 | 207 | ||
208 | /* | ||
209 | * These are the xdr_stream style generic XDR encode and decode functions. | ||
210 | */ | ||
211 | typedef void (*kxdreproc_t)(void *rqstp, struct xdr_stream *xdr, void *obj); | ||
212 | typedef int (*kxdrdproc_t)(void *rqstp, struct xdr_stream *xdr, void *obj); | ||
213 | |||
206 | extern void xdr_init_encode(struct xdr_stream *xdr, struct xdr_buf *buf, __be32 *p); | 214 | extern void xdr_init_encode(struct xdr_stream *xdr, struct xdr_buf *buf, __be32 *p); |
207 | extern __be32 *xdr_reserve_space(struct xdr_stream *xdr, size_t nbytes); | 215 | extern __be32 *xdr_reserve_space(struct xdr_stream *xdr, size_t nbytes); |
208 | extern void xdr_write_pages(struct xdr_stream *xdr, struct page **pages, | 216 | extern void xdr_write_pages(struct xdr_stream *xdr, struct page **pages, |
209 | unsigned int base, unsigned int len); | 217 | unsigned int base, unsigned int len); |
210 | extern void xdr_init_decode(struct xdr_stream *xdr, struct xdr_buf *buf, __be32 *p); | 218 | extern void xdr_init_decode(struct xdr_stream *xdr, struct xdr_buf *buf, __be32 *p); |
211 | extern __be32 *xdr_inline_peek(struct xdr_stream *xdr, size_t nbytes); | 219 | extern void xdr_set_scratch_buffer(struct xdr_stream *xdr, void *buf, size_t buflen); |
212 | extern __be32 *xdr_inline_decode(struct xdr_stream *xdr, size_t nbytes); | 220 | extern __be32 *xdr_inline_decode(struct xdr_stream *xdr, size_t nbytes); |
213 | extern void xdr_read_pages(struct xdr_stream *xdr, unsigned int len); | 221 | extern void xdr_read_pages(struct xdr_stream *xdr, unsigned int len); |
214 | extern void xdr_enter_page(struct xdr_stream *xdr, unsigned int len); | 222 | extern void xdr_enter_page(struct xdr_stream *xdr, unsigned int len); |