AUPARSE_ADD_CALLBACK(3)
π NAME π
auparse_add_callback β bestie, it adds a callback handler for notifications β¨
π SYNOPSIS π
#include <auparse.h>
void auparse_add_callback(auparse_state_t *au, auparse_callback_ptr callback, void *user_data, user_destroy user_destroy_func);
πΈ DESCRIPTION πΈ
Okay so here's the vibe: auparse_add_callback adds a callback function to the parse state, and that callback gets invoked to notify your application about parsing events. It's part of the event feed API π
The signature of the callback is:
void
auparse_callback(auparse_state_t *au, auparse_cb_event_t cb_event_type,
void *user_data);
When the callback is invoked it is passed:
auβ a pointer to the parse_state πcb_event_typeβ enumerated value indicating the reason why the callback was invoked πuser_dataβ pointer to user supplied private data. May beNULL.user_destroy_funcβ pointer to function called whenuser_datais destroyed. May beNULL. The signature is:
void destroy(void *user_data);
The destroy() function should be prepared to accept user_data possibly being NULL. π
The cb_event_type argument indicates why the callback was invoked. It's possible values are:
AUPARSE_CB_EVENT_READYβ A complete event has been parsed and is ready to be examined. This is logically equivalent to the parse state immediately followingauparse_next_event()π¦
See auparse_feed(3) for a complete code example. Go look, it's giving tutorial energy, no cap.
β RETURN VALUE β
None. That's it. Nothing. Zero. Nada. She returns void and she's at peace with that π
π«Ά SEE ALSO π«Ά
auparse_feed(3), auparse_flush_feed(3).
π AUTHOR π
John Dennis π
That's the whole page, bestie β brought to you by the lovely people at Red Hat, dated May 2007. Slay, and happy auditing πβ¨
π¦ where this page comes from
- alpine 3.23: audit-doc 4.1.2-r2 Β· LGPL-2.1-or-later
- alpine 3.24: audit-doc 4.1.2-r6 Β· LGPL-2.1-or-later
- arch rolling: audit 4.2.1-1 Β· GPL-2.0-or-later AND LGPL-2.0-or-later
- centos-stream 10: audit-libs-devel 4.2.1-3.el10 Β· LGPL-2.0-or-later
- fedora 43: audit-libs-devel 4.1.1-2.fc43 Β· LGPL-2.0-or-later
- fedora 43: audit-libs-devel 4.1.1-2.fc43 Β· LGPL-2.0-or-later
- fedora 43: audit-libs-devel 4.2.1-1.fc43 Β· LGPL-2.0-or-later
- fedora 43: audit-libs-devel 4.2.1-1.fc43 Β· LGPL-2.0-or-later
- fedora 44: audit-libs-devel 4.1.4-1.fc44 Β· LGPL-2.0-or-later
- fedora 44: audit-libs-devel 4.1.4-1.fc44 Β· LGPL-2.0-or-later
- fedora 44: audit-libs-devel 4.2.1-1.fc44 Β· LGPL-2.0-or-later
- fedora 44: audit-libs-devel 4.2.1-1.fc44 Β· LGPL-2.0-or-later
- nixpkgs unstable: audit 4.2.1
- ubuntu resolute: libauparse-dev 1:4.1.2-1build1 Β· GPL-2.0-only
- ubuntu resolute: libauparse-dev 1:4.1.2-1ubuntu0.1 Β· GPL-2.0-only
- ubuntu stonking: libauparse-dev 1:4.1.2-1ubuntu1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms