cobaudit_event (deprecated)

Outputs an audit event.
Note: Audit Manager is deprecated and provided for backward compatibility only. We recommend that you use syslog events instead. See Enterprise Server Auditing for more information.
Restriction: This topic applies only when the Enterprise Server feature is enabled.

Syntax:

cobrtncode_t cobaudit_event(cobuns32_t      flags_p,
               	const cobuns8_t *component_id,
               	AUDIT_EVENT     *audit_event)
Table 1. Parameters
  Typedef Picture
flags cblt-x4-comp5 pic x(4) comp-5
component-id pic x(n) pic x(n)
audit-event cblt-aud-event Group containing
cblte-audevt-version cblt-x4-comp5 pic x(4) comp-5
cblte-audevt-flags cblt-x4-comp5 pic x(4) comp-5
cblte-audevt-id cblt-x4-comp5 pic x(4) comp-5
cblte-audevt-category cblt-x4-comp5 pic x(4) comp-5
cblte-audevt-data-count cblt-x4-comp5 pic x(4) comp-5
cblte-audevt-reserved1 cblt-x4-comp5 pic x(4) comp-5 occurs 7
cblte-audevt-event-len cblt-pointer pointer
cblte-audevt-event-type cblt-pointer pointer
cblte-audevt-event-data cblt-pointer pointer
cblte-audevt-reserved2 cblt-pointer pointer occurs 7

On Entry:

Control flags
Bit Value Meaning
0-12 Reserved for future use (must be 0)
13 0 cblte-audevt-event-data is an array of pointers to trace data of varying size and type. The corresponding elements of the cblte-audevt-event-len and cblte-audevt-event-type arrays need to be set up.
  1 cblte-audevt-event-data is an array of pointers to trace data of the same size and type. Only the first element of cblte-audevt-event-len and cblte-audevt-event-type need to be set up.
14-29   Reserved for future use (must be 0)
30 0 component-id is space-terminated
  1 component-id is null-terminated
    (ignored if bit 31 unset)
31 0 component-id is an audit handle created by CBL_AUDIT_HANDLE_GET (pic x(4) comp-5).
  1 component-id is a text string (pic x(n)) . The termination character for the string is defined by bit 30.
component_id
Component identifier. This will either be a 32-bit unsigned integer tracer handle (See CBL_AUDIT_HANDLE_GET() - Get an Audit Handle for details about how a component acquires an audit handle) if bit 31 of flags is not set, or a text identifier if bit 31 of flags is set.
audit_event
Audit event structure
version Structure version. Must be 0.
flags Control flags. Must be 0.
event_id Component specific event identifier used to identify the type of event being output.
event_category Audit event category.
data_count Number of audit data items. Indicates the number of elements in the event_len, event_type, and event_data arrays. May be 0.
event_len Pointer to array of 32-bit unsigned integers. Each array element indicates the length of the corresponding audit data item in the event_data array. May be NULL if data_count is 0.
event_type Pointer to array of 32-bit unsigned integers. Each array element indicates the type of the corresponding audit data item in the event_data array. May be NULL if data_count is 0.
Any value other than the ones specified above will be treated as type 0 (binary).
0 Binary 
1 Text (local encoding) 
2 Address 
3 COMP-5 
4 COMP-X 
5 UTF8 
6 Signed COMP-5 
7 Signed COMP-X 
event_data Pointer to array of pointer items. Each array element addresses an audit data item of the type and length indicated by the corresponding element in the event_type and event_len arrays respectively. May be NULL if data_count is 0.

N.B. for address type items, the array element is the address value, and not a pointer to the address value.

On Exit:

Nothing

Return Codes:

AUDIT_RET_SUCCESS
AUDIT_RET_INVALID_HANDLE
AUDIT_RET_INVALID_AUDIT_CATEGORY
AUDIT_RET_NOT_ENOUGH_MEMORY
AUDIT_RET_OUTPUT_ERROR
AUDIT_RET_INVALID_COMPONENT_NAME
AUDIT_RET_NO_SERVER_PROCESS
AUDIT_RET_ACCESS_DENIED
AUDIT_RET_TIMEDOUT

Comments:

cobaudit_event() is intended for use by C programs. It outputs the specified event identified by event_id to one or more output destinations.