12fa9fcec485e5f9a410d9fe6e24985a4a20ffca
[sfrench/samba-autobuild/.git] / librpc / gen_ndr / ndr_eventlog.c
1 /* parser auto-generated by pidl */
2
3 #include "includes.h"
4 #include "librpc/gen_ndr/ndr_eventlog.h"
5
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)
9 {
10         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
11         return NDR_ERR_SUCCESS;
12 }
13
14 static enum ndr_err_code ndr_pull_eventlogReadFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
15 {
16         uint32_t v;
17         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
18         *r = v;
19         return NDR_ERR_SUCCESS;
20 }
21
22 _PUBLIC_ void ndr_print_eventlogReadFlags(struct ndr_print *ndr, const char *name, uint32_t r)
23 {
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--;
31 }
32
33 static enum ndr_err_code ndr_push_eventlog_OpenUnknown0(struct ndr_push *ndr, int ndr_flags, const struct eventlog_OpenUnknown0 *r)
34 {
35         if (ndr_flags & NDR_SCALARS) {
36                 NDR_CHECK(ndr_push_align(ndr, 2));
37                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->unknown0));
38                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->unknown1));
39         }
40         if (ndr_flags & NDR_BUFFERS) {
41         }
42         return NDR_ERR_SUCCESS;
43 }
44
45 static enum ndr_err_code ndr_pull_eventlog_OpenUnknown0(struct ndr_pull *ndr, int ndr_flags, struct eventlog_OpenUnknown0 *r)
46 {
47         if (ndr_flags & NDR_SCALARS) {
48                 NDR_CHECK(ndr_pull_align(ndr, 2));
49                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->unknown0));
50                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->unknown1));
51         }
52         if (ndr_flags & NDR_BUFFERS) {
53         }
54         return NDR_ERR_SUCCESS;
55 }
56
57 _PUBLIC_ void ndr_print_eventlog_OpenUnknown0(struct ndr_print *ndr, const char *name, const struct eventlog_OpenUnknown0 *r)
58 {
59         ndr_print_struct(ndr, name, "eventlog_OpenUnknown0");
60         ndr->depth++;
61         ndr_print_uint16(ndr, "unknown0", r->unknown0);
62         ndr_print_uint16(ndr, "unknown1", r->unknown1);
63         ndr->depth--;
64 }
65
66 _PUBLIC_ enum ndr_err_code ndr_push_eventlog_Record(struct ndr_push *ndr, int ndr_flags, const struct eventlog_Record *r)
67 {
68         uint32_t cntr_strings_0;
69         if (ndr_flags & NDR_SCALARS) {
70                 NDR_CHECK(ndr_push_align(ndr, 4));
71                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->size));
72                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
73                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->record_number));
74                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time_generated));
75                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time_written));
76                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->event_id));
77                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->event_type));
78                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_of_strings));
79                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->event_category));
80                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->reserved_flags));
81                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->closing_record_number));
82                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->stringoffset));
83                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid_length));
84                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sid_offset));
85                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->data_length));
86                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->data_offset));
87                 {
88                         uint32_t _flags_save_string = ndr->flags;
89                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
90                         NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->source_name));
91                         ndr->flags = _flags_save_string;
92                 }
93                 {
94                         uint32_t _flags_save_string = ndr->flags;
95                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
96                         NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->computer_name));
97                         ndr->flags = _flags_save_string;
98                 }
99                 {
100                         uint32_t _flags_save_string = ndr->flags;
101                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
102                         for (cntr_strings_0 = 0; cntr_strings_0 < r->num_of_strings; cntr_strings_0++) {
103                                 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->strings[cntr_strings_0]));
104                         }
105                         ndr->flags = _flags_save_string;
106                 }
107                 {
108                         uint32_t _flags_save_string = ndr->flags;
109                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
110                         NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->raw_data));
111                         ndr->flags = _flags_save_string;
112                 }
113         }
114         if (ndr_flags & NDR_BUFFERS) {
115         }
116         return NDR_ERR_SUCCESS;
117 }
118
119 _PUBLIC_ enum ndr_err_code ndr_pull_eventlog_Record(struct ndr_pull *ndr, int ndr_flags, struct eventlog_Record *r)
120 {
121         uint32_t cntr_strings_0;
122         TALLOC_CTX *_mem_save_strings_0;
123         if (ndr_flags & NDR_SCALARS) {
124                 NDR_CHECK(ndr_pull_align(ndr, 4));
125                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->size));
126                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
127                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->record_number));
128                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time_generated));
129                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time_written));
130                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->event_id));
131                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->event_type));
132                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_of_strings));
133                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->event_category));
134                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved_flags));
135                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->closing_record_number));
136                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->stringoffset));
137                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_length));
138                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sid_offset));
139                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->data_length));
140                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->data_offset));
141                 {
142                         uint32_t _flags_save_string = ndr->flags;
143                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
144                         NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->source_name));
145                         ndr->flags = _flags_save_string;
146                 }
147                 {
148                         uint32_t _flags_save_string = ndr->flags;
149                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
150                         NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->computer_name));
151                         ndr->flags = _flags_save_string;
152                 }
153                 {
154                         uint32_t _flags_save_string = ndr->flags;
155                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM);
156                         NDR_PULL_ALLOC_N(ndr, r->strings, r->num_of_strings);
157                         _mem_save_strings_0 = NDR_PULL_GET_MEM_CTX(ndr);
158                         NDR_PULL_SET_MEM_CTX(ndr, r->strings, 0);
159                         for (cntr_strings_0 = 0; cntr_strings_0 < r->num_of_strings; cntr_strings_0++) {
160                                 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->strings[cntr_strings_0]));
161                         }
162                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_strings_0, 0);
163                         ndr->flags = _flags_save_string;
164                 }
165                 {
166                         uint32_t _flags_save_string = ndr->flags;
167                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_ASCII|LIBNDR_FLAG_STR_NULLTERM);
168                         NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->raw_data));
169                         ndr->flags = _flags_save_string;
170                 }
171         }
172         if (ndr_flags & NDR_BUFFERS) {
173         }
174         return NDR_ERR_SUCCESS;
175 }
176
177 _PUBLIC_ void ndr_print_eventlog_Record(struct ndr_print *ndr, const char *name, const struct eventlog_Record *r)
178 {
179         uint32_t cntr_strings_0;
180         ndr_print_struct(ndr, name, "eventlog_Record");
181         ndr->depth++;
182         ndr_print_uint32(ndr, "size", r->size);
183         ndr_print_uint32(ndr, "reserved", r->reserved);
184         ndr_print_uint32(ndr, "record_number", r->record_number);
185         ndr_print_uint32(ndr, "time_generated", r->time_generated);
186         ndr_print_uint32(ndr, "time_written", r->time_written);
187         ndr_print_uint32(ndr, "event_id", r->event_id);
188         ndr_print_uint16(ndr, "event_type", r->event_type);
189         ndr_print_uint16(ndr, "num_of_strings", r->num_of_strings);
190         ndr_print_uint16(ndr, "event_category", r->event_category);
191         ndr_print_uint16(ndr, "reserved_flags", r->reserved_flags);
192         ndr_print_uint32(ndr, "closing_record_number", r->closing_record_number);
193         ndr_print_uint32(ndr, "stringoffset", r->stringoffset);
194         ndr_print_uint32(ndr, "sid_length", r->sid_length);
195         ndr_print_uint32(ndr, "sid_offset", r->sid_offset);
196         ndr_print_uint32(ndr, "data_length", r->data_length);
197         ndr_print_uint32(ndr, "data_offset", r->data_offset);
198         ndr_print_string(ndr, "source_name", r->source_name);
199         ndr_print_string(ndr, "computer_name", r->computer_name);
200         ndr->print(ndr, "%s: ARRAY(%d)", "strings", (int)r->num_of_strings);
201         ndr->depth++;
202         for (cntr_strings_0=0;cntr_strings_0<r->num_of_strings;cntr_strings_0++) {
203                 char *idx_0=NULL;
204                 if (asprintf(&idx_0, "[%d]", cntr_strings_0) != -1) {
205                         ndr_print_string(ndr, "strings", r->strings[cntr_strings_0]);
206                         free(idx_0);
207                 }
208         }
209         ndr->depth--;
210         ndr_print_string(ndr, "raw_data", r->raw_data);
211         ndr->depth--;
212 }
213
214 static enum ndr_err_code ndr_push_eventlog_ClearEventLogW(struct ndr_push *ndr, int flags, const struct eventlog_ClearEventLogW *r)
215 {
216         if (flags & NDR_IN) {
217                 if (r->in.handle == NULL) {
218                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
219                 }
220                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
221                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.backupfile));
222                 if (r->in.backupfile) {
223                         NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.backupfile));
224                 }
225         }
226         if (flags & NDR_OUT) {
227                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
228         }
229         return NDR_ERR_SUCCESS;
230 }
231
232 static enum ndr_err_code ndr_pull_eventlog_ClearEventLogW(struct ndr_pull *ndr, int flags, struct eventlog_ClearEventLogW *r)
233 {
234         uint32_t _ptr_backupfile;
235         TALLOC_CTX *_mem_save_handle_0;
236         TALLOC_CTX *_mem_save_backupfile_0;
237         if (flags & NDR_IN) {
238                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
239                         NDR_PULL_ALLOC(ndr, r->in.handle);
240                 }
241                 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
242                 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
243                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
244                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
245                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_backupfile));
246                 if (_ptr_backupfile) {
247                         NDR_PULL_ALLOC(ndr, r->in.backupfile);
248                 } else {
249                         r->in.backupfile = NULL;
250                 }
251                 if (r->in.backupfile) {
252                         _mem_save_backupfile_0 = NDR_PULL_GET_MEM_CTX(ndr);
253                         NDR_PULL_SET_MEM_CTX(ndr, r->in.backupfile, 0);
254                         NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.backupfile));
255                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_backupfile_0, 0);
256                 }
257         }
258         if (flags & NDR_OUT) {
259                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
260         }
261         return NDR_ERR_SUCCESS;
262 }
263
264 _PUBLIC_ void ndr_print_eventlog_ClearEventLogW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ClearEventLogW *r)
265 {
266         ndr_print_struct(ndr, name, "eventlog_ClearEventLogW");
267         ndr->depth++;
268         if (flags & NDR_SET_VALUES) {
269                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
270         }
271         if (flags & NDR_IN) {
272                 ndr_print_struct(ndr, "in", "eventlog_ClearEventLogW");
273                 ndr->depth++;
274                 ndr_print_ptr(ndr, "handle", r->in.handle);
275                 ndr->depth++;
276                 ndr_print_policy_handle(ndr, "handle", r->in.handle);
277                 ndr->depth--;
278                 ndr_print_ptr(ndr, "backupfile", r->in.backupfile);
279                 ndr->depth++;
280                 if (r->in.backupfile) {
281                         ndr_print_lsa_String(ndr, "backupfile", r->in.backupfile);
282                 }
283                 ndr->depth--;
284                 ndr->depth--;
285         }
286         if (flags & NDR_OUT) {
287                 ndr_print_struct(ndr, "out", "eventlog_ClearEventLogW");
288                 ndr->depth++;
289                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
290                 ndr->depth--;
291         }
292         ndr->depth--;
293 }
294
295 static enum ndr_err_code ndr_push_eventlog_BackupEventLogW(struct ndr_push *ndr, int flags, const struct eventlog_BackupEventLogW *r)
296 {
297         if (flags & NDR_IN) {
298         }
299         if (flags & NDR_OUT) {
300                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
301         }
302         return NDR_ERR_SUCCESS;
303 }
304
305 static enum ndr_err_code ndr_pull_eventlog_BackupEventLogW(struct ndr_pull *ndr, int flags, struct eventlog_BackupEventLogW *r)
306 {
307         if (flags & NDR_IN) {
308         }
309         if (flags & NDR_OUT) {
310                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
311         }
312         return NDR_ERR_SUCCESS;
313 }
314
315 _PUBLIC_ void ndr_print_eventlog_BackupEventLogW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_BackupEventLogW *r)
316 {
317         ndr_print_struct(ndr, name, "eventlog_BackupEventLogW");
318         ndr->depth++;
319         if (flags & NDR_SET_VALUES) {
320                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
321         }
322         if (flags & NDR_IN) {
323                 ndr_print_struct(ndr, "in", "eventlog_BackupEventLogW");
324                 ndr->depth++;
325                 ndr->depth--;
326         }
327         if (flags & NDR_OUT) {
328                 ndr_print_struct(ndr, "out", "eventlog_BackupEventLogW");
329                 ndr->depth++;
330                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
331                 ndr->depth--;
332         }
333         ndr->depth--;
334 }
335
336 static enum ndr_err_code ndr_push_eventlog_CloseEventLog(struct ndr_push *ndr, int flags, const struct eventlog_CloseEventLog *r)
337 {
338         if (flags & NDR_IN) {
339                 if (r->in.handle == NULL) {
340                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
341                 }
342                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
343         }
344         if (flags & NDR_OUT) {
345                 if (r->out.handle == NULL) {
346                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
347                 }
348                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
349                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
350         }
351         return NDR_ERR_SUCCESS;
352 }
353
354 static enum ndr_err_code ndr_pull_eventlog_CloseEventLog(struct ndr_pull *ndr, int flags, struct eventlog_CloseEventLog *r)
355 {
356         TALLOC_CTX *_mem_save_handle_0;
357         if (flags & NDR_IN) {
358                 ZERO_STRUCT(r->out);
359
360                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
361                         NDR_PULL_ALLOC(ndr, r->in.handle);
362                 }
363                 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
364                 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
365                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
366                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
367                 NDR_PULL_ALLOC(ndr, r->out.handle);
368                 *r->out.handle = *r->in.handle;
369         }
370         if (flags & NDR_OUT) {
371                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
372                         NDR_PULL_ALLOC(ndr, r->out.handle);
373                 }
374                 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
375                 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
376                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
377                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
378                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
379         }
380         return NDR_ERR_SUCCESS;
381 }
382
383 _PUBLIC_ void ndr_print_eventlog_CloseEventLog(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_CloseEventLog *r)
384 {
385         ndr_print_struct(ndr, name, "eventlog_CloseEventLog");
386         ndr->depth++;
387         if (flags & NDR_SET_VALUES) {
388                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
389         }
390         if (flags & NDR_IN) {
391                 ndr_print_struct(ndr, "in", "eventlog_CloseEventLog");
392                 ndr->depth++;
393                 ndr_print_ptr(ndr, "handle", r->in.handle);
394                 ndr->depth++;
395                 ndr_print_policy_handle(ndr, "handle", r->in.handle);
396                 ndr->depth--;
397                 ndr->depth--;
398         }
399         if (flags & NDR_OUT) {
400                 ndr_print_struct(ndr, "out", "eventlog_CloseEventLog");
401                 ndr->depth++;
402                 ndr_print_ptr(ndr, "handle", r->out.handle);
403                 ndr->depth++;
404                 ndr_print_policy_handle(ndr, "handle", r->out.handle);
405                 ndr->depth--;
406                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
407                 ndr->depth--;
408         }
409         ndr->depth--;
410 }
411
412 static enum ndr_err_code ndr_push_eventlog_DeregisterEventSource(struct ndr_push *ndr, int flags, const struct eventlog_DeregisterEventSource *r)
413 {
414         if (flags & NDR_IN) {
415         }
416         if (flags & NDR_OUT) {
417                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
418         }
419         return NDR_ERR_SUCCESS;
420 }
421
422 static enum ndr_err_code ndr_pull_eventlog_DeregisterEventSource(struct ndr_pull *ndr, int flags, struct eventlog_DeregisterEventSource *r)
423 {
424         if (flags & NDR_IN) {
425         }
426         if (flags & NDR_OUT) {
427                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
428         }
429         return NDR_ERR_SUCCESS;
430 }
431
432 _PUBLIC_ void ndr_print_eventlog_DeregisterEventSource(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_DeregisterEventSource *r)
433 {
434         ndr_print_struct(ndr, name, "eventlog_DeregisterEventSource");
435         ndr->depth++;
436         if (flags & NDR_SET_VALUES) {
437                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
438         }
439         if (flags & NDR_IN) {
440                 ndr_print_struct(ndr, "in", "eventlog_DeregisterEventSource");
441                 ndr->depth++;
442                 ndr->depth--;
443         }
444         if (flags & NDR_OUT) {
445                 ndr_print_struct(ndr, "out", "eventlog_DeregisterEventSource");
446                 ndr->depth++;
447                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
448                 ndr->depth--;
449         }
450         ndr->depth--;
451 }
452
453 static enum ndr_err_code ndr_push_eventlog_GetNumRecords(struct ndr_push *ndr, int flags, const struct eventlog_GetNumRecords *r)
454 {
455         if (flags & NDR_IN) {
456                 if (r->in.handle == NULL) {
457                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
458                 }
459                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
460         }
461         if (flags & NDR_OUT) {
462                 if (r->out.number == NULL) {
463                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
464                 }
465                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.number));
466                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
467         }
468         return NDR_ERR_SUCCESS;
469 }
470
471 static enum ndr_err_code ndr_pull_eventlog_GetNumRecords(struct ndr_pull *ndr, int flags, struct eventlog_GetNumRecords *r)
472 {
473         TALLOC_CTX *_mem_save_handle_0;
474         TALLOC_CTX *_mem_save_number_0;
475         if (flags & NDR_IN) {
476                 ZERO_STRUCT(r->out);
477
478                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
479                         NDR_PULL_ALLOC(ndr, r->in.handle);
480                 }
481                 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
482                 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
483                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
484                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
485                 NDR_PULL_ALLOC(ndr, r->out.number);
486                 ZERO_STRUCTP(r->out.number);
487         }
488         if (flags & NDR_OUT) {
489                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
490                         NDR_PULL_ALLOC(ndr, r->out.number);
491                 }
492                 _mem_save_number_0 = NDR_PULL_GET_MEM_CTX(ndr);
493                 NDR_PULL_SET_MEM_CTX(ndr, r->out.number, LIBNDR_FLAG_REF_ALLOC);
494                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.number));
495                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_number_0, LIBNDR_FLAG_REF_ALLOC);
496                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
497         }
498         return NDR_ERR_SUCCESS;
499 }
500
501 _PUBLIC_ void ndr_print_eventlog_GetNumRecords(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_GetNumRecords *r)
502 {
503         ndr_print_struct(ndr, name, "eventlog_GetNumRecords");
504         ndr->depth++;
505         if (flags & NDR_SET_VALUES) {
506                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
507         }
508         if (flags & NDR_IN) {
509                 ndr_print_struct(ndr, "in", "eventlog_GetNumRecords");
510                 ndr->depth++;
511                 ndr_print_ptr(ndr, "handle", r->in.handle);
512                 ndr->depth++;
513                 ndr_print_policy_handle(ndr, "handle", r->in.handle);
514                 ndr->depth--;
515                 ndr->depth--;
516         }
517         if (flags & NDR_OUT) {
518                 ndr_print_struct(ndr, "out", "eventlog_GetNumRecords");
519                 ndr->depth++;
520                 ndr_print_ptr(ndr, "number", r->out.number);
521                 ndr->depth++;
522                 ndr_print_uint32(ndr, "number", *r->out.number);
523                 ndr->depth--;
524                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
525                 ndr->depth--;
526         }
527         ndr->depth--;
528 }
529
530 static enum ndr_err_code ndr_push_eventlog_GetOldestRecord(struct ndr_push *ndr, int flags, const struct eventlog_GetOldestRecord *r)
531 {
532         if (flags & NDR_IN) {
533                 if (r->in.handle == NULL) {
534                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
535                 }
536                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
537         }
538         if (flags & NDR_OUT) {
539                 if (r->out.oldest_entry == NULL) {
540                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
541                 }
542                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.oldest_entry));
543                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
544         }
545         return NDR_ERR_SUCCESS;
546 }
547
548 static enum ndr_err_code ndr_pull_eventlog_GetOldestRecord(struct ndr_pull *ndr, int flags, struct eventlog_GetOldestRecord *r)
549 {
550         TALLOC_CTX *_mem_save_handle_0;
551         TALLOC_CTX *_mem_save_oldest_entry_0;
552         if (flags & NDR_IN) {
553                 ZERO_STRUCT(r->out);
554
555                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
556                         NDR_PULL_ALLOC(ndr, r->in.handle);
557                 }
558                 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
559                 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
560                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
561                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
562                 NDR_PULL_ALLOC(ndr, r->out.oldest_entry);
563                 ZERO_STRUCTP(r->out.oldest_entry);
564         }
565         if (flags & NDR_OUT) {
566                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
567                         NDR_PULL_ALLOC(ndr, r->out.oldest_entry);
568                 }
569                 _mem_save_oldest_entry_0 = NDR_PULL_GET_MEM_CTX(ndr);
570                 NDR_PULL_SET_MEM_CTX(ndr, r->out.oldest_entry, LIBNDR_FLAG_REF_ALLOC);
571                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.oldest_entry));
572                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_oldest_entry_0, LIBNDR_FLAG_REF_ALLOC);
573                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
574         }
575         return NDR_ERR_SUCCESS;
576 }
577
578 _PUBLIC_ void ndr_print_eventlog_GetOldestRecord(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_GetOldestRecord *r)
579 {
580         ndr_print_struct(ndr, name, "eventlog_GetOldestRecord");
581         ndr->depth++;
582         if (flags & NDR_SET_VALUES) {
583                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
584         }
585         if (flags & NDR_IN) {
586                 ndr_print_struct(ndr, "in", "eventlog_GetOldestRecord");
587                 ndr->depth++;
588                 ndr_print_ptr(ndr, "handle", r->in.handle);
589                 ndr->depth++;
590                 ndr_print_policy_handle(ndr, "handle", r->in.handle);
591                 ndr->depth--;
592                 ndr->depth--;
593         }
594         if (flags & NDR_OUT) {
595                 ndr_print_struct(ndr, "out", "eventlog_GetOldestRecord");
596                 ndr->depth++;
597                 ndr_print_ptr(ndr, "oldest_entry", r->out.oldest_entry);
598                 ndr->depth++;
599                 ndr_print_uint32(ndr, "oldest_entry", *r->out.oldest_entry);
600                 ndr->depth--;
601                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
602                 ndr->depth--;
603         }
604         ndr->depth--;
605 }
606
607 static enum ndr_err_code ndr_push_eventlog_ChangeNotify(struct ndr_push *ndr, int flags, const struct eventlog_ChangeNotify *r)
608 {
609         if (flags & NDR_IN) {
610         }
611         if (flags & NDR_OUT) {
612                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
613         }
614         return NDR_ERR_SUCCESS;
615 }
616
617 static enum ndr_err_code ndr_pull_eventlog_ChangeNotify(struct ndr_pull *ndr, int flags, struct eventlog_ChangeNotify *r)
618 {
619         if (flags & NDR_IN) {
620         }
621         if (flags & NDR_OUT) {
622                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
623         }
624         return NDR_ERR_SUCCESS;
625 }
626
627 _PUBLIC_ void ndr_print_eventlog_ChangeNotify(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ChangeNotify *r)
628 {
629         ndr_print_struct(ndr, name, "eventlog_ChangeNotify");
630         ndr->depth++;
631         if (flags & NDR_SET_VALUES) {
632                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
633         }
634         if (flags & NDR_IN) {
635                 ndr_print_struct(ndr, "in", "eventlog_ChangeNotify");
636                 ndr->depth++;
637                 ndr->depth--;
638         }
639         if (flags & NDR_OUT) {
640                 ndr_print_struct(ndr, "out", "eventlog_ChangeNotify");
641                 ndr->depth++;
642                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
643                 ndr->depth--;
644         }
645         ndr->depth--;
646 }
647
648 static enum ndr_err_code ndr_push_eventlog_OpenEventLogW(struct ndr_push *ndr, int flags, const struct eventlog_OpenEventLogW *r)
649 {
650         if (flags & NDR_IN) {
651                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown0));
652                 if (r->in.unknown0) {
653                         NDR_CHECK(ndr_push_eventlog_OpenUnknown0(ndr, NDR_SCALARS, r->in.unknown0));
654                 }
655                 if (r->in.logname == NULL) {
656                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
657                 }
658                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logname));
659                 if (r->in.servername == NULL) {
660                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
661                 }
662                 NDR_CHECK(ndr_push_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.servername));
663                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.major_version));
664                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.minor_version));
665         }
666         if (flags & NDR_OUT) {
667                 if (r->out.handle == NULL) {
668                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
669                 }
670                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
671                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
672         }
673         return NDR_ERR_SUCCESS;
674 }
675
676 static enum ndr_err_code ndr_pull_eventlog_OpenEventLogW(struct ndr_pull *ndr, int flags, struct eventlog_OpenEventLogW *r)
677 {
678         uint32_t _ptr_unknown0;
679         TALLOC_CTX *_mem_save_unknown0_0;
680         TALLOC_CTX *_mem_save_logname_0;
681         TALLOC_CTX *_mem_save_servername_0;
682         TALLOC_CTX *_mem_save_handle_0;
683         if (flags & NDR_IN) {
684                 ZERO_STRUCT(r->out);
685
686                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown0));
687                 if (_ptr_unknown0) {
688                         NDR_PULL_ALLOC(ndr, r->in.unknown0);
689                 } else {
690                         r->in.unknown0 = NULL;
691                 }
692                 if (r->in.unknown0) {
693                         _mem_save_unknown0_0 = NDR_PULL_GET_MEM_CTX(ndr);
694                         NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown0, 0);
695                         NDR_CHECK(ndr_pull_eventlog_OpenUnknown0(ndr, NDR_SCALARS, r->in.unknown0));
696                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown0_0, 0);
697                 }
698                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
699                         NDR_PULL_ALLOC(ndr, r->in.logname);
700                 }
701                 _mem_save_logname_0 = NDR_PULL_GET_MEM_CTX(ndr);
702                 NDR_PULL_SET_MEM_CTX(ndr, r->in.logname, LIBNDR_FLAG_REF_ALLOC);
703                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.logname));
704                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logname_0, LIBNDR_FLAG_REF_ALLOC);
705                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
706                         NDR_PULL_ALLOC(ndr, r->in.servername);
707                 }
708                 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
709                 NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, LIBNDR_FLAG_REF_ALLOC);
710                 NDR_CHECK(ndr_pull_lsa_String(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.servername));
711                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, LIBNDR_FLAG_REF_ALLOC);
712                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.major_version));
713                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.minor_version));
714                 NDR_PULL_ALLOC(ndr, r->out.handle);
715                 ZERO_STRUCTP(r->out.handle);
716         }
717         if (flags & NDR_OUT) {
718                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
719                         NDR_PULL_ALLOC(ndr, r->out.handle);
720                 }
721                 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
722                 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
723                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
724                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
725                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
726         }
727         return NDR_ERR_SUCCESS;
728 }
729
730 _PUBLIC_ void ndr_print_eventlog_OpenEventLogW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_OpenEventLogW *r)
731 {
732         ndr_print_struct(ndr, name, "eventlog_OpenEventLogW");
733         ndr->depth++;
734         if (flags & NDR_SET_VALUES) {
735                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
736         }
737         if (flags & NDR_IN) {
738                 ndr_print_struct(ndr, "in", "eventlog_OpenEventLogW");
739                 ndr->depth++;
740                 ndr_print_ptr(ndr, "unknown0", r->in.unknown0);
741                 ndr->depth++;
742                 if (r->in.unknown0) {
743                         ndr_print_eventlog_OpenUnknown0(ndr, "unknown0", r->in.unknown0);
744                 }
745                 ndr->depth--;
746                 ndr_print_ptr(ndr, "logname", r->in.logname);
747                 ndr->depth++;
748                 ndr_print_lsa_String(ndr, "logname", r->in.logname);
749                 ndr->depth--;
750                 ndr_print_ptr(ndr, "servername", r->in.servername);
751                 ndr->depth++;
752                 ndr_print_lsa_String(ndr, "servername", r->in.servername);
753                 ndr->depth--;
754                 ndr_print_uint32(ndr, "major_version", r->in.major_version);
755                 ndr_print_uint32(ndr, "minor_version", r->in.minor_version);
756                 ndr->depth--;
757         }
758         if (flags & NDR_OUT) {
759                 ndr_print_struct(ndr, "out", "eventlog_OpenEventLogW");
760                 ndr->depth++;
761                 ndr_print_ptr(ndr, "handle", r->out.handle);
762                 ndr->depth++;
763                 ndr_print_policy_handle(ndr, "handle", r->out.handle);
764                 ndr->depth--;
765                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
766                 ndr->depth--;
767         }
768         ndr->depth--;
769 }
770
771 static enum ndr_err_code ndr_push_eventlog_RegisterEventSourceW(struct ndr_push *ndr, int flags, const struct eventlog_RegisterEventSourceW *r)
772 {
773         if (flags & NDR_IN) {
774         }
775         if (flags & NDR_OUT) {
776                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
777         }
778         return NDR_ERR_SUCCESS;
779 }
780
781 static enum ndr_err_code ndr_pull_eventlog_RegisterEventSourceW(struct ndr_pull *ndr, int flags, struct eventlog_RegisterEventSourceW *r)
782 {
783         if (flags & NDR_IN) {
784         }
785         if (flags & NDR_OUT) {
786                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
787         }
788         return NDR_ERR_SUCCESS;
789 }
790
791 _PUBLIC_ void ndr_print_eventlog_RegisterEventSourceW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_RegisterEventSourceW *r)
792 {
793         ndr_print_struct(ndr, name, "eventlog_RegisterEventSourceW");
794         ndr->depth++;
795         if (flags & NDR_SET_VALUES) {
796                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
797         }
798         if (flags & NDR_IN) {
799                 ndr_print_struct(ndr, "in", "eventlog_RegisterEventSourceW");
800                 ndr->depth++;
801                 ndr->depth--;
802         }
803         if (flags & NDR_OUT) {
804                 ndr_print_struct(ndr, "out", "eventlog_RegisterEventSourceW");
805                 ndr->depth++;
806                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
807                 ndr->depth--;
808         }
809         ndr->depth--;
810 }
811
812 static enum ndr_err_code ndr_push_eventlog_OpenBackupEventLogW(struct ndr_push *ndr, int flags, const struct eventlog_OpenBackupEventLogW *r)
813 {
814         if (flags & NDR_IN) {
815         }
816         if (flags & NDR_OUT) {
817                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
818         }
819         return NDR_ERR_SUCCESS;
820 }
821
822 static enum ndr_err_code ndr_pull_eventlog_OpenBackupEventLogW(struct ndr_pull *ndr, int flags, struct eventlog_OpenBackupEventLogW *r)
823 {
824         if (flags & NDR_IN) {
825         }
826         if (flags & NDR_OUT) {
827                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
828         }
829         return NDR_ERR_SUCCESS;
830 }
831
832 _PUBLIC_ void ndr_print_eventlog_OpenBackupEventLogW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_OpenBackupEventLogW *r)
833 {
834         ndr_print_struct(ndr, name, "eventlog_OpenBackupEventLogW");
835         ndr->depth++;
836         if (flags & NDR_SET_VALUES) {
837                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
838         }
839         if (flags & NDR_IN) {
840                 ndr_print_struct(ndr, "in", "eventlog_OpenBackupEventLogW");
841                 ndr->depth++;
842                 ndr->depth--;
843         }
844         if (flags & NDR_OUT) {
845                 ndr_print_struct(ndr, "out", "eventlog_OpenBackupEventLogW");
846                 ndr->depth++;
847                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
848                 ndr->depth--;
849         }
850         ndr->depth--;
851 }
852
853 static enum ndr_err_code ndr_push_eventlog_ReadEventLogW(struct ndr_push *ndr, int flags, const struct eventlog_ReadEventLogW *r)
854 {
855         if (flags & NDR_IN) {
856                 if (r->in.handle == NULL) {
857                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
858                 }
859                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
860                 NDR_CHECK(ndr_push_eventlogReadFlags(ndr, NDR_SCALARS, r->in.flags));
861                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.offset));
862                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.number_of_bytes));
863         }
864         if (flags & NDR_OUT) {
865                 if (r->out.data == NULL) {
866                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
867                 }
868                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.number_of_bytes));
869                 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.data, r->in.number_of_bytes));
870                 if (r->out.sent_size == NULL) {
871                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
872                 }
873                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.sent_size));
874                 if (r->out.real_size == NULL) {
875                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
876                 }
877                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.real_size));
878                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
879         }
880         return NDR_ERR_SUCCESS;
881 }
882
883 static enum ndr_err_code ndr_pull_eventlog_ReadEventLogW(struct ndr_pull *ndr, int flags, struct eventlog_ReadEventLogW *r)
884 {
885         TALLOC_CTX *_mem_save_handle_0;
886         TALLOC_CTX *_mem_save_sent_size_0;
887         TALLOC_CTX *_mem_save_real_size_0;
888         if (flags & NDR_IN) {
889                 ZERO_STRUCT(r->out);
890
891                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
892                         NDR_PULL_ALLOC(ndr, r->in.handle);
893                 }
894                 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
895                 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
896                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
897                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
898                 NDR_CHECK(ndr_pull_eventlogReadFlags(ndr, NDR_SCALARS, &r->in.flags));
899                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.offset));
900                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.number_of_bytes));
901                 if (r->in.number_of_bytes < 0 || r->in.number_of_bytes > 0x7FFFF) {
902                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
903                 }
904                 NDR_PULL_ALLOC_N(ndr, r->out.data, r->in.number_of_bytes);
905                 memset(r->out.data, 0, (r->in.number_of_bytes) * sizeof(*r->out.data));
906                 NDR_PULL_ALLOC(ndr, r->out.sent_size);
907                 ZERO_STRUCTP(r->out.sent_size);
908                 NDR_PULL_ALLOC(ndr, r->out.real_size);
909                 ZERO_STRUCTP(r->out.real_size);
910         }
911         if (flags & NDR_OUT) {
912                 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.data));
913                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
914                         NDR_PULL_ALLOC_N(ndr, r->out.data, ndr_get_array_size(ndr, &r->out.data));
915                 }
916                 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.data, ndr_get_array_size(ndr, &r->out.data)));
917                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
918                         NDR_PULL_ALLOC(ndr, r->out.sent_size);
919                 }
920                 _mem_save_sent_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
921                 NDR_PULL_SET_MEM_CTX(ndr, r->out.sent_size, LIBNDR_FLAG_REF_ALLOC);
922                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.sent_size));
923                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sent_size_0, LIBNDR_FLAG_REF_ALLOC);
924                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
925                         NDR_PULL_ALLOC(ndr, r->out.real_size);
926                 }
927                 _mem_save_real_size_0 = NDR_PULL_GET_MEM_CTX(ndr);
928                 NDR_PULL_SET_MEM_CTX(ndr, r->out.real_size, LIBNDR_FLAG_REF_ALLOC);
929                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.real_size));
930                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_real_size_0, LIBNDR_FLAG_REF_ALLOC);
931                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
932                 if (r->out.data) {
933                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.data, r->in.number_of_bytes));
934                 }
935         }
936         return NDR_ERR_SUCCESS;
937 }
938
939 _PUBLIC_ void ndr_print_eventlog_ReadEventLogW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ReadEventLogW *r)
940 {
941         ndr_print_struct(ndr, name, "eventlog_ReadEventLogW");
942         ndr->depth++;
943         if (flags & NDR_SET_VALUES) {
944                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
945         }
946         if (flags & NDR_IN) {
947                 ndr_print_struct(ndr, "in", "eventlog_ReadEventLogW");
948                 ndr->depth++;
949                 ndr_print_ptr(ndr, "handle", r->in.handle);
950                 ndr->depth++;
951                 ndr_print_policy_handle(ndr, "handle", r->in.handle);
952                 ndr->depth--;
953                 ndr_print_eventlogReadFlags(ndr, "flags", r->in.flags);
954                 ndr_print_uint32(ndr, "offset", r->in.offset);
955                 ndr_print_uint32(ndr, "number_of_bytes", r->in.number_of_bytes);
956                 ndr->depth--;
957         }
958         if (flags & NDR_OUT) {
959                 ndr_print_struct(ndr, "out", "eventlog_ReadEventLogW");
960                 ndr->depth++;
961                 ndr_print_ptr(ndr, "data", r->out.data);
962                 ndr->depth++;
963                 ndr_print_array_uint8(ndr, "data", r->out.data, r->in.number_of_bytes);
964                 ndr->depth--;
965                 ndr_print_ptr(ndr, "sent_size", r->out.sent_size);
966                 ndr->depth++;
967                 ndr_print_uint32(ndr, "sent_size", *r->out.sent_size);
968                 ndr->depth--;
969                 ndr_print_ptr(ndr, "real_size", r->out.real_size);
970                 ndr->depth++;
971                 ndr_print_uint32(ndr, "real_size", *r->out.real_size);
972                 ndr->depth--;
973                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
974                 ndr->depth--;
975         }
976         ndr->depth--;
977 }
978
979 static enum ndr_err_code ndr_push_eventlog_ReportEventW(struct ndr_push *ndr, int flags, const struct eventlog_ReportEventW *r)
980 {
981         if (flags & NDR_IN) {
982         }
983         if (flags & NDR_OUT) {
984                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
985         }
986         return NDR_ERR_SUCCESS;
987 }
988
989 static enum ndr_err_code ndr_pull_eventlog_ReportEventW(struct ndr_pull *ndr, int flags, struct eventlog_ReportEventW *r)
990 {
991         if (flags & NDR_IN) {
992         }
993         if (flags & NDR_OUT) {
994                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
995         }
996         return NDR_ERR_SUCCESS;
997 }
998
999 _PUBLIC_ void ndr_print_eventlog_ReportEventW(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ReportEventW *r)
1000 {
1001         ndr_print_struct(ndr, name, "eventlog_ReportEventW");
1002         ndr->depth++;
1003         if (flags & NDR_SET_VALUES) {
1004                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1005         }
1006         if (flags & NDR_IN) {
1007                 ndr_print_struct(ndr, "in", "eventlog_ReportEventW");
1008                 ndr->depth++;
1009                 ndr->depth--;
1010         }
1011         if (flags & NDR_OUT) {
1012                 ndr_print_struct(ndr, "out", "eventlog_ReportEventW");
1013                 ndr->depth++;
1014                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1015                 ndr->depth--;
1016         }
1017         ndr->depth--;
1018 }
1019
1020 static enum ndr_err_code ndr_push_eventlog_ClearEventLogA(struct ndr_push *ndr, int flags, const struct eventlog_ClearEventLogA *r)
1021 {
1022         if (flags & NDR_IN) {
1023         }
1024         if (flags & NDR_OUT) {
1025                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1026         }
1027         return NDR_ERR_SUCCESS;
1028 }
1029
1030 static enum ndr_err_code ndr_pull_eventlog_ClearEventLogA(struct ndr_pull *ndr, int flags, struct eventlog_ClearEventLogA *r)
1031 {
1032         if (flags & NDR_IN) {
1033         }
1034         if (flags & NDR_OUT) {
1035                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1036         }
1037         return NDR_ERR_SUCCESS;
1038 }
1039
1040 _PUBLIC_ void ndr_print_eventlog_ClearEventLogA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ClearEventLogA *r)
1041 {
1042         ndr_print_struct(ndr, name, "eventlog_ClearEventLogA");
1043         ndr->depth++;
1044         if (flags & NDR_SET_VALUES) {
1045                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1046         }
1047         if (flags & NDR_IN) {
1048                 ndr_print_struct(ndr, "in", "eventlog_ClearEventLogA");
1049                 ndr->depth++;
1050                 ndr->depth--;
1051         }
1052         if (flags & NDR_OUT) {
1053                 ndr_print_struct(ndr, "out", "eventlog_ClearEventLogA");
1054                 ndr->depth++;
1055                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1056                 ndr->depth--;
1057         }
1058         ndr->depth--;
1059 }
1060
1061 static enum ndr_err_code ndr_push_eventlog_BackupEventLogA(struct ndr_push *ndr, int flags, const struct eventlog_BackupEventLogA *r)
1062 {
1063         if (flags & NDR_IN) {
1064         }
1065         if (flags & NDR_OUT) {
1066                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1067         }
1068         return NDR_ERR_SUCCESS;
1069 }
1070
1071 static enum ndr_err_code ndr_pull_eventlog_BackupEventLogA(struct ndr_pull *ndr, int flags, struct eventlog_BackupEventLogA *r)
1072 {
1073         if (flags & NDR_IN) {
1074         }
1075         if (flags & NDR_OUT) {
1076                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1077         }
1078         return NDR_ERR_SUCCESS;
1079 }
1080
1081 _PUBLIC_ void ndr_print_eventlog_BackupEventLogA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_BackupEventLogA *r)
1082 {
1083         ndr_print_struct(ndr, name, "eventlog_BackupEventLogA");
1084         ndr->depth++;
1085         if (flags & NDR_SET_VALUES) {
1086                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1087         }
1088         if (flags & NDR_IN) {
1089                 ndr_print_struct(ndr, "in", "eventlog_BackupEventLogA");
1090                 ndr->depth++;
1091                 ndr->depth--;
1092         }
1093         if (flags & NDR_OUT) {
1094                 ndr_print_struct(ndr, "out", "eventlog_BackupEventLogA");
1095                 ndr->depth++;
1096                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1097                 ndr->depth--;
1098         }
1099         ndr->depth--;
1100 }
1101
1102 static enum ndr_err_code ndr_push_eventlog_OpenEventLogA(struct ndr_push *ndr, int flags, const struct eventlog_OpenEventLogA *r)
1103 {
1104         if (flags & NDR_IN) {
1105         }
1106         if (flags & NDR_OUT) {
1107                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1108         }
1109         return NDR_ERR_SUCCESS;
1110 }
1111
1112 static enum ndr_err_code ndr_pull_eventlog_OpenEventLogA(struct ndr_pull *ndr, int flags, struct eventlog_OpenEventLogA *r)
1113 {
1114         if (flags & NDR_IN) {
1115         }
1116         if (flags & NDR_OUT) {
1117                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1118         }
1119         return NDR_ERR_SUCCESS;
1120 }
1121
1122 _PUBLIC_ void ndr_print_eventlog_OpenEventLogA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_OpenEventLogA *r)
1123 {
1124         ndr_print_struct(ndr, name, "eventlog_OpenEventLogA");
1125         ndr->depth++;
1126         if (flags & NDR_SET_VALUES) {
1127                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1128         }
1129         if (flags & NDR_IN) {
1130                 ndr_print_struct(ndr, "in", "eventlog_OpenEventLogA");
1131                 ndr->depth++;
1132                 ndr->depth--;
1133         }
1134         if (flags & NDR_OUT) {
1135                 ndr_print_struct(ndr, "out", "eventlog_OpenEventLogA");
1136                 ndr->depth++;
1137                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1138                 ndr->depth--;
1139         }
1140         ndr->depth--;
1141 }
1142
1143 static enum ndr_err_code ndr_push_eventlog_RegisterEventSourceA(struct ndr_push *ndr, int flags, const struct eventlog_RegisterEventSourceA *r)
1144 {
1145         if (flags & NDR_IN) {
1146         }
1147         if (flags & NDR_OUT) {
1148                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1149         }
1150         return NDR_ERR_SUCCESS;
1151 }
1152
1153 static enum ndr_err_code ndr_pull_eventlog_RegisterEventSourceA(struct ndr_pull *ndr, int flags, struct eventlog_RegisterEventSourceA *r)
1154 {
1155         if (flags & NDR_IN) {
1156         }
1157         if (flags & NDR_OUT) {
1158                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1159         }
1160         return NDR_ERR_SUCCESS;
1161 }
1162
1163 _PUBLIC_ void ndr_print_eventlog_RegisterEventSourceA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_RegisterEventSourceA *r)
1164 {
1165         ndr_print_struct(ndr, name, "eventlog_RegisterEventSourceA");
1166         ndr->depth++;
1167         if (flags & NDR_SET_VALUES) {
1168                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1169         }
1170         if (flags & NDR_IN) {
1171                 ndr_print_struct(ndr, "in", "eventlog_RegisterEventSourceA");
1172                 ndr->depth++;
1173                 ndr->depth--;
1174         }
1175         if (flags & NDR_OUT) {
1176                 ndr_print_struct(ndr, "out", "eventlog_RegisterEventSourceA");
1177                 ndr->depth++;
1178                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1179                 ndr->depth--;
1180         }
1181         ndr->depth--;
1182 }
1183
1184 static enum ndr_err_code ndr_push_eventlog_OpenBackupEventLogA(struct ndr_push *ndr, int flags, const struct eventlog_OpenBackupEventLogA *r)
1185 {
1186         if (flags & NDR_IN) {
1187         }
1188         if (flags & NDR_OUT) {
1189                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1190         }
1191         return NDR_ERR_SUCCESS;
1192 }
1193
1194 static enum ndr_err_code ndr_pull_eventlog_OpenBackupEventLogA(struct ndr_pull *ndr, int flags, struct eventlog_OpenBackupEventLogA *r)
1195 {
1196         if (flags & NDR_IN) {
1197         }
1198         if (flags & NDR_OUT) {
1199                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1200         }
1201         return NDR_ERR_SUCCESS;
1202 }
1203
1204 _PUBLIC_ void ndr_print_eventlog_OpenBackupEventLogA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_OpenBackupEventLogA *r)
1205 {
1206         ndr_print_struct(ndr, name, "eventlog_OpenBackupEventLogA");
1207         ndr->depth++;
1208         if (flags & NDR_SET_VALUES) {
1209                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1210         }
1211         if (flags & NDR_IN) {
1212                 ndr_print_struct(ndr, "in", "eventlog_OpenBackupEventLogA");
1213                 ndr->depth++;
1214                 ndr->depth--;
1215         }
1216         if (flags & NDR_OUT) {
1217                 ndr_print_struct(ndr, "out", "eventlog_OpenBackupEventLogA");
1218                 ndr->depth++;
1219                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1220                 ndr->depth--;
1221         }
1222         ndr->depth--;
1223 }
1224
1225 static enum ndr_err_code ndr_push_eventlog_ReadEventLogA(struct ndr_push *ndr, int flags, const struct eventlog_ReadEventLogA *r)
1226 {
1227         if (flags & NDR_IN) {
1228         }
1229         if (flags & NDR_OUT) {
1230                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1231         }
1232         return NDR_ERR_SUCCESS;
1233 }
1234
1235 static enum ndr_err_code ndr_pull_eventlog_ReadEventLogA(struct ndr_pull *ndr, int flags, struct eventlog_ReadEventLogA *r)
1236 {
1237         if (flags & NDR_IN) {
1238         }
1239         if (flags & NDR_OUT) {
1240                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1241         }
1242         return NDR_ERR_SUCCESS;
1243 }
1244
1245 _PUBLIC_ void ndr_print_eventlog_ReadEventLogA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ReadEventLogA *r)
1246 {
1247         ndr_print_struct(ndr, name, "eventlog_ReadEventLogA");
1248         ndr->depth++;
1249         if (flags & NDR_SET_VALUES) {
1250                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1251         }
1252         if (flags & NDR_IN) {
1253                 ndr_print_struct(ndr, "in", "eventlog_ReadEventLogA");
1254                 ndr->depth++;
1255                 ndr->depth--;
1256         }
1257         if (flags & NDR_OUT) {
1258                 ndr_print_struct(ndr, "out", "eventlog_ReadEventLogA");
1259                 ndr->depth++;
1260                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1261                 ndr->depth--;
1262         }
1263         ndr->depth--;
1264 }
1265
1266 static enum ndr_err_code ndr_push_eventlog_ReportEventA(struct ndr_push *ndr, int flags, const struct eventlog_ReportEventA *r)
1267 {
1268         if (flags & NDR_IN) {
1269         }
1270         if (flags & NDR_OUT) {
1271                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1272         }
1273         return NDR_ERR_SUCCESS;
1274 }
1275
1276 static enum ndr_err_code ndr_pull_eventlog_ReportEventA(struct ndr_pull *ndr, int flags, struct eventlog_ReportEventA *r)
1277 {
1278         if (flags & NDR_IN) {
1279         }
1280         if (flags & NDR_OUT) {
1281                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1282         }
1283         return NDR_ERR_SUCCESS;
1284 }
1285
1286 _PUBLIC_ void ndr_print_eventlog_ReportEventA(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_ReportEventA *r)
1287 {
1288         ndr_print_struct(ndr, name, "eventlog_ReportEventA");
1289         ndr->depth++;
1290         if (flags & NDR_SET_VALUES) {
1291                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1292         }
1293         if (flags & NDR_IN) {
1294                 ndr_print_struct(ndr, "in", "eventlog_ReportEventA");
1295                 ndr->depth++;
1296                 ndr->depth--;
1297         }
1298         if (flags & NDR_OUT) {
1299                 ndr_print_struct(ndr, "out", "eventlog_ReportEventA");
1300                 ndr->depth++;
1301                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1302                 ndr->depth--;
1303         }
1304         ndr->depth--;
1305 }
1306
1307 static enum ndr_err_code ndr_push_eventlog_RegisterClusterSvc(struct ndr_push *ndr, int flags, const struct eventlog_RegisterClusterSvc *r)
1308 {
1309         if (flags & NDR_IN) {
1310         }
1311         if (flags & NDR_OUT) {
1312                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1313         }
1314         return NDR_ERR_SUCCESS;
1315 }
1316
1317 static enum ndr_err_code ndr_pull_eventlog_RegisterClusterSvc(struct ndr_pull *ndr, int flags, struct eventlog_RegisterClusterSvc *r)
1318 {
1319         if (flags & NDR_IN) {
1320         }
1321         if (flags & NDR_OUT) {
1322                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1323         }
1324         return NDR_ERR_SUCCESS;
1325 }
1326
1327 _PUBLIC_ void ndr_print_eventlog_RegisterClusterSvc(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_RegisterClusterSvc *r)
1328 {
1329         ndr_print_struct(ndr, name, "eventlog_RegisterClusterSvc");
1330         ndr->depth++;
1331         if (flags & NDR_SET_VALUES) {
1332                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1333         }
1334         if (flags & NDR_IN) {
1335                 ndr_print_struct(ndr, "in", "eventlog_RegisterClusterSvc");
1336                 ndr->depth++;
1337                 ndr->depth--;
1338         }
1339         if (flags & NDR_OUT) {
1340                 ndr_print_struct(ndr, "out", "eventlog_RegisterClusterSvc");
1341                 ndr->depth++;
1342                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1343                 ndr->depth--;
1344         }
1345         ndr->depth--;
1346 }
1347
1348 static enum ndr_err_code ndr_push_eventlog_DeregisterClusterSvc(struct ndr_push *ndr, int flags, const struct eventlog_DeregisterClusterSvc *r)
1349 {
1350         if (flags & NDR_IN) {
1351         }
1352         if (flags & NDR_OUT) {
1353                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1354         }
1355         return NDR_ERR_SUCCESS;
1356 }
1357
1358 static enum ndr_err_code ndr_pull_eventlog_DeregisterClusterSvc(struct ndr_pull *ndr, int flags, struct eventlog_DeregisterClusterSvc *r)
1359 {
1360         if (flags & NDR_IN) {
1361         }
1362         if (flags & NDR_OUT) {
1363                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1364         }
1365         return NDR_ERR_SUCCESS;
1366 }
1367
1368 _PUBLIC_ void ndr_print_eventlog_DeregisterClusterSvc(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_DeregisterClusterSvc *r)
1369 {
1370         ndr_print_struct(ndr, name, "eventlog_DeregisterClusterSvc");
1371         ndr->depth++;
1372         if (flags & NDR_SET_VALUES) {
1373                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1374         }
1375         if (flags & NDR_IN) {
1376                 ndr_print_struct(ndr, "in", "eventlog_DeregisterClusterSvc");
1377                 ndr->depth++;
1378                 ndr->depth--;
1379         }
1380         if (flags & NDR_OUT) {
1381                 ndr_print_struct(ndr, "out", "eventlog_DeregisterClusterSvc");
1382                 ndr->depth++;
1383                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1384                 ndr->depth--;
1385         }
1386         ndr->depth--;
1387 }
1388
1389 static enum ndr_err_code ndr_push_eventlog_WriteClusterEvents(struct ndr_push *ndr, int flags, const struct eventlog_WriteClusterEvents *r)
1390 {
1391         if (flags & NDR_IN) {
1392         }
1393         if (flags & NDR_OUT) {
1394                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1395         }
1396         return NDR_ERR_SUCCESS;
1397 }
1398
1399 static enum ndr_err_code ndr_pull_eventlog_WriteClusterEvents(struct ndr_pull *ndr, int flags, struct eventlog_WriteClusterEvents *r)
1400 {
1401         if (flags & NDR_IN) {
1402         }
1403         if (flags & NDR_OUT) {
1404                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1405         }
1406         return NDR_ERR_SUCCESS;
1407 }
1408
1409 _PUBLIC_ void ndr_print_eventlog_WriteClusterEvents(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_WriteClusterEvents *r)
1410 {
1411         ndr_print_struct(ndr, name, "eventlog_WriteClusterEvents");
1412         ndr->depth++;
1413         if (flags & NDR_SET_VALUES) {
1414                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1415         }
1416         if (flags & NDR_IN) {
1417                 ndr_print_struct(ndr, "in", "eventlog_WriteClusterEvents");
1418                 ndr->depth++;
1419                 ndr->depth--;
1420         }
1421         if (flags & NDR_OUT) {
1422                 ndr_print_struct(ndr, "out", "eventlog_WriteClusterEvents");
1423                 ndr->depth++;
1424                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1425                 ndr->depth--;
1426         }
1427         ndr->depth--;
1428 }
1429
1430 static enum ndr_err_code ndr_push_eventlog_GetLogIntormation(struct ndr_push *ndr, int flags, const struct eventlog_GetLogIntormation *r)
1431 {
1432         if (flags & NDR_IN) {
1433         }
1434         if (flags & NDR_OUT) {
1435                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1436         }
1437         return NDR_ERR_SUCCESS;
1438 }
1439
1440 static enum ndr_err_code ndr_pull_eventlog_GetLogIntormation(struct ndr_pull *ndr, int flags, struct eventlog_GetLogIntormation *r)
1441 {
1442         if (flags & NDR_IN) {
1443         }
1444         if (flags & NDR_OUT) {
1445                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1446         }
1447         return NDR_ERR_SUCCESS;
1448 }
1449
1450 _PUBLIC_ void ndr_print_eventlog_GetLogIntormation(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_GetLogIntormation *r)
1451 {
1452         ndr_print_struct(ndr, name, "eventlog_GetLogIntormation");
1453         ndr->depth++;
1454         if (flags & NDR_SET_VALUES) {
1455                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1456         }
1457         if (flags & NDR_IN) {
1458                 ndr_print_struct(ndr, "in", "eventlog_GetLogIntormation");
1459                 ndr->depth++;
1460                 ndr->depth--;
1461         }
1462         if (flags & NDR_OUT) {
1463                 ndr_print_struct(ndr, "out", "eventlog_GetLogIntormation");
1464                 ndr->depth++;
1465                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1466                 ndr->depth--;
1467         }
1468         ndr->depth--;
1469 }
1470
1471 static enum ndr_err_code ndr_push_eventlog_FlushEventLog(struct ndr_push *ndr, int flags, const struct eventlog_FlushEventLog *r)
1472 {
1473         if (flags & NDR_IN) {
1474                 if (r->in.handle == NULL) {
1475                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1476                 }
1477                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1478         }
1479         if (flags & NDR_OUT) {
1480                 NDR_CHECK(ndr_push_NTSTATUS(ndr, NDR_SCALARS, r->out.result));
1481         }
1482         return NDR_ERR_SUCCESS;
1483 }
1484
1485 static enum ndr_err_code ndr_pull_eventlog_FlushEventLog(struct ndr_pull *ndr, int flags, struct eventlog_FlushEventLog *r)
1486 {
1487         TALLOC_CTX *_mem_save_handle_0;
1488         if (flags & NDR_IN) {
1489                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1490                         NDR_PULL_ALLOC(ndr, r->in.handle);
1491                 }
1492                 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1493                 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1494                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1495                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1496         }
1497         if (flags & NDR_OUT) {
1498                 NDR_CHECK(ndr_pull_NTSTATUS(ndr, NDR_SCALARS, &r->out.result));
1499         }
1500         return NDR_ERR_SUCCESS;
1501 }
1502
1503 _PUBLIC_ void ndr_print_eventlog_FlushEventLog(struct ndr_print *ndr, const char *name, int flags, const struct eventlog_FlushEventLog *r)
1504 {
1505         ndr_print_struct(ndr, name, "eventlog_FlushEventLog");
1506         ndr->depth++;
1507         if (flags & NDR_SET_VALUES) {
1508                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1509         }
1510         if (flags & NDR_IN) {
1511                 ndr_print_struct(ndr, "in", "eventlog_FlushEventLog");
1512                 ndr->depth++;
1513                 ndr_print_ptr(ndr, "handle", r->in.handle);
1514                 ndr->depth++;
1515                 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1516                 ndr->depth--;
1517                 ndr->depth--;
1518         }
1519         if (flags & NDR_OUT) {
1520                 ndr_print_struct(ndr, "out", "eventlog_FlushEventLog");
1521                 ndr->depth++;
1522                 ndr_print_NTSTATUS(ndr, "result", r->out.result);
1523                 ndr->depth--;
1524         }
1525         ndr->depth--;
1526 }
1527
1528 static const struct ndr_interface_call eventlog_calls[] = {
1529         {
1530                 "eventlog_ClearEventLogW",
1531                 sizeof(struct eventlog_ClearEventLogW),
1532                 (ndr_push_flags_fn_t) ndr_push_eventlog_ClearEventLogW,
1533                 (ndr_pull_flags_fn_t) ndr_pull_eventlog_ClearEventLogW,
1534                 (ndr_print_function_t) ndr_print_eventlog_ClearEventLogW,
1535                 false,
1536         },
1537         {
1538                 "eventlog_BackupEventLogW",
1539                 sizeof(struct eventlog_BackupEventLogW),
1540                 (ndr_push_flags_fn_t) ndr_push_eventlog_BackupEventLogW,
1541                 (ndr_pull_flags_fn_t) ndr_pull_eventlog_BackupEventLogW,
1542                 (ndr_print_function_t) ndr_print_eventlog_BackupEventLogW,
1543                 false,
1544         },
1545         {
1546                 "eventlog_CloseEventLog",
1547                 sizeof(struct eventlog_CloseEventLog),
1548                 (ndr_push_flags_fn_t) ndr_push_eventlog_CloseEventLog,
1549                 (ndr_pull_flags_fn_t) ndr_pull_eventlog_CloseEventLog,
1550                 (ndr_print_function_t) ndr_print_eventlog_CloseEventLog,
1551                 false,
1552         },
1553         {
1554                 "eventlog_DeregisterEventSource",
1555                 sizeof(struct eventlog_DeregisterEventSource),
1556                 (ndr_push_flags_fn_t) ndr_push_eventlog_DeregisterEventSource,
1557                 (ndr_pull_flags_fn_t) ndr_pull_eventlog_DeregisterEventSource,
1558                 (ndr_print_function_t) ndr_print_eventlog_DeregisterEventSource,
1559                 false,
1560         },
1561         {
1562                 "eventlog_GetNumRecords",
1563                 sizeof(struct eventlog_GetNumRecords),
1564                 (ndr_push_flags_fn_t) ndr_push_eventlog_GetNumRecords,
1565                 (ndr_pull_flags_fn_t) ndr_pull_eventlog_GetNumRecords,
1566                 (ndr_print_function_t) ndr_print_eventlog_GetNumRecords,
1567                 false,
1568         },
1569         {
1570                 "eventlog_GetOldestRecord",
1571                 sizeof(struct eventlog_GetOldestRecord),
1572                 (ndr_push_flags_fn_t) ndr_push_eventlog_GetOldestRecord,
1573                 (ndr_pull_flags_fn_t) ndr_pull_eventlog_GetOldestRecord,
1574                 (ndr_print_function_t) ndr_print_eventlog_GetOldestRecord,
1575                 false,
1576         },
1577         {
1578                 "eventlog_ChangeNotify",
1579                 sizeof(struct eventlog_ChangeNotify),
1580                 (ndr_push_flags_fn_t) ndr_push_eventlog_ChangeNotify,
1581                 (ndr_pull_flags_fn_t) ndr_pull_eventlog_ChangeNotify,
1582                 (ndr_print_function_t) ndr_print_eventlog_ChangeNotify,
1583                 false,
1584         },
1585         {
1586                 "eventlog_OpenEventLogW",
1587                 sizeof(struct eventlog_OpenEventLogW),
1588                 (ndr_push_flags_fn_t) ndr_push_eventlog_OpenEventLogW,
1589                 (ndr_pull_flags_fn_t) ndr_pull_eventlog_OpenEventLogW,
1590                 (ndr_print_function_t) ndr_print_eventlog_OpenEventLogW,
1591                 false,
1592         },
1593         {
1594                 "eventlog_RegisterEventSourceW",
1595                 sizeof(struct eventlog_RegisterEventSourceW),
1596                 (ndr_push_flags_fn_t) ndr_push_eventlog_RegisterEventSourceW,
1597                 (ndr_pull_flags_fn_t) ndr_pull_eventlog_RegisterEventSourceW,
1598                 (ndr_print_function_t) ndr_print_eventlog_RegisterEventSourceW,
1599                 false,
1600         },
1601         {
1602                 "eventlog_OpenBackupEventLogW",
1603                 sizeof(struct eventlog_OpenBackupEventLogW),
1604                 (ndr_push_flags_fn_t) ndr_push_eventlog_OpenBackupEventLogW,
1605                 (ndr_pull_flags_fn_t) ndr_pull_eventlog_OpenBackupEventLogW,
1606                 (ndr_print_function_t) ndr_print_eventlog_OpenBackupEventLogW,
1607                 false,
1608         },
1609         {
1610                 "eventlog_ReadEventLogW",
1611                 sizeof(struct eventlog_ReadEventLogW),
1612                 (ndr_push_flags_fn_t) ndr_push_eventlog_ReadEventLogW,
1613                 (ndr_pull_flags_fn_t) ndr_pull_eventlog_ReadEventLogW,
1614                 (ndr_print_function_t) ndr_print_eventlog_ReadEventLogW,
1615                 false,
1616         },
1617         {
1618                 "eventlog_ReportEventW",
1619                 sizeof(struct eventlog_ReportEventW),
1620                 (ndr_push_flags_fn_t) ndr_push_eventlog_ReportEventW,
1621                 (ndr_pull_flags_fn_t) ndr_pull_eventlog_ReportEventW,
1622                 (ndr_print_function_t) ndr_print_eventlog_ReportEventW,
1623                 false,
1624         },
1625         {
1626                 "eventlog_ClearEventLogA",
1627                 sizeof(struct eventlog_ClearEventLogA),
1628                 (ndr_push_flags_fn_t) ndr_push_eventlog_ClearEventLogA,
1629                 (ndr_pull_flags_fn_t) ndr_pull_eventlog_ClearEventLogA,
1630                 (ndr_print_function_t) ndr_print_eventlog_ClearEventLogA,
1631                 false,
1632         },
1633         {
1634                 "eventlog_BackupEventLogA",
1635                 sizeof(struct eventlog_BackupEventLogA),
1636                 (ndr_push_flags_fn_t) ndr_push_eventlog_BackupEventLogA,
1637                 (ndr_pull_flags_fn_t) ndr_pull_eventlog_BackupEventLogA,
1638                 (ndr_print_function_t) ndr_print_eventlog_BackupEventLogA,
1639                 false,
1640         },
1641         {
1642                 "eventlog_OpenEventLogA",
1643                 sizeof(struct eventlog_OpenEventLogA),
1644                 (ndr_push_flags_fn_t) ndr_push_eventlog_OpenEventLogA,
1645                 (ndr_pull_flags_fn_t) ndr_pull_eventlog_OpenEventLogA,
1646                 (ndr_print_function_t) ndr_print_eventlog_OpenEventLogA,
1647                 false,
1648         },
1649         {
1650                 "eventlog_RegisterEventSourceA",
1651                 sizeof(struct eventlog_RegisterEventSourceA),
1652                 (ndr_push_flags_fn_t) ndr_push_eventlog_RegisterEventSourceA,
1653                 (ndr_pull_flags_fn_t) ndr_pull_eventlog_RegisterEventSourceA,
1654                 (ndr_print_function_t) ndr_print_eventlog_RegisterEventSourceA,
1655                 false,
1656         },
1657         {
1658                 "eventlog_OpenBackupEventLogA",
1659                 sizeof(struct eventlog_OpenBackupEventLogA),
1660                 (ndr_push_flags_fn_t) ndr_push_eventlog_OpenBackupEventLogA,
1661                 (ndr_pull_flags_fn_t) ndr_pull_eventlog_OpenBackupEventLogA,
1662                 (ndr_print_function_t) ndr_print_eventlog_OpenBackupEventLogA,
1663                 false,
1664         },
1665         {
1666                 "eventlog_ReadEventLogA",
1667                 sizeof(struct eventlog_ReadEventLogA),
1668                 (ndr_push_flags_fn_t) ndr_push_eventlog_ReadEventLogA,
1669                 (ndr_pull_flags_fn_t) ndr_pull_eventlog_ReadEventLogA,
1670                 (ndr_print_function_t) ndr_print_eventlog_ReadEventLogA,
1671                 false,
1672         },
1673         {
1674                 "eventlog_ReportEventA",
1675                 sizeof(struct eventlog_ReportEventA),
1676                 (ndr_push_flags_fn_t) ndr_push_eventlog_ReportEventA,
1677                 (ndr_pull_flags_fn_t) ndr_pull_eventlog_ReportEventA,
1678                 (ndr_print_function_t) ndr_print_eventlog_ReportEventA,
1679                 false,
1680         },
1681         {
1682                 "eventlog_RegisterClusterSvc",
1683                 sizeof(struct eventlog_RegisterClusterSvc),
1684                 (ndr_push_flags_fn_t) ndr_push_eventlog_RegisterClusterSvc,
1685                 (ndr_pull_flags_fn_t) ndr_pull_eventlog_RegisterClusterSvc,
1686                 (ndr_print_function_t) ndr_print_eventlog_RegisterClusterSvc,
1687                 false,
1688         },
1689         {
1690                 "eventlog_DeregisterClusterSvc",
1691                 sizeof(struct eventlog_DeregisterClusterSvc),
1692                 (ndr_push_flags_fn_t) ndr_push_eventlog_DeregisterClusterSvc,
1693                 (ndr_pull_flags_fn_t) ndr_pull_eventlog_DeregisterClusterSvc,
1694                 (ndr_print_function_t) ndr_print_eventlog_DeregisterClusterSvc,
1695                 false,
1696         },
1697         {
1698                 "eventlog_WriteClusterEvents",
1699                 sizeof(struct eventlog_WriteClusterEvents),
1700                 (ndr_push_flags_fn_t) ndr_push_eventlog_WriteClusterEvents,
1701                 (ndr_pull_flags_fn_t) ndr_pull_eventlog_WriteClusterEvents,
1702                 (ndr_print_function_t) ndr_print_eventlog_WriteClusterEvents,
1703                 false,
1704         },
1705         {
1706                 "eventlog_GetLogIntormation",
1707                 sizeof(struct eventlog_GetLogIntormation),
1708                 (ndr_push_flags_fn_t) ndr_push_eventlog_GetLogIntormation,
1709                 (ndr_pull_flags_fn_t) ndr_pull_eventlog_GetLogIntormation,
1710                 (ndr_print_function_t) ndr_print_eventlog_GetLogIntormation,
1711                 false,
1712         },
1713         {
1714                 "eventlog_FlushEventLog",
1715                 sizeof(struct eventlog_FlushEventLog),
1716                 (ndr_push_flags_fn_t) ndr_push_eventlog_FlushEventLog,
1717                 (ndr_pull_flags_fn_t) ndr_pull_eventlog_FlushEventLog,
1718                 (ndr_print_function_t) ndr_print_eventlog_FlushEventLog,
1719                 false,
1720         },
1721         { NULL, 0, NULL, NULL, NULL, false }
1722 };
1723
1724 static const char * const eventlog_endpoint_strings[] = {
1725         "ncacn_np:[\\pipe\\eventlog]", 
1726 };
1727
1728 static const struct ndr_interface_string_array eventlog_endpoints = {
1729         .count  = 1,
1730         .names  = eventlog_endpoint_strings
1731 };
1732
1733 static const char * const eventlog_authservice_strings[] = {
1734         "host", 
1735 };
1736
1737 static const struct ndr_interface_string_array eventlog_authservices = {
1738         .count  = 1,
1739         .names  = eventlog_authservice_strings
1740 };
1741
1742
1743 const struct ndr_interface_table ndr_table_eventlog = {
1744         .name           = "eventlog",
1745         .syntax_id      = {
1746                 {0x82273fdc,0xe32a,0x18c3,{0x3f,0x78},{0x82,0x79,0x29,0xdc,0x23,0xea}},
1747                 NDR_EVENTLOG_VERSION
1748         },
1749         .helpstring     = NDR_EVENTLOG_HELPSTRING,
1750         .num_calls      = 24,
1751         .calls          = eventlog_calls,
1752         .endpoints      = &eventlog_endpoints,
1753         .authservices   = &eventlog_authservices
1754 };
1755