libxdas_impl.h File Reference

XDAS implementation header file. More...

#include <xdas.h>
#include <xdas_base.h>
#include <xdas_buf.h>
#include <stddef.h>
#include <string.h>
#include <stdlib.h>

Go to the source code of this file.

Data Structures

struct  xdas_session_tag
 The internal representation of an xdas_audit_ref_t session handle. More...
struct  xdas_stream_tag
 The internal representation of an xdas_audit_stream_t stream handle. More...
struct  xdas_record_tag
 The internal representation of an xdas_audit_rec_desc_t record handle. More...

Defines

#define MAX_TIME_SRC   1024
#define MAX_TIME_ZONE   128
#define XDAS_SESSION_SIG   0x58444153
#define XDAS_STREAM_SIG   0x5354524D
#define XDAS_RECORD_SIG   0x52435244
Security bit flags
Security bits may be OR'd together to give various levels of access to the XDAS audit system.

These bits are gathered in xdas_set_session_rights called from xdas_initialize_session, and then checked in xdas_session_has_rights, called from most other public functions.

#define XDAS_AUDIT_SERVICE   0x00000001
#define XDAS_AUDIT_SUBMIT   0x00000002
#define XDAS_AUDIT_IMPORT   0x00000004
#define XDAS_AUDIT_CONTROL   0x00000008
#define XDAS_AUDIT_READ   0x00000010
Originator field index values
These definitions represent index values into the xdas_session::org_info array, except for the last value ORG_FLD_COUNT, which is the number of elements in the array, and is used to allocate the array to the proper size.

#define ORG_FLD_LOC_NAME   0
#define ORG_FLD_LOC_ADDR   1
#define ORG_FLD_SVC_TYPE   2
#define ORG_FLD_ATH_AUTH   3
#define ORG_FLD_PRN_NAME   4
#define ORG_FLD_PRN_ID   5
#define ORG_FLD_COUNT   6
Initiator field index values
These definitions represent index values into the xdas_record::int_info array, except for the last value INT_FLD_COUNT, which is the number of elements in the array, and is used to allocate the array to the proper size.

#define INT_FLD_ATH_AUTH   0
#define INT_FLD_PRN_NAME   1
#define INT_FLD_PRN_ID   2
#define INT_FLD_COUNT   3
Target field index values
These definitions represent index values into the xdas_record::tgt_info array, except for the last value TGT_FLD_COUNT, which is the number of elements in the array, and is used to allocate the array to the proper size.

#define TGT_FLD_LOC_NAME   0
#define TGT_FLD_LOC_ADDR   1
#define TGT_FLD_SVC_TYPE   2
#define TGT_FLD_ATH_AUTH   3
#define TGT_FLD_PRN_NAME   4
#define TGT_FLD_PRN_ID   5
#define TGT_FLD_COUNT   6

Typedefs

typedef struct xdas_session_tag xdas_session
 The internal representation of an xdas_audit_ref_t session handle.
typedef struct xdas_stream_tag xdas_stream
 The internal representation of an xdas_audit_stream_t stream handle.
typedef struct xdas_record_tag xdas_record
 The internal representation of an xdas_audit_rec_desc_t record handle.

Functions

int xdas_internal_create_filter (int *minor, const char *name, unsigned type, const char *exp, const char *act)
 Internal version of xdas_create_filter.
int xdas_internal_delete_filter (int *minor, const char *name)
 Internal version of xdas_delete_filter.
int xdas_internal_enable_filter (int *minor, const char *name, int enable)
 Internal version of xdas_enable_filter and xdas_disable_filter.
int xdas_internal_get_filter (int *minor, const char *name, unsigned *type, xdas_buffer_t exp, xdas_buffer_t act, unsigned *status)
 Internal version of xdas_get_filter.
int xdas_internal_list_filters (int *minor, char **names, size_t *bufszp)
 Internal version of xdas_list_filters.
xdas_sessionxdas_validate_session (xdas_audit_ref_t das_ref)
 Validate an XDAS session handle - return a pointer to an xdas_session.
void xdas_set_session_rights (xdas_session *xs)
 Retrieve system security information and set audit security bits.
int xdas_session_has_rights (xdas_session *xs, unsigned rights)
 Determine if the caller has the specified rights.
int xdas_set_time_info (xdas_session *xs)
 Set time information in an xdas_session structure.
void xdas_internal_terminate_session (xdas_session *xs)
 Release an xdas_session structure back to the heap.
xdas_streamxdas_validate_stream (xdas_audit_stream_t stream_ref)
 Validate an XDAS stream handle - return a pointer to the xdas_stream.
void xdas_internal_close_audit_stream (xdas_stream *xt)
 Internal version of xdas_close_audit_stream.
int xdas_internal_get_next (int *minor, xdas_stream *xt, unsigned maxrecs, xdas_buffer_t bufp, unsigned *recsoutp)
 Retrieve the next set of records from the specified audit stream.
int xdas_internal_parse_record (int *minor, xdas_buffer_t bufp, unsigned recno, xdas_audit_record_t recp)
 Internal version of xdas_parse_record.
int xdas_internal_rewind_audit_stream (int *minor, xdas_stream *xt)
 Internal version of xdas_rewind_audit_stream.
int xdas_internal_open_audit_stream (int *minor, xdas_session *xs, xdas_stream *xt)
 Open an audit stream.
int xdas_internal_import_event_records (int *minor, xdas_session *xs, xdas_buffer_t bufp, size_t *bufposp)
 Import specified event records.
xdas_recordxdas_validate_record (xdas_audit_rec_desc_t record_ref)
 Validate an XDAS record handle - return a pointer to the xdas_record.
unsigned xdas_get_next_record_number (void)
 Return the next sequential value in a global record number.
void xdas_set_record_timestamp (xdas_record *xr)
 Set the timestamp value on an xdas_record.
void xdas_internal_discard_record (xdas_record *xr)
 Release resources held by an xdas_record.
int xdas_is_valid_outcome (unsigned outcome)
 Validate an XDAS outcome code.
int xdas_send_record (int *minor, xdas_session *xs, xdas_record *xr, int eval, int import)
 Check or commit data in a session and a record.
void xdas_service_disconnect (xdas_session *xs)
 Disconnect from service if connected.
int xdas_service_connect (int *minor, xdas_session *xs)
 Establish a connection with the local xdasd service.
int xdas_req_rsp (int *minorp, xdas_session *xs)
 Send an xdas service request, receive a response.
int xdas_library_init (int *minorp)
 Initialize libxdas library.


Detailed Description

XDAS implementation header file.

This header file is common to all client library implementation source files. It contains prototypes for all internal public functions, and common data structures shared among these source files.

Author:
John Calcote (jcalcote@novell.com)
Attention:
Please submit patches to http://openxdas.sourceforge.net

Definition in file libxdas_impl.h.


Define Documentation

#define XDAS_RECORD_SIG   0x52435244

'RCRD'

Definition at line 200 of file libxdas_impl.h.

#define XDAS_SESSION_SIG   0x58444153

'XDAS'

Definition at line 115 of file libxdas_impl.h.

#define XDAS_STREAM_SIG   0x5354524D

'STRM'

Definition at line 143 of file libxdas_impl.h.

Referenced by xdas_open_audit_stream(), and xdas_validate_stream().


Generated on Thu Aug 20 22:33:06 2009 for OpenXDAS by  doxygen 1.5.6