AUPARSE_NEW_BUFFER(3)

πŸ“¦
version 4.2.1 Β· 2 versions
, in alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, fedora 43, fedora 44, nixpkgs unstable, ubuntu resolute, ubuntu stonking

πŸ’– AUPARSE_NEW_BUFFER πŸ’–

okay so bestie, this is the manual page for auparse_new_buffer from the Linux Audit API (that's the section 3 library page, iykyk) ✨


🌸 NAME 🌸

auparse_new_buffer β€” swap out the buffer the parser is working on, like trading out your phone case but for data πŸŽ€


✨ SYNOPSIS ✨

#include <auparse.h>

int auparse_new_buffer(auparse_state_t *au, const char *data, size_t data_len);

And here's the tea on every single argument, no skipping, we're thorough in this house:

  • au β€” the audit parse state, aka the main character of this whole operation πŸ‘‘
  • data β€” a buffer of data you're handing over to the parser. It's data_len bytes long. The data gets copied into the parser without modifying the original, so the second you get back you can free it or reuse it, do whatever, it's yours again πŸ¦‹
  • data_len β€” literally just the number of bytes in data. that's it. that's the whole job πŸ’…

πŸ’œ DESCRIPTION πŸ’œ

auparse_new_buffer replaces the data that the parser works on. it's giving "out with the old, in with the new" 🌈

⚠️ but hold up β€” auparse_init() must have been called with a source type of AUSOURCE_BUFFER first, or this whole vibe check fails. no cap.

πŸ”₯ RETURN VALUE πŸ”₯

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

so yeah, it's one of those functions where 0 is the slay outcome and 1 is the "we have a problem" outcome 😭 don't get it twisted.


πŸ‘‘ SEE ALSO πŸ‘‘

auparse_init(3) β€” go read that one too, it's the prerequisite bestie, they're a package deal 🫢


Red Hat, June 2025 β€” mwah, that's the source, the version and the date, all wrapped up with a bow πŸŽ€πŸ’– bye bestie, go parse something iconic ✨