summaryrefslogtreecommitdiff
path: root/librpc/gen_ndr/eventlog.h
blob: 2a9b8246012940dd6e95a429fa3a0c8b1be19f00 (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
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
/* header auto-generated by pidl */

#include <stdint.h>

#include "librpc/gen_ndr/lsa.h"
#include "librpc/gen_ndr/security.h"
#ifndef _HEADER_eventlog
#define _HEADER_eventlog

/* bitmap eventlogReadFlags */
#define EVENTLOG_SEQUENTIAL_READ ( 0x0001 )
#define EVENTLOG_SEEK_READ ( 0x0002 )
#define EVENTLOG_FORWARDS_READ ( 0x0004 )
#define EVENTLOG_BACKWARDS_READ ( 0x0008 )

enum eventlogEventTypes
#ifndef USE_UINT_ENUMS
 {
	EVENTLOG_SUCCESS=0x0000,
	EVENTLOG_ERROR_TYPE=0x0001,
	EVENTLOG_WARNING_TYPE=0x0002,
	EVENTLOG_INFORMATION_TYPE=0x0004,
	EVENTLOG_AUDIT_SUCCESS=0x0008,
	EVENTLOG_AUDIT_FAILURE=0x0010
}
#else
 { __donnot_use_enum_eventlogEventTypes=0x7FFFFFFF}
#define EVENTLOG_SUCCESS ( 0x0000 )
#define EVENTLOG_ERROR_TYPE ( 0x0001 )
#define EVENTLOG_WARNING_TYPE ( 0x0002 )
#define EVENTLOG_INFORMATION_TYPE ( 0x0004 )
#define EVENTLOG_AUDIT_SUCCESS ( 0x0008 )
#define EVENTLOG_AUDIT_FAILURE ( 0x0010 )
#endif
;

struct eventlog_OpenUnknown0 {
	uint16_t unknown0;
	uint16_t unknown1;
};

struct eventlog_Record_tdb {
	uint32_t size;
	const char *reserved;/* [value("eLfL"),charset(DOS)] */
	uint32_t record_number;
	time_t time_generated;
	time_t time_written;
	uint32_t event_id;
	enum eventlogEventTypes event_type;
	uint16_t num_of_strings;/* [range(0,256)] */
	uint16_t event_category;
	uint16_t reserved_flags;
	uint32_t closing_record_number;
	uint32_t stringoffset;
	uint32_t sid_length;/* [value(sid.length)] */
	uint32_t sid_offset;
	uint32_t data_length;/* [value(data.length)] */
	uint32_t data_offset;
	uint32_t source_name_len;/* [value(2*strlen_m_term(source_name))] */
	const char * source_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */
	uint32_t computer_name_len;/* [value(2*strlen_m_term(computer_name))] */
	const char * computer_name;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */
	uint32_t sid_padding;
	DATA_BLOB sid;
	uint32_t strings_len;/* [value(2*ndr_size_string_array(strings,num_of_strings,LIBNDR_FLAG_STR_NULLTERM))] */
	const char * *strings;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */
	DATA_BLOB data;
	uint32_t padding;
}/* [public,flag(LIBNDR_FLAG_NOALIGN|LIBNDR_PRINT_ARRAY_HEX)] */;

enum EVENTLOG_HEADER_FLAGS
#ifndef USE_UINT_ENUMS
 {
	ELF_LOGFILE_HEADER_DIRTY=0x0001,
	ELF_LOGFILE_HEADER_WRAP=0x0002,
	ELF_LOGFILE_LOGFULL_WRITTEN=0x0004,
	ELF_LOGFILE_ARCHIVE_SET=0x0008
}
#else
 { __donnot_use_enum_EVENTLOG_HEADER_FLAGS=0x7FFFFFFF}
#define ELF_LOGFILE_HEADER_DIRTY ( 0x0001 )
#define ELF_LOGFILE_HEADER_WRAP ( 0x0002 )
#define ELF_LOGFILE_LOGFULL_WRITTEN ( 0x0004 )
#define ELF_LOGFILE_ARCHIVE_SET ( 0x0008 )
#endif
;

struct EVENTLOGHEADER {
	uint32_t HeaderSize;/* [value(0x30)] */
	const char *Signature;/* [value("LfLe"),charset(DOS)] */
	uint32_t MajorVersion;/* [value] */
	uint32_t MinorVersion;/* [value] */
	uint32_t StartOffset;
	uint32_t EndOffset;
	uint32_t CurrentRecordNumber;
	uint32_t OldestRecordNumber;
	uint32_t MaxSize;
	enum EVENTLOG_HEADER_FLAGS Flags;
	uint32_t Retention;
	uint32_t EndHeaderSize;/* [value(0x30)] */
}/* [public] */;

struct EVENTLOGRECORD {
	uint32_t Length;
	const char *Reserved;/* [value("LfLe"),charset(DOS)] */
	uint32_t RecordNumber;
	time_t TimeGenerated;
	time_t TimeWritten;
	uint32_t EventID;
	enum eventlogEventTypes EventType;
	uint16_t NumStrings;
	uint16_t EventCategory;
	uint16_t ReservedFlags;
	uint32_t ClosingRecordNumber;
	uint32_t StringOffset;/* [value(56+2*(strlen_m_term(SourceName)+strlen_m_term(Computername))+UserSidLength)] */
	uint32_t UserSidLength;/* [value(ndr_size_dom_sid0(&UserSid,ndr->flags))] */
	uint32_t UserSidOffset;/* [value(56+2*(strlen_m_term(SourceName)+strlen_m_term(Computername)))] */
	uint32_t DataLength;
	uint32_t DataOffset;/* [value(56+2*(strlen_m_term(SourceName)+strlen_m_term(Computername))+UserSidLength+(2*ndr_size_string_array(Strings,NumStrings,LIBNDR_FLAG_STR_NULLTERM)))] */
	const char * SourceName;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */
	const char * Computername;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */
	struct dom_sid0 UserSid;/* [subcontext_size(UserSidLength),subcontext(0),flag(LIBNDR_FLAG_ALIGN4)] */
	const char * *Strings;/* [flag(LIBNDR_FLAG_STR_NULLTERM)] */
	uint8_t *Data;/* [flag(LIBNDR_PRINT_ARRAY_HEX)] */
	const char * Pad;/* [flag(LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM)] */
	uint32_t Length2;/* [value(Length)] */
}/* [gensize,public] */;

struct EVENTLOGEOF {
	uint32_t RecordSizeBeginning;/* [value(0x28)] */
	uint32_t One;/* [value(0x11111111)] */
	uint32_t Two;/* [value(0x22222222)] */
	uint32_t Three;/* [value(0x33333333)] */
	uint32_t Four;/* [value(0x44444444)] */
	uint32_t BeginRecord;
	uint32_t EndRecord;
	uint32_t CurrentRecordNumber;
	uint32_t OldestRecordNumber;
	uint32_t RecordSizeEnd;/* [value(0x28)] */
}/* [public] */;

struct EVENTLOG_EVT_FILE {
	struct EVENTLOGHEADER hdr;
	struct EVENTLOGRECORD *records;
	struct EVENTLOGEOF eof;
}/* [public] */;

struct EVENTLOG_FULL_INFORMATION {
	uint32_t full;
};


struct eventlog_ClearEventLogW {
	struct {
		struct policy_handle *handle;/* [ref] */
		struct lsa_String *backupfile;/* [unique] */
	} in;

	struct {
		NTSTATUS result;
	} out;

};


struct eventlog_BackupEventLogW {
	struct {
		struct policy_handle *handle;/* [ref] */
		struct lsa_String *backup_filename;/* [ref] */
	} in;

	struct {
		NTSTATUS result;
	} out;

};


struct eventlog_CloseEventLog {
	struct {
		struct policy_handle *handle;/* [ref] */
	} in;

	struct {
		struct policy_handle *handle;/* [ref] */
		NTSTATUS result;
	} out;

};


struct eventlog_DeregisterEventSource {
	struct {
		struct policy_handle *handle;/* [ref] */
	} in;

	struct {
		struct policy_handle *handle;/* [ref] */
		NTSTATUS result;
	} out;

};


struct eventlog_GetNumRecords {
	struct {
		struct policy_handle *handle;/* [ref] */
	} in;

	struct {
		uint32_t *number;/* [ref] */
		NTSTATUS result;
	} out;

};


struct eventlog_GetOldestRecord {
	struct {
		struct policy_handle *handle;/* [ref] */
	} in;

	struct {
		uint32_t *oldest_entry;/* [ref] */
		NTSTATUS result;
	} out;

};


struct eventlog_ChangeNotify {
	struct {
		NTSTATUS result;
	} out;

};


struct eventlog_OpenEventLogW {
	struct {
		struct eventlog_OpenUnknown0 *unknown0;/* [unique] */
		struct lsa_String *logname;/* [ref] */
		struct lsa_String *servername;/* [ref] */
		uint32_t major_version;
		uint32_t minor_version;
	} in;

	struct {
		struct policy_handle *handle;/* [ref] */
		NTSTATUS result;
	} out;

};


struct eventlog_RegisterEventSourceW {
	struct {
		struct eventlog_OpenUnknown0 *unknown0;/* [unique] */
		struct lsa_String *module_name;/* [ref] */
		struct lsa_String *reg_module_name;/* [ref] */
		uint32_t major_version;
		uint32_t minor_version;
	} in;

	struct {
		struct policy_handle *log_handle;/* [ref] */
		NTSTATUS result;
	} out;

};


struct eventlog_OpenBackupEventLogW {
	struct {
		struct eventlog_OpenUnknown0 *unknown0;/* [unique] */
		struct lsa_String *backup_logname;/* [ref] */
		uint32_t major_version;
		uint32_t minor_version;
	} in;

	struct {
		struct policy_handle *handle;/* [ref] */
		NTSTATUS result;
	} out;

};


struct eventlog_ReadEventLogW {
	struct {
		struct policy_handle *handle;/* [ref] */
		uint32_t flags;
		uint32_t offset;
		uint32_t number_of_bytes;/* [range(0,0x7FFFF)] */
	} in;

	struct {
		uint8_t *data;/* [ref,size_is(number_of_bytes)] */
		uint32_t *sent_size;/* [ref] */
		uint32_t *real_size;/* [ref] */
		NTSTATUS result;
	} out;

};


struct eventlog_ReportEventW {
	struct {
		struct policy_handle *handle;/* [ref] */
		time_t timestamp;
		enum eventlogEventTypes event_type;
		uint16_t event_category;
		uint32_t event_id;
		uint16_t num_of_strings;/* [range(0,256)] */
		uint32_t data_size;/* [range(0,0x3FFFF)] */
		struct lsa_String *servername;/* [ref] */
		struct dom_sid *user_sid;/* [unique] */
		struct lsa_String **strings;/* [unique,size_is(num_of_strings)] */
		uint8_t *data;/* [unique,size_is(data_size)] */
		uint16_t flags;
		uint32_t *record_number;/* [unique] */
		time_t *time_written;/* [unique] */
	} in;

	struct {
		uint32_t *record_number;/* [unique] */
		time_t *time_written;/* [unique] */
		NTSTATUS result;
	} out;

};


struct eventlog_ClearEventLogA {
	struct {
		NTSTATUS result;
	} out;

};


struct eventlog_BackupEventLogA {
	struct {
		NTSTATUS result;
	} out;

};


struct eventlog_OpenEventLogA {
	struct {
		NTSTATUS result;
	} out;

};


struct eventlog_RegisterEventSourceA {
	struct {
		NTSTATUS result;
	} out;

};


struct eventlog_OpenBackupEventLogA {
	struct {
		NTSTATUS result;
	} out;

};


struct eventlog_ReadEventLogA {
	struct {
		NTSTATUS result;
	} out;

};


struct eventlog_ReportEventA {
	struct {
		NTSTATUS result;
	} out;

};


struct eventlog_RegisterClusterSvc {
	struct {
		NTSTATUS result;
	} out;

};


struct eventlog_DeregisterClusterSvc {
	struct {
		NTSTATUS result;
	} out;

};


struct eventlog_WriteClusterEvents {
	struct {
		NTSTATUS result;
	} out;

};


struct eventlog_GetLogInformation {
	struct {
		struct policy_handle *handle;/* [ref] */
		uint32_t level;
		uint32_t buf_size;/* [range(0,1024)] */
	} in;

	struct {
		uint8_t *buffer;/* [ref,size_is(buf_size)] */
		uint32_t *bytes_needed;/* [ref] */
		NTSTATUS result;
	} out;

};


struct eventlog_FlushEventLog {
	struct {
		struct policy_handle *handle;/* [ref] */
	} in;

	struct {
		NTSTATUS result;
	} out;

};


struct eventlog_ReportEventAndSourceW {
	struct {
		struct policy_handle *handle;/* [ref] */
		time_t timestamp;
		enum eventlogEventTypes event_type;
		uint16_t event_category;
		uint32_t event_id;
		struct lsa_String *sourcename;/* [ref] */
		uint16_t num_of_strings;/* [range(0,256)] */
		uint32_t data_size;/* [range(0,0x3FFFF)] */
		struct lsa_String *servername;/* [ref] */
		struct dom_sid *user_sid;/* [unique] */
		struct lsa_String **strings;/* [unique,size_is(num_of_strings)] */
		uint8_t *data;/* [unique,size_is(data_size)] */
		uint16_t flags;
		uint32_t *record_number;/* [unique] */
		time_t *time_written;/* [unique] */
	} in;

	struct {
		uint32_t *record_number;/* [unique] */
		time_t *time_written;/* [unique] */
		NTSTATUS result;
	} out;

};

#endif /* _HEADER_eventlog */