'\" t .\" Title: xdr_restrict_buflen .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: July 2017 .\" Manual: Linux Networking .\" Source: Kernel Hackers Manual 4.11.6 .\" Language: English .\" .TH "XDR_RESTRICT_BUFLEN" "9" "July 2017" "Kernel Hackers Manual 4\&.11\&" "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_restrict_buflen \- decrease available buffer space .SH "SYNOPSIS" .HP \w'int\ xdr_restrict_buflen('u .BI "int xdr_restrict_buflen(struct\ xdr_stream\ *\ " "xdr" ", int\ " "newbuflen" ");" .SH "ARGUMENTS" .PP \fIstruct xdr_stream * xdr\fR .RS 4 pointer to xdr_stream .RE .PP \fIint newbuflen\fR .RS 4 new maximum number of bytes available .RE .SH "DESCRIPTION" .PP Adjust our idea of how much space is available in the buffer\&. If we\*(Aqve already used too much space in the buffer, returns \-1\&. If the available space is already smaller than newbuflen, returns 0 and does nothing\&. Otherwise, adjusts xdr\->buf\->buflen to newbuflen and ensures xdr\->end is set at most offset newbuflen from the start of the buffer\&. .SH "COPYRIGHT" .br