diff options
Diffstat (limited to 'include/linux/sunrpc/xdr.h')
-rw-r--r-- | include/linux/sunrpc/xdr.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/include/linux/sunrpc/xdr.h b/include/linux/sunrpc/xdr.h index 5d1eed2b58a1..34ec3e8d99b3 100644 --- a/include/linux/sunrpc/xdr.h +++ b/include/linux/sunrpc/xdr.h | |||
@@ -146,7 +146,8 @@ extern void xdr_shift_buf(struct xdr_buf *, size_t); | |||
146 | extern void xdr_buf_from_iov(struct kvec *, struct xdr_buf *); | 146 | extern void xdr_buf_from_iov(struct kvec *, struct xdr_buf *); |
147 | extern int xdr_buf_subsegment(struct xdr_buf *, struct xdr_buf *, int, int); | 147 | extern int xdr_buf_subsegment(struct xdr_buf *, struct xdr_buf *, int, int); |
148 | extern int xdr_buf_read_netobj(struct xdr_buf *, struct xdr_netobj *, int); | 148 | extern int xdr_buf_read_netobj(struct xdr_buf *, struct xdr_netobj *, int); |
149 | extern int read_bytes_from_xdr_buf(struct xdr_buf *buf, int base, void *obj, int len); | 149 | extern int read_bytes_from_xdr_buf(struct xdr_buf *, int, void *, int); |
150 | extern int write_bytes_to_xdr_buf(struct xdr_buf *, int, void *, int); | ||
150 | 151 | ||
151 | /* | 152 | /* |
152 | * Helper structure for copying from an sk_buff. | 153 | * Helper structure for copying from an sk_buff. |
@@ -168,6 +169,22 @@ struct sockaddr; | |||
168 | extern int xdr_sendpages(struct socket *, struct sockaddr *, int, | 169 | extern int xdr_sendpages(struct socket *, struct sockaddr *, int, |
169 | struct xdr_buf *, unsigned int, int); | 170 | struct xdr_buf *, unsigned int, int); |
170 | 171 | ||
172 | extern int xdr_encode_word(struct xdr_buf *, int, u32); | ||
173 | extern int xdr_decode_word(struct xdr_buf *, int, u32 *); | ||
174 | |||
175 | struct xdr_array2_desc; | ||
176 | typedef int (*xdr_xcode_elem_t)(struct xdr_array2_desc *desc, void *elem); | ||
177 | struct xdr_array2_desc { | ||
178 | unsigned int elem_size; | ||
179 | unsigned int array_len; | ||
180 | xdr_xcode_elem_t xcode; | ||
181 | }; | ||
182 | |||
183 | extern int xdr_decode_array2(struct xdr_buf *buf, unsigned int base, | ||
184 | struct xdr_array2_desc *desc); | ||
185 | extern int xdr_encode_array2(struct xdr_buf *buf, unsigned int base, | ||
186 | struct xdr_array2_desc *desc); | ||
187 | |||
171 | /* | 188 | /* |
172 | * Provide some simple tools for XDR buffer overflow-checking etc. | 189 | * Provide some simple tools for XDR buffer overflow-checking etc. |
173 | */ | 190 | */ |