audit_dpms_api.3 (2010 09)
a
audit_dpms_api(3) audit_dpms_api(3)
NAME
audit_dpms_api: audit_dpms_start(), audit_dpms_end(), audit_dpms_read_event(),
audit_dpms_write_event(), audit_dpms_register_filter() - Audit DPMS Application Program Interface
SYNOPSIS
#include <audit_dpms.h>
#include <audit_dpms_api.h>
cc [flag]... file...
-laudit_dpms [library ]...
int audit_dpms_start(const char *module,
const audit_dpms_stream_type_t stream_type, const void *stream,
const char *options, const int version, audit_dpms_handle_t **dpmh);
int audit_dpms_end(audit_dpms_handle_t *dpmh);
int audit_dpms_read_event(audit_dpms_handle_t *dpmh,
audit_dpms_event_origin_t *origin,
audit_dpms_event_header_t *header,
audit_dpms_event_subject_t *subject,
audit_dpms_event_object_t *object,
audit_dpms_event_details_t *details, char *buffer);
int audit_dpms_write_event(audit_dpms_handle_t *dpmh,
audit_dpms_event_origin_t *origin,
audit_dpms_event_header_t *header,
audit_dpms_event_subject_t *subject,
audit_dpms_event_object_t *object,
audit_dpms_event_details_t *details, char *buffer);
int audit_dpms_register_filter(audit_dpms_handle_t *dpmh,
const char *filepath);
DESCRIPTION
The Audit Data Process Module Switch (Audit DPMS) Application Programming Interface (API) extracts
audit information from a given audit data source, without having any knowledge of the internal data for-
mat. The Audit DPMS API consists of a set of interfaces that an application writer can use. These inter-
faces are described in the Interface Descriptions section.
See audit_dpms (5) for more information. For a typical calling sequence, see the EXAMPLES section
below.
Audit data is passed to or returned from these interfaces in the origin , header, subject , object , and
details structures on a per event basis.
These structures are explained as follows:
origin Contains the information about the host where the event occurred.
header Contains the information about what the event was, when it occurred, whether it
succeeded, and the reason for the failure if it did not succeed.
subject Contains the information about who is responsible for this event, such as real and
effective user name, process id, audit session id, audit tag, command name and the
source host where the user logged in from.
object Contains the information about what file or socket that the event tried to access.
details Contains other miscellaneous information about this event, such as system call
arguments and self-auditing text
See
<audit_dpms.h> for details of each field represented in these data structures, their names, data
types, and descriptions. Note that all string values in these structures are stored in the buffer provided
in the buffer argument, and are represented in the structures as the offset in the global buffer argument
and the length of the string including the null terminator.
Interface Descriptions
audit_dpms_start()
Loads the DPMS service module specified by the module argument, allocates space
for the handle, performs other initialization activities, and then returns a pointer to
the handle in the dpmh argument. The libaudit_dpms library uses the handle
HP-UX 11i Version 3: September 2010 − 1 − Hewlett-Packard Company 1