2006-09-18 23:02:06 +04:00
#include "idl_types.h"
/*
eventlog interface definition
*/
2008-01-17 15:56:47 +03:00
2006-11-07 02:20:35 +03:00
import "lsa.idl", "security.idl";
2006-09-18 23:02:06 +04:00
[ uuid("82273fdc-e32a-18c3-3f78-827929dc23ea"),
version(0.0),
2006-09-20 02:14:34 +04:00
helpstring("Event Logger")
2006-09-18 23:02:06 +04:00
] interface eventlog
{
2008-11-20 15:29:44 +03:00
typedef [bitmap32bit] bitmap {
2006-09-18 23:02:06 +04:00
EVENTLOG_SEQUENTIAL_READ = 0x0001,
EVENTLOG_SEEK_READ = 0x0002,
EVENTLOG_FORWARDS_READ = 0x0004,
EVENTLOG_BACKWARDS_READ = 0x0008
} eventlogReadFlags;
2009-01-13 15:14:36 +03:00
typedef [public] enum {
2006-09-18 23:02:06 +04:00
EVENTLOG_SUCCESS = 0x0000,
EVENTLOG_ERROR_TYPE = 0x0001,
EVENTLOG_WARNING_TYPE = 0x0002,
EVENTLOG_INFORMATION_TYPE = 0x0004,
EVENTLOG_AUDIT_SUCCESS = 0x0008,
EVENTLOG_AUDIT_FAILURE = 0x0010
} eventlogEventTypes;
typedef struct {
uint16 unknown0;
uint16 unknown1;
} eventlog_OpenUnknown0;
2009-01-13 15:14:36 +03:00
typedef [flag(NDR_NOALIGN),public] struct {
2006-09-18 23:02:06 +04:00
uint32 size;
2009-01-13 15:14:36 +03:00
[charset(DOS),value("eLfL")] uint8 reserved[4];
2006-09-18 23:02:06 +04:00
uint32 record_number;
2009-01-12 15:45:38 +03:00
time_t time_generated;
time_t time_written;
2006-09-18 23:02:06 +04:00
uint32 event_id;
2009-01-13 15:14:36 +03:00
eventlogEventTypes event_type;
2009-01-18 01:42:20 +03:00
[range(0,256)] uint16 num_of_strings;
2006-09-18 23:02:06 +04:00
uint16 event_category;
uint16 reserved_flags;
uint32 closing_record_number;
uint32 stringoffset;
2009-01-12 15:45:38 +03:00
[value(ndr_size_dom_sid0(&sid, ndr->flags))] uint32 sid_size;
2006-09-18 23:02:06 +04:00
uint32 sid_offset;
uint32 data_length;
uint32 data_offset;
nstring source_name;
nstring computer_name;
2009-01-12 15:45:38 +03:00
[subcontext(0),subcontext_size(sid_size)] dom_sid0 sid;
2006-09-18 23:02:06 +04:00
nstring strings[num_of_strings];
astring raw_data;
2009-01-12 15:45:38 +03:00
[flag(NDR_ALIGN4)] DATA_BLOB _padding;
[value(size)] uint32 size2;
2006-09-18 23:02:06 +04:00
} eventlog_Record;
/******************/
/* Function: 0x00 */
NTSTATUS eventlog_ClearEventLogW(
[in] policy_handle *handle,
2008-02-04 12:14:08 +03:00
[in,unique] lsa_String *backupfile
2006-09-18 23:02:06 +04:00
);
/******************/
/* Function: 0x01 */
2008-09-17 17:43:04 +04:00
[todo] NTSTATUS eventlog_BackupEventLogW();
2006-09-18 23:02:06 +04:00
/******************/
/* Function: 0x02 */
NTSTATUS eventlog_CloseEventLog(
[in,out] policy_handle *handle
);
/******************/
/* Function: 0x03 */
2008-09-17 17:07:24 +04:00
[todo] NTSTATUS eventlog_DeregisterEventSource();
2006-09-18 23:02:06 +04:00
/******************/
/* Function: 0x04 */
NTSTATUS eventlog_GetNumRecords(
[in] policy_handle *handle,
2009-01-12 15:45:04 +03:00
[out,ref] uint32 *number
2006-09-18 23:02:06 +04:00
);
/******************/
/* Function: 0x05 */
2008-02-04 12:42:33 +03:00
NTSTATUS eventlog_GetOldestRecord(
[in] policy_handle *handle,
[out,ref] uint32 *oldest_entry
);
2006-09-18 23:02:06 +04:00
/******************/
/* Function: 0x06 */
2008-09-17 17:43:04 +04:00
[todo] NTSTATUS eventlog_ChangeNotify();
2006-09-18 23:02:06 +04:00
/******************/
/* Function: 0x07 */
NTSTATUS eventlog_OpenEventLogW(
[in,unique] eventlog_OpenUnknown0 *unknown0,
2008-02-04 13:07:41 +03:00
[in,ref] lsa_String *logname,
[in,ref] lsa_String *servername,
2008-11-20 15:29:44 +03:00
[in] uint32 major_version,
[in] uint32 minor_version,
2006-09-18 23:02:06 +04:00
[out] policy_handle *handle
);
/******************/
/* Function: 0x08 */
2008-09-17 17:43:04 +04:00
[todo] NTSTATUS eventlog_RegisterEventSourceW();
2006-09-18 23:02:06 +04:00
/******************/
/* Function: 0x09 */
2008-09-17 17:43:04 +04:00
[todo] NTSTATUS eventlog_OpenBackupEventLogW();
2006-09-18 23:02:06 +04:00
/******************/
/* Function: 0x0a */
NTSTATUS eventlog_ReadEventLogW(
[in] policy_handle *handle,
2008-11-20 15:29:44 +03:00
[in] eventlogReadFlags flags,
2006-09-18 23:02:06 +04:00
[in] uint32 offset,
2008-02-04 13:27:22 +03:00
[in] [range(0,0x7FFFF)] uint32 number_of_bytes,
[out,ref,size_is(number_of_bytes)] uint8 *data,
[out,ref] uint32 *sent_size,
[out,ref] uint32 *real_size
2006-09-18 23:02:06 +04:00
);
/*****************/
/* Function 0x0b */
2009-01-20 20:32:01 +03:00
NTSTATUS eventlog_ReportEventW(
[in] policy_handle *handle,
[in] time_t timestamp,
[in] eventlogEventTypes event_type,
[in] uint16 event_category,
[in] uint32 event_id,
[in] [range(0,256)] uint16 num_of_strings,
[in] [range(0,0x3FFFF)] uint32 data_size,
[in,ref] lsa_String *servername,
[in,unique] dom_sid *user_sid,
[in,unique] [size_is(num_of_strings)] lsa_String **strings,
[in,unique] [size_is(data_size)] uint8 *data,
[in] uint16 flags,
[in,out,unique] uint32 *record_number,
[in,out,unique] time_t *time_written
);
2006-09-18 23:02:06 +04:00
/*****************/
/* Function 0x0c */
2008-09-17 17:43:04 +04:00
[todo] NTSTATUS eventlog_ClearEventLogA();
2006-09-18 23:02:06 +04:00
/******************/
/* Function: 0x0d */
2008-09-17 17:43:04 +04:00
[todo] NTSTATUS eventlog_BackupEventLogA();
2006-09-18 23:02:06 +04:00
/*****************/
/* Function 0x0e */
2008-09-17 17:43:04 +04:00
[todo] NTSTATUS eventlog_OpenEventLogA();
2006-09-18 23:02:06 +04:00
/*****************/
/* Function 0x0f */
2008-09-17 17:43:04 +04:00
[todo] NTSTATUS eventlog_RegisterEventSourceA();
2006-09-18 23:02:06 +04:00
/*****************/
/* Function 0x10 */
2008-09-17 17:43:04 +04:00
[todo] NTSTATUS eventlog_OpenBackupEventLogA();
2006-09-18 23:02:06 +04:00
/*****************/
/* Function 0x11 */
2008-09-17 17:43:04 +04:00
[todo] NTSTATUS eventlog_ReadEventLogA();
2006-09-18 23:02:06 +04:00
/*****************/
/* Function 0x12 */
2008-09-17 17:43:04 +04:00
[todo] NTSTATUS eventlog_ReportEventA();
2006-09-18 23:02:06 +04:00
/*****************/
/* Function 0x13 */
2008-09-17 17:43:04 +04:00
[todo] NTSTATUS eventlog_RegisterClusterSvc();
2006-09-18 23:02:06 +04:00
/*****************/
/* Function 0x14 */
2008-09-17 17:43:04 +04:00
[todo] NTSTATUS eventlog_DeregisterClusterSvc();
2006-09-18 23:02:06 +04:00
/*****************/
/* Function 0x15 */
2008-09-17 17:43:04 +04:00
[todo] NTSTATUS eventlog_WriteClusterEvents();
2006-09-18 23:02:06 +04:00
/*****************/
/* Function 0x16 */
2009-01-20 20:56:34 +03:00
typedef struct {
boolean32 full;
} EVENTLOG_FULL_INFORMATION;
NTSTATUS eventlog_GetLogIntormation(
[in] policy_handle *handle,
[in] uint32 level,
[out,ref] [size_is(buf_size)] uint8 *buffer,
[in] [range(0,1024)] uint32 buf_size,
[out,ref] uint32 *bytes_needed
);
2006-09-18 23:02:06 +04:00
/*****************/
/* Function 0x17 */
NTSTATUS eventlog_FlushEventLog(
[in] policy_handle *handle
);
}