---
name: "auparse_flush_feed"
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_flush_feed"
---

# auparse\_flush\_feed(3)

flush any unconsumed feed data through parser.

## NAME

auparse\_flush\_feed - flush any unconsumed feed data through parser.

## SYNOPSIS

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

**int auparse\_flush\_feed(auparse\_state\_t \****au);"*

## DESCRIPTION

*auparse\_flush\_feed* should be called to signal the end of feed input data and flush any pending parse data through the parsing system. *auparse\_add\_callback()* must be called before flushing feed data so that complete events have a consumer. Malformed feed records are rejected and are not passed to the callback. If malformed records are found, parsing continues for the rest of the available feed data before *auparse\_flush\_feed* returns an error.

## RETURN VALUE

Returns -1 if an error occurs; otherwise, 0 for success. When -1 is returned, *errno* is set to indicate the error. The value of *errno* is meaningful only after an error return; callers should not assume it is cleared after a successful call. Applications that may run with libauparse from before audit-4.1.5 should set *errno* to 0 before calling *auparse\_flush\_feed.* If *auparse\_flush\_feed* returns -1 and *errno* is still 0, the runtime library is using the older error behavior and did not set *errno.* Clearing *errno* first avoids treating a pre-existing value as if it were set by *auparse\_flush\_feed.*

## ERRORS

- **EINVAL**

  The parser state is invalid, the parser was not initialized with **AUSOURCE\_FEED,** or no callback has been registered.

- **ENOMEM**

  Memory allocation failed while parsing feed data.

- **EBADMSG**

  A malformed feed record was found. The malformed record was rejected and was not passed to the callback. Parsing continues for the rest of the available feed data before this error is returned.

- **EIO**

  An internal parser failure occurred without a more specific error code.

## SEE ALSO

[**auparse\_feed**(3)](/auparse_feed/3.md), [**auparse\_feed\_age\_events**(3)](/auparse_feed_age_events/3.md), [**auparse\_feed\_has\_data**(3)](/auparse_feed_has_data/3.md)

## AUTHOR

John Dennis
