Lines Matching refs:xdr
11 static int gssx_enc_bool(struct xdr_stream *xdr, int v) in gssx_enc_bool() argument
15 p = xdr_reserve_space(xdr, 4); in gssx_enc_bool()
22 static int gssx_dec_bool(struct xdr_stream *xdr, u32 *v) in gssx_dec_bool() argument
26 p = xdr_inline_decode(xdr, 4); in gssx_dec_bool()
33 static int gssx_enc_buffer(struct xdr_stream *xdr, in gssx_enc_buffer() argument
38 p = xdr_reserve_space(xdr, sizeof(u32) + buf->len); in gssx_enc_buffer()
45 static int gssx_enc_in_token(struct xdr_stream *xdr, in gssx_enc_in_token() argument
50 p = xdr_reserve_space(xdr, 4); in gssx_enc_in_token()
56 xdr_write_pages(xdr, in->pages, in->page_base, in->page_len); in gssx_enc_in_token()
62 static int gssx_dec_buffer(struct xdr_stream *xdr, in gssx_dec_buffer() argument
68 p = xdr_inline_decode(xdr, 4); in gssx_dec_buffer()
73 p = xdr_inline_decode(xdr, length); in gssx_dec_buffer()
95 static int gssx_enc_option(struct xdr_stream *xdr, in gssx_enc_option() argument
100 err = gssx_enc_buffer(xdr, &opt->option); in gssx_enc_option()
103 err = gssx_enc_buffer(xdr, &opt->value); in gssx_enc_option()
107 static int gssx_dec_option(struct xdr_stream *xdr, in gssx_dec_option() argument
112 err = gssx_dec_buffer(xdr, &opt->option); in gssx_dec_option()
115 err = gssx_dec_buffer(xdr, &opt->value); in gssx_dec_option()
119 static int dummy_enc_opt_array(struct xdr_stream *xdr, in dummy_enc_opt_array() argument
127 p = xdr_reserve_space(xdr, 4); in dummy_enc_opt_array()
135 static int dummy_dec_opt_array(struct xdr_stream *xdr, in dummy_dec_opt_array() argument
142 p = xdr_inline_decode(xdr, 4); in dummy_dec_opt_array()
148 gssx_dec_option(xdr, &dummy); in dummy_dec_opt_array()
156 static int get_host_u32(struct xdr_stream *xdr, u32 *res) in get_host_u32() argument
160 p = xdr_inline_decode(xdr, 4); in get_host_u32()
168 static int gssx_dec_linux_creds(struct xdr_stream *xdr, in gssx_dec_linux_creds() argument
177 p = xdr_inline_decode(xdr, 4); in gssx_dec_linux_creds()
187 err = get_host_u32(xdr, &tmp); in gssx_dec_linux_creds()
193 err = get_host_u32(xdr, &tmp); in gssx_dec_linux_creds()
199 err = get_host_u32(xdr, &tmp); in gssx_dec_linux_creds()
212 err = get_host_u32(xdr, &tmp); in gssx_dec_linux_creds()
229 static int gssx_dec_option_array(struct xdr_stream *xdr, in gssx_dec_option_array() argument
237 p = xdr_inline_decode(xdr, 4); in gssx_dec_option_array()
267 p = xdr_inline_decode(xdr, 4); in gssx_dec_option_array()
272 p = xdr_inline_decode(xdr, length); in gssx_dec_option_array()
279 err = gssx_dec_linux_creds(xdr, creds); in gssx_dec_option_array()
285 err = gssx_dec_buffer(xdr, &dummy); in gssx_dec_option_array()
293 static int gssx_dec_status(struct xdr_stream *xdr, in gssx_dec_status() argument
300 p = xdr_inline_decode(xdr, 8); in gssx_dec_status()
306 err = gssx_dec_buffer(xdr, &status->mech); in gssx_dec_status()
311 p = xdr_inline_decode(xdr, 8); in gssx_dec_status()
317 err = gssx_dec_buffer(xdr, &status->major_status_string); in gssx_dec_status()
322 err = gssx_dec_buffer(xdr, &status->minor_status_string); in gssx_dec_status()
327 err = gssx_dec_buffer(xdr, &status->server_ctx); in gssx_dec_status()
333 err = dummy_dec_opt_array(xdr, &status->options); in gssx_dec_status()
338 static int gssx_enc_call_ctx(struct xdr_stream *xdr, in gssx_enc_call_ctx() argument
346 err = gssx_enc_buffer(xdr, &ctx->locale); in gssx_enc_call_ctx()
351 err = gssx_enc_buffer(xdr, &ctx->server_ctx); in gssx_enc_call_ctx()
357 p = xdr_reserve_space(xdr, 4); in gssx_enc_call_ctx()
365 err = gssx_enc_option(xdr, &opt); in gssx_enc_call_ctx()
372 err = gssx_enc_option(xdr, &opt); in gssx_enc_call_ctx()
377 static int gssx_dec_name_attr(struct xdr_stream *xdr, in gssx_dec_name_attr() argument
383 err = gssx_dec_buffer(xdr, &attr->attr); in gssx_dec_name_attr()
388 err = gssx_dec_buffer(xdr, &attr->value); in gssx_dec_name_attr()
393 err = dummy_dec_opt_array(xdr, &attr->extensions); in gssx_dec_name_attr()
398 static int dummy_enc_nameattr_array(struct xdr_stream *xdr, in dummy_enc_nameattr_array() argument
406 p = xdr_reserve_space(xdr, 4); in dummy_enc_nameattr_array()
414 static int dummy_dec_nameattr_array(struct xdr_stream *xdr, in dummy_dec_nameattr_array() argument
421 p = xdr_inline_decode(xdr, 4); in dummy_dec_nameattr_array()
426 gssx_dec_name_attr(xdr, &dummy); in dummy_dec_nameattr_array()
440 static int gssx_enc_name(struct xdr_stream *xdr, in gssx_enc_name() argument
446 err = gssx_enc_buffer(xdr, &name->display_name); in gssx_enc_name()
451 err = gssx_enc_buffer(xdr, &zero_netobj); in gssx_enc_name()
456 err = gssx_enc_buffer(xdr, &zero_netobj); in gssx_enc_name()
461 err = gssx_enc_buffer(xdr, &zero_netobj); in gssx_enc_name()
468 err = dummy_enc_nameattr_array(xdr, &zero_name_attr_array); in gssx_enc_name()
475 err = dummy_enc_opt_array(xdr, &zero_option_array); in gssx_enc_name()
481 static int gssx_dec_name(struct xdr_stream *xdr, in gssx_dec_name() argument
490 err = gssx_dec_buffer(xdr, &name->display_name); in gssx_dec_name()
495 err = gssx_dec_buffer(xdr, &dummy_netobj); in gssx_dec_name()
500 err = gssx_dec_buffer(xdr, &dummy_netobj); in gssx_dec_name()
505 err = gssx_dec_buffer(xdr, &dummy_netobj); in gssx_dec_name()
511 err = dummy_dec_nameattr_array(xdr, &dummy_name_attr_array); in gssx_dec_name()
517 err = dummy_dec_opt_array(xdr, &dummy_option_array); in gssx_dec_name()
522 static int dummy_enc_credel_array(struct xdr_stream *xdr, in dummy_enc_credel_array() argument
530 p = xdr_reserve_space(xdr, 4); in dummy_enc_credel_array()
538 static int gssx_enc_cred(struct xdr_stream *xdr, in gssx_enc_cred() argument
544 err = gssx_enc_name(xdr, &cred->desired_name); in gssx_enc_cred()
549 err = dummy_enc_credel_array(xdr, &cred->elements); in gssx_enc_cred()
554 err = gssx_enc_buffer(xdr, &cred->cred_handle_reference); in gssx_enc_cred()
559 err = gssx_enc_bool(xdr, cred->needs_release); in gssx_enc_cred()
564 static int gssx_enc_ctx(struct xdr_stream *xdr, in gssx_enc_ctx() argument
571 err = gssx_enc_buffer(xdr, &ctx->exported_context_token); in gssx_enc_ctx()
576 err = gssx_enc_buffer(xdr, &ctx->state); in gssx_enc_ctx()
581 err = gssx_enc_bool(xdr, ctx->need_release); in gssx_enc_ctx()
586 err = gssx_enc_buffer(xdr, &ctx->mech); in gssx_enc_ctx()
591 err = gssx_enc_name(xdr, &ctx->src_name); in gssx_enc_ctx()
596 err = gssx_enc_name(xdr, &ctx->targ_name); in gssx_enc_ctx()
601 p = xdr_reserve_space(xdr, 8+8); in gssx_enc_ctx()
610 err = gssx_enc_bool(xdr, ctx->locally_initiated); in gssx_enc_ctx()
615 err = gssx_enc_bool(xdr, ctx->open); in gssx_enc_ctx()
622 err = dummy_enc_opt_array(xdr, &ctx->options); in gssx_enc_ctx()
627 static int gssx_dec_ctx(struct xdr_stream *xdr, in gssx_dec_ctx() argument
634 err = gssx_dec_buffer(xdr, &ctx->exported_context_token); in gssx_dec_ctx()
639 err = gssx_dec_buffer(xdr, &ctx->state); in gssx_dec_ctx()
644 err = gssx_dec_bool(xdr, &ctx->need_release); in gssx_dec_ctx()
649 err = gssx_dec_buffer(xdr, &ctx->mech); in gssx_dec_ctx()
654 err = gssx_dec_name(xdr, &ctx->src_name); in gssx_dec_ctx()
659 err = gssx_dec_name(xdr, &ctx->targ_name); in gssx_dec_ctx()
664 p = xdr_inline_decode(xdr, 8+8); in gssx_dec_ctx()
673 err = gssx_dec_bool(xdr, &ctx->locally_initiated); in gssx_dec_ctx()
678 err = gssx_dec_bool(xdr, &ctx->open); in gssx_dec_ctx()
684 err = dummy_dec_opt_array(xdr, &ctx->options); in gssx_dec_ctx()
689 static int gssx_enc_cb(struct xdr_stream *xdr, struct gssx_cb *cb) in gssx_enc_cb() argument
695 p = xdr_reserve_space(xdr, 8); in gssx_enc_cb()
701 err = gssx_enc_buffer(xdr, &cb->initiator_address); in gssx_enc_cb()
706 p = xdr_reserve_space(xdr, 8); in gssx_enc_cb()
712 err = gssx_enc_buffer(xdr, &cb->acceptor_address); in gssx_enc_cb()
717 err = gssx_enc_buffer(xdr, &cb->application_data); in gssx_enc_cb()
723 struct xdr_stream *xdr, in gssx_enc_accept_sec_context() argument
729 err = gssx_enc_call_ctx(xdr, &arg->call_ctx); in gssx_enc_accept_sec_context()
735 err = gssx_enc_ctx(xdr, arg->context_handle); in gssx_enc_accept_sec_context()
737 err = gssx_enc_bool(xdr, 0); in gssx_enc_accept_sec_context()
743 err = gssx_enc_cred(xdr, arg->cred_handle); in gssx_enc_accept_sec_context()
745 err = gssx_enc_bool(xdr, 0); in gssx_enc_accept_sec_context()
750 err = gssx_enc_in_token(xdr, &arg->input_token); in gssx_enc_accept_sec_context()
756 err = gssx_enc_cb(xdr, arg->input_cb); in gssx_enc_accept_sec_context()
758 err = gssx_enc_bool(xdr, 0); in gssx_enc_accept_sec_context()
762 err = gssx_enc_bool(xdr, arg->ret_deleg_cred); in gssx_enc_accept_sec_context()
769 err = dummy_enc_opt_array(xdr, &arg->options); in gssx_enc_accept_sec_context()
780 struct xdr_stream *xdr, in gssx_dec_accept_sec_context() argument
791 xdr_set_scratch_page(xdr, scratch); in gssx_dec_accept_sec_context()
794 err = gssx_dec_status(xdr, &res->status); in gssx_dec_accept_sec_context()
799 err = gssx_dec_bool(xdr, &value_follows); in gssx_dec_accept_sec_context()
803 err = gssx_dec_ctx(xdr, res->context_handle); in gssx_dec_accept_sec_context()
811 err = gssx_dec_bool(xdr, &value_follows); in gssx_dec_accept_sec_context()
815 err = gssx_dec_buffer(xdr, res->output_token); in gssx_dec_accept_sec_context()
823 err = gssx_dec_bool(xdr, &value_follows); in gssx_dec_accept_sec_context()
833 err = gssx_dec_option_array(xdr, &res->options); in gssx_dec_accept_sec_context()