s3-utils: Use ads_do_search_retry in net ads search
[Samba.git] / librpc / gen_ndr / ndr_eventlog.c
blobf56389bb0079a8b663ad8a5bc4195bb38e78b1e4
1 /* parser auto-generated by pidl */
3 #include "includes.h"
4 #include "../librpc/gen_ndr/ndr_eventlog.h"
6 #include "librpc/gen_ndr/ndr_lsa.h"
7 #include "librpc/gen_ndr/ndr_security.h"
8 static enum ndr_err_code ndr_push_eventlogReadFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
10 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
11 return NDR_ERR_SUCCESS;
14 static enum ndr_err_code ndr_pull_eventlogReadFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
16 uint32_t v;
17 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
18 *r = v;
19 return NDR_ERR_SUCCESS;
22 _PUBLIC_ void ndr_print_eventlogReadFlags(struct ndr_print *ndr, const char *name, uint32_t r)
24 ndr_print_uint32(ndr, name, r);
25 ndr->depth++;
26 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "EVENTLOG_SEQUENTIAL_READ", EVENTLOG_SEQUENTIAL_READ, r);
27 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "EVENTLOG_SEEK_READ", EVENTLOG_SEEK_READ, r);
28 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "EVENTLOG_FORWARDS_READ", EVENTLOG_FORWARDS_READ, r);
29 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "EVENTLOG_BACKWARDS_READ", EVENTLOG_BACKWARDS_READ, r);
30 ndr->depth--;
33 _PUBLIC_ enum ndr_err_code ndr_push_eventlogEventTypes(struct ndr_push *ndr, int ndr_flags, enum eventlogEventTypes r)
35 NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
36 return NDR_ERR_SUCCESS;
39 _PUBLIC_ enum ndr_err_code ndr_pull_eventlogEventTypes(struct ndr_pull *ndr, int ndr_flags, enum eventlogEventTypes *r)
41 uint16_t v;
42 NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
43 *r = v;
44 return NDR_ERR_SUCCESS;
47 _PUBLIC_ void ndr_print_eventlogEventTypes(struct ndr_print *ndr, const char *name, enum eventlogEventTypes r)
49 const char *val = NULL;
51 switch (r) {
52 case EVENTLOG_SUCCESS: val = "EVENTLOG_SUCCESS"; break;
53 case EVENTLOG_ERROR_TYPE: val = "EVENTLOG_ERROR_TYPE"; break;
54 case EVENTLOG_WARNING_TYPE: val = "EVENTLOG_WARNING_TYPE"; break;
55 case EVENTLOG_INFORMATION_TYPE: val = "EVENTLOG_INFORMATION_TYPE"; break;
56 case EVENTLOG_AUDIT_SUCCESS: val = "EVENTLOG_AUDIT_SUCCESS"; break;
57 case EVENTLOG_AUDIT_FAILURE: val = "EVENTLOG_AUDIT_FAILURE"; break;
59 ndr_print_enum(ndr, name, "ENUM", val, r);
62 static enum ndr_err_code ndr_push_eventlog_OpenUnknown0(struct ndr_push *ndr, int ndr_flags, const struct eventlog_OpenUnknown0 *r)
64 if (ndr_flags & NDR_SCALARS) {
65 NDR_CHECK(ndr_push_align(ndr, 2));
66 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->unknown0));
67 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->unknown1));
68 NDR_CHECK(ndr_push_trailer_align(ndr, 2));
70 if (ndr_flags & NDR_BUFFERS) {
72 return NDR_ERR_SUCCESS;
75 static enum ndr_err_code ndr_pull_eventlog_OpenUnknown0(struct ndr_pull *ndr, int ndr_flags, struct eventlog_OpenUnknown0 *r)
77 if (ndr_flags & NDR_SCALARS) {
78 NDR_CHECK(ndr_pull_align(ndr, 2));
79 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->unknown0));
80 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->unknown1));
81 NDR_CHECK(ndr_pull_trailer_align(ndr, 2));
83 if (ndr_flags & NDR_BUFFERS) {
85 return NDR_ERR_SUCCESS;
88 _PUBLIC_ void ndr_print_eventlog_OpenUnknown0(struct ndr_print *ndr, const char *name, const struct eventlog_OpenUnknown0 *r)
90 ndr_print_struct(ndr, name, "eventlog_OpenUnknown0");
91 ndr->depth++;
92 ndr_print_uint16(ndr, "unknown0", r->unknown0);
93 ndr_print_uint16(ndr, "unknown1", r->unknown1);
94 ndr->depth--;
97 _PUBLIC_ enum ndr_err_code ndr_push_eventlog_Record_tdb(struct ndr_push *ndr, int ndr_flags, const struct eventlog_Record_tdb *r)
99 uint32_t cntr_strings_0;
101 uint32_t _flags_save_STRUCT = ndr->flags;
102 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_PRINT_ARRAY_HEX);
103 if (ndr_flags & NDR_SCALARS) {
104 NDR_CHECK(ndr_push_align(ndr, 4));
105 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
106 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, "eLfL", 4, sizeof(uint8_t), CH_DOS));
107 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->record_number));
108 NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->time_generated));
109 NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->time_written));
110 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->event_id));
111 NDR_CHECK(ndr_push_eventlogEventTypes(ndr, NDR_SCALARS, r->event_type));
112 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_of_strings));
113 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->event_category));
114 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->reserved_flags));
115 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->closing_record_number));
116 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->stringoffset));
117 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid.length));
118 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid_offset));
119 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->data.length));
120 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->data_offset));
121 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2 * strlen_m_term(r->source_name)));
123 uint32_t _flags_save_string = ndr->flags;
124 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
125 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->source_name));
126 ndr->flags = _flags_save_string;
128 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2 * strlen_m_term(r->computer_name)));
130 uint32_t _flags_save_string = ndr->flags;
131 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
132 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->computer_name));
133 ndr->flags = _flags_save_string;
135 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid_padding));
136 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->sid));
137 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2 * ndr_size_string_array(r->strings, r->num_of_strings, LIBNDR_FLAG_STR_NULLTERM)));
139 uint32_t _flags_save_string = ndr->flags;
140 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
141 for (cntr_strings_0 = 0; cntr_strings_0 < r->num_of_strings; cntr_strings_0++) {
142 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->strings[cntr_strings_0]));
144 ndr->flags = _flags_save_string;
146 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->data));
147 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->padding));
148 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
150 if (ndr_flags & NDR_BUFFERS) {
152 ndr->flags = _flags_save_STRUCT;
154 return NDR_ERR_SUCCESS;
157 _PUBLIC_ enum ndr_err_code ndr_pull_eventlog_Record_tdb(struct ndr_pull *ndr, int ndr_flags, struct eventlog_Record_tdb *r)
159 uint32_t size_reserved_0 = 0;
160 uint32_t size_strings_0 = 0;
161 uint32_t cntr_strings_0;
162 TALLOC_CTX *_mem_save_strings_0;
164 uint32_t _flags_save_STRUCT = ndr->flags;
165 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_PRINT_ARRAY_HEX);
166 if (ndr_flags & NDR_SCALARS) {
167 NDR_CHECK(ndr_pull_align(ndr, 4));
168 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
169 size_reserved_0 = 4;
170 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->reserved, size_reserved_0, sizeof(uint8_t), CH_DOS));
171 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->record_number));
172 NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->time_generated));
173 NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->time_written));
174 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->event_id));
175 NDR_CHECK(ndr_pull_eventlogEventTypes(ndr, NDR_SCALARS, &r->event_type));
176 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_of_strings));
177 if (r->num_of_strings > 256) {
178 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
180 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->event_category));
181 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved_flags));
182 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->closing_record_number));
183 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->stringoffset));
184 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_length));
185 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_offset));
186 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->data_length));
187 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->data_offset));
188 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->source_name_len));
190 uint32_t _flags_save_string = ndr->flags;
191 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
192 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->source_name));
193 ndr->flags = _flags_save_string;
195 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->computer_name_len));
197 uint32_t _flags_save_string = ndr->flags;
198 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
199 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->computer_name));
200 ndr->flags = _flags_save_string;
202 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_padding));
203 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->sid));
204 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->strings_len));
206 uint32_t _flags_save_string = ndr->flags;
207 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
208 size_strings_0 = r->num_of_strings;
209 NDR_PULL_ALLOC_N(ndr, r->strings, size_strings_0);
210 _mem_save_strings_0 = NDR_PULL_GET_MEM_CTX(ndr);
211 NDR_PULL_SET_MEM_CTX(ndr, r->strings, 0);
212 for (cntr_strings_0 = 0; cntr_strings_0 < size_strings_0; cntr_strings_0++) {
213 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->strings[cntr_strings_0]));
215 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_strings_0, 0);
216 ndr->flags = _flags_save_string;
218 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->data));
219 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->padding));
220 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
222 if (ndr_flags & NDR_BUFFERS) {
224 ndr->flags = _flags_save_STRUCT;
226 return NDR_ERR_SUCCESS;
229 _PUBLIC_ void ndr_print_eventlog_Record_tdb(struct ndr_print *ndr, const char *name, const struct eventlog_Record_tdb *r)
231 uint32_t cntr_strings_0;
232 ndr_print_struct(ndr, name, "eventlog_Record_tdb");
234 uint32_t _flags_save_STRUCT = ndr->flags;
235 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_PRINT_ARRAY_HEX);
236 ndr->depth++;
237 ndr_print_uint32(ndr, "size", r->size);
238 ndr_print_string(ndr, "reserved", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?"eLfL":r->reserved);
239 ndr_print_uint32(ndr, "record_number", r->record_number);
240 ndr_print_time_t(ndr, "time_generated", r->time_generated);
241 ndr_print_time_t(ndr, "time_written", r->time_written);
242 ndr_print_uint32(ndr, "event_id", r->event_id);
243 ndr_print_eventlogEventTypes(ndr, "event_type", r->event_type);
244 ndr_print_uint16(ndr, "num_of_strings", r->num_of_strings);
245 ndr_print_uint16(ndr, "event_category", r->event_category);
246 ndr_print_uint16(ndr, "reserved_flags", r->reserved_flags);
247 ndr_print_uint32(ndr, "closing_record_number", r->closing_record_number);
248 ndr_print_uint32(ndr, "stringoffset", r->stringoffset);
249 ndr_print_uint32(ndr, "sid_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->sid.length:r->sid_length);
250 ndr_print_uint32(ndr, "sid_offset", r->sid_offset);
251 ndr_print_uint32(ndr, "data_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->data.length:r->data_length);
252 ndr_print_uint32(ndr, "data_offset", r->data_offset);
253 ndr_print_uint32(ndr, "source_name_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m_term(r->source_name):r->source_name_len);
254 ndr_print_string(ndr, "source_name", r->source_name);
255 ndr_print_uint32(ndr, "computer_name_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m_term(r->computer_name):r->computer_name_len);
256 ndr_print_string(ndr, "computer_name", r->computer_name);
257 ndr_print_uint32(ndr, "sid_padding", r->sid_padding);
258 ndr_print_DATA_BLOB(ndr, "sid", r->sid);
259 ndr_print_uint32(ndr, "strings_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * ndr_size_string_array(r->strings, r->num_of_strings, LIBNDR_FLAG_STR_NULLTERM):r->strings_len);
260 ndr->print(ndr, "%s: ARRAY(%d)", "strings", (int)r->num_of_strings);
261 ndr->depth++;
262 for (cntr_strings_0=0;cntr_strings_0<r->num_of_strings;cntr_strings_0++) {
263 char *idx_0=NULL;
264 if (asprintf(&idx_0, "[%d]", cntr_strings_0) != -1) {
265 ndr_print_string(ndr, "strings", r->strings[cntr_strings_0]);
266 free(idx_0);
269 ndr->depth--;
270 ndr_print_DATA_BLOB(ndr, "data", r->data);
271 ndr_print_uint32(ndr, "padding", r->padding);
272 ndr->depth--;
273 ndr->flags = _flags_save_STRUCT;
277 static enum ndr_err_code ndr_push_EVENTLOG_HEADER_FLAGS(struct ndr_push *ndr, int ndr_flags, enum EVENTLOG_HEADER_FLAGS r)
279 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
280 return NDR_ERR_SUCCESS;
283 static enum ndr_err_code ndr_pull_EVENTLOG_HEADER_FLAGS(struct ndr_pull *ndr, int ndr_flags, enum EVENTLOG_HEADER_FLAGS *r)
285 uint32_t v;
286 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
287 *r = v;
288 return NDR_ERR_SUCCESS;
291 _PUBLIC_ void ndr_print_EVENTLOG_HEADER_FLAGS(struct ndr_print *ndr, const char *name, enum EVENTLOG_HEADER_FLAGS r)
293 const char *val = NULL;
295 switch (r) {
296 case ELF_LOGFILE_HEADER_DIRTY: val = "ELF_LOGFILE_HEADER_DIRTY"; break;
297 case ELF_LOGFILE_HEADER_WRAP: val = "ELF_LOGFILE_HEADER_WRAP"; break;
298 case ELF_LOGFILE_LOGFULL_WRITTEN: val = "ELF_LOGFILE_LOGFULL_WRITTEN"; break;
299 case ELF_LOGFILE_ARCHIVE_SET: val = "ELF_LOGFILE_ARCHIVE_SET"; break;
301 ndr_print_enum(ndr, name, "ENUM", val, r);
304 _PUBLIC_ enum ndr_err_code ndr_push_EVENTLOGHEADER(struct ndr_push *ndr, int ndr_flags, const struct EVENTLOGHEADER *r)
306 if (ndr_flags & NDR_SCALARS) {
307 NDR_CHECK(ndr_push_align(ndr, 4));
308 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x30));
309 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, "LfLe", 4, sizeof(uint8_t), CH_DOS));
310 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 1));
311 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 1));
312 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->StartOffset));
313 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->EndOffset));
314 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->CurrentRecordNumber));
315 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->OldestRecordNumber));
316 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->MaxSize));
317 NDR_CHECK(ndr_push_EVENTLOG_HEADER_FLAGS(ndr, NDR_SCALARS, r->Flags));
318 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Retention));
319 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x30));
320 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
322 if (ndr_flags & NDR_BUFFERS) {
324 return NDR_ERR_SUCCESS;
327 _PUBLIC_ enum ndr_err_code ndr_pull_EVENTLOGHEADER(struct ndr_pull *ndr, int ndr_flags, struct EVENTLOGHEADER *r)
329 uint32_t size_Signature_0 = 0;
330 if (ndr_flags & NDR_SCALARS) {
331 NDR_CHECK(ndr_pull_align(ndr, 4));
332 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->HeaderSize));
333 size_Signature_0 = 4;
334 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->Signature, size_Signature_0, sizeof(uint8_t), CH_DOS));
335 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->MajorVersion));
336 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->MinorVersion));
337 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->StartOffset));
338 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->EndOffset));
339 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->CurrentRecordNumber));
340 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->OldestRecordNumber));
341 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->MaxSize));
342 NDR_CHECK(ndr_pull_EVENTLOG_HEADER_FLAGS(ndr, NDR_SCALARS, &r->Flags));
343 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Retention));
344 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->EndHeaderSize));
345 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
347 if (ndr_flags & NDR_BUFFERS) {
349 return NDR_ERR_SUCCESS;
352 _PUBLIC_ void ndr_print_EVENTLOGHEADER(struct ndr_print *ndr, const char *name, const struct EVENTLOGHEADER *r)
354 ndr_print_struct(ndr, name, "EVENTLOGHEADER");
355 ndr->depth++;
356 ndr_print_uint32(ndr, "HeaderSize", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x30:r->HeaderSize);
357 ndr_print_string(ndr, "Signature", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?"LfLe":r->Signature);
358 ndr_print_uint32(ndr, "MajorVersion", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?1:r->MajorVersion);
359 ndr_print_uint32(ndr, "MinorVersion", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?1:r->MinorVersion);
360 ndr_print_uint32(ndr, "StartOffset", r->StartOffset);
361 ndr_print_uint32(ndr, "EndOffset", r->EndOffset);
362 ndr_print_uint32(ndr, "CurrentRecordNumber", r->CurrentRecordNumber);
363 ndr_print_uint32(ndr, "OldestRecordNumber", r->OldestRecordNumber);
364 ndr_print_uint32(ndr, "MaxSize", r->MaxSize);
365 ndr_print_EVENTLOG_HEADER_FLAGS(ndr, "Flags", r->Flags);
366 ndr_print_uint32(ndr, "Retention", r->Retention);
367 ndr_print_uint32(ndr, "EndHeaderSize", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x30:r->EndHeaderSize);
368 ndr->depth--;
371 _PUBLIC_ enum ndr_err_code ndr_push_EVENTLOGRECORD(struct ndr_push *ndr, int ndr_flags, const struct EVENTLOGRECORD *r)
373 uint32_t cntr_Strings_0;
374 if (ndr_flags & NDR_SCALARS) {
375 NDR_CHECK(ndr_push_align(ndr, 4));
376 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Length));
377 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, "LfLe", 4, sizeof(uint8_t), CH_DOS));
378 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->RecordNumber));
379 NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->TimeGenerated));
380 NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->TimeWritten));
381 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->EventID));
382 NDR_CHECK(ndr_push_eventlogEventTypes(ndr, NDR_SCALARS, r->EventType));
383 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->NumStrings));
384 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->EventCategory));
385 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->ReservedFlags));
386 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ClosingRecordNumber));
387 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 56 + 2 * (strlen_m_term(r->SourceName) + strlen_m_term(r->Computername)) + ndr_size_dom_sid0(&r->UserSid, ndr->flags)));
388 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_dom_sid0(&r->UserSid, ndr->flags)));
389 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 56 + 2 * (strlen_m_term(r->SourceName) + strlen_m_term(r->Computername))));
390 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->DataLength));
391 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 56 + 2 * (strlen_m_term(r->SourceName) + strlen_m_term(r->Computername)) + ndr_size_dom_sid0(&r->UserSid, ndr->flags) + (2 * ndr_size_string_array(r->Strings, r->NumStrings, LIBNDR_FLAG_STR_NULLTERM))));
393 uint32_t _flags_save_string = ndr->flags;
394 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
395 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->SourceName));
396 ndr->flags = _flags_save_string;
399 uint32_t _flags_save_string = ndr->flags;
400 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
401 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->Computername));
402 ndr->flags = _flags_save_string;
405 uint32_t _flags_save_dom_sid0 = ndr->flags;
406 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
408 struct ndr_push *_ndr_UserSid;
409 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_UserSid, 0, ndr_size_dom_sid0(&r->UserSid, ndr->flags)));
410 NDR_CHECK(ndr_push_dom_sid0(_ndr_UserSid, NDR_SCALARS|NDR_BUFFERS, &r->UserSid));
411 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_UserSid, 0, ndr_size_dom_sid0(&r->UserSid, ndr->flags)));
413 ndr->flags = _flags_save_dom_sid0;
416 uint32_t _flags_save_string = ndr->flags;
417 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
418 for (cntr_Strings_0 = 0; cntr_Strings_0 < r->NumStrings; cntr_Strings_0++) {
419 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->Strings[cntr_Strings_0]));
421 ndr->flags = _flags_save_string;
424 uint32_t _flags_save_uint8 = ndr->flags;
425 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
426 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->Data, r->DataLength));
427 ndr->flags = _flags_save_uint8;
430 uint32_t _flags_save_string = ndr->flags;
431 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
432 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->Pad));
433 ndr->flags = _flags_save_string;
435 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Length));
436 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
438 if (ndr_flags & NDR_BUFFERS) {
440 uint32_t _flags_save_dom_sid0 = ndr->flags;
441 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
442 ndr->flags = _flags_save_dom_sid0;
445 return NDR_ERR_SUCCESS;
448 _PUBLIC_ enum ndr_err_code ndr_pull_EVENTLOGRECORD(struct ndr_pull *ndr, int ndr_flags, struct EVENTLOGRECORD *r)
450 uint32_t size_Reserved_0 = 0;
451 uint32_t size_Strings_0 = 0;
452 uint32_t cntr_Strings_0;
453 TALLOC_CTX *_mem_save_Strings_0;
454 uint32_t size_Data_0 = 0;
455 if (ndr_flags & NDR_SCALARS) {
456 NDR_CHECK(ndr_pull_align(ndr, 4));
457 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Length));
458 size_Reserved_0 = 4;
459 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->Reserved, size_Reserved_0, sizeof(uint8_t), CH_DOS));
460 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->RecordNumber));
461 NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->TimeGenerated));
462 NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->TimeWritten));
463 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->EventID));
464 NDR_CHECK(ndr_pull_eventlogEventTypes(ndr, NDR_SCALARS, &r->EventType));
465 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->NumStrings));
466 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->EventCategory));
467 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->ReservedFlags));
468 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ClosingRecordNumber));
469 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->StringOffset));
470 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->UserSidLength));
471 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->UserSidOffset));
472 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->DataLength));
473 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->DataOffset));
475 uint32_t _flags_save_string = ndr->flags;
476 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
477 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->SourceName));
478 ndr->flags = _flags_save_string;
481 uint32_t _flags_save_string = ndr->flags;
482 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
483 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->Computername));
484 ndr->flags = _flags_save_string;
487 uint32_t _flags_save_dom_sid0 = ndr->flags;
488 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
490 struct ndr_pull *_ndr_UserSid;
491 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_UserSid, 0, r->UserSidLength));
492 NDR_CHECK(ndr_pull_dom_sid0(_ndr_UserSid, NDR_SCALARS|NDR_BUFFERS, &r->UserSid));
493 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_UserSid, 0, r->UserSidLength));
495 ndr->flags = _flags_save_dom_sid0;
498 uint32_t _flags_save_string = ndr->flags;
499 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
500 size_Strings_0 = r->NumStrings;
501 NDR_PULL_ALLOC_N(ndr, r->Strings, size_Strings_0);
502 _mem_save_Strings_0 = NDR_PULL_GET_MEM_CTX(ndr);
503 NDR_PULL_SET_MEM_CTX(ndr, r->Strings, 0);
504 for (cntr_Strings_0 = 0; cntr_Strings_0 < size_Strings_0; cntr_Strings_0++) {
505 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->Strings[cntr_Strings_0]));
507 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Strings_0, 0);
508 ndr->flags = _flags_save_string;
511 uint32_t _flags_save_uint8 = ndr->flags;
512 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
513 size_Data_0 = r->DataLength;
514 NDR_PULL_ALLOC_N(ndr, r->Data, size_Data_0);
515 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->Data, size_Data_0));
516 ndr->flags = _flags_save_uint8;
519 uint32_t _flags_save_string = ndr->flags;
520 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
521 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->Pad));
522 ndr->flags = _flags_save_string;
524 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Length2));
525 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
527 if (ndr_flags & NDR_BUFFERS) {
529 uint32_t _flags_save_dom_sid0 = ndr->flags;
530 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
531 ndr->flags = _flags_save_dom_sid0;
534 return NDR_ERR_SUCCESS;
537 _PUBLIC_ void ndr_print_EVENTLOGRECORD(struct ndr_print *ndr, const char *name, const struct EVENTLOGRECORD *r)
539 uint32_t cntr_Strings_0;
540 ndr_print_struct(ndr, name, "EVENTLOGRECORD");
541 ndr->depth++;
542 ndr_print_uint32(ndr, "Length", r->Length);
543 ndr_print_string(ndr, "Reserved", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?"LfLe":r->Reserved);
544 ndr_print_uint32(ndr, "RecordNumber", r->RecordNumber);
545 ndr_print_time_t(ndr, "TimeGenerated", r->TimeGenerated);
546 ndr_print_time_t(ndr, "TimeWritten", r->TimeWritten);
547 ndr_print_uint32(ndr, "EventID", r->EventID);
548 ndr_print_eventlogEventTypes(ndr, "EventType", r->EventType);
549 ndr_print_uint16(ndr, "NumStrings", r->NumStrings);
550 ndr_print_uint16(ndr, "EventCategory", r->EventCategory);
551 ndr_print_uint16(ndr, "ReservedFlags", r->ReservedFlags);
552 ndr_print_uint32(ndr, "ClosingRecordNumber", r->ClosingRecordNumber);
553 ndr_print_uint32(ndr, "StringOffset", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?56 + 2 * (strlen_m_term(r->SourceName) + strlen_m_term(r->Computername)) + r->UserSidLength:r->StringOffset);
554 ndr_print_uint32(ndr, "UserSidLength", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_dom_sid0(&r->UserSid, ndr->flags):r->UserSidLength);
555 ndr_print_uint32(ndr, "UserSidOffset", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?56 + 2 * (strlen_m_term(r->SourceName) + strlen_m_term(r->Computername)):r->UserSidOffset);
556 ndr_print_uint32(ndr, "DataLength", r->DataLength);
557 ndr_print_uint32(ndr, "DataOffset", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?56 + 2 * (strlen_m_term(r->SourceName) + strlen_m_term(r->Computername)) + r->UserSidLength + (2 * ndr_size_string_array(r->Strings, r->NumStrings, LIBNDR_FLAG_STR_NULLTERM)):r->DataOffset);
558 ndr_print_string(ndr, "SourceName", r->SourceName);
559 ndr_print_string(ndr, "Computername", r->Computername);
560 ndr_print_dom_sid0(ndr, "UserSid", &r->UserSid);
561 ndr->print(ndr, "%s: ARRAY(%d)", "Strings", (int)r->NumStrings);
562 ndr->depth++;
563 for (cntr_Strings_0=0;cntr_Strings_0<r->NumStrings;cntr_Strings_0++) {
564 char *idx_0=NULL;
565 if (asprintf(&idx_0, "[%d]", cntr_Strings_0) != -1) {
566 ndr_print_string(ndr, "Strings", r->Strings[cntr_Strings_0]);
567 free(idx_0);
570 ndr->depth--;
571 ndr_print_array_uint8(ndr, "Data", r->Data, r->DataLength);
572 ndr_print_string(ndr, "Pad", r->Pad);
573 ndr_print_uint32(ndr, "Length2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->Length:r->Length2);
574 ndr->depth--;
577 _PUBLIC_ size_t ndr_size_EVENTLOGRECORD(const struct EVENTLOGRECORD *r, struct smb_iconv_convenience *ic, int flags)
579 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_EVENTLOGRECORD, ic);
582 _PUBLIC_ enum ndr_err_code ndr_push_EVENTLOGEOF(struct ndr_push *ndr, int ndr_flags, const struct EVENTLOGEOF *r)
584 if (ndr_flags & NDR_SCALARS) {
585 NDR_CHECK(ndr_push_align(ndr, 4));
586 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x28));
587 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x11111111));
588 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x22222222));
589 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x33333333));
590 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x44444444));
591 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->BeginRecord));
592 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->EndRecord));
593 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->CurrentRecordNumber));
594 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->OldestRecordNumber));
595 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x28));
596 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
598 if (ndr_flags & NDR_BUFFERS) {
600 return NDR_ERR_SUCCESS;
603 _PUBLIC_ enum ndr_err_code ndr_pull_EVENTLOGEOF(struct ndr_pull *ndr, int ndr_flags, struct EVENTLOGEOF *r)
605 if (ndr_flags & NDR_SCALARS) {
606 NDR_CHECK(ndr_pull_align(ndr, 4));
607 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->RecordSizeBeginning));
608 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->One));
609 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Two));
610 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Three));
611 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Four));
612 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->BeginRecord));
613 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->EndRecord));
614 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->CurrentRecordNumber));
615 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->OldestRecordNumber));
616 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->RecordSizeEnd));
617 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
619 if (ndr_flags & NDR_BUFFERS) {
621 return NDR_ERR_SUCCESS;
624 _PUBLIC_ void ndr_print_EVENTLOGEOF(struct ndr_print *ndr, const char *name, const struct EVENTLOGEOF *r)
626 ndr_print_struct(ndr, name, "EVENTLOGEOF");
627 ndr->depth++;
628 ndr_print_uint32(ndr, "RecordSizeBeginning", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x28:r->RecordSizeBeginning);
629 ndr_print_uint32(ndr, "One", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x11111111:r->One);
630 ndr_print_uint32(ndr, "Two", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x22222222:r->Two);
631 ndr_print_uint32(ndr, "Three", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x33333333:r->Three);
632 ndr_print_uint32(ndr, "Four", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x44444444:r->Four);
633 ndr_print_uint32(ndr, "BeginRecord", r->BeginRecord);
634 ndr_print_uint32(ndr, "EndRecord", r->EndRecord);
635 ndr_print_uint32(ndr, "CurrentRecordNumber", r->CurrentRecordNumber);
636 ndr_print_uint32(ndr, "OldestRecordNumber", r->OldestRecordNumber);
637 ndr_print_uint32(ndr, "RecordSizeEnd", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x28:r->RecordSizeEnd);
638 ndr->depth--;
641 _PUBLIC_ enum ndr_err_code ndr_push_EVENTLOG_EVT_FILE(struct ndr_push *ndr, int ndr_flags, const struct EVENTLOG_EVT_FILE *r)
643 uint32_t cntr_records_0;
644 if (ndr_flags & NDR_SCALARS) {
645 NDR_CHECK(ndr_push_align(ndr, 4));
646 NDR_CHECK(ndr_push_EVENTLOGHEADER(ndr, NDR_SCALARS, &r->hdr));
647 for (cntr_records_0 = 0; cntr_records_0 < r->hdr.CurrentRecordNumber - r->hdr.OldestRecordNumber; cntr_records_0++) {
648 NDR_CHECK(ndr_push_EVENTLOGRECORD(ndr, NDR_SCALARS, &r->records[cntr_records_0]));
650 NDR_CHECK(ndr_push_EVENTLOGEOF(ndr, NDR_SCALARS, &r->eof));
651 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
653 if (ndr_flags & NDR_BUFFERS) {
654 for (cntr_records_0 = 0; cntr_records_0 < r->hdr.CurrentRecordNumber - r->hdr.OldestRecordNumber; cntr_records_0++) {
655 NDR_CHECK(ndr_push_EVENTLOGRECORD(ndr, NDR_BUFFERS, &r->records[cntr_records_0]));
658 return NDR_ERR_SUCCESS;
661 _PUBLIC_ enum ndr_err_code ndr_pull_EVENTLOG_EVT_FILE(struct ndr_pull *ndr, int ndr_flags, struct EVENTLOG_EVT_FILE *r)
663 uint32_t size_records_0 = 0;
664 uint32_t cntr_records_0;
665 TALLOC_CTX *_mem_save_records_0;
666 if (ndr_flags & NDR_SCALARS) {
667 NDR_CHECK(ndr_pull_align(ndr, 4));
668 NDR_CHECK(ndr_pull_EVENTLOGHEADER(ndr, NDR_SCALARS, &r->hdr));
669 size_records_0 = r->hdr.CurrentRecordNumber - r->hdr.OldestRecordNumber;
670 NDR_PULL_ALLOC_N(ndr, r->records, size_records_0);
671 _mem_save_records_0 = NDR_PULL_GET_MEM_CTX(ndr);
672 NDR_PULL_SET_MEM_CTX(ndr, r->records, 0);
673 for (cntr_records_0 = 0; cntr_records_0 < size_records_0; cntr_records_0++) {
674 NDR_CHECK(ndr_pull_EVENTLOGRECORD(ndr, NDR_SCALARS, &r->records[cntr_records_0]));
676 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_records_0, 0);
677 NDR_CHECK(ndr_pull_EVENTLOGEOF(ndr, NDR_SCALARS, &r->eof));
678 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
680 if (ndr_flags & NDR_BUFFERS) {
681 size_records_0 = r->hdr.CurrentRecordNumber - r->hdr.OldestRecordNumber;
682 _mem_save_records_0 = NDR_PULL_GET_MEM_CTX(ndr);
683 NDR_PULL_SET_MEM_CTX(ndr, r->records, 0);
684 for (cntr_records_0 = 0; cntr_records_0 < size_records_0; cntr_records_0++) {
685 NDR_CHECK(ndr_pull_EVENTLOGRECORD(ndr, NDR_BUFFERS, &r->records[cntr_records_0]));
687 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_records_0, 0);
689 return NDR_ERR_SUCCESS;
692 _PUBLIC_ void ndr_print_EVENTLOG_EVT_FILE(struct ndr_print *ndr, const char *name, const struct EVENTLOG_EVT_FILE *r)
694 uint32_t cntr_records_0;
695 ndr_print_struct(ndr, name, "EVENTLOG_EVT_FILE");
696 ndr->depth++;
697 ndr_print_EVENTLOGHEADER(ndr, "hdr", &r->hdr);
698 ndr->print(ndr, "%s: ARRAY(%d)", "records", (int)r->hdr.CurrentRecordNumber - r->hdr.OldestRecordNumber);
699 ndr->depth++;
700 for (cntr_records_0=0;cntr_records_0<r->hdr.CurrentRecordNumber - r->hdr.OldestRecordNumber;cntr_records_0++) {
701 char *idx_0=NULL;
702 if (asprintf(&idx_0, "[%d]", cntr_records_0) != -1) {
703 ndr_print_EVENTLOGRECORD(ndr, "records", &r->records[cntr_records_0]);
704 free(idx_0);
707 ndr->depth--;
708 ndr_print_EVENTLOGEOF(ndr, "eof", &r->eof);
709 ndr->depth--;
712 _PUBLIC_ enum ndr_err_code ndr_push_EVENTLOG_FULL_INFORMATION(struct ndr_push *ndr, int ndr_flags, const struct EVENTLOG_FULL_INFORMATION *r)
714 if (ndr_flags & NDR_SCALARS) {
715 NDR_CHECK(ndr_push_align(ndr, 4));
716 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->full));
717 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
719 if (ndr_flags & NDR_BUFFERS) {
721 return NDR_ERR_SUCCESS;
724 _PUBLIC_ enum ndr_err_code ndr_pull_EVENTLOG_FULL_INFORMATION(struct ndr_pull *ndr, int ndr_flags, struct EVENTLOG_FULL_INFORMATION *r)
726 if (ndr_flags & NDR_SCALARS) {
727 NDR_CHECK(ndr_pull_align(ndr, 4));
728 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->full));
729 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
731 if (ndr_flags & NDR_BUFFERS) {
733 return NDR_ERR_SUCCESS;
736 _PUBLIC_ void ndr_print_EVENTLOG_FULL_INFORMATION(struct ndr_print *ndr, const char *name, const struct EVENTLOG_FULL_INFORMATION *r)
738 ndr_print_struct(ndr, name, "EVENTLOG_FULL_INFORMATION");
739 ndr->depth++;
740 ndr_print_uint32(ndr, "full", r->full);
741 ndr->depth--;
744 static enum ndr_err_code ndr_push_eventlog_ClearEventLogW(struct ndr_push *ndr, int flags, const struct eventlog_ClearEventLogW *r)
746 if (flags & NDR_IN) {
747 if (r->in.handle == NULL) {
748 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
750 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
751 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.backupfile));
752 if (r->in.backupfile) {
753 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.backupfile));
756 if (flags & NDR_OUT) {
757 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
759 return NDR_ERR_SUCCESS;
762 static enum ndr_err_code ndr_pull_eventlog_ClearEventLogW(struct ndr_pull *ndr, int flags, struct eventlog_ClearEventLogW *r)
764 uint32_t _ptr_backupfile;
765 TALLOC_CTX *_mem_save_handle_0;
766 TALLOC_CTX *_mem_save_backupfile_0;
767 if (flags & NDR_IN) {
768 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
769 NDR_PULL_ALLOC(ndr, r->in.handle);
771 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
772 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
773 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
774 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
775 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_backupfile));
776 if (_ptr_backupfile) {
777 NDR_PULL_ALLOC(ndr, r->in.backupfile);
778 } else {
779 r->in.backupfile = NULL;
781 if (r->in.backupfile) {
782 _mem_save_backupfile_0 = NDR_PULL_GET_MEM_CTX(ndr);
783 NDR_PULL_SET_MEM_CTX(ndr, r->in.backupfile, 0);
784 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.backupfile));
785 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_backupfile_0, 0);
788 if (flags & NDR_OUT) {
789 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
791 return NDR_ERR_SUCCESS;
794 _PUBLIC_ void ndr_print_eventlog_ClearEventLogW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ClearEventLogW *r)
796 ndr_print_struct(ndr, name, "eventlog_ClearEventLogW");
797 ndr->depth++;
798 if (flags & NDR_SET_VALUES) {
799 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
801 if (flags & NDR_IN) {
802 ndr_print_struct(ndr, "in", "eventlog_ClearEventLogW");
803 ndr->depth++;
804 ndr_print_ptr(ndr, "handle", r->in.handle);
805 ndr->depth++;
806 ndr_print_policy_handle(ndr, "handle", r->in.handle);
807 ndr->depth--;
808 ndr_print_ptr(ndr, "backupfile", r->in.backupfile);
809 ndr->depth++;
810 if (r->in.backupfile) {
811 ndr_print_lsa_String(ndr, "backupfile", r->in.backupfile);
813 ndr->depth--;
814 ndr->depth--;
816 if (flags & NDR_OUT) {
817 ndr_print_struct(ndr, "out", "eventlog_ClearEventLogW");
818 ndr->depth++;
819 ndr_print_NTSTATUS(ndr, "result", r->out.result);
820 ndr->depth--;
822 ndr->depth--;
825 static enum ndr_err_code ndr_push_eventlog_BackupEventLogW(struct ndr_push *ndr, int flags, const struct eventlog_BackupEventLogW *r)
827 if (flags & NDR_IN) {
828 if (r->in.handle == NULL) {
829 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
831 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
832 if (r->in.backup_filename == NULL) {
833 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
835 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.backup_filename));
837 if (flags & NDR_OUT) {
838 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
840 return NDR_ERR_SUCCESS;
843 static enum ndr_err_code ndr_pull_eventlog_BackupEventLogW(struct ndr_pull *ndr, int flags, struct eventlog_BackupEventLogW *r)
845 TALLOC_CTX *_mem_save_handle_0;
846 TALLOC_CTX *_mem_save_backup_filename_0;
847 if (flags & NDR_IN) {
848 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
849 NDR_PULL_ALLOC(ndr, r->in.handle);
851 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
852 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
853 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
854 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
855 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
856 NDR_PULL_ALLOC(ndr, r->in.backup_filename);
858 _mem_save_backup_filename_0 = NDR_PULL_GET_MEM_CTX(ndr);
859 NDR_PULL_SET_MEM_CTX(ndr, r->in.backup_filename, LIBNDR_FLAG_REF_ALLOC);
860 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.backup_filename));
861 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_backup_filename_0, LIBNDR_FLAG_REF_ALLOC);
863 if (flags & NDR_OUT) {
864 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
866 return NDR_ERR_SUCCESS;
869 _PUBLIC_ void ndr_print_eventlog_BackupEventLogW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_BackupEventLogW *r)
871 ndr_print_struct(ndr, name, "eventlog_BackupEventLogW");
872 ndr->depth++;
873 if (flags & NDR_SET_VALUES) {
874 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
876 if (flags & NDR_IN) {
877 ndr_print_struct(ndr, "in", "eventlog_BackupEventLogW");
878 ndr->depth++;
879 ndr_print_ptr(ndr, "handle", r->in.handle);
880 ndr->depth++;
881 ndr_print_policy_handle(ndr, "handle", r->in.handle);
882 ndr->depth--;
883 ndr_print_ptr(ndr, "backup_filename", r->in.backup_filename);
884 ndr->depth++;
885 ndr_print_lsa_String(ndr, "backup_filename", r->in.backup_filename);
886 ndr->depth--;
887 ndr->depth--;
889 if (flags & NDR_OUT) {
890 ndr_print_struct(ndr, "out", "eventlog_BackupEventLogW");
891 ndr->depth++;
892 ndr_print_NTSTATUS(ndr, "result", r->out.result);
893 ndr->depth--;
895 ndr->depth--;
898 static enum ndr_err_code ndr_push_eventlog_CloseEventLog(struct ndr_push *ndr, int flags, const struct eventlog_CloseEventLog *r)
900 if (flags & NDR_IN) {
901 if (r->in.handle == NULL) {
902 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
904 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
906 if (flags & NDR_OUT) {
907 if (r->out.handle == NULL) {
908 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
910 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
911 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
913 return NDR_ERR_SUCCESS;
916 static enum ndr_err_code ndr_pull_eventlog_CloseEventLog(struct ndr_pull *ndr, int flags, struct eventlog_CloseEventLog *r)
918 TALLOC_CTX *_mem_save_handle_0;
919 if (flags & NDR_IN) {
920 ZERO_STRUCT(r->out);
922 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
923 NDR_PULL_ALLOC(ndr, r->in.handle);
925 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
926 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
927 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
928 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
929 NDR_PULL_ALLOC(ndr, r->out.handle);
930 *r->out.handle = *r->in.handle;
932 if (flags & NDR_OUT) {
933 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
934 NDR_PULL_ALLOC(ndr, r->out.handle);
936 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
937 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
938 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
939 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
940 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
942 return NDR_ERR_SUCCESS;
945 _PUBLIC_ void ndr_print_eventlog_CloseEventLog(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_CloseEventLog *r)
947 ndr_print_struct(ndr, name, "eventlog_CloseEventLog");
948 ndr->depth++;
949 if (flags & NDR_SET_VALUES) {
950 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
952 if (flags & NDR_IN) {
953 ndr_print_struct(ndr, "in", "eventlog_CloseEventLog");
954 ndr->depth++;
955 ndr_print_ptr(ndr, "handle", r->in.handle);
956 ndr->depth++;
957 ndr_print_policy_handle(ndr, "handle", r->in.handle);
958 ndr->depth--;
959 ndr->depth--;
961 if (flags & NDR_OUT) {
962 ndr_print_struct(ndr, "out", "eventlog_CloseEventLog");
963 ndr->depth++;
964 ndr_print_ptr(ndr, "handle", r->out.handle);
965 ndr->depth++;
966 ndr_print_policy_handle(ndr, "handle", r->out.handle);
967 ndr->depth--;
968 ndr_print_NTSTATUS(ndr, "result", r->out.result);
969 ndr->depth--;
971 ndr->depth--;
974 static enum ndr_err_code ndr_push_eventlog_DeregisterEventSource(struct ndr_push *ndr, int flags, const struct eventlog_DeregisterEventSource *r)
976 if (flags & NDR_IN) {
977 if (r->in.handle == NULL) {
978 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
980 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
982 if (flags & NDR_OUT) {
983 if (r->out.handle == NULL) {
984 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
986 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
987 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
989 return NDR_ERR_SUCCESS;
992 static enum ndr_err_code ndr_pull_eventlog_DeregisterEventSource(struct ndr_pull *ndr, int flags, struct eventlog_DeregisterEventSource *r)
994 TALLOC_CTX *_mem_save_handle_0;
995 if (flags & NDR_IN) {
996 ZERO_STRUCT(r->out);
998 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
999 NDR_PULL_ALLOC(ndr, r->in.handle);
1001 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1002 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1003 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1004 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1005 NDR_PULL_ALLOC(ndr, r->out.handle);
1006 *r->out.handle = *r->in.handle;
1008 if (flags & NDR_OUT) {
1009 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1010 NDR_PULL_ALLOC(ndr, r->out.handle);
1012 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1013 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
1014 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
1015 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1016 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1018 return NDR_ERR_SUCCESS;
1021 _PUBLIC_ void ndr_print_eventlog_DeregisterEventSource(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_DeregisterEventSource *r)
1023 ndr_print_struct(ndr, name, "eventlog_DeregisterEventSource");
1024 ndr->depth++;
1025 if (flags & NDR_SET_VALUES) {
1026 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1028 if (flags & NDR_IN) {
1029 ndr_print_struct(ndr, "in", "eventlog_DeregisterEventSource");
1030 ndr->depth++;
1031 ndr_print_ptr(ndr, "handle", r->in.handle);
1032 ndr->depth++;
1033 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1034 ndr->depth--;
1035 ndr->depth--;
1037 if (flags & NDR_OUT) {
1038 ndr_print_struct(ndr, "out", "eventlog_DeregisterEventSource");
1039 ndr->depth++;
1040 ndr_print_ptr(ndr, "handle", r->out.handle);
1041 ndr->depth++;
1042 ndr_print_policy_handle(ndr, "handle", r->out.handle);
1043 ndr->depth--;
1044 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1045 ndr->depth--;
1047 ndr->depth--;
1050 static enum ndr_err_code ndr_push_eventlog_GetNumRecords(struct ndr_push *ndr, int flags, const struct eventlog_GetNumRecords *r)
1052 if (flags & NDR_IN) {
1053 if (r->in.handle == NULL) {
1054 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1056 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1058 if (flags & NDR_OUT) {
1059 if (r->out.number == NULL) {
1060 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1062 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.number));
1063 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1065 return NDR_ERR_SUCCESS;
1068 static enum ndr_err_code ndr_pull_eventlog_GetNumRecords(struct ndr_pull *ndr, int flags, struct eventlog_GetNumRecords *r)
1070 TALLOC_CTX *_mem_save_handle_0;
1071 TALLOC_CTX *_mem_save_number_0;
1072 if (flags & NDR_IN) {
1073 ZERO_STRUCT(r->out);
1075 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1076 NDR_PULL_ALLOC(ndr, r->in.handle);
1078 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1079 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1080 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1081 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1082 NDR_PULL_ALLOC(ndr, r->out.number);
1083 ZERO_STRUCTP(r->out.number);
1085 if (flags & NDR_OUT) {
1086 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1087 NDR_PULL_ALLOC(ndr, r->out.number);
1089 _mem_save_number_0 = NDR_PULL_GET_MEM_CTX(ndr);
1090 NDR_PULL_SET_MEM_CTX(ndr, r->out.number, LIBNDR_FLAG_REF_ALLOC);
1091 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.number));
1092 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_number_0, LIBNDR_FLAG_REF_ALLOC);
1093 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1095 return NDR_ERR_SUCCESS;
1098 _PUBLIC_ void ndr_print_eventlog_GetNumRecords(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_GetNumRecords *r)
1100 ndr_print_struct(ndr, name, "eventlog_GetNumRecords");
1101 ndr->depth++;
1102 if (flags & NDR_SET_VALUES) {
1103 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1105 if (flags & NDR_IN) {
1106 ndr_print_struct(ndr, "in", "eventlog_GetNumRecords");
1107 ndr->depth++;
1108 ndr_print_ptr(ndr, "handle", r->in.handle);
1109 ndr->depth++;
1110 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1111 ndr->depth--;
1112 ndr->depth--;
1114 if (flags & NDR_OUT) {
1115 ndr_print_struct(ndr, "out", "eventlog_GetNumRecords");
1116 ndr->depth++;
1117 ndr_print_ptr(ndr, "number", r->out.number);
1118 ndr->depth++;
1119 ndr_print_uint32(ndr, "number", *r->out.number);
1120 ndr->depth--;
1121 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1122 ndr->depth--;
1124 ndr->depth--;
1127 static enum ndr_err_code ndr_push_eventlog_GetOldestRecord(struct ndr_push *ndr, int flags, const struct eventlog_GetOldestRecord *r)
1129 if (flags & NDR_IN) {
1130 if (r->in.handle == NULL) {
1131 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1133 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1135 if (flags & NDR_OUT) {
1136 if (r->out.oldest_entry == NULL) {
1137 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1139 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.oldest_entry));
1140 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1142 return NDR_ERR_SUCCESS;
1145 static enum ndr_err_code ndr_pull_eventlog_GetOldestRecord(struct ndr_pull *ndr, int flags, struct eventlog_GetOldestRecord *r)
1147 TALLOC_CTX *_mem_save_handle_0;
1148 TALLOC_CTX *_mem_save_oldest_entry_0;
1149 if (flags & NDR_IN) {
1150 ZERO_STRUCT(r->out);
1152 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1153 NDR_PULL_ALLOC(ndr, r->in.handle);
1155 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1156 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1157 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1158 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1159 NDR_PULL_ALLOC(ndr, r->out.oldest_entry);
1160 ZERO_STRUCTP(r->out.oldest_entry);
1162 if (flags & NDR_OUT) {
1163 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1164 NDR_PULL_ALLOC(ndr, r->out.oldest_entry);
1166 _mem_save_oldest_entry_0 = NDR_PULL_GET_MEM_CTX(ndr);
1167 NDR_PULL_SET_MEM_CTX(ndr, r->out.oldest_entry, LIBNDR_FLAG_REF_ALLOC);
1168 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.oldest_entry));
1169 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_oldest_entry_0, LIBNDR_FLAG_REF_ALLOC);
1170 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1172 return NDR_ERR_SUCCESS;
1175 _PUBLIC_ void ndr_print_eventlog_GetOldestRecord(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_GetOldestRecord *r)
1177 ndr_print_struct(ndr, name, "eventlog_GetOldestRecord");
1178 ndr->depth++;
1179 if (flags & NDR_SET_VALUES) {
1180 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1182 if (flags & NDR_IN) {
1183 ndr_print_struct(ndr, "in", "eventlog_GetOldestRecord");
1184 ndr->depth++;
1185 ndr_print_ptr(ndr, "handle", r->in.handle);
1186 ndr->depth++;
1187 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1188 ndr->depth--;
1189 ndr->depth--;
1191 if (flags & NDR_OUT) {
1192 ndr_print_struct(ndr, "out", "eventlog_GetOldestRecord");
1193 ndr->depth++;
1194 ndr_print_ptr(ndr, "oldest_entry", r->out.oldest_entry);
1195 ndr->depth++;
1196 ndr_print_uint32(ndr, "oldest_entry", *r->out.oldest_entry);
1197 ndr->depth--;
1198 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1199 ndr->depth--;
1201 ndr->depth--;
1204 static enum ndr_err_code ndr_push_eventlog_ChangeNotify(struct ndr_push *ndr, int flags, const struct eventlog_ChangeNotify *r)
1206 if (flags & NDR_IN) {
1208 if (flags & NDR_OUT) {
1209 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1211 return NDR_ERR_SUCCESS;
1214 static enum ndr_err_code ndr_pull_eventlog_ChangeNotify(struct ndr_pull *ndr, int flags, struct eventlog_ChangeNotify *r)
1216 if (flags & NDR_IN) {
1218 if (flags & NDR_OUT) {
1219 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1221 return NDR_ERR_SUCCESS;
1224 _PUBLIC_ void ndr_print_eventlog_ChangeNotify(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ChangeNotify *r)
1226 ndr_print_struct(ndr, name, "eventlog_ChangeNotify");
1227 ndr->depth++;
1228 if (flags & NDR_SET_VALUES) {
1229 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1231 if (flags & NDR_IN) {
1232 ndr_print_struct(ndr, "in", "eventlog_ChangeNotify");
1233 ndr->depth++;
1234 ndr->depth--;
1236 if (flags & NDR_OUT) {
1237 ndr_print_struct(ndr, "out", "eventlog_ChangeNotify");
1238 ndr->depth++;
1239 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1240 ndr->depth--;
1242 ndr->depth--;
1245 static enum ndr_err_code ndr_push_eventlog_OpenEventLogW(struct ndr_push *ndr, int flags, const struct eventlog_OpenEventLogW *r)
1247 if (flags & NDR_IN) {
1248 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown0));
1249 if (r->in.unknown0) {
1250 NDR_CHECK(ndr_push_eventlog_OpenUnknown0(ndr, NDR_SCALARS, r->in.unknown0));
1252 if (r->in.logname == NULL) {
1253 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1255 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logname));
1256 if (r->in.servername == NULL) {
1257 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1259 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.servername));
1260 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.major_version));
1261 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.minor_version));
1263 if (flags & NDR_OUT) {
1264 if (r->out.handle == NULL) {
1265 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1267 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
1268 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1270 return NDR_ERR_SUCCESS;
1273 static enum ndr_err_code ndr_pull_eventlog_OpenEventLogW(struct ndr_pull *ndr, int flags, struct eventlog_OpenEventLogW *r)
1275 uint32_t _ptr_unknown0;
1276 TALLOC_CTX *_mem_save_unknown0_0;
1277 TALLOC_CTX *_mem_save_logname_0;
1278 TALLOC_CTX *_mem_save_servername_0;
1279 TALLOC_CTX *_mem_save_handle_0;
1280 if (flags & NDR_IN) {
1281 ZERO_STRUCT(r->out);
1283 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown0));
1284 if (_ptr_unknown0) {
1285 NDR_PULL_ALLOC(ndr, r->in.unknown0);
1286 } else {
1287 r->in.unknown0 = NULL;
1289 if (r->in.unknown0) {
1290 _mem_save_unknown0_0 = NDR_PULL_GET_MEM_CTX(ndr);
1291 NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown0, 0);
1292 NDR_CHECK(ndr_pull_eventlog_OpenUnknown0(ndr, NDR_SCALARS, r->in.unknown0));
1293 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown0_0, 0);
1295 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1296 NDR_PULL_ALLOC(ndr, r->in.logname);
1298 _mem_save_logname_0 = NDR_PULL_GET_MEM_CTX(ndr);
1299 NDR_PULL_SET_MEM_CTX(ndr, r->in.logname, LIBNDR_FLAG_REF_ALLOC);
1300 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logname));
1301 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logname_0, LIBNDR_FLAG_REF_ALLOC);
1302 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1303 NDR_PULL_ALLOC(ndr, r->in.servername);
1305 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
1306 NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, LIBNDR_FLAG_REF_ALLOC);
1307 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.servername));
1308 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, LIBNDR_FLAG_REF_ALLOC);
1309 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.major_version));
1310 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.minor_version));
1311 NDR_PULL_ALLOC(ndr, r->out.handle);
1312 ZERO_STRUCTP(r->out.handle);
1314 if (flags & NDR_OUT) {
1315 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1316 NDR_PULL_ALLOC(ndr, r->out.handle);
1318 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1319 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
1320 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
1321 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1322 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1324 return NDR_ERR_SUCCESS;
1327 _PUBLIC_ void ndr_print_eventlog_OpenEventLogW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_OpenEventLogW *r)
1329 ndr_print_struct(ndr, name, "eventlog_OpenEventLogW");
1330 ndr->depth++;
1331 if (flags & NDR_SET_VALUES) {
1332 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1334 if (flags & NDR_IN) {
1335 ndr_print_struct(ndr, "in", "eventlog_OpenEventLogW");
1336 ndr->depth++;
1337 ndr_print_ptr(ndr, "unknown0", r->in.unknown0);
1338 ndr->depth++;
1339 if (r->in.unknown0) {
1340 ndr_print_eventlog_OpenUnknown0(ndr, "unknown0", r->in.unknown0);
1342 ndr->depth--;
1343 ndr_print_ptr(ndr, "logname", r->in.logname);
1344 ndr->depth++;
1345 ndr_print_lsa_String(ndr, "logname", r->in.logname);
1346 ndr->depth--;
1347 ndr_print_ptr(ndr, "servername", r->in.servername);
1348 ndr->depth++;
1349 ndr_print_lsa_String(ndr, "servername", r->in.servername);
1350 ndr->depth--;
1351 ndr_print_uint32(ndr, "major_version", r->in.major_version);
1352 ndr_print_uint32(ndr, "minor_version", r->in.minor_version);
1353 ndr->depth--;
1355 if (flags & NDR_OUT) {
1356 ndr_print_struct(ndr, "out", "eventlog_OpenEventLogW");
1357 ndr->depth++;
1358 ndr_print_ptr(ndr, "handle", r->out.handle);
1359 ndr->depth++;
1360 ndr_print_policy_handle(ndr, "handle", r->out.handle);
1361 ndr->depth--;
1362 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1363 ndr->depth--;
1365 ndr->depth--;
1368 static enum ndr_err_code ndr_push_eventlog_RegisterEventSourceW(struct ndr_push *ndr, int flags, const struct eventlog_RegisterEventSourceW *r)
1370 if (flags & NDR_IN) {
1371 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown0));
1372 if (r->in.unknown0) {
1373 NDR_CHECK(ndr_push_eventlog_OpenUnknown0(ndr, NDR_SCALARS, r->in.unknown0));
1375 if (r->in.module_name == NULL) {
1376 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1378 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.module_name));
1379 if (r->in.reg_module_name == NULL) {
1380 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1382 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.reg_module_name));
1383 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.major_version));
1384 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.minor_version));
1386 if (flags & NDR_OUT) {
1387 if (r->out.log_handle == NULL) {
1388 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1390 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.log_handle));
1391 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1393 return NDR_ERR_SUCCESS;
1396 static enum ndr_err_code ndr_pull_eventlog_RegisterEventSourceW(struct ndr_pull *ndr, int flags, struct eventlog_RegisterEventSourceW *r)
1398 uint32_t _ptr_unknown0;
1399 TALLOC_CTX *_mem_save_unknown0_0;
1400 TALLOC_CTX *_mem_save_module_name_0;
1401 TALLOC_CTX *_mem_save_reg_module_name_0;
1402 TALLOC_CTX *_mem_save_log_handle_0;
1403 if (flags & NDR_IN) {
1404 ZERO_STRUCT(r->out);
1406 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown0));
1407 if (_ptr_unknown0) {
1408 NDR_PULL_ALLOC(ndr, r->in.unknown0);
1409 } else {
1410 r->in.unknown0 = NULL;
1412 if (r->in.unknown0) {
1413 _mem_save_unknown0_0 = NDR_PULL_GET_MEM_CTX(ndr);
1414 NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown0, 0);
1415 NDR_CHECK(ndr_pull_eventlog_OpenUnknown0(ndr, NDR_SCALARS, r->in.unknown0));
1416 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown0_0, 0);
1418 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1419 NDR_PULL_ALLOC(ndr, r->in.module_name);
1421 _mem_save_module_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
1422 NDR_PULL_SET_MEM_CTX(ndr, r->in.module_name, LIBNDR_FLAG_REF_ALLOC);
1423 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.module_name));
1424 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_module_name_0, LIBNDR_FLAG_REF_ALLOC);
1425 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1426 NDR_PULL_ALLOC(ndr, r->in.reg_module_name);
1428 _mem_save_reg_module_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
1429 NDR_PULL_SET_MEM_CTX(ndr, r->in.reg_module_name, LIBNDR_FLAG_REF_ALLOC);
1430 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.reg_module_name));
1431 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_reg_module_name_0, LIBNDR_FLAG_REF_ALLOC);
1432 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.major_version));
1433 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.minor_version));
1434 NDR_PULL_ALLOC(ndr, r->out.log_handle);
1435 ZERO_STRUCTP(r->out.log_handle);
1437 if (flags & NDR_OUT) {
1438 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1439 NDR_PULL_ALLOC(ndr, r->out.log_handle);
1441 _mem_save_log_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1442 NDR_PULL_SET_MEM_CTX(ndr, r->out.log_handle, LIBNDR_FLAG_REF_ALLOC);
1443 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.log_handle));
1444 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_log_handle_0, LIBNDR_FLAG_REF_ALLOC);
1445 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1447 return NDR_ERR_SUCCESS;
1450 _PUBLIC_ void ndr_print_eventlog_RegisterEventSourceW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_RegisterEventSourceW *r)
1452 ndr_print_struct(ndr, name, "eventlog_RegisterEventSourceW");
1453 ndr->depth++;
1454 if (flags & NDR_SET_VALUES) {
1455 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1457 if (flags & NDR_IN) {
1458 ndr_print_struct(ndr, "in", "eventlog_RegisterEventSourceW");
1459 ndr->depth++;
1460 ndr_print_ptr(ndr, "unknown0", r->in.unknown0);
1461 ndr->depth++;
1462 if (r->in.unknown0) {
1463 ndr_print_eventlog_OpenUnknown0(ndr, "unknown0", r->in.unknown0);
1465 ndr->depth--;
1466 ndr_print_ptr(ndr, "module_name", r->in.module_name);
1467 ndr->depth++;
1468 ndr_print_lsa_String(ndr, "module_name", r->in.module_name);
1469 ndr->depth--;
1470 ndr_print_ptr(ndr, "reg_module_name", r->in.reg_module_name);
1471 ndr->depth++;
1472 ndr_print_lsa_String(ndr, "reg_module_name", r->in.reg_module_name);
1473 ndr->depth--;
1474 ndr_print_uint32(ndr, "major_version", r->in.major_version);
1475 ndr_print_uint32(ndr, "minor_version", r->in.minor_version);
1476 ndr->depth--;
1478 if (flags & NDR_OUT) {
1479 ndr_print_struct(ndr, "out", "eventlog_RegisterEventSourceW");
1480 ndr->depth++;
1481 ndr_print_ptr(ndr, "log_handle", r->out.log_handle);
1482 ndr->depth++;
1483 ndr_print_policy_handle(ndr, "log_handle", r->out.log_handle);
1484 ndr->depth--;
1485 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1486 ndr->depth--;
1488 ndr->depth--;
1491 static enum ndr_err_code ndr_push_eventlog_OpenBackupEventLogW(struct ndr_push *ndr, int flags, const struct eventlog_OpenBackupEventLogW *r)
1493 if (flags & NDR_IN) {
1494 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown0));
1495 if (r->in.unknown0) {
1496 NDR_CHECK(ndr_push_eventlog_OpenUnknown0(ndr, NDR_SCALARS, r->in.unknown0));
1498 if (r->in.backup_logname == NULL) {
1499 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1501 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.backup_logname));
1502 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.major_version));
1503 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.minor_version));
1505 if (flags & NDR_OUT) {
1506 if (r->out.handle == NULL) {
1507 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1509 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
1510 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1512 return NDR_ERR_SUCCESS;
1515 static enum ndr_err_code ndr_pull_eventlog_OpenBackupEventLogW(struct ndr_pull *ndr, int flags, struct eventlog_OpenBackupEventLogW *r)
1517 uint32_t _ptr_unknown0;
1518 TALLOC_CTX *_mem_save_unknown0_0;
1519 TALLOC_CTX *_mem_save_backup_logname_0;
1520 TALLOC_CTX *_mem_save_handle_0;
1521 if (flags & NDR_IN) {
1522 ZERO_STRUCT(r->out);
1524 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown0));
1525 if (_ptr_unknown0) {
1526 NDR_PULL_ALLOC(ndr, r->in.unknown0);
1527 } else {
1528 r->in.unknown0 = NULL;
1530 if (r->in.unknown0) {
1531 _mem_save_unknown0_0 = NDR_PULL_GET_MEM_CTX(ndr);
1532 NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown0, 0);
1533 NDR_CHECK(ndr_pull_eventlog_OpenUnknown0(ndr, NDR_SCALARS, r->in.unknown0));
1534 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown0_0, 0);
1536 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1537 NDR_PULL_ALLOC(ndr, r->in.backup_logname);
1539 _mem_save_backup_logname_0 = NDR_PULL_GET_MEM_CTX(ndr);
1540 NDR_PULL_SET_MEM_CTX(ndr, r->in.backup_logname, LIBNDR_FLAG_REF_ALLOC);
1541 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.backup_logname));
1542 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_backup_logname_0, LIBNDR_FLAG_REF_ALLOC);
1543 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.major_version));
1544 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.minor_version));
1545 NDR_PULL_ALLOC(ndr, r->out.handle);
1546 ZERO_STRUCTP(r->out.handle);
1548 if (flags & NDR_OUT) {
1549 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1550 NDR_PULL_ALLOC(ndr, r->out.handle);
1552 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1553 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
1554 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
1555 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1556 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1558 return NDR_ERR_SUCCESS;
1561 _PUBLIC_ void ndr_print_eventlog_OpenBackupEventLogW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_OpenBackupEventLogW *r)
1563 ndr_print_struct(ndr, name, "eventlog_OpenBackupEventLogW");
1564 ndr->depth++;
1565 if (flags & NDR_SET_VALUES) {
1566 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1568 if (flags & NDR_IN) {
1569 ndr_print_struct(ndr, "in", "eventlog_OpenBackupEventLogW");
1570 ndr->depth++;
1571 ndr_print_ptr(ndr, "unknown0", r->in.unknown0);
1572 ndr->depth++;
1573 if (r->in.unknown0) {
1574 ndr_print_eventlog_OpenUnknown0(ndr, "unknown0", r->in.unknown0);
1576 ndr->depth--;
1577 ndr_print_ptr(ndr, "backup_logname", r->in.backup_logname);
1578 ndr->depth++;
1579 ndr_print_lsa_String(ndr, "backup_logname", r->in.backup_logname);
1580 ndr->depth--;
1581 ndr_print_uint32(ndr, "major_version", r->in.major_version);
1582 ndr_print_uint32(ndr, "minor_version", r->in.minor_version);
1583 ndr->depth--;
1585 if (flags & NDR_OUT) {
1586 ndr_print_struct(ndr, "out", "eventlog_OpenBackupEventLogW");
1587 ndr->depth++;
1588 ndr_print_ptr(ndr, "handle", r->out.handle);
1589 ndr->depth++;
1590 ndr_print_policy_handle(ndr, "handle", r->out.handle);
1591 ndr->depth--;
1592 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1593 ndr->depth--;
1595 ndr->depth--;
1598 static enum ndr_err_code ndr_push_eventlog_ReadEventLogW(struct ndr_push *ndr, int flags, const struct eventlog_ReadEventLogW *r)
1600 if (flags & NDR_IN) {
1601 if (r->in.handle == NULL) {
1602 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1604 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1605 NDR_CHECK(ndr_push_eventlogReadFlags(ndr, NDR_SCALARS, r->in.flags));
1606 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offset));
1607 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.number_of_bytes));
1609 if (flags & NDR_OUT) {
1610 if (r->out.data == NULL) {
1611 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1613 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.number_of_bytes));
1614 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.data, r->in.number_of_bytes));
1615 if (r->out.sent_size == NULL) {
1616 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1618 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.sent_size));
1619 if (r->out.real_size == NULL) {
1620 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1622 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.real_size));
1623 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1625 return NDR_ERR_SUCCESS;
1628 static enum ndr_err_code ndr_pull_eventlog_ReadEventLogW(struct ndr_pull *ndr, int flags, struct eventlog_ReadEventLogW *r)
1630 uint32_t size_data_1 = 0;
1631 TALLOC_CTX *_mem_save_handle_0;
1632 TALLOC_CTX *_mem_save_sent_size_0;
1633 TALLOC_CTX *_mem_save_real_size_0;
1634 if (flags & NDR_IN) {
1635 ZERO_STRUCT(r->out);
1637 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1638 NDR_PULL_ALLOC(ndr, r->in.handle);
1640 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1641 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1642 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1643 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1644 NDR_CHECK(ndr_pull_eventlogReadFlags(ndr, NDR_SCALARS, &r->in.flags));
1645 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offset));
1646 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.number_of_bytes));
1647 if (r->in.number_of_bytes > 0x7FFFF) {
1648 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1650 NDR_PULL_ALLOC_N(ndr, r->out.data, r->in.number_of_bytes);
1651 memset(r->out.data, 0, (r->in.number_of_bytes) * sizeof(*r->out.data));
1652 NDR_PULL_ALLOC(ndr, r->out.sent_size);
1653 ZERO_STRUCTP(r->out.sent_size);
1654 NDR_PULL_ALLOC(ndr, r->out.real_size);
1655 ZERO_STRUCTP(r->out.real_size);
1657 if (flags & NDR_OUT) {
1658 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.data));
1659 size_data_1 = ndr_get_array_size(ndr, &r->out.data);
1660 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1661 NDR_PULL_ALLOC_N(ndr, r->out.data, size_data_1);
1663 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.data, size_data_1));
1664 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1665 NDR_PULL_ALLOC(ndr, r->out.sent_size);
1667 _mem_save_sent_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
1668 NDR_PULL_SET_MEM_CTX(ndr, r->out.sent_size, LIBNDR_FLAG_REF_ALLOC);
1669 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.sent_size));
1670 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sent_size_0, LIBNDR_FLAG_REF_ALLOC);
1671 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1672 NDR_PULL_ALLOC(ndr, r->out.real_size);
1674 _mem_save_real_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
1675 NDR_PULL_SET_MEM_CTX(ndr, r->out.real_size, LIBNDR_FLAG_REF_ALLOC);
1676 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.real_size));
1677 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_real_size_0, LIBNDR_FLAG_REF_ALLOC);
1678 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1679 if (r->out.data) {
1680 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.data, r->in.number_of_bytes));
1683 return NDR_ERR_SUCCESS;
1686 _PUBLIC_ void ndr_print_eventlog_ReadEventLogW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ReadEventLogW *r)
1688 ndr_print_struct(ndr, name, "eventlog_ReadEventLogW");
1689 ndr->depth++;
1690 if (flags & NDR_SET_VALUES) {
1691 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1693 if (flags & NDR_IN) {
1694 ndr_print_struct(ndr, "in", "eventlog_ReadEventLogW");
1695 ndr->depth++;
1696 ndr_print_ptr(ndr, "handle", r->in.handle);
1697 ndr->depth++;
1698 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1699 ndr->depth--;
1700 ndr_print_eventlogReadFlags(ndr, "flags", r->in.flags);
1701 ndr_print_uint32(ndr, "offset", r->in.offset);
1702 ndr_print_uint32(ndr, "number_of_bytes", r->in.number_of_bytes);
1703 ndr->depth--;
1705 if (flags & NDR_OUT) {
1706 ndr_print_struct(ndr, "out", "eventlog_ReadEventLogW");
1707 ndr->depth++;
1708 ndr_print_ptr(ndr, "data", r->out.data);
1709 ndr->depth++;
1710 ndr_print_array_uint8(ndr, "data", r->out.data, r->in.number_of_bytes);
1711 ndr->depth--;
1712 ndr_print_ptr(ndr, "sent_size", r->out.sent_size);
1713 ndr->depth++;
1714 ndr_print_uint32(ndr, "sent_size", *r->out.sent_size);
1715 ndr->depth--;
1716 ndr_print_ptr(ndr, "real_size", r->out.real_size);
1717 ndr->depth++;
1718 ndr_print_uint32(ndr, "real_size", *r->out.real_size);
1719 ndr->depth--;
1720 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1721 ndr->depth--;
1723 ndr->depth--;
1726 static enum ndr_err_code ndr_push_eventlog_ReportEventW(struct ndr_push *ndr, int flags, const struct eventlog_ReportEventW *r)
1728 uint32_t cntr_strings_1;
1729 if (flags & NDR_IN) {
1730 if (r->in.handle == NULL) {
1731 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1733 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1734 NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->in.timestamp));
1735 NDR_CHECK(ndr_push_eventlogEventTypes(ndr, NDR_SCALARS, r->in.event_type));
1736 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.event_category));
1737 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.event_id));
1738 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.num_of_strings));
1739 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.data_size));
1740 if (r->in.servername == NULL) {
1741 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1743 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.servername));
1744 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.user_sid));
1745 if (r->in.user_sid) {
1746 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->in.user_sid));
1748 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.strings));
1749 if (r->in.strings) {
1750 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.num_of_strings));
1751 for (cntr_strings_1 = 0; cntr_strings_1 < r->in.num_of_strings; cntr_strings_1++) {
1753 for (cntr_strings_1 = 0; cntr_strings_1 < r->in.num_of_strings; cntr_strings_1++) {
1754 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.strings[cntr_strings_1]));
1755 if (r->in.strings[cntr_strings_1]) {
1756 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.strings[cntr_strings_1]));
1760 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.data));
1761 if (r->in.data) {
1762 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.data_size));
1763 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.data, r->in.data_size));
1765 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.flags));
1766 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.record_number));
1767 if (r->in.record_number) {
1768 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.record_number));
1770 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.time_written));
1771 if (r->in.time_written) {
1772 NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, *r->in.time_written));
1775 if (flags & NDR_OUT) {
1776 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.record_number));
1777 if (r->out.record_number) {
1778 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.record_number));
1780 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.time_written));
1781 if (r->out.time_written) {
1782 NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, *r->out.time_written));
1784 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1786 return NDR_ERR_SUCCESS;
1789 static enum ndr_err_code ndr_pull_eventlog_ReportEventW(struct ndr_pull *ndr, int flags, struct eventlog_ReportEventW *r)
1791 uint32_t _ptr_user_sid;
1792 uint32_t _ptr_strings;
1793 uint32_t size_strings_1 = 0;
1794 uint32_t cntr_strings_1;
1795 uint32_t _ptr_data;
1796 uint32_t size_data_1 = 0;
1797 uint32_t _ptr_record_number;
1798 uint32_t _ptr_time_written;
1799 TALLOC_CTX *_mem_save_handle_0;
1800 TALLOC_CTX *_mem_save_servername_0;
1801 TALLOC_CTX *_mem_save_user_sid_0;
1802 TALLOC_CTX *_mem_save_strings_0;
1803 TALLOC_CTX *_mem_save_strings_1;
1804 TALLOC_CTX *_mem_save_strings_2;
1805 TALLOC_CTX *_mem_save_data_0;
1806 TALLOC_CTX *_mem_save_record_number_0;
1807 TALLOC_CTX *_mem_save_time_written_0;
1808 if (flags & NDR_IN) {
1809 ZERO_STRUCT(r->out);
1811 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1812 NDR_PULL_ALLOC(ndr, r->in.handle);
1814 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1815 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1816 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1817 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1818 NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->in.timestamp));
1819 NDR_CHECK(ndr_pull_eventlogEventTypes(ndr, NDR_SCALARS, &r->in.event_type));
1820 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.event_category));
1821 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.event_id));
1822 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.num_of_strings));
1823 if (r->in.num_of_strings > 256) {
1824 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1826 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.data_size));
1827 if (r->in.data_size > 0x3FFFF) {
1828 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1830 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1831 NDR_PULL_ALLOC(ndr, r->in.servername);
1833 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
1834 NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, LIBNDR_FLAG_REF_ALLOC);
1835 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.servername));
1836 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, LIBNDR_FLAG_REF_ALLOC);
1837 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user_sid));
1838 if (_ptr_user_sid) {
1839 NDR_PULL_ALLOC(ndr, r->in.user_sid);
1840 } else {
1841 r->in.user_sid = NULL;
1843 if (r->in.user_sid) {
1844 _mem_save_user_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1845 NDR_PULL_SET_MEM_CTX(ndr, r->in.user_sid, 0);
1846 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->in.user_sid));
1847 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_sid_0, 0);
1849 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_strings));
1850 if (_ptr_strings) {
1851 NDR_PULL_ALLOC(ndr, r->in.strings);
1852 } else {
1853 r->in.strings = NULL;
1855 if (r->in.strings) {
1856 _mem_save_strings_0 = NDR_PULL_GET_MEM_CTX(ndr);
1857 NDR_PULL_SET_MEM_CTX(ndr, r->in.strings, 0);
1858 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.strings));
1859 size_strings_1 = ndr_get_array_size(ndr, &r->in.strings);
1860 NDR_PULL_ALLOC_N(ndr, r->in.strings, size_strings_1);
1861 _mem_save_strings_1 = NDR_PULL_GET_MEM_CTX(ndr);
1862 NDR_PULL_SET_MEM_CTX(ndr, r->in.strings, 0);
1863 for (cntr_strings_1 = 0; cntr_strings_1 < size_strings_1; cntr_strings_1++) {
1865 for (cntr_strings_1 = 0; cntr_strings_1 < size_strings_1; cntr_strings_1++) {
1866 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_strings));
1867 if (_ptr_strings) {
1868 NDR_PULL_ALLOC(ndr, r->in.strings[cntr_strings_1]);
1869 } else {
1870 r->in.strings[cntr_strings_1] = NULL;
1872 if (r->in.strings[cntr_strings_1]) {
1873 _mem_save_strings_2 = NDR_PULL_GET_MEM_CTX(ndr);
1874 NDR_PULL_SET_MEM_CTX(ndr, r->in.strings[cntr_strings_1], 0);
1875 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.strings[cntr_strings_1]));
1876 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_strings_2, 0);
1879 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_strings_1, 0);
1880 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_strings_0, 0);
1882 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
1883 if (_ptr_data) {
1884 NDR_PULL_ALLOC(ndr, r->in.data);
1885 } else {
1886 r->in.data = NULL;
1888 if (r->in.data) {
1889 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
1890 NDR_PULL_SET_MEM_CTX(ndr, r->in.data, 0);
1891 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.data));
1892 size_data_1 = ndr_get_array_size(ndr, &r->in.data);
1893 NDR_PULL_ALLOC_N(ndr, r->in.data, size_data_1);
1894 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.data, size_data_1));
1895 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
1897 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.flags));
1898 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_record_number));
1899 if (_ptr_record_number) {
1900 NDR_PULL_ALLOC(ndr, r->in.record_number);
1901 } else {
1902 r->in.record_number = NULL;
1904 if (r->in.record_number) {
1905 _mem_save_record_number_0 = NDR_PULL_GET_MEM_CTX(ndr);
1906 NDR_PULL_SET_MEM_CTX(ndr, r->in.record_number, 0);
1907 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.record_number));
1908 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_record_number_0, 0);
1910 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_time_written));
1911 if (_ptr_time_written) {
1912 NDR_PULL_ALLOC(ndr, r->in.time_written);
1913 } else {
1914 r->in.time_written = NULL;
1916 if (r->in.time_written) {
1917 _mem_save_time_written_0 = NDR_PULL_GET_MEM_CTX(ndr);
1918 NDR_PULL_SET_MEM_CTX(ndr, r->in.time_written, 0);
1919 NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, r->in.time_written));
1920 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_time_written_0, 0);
1922 if (r->in.strings) {
1923 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.strings, r->in.num_of_strings));
1925 if (r->in.data) {
1926 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.data, r->in.data_size));
1929 if (flags & NDR_OUT) {
1930 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_record_number));
1931 if (_ptr_record_number) {
1932 NDR_PULL_ALLOC(ndr, r->out.record_number);
1933 } else {
1934 r->out.record_number = NULL;
1936 if (r->out.record_number) {
1937 _mem_save_record_number_0 = NDR_PULL_GET_MEM_CTX(ndr);
1938 NDR_PULL_SET_MEM_CTX(ndr, r->out.record_number, 0);
1939 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.record_number));
1940 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_record_number_0, 0);
1942 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_time_written));
1943 if (_ptr_time_written) {
1944 NDR_PULL_ALLOC(ndr, r->out.time_written);
1945 } else {
1946 r->out.time_written = NULL;
1948 if (r->out.time_written) {
1949 _mem_save_time_written_0 = NDR_PULL_GET_MEM_CTX(ndr);
1950 NDR_PULL_SET_MEM_CTX(ndr, r->out.time_written, 0);
1951 NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, r->out.time_written));
1952 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_time_written_0, 0);
1954 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1956 return NDR_ERR_SUCCESS;
1959 _PUBLIC_ void ndr_print_eventlog_ReportEventW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ReportEventW *r)
1961 uint32_t cntr_strings_1;
1962 ndr_print_struct(ndr, name, "eventlog_ReportEventW");
1963 ndr->depth++;
1964 if (flags & NDR_SET_VALUES) {
1965 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1967 if (flags & NDR_IN) {
1968 ndr_print_struct(ndr, "in", "eventlog_ReportEventW");
1969 ndr->depth++;
1970 ndr_print_ptr(ndr, "handle", r->in.handle);
1971 ndr->depth++;
1972 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1973 ndr->depth--;
1974 ndr_print_time_t(ndr, "timestamp", r->in.timestamp);
1975 ndr_print_eventlogEventTypes(ndr, "event_type", r->in.event_type);
1976 ndr_print_uint16(ndr, "event_category", r->in.event_category);
1977 ndr_print_uint32(ndr, "event_id", r->in.event_id);
1978 ndr_print_uint16(ndr, "num_of_strings", r->in.num_of_strings);
1979 ndr_print_uint32(ndr, "data_size", r->in.data_size);
1980 ndr_print_ptr(ndr, "servername", r->in.servername);
1981 ndr->depth++;
1982 ndr_print_lsa_String(ndr, "servername", r->in.servername);
1983 ndr->depth--;
1984 ndr_print_ptr(ndr, "user_sid", r->in.user_sid);
1985 ndr->depth++;
1986 if (r->in.user_sid) {
1987 ndr_print_dom_sid(ndr, "user_sid", r->in.user_sid);
1989 ndr->depth--;
1990 ndr_print_ptr(ndr, "strings", r->in.strings);
1991 ndr->depth++;
1992 if (r->in.strings) {
1993 ndr->print(ndr, "%s: ARRAY(%d)", "strings", (int)r->in.num_of_strings);
1994 ndr->depth++;
1995 for (cntr_strings_1=0;cntr_strings_1<r->in.num_of_strings;cntr_strings_1++) {
1996 char *idx_1=NULL;
1997 if (asprintf(&idx_1, "[%d]", cntr_strings_1) != -1) {
1998 ndr_print_ptr(ndr, "strings", r->in.strings[cntr_strings_1]);
1999 ndr->depth++;
2000 if (r->in.strings[cntr_strings_1]) {
2001 ndr_print_lsa_String(ndr, "strings", r->in.strings[cntr_strings_1]);
2003 ndr->depth--;
2004 free(idx_1);
2007 ndr->depth--;
2009 ndr->depth--;
2010 ndr_print_ptr(ndr, "data", r->in.data);
2011 ndr->depth++;
2012 if (r->in.data) {
2013 ndr_print_array_uint8(ndr, "data", r->in.data, r->in.data_size);
2015 ndr->depth--;
2016 ndr_print_uint16(ndr, "flags", r->in.flags);
2017 ndr_print_ptr(ndr, "record_number", r->in.record_number);
2018 ndr->depth++;
2019 if (r->in.record_number) {
2020 ndr_print_uint32(ndr, "record_number", *r->in.record_number);
2022 ndr->depth--;
2023 ndr_print_ptr(ndr, "time_written", r->in.time_written);
2024 ndr->depth++;
2025 if (r->in.time_written) {
2026 ndr_print_time_t(ndr, "time_written", *r->in.time_written);
2028 ndr->depth--;
2029 ndr->depth--;
2031 if (flags & NDR_OUT) {
2032 ndr_print_struct(ndr, "out", "eventlog_ReportEventW");
2033 ndr->depth++;
2034 ndr_print_ptr(ndr, "record_number", r->out.record_number);
2035 ndr->depth++;
2036 if (r->out.record_number) {
2037 ndr_print_uint32(ndr, "record_number", *r->out.record_number);
2039 ndr->depth--;
2040 ndr_print_ptr(ndr, "time_written", r->out.time_written);
2041 ndr->depth++;
2042 if (r->out.time_written) {
2043 ndr_print_time_t(ndr, "time_written", *r->out.time_written);
2045 ndr->depth--;
2046 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2047 ndr->depth--;
2049 ndr->depth--;
2052 static enum ndr_err_code ndr_push_eventlog_ClearEventLogA(struct ndr_push *ndr, int flags, const struct eventlog_ClearEventLogA *r)
2054 if (flags & NDR_IN) {
2056 if (flags & NDR_OUT) {
2057 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2059 return NDR_ERR_SUCCESS;
2062 static enum ndr_err_code ndr_pull_eventlog_ClearEventLogA(struct ndr_pull *ndr, int flags, struct eventlog_ClearEventLogA *r)
2064 if (flags & NDR_IN) {
2066 if (flags & NDR_OUT) {
2067 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2069 return NDR_ERR_SUCCESS;
2072 _PUBLIC_ void ndr_print_eventlog_ClearEventLogA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ClearEventLogA *r)
2074 ndr_print_struct(ndr, name, "eventlog_ClearEventLogA");
2075 ndr->depth++;
2076 if (flags & NDR_SET_VALUES) {
2077 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2079 if (flags & NDR_IN) {
2080 ndr_print_struct(ndr, "in", "eventlog_ClearEventLogA");
2081 ndr->depth++;
2082 ndr->depth--;
2084 if (flags & NDR_OUT) {
2085 ndr_print_struct(ndr, "out", "eventlog_ClearEventLogA");
2086 ndr->depth++;
2087 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2088 ndr->depth--;
2090 ndr->depth--;
2093 static enum ndr_err_code ndr_push_eventlog_BackupEventLogA(struct ndr_push *ndr, int flags, const struct eventlog_BackupEventLogA *r)
2095 if (flags & NDR_IN) {
2097 if (flags & NDR_OUT) {
2098 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2100 return NDR_ERR_SUCCESS;
2103 static enum ndr_err_code ndr_pull_eventlog_BackupEventLogA(struct ndr_pull *ndr, int flags, struct eventlog_BackupEventLogA *r)
2105 if (flags & NDR_IN) {
2107 if (flags & NDR_OUT) {
2108 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2110 return NDR_ERR_SUCCESS;
2113 _PUBLIC_ void ndr_print_eventlog_BackupEventLogA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_BackupEventLogA *r)
2115 ndr_print_struct(ndr, name, "eventlog_BackupEventLogA");
2116 ndr->depth++;
2117 if (flags & NDR_SET_VALUES) {
2118 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2120 if (flags & NDR_IN) {
2121 ndr_print_struct(ndr, "in", "eventlog_BackupEventLogA");
2122 ndr->depth++;
2123 ndr->depth--;
2125 if (flags & NDR_OUT) {
2126 ndr_print_struct(ndr, "out", "eventlog_BackupEventLogA");
2127 ndr->depth++;
2128 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2129 ndr->depth--;
2131 ndr->depth--;
2134 static enum ndr_err_code ndr_push_eventlog_OpenEventLogA(struct ndr_push *ndr, int flags, const struct eventlog_OpenEventLogA *r)
2136 if (flags & NDR_IN) {
2138 if (flags & NDR_OUT) {
2139 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2141 return NDR_ERR_SUCCESS;
2144 static enum ndr_err_code ndr_pull_eventlog_OpenEventLogA(struct ndr_pull *ndr, int flags, struct eventlog_OpenEventLogA *r)
2146 if (flags & NDR_IN) {
2148 if (flags & NDR_OUT) {
2149 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2151 return NDR_ERR_SUCCESS;
2154 _PUBLIC_ void ndr_print_eventlog_OpenEventLogA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_OpenEventLogA *r)
2156 ndr_print_struct(ndr, name, "eventlog_OpenEventLogA");
2157 ndr->depth++;
2158 if (flags & NDR_SET_VALUES) {
2159 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2161 if (flags & NDR_IN) {
2162 ndr_print_struct(ndr, "in", "eventlog_OpenEventLogA");
2163 ndr->depth++;
2164 ndr->depth--;
2166 if (flags & NDR_OUT) {
2167 ndr_print_struct(ndr, "out", "eventlog_OpenEventLogA");
2168 ndr->depth++;
2169 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2170 ndr->depth--;
2172 ndr->depth--;
2175 static enum ndr_err_code ndr_push_eventlog_RegisterEventSourceA(struct ndr_push *ndr, int flags, const struct eventlog_RegisterEventSourceA *r)
2177 if (flags & NDR_IN) {
2179 if (flags & NDR_OUT) {
2180 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2182 return NDR_ERR_SUCCESS;
2185 static enum ndr_err_code ndr_pull_eventlog_RegisterEventSourceA(struct ndr_pull *ndr, int flags, struct eventlog_RegisterEventSourceA *r)
2187 if (flags & NDR_IN) {
2189 if (flags & NDR_OUT) {
2190 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2192 return NDR_ERR_SUCCESS;
2195 _PUBLIC_ void ndr_print_eventlog_RegisterEventSourceA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_RegisterEventSourceA *r)
2197 ndr_print_struct(ndr, name, "eventlog_RegisterEventSourceA");
2198 ndr->depth++;
2199 if (flags & NDR_SET_VALUES) {
2200 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2202 if (flags & NDR_IN) {
2203 ndr_print_struct(ndr, "in", "eventlog_RegisterEventSourceA");
2204 ndr->depth++;
2205 ndr->depth--;
2207 if (flags & NDR_OUT) {
2208 ndr_print_struct(ndr, "out", "eventlog_RegisterEventSourceA");
2209 ndr->depth++;
2210 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2211 ndr->depth--;
2213 ndr->depth--;
2216 static enum ndr_err_code ndr_push_eventlog_OpenBackupEventLogA(struct ndr_push *ndr, int flags, const struct eventlog_OpenBackupEventLogA *r)
2218 if (flags & NDR_IN) {
2220 if (flags & NDR_OUT) {
2221 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2223 return NDR_ERR_SUCCESS;
2226 static enum ndr_err_code ndr_pull_eventlog_OpenBackupEventLogA(struct ndr_pull *ndr, int flags, struct eventlog_OpenBackupEventLogA *r)
2228 if (flags & NDR_IN) {
2230 if (flags & NDR_OUT) {
2231 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2233 return NDR_ERR_SUCCESS;
2236 _PUBLIC_ void ndr_print_eventlog_OpenBackupEventLogA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_OpenBackupEventLogA *r)
2238 ndr_print_struct(ndr, name, "eventlog_OpenBackupEventLogA");
2239 ndr->depth++;
2240 if (flags & NDR_SET_VALUES) {
2241 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2243 if (flags & NDR_IN) {
2244 ndr_print_struct(ndr, "in", "eventlog_OpenBackupEventLogA");
2245 ndr->depth++;
2246 ndr->depth--;
2248 if (flags & NDR_OUT) {
2249 ndr_print_struct(ndr, "out", "eventlog_OpenBackupEventLogA");
2250 ndr->depth++;
2251 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2252 ndr->depth--;
2254 ndr->depth--;
2257 static enum ndr_err_code ndr_push_eventlog_ReadEventLogA(struct ndr_push *ndr, int flags, const struct eventlog_ReadEventLogA *r)
2259 if (flags & NDR_IN) {
2261 if (flags & NDR_OUT) {
2262 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2264 return NDR_ERR_SUCCESS;
2267 static enum ndr_err_code ndr_pull_eventlog_ReadEventLogA(struct ndr_pull *ndr, int flags, struct eventlog_ReadEventLogA *r)
2269 if (flags & NDR_IN) {
2271 if (flags & NDR_OUT) {
2272 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2274 return NDR_ERR_SUCCESS;
2277 _PUBLIC_ void ndr_print_eventlog_ReadEventLogA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ReadEventLogA *r)
2279 ndr_print_struct(ndr, name, "eventlog_ReadEventLogA");
2280 ndr->depth++;
2281 if (flags & NDR_SET_VALUES) {
2282 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2284 if (flags & NDR_IN) {
2285 ndr_print_struct(ndr, "in", "eventlog_ReadEventLogA");
2286 ndr->depth++;
2287 ndr->depth--;
2289 if (flags & NDR_OUT) {
2290 ndr_print_struct(ndr, "out", "eventlog_ReadEventLogA");
2291 ndr->depth++;
2292 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2293 ndr->depth--;
2295 ndr->depth--;
2298 static enum ndr_err_code ndr_push_eventlog_ReportEventA(struct ndr_push *ndr, int flags, const struct eventlog_ReportEventA *r)
2300 if (flags & NDR_IN) {
2302 if (flags & NDR_OUT) {
2303 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2305 return NDR_ERR_SUCCESS;
2308 static enum ndr_err_code ndr_pull_eventlog_ReportEventA(struct ndr_pull *ndr, int flags, struct eventlog_ReportEventA *r)
2310 if (flags & NDR_IN) {
2312 if (flags & NDR_OUT) {
2313 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2315 return NDR_ERR_SUCCESS;
2318 _PUBLIC_ void ndr_print_eventlog_ReportEventA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ReportEventA *r)
2320 ndr_print_struct(ndr, name, "eventlog_ReportEventA");
2321 ndr->depth++;
2322 if (flags & NDR_SET_VALUES) {
2323 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2325 if (flags & NDR_IN) {
2326 ndr_print_struct(ndr, "in", "eventlog_ReportEventA");
2327 ndr->depth++;
2328 ndr->depth--;
2330 if (flags & NDR_OUT) {
2331 ndr_print_struct(ndr, "out", "eventlog_ReportEventA");
2332 ndr->depth++;
2333 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2334 ndr->depth--;
2336 ndr->depth--;
2339 static enum ndr_err_code ndr_push_eventlog_RegisterClusterSvc(struct ndr_push *ndr, int flags, const struct eventlog_RegisterClusterSvc *r)
2341 if (flags & NDR_IN) {
2343 if (flags & NDR_OUT) {
2344 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2346 return NDR_ERR_SUCCESS;
2349 static enum ndr_err_code ndr_pull_eventlog_RegisterClusterSvc(struct ndr_pull *ndr, int flags, struct eventlog_RegisterClusterSvc *r)
2351 if (flags & NDR_IN) {
2353 if (flags & NDR_OUT) {
2354 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2356 return NDR_ERR_SUCCESS;
2359 _PUBLIC_ void ndr_print_eventlog_RegisterClusterSvc(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_RegisterClusterSvc *r)
2361 ndr_print_struct(ndr, name, "eventlog_RegisterClusterSvc");
2362 ndr->depth++;
2363 if (flags & NDR_SET_VALUES) {
2364 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2366 if (flags & NDR_IN) {
2367 ndr_print_struct(ndr, "in", "eventlog_RegisterClusterSvc");
2368 ndr->depth++;
2369 ndr->depth--;
2371 if (flags & NDR_OUT) {
2372 ndr_print_struct(ndr, "out", "eventlog_RegisterClusterSvc");
2373 ndr->depth++;
2374 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2375 ndr->depth--;
2377 ndr->depth--;
2380 static enum ndr_err_code ndr_push_eventlog_DeregisterClusterSvc(struct ndr_push *ndr, int flags, const struct eventlog_DeregisterClusterSvc *r)
2382 if (flags & NDR_IN) {
2384 if (flags & NDR_OUT) {
2385 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2387 return NDR_ERR_SUCCESS;
2390 static enum ndr_err_code ndr_pull_eventlog_DeregisterClusterSvc(struct ndr_pull *ndr, int flags, struct eventlog_DeregisterClusterSvc *r)
2392 if (flags & NDR_IN) {
2394 if (flags & NDR_OUT) {
2395 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2397 return NDR_ERR_SUCCESS;
2400 _PUBLIC_ void ndr_print_eventlog_DeregisterClusterSvc(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_DeregisterClusterSvc *r)
2402 ndr_print_struct(ndr, name, "eventlog_DeregisterClusterSvc");
2403 ndr->depth++;
2404 if (flags & NDR_SET_VALUES) {
2405 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2407 if (flags & NDR_IN) {
2408 ndr_print_struct(ndr, "in", "eventlog_DeregisterClusterSvc");
2409 ndr->depth++;
2410 ndr->depth--;
2412 if (flags & NDR_OUT) {
2413 ndr_print_struct(ndr, "out", "eventlog_DeregisterClusterSvc");
2414 ndr->depth++;
2415 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2416 ndr->depth--;
2418 ndr->depth--;
2421 static enum ndr_err_code ndr_push_eventlog_WriteClusterEvents(struct ndr_push *ndr, int flags, const struct eventlog_WriteClusterEvents *r)
2423 if (flags & NDR_IN) {
2425 if (flags & NDR_OUT) {
2426 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2428 return NDR_ERR_SUCCESS;
2431 static enum ndr_err_code ndr_pull_eventlog_WriteClusterEvents(struct ndr_pull *ndr, int flags, struct eventlog_WriteClusterEvents *r)
2433 if (flags & NDR_IN) {
2435 if (flags & NDR_OUT) {
2436 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2438 return NDR_ERR_SUCCESS;
2441 _PUBLIC_ void ndr_print_eventlog_WriteClusterEvents(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_WriteClusterEvents *r)
2443 ndr_print_struct(ndr, name, "eventlog_WriteClusterEvents");
2444 ndr->depth++;
2445 if (flags & NDR_SET_VALUES) {
2446 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2448 if (flags & NDR_IN) {
2449 ndr_print_struct(ndr, "in", "eventlog_WriteClusterEvents");
2450 ndr->depth++;
2451 ndr->depth--;
2453 if (flags & NDR_OUT) {
2454 ndr_print_struct(ndr, "out", "eventlog_WriteClusterEvents");
2455 ndr->depth++;
2456 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2457 ndr->depth--;
2459 ndr->depth--;
2462 static enum ndr_err_code ndr_push_eventlog_GetLogInformation(struct ndr_push *ndr, int flags, const struct eventlog_GetLogInformation *r)
2464 if (flags & NDR_IN) {
2465 if (r->in.handle == NULL) {
2466 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2468 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2469 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
2470 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
2472 if (flags & NDR_OUT) {
2473 if (r->out.buffer == NULL) {
2474 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2476 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.buf_size));
2477 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.buf_size));
2478 if (r->out.bytes_needed == NULL) {
2479 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2481 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.bytes_needed));
2482 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2484 return NDR_ERR_SUCCESS;
2487 static enum ndr_err_code ndr_pull_eventlog_GetLogInformation(struct ndr_pull *ndr, int flags, struct eventlog_GetLogInformation *r)
2489 uint32_t size_buffer_1 = 0;
2490 TALLOC_CTX *_mem_save_handle_0;
2491 TALLOC_CTX *_mem_save_bytes_needed_0;
2492 if (flags & NDR_IN) {
2493 ZERO_STRUCT(r->out);
2495 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2496 NDR_PULL_ALLOC(ndr, r->in.handle);
2498 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2499 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
2500 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2501 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
2502 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
2503 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size));
2504 if (r->in.buf_size > 1024) {
2505 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2507 NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.buf_size);
2508 memset(r->out.buffer, 0, (r->in.buf_size) * sizeof(*r->out.buffer));
2509 NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
2510 ZERO_STRUCTP(r->out.bytes_needed);
2512 if (flags & NDR_OUT) {
2513 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.buffer));
2514 size_buffer_1 = ndr_get_array_size(ndr, &r->out.buffer);
2515 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2516 NDR_PULL_ALLOC_N(ndr, r->out.buffer, size_buffer_1);
2518 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.buffer, size_buffer_1));
2519 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2520 NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
2522 _mem_save_bytes_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
2523 NDR_PULL_SET_MEM_CTX(ndr, r->out.bytes_needed, LIBNDR_FLAG_REF_ALLOC);
2524 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.bytes_needed));
2525 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bytes_needed_0, LIBNDR_FLAG_REF_ALLOC);
2526 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2527 if (r->out.buffer) {
2528 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.buffer, r->in.buf_size));
2531 return NDR_ERR_SUCCESS;
2534 _PUBLIC_ void ndr_print_eventlog_GetLogInformation(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_GetLogInformation *r)
2536 ndr_print_struct(ndr, name, "eventlog_GetLogInformation");
2537 ndr->depth++;
2538 if (flags & NDR_SET_VALUES) {
2539 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2541 if (flags & NDR_IN) {
2542 ndr_print_struct(ndr, "in", "eventlog_GetLogInformation");
2543 ndr->depth++;
2544 ndr_print_ptr(ndr, "handle", r->in.handle);
2545 ndr->depth++;
2546 ndr_print_policy_handle(ndr, "handle", r->in.handle);
2547 ndr->depth--;
2548 ndr_print_uint32(ndr, "level", r->in.level);
2549 ndr_print_uint32(ndr, "buf_size", r->in.buf_size);
2550 ndr->depth--;
2552 if (flags & NDR_OUT) {
2553 ndr_print_struct(ndr, "out", "eventlog_GetLogInformation");
2554 ndr->depth++;
2555 ndr_print_ptr(ndr, "buffer", r->out.buffer);
2556 ndr->depth++;
2557 ndr_print_array_uint8(ndr, "buffer", r->out.buffer, r->in.buf_size);
2558 ndr->depth--;
2559 ndr_print_ptr(ndr, "bytes_needed", r->out.bytes_needed);
2560 ndr->depth++;
2561 ndr_print_uint32(ndr, "bytes_needed", *r->out.bytes_needed);
2562 ndr->depth--;
2563 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2564 ndr->depth--;
2566 ndr->depth--;
2569 static enum ndr_err_code ndr_push_eventlog_FlushEventLog(struct ndr_push *ndr, int flags, const struct eventlog_FlushEventLog *r)
2571 if (flags & NDR_IN) {
2572 if (r->in.handle == NULL) {
2573 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2575 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2577 if (flags & NDR_OUT) {
2578 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2580 return NDR_ERR_SUCCESS;
2583 static enum ndr_err_code ndr_pull_eventlog_FlushEventLog(struct ndr_pull *ndr, int flags, struct eventlog_FlushEventLog *r)
2585 TALLOC_CTX *_mem_save_handle_0;
2586 if (flags & NDR_IN) {
2587 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2588 NDR_PULL_ALLOC(ndr, r->in.handle);
2590 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2591 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
2592 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2593 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
2595 if (flags & NDR_OUT) {
2596 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2598 return NDR_ERR_SUCCESS;
2601 _PUBLIC_ void ndr_print_eventlog_FlushEventLog(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_FlushEventLog *r)
2603 ndr_print_struct(ndr, name, "eventlog_FlushEventLog");
2604 ndr->depth++;
2605 if (flags & NDR_SET_VALUES) {
2606 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2608 if (flags & NDR_IN) {
2609 ndr_print_struct(ndr, "in", "eventlog_FlushEventLog");
2610 ndr->depth++;
2611 ndr_print_ptr(ndr, "handle", r->in.handle);
2612 ndr->depth++;
2613 ndr_print_policy_handle(ndr, "handle", r->in.handle);
2614 ndr->depth--;
2615 ndr->depth--;
2617 if (flags & NDR_OUT) {
2618 ndr_print_struct(ndr, "out", "eventlog_FlushEventLog");
2619 ndr->depth++;
2620 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2621 ndr->depth--;
2623 ndr->depth--;
2626 static enum ndr_err_code ndr_push_eventlog_ReportEventAndSourceW(struct ndr_push *ndr, int flags, const struct eventlog_ReportEventAndSourceW *r)
2628 uint32_t cntr_strings_1;
2629 if (flags & NDR_IN) {
2630 if (r->in.handle == NULL) {
2631 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2633 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2634 NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->in.timestamp));
2635 NDR_CHECK(ndr_push_eventlogEventTypes(ndr, NDR_SCALARS, r->in.event_type));
2636 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.event_category));
2637 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.event_id));
2638 if (r->in.sourcename == NULL) {
2639 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2641 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sourcename));
2642 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.num_of_strings));
2643 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.data_size));
2644 if (r->in.servername == NULL) {
2645 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2647 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.servername));
2648 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.user_sid));
2649 if (r->in.user_sid) {
2650 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->in.user_sid));
2652 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.strings));
2653 if (r->in.strings) {
2654 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.num_of_strings));
2655 for (cntr_strings_1 = 0; cntr_strings_1 < r->in.num_of_strings; cntr_strings_1++) {
2657 for (cntr_strings_1 = 0; cntr_strings_1 < r->in.num_of_strings; cntr_strings_1++) {
2658 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.strings[cntr_strings_1]));
2659 if (r->in.strings[cntr_strings_1]) {
2660 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.strings[cntr_strings_1]));
2664 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.data));
2665 if (r->in.data) {
2666 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.data_size));
2667 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.data, r->in.data_size));
2669 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.flags));
2670 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.record_number));
2671 if (r->in.record_number) {
2672 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.record_number));
2674 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.time_written));
2675 if (r->in.time_written) {
2676 NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, *r->in.time_written));
2679 if (flags & NDR_OUT) {
2680 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.record_number));
2681 if (r->out.record_number) {
2682 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.record_number));
2684 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.time_written));
2685 if (r->out.time_written) {
2686 NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, *r->out.time_written));
2688 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2690 return NDR_ERR_SUCCESS;
2693 static enum ndr_err_code ndr_pull_eventlog_ReportEventAndSourceW(struct ndr_pull *ndr, int flags, struct eventlog_ReportEventAndSourceW *r)
2695 uint32_t _ptr_user_sid;
2696 uint32_t _ptr_strings;
2697 uint32_t size_strings_1 = 0;
2698 uint32_t cntr_strings_1;
2699 uint32_t _ptr_data;
2700 uint32_t size_data_1 = 0;
2701 uint32_t _ptr_record_number;
2702 uint32_t _ptr_time_written;
2703 TALLOC_CTX *_mem_save_handle_0;
2704 TALLOC_CTX *_mem_save_sourcename_0;
2705 TALLOC_CTX *_mem_save_servername_0;
2706 TALLOC_CTX *_mem_save_user_sid_0;
2707 TALLOC_CTX *_mem_save_strings_0;
2708 TALLOC_CTX *_mem_save_strings_1;
2709 TALLOC_CTX *_mem_save_strings_2;
2710 TALLOC_CTX *_mem_save_data_0;
2711 TALLOC_CTX *_mem_save_record_number_0;
2712 TALLOC_CTX *_mem_save_time_written_0;
2713 if (flags & NDR_IN) {
2714 ZERO_STRUCT(r->out);
2716 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2717 NDR_PULL_ALLOC(ndr, r->in.handle);
2719 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2720 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
2721 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2722 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
2723 NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->in.timestamp));
2724 NDR_CHECK(ndr_pull_eventlogEventTypes(ndr, NDR_SCALARS, &r->in.event_type));
2725 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.event_category));
2726 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.event_id));
2727 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2728 NDR_PULL_ALLOC(ndr, r->in.sourcename);
2730 _mem_save_sourcename_0 = NDR_PULL_GET_MEM_CTX(ndr);
2731 NDR_PULL_SET_MEM_CTX(ndr, r->in.sourcename, LIBNDR_FLAG_REF_ALLOC);
2732 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sourcename));
2733 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sourcename_0, LIBNDR_FLAG_REF_ALLOC);
2734 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.num_of_strings));
2735 if (r->in.num_of_strings > 256) {
2736 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2738 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.data_size));
2739 if (r->in.data_size > 0x3FFFF) {
2740 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2742 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2743 NDR_PULL_ALLOC(ndr, r->in.servername);
2745 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
2746 NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, LIBNDR_FLAG_REF_ALLOC);
2747 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.servername));
2748 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, LIBNDR_FLAG_REF_ALLOC);
2749 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user_sid));
2750 if (_ptr_user_sid) {
2751 NDR_PULL_ALLOC(ndr, r->in.user_sid);
2752 } else {
2753 r->in.user_sid = NULL;
2755 if (r->in.user_sid) {
2756 _mem_save_user_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
2757 NDR_PULL_SET_MEM_CTX(ndr, r->in.user_sid, 0);
2758 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->in.user_sid));
2759 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_sid_0, 0);
2761 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_strings));
2762 if (_ptr_strings) {
2763 NDR_PULL_ALLOC(ndr, r->in.strings);
2764 } else {
2765 r->in.strings = NULL;
2767 if (r->in.strings) {
2768 _mem_save_strings_0 = NDR_PULL_GET_MEM_CTX(ndr);
2769 NDR_PULL_SET_MEM_CTX(ndr, r->in.strings, 0);
2770 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.strings));
2771 size_strings_1 = ndr_get_array_size(ndr, &r->in.strings);
2772 NDR_PULL_ALLOC_N(ndr, r->in.strings, size_strings_1);
2773 _mem_save_strings_1 = NDR_PULL_GET_MEM_CTX(ndr);
2774 NDR_PULL_SET_MEM_CTX(ndr, r->in.strings, 0);
2775 for (cntr_strings_1 = 0; cntr_strings_1 < size_strings_1; cntr_strings_1++) {
2777 for (cntr_strings_1 = 0; cntr_strings_1 < size_strings_1; cntr_strings_1++) {
2778 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_strings));
2779 if (_ptr_strings) {
2780 NDR_PULL_ALLOC(ndr, r->in.strings[cntr_strings_1]);
2781 } else {
2782 r->in.strings[cntr_strings_1] = NULL;
2784 if (r->in.strings[cntr_strings_1]) {
2785 _mem_save_strings_2 = NDR_PULL_GET_MEM_CTX(ndr);
2786 NDR_PULL_SET_MEM_CTX(ndr, r->in.strings[cntr_strings_1], 0);
2787 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.strings[cntr_strings_1]));
2788 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_strings_2, 0);
2791 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_strings_1, 0);
2792 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_strings_0, 0);
2794 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
2795 if (_ptr_data) {
2796 NDR_PULL_ALLOC(ndr, r->in.data);
2797 } else {
2798 r->in.data = NULL;
2800 if (r->in.data) {
2801 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
2802 NDR_PULL_SET_MEM_CTX(ndr, r->in.data, 0);
2803 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.data));
2804 size_data_1 = ndr_get_array_size(ndr, &r->in.data);
2805 NDR_PULL_ALLOC_N(ndr, r->in.data, size_data_1);
2806 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.data, size_data_1));
2807 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
2809 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.flags));
2810 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_record_number));
2811 if (_ptr_record_number) {
2812 NDR_PULL_ALLOC(ndr, r->in.record_number);
2813 } else {
2814 r->in.record_number = NULL;
2816 if (r->in.record_number) {
2817 _mem_save_record_number_0 = NDR_PULL_GET_MEM_CTX(ndr);
2818 NDR_PULL_SET_MEM_CTX(ndr, r->in.record_number, 0);
2819 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.record_number));
2820 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_record_number_0, 0);
2822 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_time_written));
2823 if (_ptr_time_written) {
2824 NDR_PULL_ALLOC(ndr, r->in.time_written);
2825 } else {
2826 r->in.time_written = NULL;
2828 if (r->in.time_written) {
2829 _mem_save_time_written_0 = NDR_PULL_GET_MEM_CTX(ndr);
2830 NDR_PULL_SET_MEM_CTX(ndr, r->in.time_written, 0);
2831 NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, r->in.time_written));
2832 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_time_written_0, 0);
2834 if (r->in.strings) {
2835 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.strings, r->in.num_of_strings));
2837 if (r->in.data) {
2838 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.data, r->in.data_size));
2841 if (flags & NDR_OUT) {
2842 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_record_number));
2843 if (_ptr_record_number) {
2844 NDR_PULL_ALLOC(ndr, r->out.record_number);
2845 } else {
2846 r->out.record_number = NULL;
2848 if (r->out.record_number) {
2849 _mem_save_record_number_0 = NDR_PULL_GET_MEM_CTX(ndr);
2850 NDR_PULL_SET_MEM_CTX(ndr, r->out.record_number, 0);
2851 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.record_number));
2852 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_record_number_0, 0);
2854 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_time_written));
2855 if (_ptr_time_written) {
2856 NDR_PULL_ALLOC(ndr, r->out.time_written);
2857 } else {
2858 r->out.time_written = NULL;
2860 if (r->out.time_written) {
2861 _mem_save_time_written_0 = NDR_PULL_GET_MEM_CTX(ndr);
2862 NDR_PULL_SET_MEM_CTX(ndr, r->out.time_written, 0);
2863 NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, r->out.time_written));
2864 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_time_written_0, 0);
2866 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2868 return NDR_ERR_SUCCESS;
2871 _PUBLIC_ void ndr_print_eventlog_ReportEventAndSourceW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ReportEventAndSourceW *r)
2873 uint32_t cntr_strings_1;
2874 ndr_print_struct(ndr, name, "eventlog_ReportEventAndSourceW");
2875 ndr->depth++;
2876 if (flags & NDR_SET_VALUES) {
2877 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2879 if (flags & NDR_IN) {
2880 ndr_print_struct(ndr, "in", "eventlog_ReportEventAndSourceW");
2881 ndr->depth++;
2882 ndr_print_ptr(ndr, "handle", r->in.handle);
2883 ndr->depth++;
2884 ndr_print_policy_handle(ndr, "handle", r->in.handle);
2885 ndr->depth--;
2886 ndr_print_time_t(ndr, "timestamp", r->in.timestamp);
2887 ndr_print_eventlogEventTypes(ndr, "event_type", r->in.event_type);
2888 ndr_print_uint16(ndr, "event_category", r->in.event_category);
2889 ndr_print_uint32(ndr, "event_id", r->in.event_id);
2890 ndr_print_ptr(ndr, "sourcename", r->in.sourcename);
2891 ndr->depth++;
2892 ndr_print_lsa_String(ndr, "sourcename", r->in.sourcename);
2893 ndr->depth--;
2894 ndr_print_uint16(ndr, "num_of_strings", r->in.num_of_strings);
2895 ndr_print_uint32(ndr, "data_size", r->in.data_size);
2896 ndr_print_ptr(ndr, "servername", r->in.servername);
2897 ndr->depth++;
2898 ndr_print_lsa_String(ndr, "servername", r->in.servername);
2899 ndr->depth--;
2900 ndr_print_ptr(ndr, "user_sid", r->in.user_sid);
2901 ndr->depth++;
2902 if (r->in.user_sid) {
2903 ndr_print_dom_sid(ndr, "user_sid", r->in.user_sid);
2905 ndr->depth--;
2906 ndr_print_ptr(ndr, "strings", r->in.strings);
2907 ndr->depth++;
2908 if (r->in.strings) {
2909 ndr->print(ndr, "%s: ARRAY(%d)", "strings", (int)r->in.num_of_strings);
2910 ndr->depth++;
2911 for (cntr_strings_1=0;cntr_strings_1<r->in.num_of_strings;cntr_strings_1++) {
2912 char *idx_1=NULL;
2913 if (asprintf(&idx_1, "[%d]", cntr_strings_1) != -1) {
2914 ndr_print_ptr(ndr, "strings", r->in.strings[cntr_strings_1]);
2915 ndr->depth++;
2916 if (r->in.strings[cntr_strings_1]) {
2917 ndr_print_lsa_String(ndr, "strings", r->in.strings[cntr_strings_1]);
2919 ndr->depth--;
2920 free(idx_1);
2923 ndr->depth--;
2925 ndr->depth--;
2926 ndr_print_ptr(ndr, "data", r->in.data);
2927 ndr->depth++;
2928 if (r->in.data) {
2929 ndr_print_array_uint8(ndr, "data", r->in.data, r->in.data_size);
2931 ndr->depth--;
2932 ndr_print_uint16(ndr, "flags", r->in.flags);
2933 ndr_print_ptr(ndr, "record_number", r->in.record_number);
2934 ndr->depth++;
2935 if (r->in.record_number) {
2936 ndr_print_uint32(ndr, "record_number", *r->in.record_number);
2938 ndr->depth--;
2939 ndr_print_ptr(ndr, "time_written", r->in.time_written);
2940 ndr->depth++;
2941 if (r->in.time_written) {
2942 ndr_print_time_t(ndr, "time_written", *r->in.time_written);
2944 ndr->depth--;
2945 ndr->depth--;
2947 if (flags & NDR_OUT) {
2948 ndr_print_struct(ndr, "out", "eventlog_ReportEventAndSourceW");
2949 ndr->depth++;
2950 ndr_print_ptr(ndr, "record_number", r->out.record_number);
2951 ndr->depth++;
2952 if (r->out.record_number) {
2953 ndr_print_uint32(ndr, "record_number", *r->out.record_number);
2955 ndr->depth--;
2956 ndr_print_ptr(ndr, "time_written", r->out.time_written);
2957 ndr->depth++;
2958 if (r->out.time_written) {
2959 ndr_print_time_t(ndr, "time_written", *r->out.time_written);
2961 ndr->depth--;
2962 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2963 ndr->depth--;
2965 ndr->depth--;
2968 static const struct ndr_interface_call eventlog_calls[] = {
2970 "eventlog_ClearEventLogW",
2971 sizeof(struct eventlog_ClearEventLogW),
2972 (ndr_push_flags_fn_t) ndr_push_eventlog_ClearEventLogW,
2973 (ndr_pull_flags_fn_t) ndr_pull_eventlog_ClearEventLogW,
2974 (ndr_print_function_t) ndr_print_eventlog_ClearEventLogW,
2975 false,
2978 "eventlog_BackupEventLogW",
2979 sizeof(struct eventlog_BackupEventLogW),
2980 (ndr_push_flags_fn_t) ndr_push_eventlog_BackupEventLogW,
2981 (ndr_pull_flags_fn_t) ndr_pull_eventlog_BackupEventLogW,
2982 (ndr_print_function_t) ndr_print_eventlog_BackupEventLogW,
2983 false,
2986 "eventlog_CloseEventLog",
2987 sizeof(struct eventlog_CloseEventLog),
2988 (ndr_push_flags_fn_t) ndr_push_eventlog_CloseEventLog,
2989 (ndr_pull_flags_fn_t) ndr_pull_eventlog_CloseEventLog,
2990 (ndr_print_function_t) ndr_print_eventlog_CloseEventLog,
2991 false,
2994 "eventlog_DeregisterEventSource",
2995 sizeof(struct eventlog_DeregisterEventSource),
2996 (ndr_push_flags_fn_t) ndr_push_eventlog_DeregisterEventSource,
2997 (ndr_pull_flags_fn_t) ndr_pull_eventlog_DeregisterEventSource,
2998 (ndr_print_function_t) ndr_print_eventlog_DeregisterEventSource,
2999 false,
3002 "eventlog_GetNumRecords",
3003 sizeof(struct eventlog_GetNumRecords),
3004 (ndr_push_flags_fn_t) ndr_push_eventlog_GetNumRecords,
3005 (ndr_pull_flags_fn_t) ndr_pull_eventlog_GetNumRecords,
3006 (ndr_print_function_t) ndr_print_eventlog_GetNumRecords,
3007 false,
3010 "eventlog_GetOldestRecord",
3011 sizeof(struct eventlog_GetOldestRecord),
3012 (ndr_push_flags_fn_t) ndr_push_eventlog_GetOldestRecord,
3013 (ndr_pull_flags_fn_t) ndr_pull_eventlog_GetOldestRecord,
3014 (ndr_print_function_t) ndr_print_eventlog_GetOldestRecord,
3015 false,
3018 "eventlog_ChangeNotify",
3019 sizeof(struct eventlog_ChangeNotify),
3020 (ndr_push_flags_fn_t) ndr_push_eventlog_ChangeNotify,
3021 (ndr_pull_flags_fn_t) ndr_pull_eventlog_ChangeNotify,
3022 (ndr_print_function_t) ndr_print_eventlog_ChangeNotify,
3023 false,
3026 "eventlog_OpenEventLogW",
3027 sizeof(struct eventlog_OpenEventLogW),
3028 (ndr_push_flags_fn_t) ndr_push_eventlog_OpenEventLogW,
3029 (ndr_pull_flags_fn_t) ndr_pull_eventlog_OpenEventLogW,
3030 (ndr_print_function_t) ndr_print_eventlog_OpenEventLogW,
3031 false,
3034 "eventlog_RegisterEventSourceW",
3035 sizeof(struct eventlog_RegisterEventSourceW),
3036 (ndr_push_flags_fn_t) ndr_push_eventlog_RegisterEventSourceW,
3037 (ndr_pull_flags_fn_t) ndr_pull_eventlog_RegisterEventSourceW,
3038 (ndr_print_function_t) ndr_print_eventlog_RegisterEventSourceW,
3039 false,
3042 "eventlog_OpenBackupEventLogW",
3043 sizeof(struct eventlog_OpenBackupEventLogW),
3044 (ndr_push_flags_fn_t) ndr_push_eventlog_OpenBackupEventLogW,
3045 (ndr_pull_flags_fn_t) ndr_pull_eventlog_OpenBackupEventLogW,
3046 (ndr_print_function_t) ndr_print_eventlog_OpenBackupEventLogW,
3047 false,
3050 "eventlog_ReadEventLogW",
3051 sizeof(struct eventlog_ReadEventLogW),
3052 (ndr_push_flags_fn_t) ndr_push_eventlog_ReadEventLogW,
3053 (ndr_pull_flags_fn_t) ndr_pull_eventlog_ReadEventLogW,
3054 (ndr_print_function_t) ndr_print_eventlog_ReadEventLogW,
3055 false,
3058 "eventlog_ReportEventW",
3059 sizeof(struct eventlog_ReportEventW),
3060 (ndr_push_flags_fn_t) ndr_push_eventlog_ReportEventW,
3061 (ndr_pull_flags_fn_t) ndr_pull_eventlog_ReportEventW,
3062 (ndr_print_function_t) ndr_print_eventlog_ReportEventW,
3063 false,
3066 "eventlog_ClearEventLogA",
3067 sizeof(struct eventlog_ClearEventLogA),
3068 (ndr_push_flags_fn_t) ndr_push_eventlog_ClearEventLogA,
3069 (ndr_pull_flags_fn_t) ndr_pull_eventlog_ClearEventLogA,
3070 (ndr_print_function_t) ndr_print_eventlog_ClearEventLogA,
3071 false,
3074 "eventlog_BackupEventLogA",
3075 sizeof(struct eventlog_BackupEventLogA),
3076 (ndr_push_flags_fn_t) ndr_push_eventlog_BackupEventLogA,
3077 (ndr_pull_flags_fn_t) ndr_pull_eventlog_BackupEventLogA,
3078 (ndr_print_function_t) ndr_print_eventlog_BackupEventLogA,
3079 false,
3082 "eventlog_OpenEventLogA",
3083 sizeof(struct eventlog_OpenEventLogA),
3084 (ndr_push_flags_fn_t) ndr_push_eventlog_OpenEventLogA,
3085 (ndr_pull_flags_fn_t) ndr_pull_eventlog_OpenEventLogA,
3086 (ndr_print_function_t) ndr_print_eventlog_OpenEventLogA,
3087 false,
3090 "eventlog_RegisterEventSourceA",
3091 sizeof(struct eventlog_RegisterEventSourceA),
3092 (ndr_push_flags_fn_t) ndr_push_eventlog_RegisterEventSourceA,
3093 (ndr_pull_flags_fn_t) ndr_pull_eventlog_RegisterEventSourceA,
3094 (ndr_print_function_t) ndr_print_eventlog_RegisterEventSourceA,
3095 false,
3098 "eventlog_OpenBackupEventLogA",
3099 sizeof(struct eventlog_OpenBackupEventLogA),
3100 (ndr_push_flags_fn_t) ndr_push_eventlog_OpenBackupEventLogA,
3101 (ndr_pull_flags_fn_t) ndr_pull_eventlog_OpenBackupEventLogA,
3102 (ndr_print_function_t) ndr_print_eventlog_OpenBackupEventLogA,
3103 false,
3106 "eventlog_ReadEventLogA",
3107 sizeof(struct eventlog_ReadEventLogA),
3108 (ndr_push_flags_fn_t) ndr_push_eventlog_ReadEventLogA,
3109 (ndr_pull_flags_fn_t) ndr_pull_eventlog_ReadEventLogA,
3110 (ndr_print_function_t) ndr_print_eventlog_ReadEventLogA,
3111 false,
3114 "eventlog_ReportEventA",
3115 sizeof(struct eventlog_ReportEventA),
3116 (ndr_push_flags_fn_t) ndr_push_eventlog_ReportEventA,
3117 (ndr_pull_flags_fn_t) ndr_pull_eventlog_ReportEventA,
3118 (ndr_print_function_t) ndr_print_eventlog_ReportEventA,
3119 false,
3122 "eventlog_RegisterClusterSvc",
3123 sizeof(struct eventlog_RegisterClusterSvc),
3124 (ndr_push_flags_fn_t) ndr_push_eventlog_RegisterClusterSvc,
3125 (ndr_pull_flags_fn_t) ndr_pull_eventlog_RegisterClusterSvc,
3126 (ndr_print_function_t) ndr_print_eventlog_RegisterClusterSvc,
3127 false,
3130 "eventlog_DeregisterClusterSvc",
3131 sizeof(struct eventlog_DeregisterClusterSvc),
3132 (ndr_push_flags_fn_t) ndr_push_eventlog_DeregisterClusterSvc,
3133 (ndr_pull_flags_fn_t) ndr_pull_eventlog_DeregisterClusterSvc,
3134 (ndr_print_function_t) ndr_print_eventlog_DeregisterClusterSvc,
3135 false,
3138 "eventlog_WriteClusterEvents",
3139 sizeof(struct eventlog_WriteClusterEvents),
3140 (ndr_push_flags_fn_t) ndr_push_eventlog_WriteClusterEvents,
3141 (ndr_pull_flags_fn_t) ndr_pull_eventlog_WriteClusterEvents,
3142 (ndr_print_function_t) ndr_print_eventlog_WriteClusterEvents,
3143 false,
3146 "eventlog_GetLogInformation",
3147 sizeof(struct eventlog_GetLogInformation),
3148 (ndr_push_flags_fn_t) ndr_push_eventlog_GetLogInformation,
3149 (ndr_pull_flags_fn_t) ndr_pull_eventlog_GetLogInformation,
3150 (ndr_print_function_t) ndr_print_eventlog_GetLogInformation,
3151 false,
3154 "eventlog_FlushEventLog",
3155 sizeof(struct eventlog_FlushEventLog),
3156 (ndr_push_flags_fn_t) ndr_push_eventlog_FlushEventLog,
3157 (ndr_pull_flags_fn_t) ndr_pull_eventlog_FlushEventLog,
3158 (ndr_print_function_t) ndr_print_eventlog_FlushEventLog,
3159 false,
3162 "eventlog_ReportEventAndSourceW",
3163 sizeof(struct eventlog_ReportEventAndSourceW),
3164 (ndr_push_flags_fn_t) ndr_push_eventlog_ReportEventAndSourceW,
3165 (ndr_pull_flags_fn_t) ndr_pull_eventlog_ReportEventAndSourceW,
3166 (ndr_print_function_t) ndr_print_eventlog_ReportEventAndSourceW,
3167 false,
3169 { NULL, 0, NULL, NULL, NULL, false }
3172 static const char * const eventlog_endpoint_strings[] = {
3173 "ncacn_np:[\\pipe\\eventlog]",
3176 static const struct ndr_interface_string_array eventlog_endpoints = {
3177 .count = 1,
3178 .names = eventlog_endpoint_strings
3181 static const char * const eventlog_authservice_strings[] = {
3182 "host",
3185 static const struct ndr_interface_string_array eventlog_authservices = {
3186 .count = 1,
3187 .names = eventlog_authservice_strings
3191 const struct ndr_interface_table ndr_table_eventlog = {
3192 .name = "eventlog",
3193 .syntax_id = {
3194 {0x82273fdc,0xe32a,0x18c3,{0x3f,0x78},{0x82,0x79,0x29,0xdc,0x23,0xea}},
3195 NDR_EVENTLOG_VERSION
3197 .helpstring = NDR_EVENTLOG_HELPSTRING,
3198 .num_calls = 25,
3199 .calls = eventlog_calls,
3200 .endpoints = &eventlog_endpoints,
3201 .authservices = &eventlog_authservices