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.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h
index 35cf2e8cd7c6..498ab93a81e4 100644
--- a/include/linux/sunrpc/xdr.h
+++ b/include/linux/sunrpc/xdr.h
@@ -108,6 +108,7 @@ void xdr_encode_pages(struct xdr_buf *, struct page **, unsigned int,
108 unsigned int); 108 unsigned int);
109void xdr_inline_pages(struct xdr_buf *, unsigned int, 109void xdr_inline_pages(struct xdr_buf *, unsigned int,
110 struct page **, unsigned int, unsigned int); 110 struct page **, unsigned int, unsigned int);
111void xdr_terminate_string(struct xdr_buf *, const u32);
111 112
112static inline __be32 *xdr_encode_array(__be32 *p, const void *s, unsigned int len) 113static inline __be32 *xdr_encode_array(__be32 *p, const void *s, unsigned int len)
113{ 114{
@@ -131,6 +132,13 @@ xdr_decode_hyper(__be32 *p, __u64 *valp)
131 return p + 2; 132 return p + 2;
132} 133}
133 134
135static inline __be32 *
136xdr_decode_opaque_fixed(__be32 *p, void *ptr, unsigned int len)
137{
138 memcpy(ptr, p, len);
139 return p + XDR_QUADLEN(len);
140}
141
134/* 142/*
135 * Adjust kvec to reflect end of xdr'ed data (RPC client XDR) 143 * Adjust kvec to reflect end of xdr'ed data (RPC client XDR)
136 */ 144 */
@@ -200,6 +208,7 @@ extern __be32 *xdr_reserve_space(struct xdr_stream *xdr, size_t nbytes);
200extern void xdr_write_pages(struct xdr_stream *xdr, struct page **pages, 208extern void xdr_write_pages(struct xdr_stream *xdr, struct page **pages,
201 unsigned int base, unsigned int len); 209 unsigned int base, unsigned int len);
202extern void xdr_init_decode(struct xdr_stream *xdr, struct xdr_buf *buf, __be32 *p); 210extern 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);
203extern __be32 *xdr_inline_decode(struct xdr_stream *xdr, size_t nbytes); 212extern __be32 *xdr_inline_decode(struct xdr_stream *xdr, size_t nbytes);
204extern void xdr_read_pages(struct xdr_stream *xdr, unsigned int len); 213extern void xdr_read_pages(struct xdr_stream *xdr, unsigned int len);
205extern void xdr_enter_page(struct xdr_stream *xdr, unsigned int len); 214extern void xdr_enter_page(struct xdr_stream *xdr, unsigned int len);