Compresses and uncompresses audit bins.
Security Library (libc.a)
#include <sys/audit.h> #include <stdio.h>
char *auditpack (Expand, Buffer) int Expand; char *Buffer;
The auditpack subroutine can be used to compress or uncompress bins of audit records.
|Specifies the operation. Valid values, as defined in the sys/audit.h header file, are one of the following:
|Specifies the buffer containing the bin to be compressed or uncompressed. This buffer must contain a standard bin as described in the audit.h file.
If the auditpack subroutine is successful, a pointer to a buffer containing the processed audit bin is returned. If unsuccessful, a null pointer is returned and the errno global variable is set to indicate the error.
The auditpack subroutine fails if one or more of the following values is true:
|The Expand parameter is not one of the valid values (AUDIT_PACK or AUDIT_UNPACK).
|The Expand parameter is AUDIT_UNPACK and the packed data in Buffer does not unpack to its original size.
|The Expand parameter is AUDIT_PACK and the bin in the Buffer parameter is already compressed, or the Expand parameter is AUDIT_UNPACK and the bin in the Buffer parameter is already unpacked.
|The auditpack subroutine is unable to allocate space for a new buffer.
This subroutine is part of Base Operating System (BOS) Runtime.
The auditread subroutine.
The auditcat command.
List of Security and Auditing Subroutines and Subroutines Overview in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.