'\" t .\" Title: xdr_init_encode .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: Linux Networking .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "XDR_INIT_ENCODE" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "Linux Networking" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" xdr_init_encode \- Initialize a struct xdr_stream for sending data\&. .SH "SYNOPSIS" .HP \w'void\ xdr_init_encode('u .BI "void xdr_init_encode(struct\ xdr_stream\ *\ " "xdr" ", struct\ xdr_buf\ *\ " "buf" ", __be32\ *\ " "p" ");" .SH "ARGUMENTS" .PP \fIxdr\fR .RS 4 pointer to xdr_stream struct .RE .PP \fIbuf\fR .RS 4 pointer to XDR buffer in which to encode data .RE .PP \fIp\fR .RS 4 current pointer inside XDR buffer .RE .SH "NOTE" .PP at the moment the RPC client only passes the length of our scratch buffer in the xdr_buf\*(Aqs header kvec\&. Previously this meant we needed to call \fBxdr_adjust_iovec\fR after encoding the data\&. With the new scheme, the xdr_stream manages the details of the buffer length, and takes care of adjusting the kvec length for us\&. .SH "COPYRIGHT" .br