---
name: "xdr_set_scratch_buffer"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/xdr_set_scratch_buffer"
---

# xdr\_set\_scratch\_buffer(9)

Attach a scratch buffer for decoding data.

## NAME

xdr\_set\_scratch\_buffer - Attach a scratch buffer for decoding data.

## SYNOPSIS

**void xdr\_set\_scratch\_buffer(struct xdr\_stream \*** *xdr***, void \*** *buf***, size\_t** *buflen***);**

## ARGUMENTS

*xdr*

pointer to xdr\_stream struct

*buf*

pointer to an empty buffer

*buflen*

size of 'buf'

## DESCRIPTION

The scratch buffer is used when decoding from an array of pages. If an **xdr\_inline\_decode** call spans across page boundaries, then we copy the data into the scratch buffer in order to allow linear access.

## COPYRIGHT
