---
name: "auparse_new_buffer"
section: "3"
platform: "linux"
package: "audit"
version: "4.2.1-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/auparse_new_buffer"
---

# auparse\_new\_buffer(3)

replace the buffer in the parser

## NAME

auparse\_new\_buffer - replace the buffer in the parser

## SYNOPSIS

**#include \<auparse.h\>**

```
int auparse_new_buffer(auparse_state_t *au,constchar*"data,size_t"data_len);"
```

- *au*

  The audit parse state

- *data*

  A buffer of data to give to the parser, it is *data\_len* bytes long. The data is copied into the parser without modifying the original. Upon return the caller may free or reuse the data buffer.

- *data\_len*

  The number of bytes in *data*

## DESCRIPTION

*auparse\_new\_buffer* replaces the data that the parser works on. *auparse\_init()* must have been called with a source type of AUSOURCE\_BUFFER.

## RETURN VALUE

Returns 1 if an error occurs; otherwise, 0 for success.

## SEE ALSO

[**auparse\_init**(3)](/auparse_init/3.md)
