Previous Topic: tcllca: The LCA ExtensionNext Topic: Glossary


Obsolete API

This section contains the following topics:

The eAC IR API

Structures

Possible Return Values

Functions

The eAC IR API

This library supplies an interface to CA ControlMinder log files - seos.audit and seos.audit.bak.

This API enables an external application to view audit records in chronological order.

Important! The API described in this appendix is obsolete and is available for backward comparability purposes only. Refer to the current IR API described earlier in this guide.

Structures

Data Position

typedef struct
{
	char filename[MAX_PATH];		current log file
  	off_t offset;				offset
  	unsigned char md5_1[16];		md5 signature of current log file
  	unsigned char md5_2[16];		md5 signature of next log file
} IRDataPosition;

UT8 Interpreted Audit Record

typedef struct tagSeosUTF8LogInterpreted
{
	char *Label;		Label of an audit field in the record
	char *Value;		Value assigned in the audit record to the field
} SEOS_UTF8AUDLOGINTERP; 

Possible Return Values


Reason Code

Integer Value


Meaning

IR_EAC_SUCCESS

0

success

IR_EAC_NO_MORE_DATA

1

no more data

IR_EAC_DATA_LOST

2

data lost

IR_EAC_GENERAL_FAIL

3

general failure

IR_EAC_PSBLY_DATA_LOST

4

possibly lost data

Functions

int eacIR_LogInit(IRDataPosition *pos);

Gets the audit filenames (from the CA ControlMinder settings);

Resets the offset in order to get the oldest log file, and opens it for read - the audit record.

Initializes the IRDataPosition pointer for calling eacIR_LogGetNext().

If the function succeeds, it returns IR_EAC_SUCCESS.

If the function fails, it returns IR_EAC_GENERAL_FAIL

IRDataPosition

(OUT) pointer to IRDataPosition structure.

int eacIR_LogReset(IRDataPosition *pos);

Opens log file (if still exists) according to a given (argument) data position.

Enables you to go back to an old (saved) state and continue from there.

If the function succeeds, it returns IR_EAC_SUCCESS.

If the function fails, it returns IR_EAC_GENERAL_FAIL

IRDataPosition

(IN) pointer to IRDataPosition structure.

int eacIR_LogGetNext(IRDataPosition *pos, SEOS_UTF8AUDLOGINTERP **ppUtfMsg, int *log_type);

Returns the next log record and its type according to a given data position.

Possible return values are:

Condition

Value

Success

IR_EAC_SUCCESS

No more data

IR_EAC_NO_MORE_DATA

data lost

IR_EAC_DATA_LOST

general failure

IR_EAC_GENERAL_FAIL

possibly data lost

IR_EAC_PSBLY_DATA_LOST

IRDataPosition

(IN) pointer to IRDataPosition - represents the position to get the next log record from.

UTF8 strings

(OUT) pointer to (UTF8 strings) interpreted record.

int

(OUT) pointer to int - represents the next log record type.

int eacIR_LogTerminate(void);

Closes log file for read. Call it when finished working with API.

If the function succeeds, it returns IR_EAC_SUCCESS.

If the function fails, it returns IR_EAC_GENERAL_FAIL

void eacIR_LogFreeInterpretRecord(void);

This function frees the last interpreted record.

There are no return values for this function.

Note: eacIR_LogGetNext() API calls the same internal function each time it runs, so you do not need to use this API before calling for next log record.

char *eacIR_LogGetVersion(void);

Returns the API version as a string.

The return value is the version number as a string.