Lines Matching refs:xdr

80 static void print_overflow_msg(const char *func, const struct xdr_stream *xdr)  in print_overflow_msg()  argument
84 func, xdr->end - xdr->p); in print_overflow_msg()
100 static void encode_bool(struct xdr_stream *xdr, const int value) in encode_bool() argument
104 p = xdr_reserve_space(xdr, 4); in encode_bool()
108 static void encode_int32(struct xdr_stream *xdr, const s32 value) in encode_int32() argument
112 p = xdr_reserve_space(xdr, 4); in encode_int32()
119 static void encode_netobj(struct xdr_stream *xdr, in encode_netobj() argument
124 p = xdr_reserve_space(xdr, 4 + length); in encode_netobj()
128 static int decode_netobj(struct xdr_stream *xdr, in decode_netobj() argument
134 p = xdr_inline_decode(xdr, 4); in decode_netobj()
147 print_overflow_msg(__func__, xdr); in decode_netobj()
154 static void encode_cookie(struct xdr_stream *xdr, in encode_cookie() argument
157 encode_netobj(xdr, (u8 *)&cookie->data, cookie->len); in encode_cookie()
160 static int decode_cookie(struct xdr_stream *xdr, in decode_cookie() argument
166 p = xdr_inline_decode(xdr, 4); in decode_cookie()
175 p = xdr_inline_decode(xdr, length); in decode_cookie()
189 print_overflow_msg(__func__, xdr); in decode_cookie()
196 static void encode_fh(struct xdr_stream *xdr, const struct nfs_fh *fh) in encode_fh() argument
198 encode_netobj(xdr, (u8 *)&fh->data, fh->size); in encode_fh()
223 static void encode_nlm4_stat(struct xdr_stream *xdr, in encode_nlm4_stat() argument
229 p = xdr_reserve_space(xdr, 4); in encode_nlm4_stat()
233 static int decode_nlm4_stat(struct xdr_stream *xdr, __be32 *stat) in decode_nlm4_stat() argument
237 p = xdr_inline_decode(xdr, 4); in decode_nlm4_stat()
249 print_overflow_msg(__func__, xdr); in decode_nlm4_stat()
262 static void encode_nlm4_holder(struct xdr_stream *xdr, in encode_nlm4_holder() argument
269 encode_bool(xdr, lock->fl.fl_type == F_RDLCK); in encode_nlm4_holder()
270 encode_int32(xdr, lock->svid); in encode_nlm4_holder()
271 encode_netobj(xdr, lock->oh.data, lock->oh.len); in encode_nlm4_holder()
273 p = xdr_reserve_space(xdr, 4 + 4); in encode_nlm4_holder()
279 static int decode_nlm4_holder(struct xdr_stream *xdr, struct nlm_res *result) in decode_nlm4_holder() argument
292 p = xdr_inline_decode(xdr, 4 + 4); in decode_nlm4_holder()
299 error = decode_netobj(xdr, &lock->oh); in decode_nlm4_holder()
303 p = xdr_inline_decode(xdr, 8 + 8); in decode_nlm4_holder()
322 print_overflow_msg(__func__, xdr); in decode_nlm4_holder()
329 static void encode_caller_name(struct xdr_stream *xdr, const char *name) in encode_caller_name() argument
335 p = xdr_reserve_space(xdr, 4 + length); in encode_caller_name()
349 static void encode_nlm4_lock(struct xdr_stream *xdr, in encode_nlm4_lock() argument
355 encode_caller_name(xdr, lock->caller); in encode_nlm4_lock()
356 encode_fh(xdr, &lock->fh); in encode_nlm4_lock()
357 encode_netobj(xdr, lock->oh.data, lock->oh.len); in encode_nlm4_lock()
359 p = xdr_reserve_space(xdr, 4 + 8 + 8); in encode_nlm4_lock()
384 struct xdr_stream *xdr, in nlm4_xdr_enc_testargs() argument
390 encode_cookie(xdr, &args->cookie); in nlm4_xdr_enc_testargs()
391 encode_bool(xdr, lock->fl.fl_type == F_WRLCK); in nlm4_xdr_enc_testargs()
392 encode_nlm4_lock(xdr, lock); in nlm4_xdr_enc_testargs()
406 struct xdr_stream *xdr, in nlm4_xdr_enc_lockargs() argument
412 encode_cookie(xdr, &args->cookie); in nlm4_xdr_enc_lockargs()
413 encode_bool(xdr, args->block); in nlm4_xdr_enc_lockargs()
414 encode_bool(xdr, lock->fl.fl_type == F_WRLCK); in nlm4_xdr_enc_lockargs()
415 encode_nlm4_lock(xdr, lock); in nlm4_xdr_enc_lockargs()
416 encode_bool(xdr, args->reclaim); in nlm4_xdr_enc_lockargs()
417 encode_int32(xdr, args->state); in nlm4_xdr_enc_lockargs()
429 struct xdr_stream *xdr, in nlm4_xdr_enc_cancargs() argument
435 encode_cookie(xdr, &args->cookie); in nlm4_xdr_enc_cancargs()
436 encode_bool(xdr, args->block); in nlm4_xdr_enc_cancargs()
437 encode_bool(xdr, lock->fl.fl_type == F_WRLCK); in nlm4_xdr_enc_cancargs()
438 encode_nlm4_lock(xdr, lock); in nlm4_xdr_enc_cancargs()
448 struct xdr_stream *xdr, in nlm4_xdr_enc_unlockargs() argument
454 encode_cookie(xdr, &args->cookie); in nlm4_xdr_enc_unlockargs()
455 encode_nlm4_lock(xdr, lock); in nlm4_xdr_enc_unlockargs()
465 struct xdr_stream *xdr, in nlm4_xdr_enc_res() argument
470 encode_cookie(xdr, &result->cookie); in nlm4_xdr_enc_res()
471 encode_nlm4_stat(xdr, result->status); in nlm4_xdr_enc_res()
488 struct xdr_stream *xdr, in nlm4_xdr_enc_testres() argument
493 encode_cookie(xdr, &result->cookie); in nlm4_xdr_enc_testres()
494 encode_nlm4_stat(xdr, result->status); in nlm4_xdr_enc_testres()
496 encode_nlm4_holder(xdr, result); in nlm4_xdr_enc_testres()
521 static int decode_nlm4_testrply(struct xdr_stream *xdr, in decode_nlm4_testrply() argument
526 error = decode_nlm4_stat(xdr, &result->status); in decode_nlm4_testrply()
530 error = decode_nlm4_holder(xdr, result); in decode_nlm4_testrply()
536 struct xdr_stream *xdr, in nlm4_xdr_dec_testres() argument
542 error = decode_cookie(xdr, &result->cookie); in nlm4_xdr_dec_testres()
545 error = decode_nlm4_testrply(xdr, result); in nlm4_xdr_dec_testres()
557 struct xdr_stream *xdr, in nlm4_xdr_dec_res() argument
563 error = decode_cookie(xdr, &result->cookie); in nlm4_xdr_dec_res()
566 error = decode_nlm4_stat(xdr, &result->status); in nlm4_xdr_dec_res()