1AUPARSE_INIT(3)                 Linux Audit API                AUPARSE_INIT(3)
2
3
4

NAME

6       auparse_init - initialize an instance of the audit parsing library
7

SYNOPSIS

9       #include <auparse.h>
10
11       auparse_state_t *auparse_init(ausource_t source, const void *b);
12
13

DESCRIPTION

15       auparse_init  initializes an instance of the audit parsing library. The
16       function returns an opaque pointer to the parser's internal  state.  It
17       is  used in subsequent calls to the library so. The source variable de‐
18       termines where the library looks for data. Legal values can be:
19
20            AUSOURCE_LOGS - use audit logs
21            AUSOURCE_FILE - use a file
22            AUSOURCE_FILE_ARRAY - use several files
23            AUSOURCE_BUFFER - use a buffer
24            AUSOURCE_BUFFER_ARRAY - use an array of buffers
25            AUSOURCE_DESCRIPTOR - use a particular descriptor
26            AUSOURCE_FILE_POINTER - use a stdio FILE pointer
27            AUSOURCE_FEED - feed data to parser with auparse_feed()
28
29       The pointer 'b' is used to set the file name, array of  filenames,  the
30       buffer  address,  or an array of pointers to buffers, or the descriptor
31       number based on what source is given. When the data source is an  array
32       of  files  or  buffers,  you would create an array of pointers with the
33       last one being a NULL pointer. Buffers should be NUL terminated.
34
35       The data structure returned by auparse_init is not thread-safe. If  you
36       need to use it in a multithreaded program, you will need to add locking
37       around any use of the data structure.
38
39

RETURN VALUE

41       Returns a NULL pointer if an error occurs; otherwise, the return  value
42       is an opaque pointer to the parser's internal state.
43
44

SEE ALSO

46       auparse_reset(3), auparse_destroy(3).  auparse_feed(3).
47
48

AUTHOR

50       Steve Grubb
51
52
53
54Red Hat                            Jan 2023                    AUPARSE_INIT(3)
Impressum