aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sunrpc/xdr.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/sunrpc/xdr.h')
-rw-r--r--include/linux/sunrpc/xdr.h14
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 */
40typedef int (*kxdrproc_t)(void *rqstp, __be32 *data, void *obj); 40typedef 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 */
211typedef void (*kxdreproc_t)(void *rqstp, struct xdr_stream *xdr, void *obj);
212typedef int (*kxdrdproc_t)(void *rqstp, struct xdr_stream *xdr, void *obj);
213
206extern void xdr_init_encode(struct xdr_stream *xdr, struct xdr_buf *buf, __be32 *p); 214extern void xdr_init_encode(struct xdr_stream *xdr, struct xdr_buf *buf, __be32 *p);
207extern __be32 *xdr_reserve_space(struct xdr_stream *xdr, size_t nbytes); 215extern __be32 *xdr_reserve_space(struct xdr_stream *xdr, size_t nbytes);
208extern void xdr_write_pages(struct xdr_stream *xdr, struct page **pages, 216extern 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);
210extern void xdr_init_decode(struct xdr_stream *xdr, struct xdr_buf *buf, __be32 *p); 218extern void xdr_init_decode(struct xdr_stream *xdr, struct xdr_buf *buf, __be32 *p);
211extern __be32 *xdr_inline_peek(struct xdr_stream *xdr, size_t nbytes); 219extern void xdr_set_scratch_buffer(struct xdr_stream *xdr, void *buf, size_t buflen);
212extern __be32 *xdr_inline_decode(struct xdr_stream *xdr, size_t nbytes); 220extern __be32 *xdr_inline_decode(struct xdr_stream *xdr, size_t nbytes);
213extern void xdr_read_pages(struct xdr_stream *xdr, unsigned int len); 221extern void xdr_read_pages(struct xdr_stream *xdr, unsigned int len);
214extern void xdr_enter_page(struct xdr_stream *xdr, unsigned int len); 222extern void xdr_enter_page(struct xdr_stream *xdr, unsigned int len);