Lines Matching refs:xdr

89 static void encode_bool(struct xdr_stream *xdr, const int value)  in encode_bool()  argument
93 p = xdr_reserve_space(xdr, 4); in encode_bool()
97 static void encode_int32(struct xdr_stream *xdr, const s32 value) in encode_int32() argument
101 p = xdr_reserve_space(xdr, 4); in encode_int32()
108 static void encode_netobj(struct xdr_stream *xdr, in encode_netobj() argument
113 p = xdr_reserve_space(xdr, 4 + length); in encode_netobj()
117 static int decode_netobj(struct xdr_stream *xdr, in decode_netobj() argument
122 ret = xdr_stream_decode_opaque_inline(xdr, (void *)&obj->data, in decode_netobj()
133 static void encode_cookie(struct xdr_stream *xdr, in encode_cookie() argument
136 encode_netobj(xdr, (u8 *)&cookie->data, cookie->len); in encode_cookie()
139 static int decode_cookie(struct xdr_stream *xdr, in decode_cookie() argument
145 p = xdr_inline_decode(xdr, 4); in decode_cookie()
154 p = xdr_inline_decode(xdr, length); in decode_cookie()
174 static void encode_fh(struct xdr_stream *xdr, const struct nfs_fh *fh) in encode_fh() argument
176 encode_netobj(xdr, (u8 *)&fh->data, fh->size); in encode_fh()
201 static void encode_nlm4_stat(struct xdr_stream *xdr, in encode_nlm4_stat() argument
207 p = xdr_reserve_space(xdr, 4); in encode_nlm4_stat()
211 static int decode_nlm4_stat(struct xdr_stream *xdr, __be32 *stat) in decode_nlm4_stat() argument
215 p = xdr_inline_decode(xdr, 4); in decode_nlm4_stat()
239 static void encode_nlm4_holder(struct xdr_stream *xdr, in encode_nlm4_holder() argument
246 encode_bool(xdr, lock->fl.fl_type == F_RDLCK); in encode_nlm4_holder()
247 encode_int32(xdr, lock->svid); in encode_nlm4_holder()
248 encode_netobj(xdr, lock->oh.data, lock->oh.len); in encode_nlm4_holder()
250 p = xdr_reserve_space(xdr, 4 + 4); in encode_nlm4_holder()
256 static int decode_nlm4_holder(struct xdr_stream *xdr, struct nlm_res *result) in decode_nlm4_holder() argument
269 p = xdr_inline_decode(xdr, 4 + 4); in decode_nlm4_holder()
276 error = decode_netobj(xdr, &lock->oh); in decode_nlm4_holder()
280 p = xdr_inline_decode(xdr, 8 + 8); in decode_nlm4_holder()
305 static void encode_caller_name(struct xdr_stream *xdr, const char *name) in encode_caller_name() argument
311 p = xdr_reserve_space(xdr, 4 + length); in encode_caller_name()
325 static void encode_nlm4_lock(struct xdr_stream *xdr, in encode_nlm4_lock() argument
331 encode_caller_name(xdr, lock->caller); in encode_nlm4_lock()
332 encode_fh(xdr, &lock->fh); in encode_nlm4_lock()
333 encode_netobj(xdr, lock->oh.data, lock->oh.len); in encode_nlm4_lock()
335 p = xdr_reserve_space(xdr, 4 + 8 + 8); in encode_nlm4_lock()
360 struct xdr_stream *xdr, in nlm4_xdr_enc_testargs() argument
366 encode_cookie(xdr, &args->cookie); in nlm4_xdr_enc_testargs()
367 encode_bool(xdr, lock->fl.fl_type == F_WRLCK); in nlm4_xdr_enc_testargs()
368 encode_nlm4_lock(xdr, lock); in nlm4_xdr_enc_testargs()
382 struct xdr_stream *xdr, in nlm4_xdr_enc_lockargs() argument
388 encode_cookie(xdr, &args->cookie); in nlm4_xdr_enc_lockargs()
389 encode_bool(xdr, args->block); in nlm4_xdr_enc_lockargs()
390 encode_bool(xdr, lock->fl.fl_type == F_WRLCK); in nlm4_xdr_enc_lockargs()
391 encode_nlm4_lock(xdr, lock); in nlm4_xdr_enc_lockargs()
392 encode_bool(xdr, args->reclaim); in nlm4_xdr_enc_lockargs()
393 encode_int32(xdr, args->state); in nlm4_xdr_enc_lockargs()
405 struct xdr_stream *xdr, in nlm4_xdr_enc_cancargs() argument
411 encode_cookie(xdr, &args->cookie); in nlm4_xdr_enc_cancargs()
412 encode_bool(xdr, args->block); in nlm4_xdr_enc_cancargs()
413 encode_bool(xdr, lock->fl.fl_type == F_WRLCK); in nlm4_xdr_enc_cancargs()
414 encode_nlm4_lock(xdr, lock); in nlm4_xdr_enc_cancargs()
424 struct xdr_stream *xdr, in nlm4_xdr_enc_unlockargs() argument
430 encode_cookie(xdr, &args->cookie); in nlm4_xdr_enc_unlockargs()
431 encode_nlm4_lock(xdr, lock); in nlm4_xdr_enc_unlockargs()
441 struct xdr_stream *xdr, in nlm4_xdr_enc_res() argument
446 encode_cookie(xdr, &result->cookie); in nlm4_xdr_enc_res()
447 encode_nlm4_stat(xdr, result->status); in nlm4_xdr_enc_res()
464 struct xdr_stream *xdr, in nlm4_xdr_enc_testres() argument
469 encode_cookie(xdr, &result->cookie); in nlm4_xdr_enc_testres()
470 encode_nlm4_stat(xdr, result->status); in nlm4_xdr_enc_testres()
472 encode_nlm4_holder(xdr, result); in nlm4_xdr_enc_testres()
497 static int decode_nlm4_testrply(struct xdr_stream *xdr, in decode_nlm4_testrply() argument
502 error = decode_nlm4_stat(xdr, &result->status); in decode_nlm4_testrply()
506 error = decode_nlm4_holder(xdr, result); in decode_nlm4_testrply()
512 struct xdr_stream *xdr, in nlm4_xdr_dec_testres() argument
518 error = decode_cookie(xdr, &result->cookie); in nlm4_xdr_dec_testres()
521 error = decode_nlm4_testrply(xdr, result); in nlm4_xdr_dec_testres()
533 struct xdr_stream *xdr, in nlm4_xdr_dec_res() argument
539 error = decode_cookie(xdr, &result->cookie); in nlm4_xdr_dec_res()
542 error = decode_nlm4_stat(xdr, &result->status); in nlm4_xdr_dec_res()