s3:ntlm_auth: free session key, as we don't use it (at least for now)
[Samba.git] / librpc / gen_ndr / ndr_eventlog.c
bloba7e502c105bd7cb59fc4c881acc599ce0e1d4191
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);
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);
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);
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 cntr_strings_0;
160 TALLOC_CTX *_mem_save_strings_0;
162 uint32_t _flags_save_STRUCT = ndr->flags;
163 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_PRINT_ARRAY_HEX);
164 if (ndr_flags & NDR_SCALARS) {
165 NDR_CHECK(ndr_pull_align(ndr, 4));
166 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
167 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->reserved, 4, sizeof(uint8_t), CH_DOS));
168 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->record_number));
169 NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->time_generated));
170 NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->time_written));
171 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->event_id));
172 NDR_CHECK(ndr_pull_eventlogEventTypes(ndr, NDR_SCALARS, &r->event_type));
173 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_of_strings));
174 if (r->num_of_strings > 256) {
175 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
177 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->event_category));
178 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved_flags));
179 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->closing_record_number));
180 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->stringoffset));
181 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_length));
182 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_offset));
183 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->data_length));
184 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->data_offset));
185 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->source_name_len));
187 uint32_t _flags_save_string = ndr->flags;
188 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
189 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->source_name));
190 ndr->flags = _flags_save_string;
192 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->computer_name_len));
194 uint32_t _flags_save_string = ndr->flags;
195 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
196 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->computer_name));
197 ndr->flags = _flags_save_string;
199 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_padding));
200 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->sid));
201 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->strings_len));
203 uint32_t _flags_save_string = ndr->flags;
204 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
205 NDR_PULL_ALLOC_N(ndr, r->strings, r->num_of_strings);
206 _mem_save_strings_0 = NDR_PULL_GET_MEM_CTX(ndr);
207 NDR_PULL_SET_MEM_CTX(ndr, r->strings, 0);
208 for (cntr_strings_0 = 0; cntr_strings_0 < r->num_of_strings; cntr_strings_0++) {
209 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->strings[cntr_strings_0]));
211 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_strings_0, 0);
212 ndr->flags = _flags_save_string;
214 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->data));
215 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->padding));
216 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
218 if (ndr_flags & NDR_BUFFERS) {
220 ndr->flags = _flags_save_STRUCT;
222 return NDR_ERR_SUCCESS;
225 _PUBLIC_ void ndr_print_eventlog_Record_tdb(struct ndr_print *ndr, const char *name, const struct eventlog_Record_tdb *r)
227 uint32_t cntr_strings_0;
228 ndr_print_struct(ndr, name, "eventlog_Record_tdb");
230 uint32_t _flags_save_STRUCT = ndr->flags;
231 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_PRINT_ARRAY_HEX);
232 ndr->depth++;
233 ndr_print_uint32(ndr, "size", r->size);
234 ndr_print_string(ndr, "reserved", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?"eLfL":r->reserved);
235 ndr_print_uint32(ndr, "record_number", r->record_number);
236 ndr_print_time_t(ndr, "time_generated", r->time_generated);
237 ndr_print_time_t(ndr, "time_written", r->time_written);
238 ndr_print_uint32(ndr, "event_id", r->event_id);
239 ndr_print_eventlogEventTypes(ndr, "event_type", r->event_type);
240 ndr_print_uint16(ndr, "num_of_strings", r->num_of_strings);
241 ndr_print_uint16(ndr, "event_category", r->event_category);
242 ndr_print_uint16(ndr, "reserved_flags", r->reserved_flags);
243 ndr_print_uint32(ndr, "closing_record_number", r->closing_record_number);
244 ndr_print_uint32(ndr, "stringoffset", r->stringoffset);
245 ndr_print_uint32(ndr, "sid_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->sid.length:r->sid_length);
246 ndr_print_uint32(ndr, "sid_offset", r->sid_offset);
247 ndr_print_uint32(ndr, "data_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->data.length:r->data_length);
248 ndr_print_uint32(ndr, "data_offset", r->data_offset);
249 ndr_print_uint32(ndr, "source_name_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m_term(r->source_name):r->source_name_len);
250 ndr_print_string(ndr, "source_name", r->source_name);
251 ndr_print_uint32(ndr, "computer_name_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m_term(r->computer_name):r->computer_name_len);
252 ndr_print_string(ndr, "computer_name", r->computer_name);
253 ndr_print_uint32(ndr, "sid_padding", r->sid_padding);
254 ndr_print_DATA_BLOB(ndr, "sid", r->sid);
255 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);
256 ndr->print(ndr, "%s: ARRAY(%d)", "strings", (int)r->num_of_strings);
257 ndr->depth++;
258 for (cntr_strings_0=0;cntr_strings_0<r->num_of_strings;cntr_strings_0++) {
259 char *idx_0=NULL;
260 if (asprintf(&idx_0, "[%d]", cntr_strings_0) != -1) {
261 ndr_print_string(ndr, "strings", r->strings[cntr_strings_0]);
262 free(idx_0);
265 ndr->depth--;
266 ndr_print_DATA_BLOB(ndr, "data", r->data);
267 ndr_print_uint32(ndr, "padding", r->padding);
268 ndr->depth--;
269 ndr->flags = _flags_save_STRUCT;
273 static enum ndr_err_code ndr_push_EVENTLOG_HEADER_FLAGS(struct ndr_push *ndr, int ndr_flags, enum EVENTLOG_HEADER_FLAGS r)
275 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
276 return NDR_ERR_SUCCESS;
279 static enum ndr_err_code ndr_pull_EVENTLOG_HEADER_FLAGS(struct ndr_pull *ndr, int ndr_flags, enum EVENTLOG_HEADER_FLAGS *r)
281 uint32_t v;
282 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
283 *r = v;
284 return NDR_ERR_SUCCESS;
287 _PUBLIC_ void ndr_print_EVENTLOG_HEADER_FLAGS(struct ndr_print *ndr, const char *name, enum EVENTLOG_HEADER_FLAGS r)
289 const char *val = NULL;
291 switch (r) {
292 case ELF_LOGFILE_HEADER_DIRTY: val = "ELF_LOGFILE_HEADER_DIRTY"; break;
293 case ELF_LOGFILE_HEADER_WRAP: val = "ELF_LOGFILE_HEADER_WRAP"; break;
294 case ELF_LOGFILE_LOGFULL_WRITTEN: val = "ELF_LOGFILE_LOGFULL_WRITTEN"; break;
295 case ELF_LOGFILE_ARCHIVE_SET: val = "ELF_LOGFILE_ARCHIVE_SET"; break;
297 ndr_print_enum(ndr, name, "ENUM", val, r);
300 _PUBLIC_ enum ndr_err_code ndr_push_EVENTLOGHEADER(struct ndr_push *ndr, int ndr_flags, const struct EVENTLOGHEADER *r)
302 if (ndr_flags & NDR_SCALARS) {
303 NDR_CHECK(ndr_push_align(ndr, 4));
304 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x30));
305 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, "LfLe", 4, sizeof(uint8_t), CH_DOS));
306 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 1));
307 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 1));
308 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->StartOffset));
309 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->EndOffset));
310 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->CurrentRecordNumber));
311 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->OldestRecordNumber));
312 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->MaxSize));
313 NDR_CHECK(ndr_push_EVENTLOG_HEADER_FLAGS(ndr, NDR_SCALARS, r->Flags));
314 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Retention));
315 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x30));
316 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
318 if (ndr_flags & NDR_BUFFERS) {
320 return NDR_ERR_SUCCESS;
323 _PUBLIC_ enum ndr_err_code ndr_pull_EVENTLOGHEADER(struct ndr_pull *ndr, int ndr_flags, struct EVENTLOGHEADER *r)
325 if (ndr_flags & NDR_SCALARS) {
326 NDR_CHECK(ndr_pull_align(ndr, 4));
327 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->HeaderSize));
328 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->Signature, 4, sizeof(uint8_t), CH_DOS));
329 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->MajorVersion));
330 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->MinorVersion));
331 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->StartOffset));
332 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->EndOffset));
333 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->CurrentRecordNumber));
334 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->OldestRecordNumber));
335 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->MaxSize));
336 NDR_CHECK(ndr_pull_EVENTLOG_HEADER_FLAGS(ndr, NDR_SCALARS, &r->Flags));
337 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Retention));
338 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->EndHeaderSize));
339 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
341 if (ndr_flags & NDR_BUFFERS) {
343 return NDR_ERR_SUCCESS;
346 _PUBLIC_ void ndr_print_EVENTLOGHEADER(struct ndr_print *ndr, const char *name, const struct EVENTLOGHEADER *r)
348 ndr_print_struct(ndr, name, "EVENTLOGHEADER");
349 ndr->depth++;
350 ndr_print_uint32(ndr, "HeaderSize", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x30:r->HeaderSize);
351 ndr_print_string(ndr, "Signature", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?"LfLe":r->Signature);
352 ndr_print_uint32(ndr, "MajorVersion", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?1:r->MajorVersion);
353 ndr_print_uint32(ndr, "MinorVersion", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?1:r->MinorVersion);
354 ndr_print_uint32(ndr, "StartOffset", r->StartOffset);
355 ndr_print_uint32(ndr, "EndOffset", r->EndOffset);
356 ndr_print_uint32(ndr, "CurrentRecordNumber", r->CurrentRecordNumber);
357 ndr_print_uint32(ndr, "OldestRecordNumber", r->OldestRecordNumber);
358 ndr_print_uint32(ndr, "MaxSize", r->MaxSize);
359 ndr_print_EVENTLOG_HEADER_FLAGS(ndr, "Flags", r->Flags);
360 ndr_print_uint32(ndr, "Retention", r->Retention);
361 ndr_print_uint32(ndr, "EndHeaderSize", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x30:r->EndHeaderSize);
362 ndr->depth--;
365 _PUBLIC_ enum ndr_err_code ndr_push_EVENTLOGRECORD(struct ndr_push *ndr, int ndr_flags, const struct EVENTLOGRECORD *r)
367 uint32_t cntr_Strings_0;
368 if (ndr_flags & NDR_SCALARS) {
369 NDR_CHECK(ndr_push_align(ndr, 4));
370 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Length));
371 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, "LfLe", 4, sizeof(uint8_t), CH_DOS));
372 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->RecordNumber));
373 NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->TimeGenerated));
374 NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->TimeWritten));
375 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->EventID));
376 NDR_CHECK(ndr_push_eventlogEventTypes(ndr, NDR_SCALARS, r->EventType));
377 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->NumStrings));
378 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->EventCategory));
379 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->ReservedFlags));
380 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ClosingRecordNumber));
381 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)));
382 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_dom_sid0(&r->UserSid, ndr->flags)));
383 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 56 + 2 * (strlen_m_term(r->SourceName) + strlen_m_term(r->Computername))));
384 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->DataLength));
385 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))));
387 uint32_t _flags_save_string = ndr->flags;
388 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
389 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->SourceName));
390 ndr->flags = _flags_save_string;
393 uint32_t _flags_save_string = ndr->flags;
394 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
395 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->Computername));
396 ndr->flags = _flags_save_string;
399 uint32_t _flags_save_dom_sid0 = ndr->flags;
400 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
402 struct ndr_push *_ndr_UserSid;
403 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_UserSid, 0, ndr_size_dom_sid0(&r->UserSid, ndr->flags)));
404 NDR_CHECK(ndr_push_dom_sid0(_ndr_UserSid, NDR_SCALARS|NDR_BUFFERS, &r->UserSid));
405 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_UserSid, 0, ndr_size_dom_sid0(&r->UserSid, ndr->flags)));
407 ndr->flags = _flags_save_dom_sid0;
410 uint32_t _flags_save_string = ndr->flags;
411 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
412 for (cntr_Strings_0 = 0; cntr_Strings_0 < r->NumStrings; cntr_Strings_0++) {
413 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->Strings[cntr_Strings_0]));
415 ndr->flags = _flags_save_string;
418 uint32_t _flags_save_uint8 = ndr->flags;
419 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
420 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->Data, r->DataLength));
421 ndr->flags = _flags_save_uint8;
424 uint32_t _flags_save_string = ndr->flags;
425 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
426 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->Pad));
427 ndr->flags = _flags_save_string;
429 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Length));
430 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
432 if (ndr_flags & NDR_BUFFERS) {
434 uint32_t _flags_save_dom_sid0 = ndr->flags;
435 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
436 ndr->flags = _flags_save_dom_sid0;
439 return NDR_ERR_SUCCESS;
442 _PUBLIC_ enum ndr_err_code ndr_pull_EVENTLOGRECORD(struct ndr_pull *ndr, int ndr_flags, struct EVENTLOGRECORD *r)
444 uint32_t cntr_Strings_0;
445 TALLOC_CTX *_mem_save_Strings_0;
446 if (ndr_flags & NDR_SCALARS) {
447 NDR_CHECK(ndr_pull_align(ndr, 4));
448 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Length));
449 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->Reserved, 4, sizeof(uint8_t), CH_DOS));
450 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->RecordNumber));
451 NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->TimeGenerated));
452 NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->TimeWritten));
453 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->EventID));
454 NDR_CHECK(ndr_pull_eventlogEventTypes(ndr, NDR_SCALARS, &r->EventType));
455 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->NumStrings));
456 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->EventCategory));
457 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->ReservedFlags));
458 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ClosingRecordNumber));
459 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->StringOffset));
460 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->UserSidLength));
461 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->UserSidOffset));
462 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->DataLength));
463 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->DataOffset));
465 uint32_t _flags_save_string = ndr->flags;
466 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
467 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->SourceName));
468 ndr->flags = _flags_save_string;
471 uint32_t _flags_save_string = ndr->flags;
472 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
473 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->Computername));
474 ndr->flags = _flags_save_string;
477 uint32_t _flags_save_dom_sid0 = ndr->flags;
478 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
480 struct ndr_pull *_ndr_UserSid;
481 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_UserSid, 0, r->UserSidLength));
482 NDR_CHECK(ndr_pull_dom_sid0(_ndr_UserSid, NDR_SCALARS|NDR_BUFFERS, &r->UserSid));
483 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_UserSid, 0, r->UserSidLength));
485 ndr->flags = _flags_save_dom_sid0;
488 uint32_t _flags_save_string = ndr->flags;
489 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
490 NDR_PULL_ALLOC_N(ndr, r->Strings, r->NumStrings);
491 _mem_save_Strings_0 = NDR_PULL_GET_MEM_CTX(ndr);
492 NDR_PULL_SET_MEM_CTX(ndr, r->Strings, 0);
493 for (cntr_Strings_0 = 0; cntr_Strings_0 < r->NumStrings; cntr_Strings_0++) {
494 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->Strings[cntr_Strings_0]));
496 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Strings_0, 0);
497 ndr->flags = _flags_save_string;
500 uint32_t _flags_save_uint8 = ndr->flags;
501 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
502 NDR_PULL_ALLOC_N(ndr, r->Data, r->DataLength);
503 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->Data, r->DataLength));
504 ndr->flags = _flags_save_uint8;
507 uint32_t _flags_save_string = ndr->flags;
508 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
509 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->Pad));
510 ndr->flags = _flags_save_string;
512 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Length2));
513 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
515 if (ndr_flags & NDR_BUFFERS) {
517 uint32_t _flags_save_dom_sid0 = ndr->flags;
518 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
519 ndr->flags = _flags_save_dom_sid0;
522 return NDR_ERR_SUCCESS;
525 _PUBLIC_ void ndr_print_EVENTLOGRECORD(struct ndr_print *ndr, const char *name, const struct EVENTLOGRECORD *r)
527 uint32_t cntr_Strings_0;
528 ndr_print_struct(ndr, name, "EVENTLOGRECORD");
529 ndr->depth++;
530 ndr_print_uint32(ndr, "Length", r->Length);
531 ndr_print_string(ndr, "Reserved", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?"LfLe":r->Reserved);
532 ndr_print_uint32(ndr, "RecordNumber", r->RecordNumber);
533 ndr_print_time_t(ndr, "TimeGenerated", r->TimeGenerated);
534 ndr_print_time_t(ndr, "TimeWritten", r->TimeWritten);
535 ndr_print_uint32(ndr, "EventID", r->EventID);
536 ndr_print_eventlogEventTypes(ndr, "EventType", r->EventType);
537 ndr_print_uint16(ndr, "NumStrings", r->NumStrings);
538 ndr_print_uint16(ndr, "EventCategory", r->EventCategory);
539 ndr_print_uint16(ndr, "ReservedFlags", r->ReservedFlags);
540 ndr_print_uint32(ndr, "ClosingRecordNumber", r->ClosingRecordNumber);
541 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);
542 ndr_print_uint32(ndr, "UserSidLength", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_dom_sid0(&r->UserSid, ndr->flags):r->UserSidLength);
543 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);
544 ndr_print_uint32(ndr, "DataLength", r->DataLength);
545 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);
546 ndr_print_string(ndr, "SourceName", r->SourceName);
547 ndr_print_string(ndr, "Computername", r->Computername);
548 ndr_print_dom_sid0(ndr, "UserSid", &r->UserSid);
549 ndr->print(ndr, "%s: ARRAY(%d)", "Strings", (int)r->NumStrings);
550 ndr->depth++;
551 for (cntr_Strings_0=0;cntr_Strings_0<r->NumStrings;cntr_Strings_0++) {
552 char *idx_0=NULL;
553 if (asprintf(&idx_0, "[%d]", cntr_Strings_0) != -1) {
554 ndr_print_string(ndr, "Strings", r->Strings[cntr_Strings_0]);
555 free(idx_0);
558 ndr->depth--;
559 ndr_print_array_uint8(ndr, "Data", r->Data, r->DataLength);
560 ndr_print_string(ndr, "Pad", r->Pad);
561 ndr_print_uint32(ndr, "Length2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->Length:r->Length2);
562 ndr->depth--;
565 _PUBLIC_ size_t ndr_size_EVENTLOGRECORD(const struct EVENTLOGRECORD *r, struct smb_iconv_convenience *ic, int flags)
567 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_EVENTLOGRECORD, ic);
570 _PUBLIC_ enum ndr_err_code ndr_push_EVENTLOGEOF(struct ndr_push *ndr, int ndr_flags, const struct EVENTLOGEOF *r)
572 if (ndr_flags & NDR_SCALARS) {
573 NDR_CHECK(ndr_push_align(ndr, 4));
574 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x28));
575 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x11111111));
576 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x22222222));
577 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x33333333));
578 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x44444444));
579 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->BeginRecord));
580 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->EndRecord));
581 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->CurrentRecordNumber));
582 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->OldestRecordNumber));
583 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x28));
584 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
586 if (ndr_flags & NDR_BUFFERS) {
588 return NDR_ERR_SUCCESS;
591 _PUBLIC_ enum ndr_err_code ndr_pull_EVENTLOGEOF(struct ndr_pull *ndr, int ndr_flags, struct EVENTLOGEOF *r)
593 if (ndr_flags & NDR_SCALARS) {
594 NDR_CHECK(ndr_pull_align(ndr, 4));
595 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->RecordSizeBeginning));
596 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->One));
597 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Two));
598 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Three));
599 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Four));
600 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->BeginRecord));
601 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->EndRecord));
602 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->CurrentRecordNumber));
603 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->OldestRecordNumber));
604 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->RecordSizeEnd));
605 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
607 if (ndr_flags & NDR_BUFFERS) {
609 return NDR_ERR_SUCCESS;
612 _PUBLIC_ void ndr_print_EVENTLOGEOF(struct ndr_print *ndr, const char *name, const struct EVENTLOGEOF *r)
614 ndr_print_struct(ndr, name, "EVENTLOGEOF");
615 ndr->depth++;
616 ndr_print_uint32(ndr, "RecordSizeBeginning", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x28:r->RecordSizeBeginning);
617 ndr_print_uint32(ndr, "One", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x11111111:r->One);
618 ndr_print_uint32(ndr, "Two", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x22222222:r->Two);
619 ndr_print_uint32(ndr, "Three", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x33333333:r->Three);
620 ndr_print_uint32(ndr, "Four", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x44444444:r->Four);
621 ndr_print_uint32(ndr, "BeginRecord", r->BeginRecord);
622 ndr_print_uint32(ndr, "EndRecord", r->EndRecord);
623 ndr_print_uint32(ndr, "CurrentRecordNumber", r->CurrentRecordNumber);
624 ndr_print_uint32(ndr, "OldestRecordNumber", r->OldestRecordNumber);
625 ndr_print_uint32(ndr, "RecordSizeEnd", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x28:r->RecordSizeEnd);
626 ndr->depth--;
629 _PUBLIC_ enum ndr_err_code ndr_push_EVENTLOG_EVT_FILE(struct ndr_push *ndr, int ndr_flags, const struct EVENTLOG_EVT_FILE *r)
631 uint32_t cntr_records_0;
632 if (ndr_flags & NDR_SCALARS) {
633 NDR_CHECK(ndr_push_align(ndr, 4));
634 NDR_CHECK(ndr_push_EVENTLOGHEADER(ndr, NDR_SCALARS, &r->hdr));
635 for (cntr_records_0 = 0; cntr_records_0 < r->hdr.CurrentRecordNumber - r->hdr.OldestRecordNumber; cntr_records_0++) {
636 NDR_CHECK(ndr_push_EVENTLOGRECORD(ndr, NDR_SCALARS, &r->records[cntr_records_0]));
638 NDR_CHECK(ndr_push_EVENTLOGEOF(ndr, NDR_SCALARS, &r->eof));
639 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
641 if (ndr_flags & NDR_BUFFERS) {
642 for (cntr_records_0 = 0; cntr_records_0 < r->hdr.CurrentRecordNumber - r->hdr.OldestRecordNumber; cntr_records_0++) {
643 NDR_CHECK(ndr_push_EVENTLOGRECORD(ndr, NDR_BUFFERS, &r->records[cntr_records_0]));
646 return NDR_ERR_SUCCESS;
649 _PUBLIC_ enum ndr_err_code ndr_pull_EVENTLOG_EVT_FILE(struct ndr_pull *ndr, int ndr_flags, struct EVENTLOG_EVT_FILE *r)
651 uint32_t cntr_records_0;
652 TALLOC_CTX *_mem_save_records_0;
653 if (ndr_flags & NDR_SCALARS) {
654 NDR_CHECK(ndr_pull_align(ndr, 4));
655 NDR_CHECK(ndr_pull_EVENTLOGHEADER(ndr, NDR_SCALARS, &r->hdr));
656 NDR_PULL_ALLOC_N(ndr, r->records, r->hdr.CurrentRecordNumber - r->hdr.OldestRecordNumber);
657 _mem_save_records_0 = NDR_PULL_GET_MEM_CTX(ndr);
658 NDR_PULL_SET_MEM_CTX(ndr, r->records, 0);
659 for (cntr_records_0 = 0; cntr_records_0 < r->hdr.CurrentRecordNumber - r->hdr.OldestRecordNumber; cntr_records_0++) {
660 NDR_CHECK(ndr_pull_EVENTLOGRECORD(ndr, NDR_SCALARS, &r->records[cntr_records_0]));
662 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_records_0, 0);
663 NDR_CHECK(ndr_pull_EVENTLOGEOF(ndr, NDR_SCALARS, &r->eof));
664 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
666 if (ndr_flags & NDR_BUFFERS) {
667 _mem_save_records_0 = NDR_PULL_GET_MEM_CTX(ndr);
668 NDR_PULL_SET_MEM_CTX(ndr, r->records, 0);
669 for (cntr_records_0 = 0; cntr_records_0 < r->hdr.CurrentRecordNumber - r->hdr.OldestRecordNumber; cntr_records_0++) {
670 NDR_CHECK(ndr_pull_EVENTLOGRECORD(ndr, NDR_BUFFERS, &r->records[cntr_records_0]));
672 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_records_0, 0);
674 return NDR_ERR_SUCCESS;
677 _PUBLIC_ void ndr_print_EVENTLOG_EVT_FILE(struct ndr_print *ndr, const char *name, const struct EVENTLOG_EVT_FILE *r)
679 uint32_t cntr_records_0;
680 ndr_print_struct(ndr, name, "EVENTLOG_EVT_FILE");
681 ndr->depth++;
682 ndr_print_EVENTLOGHEADER(ndr, "hdr", &r->hdr);
683 ndr->print(ndr, "%s: ARRAY(%d)", "records", (int)r->hdr.CurrentRecordNumber - r->hdr.OldestRecordNumber);
684 ndr->depth++;
685 for (cntr_records_0=0;cntr_records_0<r->hdr.CurrentRecordNumber - r->hdr.OldestRecordNumber;cntr_records_0++) {
686 char *idx_0=NULL;
687 if (asprintf(&idx_0, "[%d]", cntr_records_0) != -1) {
688 ndr_print_EVENTLOGRECORD(ndr, "records", &r->records[cntr_records_0]);
689 free(idx_0);
692 ndr->depth--;
693 ndr_print_EVENTLOGEOF(ndr, "eof", &r->eof);
694 ndr->depth--;
697 _PUBLIC_ enum ndr_err_code ndr_push_EVENTLOG_FULL_INFORMATION(struct ndr_push *ndr, int ndr_flags, const struct EVENTLOG_FULL_INFORMATION *r)
699 if (ndr_flags & NDR_SCALARS) {
700 NDR_CHECK(ndr_push_align(ndr, 4));
701 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->full));
702 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
704 if (ndr_flags & NDR_BUFFERS) {
706 return NDR_ERR_SUCCESS;
709 _PUBLIC_ enum ndr_err_code ndr_pull_EVENTLOG_FULL_INFORMATION(struct ndr_pull *ndr, int ndr_flags, struct EVENTLOG_FULL_INFORMATION *r)
711 if (ndr_flags & NDR_SCALARS) {
712 NDR_CHECK(ndr_pull_align(ndr, 4));
713 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->full));
714 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
716 if (ndr_flags & NDR_BUFFERS) {
718 return NDR_ERR_SUCCESS;
721 _PUBLIC_ void ndr_print_EVENTLOG_FULL_INFORMATION(struct ndr_print *ndr, const char *name, const struct EVENTLOG_FULL_INFORMATION *r)
723 ndr_print_struct(ndr, name, "EVENTLOG_FULL_INFORMATION");
724 ndr->depth++;
725 ndr_print_uint32(ndr, "full", r->full);
726 ndr->depth--;
729 static enum ndr_err_code ndr_push_eventlog_ClearEventLogW(struct ndr_push *ndr, int flags, const struct eventlog_ClearEventLogW *r)
731 if (flags & NDR_IN) {
732 if (r->in.handle == NULL) {
733 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
735 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
736 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.backupfile));
737 if (r->in.backupfile) {
738 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.backupfile));
741 if (flags & NDR_OUT) {
742 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
744 return NDR_ERR_SUCCESS;
747 static enum ndr_err_code ndr_pull_eventlog_ClearEventLogW(struct ndr_pull *ndr, int flags, struct eventlog_ClearEventLogW *r)
749 uint32_t _ptr_backupfile;
750 TALLOC_CTX *_mem_save_handle_0;
751 TALLOC_CTX *_mem_save_backupfile_0;
752 if (flags & NDR_IN) {
753 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
754 NDR_PULL_ALLOC(ndr, r->in.handle);
756 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
757 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
758 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
759 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
760 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_backupfile));
761 if (_ptr_backupfile) {
762 NDR_PULL_ALLOC(ndr, r->in.backupfile);
763 } else {
764 r->in.backupfile = NULL;
766 if (r->in.backupfile) {
767 _mem_save_backupfile_0 = NDR_PULL_GET_MEM_CTX(ndr);
768 NDR_PULL_SET_MEM_CTX(ndr, r->in.backupfile, 0);
769 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.backupfile));
770 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_backupfile_0, 0);
773 if (flags & NDR_OUT) {
774 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
776 return NDR_ERR_SUCCESS;
779 _PUBLIC_ void ndr_print_eventlog_ClearEventLogW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ClearEventLogW *r)
781 ndr_print_struct(ndr, name, "eventlog_ClearEventLogW");
782 ndr->depth++;
783 if (flags & NDR_SET_VALUES) {
784 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
786 if (flags & NDR_IN) {
787 ndr_print_struct(ndr, "in", "eventlog_ClearEventLogW");
788 ndr->depth++;
789 ndr_print_ptr(ndr, "handle", r->in.handle);
790 ndr->depth++;
791 ndr_print_policy_handle(ndr, "handle", r->in.handle);
792 ndr->depth--;
793 ndr_print_ptr(ndr, "backupfile", r->in.backupfile);
794 ndr->depth++;
795 if (r->in.backupfile) {
796 ndr_print_lsa_String(ndr, "backupfile", r->in.backupfile);
798 ndr->depth--;
799 ndr->depth--;
801 if (flags & NDR_OUT) {
802 ndr_print_struct(ndr, "out", "eventlog_ClearEventLogW");
803 ndr->depth++;
804 ndr_print_NTSTATUS(ndr, "result", r->out.result);
805 ndr->depth--;
807 ndr->depth--;
810 static enum ndr_err_code ndr_push_eventlog_BackupEventLogW(struct ndr_push *ndr, int flags, const struct eventlog_BackupEventLogW *r)
812 if (flags & NDR_IN) {
813 if (r->in.handle == NULL) {
814 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
816 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
817 if (r->in.backup_filename == NULL) {
818 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
820 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.backup_filename));
822 if (flags & NDR_OUT) {
823 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
825 return NDR_ERR_SUCCESS;
828 static enum ndr_err_code ndr_pull_eventlog_BackupEventLogW(struct ndr_pull *ndr, int flags, struct eventlog_BackupEventLogW *r)
830 TALLOC_CTX *_mem_save_handle_0;
831 TALLOC_CTX *_mem_save_backup_filename_0;
832 if (flags & NDR_IN) {
833 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
834 NDR_PULL_ALLOC(ndr, r->in.handle);
836 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
837 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
838 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
839 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
840 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
841 NDR_PULL_ALLOC(ndr, r->in.backup_filename);
843 _mem_save_backup_filename_0 = NDR_PULL_GET_MEM_CTX(ndr);
844 NDR_PULL_SET_MEM_CTX(ndr, r->in.backup_filename, LIBNDR_FLAG_REF_ALLOC);
845 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.backup_filename));
846 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_backup_filename_0, LIBNDR_FLAG_REF_ALLOC);
848 if (flags & NDR_OUT) {
849 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
851 return NDR_ERR_SUCCESS;
854 _PUBLIC_ void ndr_print_eventlog_BackupEventLogW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_BackupEventLogW *r)
856 ndr_print_struct(ndr, name, "eventlog_BackupEventLogW");
857 ndr->depth++;
858 if (flags & NDR_SET_VALUES) {
859 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
861 if (flags & NDR_IN) {
862 ndr_print_struct(ndr, "in", "eventlog_BackupEventLogW");
863 ndr->depth++;
864 ndr_print_ptr(ndr, "handle", r->in.handle);
865 ndr->depth++;
866 ndr_print_policy_handle(ndr, "handle", r->in.handle);
867 ndr->depth--;
868 ndr_print_ptr(ndr, "backup_filename", r->in.backup_filename);
869 ndr->depth++;
870 ndr_print_lsa_String(ndr, "backup_filename", r->in.backup_filename);
871 ndr->depth--;
872 ndr->depth--;
874 if (flags & NDR_OUT) {
875 ndr_print_struct(ndr, "out", "eventlog_BackupEventLogW");
876 ndr->depth++;
877 ndr_print_NTSTATUS(ndr, "result", r->out.result);
878 ndr->depth--;
880 ndr->depth--;
883 static enum ndr_err_code ndr_push_eventlog_CloseEventLog(struct ndr_push *ndr, int flags, const struct eventlog_CloseEventLog *r)
885 if (flags & NDR_IN) {
886 if (r->in.handle == NULL) {
887 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
889 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
891 if (flags & NDR_OUT) {
892 if (r->out.handle == NULL) {
893 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
895 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
896 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
898 return NDR_ERR_SUCCESS;
901 static enum ndr_err_code ndr_pull_eventlog_CloseEventLog(struct ndr_pull *ndr, int flags, struct eventlog_CloseEventLog *r)
903 TALLOC_CTX *_mem_save_handle_0;
904 if (flags & NDR_IN) {
905 ZERO_STRUCT(r->out);
907 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
908 NDR_PULL_ALLOC(ndr, r->in.handle);
910 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
911 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
912 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
913 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
914 NDR_PULL_ALLOC(ndr, r->out.handle);
915 *r->out.handle = *r->in.handle;
917 if (flags & NDR_OUT) {
918 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
919 NDR_PULL_ALLOC(ndr, r->out.handle);
921 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
922 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
923 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
924 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
925 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
927 return NDR_ERR_SUCCESS;
930 _PUBLIC_ void ndr_print_eventlog_CloseEventLog(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_CloseEventLog *r)
932 ndr_print_struct(ndr, name, "eventlog_CloseEventLog");
933 ndr->depth++;
934 if (flags & NDR_SET_VALUES) {
935 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
937 if (flags & NDR_IN) {
938 ndr_print_struct(ndr, "in", "eventlog_CloseEventLog");
939 ndr->depth++;
940 ndr_print_ptr(ndr, "handle", r->in.handle);
941 ndr->depth++;
942 ndr_print_policy_handle(ndr, "handle", r->in.handle);
943 ndr->depth--;
944 ndr->depth--;
946 if (flags & NDR_OUT) {
947 ndr_print_struct(ndr, "out", "eventlog_CloseEventLog");
948 ndr->depth++;
949 ndr_print_ptr(ndr, "handle", r->out.handle);
950 ndr->depth++;
951 ndr_print_policy_handle(ndr, "handle", r->out.handle);
952 ndr->depth--;
953 ndr_print_NTSTATUS(ndr, "result", r->out.result);
954 ndr->depth--;
956 ndr->depth--;
959 static enum ndr_err_code ndr_push_eventlog_DeregisterEventSource(struct ndr_push *ndr, int flags, const struct eventlog_DeregisterEventSource *r)
961 if (flags & NDR_IN) {
962 if (r->in.handle == NULL) {
963 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
965 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
967 if (flags & NDR_OUT) {
968 if (r->out.handle == NULL) {
969 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
971 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
972 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
974 return NDR_ERR_SUCCESS;
977 static enum ndr_err_code ndr_pull_eventlog_DeregisterEventSource(struct ndr_pull *ndr, int flags, struct eventlog_DeregisterEventSource *r)
979 TALLOC_CTX *_mem_save_handle_0;
980 if (flags & NDR_IN) {
981 ZERO_STRUCT(r->out);
983 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
984 NDR_PULL_ALLOC(ndr, r->in.handle);
986 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
987 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
988 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
989 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
990 NDR_PULL_ALLOC(ndr, r->out.handle);
991 *r->out.handle = *r->in.handle;
993 if (flags & NDR_OUT) {
994 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
995 NDR_PULL_ALLOC(ndr, r->out.handle);
997 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
998 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
999 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
1000 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1001 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1003 return NDR_ERR_SUCCESS;
1006 _PUBLIC_ void ndr_print_eventlog_DeregisterEventSource(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_DeregisterEventSource *r)
1008 ndr_print_struct(ndr, name, "eventlog_DeregisterEventSource");
1009 ndr->depth++;
1010 if (flags & NDR_SET_VALUES) {
1011 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1013 if (flags & NDR_IN) {
1014 ndr_print_struct(ndr, "in", "eventlog_DeregisterEventSource");
1015 ndr->depth++;
1016 ndr_print_ptr(ndr, "handle", r->in.handle);
1017 ndr->depth++;
1018 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1019 ndr->depth--;
1020 ndr->depth--;
1022 if (flags & NDR_OUT) {
1023 ndr_print_struct(ndr, "out", "eventlog_DeregisterEventSource");
1024 ndr->depth++;
1025 ndr_print_ptr(ndr, "handle", r->out.handle);
1026 ndr->depth++;
1027 ndr_print_policy_handle(ndr, "handle", r->out.handle);
1028 ndr->depth--;
1029 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1030 ndr->depth--;
1032 ndr->depth--;
1035 static enum ndr_err_code ndr_push_eventlog_GetNumRecords(struct ndr_push *ndr, int flags, const struct eventlog_GetNumRecords *r)
1037 if (flags & NDR_IN) {
1038 if (r->in.handle == NULL) {
1039 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1041 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1043 if (flags & NDR_OUT) {
1044 if (r->out.number == NULL) {
1045 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1047 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.number));
1048 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1050 return NDR_ERR_SUCCESS;
1053 static enum ndr_err_code ndr_pull_eventlog_GetNumRecords(struct ndr_pull *ndr, int flags, struct eventlog_GetNumRecords *r)
1055 TALLOC_CTX *_mem_save_handle_0;
1056 TALLOC_CTX *_mem_save_number_0;
1057 if (flags & NDR_IN) {
1058 ZERO_STRUCT(r->out);
1060 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1061 NDR_PULL_ALLOC(ndr, r->in.handle);
1063 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1064 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1065 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1066 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1067 NDR_PULL_ALLOC(ndr, r->out.number);
1068 ZERO_STRUCTP(r->out.number);
1070 if (flags & NDR_OUT) {
1071 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1072 NDR_PULL_ALLOC(ndr, r->out.number);
1074 _mem_save_number_0 = NDR_PULL_GET_MEM_CTX(ndr);
1075 NDR_PULL_SET_MEM_CTX(ndr, r->out.number, LIBNDR_FLAG_REF_ALLOC);
1076 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.number));
1077 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_number_0, LIBNDR_FLAG_REF_ALLOC);
1078 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1080 return NDR_ERR_SUCCESS;
1083 _PUBLIC_ void ndr_print_eventlog_GetNumRecords(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_GetNumRecords *r)
1085 ndr_print_struct(ndr, name, "eventlog_GetNumRecords");
1086 ndr->depth++;
1087 if (flags & NDR_SET_VALUES) {
1088 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1090 if (flags & NDR_IN) {
1091 ndr_print_struct(ndr, "in", "eventlog_GetNumRecords");
1092 ndr->depth++;
1093 ndr_print_ptr(ndr, "handle", r->in.handle);
1094 ndr->depth++;
1095 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1096 ndr->depth--;
1097 ndr->depth--;
1099 if (flags & NDR_OUT) {
1100 ndr_print_struct(ndr, "out", "eventlog_GetNumRecords");
1101 ndr->depth++;
1102 ndr_print_ptr(ndr, "number", r->out.number);
1103 ndr->depth++;
1104 ndr_print_uint32(ndr, "number", *r->out.number);
1105 ndr->depth--;
1106 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1107 ndr->depth--;
1109 ndr->depth--;
1112 static enum ndr_err_code ndr_push_eventlog_GetOldestRecord(struct ndr_push *ndr, int flags, const struct eventlog_GetOldestRecord *r)
1114 if (flags & NDR_IN) {
1115 if (r->in.handle == NULL) {
1116 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1118 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1120 if (flags & NDR_OUT) {
1121 if (r->out.oldest_entry == NULL) {
1122 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1124 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.oldest_entry));
1125 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1127 return NDR_ERR_SUCCESS;
1130 static enum ndr_err_code ndr_pull_eventlog_GetOldestRecord(struct ndr_pull *ndr, int flags, struct eventlog_GetOldestRecord *r)
1132 TALLOC_CTX *_mem_save_handle_0;
1133 TALLOC_CTX *_mem_save_oldest_entry_0;
1134 if (flags & NDR_IN) {
1135 ZERO_STRUCT(r->out);
1137 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1138 NDR_PULL_ALLOC(ndr, r->in.handle);
1140 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1141 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1142 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1143 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1144 NDR_PULL_ALLOC(ndr, r->out.oldest_entry);
1145 ZERO_STRUCTP(r->out.oldest_entry);
1147 if (flags & NDR_OUT) {
1148 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1149 NDR_PULL_ALLOC(ndr, r->out.oldest_entry);
1151 _mem_save_oldest_entry_0 = NDR_PULL_GET_MEM_CTX(ndr);
1152 NDR_PULL_SET_MEM_CTX(ndr, r->out.oldest_entry, LIBNDR_FLAG_REF_ALLOC);
1153 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.oldest_entry));
1154 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_oldest_entry_0, LIBNDR_FLAG_REF_ALLOC);
1155 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1157 return NDR_ERR_SUCCESS;
1160 _PUBLIC_ void ndr_print_eventlog_GetOldestRecord(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_GetOldestRecord *r)
1162 ndr_print_struct(ndr, name, "eventlog_GetOldestRecord");
1163 ndr->depth++;
1164 if (flags & NDR_SET_VALUES) {
1165 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1167 if (flags & NDR_IN) {
1168 ndr_print_struct(ndr, "in", "eventlog_GetOldestRecord");
1169 ndr->depth++;
1170 ndr_print_ptr(ndr, "handle", r->in.handle);
1171 ndr->depth++;
1172 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1173 ndr->depth--;
1174 ndr->depth--;
1176 if (flags & NDR_OUT) {
1177 ndr_print_struct(ndr, "out", "eventlog_GetOldestRecord");
1178 ndr->depth++;
1179 ndr_print_ptr(ndr, "oldest_entry", r->out.oldest_entry);
1180 ndr->depth++;
1181 ndr_print_uint32(ndr, "oldest_entry", *r->out.oldest_entry);
1182 ndr->depth--;
1183 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1184 ndr->depth--;
1186 ndr->depth--;
1189 static enum ndr_err_code ndr_push_eventlog_ChangeNotify(struct ndr_push *ndr, int flags, const struct eventlog_ChangeNotify *r)
1191 if (flags & NDR_IN) {
1193 if (flags & NDR_OUT) {
1194 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1196 return NDR_ERR_SUCCESS;
1199 static enum ndr_err_code ndr_pull_eventlog_ChangeNotify(struct ndr_pull *ndr, int flags, struct eventlog_ChangeNotify *r)
1201 if (flags & NDR_IN) {
1203 if (flags & NDR_OUT) {
1204 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1206 return NDR_ERR_SUCCESS;
1209 _PUBLIC_ void ndr_print_eventlog_ChangeNotify(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ChangeNotify *r)
1211 ndr_print_struct(ndr, name, "eventlog_ChangeNotify");
1212 ndr->depth++;
1213 if (flags & NDR_SET_VALUES) {
1214 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1216 if (flags & NDR_IN) {
1217 ndr_print_struct(ndr, "in", "eventlog_ChangeNotify");
1218 ndr->depth++;
1219 ndr->depth--;
1221 if (flags & NDR_OUT) {
1222 ndr_print_struct(ndr, "out", "eventlog_ChangeNotify");
1223 ndr->depth++;
1224 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1225 ndr->depth--;
1227 ndr->depth--;
1230 static enum ndr_err_code ndr_push_eventlog_OpenEventLogW(struct ndr_push *ndr, int flags, const struct eventlog_OpenEventLogW *r)
1232 if (flags & NDR_IN) {
1233 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown0));
1234 if (r->in.unknown0) {
1235 NDR_CHECK(ndr_push_eventlog_OpenUnknown0(ndr, NDR_SCALARS, r->in.unknown0));
1237 if (r->in.logname == NULL) {
1238 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1240 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logname));
1241 if (r->in.servername == NULL) {
1242 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1244 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.servername));
1245 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.major_version));
1246 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.minor_version));
1248 if (flags & NDR_OUT) {
1249 if (r->out.handle == NULL) {
1250 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1252 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
1253 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1255 return NDR_ERR_SUCCESS;
1258 static enum ndr_err_code ndr_pull_eventlog_OpenEventLogW(struct ndr_pull *ndr, int flags, struct eventlog_OpenEventLogW *r)
1260 uint32_t _ptr_unknown0;
1261 TALLOC_CTX *_mem_save_unknown0_0;
1262 TALLOC_CTX *_mem_save_logname_0;
1263 TALLOC_CTX *_mem_save_servername_0;
1264 TALLOC_CTX *_mem_save_handle_0;
1265 if (flags & NDR_IN) {
1266 ZERO_STRUCT(r->out);
1268 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown0));
1269 if (_ptr_unknown0) {
1270 NDR_PULL_ALLOC(ndr, r->in.unknown0);
1271 } else {
1272 r->in.unknown0 = NULL;
1274 if (r->in.unknown0) {
1275 _mem_save_unknown0_0 = NDR_PULL_GET_MEM_CTX(ndr);
1276 NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown0, 0);
1277 NDR_CHECK(ndr_pull_eventlog_OpenUnknown0(ndr, NDR_SCALARS, r->in.unknown0));
1278 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown0_0, 0);
1280 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1281 NDR_PULL_ALLOC(ndr, r->in.logname);
1283 _mem_save_logname_0 = NDR_PULL_GET_MEM_CTX(ndr);
1284 NDR_PULL_SET_MEM_CTX(ndr, r->in.logname, LIBNDR_FLAG_REF_ALLOC);
1285 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logname));
1286 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logname_0, LIBNDR_FLAG_REF_ALLOC);
1287 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1288 NDR_PULL_ALLOC(ndr, r->in.servername);
1290 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
1291 NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, LIBNDR_FLAG_REF_ALLOC);
1292 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.servername));
1293 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, LIBNDR_FLAG_REF_ALLOC);
1294 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.major_version));
1295 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.minor_version));
1296 NDR_PULL_ALLOC(ndr, r->out.handle);
1297 ZERO_STRUCTP(r->out.handle);
1299 if (flags & NDR_OUT) {
1300 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1301 NDR_PULL_ALLOC(ndr, r->out.handle);
1303 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1304 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
1305 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
1306 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1307 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1309 return NDR_ERR_SUCCESS;
1312 _PUBLIC_ void ndr_print_eventlog_OpenEventLogW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_OpenEventLogW *r)
1314 ndr_print_struct(ndr, name, "eventlog_OpenEventLogW");
1315 ndr->depth++;
1316 if (flags & NDR_SET_VALUES) {
1317 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1319 if (flags & NDR_IN) {
1320 ndr_print_struct(ndr, "in", "eventlog_OpenEventLogW");
1321 ndr->depth++;
1322 ndr_print_ptr(ndr, "unknown0", r->in.unknown0);
1323 ndr->depth++;
1324 if (r->in.unknown0) {
1325 ndr_print_eventlog_OpenUnknown0(ndr, "unknown0", r->in.unknown0);
1327 ndr->depth--;
1328 ndr_print_ptr(ndr, "logname", r->in.logname);
1329 ndr->depth++;
1330 ndr_print_lsa_String(ndr, "logname", r->in.logname);
1331 ndr->depth--;
1332 ndr_print_ptr(ndr, "servername", r->in.servername);
1333 ndr->depth++;
1334 ndr_print_lsa_String(ndr, "servername", r->in.servername);
1335 ndr->depth--;
1336 ndr_print_uint32(ndr, "major_version", r->in.major_version);
1337 ndr_print_uint32(ndr, "minor_version", r->in.minor_version);
1338 ndr->depth--;
1340 if (flags & NDR_OUT) {
1341 ndr_print_struct(ndr, "out", "eventlog_OpenEventLogW");
1342 ndr->depth++;
1343 ndr_print_ptr(ndr, "handle", r->out.handle);
1344 ndr->depth++;
1345 ndr_print_policy_handle(ndr, "handle", r->out.handle);
1346 ndr->depth--;
1347 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1348 ndr->depth--;
1350 ndr->depth--;
1353 static enum ndr_err_code ndr_push_eventlog_RegisterEventSourceW(struct ndr_push *ndr, int flags, const struct eventlog_RegisterEventSourceW *r)
1355 if (flags & NDR_IN) {
1356 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown0));
1357 if (r->in.unknown0) {
1358 NDR_CHECK(ndr_push_eventlog_OpenUnknown0(ndr, NDR_SCALARS, r->in.unknown0));
1360 if (r->in.module_name == NULL) {
1361 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1363 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.module_name));
1364 if (r->in.reg_module_name == NULL) {
1365 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1367 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.reg_module_name));
1368 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.major_version));
1369 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.minor_version));
1371 if (flags & NDR_OUT) {
1372 if (r->out.log_handle == NULL) {
1373 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1375 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.log_handle));
1376 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1378 return NDR_ERR_SUCCESS;
1381 static enum ndr_err_code ndr_pull_eventlog_RegisterEventSourceW(struct ndr_pull *ndr, int flags, struct eventlog_RegisterEventSourceW *r)
1383 uint32_t _ptr_unknown0;
1384 TALLOC_CTX *_mem_save_unknown0_0;
1385 TALLOC_CTX *_mem_save_module_name_0;
1386 TALLOC_CTX *_mem_save_reg_module_name_0;
1387 TALLOC_CTX *_mem_save_log_handle_0;
1388 if (flags & NDR_IN) {
1389 ZERO_STRUCT(r->out);
1391 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown0));
1392 if (_ptr_unknown0) {
1393 NDR_PULL_ALLOC(ndr, r->in.unknown0);
1394 } else {
1395 r->in.unknown0 = NULL;
1397 if (r->in.unknown0) {
1398 _mem_save_unknown0_0 = NDR_PULL_GET_MEM_CTX(ndr);
1399 NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown0, 0);
1400 NDR_CHECK(ndr_pull_eventlog_OpenUnknown0(ndr, NDR_SCALARS, r->in.unknown0));
1401 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown0_0, 0);
1403 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1404 NDR_PULL_ALLOC(ndr, r->in.module_name);
1406 _mem_save_module_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
1407 NDR_PULL_SET_MEM_CTX(ndr, r->in.module_name, LIBNDR_FLAG_REF_ALLOC);
1408 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.module_name));
1409 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_module_name_0, LIBNDR_FLAG_REF_ALLOC);
1410 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1411 NDR_PULL_ALLOC(ndr, r->in.reg_module_name);
1413 _mem_save_reg_module_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
1414 NDR_PULL_SET_MEM_CTX(ndr, r->in.reg_module_name, LIBNDR_FLAG_REF_ALLOC);
1415 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.reg_module_name));
1416 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_reg_module_name_0, LIBNDR_FLAG_REF_ALLOC);
1417 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.major_version));
1418 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.minor_version));
1419 NDR_PULL_ALLOC(ndr, r->out.log_handle);
1420 ZERO_STRUCTP(r->out.log_handle);
1422 if (flags & NDR_OUT) {
1423 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1424 NDR_PULL_ALLOC(ndr, r->out.log_handle);
1426 _mem_save_log_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1427 NDR_PULL_SET_MEM_CTX(ndr, r->out.log_handle, LIBNDR_FLAG_REF_ALLOC);
1428 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.log_handle));
1429 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_log_handle_0, LIBNDR_FLAG_REF_ALLOC);
1430 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1432 return NDR_ERR_SUCCESS;
1435 _PUBLIC_ void ndr_print_eventlog_RegisterEventSourceW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_RegisterEventSourceW *r)
1437 ndr_print_struct(ndr, name, "eventlog_RegisterEventSourceW");
1438 ndr->depth++;
1439 if (flags & NDR_SET_VALUES) {
1440 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1442 if (flags & NDR_IN) {
1443 ndr_print_struct(ndr, "in", "eventlog_RegisterEventSourceW");
1444 ndr->depth++;
1445 ndr_print_ptr(ndr, "unknown0", r->in.unknown0);
1446 ndr->depth++;
1447 if (r->in.unknown0) {
1448 ndr_print_eventlog_OpenUnknown0(ndr, "unknown0", r->in.unknown0);
1450 ndr->depth--;
1451 ndr_print_ptr(ndr, "module_name", r->in.module_name);
1452 ndr->depth++;
1453 ndr_print_lsa_String(ndr, "module_name", r->in.module_name);
1454 ndr->depth--;
1455 ndr_print_ptr(ndr, "reg_module_name", r->in.reg_module_name);
1456 ndr->depth++;
1457 ndr_print_lsa_String(ndr, "reg_module_name", r->in.reg_module_name);
1458 ndr->depth--;
1459 ndr_print_uint32(ndr, "major_version", r->in.major_version);
1460 ndr_print_uint32(ndr, "minor_version", r->in.minor_version);
1461 ndr->depth--;
1463 if (flags & NDR_OUT) {
1464 ndr_print_struct(ndr, "out", "eventlog_RegisterEventSourceW");
1465 ndr->depth++;
1466 ndr_print_ptr(ndr, "log_handle", r->out.log_handle);
1467 ndr->depth++;
1468 ndr_print_policy_handle(ndr, "log_handle", r->out.log_handle);
1469 ndr->depth--;
1470 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1471 ndr->depth--;
1473 ndr->depth--;
1476 static enum ndr_err_code ndr_push_eventlog_OpenBackupEventLogW(struct ndr_push *ndr, int flags, const struct eventlog_OpenBackupEventLogW *r)
1478 if (flags & NDR_IN) {
1479 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown0));
1480 if (r->in.unknown0) {
1481 NDR_CHECK(ndr_push_eventlog_OpenUnknown0(ndr, NDR_SCALARS, r->in.unknown0));
1483 if (r->in.backup_logname == NULL) {
1484 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1486 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.backup_logname));
1487 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.major_version));
1488 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.minor_version));
1490 if (flags & NDR_OUT) {
1491 if (r->out.handle == NULL) {
1492 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1494 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
1495 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1497 return NDR_ERR_SUCCESS;
1500 static enum ndr_err_code ndr_pull_eventlog_OpenBackupEventLogW(struct ndr_pull *ndr, int flags, struct eventlog_OpenBackupEventLogW *r)
1502 uint32_t _ptr_unknown0;
1503 TALLOC_CTX *_mem_save_unknown0_0;
1504 TALLOC_CTX *_mem_save_backup_logname_0;
1505 TALLOC_CTX *_mem_save_handle_0;
1506 if (flags & NDR_IN) {
1507 ZERO_STRUCT(r->out);
1509 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown0));
1510 if (_ptr_unknown0) {
1511 NDR_PULL_ALLOC(ndr, r->in.unknown0);
1512 } else {
1513 r->in.unknown0 = NULL;
1515 if (r->in.unknown0) {
1516 _mem_save_unknown0_0 = NDR_PULL_GET_MEM_CTX(ndr);
1517 NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown0, 0);
1518 NDR_CHECK(ndr_pull_eventlog_OpenUnknown0(ndr, NDR_SCALARS, r->in.unknown0));
1519 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown0_0, 0);
1521 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1522 NDR_PULL_ALLOC(ndr, r->in.backup_logname);
1524 _mem_save_backup_logname_0 = NDR_PULL_GET_MEM_CTX(ndr);
1525 NDR_PULL_SET_MEM_CTX(ndr, r->in.backup_logname, LIBNDR_FLAG_REF_ALLOC);
1526 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.backup_logname));
1527 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_backup_logname_0, LIBNDR_FLAG_REF_ALLOC);
1528 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.major_version));
1529 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.minor_version));
1530 NDR_PULL_ALLOC(ndr, r->out.handle);
1531 ZERO_STRUCTP(r->out.handle);
1533 if (flags & NDR_OUT) {
1534 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1535 NDR_PULL_ALLOC(ndr, r->out.handle);
1537 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1538 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
1539 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
1540 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1541 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1543 return NDR_ERR_SUCCESS;
1546 _PUBLIC_ void ndr_print_eventlog_OpenBackupEventLogW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_OpenBackupEventLogW *r)
1548 ndr_print_struct(ndr, name, "eventlog_OpenBackupEventLogW");
1549 ndr->depth++;
1550 if (flags & NDR_SET_VALUES) {
1551 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1553 if (flags & NDR_IN) {
1554 ndr_print_struct(ndr, "in", "eventlog_OpenBackupEventLogW");
1555 ndr->depth++;
1556 ndr_print_ptr(ndr, "unknown0", r->in.unknown0);
1557 ndr->depth++;
1558 if (r->in.unknown0) {
1559 ndr_print_eventlog_OpenUnknown0(ndr, "unknown0", r->in.unknown0);
1561 ndr->depth--;
1562 ndr_print_ptr(ndr, "backup_logname", r->in.backup_logname);
1563 ndr->depth++;
1564 ndr_print_lsa_String(ndr, "backup_logname", r->in.backup_logname);
1565 ndr->depth--;
1566 ndr_print_uint32(ndr, "major_version", r->in.major_version);
1567 ndr_print_uint32(ndr, "minor_version", r->in.minor_version);
1568 ndr->depth--;
1570 if (flags & NDR_OUT) {
1571 ndr_print_struct(ndr, "out", "eventlog_OpenBackupEventLogW");
1572 ndr->depth++;
1573 ndr_print_ptr(ndr, "handle", r->out.handle);
1574 ndr->depth++;
1575 ndr_print_policy_handle(ndr, "handle", r->out.handle);
1576 ndr->depth--;
1577 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1578 ndr->depth--;
1580 ndr->depth--;
1583 static enum ndr_err_code ndr_push_eventlog_ReadEventLogW(struct ndr_push *ndr, int flags, const struct eventlog_ReadEventLogW *r)
1585 if (flags & NDR_IN) {
1586 if (r->in.handle == NULL) {
1587 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1589 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1590 NDR_CHECK(ndr_push_eventlogReadFlags(ndr, NDR_SCALARS, r->in.flags));
1591 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offset));
1592 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.number_of_bytes));
1594 if (flags & NDR_OUT) {
1595 if (r->out.data == NULL) {
1596 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1598 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.number_of_bytes));
1599 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.data, r->in.number_of_bytes));
1600 if (r->out.sent_size == NULL) {
1601 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1603 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.sent_size));
1604 if (r->out.real_size == NULL) {
1605 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1607 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.real_size));
1608 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1610 return NDR_ERR_SUCCESS;
1613 static enum ndr_err_code ndr_pull_eventlog_ReadEventLogW(struct ndr_pull *ndr, int flags, struct eventlog_ReadEventLogW *r)
1615 TALLOC_CTX *_mem_save_handle_0;
1616 TALLOC_CTX *_mem_save_sent_size_0;
1617 TALLOC_CTX *_mem_save_real_size_0;
1618 if (flags & NDR_IN) {
1619 ZERO_STRUCT(r->out);
1621 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1622 NDR_PULL_ALLOC(ndr, r->in.handle);
1624 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1625 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1626 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1627 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1628 NDR_CHECK(ndr_pull_eventlogReadFlags(ndr, NDR_SCALARS, &r->in.flags));
1629 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offset));
1630 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.number_of_bytes));
1631 if (r->in.number_of_bytes > 0x7FFFF) {
1632 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1634 NDR_PULL_ALLOC_N(ndr, r->out.data, r->in.number_of_bytes);
1635 memset(r->out.data, 0, (r->in.number_of_bytes) * sizeof(*r->out.data));
1636 NDR_PULL_ALLOC(ndr, r->out.sent_size);
1637 ZERO_STRUCTP(r->out.sent_size);
1638 NDR_PULL_ALLOC(ndr, r->out.real_size);
1639 ZERO_STRUCTP(r->out.real_size);
1641 if (flags & NDR_OUT) {
1642 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.data));
1643 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1644 NDR_PULL_ALLOC_N(ndr, r->out.data, ndr_get_array_size(ndr, &r->out.data));
1646 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.data, ndr_get_array_size(ndr, &r->out.data)));
1647 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1648 NDR_PULL_ALLOC(ndr, r->out.sent_size);
1650 _mem_save_sent_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
1651 NDR_PULL_SET_MEM_CTX(ndr, r->out.sent_size, LIBNDR_FLAG_REF_ALLOC);
1652 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.sent_size));
1653 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sent_size_0, LIBNDR_FLAG_REF_ALLOC);
1654 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1655 NDR_PULL_ALLOC(ndr, r->out.real_size);
1657 _mem_save_real_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
1658 NDR_PULL_SET_MEM_CTX(ndr, r->out.real_size, LIBNDR_FLAG_REF_ALLOC);
1659 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.real_size));
1660 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_real_size_0, LIBNDR_FLAG_REF_ALLOC);
1661 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1662 if (r->out.data) {
1663 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.data, r->in.number_of_bytes));
1666 return NDR_ERR_SUCCESS;
1669 _PUBLIC_ void ndr_print_eventlog_ReadEventLogW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ReadEventLogW *r)
1671 ndr_print_struct(ndr, name, "eventlog_ReadEventLogW");
1672 ndr->depth++;
1673 if (flags & NDR_SET_VALUES) {
1674 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1676 if (flags & NDR_IN) {
1677 ndr_print_struct(ndr, "in", "eventlog_ReadEventLogW");
1678 ndr->depth++;
1679 ndr_print_ptr(ndr, "handle", r->in.handle);
1680 ndr->depth++;
1681 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1682 ndr->depth--;
1683 ndr_print_eventlogReadFlags(ndr, "flags", r->in.flags);
1684 ndr_print_uint32(ndr, "offset", r->in.offset);
1685 ndr_print_uint32(ndr, "number_of_bytes", r->in.number_of_bytes);
1686 ndr->depth--;
1688 if (flags & NDR_OUT) {
1689 ndr_print_struct(ndr, "out", "eventlog_ReadEventLogW");
1690 ndr->depth++;
1691 ndr_print_ptr(ndr, "data", r->out.data);
1692 ndr->depth++;
1693 ndr_print_array_uint8(ndr, "data", r->out.data, r->in.number_of_bytes);
1694 ndr->depth--;
1695 ndr_print_ptr(ndr, "sent_size", r->out.sent_size);
1696 ndr->depth++;
1697 ndr_print_uint32(ndr, "sent_size", *r->out.sent_size);
1698 ndr->depth--;
1699 ndr_print_ptr(ndr, "real_size", r->out.real_size);
1700 ndr->depth++;
1701 ndr_print_uint32(ndr, "real_size", *r->out.real_size);
1702 ndr->depth--;
1703 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1704 ndr->depth--;
1706 ndr->depth--;
1709 static enum ndr_err_code ndr_push_eventlog_ReportEventW(struct ndr_push *ndr, int flags, const struct eventlog_ReportEventW *r)
1711 uint32_t cntr_strings_1;
1712 if (flags & NDR_IN) {
1713 if (r->in.handle == NULL) {
1714 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1716 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1717 NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->in.timestamp));
1718 NDR_CHECK(ndr_push_eventlogEventTypes(ndr, NDR_SCALARS, r->in.event_type));
1719 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.event_category));
1720 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.event_id));
1721 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.num_of_strings));
1722 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.data_size));
1723 if (r->in.servername == NULL) {
1724 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1726 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.servername));
1727 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.user_sid));
1728 if (r->in.user_sid) {
1729 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->in.user_sid));
1731 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.strings));
1732 if (r->in.strings) {
1733 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.num_of_strings));
1734 for (cntr_strings_1 = 0; cntr_strings_1 < r->in.num_of_strings; cntr_strings_1++) {
1736 for (cntr_strings_1 = 0; cntr_strings_1 < r->in.num_of_strings; cntr_strings_1++) {
1737 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.strings[cntr_strings_1]));
1738 if (r->in.strings[cntr_strings_1]) {
1739 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.strings[cntr_strings_1]));
1743 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.data));
1744 if (r->in.data) {
1745 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.data_size));
1746 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.data, r->in.data_size));
1748 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.flags));
1749 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.record_number));
1750 if (r->in.record_number) {
1751 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.record_number));
1753 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.time_written));
1754 if (r->in.time_written) {
1755 NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, *r->in.time_written));
1758 if (flags & NDR_OUT) {
1759 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.record_number));
1760 if (r->out.record_number) {
1761 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.record_number));
1763 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.time_written));
1764 if (r->out.time_written) {
1765 NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, *r->out.time_written));
1767 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1769 return NDR_ERR_SUCCESS;
1772 static enum ndr_err_code ndr_pull_eventlog_ReportEventW(struct ndr_pull *ndr, int flags, struct eventlog_ReportEventW *r)
1774 uint32_t _ptr_user_sid;
1775 uint32_t _ptr_strings;
1776 uint32_t cntr_strings_1;
1777 uint32_t _ptr_data;
1778 uint32_t _ptr_record_number;
1779 uint32_t _ptr_time_written;
1780 TALLOC_CTX *_mem_save_handle_0;
1781 TALLOC_CTX *_mem_save_servername_0;
1782 TALLOC_CTX *_mem_save_user_sid_0;
1783 TALLOC_CTX *_mem_save_strings_0;
1784 TALLOC_CTX *_mem_save_strings_1;
1785 TALLOC_CTX *_mem_save_strings_2;
1786 TALLOC_CTX *_mem_save_data_0;
1787 TALLOC_CTX *_mem_save_record_number_0;
1788 TALLOC_CTX *_mem_save_time_written_0;
1789 if (flags & NDR_IN) {
1790 ZERO_STRUCT(r->out);
1792 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1793 NDR_PULL_ALLOC(ndr, r->in.handle);
1795 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1796 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1797 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1798 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1799 NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->in.timestamp));
1800 NDR_CHECK(ndr_pull_eventlogEventTypes(ndr, NDR_SCALARS, &r->in.event_type));
1801 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.event_category));
1802 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.event_id));
1803 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.num_of_strings));
1804 if (r->in.num_of_strings > 256) {
1805 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1807 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.data_size));
1808 if (r->in.data_size > 0x3FFFF) {
1809 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1811 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1812 NDR_PULL_ALLOC(ndr, r->in.servername);
1814 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
1815 NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, LIBNDR_FLAG_REF_ALLOC);
1816 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.servername));
1817 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, LIBNDR_FLAG_REF_ALLOC);
1818 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user_sid));
1819 if (_ptr_user_sid) {
1820 NDR_PULL_ALLOC(ndr, r->in.user_sid);
1821 } else {
1822 r->in.user_sid = NULL;
1824 if (r->in.user_sid) {
1825 _mem_save_user_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1826 NDR_PULL_SET_MEM_CTX(ndr, r->in.user_sid, 0);
1827 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->in.user_sid));
1828 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_sid_0, 0);
1830 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_strings));
1831 if (_ptr_strings) {
1832 NDR_PULL_ALLOC(ndr, r->in.strings);
1833 } else {
1834 r->in.strings = NULL;
1836 if (r->in.strings) {
1837 _mem_save_strings_0 = NDR_PULL_GET_MEM_CTX(ndr);
1838 NDR_PULL_SET_MEM_CTX(ndr, r->in.strings, 0);
1839 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.strings));
1840 NDR_PULL_ALLOC_N(ndr, r->in.strings, ndr_get_array_size(ndr, &r->in.strings));
1841 _mem_save_strings_1 = NDR_PULL_GET_MEM_CTX(ndr);
1842 NDR_PULL_SET_MEM_CTX(ndr, r->in.strings, 0);
1843 for (cntr_strings_1 = 0; cntr_strings_1 < r->in.num_of_strings; cntr_strings_1++) {
1845 for (cntr_strings_1 = 0; cntr_strings_1 < r->in.num_of_strings; cntr_strings_1++) {
1846 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_strings));
1847 if (_ptr_strings) {
1848 NDR_PULL_ALLOC(ndr, r->in.strings[cntr_strings_1]);
1849 } else {
1850 r->in.strings[cntr_strings_1] = NULL;
1852 if (r->in.strings[cntr_strings_1]) {
1853 _mem_save_strings_2 = NDR_PULL_GET_MEM_CTX(ndr);
1854 NDR_PULL_SET_MEM_CTX(ndr, r->in.strings[cntr_strings_1], 0);
1855 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.strings[cntr_strings_1]));
1856 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_strings_2, 0);
1859 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_strings_1, 0);
1860 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_strings_0, 0);
1862 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
1863 if (_ptr_data) {
1864 NDR_PULL_ALLOC(ndr, r->in.data);
1865 } else {
1866 r->in.data = NULL;
1868 if (r->in.data) {
1869 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
1870 NDR_PULL_SET_MEM_CTX(ndr, r->in.data, 0);
1871 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.data));
1872 NDR_PULL_ALLOC_N(ndr, r->in.data, ndr_get_array_size(ndr, &r->in.data));
1873 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.data, ndr_get_array_size(ndr, &r->in.data)));
1874 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
1876 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.flags));
1877 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_record_number));
1878 if (_ptr_record_number) {
1879 NDR_PULL_ALLOC(ndr, r->in.record_number);
1880 } else {
1881 r->in.record_number = NULL;
1883 if (r->in.record_number) {
1884 _mem_save_record_number_0 = NDR_PULL_GET_MEM_CTX(ndr);
1885 NDR_PULL_SET_MEM_CTX(ndr, r->in.record_number, 0);
1886 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.record_number));
1887 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_record_number_0, 0);
1889 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_time_written));
1890 if (_ptr_time_written) {
1891 NDR_PULL_ALLOC(ndr, r->in.time_written);
1892 } else {
1893 r->in.time_written = NULL;
1895 if (r->in.time_written) {
1896 _mem_save_time_written_0 = NDR_PULL_GET_MEM_CTX(ndr);
1897 NDR_PULL_SET_MEM_CTX(ndr, r->in.time_written, 0);
1898 NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, r->in.time_written));
1899 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_time_written_0, 0);
1901 if (r->in.strings) {
1902 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.strings, r->in.num_of_strings));
1904 if (r->in.data) {
1905 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.data, r->in.data_size));
1908 if (flags & NDR_OUT) {
1909 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_record_number));
1910 if (_ptr_record_number) {
1911 NDR_PULL_ALLOC(ndr, r->out.record_number);
1912 } else {
1913 r->out.record_number = NULL;
1915 if (r->out.record_number) {
1916 _mem_save_record_number_0 = NDR_PULL_GET_MEM_CTX(ndr);
1917 NDR_PULL_SET_MEM_CTX(ndr, r->out.record_number, 0);
1918 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.record_number));
1919 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_record_number_0, 0);
1921 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_time_written));
1922 if (_ptr_time_written) {
1923 NDR_PULL_ALLOC(ndr, r->out.time_written);
1924 } else {
1925 r->out.time_written = NULL;
1927 if (r->out.time_written) {
1928 _mem_save_time_written_0 = NDR_PULL_GET_MEM_CTX(ndr);
1929 NDR_PULL_SET_MEM_CTX(ndr, r->out.time_written, 0);
1930 NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, r->out.time_written));
1931 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_time_written_0, 0);
1933 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1935 return NDR_ERR_SUCCESS;
1938 _PUBLIC_ void ndr_print_eventlog_ReportEventW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ReportEventW *r)
1940 uint32_t cntr_strings_1;
1941 ndr_print_struct(ndr, name, "eventlog_ReportEventW");
1942 ndr->depth++;
1943 if (flags & NDR_SET_VALUES) {
1944 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1946 if (flags & NDR_IN) {
1947 ndr_print_struct(ndr, "in", "eventlog_ReportEventW");
1948 ndr->depth++;
1949 ndr_print_ptr(ndr, "handle", r->in.handle);
1950 ndr->depth++;
1951 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1952 ndr->depth--;
1953 ndr_print_time_t(ndr, "timestamp", r->in.timestamp);
1954 ndr_print_eventlogEventTypes(ndr, "event_type", r->in.event_type);
1955 ndr_print_uint16(ndr, "event_category", r->in.event_category);
1956 ndr_print_uint32(ndr, "event_id", r->in.event_id);
1957 ndr_print_uint16(ndr, "num_of_strings", r->in.num_of_strings);
1958 ndr_print_uint32(ndr, "data_size", r->in.data_size);
1959 ndr_print_ptr(ndr, "servername", r->in.servername);
1960 ndr->depth++;
1961 ndr_print_lsa_String(ndr, "servername", r->in.servername);
1962 ndr->depth--;
1963 ndr_print_ptr(ndr, "user_sid", r->in.user_sid);
1964 ndr->depth++;
1965 if (r->in.user_sid) {
1966 ndr_print_dom_sid(ndr, "user_sid", r->in.user_sid);
1968 ndr->depth--;
1969 ndr_print_ptr(ndr, "strings", r->in.strings);
1970 ndr->depth++;
1971 if (r->in.strings) {
1972 ndr->print(ndr, "%s: ARRAY(%d)", "strings", (int)r->in.num_of_strings);
1973 ndr->depth++;
1974 for (cntr_strings_1=0;cntr_strings_1<r->in.num_of_strings;cntr_strings_1++) {
1975 char *idx_1=NULL;
1976 if (asprintf(&idx_1, "[%d]", cntr_strings_1) != -1) {
1977 ndr_print_ptr(ndr, "strings", r->in.strings[cntr_strings_1]);
1978 ndr->depth++;
1979 if (r->in.strings[cntr_strings_1]) {
1980 ndr_print_lsa_String(ndr, "strings", r->in.strings[cntr_strings_1]);
1982 ndr->depth--;
1983 free(idx_1);
1986 ndr->depth--;
1988 ndr->depth--;
1989 ndr_print_ptr(ndr, "data", r->in.data);
1990 ndr->depth++;
1991 if (r->in.data) {
1992 ndr_print_array_uint8(ndr, "data", r->in.data, r->in.data_size);
1994 ndr->depth--;
1995 ndr_print_uint16(ndr, "flags", r->in.flags);
1996 ndr_print_ptr(ndr, "record_number", r->in.record_number);
1997 ndr->depth++;
1998 if (r->in.record_number) {
1999 ndr_print_uint32(ndr, "record_number", *r->in.record_number);
2001 ndr->depth--;
2002 ndr_print_ptr(ndr, "time_written", r->in.time_written);
2003 ndr->depth++;
2004 if (r->in.time_written) {
2005 ndr_print_time_t(ndr, "time_written", *r->in.time_written);
2007 ndr->depth--;
2008 ndr->depth--;
2010 if (flags & NDR_OUT) {
2011 ndr_print_struct(ndr, "out", "eventlog_ReportEventW");
2012 ndr->depth++;
2013 ndr_print_ptr(ndr, "record_number", r->out.record_number);
2014 ndr->depth++;
2015 if (r->out.record_number) {
2016 ndr_print_uint32(ndr, "record_number", *r->out.record_number);
2018 ndr->depth--;
2019 ndr_print_ptr(ndr, "time_written", r->out.time_written);
2020 ndr->depth++;
2021 if (r->out.time_written) {
2022 ndr_print_time_t(ndr, "time_written", *r->out.time_written);
2024 ndr->depth--;
2025 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2026 ndr->depth--;
2028 ndr->depth--;
2031 static enum ndr_err_code ndr_push_eventlog_ClearEventLogA(struct ndr_push *ndr, int flags, const struct eventlog_ClearEventLogA *r)
2033 if (flags & NDR_IN) {
2035 if (flags & NDR_OUT) {
2036 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2038 return NDR_ERR_SUCCESS;
2041 static enum ndr_err_code ndr_pull_eventlog_ClearEventLogA(struct ndr_pull *ndr, int flags, struct eventlog_ClearEventLogA *r)
2043 if (flags & NDR_IN) {
2045 if (flags & NDR_OUT) {
2046 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2048 return NDR_ERR_SUCCESS;
2051 _PUBLIC_ void ndr_print_eventlog_ClearEventLogA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ClearEventLogA *r)
2053 ndr_print_struct(ndr, name, "eventlog_ClearEventLogA");
2054 ndr->depth++;
2055 if (flags & NDR_SET_VALUES) {
2056 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2058 if (flags & NDR_IN) {
2059 ndr_print_struct(ndr, "in", "eventlog_ClearEventLogA");
2060 ndr->depth++;
2061 ndr->depth--;
2063 if (flags & NDR_OUT) {
2064 ndr_print_struct(ndr, "out", "eventlog_ClearEventLogA");
2065 ndr->depth++;
2066 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2067 ndr->depth--;
2069 ndr->depth--;
2072 static enum ndr_err_code ndr_push_eventlog_BackupEventLogA(struct ndr_push *ndr, int flags, const struct eventlog_BackupEventLogA *r)
2074 if (flags & NDR_IN) {
2076 if (flags & NDR_OUT) {
2077 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2079 return NDR_ERR_SUCCESS;
2082 static enum ndr_err_code ndr_pull_eventlog_BackupEventLogA(struct ndr_pull *ndr, int flags, struct eventlog_BackupEventLogA *r)
2084 if (flags & NDR_IN) {
2086 if (flags & NDR_OUT) {
2087 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2089 return NDR_ERR_SUCCESS;
2092 _PUBLIC_ void ndr_print_eventlog_BackupEventLogA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_BackupEventLogA *r)
2094 ndr_print_struct(ndr, name, "eventlog_BackupEventLogA");
2095 ndr->depth++;
2096 if (flags & NDR_SET_VALUES) {
2097 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2099 if (flags & NDR_IN) {
2100 ndr_print_struct(ndr, "in", "eventlog_BackupEventLogA");
2101 ndr->depth++;
2102 ndr->depth--;
2104 if (flags & NDR_OUT) {
2105 ndr_print_struct(ndr, "out", "eventlog_BackupEventLogA");
2106 ndr->depth++;
2107 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2108 ndr->depth--;
2110 ndr->depth--;
2113 static enum ndr_err_code ndr_push_eventlog_OpenEventLogA(struct ndr_push *ndr, int flags, const struct eventlog_OpenEventLogA *r)
2115 if (flags & NDR_IN) {
2117 if (flags & NDR_OUT) {
2118 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2120 return NDR_ERR_SUCCESS;
2123 static enum ndr_err_code ndr_pull_eventlog_OpenEventLogA(struct ndr_pull *ndr, int flags, struct eventlog_OpenEventLogA *r)
2125 if (flags & NDR_IN) {
2127 if (flags & NDR_OUT) {
2128 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2130 return NDR_ERR_SUCCESS;
2133 _PUBLIC_ void ndr_print_eventlog_OpenEventLogA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_OpenEventLogA *r)
2135 ndr_print_struct(ndr, name, "eventlog_OpenEventLogA");
2136 ndr->depth++;
2137 if (flags & NDR_SET_VALUES) {
2138 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2140 if (flags & NDR_IN) {
2141 ndr_print_struct(ndr, "in", "eventlog_OpenEventLogA");
2142 ndr->depth++;
2143 ndr->depth--;
2145 if (flags & NDR_OUT) {
2146 ndr_print_struct(ndr, "out", "eventlog_OpenEventLogA");
2147 ndr->depth++;
2148 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2149 ndr->depth--;
2151 ndr->depth--;
2154 static enum ndr_err_code ndr_push_eventlog_RegisterEventSourceA(struct ndr_push *ndr, int flags, const struct eventlog_RegisterEventSourceA *r)
2156 if (flags & NDR_IN) {
2158 if (flags & NDR_OUT) {
2159 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2161 return NDR_ERR_SUCCESS;
2164 static enum ndr_err_code ndr_pull_eventlog_RegisterEventSourceA(struct ndr_pull *ndr, int flags, struct eventlog_RegisterEventSourceA *r)
2166 if (flags & NDR_IN) {
2168 if (flags & NDR_OUT) {
2169 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2171 return NDR_ERR_SUCCESS;
2174 _PUBLIC_ void ndr_print_eventlog_RegisterEventSourceA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_RegisterEventSourceA *r)
2176 ndr_print_struct(ndr, name, "eventlog_RegisterEventSourceA");
2177 ndr->depth++;
2178 if (flags & NDR_SET_VALUES) {
2179 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2181 if (flags & NDR_IN) {
2182 ndr_print_struct(ndr, "in", "eventlog_RegisterEventSourceA");
2183 ndr->depth++;
2184 ndr->depth--;
2186 if (flags & NDR_OUT) {
2187 ndr_print_struct(ndr, "out", "eventlog_RegisterEventSourceA");
2188 ndr->depth++;
2189 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2190 ndr->depth--;
2192 ndr->depth--;
2195 static enum ndr_err_code ndr_push_eventlog_OpenBackupEventLogA(struct ndr_push *ndr, int flags, const struct eventlog_OpenBackupEventLogA *r)
2197 if (flags & NDR_IN) {
2199 if (flags & NDR_OUT) {
2200 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2202 return NDR_ERR_SUCCESS;
2205 static enum ndr_err_code ndr_pull_eventlog_OpenBackupEventLogA(struct ndr_pull *ndr, int flags, struct eventlog_OpenBackupEventLogA *r)
2207 if (flags & NDR_IN) {
2209 if (flags & NDR_OUT) {
2210 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2212 return NDR_ERR_SUCCESS;
2215 _PUBLIC_ void ndr_print_eventlog_OpenBackupEventLogA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_OpenBackupEventLogA *r)
2217 ndr_print_struct(ndr, name, "eventlog_OpenBackupEventLogA");
2218 ndr->depth++;
2219 if (flags & NDR_SET_VALUES) {
2220 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2222 if (flags & NDR_IN) {
2223 ndr_print_struct(ndr, "in", "eventlog_OpenBackupEventLogA");
2224 ndr->depth++;
2225 ndr->depth--;
2227 if (flags & NDR_OUT) {
2228 ndr_print_struct(ndr, "out", "eventlog_OpenBackupEventLogA");
2229 ndr->depth++;
2230 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2231 ndr->depth--;
2233 ndr->depth--;
2236 static enum ndr_err_code ndr_push_eventlog_ReadEventLogA(struct ndr_push *ndr, int flags, const struct eventlog_ReadEventLogA *r)
2238 if (flags & NDR_IN) {
2240 if (flags & NDR_OUT) {
2241 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2243 return NDR_ERR_SUCCESS;
2246 static enum ndr_err_code ndr_pull_eventlog_ReadEventLogA(struct ndr_pull *ndr, int flags, struct eventlog_ReadEventLogA *r)
2248 if (flags & NDR_IN) {
2250 if (flags & NDR_OUT) {
2251 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2253 return NDR_ERR_SUCCESS;
2256 _PUBLIC_ void ndr_print_eventlog_ReadEventLogA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ReadEventLogA *r)
2258 ndr_print_struct(ndr, name, "eventlog_ReadEventLogA");
2259 ndr->depth++;
2260 if (flags & NDR_SET_VALUES) {
2261 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2263 if (flags & NDR_IN) {
2264 ndr_print_struct(ndr, "in", "eventlog_ReadEventLogA");
2265 ndr->depth++;
2266 ndr->depth--;
2268 if (flags & NDR_OUT) {
2269 ndr_print_struct(ndr, "out", "eventlog_ReadEventLogA");
2270 ndr->depth++;
2271 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2272 ndr->depth--;
2274 ndr->depth--;
2277 static enum ndr_err_code ndr_push_eventlog_ReportEventA(struct ndr_push *ndr, int flags, const struct eventlog_ReportEventA *r)
2279 if (flags & NDR_IN) {
2281 if (flags & NDR_OUT) {
2282 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2284 return NDR_ERR_SUCCESS;
2287 static enum ndr_err_code ndr_pull_eventlog_ReportEventA(struct ndr_pull *ndr, int flags, struct eventlog_ReportEventA *r)
2289 if (flags & NDR_IN) {
2291 if (flags & NDR_OUT) {
2292 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2294 return NDR_ERR_SUCCESS;
2297 _PUBLIC_ void ndr_print_eventlog_ReportEventA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ReportEventA *r)
2299 ndr_print_struct(ndr, name, "eventlog_ReportEventA");
2300 ndr->depth++;
2301 if (flags & NDR_SET_VALUES) {
2302 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2304 if (flags & NDR_IN) {
2305 ndr_print_struct(ndr, "in", "eventlog_ReportEventA");
2306 ndr->depth++;
2307 ndr->depth--;
2309 if (flags & NDR_OUT) {
2310 ndr_print_struct(ndr, "out", "eventlog_ReportEventA");
2311 ndr->depth++;
2312 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2313 ndr->depth--;
2315 ndr->depth--;
2318 static enum ndr_err_code ndr_push_eventlog_RegisterClusterSvc(struct ndr_push *ndr, int flags, const struct eventlog_RegisterClusterSvc *r)
2320 if (flags & NDR_IN) {
2322 if (flags & NDR_OUT) {
2323 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2325 return NDR_ERR_SUCCESS;
2328 static enum ndr_err_code ndr_pull_eventlog_RegisterClusterSvc(struct ndr_pull *ndr, int flags, struct eventlog_RegisterClusterSvc *r)
2330 if (flags & NDR_IN) {
2332 if (flags & NDR_OUT) {
2333 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2335 return NDR_ERR_SUCCESS;
2338 _PUBLIC_ void ndr_print_eventlog_RegisterClusterSvc(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_RegisterClusterSvc *r)
2340 ndr_print_struct(ndr, name, "eventlog_RegisterClusterSvc");
2341 ndr->depth++;
2342 if (flags & NDR_SET_VALUES) {
2343 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2345 if (flags & NDR_IN) {
2346 ndr_print_struct(ndr, "in", "eventlog_RegisterClusterSvc");
2347 ndr->depth++;
2348 ndr->depth--;
2350 if (flags & NDR_OUT) {
2351 ndr_print_struct(ndr, "out", "eventlog_RegisterClusterSvc");
2352 ndr->depth++;
2353 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2354 ndr->depth--;
2356 ndr->depth--;
2359 static enum ndr_err_code ndr_push_eventlog_DeregisterClusterSvc(struct ndr_push *ndr, int flags, const struct eventlog_DeregisterClusterSvc *r)
2361 if (flags & NDR_IN) {
2363 if (flags & NDR_OUT) {
2364 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2366 return NDR_ERR_SUCCESS;
2369 static enum ndr_err_code ndr_pull_eventlog_DeregisterClusterSvc(struct ndr_pull *ndr, int flags, struct eventlog_DeregisterClusterSvc *r)
2371 if (flags & NDR_IN) {
2373 if (flags & NDR_OUT) {
2374 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2376 return NDR_ERR_SUCCESS;
2379 _PUBLIC_ void ndr_print_eventlog_DeregisterClusterSvc(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_DeregisterClusterSvc *r)
2381 ndr_print_struct(ndr, name, "eventlog_DeregisterClusterSvc");
2382 ndr->depth++;
2383 if (flags & NDR_SET_VALUES) {
2384 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2386 if (flags & NDR_IN) {
2387 ndr_print_struct(ndr, "in", "eventlog_DeregisterClusterSvc");
2388 ndr->depth++;
2389 ndr->depth--;
2391 if (flags & NDR_OUT) {
2392 ndr_print_struct(ndr, "out", "eventlog_DeregisterClusterSvc");
2393 ndr->depth++;
2394 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2395 ndr->depth--;
2397 ndr->depth--;
2400 static enum ndr_err_code ndr_push_eventlog_WriteClusterEvents(struct ndr_push *ndr, int flags, const struct eventlog_WriteClusterEvents *r)
2402 if (flags & NDR_IN) {
2404 if (flags & NDR_OUT) {
2405 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2407 return NDR_ERR_SUCCESS;
2410 static enum ndr_err_code ndr_pull_eventlog_WriteClusterEvents(struct ndr_pull *ndr, int flags, struct eventlog_WriteClusterEvents *r)
2412 if (flags & NDR_IN) {
2414 if (flags & NDR_OUT) {
2415 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2417 return NDR_ERR_SUCCESS;
2420 _PUBLIC_ void ndr_print_eventlog_WriteClusterEvents(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_WriteClusterEvents *r)
2422 ndr_print_struct(ndr, name, "eventlog_WriteClusterEvents");
2423 ndr->depth++;
2424 if (flags & NDR_SET_VALUES) {
2425 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2427 if (flags & NDR_IN) {
2428 ndr_print_struct(ndr, "in", "eventlog_WriteClusterEvents");
2429 ndr->depth++;
2430 ndr->depth--;
2432 if (flags & NDR_OUT) {
2433 ndr_print_struct(ndr, "out", "eventlog_WriteClusterEvents");
2434 ndr->depth++;
2435 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2436 ndr->depth--;
2438 ndr->depth--;
2441 static enum ndr_err_code ndr_push_eventlog_GetLogInformation(struct ndr_push *ndr, int flags, const struct eventlog_GetLogInformation *r)
2443 if (flags & NDR_IN) {
2444 if (r->in.handle == NULL) {
2445 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2447 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2448 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
2449 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
2451 if (flags & NDR_OUT) {
2452 if (r->out.buffer == NULL) {
2453 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2455 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.buf_size));
2456 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.buf_size));
2457 if (r->out.bytes_needed == NULL) {
2458 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2460 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.bytes_needed));
2461 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2463 return NDR_ERR_SUCCESS;
2466 static enum ndr_err_code ndr_pull_eventlog_GetLogInformation(struct ndr_pull *ndr, int flags, struct eventlog_GetLogInformation *r)
2468 TALLOC_CTX *_mem_save_handle_0;
2469 TALLOC_CTX *_mem_save_bytes_needed_0;
2470 if (flags & NDR_IN) {
2471 ZERO_STRUCT(r->out);
2473 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2474 NDR_PULL_ALLOC(ndr, r->in.handle);
2476 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2477 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
2478 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2479 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
2480 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
2481 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size));
2482 if (r->in.buf_size > 1024) {
2483 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2485 NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.buf_size);
2486 memset(r->out.buffer, 0, (r->in.buf_size) * sizeof(*r->out.buffer));
2487 NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
2488 ZERO_STRUCTP(r->out.bytes_needed);
2490 if (flags & NDR_OUT) {
2491 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.buffer));
2492 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2493 NDR_PULL_ALLOC_N(ndr, r->out.buffer, ndr_get_array_size(ndr, &r->out.buffer));
2495 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.buffer, ndr_get_array_size(ndr, &r->out.buffer)));
2496 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2497 NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
2499 _mem_save_bytes_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
2500 NDR_PULL_SET_MEM_CTX(ndr, r->out.bytes_needed, LIBNDR_FLAG_REF_ALLOC);
2501 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.bytes_needed));
2502 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bytes_needed_0, LIBNDR_FLAG_REF_ALLOC);
2503 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2504 if (r->out.buffer) {
2505 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.buffer, r->in.buf_size));
2508 return NDR_ERR_SUCCESS;
2511 _PUBLIC_ void ndr_print_eventlog_GetLogInformation(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_GetLogInformation *r)
2513 ndr_print_struct(ndr, name, "eventlog_GetLogInformation");
2514 ndr->depth++;
2515 if (flags & NDR_SET_VALUES) {
2516 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2518 if (flags & NDR_IN) {
2519 ndr_print_struct(ndr, "in", "eventlog_GetLogInformation");
2520 ndr->depth++;
2521 ndr_print_ptr(ndr, "handle", r->in.handle);
2522 ndr->depth++;
2523 ndr_print_policy_handle(ndr, "handle", r->in.handle);
2524 ndr->depth--;
2525 ndr_print_uint32(ndr, "level", r->in.level);
2526 ndr_print_uint32(ndr, "buf_size", r->in.buf_size);
2527 ndr->depth--;
2529 if (flags & NDR_OUT) {
2530 ndr_print_struct(ndr, "out", "eventlog_GetLogInformation");
2531 ndr->depth++;
2532 ndr_print_ptr(ndr, "buffer", r->out.buffer);
2533 ndr->depth++;
2534 ndr_print_array_uint8(ndr, "buffer", r->out.buffer, r->in.buf_size);
2535 ndr->depth--;
2536 ndr_print_ptr(ndr, "bytes_needed", r->out.bytes_needed);
2537 ndr->depth++;
2538 ndr_print_uint32(ndr, "bytes_needed", *r->out.bytes_needed);
2539 ndr->depth--;
2540 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2541 ndr->depth--;
2543 ndr->depth--;
2546 static enum ndr_err_code ndr_push_eventlog_FlushEventLog(struct ndr_push *ndr, int flags, const struct eventlog_FlushEventLog *r)
2548 if (flags & NDR_IN) {
2549 if (r->in.handle == NULL) {
2550 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2552 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2554 if (flags & NDR_OUT) {
2555 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2557 return NDR_ERR_SUCCESS;
2560 static enum ndr_err_code ndr_pull_eventlog_FlushEventLog(struct ndr_pull *ndr, int flags, struct eventlog_FlushEventLog *r)
2562 TALLOC_CTX *_mem_save_handle_0;
2563 if (flags & NDR_IN) {
2564 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2565 NDR_PULL_ALLOC(ndr, r->in.handle);
2567 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2568 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
2569 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2570 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
2572 if (flags & NDR_OUT) {
2573 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2575 return NDR_ERR_SUCCESS;
2578 _PUBLIC_ void ndr_print_eventlog_FlushEventLog(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_FlushEventLog *r)
2580 ndr_print_struct(ndr, name, "eventlog_FlushEventLog");
2581 ndr->depth++;
2582 if (flags & NDR_SET_VALUES) {
2583 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2585 if (flags & NDR_IN) {
2586 ndr_print_struct(ndr, "in", "eventlog_FlushEventLog");
2587 ndr->depth++;
2588 ndr_print_ptr(ndr, "handle", r->in.handle);
2589 ndr->depth++;
2590 ndr_print_policy_handle(ndr, "handle", r->in.handle);
2591 ndr->depth--;
2592 ndr->depth--;
2594 if (flags & NDR_OUT) {
2595 ndr_print_struct(ndr, "out", "eventlog_FlushEventLog");
2596 ndr->depth++;
2597 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2598 ndr->depth--;
2600 ndr->depth--;
2603 static enum ndr_err_code ndr_push_eventlog_ReportEventAndSourceW(struct ndr_push *ndr, int flags, const struct eventlog_ReportEventAndSourceW *r)
2605 uint32_t cntr_strings_1;
2606 if (flags & NDR_IN) {
2607 if (r->in.handle == NULL) {
2608 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2610 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2611 NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->in.timestamp));
2612 NDR_CHECK(ndr_push_eventlogEventTypes(ndr, NDR_SCALARS, r->in.event_type));
2613 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.event_category));
2614 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.event_id));
2615 if (r->in.sourcename == NULL) {
2616 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2618 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sourcename));
2619 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.num_of_strings));
2620 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.data_size));
2621 if (r->in.servername == NULL) {
2622 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2624 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.servername));
2625 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.user_sid));
2626 if (r->in.user_sid) {
2627 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->in.user_sid));
2629 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.strings));
2630 if (r->in.strings) {
2631 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.num_of_strings));
2632 for (cntr_strings_1 = 0; cntr_strings_1 < r->in.num_of_strings; cntr_strings_1++) {
2634 for (cntr_strings_1 = 0; cntr_strings_1 < r->in.num_of_strings; cntr_strings_1++) {
2635 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.strings[cntr_strings_1]));
2636 if (r->in.strings[cntr_strings_1]) {
2637 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.strings[cntr_strings_1]));
2641 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.data));
2642 if (r->in.data) {
2643 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.data_size));
2644 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.data, r->in.data_size));
2646 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.flags));
2647 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.record_number));
2648 if (r->in.record_number) {
2649 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.record_number));
2651 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.time_written));
2652 if (r->in.time_written) {
2653 NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, *r->in.time_written));
2656 if (flags & NDR_OUT) {
2657 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.record_number));
2658 if (r->out.record_number) {
2659 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.record_number));
2661 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.time_written));
2662 if (r->out.time_written) {
2663 NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, *r->out.time_written));
2665 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2667 return NDR_ERR_SUCCESS;
2670 static enum ndr_err_code ndr_pull_eventlog_ReportEventAndSourceW(struct ndr_pull *ndr, int flags, struct eventlog_ReportEventAndSourceW *r)
2672 uint32_t _ptr_user_sid;
2673 uint32_t _ptr_strings;
2674 uint32_t cntr_strings_1;
2675 uint32_t _ptr_data;
2676 uint32_t _ptr_record_number;
2677 uint32_t _ptr_time_written;
2678 TALLOC_CTX *_mem_save_handle_0;
2679 TALLOC_CTX *_mem_save_sourcename_0;
2680 TALLOC_CTX *_mem_save_servername_0;
2681 TALLOC_CTX *_mem_save_user_sid_0;
2682 TALLOC_CTX *_mem_save_strings_0;
2683 TALLOC_CTX *_mem_save_strings_1;
2684 TALLOC_CTX *_mem_save_strings_2;
2685 TALLOC_CTX *_mem_save_data_0;
2686 TALLOC_CTX *_mem_save_record_number_0;
2687 TALLOC_CTX *_mem_save_time_written_0;
2688 if (flags & NDR_IN) {
2689 ZERO_STRUCT(r->out);
2691 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2692 NDR_PULL_ALLOC(ndr, r->in.handle);
2694 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2695 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
2696 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2697 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
2698 NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->in.timestamp));
2699 NDR_CHECK(ndr_pull_eventlogEventTypes(ndr, NDR_SCALARS, &r->in.event_type));
2700 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.event_category));
2701 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.event_id));
2702 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2703 NDR_PULL_ALLOC(ndr, r->in.sourcename);
2705 _mem_save_sourcename_0 = NDR_PULL_GET_MEM_CTX(ndr);
2706 NDR_PULL_SET_MEM_CTX(ndr, r->in.sourcename, LIBNDR_FLAG_REF_ALLOC);
2707 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sourcename));
2708 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sourcename_0, LIBNDR_FLAG_REF_ALLOC);
2709 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.num_of_strings));
2710 if (r->in.num_of_strings > 256) {
2711 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2713 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.data_size));
2714 if (r->in.data_size > 0x3FFFF) {
2715 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2717 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2718 NDR_PULL_ALLOC(ndr, r->in.servername);
2720 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
2721 NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, LIBNDR_FLAG_REF_ALLOC);
2722 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.servername));
2723 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, LIBNDR_FLAG_REF_ALLOC);
2724 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user_sid));
2725 if (_ptr_user_sid) {
2726 NDR_PULL_ALLOC(ndr, r->in.user_sid);
2727 } else {
2728 r->in.user_sid = NULL;
2730 if (r->in.user_sid) {
2731 _mem_save_user_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
2732 NDR_PULL_SET_MEM_CTX(ndr, r->in.user_sid, 0);
2733 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->in.user_sid));
2734 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_sid_0, 0);
2736 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_strings));
2737 if (_ptr_strings) {
2738 NDR_PULL_ALLOC(ndr, r->in.strings);
2739 } else {
2740 r->in.strings = NULL;
2742 if (r->in.strings) {
2743 _mem_save_strings_0 = NDR_PULL_GET_MEM_CTX(ndr);
2744 NDR_PULL_SET_MEM_CTX(ndr, r->in.strings, 0);
2745 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.strings));
2746 NDR_PULL_ALLOC_N(ndr, r->in.strings, ndr_get_array_size(ndr, &r->in.strings));
2747 _mem_save_strings_1 = NDR_PULL_GET_MEM_CTX(ndr);
2748 NDR_PULL_SET_MEM_CTX(ndr, r->in.strings, 0);
2749 for (cntr_strings_1 = 0; cntr_strings_1 < r->in.num_of_strings; cntr_strings_1++) {
2751 for (cntr_strings_1 = 0; cntr_strings_1 < r->in.num_of_strings; cntr_strings_1++) {
2752 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_strings));
2753 if (_ptr_strings) {
2754 NDR_PULL_ALLOC(ndr, r->in.strings[cntr_strings_1]);
2755 } else {
2756 r->in.strings[cntr_strings_1] = NULL;
2758 if (r->in.strings[cntr_strings_1]) {
2759 _mem_save_strings_2 = NDR_PULL_GET_MEM_CTX(ndr);
2760 NDR_PULL_SET_MEM_CTX(ndr, r->in.strings[cntr_strings_1], 0);
2761 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.strings[cntr_strings_1]));
2762 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_strings_2, 0);
2765 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_strings_1, 0);
2766 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_strings_0, 0);
2768 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
2769 if (_ptr_data) {
2770 NDR_PULL_ALLOC(ndr, r->in.data);
2771 } else {
2772 r->in.data = NULL;
2774 if (r->in.data) {
2775 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
2776 NDR_PULL_SET_MEM_CTX(ndr, r->in.data, 0);
2777 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.data));
2778 NDR_PULL_ALLOC_N(ndr, r->in.data, ndr_get_array_size(ndr, &r->in.data));
2779 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.data, ndr_get_array_size(ndr, &r->in.data)));
2780 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
2782 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.flags));
2783 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_record_number));
2784 if (_ptr_record_number) {
2785 NDR_PULL_ALLOC(ndr, r->in.record_number);
2786 } else {
2787 r->in.record_number = NULL;
2789 if (r->in.record_number) {
2790 _mem_save_record_number_0 = NDR_PULL_GET_MEM_CTX(ndr);
2791 NDR_PULL_SET_MEM_CTX(ndr, r->in.record_number, 0);
2792 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.record_number));
2793 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_record_number_0, 0);
2795 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_time_written));
2796 if (_ptr_time_written) {
2797 NDR_PULL_ALLOC(ndr, r->in.time_written);
2798 } else {
2799 r->in.time_written = NULL;
2801 if (r->in.time_written) {
2802 _mem_save_time_written_0 = NDR_PULL_GET_MEM_CTX(ndr);
2803 NDR_PULL_SET_MEM_CTX(ndr, r->in.time_written, 0);
2804 NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, r->in.time_written));
2805 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_time_written_0, 0);
2807 if (r->in.strings) {
2808 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.strings, r->in.num_of_strings));
2810 if (r->in.data) {
2811 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.data, r->in.data_size));
2814 if (flags & NDR_OUT) {
2815 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_record_number));
2816 if (_ptr_record_number) {
2817 NDR_PULL_ALLOC(ndr, r->out.record_number);
2818 } else {
2819 r->out.record_number = NULL;
2821 if (r->out.record_number) {
2822 _mem_save_record_number_0 = NDR_PULL_GET_MEM_CTX(ndr);
2823 NDR_PULL_SET_MEM_CTX(ndr, r->out.record_number, 0);
2824 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.record_number));
2825 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_record_number_0, 0);
2827 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_time_written));
2828 if (_ptr_time_written) {
2829 NDR_PULL_ALLOC(ndr, r->out.time_written);
2830 } else {
2831 r->out.time_written = NULL;
2833 if (r->out.time_written) {
2834 _mem_save_time_written_0 = NDR_PULL_GET_MEM_CTX(ndr);
2835 NDR_PULL_SET_MEM_CTX(ndr, r->out.time_written, 0);
2836 NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, r->out.time_written));
2837 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_time_written_0, 0);
2839 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2841 return NDR_ERR_SUCCESS;
2844 _PUBLIC_ void ndr_print_eventlog_ReportEventAndSourceW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ReportEventAndSourceW *r)
2846 uint32_t cntr_strings_1;
2847 ndr_print_struct(ndr, name, "eventlog_ReportEventAndSourceW");
2848 ndr->depth++;
2849 if (flags & NDR_SET_VALUES) {
2850 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2852 if (flags & NDR_IN) {
2853 ndr_print_struct(ndr, "in", "eventlog_ReportEventAndSourceW");
2854 ndr->depth++;
2855 ndr_print_ptr(ndr, "handle", r->in.handle);
2856 ndr->depth++;
2857 ndr_print_policy_handle(ndr, "handle", r->in.handle);
2858 ndr->depth--;
2859 ndr_print_time_t(ndr, "timestamp", r->in.timestamp);
2860 ndr_print_eventlogEventTypes(ndr, "event_type", r->in.event_type);
2861 ndr_print_uint16(ndr, "event_category", r->in.event_category);
2862 ndr_print_uint32(ndr, "event_id", r->in.event_id);
2863 ndr_print_ptr(ndr, "sourcename", r->in.sourcename);
2864 ndr->depth++;
2865 ndr_print_lsa_String(ndr, "sourcename", r->in.sourcename);
2866 ndr->depth--;
2867 ndr_print_uint16(ndr, "num_of_strings", r->in.num_of_strings);
2868 ndr_print_uint32(ndr, "data_size", r->in.data_size);
2869 ndr_print_ptr(ndr, "servername", r->in.servername);
2870 ndr->depth++;
2871 ndr_print_lsa_String(ndr, "servername", r->in.servername);
2872 ndr->depth--;
2873 ndr_print_ptr(ndr, "user_sid", r->in.user_sid);
2874 ndr->depth++;
2875 if (r->in.user_sid) {
2876 ndr_print_dom_sid(ndr, "user_sid", r->in.user_sid);
2878 ndr->depth--;
2879 ndr_print_ptr(ndr, "strings", r->in.strings);
2880 ndr->depth++;
2881 if (r->in.strings) {
2882 ndr->print(ndr, "%s: ARRAY(%d)", "strings", (int)r->in.num_of_strings);
2883 ndr->depth++;
2884 for (cntr_strings_1=0;cntr_strings_1<r->in.num_of_strings;cntr_strings_1++) {
2885 char *idx_1=NULL;
2886 if (asprintf(&idx_1, "[%d]", cntr_strings_1) != -1) {
2887 ndr_print_ptr(ndr, "strings", r->in.strings[cntr_strings_1]);
2888 ndr->depth++;
2889 if (r->in.strings[cntr_strings_1]) {
2890 ndr_print_lsa_String(ndr, "strings", r->in.strings[cntr_strings_1]);
2892 ndr->depth--;
2893 free(idx_1);
2896 ndr->depth--;
2898 ndr->depth--;
2899 ndr_print_ptr(ndr, "data", r->in.data);
2900 ndr->depth++;
2901 if (r->in.data) {
2902 ndr_print_array_uint8(ndr, "data", r->in.data, r->in.data_size);
2904 ndr->depth--;
2905 ndr_print_uint16(ndr, "flags", r->in.flags);
2906 ndr_print_ptr(ndr, "record_number", r->in.record_number);
2907 ndr->depth++;
2908 if (r->in.record_number) {
2909 ndr_print_uint32(ndr, "record_number", *r->in.record_number);
2911 ndr->depth--;
2912 ndr_print_ptr(ndr, "time_written", r->in.time_written);
2913 ndr->depth++;
2914 if (r->in.time_written) {
2915 ndr_print_time_t(ndr, "time_written", *r->in.time_written);
2917 ndr->depth--;
2918 ndr->depth--;
2920 if (flags & NDR_OUT) {
2921 ndr_print_struct(ndr, "out", "eventlog_ReportEventAndSourceW");
2922 ndr->depth++;
2923 ndr_print_ptr(ndr, "record_number", r->out.record_number);
2924 ndr->depth++;
2925 if (r->out.record_number) {
2926 ndr_print_uint32(ndr, "record_number", *r->out.record_number);
2928 ndr->depth--;
2929 ndr_print_ptr(ndr, "time_written", r->out.time_written);
2930 ndr->depth++;
2931 if (r->out.time_written) {
2932 ndr_print_time_t(ndr, "time_written", *r->out.time_written);
2934 ndr->depth--;
2935 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2936 ndr->depth--;
2938 ndr->depth--;
2941 static const struct ndr_interface_call eventlog_calls[] = {
2943 "eventlog_ClearEventLogW",
2944 sizeof(struct eventlog_ClearEventLogW),
2945 (ndr_push_flags_fn_t) ndr_push_eventlog_ClearEventLogW,
2946 (ndr_pull_flags_fn_t) ndr_pull_eventlog_ClearEventLogW,
2947 (ndr_print_function_t) ndr_print_eventlog_ClearEventLogW,
2948 false,
2951 "eventlog_BackupEventLogW",
2952 sizeof(struct eventlog_BackupEventLogW),
2953 (ndr_push_flags_fn_t) ndr_push_eventlog_BackupEventLogW,
2954 (ndr_pull_flags_fn_t) ndr_pull_eventlog_BackupEventLogW,
2955 (ndr_print_function_t) ndr_print_eventlog_BackupEventLogW,
2956 false,
2959 "eventlog_CloseEventLog",
2960 sizeof(struct eventlog_CloseEventLog),
2961 (ndr_push_flags_fn_t) ndr_push_eventlog_CloseEventLog,
2962 (ndr_pull_flags_fn_t) ndr_pull_eventlog_CloseEventLog,
2963 (ndr_print_function_t) ndr_print_eventlog_CloseEventLog,
2964 false,
2967 "eventlog_DeregisterEventSource",
2968 sizeof(struct eventlog_DeregisterEventSource),
2969 (ndr_push_flags_fn_t) ndr_push_eventlog_DeregisterEventSource,
2970 (ndr_pull_flags_fn_t) ndr_pull_eventlog_DeregisterEventSource,
2971 (ndr_print_function_t) ndr_print_eventlog_DeregisterEventSource,
2972 false,
2975 "eventlog_GetNumRecords",
2976 sizeof(struct eventlog_GetNumRecords),
2977 (ndr_push_flags_fn_t) ndr_push_eventlog_GetNumRecords,
2978 (ndr_pull_flags_fn_t) ndr_pull_eventlog_GetNumRecords,
2979 (ndr_print_function_t) ndr_print_eventlog_GetNumRecords,
2980 false,
2983 "eventlog_GetOldestRecord",
2984 sizeof(struct eventlog_GetOldestRecord),
2985 (ndr_push_flags_fn_t) ndr_push_eventlog_GetOldestRecord,
2986 (ndr_pull_flags_fn_t) ndr_pull_eventlog_GetOldestRecord,
2987 (ndr_print_function_t) ndr_print_eventlog_GetOldestRecord,
2988 false,
2991 "eventlog_ChangeNotify",
2992 sizeof(struct eventlog_ChangeNotify),
2993 (ndr_push_flags_fn_t) ndr_push_eventlog_ChangeNotify,
2994 (ndr_pull_flags_fn_t) ndr_pull_eventlog_ChangeNotify,
2995 (ndr_print_function_t) ndr_print_eventlog_ChangeNotify,
2996 false,
2999 "eventlog_OpenEventLogW",
3000 sizeof(struct eventlog_OpenEventLogW),
3001 (ndr_push_flags_fn_t) ndr_push_eventlog_OpenEventLogW,
3002 (ndr_pull_flags_fn_t) ndr_pull_eventlog_OpenEventLogW,
3003 (ndr_print_function_t) ndr_print_eventlog_OpenEventLogW,
3004 false,
3007 "eventlog_RegisterEventSourceW",
3008 sizeof(struct eventlog_RegisterEventSourceW),
3009 (ndr_push_flags_fn_t) ndr_push_eventlog_RegisterEventSourceW,
3010 (ndr_pull_flags_fn_t) ndr_pull_eventlog_RegisterEventSourceW,
3011 (ndr_print_function_t) ndr_print_eventlog_RegisterEventSourceW,
3012 false,
3015 "eventlog_OpenBackupEventLogW",
3016 sizeof(struct eventlog_OpenBackupEventLogW),
3017 (ndr_push_flags_fn_t) ndr_push_eventlog_OpenBackupEventLogW,
3018 (ndr_pull_flags_fn_t) ndr_pull_eventlog_OpenBackupEventLogW,
3019 (ndr_print_function_t) ndr_print_eventlog_OpenBackupEventLogW,
3020 false,
3023 "eventlog_ReadEventLogW",
3024 sizeof(struct eventlog_ReadEventLogW),
3025 (ndr_push_flags_fn_t) ndr_push_eventlog_ReadEventLogW,
3026 (ndr_pull_flags_fn_t) ndr_pull_eventlog_ReadEventLogW,
3027 (ndr_print_function_t) ndr_print_eventlog_ReadEventLogW,
3028 false,
3031 "eventlog_ReportEventW",
3032 sizeof(struct eventlog_ReportEventW),
3033 (ndr_push_flags_fn_t) ndr_push_eventlog_ReportEventW,
3034 (ndr_pull_flags_fn_t) ndr_pull_eventlog_ReportEventW,
3035 (ndr_print_function_t) ndr_print_eventlog_ReportEventW,
3036 false,
3039 "eventlog_ClearEventLogA",
3040 sizeof(struct eventlog_ClearEventLogA),
3041 (ndr_push_flags_fn_t) ndr_push_eventlog_ClearEventLogA,
3042 (ndr_pull_flags_fn_t) ndr_pull_eventlog_ClearEventLogA,
3043 (ndr_print_function_t) ndr_print_eventlog_ClearEventLogA,
3044 false,
3047 "eventlog_BackupEventLogA",
3048 sizeof(struct eventlog_BackupEventLogA),
3049 (ndr_push_flags_fn_t) ndr_push_eventlog_BackupEventLogA,
3050 (ndr_pull_flags_fn_t) ndr_pull_eventlog_BackupEventLogA,
3051 (ndr_print_function_t) ndr_print_eventlog_BackupEventLogA,
3052 false,
3055 "eventlog_OpenEventLogA",
3056 sizeof(struct eventlog_OpenEventLogA),
3057 (ndr_push_flags_fn_t) ndr_push_eventlog_OpenEventLogA,
3058 (ndr_pull_flags_fn_t) ndr_pull_eventlog_OpenEventLogA,
3059 (ndr_print_function_t) ndr_print_eventlog_OpenEventLogA,
3060 false,
3063 "eventlog_RegisterEventSourceA",
3064 sizeof(struct eventlog_RegisterEventSourceA),
3065 (ndr_push_flags_fn_t) ndr_push_eventlog_RegisterEventSourceA,
3066 (ndr_pull_flags_fn_t) ndr_pull_eventlog_RegisterEventSourceA,
3067 (ndr_print_function_t) ndr_print_eventlog_RegisterEventSourceA,
3068 false,
3071 "eventlog_OpenBackupEventLogA",
3072 sizeof(struct eventlog_OpenBackupEventLogA),
3073 (ndr_push_flags_fn_t) ndr_push_eventlog_OpenBackupEventLogA,
3074 (ndr_pull_flags_fn_t) ndr_pull_eventlog_OpenBackupEventLogA,
3075 (ndr_print_function_t) ndr_print_eventlog_OpenBackupEventLogA,
3076 false,
3079 "eventlog_ReadEventLogA",
3080 sizeof(struct eventlog_ReadEventLogA),
3081 (ndr_push_flags_fn_t) ndr_push_eventlog_ReadEventLogA,
3082 (ndr_pull_flags_fn_t) ndr_pull_eventlog_ReadEventLogA,
3083 (ndr_print_function_t) ndr_print_eventlog_ReadEventLogA,
3084 false,
3087 "eventlog_ReportEventA",
3088 sizeof(struct eventlog_ReportEventA),
3089 (ndr_push_flags_fn_t) ndr_push_eventlog_ReportEventA,
3090 (ndr_pull_flags_fn_t) ndr_pull_eventlog_ReportEventA,
3091 (ndr_print_function_t) ndr_print_eventlog_ReportEventA,
3092 false,
3095 "eventlog_RegisterClusterSvc",
3096 sizeof(struct eventlog_RegisterClusterSvc),
3097 (ndr_push_flags_fn_t) ndr_push_eventlog_RegisterClusterSvc,
3098 (ndr_pull_flags_fn_t) ndr_pull_eventlog_RegisterClusterSvc,
3099 (ndr_print_function_t) ndr_print_eventlog_RegisterClusterSvc,
3100 false,
3103 "eventlog_DeregisterClusterSvc",
3104 sizeof(struct eventlog_DeregisterClusterSvc),
3105 (ndr_push_flags_fn_t) ndr_push_eventlog_DeregisterClusterSvc,
3106 (ndr_pull_flags_fn_t) ndr_pull_eventlog_DeregisterClusterSvc,
3107 (ndr_print_function_t) ndr_print_eventlog_DeregisterClusterSvc,
3108 false,
3111 "eventlog_WriteClusterEvents",
3112 sizeof(struct eventlog_WriteClusterEvents),
3113 (ndr_push_flags_fn_t) ndr_push_eventlog_WriteClusterEvents,
3114 (ndr_pull_flags_fn_t) ndr_pull_eventlog_WriteClusterEvents,
3115 (ndr_print_function_t) ndr_print_eventlog_WriteClusterEvents,
3116 false,
3119 "eventlog_GetLogInformation",
3120 sizeof(struct eventlog_GetLogInformation),
3121 (ndr_push_flags_fn_t) ndr_push_eventlog_GetLogInformation,
3122 (ndr_pull_flags_fn_t) ndr_pull_eventlog_GetLogInformation,
3123 (ndr_print_function_t) ndr_print_eventlog_GetLogInformation,
3124 false,
3127 "eventlog_FlushEventLog",
3128 sizeof(struct eventlog_FlushEventLog),
3129 (ndr_push_flags_fn_t) ndr_push_eventlog_FlushEventLog,
3130 (ndr_pull_flags_fn_t) ndr_pull_eventlog_FlushEventLog,
3131 (ndr_print_function_t) ndr_print_eventlog_FlushEventLog,
3132 false,
3135 "eventlog_ReportEventAndSourceW",
3136 sizeof(struct eventlog_ReportEventAndSourceW),
3137 (ndr_push_flags_fn_t) ndr_push_eventlog_ReportEventAndSourceW,
3138 (ndr_pull_flags_fn_t) ndr_pull_eventlog_ReportEventAndSourceW,
3139 (ndr_print_function_t) ndr_print_eventlog_ReportEventAndSourceW,
3140 false,
3142 { NULL, 0, NULL, NULL, NULL, false }
3145 static const char * const eventlog_endpoint_strings[] = {
3146 "ncacn_np:[\\pipe\\eventlog]",
3149 static const struct ndr_interface_string_array eventlog_endpoints = {
3150 .count = 1,
3151 .names = eventlog_endpoint_strings
3154 static const char * const eventlog_authservice_strings[] = {
3155 "host",
3158 static const struct ndr_interface_string_array eventlog_authservices = {
3159 .count = 1,
3160 .names = eventlog_authservice_strings
3164 const struct ndr_interface_table ndr_table_eventlog = {
3165 .name = "eventlog",
3166 .syntax_id = {
3167 {0x82273fdc,0xe32a,0x18c3,{0x3f,0x78},{0x82,0x79,0x29,0xdc,0x23,0xea}},
3168 NDR_EVENTLOG_VERSION
3170 .helpstring = NDR_EVENTLOG_HELPSTRING,
3171 .num_calls = 25,
3172 .calls = eventlog_calls,
3173 .endpoints = &eventlog_endpoints,
3174 .authservices = &eventlog_authservices