s3:libsmb: merge cli_setup_signing_state() into cli_initialise_ex()
[Samba/gbeck.git] / librpc / gen_ndr / ndr_eventlog.c
blob3f19902690d6dc27ae94511c2a42cd782e063780
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_uint16(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_uint16(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));
69 if (ndr_flags & NDR_BUFFERS) {
71 return NDR_ERR_SUCCESS;
74 static enum ndr_err_code ndr_pull_eventlog_OpenUnknown0(struct ndr_pull *ndr, int ndr_flags, struct eventlog_OpenUnknown0 *r)
76 if (ndr_flags & NDR_SCALARS) {
77 NDR_CHECK(ndr_pull_align(ndr, 2));
78 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->unknown0));
79 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->unknown1));
81 if (ndr_flags & NDR_BUFFERS) {
83 return NDR_ERR_SUCCESS;
86 _PUBLIC_ void ndr_print_eventlog_OpenUnknown0(struct ndr_print *ndr, const char *name, const struct eventlog_OpenUnknown0 *r)
88 ndr_print_struct(ndr, name, "eventlog_OpenUnknown0");
89 ndr->depth++;
90 ndr_print_uint16(ndr, "unknown0", r->unknown0);
91 ndr_print_uint16(ndr, "unknown1", r->unknown1);
92 ndr->depth--;
95 _PUBLIC_ enum ndr_err_code ndr_push_eventlog_Record_tdb(struct ndr_push *ndr, int ndr_flags, const struct eventlog_Record_tdb *r)
97 uint32_t cntr_strings_0;
99 uint32_t _flags_save_STRUCT = ndr->flags;
100 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_PRINT_ARRAY_HEX);
101 if (ndr_flags & NDR_SCALARS) {
102 NDR_CHECK(ndr_push_align(ndr, 4));
103 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
104 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, "eLfL", 4, sizeof(uint8_t), CH_DOS));
105 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->record_number));
106 NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->time_generated));
107 NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->time_written));
108 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->event_id));
109 NDR_CHECK(ndr_push_eventlogEventTypes(ndr, NDR_SCALARS, r->event_type));
110 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_of_strings));
111 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->event_category));
112 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->reserved_flags));
113 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->closing_record_number));
114 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->stringoffset));
115 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid.length));
116 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid_offset));
117 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->data.length));
118 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->data_offset));
119 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2 * strlen_m_term(r->source_name)));
121 uint32_t _flags_save_string = ndr->flags;
122 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
123 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->source_name));
124 ndr->flags = _flags_save_string;
126 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2 * strlen_m_term(r->computer_name)));
128 uint32_t _flags_save_string = ndr->flags;
129 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
130 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->computer_name));
131 ndr->flags = _flags_save_string;
133 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid_padding));
134 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->sid));
135 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2 * ndr_size_string_array(r->strings, r->num_of_strings, LIBNDR_FLAG_STR_NULLTERM)));
137 uint32_t _flags_save_string = ndr->flags;
138 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
139 for (cntr_strings_0 = 0; cntr_strings_0 < r->num_of_strings; cntr_strings_0++) {
140 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->strings[cntr_strings_0]));
142 ndr->flags = _flags_save_string;
144 NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->data));
145 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->padding));
147 if (ndr_flags & NDR_BUFFERS) {
149 ndr->flags = _flags_save_STRUCT;
151 return NDR_ERR_SUCCESS;
154 _PUBLIC_ enum ndr_err_code ndr_pull_eventlog_Record_tdb(struct ndr_pull *ndr, int ndr_flags, struct eventlog_Record_tdb *r)
156 uint32_t cntr_strings_0;
157 TALLOC_CTX *_mem_save_strings_0;
159 uint32_t _flags_save_STRUCT = ndr->flags;
160 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_PRINT_ARRAY_HEX);
161 if (ndr_flags & NDR_SCALARS) {
162 NDR_CHECK(ndr_pull_align(ndr, 4));
163 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
164 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->reserved, 4, sizeof(uint8_t), CH_DOS));
165 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->record_number));
166 NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->time_generated));
167 NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->time_written));
168 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->event_id));
169 NDR_CHECK(ndr_pull_eventlogEventTypes(ndr, NDR_SCALARS, &r->event_type));
170 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_of_strings));
171 if (r->num_of_strings > 256) {
172 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
174 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->event_category));
175 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved_flags));
176 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->closing_record_number));
177 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->stringoffset));
178 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_length));
179 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_offset));
180 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->data_length));
181 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->data_offset));
182 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->source_name_len));
184 uint32_t _flags_save_string = ndr->flags;
185 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
186 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->source_name));
187 ndr->flags = _flags_save_string;
189 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->computer_name_len));
191 uint32_t _flags_save_string = ndr->flags;
192 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
193 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->computer_name));
194 ndr->flags = _flags_save_string;
196 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_padding));
197 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->sid));
198 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->strings_len));
200 uint32_t _flags_save_string = ndr->flags;
201 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
202 NDR_PULL_ALLOC_N(ndr, r->strings, r->num_of_strings);
203 _mem_save_strings_0 = NDR_PULL_GET_MEM_CTX(ndr);
204 NDR_PULL_SET_MEM_CTX(ndr, r->strings, 0);
205 for (cntr_strings_0 = 0; cntr_strings_0 < r->num_of_strings; cntr_strings_0++) {
206 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->strings[cntr_strings_0]));
208 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_strings_0, 0);
209 ndr->flags = _flags_save_string;
211 NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->data));
212 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->padding));
214 if (ndr_flags & NDR_BUFFERS) {
216 ndr->flags = _flags_save_STRUCT;
218 return NDR_ERR_SUCCESS;
221 _PUBLIC_ void ndr_print_eventlog_Record_tdb(struct ndr_print *ndr, const char *name, const struct eventlog_Record_tdb *r)
223 uint32_t cntr_strings_0;
224 ndr_print_struct(ndr, name, "eventlog_Record_tdb");
226 uint32_t _flags_save_STRUCT = ndr->flags;
227 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_NOALIGN|LIBNDR_PRINT_ARRAY_HEX);
228 ndr->depth++;
229 ndr_print_uint32(ndr, "size", r->size);
230 ndr_print_string(ndr, "reserved", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?"eLfL":r->reserved);
231 ndr_print_uint32(ndr, "record_number", r->record_number);
232 ndr_print_time_t(ndr, "time_generated", r->time_generated);
233 ndr_print_time_t(ndr, "time_written", r->time_written);
234 ndr_print_uint32(ndr, "event_id", r->event_id);
235 ndr_print_eventlogEventTypes(ndr, "event_type", r->event_type);
236 ndr_print_uint16(ndr, "num_of_strings", r->num_of_strings);
237 ndr_print_uint16(ndr, "event_category", r->event_category);
238 ndr_print_uint16(ndr, "reserved_flags", r->reserved_flags);
239 ndr_print_uint32(ndr, "closing_record_number", r->closing_record_number);
240 ndr_print_uint32(ndr, "stringoffset", r->stringoffset);
241 ndr_print_uint32(ndr, "sid_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->sid.length:r->sid_length);
242 ndr_print_uint32(ndr, "sid_offset", r->sid_offset);
243 ndr_print_uint32(ndr, "data_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->data.length:r->data_length);
244 ndr_print_uint32(ndr, "data_offset", r->data_offset);
245 ndr_print_uint32(ndr, "source_name_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m_term(r->source_name):r->source_name_len);
246 ndr_print_string(ndr, "source_name", r->source_name);
247 ndr_print_uint32(ndr, "computer_name_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * strlen_m_term(r->computer_name):r->computer_name_len);
248 ndr_print_string(ndr, "computer_name", r->computer_name);
249 ndr_print_uint32(ndr, "sid_padding", r->sid_padding);
250 ndr_print_DATA_BLOB(ndr, "sid", r->sid);
251 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);
252 ndr->print(ndr, "%s: ARRAY(%d)", "strings", (int)r->num_of_strings);
253 ndr->depth++;
254 for (cntr_strings_0=0;cntr_strings_0<r->num_of_strings;cntr_strings_0++) {
255 char *idx_0=NULL;
256 if (asprintf(&idx_0, "[%d]", cntr_strings_0) != -1) {
257 ndr_print_string(ndr, "strings", r->strings[cntr_strings_0]);
258 free(idx_0);
261 ndr->depth--;
262 ndr_print_DATA_BLOB(ndr, "data", r->data);
263 ndr_print_uint32(ndr, "padding", r->padding);
264 ndr->depth--;
265 ndr->flags = _flags_save_STRUCT;
269 static enum ndr_err_code ndr_push_EVENTLOG_HEADER_FLAGS(struct ndr_push *ndr, int ndr_flags, enum EVENTLOG_HEADER_FLAGS r)
271 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
272 return NDR_ERR_SUCCESS;
275 static enum ndr_err_code ndr_pull_EVENTLOG_HEADER_FLAGS(struct ndr_pull *ndr, int ndr_flags, enum EVENTLOG_HEADER_FLAGS *r)
277 uint32_t v;
278 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
279 *r = v;
280 return NDR_ERR_SUCCESS;
283 _PUBLIC_ void ndr_print_EVENTLOG_HEADER_FLAGS(struct ndr_print *ndr, const char *name, enum EVENTLOG_HEADER_FLAGS r)
285 const char *val = NULL;
287 switch (r) {
288 case ELF_LOGFILE_HEADER_DIRTY: val = "ELF_LOGFILE_HEADER_DIRTY"; break;
289 case ELF_LOGFILE_HEADER_WRAP: val = "ELF_LOGFILE_HEADER_WRAP"; break;
290 case ELF_LOGFILE_LOGFULL_WRITTEN: val = "ELF_LOGFILE_LOGFULL_WRITTEN"; break;
291 case ELF_LOGFILE_ARCHIVE_SET: val = "ELF_LOGFILE_ARCHIVE_SET"; break;
293 ndr_print_enum(ndr, name, "ENUM", val, r);
296 _PUBLIC_ enum ndr_err_code ndr_push_EVENTLOGHEADER(struct ndr_push *ndr, int ndr_flags, const struct EVENTLOGHEADER *r)
298 if (ndr_flags & NDR_SCALARS) {
299 NDR_CHECK(ndr_push_align(ndr, 4));
300 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x30));
301 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, "LfLe", 4, sizeof(uint8_t), CH_DOS));
302 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 1));
303 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 1));
304 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->StartOffset));
305 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->EndOffset));
306 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->CurrentRecordNumber));
307 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->OldestRecordNumber));
308 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->MaxSize));
309 NDR_CHECK(ndr_push_EVENTLOG_HEADER_FLAGS(ndr, NDR_SCALARS, r->Flags));
310 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Retention));
311 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x30));
313 if (ndr_flags & NDR_BUFFERS) {
315 return NDR_ERR_SUCCESS;
318 _PUBLIC_ enum ndr_err_code ndr_pull_EVENTLOGHEADER(struct ndr_pull *ndr, int ndr_flags, struct EVENTLOGHEADER *r)
320 if (ndr_flags & NDR_SCALARS) {
321 NDR_CHECK(ndr_pull_align(ndr, 4));
322 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->HeaderSize));
323 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->Signature, 4, sizeof(uint8_t), CH_DOS));
324 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->MajorVersion));
325 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->MinorVersion));
326 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->StartOffset));
327 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->EndOffset));
328 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->CurrentRecordNumber));
329 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->OldestRecordNumber));
330 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->MaxSize));
331 NDR_CHECK(ndr_pull_EVENTLOG_HEADER_FLAGS(ndr, NDR_SCALARS, &r->Flags));
332 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Retention));
333 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->EndHeaderSize));
335 if (ndr_flags & NDR_BUFFERS) {
337 return NDR_ERR_SUCCESS;
340 _PUBLIC_ void ndr_print_EVENTLOGHEADER(struct ndr_print *ndr, const char *name, const struct EVENTLOGHEADER *r)
342 ndr_print_struct(ndr, name, "EVENTLOGHEADER");
343 ndr->depth++;
344 ndr_print_uint32(ndr, "HeaderSize", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x30:r->HeaderSize);
345 ndr_print_string(ndr, "Signature", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?"LfLe":r->Signature);
346 ndr_print_uint32(ndr, "MajorVersion", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?1:r->MajorVersion);
347 ndr_print_uint32(ndr, "MinorVersion", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?1:r->MinorVersion);
348 ndr_print_uint32(ndr, "StartOffset", r->StartOffset);
349 ndr_print_uint32(ndr, "EndOffset", r->EndOffset);
350 ndr_print_uint32(ndr, "CurrentRecordNumber", r->CurrentRecordNumber);
351 ndr_print_uint32(ndr, "OldestRecordNumber", r->OldestRecordNumber);
352 ndr_print_uint32(ndr, "MaxSize", r->MaxSize);
353 ndr_print_EVENTLOG_HEADER_FLAGS(ndr, "Flags", r->Flags);
354 ndr_print_uint32(ndr, "Retention", r->Retention);
355 ndr_print_uint32(ndr, "EndHeaderSize", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x30:r->EndHeaderSize);
356 ndr->depth--;
359 _PUBLIC_ enum ndr_err_code ndr_push_EVENTLOGRECORD(struct ndr_push *ndr, int ndr_flags, const struct EVENTLOGRECORD *r)
361 uint32_t cntr_Strings_0;
362 if (ndr_flags & NDR_SCALARS) {
363 NDR_CHECK(ndr_push_align(ndr, 4));
364 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Length));
365 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, "LfLe", 4, sizeof(uint8_t), CH_DOS));
366 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->RecordNumber));
367 NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->TimeGenerated));
368 NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->TimeWritten));
369 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->EventID));
370 NDR_CHECK(ndr_push_eventlogEventTypes(ndr, NDR_SCALARS, r->EventType));
371 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->NumStrings));
372 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->EventCategory));
373 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->ReservedFlags));
374 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ClosingRecordNumber));
375 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)));
376 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_size_dom_sid0(&r->UserSid, ndr->flags)));
377 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 56 + 2 * (strlen_m_term(r->SourceName) + strlen_m_term(r->Computername))));
378 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->DataLength));
379 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))));
381 uint32_t _flags_save_string = ndr->flags;
382 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
383 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->SourceName));
384 ndr->flags = _flags_save_string;
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->Computername));
390 ndr->flags = _flags_save_string;
393 uint32_t _flags_save_dom_sid0 = ndr->flags;
394 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
396 struct ndr_push *_ndr_UserSid;
397 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_UserSid, 0, ndr_size_dom_sid0(&r->UserSid, ndr->flags)));
398 NDR_CHECK(ndr_push_dom_sid0(_ndr_UserSid, NDR_SCALARS|NDR_BUFFERS, &r->UserSid));
399 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_UserSid, 0, ndr_size_dom_sid0(&r->UserSid, ndr->flags)));
401 ndr->flags = _flags_save_dom_sid0;
404 uint32_t _flags_save_string = ndr->flags;
405 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
406 for (cntr_Strings_0 = 0; cntr_Strings_0 < r->NumStrings; cntr_Strings_0++) {
407 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->Strings[cntr_Strings_0]));
409 ndr->flags = _flags_save_string;
412 uint32_t _flags_save_uint8 = ndr->flags;
413 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
414 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->Data, r->DataLength));
415 ndr->flags = _flags_save_uint8;
418 uint32_t _flags_save_string = ndr->flags;
419 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
420 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->Pad));
421 ndr->flags = _flags_save_string;
423 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->Length));
425 if (ndr_flags & NDR_BUFFERS) {
427 uint32_t _flags_save_dom_sid0 = ndr->flags;
428 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
429 ndr->flags = _flags_save_dom_sid0;
432 return NDR_ERR_SUCCESS;
435 _PUBLIC_ enum ndr_err_code ndr_pull_EVENTLOGRECORD(struct ndr_pull *ndr, int ndr_flags, struct EVENTLOGRECORD *r)
437 uint32_t cntr_Strings_0;
438 TALLOC_CTX *_mem_save_Strings_0;
439 if (ndr_flags & NDR_SCALARS) {
440 NDR_CHECK(ndr_pull_align(ndr, 4));
441 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Length));
442 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->Reserved, 4, sizeof(uint8_t), CH_DOS));
443 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->RecordNumber));
444 NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->TimeGenerated));
445 NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->TimeWritten));
446 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->EventID));
447 NDR_CHECK(ndr_pull_eventlogEventTypes(ndr, NDR_SCALARS, &r->EventType));
448 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->NumStrings));
449 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->EventCategory));
450 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->ReservedFlags));
451 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ClosingRecordNumber));
452 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->StringOffset));
453 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->UserSidLength));
454 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->UserSidOffset));
455 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->DataLength));
456 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->DataOffset));
458 uint32_t _flags_save_string = ndr->flags;
459 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
460 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->SourceName));
461 ndr->flags = _flags_save_string;
464 uint32_t _flags_save_string = ndr->flags;
465 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
466 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->Computername));
467 ndr->flags = _flags_save_string;
470 uint32_t _flags_save_dom_sid0 = ndr->flags;
471 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
473 struct ndr_pull *_ndr_UserSid;
474 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_UserSid, 0, r->UserSidLength));
475 NDR_CHECK(ndr_pull_dom_sid0(_ndr_UserSid, NDR_SCALARS|NDR_BUFFERS, &r->UserSid));
476 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_UserSid, 0, r->UserSidLength));
478 ndr->flags = _flags_save_dom_sid0;
481 uint32_t _flags_save_string = ndr->flags;
482 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
483 NDR_PULL_ALLOC_N(ndr, r->Strings, r->NumStrings);
484 _mem_save_Strings_0 = NDR_PULL_GET_MEM_CTX(ndr);
485 NDR_PULL_SET_MEM_CTX(ndr, r->Strings, 0);
486 for (cntr_Strings_0 = 0; cntr_Strings_0 < r->NumStrings; cntr_Strings_0++) {
487 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->Strings[cntr_Strings_0]));
489 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_Strings_0, 0);
490 ndr->flags = _flags_save_string;
493 uint32_t _flags_save_uint8 = ndr->flags;
494 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
495 NDR_PULL_ALLOC_N(ndr, r->Data, r->DataLength);
496 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->Data, r->DataLength));
497 ndr->flags = _flags_save_uint8;
500 uint32_t _flags_save_string = ndr->flags;
501 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
502 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->Pad));
503 ndr->flags = _flags_save_string;
505 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Length2));
507 if (ndr_flags & NDR_BUFFERS) {
509 uint32_t _flags_save_dom_sid0 = ndr->flags;
510 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_ALIGN4);
511 ndr->flags = _flags_save_dom_sid0;
514 return NDR_ERR_SUCCESS;
517 _PUBLIC_ void ndr_print_EVENTLOGRECORD(struct ndr_print *ndr, const char *name, const struct EVENTLOGRECORD *r)
519 uint32_t cntr_Strings_0;
520 ndr_print_struct(ndr, name, "EVENTLOGRECORD");
521 ndr->depth++;
522 ndr_print_uint32(ndr, "Length", r->Length);
523 ndr_print_string(ndr, "Reserved", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?"LfLe":r->Reserved);
524 ndr_print_uint32(ndr, "RecordNumber", r->RecordNumber);
525 ndr_print_time_t(ndr, "TimeGenerated", r->TimeGenerated);
526 ndr_print_time_t(ndr, "TimeWritten", r->TimeWritten);
527 ndr_print_uint32(ndr, "EventID", r->EventID);
528 ndr_print_eventlogEventTypes(ndr, "EventType", r->EventType);
529 ndr_print_uint16(ndr, "NumStrings", r->NumStrings);
530 ndr_print_uint16(ndr, "EventCategory", r->EventCategory);
531 ndr_print_uint16(ndr, "ReservedFlags", r->ReservedFlags);
532 ndr_print_uint32(ndr, "ClosingRecordNumber", r->ClosingRecordNumber);
533 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);
534 ndr_print_uint32(ndr, "UserSidLength", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?ndr_size_dom_sid0(&r->UserSid, ndr->flags):r->UserSidLength);
535 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);
536 ndr_print_uint32(ndr, "DataLength", r->DataLength);
537 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);
538 ndr_print_string(ndr, "SourceName", r->SourceName);
539 ndr_print_string(ndr, "Computername", r->Computername);
540 ndr_print_dom_sid0(ndr, "UserSid", &r->UserSid);
541 ndr->print(ndr, "%s: ARRAY(%d)", "Strings", (int)r->NumStrings);
542 ndr->depth++;
543 for (cntr_Strings_0=0;cntr_Strings_0<r->NumStrings;cntr_Strings_0++) {
544 char *idx_0=NULL;
545 if (asprintf(&idx_0, "[%d]", cntr_Strings_0) != -1) {
546 ndr_print_string(ndr, "Strings", r->Strings[cntr_Strings_0]);
547 free(idx_0);
550 ndr->depth--;
551 ndr_print_array_uint8(ndr, "Data", r->Data, r->DataLength);
552 ndr_print_string(ndr, "Pad", r->Pad);
553 ndr_print_uint32(ndr, "Length2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?r->Length:r->Length2);
554 ndr->depth--;
557 _PUBLIC_ size_t ndr_size_EVENTLOGRECORD(const struct EVENTLOGRECORD *r, struct smb_iconv_convenience *ic, int flags)
559 return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_EVENTLOGRECORD, ic);
562 _PUBLIC_ enum ndr_err_code ndr_push_EVENTLOGEOF(struct ndr_push *ndr, int ndr_flags, const struct EVENTLOGEOF *r)
564 if (ndr_flags & NDR_SCALARS) {
565 NDR_CHECK(ndr_push_align(ndr, 4));
566 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x28));
567 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x11111111));
568 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x22222222));
569 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x33333333));
570 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x44444444));
571 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->BeginRecord));
572 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->EndRecord));
573 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->CurrentRecordNumber));
574 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->OldestRecordNumber));
575 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x28));
577 if (ndr_flags & NDR_BUFFERS) {
579 return NDR_ERR_SUCCESS;
582 _PUBLIC_ enum ndr_err_code ndr_pull_EVENTLOGEOF(struct ndr_pull *ndr, int ndr_flags, struct EVENTLOGEOF *r)
584 if (ndr_flags & NDR_SCALARS) {
585 NDR_CHECK(ndr_pull_align(ndr, 4));
586 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->RecordSizeBeginning));
587 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->One));
588 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Two));
589 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Three));
590 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->Four));
591 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->BeginRecord));
592 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->EndRecord));
593 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->CurrentRecordNumber));
594 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->OldestRecordNumber));
595 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->RecordSizeEnd));
597 if (ndr_flags & NDR_BUFFERS) {
599 return NDR_ERR_SUCCESS;
602 _PUBLIC_ void ndr_print_EVENTLOGEOF(struct ndr_print *ndr, const char *name, const struct EVENTLOGEOF *r)
604 ndr_print_struct(ndr, name, "EVENTLOGEOF");
605 ndr->depth++;
606 ndr_print_uint32(ndr, "RecordSizeBeginning", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x28:r->RecordSizeBeginning);
607 ndr_print_uint32(ndr, "One", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x11111111:r->One);
608 ndr_print_uint32(ndr, "Two", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x22222222:r->Two);
609 ndr_print_uint32(ndr, "Three", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x33333333:r->Three);
610 ndr_print_uint32(ndr, "Four", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x44444444:r->Four);
611 ndr_print_uint32(ndr, "BeginRecord", r->BeginRecord);
612 ndr_print_uint32(ndr, "EndRecord", r->EndRecord);
613 ndr_print_uint32(ndr, "CurrentRecordNumber", r->CurrentRecordNumber);
614 ndr_print_uint32(ndr, "OldestRecordNumber", r->OldestRecordNumber);
615 ndr_print_uint32(ndr, "RecordSizeEnd", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x28:r->RecordSizeEnd);
616 ndr->depth--;
619 _PUBLIC_ enum ndr_err_code ndr_push_EVENTLOG_EVT_FILE(struct ndr_push *ndr, int ndr_flags, const struct EVENTLOG_EVT_FILE *r)
621 uint32_t cntr_records_0;
622 if (ndr_flags & NDR_SCALARS) {
623 NDR_CHECK(ndr_push_align(ndr, 4));
624 NDR_CHECK(ndr_push_EVENTLOGHEADER(ndr, NDR_SCALARS, &r->hdr));
625 for (cntr_records_0 = 0; cntr_records_0 < r->hdr.CurrentRecordNumber - r->hdr.OldestRecordNumber; cntr_records_0++) {
626 NDR_CHECK(ndr_push_EVENTLOGRECORD(ndr, NDR_SCALARS, &r->records[cntr_records_0]));
628 NDR_CHECK(ndr_push_EVENTLOGEOF(ndr, NDR_SCALARS, &r->eof));
630 if (ndr_flags & NDR_BUFFERS) {
631 for (cntr_records_0 = 0; cntr_records_0 < r->hdr.CurrentRecordNumber - r->hdr.OldestRecordNumber; cntr_records_0++) {
632 NDR_CHECK(ndr_push_EVENTLOGRECORD(ndr, NDR_BUFFERS, &r->records[cntr_records_0]));
635 return NDR_ERR_SUCCESS;
638 _PUBLIC_ enum ndr_err_code ndr_pull_EVENTLOG_EVT_FILE(struct ndr_pull *ndr, int ndr_flags, struct EVENTLOG_EVT_FILE *r)
640 uint32_t cntr_records_0;
641 TALLOC_CTX *_mem_save_records_0;
642 if (ndr_flags & NDR_SCALARS) {
643 NDR_CHECK(ndr_pull_align(ndr, 4));
644 NDR_CHECK(ndr_pull_EVENTLOGHEADER(ndr, NDR_SCALARS, &r->hdr));
645 NDR_PULL_ALLOC_N(ndr, r->records, r->hdr.CurrentRecordNumber - r->hdr.OldestRecordNumber);
646 _mem_save_records_0 = NDR_PULL_GET_MEM_CTX(ndr);
647 NDR_PULL_SET_MEM_CTX(ndr, r->records, 0);
648 for (cntr_records_0 = 0; cntr_records_0 < r->hdr.CurrentRecordNumber - r->hdr.OldestRecordNumber; cntr_records_0++) {
649 NDR_CHECK(ndr_pull_EVENTLOGRECORD(ndr, NDR_SCALARS, &r->records[cntr_records_0]));
651 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_records_0, 0);
652 NDR_CHECK(ndr_pull_EVENTLOGEOF(ndr, NDR_SCALARS, &r->eof));
654 if (ndr_flags & NDR_BUFFERS) {
655 _mem_save_records_0 = NDR_PULL_GET_MEM_CTX(ndr);
656 NDR_PULL_SET_MEM_CTX(ndr, r->records, 0);
657 for (cntr_records_0 = 0; cntr_records_0 < r->hdr.CurrentRecordNumber - r->hdr.OldestRecordNumber; cntr_records_0++) {
658 NDR_CHECK(ndr_pull_EVENTLOGRECORD(ndr, NDR_BUFFERS, &r->records[cntr_records_0]));
660 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_records_0, 0);
662 return NDR_ERR_SUCCESS;
665 _PUBLIC_ void ndr_print_EVENTLOG_EVT_FILE(struct ndr_print *ndr, const char *name, const struct EVENTLOG_EVT_FILE *r)
667 uint32_t cntr_records_0;
668 ndr_print_struct(ndr, name, "EVENTLOG_EVT_FILE");
669 ndr->depth++;
670 ndr_print_EVENTLOGHEADER(ndr, "hdr", &r->hdr);
671 ndr->print(ndr, "%s: ARRAY(%d)", "records", (int)r->hdr.CurrentRecordNumber - r->hdr.OldestRecordNumber);
672 ndr->depth++;
673 for (cntr_records_0=0;cntr_records_0<r->hdr.CurrentRecordNumber - r->hdr.OldestRecordNumber;cntr_records_0++) {
674 char *idx_0=NULL;
675 if (asprintf(&idx_0, "[%d]", cntr_records_0) != -1) {
676 ndr_print_EVENTLOGRECORD(ndr, "records", &r->records[cntr_records_0]);
677 free(idx_0);
680 ndr->depth--;
681 ndr_print_EVENTLOGEOF(ndr, "eof", &r->eof);
682 ndr->depth--;
685 static enum ndr_err_code ndr_push_eventlog_ClearEventLogW(struct ndr_push *ndr, int flags, const struct eventlog_ClearEventLogW *r)
687 if (flags & NDR_IN) {
688 if (r->in.handle == NULL) {
689 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
691 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
692 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.backupfile));
693 if (r->in.backupfile) {
694 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.backupfile));
697 if (flags & NDR_OUT) {
698 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
700 return NDR_ERR_SUCCESS;
703 static enum ndr_err_code ndr_pull_eventlog_ClearEventLogW(struct ndr_pull *ndr, int flags, struct eventlog_ClearEventLogW *r)
705 uint32_t _ptr_backupfile;
706 TALLOC_CTX *_mem_save_handle_0;
707 TALLOC_CTX *_mem_save_backupfile_0;
708 if (flags & NDR_IN) {
709 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
710 NDR_PULL_ALLOC(ndr, r->in.handle);
712 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
713 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
714 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
715 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
716 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_backupfile));
717 if (_ptr_backupfile) {
718 NDR_PULL_ALLOC(ndr, r->in.backupfile);
719 } else {
720 r->in.backupfile = NULL;
722 if (r->in.backupfile) {
723 _mem_save_backupfile_0 = NDR_PULL_GET_MEM_CTX(ndr);
724 NDR_PULL_SET_MEM_CTX(ndr, r->in.backupfile, 0);
725 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.backupfile));
726 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_backupfile_0, 0);
729 if (flags & NDR_OUT) {
730 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
732 return NDR_ERR_SUCCESS;
735 _PUBLIC_ void ndr_print_eventlog_ClearEventLogW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ClearEventLogW *r)
737 ndr_print_struct(ndr, name, "eventlog_ClearEventLogW");
738 ndr->depth++;
739 if (flags & NDR_SET_VALUES) {
740 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
742 if (flags & NDR_IN) {
743 ndr_print_struct(ndr, "in", "eventlog_ClearEventLogW");
744 ndr->depth++;
745 ndr_print_ptr(ndr, "handle", r->in.handle);
746 ndr->depth++;
747 ndr_print_policy_handle(ndr, "handle", r->in.handle);
748 ndr->depth--;
749 ndr_print_ptr(ndr, "backupfile", r->in.backupfile);
750 ndr->depth++;
751 if (r->in.backupfile) {
752 ndr_print_lsa_String(ndr, "backupfile", r->in.backupfile);
754 ndr->depth--;
755 ndr->depth--;
757 if (flags & NDR_OUT) {
758 ndr_print_struct(ndr, "out", "eventlog_ClearEventLogW");
759 ndr->depth++;
760 ndr_print_NTSTATUS(ndr, "result", r->out.result);
761 ndr->depth--;
763 ndr->depth--;
766 static enum ndr_err_code ndr_push_eventlog_BackupEventLogW(struct ndr_push *ndr, int flags, const struct eventlog_BackupEventLogW *r)
768 if (flags & NDR_IN) {
769 if (r->in.handle == NULL) {
770 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
772 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
773 if (r->in.backup_filename == NULL) {
774 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
776 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.backup_filename));
778 if (flags & NDR_OUT) {
779 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
781 return NDR_ERR_SUCCESS;
784 static enum ndr_err_code ndr_pull_eventlog_BackupEventLogW(struct ndr_pull *ndr, int flags, struct eventlog_BackupEventLogW *r)
786 TALLOC_CTX *_mem_save_handle_0;
787 TALLOC_CTX *_mem_save_backup_filename_0;
788 if (flags & NDR_IN) {
789 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
790 NDR_PULL_ALLOC(ndr, r->in.handle);
792 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
793 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
794 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
795 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
796 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
797 NDR_PULL_ALLOC(ndr, r->in.backup_filename);
799 _mem_save_backup_filename_0 = NDR_PULL_GET_MEM_CTX(ndr);
800 NDR_PULL_SET_MEM_CTX(ndr, r->in.backup_filename, LIBNDR_FLAG_REF_ALLOC);
801 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.backup_filename));
802 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_backup_filename_0, LIBNDR_FLAG_REF_ALLOC);
804 if (flags & NDR_OUT) {
805 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
807 return NDR_ERR_SUCCESS;
810 _PUBLIC_ void ndr_print_eventlog_BackupEventLogW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_BackupEventLogW *r)
812 ndr_print_struct(ndr, name, "eventlog_BackupEventLogW");
813 ndr->depth++;
814 if (flags & NDR_SET_VALUES) {
815 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
817 if (flags & NDR_IN) {
818 ndr_print_struct(ndr, "in", "eventlog_BackupEventLogW");
819 ndr->depth++;
820 ndr_print_ptr(ndr, "handle", r->in.handle);
821 ndr->depth++;
822 ndr_print_policy_handle(ndr, "handle", r->in.handle);
823 ndr->depth--;
824 ndr_print_ptr(ndr, "backup_filename", r->in.backup_filename);
825 ndr->depth++;
826 ndr_print_lsa_String(ndr, "backup_filename", r->in.backup_filename);
827 ndr->depth--;
828 ndr->depth--;
830 if (flags & NDR_OUT) {
831 ndr_print_struct(ndr, "out", "eventlog_BackupEventLogW");
832 ndr->depth++;
833 ndr_print_NTSTATUS(ndr, "result", r->out.result);
834 ndr->depth--;
836 ndr->depth--;
839 static enum ndr_err_code ndr_push_eventlog_CloseEventLog(struct ndr_push *ndr, int flags, const struct eventlog_CloseEventLog *r)
841 if (flags & NDR_IN) {
842 if (r->in.handle == NULL) {
843 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
845 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
847 if (flags & NDR_OUT) {
848 if (r->out.handle == NULL) {
849 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
851 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
852 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
854 return NDR_ERR_SUCCESS;
857 static enum ndr_err_code ndr_pull_eventlog_CloseEventLog(struct ndr_pull *ndr, int flags, struct eventlog_CloseEventLog *r)
859 TALLOC_CTX *_mem_save_handle_0;
860 if (flags & NDR_IN) {
861 ZERO_STRUCT(r->out);
863 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
864 NDR_PULL_ALLOC(ndr, r->in.handle);
866 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
867 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
868 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
869 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
870 NDR_PULL_ALLOC(ndr, r->out.handle);
871 *r->out.handle = *r->in.handle;
873 if (flags & NDR_OUT) {
874 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
875 NDR_PULL_ALLOC(ndr, r->out.handle);
877 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
878 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
879 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
880 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
881 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
883 return NDR_ERR_SUCCESS;
886 _PUBLIC_ void ndr_print_eventlog_CloseEventLog(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_CloseEventLog *r)
888 ndr_print_struct(ndr, name, "eventlog_CloseEventLog");
889 ndr->depth++;
890 if (flags & NDR_SET_VALUES) {
891 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
893 if (flags & NDR_IN) {
894 ndr_print_struct(ndr, "in", "eventlog_CloseEventLog");
895 ndr->depth++;
896 ndr_print_ptr(ndr, "handle", r->in.handle);
897 ndr->depth++;
898 ndr_print_policy_handle(ndr, "handle", r->in.handle);
899 ndr->depth--;
900 ndr->depth--;
902 if (flags & NDR_OUT) {
903 ndr_print_struct(ndr, "out", "eventlog_CloseEventLog");
904 ndr->depth++;
905 ndr_print_ptr(ndr, "handle", r->out.handle);
906 ndr->depth++;
907 ndr_print_policy_handle(ndr, "handle", r->out.handle);
908 ndr->depth--;
909 ndr_print_NTSTATUS(ndr, "result", r->out.result);
910 ndr->depth--;
912 ndr->depth--;
915 static enum ndr_err_code ndr_push_eventlog_DeregisterEventSource(struct ndr_push *ndr, int flags, const struct eventlog_DeregisterEventSource *r)
917 if (flags & NDR_IN) {
918 if (r->in.handle == NULL) {
919 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
921 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
923 if (flags & NDR_OUT) {
924 if (r->out.handle == NULL) {
925 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
927 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
928 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
930 return NDR_ERR_SUCCESS;
933 static enum ndr_err_code ndr_pull_eventlog_DeregisterEventSource(struct ndr_pull *ndr, int flags, struct eventlog_DeregisterEventSource *r)
935 TALLOC_CTX *_mem_save_handle_0;
936 if (flags & NDR_IN) {
937 ZERO_STRUCT(r->out);
939 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
940 NDR_PULL_ALLOC(ndr, r->in.handle);
942 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
943 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
944 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
945 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
946 NDR_PULL_ALLOC(ndr, r->out.handle);
947 *r->out.handle = *r->in.handle;
949 if (flags & NDR_OUT) {
950 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
951 NDR_PULL_ALLOC(ndr, r->out.handle);
953 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
954 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
955 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
956 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
957 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
959 return NDR_ERR_SUCCESS;
962 _PUBLIC_ void ndr_print_eventlog_DeregisterEventSource(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_DeregisterEventSource *r)
964 ndr_print_struct(ndr, name, "eventlog_DeregisterEventSource");
965 ndr->depth++;
966 if (flags & NDR_SET_VALUES) {
967 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
969 if (flags & NDR_IN) {
970 ndr_print_struct(ndr, "in", "eventlog_DeregisterEventSource");
971 ndr->depth++;
972 ndr_print_ptr(ndr, "handle", r->in.handle);
973 ndr->depth++;
974 ndr_print_policy_handle(ndr, "handle", r->in.handle);
975 ndr->depth--;
976 ndr->depth--;
978 if (flags & NDR_OUT) {
979 ndr_print_struct(ndr, "out", "eventlog_DeregisterEventSource");
980 ndr->depth++;
981 ndr_print_ptr(ndr, "handle", r->out.handle);
982 ndr->depth++;
983 ndr_print_policy_handle(ndr, "handle", r->out.handle);
984 ndr->depth--;
985 ndr_print_NTSTATUS(ndr, "result", r->out.result);
986 ndr->depth--;
988 ndr->depth--;
991 static enum ndr_err_code ndr_push_eventlog_GetNumRecords(struct ndr_push *ndr, int flags, const struct eventlog_GetNumRecords *r)
993 if (flags & NDR_IN) {
994 if (r->in.handle == NULL) {
995 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
997 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
999 if (flags & NDR_OUT) {
1000 if (r->out.number == NULL) {
1001 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1003 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.number));
1004 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1006 return NDR_ERR_SUCCESS;
1009 static enum ndr_err_code ndr_pull_eventlog_GetNumRecords(struct ndr_pull *ndr, int flags, struct eventlog_GetNumRecords *r)
1011 TALLOC_CTX *_mem_save_handle_0;
1012 TALLOC_CTX *_mem_save_number_0;
1013 if (flags & NDR_IN) {
1014 ZERO_STRUCT(r->out);
1016 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1017 NDR_PULL_ALLOC(ndr, r->in.handle);
1019 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1020 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1021 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1022 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1023 NDR_PULL_ALLOC(ndr, r->out.number);
1024 ZERO_STRUCTP(r->out.number);
1026 if (flags & NDR_OUT) {
1027 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1028 NDR_PULL_ALLOC(ndr, r->out.number);
1030 _mem_save_number_0 = NDR_PULL_GET_MEM_CTX(ndr);
1031 NDR_PULL_SET_MEM_CTX(ndr, r->out.number, LIBNDR_FLAG_REF_ALLOC);
1032 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.number));
1033 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_number_0, LIBNDR_FLAG_REF_ALLOC);
1034 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1036 return NDR_ERR_SUCCESS;
1039 _PUBLIC_ void ndr_print_eventlog_GetNumRecords(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_GetNumRecords *r)
1041 ndr_print_struct(ndr, name, "eventlog_GetNumRecords");
1042 ndr->depth++;
1043 if (flags & NDR_SET_VALUES) {
1044 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1046 if (flags & NDR_IN) {
1047 ndr_print_struct(ndr, "in", "eventlog_GetNumRecords");
1048 ndr->depth++;
1049 ndr_print_ptr(ndr, "handle", r->in.handle);
1050 ndr->depth++;
1051 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1052 ndr->depth--;
1053 ndr->depth--;
1055 if (flags & NDR_OUT) {
1056 ndr_print_struct(ndr, "out", "eventlog_GetNumRecords");
1057 ndr->depth++;
1058 ndr_print_ptr(ndr, "number", r->out.number);
1059 ndr->depth++;
1060 ndr_print_uint32(ndr, "number", *r->out.number);
1061 ndr->depth--;
1062 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1063 ndr->depth--;
1065 ndr->depth--;
1068 static enum ndr_err_code ndr_push_eventlog_GetOldestRecord(struct ndr_push *ndr, int flags, const struct eventlog_GetOldestRecord *r)
1070 if (flags & NDR_IN) {
1071 if (r->in.handle == NULL) {
1072 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1074 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1076 if (flags & NDR_OUT) {
1077 if (r->out.oldest_entry == NULL) {
1078 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1080 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.oldest_entry));
1081 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1083 return NDR_ERR_SUCCESS;
1086 static enum ndr_err_code ndr_pull_eventlog_GetOldestRecord(struct ndr_pull *ndr, int flags, struct eventlog_GetOldestRecord *r)
1088 TALLOC_CTX *_mem_save_handle_0;
1089 TALLOC_CTX *_mem_save_oldest_entry_0;
1090 if (flags & NDR_IN) {
1091 ZERO_STRUCT(r->out);
1093 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1094 NDR_PULL_ALLOC(ndr, r->in.handle);
1096 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1097 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1098 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1099 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1100 NDR_PULL_ALLOC(ndr, r->out.oldest_entry);
1101 ZERO_STRUCTP(r->out.oldest_entry);
1103 if (flags & NDR_OUT) {
1104 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1105 NDR_PULL_ALLOC(ndr, r->out.oldest_entry);
1107 _mem_save_oldest_entry_0 = NDR_PULL_GET_MEM_CTX(ndr);
1108 NDR_PULL_SET_MEM_CTX(ndr, r->out.oldest_entry, LIBNDR_FLAG_REF_ALLOC);
1109 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.oldest_entry));
1110 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_oldest_entry_0, LIBNDR_FLAG_REF_ALLOC);
1111 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1113 return NDR_ERR_SUCCESS;
1116 _PUBLIC_ void ndr_print_eventlog_GetOldestRecord(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_GetOldestRecord *r)
1118 ndr_print_struct(ndr, name, "eventlog_GetOldestRecord");
1119 ndr->depth++;
1120 if (flags & NDR_SET_VALUES) {
1121 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1123 if (flags & NDR_IN) {
1124 ndr_print_struct(ndr, "in", "eventlog_GetOldestRecord");
1125 ndr->depth++;
1126 ndr_print_ptr(ndr, "handle", r->in.handle);
1127 ndr->depth++;
1128 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1129 ndr->depth--;
1130 ndr->depth--;
1132 if (flags & NDR_OUT) {
1133 ndr_print_struct(ndr, "out", "eventlog_GetOldestRecord");
1134 ndr->depth++;
1135 ndr_print_ptr(ndr, "oldest_entry", r->out.oldest_entry);
1136 ndr->depth++;
1137 ndr_print_uint32(ndr, "oldest_entry", *r->out.oldest_entry);
1138 ndr->depth--;
1139 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1140 ndr->depth--;
1142 ndr->depth--;
1145 static enum ndr_err_code ndr_push_eventlog_ChangeNotify(struct ndr_push *ndr, int flags, const struct eventlog_ChangeNotify *r)
1147 if (flags & NDR_IN) {
1149 if (flags & NDR_OUT) {
1150 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1152 return NDR_ERR_SUCCESS;
1155 static enum ndr_err_code ndr_pull_eventlog_ChangeNotify(struct ndr_pull *ndr, int flags, struct eventlog_ChangeNotify *r)
1157 if (flags & NDR_IN) {
1159 if (flags & NDR_OUT) {
1160 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1162 return NDR_ERR_SUCCESS;
1165 _PUBLIC_ void ndr_print_eventlog_ChangeNotify(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ChangeNotify *r)
1167 ndr_print_struct(ndr, name, "eventlog_ChangeNotify");
1168 ndr->depth++;
1169 if (flags & NDR_SET_VALUES) {
1170 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1172 if (flags & NDR_IN) {
1173 ndr_print_struct(ndr, "in", "eventlog_ChangeNotify");
1174 ndr->depth++;
1175 ndr->depth--;
1177 if (flags & NDR_OUT) {
1178 ndr_print_struct(ndr, "out", "eventlog_ChangeNotify");
1179 ndr->depth++;
1180 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1181 ndr->depth--;
1183 ndr->depth--;
1186 static enum ndr_err_code ndr_push_eventlog_OpenEventLogW(struct ndr_push *ndr, int flags, const struct eventlog_OpenEventLogW *r)
1188 if (flags & NDR_IN) {
1189 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown0));
1190 if (r->in.unknown0) {
1191 NDR_CHECK(ndr_push_eventlog_OpenUnknown0(ndr, NDR_SCALARS, r->in.unknown0));
1193 if (r->in.logname == NULL) {
1194 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1196 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logname));
1197 if (r->in.servername == NULL) {
1198 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1200 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.servername));
1201 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.major_version));
1202 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.minor_version));
1204 if (flags & NDR_OUT) {
1205 if (r->out.handle == NULL) {
1206 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1208 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
1209 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1211 return NDR_ERR_SUCCESS;
1214 static enum ndr_err_code ndr_pull_eventlog_OpenEventLogW(struct ndr_pull *ndr, int flags, struct eventlog_OpenEventLogW *r)
1216 uint32_t _ptr_unknown0;
1217 TALLOC_CTX *_mem_save_unknown0_0;
1218 TALLOC_CTX *_mem_save_logname_0;
1219 TALLOC_CTX *_mem_save_servername_0;
1220 TALLOC_CTX *_mem_save_handle_0;
1221 if (flags & NDR_IN) {
1222 ZERO_STRUCT(r->out);
1224 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown0));
1225 if (_ptr_unknown0) {
1226 NDR_PULL_ALLOC(ndr, r->in.unknown0);
1227 } else {
1228 r->in.unknown0 = NULL;
1230 if (r->in.unknown0) {
1231 _mem_save_unknown0_0 = NDR_PULL_GET_MEM_CTX(ndr);
1232 NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown0, 0);
1233 NDR_CHECK(ndr_pull_eventlog_OpenUnknown0(ndr, NDR_SCALARS, r->in.unknown0));
1234 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown0_0, 0);
1236 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1237 NDR_PULL_ALLOC(ndr, r->in.logname);
1239 _mem_save_logname_0 = NDR_PULL_GET_MEM_CTX(ndr);
1240 NDR_PULL_SET_MEM_CTX(ndr, r->in.logname, LIBNDR_FLAG_REF_ALLOC);
1241 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logname));
1242 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logname_0, LIBNDR_FLAG_REF_ALLOC);
1243 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1244 NDR_PULL_ALLOC(ndr, r->in.servername);
1246 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
1247 NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, LIBNDR_FLAG_REF_ALLOC);
1248 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.servername));
1249 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, LIBNDR_FLAG_REF_ALLOC);
1250 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.major_version));
1251 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.minor_version));
1252 NDR_PULL_ALLOC(ndr, r->out.handle);
1253 ZERO_STRUCTP(r->out.handle);
1255 if (flags & NDR_OUT) {
1256 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1257 NDR_PULL_ALLOC(ndr, r->out.handle);
1259 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1260 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
1261 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
1262 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1263 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1265 return NDR_ERR_SUCCESS;
1268 _PUBLIC_ void ndr_print_eventlog_OpenEventLogW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_OpenEventLogW *r)
1270 ndr_print_struct(ndr, name, "eventlog_OpenEventLogW");
1271 ndr->depth++;
1272 if (flags & NDR_SET_VALUES) {
1273 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1275 if (flags & NDR_IN) {
1276 ndr_print_struct(ndr, "in", "eventlog_OpenEventLogW");
1277 ndr->depth++;
1278 ndr_print_ptr(ndr, "unknown0", r->in.unknown0);
1279 ndr->depth++;
1280 if (r->in.unknown0) {
1281 ndr_print_eventlog_OpenUnknown0(ndr, "unknown0", r->in.unknown0);
1283 ndr->depth--;
1284 ndr_print_ptr(ndr, "logname", r->in.logname);
1285 ndr->depth++;
1286 ndr_print_lsa_String(ndr, "logname", r->in.logname);
1287 ndr->depth--;
1288 ndr_print_ptr(ndr, "servername", r->in.servername);
1289 ndr->depth++;
1290 ndr_print_lsa_String(ndr, "servername", r->in.servername);
1291 ndr->depth--;
1292 ndr_print_uint32(ndr, "major_version", r->in.major_version);
1293 ndr_print_uint32(ndr, "minor_version", r->in.minor_version);
1294 ndr->depth--;
1296 if (flags & NDR_OUT) {
1297 ndr_print_struct(ndr, "out", "eventlog_OpenEventLogW");
1298 ndr->depth++;
1299 ndr_print_ptr(ndr, "handle", r->out.handle);
1300 ndr->depth++;
1301 ndr_print_policy_handle(ndr, "handle", r->out.handle);
1302 ndr->depth--;
1303 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1304 ndr->depth--;
1306 ndr->depth--;
1309 static enum ndr_err_code ndr_push_eventlog_RegisterEventSourceW(struct ndr_push *ndr, int flags, const struct eventlog_RegisterEventSourceW *r)
1311 if (flags & NDR_IN) {
1312 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown0));
1313 if (r->in.unknown0) {
1314 NDR_CHECK(ndr_push_eventlog_OpenUnknown0(ndr, NDR_SCALARS, r->in.unknown0));
1316 if (r->in.module_name == NULL) {
1317 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1319 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.module_name));
1320 if (r->in.reg_module_name == NULL) {
1321 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1323 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.reg_module_name));
1324 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.major_version));
1325 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.minor_version));
1327 if (flags & NDR_OUT) {
1328 if (r->out.log_handle == NULL) {
1329 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1331 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.log_handle));
1332 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1334 return NDR_ERR_SUCCESS;
1337 static enum ndr_err_code ndr_pull_eventlog_RegisterEventSourceW(struct ndr_pull *ndr, int flags, struct eventlog_RegisterEventSourceW *r)
1339 uint32_t _ptr_unknown0;
1340 TALLOC_CTX *_mem_save_unknown0_0;
1341 TALLOC_CTX *_mem_save_module_name_0;
1342 TALLOC_CTX *_mem_save_reg_module_name_0;
1343 TALLOC_CTX *_mem_save_log_handle_0;
1344 if (flags & NDR_IN) {
1345 ZERO_STRUCT(r->out);
1347 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown0));
1348 if (_ptr_unknown0) {
1349 NDR_PULL_ALLOC(ndr, r->in.unknown0);
1350 } else {
1351 r->in.unknown0 = NULL;
1353 if (r->in.unknown0) {
1354 _mem_save_unknown0_0 = NDR_PULL_GET_MEM_CTX(ndr);
1355 NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown0, 0);
1356 NDR_CHECK(ndr_pull_eventlog_OpenUnknown0(ndr, NDR_SCALARS, r->in.unknown0));
1357 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown0_0, 0);
1359 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1360 NDR_PULL_ALLOC(ndr, r->in.module_name);
1362 _mem_save_module_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
1363 NDR_PULL_SET_MEM_CTX(ndr, r->in.module_name, LIBNDR_FLAG_REF_ALLOC);
1364 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.module_name));
1365 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_module_name_0, LIBNDR_FLAG_REF_ALLOC);
1366 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1367 NDR_PULL_ALLOC(ndr, r->in.reg_module_name);
1369 _mem_save_reg_module_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
1370 NDR_PULL_SET_MEM_CTX(ndr, r->in.reg_module_name, LIBNDR_FLAG_REF_ALLOC);
1371 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.reg_module_name));
1372 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_reg_module_name_0, LIBNDR_FLAG_REF_ALLOC);
1373 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.major_version));
1374 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.minor_version));
1375 NDR_PULL_ALLOC(ndr, r->out.log_handle);
1376 ZERO_STRUCTP(r->out.log_handle);
1378 if (flags & NDR_OUT) {
1379 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1380 NDR_PULL_ALLOC(ndr, r->out.log_handle);
1382 _mem_save_log_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1383 NDR_PULL_SET_MEM_CTX(ndr, r->out.log_handle, LIBNDR_FLAG_REF_ALLOC);
1384 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.log_handle));
1385 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_log_handle_0, LIBNDR_FLAG_REF_ALLOC);
1386 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1388 return NDR_ERR_SUCCESS;
1391 _PUBLIC_ void ndr_print_eventlog_RegisterEventSourceW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_RegisterEventSourceW *r)
1393 ndr_print_struct(ndr, name, "eventlog_RegisterEventSourceW");
1394 ndr->depth++;
1395 if (flags & NDR_SET_VALUES) {
1396 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1398 if (flags & NDR_IN) {
1399 ndr_print_struct(ndr, "in", "eventlog_RegisterEventSourceW");
1400 ndr->depth++;
1401 ndr_print_ptr(ndr, "unknown0", r->in.unknown0);
1402 ndr->depth++;
1403 if (r->in.unknown0) {
1404 ndr_print_eventlog_OpenUnknown0(ndr, "unknown0", r->in.unknown0);
1406 ndr->depth--;
1407 ndr_print_ptr(ndr, "module_name", r->in.module_name);
1408 ndr->depth++;
1409 ndr_print_lsa_String(ndr, "module_name", r->in.module_name);
1410 ndr->depth--;
1411 ndr_print_ptr(ndr, "reg_module_name", r->in.reg_module_name);
1412 ndr->depth++;
1413 ndr_print_lsa_String(ndr, "reg_module_name", r->in.reg_module_name);
1414 ndr->depth--;
1415 ndr_print_uint32(ndr, "major_version", r->in.major_version);
1416 ndr_print_uint32(ndr, "minor_version", r->in.minor_version);
1417 ndr->depth--;
1419 if (flags & NDR_OUT) {
1420 ndr_print_struct(ndr, "out", "eventlog_RegisterEventSourceW");
1421 ndr->depth++;
1422 ndr_print_ptr(ndr, "log_handle", r->out.log_handle);
1423 ndr->depth++;
1424 ndr_print_policy_handle(ndr, "log_handle", r->out.log_handle);
1425 ndr->depth--;
1426 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1427 ndr->depth--;
1429 ndr->depth--;
1432 static enum ndr_err_code ndr_push_eventlog_OpenBackupEventLogW(struct ndr_push *ndr, int flags, const struct eventlog_OpenBackupEventLogW *r)
1434 if (flags & NDR_IN) {
1435 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown0));
1436 if (r->in.unknown0) {
1437 NDR_CHECK(ndr_push_eventlog_OpenUnknown0(ndr, NDR_SCALARS, r->in.unknown0));
1439 if (r->in.backup_logname == NULL) {
1440 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1442 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.backup_logname));
1443 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.major_version));
1444 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.minor_version));
1446 if (flags & NDR_OUT) {
1447 if (r->out.handle == NULL) {
1448 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1450 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
1451 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1453 return NDR_ERR_SUCCESS;
1456 static enum ndr_err_code ndr_pull_eventlog_OpenBackupEventLogW(struct ndr_pull *ndr, int flags, struct eventlog_OpenBackupEventLogW *r)
1458 uint32_t _ptr_unknown0;
1459 TALLOC_CTX *_mem_save_unknown0_0;
1460 TALLOC_CTX *_mem_save_backup_logname_0;
1461 TALLOC_CTX *_mem_save_handle_0;
1462 if (flags & NDR_IN) {
1463 ZERO_STRUCT(r->out);
1465 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown0));
1466 if (_ptr_unknown0) {
1467 NDR_PULL_ALLOC(ndr, r->in.unknown0);
1468 } else {
1469 r->in.unknown0 = NULL;
1471 if (r->in.unknown0) {
1472 _mem_save_unknown0_0 = NDR_PULL_GET_MEM_CTX(ndr);
1473 NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown0, 0);
1474 NDR_CHECK(ndr_pull_eventlog_OpenUnknown0(ndr, NDR_SCALARS, r->in.unknown0));
1475 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown0_0, 0);
1477 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1478 NDR_PULL_ALLOC(ndr, r->in.backup_logname);
1480 _mem_save_backup_logname_0 = NDR_PULL_GET_MEM_CTX(ndr);
1481 NDR_PULL_SET_MEM_CTX(ndr, r->in.backup_logname, LIBNDR_FLAG_REF_ALLOC);
1482 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.backup_logname));
1483 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_backup_logname_0, LIBNDR_FLAG_REF_ALLOC);
1484 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.major_version));
1485 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.minor_version));
1486 NDR_PULL_ALLOC(ndr, r->out.handle);
1487 ZERO_STRUCTP(r->out.handle);
1489 if (flags & NDR_OUT) {
1490 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1491 NDR_PULL_ALLOC(ndr, r->out.handle);
1493 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1494 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
1495 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
1496 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1497 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1499 return NDR_ERR_SUCCESS;
1502 _PUBLIC_ void ndr_print_eventlog_OpenBackupEventLogW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_OpenBackupEventLogW *r)
1504 ndr_print_struct(ndr, name, "eventlog_OpenBackupEventLogW");
1505 ndr->depth++;
1506 if (flags & NDR_SET_VALUES) {
1507 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1509 if (flags & NDR_IN) {
1510 ndr_print_struct(ndr, "in", "eventlog_OpenBackupEventLogW");
1511 ndr->depth++;
1512 ndr_print_ptr(ndr, "unknown0", r->in.unknown0);
1513 ndr->depth++;
1514 if (r->in.unknown0) {
1515 ndr_print_eventlog_OpenUnknown0(ndr, "unknown0", r->in.unknown0);
1517 ndr->depth--;
1518 ndr_print_ptr(ndr, "backup_logname", r->in.backup_logname);
1519 ndr->depth++;
1520 ndr_print_lsa_String(ndr, "backup_logname", r->in.backup_logname);
1521 ndr->depth--;
1522 ndr_print_uint32(ndr, "major_version", r->in.major_version);
1523 ndr_print_uint32(ndr, "minor_version", r->in.minor_version);
1524 ndr->depth--;
1526 if (flags & NDR_OUT) {
1527 ndr_print_struct(ndr, "out", "eventlog_OpenBackupEventLogW");
1528 ndr->depth++;
1529 ndr_print_ptr(ndr, "handle", r->out.handle);
1530 ndr->depth++;
1531 ndr_print_policy_handle(ndr, "handle", r->out.handle);
1532 ndr->depth--;
1533 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1534 ndr->depth--;
1536 ndr->depth--;
1539 static enum ndr_err_code ndr_push_eventlog_ReadEventLogW(struct ndr_push *ndr, int flags, const struct eventlog_ReadEventLogW *r)
1541 if (flags & NDR_IN) {
1542 if (r->in.handle == NULL) {
1543 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1545 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1546 NDR_CHECK(ndr_push_eventlogReadFlags(ndr, NDR_SCALARS, r->in.flags));
1547 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offset));
1548 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.number_of_bytes));
1550 if (flags & NDR_OUT) {
1551 if (r->out.data == NULL) {
1552 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1554 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.number_of_bytes));
1555 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.data, r->in.number_of_bytes));
1556 if (r->out.sent_size == NULL) {
1557 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1559 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.sent_size));
1560 if (r->out.real_size == NULL) {
1561 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1563 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.real_size));
1564 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1566 return NDR_ERR_SUCCESS;
1569 static enum ndr_err_code ndr_pull_eventlog_ReadEventLogW(struct ndr_pull *ndr, int flags, struct eventlog_ReadEventLogW *r)
1571 TALLOC_CTX *_mem_save_handle_0;
1572 TALLOC_CTX *_mem_save_sent_size_0;
1573 TALLOC_CTX *_mem_save_real_size_0;
1574 if (flags & NDR_IN) {
1575 ZERO_STRUCT(r->out);
1577 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1578 NDR_PULL_ALLOC(ndr, r->in.handle);
1580 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1581 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1582 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1583 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1584 NDR_CHECK(ndr_pull_eventlogReadFlags(ndr, NDR_SCALARS, &r->in.flags));
1585 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offset));
1586 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.number_of_bytes));
1587 if (r->in.number_of_bytes > 0x7FFFF) {
1588 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1590 NDR_PULL_ALLOC_N(ndr, r->out.data, r->in.number_of_bytes);
1591 memset(r->out.data, 0, (r->in.number_of_bytes) * sizeof(*r->out.data));
1592 NDR_PULL_ALLOC(ndr, r->out.sent_size);
1593 ZERO_STRUCTP(r->out.sent_size);
1594 NDR_PULL_ALLOC(ndr, r->out.real_size);
1595 ZERO_STRUCTP(r->out.real_size);
1597 if (flags & NDR_OUT) {
1598 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.data));
1599 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1600 NDR_PULL_ALLOC_N(ndr, r->out.data, ndr_get_array_size(ndr, &r->out.data));
1602 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.data, ndr_get_array_size(ndr, &r->out.data)));
1603 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1604 NDR_PULL_ALLOC(ndr, r->out.sent_size);
1606 _mem_save_sent_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
1607 NDR_PULL_SET_MEM_CTX(ndr, r->out.sent_size, LIBNDR_FLAG_REF_ALLOC);
1608 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.sent_size));
1609 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sent_size_0, LIBNDR_FLAG_REF_ALLOC);
1610 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1611 NDR_PULL_ALLOC(ndr, r->out.real_size);
1613 _mem_save_real_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
1614 NDR_PULL_SET_MEM_CTX(ndr, r->out.real_size, LIBNDR_FLAG_REF_ALLOC);
1615 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.real_size));
1616 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_real_size_0, LIBNDR_FLAG_REF_ALLOC);
1617 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1618 if (r->out.data) {
1619 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.data, r->in.number_of_bytes));
1622 return NDR_ERR_SUCCESS;
1625 _PUBLIC_ void ndr_print_eventlog_ReadEventLogW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ReadEventLogW *r)
1627 ndr_print_struct(ndr, name, "eventlog_ReadEventLogW");
1628 ndr->depth++;
1629 if (flags & NDR_SET_VALUES) {
1630 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1632 if (flags & NDR_IN) {
1633 ndr_print_struct(ndr, "in", "eventlog_ReadEventLogW");
1634 ndr->depth++;
1635 ndr_print_ptr(ndr, "handle", r->in.handle);
1636 ndr->depth++;
1637 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1638 ndr->depth--;
1639 ndr_print_eventlogReadFlags(ndr, "flags", r->in.flags);
1640 ndr_print_uint32(ndr, "offset", r->in.offset);
1641 ndr_print_uint32(ndr, "number_of_bytes", r->in.number_of_bytes);
1642 ndr->depth--;
1644 if (flags & NDR_OUT) {
1645 ndr_print_struct(ndr, "out", "eventlog_ReadEventLogW");
1646 ndr->depth++;
1647 ndr_print_ptr(ndr, "data", r->out.data);
1648 ndr->depth++;
1649 ndr_print_array_uint8(ndr, "data", r->out.data, r->in.number_of_bytes);
1650 ndr->depth--;
1651 ndr_print_ptr(ndr, "sent_size", r->out.sent_size);
1652 ndr->depth++;
1653 ndr_print_uint32(ndr, "sent_size", *r->out.sent_size);
1654 ndr->depth--;
1655 ndr_print_ptr(ndr, "real_size", r->out.real_size);
1656 ndr->depth++;
1657 ndr_print_uint32(ndr, "real_size", *r->out.real_size);
1658 ndr->depth--;
1659 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1660 ndr->depth--;
1662 ndr->depth--;
1665 static enum ndr_err_code ndr_push_eventlog_ReportEventW(struct ndr_push *ndr, int flags, const struct eventlog_ReportEventW *r)
1667 uint32_t cntr_strings_1;
1668 if (flags & NDR_IN) {
1669 if (r->in.handle == NULL) {
1670 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1672 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1673 NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->in.timestamp));
1674 NDR_CHECK(ndr_push_eventlogEventTypes(ndr, NDR_SCALARS, r->in.event_type));
1675 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.event_category));
1676 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.event_id));
1677 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.num_of_strings));
1678 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.data_size));
1679 if (r->in.servername == NULL) {
1680 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1682 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.servername));
1683 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.user_sid));
1684 if (r->in.user_sid) {
1685 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->in.user_sid));
1687 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.strings));
1688 if (r->in.strings) {
1689 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_of_strings));
1690 for (cntr_strings_1 = 0; cntr_strings_1 < r->in.num_of_strings; cntr_strings_1++) {
1692 for (cntr_strings_1 = 0; cntr_strings_1 < r->in.num_of_strings; cntr_strings_1++) {
1693 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.strings[cntr_strings_1]));
1694 if (r->in.strings[cntr_strings_1]) {
1695 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.strings[cntr_strings_1]));
1699 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.data));
1700 if (r->in.data) {
1701 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.data_size));
1702 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.data, r->in.data_size));
1704 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.flags));
1705 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.record_number));
1706 if (r->in.record_number) {
1707 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.record_number));
1709 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.time_written));
1710 if (r->in.time_written) {
1711 NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, *r->in.time_written));
1714 if (flags & NDR_OUT) {
1715 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.record_number));
1716 if (r->out.record_number) {
1717 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.record_number));
1719 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.time_written));
1720 if (r->out.time_written) {
1721 NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, *r->out.time_written));
1723 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1725 return NDR_ERR_SUCCESS;
1728 static enum ndr_err_code ndr_pull_eventlog_ReportEventW(struct ndr_pull *ndr, int flags, struct eventlog_ReportEventW *r)
1730 uint32_t _ptr_user_sid;
1731 uint32_t _ptr_strings;
1732 uint32_t cntr_strings_1;
1733 uint32_t _ptr_data;
1734 uint32_t _ptr_record_number;
1735 uint32_t _ptr_time_written;
1736 TALLOC_CTX *_mem_save_handle_0;
1737 TALLOC_CTX *_mem_save_servername_0;
1738 TALLOC_CTX *_mem_save_user_sid_0;
1739 TALLOC_CTX *_mem_save_strings_0;
1740 TALLOC_CTX *_mem_save_strings_1;
1741 TALLOC_CTX *_mem_save_strings_2;
1742 TALLOC_CTX *_mem_save_data_0;
1743 TALLOC_CTX *_mem_save_record_number_0;
1744 TALLOC_CTX *_mem_save_time_written_0;
1745 if (flags & NDR_IN) {
1746 ZERO_STRUCT(r->out);
1748 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1749 NDR_PULL_ALLOC(ndr, r->in.handle);
1751 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1752 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1753 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1754 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1755 NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->in.timestamp));
1756 NDR_CHECK(ndr_pull_eventlogEventTypes(ndr, NDR_SCALARS, &r->in.event_type));
1757 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.event_category));
1758 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.event_id));
1759 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.num_of_strings));
1760 if (r->in.num_of_strings > 256) {
1761 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1763 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.data_size));
1764 if (r->in.data_size > 0x3FFFF) {
1765 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1767 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1768 NDR_PULL_ALLOC(ndr, r->in.servername);
1770 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
1771 NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, LIBNDR_FLAG_REF_ALLOC);
1772 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.servername));
1773 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, LIBNDR_FLAG_REF_ALLOC);
1774 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user_sid));
1775 if (_ptr_user_sid) {
1776 NDR_PULL_ALLOC(ndr, r->in.user_sid);
1777 } else {
1778 r->in.user_sid = NULL;
1780 if (r->in.user_sid) {
1781 _mem_save_user_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
1782 NDR_PULL_SET_MEM_CTX(ndr, r->in.user_sid, 0);
1783 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->in.user_sid));
1784 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_sid_0, 0);
1786 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_strings));
1787 if (_ptr_strings) {
1788 NDR_PULL_ALLOC(ndr, r->in.strings);
1789 } else {
1790 r->in.strings = NULL;
1792 if (r->in.strings) {
1793 _mem_save_strings_0 = NDR_PULL_GET_MEM_CTX(ndr);
1794 NDR_PULL_SET_MEM_CTX(ndr, r->in.strings, 0);
1795 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.strings));
1796 NDR_PULL_ALLOC_N(ndr, r->in.strings, ndr_get_array_size(ndr, &r->in.strings));
1797 _mem_save_strings_1 = NDR_PULL_GET_MEM_CTX(ndr);
1798 NDR_PULL_SET_MEM_CTX(ndr, r->in.strings, 0);
1799 for (cntr_strings_1 = 0; cntr_strings_1 < r->in.num_of_strings; cntr_strings_1++) {
1801 for (cntr_strings_1 = 0; cntr_strings_1 < r->in.num_of_strings; cntr_strings_1++) {
1802 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_strings));
1803 if (_ptr_strings) {
1804 NDR_PULL_ALLOC(ndr, r->in.strings[cntr_strings_1]);
1805 } else {
1806 r->in.strings[cntr_strings_1] = NULL;
1808 if (r->in.strings[cntr_strings_1]) {
1809 _mem_save_strings_2 = NDR_PULL_GET_MEM_CTX(ndr);
1810 NDR_PULL_SET_MEM_CTX(ndr, r->in.strings[cntr_strings_1], 0);
1811 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.strings[cntr_strings_1]));
1812 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_strings_2, 0);
1815 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_strings_1, 0);
1816 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_strings_0, 0);
1818 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
1819 if (_ptr_data) {
1820 NDR_PULL_ALLOC(ndr, r->in.data);
1821 } else {
1822 r->in.data = NULL;
1824 if (r->in.data) {
1825 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
1826 NDR_PULL_SET_MEM_CTX(ndr, r->in.data, 0);
1827 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.data));
1828 NDR_PULL_ALLOC_N(ndr, r->in.data, ndr_get_array_size(ndr, &r->in.data));
1829 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.data, ndr_get_array_size(ndr, &r->in.data)));
1830 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
1832 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.flags));
1833 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_record_number));
1834 if (_ptr_record_number) {
1835 NDR_PULL_ALLOC(ndr, r->in.record_number);
1836 } else {
1837 r->in.record_number = NULL;
1839 if (r->in.record_number) {
1840 _mem_save_record_number_0 = NDR_PULL_GET_MEM_CTX(ndr);
1841 NDR_PULL_SET_MEM_CTX(ndr, r->in.record_number, 0);
1842 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.record_number));
1843 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_record_number_0, 0);
1845 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_time_written));
1846 if (_ptr_time_written) {
1847 NDR_PULL_ALLOC(ndr, r->in.time_written);
1848 } else {
1849 r->in.time_written = NULL;
1851 if (r->in.time_written) {
1852 _mem_save_time_written_0 = NDR_PULL_GET_MEM_CTX(ndr);
1853 NDR_PULL_SET_MEM_CTX(ndr, r->in.time_written, 0);
1854 NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, r->in.time_written));
1855 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_time_written_0, 0);
1857 if (r->in.strings) {
1858 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.strings, r->in.num_of_strings));
1860 if (r->in.data) {
1861 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.data, r->in.data_size));
1864 if (flags & NDR_OUT) {
1865 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_record_number));
1866 if (_ptr_record_number) {
1867 NDR_PULL_ALLOC(ndr, r->out.record_number);
1868 } else {
1869 r->out.record_number = NULL;
1871 if (r->out.record_number) {
1872 _mem_save_record_number_0 = NDR_PULL_GET_MEM_CTX(ndr);
1873 NDR_PULL_SET_MEM_CTX(ndr, r->out.record_number, 0);
1874 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.record_number));
1875 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_record_number_0, 0);
1877 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_time_written));
1878 if (_ptr_time_written) {
1879 NDR_PULL_ALLOC(ndr, r->out.time_written);
1880 } else {
1881 r->out.time_written = NULL;
1883 if (r->out.time_written) {
1884 _mem_save_time_written_0 = NDR_PULL_GET_MEM_CTX(ndr);
1885 NDR_PULL_SET_MEM_CTX(ndr, r->out.time_written, 0);
1886 NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, r->out.time_written));
1887 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_time_written_0, 0);
1889 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1891 return NDR_ERR_SUCCESS;
1894 _PUBLIC_ void ndr_print_eventlog_ReportEventW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ReportEventW *r)
1896 uint32_t cntr_strings_1;
1897 ndr_print_struct(ndr, name, "eventlog_ReportEventW");
1898 ndr->depth++;
1899 if (flags & NDR_SET_VALUES) {
1900 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1902 if (flags & NDR_IN) {
1903 ndr_print_struct(ndr, "in", "eventlog_ReportEventW");
1904 ndr->depth++;
1905 ndr_print_ptr(ndr, "handle", r->in.handle);
1906 ndr->depth++;
1907 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1908 ndr->depth--;
1909 ndr_print_time_t(ndr, "timestamp", r->in.timestamp);
1910 ndr_print_eventlogEventTypes(ndr, "event_type", r->in.event_type);
1911 ndr_print_uint16(ndr, "event_category", r->in.event_category);
1912 ndr_print_uint32(ndr, "event_id", r->in.event_id);
1913 ndr_print_uint16(ndr, "num_of_strings", r->in.num_of_strings);
1914 ndr_print_uint32(ndr, "data_size", r->in.data_size);
1915 ndr_print_ptr(ndr, "servername", r->in.servername);
1916 ndr->depth++;
1917 ndr_print_lsa_String(ndr, "servername", r->in.servername);
1918 ndr->depth--;
1919 ndr_print_ptr(ndr, "user_sid", r->in.user_sid);
1920 ndr->depth++;
1921 if (r->in.user_sid) {
1922 ndr_print_dom_sid(ndr, "user_sid", r->in.user_sid);
1924 ndr->depth--;
1925 ndr_print_ptr(ndr, "strings", r->in.strings);
1926 ndr->depth++;
1927 if (r->in.strings) {
1928 ndr->print(ndr, "%s: ARRAY(%d)", "strings", (int)r->in.num_of_strings);
1929 ndr->depth++;
1930 for (cntr_strings_1=0;cntr_strings_1<r->in.num_of_strings;cntr_strings_1++) {
1931 char *idx_1=NULL;
1932 if (asprintf(&idx_1, "[%d]", cntr_strings_1) != -1) {
1933 ndr_print_ptr(ndr, "strings", r->in.strings[cntr_strings_1]);
1934 ndr->depth++;
1935 if (r->in.strings[cntr_strings_1]) {
1936 ndr_print_lsa_String(ndr, "strings", r->in.strings[cntr_strings_1]);
1938 ndr->depth--;
1939 free(idx_1);
1942 ndr->depth--;
1944 ndr->depth--;
1945 ndr_print_ptr(ndr, "data", r->in.data);
1946 ndr->depth++;
1947 if (r->in.data) {
1948 ndr_print_array_uint8(ndr, "data", r->in.data, r->in.data_size);
1950 ndr->depth--;
1951 ndr_print_uint16(ndr, "flags", r->in.flags);
1952 ndr_print_ptr(ndr, "record_number", r->in.record_number);
1953 ndr->depth++;
1954 if (r->in.record_number) {
1955 ndr_print_uint32(ndr, "record_number", *r->in.record_number);
1957 ndr->depth--;
1958 ndr_print_ptr(ndr, "time_written", r->in.time_written);
1959 ndr->depth++;
1960 if (r->in.time_written) {
1961 ndr_print_time_t(ndr, "time_written", *r->in.time_written);
1963 ndr->depth--;
1964 ndr->depth--;
1966 if (flags & NDR_OUT) {
1967 ndr_print_struct(ndr, "out", "eventlog_ReportEventW");
1968 ndr->depth++;
1969 ndr_print_ptr(ndr, "record_number", r->out.record_number);
1970 ndr->depth++;
1971 if (r->out.record_number) {
1972 ndr_print_uint32(ndr, "record_number", *r->out.record_number);
1974 ndr->depth--;
1975 ndr_print_ptr(ndr, "time_written", r->out.time_written);
1976 ndr->depth++;
1977 if (r->out.time_written) {
1978 ndr_print_time_t(ndr, "time_written", *r->out.time_written);
1980 ndr->depth--;
1981 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1982 ndr->depth--;
1984 ndr->depth--;
1987 static enum ndr_err_code ndr_push_eventlog_ClearEventLogA(struct ndr_push *ndr, int flags, const struct eventlog_ClearEventLogA *r)
1989 if (flags & NDR_IN) {
1991 if (flags & NDR_OUT) {
1992 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1994 return NDR_ERR_SUCCESS;
1997 static enum ndr_err_code ndr_pull_eventlog_ClearEventLogA(struct ndr_pull *ndr, int flags, struct eventlog_ClearEventLogA *r)
1999 if (flags & NDR_IN) {
2001 if (flags & NDR_OUT) {
2002 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2004 return NDR_ERR_SUCCESS;
2007 _PUBLIC_ void ndr_print_eventlog_ClearEventLogA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ClearEventLogA *r)
2009 ndr_print_struct(ndr, name, "eventlog_ClearEventLogA");
2010 ndr->depth++;
2011 if (flags & NDR_SET_VALUES) {
2012 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2014 if (flags & NDR_IN) {
2015 ndr_print_struct(ndr, "in", "eventlog_ClearEventLogA");
2016 ndr->depth++;
2017 ndr->depth--;
2019 if (flags & NDR_OUT) {
2020 ndr_print_struct(ndr, "out", "eventlog_ClearEventLogA");
2021 ndr->depth++;
2022 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2023 ndr->depth--;
2025 ndr->depth--;
2028 static enum ndr_err_code ndr_push_eventlog_BackupEventLogA(struct ndr_push *ndr, int flags, const struct eventlog_BackupEventLogA *r)
2030 if (flags & NDR_IN) {
2032 if (flags & NDR_OUT) {
2033 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2035 return NDR_ERR_SUCCESS;
2038 static enum ndr_err_code ndr_pull_eventlog_BackupEventLogA(struct ndr_pull *ndr, int flags, struct eventlog_BackupEventLogA *r)
2040 if (flags & NDR_IN) {
2042 if (flags & NDR_OUT) {
2043 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2045 return NDR_ERR_SUCCESS;
2048 _PUBLIC_ void ndr_print_eventlog_BackupEventLogA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_BackupEventLogA *r)
2050 ndr_print_struct(ndr, name, "eventlog_BackupEventLogA");
2051 ndr->depth++;
2052 if (flags & NDR_SET_VALUES) {
2053 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2055 if (flags & NDR_IN) {
2056 ndr_print_struct(ndr, "in", "eventlog_BackupEventLogA");
2057 ndr->depth++;
2058 ndr->depth--;
2060 if (flags & NDR_OUT) {
2061 ndr_print_struct(ndr, "out", "eventlog_BackupEventLogA");
2062 ndr->depth++;
2063 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2064 ndr->depth--;
2066 ndr->depth--;
2069 static enum ndr_err_code ndr_push_eventlog_OpenEventLogA(struct ndr_push *ndr, int flags, const struct eventlog_OpenEventLogA *r)
2071 if (flags & NDR_IN) {
2073 if (flags & NDR_OUT) {
2074 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2076 return NDR_ERR_SUCCESS;
2079 static enum ndr_err_code ndr_pull_eventlog_OpenEventLogA(struct ndr_pull *ndr, int flags, struct eventlog_OpenEventLogA *r)
2081 if (flags & NDR_IN) {
2083 if (flags & NDR_OUT) {
2084 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2086 return NDR_ERR_SUCCESS;
2089 _PUBLIC_ void ndr_print_eventlog_OpenEventLogA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_OpenEventLogA *r)
2091 ndr_print_struct(ndr, name, "eventlog_OpenEventLogA");
2092 ndr->depth++;
2093 if (flags & NDR_SET_VALUES) {
2094 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2096 if (flags & NDR_IN) {
2097 ndr_print_struct(ndr, "in", "eventlog_OpenEventLogA");
2098 ndr->depth++;
2099 ndr->depth--;
2101 if (flags & NDR_OUT) {
2102 ndr_print_struct(ndr, "out", "eventlog_OpenEventLogA");
2103 ndr->depth++;
2104 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2105 ndr->depth--;
2107 ndr->depth--;
2110 static enum ndr_err_code ndr_push_eventlog_RegisterEventSourceA(struct ndr_push *ndr, int flags, const struct eventlog_RegisterEventSourceA *r)
2112 if (flags & NDR_IN) {
2114 if (flags & NDR_OUT) {
2115 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2117 return NDR_ERR_SUCCESS;
2120 static enum ndr_err_code ndr_pull_eventlog_RegisterEventSourceA(struct ndr_pull *ndr, int flags, struct eventlog_RegisterEventSourceA *r)
2122 if (flags & NDR_IN) {
2124 if (flags & NDR_OUT) {
2125 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2127 return NDR_ERR_SUCCESS;
2130 _PUBLIC_ void ndr_print_eventlog_RegisterEventSourceA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_RegisterEventSourceA *r)
2132 ndr_print_struct(ndr, name, "eventlog_RegisterEventSourceA");
2133 ndr->depth++;
2134 if (flags & NDR_SET_VALUES) {
2135 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2137 if (flags & NDR_IN) {
2138 ndr_print_struct(ndr, "in", "eventlog_RegisterEventSourceA");
2139 ndr->depth++;
2140 ndr->depth--;
2142 if (flags & NDR_OUT) {
2143 ndr_print_struct(ndr, "out", "eventlog_RegisterEventSourceA");
2144 ndr->depth++;
2145 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2146 ndr->depth--;
2148 ndr->depth--;
2151 static enum ndr_err_code ndr_push_eventlog_OpenBackupEventLogA(struct ndr_push *ndr, int flags, const struct eventlog_OpenBackupEventLogA *r)
2153 if (flags & NDR_IN) {
2155 if (flags & NDR_OUT) {
2156 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2158 return NDR_ERR_SUCCESS;
2161 static enum ndr_err_code ndr_pull_eventlog_OpenBackupEventLogA(struct ndr_pull *ndr, int flags, struct eventlog_OpenBackupEventLogA *r)
2163 if (flags & NDR_IN) {
2165 if (flags & NDR_OUT) {
2166 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2168 return NDR_ERR_SUCCESS;
2171 _PUBLIC_ void ndr_print_eventlog_OpenBackupEventLogA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_OpenBackupEventLogA *r)
2173 ndr_print_struct(ndr, name, "eventlog_OpenBackupEventLogA");
2174 ndr->depth++;
2175 if (flags & NDR_SET_VALUES) {
2176 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2178 if (flags & NDR_IN) {
2179 ndr_print_struct(ndr, "in", "eventlog_OpenBackupEventLogA");
2180 ndr->depth++;
2181 ndr->depth--;
2183 if (flags & NDR_OUT) {
2184 ndr_print_struct(ndr, "out", "eventlog_OpenBackupEventLogA");
2185 ndr->depth++;
2186 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2187 ndr->depth--;
2189 ndr->depth--;
2192 static enum ndr_err_code ndr_push_eventlog_ReadEventLogA(struct ndr_push *ndr, int flags, const struct eventlog_ReadEventLogA *r)
2194 if (flags & NDR_IN) {
2196 if (flags & NDR_OUT) {
2197 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2199 return NDR_ERR_SUCCESS;
2202 static enum ndr_err_code ndr_pull_eventlog_ReadEventLogA(struct ndr_pull *ndr, int flags, struct eventlog_ReadEventLogA *r)
2204 if (flags & NDR_IN) {
2206 if (flags & NDR_OUT) {
2207 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2209 return NDR_ERR_SUCCESS;
2212 _PUBLIC_ void ndr_print_eventlog_ReadEventLogA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ReadEventLogA *r)
2214 ndr_print_struct(ndr, name, "eventlog_ReadEventLogA");
2215 ndr->depth++;
2216 if (flags & NDR_SET_VALUES) {
2217 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2219 if (flags & NDR_IN) {
2220 ndr_print_struct(ndr, "in", "eventlog_ReadEventLogA");
2221 ndr->depth++;
2222 ndr->depth--;
2224 if (flags & NDR_OUT) {
2225 ndr_print_struct(ndr, "out", "eventlog_ReadEventLogA");
2226 ndr->depth++;
2227 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2228 ndr->depth--;
2230 ndr->depth--;
2233 static enum ndr_err_code ndr_push_eventlog_ReportEventA(struct ndr_push *ndr, int flags, const struct eventlog_ReportEventA *r)
2235 if (flags & NDR_IN) {
2237 if (flags & NDR_OUT) {
2238 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2240 return NDR_ERR_SUCCESS;
2243 static enum ndr_err_code ndr_pull_eventlog_ReportEventA(struct ndr_pull *ndr, int flags, struct eventlog_ReportEventA *r)
2245 if (flags & NDR_IN) {
2247 if (flags & NDR_OUT) {
2248 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2250 return NDR_ERR_SUCCESS;
2253 _PUBLIC_ void ndr_print_eventlog_ReportEventA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ReportEventA *r)
2255 ndr_print_struct(ndr, name, "eventlog_ReportEventA");
2256 ndr->depth++;
2257 if (flags & NDR_SET_VALUES) {
2258 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2260 if (flags & NDR_IN) {
2261 ndr_print_struct(ndr, "in", "eventlog_ReportEventA");
2262 ndr->depth++;
2263 ndr->depth--;
2265 if (flags & NDR_OUT) {
2266 ndr_print_struct(ndr, "out", "eventlog_ReportEventA");
2267 ndr->depth++;
2268 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2269 ndr->depth--;
2271 ndr->depth--;
2274 static enum ndr_err_code ndr_push_eventlog_RegisterClusterSvc(struct ndr_push *ndr, int flags, const struct eventlog_RegisterClusterSvc *r)
2276 if (flags & NDR_IN) {
2278 if (flags & NDR_OUT) {
2279 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2281 return NDR_ERR_SUCCESS;
2284 static enum ndr_err_code ndr_pull_eventlog_RegisterClusterSvc(struct ndr_pull *ndr, int flags, struct eventlog_RegisterClusterSvc *r)
2286 if (flags & NDR_IN) {
2288 if (flags & NDR_OUT) {
2289 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2291 return NDR_ERR_SUCCESS;
2294 _PUBLIC_ void ndr_print_eventlog_RegisterClusterSvc(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_RegisterClusterSvc *r)
2296 ndr_print_struct(ndr, name, "eventlog_RegisterClusterSvc");
2297 ndr->depth++;
2298 if (flags & NDR_SET_VALUES) {
2299 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2301 if (flags & NDR_IN) {
2302 ndr_print_struct(ndr, "in", "eventlog_RegisterClusterSvc");
2303 ndr->depth++;
2304 ndr->depth--;
2306 if (flags & NDR_OUT) {
2307 ndr_print_struct(ndr, "out", "eventlog_RegisterClusterSvc");
2308 ndr->depth++;
2309 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2310 ndr->depth--;
2312 ndr->depth--;
2315 static enum ndr_err_code ndr_push_eventlog_DeregisterClusterSvc(struct ndr_push *ndr, int flags, const struct eventlog_DeregisterClusterSvc *r)
2317 if (flags & NDR_IN) {
2319 if (flags & NDR_OUT) {
2320 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2322 return NDR_ERR_SUCCESS;
2325 static enum ndr_err_code ndr_pull_eventlog_DeregisterClusterSvc(struct ndr_pull *ndr, int flags, struct eventlog_DeregisterClusterSvc *r)
2327 if (flags & NDR_IN) {
2329 if (flags & NDR_OUT) {
2330 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2332 return NDR_ERR_SUCCESS;
2335 _PUBLIC_ void ndr_print_eventlog_DeregisterClusterSvc(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_DeregisterClusterSvc *r)
2337 ndr_print_struct(ndr, name, "eventlog_DeregisterClusterSvc");
2338 ndr->depth++;
2339 if (flags & NDR_SET_VALUES) {
2340 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2342 if (flags & NDR_IN) {
2343 ndr_print_struct(ndr, "in", "eventlog_DeregisterClusterSvc");
2344 ndr->depth++;
2345 ndr->depth--;
2347 if (flags & NDR_OUT) {
2348 ndr_print_struct(ndr, "out", "eventlog_DeregisterClusterSvc");
2349 ndr->depth++;
2350 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2351 ndr->depth--;
2353 ndr->depth--;
2356 static enum ndr_err_code ndr_push_eventlog_WriteClusterEvents(struct ndr_push *ndr, int flags, const struct eventlog_WriteClusterEvents *r)
2358 if (flags & NDR_IN) {
2360 if (flags & NDR_OUT) {
2361 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2363 return NDR_ERR_SUCCESS;
2366 static enum ndr_err_code ndr_pull_eventlog_WriteClusterEvents(struct ndr_pull *ndr, int flags, struct eventlog_WriteClusterEvents *r)
2368 if (flags & NDR_IN) {
2370 if (flags & NDR_OUT) {
2371 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2373 return NDR_ERR_SUCCESS;
2376 _PUBLIC_ void ndr_print_eventlog_WriteClusterEvents(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_WriteClusterEvents *r)
2378 ndr_print_struct(ndr, name, "eventlog_WriteClusterEvents");
2379 ndr->depth++;
2380 if (flags & NDR_SET_VALUES) {
2381 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2383 if (flags & NDR_IN) {
2384 ndr_print_struct(ndr, "in", "eventlog_WriteClusterEvents");
2385 ndr->depth++;
2386 ndr->depth--;
2388 if (flags & NDR_OUT) {
2389 ndr_print_struct(ndr, "out", "eventlog_WriteClusterEvents");
2390 ndr->depth++;
2391 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2392 ndr->depth--;
2394 ndr->depth--;
2397 static enum ndr_err_code ndr_push_eventlog_GetLogInformation(struct ndr_push *ndr, int flags, const struct eventlog_GetLogInformation *r)
2399 if (flags & NDR_IN) {
2400 if (r->in.handle == NULL) {
2401 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2403 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2404 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
2405 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
2407 if (flags & NDR_OUT) {
2408 if (r->out.buffer == NULL) {
2409 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2411 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.buf_size));
2412 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.buffer, r->in.buf_size));
2413 if (r->out.bytes_needed == NULL) {
2414 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2416 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.bytes_needed));
2417 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2419 return NDR_ERR_SUCCESS;
2422 static enum ndr_err_code ndr_pull_eventlog_GetLogInformation(struct ndr_pull *ndr, int flags, struct eventlog_GetLogInformation *r)
2424 TALLOC_CTX *_mem_save_handle_0;
2425 TALLOC_CTX *_mem_save_bytes_needed_0;
2426 if (flags & NDR_IN) {
2427 ZERO_STRUCT(r->out);
2429 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2430 NDR_PULL_ALLOC(ndr, r->in.handle);
2432 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2433 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
2434 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2435 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
2436 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
2437 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.buf_size));
2438 if (r->in.buf_size > 1024) {
2439 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2441 NDR_PULL_ALLOC_N(ndr, r->out.buffer, r->in.buf_size);
2442 memset(r->out.buffer, 0, (r->in.buf_size) * sizeof(*r->out.buffer));
2443 NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
2444 ZERO_STRUCTP(r->out.bytes_needed);
2446 if (flags & NDR_OUT) {
2447 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.buffer));
2448 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2449 NDR_PULL_ALLOC_N(ndr, r->out.buffer, ndr_get_array_size(ndr, &r->out.buffer));
2451 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.buffer, ndr_get_array_size(ndr, &r->out.buffer)));
2452 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2453 NDR_PULL_ALLOC(ndr, r->out.bytes_needed);
2455 _mem_save_bytes_needed_0 = NDR_PULL_GET_MEM_CTX(ndr);
2456 NDR_PULL_SET_MEM_CTX(ndr, r->out.bytes_needed, LIBNDR_FLAG_REF_ALLOC);
2457 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.bytes_needed));
2458 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bytes_needed_0, LIBNDR_FLAG_REF_ALLOC);
2459 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2460 if (r->out.buffer) {
2461 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.buffer, r->in.buf_size));
2464 return NDR_ERR_SUCCESS;
2467 _PUBLIC_ void ndr_print_eventlog_GetLogInformation(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_GetLogInformation *r)
2469 ndr_print_struct(ndr, name, "eventlog_GetLogInformation");
2470 ndr->depth++;
2471 if (flags & NDR_SET_VALUES) {
2472 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2474 if (flags & NDR_IN) {
2475 ndr_print_struct(ndr, "in", "eventlog_GetLogInformation");
2476 ndr->depth++;
2477 ndr_print_ptr(ndr, "handle", r->in.handle);
2478 ndr->depth++;
2479 ndr_print_policy_handle(ndr, "handle", r->in.handle);
2480 ndr->depth--;
2481 ndr_print_uint32(ndr, "level", r->in.level);
2482 ndr_print_uint32(ndr, "buf_size", r->in.buf_size);
2483 ndr->depth--;
2485 if (flags & NDR_OUT) {
2486 ndr_print_struct(ndr, "out", "eventlog_GetLogInformation");
2487 ndr->depth++;
2488 ndr_print_ptr(ndr, "buffer", r->out.buffer);
2489 ndr->depth++;
2490 ndr_print_array_uint8(ndr, "buffer", r->out.buffer, r->in.buf_size);
2491 ndr->depth--;
2492 ndr_print_ptr(ndr, "bytes_needed", r->out.bytes_needed);
2493 ndr->depth++;
2494 ndr_print_uint32(ndr, "bytes_needed", *r->out.bytes_needed);
2495 ndr->depth--;
2496 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2497 ndr->depth--;
2499 ndr->depth--;
2502 static enum ndr_err_code ndr_push_eventlog_FlushEventLog(struct ndr_push *ndr, int flags, const struct eventlog_FlushEventLog *r)
2504 if (flags & NDR_IN) {
2505 if (r->in.handle == NULL) {
2506 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2508 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2510 if (flags & NDR_OUT) {
2511 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2513 return NDR_ERR_SUCCESS;
2516 static enum ndr_err_code ndr_pull_eventlog_FlushEventLog(struct ndr_pull *ndr, int flags, struct eventlog_FlushEventLog *r)
2518 TALLOC_CTX *_mem_save_handle_0;
2519 if (flags & NDR_IN) {
2520 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2521 NDR_PULL_ALLOC(ndr, r->in.handle);
2523 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2524 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
2525 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2526 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
2528 if (flags & NDR_OUT) {
2529 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2531 return NDR_ERR_SUCCESS;
2534 _PUBLIC_ void ndr_print_eventlog_FlushEventLog(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_FlushEventLog *r)
2536 ndr_print_struct(ndr, name, "eventlog_FlushEventLog");
2537 ndr->depth++;
2538 if (flags & NDR_SET_VALUES) {
2539 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2541 if (flags & NDR_IN) {
2542 ndr_print_struct(ndr, "in", "eventlog_FlushEventLog");
2543 ndr->depth++;
2544 ndr_print_ptr(ndr, "handle", r->in.handle);
2545 ndr->depth++;
2546 ndr_print_policy_handle(ndr, "handle", r->in.handle);
2547 ndr->depth--;
2548 ndr->depth--;
2550 if (flags & NDR_OUT) {
2551 ndr_print_struct(ndr, "out", "eventlog_FlushEventLog");
2552 ndr->depth++;
2553 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2554 ndr->depth--;
2556 ndr->depth--;
2559 static enum ndr_err_code ndr_push_eventlog_ReportEventAndSourceW(struct ndr_push *ndr, int flags, const struct eventlog_ReportEventAndSourceW *r)
2561 uint32_t cntr_strings_1;
2562 if (flags & NDR_IN) {
2563 if (r->in.handle == NULL) {
2564 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2566 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2567 NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, r->in.timestamp));
2568 NDR_CHECK(ndr_push_eventlogEventTypes(ndr, NDR_SCALARS, r->in.event_type));
2569 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.event_category));
2570 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.event_id));
2571 if (r->in.sourcename == NULL) {
2572 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2574 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sourcename));
2575 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.num_of_strings));
2576 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.data_size));
2577 if (r->in.servername == NULL) {
2578 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2580 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.servername));
2581 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.user_sid));
2582 if (r->in.user_sid) {
2583 NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, r->in.user_sid));
2585 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.strings));
2586 if (r->in.strings) {
2587 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.num_of_strings));
2588 for (cntr_strings_1 = 0; cntr_strings_1 < r->in.num_of_strings; cntr_strings_1++) {
2590 for (cntr_strings_1 = 0; cntr_strings_1 < r->in.num_of_strings; cntr_strings_1++) {
2591 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.strings[cntr_strings_1]));
2592 if (r->in.strings[cntr_strings_1]) {
2593 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.strings[cntr_strings_1]));
2597 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.data));
2598 if (r->in.data) {
2599 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.data_size));
2600 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.data, r->in.data_size));
2602 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->in.flags));
2603 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.record_number));
2604 if (r->in.record_number) {
2605 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.record_number));
2607 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.time_written));
2608 if (r->in.time_written) {
2609 NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, *r->in.time_written));
2612 if (flags & NDR_OUT) {
2613 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.record_number));
2614 if (r->out.record_number) {
2615 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.record_number));
2617 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.time_written));
2618 if (r->out.time_written) {
2619 NDR_CHECK(ndr_push_time_t(ndr, NDR_SCALARS, *r->out.time_written));
2621 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
2623 return NDR_ERR_SUCCESS;
2626 static enum ndr_err_code ndr_pull_eventlog_ReportEventAndSourceW(struct ndr_pull *ndr, int flags, struct eventlog_ReportEventAndSourceW *r)
2628 uint32_t _ptr_user_sid;
2629 uint32_t _ptr_strings;
2630 uint32_t cntr_strings_1;
2631 uint32_t _ptr_data;
2632 uint32_t _ptr_record_number;
2633 uint32_t _ptr_time_written;
2634 TALLOC_CTX *_mem_save_handle_0;
2635 TALLOC_CTX *_mem_save_sourcename_0;
2636 TALLOC_CTX *_mem_save_servername_0;
2637 TALLOC_CTX *_mem_save_user_sid_0;
2638 TALLOC_CTX *_mem_save_strings_0;
2639 TALLOC_CTX *_mem_save_strings_1;
2640 TALLOC_CTX *_mem_save_strings_2;
2641 TALLOC_CTX *_mem_save_data_0;
2642 TALLOC_CTX *_mem_save_record_number_0;
2643 TALLOC_CTX *_mem_save_time_written_0;
2644 if (flags & NDR_IN) {
2645 ZERO_STRUCT(r->out);
2647 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2648 NDR_PULL_ALLOC(ndr, r->in.handle);
2650 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2651 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
2652 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
2653 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
2654 NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, &r->in.timestamp));
2655 NDR_CHECK(ndr_pull_eventlogEventTypes(ndr, NDR_SCALARS, &r->in.event_type));
2656 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.event_category));
2657 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.event_id));
2658 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2659 NDR_PULL_ALLOC(ndr, r->in.sourcename);
2661 _mem_save_sourcename_0 = NDR_PULL_GET_MEM_CTX(ndr);
2662 NDR_PULL_SET_MEM_CTX(ndr, r->in.sourcename, LIBNDR_FLAG_REF_ALLOC);
2663 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sourcename));
2664 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sourcename_0, LIBNDR_FLAG_REF_ALLOC);
2665 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.num_of_strings));
2666 if (r->in.num_of_strings > 256) {
2667 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2669 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.data_size));
2670 if (r->in.data_size > 0x3FFFF) {
2671 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2673 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2674 NDR_PULL_ALLOC(ndr, r->in.servername);
2676 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
2677 NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, LIBNDR_FLAG_REF_ALLOC);
2678 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.servername));
2679 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, LIBNDR_FLAG_REF_ALLOC);
2680 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user_sid));
2681 if (_ptr_user_sid) {
2682 NDR_PULL_ALLOC(ndr, r->in.user_sid);
2683 } else {
2684 r->in.user_sid = NULL;
2686 if (r->in.user_sid) {
2687 _mem_save_user_sid_0 = NDR_PULL_GET_MEM_CTX(ndr);
2688 NDR_PULL_SET_MEM_CTX(ndr, r->in.user_sid, 0);
2689 NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, r->in.user_sid));
2690 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_sid_0, 0);
2692 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_strings));
2693 if (_ptr_strings) {
2694 NDR_PULL_ALLOC(ndr, r->in.strings);
2695 } else {
2696 r->in.strings = NULL;
2698 if (r->in.strings) {
2699 _mem_save_strings_0 = NDR_PULL_GET_MEM_CTX(ndr);
2700 NDR_PULL_SET_MEM_CTX(ndr, r->in.strings, 0);
2701 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.strings));
2702 NDR_PULL_ALLOC_N(ndr, r->in.strings, ndr_get_array_size(ndr, &r->in.strings));
2703 _mem_save_strings_1 = NDR_PULL_GET_MEM_CTX(ndr);
2704 NDR_PULL_SET_MEM_CTX(ndr, r->in.strings, 0);
2705 for (cntr_strings_1 = 0; cntr_strings_1 < r->in.num_of_strings; cntr_strings_1++) {
2707 for (cntr_strings_1 = 0; cntr_strings_1 < r->in.num_of_strings; cntr_strings_1++) {
2708 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_strings));
2709 if (_ptr_strings) {
2710 NDR_PULL_ALLOC(ndr, r->in.strings[cntr_strings_1]);
2711 } else {
2712 r->in.strings[cntr_strings_1] = NULL;
2714 if (r->in.strings[cntr_strings_1]) {
2715 _mem_save_strings_2 = NDR_PULL_GET_MEM_CTX(ndr);
2716 NDR_PULL_SET_MEM_CTX(ndr, r->in.strings[cntr_strings_1], 0);
2717 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.strings[cntr_strings_1]));
2718 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_strings_2, 0);
2721 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_strings_1, 0);
2722 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_strings_0, 0);
2724 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data));
2725 if (_ptr_data) {
2726 NDR_PULL_ALLOC(ndr, r->in.data);
2727 } else {
2728 r->in.data = NULL;
2730 if (r->in.data) {
2731 _mem_save_data_0 = NDR_PULL_GET_MEM_CTX(ndr);
2732 NDR_PULL_SET_MEM_CTX(ndr, r->in.data, 0);
2733 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.data));
2734 NDR_PULL_ALLOC_N(ndr, r->in.data, ndr_get_array_size(ndr, &r->in.data));
2735 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.data, ndr_get_array_size(ndr, &r->in.data)));
2736 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_0, 0);
2738 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->in.flags));
2739 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_record_number));
2740 if (_ptr_record_number) {
2741 NDR_PULL_ALLOC(ndr, r->in.record_number);
2742 } else {
2743 r->in.record_number = NULL;
2745 if (r->in.record_number) {
2746 _mem_save_record_number_0 = NDR_PULL_GET_MEM_CTX(ndr);
2747 NDR_PULL_SET_MEM_CTX(ndr, r->in.record_number, 0);
2748 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.record_number));
2749 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_record_number_0, 0);
2751 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_time_written));
2752 if (_ptr_time_written) {
2753 NDR_PULL_ALLOC(ndr, r->in.time_written);
2754 } else {
2755 r->in.time_written = NULL;
2757 if (r->in.time_written) {
2758 _mem_save_time_written_0 = NDR_PULL_GET_MEM_CTX(ndr);
2759 NDR_PULL_SET_MEM_CTX(ndr, r->in.time_written, 0);
2760 NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, r->in.time_written));
2761 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_time_written_0, 0);
2763 if (r->in.strings) {
2764 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.strings, r->in.num_of_strings));
2766 if (r->in.data) {
2767 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.data, r->in.data_size));
2770 if (flags & NDR_OUT) {
2771 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_record_number));
2772 if (_ptr_record_number) {
2773 NDR_PULL_ALLOC(ndr, r->out.record_number);
2774 } else {
2775 r->out.record_number = NULL;
2777 if (r->out.record_number) {
2778 _mem_save_record_number_0 = NDR_PULL_GET_MEM_CTX(ndr);
2779 NDR_PULL_SET_MEM_CTX(ndr, r->out.record_number, 0);
2780 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.record_number));
2781 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_record_number_0, 0);
2783 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_time_written));
2784 if (_ptr_time_written) {
2785 NDR_PULL_ALLOC(ndr, r->out.time_written);
2786 } else {
2787 r->out.time_written = NULL;
2789 if (r->out.time_written) {
2790 _mem_save_time_written_0 = NDR_PULL_GET_MEM_CTX(ndr);
2791 NDR_PULL_SET_MEM_CTX(ndr, r->out.time_written, 0);
2792 NDR_CHECK(ndr_pull_time_t(ndr, NDR_SCALARS, r->out.time_written));
2793 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_time_written_0, 0);
2795 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
2797 return NDR_ERR_SUCCESS;
2800 _PUBLIC_ void ndr_print_eventlog_ReportEventAndSourceW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ReportEventAndSourceW *r)
2802 uint32_t cntr_strings_1;
2803 ndr_print_struct(ndr, name, "eventlog_ReportEventAndSourceW");
2804 ndr->depth++;
2805 if (flags & NDR_SET_VALUES) {
2806 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2808 if (flags & NDR_IN) {
2809 ndr_print_struct(ndr, "in", "eventlog_ReportEventAndSourceW");
2810 ndr->depth++;
2811 ndr_print_ptr(ndr, "handle", r->in.handle);
2812 ndr->depth++;
2813 ndr_print_policy_handle(ndr, "handle", r->in.handle);
2814 ndr->depth--;
2815 ndr_print_time_t(ndr, "timestamp", r->in.timestamp);
2816 ndr_print_eventlogEventTypes(ndr, "event_type", r->in.event_type);
2817 ndr_print_uint16(ndr, "event_category", r->in.event_category);
2818 ndr_print_uint32(ndr, "event_id", r->in.event_id);
2819 ndr_print_ptr(ndr, "sourcename", r->in.sourcename);
2820 ndr->depth++;
2821 ndr_print_lsa_String(ndr, "sourcename", r->in.sourcename);
2822 ndr->depth--;
2823 ndr_print_uint16(ndr, "num_of_strings", r->in.num_of_strings);
2824 ndr_print_uint32(ndr, "data_size", r->in.data_size);
2825 ndr_print_ptr(ndr, "servername", r->in.servername);
2826 ndr->depth++;
2827 ndr_print_lsa_String(ndr, "servername", r->in.servername);
2828 ndr->depth--;
2829 ndr_print_ptr(ndr, "user_sid", r->in.user_sid);
2830 ndr->depth++;
2831 if (r->in.user_sid) {
2832 ndr_print_dom_sid(ndr, "user_sid", r->in.user_sid);
2834 ndr->depth--;
2835 ndr_print_ptr(ndr, "strings", r->in.strings);
2836 ndr->depth++;
2837 if (r->in.strings) {
2838 ndr->print(ndr, "%s: ARRAY(%d)", "strings", (int)r->in.num_of_strings);
2839 ndr->depth++;
2840 for (cntr_strings_1=0;cntr_strings_1<r->in.num_of_strings;cntr_strings_1++) {
2841 char *idx_1=NULL;
2842 if (asprintf(&idx_1, "[%d]", cntr_strings_1) != -1) {
2843 ndr_print_ptr(ndr, "strings", r->in.strings[cntr_strings_1]);
2844 ndr->depth++;
2845 if (r->in.strings[cntr_strings_1]) {
2846 ndr_print_lsa_String(ndr, "strings", r->in.strings[cntr_strings_1]);
2848 ndr->depth--;
2849 free(idx_1);
2852 ndr->depth--;
2854 ndr->depth--;
2855 ndr_print_ptr(ndr, "data", r->in.data);
2856 ndr->depth++;
2857 if (r->in.data) {
2858 ndr_print_array_uint8(ndr, "data", r->in.data, r->in.data_size);
2860 ndr->depth--;
2861 ndr_print_uint16(ndr, "flags", r->in.flags);
2862 ndr_print_ptr(ndr, "record_number", r->in.record_number);
2863 ndr->depth++;
2864 if (r->in.record_number) {
2865 ndr_print_uint32(ndr, "record_number", *r->in.record_number);
2867 ndr->depth--;
2868 ndr_print_ptr(ndr, "time_written", r->in.time_written);
2869 ndr->depth++;
2870 if (r->in.time_written) {
2871 ndr_print_time_t(ndr, "time_written", *r->in.time_written);
2873 ndr->depth--;
2874 ndr->depth--;
2876 if (flags & NDR_OUT) {
2877 ndr_print_struct(ndr, "out", "eventlog_ReportEventAndSourceW");
2878 ndr->depth++;
2879 ndr_print_ptr(ndr, "record_number", r->out.record_number);
2880 ndr->depth++;
2881 if (r->out.record_number) {
2882 ndr_print_uint32(ndr, "record_number", *r->out.record_number);
2884 ndr->depth--;
2885 ndr_print_ptr(ndr, "time_written", r->out.time_written);
2886 ndr->depth++;
2887 if (r->out.time_written) {
2888 ndr_print_time_t(ndr, "time_written", *r->out.time_written);
2890 ndr->depth--;
2891 ndr_print_NTSTATUS(ndr, "result", r->out.result);
2892 ndr->depth--;
2894 ndr->depth--;
2897 static const struct ndr_interface_call eventlog_calls[] = {
2899 "eventlog_ClearEventLogW",
2900 sizeof(struct eventlog_ClearEventLogW),
2901 (ndr_push_flags_fn_t) ndr_push_eventlog_ClearEventLogW,
2902 (ndr_pull_flags_fn_t) ndr_pull_eventlog_ClearEventLogW,
2903 (ndr_print_function_t) ndr_print_eventlog_ClearEventLogW,
2904 false,
2907 "eventlog_BackupEventLogW",
2908 sizeof(struct eventlog_BackupEventLogW),
2909 (ndr_push_flags_fn_t) ndr_push_eventlog_BackupEventLogW,
2910 (ndr_pull_flags_fn_t) ndr_pull_eventlog_BackupEventLogW,
2911 (ndr_print_function_t) ndr_print_eventlog_BackupEventLogW,
2912 false,
2915 "eventlog_CloseEventLog",
2916 sizeof(struct eventlog_CloseEventLog),
2917 (ndr_push_flags_fn_t) ndr_push_eventlog_CloseEventLog,
2918 (ndr_pull_flags_fn_t) ndr_pull_eventlog_CloseEventLog,
2919 (ndr_print_function_t) ndr_print_eventlog_CloseEventLog,
2920 false,
2923 "eventlog_DeregisterEventSource",
2924 sizeof(struct eventlog_DeregisterEventSource),
2925 (ndr_push_flags_fn_t) ndr_push_eventlog_DeregisterEventSource,
2926 (ndr_pull_flags_fn_t) ndr_pull_eventlog_DeregisterEventSource,
2927 (ndr_print_function_t) ndr_print_eventlog_DeregisterEventSource,
2928 false,
2931 "eventlog_GetNumRecords",
2932 sizeof(struct eventlog_GetNumRecords),
2933 (ndr_push_flags_fn_t) ndr_push_eventlog_GetNumRecords,
2934 (ndr_pull_flags_fn_t) ndr_pull_eventlog_GetNumRecords,
2935 (ndr_print_function_t) ndr_print_eventlog_GetNumRecords,
2936 false,
2939 "eventlog_GetOldestRecord",
2940 sizeof(struct eventlog_GetOldestRecord),
2941 (ndr_push_flags_fn_t) ndr_push_eventlog_GetOldestRecord,
2942 (ndr_pull_flags_fn_t) ndr_pull_eventlog_GetOldestRecord,
2943 (ndr_print_function_t) ndr_print_eventlog_GetOldestRecord,
2944 false,
2947 "eventlog_ChangeNotify",
2948 sizeof(struct eventlog_ChangeNotify),
2949 (ndr_push_flags_fn_t) ndr_push_eventlog_ChangeNotify,
2950 (ndr_pull_flags_fn_t) ndr_pull_eventlog_ChangeNotify,
2951 (ndr_print_function_t) ndr_print_eventlog_ChangeNotify,
2952 false,
2955 "eventlog_OpenEventLogW",
2956 sizeof(struct eventlog_OpenEventLogW),
2957 (ndr_push_flags_fn_t) ndr_push_eventlog_OpenEventLogW,
2958 (ndr_pull_flags_fn_t) ndr_pull_eventlog_OpenEventLogW,
2959 (ndr_print_function_t) ndr_print_eventlog_OpenEventLogW,
2960 false,
2963 "eventlog_RegisterEventSourceW",
2964 sizeof(struct eventlog_RegisterEventSourceW),
2965 (ndr_push_flags_fn_t) ndr_push_eventlog_RegisterEventSourceW,
2966 (ndr_pull_flags_fn_t) ndr_pull_eventlog_RegisterEventSourceW,
2967 (ndr_print_function_t) ndr_print_eventlog_RegisterEventSourceW,
2968 false,
2971 "eventlog_OpenBackupEventLogW",
2972 sizeof(struct eventlog_OpenBackupEventLogW),
2973 (ndr_push_flags_fn_t) ndr_push_eventlog_OpenBackupEventLogW,
2974 (ndr_pull_flags_fn_t) ndr_pull_eventlog_OpenBackupEventLogW,
2975 (ndr_print_function_t) ndr_print_eventlog_OpenBackupEventLogW,
2976 false,
2979 "eventlog_ReadEventLogW",
2980 sizeof(struct eventlog_ReadEventLogW),
2981 (ndr_push_flags_fn_t) ndr_push_eventlog_ReadEventLogW,
2982 (ndr_pull_flags_fn_t) ndr_pull_eventlog_ReadEventLogW,
2983 (ndr_print_function_t) ndr_print_eventlog_ReadEventLogW,
2984 false,
2987 "eventlog_ReportEventW",
2988 sizeof(struct eventlog_ReportEventW),
2989 (ndr_push_flags_fn_t) ndr_push_eventlog_ReportEventW,
2990 (ndr_pull_flags_fn_t) ndr_pull_eventlog_ReportEventW,
2991 (ndr_print_function_t) ndr_print_eventlog_ReportEventW,
2992 false,
2995 "eventlog_ClearEventLogA",
2996 sizeof(struct eventlog_ClearEventLogA),
2997 (ndr_push_flags_fn_t) ndr_push_eventlog_ClearEventLogA,
2998 (ndr_pull_flags_fn_t) ndr_pull_eventlog_ClearEventLogA,
2999 (ndr_print_function_t) ndr_print_eventlog_ClearEventLogA,
3000 false,
3003 "eventlog_BackupEventLogA",
3004 sizeof(struct eventlog_BackupEventLogA),
3005 (ndr_push_flags_fn_t) ndr_push_eventlog_BackupEventLogA,
3006 (ndr_pull_flags_fn_t) ndr_pull_eventlog_BackupEventLogA,
3007 (ndr_print_function_t) ndr_print_eventlog_BackupEventLogA,
3008 false,
3011 "eventlog_OpenEventLogA",
3012 sizeof(struct eventlog_OpenEventLogA),
3013 (ndr_push_flags_fn_t) ndr_push_eventlog_OpenEventLogA,
3014 (ndr_pull_flags_fn_t) ndr_pull_eventlog_OpenEventLogA,
3015 (ndr_print_function_t) ndr_print_eventlog_OpenEventLogA,
3016 false,
3019 "eventlog_RegisterEventSourceA",
3020 sizeof(struct eventlog_RegisterEventSourceA),
3021 (ndr_push_flags_fn_t) ndr_push_eventlog_RegisterEventSourceA,
3022 (ndr_pull_flags_fn_t) ndr_pull_eventlog_RegisterEventSourceA,
3023 (ndr_print_function_t) ndr_print_eventlog_RegisterEventSourceA,
3024 false,
3027 "eventlog_OpenBackupEventLogA",
3028 sizeof(struct eventlog_OpenBackupEventLogA),
3029 (ndr_push_flags_fn_t) ndr_push_eventlog_OpenBackupEventLogA,
3030 (ndr_pull_flags_fn_t) ndr_pull_eventlog_OpenBackupEventLogA,
3031 (ndr_print_function_t) ndr_print_eventlog_OpenBackupEventLogA,
3032 false,
3035 "eventlog_ReadEventLogA",
3036 sizeof(struct eventlog_ReadEventLogA),
3037 (ndr_push_flags_fn_t) ndr_push_eventlog_ReadEventLogA,
3038 (ndr_pull_flags_fn_t) ndr_pull_eventlog_ReadEventLogA,
3039 (ndr_print_function_t) ndr_print_eventlog_ReadEventLogA,
3040 false,
3043 "eventlog_ReportEventA",
3044 sizeof(struct eventlog_ReportEventA),
3045 (ndr_push_flags_fn_t) ndr_push_eventlog_ReportEventA,
3046 (ndr_pull_flags_fn_t) ndr_pull_eventlog_ReportEventA,
3047 (ndr_print_function_t) ndr_print_eventlog_ReportEventA,
3048 false,
3051 "eventlog_RegisterClusterSvc",
3052 sizeof(struct eventlog_RegisterClusterSvc),
3053 (ndr_push_flags_fn_t) ndr_push_eventlog_RegisterClusterSvc,
3054 (ndr_pull_flags_fn_t) ndr_pull_eventlog_RegisterClusterSvc,
3055 (ndr_print_function_t) ndr_print_eventlog_RegisterClusterSvc,
3056 false,
3059 "eventlog_DeregisterClusterSvc",
3060 sizeof(struct eventlog_DeregisterClusterSvc),
3061 (ndr_push_flags_fn_t) ndr_push_eventlog_DeregisterClusterSvc,
3062 (ndr_pull_flags_fn_t) ndr_pull_eventlog_DeregisterClusterSvc,
3063 (ndr_print_function_t) ndr_print_eventlog_DeregisterClusterSvc,
3064 false,
3067 "eventlog_WriteClusterEvents",
3068 sizeof(struct eventlog_WriteClusterEvents),
3069 (ndr_push_flags_fn_t) ndr_push_eventlog_WriteClusterEvents,
3070 (ndr_pull_flags_fn_t) ndr_pull_eventlog_WriteClusterEvents,
3071 (ndr_print_function_t) ndr_print_eventlog_WriteClusterEvents,
3072 false,
3075 "eventlog_GetLogInformation",
3076 sizeof(struct eventlog_GetLogInformation),
3077 (ndr_push_flags_fn_t) ndr_push_eventlog_GetLogInformation,
3078 (ndr_pull_flags_fn_t) ndr_pull_eventlog_GetLogInformation,
3079 (ndr_print_function_t) ndr_print_eventlog_GetLogInformation,
3080 false,
3083 "eventlog_FlushEventLog",
3084 sizeof(struct eventlog_FlushEventLog),
3085 (ndr_push_flags_fn_t) ndr_push_eventlog_FlushEventLog,
3086 (ndr_pull_flags_fn_t) ndr_pull_eventlog_FlushEventLog,
3087 (ndr_print_function_t) ndr_print_eventlog_FlushEventLog,
3088 false,
3091 "eventlog_ReportEventAndSourceW",
3092 sizeof(struct eventlog_ReportEventAndSourceW),
3093 (ndr_push_flags_fn_t) ndr_push_eventlog_ReportEventAndSourceW,
3094 (ndr_pull_flags_fn_t) ndr_pull_eventlog_ReportEventAndSourceW,
3095 (ndr_print_function_t) ndr_print_eventlog_ReportEventAndSourceW,
3096 false,
3098 { NULL, 0, NULL, NULL, NULL, false }
3101 static const char * const eventlog_endpoint_strings[] = {
3102 "ncacn_np:[\\pipe\\eventlog]",
3105 static const struct ndr_interface_string_array eventlog_endpoints = {
3106 .count = 1,
3107 .names = eventlog_endpoint_strings
3110 static const char * const eventlog_authservice_strings[] = {
3111 "host",
3114 static const struct ndr_interface_string_array eventlog_authservices = {
3115 .count = 1,
3116 .names = eventlog_authservice_strings
3120 const struct ndr_interface_table ndr_table_eventlog = {
3121 .name = "eventlog",
3122 .syntax_id = {
3123 {0x82273fdc,0xe32a,0x18c3,{0x3f,0x78},{0x82,0x79,0x29,0xdc,0x23,0xea}},
3124 NDR_EVENTLOG_VERSION
3126 .helpstring = NDR_EVENTLOG_HELPSTRING,
3127 .num_calls = 25,
3128 .calls = eventlog_calls,
3129 .endpoints = &eventlog_endpoints,
3130 .authservices = &eventlog_authservices