summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/pidl/eventlog/eventlog.idl
blob: cef3c3885e627f6c6f1c1e921bf62a3b5564312f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
#include "idl_types.h"

/* import "lsa.idl", "security.idl";*/

/*
  eventlog interface definition
*/
[ uuid("82273fdc-e32a-18c3-3f78-827929dc23ea"),
  version(0.0),
  pointer_default(unique),
  helpstring("Event Logger")
] interface eventlog
{
	typedef bitmap {
		EVENTLOG_SEQUENTIAL_READ = 0x0001,
		EVENTLOG_SEEK_READ       = 0x0002,
		EVENTLOG_FORWARDS_READ   = 0x0004,
		EVENTLOG_BACKWARDS_READ  = 0x0008
	} eventlogReadFlags;

	typedef bitmap {
		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;

	typedef [public] struct {
		uint32 size;
		uint32 reserved;
		uint32 record_number;
		uint32 time_generated;
		uint32 time_written;
		uint32 event_id;
		uint16 event_type;
		uint16 num_of_strings;
		uint16 event_category;
		uint16 reserved_flags;
		uint32 closing_record_number;
		uint32 stringoffset;
		uint32 sid_length;
		uint32 sid_offset;
		uint32 data_length;
		uint32 data_offset;
		nstring source_name;
		nstring computer_name;
		nstring strings[num_of_strings];
		astring raw_data;
	} eventlog_Record;

	/******************/
	/* Function: 0x00 */
	NTSTATUS eventlog_ClearEventLogW(
		[in] policy_handle *handle,
		[in,unique] lsa_String *backupfilename
	);

	/******************/
	/* Function: 0x01 */
	NTSTATUS eventlog_BackupEventLogW(
		[in] policy_handle *handle,
		[in,unique] lsa_String *backupfilename
	);

	/******************/
	/* Function: 0x02 */
	NTSTATUS eventlog_CloseEventLog(
		[in,out] policy_handle *handle
	);

	/******************/
	/* Function: 0x03 */
	NTSTATUS eventlog_DeregisterEventSource(
		[in,out] policy_handle *handle
	);

	/******************/
	/* Function: 0x04 */
	NTSTATUS eventlog_GetNumRecords(
		[in] policy_handle *handle,
		[out,ref] uint32 *number
	);

	/******************/
	/* Function: 0x05 */
	NTSTATUS eventlog_GetOldestRecord(
		[in] policy_handle *handle,
		[out,ref] uint32 *oldest
	);

	/******************/
	/* Function: 0x06 */
	typedef struct {
		uint32 unknown0;
		uint32 unknown1;
	} eventlog_ChangeUnknown0;

	NTSTATUS eventlog_ChangeNotify(
		[in] policy_handle *handle,
		[in, ref] eventlog_ChangeUnknown0 *unknown2,
		[in] uint32 unknown3
	);

	/******************/
	/* Function: 0x07 */
	NTSTATUS eventlog_OpenEventLogW(
		[in,unique]	    eventlog_OpenUnknown0 *unknown0,
		[in]	    lsa_String Module,
		[in]	    lsa_String RegModuleName,
		[in]	    uint32 MajorVersion,
		[in]	    uint32 MinorVersion,
		[out]   policy_handle *handle
	);

	/******************/
	/* Function: 0x08 */
	NTSTATUS eventlog_RegisterEventSourceW(
		[in,unique]	    eventlog_OpenUnknown0 *unknown0,
		[in]	    lsa_String logname,
		[in]	    lsa_String servername,
		[in]	    uint32 unknown2,
		[in]	    uint32 unknown3,
		[out]   policy_handle *handle
	);

	/******************/
	/* Function: 0x09 */
	NTSTATUS eventlog_OpenBackupEventLogW(
		[in,unique]	    eventlog_OpenUnknown0 *unknown0,
		[in]	    lsa_String logname,
		[in]	    uint32 unknown2,
		[in]	    uint32 unknown3,
		[out]   policy_handle *handle
	);

	/******************/
	/* Function: 0x0a */
	NTSTATUS eventlog_ReadEventLogW(
		[in] policy_handle *handle,
		[in] eventlogReadFlags flags,
		[in] uint32 offset,
		[in] uint32 number_of_bytes,
		[out,size_is(number_of_bytes)] uint8 *data,
		[out,ref] uint32 *sent_size,
		[out,ref] uint32 *real_size
	);

	/*****************/
	/* Function 0x0b */
	NTSTATUS eventlog_ReportEventW(
		[in] policy_handle *handle,
		[in] uint32 time,
		[in] eventlogEventTypes Type,
		[in] uint16 event_category,
		[in] uint32 event_id,
		[in] uint16 num_of_strings,
		[in] uint32 data_length,
		[in] lsa_String computer_name
		/* sid */
	);

	/*****************/
	/* Function 0x0c */
	NTSTATUS eventlog_ClearEventLogA();

	/******************/
	/* Function: 0x0d */
	NTSTATUS eventlog_BackupEventLogA();

	/*****************/
	/* Function 0x0e */
	NTSTATUS eventlog_OpenEventLogA();

	/*****************/
	/* Function 0x0f */
	NTSTATUS eventlog_RegisterEventSourceA();

	/*****************/
	/* Function 0x10 */
	NTSTATUS eventlog_OpenBackupEventLogA();

	/*****************/
	/* Function 0x11 */
	NTSTATUS eventlog_ReadEventLogA();

	/*****************/
	/* Function 0x12 */
	NTSTATUS eventlog_ReportEventA();

	/*****************/
	/* Function 0x13 */
	NTSTATUS eventlog_RegisterClusterSvc();

	/*****************/
	/* Function 0x14 */
	NTSTATUS eventlog_DeregisterClusterSvc();

	/*****************/
	/* Function 0x15 */
	NTSTATUS eventlog_WriteClusterEvents();

	/*****************/
	/* Function 0x16 */
	NTSTATUS eventlog_GetLogIntormation(
		[in] policy_handle *handle,
		[in] uint32 dwInfoLevel,
		[out] [size_is(cbBufSize)] char lpBuffer[*],
		[in] uint32 cbBufSize,
		[out,ref] long *cbBytesNeeded
	);

	/*****************/
	/* Function 0x17 */
	NTSTATUS eventlog_FlushEventLog(
		[in] policy_handle *handle
	);
}