Home
last modified time | relevance | path

Searched refs:xdr (Results 1 – 20 of 20) sorted by relevance

/net/sunrpc/auth_gss/
Dgss_rpc_xdr.c11 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
[all …]
Dauth_gss.c1518 static int gss_marshal(struct rpc_task *task, struct xdr_stream *xdr) in gss_marshal() argument
1534 p = xdr_reserve_space(xdr, 7 * sizeof(*p) + in gss_marshal()
1563 p = xdr_reserve_space(xdr, sizeof(*p)); in gss_marshal()
1573 if (xdr_stream_encode_opaque_inline(xdr, (void **)&p, mic.len) < 0) in gss_marshal()
1665 gss_validate(struct rpc_task *task, struct xdr_stream *xdr) in gss_validate() argument
1676 p = xdr_inline_decode(xdr, 2 * sizeof(*p)); in gss_validate()
1684 p = xdr_inline_decode(xdr, len); in gss_validate()
1724 struct rpc_task *task, struct xdr_stream *xdr) in gss_wrap_req_integ() argument
1732 p = xdr_reserve_space(xdr, 2 * sizeof(*p)); in gss_wrap_req_integ()
1738 if (rpcauth_wrap_req_encode(task, xdr)) in gss_wrap_req_integ()
[all …]
Dgss_rpc_xdr.h168 struct xdr_stream *xdr,
171 struct xdr_stream *xdr,
/net/sunrpc/
Dxdr.c178 xdr_inline_pages(struct xdr_buf *xdr, unsigned int offset, in xdr_inline_pages() argument
181 struct kvec *head = xdr->head; in xdr_inline_pages()
182 struct kvec *tail = xdr->tail; in xdr_inline_pages()
188 xdr->pages = pages; in xdr_inline_pages()
189 xdr->page_base = base; in xdr_inline_pages()
190 xdr->page_len = len; in xdr_inline_pages()
194 xdr->buflen += len; in xdr_inline_pages()
877 unsigned int xdr_stream_pos(const struct xdr_stream *xdr) in xdr_stream_pos() argument
879 return (unsigned int)(XDR_QUADLEN(xdr->buf->len) - xdr->nwords) << 2; in xdr_stream_pos()
883 static void xdr_stream_set_pos(struct xdr_stream *xdr, unsigned int pos) in xdr_stream_set_pos() argument
[all …]
Dsocklib.c90 xdr_partial_copy_from_skb(struct xdr_buf *xdr, unsigned int base, struct xdr_skb_reader *desc, xdr_… in xdr_partial_copy_from_skb() argument
92 struct page **ppage = xdr->pages; in xdr_partial_copy_from_skb()
93 unsigned int len, pglen = xdr->page_len; in xdr_partial_copy_from_skb()
97 len = xdr->head[0].iov_len; in xdr_partial_copy_from_skb()
100 ret = copy_actor(desc, (char *)xdr->head[0].iov_base + base, len); in xdr_partial_copy_from_skb()
114 if (base || xdr->page_base) { in xdr_partial_copy_from_skb()
116 base += xdr->page_base; in xdr_partial_copy_from_skb()
125 if ((xdr->flags & XDRBUF_SPARSE_PAGES) && *ppage == NULL) { in xdr_partial_copy_from_skb()
155 len = xdr->tail[0].iov_len; in xdr_partial_copy_from_skb()
157 copied += copy_actor(desc, (char *)xdr->tail[0].iov_base + base, len - base); in xdr_partial_copy_from_skb()
[all …]
Dauth_unix.c111 unx_marshal(struct rpc_task *task, struct xdr_stream *xdr) in unx_marshal() argument
123 p = xdr_reserve_space(xdr, 3 * sizeof(*p)); in unx_marshal()
129 if (xdr_stream_encode_opaque(xdr, clnt->cl_nodename, in unx_marshal()
132 p = xdr_reserve_space(xdr, 3 * sizeof(*p)); in unx_marshal()
144 p = xdr_reserve_space(xdr, (p - gidarr_len - 1) << 2); in unx_marshal()
150 p = xdr_reserve_space(xdr, 2 * sizeof(*p)); in unx_marshal()
173 unx_validate(struct rpc_task *task, struct xdr_stream *xdr) in unx_validate() argument
179 p = xdr_inline_decode(xdr, 2 * sizeof(*p)); in unx_validate()
193 p = xdr_inline_decode(xdr, size); in unx_validate()
Drpcb_clnt.c809 static void rpcb_enc_mapping(struct rpc_rqst *req, struct xdr_stream *xdr, in rpcb_enc_mapping() argument
815 p = xdr_reserve_space(xdr, RPCB_mappingargs_sz << 2); in rpcb_enc_mapping()
822 static int rpcb_dec_getport(struct rpc_rqst *req, struct xdr_stream *xdr, in rpcb_dec_getport() argument
831 p = xdr_inline_decode(xdr, 4); in rpcb_dec_getport()
843 static int rpcb_dec_set(struct rpc_rqst *req, struct xdr_stream *xdr, in rpcb_dec_set() argument
849 p = xdr_inline_decode(xdr, 4); in rpcb_dec_set()
859 static void encode_rpcb_string(struct xdr_stream *xdr, const char *string, in encode_rpcb_string() argument
870 p = xdr_reserve_space(xdr, 4 + len); in encode_rpcb_string()
874 static void rpcb_enc_getaddr(struct rpc_rqst *req, struct xdr_stream *xdr, in rpcb_enc_getaddr() argument
880 p = xdr_reserve_space(xdr, (RPCB_program_sz + RPCB_version_sz) << 2); in rpcb_enc_getaddr()
[all …]
Dauth_null.c63 nul_marshal(struct rpc_task *task, struct xdr_stream *xdr) in nul_marshal() argument
67 p = xdr_reserve_space(xdr, 4 * sizeof(*p)); in nul_marshal()
90 nul_validate(struct rpc_task *task, struct xdr_stream *xdr) in nul_validate() argument
94 p = xdr_inline_decode(xdr, 2 * sizeof(*p)); in nul_validate()
Dauth.c727 int rpcauth_marshcred(struct rpc_task *task, struct xdr_stream *xdr) in rpcauth_marshcred() argument
731 return ops->crmarshal(task, xdr); in rpcauth_marshcred()
742 int rpcauth_wrap_req_encode(struct rpc_task *task, struct xdr_stream *xdr) in rpcauth_wrap_req_encode() argument
746 encode(task->tk_rqstp, xdr, task->tk_msg.rpc_argp); in rpcauth_wrap_req_encode()
760 int rpcauth_wrap_req(struct rpc_task *task, struct xdr_stream *xdr) in rpcauth_wrap_req() argument
764 return ops->crwrap_req(task, xdr); in rpcauth_wrap_req()
777 rpcauth_checkverf(struct rpc_task *task, struct xdr_stream *xdr) in rpcauth_checkverf() argument
781 return ops->crvalidate(task, xdr); in rpcauth_checkverf()
792 rpcauth_unwrap_resp_decode(struct rpc_task *task, struct xdr_stream *xdr) in rpcauth_unwrap_resp_decode() argument
796 return decode(task->tk_rqstp, xdr, task->tk_msg.rpc_resp); in rpcauth_unwrap_resp_decode()
[all …]
Dsvcsock.c547 struct xdr_buf *xdr = &rqstp->rq_res; in svc_udp_sendto() local
572 err = xdr_alloc_bvec(xdr, GFP_KERNEL); in svc_udp_sendto()
576 err = xprt_sock_sendmsg(svsk->sk_sock, &msg, xdr, 0, 0, &sent); in svc_udp_sendto()
579 err = xprt_sock_sendmsg(svsk->sk_sock, &msg, xdr, 0, 0, &sent); in svc_udp_sendto()
581 xdr_free_bvec(xdr); in svc_udp_sendto()
1076 static int svc_tcp_sendmsg(struct socket *sock, struct xdr_buf *xdr, in svc_tcp_sendmsg() argument
1079 const struct kvec *head = xdr->head; in svc_tcp_sendmsg()
1080 const struct kvec *tail = xdr->tail; in svc_tcp_sendmsg()
1091 ret = xdr_alloc_bvec(xdr, GFP_KERNEL); in svc_tcp_sendmsg()
1109 if (xdr->page_len) { in svc_tcp_sendmsg()
[all …]
Dsocklib.h10 int csum_partial_copy_to_xdr(struct xdr_buf *xdr, struct sk_buff *skb);
12 struct xdr_buf *xdr, unsigned int base,
Dclnt.c75 struct xdr_stream *xdr);
77 struct xdr_stream *xdr);
1914 struct xdr_stream xdr; in rpc_xdr_encode() local
1925 xdr_init_encode(&xdr, &req->rq_snd_buf, in rpc_xdr_encode()
1927 if (rpc_encode_header(task, &xdr)) in rpc_xdr_encode()
1930 task->tk_status = rpcauth_wrap_req(task, &xdr); in rpc_xdr_encode()
2550 struct xdr_stream xdr; in call_decode() local
2587 xdr_init_decode(&xdr, &req->rq_rcv_buf, in call_decode()
2589 err = rpc_decode_header(task, &xdr); in call_decode()
2594 task->tk_status = rpcauth_unwrap_resp(task, &xdr); in call_decode()
[all …]
Dxprtsock.c844 xs_stream_record_marker(struct xdr_buf *xdr) in xs_stream_record_marker() argument
846 if (!xdr->len) in xs_stream_record_marker()
848 return cpu_to_be32(RPC_LAST_STREAM_FRAGMENT | (u32)xdr->len); in xs_stream_record_marker()
867 struct xdr_buf *xdr = &req->rq_snd_buf; in xs_local_send_request() local
868 rpc_fraghdr rm = xs_stream_record_marker(xdr); in xs_local_send_request()
889 status = xprt_sock_sendmsg(transport->sock, &msg, xdr, in xs_local_send_request()
892 __func__, xdr->len - transport->xmit.offset, status); in xs_local_send_request()
937 struct xdr_buf *xdr = &req->rq_snd_buf; in xs_udp_send_request() local
956 status = xdr_alloc_bvec(xdr, rpc_task_gfp_mask()); in xs_udp_send_request()
960 status = xprt_sock_sendmsg(transport->sock, &msg, xdr, 0, 0, &sent); in xs_udp_send_request()
[all …]
DMakefile14 addr.o rpcb_clnt.o timer.o xdr.o \
/net/sunrpc/xprtrdma/
Drpc_rdma.c129 struct xdr_buf *xdr = &rqst->rq_snd_buf; in rpcrdma_args_inline() local
133 if (xdr->len > ep->re_max_inline_send) in rpcrdma_args_inline()
136 if (xdr->page_len) { in rpcrdma_args_inline()
137 remaining = xdr->page_len; in rpcrdma_args_inline()
138 offset = offset_in_page(xdr->page_base); in rpcrdma_args_inline()
267 encode_rdma_segment(struct xdr_stream *xdr, struct rpcrdma_mr *mr) in encode_rdma_segment() argument
271 p = xdr_reserve_space(xdr, 4 * sizeof(*p)); in encode_rdma_segment()
280 encode_read_segment(struct xdr_stream *xdr, struct rpcrdma_mr *mr, in encode_read_segment() argument
285 p = xdr_reserve_space(xdr, 6 * sizeof(*p)); in encode_read_segment()
338 struct xdr_stream *xdr = &req->rl_stream; in rpcrdma_encode_read_list() local
[all …]
Dsvc_rdma_sendto.c576 static int svc_rdma_xb_dma_map(const struct xdr_buf *xdr, void *data) in svc_rdma_xb_dma_map() argument
583 ret = svc_rdma_iov_dma_map(data, &xdr->head[0]); in svc_rdma_xb_dma_map()
587 ppages = xdr->pages + (xdr->page_base >> PAGE_SHIFT); in svc_rdma_xb_dma_map()
588 pageoff = offset_in_page(xdr->page_base); in svc_rdma_xb_dma_map()
589 remaining = xdr->page_len; in svc_rdma_xb_dma_map()
601 ret = svc_rdma_iov_dma_map(data, &xdr->tail[0]); in svc_rdma_xb_dma_map()
605 return xdr->len; in svc_rdma_xb_dma_map()
622 static int svc_rdma_xb_count_sges(const struct xdr_buf *xdr, in svc_rdma_xb_count_sges() argument
629 if (xdr->head[0].iov_len) in svc_rdma_xb_count_sges()
632 offset = offset_in_page(xdr->page_base); in svc_rdma_xb_count_sges()
[all …]
Dsvc_rdma_rw.c435 const struct xdr_buf *xdr = info->wi_xdr; in svc_rdma_pagelist_to_sg() local
439 page_off = info->wi_next_off + xdr->page_base; in svc_rdma_pagelist_to_sg()
442 page = xdr->pages + page_no; in svc_rdma_pagelist_to_sg()
553 const struct xdr_buf *xdr, in svc_rdma_pages_write() argument
557 info->wi_xdr = xdr; in svc_rdma_pages_write()
558 info->wi_next_off = offset - xdr->head[0].iov_len; in svc_rdma_pages_write()
574 static int svc_rdma_xb_write(const struct xdr_buf *xdr, void *data) in svc_rdma_xb_write() argument
579 if (xdr->head[0].iov_len) { in svc_rdma_xb_write()
580 ret = svc_rdma_iov_write(info, &xdr->head[0]); in svc_rdma_xb_write()
585 if (xdr->page_len) { in svc_rdma_xb_write()
[all …]
Dsvc_rdma_pcl.c232 static int pcl_process_region(const struct xdr_buf *xdr, in pcl_process_region() argument
241 if (xdr_buf_subsegment(xdr, &subbuf, offset, length)) in pcl_process_region()
266 const struct xdr_buf *xdr, in pcl_process_nonpayloads() argument
278 return actor(xdr, data); in pcl_process_nonpayloads()
281 ret = pcl_process_region(xdr, 0, chunk->ch_position, actor, data); in pcl_process_nonpayloads()
291 ret = pcl_process_region(xdr, start, next->ch_position - start, in pcl_process_nonpayloads()
301 ret = pcl_process_region(xdr, start, xdr->len - start, actor, data); in pcl_process_nonpayloads()
Dxprt_rdma.h563 struct xdr_buf *xdr,
573 static inline void rpcrdma_set_xdrlen(struct xdr_buf *xdr, size_t len) in rpcrdma_set_xdrlen() argument
575 xdr->head[0].iov_len = len; in rpcrdma_set_xdrlen()
576 xdr->len = len; in rpcrdma_set_xdrlen()
/net/rxrpc/
Dkey.c54 const __be32 *xdr, unsigned int toklen) in rxrpc_preparse_xdr_rxkad() argument
62 ntohl(xdr[0]), ntohl(xdr[1]), ntohl(xdr[2]), ntohl(xdr[3]), in rxrpc_preparse_xdr_rxkad()
67 tktlen = ntohl(xdr[7]); in rxrpc_preparse_xdr_rxkad()
90 token->kad->vice_id = ntohl(xdr[0]); in rxrpc_preparse_xdr_rxkad()
91 token->kad->kvno = ntohl(xdr[1]); in rxrpc_preparse_xdr_rxkad()
92 token->kad->start = ntohl(xdr[4]); in rxrpc_preparse_xdr_rxkad()
93 token->kad->expiry = ntohl(xdr[5]); in rxrpc_preparse_xdr_rxkad()
94 token->kad->primary_flag = ntohl(xdr[6]); in rxrpc_preparse_xdr_rxkad()
95 memcpy(&token->kad->session_key, &xdr[2], 8); in rxrpc_preparse_xdr_rxkad()
96 memcpy(&token->kad->ticket, &xdr[8], tktlen); in rxrpc_preparse_xdr_rxkad()
[all …]