Lines Matching refs:xdr
86 static void encode_bool(struct xdr_stream *xdr, const int value) in encode_bool() argument
90 p = xdr_reserve_space(xdr, 4); in encode_bool()
94 static void encode_int32(struct xdr_stream *xdr, const s32 value) in encode_int32() argument
98 p = xdr_reserve_space(xdr, 4); in encode_int32()
105 static void encode_netobj(struct xdr_stream *xdr, in encode_netobj() argument
110 p = xdr_reserve_space(xdr, 4 + length); in encode_netobj()
114 static int decode_netobj(struct xdr_stream *xdr, in decode_netobj() argument
119 ret = xdr_stream_decode_opaque_inline(xdr, (void *)&obj->data, in decode_netobj()
130 static void encode_cookie(struct xdr_stream *xdr, in encode_cookie() argument
133 encode_netobj(xdr, (u8 *)&cookie->data, cookie->len); in encode_cookie()
136 static int decode_cookie(struct xdr_stream *xdr, in decode_cookie() argument
142 p = xdr_inline_decode(xdr, 4); in decode_cookie()
151 p = xdr_inline_decode(xdr, length); in decode_cookie()
171 static void encode_fh(struct xdr_stream *xdr, const struct nfs_fh *fh) in encode_fh() argument
173 encode_netobj(xdr, (u8 *)&fh->data, NFS2_FHSIZE); in encode_fh()
195 static void encode_nlm_stat(struct xdr_stream *xdr, in encode_nlm_stat() argument
201 p = xdr_reserve_space(xdr, 4); in encode_nlm_stat()
205 static int decode_nlm_stat(struct xdr_stream *xdr, in decode_nlm_stat() argument
210 p = xdr_inline_decode(xdr, 4); in decode_nlm_stat()
234 static void encode_nlm_holder(struct xdr_stream *xdr, in encode_nlm_holder() argument
241 encode_bool(xdr, lock->fl.fl_type == F_RDLCK); in encode_nlm_holder()
242 encode_int32(xdr, lock->svid); in encode_nlm_holder()
243 encode_netobj(xdr, lock->oh.data, lock->oh.len); in encode_nlm_holder()
245 p = xdr_reserve_space(xdr, 4 + 4); in encode_nlm_holder()
251 static int decode_nlm_holder(struct xdr_stream *xdr, struct nlm_res *result) in decode_nlm_holder() argument
263 p = xdr_inline_decode(xdr, 4 + 4); in decode_nlm_holder()
270 error = decode_netobj(xdr, &lock->oh); in decode_nlm_holder()
274 p = xdr_inline_decode(xdr, 4 + 4); in decode_nlm_holder()
299 static void encode_caller_name(struct xdr_stream *xdr, const char *name) in encode_caller_name() argument
305 p = xdr_reserve_space(xdr, 4 + length); in encode_caller_name()
319 static void encode_nlm_lock(struct xdr_stream *xdr, in encode_nlm_lock() argument
325 encode_caller_name(xdr, lock->caller); in encode_nlm_lock()
326 encode_fh(xdr, &lock->fh); in encode_nlm_lock()
327 encode_netobj(xdr, lock->oh.data, lock->oh.len); in encode_nlm_lock()
329 p = xdr_reserve_space(xdr, 4 + 4 + 4); in encode_nlm_lock()
353 struct xdr_stream *xdr, in nlm_xdr_enc_testargs() argument
359 encode_cookie(xdr, &args->cookie); in nlm_xdr_enc_testargs()
360 encode_bool(xdr, lock->fl.fl_type == F_WRLCK); in nlm_xdr_enc_testargs()
361 encode_nlm_lock(xdr, lock); in nlm_xdr_enc_testargs()
375 struct xdr_stream *xdr, in nlm_xdr_enc_lockargs() argument
381 encode_cookie(xdr, &args->cookie); in nlm_xdr_enc_lockargs()
382 encode_bool(xdr, args->block); in nlm_xdr_enc_lockargs()
383 encode_bool(xdr, lock->fl.fl_type == F_WRLCK); in nlm_xdr_enc_lockargs()
384 encode_nlm_lock(xdr, lock); in nlm_xdr_enc_lockargs()
385 encode_bool(xdr, args->reclaim); in nlm_xdr_enc_lockargs()
386 encode_int32(xdr, args->state); in nlm_xdr_enc_lockargs()
398 struct xdr_stream *xdr, in nlm_xdr_enc_cancargs() argument
404 encode_cookie(xdr, &args->cookie); in nlm_xdr_enc_cancargs()
405 encode_bool(xdr, args->block); in nlm_xdr_enc_cancargs()
406 encode_bool(xdr, lock->fl.fl_type == F_WRLCK); in nlm_xdr_enc_cancargs()
407 encode_nlm_lock(xdr, lock); in nlm_xdr_enc_cancargs()
417 struct xdr_stream *xdr, in nlm_xdr_enc_unlockargs() argument
423 encode_cookie(xdr, &args->cookie); in nlm_xdr_enc_unlockargs()
424 encode_nlm_lock(xdr, lock); in nlm_xdr_enc_unlockargs()
434 struct xdr_stream *xdr, in nlm_xdr_enc_res() argument
439 encode_cookie(xdr, &result->cookie); in nlm_xdr_enc_res()
440 encode_nlm_stat(xdr, result->status); in nlm_xdr_enc_res()
456 static void encode_nlm_testrply(struct xdr_stream *xdr, in encode_nlm_testrply() argument
460 encode_nlm_holder(xdr, result); in encode_nlm_testrply()
464 struct xdr_stream *xdr, in nlm_xdr_enc_testres() argument
469 encode_cookie(xdr, &result->cookie); in nlm_xdr_enc_testres()
470 encode_nlm_stat(xdr, result->status); in nlm_xdr_enc_testres()
471 encode_nlm_testrply(xdr, result); in nlm_xdr_enc_testres()
495 static int decode_nlm_testrply(struct xdr_stream *xdr, in decode_nlm_testrply() argument
500 error = decode_nlm_stat(xdr, &result->status); in decode_nlm_testrply()
504 error = decode_nlm_holder(xdr, result); in decode_nlm_testrply()
510 struct xdr_stream *xdr, in nlm_xdr_dec_testres() argument
516 error = decode_cookie(xdr, &result->cookie); in nlm_xdr_dec_testres()
519 error = decode_nlm_testrply(xdr, result); in nlm_xdr_dec_testres()
531 struct xdr_stream *xdr, in nlm_xdr_dec_res() argument
537 error = decode_cookie(xdr, &result->cookie); in nlm_xdr_dec_res()
540 error = decode_nlm_stat(xdr, &result->status); in nlm_xdr_dec_res()