git add -f bin/default/librpc/gen_ndr/*.[ch] bin/default/source*/librpc/gen_ndr/...
[metze/samba/wip.git] / bin.gen_ndr / default / librpc / gen_ndr / ndr_eventlog6.c
1 /* parser auto-generated by pidl */
2
3 #include "includes.h"
4 #include "bin/default/librpc/gen_ndr/ndr_eventlog6.h"
5
6 #include "librpc/gen_ndr/ndr_misc.h"
7 static enum ndr_err_code ndr_push_eventlog6_RpcInfo(struct ndr_push *ndr, int ndr_flags, const struct eventlog6_RpcInfo *r)
8 {
9         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
10         if (ndr_flags & NDR_SCALARS) {
11                 NDR_CHECK(ndr_push_align(ndr, 4));
12                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->error));
13                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sub_err));
14                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sub_err_param));
15                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
16         }
17         if (ndr_flags & NDR_BUFFERS) {
18         }
19         return NDR_ERR_SUCCESS;
20 }
21
22 static enum ndr_err_code ndr_pull_eventlog6_RpcInfo(struct ndr_pull *ndr, int ndr_flags, struct eventlog6_RpcInfo *r)
23 {
24         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
25         if (ndr_flags & NDR_SCALARS) {
26                 NDR_CHECK(ndr_pull_align(ndr, 4));
27                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->error));
28                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sub_err));
29                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sub_err_param));
30                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
31         }
32         if (ndr_flags & NDR_BUFFERS) {
33         }
34         return NDR_ERR_SUCCESS;
35 }
36
37 _PUBLIC_ void ndr_print_eventlog6_RpcInfo(struct ndr_print *ndr, const char *name, const struct eventlog6_RpcInfo *r)
38 {
39         ndr_print_struct(ndr, name, "eventlog6_RpcInfo");
40         if (r == NULL) { ndr_print_null(ndr); return; }
41         ndr->depth++;
42         ndr_print_uint32(ndr, "error", r->error);
43         ndr_print_uint32(ndr, "sub_err", r->sub_err);
44         ndr_print_uint32(ndr, "sub_err_param", r->sub_err_param);
45         ndr->depth--;
46 }
47
48 static enum ndr_err_code ndr_push_eventlog6_boolean8Array(struct ndr_push *ndr, int ndr_flags, const struct eventlog6_boolean8Array *r)
49 {
50         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
51         if (ndr_flags & NDR_SCALARS) {
52                 NDR_CHECK(ndr_push_align(ndr, 5));
53                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
54                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ptr));
55                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
56         }
57         if (ndr_flags & NDR_BUFFERS) {
58                 if (r->ptr) {
59                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
60                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->ptr, r->count));
61                 }
62         }
63         return NDR_ERR_SUCCESS;
64 }
65
66 static enum ndr_err_code ndr_pull_eventlog6_boolean8Array(struct ndr_pull *ndr, int ndr_flags, struct eventlog6_boolean8Array *r)
67 {
68         uint32_t _ptr_ptr;
69         uint32_t size_ptr_1 = 0;
70         TALLOC_CTX *_mem_save_ptr_0;
71         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
72         if (ndr_flags & NDR_SCALARS) {
73                 NDR_CHECK(ndr_pull_align(ndr, 5));
74                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
75                 if (r->count > MAX_RPC_BOOLEAN8_ARRAY_COUNT) {
76                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
77                 }
78                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ptr));
79                 if (_ptr_ptr) {
80                         NDR_PULL_ALLOC(ndr, r->ptr);
81                 } else {
82                         r->ptr = NULL;
83                 }
84                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
85         }
86         if (ndr_flags & NDR_BUFFERS) {
87                 if (r->ptr) {
88                         _mem_save_ptr_0 = NDR_PULL_GET_MEM_CTX(ndr);
89                         NDR_PULL_SET_MEM_CTX(ndr, r->ptr, 0);
90                         NDR_CHECK(ndr_pull_array_size(ndr, &r->ptr));
91                         size_ptr_1 = ndr_get_array_size(ndr, &r->ptr);
92                         NDR_PULL_ALLOC_N(ndr, r->ptr, size_ptr_1);
93                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->ptr, size_ptr_1));
94                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ptr_0, 0);
95                 }
96                 if (r->ptr) {
97                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->ptr, r->count));
98                 }
99         }
100         return NDR_ERR_SUCCESS;
101 }
102
103 _PUBLIC_ void ndr_print_eventlog6_boolean8Array(struct ndr_print *ndr, const char *name, const struct eventlog6_boolean8Array *r)
104 {
105         ndr_print_struct(ndr, name, "eventlog6_boolean8Array");
106         if (r == NULL) { ndr_print_null(ndr); return; }
107         ndr->depth++;
108         ndr_print_uint32(ndr, "count", r->count);
109         ndr_print_ptr(ndr, "ptr", r->ptr);
110         ndr->depth++;
111         if (r->ptr) {
112                 ndr_print_array_uint8(ndr, "ptr", r->ptr, r->count);
113         }
114         ndr->depth--;
115         ndr->depth--;
116 }
117
118 static enum ndr_err_code ndr_push_eventlog6_UInt32Array(struct ndr_push *ndr, int ndr_flags, const struct eventlog6_UInt32Array *r)
119 {
120         uint32_t cntr_ptr_1;
121         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
122         if (ndr_flags & NDR_SCALARS) {
123                 NDR_CHECK(ndr_push_align(ndr, 5));
124                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
125                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ptr));
126                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
127         }
128         if (ndr_flags & NDR_BUFFERS) {
129                 if (r->ptr) {
130                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
131                         for (cntr_ptr_1 = 0; cntr_ptr_1 < r->count; cntr_ptr_1++) {
132                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ptr[cntr_ptr_1]));
133                         }
134                 }
135         }
136         return NDR_ERR_SUCCESS;
137 }
138
139 static enum ndr_err_code ndr_pull_eventlog6_UInt32Array(struct ndr_pull *ndr, int ndr_flags, struct eventlog6_UInt32Array *r)
140 {
141         uint32_t _ptr_ptr;
142         uint32_t size_ptr_1 = 0;
143         uint32_t cntr_ptr_1;
144         TALLOC_CTX *_mem_save_ptr_0;
145         TALLOC_CTX *_mem_save_ptr_1;
146         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
147         if (ndr_flags & NDR_SCALARS) {
148                 NDR_CHECK(ndr_pull_align(ndr, 5));
149                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
150                 if (r->count > MAX_RPC_UINT32_ARRAY_COUNT) {
151                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
152                 }
153                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ptr));
154                 if (_ptr_ptr) {
155                         NDR_PULL_ALLOC(ndr, r->ptr);
156                 } else {
157                         r->ptr = NULL;
158                 }
159                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
160         }
161         if (ndr_flags & NDR_BUFFERS) {
162                 if (r->ptr) {
163                         _mem_save_ptr_0 = NDR_PULL_GET_MEM_CTX(ndr);
164                         NDR_PULL_SET_MEM_CTX(ndr, r->ptr, 0);
165                         NDR_CHECK(ndr_pull_array_size(ndr, &r->ptr));
166                         size_ptr_1 = ndr_get_array_size(ndr, &r->ptr);
167                         NDR_PULL_ALLOC_N(ndr, r->ptr, size_ptr_1);
168                         _mem_save_ptr_1 = NDR_PULL_GET_MEM_CTX(ndr);
169                         NDR_PULL_SET_MEM_CTX(ndr, r->ptr, 0);
170                         for (cntr_ptr_1 = 0; cntr_ptr_1 < size_ptr_1; cntr_ptr_1++) {
171                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ptr[cntr_ptr_1]));
172                         }
173                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ptr_1, 0);
174                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ptr_0, 0);
175                 }
176                 if (r->ptr) {
177                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->ptr, r->count));
178                 }
179         }
180         return NDR_ERR_SUCCESS;
181 }
182
183 _PUBLIC_ void ndr_print_eventlog6_UInt32Array(struct ndr_print *ndr, const char *name, const struct eventlog6_UInt32Array *r)
184 {
185         uint32_t cntr_ptr_1;
186         ndr_print_struct(ndr, name, "eventlog6_UInt32Array");
187         if (r == NULL) { ndr_print_null(ndr); return; }
188         ndr->depth++;
189         ndr_print_uint32(ndr, "count", r->count);
190         ndr_print_ptr(ndr, "ptr", r->ptr);
191         ndr->depth++;
192         if (r->ptr) {
193                 ndr->print(ndr, "%s: ARRAY(%d)", "ptr", (int)r->count);
194                 ndr->depth++;
195                 for (cntr_ptr_1=0;cntr_ptr_1<r->count;cntr_ptr_1++) {
196                         ndr_print_uint32(ndr, "ptr", r->ptr[cntr_ptr_1]);
197                 }
198                 ndr->depth--;
199         }
200         ndr->depth--;
201         ndr->depth--;
202 }
203
204 static enum ndr_err_code ndr_push_eventlog6_UInt64Array(struct ndr_push *ndr, int ndr_flags, const struct eventlog6_UInt64Array *r)
205 {
206         uint32_t cntr_ptr_1;
207         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
208         if (ndr_flags & NDR_SCALARS) {
209                 NDR_CHECK(ndr_push_align(ndr, 5));
210                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
211                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ptr));
212                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
213         }
214         if (ndr_flags & NDR_BUFFERS) {
215                 if (r->ptr) {
216                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
217                         for (cntr_ptr_1 = 0; cntr_ptr_1 < r->count; cntr_ptr_1++) {
218                                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->ptr[cntr_ptr_1]));
219                         }
220                 }
221         }
222         return NDR_ERR_SUCCESS;
223 }
224
225 static enum ndr_err_code ndr_pull_eventlog6_UInt64Array(struct ndr_pull *ndr, int ndr_flags, struct eventlog6_UInt64Array *r)
226 {
227         uint32_t _ptr_ptr;
228         uint32_t size_ptr_1 = 0;
229         uint32_t cntr_ptr_1;
230         TALLOC_CTX *_mem_save_ptr_0;
231         TALLOC_CTX *_mem_save_ptr_1;
232         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
233         if (ndr_flags & NDR_SCALARS) {
234                 NDR_CHECK(ndr_pull_align(ndr, 5));
235                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
236                 if (r->count > MAX_RPC_UINT64_ARRAY_COUNT) {
237                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
238                 }
239                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ptr));
240                 if (_ptr_ptr) {
241                         NDR_PULL_ALLOC(ndr, r->ptr);
242                 } else {
243                         r->ptr = NULL;
244                 }
245                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
246         }
247         if (ndr_flags & NDR_BUFFERS) {
248                 if (r->ptr) {
249                         _mem_save_ptr_0 = NDR_PULL_GET_MEM_CTX(ndr);
250                         NDR_PULL_SET_MEM_CTX(ndr, r->ptr, 0);
251                         NDR_CHECK(ndr_pull_array_size(ndr, &r->ptr));
252                         size_ptr_1 = ndr_get_array_size(ndr, &r->ptr);
253                         NDR_PULL_ALLOC_N(ndr, r->ptr, size_ptr_1);
254                         _mem_save_ptr_1 = NDR_PULL_GET_MEM_CTX(ndr);
255                         NDR_PULL_SET_MEM_CTX(ndr, r->ptr, 0);
256                         for (cntr_ptr_1 = 0; cntr_ptr_1 < size_ptr_1; cntr_ptr_1++) {
257                                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->ptr[cntr_ptr_1]));
258                         }
259                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ptr_1, 0);
260                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ptr_0, 0);
261                 }
262                 if (r->ptr) {
263                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->ptr, r->count));
264                 }
265         }
266         return NDR_ERR_SUCCESS;
267 }
268
269 _PUBLIC_ void ndr_print_eventlog6_UInt64Array(struct ndr_print *ndr, const char *name, const struct eventlog6_UInt64Array *r)
270 {
271         uint32_t cntr_ptr_1;
272         ndr_print_struct(ndr, name, "eventlog6_UInt64Array");
273         if (r == NULL) { ndr_print_null(ndr); return; }
274         ndr->depth++;
275         ndr_print_uint32(ndr, "count", r->count);
276         ndr_print_ptr(ndr, "ptr", r->ptr);
277         ndr->depth++;
278         if (r->ptr) {
279                 ndr->print(ndr, "%s: ARRAY(%d)", "ptr", (int)r->count);
280                 ndr->depth++;
281                 for (cntr_ptr_1=0;cntr_ptr_1<r->count;cntr_ptr_1++) {
282                         ndr_print_hyper(ndr, "ptr", r->ptr[cntr_ptr_1]);
283                 }
284                 ndr->depth--;
285         }
286         ndr->depth--;
287         ndr->depth--;
288 }
289
290 static enum ndr_err_code ndr_push_eventlog6_StringArray(struct ndr_push *ndr, int ndr_flags, const struct eventlog6_StringArray *r)
291 {
292         uint32_t cntr_ptr_1;
293         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
294         if (ndr_flags & NDR_SCALARS) {
295                 NDR_CHECK(ndr_push_align(ndr, 5));
296                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
297                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ptr));
298                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
299         }
300         if (ndr_flags & NDR_BUFFERS) {
301                 if (r->ptr) {
302                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
303                         for (cntr_ptr_1 = 0; cntr_ptr_1 < r->count; cntr_ptr_1++) {
304                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ptr[cntr_ptr_1]));
305                         }
306                         for (cntr_ptr_1 = 0; cntr_ptr_1 < r->count; cntr_ptr_1++) {
307                                 if (r->ptr[cntr_ptr_1]) {
308                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->ptr[cntr_ptr_1], CH_UTF16)));
309                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
310                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->ptr[cntr_ptr_1], CH_UTF16)));
311                                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->ptr[cntr_ptr_1], ndr_charset_length(r->ptr[cntr_ptr_1], CH_UTF16), sizeof(uint16_t), CH_UTF16));
312                                 }
313                         }
314                 }
315         }
316         return NDR_ERR_SUCCESS;
317 }
318
319 static enum ndr_err_code ndr_pull_eventlog6_StringArray(struct ndr_pull *ndr, int ndr_flags, struct eventlog6_StringArray *r)
320 {
321         uint32_t _ptr_ptr;
322         uint32_t size_ptr_1 = 0;
323         uint32_t cntr_ptr_1;
324         uint32_t size_ptr_3 = 0;
325         uint32_t length_ptr_3 = 0;
326         TALLOC_CTX *_mem_save_ptr_0;
327         TALLOC_CTX *_mem_save_ptr_1;
328         TALLOC_CTX *_mem_save_ptr_2;
329         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
330         if (ndr_flags & NDR_SCALARS) {
331                 NDR_CHECK(ndr_pull_align(ndr, 5));
332                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
333                 if (r->count > MAX_RPC_STRING_ARRAY_COUNT) {
334                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
335                 }
336                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ptr));
337                 if (_ptr_ptr) {
338                         NDR_PULL_ALLOC(ndr, r->ptr);
339                 } else {
340                         r->ptr = NULL;
341                 }
342                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
343         }
344         if (ndr_flags & NDR_BUFFERS) {
345                 if (r->ptr) {
346                         _mem_save_ptr_0 = NDR_PULL_GET_MEM_CTX(ndr);
347                         NDR_PULL_SET_MEM_CTX(ndr, r->ptr, 0);
348                         NDR_CHECK(ndr_pull_array_size(ndr, &r->ptr));
349                         size_ptr_1 = ndr_get_array_size(ndr, &r->ptr);
350                         NDR_PULL_ALLOC_N(ndr, r->ptr, size_ptr_1);
351                         _mem_save_ptr_1 = NDR_PULL_GET_MEM_CTX(ndr);
352                         NDR_PULL_SET_MEM_CTX(ndr, r->ptr, 0);
353                         for (cntr_ptr_1 = 0; cntr_ptr_1 < size_ptr_1; cntr_ptr_1++) {
354                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ptr));
355                                 if (_ptr_ptr) {
356                                         NDR_PULL_ALLOC(ndr, r->ptr[cntr_ptr_1]);
357                                 } else {
358                                         r->ptr[cntr_ptr_1] = NULL;
359                                 }
360                         }
361                         for (cntr_ptr_1 = 0; cntr_ptr_1 < size_ptr_1; cntr_ptr_1++) {
362                                 if (r->ptr[cntr_ptr_1]) {
363                                         _mem_save_ptr_2 = NDR_PULL_GET_MEM_CTX(ndr);
364                                         NDR_PULL_SET_MEM_CTX(ndr, r->ptr[cntr_ptr_1], 0);
365                                         NDR_CHECK(ndr_pull_array_size(ndr, &r->ptr[cntr_ptr_1]));
366                                         NDR_CHECK(ndr_pull_array_length(ndr, &r->ptr[cntr_ptr_1]));
367                                         size_ptr_3 = ndr_get_array_size(ndr, &r->ptr[cntr_ptr_1]);
368                                         length_ptr_3 = ndr_get_array_length(ndr, &r->ptr[cntr_ptr_1]);
369                                         if (length_ptr_3 > size_ptr_3) {
370                                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_ptr_3, length_ptr_3);
371                                         }
372                                         NDR_CHECK(ndr_check_string_terminator(ndr, length_ptr_3, sizeof(uint16_t)));
373                                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->ptr[cntr_ptr_1], length_ptr_3, sizeof(uint16_t), CH_UTF16));
374                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ptr_2, 0);
375                                 }
376                         }
377                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ptr_1, 0);
378                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ptr_0, 0);
379                 }
380                 if (r->ptr) {
381                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->ptr, r->count));
382                 }
383         }
384         return NDR_ERR_SUCCESS;
385 }
386
387 _PUBLIC_ void ndr_print_eventlog6_StringArray(struct ndr_print *ndr, const char *name, const struct eventlog6_StringArray *r)
388 {
389         uint32_t cntr_ptr_1;
390         ndr_print_struct(ndr, name, "eventlog6_StringArray");
391         if (r == NULL) { ndr_print_null(ndr); return; }
392         ndr->depth++;
393         ndr_print_uint32(ndr, "count", r->count);
394         ndr_print_ptr(ndr, "ptr", r->ptr);
395         ndr->depth++;
396         if (r->ptr) {
397                 ndr->print(ndr, "%s: ARRAY(%d)", "ptr", (int)r->count);
398                 ndr->depth++;
399                 for (cntr_ptr_1=0;cntr_ptr_1<r->count;cntr_ptr_1++) {
400                         ndr_print_ptr(ndr, "ptr", r->ptr[cntr_ptr_1]);
401                         ndr->depth++;
402                         if (r->ptr[cntr_ptr_1]) {
403                                 ndr_print_string(ndr, "ptr", r->ptr[cntr_ptr_1]);
404                         }
405                         ndr->depth--;
406                 }
407                 ndr->depth--;
408         }
409         ndr->depth--;
410         ndr->depth--;
411 }
412
413 static enum ndr_err_code ndr_push_eventlog6_GuidArray(struct ndr_push *ndr, int ndr_flags, const struct eventlog6_GuidArray *r)
414 {
415         uint32_t cntr_ptr_1;
416         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
417         if (ndr_flags & NDR_SCALARS) {
418                 NDR_CHECK(ndr_push_align(ndr, 5));
419                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
420                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ptr));
421                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
422         }
423         if (ndr_flags & NDR_BUFFERS) {
424                 if (r->ptr) {
425                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
426                         for (cntr_ptr_1 = 0; cntr_ptr_1 < r->count; cntr_ptr_1++) {
427                                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->ptr[cntr_ptr_1]));
428                         }
429                 }
430         }
431         return NDR_ERR_SUCCESS;
432 }
433
434 static enum ndr_err_code ndr_pull_eventlog6_GuidArray(struct ndr_pull *ndr, int ndr_flags, struct eventlog6_GuidArray *r)
435 {
436         uint32_t _ptr_ptr;
437         uint32_t size_ptr_1 = 0;
438         uint32_t cntr_ptr_1;
439         TALLOC_CTX *_mem_save_ptr_0;
440         TALLOC_CTX *_mem_save_ptr_1;
441         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
442         if (ndr_flags & NDR_SCALARS) {
443                 NDR_CHECK(ndr_pull_align(ndr, 5));
444                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
445                 if (r->count > MAX_RPC_GUID_ARRAY_COUNT) {
446                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
447                 }
448                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ptr));
449                 if (_ptr_ptr) {
450                         NDR_PULL_ALLOC(ndr, r->ptr);
451                 } else {
452                         r->ptr = NULL;
453                 }
454                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
455         }
456         if (ndr_flags & NDR_BUFFERS) {
457                 if (r->ptr) {
458                         _mem_save_ptr_0 = NDR_PULL_GET_MEM_CTX(ndr);
459                         NDR_PULL_SET_MEM_CTX(ndr, r->ptr, 0);
460                         NDR_CHECK(ndr_pull_array_size(ndr, &r->ptr));
461                         size_ptr_1 = ndr_get_array_size(ndr, &r->ptr);
462                         NDR_PULL_ALLOC_N(ndr, r->ptr, size_ptr_1);
463                         _mem_save_ptr_1 = NDR_PULL_GET_MEM_CTX(ndr);
464                         NDR_PULL_SET_MEM_CTX(ndr, r->ptr, 0);
465                         for (cntr_ptr_1 = 0; cntr_ptr_1 < size_ptr_1; cntr_ptr_1++) {
466                                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->ptr[cntr_ptr_1]));
467                         }
468                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ptr_1, 0);
469                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ptr_0, 0);
470                 }
471                 if (r->ptr) {
472                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->ptr, r->count));
473                 }
474         }
475         return NDR_ERR_SUCCESS;
476 }
477
478 _PUBLIC_ void ndr_print_eventlog6_GuidArray(struct ndr_print *ndr, const char *name, const struct eventlog6_GuidArray *r)
479 {
480         uint32_t cntr_ptr_1;
481         ndr_print_struct(ndr, name, "eventlog6_GuidArray");
482         if (r == NULL) { ndr_print_null(ndr); return; }
483         ndr->depth++;
484         ndr_print_uint32(ndr, "count", r->count);
485         ndr_print_ptr(ndr, "ptr", r->ptr);
486         ndr->depth++;
487         if (r->ptr) {
488                 ndr->print(ndr, "%s: ARRAY(%d)", "ptr", (int)r->count);
489                 ndr->depth++;
490                 for (cntr_ptr_1=0;cntr_ptr_1<r->count;cntr_ptr_1++) {
491                         ndr_print_GUID(ndr, "ptr", &r->ptr[cntr_ptr_1]);
492                 }
493                 ndr->depth--;
494         }
495         ndr->depth--;
496         ndr->depth--;
497 }
498
499 static enum ndr_err_code ndr_push_eventlog6_EvtRpcVariantType(struct ndr_push *ndr, int ndr_flags, enum eventlog6_EvtRpcVariantType r)
500 {
501         NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
502         return NDR_ERR_SUCCESS;
503 }
504
505 static enum ndr_err_code ndr_pull_eventlog6_EvtRpcVariantType(struct ndr_pull *ndr, int ndr_flags, enum eventlog6_EvtRpcVariantType *r)
506 {
507         uint32_t v;
508         NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
509         *r = v;
510         return NDR_ERR_SUCCESS;
511 }
512
513 _PUBLIC_ void ndr_print_eventlog6_EvtRpcVariantType(struct ndr_print *ndr, const char *name, enum eventlog6_EvtRpcVariantType r)
514 {
515         const char *val = NULL;
516
517         switch (r) {
518                 case EvtRpcVarTypeNull: val = "EvtRpcVarTypeNull"; break;
519                 case EvtRpcVarTypeboolean8: val = "EvtRpcVarTypeboolean8"; break;
520                 case EvtRpcVarTypeUInt32: val = "EvtRpcVarTypeUInt32"; break;
521                 case EvtRpcVarTypeUInt64: val = "EvtRpcVarTypeUInt64"; break;
522                 case EvtRpcVarTypeString: val = "EvtRpcVarTypeString"; break;
523                 case EvtRpcVarTypeGuid: val = "EvtRpcVarTypeGuid"; break;
524                 case EvtRpcVarTypeboolean8Array: val = "EvtRpcVarTypeboolean8Array"; break;
525                 case EvtRpcVarTypeUInt32Array: val = "EvtRpcVarTypeUInt32Array"; break;
526                 case EvtRpcVarTypeUInt64Array: val = "EvtRpcVarTypeUInt64Array"; break;
527                 case EvtRpcVarTypeStringArray: val = "EvtRpcVarTypeStringArray"; break;
528                 case EvtRpcVarTypeGuidArray: val = "EvtRpcVarTypeGuidArray"; break;
529         }
530         ndr_print_enum(ndr, name, "ENUM", val, r);
531 }
532
533 static enum ndr_err_code ndr_push_eventlog6_EvtRpcVariantUnion(struct ndr_push *ndr, int ndr_flags, const union eventlog6_EvtRpcVariantUnion *r)
534 {
535         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
536         if (ndr_flags & NDR_SCALARS) {
537                 uint32_t level = ndr_push_get_switch_value(ndr, r);
538                 NDR_CHECK(ndr_push_union_align(ndr, 8));
539                 NDR_CHECK(ndr_push_eventlog6_EvtRpcVariantType(ndr, NDR_SCALARS, level));
540                 NDR_CHECK(ndr_push_union_align(ndr, 8));
541                 switch (level) {
542                         case EvtRpcVarTypeNull: {
543                                 NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, r->nullVal));
544                         break; }
545
546                         case EvtRpcVarTypeboolean8: {
547                                 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->boolean8Val));
548                         break; }
549
550                         case EvtRpcVarTypeUInt32: {
551                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->uint32Val));
552                         break; }
553
554                         case EvtRpcVarTypeUInt64: {
555                                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->uint64Val));
556                         break; }
557
558                         case EvtRpcVarTypeString: {
559                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->stringVal));
560                         break; }
561
562                         case EvtRpcVarTypeGuid: {
563                                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->guidVal));
564                         break; }
565
566                         case EvtRpcVarTypeboolean8Array: {
567                                 NDR_CHECK(ndr_push_eventlog6_boolean8Array(ndr, NDR_SCALARS, &r->boolean8Array));
568                         break; }
569
570                         case EvtRpcVarTypeUInt32Array: {
571                                 NDR_CHECK(ndr_push_eventlog6_UInt32Array(ndr, NDR_SCALARS, &r->uint32Array));
572                         break; }
573
574                         case EvtRpcVarTypeUInt64Array: {
575                                 NDR_CHECK(ndr_push_eventlog6_UInt64Array(ndr, NDR_SCALARS, &r->uint64Array));
576                         break; }
577
578                         case EvtRpcVarTypeStringArray: {
579                                 NDR_CHECK(ndr_push_eventlog6_StringArray(ndr, NDR_SCALARS, &r->stringArray));
580                         break; }
581
582                         case EvtRpcVarTypeGuidArray: {
583                                 NDR_CHECK(ndr_push_eventlog6_GuidArray(ndr, NDR_SCALARS, &r->guidArray));
584                         break; }
585
586                         default:
587                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
588                 }
589         }
590         if (ndr_flags & NDR_BUFFERS) {
591                 uint32_t level = ndr_push_get_switch_value(ndr, r);
592                 switch (level) {
593                         case EvtRpcVarTypeNull:
594                         break;
595
596                         case EvtRpcVarTypeboolean8:
597                         break;
598
599                         case EvtRpcVarTypeUInt32:
600                         break;
601
602                         case EvtRpcVarTypeUInt64:
603                         break;
604
605                         case EvtRpcVarTypeString:
606                                 if (r->stringVal) {
607                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->stringVal, CH_UTF16)));
608                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
609                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->stringVal, CH_UTF16)));
610                                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->stringVal, ndr_charset_length(r->stringVal, CH_UTF16), sizeof(uint16_t), CH_UTF16));
611                                 }
612                         break;
613
614                         case EvtRpcVarTypeGuid:
615                                 if (r->guidVal) {
616                                         NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->guidVal));
617                                 }
618                         break;
619
620                         case EvtRpcVarTypeboolean8Array:
621                                 NDR_CHECK(ndr_push_eventlog6_boolean8Array(ndr, NDR_BUFFERS, &r->boolean8Array));
622                         break;
623
624                         case EvtRpcVarTypeUInt32Array:
625                                 NDR_CHECK(ndr_push_eventlog6_UInt32Array(ndr, NDR_BUFFERS, &r->uint32Array));
626                         break;
627
628                         case EvtRpcVarTypeUInt64Array:
629                                 NDR_CHECK(ndr_push_eventlog6_UInt64Array(ndr, NDR_BUFFERS, &r->uint64Array));
630                         break;
631
632                         case EvtRpcVarTypeStringArray:
633                                 NDR_CHECK(ndr_push_eventlog6_StringArray(ndr, NDR_BUFFERS, &r->stringArray));
634                         break;
635
636                         case EvtRpcVarTypeGuidArray:
637                                 NDR_CHECK(ndr_push_eventlog6_GuidArray(ndr, NDR_BUFFERS, &r->guidArray));
638                         break;
639
640                         default:
641                                 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
642                 }
643         }
644         return NDR_ERR_SUCCESS;
645 }
646
647 static enum ndr_err_code ndr_pull_eventlog6_EvtRpcVariantUnion(struct ndr_pull *ndr, int ndr_flags, union eventlog6_EvtRpcVariantUnion *r)
648 {
649         uint32_t level;
650         uint32_t _level;
651         TALLOC_CTX *_mem_save_stringVal_0;
652         uint32_t _ptr_stringVal;
653         uint32_t size_stringVal_1 = 0;
654         uint32_t length_stringVal_1 = 0;
655         TALLOC_CTX *_mem_save_guidVal_0;
656         uint32_t _ptr_guidVal;
657         level = ndr_pull_get_switch_value(ndr, r);
658         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
659         if (ndr_flags & NDR_SCALARS) {
660                 NDR_CHECK(ndr_pull_union_align(ndr, 8));
661                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
662                 if (_level != level) {
663                         return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
664                 }
665                 NDR_CHECK(ndr_pull_union_align(ndr, 8));
666                 switch (level) {
667                         case EvtRpcVarTypeNull: {
668                                 NDR_CHECK(ndr_pull_int32(ndr, NDR_SCALARS, &r->nullVal));
669                         break; }
670
671                         case EvtRpcVarTypeboolean8: {
672                                 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->boolean8Val));
673                         break; }
674
675                         case EvtRpcVarTypeUInt32: {
676                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->uint32Val));
677                         break; }
678
679                         case EvtRpcVarTypeUInt64: {
680                                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->uint64Val));
681                         break; }
682
683                         case EvtRpcVarTypeString: {
684                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_stringVal));
685                                 if (_ptr_stringVal) {
686                                         NDR_PULL_ALLOC(ndr, r->stringVal);
687                                 } else {
688                                         r->stringVal = NULL;
689                                 }
690                         break; }
691
692                         case EvtRpcVarTypeGuid: {
693                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_guidVal));
694                                 if (_ptr_guidVal) {
695                                         NDR_PULL_ALLOC(ndr, r->guidVal);
696                                 } else {
697                                         r->guidVal = NULL;
698                                 }
699                         break; }
700
701                         case EvtRpcVarTypeboolean8Array: {
702                                 NDR_CHECK(ndr_pull_eventlog6_boolean8Array(ndr, NDR_SCALARS, &r->boolean8Array));
703                         break; }
704
705                         case EvtRpcVarTypeUInt32Array: {
706                                 NDR_CHECK(ndr_pull_eventlog6_UInt32Array(ndr, NDR_SCALARS, &r->uint32Array));
707                         break; }
708
709                         case EvtRpcVarTypeUInt64Array: {
710                                 NDR_CHECK(ndr_pull_eventlog6_UInt64Array(ndr, NDR_SCALARS, &r->uint64Array));
711                         break; }
712
713                         case EvtRpcVarTypeStringArray: {
714                                 NDR_CHECK(ndr_pull_eventlog6_StringArray(ndr, NDR_SCALARS, &r->stringArray));
715                         break; }
716
717                         case EvtRpcVarTypeGuidArray: {
718                                 NDR_CHECK(ndr_pull_eventlog6_GuidArray(ndr, NDR_SCALARS, &r->guidArray));
719                         break; }
720
721                         default:
722                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
723                 }
724         }
725         if (ndr_flags & NDR_BUFFERS) {
726                 switch (level) {
727                         case EvtRpcVarTypeNull:
728                         break;
729
730                         case EvtRpcVarTypeboolean8:
731                         break;
732
733                         case EvtRpcVarTypeUInt32:
734                         break;
735
736                         case EvtRpcVarTypeUInt64:
737                         break;
738
739                         case EvtRpcVarTypeString:
740                                 if (r->stringVal) {
741                                         _mem_save_stringVal_0 = NDR_PULL_GET_MEM_CTX(ndr);
742                                         NDR_PULL_SET_MEM_CTX(ndr, r->stringVal, 0);
743                                         NDR_CHECK(ndr_pull_array_size(ndr, &r->stringVal));
744                                         NDR_CHECK(ndr_pull_array_length(ndr, &r->stringVal));
745                                         size_stringVal_1 = ndr_get_array_size(ndr, &r->stringVal);
746                                         length_stringVal_1 = ndr_get_array_length(ndr, &r->stringVal);
747                                         if (length_stringVal_1 > size_stringVal_1) {
748                                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_stringVal_1, length_stringVal_1);
749                                         }
750                                         NDR_CHECK(ndr_check_string_terminator(ndr, length_stringVal_1, sizeof(uint16_t)));
751                                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->stringVal, length_stringVal_1, sizeof(uint16_t), CH_UTF16));
752                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stringVal_0, 0);
753                                 }
754                         break;
755
756                         case EvtRpcVarTypeGuid:
757                                 if (r->guidVal) {
758                                         _mem_save_guidVal_0 = NDR_PULL_GET_MEM_CTX(ndr);
759                                         NDR_PULL_SET_MEM_CTX(ndr, r->guidVal, 0);
760                                         NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->guidVal));
761                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_guidVal_0, 0);
762                                 }
763                         break;
764
765                         case EvtRpcVarTypeboolean8Array:
766                                 NDR_CHECK(ndr_pull_eventlog6_boolean8Array(ndr, NDR_BUFFERS, &r->boolean8Array));
767                         break;
768
769                         case EvtRpcVarTypeUInt32Array:
770                                 NDR_CHECK(ndr_pull_eventlog6_UInt32Array(ndr, NDR_BUFFERS, &r->uint32Array));
771                         break;
772
773                         case EvtRpcVarTypeUInt64Array:
774                                 NDR_CHECK(ndr_pull_eventlog6_UInt64Array(ndr, NDR_BUFFERS, &r->uint64Array));
775                         break;
776
777                         case EvtRpcVarTypeStringArray:
778                                 NDR_CHECK(ndr_pull_eventlog6_StringArray(ndr, NDR_BUFFERS, &r->stringArray));
779                         break;
780
781                         case EvtRpcVarTypeGuidArray:
782                                 NDR_CHECK(ndr_pull_eventlog6_GuidArray(ndr, NDR_BUFFERS, &r->guidArray));
783                         break;
784
785                         default:
786                                 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
787                 }
788         }
789         return NDR_ERR_SUCCESS;
790 }
791
792 _PUBLIC_ void ndr_print_eventlog6_EvtRpcVariantUnion(struct ndr_print *ndr, const char *name, const union eventlog6_EvtRpcVariantUnion *r)
793 {
794         uint32_t level;
795         level = ndr_print_get_switch_value(ndr, r);
796         ndr_print_union(ndr, name, level, "eventlog6_EvtRpcVariantUnion");
797         switch (level) {
798                 case EvtRpcVarTypeNull:
799                         ndr_print_int32(ndr, "nullVal", r->nullVal);
800                 break;
801
802                 case EvtRpcVarTypeboolean8:
803                         ndr_print_uint8(ndr, "boolean8Val", r->boolean8Val);
804                 break;
805
806                 case EvtRpcVarTypeUInt32:
807                         ndr_print_uint32(ndr, "uint32Val", r->uint32Val);
808                 break;
809
810                 case EvtRpcVarTypeUInt64:
811                         ndr_print_hyper(ndr, "uint64Val", r->uint64Val);
812                 break;
813
814                 case EvtRpcVarTypeString:
815                         ndr_print_ptr(ndr, "stringVal", r->stringVal);
816                         ndr->depth++;
817                         if (r->stringVal) {
818                                 ndr_print_string(ndr, "stringVal", r->stringVal);
819                         }
820                         ndr->depth--;
821                 break;
822
823                 case EvtRpcVarTypeGuid:
824                         ndr_print_ptr(ndr, "guidVal", r->guidVal);
825                         ndr->depth++;
826                         if (r->guidVal) {
827                                 ndr_print_GUID(ndr, "guidVal", r->guidVal);
828                         }
829                         ndr->depth--;
830                 break;
831
832                 case EvtRpcVarTypeboolean8Array:
833                         ndr_print_eventlog6_boolean8Array(ndr, "boolean8Array", &r->boolean8Array);
834                 break;
835
836                 case EvtRpcVarTypeUInt32Array:
837                         ndr_print_eventlog6_UInt32Array(ndr, "uint32Array", &r->uint32Array);
838                 break;
839
840                 case EvtRpcVarTypeUInt64Array:
841                         ndr_print_eventlog6_UInt64Array(ndr, "uint64Array", &r->uint64Array);
842                 break;
843
844                 case EvtRpcVarTypeStringArray:
845                         ndr_print_eventlog6_StringArray(ndr, "stringArray", &r->stringArray);
846                 break;
847
848                 case EvtRpcVarTypeGuidArray:
849                         ndr_print_eventlog6_GuidArray(ndr, "guidArray", &r->guidArray);
850                 break;
851
852                 default:
853                         ndr_print_bad_level(ndr, name, level);
854         }
855 }
856
857 static enum ndr_err_code ndr_push_eventlog6_EvtRpcVariant(struct ndr_push *ndr, int ndr_flags, const struct eventlog6_EvtRpcVariant *r)
858 {
859         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
860         if (ndr_flags & NDR_SCALARS) {
861                 NDR_CHECK(ndr_push_align(ndr, 5));
862                 NDR_CHECK(ndr_push_eventlog6_EvtRpcVariantType(ndr, NDR_SCALARS, r->type));
863                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags));
864                 if (r->var == NULL) {
865                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
866                 }
867                 NDR_CHECK(ndr_push_ref_ptr(ndr));
868                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
869         }
870         if (ndr_flags & NDR_BUFFERS) {
871                 NDR_CHECK(ndr_push_set_switch_value(ndr, r->var, r->type));
872                 NDR_CHECK(ndr_push_eventlog6_EvtRpcVariantUnion(ndr, NDR_SCALARS|NDR_BUFFERS, r->var));
873         }
874         return NDR_ERR_SUCCESS;
875 }
876
877 static enum ndr_err_code ndr_pull_eventlog6_EvtRpcVariant(struct ndr_pull *ndr, int ndr_flags, struct eventlog6_EvtRpcVariant *r)
878 {
879         uint32_t _ptr_var;
880         TALLOC_CTX *_mem_save_var_0;
881         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
882         if (ndr_flags & NDR_SCALARS) {
883                 NDR_CHECK(ndr_pull_align(ndr, 5));
884                 NDR_CHECK(ndr_pull_eventlog6_EvtRpcVariantType(ndr, NDR_SCALARS, &r->type));
885                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
886                 NDR_CHECK(ndr_pull_ref_ptr(ndr, &_ptr_var));
887                 if (_ptr_var) {
888                         NDR_PULL_ALLOC(ndr, r->var);
889                 } else {
890                         r->var = NULL;
891                 }
892                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
893         }
894         if (ndr_flags & NDR_BUFFERS) {
895                 _mem_save_var_0 = NDR_PULL_GET_MEM_CTX(ndr);
896                 NDR_PULL_SET_MEM_CTX(ndr, r->var, 0);
897                 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->var, r->type));
898                 NDR_CHECK(ndr_pull_eventlog6_EvtRpcVariantUnion(ndr, NDR_SCALARS|NDR_BUFFERS, r->var));
899                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_var_0, 0);
900         }
901         return NDR_ERR_SUCCESS;
902 }
903
904 _PUBLIC_ void ndr_print_eventlog6_EvtRpcVariant(struct ndr_print *ndr, const char *name, const struct eventlog6_EvtRpcVariant *r)
905 {
906         ndr_print_struct(ndr, name, "eventlog6_EvtRpcVariant");
907         if (r == NULL) { ndr_print_null(ndr); return; }
908         ndr->depth++;
909         ndr_print_eventlog6_EvtRpcVariantType(ndr, "type", r->type);
910         ndr_print_uint32(ndr, "flags", r->flags);
911         ndr_print_ptr(ndr, "var", r->var);
912         ndr->depth++;
913         ndr_print_set_switch_value(ndr, r->var, r->type);
914         ndr_print_eventlog6_EvtRpcVariantUnion(ndr, "var", r->var);
915         ndr->depth--;
916         ndr->depth--;
917 }
918
919 static enum ndr_err_code ndr_push_eventlog6_EvtRpcVariantList(struct ndr_push *ndr, int ndr_flags, const struct eventlog6_EvtRpcVariantList *r)
920 {
921         uint32_t cntr_props_1;
922         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
923         if (ndr_flags & NDR_SCALARS) {
924                 NDR_CHECK(ndr_push_align(ndr, 5));
925                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
926                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->props));
927                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
928         }
929         if (ndr_flags & NDR_BUFFERS) {
930                 if (r->props) {
931                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
932                         for (cntr_props_1 = 0; cntr_props_1 < r->count; cntr_props_1++) {
933                                 NDR_CHECK(ndr_push_eventlog6_EvtRpcVariant(ndr, NDR_SCALARS, &r->props[cntr_props_1]));
934                         }
935                         for (cntr_props_1 = 0; cntr_props_1 < r->count; cntr_props_1++) {
936                                 NDR_CHECK(ndr_push_eventlog6_EvtRpcVariant(ndr, NDR_BUFFERS, &r->props[cntr_props_1]));
937                         }
938                 }
939         }
940         return NDR_ERR_SUCCESS;
941 }
942
943 static enum ndr_err_code ndr_pull_eventlog6_EvtRpcVariantList(struct ndr_pull *ndr, int ndr_flags, struct eventlog6_EvtRpcVariantList *r)
944 {
945         uint32_t _ptr_props;
946         uint32_t size_props_1 = 0;
947         uint32_t cntr_props_1;
948         TALLOC_CTX *_mem_save_props_0;
949         TALLOC_CTX *_mem_save_props_1;
950         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
951         if (ndr_flags & NDR_SCALARS) {
952                 NDR_CHECK(ndr_pull_align(ndr, 5));
953                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
954                 if (r->count > MAX_RPC_VARIANT_LIST_COUNT) {
955                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
956                 }
957                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_props));
958                 if (_ptr_props) {
959                         NDR_PULL_ALLOC(ndr, r->props);
960                 } else {
961                         r->props = NULL;
962                 }
963                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
964         }
965         if (ndr_flags & NDR_BUFFERS) {
966                 if (r->props) {
967                         _mem_save_props_0 = NDR_PULL_GET_MEM_CTX(ndr);
968                         NDR_PULL_SET_MEM_CTX(ndr, r->props, 0);
969                         NDR_CHECK(ndr_pull_array_size(ndr, &r->props));
970                         size_props_1 = ndr_get_array_size(ndr, &r->props);
971                         NDR_PULL_ALLOC_N(ndr, r->props, size_props_1);
972                         _mem_save_props_1 = NDR_PULL_GET_MEM_CTX(ndr);
973                         NDR_PULL_SET_MEM_CTX(ndr, r->props, 0);
974                         for (cntr_props_1 = 0; cntr_props_1 < size_props_1; cntr_props_1++) {
975                                 NDR_CHECK(ndr_pull_eventlog6_EvtRpcVariant(ndr, NDR_SCALARS, &r->props[cntr_props_1]));
976                         }
977                         for (cntr_props_1 = 0; cntr_props_1 < size_props_1; cntr_props_1++) {
978                                 NDR_CHECK(ndr_pull_eventlog6_EvtRpcVariant(ndr, NDR_BUFFERS, &r->props[cntr_props_1]));
979                         }
980                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_props_1, 0);
981                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_props_0, 0);
982                 }
983                 if (r->props) {
984                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->props, r->count));
985                 }
986         }
987         return NDR_ERR_SUCCESS;
988 }
989
990 _PUBLIC_ void ndr_print_eventlog6_EvtRpcVariantList(struct ndr_print *ndr, const char *name, const struct eventlog6_EvtRpcVariantList *r)
991 {
992         uint32_t cntr_props_1;
993         ndr_print_struct(ndr, name, "eventlog6_EvtRpcVariantList");
994         if (r == NULL) { ndr_print_null(ndr); return; }
995         ndr->depth++;
996         ndr_print_uint32(ndr, "count", r->count);
997         ndr_print_ptr(ndr, "props", r->props);
998         ndr->depth++;
999         if (r->props) {
1000                 ndr->print(ndr, "%s: ARRAY(%d)", "props", (int)r->count);
1001                 ndr->depth++;
1002                 for (cntr_props_1=0;cntr_props_1<r->count;cntr_props_1++) {
1003                         ndr_print_eventlog6_EvtRpcVariant(ndr, "props", &r->props[cntr_props_1]);
1004                 }
1005                 ndr->depth--;
1006         }
1007         ndr->depth--;
1008         ndr->depth--;
1009 }
1010
1011 static enum ndr_err_code ndr_push_eventlog6_EvtRpcQueryChannelInfo(struct ndr_push *ndr, int ndr_flags, const struct eventlog6_EvtRpcQueryChannelInfo *r)
1012 {
1013         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
1014         if (ndr_flags & NDR_SCALARS) {
1015                 NDR_CHECK(ndr_push_align(ndr, 5));
1016                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
1017                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->status));
1018                 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1019         }
1020         if (ndr_flags & NDR_BUFFERS) {
1021                 if (r->name) {
1022                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
1023                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1024                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
1025                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1026                 }
1027         }
1028         return NDR_ERR_SUCCESS;
1029 }
1030
1031 static enum ndr_err_code ndr_pull_eventlog6_EvtRpcQueryChannelInfo(struct ndr_pull *ndr, int ndr_flags, struct eventlog6_EvtRpcQueryChannelInfo *r)
1032 {
1033         uint32_t _ptr_name;
1034         uint32_t size_name_1 = 0;
1035         uint32_t length_name_1 = 0;
1036         TALLOC_CTX *_mem_save_name_0;
1037         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
1038         if (ndr_flags & NDR_SCALARS) {
1039                 NDR_CHECK(ndr_pull_align(ndr, 5));
1040                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
1041                 if (_ptr_name) {
1042                         NDR_PULL_ALLOC(ndr, r->name);
1043                 } else {
1044                         r->name = NULL;
1045                 }
1046                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->status));
1047                 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1048         }
1049         if (ndr_flags & NDR_BUFFERS) {
1050                 if (r->name) {
1051                         _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
1052                         NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
1053                         NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
1054                         NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
1055                         size_name_1 = ndr_get_array_size(ndr, &r->name);
1056                         length_name_1 = ndr_get_array_length(ndr, &r->name);
1057                         if (length_name_1 > size_name_1) {
1058                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_name_1, length_name_1);
1059                         }
1060                         NDR_CHECK(ndr_check_string_terminator(ndr, length_name_1, sizeof(uint16_t)));
1061                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, length_name_1, sizeof(uint16_t), CH_UTF16));
1062                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
1063                 }
1064         }
1065         return NDR_ERR_SUCCESS;
1066 }
1067
1068 _PUBLIC_ void ndr_print_eventlog6_EvtRpcQueryChannelInfo(struct ndr_print *ndr, const char *name, const struct eventlog6_EvtRpcQueryChannelInfo *r)
1069 {
1070         ndr_print_struct(ndr, name, "eventlog6_EvtRpcQueryChannelInfo");
1071         if (r == NULL) { ndr_print_null(ndr); return; }
1072         ndr->depth++;
1073         ndr_print_ptr(ndr, "name", r->name);
1074         ndr->depth++;
1075         if (r->name) {
1076                 ndr_print_string(ndr, "name", r->name);
1077         }
1078         ndr->depth--;
1079         ndr_print_uint32(ndr, "status", r->status);
1080         ndr->depth--;
1081 }
1082
1083 static enum ndr_err_code ndr_push_eventlog6_EvtRpcRegisterRemoteSubscription(struct ndr_push *ndr, int flags, const struct eventlog6_EvtRpcRegisterRemoteSubscription *r)
1084 {
1085         uint32_t cntr_queryChannelInfo_2;
1086         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
1087         if (flags & NDR_IN) {
1088                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.channelPath));
1089                 if (r->in.channelPath) {
1090                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.channelPath, CH_UTF16)));
1091                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1092                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.channelPath, CH_UTF16)));
1093                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.channelPath, ndr_charset_length(r->in.channelPath, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1094                 }
1095                 if (r->in.query == NULL) {
1096                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1097                 }
1098                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.query, CH_UTF16)));
1099                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1100                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.query, CH_UTF16)));
1101                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.query, ndr_charset_length(r->in.query, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1102                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.bookmarkXml));
1103                 if (r->in.bookmarkXml) {
1104                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.bookmarkXml, CH_UTF16)));
1105                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1106                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.bookmarkXml, CH_UTF16)));
1107                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.bookmarkXml, ndr_charset_length(r->in.bookmarkXml, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1108                 }
1109                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
1110         }
1111         if (flags & NDR_OUT) {
1112                 if (r->out.handle == NULL) {
1113                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1114                 }
1115                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
1116                 if (r->out.control == NULL) {
1117                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1118                 }
1119                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.control));
1120                 if (r->out.queryChannelInfoSize == NULL) {
1121                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1122                 }
1123                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.queryChannelInfoSize));
1124                 if (r->out.queryChannelInfo == NULL) {
1125                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1126                 }
1127                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.queryChannelInfo));
1128                 if (*r->out.queryChannelInfo) {
1129                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, *r->out.queryChannelInfoSize));
1130                         for (cntr_queryChannelInfo_2 = 0; cntr_queryChannelInfo_2 < *r->out.queryChannelInfoSize; cntr_queryChannelInfo_2++) {
1131                                 NDR_CHECK(ndr_push_eventlog6_EvtRpcQueryChannelInfo(ndr, NDR_SCALARS, &(*r->out.queryChannelInfo)[cntr_queryChannelInfo_2]));
1132                         }
1133                         for (cntr_queryChannelInfo_2 = 0; cntr_queryChannelInfo_2 < *r->out.queryChannelInfoSize; cntr_queryChannelInfo_2++) {
1134                                 NDR_CHECK(ndr_push_eventlog6_EvtRpcQueryChannelInfo(ndr, NDR_BUFFERS, &(*r->out.queryChannelInfo)[cntr_queryChannelInfo_2]));
1135                         }
1136                 }
1137                 if (r->out.error == NULL) {
1138                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1139                 }
1140                 NDR_CHECK(ndr_push_eventlog6_RpcInfo(ndr, NDR_SCALARS, r->out.error));
1141                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1142         }
1143         return NDR_ERR_SUCCESS;
1144 }
1145
1146 static enum ndr_err_code ndr_pull_eventlog6_EvtRpcRegisterRemoteSubscription(struct ndr_pull *ndr, int flags, struct eventlog6_EvtRpcRegisterRemoteSubscription *r)
1147 {
1148         uint32_t _ptr_channelPath;
1149         uint32_t size_channelPath_1 = 0;
1150         uint32_t length_channelPath_1 = 0;
1151         uint32_t size_query_1 = 0;
1152         uint32_t length_query_1 = 0;
1153         uint32_t _ptr_bookmarkXml;
1154         uint32_t size_bookmarkXml_1 = 0;
1155         uint32_t length_bookmarkXml_1 = 0;
1156         uint32_t _ptr_queryChannelInfo;
1157         uint32_t size_queryChannelInfo_2 = 0;
1158         uint32_t cntr_queryChannelInfo_2;
1159         TALLOC_CTX *_mem_save_channelPath_0;
1160         TALLOC_CTX *_mem_save_bookmarkXml_0;
1161         TALLOC_CTX *_mem_save_handle_0;
1162         TALLOC_CTX *_mem_save_control_0;
1163         TALLOC_CTX *_mem_save_queryChannelInfoSize_0;
1164         TALLOC_CTX *_mem_save_queryChannelInfo_0;
1165         TALLOC_CTX *_mem_save_queryChannelInfo_1;
1166         TALLOC_CTX *_mem_save_queryChannelInfo_2;
1167         TALLOC_CTX *_mem_save_error_0;
1168         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
1169         if (flags & NDR_IN) {
1170                 ZERO_STRUCT(r->out);
1171
1172                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_channelPath));
1173                 if (_ptr_channelPath) {
1174                         NDR_PULL_ALLOC(ndr, r->in.channelPath);
1175                 } else {
1176                         r->in.channelPath = NULL;
1177                 }
1178                 if (r->in.channelPath) {
1179                         _mem_save_channelPath_0 = NDR_PULL_GET_MEM_CTX(ndr);
1180                         NDR_PULL_SET_MEM_CTX(ndr, r->in.channelPath, 0);
1181                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.channelPath));
1182                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.channelPath));
1183                         size_channelPath_1 = ndr_get_array_size(ndr, &r->in.channelPath);
1184                         if (size_channelPath_1 > MAX_RPC_CHANNEL_NAME_LENGTH) {
1185                                 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1186                         }
1187                         length_channelPath_1 = ndr_get_array_length(ndr, &r->in.channelPath);
1188                         if (length_channelPath_1 > MAX_RPC_CHANNEL_NAME_LENGTH) {
1189                                 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1190                         }
1191                         if (length_channelPath_1 > size_channelPath_1) {
1192                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_channelPath_1, length_channelPath_1);
1193                         }
1194                         NDR_CHECK(ndr_check_string_terminator(ndr, length_channelPath_1, sizeof(uint16_t)));
1195                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.channelPath, length_channelPath_1, sizeof(uint16_t), CH_UTF16));
1196                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_channelPath_0, 0);
1197                 }
1198                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.query));
1199                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.query));
1200                 size_query_1 = ndr_get_array_size(ndr, &r->in.query);
1201                 if (size_query_1 < 1 || size_query_1 > MAX_RPC_QUERY_LENGTH) {
1202                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1203                 }
1204                 length_query_1 = ndr_get_array_length(ndr, &r->in.query);
1205                 if (length_query_1 < 1 || length_query_1 > MAX_RPC_QUERY_LENGTH) {
1206                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1207                 }
1208                 if (length_query_1 > size_query_1) {
1209                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_query_1, length_query_1);
1210                 }
1211                 NDR_CHECK(ndr_check_string_terminator(ndr, length_query_1, sizeof(uint16_t)));
1212                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.query, length_query_1, sizeof(uint16_t), CH_UTF16));
1213                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_bookmarkXml));
1214                 if (_ptr_bookmarkXml) {
1215                         NDR_PULL_ALLOC(ndr, r->in.bookmarkXml);
1216                 } else {
1217                         r->in.bookmarkXml = NULL;
1218                 }
1219                 if (r->in.bookmarkXml) {
1220                         _mem_save_bookmarkXml_0 = NDR_PULL_GET_MEM_CTX(ndr);
1221                         NDR_PULL_SET_MEM_CTX(ndr, r->in.bookmarkXml, 0);
1222                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.bookmarkXml));
1223                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.bookmarkXml));
1224                         size_bookmarkXml_1 = ndr_get_array_size(ndr, &r->in.bookmarkXml);
1225                         if (size_bookmarkXml_1 > MAX_RPC_BOOKMARK_LENGTH) {
1226                                 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1227                         }
1228                         length_bookmarkXml_1 = ndr_get_array_length(ndr, &r->in.bookmarkXml);
1229                         if (length_bookmarkXml_1 > MAX_RPC_BOOKMARK_LENGTH) {
1230                                 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1231                         }
1232                         if (length_bookmarkXml_1 > size_bookmarkXml_1) {
1233                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_bookmarkXml_1, length_bookmarkXml_1);
1234                         }
1235                         NDR_CHECK(ndr_check_string_terminator(ndr, length_bookmarkXml_1, sizeof(uint16_t)));
1236                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.bookmarkXml, length_bookmarkXml_1, sizeof(uint16_t), CH_UTF16));
1237                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bookmarkXml_0, 0);
1238                 }
1239                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
1240                 NDR_PULL_ALLOC(ndr, r->out.handle);
1241                 ZERO_STRUCTP(r->out.handle);
1242                 NDR_PULL_ALLOC(ndr, r->out.control);
1243                 ZERO_STRUCTP(r->out.control);
1244                 NDR_PULL_ALLOC(ndr, r->out.queryChannelInfoSize);
1245                 ZERO_STRUCTP(r->out.queryChannelInfoSize);
1246                 NDR_PULL_ALLOC(ndr, r->out.queryChannelInfo);
1247                 ZERO_STRUCTP(r->out.queryChannelInfo);
1248                 NDR_PULL_ALLOC(ndr, r->out.error);
1249                 ZERO_STRUCTP(r->out.error);
1250         }
1251         if (flags & NDR_OUT) {
1252                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1253                         NDR_PULL_ALLOC(ndr, r->out.handle);
1254                 }
1255                 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1256                 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
1257                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
1258                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1259                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1260                         NDR_PULL_ALLOC(ndr, r->out.control);
1261                 }
1262                 _mem_save_control_0 = NDR_PULL_GET_MEM_CTX(ndr);
1263                 NDR_PULL_SET_MEM_CTX(ndr, r->out.control, LIBNDR_FLAG_REF_ALLOC);
1264                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.control));
1265                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_control_0, LIBNDR_FLAG_REF_ALLOC);
1266                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1267                         NDR_PULL_ALLOC(ndr, r->out.queryChannelInfoSize);
1268                 }
1269                 _mem_save_queryChannelInfoSize_0 = NDR_PULL_GET_MEM_CTX(ndr);
1270                 NDR_PULL_SET_MEM_CTX(ndr, r->out.queryChannelInfoSize, LIBNDR_FLAG_REF_ALLOC);
1271                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.queryChannelInfoSize));
1272                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_queryChannelInfoSize_0, LIBNDR_FLAG_REF_ALLOC);
1273                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1274                         NDR_PULL_ALLOC(ndr, r->out.queryChannelInfo);
1275                 }
1276                 _mem_save_queryChannelInfo_0 = NDR_PULL_GET_MEM_CTX(ndr);
1277                 NDR_PULL_SET_MEM_CTX(ndr, r->out.queryChannelInfo, LIBNDR_FLAG_REF_ALLOC);
1278                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_queryChannelInfo));
1279                 if (_ptr_queryChannelInfo) {
1280                         NDR_PULL_ALLOC(ndr, *r->out.queryChannelInfo);
1281                 } else {
1282                         *r->out.queryChannelInfo = NULL;
1283                 }
1284                 if (*r->out.queryChannelInfo) {
1285                         _mem_save_queryChannelInfo_1 = NDR_PULL_GET_MEM_CTX(ndr);
1286                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.queryChannelInfo, 0);
1287                         NDR_CHECK(ndr_pull_array_size(ndr, r->out.queryChannelInfo));
1288                         size_queryChannelInfo_2 = ndr_get_array_size(ndr, r->out.queryChannelInfo);
1289                         if (size_queryChannelInfo_2 > MAX_RPC_QUERY_CHANNEL_SIZE) {
1290                                 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1291                         }
1292                         NDR_PULL_ALLOC_N(ndr, *r->out.queryChannelInfo, size_queryChannelInfo_2);
1293                         _mem_save_queryChannelInfo_2 = NDR_PULL_GET_MEM_CTX(ndr);
1294                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.queryChannelInfo, 0);
1295                         for (cntr_queryChannelInfo_2 = 0; cntr_queryChannelInfo_2 < size_queryChannelInfo_2; cntr_queryChannelInfo_2++) {
1296                                 NDR_CHECK(ndr_pull_eventlog6_EvtRpcQueryChannelInfo(ndr, NDR_SCALARS, &(*r->out.queryChannelInfo)[cntr_queryChannelInfo_2]));
1297                         }
1298                         for (cntr_queryChannelInfo_2 = 0; cntr_queryChannelInfo_2 < size_queryChannelInfo_2; cntr_queryChannelInfo_2++) {
1299                                 NDR_CHECK(ndr_pull_eventlog6_EvtRpcQueryChannelInfo(ndr, NDR_BUFFERS, &(*r->out.queryChannelInfo)[cntr_queryChannelInfo_2]));
1300                         }
1301                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_queryChannelInfo_2, 0);
1302                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_queryChannelInfo_1, 0);
1303                 }
1304                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_queryChannelInfo_0, LIBNDR_FLAG_REF_ALLOC);
1305                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1306                         NDR_PULL_ALLOC(ndr, r->out.error);
1307                 }
1308                 _mem_save_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
1309                 NDR_PULL_SET_MEM_CTX(ndr, r->out.error, LIBNDR_FLAG_REF_ALLOC);
1310                 NDR_CHECK(ndr_pull_eventlog6_RpcInfo(ndr, NDR_SCALARS, r->out.error));
1311                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_error_0, LIBNDR_FLAG_REF_ALLOC);
1312                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1313                 if (*r->out.queryChannelInfo) {
1314                         NDR_CHECK(ndr_check_array_size(ndr, (void*)r->out.queryChannelInfo, *r->out.queryChannelInfoSize));
1315                 }
1316         }
1317         return NDR_ERR_SUCCESS;
1318 }
1319
1320 _PUBLIC_ void ndr_print_eventlog6_EvtRpcRegisterRemoteSubscription(struct ndr_print *ndr, const char *name, int flags, const struct eventlog6_EvtRpcRegisterRemoteSubscription *r)
1321 {
1322         uint32_t cntr_queryChannelInfo_2;
1323         ndr_print_struct(ndr, name, "eventlog6_EvtRpcRegisterRemoteSubscription");
1324         if (r == NULL) { ndr_print_null(ndr); return; }
1325         ndr->depth++;
1326         if (flags & NDR_SET_VALUES) {
1327                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1328         }
1329         if (flags & NDR_IN) {
1330                 ndr_print_struct(ndr, "in", "eventlog6_EvtRpcRegisterRemoteSubscription");
1331                 ndr->depth++;
1332                 ndr_print_ptr(ndr, "channelPath", r->in.channelPath);
1333                 ndr->depth++;
1334                 if (r->in.channelPath) {
1335                         ndr_print_string(ndr, "channelPath", r->in.channelPath);
1336                 }
1337                 ndr->depth--;
1338                 ndr_print_ptr(ndr, "query", r->in.query);
1339                 ndr->depth++;
1340                 ndr_print_string(ndr, "query", r->in.query);
1341                 ndr->depth--;
1342                 ndr_print_ptr(ndr, "bookmarkXml", r->in.bookmarkXml);
1343                 ndr->depth++;
1344                 if (r->in.bookmarkXml) {
1345                         ndr_print_string(ndr, "bookmarkXml", r->in.bookmarkXml);
1346                 }
1347                 ndr->depth--;
1348                 ndr_print_uint32(ndr, "flags", r->in.flags);
1349                 ndr->depth--;
1350         }
1351         if (flags & NDR_OUT) {
1352                 ndr_print_struct(ndr, "out", "eventlog6_EvtRpcRegisterRemoteSubscription");
1353                 ndr->depth++;
1354                 ndr_print_ptr(ndr, "handle", r->out.handle);
1355                 ndr->depth++;
1356                 ndr_print_policy_handle(ndr, "handle", r->out.handle);
1357                 ndr->depth--;
1358                 ndr_print_ptr(ndr, "control", r->out.control);
1359                 ndr->depth++;
1360                 ndr_print_policy_handle(ndr, "control", r->out.control);
1361                 ndr->depth--;
1362                 ndr_print_ptr(ndr, "queryChannelInfoSize", r->out.queryChannelInfoSize);
1363                 ndr->depth++;
1364                 ndr_print_uint32(ndr, "queryChannelInfoSize", *r->out.queryChannelInfoSize);
1365                 ndr->depth--;
1366                 ndr_print_ptr(ndr, "queryChannelInfo", r->out.queryChannelInfo);
1367                 ndr->depth++;
1368                 ndr_print_ptr(ndr, "queryChannelInfo", *r->out.queryChannelInfo);
1369                 ndr->depth++;
1370                 if (*r->out.queryChannelInfo) {
1371                         ndr->print(ndr, "%s: ARRAY(%d)", "queryChannelInfo", (int)*r->out.queryChannelInfoSize);
1372                         ndr->depth++;
1373                         for (cntr_queryChannelInfo_2=0;cntr_queryChannelInfo_2<*r->out.queryChannelInfoSize;cntr_queryChannelInfo_2++) {
1374                                 ndr_print_eventlog6_EvtRpcQueryChannelInfo(ndr, "queryChannelInfo", &(*r->out.queryChannelInfo)[cntr_queryChannelInfo_2]);
1375                         }
1376                         ndr->depth--;
1377                 }
1378                 ndr->depth--;
1379                 ndr->depth--;
1380                 ndr_print_ptr(ndr, "error", r->out.error);
1381                 ndr->depth++;
1382                 ndr_print_eventlog6_RpcInfo(ndr, "error", r->out.error);
1383                 ndr->depth--;
1384                 ndr_print_WERROR(ndr, "result", r->out.result);
1385                 ndr->depth--;
1386         }
1387         ndr->depth--;
1388 }
1389
1390 static enum ndr_err_code ndr_push_eventlog6_EvtRpcRemoteSubscriptionNextAsync(struct ndr_push *ndr, int flags, const struct eventlog6_EvtRpcRemoteSubscriptionNextAsync *r)
1391 {
1392         uint32_t cntr_eventDataIndices_2;
1393         uint32_t cntr_eventDataSizes_2;
1394         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
1395         if (flags & NDR_IN) {
1396                 if (r->in.handle == NULL) {
1397                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1398                 }
1399                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1400                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.numRequestedRecords));
1401                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
1402         }
1403         if (flags & NDR_OUT) {
1404                 if (r->out.numActualRecords == NULL) {
1405                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1406                 }
1407                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.numActualRecords));
1408                 if (r->out.eventDataIndices == NULL) {
1409                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1410                 }
1411                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.eventDataIndices));
1412                 if (*r->out.eventDataIndices) {
1413                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, *r->out.numActualRecords));
1414                         for (cntr_eventDataIndices_2 = 0; cntr_eventDataIndices_2 < *r->out.numActualRecords; cntr_eventDataIndices_2++) {
1415                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, (*r->out.eventDataIndices)[cntr_eventDataIndices_2]));
1416                         }
1417                 }
1418                 if (r->out.eventDataSizes == NULL) {
1419                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1420                 }
1421                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.eventDataSizes));
1422                 if (*r->out.eventDataSizes) {
1423                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, *r->out.numActualRecords));
1424                         for (cntr_eventDataSizes_2 = 0; cntr_eventDataSizes_2 < *r->out.numActualRecords; cntr_eventDataSizes_2++) {
1425                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, (*r->out.eventDataSizes)[cntr_eventDataSizes_2]));
1426                         }
1427                 }
1428                 if (r->out.resultBufferSize == NULL) {
1429                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1430                 }
1431                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resultBufferSize));
1432                 if (r->out.resultBuffer == NULL) {
1433                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1434                 }
1435                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.resultBuffer));
1436                 if (*r->out.resultBuffer) {
1437                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, *r->out.resultBufferSize));
1438                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, *r->out.resultBuffer, *r->out.resultBufferSize));
1439                 }
1440                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1441         }
1442         return NDR_ERR_SUCCESS;
1443 }
1444
1445 static enum ndr_err_code ndr_pull_eventlog6_EvtRpcRemoteSubscriptionNextAsync(struct ndr_pull *ndr, int flags, struct eventlog6_EvtRpcRemoteSubscriptionNextAsync *r)
1446 {
1447         uint32_t _ptr_eventDataIndices;
1448         uint32_t size_eventDataIndices_2 = 0;
1449         uint32_t cntr_eventDataIndices_2;
1450         uint32_t _ptr_eventDataSizes;
1451         uint32_t size_eventDataSizes_2 = 0;
1452         uint32_t cntr_eventDataSizes_2;
1453         uint32_t _ptr_resultBuffer;
1454         uint32_t size_resultBuffer_2 = 0;
1455         TALLOC_CTX *_mem_save_handle_0;
1456         TALLOC_CTX *_mem_save_numActualRecords_0;
1457         TALLOC_CTX *_mem_save_eventDataIndices_0;
1458         TALLOC_CTX *_mem_save_eventDataIndices_1;
1459         TALLOC_CTX *_mem_save_eventDataIndices_2;
1460         TALLOC_CTX *_mem_save_eventDataSizes_0;
1461         TALLOC_CTX *_mem_save_eventDataSizes_1;
1462         TALLOC_CTX *_mem_save_eventDataSizes_2;
1463         TALLOC_CTX *_mem_save_resultBufferSize_0;
1464         TALLOC_CTX *_mem_save_resultBuffer_0;
1465         TALLOC_CTX *_mem_save_resultBuffer_1;
1466         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
1467         if (flags & NDR_IN) {
1468                 ZERO_STRUCT(r->out);
1469
1470                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1471                         NDR_PULL_ALLOC(ndr, r->in.handle);
1472                 }
1473                 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1474                 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1475                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1476                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1477                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.numRequestedRecords));
1478                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
1479                 NDR_PULL_ALLOC(ndr, r->out.numActualRecords);
1480                 ZERO_STRUCTP(r->out.numActualRecords);
1481                 NDR_PULL_ALLOC(ndr, r->out.eventDataIndices);
1482                 ZERO_STRUCTP(r->out.eventDataIndices);
1483                 NDR_PULL_ALLOC(ndr, r->out.eventDataSizes);
1484                 ZERO_STRUCTP(r->out.eventDataSizes);
1485                 NDR_PULL_ALLOC(ndr, r->out.resultBufferSize);
1486                 ZERO_STRUCTP(r->out.resultBufferSize);
1487                 NDR_PULL_ALLOC(ndr, r->out.resultBuffer);
1488                 ZERO_STRUCTP(r->out.resultBuffer);
1489         }
1490         if (flags & NDR_OUT) {
1491                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1492                         NDR_PULL_ALLOC(ndr, r->out.numActualRecords);
1493                 }
1494                 _mem_save_numActualRecords_0 = NDR_PULL_GET_MEM_CTX(ndr);
1495                 NDR_PULL_SET_MEM_CTX(ndr, r->out.numActualRecords, LIBNDR_FLAG_REF_ALLOC);
1496                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.numActualRecords));
1497                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_numActualRecords_0, LIBNDR_FLAG_REF_ALLOC);
1498                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1499                         NDR_PULL_ALLOC(ndr, r->out.eventDataIndices);
1500                 }
1501                 _mem_save_eventDataIndices_0 = NDR_PULL_GET_MEM_CTX(ndr);
1502                 NDR_PULL_SET_MEM_CTX(ndr, r->out.eventDataIndices, LIBNDR_FLAG_REF_ALLOC);
1503                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_eventDataIndices));
1504                 if (_ptr_eventDataIndices) {
1505                         NDR_PULL_ALLOC(ndr, *r->out.eventDataIndices);
1506                 } else {
1507                         *r->out.eventDataIndices = NULL;
1508                 }
1509                 if (*r->out.eventDataIndices) {
1510                         _mem_save_eventDataIndices_1 = NDR_PULL_GET_MEM_CTX(ndr);
1511                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.eventDataIndices, 0);
1512                         NDR_CHECK(ndr_pull_array_size(ndr, r->out.eventDataIndices));
1513                         size_eventDataIndices_2 = ndr_get_array_size(ndr, r->out.eventDataIndices);
1514                         if (size_eventDataIndices_2 > MAX_RPC_RECORD_COUNT) {
1515                                 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1516                         }
1517                         NDR_PULL_ALLOC_N(ndr, *r->out.eventDataIndices, size_eventDataIndices_2);
1518                         _mem_save_eventDataIndices_2 = NDR_PULL_GET_MEM_CTX(ndr);
1519                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.eventDataIndices, 0);
1520                         for (cntr_eventDataIndices_2 = 0; cntr_eventDataIndices_2 < size_eventDataIndices_2; cntr_eventDataIndices_2++) {
1521                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &(*r->out.eventDataIndices)[cntr_eventDataIndices_2]));
1522                         }
1523                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_eventDataIndices_2, 0);
1524                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_eventDataIndices_1, 0);
1525                 }
1526                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_eventDataIndices_0, LIBNDR_FLAG_REF_ALLOC);
1527                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1528                         NDR_PULL_ALLOC(ndr, r->out.eventDataSizes);
1529                 }
1530                 _mem_save_eventDataSizes_0 = NDR_PULL_GET_MEM_CTX(ndr);
1531                 NDR_PULL_SET_MEM_CTX(ndr, r->out.eventDataSizes, LIBNDR_FLAG_REF_ALLOC);
1532                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_eventDataSizes));
1533                 if (_ptr_eventDataSizes) {
1534                         NDR_PULL_ALLOC(ndr, *r->out.eventDataSizes);
1535                 } else {
1536                         *r->out.eventDataSizes = NULL;
1537                 }
1538                 if (*r->out.eventDataSizes) {
1539                         _mem_save_eventDataSizes_1 = NDR_PULL_GET_MEM_CTX(ndr);
1540                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.eventDataSizes, 0);
1541                         NDR_CHECK(ndr_pull_array_size(ndr, r->out.eventDataSizes));
1542                         size_eventDataSizes_2 = ndr_get_array_size(ndr, r->out.eventDataSizes);
1543                         if (size_eventDataSizes_2 > MAX_RPC_RECORD_COUNT) {
1544                                 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1545                         }
1546                         NDR_PULL_ALLOC_N(ndr, *r->out.eventDataSizes, size_eventDataSizes_2);
1547                         _mem_save_eventDataSizes_2 = NDR_PULL_GET_MEM_CTX(ndr);
1548                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.eventDataSizes, 0);
1549                         for (cntr_eventDataSizes_2 = 0; cntr_eventDataSizes_2 < size_eventDataSizes_2; cntr_eventDataSizes_2++) {
1550                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &(*r->out.eventDataSizes)[cntr_eventDataSizes_2]));
1551                         }
1552                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_eventDataSizes_2, 0);
1553                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_eventDataSizes_1, 0);
1554                 }
1555                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_eventDataSizes_0, LIBNDR_FLAG_REF_ALLOC);
1556                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1557                         NDR_PULL_ALLOC(ndr, r->out.resultBufferSize);
1558                 }
1559                 _mem_save_resultBufferSize_0 = NDR_PULL_GET_MEM_CTX(ndr);
1560                 NDR_PULL_SET_MEM_CTX(ndr, r->out.resultBufferSize, LIBNDR_FLAG_REF_ALLOC);
1561                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resultBufferSize));
1562                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resultBufferSize_0, LIBNDR_FLAG_REF_ALLOC);
1563                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1564                         NDR_PULL_ALLOC(ndr, r->out.resultBuffer);
1565                 }
1566                 _mem_save_resultBuffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
1567                 NDR_PULL_SET_MEM_CTX(ndr, r->out.resultBuffer, LIBNDR_FLAG_REF_ALLOC);
1568                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resultBuffer));
1569                 if (_ptr_resultBuffer) {
1570                         NDR_PULL_ALLOC(ndr, *r->out.resultBuffer);
1571                 } else {
1572                         *r->out.resultBuffer = NULL;
1573                 }
1574                 if (*r->out.resultBuffer) {
1575                         _mem_save_resultBuffer_1 = NDR_PULL_GET_MEM_CTX(ndr);
1576                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.resultBuffer, 0);
1577                         NDR_CHECK(ndr_pull_array_size(ndr, r->out.resultBuffer));
1578                         size_resultBuffer_2 = ndr_get_array_size(ndr, r->out.resultBuffer);
1579                         if (size_resultBuffer_2 > MAX_RPC_BATCH_SIZE) {
1580                                 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1581                         }
1582                         NDR_PULL_ALLOC_N(ndr, *r->out.resultBuffer, size_resultBuffer_2);
1583                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, *r->out.resultBuffer, size_resultBuffer_2));
1584                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resultBuffer_1, 0);
1585                 }
1586                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resultBuffer_0, LIBNDR_FLAG_REF_ALLOC);
1587                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1588                 if (*r->out.eventDataIndices) {
1589                         NDR_CHECK(ndr_check_array_size(ndr, (void*)r->out.eventDataIndices, *r->out.numActualRecords));
1590                 }
1591                 if (*r->out.eventDataSizes) {
1592                         NDR_CHECK(ndr_check_array_size(ndr, (void*)r->out.eventDataSizes, *r->out.numActualRecords));
1593                 }
1594                 if (*r->out.resultBuffer) {
1595                         NDR_CHECK(ndr_check_array_size(ndr, (void*)r->out.resultBuffer, *r->out.resultBufferSize));
1596                 }
1597         }
1598         return NDR_ERR_SUCCESS;
1599 }
1600
1601 _PUBLIC_ void ndr_print_eventlog6_EvtRpcRemoteSubscriptionNextAsync(struct ndr_print *ndr, const char *name, int flags, const struct eventlog6_EvtRpcRemoteSubscriptionNextAsync *r)
1602 {
1603         uint32_t cntr_eventDataIndices_2;
1604         uint32_t cntr_eventDataSizes_2;
1605         ndr_print_struct(ndr, name, "eventlog6_EvtRpcRemoteSubscriptionNextAsync");
1606         if (r == NULL) { ndr_print_null(ndr); return; }
1607         ndr->depth++;
1608         if (flags & NDR_SET_VALUES) {
1609                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1610         }
1611         if (flags & NDR_IN) {
1612                 ndr_print_struct(ndr, "in", "eventlog6_EvtRpcRemoteSubscriptionNextAsync");
1613                 ndr->depth++;
1614                 ndr_print_ptr(ndr, "handle", r->in.handle);
1615                 ndr->depth++;
1616                 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1617                 ndr->depth--;
1618                 ndr_print_uint32(ndr, "numRequestedRecords", r->in.numRequestedRecords);
1619                 ndr_print_uint32(ndr, "flags", r->in.flags);
1620                 ndr->depth--;
1621         }
1622         if (flags & NDR_OUT) {
1623                 ndr_print_struct(ndr, "out", "eventlog6_EvtRpcRemoteSubscriptionNextAsync");
1624                 ndr->depth++;
1625                 ndr_print_ptr(ndr, "numActualRecords", r->out.numActualRecords);
1626                 ndr->depth++;
1627                 ndr_print_uint32(ndr, "numActualRecords", *r->out.numActualRecords);
1628                 ndr->depth--;
1629                 ndr_print_ptr(ndr, "eventDataIndices", r->out.eventDataIndices);
1630                 ndr->depth++;
1631                 ndr_print_ptr(ndr, "eventDataIndices", *r->out.eventDataIndices);
1632                 ndr->depth++;
1633                 if (*r->out.eventDataIndices) {
1634                         ndr->print(ndr, "%s: ARRAY(%d)", "eventDataIndices", (int)*r->out.numActualRecords);
1635                         ndr->depth++;
1636                         for (cntr_eventDataIndices_2=0;cntr_eventDataIndices_2<*r->out.numActualRecords;cntr_eventDataIndices_2++) {
1637                                 ndr_print_uint32(ndr, "eventDataIndices", (*r->out.eventDataIndices)[cntr_eventDataIndices_2]);
1638                         }
1639                         ndr->depth--;
1640                 }
1641                 ndr->depth--;
1642                 ndr->depth--;
1643                 ndr_print_ptr(ndr, "eventDataSizes", r->out.eventDataSizes);
1644                 ndr->depth++;
1645                 ndr_print_ptr(ndr, "eventDataSizes", *r->out.eventDataSizes);
1646                 ndr->depth++;
1647                 if (*r->out.eventDataSizes) {
1648                         ndr->print(ndr, "%s: ARRAY(%d)", "eventDataSizes", (int)*r->out.numActualRecords);
1649                         ndr->depth++;
1650                         for (cntr_eventDataSizes_2=0;cntr_eventDataSizes_2<*r->out.numActualRecords;cntr_eventDataSizes_2++) {
1651                                 ndr_print_uint32(ndr, "eventDataSizes", (*r->out.eventDataSizes)[cntr_eventDataSizes_2]);
1652                         }
1653                         ndr->depth--;
1654                 }
1655                 ndr->depth--;
1656                 ndr->depth--;
1657                 ndr_print_ptr(ndr, "resultBufferSize", r->out.resultBufferSize);
1658                 ndr->depth++;
1659                 ndr_print_uint32(ndr, "resultBufferSize", *r->out.resultBufferSize);
1660                 ndr->depth--;
1661                 ndr_print_ptr(ndr, "resultBuffer", r->out.resultBuffer);
1662                 ndr->depth++;
1663                 ndr_print_ptr(ndr, "resultBuffer", *r->out.resultBuffer);
1664                 ndr->depth++;
1665                 if (*r->out.resultBuffer) {
1666                         ndr_print_array_uint8(ndr, "resultBuffer", *r->out.resultBuffer, *r->out.resultBufferSize);
1667                 }
1668                 ndr->depth--;
1669                 ndr->depth--;
1670                 ndr_print_WERROR(ndr, "result", r->out.result);
1671                 ndr->depth--;
1672         }
1673         ndr->depth--;
1674 }
1675
1676 static enum ndr_err_code ndr_push_eventlog6_EvtRpcRemoteSubscriptionNext(struct ndr_push *ndr, int flags, const struct eventlog6_EvtRpcRemoteSubscriptionNext *r)
1677 {
1678         uint32_t cntr_eventDataIndices_2;
1679         uint32_t cntr_eventDataSizes_2;
1680         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
1681         if (flags & NDR_IN) {
1682                 if (r->in.handle == NULL) {
1683                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1684                 }
1685                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1686                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.numRequestedRecords));
1687                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.timeOut));
1688                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
1689         }
1690         if (flags & NDR_OUT) {
1691                 if (r->out.numActualRecords == NULL) {
1692                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1693                 }
1694                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.numActualRecords));
1695                 if (r->out.eventDataIndices == NULL) {
1696                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1697                 }
1698                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.eventDataIndices));
1699                 if (*r->out.eventDataIndices) {
1700                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, *r->out.numActualRecords));
1701                         for (cntr_eventDataIndices_2 = 0; cntr_eventDataIndices_2 < *r->out.numActualRecords; cntr_eventDataIndices_2++) {
1702                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, (*r->out.eventDataIndices)[cntr_eventDataIndices_2]));
1703                         }
1704                 }
1705                 if (r->out.eventDataSizes == NULL) {
1706                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1707                 }
1708                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.eventDataSizes));
1709                 if (*r->out.eventDataSizes) {
1710                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, *r->out.numActualRecords));
1711                         for (cntr_eventDataSizes_2 = 0; cntr_eventDataSizes_2 < *r->out.numActualRecords; cntr_eventDataSizes_2++) {
1712                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, (*r->out.eventDataSizes)[cntr_eventDataSizes_2]));
1713                         }
1714                 }
1715                 if (r->out.resultBufferSize == NULL) {
1716                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1717                 }
1718                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resultBufferSize));
1719                 if (r->out.resultBuffer == NULL) {
1720                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1721                 }
1722                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.resultBuffer));
1723                 if (*r->out.resultBuffer) {
1724                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, *r->out.resultBufferSize));
1725                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, *r->out.resultBuffer, *r->out.resultBufferSize));
1726                 }
1727                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1728         }
1729         return NDR_ERR_SUCCESS;
1730 }
1731
1732 static enum ndr_err_code ndr_pull_eventlog6_EvtRpcRemoteSubscriptionNext(struct ndr_pull *ndr, int flags, struct eventlog6_EvtRpcRemoteSubscriptionNext *r)
1733 {
1734         uint32_t _ptr_eventDataIndices;
1735         uint32_t size_eventDataIndices_2 = 0;
1736         uint32_t cntr_eventDataIndices_2;
1737         uint32_t _ptr_eventDataSizes;
1738         uint32_t size_eventDataSizes_2 = 0;
1739         uint32_t cntr_eventDataSizes_2;
1740         uint32_t _ptr_resultBuffer;
1741         uint32_t size_resultBuffer_2 = 0;
1742         TALLOC_CTX *_mem_save_handle_0;
1743         TALLOC_CTX *_mem_save_numActualRecords_0;
1744         TALLOC_CTX *_mem_save_eventDataIndices_0;
1745         TALLOC_CTX *_mem_save_eventDataIndices_1;
1746         TALLOC_CTX *_mem_save_eventDataIndices_2;
1747         TALLOC_CTX *_mem_save_eventDataSizes_0;
1748         TALLOC_CTX *_mem_save_eventDataSizes_1;
1749         TALLOC_CTX *_mem_save_eventDataSizes_2;
1750         TALLOC_CTX *_mem_save_resultBufferSize_0;
1751         TALLOC_CTX *_mem_save_resultBuffer_0;
1752         TALLOC_CTX *_mem_save_resultBuffer_1;
1753         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
1754         if (flags & NDR_IN) {
1755                 ZERO_STRUCT(r->out);
1756
1757                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1758                         NDR_PULL_ALLOC(ndr, r->in.handle);
1759                 }
1760                 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1761                 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1762                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1763                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1764                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.numRequestedRecords));
1765                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.timeOut));
1766                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
1767                 NDR_PULL_ALLOC(ndr, r->out.numActualRecords);
1768                 ZERO_STRUCTP(r->out.numActualRecords);
1769                 NDR_PULL_ALLOC(ndr, r->out.eventDataIndices);
1770                 ZERO_STRUCTP(r->out.eventDataIndices);
1771                 NDR_PULL_ALLOC(ndr, r->out.eventDataSizes);
1772                 ZERO_STRUCTP(r->out.eventDataSizes);
1773                 NDR_PULL_ALLOC(ndr, r->out.resultBufferSize);
1774                 ZERO_STRUCTP(r->out.resultBufferSize);
1775                 NDR_PULL_ALLOC(ndr, r->out.resultBuffer);
1776                 ZERO_STRUCTP(r->out.resultBuffer);
1777         }
1778         if (flags & NDR_OUT) {
1779                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1780                         NDR_PULL_ALLOC(ndr, r->out.numActualRecords);
1781                 }
1782                 _mem_save_numActualRecords_0 = NDR_PULL_GET_MEM_CTX(ndr);
1783                 NDR_PULL_SET_MEM_CTX(ndr, r->out.numActualRecords, LIBNDR_FLAG_REF_ALLOC);
1784                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.numActualRecords));
1785                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_numActualRecords_0, LIBNDR_FLAG_REF_ALLOC);
1786                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1787                         NDR_PULL_ALLOC(ndr, r->out.eventDataIndices);
1788                 }
1789                 _mem_save_eventDataIndices_0 = NDR_PULL_GET_MEM_CTX(ndr);
1790                 NDR_PULL_SET_MEM_CTX(ndr, r->out.eventDataIndices, LIBNDR_FLAG_REF_ALLOC);
1791                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_eventDataIndices));
1792                 if (_ptr_eventDataIndices) {
1793                         NDR_PULL_ALLOC(ndr, *r->out.eventDataIndices);
1794                 } else {
1795                         *r->out.eventDataIndices = NULL;
1796                 }
1797                 if (*r->out.eventDataIndices) {
1798                         _mem_save_eventDataIndices_1 = NDR_PULL_GET_MEM_CTX(ndr);
1799                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.eventDataIndices, 0);
1800                         NDR_CHECK(ndr_pull_array_size(ndr, r->out.eventDataIndices));
1801                         size_eventDataIndices_2 = ndr_get_array_size(ndr, r->out.eventDataIndices);
1802                         if (size_eventDataIndices_2 > MAX_RPC_RECORD_COUNT) {
1803                                 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1804                         }
1805                         NDR_PULL_ALLOC_N(ndr, *r->out.eventDataIndices, size_eventDataIndices_2);
1806                         _mem_save_eventDataIndices_2 = NDR_PULL_GET_MEM_CTX(ndr);
1807                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.eventDataIndices, 0);
1808                         for (cntr_eventDataIndices_2 = 0; cntr_eventDataIndices_2 < size_eventDataIndices_2; cntr_eventDataIndices_2++) {
1809                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &(*r->out.eventDataIndices)[cntr_eventDataIndices_2]));
1810                         }
1811                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_eventDataIndices_2, 0);
1812                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_eventDataIndices_1, 0);
1813                 }
1814                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_eventDataIndices_0, LIBNDR_FLAG_REF_ALLOC);
1815                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1816                         NDR_PULL_ALLOC(ndr, r->out.eventDataSizes);
1817                 }
1818                 _mem_save_eventDataSizes_0 = NDR_PULL_GET_MEM_CTX(ndr);
1819                 NDR_PULL_SET_MEM_CTX(ndr, r->out.eventDataSizes, LIBNDR_FLAG_REF_ALLOC);
1820                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_eventDataSizes));
1821                 if (_ptr_eventDataSizes) {
1822                         NDR_PULL_ALLOC(ndr, *r->out.eventDataSizes);
1823                 } else {
1824                         *r->out.eventDataSizes = NULL;
1825                 }
1826                 if (*r->out.eventDataSizes) {
1827                         _mem_save_eventDataSizes_1 = NDR_PULL_GET_MEM_CTX(ndr);
1828                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.eventDataSizes, 0);
1829                         NDR_CHECK(ndr_pull_array_size(ndr, r->out.eventDataSizes));
1830                         size_eventDataSizes_2 = ndr_get_array_size(ndr, r->out.eventDataSizes);
1831                         if (size_eventDataSizes_2 > MAX_RPC_RECORD_COUNT) {
1832                                 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1833                         }
1834                         NDR_PULL_ALLOC_N(ndr, *r->out.eventDataSizes, size_eventDataSizes_2);
1835                         _mem_save_eventDataSizes_2 = NDR_PULL_GET_MEM_CTX(ndr);
1836                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.eventDataSizes, 0);
1837                         for (cntr_eventDataSizes_2 = 0; cntr_eventDataSizes_2 < size_eventDataSizes_2; cntr_eventDataSizes_2++) {
1838                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &(*r->out.eventDataSizes)[cntr_eventDataSizes_2]));
1839                         }
1840                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_eventDataSizes_2, 0);
1841                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_eventDataSizes_1, 0);
1842                 }
1843                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_eventDataSizes_0, LIBNDR_FLAG_REF_ALLOC);
1844                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1845                         NDR_PULL_ALLOC(ndr, r->out.resultBufferSize);
1846                 }
1847                 _mem_save_resultBufferSize_0 = NDR_PULL_GET_MEM_CTX(ndr);
1848                 NDR_PULL_SET_MEM_CTX(ndr, r->out.resultBufferSize, LIBNDR_FLAG_REF_ALLOC);
1849                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resultBufferSize));
1850                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resultBufferSize_0, LIBNDR_FLAG_REF_ALLOC);
1851                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1852                         NDR_PULL_ALLOC(ndr, r->out.resultBuffer);
1853                 }
1854                 _mem_save_resultBuffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
1855                 NDR_PULL_SET_MEM_CTX(ndr, r->out.resultBuffer, LIBNDR_FLAG_REF_ALLOC);
1856                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resultBuffer));
1857                 if (_ptr_resultBuffer) {
1858                         NDR_PULL_ALLOC(ndr, *r->out.resultBuffer);
1859                 } else {
1860                         *r->out.resultBuffer = NULL;
1861                 }
1862                 if (*r->out.resultBuffer) {
1863                         _mem_save_resultBuffer_1 = NDR_PULL_GET_MEM_CTX(ndr);
1864                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.resultBuffer, 0);
1865                         NDR_CHECK(ndr_pull_array_size(ndr, r->out.resultBuffer));
1866                         size_resultBuffer_2 = ndr_get_array_size(ndr, r->out.resultBuffer);
1867                         if (size_resultBuffer_2 > MAX_RPC_BATCH_SIZE) {
1868                                 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
1869                         }
1870                         NDR_PULL_ALLOC_N(ndr, *r->out.resultBuffer, size_resultBuffer_2);
1871                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, *r->out.resultBuffer, size_resultBuffer_2));
1872                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resultBuffer_1, 0);
1873                 }
1874                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resultBuffer_0, LIBNDR_FLAG_REF_ALLOC);
1875                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1876                 if (*r->out.eventDataIndices) {
1877                         NDR_CHECK(ndr_check_array_size(ndr, (void*)r->out.eventDataIndices, *r->out.numActualRecords));
1878                 }
1879                 if (*r->out.eventDataSizes) {
1880                         NDR_CHECK(ndr_check_array_size(ndr, (void*)r->out.eventDataSizes, *r->out.numActualRecords));
1881                 }
1882                 if (*r->out.resultBuffer) {
1883                         NDR_CHECK(ndr_check_array_size(ndr, (void*)r->out.resultBuffer, *r->out.resultBufferSize));
1884                 }
1885         }
1886         return NDR_ERR_SUCCESS;
1887 }
1888
1889 _PUBLIC_ void ndr_print_eventlog6_EvtRpcRemoteSubscriptionNext(struct ndr_print *ndr, const char *name, int flags, const struct eventlog6_EvtRpcRemoteSubscriptionNext *r)
1890 {
1891         uint32_t cntr_eventDataIndices_2;
1892         uint32_t cntr_eventDataSizes_2;
1893         ndr_print_struct(ndr, name, "eventlog6_EvtRpcRemoteSubscriptionNext");
1894         if (r == NULL) { ndr_print_null(ndr); return; }
1895         ndr->depth++;
1896         if (flags & NDR_SET_VALUES) {
1897                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
1898         }
1899         if (flags & NDR_IN) {
1900                 ndr_print_struct(ndr, "in", "eventlog6_EvtRpcRemoteSubscriptionNext");
1901                 ndr->depth++;
1902                 ndr_print_ptr(ndr, "handle", r->in.handle);
1903                 ndr->depth++;
1904                 ndr_print_policy_handle(ndr, "handle", r->in.handle);
1905                 ndr->depth--;
1906                 ndr_print_uint32(ndr, "numRequestedRecords", r->in.numRequestedRecords);
1907                 ndr_print_uint32(ndr, "timeOut", r->in.timeOut);
1908                 ndr_print_uint32(ndr, "flags", r->in.flags);
1909                 ndr->depth--;
1910         }
1911         if (flags & NDR_OUT) {
1912                 ndr_print_struct(ndr, "out", "eventlog6_EvtRpcRemoteSubscriptionNext");
1913                 ndr->depth++;
1914                 ndr_print_ptr(ndr, "numActualRecords", r->out.numActualRecords);
1915                 ndr->depth++;
1916                 ndr_print_uint32(ndr, "numActualRecords", *r->out.numActualRecords);
1917                 ndr->depth--;
1918                 ndr_print_ptr(ndr, "eventDataIndices", r->out.eventDataIndices);
1919                 ndr->depth++;
1920                 ndr_print_ptr(ndr, "eventDataIndices", *r->out.eventDataIndices);
1921                 ndr->depth++;
1922                 if (*r->out.eventDataIndices) {
1923                         ndr->print(ndr, "%s: ARRAY(%d)", "eventDataIndices", (int)*r->out.numActualRecords);
1924                         ndr->depth++;
1925                         for (cntr_eventDataIndices_2=0;cntr_eventDataIndices_2<*r->out.numActualRecords;cntr_eventDataIndices_2++) {
1926                                 ndr_print_uint32(ndr, "eventDataIndices", (*r->out.eventDataIndices)[cntr_eventDataIndices_2]);
1927                         }
1928                         ndr->depth--;
1929                 }
1930                 ndr->depth--;
1931                 ndr->depth--;
1932                 ndr_print_ptr(ndr, "eventDataSizes", r->out.eventDataSizes);
1933                 ndr->depth++;
1934                 ndr_print_ptr(ndr, "eventDataSizes", *r->out.eventDataSizes);
1935                 ndr->depth++;
1936                 if (*r->out.eventDataSizes) {
1937                         ndr->print(ndr, "%s: ARRAY(%d)", "eventDataSizes", (int)*r->out.numActualRecords);
1938                         ndr->depth++;
1939                         for (cntr_eventDataSizes_2=0;cntr_eventDataSizes_2<*r->out.numActualRecords;cntr_eventDataSizes_2++) {
1940                                 ndr_print_uint32(ndr, "eventDataSizes", (*r->out.eventDataSizes)[cntr_eventDataSizes_2]);
1941                         }
1942                         ndr->depth--;
1943                 }
1944                 ndr->depth--;
1945                 ndr->depth--;
1946                 ndr_print_ptr(ndr, "resultBufferSize", r->out.resultBufferSize);
1947                 ndr->depth++;
1948                 ndr_print_uint32(ndr, "resultBufferSize", *r->out.resultBufferSize);
1949                 ndr->depth--;
1950                 ndr_print_ptr(ndr, "resultBuffer", r->out.resultBuffer);
1951                 ndr->depth++;
1952                 ndr_print_ptr(ndr, "resultBuffer", *r->out.resultBuffer);
1953                 ndr->depth++;
1954                 if (*r->out.resultBuffer) {
1955                         ndr_print_array_uint8(ndr, "resultBuffer", *r->out.resultBuffer, *r->out.resultBufferSize);
1956                 }
1957                 ndr->depth--;
1958                 ndr->depth--;
1959                 ndr_print_WERROR(ndr, "result", r->out.result);
1960                 ndr->depth--;
1961         }
1962         ndr->depth--;
1963 }
1964
1965 static enum ndr_err_code ndr_push_eventlog6_EvtRpcRemoteSubscriptionWaitAsync(struct ndr_push *ndr, int flags, const struct eventlog6_EvtRpcRemoteSubscriptionWaitAsync *r)
1966 {
1967         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
1968         if (flags & NDR_IN) {
1969                 if (r->in.handle == NULL) {
1970                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1971                 }
1972                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1973         }
1974         if (flags & NDR_OUT) {
1975                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1976         }
1977         return NDR_ERR_SUCCESS;
1978 }
1979
1980 static enum ndr_err_code ndr_pull_eventlog6_EvtRpcRemoteSubscriptionWaitAsync(struct ndr_pull *ndr, int flags, struct eventlog6_EvtRpcRemoteSubscriptionWaitAsync *r)
1981 {
1982         TALLOC_CTX *_mem_save_handle_0;
1983         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
1984         if (flags & NDR_IN) {
1985                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1986                         NDR_PULL_ALLOC(ndr, r->in.handle);
1987                 }
1988                 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
1989                 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
1990                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
1991                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
1992         }
1993         if (flags & NDR_OUT) {
1994                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1995         }
1996         return NDR_ERR_SUCCESS;
1997 }
1998
1999 _PUBLIC_ void ndr_print_eventlog6_EvtRpcRemoteSubscriptionWaitAsync(struct ndr_print *ndr, const char *name, int flags, const struct eventlog6_EvtRpcRemoteSubscriptionWaitAsync *r)
2000 {
2001         ndr_print_struct(ndr, name, "eventlog6_EvtRpcRemoteSubscriptionWaitAsync");
2002         if (r == NULL) { ndr_print_null(ndr); return; }
2003         ndr->depth++;
2004         if (flags & NDR_SET_VALUES) {
2005                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2006         }
2007         if (flags & NDR_IN) {
2008                 ndr_print_struct(ndr, "in", "eventlog6_EvtRpcRemoteSubscriptionWaitAsync");
2009                 ndr->depth++;
2010                 ndr_print_ptr(ndr, "handle", r->in.handle);
2011                 ndr->depth++;
2012                 ndr_print_policy_handle(ndr, "handle", r->in.handle);
2013                 ndr->depth--;
2014                 ndr->depth--;
2015         }
2016         if (flags & NDR_OUT) {
2017                 ndr_print_struct(ndr, "out", "eventlog6_EvtRpcRemoteSubscriptionWaitAsync");
2018                 ndr->depth++;
2019                 ndr_print_WERROR(ndr, "result", r->out.result);
2020                 ndr->depth--;
2021         }
2022         ndr->depth--;
2023 }
2024
2025 static enum ndr_err_code ndr_push_eventlog6_EvtRpcRegisterControllableOperation(struct ndr_push *ndr, int flags, const struct eventlog6_EvtRpcRegisterControllableOperation *r)
2026 {
2027         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
2028         if (flags & NDR_IN) {
2029         }
2030         if (flags & NDR_OUT) {
2031                 if (r->out.handle == NULL) {
2032                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2033                 }
2034                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
2035                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2036         }
2037         return NDR_ERR_SUCCESS;
2038 }
2039
2040 static enum ndr_err_code ndr_pull_eventlog6_EvtRpcRegisterControllableOperation(struct ndr_pull *ndr, int flags, struct eventlog6_EvtRpcRegisterControllableOperation *r)
2041 {
2042         TALLOC_CTX *_mem_save_handle_0;
2043         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
2044         if (flags & NDR_IN) {
2045                 ZERO_STRUCT(r->out);
2046
2047                 NDR_PULL_ALLOC(ndr, r->out.handle);
2048                 ZERO_STRUCTP(r->out.handle);
2049         }
2050         if (flags & NDR_OUT) {
2051                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2052                         NDR_PULL_ALLOC(ndr, r->out.handle);
2053                 }
2054                 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2055                 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
2056                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
2057                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
2058                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2059         }
2060         return NDR_ERR_SUCCESS;
2061 }
2062
2063 _PUBLIC_ void ndr_print_eventlog6_EvtRpcRegisterControllableOperation(struct ndr_print *ndr, const char *name, int flags, const struct eventlog6_EvtRpcRegisterControllableOperation *r)
2064 {
2065         ndr_print_struct(ndr, name, "eventlog6_EvtRpcRegisterControllableOperation");
2066         if (r == NULL) { ndr_print_null(ndr); return; }
2067         ndr->depth++;
2068         if (flags & NDR_SET_VALUES) {
2069                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2070         }
2071         if (flags & NDR_IN) {
2072                 ndr_print_struct(ndr, "in", "eventlog6_EvtRpcRegisterControllableOperation");
2073                 ndr->depth++;
2074                 ndr->depth--;
2075         }
2076         if (flags & NDR_OUT) {
2077                 ndr_print_struct(ndr, "out", "eventlog6_EvtRpcRegisterControllableOperation");
2078                 ndr->depth++;
2079                 ndr_print_ptr(ndr, "handle", r->out.handle);
2080                 ndr->depth++;
2081                 ndr_print_policy_handle(ndr, "handle", r->out.handle);
2082                 ndr->depth--;
2083                 ndr_print_WERROR(ndr, "result", r->out.result);
2084                 ndr->depth--;
2085         }
2086         ndr->depth--;
2087 }
2088
2089 static enum ndr_err_code ndr_push_eventlog6_EvtRpcRegisterLogQuery(struct ndr_push *ndr, int flags, const struct eventlog6_EvtRpcRegisterLogQuery *r)
2090 {
2091         uint32_t cntr_queryChannelInfo_2;
2092         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
2093         if (flags & NDR_IN) {
2094                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.path));
2095                 if (r->in.path) {
2096                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
2097                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2098                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
2099                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path, ndr_charset_length(r->in.path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2100                 }
2101                 if (r->in.query == NULL) {
2102                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2103                 }
2104                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.query, CH_UTF16)));
2105                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2106                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.query, CH_UTF16)));
2107                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.query, ndr_charset_length(r->in.query, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2108                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
2109         }
2110         if (flags & NDR_OUT) {
2111                 if (r->out.handle == NULL) {
2112                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2113                 }
2114                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
2115                 if (r->out.opControl == NULL) {
2116                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2117                 }
2118                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.opControl));
2119                 if (r->out.queryChannelInfoSize == NULL) {
2120                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2121                 }
2122                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.queryChannelInfoSize));
2123                 if (r->out.queryChannelInfo == NULL) {
2124                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2125                 }
2126                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.queryChannelInfo));
2127                 if (*r->out.queryChannelInfo) {
2128                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, *r->out.queryChannelInfoSize));
2129                         for (cntr_queryChannelInfo_2 = 0; cntr_queryChannelInfo_2 < *r->out.queryChannelInfoSize; cntr_queryChannelInfo_2++) {
2130                                 NDR_CHECK(ndr_push_eventlog6_EvtRpcQueryChannelInfo(ndr, NDR_SCALARS, &(*r->out.queryChannelInfo)[cntr_queryChannelInfo_2]));
2131                         }
2132                         for (cntr_queryChannelInfo_2 = 0; cntr_queryChannelInfo_2 < *r->out.queryChannelInfoSize; cntr_queryChannelInfo_2++) {
2133                                 NDR_CHECK(ndr_push_eventlog6_EvtRpcQueryChannelInfo(ndr, NDR_BUFFERS, &(*r->out.queryChannelInfo)[cntr_queryChannelInfo_2]));
2134                         }
2135                 }
2136                 if (r->out.error == NULL) {
2137                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2138                 }
2139                 NDR_CHECK(ndr_push_eventlog6_RpcInfo(ndr, NDR_SCALARS, r->out.error));
2140                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2141         }
2142         return NDR_ERR_SUCCESS;
2143 }
2144
2145 static enum ndr_err_code ndr_pull_eventlog6_EvtRpcRegisterLogQuery(struct ndr_pull *ndr, int flags, struct eventlog6_EvtRpcRegisterLogQuery *r)
2146 {
2147         uint32_t _ptr_path;
2148         uint32_t size_path_1 = 0;
2149         uint32_t length_path_1 = 0;
2150         uint32_t size_query_1 = 0;
2151         uint32_t length_query_1 = 0;
2152         uint32_t _ptr_queryChannelInfo;
2153         uint32_t size_queryChannelInfo_2 = 0;
2154         uint32_t cntr_queryChannelInfo_2;
2155         TALLOC_CTX *_mem_save_path_0;
2156         TALLOC_CTX *_mem_save_handle_0;
2157         TALLOC_CTX *_mem_save_opControl_0;
2158         TALLOC_CTX *_mem_save_queryChannelInfoSize_0;
2159         TALLOC_CTX *_mem_save_queryChannelInfo_0;
2160         TALLOC_CTX *_mem_save_queryChannelInfo_1;
2161         TALLOC_CTX *_mem_save_queryChannelInfo_2;
2162         TALLOC_CTX *_mem_save_error_0;
2163         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
2164         if (flags & NDR_IN) {
2165                 ZERO_STRUCT(r->out);
2166
2167                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
2168                 if (_ptr_path) {
2169                         NDR_PULL_ALLOC(ndr, r->in.path);
2170                 } else {
2171                         r->in.path = NULL;
2172                 }
2173                 if (r->in.path) {
2174                         _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
2175                         NDR_PULL_SET_MEM_CTX(ndr, r->in.path, 0);
2176                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path));
2177                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path));
2178                         size_path_1 = ndr_get_array_size(ndr, &r->in.path);
2179                         if (size_path_1 > MAX_RPC_CHANNEL_PATH_LENGTH) {
2180                                 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2181                         }
2182                         length_path_1 = ndr_get_array_length(ndr, &r->in.path);
2183                         if (length_path_1 > MAX_RPC_CHANNEL_PATH_LENGTH) {
2184                                 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2185                         }
2186                         if (length_path_1 > size_path_1) {
2187                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_path_1, length_path_1);
2188                         }
2189                         NDR_CHECK(ndr_check_string_terminator(ndr, length_path_1, sizeof(uint16_t)));
2190                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path, length_path_1, sizeof(uint16_t), CH_UTF16));
2191                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
2192                 }
2193                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.query));
2194                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.query));
2195                 size_query_1 = ndr_get_array_size(ndr, &r->in.query);
2196                 if (size_query_1 < 1 || size_query_1 > MAX_RPC_QUERY_LENGTH) {
2197                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2198                 }
2199                 length_query_1 = ndr_get_array_length(ndr, &r->in.query);
2200                 if (length_query_1 < 1 || length_query_1 > MAX_RPC_QUERY_LENGTH) {
2201                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2202                 }
2203                 if (length_query_1 > size_query_1) {
2204                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_query_1, length_query_1);
2205                 }
2206                 NDR_CHECK(ndr_check_string_terminator(ndr, length_query_1, sizeof(uint16_t)));
2207                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.query, length_query_1, sizeof(uint16_t), CH_UTF16));
2208                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
2209                 NDR_PULL_ALLOC(ndr, r->out.handle);
2210                 ZERO_STRUCTP(r->out.handle);
2211                 NDR_PULL_ALLOC(ndr, r->out.opControl);
2212                 ZERO_STRUCTP(r->out.opControl);
2213                 NDR_PULL_ALLOC(ndr, r->out.queryChannelInfoSize);
2214                 ZERO_STRUCTP(r->out.queryChannelInfoSize);
2215                 NDR_PULL_ALLOC(ndr, r->out.queryChannelInfo);
2216                 ZERO_STRUCTP(r->out.queryChannelInfo);
2217                 NDR_PULL_ALLOC(ndr, r->out.error);
2218                 ZERO_STRUCTP(r->out.error);
2219         }
2220         if (flags & NDR_OUT) {
2221                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2222                         NDR_PULL_ALLOC(ndr, r->out.handle);
2223                 }
2224                 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
2225                 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
2226                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
2227                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
2228                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2229                         NDR_PULL_ALLOC(ndr, r->out.opControl);
2230                 }
2231                 _mem_save_opControl_0 = NDR_PULL_GET_MEM_CTX(ndr);
2232                 NDR_PULL_SET_MEM_CTX(ndr, r->out.opControl, LIBNDR_FLAG_REF_ALLOC);
2233                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.opControl));
2234                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_opControl_0, LIBNDR_FLAG_REF_ALLOC);
2235                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2236                         NDR_PULL_ALLOC(ndr, r->out.queryChannelInfoSize);
2237                 }
2238                 _mem_save_queryChannelInfoSize_0 = NDR_PULL_GET_MEM_CTX(ndr);
2239                 NDR_PULL_SET_MEM_CTX(ndr, r->out.queryChannelInfoSize, LIBNDR_FLAG_REF_ALLOC);
2240                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.queryChannelInfoSize));
2241                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_queryChannelInfoSize_0, LIBNDR_FLAG_REF_ALLOC);
2242                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2243                         NDR_PULL_ALLOC(ndr, r->out.queryChannelInfo);
2244                 }
2245                 _mem_save_queryChannelInfo_0 = NDR_PULL_GET_MEM_CTX(ndr);
2246                 NDR_PULL_SET_MEM_CTX(ndr, r->out.queryChannelInfo, LIBNDR_FLAG_REF_ALLOC);
2247                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_queryChannelInfo));
2248                 if (_ptr_queryChannelInfo) {
2249                         NDR_PULL_ALLOC(ndr, *r->out.queryChannelInfo);
2250                 } else {
2251                         *r->out.queryChannelInfo = NULL;
2252                 }
2253                 if (*r->out.queryChannelInfo) {
2254                         _mem_save_queryChannelInfo_1 = NDR_PULL_GET_MEM_CTX(ndr);
2255                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.queryChannelInfo, 0);
2256                         NDR_CHECK(ndr_pull_array_size(ndr, r->out.queryChannelInfo));
2257                         size_queryChannelInfo_2 = ndr_get_array_size(ndr, r->out.queryChannelInfo);
2258                         if (size_queryChannelInfo_2 > MAX_RPC_QUERY_CHANNEL_SIZE) {
2259                                 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2260                         }
2261                         NDR_PULL_ALLOC_N(ndr, *r->out.queryChannelInfo, size_queryChannelInfo_2);
2262                         _mem_save_queryChannelInfo_2 = NDR_PULL_GET_MEM_CTX(ndr);
2263                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.queryChannelInfo, 0);
2264                         for (cntr_queryChannelInfo_2 = 0; cntr_queryChannelInfo_2 < size_queryChannelInfo_2; cntr_queryChannelInfo_2++) {
2265                                 NDR_CHECK(ndr_pull_eventlog6_EvtRpcQueryChannelInfo(ndr, NDR_SCALARS, &(*r->out.queryChannelInfo)[cntr_queryChannelInfo_2]));
2266                         }
2267                         for (cntr_queryChannelInfo_2 = 0; cntr_queryChannelInfo_2 < size_queryChannelInfo_2; cntr_queryChannelInfo_2++) {
2268                                 NDR_CHECK(ndr_pull_eventlog6_EvtRpcQueryChannelInfo(ndr, NDR_BUFFERS, &(*r->out.queryChannelInfo)[cntr_queryChannelInfo_2]));
2269                         }
2270                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_queryChannelInfo_2, 0);
2271                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_queryChannelInfo_1, 0);
2272                 }
2273                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_queryChannelInfo_0, LIBNDR_FLAG_REF_ALLOC);
2274                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2275                         NDR_PULL_ALLOC(ndr, r->out.error);
2276                 }
2277                 _mem_save_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
2278                 NDR_PULL_SET_MEM_CTX(ndr, r->out.error, LIBNDR_FLAG_REF_ALLOC);
2279                 NDR_CHECK(ndr_pull_eventlog6_RpcInfo(ndr, NDR_SCALARS, r->out.error));
2280                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_error_0, LIBNDR_FLAG_REF_ALLOC);
2281                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2282                 if (*r->out.queryChannelInfo) {
2283                         NDR_CHECK(ndr_check_array_size(ndr, (void*)r->out.queryChannelInfo, *r->out.queryChannelInfoSize));
2284                 }
2285         }
2286         return NDR_ERR_SUCCESS;
2287 }
2288
2289 _PUBLIC_ void ndr_print_eventlog6_EvtRpcRegisterLogQuery(struct ndr_print *ndr, const char *name, int flags, const struct eventlog6_EvtRpcRegisterLogQuery *r)
2290 {
2291         uint32_t cntr_queryChannelInfo_2;
2292         ndr_print_struct(ndr, name, "eventlog6_EvtRpcRegisterLogQuery");
2293         if (r == NULL) { ndr_print_null(ndr); return; }
2294         ndr->depth++;
2295         if (flags & NDR_SET_VALUES) {
2296                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2297         }
2298         if (flags & NDR_IN) {
2299                 ndr_print_struct(ndr, "in", "eventlog6_EvtRpcRegisterLogQuery");
2300                 ndr->depth++;
2301                 ndr_print_ptr(ndr, "path", r->in.path);
2302                 ndr->depth++;
2303                 if (r->in.path) {
2304                         ndr_print_string(ndr, "path", r->in.path);
2305                 }
2306                 ndr->depth--;
2307                 ndr_print_ptr(ndr, "query", r->in.query);
2308                 ndr->depth++;
2309                 ndr_print_string(ndr, "query", r->in.query);
2310                 ndr->depth--;
2311                 ndr_print_uint32(ndr, "flags", r->in.flags);
2312                 ndr->depth--;
2313         }
2314         if (flags & NDR_OUT) {
2315                 ndr_print_struct(ndr, "out", "eventlog6_EvtRpcRegisterLogQuery");
2316                 ndr->depth++;
2317                 ndr_print_ptr(ndr, "handle", r->out.handle);
2318                 ndr->depth++;
2319                 ndr_print_policy_handle(ndr, "handle", r->out.handle);
2320                 ndr->depth--;
2321                 ndr_print_ptr(ndr, "opControl", r->out.opControl);
2322                 ndr->depth++;
2323                 ndr_print_policy_handle(ndr, "opControl", r->out.opControl);
2324                 ndr->depth--;
2325                 ndr_print_ptr(ndr, "queryChannelInfoSize", r->out.queryChannelInfoSize);
2326                 ndr->depth++;
2327                 ndr_print_uint32(ndr, "queryChannelInfoSize", *r->out.queryChannelInfoSize);
2328                 ndr->depth--;
2329                 ndr_print_ptr(ndr, "queryChannelInfo", r->out.queryChannelInfo);
2330                 ndr->depth++;
2331                 ndr_print_ptr(ndr, "queryChannelInfo", *r->out.queryChannelInfo);
2332                 ndr->depth++;
2333                 if (*r->out.queryChannelInfo) {
2334                         ndr->print(ndr, "%s: ARRAY(%d)", "queryChannelInfo", (int)*r->out.queryChannelInfoSize);
2335                         ndr->depth++;
2336                         for (cntr_queryChannelInfo_2=0;cntr_queryChannelInfo_2<*r->out.queryChannelInfoSize;cntr_queryChannelInfo_2++) {
2337                                 ndr_print_eventlog6_EvtRpcQueryChannelInfo(ndr, "queryChannelInfo", &(*r->out.queryChannelInfo)[cntr_queryChannelInfo_2]);
2338                         }
2339                         ndr->depth--;
2340                 }
2341                 ndr->depth--;
2342                 ndr->depth--;
2343                 ndr_print_ptr(ndr, "error", r->out.error);
2344                 ndr->depth++;
2345                 ndr_print_eventlog6_RpcInfo(ndr, "error", r->out.error);
2346                 ndr->depth--;
2347                 ndr_print_WERROR(ndr, "result", r->out.result);
2348                 ndr->depth--;
2349         }
2350         ndr->depth--;
2351 }
2352
2353 static enum ndr_err_code ndr_push_eventlog6_EvtRpcClearLog(struct ndr_push *ndr, int flags, const struct eventlog6_EvtRpcClearLog *r)
2354 {
2355         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
2356         if (flags & NDR_IN) {
2357                 if (r->in.control == NULL) {
2358                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2359                 }
2360                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.control));
2361                 if (r->in.channelPath == NULL) {
2362                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2363                 }
2364                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.channelPath, CH_UTF16)));
2365                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2366                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.channelPath, CH_UTF16)));
2367                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.channelPath, ndr_charset_length(r->in.channelPath, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2368                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.backupPath));
2369                 if (r->in.backupPath) {
2370                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.backupPath, CH_UTF16)));
2371                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2372                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.backupPath, CH_UTF16)));
2373                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.backupPath, ndr_charset_length(r->in.backupPath, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2374                 }
2375                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
2376         }
2377         if (flags & NDR_OUT) {
2378                 if (r->out.error == NULL) {
2379                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2380                 }
2381                 NDR_CHECK(ndr_push_eventlog6_RpcInfo(ndr, NDR_SCALARS, r->out.error));
2382                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2383         }
2384         return NDR_ERR_SUCCESS;
2385 }
2386
2387 static enum ndr_err_code ndr_pull_eventlog6_EvtRpcClearLog(struct ndr_pull *ndr, int flags, struct eventlog6_EvtRpcClearLog *r)
2388 {
2389         uint32_t size_channelPath_1 = 0;
2390         uint32_t length_channelPath_1 = 0;
2391         uint32_t _ptr_backupPath;
2392         uint32_t size_backupPath_1 = 0;
2393         uint32_t length_backupPath_1 = 0;
2394         TALLOC_CTX *_mem_save_control_0;
2395         TALLOC_CTX *_mem_save_backupPath_0;
2396         TALLOC_CTX *_mem_save_error_0;
2397         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
2398         if (flags & NDR_IN) {
2399                 ZERO_STRUCT(r->out);
2400
2401                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2402                         NDR_PULL_ALLOC(ndr, r->in.control);
2403                 }
2404                 _mem_save_control_0 = NDR_PULL_GET_MEM_CTX(ndr);
2405                 NDR_PULL_SET_MEM_CTX(ndr, r->in.control, LIBNDR_FLAG_REF_ALLOC);
2406                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.control));
2407                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_control_0, LIBNDR_FLAG_REF_ALLOC);
2408                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.channelPath));
2409                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.channelPath));
2410                 size_channelPath_1 = ndr_get_array_size(ndr, &r->in.channelPath);
2411                 if (size_channelPath_1 > MAX_RPC_CHANNEL_NAME_LENGTH) {
2412                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2413                 }
2414                 length_channelPath_1 = ndr_get_array_length(ndr, &r->in.channelPath);
2415                 if (length_channelPath_1 > MAX_RPC_CHANNEL_NAME_LENGTH) {
2416                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2417                 }
2418                 if (length_channelPath_1 > size_channelPath_1) {
2419                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_channelPath_1, length_channelPath_1);
2420                 }
2421                 NDR_CHECK(ndr_check_string_terminator(ndr, length_channelPath_1, sizeof(uint16_t)));
2422                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.channelPath, length_channelPath_1, sizeof(uint16_t), CH_UTF16));
2423                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_backupPath));
2424                 if (_ptr_backupPath) {
2425                         NDR_PULL_ALLOC(ndr, r->in.backupPath);
2426                 } else {
2427                         r->in.backupPath = NULL;
2428                 }
2429                 if (r->in.backupPath) {
2430                         _mem_save_backupPath_0 = NDR_PULL_GET_MEM_CTX(ndr);
2431                         NDR_PULL_SET_MEM_CTX(ndr, r->in.backupPath, 0);
2432                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.backupPath));
2433                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.backupPath));
2434                         size_backupPath_1 = ndr_get_array_size(ndr, &r->in.backupPath);
2435                         if (size_backupPath_1 > MAX_RPC_FILE_PATH_LENGTH) {
2436                                 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2437                         }
2438                         length_backupPath_1 = ndr_get_array_length(ndr, &r->in.backupPath);
2439                         if (length_backupPath_1 > MAX_RPC_FILE_PATH_LENGTH) {
2440                                 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2441                         }
2442                         if (length_backupPath_1 > size_backupPath_1) {
2443                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_backupPath_1, length_backupPath_1);
2444                         }
2445                         NDR_CHECK(ndr_check_string_terminator(ndr, length_backupPath_1, sizeof(uint16_t)));
2446                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.backupPath, length_backupPath_1, sizeof(uint16_t), CH_UTF16));
2447                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_backupPath_0, 0);
2448                 }
2449                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
2450                 NDR_PULL_ALLOC(ndr, r->out.error);
2451                 ZERO_STRUCTP(r->out.error);
2452         }
2453         if (flags & NDR_OUT) {
2454                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2455                         NDR_PULL_ALLOC(ndr, r->out.error);
2456                 }
2457                 _mem_save_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
2458                 NDR_PULL_SET_MEM_CTX(ndr, r->out.error, LIBNDR_FLAG_REF_ALLOC);
2459                 NDR_CHECK(ndr_pull_eventlog6_RpcInfo(ndr, NDR_SCALARS, r->out.error));
2460                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_error_0, LIBNDR_FLAG_REF_ALLOC);
2461                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2462         }
2463         return NDR_ERR_SUCCESS;
2464 }
2465
2466 _PUBLIC_ void ndr_print_eventlog6_EvtRpcClearLog(struct ndr_print *ndr, const char *name, int flags, const struct eventlog6_EvtRpcClearLog *r)
2467 {
2468         ndr_print_struct(ndr, name, "eventlog6_EvtRpcClearLog");
2469         if (r == NULL) { ndr_print_null(ndr); return; }
2470         ndr->depth++;
2471         if (flags & NDR_SET_VALUES) {
2472                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2473         }
2474         if (flags & NDR_IN) {
2475                 ndr_print_struct(ndr, "in", "eventlog6_EvtRpcClearLog");
2476                 ndr->depth++;
2477                 ndr_print_ptr(ndr, "control", r->in.control);
2478                 ndr->depth++;
2479                 ndr_print_policy_handle(ndr, "control", r->in.control);
2480                 ndr->depth--;
2481                 ndr_print_ptr(ndr, "channelPath", r->in.channelPath);
2482                 ndr->depth++;
2483                 ndr_print_string(ndr, "channelPath", r->in.channelPath);
2484                 ndr->depth--;
2485                 ndr_print_ptr(ndr, "backupPath", r->in.backupPath);
2486                 ndr->depth++;
2487                 if (r->in.backupPath) {
2488                         ndr_print_string(ndr, "backupPath", r->in.backupPath);
2489                 }
2490                 ndr->depth--;
2491                 ndr_print_uint32(ndr, "flags", r->in.flags);
2492                 ndr->depth--;
2493         }
2494         if (flags & NDR_OUT) {
2495                 ndr_print_struct(ndr, "out", "eventlog6_EvtRpcClearLog");
2496                 ndr->depth++;
2497                 ndr_print_ptr(ndr, "error", r->out.error);
2498                 ndr->depth++;
2499                 ndr_print_eventlog6_RpcInfo(ndr, "error", r->out.error);
2500                 ndr->depth--;
2501                 ndr_print_WERROR(ndr, "result", r->out.result);
2502                 ndr->depth--;
2503         }
2504         ndr->depth--;
2505 }
2506
2507 static enum ndr_err_code ndr_push_eventlog6_EvtRpcExportLog(struct ndr_push *ndr, int flags, const struct eventlog6_EvtRpcExportLog *r)
2508 {
2509         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
2510         if (flags & NDR_IN) {
2511                 if (r->in.control == NULL) {
2512                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2513                 }
2514                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.control));
2515                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.channelPath));
2516                 if (r->in.channelPath) {
2517                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.channelPath, CH_UTF16)));
2518                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2519                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.channelPath, CH_UTF16)));
2520                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.channelPath, ndr_charset_length(r->in.channelPath, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2521                 }
2522                 if (r->in.query == NULL) {
2523                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2524                 }
2525                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.query, CH_UTF16)));
2526                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2527                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.query, CH_UTF16)));
2528                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.query, ndr_charset_length(r->in.query, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2529                 if (r->in.backupPath == NULL) {
2530                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2531                 }
2532                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.backupPath, CH_UTF16)));
2533                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2534                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.backupPath, CH_UTF16)));
2535                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.backupPath, ndr_charset_length(r->in.backupPath, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2536                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
2537         }
2538         if (flags & NDR_OUT) {
2539                 if (r->out.error == NULL) {
2540                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2541                 }
2542                 NDR_CHECK(ndr_push_eventlog6_RpcInfo(ndr, NDR_SCALARS, r->out.error));
2543                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2544         }
2545         return NDR_ERR_SUCCESS;
2546 }
2547
2548 static enum ndr_err_code ndr_pull_eventlog6_EvtRpcExportLog(struct ndr_pull *ndr, int flags, struct eventlog6_EvtRpcExportLog *r)
2549 {
2550         uint32_t _ptr_channelPath;
2551         uint32_t size_channelPath_1 = 0;
2552         uint32_t length_channelPath_1 = 0;
2553         uint32_t size_query_1 = 0;
2554         uint32_t length_query_1 = 0;
2555         uint32_t size_backupPath_1 = 0;
2556         uint32_t length_backupPath_1 = 0;
2557         TALLOC_CTX *_mem_save_control_0;
2558         TALLOC_CTX *_mem_save_channelPath_0;
2559         TALLOC_CTX *_mem_save_error_0;
2560         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
2561         if (flags & NDR_IN) {
2562                 ZERO_STRUCT(r->out);
2563
2564                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2565                         NDR_PULL_ALLOC(ndr, r->in.control);
2566                 }
2567                 _mem_save_control_0 = NDR_PULL_GET_MEM_CTX(ndr);
2568                 NDR_PULL_SET_MEM_CTX(ndr, r->in.control, LIBNDR_FLAG_REF_ALLOC);
2569                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.control));
2570                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_control_0, LIBNDR_FLAG_REF_ALLOC);
2571                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_channelPath));
2572                 if (_ptr_channelPath) {
2573                         NDR_PULL_ALLOC(ndr, r->in.channelPath);
2574                 } else {
2575                         r->in.channelPath = NULL;
2576                 }
2577                 if (r->in.channelPath) {
2578                         _mem_save_channelPath_0 = NDR_PULL_GET_MEM_CTX(ndr);
2579                         NDR_PULL_SET_MEM_CTX(ndr, r->in.channelPath, 0);
2580                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.channelPath));
2581                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.channelPath));
2582                         size_channelPath_1 = ndr_get_array_size(ndr, &r->in.channelPath);
2583                         if (size_channelPath_1 > MAX_RPC_CHANNEL_NAME_LENGTH) {
2584                                 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2585                         }
2586                         length_channelPath_1 = ndr_get_array_length(ndr, &r->in.channelPath);
2587                         if (length_channelPath_1 > MAX_RPC_CHANNEL_NAME_LENGTH) {
2588                                 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2589                         }
2590                         if (length_channelPath_1 > size_channelPath_1) {
2591                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_channelPath_1, length_channelPath_1);
2592                         }
2593                         NDR_CHECK(ndr_check_string_terminator(ndr, length_channelPath_1, sizeof(uint16_t)));
2594                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.channelPath, length_channelPath_1, sizeof(uint16_t), CH_UTF16));
2595                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_channelPath_0, 0);
2596                 }
2597                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.query));
2598                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.query));
2599                 size_query_1 = ndr_get_array_size(ndr, &r->in.query);
2600                 if (size_query_1 < 1 || size_query_1 > MAX_RPC_QUERY_LENGTH) {
2601                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2602                 }
2603                 length_query_1 = ndr_get_array_length(ndr, &r->in.query);
2604                 if (length_query_1 < 1 || length_query_1 > MAX_RPC_QUERY_LENGTH) {
2605                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2606                 }
2607                 if (length_query_1 > size_query_1) {
2608                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_query_1, length_query_1);
2609                 }
2610                 NDR_CHECK(ndr_check_string_terminator(ndr, length_query_1, sizeof(uint16_t)));
2611                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.query, length_query_1, sizeof(uint16_t), CH_UTF16));
2612                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.backupPath));
2613                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.backupPath));
2614                 size_backupPath_1 = ndr_get_array_size(ndr, &r->in.backupPath);
2615                 if (size_backupPath_1 < 1 || size_backupPath_1 > MAX_RPC_FILE_PATH_LENGTH) {
2616                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2617                 }
2618                 length_backupPath_1 = ndr_get_array_length(ndr, &r->in.backupPath);
2619                 if (length_backupPath_1 < 1 || length_backupPath_1 > MAX_RPC_FILE_PATH_LENGTH) {
2620                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2621                 }
2622                 if (length_backupPath_1 > size_backupPath_1) {
2623                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_backupPath_1, length_backupPath_1);
2624                 }
2625                 NDR_CHECK(ndr_check_string_terminator(ndr, length_backupPath_1, sizeof(uint16_t)));
2626                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.backupPath, length_backupPath_1, sizeof(uint16_t), CH_UTF16));
2627                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
2628                 NDR_PULL_ALLOC(ndr, r->out.error);
2629                 ZERO_STRUCTP(r->out.error);
2630         }
2631         if (flags & NDR_OUT) {
2632                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2633                         NDR_PULL_ALLOC(ndr, r->out.error);
2634                 }
2635                 _mem_save_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
2636                 NDR_PULL_SET_MEM_CTX(ndr, r->out.error, LIBNDR_FLAG_REF_ALLOC);
2637                 NDR_CHECK(ndr_pull_eventlog6_RpcInfo(ndr, NDR_SCALARS, r->out.error));
2638                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_error_0, LIBNDR_FLAG_REF_ALLOC);
2639                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2640         }
2641         return NDR_ERR_SUCCESS;
2642 }
2643
2644 _PUBLIC_ void ndr_print_eventlog6_EvtRpcExportLog(struct ndr_print *ndr, const char *name, int flags, const struct eventlog6_EvtRpcExportLog *r)
2645 {
2646         ndr_print_struct(ndr, name, "eventlog6_EvtRpcExportLog");
2647         if (r == NULL) { ndr_print_null(ndr); return; }
2648         ndr->depth++;
2649         if (flags & NDR_SET_VALUES) {
2650                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2651         }
2652         if (flags & NDR_IN) {
2653                 ndr_print_struct(ndr, "in", "eventlog6_EvtRpcExportLog");
2654                 ndr->depth++;
2655                 ndr_print_ptr(ndr, "control", r->in.control);
2656                 ndr->depth++;
2657                 ndr_print_policy_handle(ndr, "control", r->in.control);
2658                 ndr->depth--;
2659                 ndr_print_ptr(ndr, "channelPath", r->in.channelPath);
2660                 ndr->depth++;
2661                 if (r->in.channelPath) {
2662                         ndr_print_string(ndr, "channelPath", r->in.channelPath);
2663                 }
2664                 ndr->depth--;
2665                 ndr_print_ptr(ndr, "query", r->in.query);
2666                 ndr->depth++;
2667                 ndr_print_string(ndr, "query", r->in.query);
2668                 ndr->depth--;
2669                 ndr_print_ptr(ndr, "backupPath", r->in.backupPath);
2670                 ndr->depth++;
2671                 ndr_print_string(ndr, "backupPath", r->in.backupPath);
2672                 ndr->depth--;
2673                 ndr_print_uint32(ndr, "flags", r->in.flags);
2674                 ndr->depth--;
2675         }
2676         if (flags & NDR_OUT) {
2677                 ndr_print_struct(ndr, "out", "eventlog6_EvtRpcExportLog");
2678                 ndr->depth++;
2679                 ndr_print_ptr(ndr, "error", r->out.error);
2680                 ndr->depth++;
2681                 ndr_print_eventlog6_RpcInfo(ndr, "error", r->out.error);
2682                 ndr->depth--;
2683                 ndr_print_WERROR(ndr, "result", r->out.result);
2684                 ndr->depth--;
2685         }
2686         ndr->depth--;
2687 }
2688
2689 static enum ndr_err_code ndr_push_eventlog6_EvtRpcLocalizeExportLog(struct ndr_push *ndr, int flags, const struct eventlog6_EvtRpcLocalizeExportLog *r)
2690 {
2691         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
2692         if (flags & NDR_IN) {
2693                 if (r->in.control == NULL) {
2694                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2695                 }
2696                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.control));
2697                 if (r->in.logFilePath == NULL) {
2698                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2699                 }
2700                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logFilePath, CH_UTF16)));
2701                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2702                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logFilePath, CH_UTF16)));
2703                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.logFilePath, ndr_charset_length(r->in.logFilePath, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2704                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.locale));
2705                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
2706         }
2707         if (flags & NDR_OUT) {
2708                 if (r->out.error == NULL) {
2709                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2710                 }
2711                 NDR_CHECK(ndr_push_eventlog6_RpcInfo(ndr, NDR_SCALARS, r->out.error));
2712                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2713         }
2714         return NDR_ERR_SUCCESS;
2715 }
2716
2717 static enum ndr_err_code ndr_pull_eventlog6_EvtRpcLocalizeExportLog(struct ndr_pull *ndr, int flags, struct eventlog6_EvtRpcLocalizeExportLog *r)
2718 {
2719         uint32_t size_logFilePath_1 = 0;
2720         uint32_t length_logFilePath_1 = 0;
2721         TALLOC_CTX *_mem_save_control_0;
2722         TALLOC_CTX *_mem_save_error_0;
2723         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
2724         if (flags & NDR_IN) {
2725                 ZERO_STRUCT(r->out);
2726
2727                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2728                         NDR_PULL_ALLOC(ndr, r->in.control);
2729                 }
2730                 _mem_save_control_0 = NDR_PULL_GET_MEM_CTX(ndr);
2731                 NDR_PULL_SET_MEM_CTX(ndr, r->in.control, LIBNDR_FLAG_REF_ALLOC);
2732                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.control));
2733                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_control_0, LIBNDR_FLAG_REF_ALLOC);
2734                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logFilePath));
2735                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logFilePath));
2736                 size_logFilePath_1 = ndr_get_array_size(ndr, &r->in.logFilePath);
2737                 if (size_logFilePath_1 < 1 || size_logFilePath_1 > MAX_RPC_FILE_PATH_LENGTH) {
2738                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2739                 }
2740                 length_logFilePath_1 = ndr_get_array_length(ndr, &r->in.logFilePath);
2741                 if (length_logFilePath_1 < 1 || length_logFilePath_1 > MAX_RPC_FILE_PATH_LENGTH) {
2742                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2743                 }
2744                 if (length_logFilePath_1 > size_logFilePath_1) {
2745                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_logFilePath_1, length_logFilePath_1);
2746                 }
2747                 NDR_CHECK(ndr_check_string_terminator(ndr, length_logFilePath_1, sizeof(uint16_t)));
2748                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logFilePath, length_logFilePath_1, sizeof(uint16_t), CH_UTF16));
2749                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.locale));
2750                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
2751                 NDR_PULL_ALLOC(ndr, r->out.error);
2752                 ZERO_STRUCTP(r->out.error);
2753         }
2754         if (flags & NDR_OUT) {
2755                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2756                         NDR_PULL_ALLOC(ndr, r->out.error);
2757                 }
2758                 _mem_save_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
2759                 NDR_PULL_SET_MEM_CTX(ndr, r->out.error, LIBNDR_FLAG_REF_ALLOC);
2760                 NDR_CHECK(ndr_pull_eventlog6_RpcInfo(ndr, NDR_SCALARS, r->out.error));
2761                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_error_0, LIBNDR_FLAG_REF_ALLOC);
2762                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2763         }
2764         return NDR_ERR_SUCCESS;
2765 }
2766
2767 _PUBLIC_ void ndr_print_eventlog6_EvtRpcLocalizeExportLog(struct ndr_print *ndr, const char *name, int flags, const struct eventlog6_EvtRpcLocalizeExportLog *r)
2768 {
2769         ndr_print_struct(ndr, name, "eventlog6_EvtRpcLocalizeExportLog");
2770         if (r == NULL) { ndr_print_null(ndr); return; }
2771         ndr->depth++;
2772         if (flags & NDR_SET_VALUES) {
2773                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2774         }
2775         if (flags & NDR_IN) {
2776                 ndr_print_struct(ndr, "in", "eventlog6_EvtRpcLocalizeExportLog");
2777                 ndr->depth++;
2778                 ndr_print_ptr(ndr, "control", r->in.control);
2779                 ndr->depth++;
2780                 ndr_print_policy_handle(ndr, "control", r->in.control);
2781                 ndr->depth--;
2782                 ndr_print_ptr(ndr, "logFilePath", r->in.logFilePath);
2783                 ndr->depth++;
2784                 ndr_print_string(ndr, "logFilePath", r->in.logFilePath);
2785                 ndr->depth--;
2786                 ndr_print_uint32(ndr, "locale", r->in.locale);
2787                 ndr_print_uint32(ndr, "flags", r->in.flags);
2788                 ndr->depth--;
2789         }
2790         if (flags & NDR_OUT) {
2791                 ndr_print_struct(ndr, "out", "eventlog6_EvtRpcLocalizeExportLog");
2792                 ndr->depth++;
2793                 ndr_print_ptr(ndr, "error", r->out.error);
2794                 ndr->depth++;
2795                 ndr_print_eventlog6_RpcInfo(ndr, "error", r->out.error);
2796                 ndr->depth--;
2797                 ndr_print_WERROR(ndr, "result", r->out.result);
2798                 ndr->depth--;
2799         }
2800         ndr->depth--;
2801 }
2802
2803 static enum ndr_err_code ndr_push_eventlog6_EvtRpcMessageRender(struct ndr_push *ndr, int flags, const struct eventlog6_EvtRpcMessageRender *r)
2804 {
2805         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
2806         if (flags & NDR_IN) {
2807                 if (r->in.pubCfgObj == NULL) {
2808                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2809                 }
2810                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.pubCfgObj));
2811                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.sizeEventId));
2812                 if (r->in.eventId == NULL) {
2813                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2814                 }
2815                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.sizeEventId));
2816                 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.eventId, r->in.sizeEventId));
2817                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.messageId));
2818                 if (r->in.values == NULL) {
2819                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2820                 }
2821                 NDR_CHECK(ndr_push_eventlog6_EvtRpcVariantList(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.values));
2822                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
2823                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.maxSizeString));
2824         }
2825         if (flags & NDR_OUT) {
2826                 if (r->out.actualSizeString == NULL) {
2827                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2828                 }
2829                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.actualSizeString));
2830                 if (r->out.neededSizeString == NULL) {
2831                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2832                 }
2833                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.neededSizeString));
2834                 if (r->out.string == NULL) {
2835                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2836                 }
2837                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.string));
2838                 if (*r->out.string) {
2839                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, *r->out.actualSizeString));
2840                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, *r->out.string, *r->out.actualSizeString));
2841                 }
2842                 if (r->out.error == NULL) {
2843                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
2844                 }
2845                 NDR_CHECK(ndr_push_eventlog6_RpcInfo(ndr, NDR_SCALARS, r->out.error));
2846                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
2847         }
2848         return NDR_ERR_SUCCESS;
2849 }
2850
2851 static enum ndr_err_code ndr_pull_eventlog6_EvtRpcMessageRender(struct ndr_pull *ndr, int flags, struct eventlog6_EvtRpcMessageRender *r)
2852 {
2853         uint32_t size_eventId_1 = 0;
2854         uint32_t _ptr_string;
2855         uint32_t size_string_2 = 0;
2856         TALLOC_CTX *_mem_save_pubCfgObj_0;
2857         TALLOC_CTX *_mem_save_values_0;
2858         TALLOC_CTX *_mem_save_actualSizeString_0;
2859         TALLOC_CTX *_mem_save_neededSizeString_0;
2860         TALLOC_CTX *_mem_save_string_0;
2861         TALLOC_CTX *_mem_save_string_1;
2862         TALLOC_CTX *_mem_save_error_0;
2863         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
2864         if (flags & NDR_IN) {
2865                 ZERO_STRUCT(r->out);
2866
2867                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2868                         NDR_PULL_ALLOC(ndr, r->in.pubCfgObj);
2869                 }
2870                 _mem_save_pubCfgObj_0 = NDR_PULL_GET_MEM_CTX(ndr);
2871                 NDR_PULL_SET_MEM_CTX(ndr, r->in.pubCfgObj, LIBNDR_FLAG_REF_ALLOC);
2872                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.pubCfgObj));
2873                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pubCfgObj_0, LIBNDR_FLAG_REF_ALLOC);
2874                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.sizeEventId));
2875                 if (r->in.sizeEventId < 1 || r->in.sizeEventId > MAX_RPC_EVENT_ID_SIZE) {
2876                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2877                 }
2878                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.eventId));
2879                 size_eventId_1 = ndr_get_array_size(ndr, &r->in.eventId);
2880                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2881                         NDR_PULL_ALLOC_N(ndr, r->in.eventId, size_eventId_1);
2882                 }
2883                 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.eventId, size_eventId_1));
2884                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.messageId));
2885                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2886                         NDR_PULL_ALLOC(ndr, r->in.values);
2887                 }
2888                 _mem_save_values_0 = NDR_PULL_GET_MEM_CTX(ndr);
2889                 NDR_PULL_SET_MEM_CTX(ndr, r->in.values, LIBNDR_FLAG_REF_ALLOC);
2890                 NDR_CHECK(ndr_pull_eventlog6_EvtRpcVariantList(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.values));
2891                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_values_0, LIBNDR_FLAG_REF_ALLOC);
2892                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
2893                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.maxSizeString));
2894                 NDR_PULL_ALLOC(ndr, r->out.actualSizeString);
2895                 ZERO_STRUCTP(r->out.actualSizeString);
2896                 NDR_PULL_ALLOC(ndr, r->out.neededSizeString);
2897                 ZERO_STRUCTP(r->out.neededSizeString);
2898                 NDR_PULL_ALLOC(ndr, r->out.string);
2899                 ZERO_STRUCTP(r->out.string);
2900                 NDR_PULL_ALLOC(ndr, r->out.error);
2901                 ZERO_STRUCTP(r->out.error);
2902                 if (r->in.eventId) {
2903                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.eventId, r->in.sizeEventId));
2904                 }
2905         }
2906         if (flags & NDR_OUT) {
2907                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2908                         NDR_PULL_ALLOC(ndr, r->out.actualSizeString);
2909                 }
2910                 _mem_save_actualSizeString_0 = NDR_PULL_GET_MEM_CTX(ndr);
2911                 NDR_PULL_SET_MEM_CTX(ndr, r->out.actualSizeString, LIBNDR_FLAG_REF_ALLOC);
2912                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.actualSizeString));
2913                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_actualSizeString_0, LIBNDR_FLAG_REF_ALLOC);
2914                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2915                         NDR_PULL_ALLOC(ndr, r->out.neededSizeString);
2916                 }
2917                 _mem_save_neededSizeString_0 = NDR_PULL_GET_MEM_CTX(ndr);
2918                 NDR_PULL_SET_MEM_CTX(ndr, r->out.neededSizeString, LIBNDR_FLAG_REF_ALLOC);
2919                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.neededSizeString));
2920                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_neededSizeString_0, LIBNDR_FLAG_REF_ALLOC);
2921                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2922                         NDR_PULL_ALLOC(ndr, r->out.string);
2923                 }
2924                 _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
2925                 NDR_PULL_SET_MEM_CTX(ndr, r->out.string, LIBNDR_FLAG_REF_ALLOC);
2926                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
2927                 if (_ptr_string) {
2928                         NDR_PULL_ALLOC(ndr, *r->out.string);
2929                 } else {
2930                         *r->out.string = NULL;
2931                 }
2932                 if (*r->out.string) {
2933                         _mem_save_string_1 = NDR_PULL_GET_MEM_CTX(ndr);
2934                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.string, 0);
2935                         NDR_CHECK(ndr_pull_array_size(ndr, r->out.string));
2936                         size_string_2 = ndr_get_array_size(ndr, r->out.string);
2937                         if (size_string_2 > MAX_RPC_RENDERED_STRING_SIZE) {
2938                                 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
2939                         }
2940                         NDR_PULL_ALLOC_N(ndr, *r->out.string, size_string_2);
2941                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, *r->out.string, size_string_2));
2942                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_1, 0);
2943                 }
2944                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, LIBNDR_FLAG_REF_ALLOC);
2945                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
2946                         NDR_PULL_ALLOC(ndr, r->out.error);
2947                 }
2948                 _mem_save_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
2949                 NDR_PULL_SET_MEM_CTX(ndr, r->out.error, LIBNDR_FLAG_REF_ALLOC);
2950                 NDR_CHECK(ndr_pull_eventlog6_RpcInfo(ndr, NDR_SCALARS, r->out.error));
2951                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_error_0, LIBNDR_FLAG_REF_ALLOC);
2952                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
2953                 if (*r->out.string) {
2954                         NDR_CHECK(ndr_check_array_size(ndr, (void*)r->out.string, *r->out.actualSizeString));
2955                 }
2956         }
2957         return NDR_ERR_SUCCESS;
2958 }
2959
2960 _PUBLIC_ void ndr_print_eventlog6_EvtRpcMessageRender(struct ndr_print *ndr, const char *name, int flags, const struct eventlog6_EvtRpcMessageRender *r)
2961 {
2962         ndr_print_struct(ndr, name, "eventlog6_EvtRpcMessageRender");
2963         if (r == NULL) { ndr_print_null(ndr); return; }
2964         ndr->depth++;
2965         if (flags & NDR_SET_VALUES) {
2966                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
2967         }
2968         if (flags & NDR_IN) {
2969                 ndr_print_struct(ndr, "in", "eventlog6_EvtRpcMessageRender");
2970                 ndr->depth++;
2971                 ndr_print_ptr(ndr, "pubCfgObj", r->in.pubCfgObj);
2972                 ndr->depth++;
2973                 ndr_print_policy_handle(ndr, "pubCfgObj", r->in.pubCfgObj);
2974                 ndr->depth--;
2975                 ndr_print_uint32(ndr, "sizeEventId", r->in.sizeEventId);
2976                 ndr_print_ptr(ndr, "eventId", r->in.eventId);
2977                 ndr->depth++;
2978                 ndr_print_array_uint8(ndr, "eventId", r->in.eventId, r->in.sizeEventId);
2979                 ndr->depth--;
2980                 ndr_print_uint32(ndr, "messageId", r->in.messageId);
2981                 ndr_print_ptr(ndr, "values", r->in.values);
2982                 ndr->depth++;
2983                 ndr_print_eventlog6_EvtRpcVariantList(ndr, "values", r->in.values);
2984                 ndr->depth--;
2985                 ndr_print_uint32(ndr, "flags", r->in.flags);
2986                 ndr_print_uint32(ndr, "maxSizeString", r->in.maxSizeString);
2987                 ndr->depth--;
2988         }
2989         if (flags & NDR_OUT) {
2990                 ndr_print_struct(ndr, "out", "eventlog6_EvtRpcMessageRender");
2991                 ndr->depth++;
2992                 ndr_print_ptr(ndr, "actualSizeString", r->out.actualSizeString);
2993                 ndr->depth++;
2994                 ndr_print_uint32(ndr, "actualSizeString", *r->out.actualSizeString);
2995                 ndr->depth--;
2996                 ndr_print_ptr(ndr, "neededSizeString", r->out.neededSizeString);
2997                 ndr->depth++;
2998                 ndr_print_uint32(ndr, "neededSizeString", *r->out.neededSizeString);
2999                 ndr->depth--;
3000                 ndr_print_ptr(ndr, "string", r->out.string);
3001                 ndr->depth++;
3002                 ndr_print_ptr(ndr, "string", *r->out.string);
3003                 ndr->depth++;
3004                 if (*r->out.string) {
3005                         ndr_print_array_uint8(ndr, "string", *r->out.string, *r->out.actualSizeString);
3006                 }
3007                 ndr->depth--;
3008                 ndr->depth--;
3009                 ndr_print_ptr(ndr, "error", r->out.error);
3010                 ndr->depth++;
3011                 ndr_print_eventlog6_RpcInfo(ndr, "error", r->out.error);
3012                 ndr->depth--;
3013                 ndr_print_WERROR(ndr, "result", r->out.result);
3014                 ndr->depth--;
3015         }
3016         ndr->depth--;
3017 }
3018
3019 static enum ndr_err_code ndr_push_eventlog6_EvtRpcMessageRenderDefault(struct ndr_push *ndr, int flags, const struct eventlog6_EvtRpcMessageRenderDefault *r)
3020 {
3021         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
3022         if (flags & NDR_IN) {
3023                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.sizeEventId));
3024                 if (r->in.eventId == NULL) {
3025                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3026                 }
3027                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.sizeEventId));
3028                 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.eventId, r->in.sizeEventId));
3029                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.messageId));
3030                 if (r->in.values == NULL) {
3031                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3032                 }
3033                 NDR_CHECK(ndr_push_eventlog6_EvtRpcVariantList(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.values));
3034                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
3035                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.maxSizeString));
3036         }
3037         if (flags & NDR_OUT) {
3038                 if (r->out.actualSizeString == NULL) {
3039                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3040                 }
3041                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.actualSizeString));
3042                 if (r->out.neededSizeString == NULL) {
3043                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3044                 }
3045                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.neededSizeString));
3046                 if (r->out.string == NULL) {
3047                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3048                 }
3049                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.string));
3050                 if (*r->out.string) {
3051                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, *r->out.actualSizeString));
3052                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, *r->out.string, *r->out.actualSizeString));
3053                 }
3054                 if (r->out.error == NULL) {
3055                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3056                 }
3057                 NDR_CHECK(ndr_push_eventlog6_RpcInfo(ndr, NDR_SCALARS, r->out.error));
3058                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3059         }
3060         return NDR_ERR_SUCCESS;
3061 }
3062
3063 static enum ndr_err_code ndr_pull_eventlog6_EvtRpcMessageRenderDefault(struct ndr_pull *ndr, int flags, struct eventlog6_EvtRpcMessageRenderDefault *r)
3064 {
3065         uint32_t size_eventId_1 = 0;
3066         uint32_t _ptr_string;
3067         uint32_t size_string_2 = 0;
3068         TALLOC_CTX *_mem_save_values_0;
3069         TALLOC_CTX *_mem_save_actualSizeString_0;
3070         TALLOC_CTX *_mem_save_neededSizeString_0;
3071         TALLOC_CTX *_mem_save_string_0;
3072         TALLOC_CTX *_mem_save_string_1;
3073         TALLOC_CTX *_mem_save_error_0;
3074         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
3075         if (flags & NDR_IN) {
3076                 ZERO_STRUCT(r->out);
3077
3078                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.sizeEventId));
3079                 if (r->in.sizeEventId < 1 || r->in.sizeEventId > MAX_RPC_EVENT_ID_SIZE) {
3080                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
3081                 }
3082                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.eventId));
3083                 size_eventId_1 = ndr_get_array_size(ndr, &r->in.eventId);
3084                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3085                         NDR_PULL_ALLOC_N(ndr, r->in.eventId, size_eventId_1);
3086                 }
3087                 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.eventId, size_eventId_1));
3088                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.messageId));
3089                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3090                         NDR_PULL_ALLOC(ndr, r->in.values);
3091                 }
3092                 _mem_save_values_0 = NDR_PULL_GET_MEM_CTX(ndr);
3093                 NDR_PULL_SET_MEM_CTX(ndr, r->in.values, LIBNDR_FLAG_REF_ALLOC);
3094                 NDR_CHECK(ndr_pull_eventlog6_EvtRpcVariantList(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.values));
3095                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_values_0, LIBNDR_FLAG_REF_ALLOC);
3096                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
3097                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.maxSizeString));
3098                 NDR_PULL_ALLOC(ndr, r->out.actualSizeString);
3099                 ZERO_STRUCTP(r->out.actualSizeString);
3100                 NDR_PULL_ALLOC(ndr, r->out.neededSizeString);
3101                 ZERO_STRUCTP(r->out.neededSizeString);
3102                 NDR_PULL_ALLOC(ndr, r->out.string);
3103                 ZERO_STRUCTP(r->out.string);
3104                 NDR_PULL_ALLOC(ndr, r->out.error);
3105                 ZERO_STRUCTP(r->out.error);
3106                 if (r->in.eventId) {
3107                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->in.eventId, r->in.sizeEventId));
3108                 }
3109         }
3110         if (flags & NDR_OUT) {
3111                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3112                         NDR_PULL_ALLOC(ndr, r->out.actualSizeString);
3113                 }
3114                 _mem_save_actualSizeString_0 = NDR_PULL_GET_MEM_CTX(ndr);
3115                 NDR_PULL_SET_MEM_CTX(ndr, r->out.actualSizeString, LIBNDR_FLAG_REF_ALLOC);
3116                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.actualSizeString));
3117                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_actualSizeString_0, LIBNDR_FLAG_REF_ALLOC);
3118                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3119                         NDR_PULL_ALLOC(ndr, r->out.neededSizeString);
3120                 }
3121                 _mem_save_neededSizeString_0 = NDR_PULL_GET_MEM_CTX(ndr);
3122                 NDR_PULL_SET_MEM_CTX(ndr, r->out.neededSizeString, LIBNDR_FLAG_REF_ALLOC);
3123                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.neededSizeString));
3124                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_neededSizeString_0, LIBNDR_FLAG_REF_ALLOC);
3125                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3126                         NDR_PULL_ALLOC(ndr, r->out.string);
3127                 }
3128                 _mem_save_string_0 = NDR_PULL_GET_MEM_CTX(ndr);
3129                 NDR_PULL_SET_MEM_CTX(ndr, r->out.string, LIBNDR_FLAG_REF_ALLOC);
3130                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_string));
3131                 if (_ptr_string) {
3132                         NDR_PULL_ALLOC(ndr, *r->out.string);
3133                 } else {
3134                         *r->out.string = NULL;
3135                 }
3136                 if (*r->out.string) {
3137                         _mem_save_string_1 = NDR_PULL_GET_MEM_CTX(ndr);
3138                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.string, 0);
3139                         NDR_CHECK(ndr_pull_array_size(ndr, r->out.string));
3140                         size_string_2 = ndr_get_array_size(ndr, r->out.string);
3141                         if (size_string_2 > MAX_RPC_RENDERED_STRING_SIZE) {
3142                                 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
3143                         }
3144                         NDR_PULL_ALLOC_N(ndr, *r->out.string, size_string_2);
3145                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, *r->out.string, size_string_2));
3146                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_1, 0);
3147                 }
3148                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_string_0, LIBNDR_FLAG_REF_ALLOC);
3149                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3150                         NDR_PULL_ALLOC(ndr, r->out.error);
3151                 }
3152                 _mem_save_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
3153                 NDR_PULL_SET_MEM_CTX(ndr, r->out.error, LIBNDR_FLAG_REF_ALLOC);
3154                 NDR_CHECK(ndr_pull_eventlog6_RpcInfo(ndr, NDR_SCALARS, r->out.error));
3155                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_error_0, LIBNDR_FLAG_REF_ALLOC);
3156                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3157                 if (*r->out.string) {
3158                         NDR_CHECK(ndr_check_array_size(ndr, (void*)r->out.string, *r->out.actualSizeString));
3159                 }
3160         }
3161         return NDR_ERR_SUCCESS;
3162 }
3163
3164 _PUBLIC_ void ndr_print_eventlog6_EvtRpcMessageRenderDefault(struct ndr_print *ndr, const char *name, int flags, const struct eventlog6_EvtRpcMessageRenderDefault *r)
3165 {
3166         ndr_print_struct(ndr, name, "eventlog6_EvtRpcMessageRenderDefault");
3167         if (r == NULL) { ndr_print_null(ndr); return; }
3168         ndr->depth++;
3169         if (flags & NDR_SET_VALUES) {
3170                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3171         }
3172         if (flags & NDR_IN) {
3173                 ndr_print_struct(ndr, "in", "eventlog6_EvtRpcMessageRenderDefault");
3174                 ndr->depth++;
3175                 ndr_print_uint32(ndr, "sizeEventId", r->in.sizeEventId);
3176                 ndr_print_ptr(ndr, "eventId", r->in.eventId);
3177                 ndr->depth++;
3178                 ndr_print_array_uint8(ndr, "eventId", r->in.eventId, r->in.sizeEventId);
3179                 ndr->depth--;
3180                 ndr_print_uint32(ndr, "messageId", r->in.messageId);
3181                 ndr_print_ptr(ndr, "values", r->in.values);
3182                 ndr->depth++;
3183                 ndr_print_eventlog6_EvtRpcVariantList(ndr, "values", r->in.values);
3184                 ndr->depth--;
3185                 ndr_print_uint32(ndr, "flags", r->in.flags);
3186                 ndr_print_uint32(ndr, "maxSizeString", r->in.maxSizeString);
3187                 ndr->depth--;
3188         }
3189         if (flags & NDR_OUT) {
3190                 ndr_print_struct(ndr, "out", "eventlog6_EvtRpcMessageRenderDefault");
3191                 ndr->depth++;
3192                 ndr_print_ptr(ndr, "actualSizeString", r->out.actualSizeString);
3193                 ndr->depth++;
3194                 ndr_print_uint32(ndr, "actualSizeString", *r->out.actualSizeString);
3195                 ndr->depth--;
3196                 ndr_print_ptr(ndr, "neededSizeString", r->out.neededSizeString);
3197                 ndr->depth++;
3198                 ndr_print_uint32(ndr, "neededSizeString", *r->out.neededSizeString);
3199                 ndr->depth--;
3200                 ndr_print_ptr(ndr, "string", r->out.string);
3201                 ndr->depth++;
3202                 ndr_print_ptr(ndr, "string", *r->out.string);
3203                 ndr->depth++;
3204                 if (*r->out.string) {
3205                         ndr_print_array_uint8(ndr, "string", *r->out.string, *r->out.actualSizeString);
3206                 }
3207                 ndr->depth--;
3208                 ndr->depth--;
3209                 ndr_print_ptr(ndr, "error", r->out.error);
3210                 ndr->depth++;
3211                 ndr_print_eventlog6_RpcInfo(ndr, "error", r->out.error);
3212                 ndr->depth--;
3213                 ndr_print_WERROR(ndr, "result", r->out.result);
3214                 ndr->depth--;
3215         }
3216         ndr->depth--;
3217 }
3218
3219 static enum ndr_err_code ndr_push_eventlog6_EvtRpcQueryNext(struct ndr_push *ndr, int flags, const struct eventlog6_EvtRpcQueryNext *r)
3220 {
3221         uint32_t cntr_eventDataIndices_2;
3222         uint32_t cntr_eventDataSizes_2;
3223         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
3224         if (flags & NDR_IN) {
3225                 if (r->in.logQuery == NULL) {
3226                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3227                 }
3228                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.logQuery));
3229                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.numRequestedRecords));
3230                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.timeOutEnd));
3231                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
3232         }
3233         if (flags & NDR_OUT) {
3234                 if (r->out.numActualRecords == NULL) {
3235                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3236                 }
3237                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.numActualRecords));
3238                 if (r->out.eventDataIndices == NULL) {
3239                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3240                 }
3241                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.eventDataIndices));
3242                 if (*r->out.eventDataIndices) {
3243                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, *r->out.numActualRecords));
3244                         for (cntr_eventDataIndices_2 = 0; cntr_eventDataIndices_2 < *r->out.numActualRecords; cntr_eventDataIndices_2++) {
3245                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, (*r->out.eventDataIndices)[cntr_eventDataIndices_2]));
3246                         }
3247                 }
3248                 if (r->out.eventDataSizes == NULL) {
3249                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3250                 }
3251                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.eventDataSizes));
3252                 if (*r->out.eventDataSizes) {
3253                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, *r->out.numActualRecords));
3254                         for (cntr_eventDataSizes_2 = 0; cntr_eventDataSizes_2 < *r->out.numActualRecords; cntr_eventDataSizes_2++) {
3255                                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, (*r->out.eventDataSizes)[cntr_eventDataSizes_2]));
3256                         }
3257                 }
3258                 if (r->out.resultBufferSize == NULL) {
3259                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3260                 }
3261                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resultBufferSize));
3262                 if (r->out.resultBuffer == NULL) {
3263                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3264                 }
3265                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.resultBuffer));
3266                 if (*r->out.resultBuffer) {
3267                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, *r->out.resultBufferSize));
3268                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, *r->out.resultBuffer, *r->out.resultBufferSize));
3269                 }
3270                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3271         }
3272         return NDR_ERR_SUCCESS;
3273 }
3274
3275 static enum ndr_err_code ndr_pull_eventlog6_EvtRpcQueryNext(struct ndr_pull *ndr, int flags, struct eventlog6_EvtRpcQueryNext *r)
3276 {
3277         uint32_t _ptr_eventDataIndices;
3278         uint32_t size_eventDataIndices_2 = 0;
3279         uint32_t cntr_eventDataIndices_2;
3280         uint32_t _ptr_eventDataSizes;
3281         uint32_t size_eventDataSizes_2 = 0;
3282         uint32_t cntr_eventDataSizes_2;
3283         uint32_t _ptr_resultBuffer;
3284         uint32_t size_resultBuffer_2 = 0;
3285         TALLOC_CTX *_mem_save_logQuery_0;
3286         TALLOC_CTX *_mem_save_numActualRecords_0;
3287         TALLOC_CTX *_mem_save_eventDataIndices_0;
3288         TALLOC_CTX *_mem_save_eventDataIndices_1;
3289         TALLOC_CTX *_mem_save_eventDataIndices_2;
3290         TALLOC_CTX *_mem_save_eventDataSizes_0;
3291         TALLOC_CTX *_mem_save_eventDataSizes_1;
3292         TALLOC_CTX *_mem_save_eventDataSizes_2;
3293         TALLOC_CTX *_mem_save_resultBufferSize_0;
3294         TALLOC_CTX *_mem_save_resultBuffer_0;
3295         TALLOC_CTX *_mem_save_resultBuffer_1;
3296         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
3297         if (flags & NDR_IN) {
3298                 ZERO_STRUCT(r->out);
3299
3300                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3301                         NDR_PULL_ALLOC(ndr, r->in.logQuery);
3302                 }
3303                 _mem_save_logQuery_0 = NDR_PULL_GET_MEM_CTX(ndr);
3304                 NDR_PULL_SET_MEM_CTX(ndr, r->in.logQuery, LIBNDR_FLAG_REF_ALLOC);
3305                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.logQuery));
3306                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logQuery_0, LIBNDR_FLAG_REF_ALLOC);
3307                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.numRequestedRecords));
3308                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.timeOutEnd));
3309                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
3310                 NDR_PULL_ALLOC(ndr, r->out.numActualRecords);
3311                 ZERO_STRUCTP(r->out.numActualRecords);
3312                 NDR_PULL_ALLOC(ndr, r->out.eventDataIndices);
3313                 ZERO_STRUCTP(r->out.eventDataIndices);
3314                 NDR_PULL_ALLOC(ndr, r->out.eventDataSizes);
3315                 ZERO_STRUCTP(r->out.eventDataSizes);
3316                 NDR_PULL_ALLOC(ndr, r->out.resultBufferSize);
3317                 ZERO_STRUCTP(r->out.resultBufferSize);
3318                 NDR_PULL_ALLOC(ndr, r->out.resultBuffer);
3319                 ZERO_STRUCTP(r->out.resultBuffer);
3320         }
3321         if (flags & NDR_OUT) {
3322                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3323                         NDR_PULL_ALLOC(ndr, r->out.numActualRecords);
3324                 }
3325                 _mem_save_numActualRecords_0 = NDR_PULL_GET_MEM_CTX(ndr);
3326                 NDR_PULL_SET_MEM_CTX(ndr, r->out.numActualRecords, LIBNDR_FLAG_REF_ALLOC);
3327                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.numActualRecords));
3328                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_numActualRecords_0, LIBNDR_FLAG_REF_ALLOC);
3329                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3330                         NDR_PULL_ALLOC(ndr, r->out.eventDataIndices);
3331                 }
3332                 _mem_save_eventDataIndices_0 = NDR_PULL_GET_MEM_CTX(ndr);
3333                 NDR_PULL_SET_MEM_CTX(ndr, r->out.eventDataIndices, LIBNDR_FLAG_REF_ALLOC);
3334                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_eventDataIndices));
3335                 if (_ptr_eventDataIndices) {
3336                         NDR_PULL_ALLOC(ndr, *r->out.eventDataIndices);
3337                 } else {
3338                         *r->out.eventDataIndices = NULL;
3339                 }
3340                 if (*r->out.eventDataIndices) {
3341                         _mem_save_eventDataIndices_1 = NDR_PULL_GET_MEM_CTX(ndr);
3342                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.eventDataIndices, 0);
3343                         NDR_CHECK(ndr_pull_array_size(ndr, r->out.eventDataIndices));
3344                         size_eventDataIndices_2 = ndr_get_array_size(ndr, r->out.eventDataIndices);
3345                         if (size_eventDataIndices_2 > MAX_RPC_RECORD_COUNT) {
3346                                 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
3347                         }
3348                         NDR_PULL_ALLOC_N(ndr, *r->out.eventDataIndices, size_eventDataIndices_2);
3349                         _mem_save_eventDataIndices_2 = NDR_PULL_GET_MEM_CTX(ndr);
3350                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.eventDataIndices, 0);
3351                         for (cntr_eventDataIndices_2 = 0; cntr_eventDataIndices_2 < size_eventDataIndices_2; cntr_eventDataIndices_2++) {
3352                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &(*r->out.eventDataIndices)[cntr_eventDataIndices_2]));
3353                         }
3354                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_eventDataIndices_2, 0);
3355                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_eventDataIndices_1, 0);
3356                 }
3357                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_eventDataIndices_0, LIBNDR_FLAG_REF_ALLOC);
3358                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3359                         NDR_PULL_ALLOC(ndr, r->out.eventDataSizes);
3360                 }
3361                 _mem_save_eventDataSizes_0 = NDR_PULL_GET_MEM_CTX(ndr);
3362                 NDR_PULL_SET_MEM_CTX(ndr, r->out.eventDataSizes, LIBNDR_FLAG_REF_ALLOC);
3363                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_eventDataSizes));
3364                 if (_ptr_eventDataSizes) {
3365                         NDR_PULL_ALLOC(ndr, *r->out.eventDataSizes);
3366                 } else {
3367                         *r->out.eventDataSizes = NULL;
3368                 }
3369                 if (*r->out.eventDataSizes) {
3370                         _mem_save_eventDataSizes_1 = NDR_PULL_GET_MEM_CTX(ndr);
3371                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.eventDataSizes, 0);
3372                         NDR_CHECK(ndr_pull_array_size(ndr, r->out.eventDataSizes));
3373                         size_eventDataSizes_2 = ndr_get_array_size(ndr, r->out.eventDataSizes);
3374                         if (size_eventDataSizes_2 > MAX_RPC_RECORD_COUNT) {
3375                                 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
3376                         }
3377                         NDR_PULL_ALLOC_N(ndr, *r->out.eventDataSizes, size_eventDataSizes_2);
3378                         _mem_save_eventDataSizes_2 = NDR_PULL_GET_MEM_CTX(ndr);
3379                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.eventDataSizes, 0);
3380                         for (cntr_eventDataSizes_2 = 0; cntr_eventDataSizes_2 < size_eventDataSizes_2; cntr_eventDataSizes_2++) {
3381                                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &(*r->out.eventDataSizes)[cntr_eventDataSizes_2]));
3382                         }
3383                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_eventDataSizes_2, 0);
3384                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_eventDataSizes_1, 0);
3385                 }
3386                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_eventDataSizes_0, LIBNDR_FLAG_REF_ALLOC);
3387                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3388                         NDR_PULL_ALLOC(ndr, r->out.resultBufferSize);
3389                 }
3390                 _mem_save_resultBufferSize_0 = NDR_PULL_GET_MEM_CTX(ndr);
3391                 NDR_PULL_SET_MEM_CTX(ndr, r->out.resultBufferSize, LIBNDR_FLAG_REF_ALLOC);
3392                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resultBufferSize));
3393                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resultBufferSize_0, LIBNDR_FLAG_REF_ALLOC);
3394                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3395                         NDR_PULL_ALLOC(ndr, r->out.resultBuffer);
3396                 }
3397                 _mem_save_resultBuffer_0 = NDR_PULL_GET_MEM_CTX(ndr);
3398                 NDR_PULL_SET_MEM_CTX(ndr, r->out.resultBuffer, LIBNDR_FLAG_REF_ALLOC);
3399                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resultBuffer));
3400                 if (_ptr_resultBuffer) {
3401                         NDR_PULL_ALLOC(ndr, *r->out.resultBuffer);
3402                 } else {
3403                         *r->out.resultBuffer = NULL;
3404                 }
3405                 if (*r->out.resultBuffer) {
3406                         _mem_save_resultBuffer_1 = NDR_PULL_GET_MEM_CTX(ndr);
3407                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.resultBuffer, 0);
3408                         NDR_CHECK(ndr_pull_array_size(ndr, r->out.resultBuffer));
3409                         size_resultBuffer_2 = ndr_get_array_size(ndr, r->out.resultBuffer);
3410                         if (size_resultBuffer_2 > MAX_RPC_BATCH_SIZE) {
3411                                 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
3412                         }
3413                         NDR_PULL_ALLOC_N(ndr, *r->out.resultBuffer, size_resultBuffer_2);
3414                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, *r->out.resultBuffer, size_resultBuffer_2));
3415                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resultBuffer_1, 0);
3416                 }
3417                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resultBuffer_0, LIBNDR_FLAG_REF_ALLOC);
3418                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3419                 if (*r->out.eventDataIndices) {
3420                         NDR_CHECK(ndr_check_array_size(ndr, (void*)r->out.eventDataIndices, *r->out.numActualRecords));
3421                 }
3422                 if (*r->out.eventDataSizes) {
3423                         NDR_CHECK(ndr_check_array_size(ndr, (void*)r->out.eventDataSizes, *r->out.numActualRecords));
3424                 }
3425                 if (*r->out.resultBuffer) {
3426                         NDR_CHECK(ndr_check_array_size(ndr, (void*)r->out.resultBuffer, *r->out.resultBufferSize));
3427                 }
3428         }
3429         return NDR_ERR_SUCCESS;
3430 }
3431
3432 _PUBLIC_ void ndr_print_eventlog6_EvtRpcQueryNext(struct ndr_print *ndr, const char *name, int flags, const struct eventlog6_EvtRpcQueryNext *r)
3433 {
3434         uint32_t cntr_eventDataIndices_2;
3435         uint32_t cntr_eventDataSizes_2;
3436         ndr_print_struct(ndr, name, "eventlog6_EvtRpcQueryNext");
3437         if (r == NULL) { ndr_print_null(ndr); return; }
3438         ndr->depth++;
3439         if (flags & NDR_SET_VALUES) {
3440                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3441         }
3442         if (flags & NDR_IN) {
3443                 ndr_print_struct(ndr, "in", "eventlog6_EvtRpcQueryNext");
3444                 ndr->depth++;
3445                 ndr_print_ptr(ndr, "logQuery", r->in.logQuery);
3446                 ndr->depth++;
3447                 ndr_print_policy_handle(ndr, "logQuery", r->in.logQuery);
3448                 ndr->depth--;
3449                 ndr_print_uint32(ndr, "numRequestedRecords", r->in.numRequestedRecords);
3450                 ndr_print_uint32(ndr, "timeOutEnd", r->in.timeOutEnd);
3451                 ndr_print_uint32(ndr, "flags", r->in.flags);
3452                 ndr->depth--;
3453         }
3454         if (flags & NDR_OUT) {
3455                 ndr_print_struct(ndr, "out", "eventlog6_EvtRpcQueryNext");
3456                 ndr->depth++;
3457                 ndr_print_ptr(ndr, "numActualRecords", r->out.numActualRecords);
3458                 ndr->depth++;
3459                 ndr_print_uint32(ndr, "numActualRecords", *r->out.numActualRecords);
3460                 ndr->depth--;
3461                 ndr_print_ptr(ndr, "eventDataIndices", r->out.eventDataIndices);
3462                 ndr->depth++;
3463                 ndr_print_ptr(ndr, "eventDataIndices", *r->out.eventDataIndices);
3464                 ndr->depth++;
3465                 if (*r->out.eventDataIndices) {
3466                         ndr->print(ndr, "%s: ARRAY(%d)", "eventDataIndices", (int)*r->out.numActualRecords);
3467                         ndr->depth++;
3468                         for (cntr_eventDataIndices_2=0;cntr_eventDataIndices_2<*r->out.numActualRecords;cntr_eventDataIndices_2++) {
3469                                 ndr_print_uint32(ndr, "eventDataIndices", (*r->out.eventDataIndices)[cntr_eventDataIndices_2]);
3470                         }
3471                         ndr->depth--;
3472                 }
3473                 ndr->depth--;
3474                 ndr->depth--;
3475                 ndr_print_ptr(ndr, "eventDataSizes", r->out.eventDataSizes);
3476                 ndr->depth++;
3477                 ndr_print_ptr(ndr, "eventDataSizes", *r->out.eventDataSizes);
3478                 ndr->depth++;
3479                 if (*r->out.eventDataSizes) {
3480                         ndr->print(ndr, "%s: ARRAY(%d)", "eventDataSizes", (int)*r->out.numActualRecords);
3481                         ndr->depth++;
3482                         for (cntr_eventDataSizes_2=0;cntr_eventDataSizes_2<*r->out.numActualRecords;cntr_eventDataSizes_2++) {
3483                                 ndr_print_uint32(ndr, "eventDataSizes", (*r->out.eventDataSizes)[cntr_eventDataSizes_2]);
3484                         }
3485                         ndr->depth--;
3486                 }
3487                 ndr->depth--;
3488                 ndr->depth--;
3489                 ndr_print_ptr(ndr, "resultBufferSize", r->out.resultBufferSize);
3490                 ndr->depth++;
3491                 ndr_print_uint32(ndr, "resultBufferSize", *r->out.resultBufferSize);
3492                 ndr->depth--;
3493                 ndr_print_ptr(ndr, "resultBuffer", r->out.resultBuffer);
3494                 ndr->depth++;
3495                 ndr_print_ptr(ndr, "resultBuffer", *r->out.resultBuffer);
3496                 ndr->depth++;
3497                 if (*r->out.resultBuffer) {
3498                         ndr_print_array_uint8(ndr, "resultBuffer", *r->out.resultBuffer, *r->out.resultBufferSize);
3499                 }
3500                 ndr->depth--;
3501                 ndr->depth--;
3502                 ndr_print_WERROR(ndr, "result", r->out.result);
3503                 ndr->depth--;
3504         }
3505         ndr->depth--;
3506 }
3507
3508 static enum ndr_err_code ndr_push_eventlog6_EvtRpcQuerySeek(struct ndr_push *ndr, int flags, const struct eventlog6_EvtRpcQuerySeek *r)
3509 {
3510         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
3511         if (flags & NDR_IN) {
3512                 if (r->in.logQuery == NULL) {
3513                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3514                 }
3515                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.logQuery));
3516                 NDR_CHECK(ndr_push_hyper(ndr, NDR_SCALARS, r->in.pos));
3517                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.bookmarkXml));
3518                 if (r->in.bookmarkXml) {
3519                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.bookmarkXml, CH_UTF16)));
3520                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3521                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.bookmarkXml, CH_UTF16)));
3522                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.bookmarkXml, ndr_charset_length(r->in.bookmarkXml, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3523                 }
3524                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.timeOut));
3525                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
3526         }
3527         if (flags & NDR_OUT) {
3528                 if (r->out.error == NULL) {
3529                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3530                 }
3531                 NDR_CHECK(ndr_push_eventlog6_RpcInfo(ndr, NDR_SCALARS, r->out.error));
3532                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3533         }
3534         return NDR_ERR_SUCCESS;
3535 }
3536
3537 static enum ndr_err_code ndr_pull_eventlog6_EvtRpcQuerySeek(struct ndr_pull *ndr, int flags, struct eventlog6_EvtRpcQuerySeek *r)
3538 {
3539         uint32_t _ptr_bookmarkXml;
3540         uint32_t size_bookmarkXml_1 = 0;
3541         uint32_t length_bookmarkXml_1 = 0;
3542         TALLOC_CTX *_mem_save_logQuery_0;
3543         TALLOC_CTX *_mem_save_bookmarkXml_0;
3544         TALLOC_CTX *_mem_save_error_0;
3545         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
3546         if (flags & NDR_IN) {
3547                 ZERO_STRUCT(r->out);
3548
3549                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3550                         NDR_PULL_ALLOC(ndr, r->in.logQuery);
3551                 }
3552                 _mem_save_logQuery_0 = NDR_PULL_GET_MEM_CTX(ndr);
3553                 NDR_PULL_SET_MEM_CTX(ndr, r->in.logQuery, LIBNDR_FLAG_REF_ALLOC);
3554                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.logQuery));
3555                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logQuery_0, LIBNDR_FLAG_REF_ALLOC);
3556                 NDR_CHECK(ndr_pull_hyper(ndr, NDR_SCALARS, &r->in.pos));
3557                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_bookmarkXml));
3558                 if (_ptr_bookmarkXml) {
3559                         NDR_PULL_ALLOC(ndr, r->in.bookmarkXml);
3560                 } else {
3561                         r->in.bookmarkXml = NULL;
3562                 }
3563                 if (r->in.bookmarkXml) {
3564                         _mem_save_bookmarkXml_0 = NDR_PULL_GET_MEM_CTX(ndr);
3565                         NDR_PULL_SET_MEM_CTX(ndr, r->in.bookmarkXml, 0);
3566                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.bookmarkXml));
3567                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.bookmarkXml));
3568                         size_bookmarkXml_1 = ndr_get_array_size(ndr, &r->in.bookmarkXml);
3569                         if (size_bookmarkXml_1 > MAX_RPC_BOOKMARK_LENGTH) {
3570                                 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
3571                         }
3572                         length_bookmarkXml_1 = ndr_get_array_length(ndr, &r->in.bookmarkXml);
3573                         if (length_bookmarkXml_1 > MAX_RPC_BOOKMARK_LENGTH) {
3574                                 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
3575                         }
3576                         if (length_bookmarkXml_1 > size_bookmarkXml_1) {
3577                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_bookmarkXml_1, length_bookmarkXml_1);
3578                         }
3579                         NDR_CHECK(ndr_check_string_terminator(ndr, length_bookmarkXml_1, sizeof(uint16_t)));
3580                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.bookmarkXml, length_bookmarkXml_1, sizeof(uint16_t), CH_UTF16));
3581                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_bookmarkXml_0, 0);
3582                 }
3583                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.timeOut));
3584                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
3585                 NDR_PULL_ALLOC(ndr, r->out.error);
3586                 ZERO_STRUCTP(r->out.error);
3587         }
3588         if (flags & NDR_OUT) {
3589                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3590                         NDR_PULL_ALLOC(ndr, r->out.error);
3591                 }
3592                 _mem_save_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
3593                 NDR_PULL_SET_MEM_CTX(ndr, r->out.error, LIBNDR_FLAG_REF_ALLOC);
3594                 NDR_CHECK(ndr_pull_eventlog6_RpcInfo(ndr, NDR_SCALARS, r->out.error));
3595                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_error_0, LIBNDR_FLAG_REF_ALLOC);
3596                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3597         }
3598         return NDR_ERR_SUCCESS;
3599 }
3600
3601 _PUBLIC_ void ndr_print_eventlog6_EvtRpcQuerySeek(struct ndr_print *ndr, const char *name, int flags, const struct eventlog6_EvtRpcQuerySeek *r)
3602 {
3603         ndr_print_struct(ndr, name, "eventlog6_EvtRpcQuerySeek");
3604         if (r == NULL) { ndr_print_null(ndr); return; }
3605         ndr->depth++;
3606         if (flags & NDR_SET_VALUES) {
3607                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3608         }
3609         if (flags & NDR_IN) {
3610                 ndr_print_struct(ndr, "in", "eventlog6_EvtRpcQuerySeek");
3611                 ndr->depth++;
3612                 ndr_print_ptr(ndr, "logQuery", r->in.logQuery);
3613                 ndr->depth++;
3614                 ndr_print_policy_handle(ndr, "logQuery", r->in.logQuery);
3615                 ndr->depth--;
3616                 ndr_print_hyper(ndr, "pos", r->in.pos);
3617                 ndr_print_ptr(ndr, "bookmarkXml", r->in.bookmarkXml);
3618                 ndr->depth++;
3619                 if (r->in.bookmarkXml) {
3620                         ndr_print_string(ndr, "bookmarkXml", r->in.bookmarkXml);
3621                 }
3622                 ndr->depth--;
3623                 ndr_print_uint32(ndr, "timeOut", r->in.timeOut);
3624                 ndr_print_uint32(ndr, "flags", r->in.flags);
3625                 ndr->depth--;
3626         }
3627         if (flags & NDR_OUT) {
3628                 ndr_print_struct(ndr, "out", "eventlog6_EvtRpcQuerySeek");
3629                 ndr->depth++;
3630                 ndr_print_ptr(ndr, "error", r->out.error);
3631                 ndr->depth++;
3632                 ndr_print_eventlog6_RpcInfo(ndr, "error", r->out.error);
3633                 ndr->depth--;
3634                 ndr_print_WERROR(ndr, "result", r->out.result);
3635                 ndr->depth--;
3636         }
3637         ndr->depth--;
3638 }
3639
3640 static enum ndr_err_code ndr_push_eventlog6_EvtRpcClose(struct ndr_push *ndr, int flags, const struct eventlog6_EvtRpcClose *r)
3641 {
3642         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
3643         if (flags & NDR_IN) {
3644                 if (r->in.handle == NULL) {
3645                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3646                 }
3647                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.handle));
3648                 if (*r->in.handle) {
3649                         NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, *r->in.handle));
3650                 }
3651         }
3652         if (flags & NDR_OUT) {
3653                 if (r->out.handle == NULL) {
3654                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3655                 }
3656                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.handle));
3657                 if (*r->out.handle) {
3658                         NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, *r->out.handle));
3659                 }
3660                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3661         }
3662         return NDR_ERR_SUCCESS;
3663 }
3664
3665 static enum ndr_err_code ndr_pull_eventlog6_EvtRpcClose(struct ndr_pull *ndr, int flags, struct eventlog6_EvtRpcClose *r)
3666 {
3667         uint32_t _ptr_handle;
3668         TALLOC_CTX *_mem_save_handle_0;
3669         TALLOC_CTX *_mem_save_handle_1;
3670         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
3671         if (flags & NDR_IN) {
3672                 ZERO_STRUCT(r->out);
3673
3674                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3675                         NDR_PULL_ALLOC(ndr, r->in.handle);
3676                 }
3677                 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3678                 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
3679                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_handle));
3680                 if (_ptr_handle) {
3681                         NDR_PULL_ALLOC(ndr, *r->in.handle);
3682                 } else {
3683                         *r->in.handle = NULL;
3684                 }
3685                 if (*r->in.handle) {
3686                         _mem_save_handle_1 = NDR_PULL_GET_MEM_CTX(ndr);
3687                         NDR_PULL_SET_MEM_CTX(ndr, *r->in.handle, 0);
3688                         NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, *r->in.handle));
3689                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_1, 0);
3690                 }
3691                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3692                 NDR_PULL_ALLOC(ndr, r->out.handle);
3693                 *r->out.handle = *r->in.handle;
3694         }
3695         if (flags & NDR_OUT) {
3696                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3697                         NDR_PULL_ALLOC(ndr, r->out.handle);
3698                 }
3699                 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3700                 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
3701                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_handle));
3702                 if (_ptr_handle) {
3703                         NDR_PULL_ALLOC(ndr, *r->out.handle);
3704                 } else {
3705                         *r->out.handle = NULL;
3706                 }
3707                 if (*r->out.handle) {
3708                         _mem_save_handle_1 = NDR_PULL_GET_MEM_CTX(ndr);
3709                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.handle, 0);
3710                         NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, *r->out.handle));
3711                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_1, 0);
3712                 }
3713                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3714                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3715         }
3716         return NDR_ERR_SUCCESS;
3717 }
3718
3719 _PUBLIC_ void ndr_print_eventlog6_EvtRpcClose(struct ndr_print *ndr, const char *name, int flags, const struct eventlog6_EvtRpcClose *r)
3720 {
3721         ndr_print_struct(ndr, name, "eventlog6_EvtRpcClose");
3722         if (r == NULL) { ndr_print_null(ndr); return; }
3723         ndr->depth++;
3724         if (flags & NDR_SET_VALUES) {
3725                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3726         }
3727         if (flags & NDR_IN) {
3728                 ndr_print_struct(ndr, "in", "eventlog6_EvtRpcClose");
3729                 ndr->depth++;
3730                 ndr_print_ptr(ndr, "handle", r->in.handle);
3731                 ndr->depth++;
3732                 ndr_print_ptr(ndr, "handle", *r->in.handle);
3733                 ndr->depth++;
3734                 if (*r->in.handle) {
3735                         ndr_print_policy_handle(ndr, "handle", *r->in.handle);
3736                 }
3737                 ndr->depth--;
3738                 ndr->depth--;
3739                 ndr->depth--;
3740         }
3741         if (flags & NDR_OUT) {
3742                 ndr_print_struct(ndr, "out", "eventlog6_EvtRpcClose");
3743                 ndr->depth++;
3744                 ndr_print_ptr(ndr, "handle", r->out.handle);
3745                 ndr->depth++;
3746                 ndr_print_ptr(ndr, "handle", *r->out.handle);
3747                 ndr->depth++;
3748                 if (*r->out.handle) {
3749                         ndr_print_policy_handle(ndr, "handle", *r->out.handle);
3750                 }
3751                 ndr->depth--;
3752                 ndr->depth--;
3753                 ndr_print_WERROR(ndr, "result", r->out.result);
3754                 ndr->depth--;
3755         }
3756         ndr->depth--;
3757 }
3758
3759 static enum ndr_err_code ndr_push_eventlog6_EvtRpcCancel(struct ndr_push *ndr, int flags, const struct eventlog6_EvtRpcCancel *r)
3760 {
3761         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
3762         if (flags & NDR_IN) {
3763                 if (r->in.handle == NULL) {
3764                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3765                 }
3766                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3767         }
3768         if (flags & NDR_OUT) {
3769                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3770         }
3771         return NDR_ERR_SUCCESS;
3772 }
3773
3774 static enum ndr_err_code ndr_pull_eventlog6_EvtRpcCancel(struct ndr_pull *ndr, int flags, struct eventlog6_EvtRpcCancel *r)
3775 {
3776         TALLOC_CTX *_mem_save_handle_0;
3777         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
3778         if (flags & NDR_IN) {
3779                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3780                         NDR_PULL_ALLOC(ndr, r->in.handle);
3781                 }
3782                 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
3783                 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
3784                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
3785                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
3786         }
3787         if (flags & NDR_OUT) {
3788                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3789         }
3790         return NDR_ERR_SUCCESS;
3791 }
3792
3793 _PUBLIC_ void ndr_print_eventlog6_EvtRpcCancel(struct ndr_print *ndr, const char *name, int flags, const struct eventlog6_EvtRpcCancel *r)
3794 {
3795         ndr_print_struct(ndr, name, "eventlog6_EvtRpcCancel");
3796         if (r == NULL) { ndr_print_null(ndr); return; }
3797         ndr->depth++;
3798         if (flags & NDR_SET_VALUES) {
3799                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3800         }
3801         if (flags & NDR_IN) {
3802                 ndr_print_struct(ndr, "in", "eventlog6_EvtRpcCancel");
3803                 ndr->depth++;
3804                 ndr_print_ptr(ndr, "handle", r->in.handle);
3805                 ndr->depth++;
3806                 ndr_print_policy_handle(ndr, "handle", r->in.handle);
3807                 ndr->depth--;
3808                 ndr->depth--;
3809         }
3810         if (flags & NDR_OUT) {
3811                 ndr_print_struct(ndr, "out", "eventlog6_EvtRpcCancel");
3812                 ndr->depth++;
3813                 ndr_print_WERROR(ndr, "result", r->out.result);
3814                 ndr->depth--;
3815         }
3816         ndr->depth--;
3817 }
3818
3819 static enum ndr_err_code ndr_push_eventlog6_EvtRpcAssertConfig(struct ndr_push *ndr, int flags, const struct eventlog6_EvtRpcAssertConfig *r)
3820 {
3821         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
3822         if (flags & NDR_IN) {
3823                 if (r->in.path == NULL) {
3824                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3825                 }
3826                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
3827                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3828                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
3829                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path, ndr_charset_length(r->in.path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3830                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
3831         }
3832         if (flags & NDR_OUT) {
3833                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3834         }
3835         return NDR_ERR_SUCCESS;
3836 }
3837
3838 static enum ndr_err_code ndr_pull_eventlog6_EvtRpcAssertConfig(struct ndr_pull *ndr, int flags, struct eventlog6_EvtRpcAssertConfig *r)
3839 {
3840         uint32_t size_path_1 = 0;
3841         uint32_t length_path_1 = 0;
3842         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
3843         if (flags & NDR_IN) {
3844                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path));
3845                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path));
3846                 size_path_1 = ndr_get_array_size(ndr, &r->in.path);
3847                 if (size_path_1 < 1 || size_path_1 > MAX_RPC_CHANNEL_NAME_LENGTH) {
3848                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
3849                 }
3850                 length_path_1 = ndr_get_array_length(ndr, &r->in.path);
3851                 if (length_path_1 < 1 || length_path_1 > MAX_RPC_CHANNEL_NAME_LENGTH) {
3852                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
3853                 }
3854                 if (length_path_1 > size_path_1) {
3855                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_path_1, length_path_1);
3856                 }
3857                 NDR_CHECK(ndr_check_string_terminator(ndr, length_path_1, sizeof(uint16_t)));
3858                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path, length_path_1, sizeof(uint16_t), CH_UTF16));
3859                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
3860         }
3861         if (flags & NDR_OUT) {
3862                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3863         }
3864         return NDR_ERR_SUCCESS;
3865 }
3866
3867 _PUBLIC_ void ndr_print_eventlog6_EvtRpcAssertConfig(struct ndr_print *ndr, const char *name, int flags, const struct eventlog6_EvtRpcAssertConfig *r)
3868 {
3869         ndr_print_struct(ndr, name, "eventlog6_EvtRpcAssertConfig");
3870         if (r == NULL) { ndr_print_null(ndr); return; }
3871         ndr->depth++;
3872         if (flags & NDR_SET_VALUES) {
3873                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3874         }
3875         if (flags & NDR_IN) {
3876                 ndr_print_struct(ndr, "in", "eventlog6_EvtRpcAssertConfig");
3877                 ndr->depth++;
3878                 ndr_print_ptr(ndr, "path", r->in.path);
3879                 ndr->depth++;
3880                 ndr_print_string(ndr, "path", r->in.path);
3881                 ndr->depth--;
3882                 ndr_print_uint32(ndr, "flags", r->in.flags);
3883                 ndr->depth--;
3884         }
3885         if (flags & NDR_OUT) {
3886                 ndr_print_struct(ndr, "out", "eventlog6_EvtRpcAssertConfig");
3887                 ndr->depth++;
3888                 ndr_print_WERROR(ndr, "result", r->out.result);
3889                 ndr->depth--;
3890         }
3891         ndr->depth--;
3892 }
3893
3894 static enum ndr_err_code ndr_push_eventlog6_EvtRpcRetractConfig(struct ndr_push *ndr, int flags, const struct eventlog6_EvtRpcRetractConfig *r)
3895 {
3896         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
3897         if (flags & NDR_IN) {
3898                 if (r->in.path == NULL) {
3899                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3900                 }
3901                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
3902                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3903                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
3904                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path, ndr_charset_length(r->in.path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3905                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
3906         }
3907         if (flags & NDR_OUT) {
3908                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3909         }
3910         return NDR_ERR_SUCCESS;
3911 }
3912
3913 static enum ndr_err_code ndr_pull_eventlog6_EvtRpcRetractConfig(struct ndr_pull *ndr, int flags, struct eventlog6_EvtRpcRetractConfig *r)
3914 {
3915         uint32_t size_path_1 = 0;
3916         uint32_t length_path_1 = 0;
3917         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
3918         if (flags & NDR_IN) {
3919                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path));
3920                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path));
3921                 size_path_1 = ndr_get_array_size(ndr, &r->in.path);
3922                 if (size_path_1 < 1 || size_path_1 > MAX_RPC_CHANNEL_NAME_LENGTH) {
3923                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
3924                 }
3925                 length_path_1 = ndr_get_array_length(ndr, &r->in.path);
3926                 if (length_path_1 < 1 || length_path_1 > MAX_RPC_CHANNEL_NAME_LENGTH) {
3927                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
3928                 }
3929                 if (length_path_1 > size_path_1) {
3930                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_path_1, length_path_1);
3931                 }
3932                 NDR_CHECK(ndr_check_string_terminator(ndr, length_path_1, sizeof(uint16_t)));
3933                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path, length_path_1, sizeof(uint16_t), CH_UTF16));
3934                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
3935         }
3936         if (flags & NDR_OUT) {
3937                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3938         }
3939         return NDR_ERR_SUCCESS;
3940 }
3941
3942 _PUBLIC_ void ndr_print_eventlog6_EvtRpcRetractConfig(struct ndr_print *ndr, const char *name, int flags, const struct eventlog6_EvtRpcRetractConfig *r)
3943 {
3944         ndr_print_struct(ndr, name, "eventlog6_EvtRpcRetractConfig");
3945         if (r == NULL) { ndr_print_null(ndr); return; }
3946         ndr->depth++;
3947         if (flags & NDR_SET_VALUES) {
3948                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3949         }
3950         if (flags & NDR_IN) {
3951                 ndr_print_struct(ndr, "in", "eventlog6_EvtRpcRetractConfig");
3952                 ndr->depth++;
3953                 ndr_print_ptr(ndr, "path", r->in.path);
3954                 ndr->depth++;
3955                 ndr_print_string(ndr, "path", r->in.path);
3956                 ndr->depth--;
3957                 ndr_print_uint32(ndr, "flags", r->in.flags);
3958                 ndr->depth--;
3959         }
3960         if (flags & NDR_OUT) {
3961                 ndr_print_struct(ndr, "out", "eventlog6_EvtRpcRetractConfig");
3962                 ndr->depth++;
3963                 ndr_print_WERROR(ndr, "result", r->out.result);
3964                 ndr->depth--;
3965         }
3966         ndr->depth--;
3967 }
3968
3969 static enum ndr_err_code ndr_push_eventlog6_EvtRpcOpenLogHandle(struct ndr_push *ndr, int flags, const struct eventlog6_EvtRpcOpenLogHandle *r)
3970 {
3971         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
3972         if (flags & NDR_IN) {
3973                 if (r->in.channel == NULL) {
3974                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3975                 }
3976                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.channel, CH_UTF16)));
3977                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3978                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.channel, CH_UTF16)));
3979                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.channel, ndr_charset_length(r->in.channel, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3980                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
3981         }
3982         if (flags & NDR_OUT) {
3983                 if (r->out.handle == NULL) {
3984                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3985                 }
3986                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.handle));
3987                 if (r->out.error == NULL) {
3988                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3989                 }
3990                 NDR_CHECK(ndr_push_eventlog6_RpcInfo(ndr, NDR_SCALARS, r->out.error));
3991                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3992         }
3993         return NDR_ERR_SUCCESS;
3994 }
3995
3996 static enum ndr_err_code ndr_pull_eventlog6_EvtRpcOpenLogHandle(struct ndr_pull *ndr, int flags, struct eventlog6_EvtRpcOpenLogHandle *r)
3997 {
3998         uint32_t size_channel_1 = 0;
3999         uint32_t length_channel_1 = 0;
4000         TALLOC_CTX *_mem_save_handle_0;
4001         TALLOC_CTX *_mem_save_error_0;
4002         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
4003         if (flags & NDR_IN) {
4004                 ZERO_STRUCT(r->out);
4005
4006                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.channel));
4007                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.channel));
4008                 size_channel_1 = ndr_get_array_size(ndr, &r->in.channel);
4009                 if (size_channel_1 < 1 || size_channel_1 > MAX_RPC_CHANNEL_NAME_LENGTH) {
4010                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
4011                 }
4012                 length_channel_1 = ndr_get_array_length(ndr, &r->in.channel);
4013                 if (length_channel_1 < 1 || length_channel_1 > MAX_RPC_CHANNEL_NAME_LENGTH) {
4014                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
4015                 }
4016                 if (length_channel_1 > size_channel_1) {
4017                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_channel_1, length_channel_1);
4018                 }
4019                 NDR_CHECK(ndr_check_string_terminator(ndr, length_channel_1, sizeof(uint16_t)));
4020                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.channel, length_channel_1, sizeof(uint16_t), CH_UTF16));
4021                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
4022                 NDR_PULL_ALLOC(ndr, r->out.handle);
4023                 ZERO_STRUCTP(r->out.handle);
4024                 NDR_PULL_ALLOC(ndr, r->out.error);
4025                 ZERO_STRUCTP(r->out.error);
4026         }
4027         if (flags & NDR_OUT) {
4028                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4029                         NDR_PULL_ALLOC(ndr, r->out.handle);
4030                 }
4031                 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
4032                 NDR_PULL_SET_MEM_CTX(ndr, r->out.handle, LIBNDR_FLAG_REF_ALLOC);
4033                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.handle));
4034                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
4035                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4036                         NDR_PULL_ALLOC(ndr, r->out.error);
4037                 }
4038                 _mem_save_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
4039                 NDR_PULL_SET_MEM_CTX(ndr, r->out.error, LIBNDR_FLAG_REF_ALLOC);
4040                 NDR_CHECK(ndr_pull_eventlog6_RpcInfo(ndr, NDR_SCALARS, r->out.error));
4041                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_error_0, LIBNDR_FLAG_REF_ALLOC);
4042                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4043         }
4044         return NDR_ERR_SUCCESS;
4045 }
4046
4047 _PUBLIC_ void ndr_print_eventlog6_EvtRpcOpenLogHandle(struct ndr_print *ndr, const char *name, int flags, const struct eventlog6_EvtRpcOpenLogHandle *r)
4048 {
4049         ndr_print_struct(ndr, name, "eventlog6_EvtRpcOpenLogHandle");
4050         if (r == NULL) { ndr_print_null(ndr); return; }
4051         ndr->depth++;
4052         if (flags & NDR_SET_VALUES) {
4053                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4054         }
4055         if (flags & NDR_IN) {
4056                 ndr_print_struct(ndr, "in", "eventlog6_EvtRpcOpenLogHandle");
4057                 ndr->depth++;
4058                 ndr_print_ptr(ndr, "channel", r->in.channel);
4059                 ndr->depth++;
4060                 ndr_print_string(ndr, "channel", r->in.channel);
4061                 ndr->depth--;
4062                 ndr_print_uint32(ndr, "flags", r->in.flags);
4063                 ndr->depth--;
4064         }
4065         if (flags & NDR_OUT) {
4066                 ndr_print_struct(ndr, "out", "eventlog6_EvtRpcOpenLogHandle");
4067                 ndr->depth++;
4068                 ndr_print_ptr(ndr, "handle", r->out.handle);
4069                 ndr->depth++;
4070                 ndr_print_policy_handle(ndr, "handle", r->out.handle);
4071                 ndr->depth--;
4072                 ndr_print_ptr(ndr, "error", r->out.error);
4073                 ndr->depth++;
4074                 ndr_print_eventlog6_RpcInfo(ndr, "error", r->out.error);
4075                 ndr->depth--;
4076                 ndr_print_WERROR(ndr, "result", r->out.result);
4077                 ndr->depth--;
4078         }
4079         ndr->depth--;
4080 }
4081
4082 static enum ndr_err_code ndr_push_eventlog6_EvtRpcGetLogFileInfo(struct ndr_push *ndr, int flags, const struct eventlog6_EvtRpcGetLogFileInfo *r)
4083 {
4084         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
4085         if (flags & NDR_IN) {
4086                 if (r->in.logHandle == NULL) {
4087                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4088                 }
4089                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.logHandle));
4090                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.propertyId));
4091                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.propertyValueBufferSize));
4092         }
4093         if (flags & NDR_OUT) {
4094                 if (r->out.propertyValueBuffer == NULL) {
4095                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4096                 }
4097                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.propertyValueBufferSize));
4098                 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.propertyValueBuffer, r->in.propertyValueBufferSize));
4099                 if (r->out.propertyValueBufferLength == NULL) {
4100                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4101                 }
4102                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.propertyValueBufferLength));
4103                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4104         }
4105         return NDR_ERR_SUCCESS;
4106 }
4107
4108 static enum ndr_err_code ndr_pull_eventlog6_EvtRpcGetLogFileInfo(struct ndr_pull *ndr, int flags, struct eventlog6_EvtRpcGetLogFileInfo *r)
4109 {
4110         uint32_t size_propertyValueBuffer_1 = 0;
4111         TALLOC_CTX *_mem_save_logHandle_0;
4112         TALLOC_CTX *_mem_save_propertyValueBufferLength_0;
4113         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
4114         if (flags & NDR_IN) {
4115                 ZERO_STRUCT(r->out);
4116
4117                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4118                         NDR_PULL_ALLOC(ndr, r->in.logHandle);
4119                 }
4120                 _mem_save_logHandle_0 = NDR_PULL_GET_MEM_CTX(ndr);
4121                 NDR_PULL_SET_MEM_CTX(ndr, r->in.logHandle, LIBNDR_FLAG_REF_ALLOC);
4122                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.logHandle));
4123                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logHandle_0, LIBNDR_FLAG_REF_ALLOC);
4124                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.propertyId));
4125                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.propertyValueBufferSize));
4126                 if (r->in.propertyValueBufferSize > MAX_RPC_PROPERTY_BUFFER_SIZE) {
4127                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
4128                 }
4129                 NDR_PULL_ALLOC_N(ndr, r->out.propertyValueBuffer, r->in.propertyValueBufferSize);
4130                 memset(r->out.propertyValueBuffer, 0, (r->in.propertyValueBufferSize) * sizeof(*r->out.propertyValueBuffer));
4131                 NDR_PULL_ALLOC(ndr, r->out.propertyValueBufferLength);
4132                 ZERO_STRUCTP(r->out.propertyValueBufferLength);
4133         }
4134         if (flags & NDR_OUT) {
4135                 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.propertyValueBuffer));
4136                 size_propertyValueBuffer_1 = ndr_get_array_size(ndr, &r->out.propertyValueBuffer);
4137                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4138                         NDR_PULL_ALLOC_N(ndr, r->out.propertyValueBuffer, size_propertyValueBuffer_1);
4139                 }
4140                 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.propertyValueBuffer, size_propertyValueBuffer_1));
4141                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4142                         NDR_PULL_ALLOC(ndr, r->out.propertyValueBufferLength);
4143                 }
4144                 _mem_save_propertyValueBufferLength_0 = NDR_PULL_GET_MEM_CTX(ndr);
4145                 NDR_PULL_SET_MEM_CTX(ndr, r->out.propertyValueBufferLength, LIBNDR_FLAG_REF_ALLOC);
4146                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.propertyValueBufferLength));
4147                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_propertyValueBufferLength_0, LIBNDR_FLAG_REF_ALLOC);
4148                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4149                 if (r->out.propertyValueBuffer) {
4150                         NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.propertyValueBuffer, r->in.propertyValueBufferSize));
4151                 }
4152         }
4153         return NDR_ERR_SUCCESS;
4154 }
4155
4156 _PUBLIC_ void ndr_print_eventlog6_EvtRpcGetLogFileInfo(struct ndr_print *ndr, const char *name, int flags, const struct eventlog6_EvtRpcGetLogFileInfo *r)
4157 {
4158         ndr_print_struct(ndr, name, "eventlog6_EvtRpcGetLogFileInfo");
4159         if (r == NULL) { ndr_print_null(ndr); return; }
4160         ndr->depth++;
4161         if (flags & NDR_SET_VALUES) {
4162                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4163         }
4164         if (flags & NDR_IN) {
4165                 ndr_print_struct(ndr, "in", "eventlog6_EvtRpcGetLogFileInfo");
4166                 ndr->depth++;
4167                 ndr_print_ptr(ndr, "logHandle", r->in.logHandle);
4168                 ndr->depth++;
4169                 ndr_print_policy_handle(ndr, "logHandle", r->in.logHandle);
4170                 ndr->depth--;
4171                 ndr_print_uint32(ndr, "propertyId", r->in.propertyId);
4172                 ndr_print_uint32(ndr, "propertyValueBufferSize", r->in.propertyValueBufferSize);
4173                 ndr->depth--;
4174         }
4175         if (flags & NDR_OUT) {
4176                 ndr_print_struct(ndr, "out", "eventlog6_EvtRpcGetLogFileInfo");
4177                 ndr->depth++;
4178                 ndr_print_ptr(ndr, "propertyValueBuffer", r->out.propertyValueBuffer);
4179                 ndr->depth++;
4180                 ndr_print_array_uint8(ndr, "propertyValueBuffer", r->out.propertyValueBuffer, r->in.propertyValueBufferSize);
4181                 ndr->depth--;
4182                 ndr_print_ptr(ndr, "propertyValueBufferLength", r->out.propertyValueBufferLength);
4183                 ndr->depth++;
4184                 ndr_print_uint32(ndr, "propertyValueBufferLength", *r->out.propertyValueBufferLength);
4185                 ndr->depth--;
4186                 ndr_print_WERROR(ndr, "result", r->out.result);
4187                 ndr->depth--;
4188         }
4189         ndr->depth--;
4190 }
4191
4192 static enum ndr_err_code ndr_push_eventlog6_EvtRpcGetChannelList(struct ndr_push *ndr, int flags, const struct eventlog6_EvtRpcGetChannelList *r)
4193 {
4194         uint32_t cntr_channelPaths_2;
4195         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
4196         if (flags & NDR_IN) {
4197                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
4198         }
4199         if (flags & NDR_OUT) {
4200                 if (r->out.numChannelPaths == NULL) {
4201                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4202                 }
4203                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.numChannelPaths));
4204                 if (r->out.channelPaths == NULL) {
4205                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4206                 }
4207                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.channelPaths));
4208                 if (*r->out.channelPaths) {
4209                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, *r->out.numChannelPaths));
4210                         for (cntr_channelPaths_2 = 0; cntr_channelPaths_2 < *r->out.numChannelPaths; cntr_channelPaths_2++) {
4211                                 NDR_CHECK(ndr_push_unique_ptr(ndr, (*r->out.channelPaths)[cntr_channelPaths_2]));
4212                         }
4213                         for (cntr_channelPaths_2 = 0; cntr_channelPaths_2 < *r->out.numChannelPaths; cntr_channelPaths_2++) {
4214                                 if ((*r->out.channelPaths)[cntr_channelPaths_2]) {
4215                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length((*r->out.channelPaths)[cntr_channelPaths_2], CH_UTF16)));
4216                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4217                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length((*r->out.channelPaths)[cntr_channelPaths_2], CH_UTF16)));
4218                                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, (*r->out.channelPaths)[cntr_channelPaths_2], ndr_charset_length((*r->out.channelPaths)[cntr_channelPaths_2], CH_UTF16), sizeof(uint16_t), CH_UTF16));
4219                                 }
4220                         }
4221                 }
4222                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4223         }
4224         return NDR_ERR_SUCCESS;
4225 }
4226
4227 static enum ndr_err_code ndr_pull_eventlog6_EvtRpcGetChannelList(struct ndr_pull *ndr, int flags, struct eventlog6_EvtRpcGetChannelList *r)
4228 {
4229         uint32_t _ptr_channelPaths;
4230         uint32_t size_channelPaths_2 = 0;
4231         uint32_t cntr_channelPaths_2;
4232         uint32_t size_channelPaths_4 = 0;
4233         uint32_t length_channelPaths_4 = 0;
4234         TALLOC_CTX *_mem_save_numChannelPaths_0;
4235         TALLOC_CTX *_mem_save_channelPaths_0;
4236         TALLOC_CTX *_mem_save_channelPaths_1;
4237         TALLOC_CTX *_mem_save_channelPaths_2;
4238         TALLOC_CTX *_mem_save_channelPaths_3;
4239         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
4240         if (flags & NDR_IN) {
4241                 ZERO_STRUCT(r->out);
4242
4243                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
4244                 NDR_PULL_ALLOC(ndr, r->out.numChannelPaths);
4245                 ZERO_STRUCTP(r->out.numChannelPaths);
4246                 NDR_PULL_ALLOC(ndr, r->out.channelPaths);
4247                 ZERO_STRUCTP(r->out.channelPaths);
4248         }
4249         if (flags & NDR_OUT) {
4250                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4251                         NDR_PULL_ALLOC(ndr, r->out.numChannelPaths);
4252                 }
4253                 _mem_save_numChannelPaths_0 = NDR_PULL_GET_MEM_CTX(ndr);
4254                 NDR_PULL_SET_MEM_CTX(ndr, r->out.numChannelPaths, LIBNDR_FLAG_REF_ALLOC);
4255                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.numChannelPaths));
4256                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_numChannelPaths_0, LIBNDR_FLAG_REF_ALLOC);
4257                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4258                         NDR_PULL_ALLOC(ndr, r->out.channelPaths);
4259                 }
4260                 _mem_save_channelPaths_0 = NDR_PULL_GET_MEM_CTX(ndr);
4261                 NDR_PULL_SET_MEM_CTX(ndr, r->out.channelPaths, LIBNDR_FLAG_REF_ALLOC);
4262                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_channelPaths));
4263                 if (_ptr_channelPaths) {
4264                         NDR_PULL_ALLOC(ndr, *r->out.channelPaths);
4265                 } else {
4266                         *r->out.channelPaths = NULL;
4267                 }
4268                 if (*r->out.channelPaths) {
4269                         _mem_save_channelPaths_1 = NDR_PULL_GET_MEM_CTX(ndr);
4270                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.channelPaths, 0);
4271                         NDR_CHECK(ndr_pull_array_size(ndr, r->out.channelPaths));
4272                         size_channelPaths_2 = ndr_get_array_size(ndr, r->out.channelPaths);
4273                         if (size_channelPaths_2 > MAX_RPC_CHANNEL_COUNT) {
4274                                 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
4275                         }
4276                         NDR_PULL_ALLOC_N(ndr, *r->out.channelPaths, size_channelPaths_2);
4277                         _mem_save_channelPaths_2 = NDR_PULL_GET_MEM_CTX(ndr);
4278                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.channelPaths, 0);
4279                         for (cntr_channelPaths_2 = 0; cntr_channelPaths_2 < size_channelPaths_2; cntr_channelPaths_2++) {
4280                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_channelPaths));
4281                                 if (_ptr_channelPaths) {
4282                                         NDR_PULL_ALLOC(ndr, (*r->out.channelPaths)[cntr_channelPaths_2]);
4283                                 } else {
4284                                         (*r->out.channelPaths)[cntr_channelPaths_2] = NULL;
4285                                 }
4286                         }
4287                         for (cntr_channelPaths_2 = 0; cntr_channelPaths_2 < size_channelPaths_2; cntr_channelPaths_2++) {
4288                                 if ((*r->out.channelPaths)[cntr_channelPaths_2]) {
4289                                         _mem_save_channelPaths_3 = NDR_PULL_GET_MEM_CTX(ndr);
4290                                         NDR_PULL_SET_MEM_CTX(ndr, (*r->out.channelPaths)[cntr_channelPaths_2], 0);
4291                                         NDR_CHECK(ndr_pull_array_size(ndr, &(*r->out.channelPaths)[cntr_channelPaths_2]));
4292                                         NDR_CHECK(ndr_pull_array_length(ndr, &(*r->out.channelPaths)[cntr_channelPaths_2]));
4293                                         size_channelPaths_4 = ndr_get_array_size(ndr, &(*r->out.channelPaths)[cntr_channelPaths_2]);
4294                                         if (size_channelPaths_4 > MAX_RPC_CHANNEL_COUNT) {
4295                                                 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
4296                                         }
4297                                         length_channelPaths_4 = ndr_get_array_length(ndr, &(*r->out.channelPaths)[cntr_channelPaths_2]);
4298                                         if (length_channelPaths_4 > MAX_RPC_CHANNEL_COUNT) {
4299                                                 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
4300                                         }
4301                                         if (length_channelPaths_4 > size_channelPaths_4) {
4302                                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_channelPaths_4, length_channelPaths_4);
4303                                         }
4304                                         NDR_CHECK(ndr_check_string_terminator(ndr, length_channelPaths_4, sizeof(uint16_t)));
4305                                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &(*r->out.channelPaths)[cntr_channelPaths_2], length_channelPaths_4, sizeof(uint16_t), CH_UTF16));
4306                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_channelPaths_3, 0);
4307                                 }
4308                         }
4309                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_channelPaths_2, 0);
4310                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_channelPaths_1, 0);
4311                 }
4312                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_channelPaths_0, LIBNDR_FLAG_REF_ALLOC);
4313                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4314                 if (*r->out.channelPaths) {
4315                         NDR_CHECK(ndr_check_array_size(ndr, (void*)r->out.channelPaths, *r->out.numChannelPaths));
4316                 }
4317         }
4318         return NDR_ERR_SUCCESS;
4319 }
4320
4321 _PUBLIC_ void ndr_print_eventlog6_EvtRpcGetChannelList(struct ndr_print *ndr, const char *name, int flags, const struct eventlog6_EvtRpcGetChannelList *r)
4322 {
4323         uint32_t cntr_channelPaths_2;
4324         ndr_print_struct(ndr, name, "eventlog6_EvtRpcGetChannelList");
4325         if (r == NULL) { ndr_print_null(ndr); return; }
4326         ndr->depth++;
4327         if (flags & NDR_SET_VALUES) {
4328                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4329         }
4330         if (flags & NDR_IN) {
4331                 ndr_print_struct(ndr, "in", "eventlog6_EvtRpcGetChannelList");
4332                 ndr->depth++;
4333                 ndr_print_uint32(ndr, "flags", r->in.flags);
4334                 ndr->depth--;
4335         }
4336         if (flags & NDR_OUT) {
4337                 ndr_print_struct(ndr, "out", "eventlog6_EvtRpcGetChannelList");
4338                 ndr->depth++;
4339                 ndr_print_ptr(ndr, "numChannelPaths", r->out.numChannelPaths);
4340                 ndr->depth++;
4341                 ndr_print_uint32(ndr, "numChannelPaths", *r->out.numChannelPaths);
4342                 ndr->depth--;
4343                 ndr_print_ptr(ndr, "channelPaths", r->out.channelPaths);
4344                 ndr->depth++;
4345                 ndr_print_ptr(ndr, "channelPaths", *r->out.channelPaths);
4346                 ndr->depth++;
4347                 if (*r->out.channelPaths) {
4348                         ndr->print(ndr, "%s: ARRAY(%d)", "channelPaths", (int)*r->out.numChannelPaths);
4349                         ndr->depth++;
4350                         for (cntr_channelPaths_2=0;cntr_channelPaths_2<*r->out.numChannelPaths;cntr_channelPaths_2++) {
4351                                 ndr_print_ptr(ndr, "channelPaths", (*r->out.channelPaths)[cntr_channelPaths_2]);
4352                                 ndr->depth++;
4353                                 if ((*r->out.channelPaths)[cntr_channelPaths_2]) {
4354                                         ndr_print_string(ndr, "channelPaths", (*r->out.channelPaths)[cntr_channelPaths_2]);
4355                                 }
4356                                 ndr->depth--;
4357                         }
4358                         ndr->depth--;
4359                 }
4360                 ndr->depth--;
4361                 ndr->depth--;
4362                 ndr_print_WERROR(ndr, "result", r->out.result);
4363                 ndr->depth--;
4364         }
4365         ndr->depth--;
4366 }
4367
4368 static enum ndr_err_code ndr_push_eventlog6_EvtRpcGetChannelConfig(struct ndr_push *ndr, int flags, const struct eventlog6_EvtRpcGetChannelConfig *r)
4369 {
4370         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
4371         if (flags & NDR_IN) {
4372                 if (r->in.channelPath == NULL) {
4373                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4374                 }
4375                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.channelPath, CH_UTF16)));
4376                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4377                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.channelPath, CH_UTF16)));
4378                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.channelPath, ndr_charset_length(r->in.channelPath, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4379                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
4380         }
4381         if (flags & NDR_OUT) {
4382                 if (r->out.props == NULL) {
4383                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4384                 }
4385                 NDR_CHECK(ndr_push_eventlog6_EvtRpcVariantList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.props));
4386                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4387         }
4388         return NDR_ERR_SUCCESS;
4389 }
4390
4391 static enum ndr_err_code ndr_pull_eventlog6_EvtRpcGetChannelConfig(struct ndr_pull *ndr, int flags, struct eventlog6_EvtRpcGetChannelConfig *r)
4392 {
4393         uint32_t size_channelPath_1 = 0;
4394         uint32_t length_channelPath_1 = 0;
4395         TALLOC_CTX *_mem_save_props_0;
4396         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
4397         if (flags & NDR_IN) {
4398                 ZERO_STRUCT(r->out);
4399
4400                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.channelPath));
4401                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.channelPath));
4402                 size_channelPath_1 = ndr_get_array_size(ndr, &r->in.channelPath);
4403                 if (size_channelPath_1 < 1 || size_channelPath_1 > MAX_RPC_CHANNEL_NAME_LENGTH) {
4404                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
4405                 }
4406                 length_channelPath_1 = ndr_get_array_length(ndr, &r->in.channelPath);
4407                 if (length_channelPath_1 < 1 || length_channelPath_1 > MAX_RPC_CHANNEL_NAME_LENGTH) {
4408                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
4409                 }
4410                 if (length_channelPath_1 > size_channelPath_1) {
4411                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_channelPath_1, length_channelPath_1);
4412                 }
4413                 NDR_CHECK(ndr_check_string_terminator(ndr, length_channelPath_1, sizeof(uint16_t)));
4414                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.channelPath, length_channelPath_1, sizeof(uint16_t), CH_UTF16));
4415                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
4416                 NDR_PULL_ALLOC(ndr, r->out.props);
4417                 ZERO_STRUCTP(r->out.props);
4418         }
4419         if (flags & NDR_OUT) {
4420                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4421                         NDR_PULL_ALLOC(ndr, r->out.props);
4422                 }
4423                 _mem_save_props_0 = NDR_PULL_GET_MEM_CTX(ndr);
4424                 NDR_PULL_SET_MEM_CTX(ndr, r->out.props, LIBNDR_FLAG_REF_ALLOC);
4425                 NDR_CHECK(ndr_pull_eventlog6_EvtRpcVariantList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.props));
4426                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_props_0, LIBNDR_FLAG_REF_ALLOC);
4427                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4428         }
4429         return NDR_ERR_SUCCESS;
4430 }
4431
4432 _PUBLIC_ void ndr_print_eventlog6_EvtRpcGetChannelConfig(struct ndr_print *ndr, const char *name, int flags, const struct eventlog6_EvtRpcGetChannelConfig *r)
4433 {
4434         ndr_print_struct(ndr, name, "eventlog6_EvtRpcGetChannelConfig");
4435         if (r == NULL) { ndr_print_null(ndr); return; }
4436         ndr->depth++;
4437         if (flags & NDR_SET_VALUES) {
4438                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4439         }
4440         if (flags & NDR_IN) {
4441                 ndr_print_struct(ndr, "in", "eventlog6_EvtRpcGetChannelConfig");
4442                 ndr->depth++;
4443                 ndr_print_ptr(ndr, "channelPath", r->in.channelPath);
4444                 ndr->depth++;
4445                 ndr_print_string(ndr, "channelPath", r->in.channelPath);
4446                 ndr->depth--;
4447                 ndr_print_uint32(ndr, "flags", r->in.flags);
4448                 ndr->depth--;
4449         }
4450         if (flags & NDR_OUT) {
4451                 ndr_print_struct(ndr, "out", "eventlog6_EvtRpcGetChannelConfig");
4452                 ndr->depth++;
4453                 ndr_print_ptr(ndr, "props", r->out.props);
4454                 ndr->depth++;
4455                 ndr_print_eventlog6_EvtRpcVariantList(ndr, "props", r->out.props);
4456                 ndr->depth--;
4457                 ndr_print_WERROR(ndr, "result", r->out.result);
4458                 ndr->depth--;
4459         }
4460         ndr->depth--;
4461 }
4462
4463 static enum ndr_err_code ndr_push_eventlog6_EvtRpcPutChannelConfig(struct ndr_push *ndr, int flags, const struct eventlog6_EvtRpcPutChannelConfig *r)
4464 {
4465         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
4466         if (flags & NDR_IN) {
4467                 if (r->in.channelPath == NULL) {
4468                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4469                 }
4470                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.channelPath, CH_UTF16)));
4471                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4472                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.channelPath, CH_UTF16)));
4473                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.channelPath, ndr_charset_length(r->in.channelPath, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4474                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
4475                 if (r->in.props == NULL) {
4476                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4477                 }
4478                 NDR_CHECK(ndr_push_eventlog6_EvtRpcVariantList(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.props));
4479         }
4480         if (flags & NDR_OUT) {
4481                 if (r->out.error == NULL) {
4482                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4483                 }
4484                 NDR_CHECK(ndr_push_eventlog6_RpcInfo(ndr, NDR_SCALARS, r->out.error));
4485                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4486         }
4487         return NDR_ERR_SUCCESS;
4488 }
4489
4490 static enum ndr_err_code ndr_pull_eventlog6_EvtRpcPutChannelConfig(struct ndr_pull *ndr, int flags, struct eventlog6_EvtRpcPutChannelConfig *r)
4491 {
4492         uint32_t size_channelPath_1 = 0;
4493         uint32_t length_channelPath_1 = 0;
4494         TALLOC_CTX *_mem_save_props_0;
4495         TALLOC_CTX *_mem_save_error_0;
4496         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
4497         if (flags & NDR_IN) {
4498                 ZERO_STRUCT(r->out);
4499
4500                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.channelPath));
4501                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.channelPath));
4502                 size_channelPath_1 = ndr_get_array_size(ndr, &r->in.channelPath);
4503                 if (size_channelPath_1 < 1 || size_channelPath_1 > MAX_RPC_CHANNEL_NAME_LENGTH) {
4504                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
4505                 }
4506                 length_channelPath_1 = ndr_get_array_length(ndr, &r->in.channelPath);
4507                 if (length_channelPath_1 < 1 || length_channelPath_1 > MAX_RPC_CHANNEL_NAME_LENGTH) {
4508                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
4509                 }
4510                 if (length_channelPath_1 > size_channelPath_1) {
4511                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_channelPath_1, length_channelPath_1);
4512                 }
4513                 NDR_CHECK(ndr_check_string_terminator(ndr, length_channelPath_1, sizeof(uint16_t)));
4514                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.channelPath, length_channelPath_1, sizeof(uint16_t), CH_UTF16));
4515                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
4516                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4517                         NDR_PULL_ALLOC(ndr, r->in.props);
4518                 }
4519                 _mem_save_props_0 = NDR_PULL_GET_MEM_CTX(ndr);
4520                 NDR_PULL_SET_MEM_CTX(ndr, r->in.props, LIBNDR_FLAG_REF_ALLOC);
4521                 NDR_CHECK(ndr_pull_eventlog6_EvtRpcVariantList(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.props));
4522                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_props_0, LIBNDR_FLAG_REF_ALLOC);
4523                 NDR_PULL_ALLOC(ndr, r->out.error);
4524                 ZERO_STRUCTP(r->out.error);
4525         }
4526         if (flags & NDR_OUT) {
4527                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4528                         NDR_PULL_ALLOC(ndr, r->out.error);
4529                 }
4530                 _mem_save_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
4531                 NDR_PULL_SET_MEM_CTX(ndr, r->out.error, LIBNDR_FLAG_REF_ALLOC);
4532                 NDR_CHECK(ndr_pull_eventlog6_RpcInfo(ndr, NDR_SCALARS, r->out.error));
4533                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_error_0, LIBNDR_FLAG_REF_ALLOC);
4534                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4535         }
4536         return NDR_ERR_SUCCESS;
4537 }
4538
4539 _PUBLIC_ void ndr_print_eventlog6_EvtRpcPutChannelConfig(struct ndr_print *ndr, const char *name, int flags, const struct eventlog6_EvtRpcPutChannelConfig *r)
4540 {
4541         ndr_print_struct(ndr, name, "eventlog6_EvtRpcPutChannelConfig");
4542         if (r == NULL) { ndr_print_null(ndr); return; }
4543         ndr->depth++;
4544         if (flags & NDR_SET_VALUES) {
4545                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4546         }
4547         if (flags & NDR_IN) {
4548                 ndr_print_struct(ndr, "in", "eventlog6_EvtRpcPutChannelConfig");
4549                 ndr->depth++;
4550                 ndr_print_ptr(ndr, "channelPath", r->in.channelPath);
4551                 ndr->depth++;
4552                 ndr_print_string(ndr, "channelPath", r->in.channelPath);
4553                 ndr->depth--;
4554                 ndr_print_uint32(ndr, "flags", r->in.flags);
4555                 ndr_print_ptr(ndr, "props", r->in.props);
4556                 ndr->depth++;
4557                 ndr_print_eventlog6_EvtRpcVariantList(ndr, "props", r->in.props);
4558                 ndr->depth--;
4559                 ndr->depth--;
4560         }
4561         if (flags & NDR_OUT) {
4562                 ndr_print_struct(ndr, "out", "eventlog6_EvtRpcPutChannelConfig");
4563                 ndr->depth++;
4564                 ndr_print_ptr(ndr, "error", r->out.error);
4565                 ndr->depth++;
4566                 ndr_print_eventlog6_RpcInfo(ndr, "error", r->out.error);
4567                 ndr->depth--;
4568                 ndr_print_WERROR(ndr, "result", r->out.result);
4569                 ndr->depth--;
4570         }
4571         ndr->depth--;
4572 }
4573
4574 static enum ndr_err_code ndr_push_eventlog6_EvtRpcGetPublisherList(struct ndr_push *ndr, int flags, const struct eventlog6_EvtRpcGetPublisherList *r)
4575 {
4576         uint32_t cntr_publisherIds_2;
4577         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
4578         if (flags & NDR_IN) {
4579                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
4580         }
4581         if (flags & NDR_OUT) {
4582                 if (r->out.numPublisherIds == NULL) {
4583                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4584                 }
4585                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.numPublisherIds));
4586                 if (r->out.publisherIds == NULL) {
4587                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4588                 }
4589                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.publisherIds));
4590                 if (*r->out.publisherIds) {
4591                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, *r->out.numPublisherIds));
4592                         for (cntr_publisherIds_2 = 0; cntr_publisherIds_2 < *r->out.numPublisherIds; cntr_publisherIds_2++) {
4593                                 NDR_CHECK(ndr_push_unique_ptr(ndr, (*r->out.publisherIds)[cntr_publisherIds_2]));
4594                         }
4595                         for (cntr_publisherIds_2 = 0; cntr_publisherIds_2 < *r->out.numPublisherIds; cntr_publisherIds_2++) {
4596                                 if ((*r->out.publisherIds)[cntr_publisherIds_2]) {
4597                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length((*r->out.publisherIds)[cntr_publisherIds_2], CH_UTF16)));
4598                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4599                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length((*r->out.publisherIds)[cntr_publisherIds_2], CH_UTF16)));
4600                                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, (*r->out.publisherIds)[cntr_publisherIds_2], ndr_charset_length((*r->out.publisherIds)[cntr_publisherIds_2], CH_UTF16), sizeof(uint16_t), CH_UTF16));
4601                                 }
4602                         }
4603                 }
4604                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4605         }
4606         return NDR_ERR_SUCCESS;
4607 }
4608
4609 static enum ndr_err_code ndr_pull_eventlog6_EvtRpcGetPublisherList(struct ndr_pull *ndr, int flags, struct eventlog6_EvtRpcGetPublisherList *r)
4610 {
4611         uint32_t _ptr_publisherIds;
4612         uint32_t size_publisherIds_2 = 0;
4613         uint32_t cntr_publisherIds_2;
4614         uint32_t size_publisherIds_4 = 0;
4615         uint32_t length_publisherIds_4 = 0;
4616         TALLOC_CTX *_mem_save_numPublisherIds_0;
4617         TALLOC_CTX *_mem_save_publisherIds_0;
4618         TALLOC_CTX *_mem_save_publisherIds_1;
4619         TALLOC_CTX *_mem_save_publisherIds_2;
4620         TALLOC_CTX *_mem_save_publisherIds_3;
4621         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
4622         if (flags & NDR_IN) {
4623                 ZERO_STRUCT(r->out);
4624
4625                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
4626                 NDR_PULL_ALLOC(ndr, r->out.numPublisherIds);
4627                 ZERO_STRUCTP(r->out.numPublisherIds);
4628                 NDR_PULL_ALLOC(ndr, r->out.publisherIds);
4629                 ZERO_STRUCTP(r->out.publisherIds);
4630         }
4631         if (flags & NDR_OUT) {
4632                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4633                         NDR_PULL_ALLOC(ndr, r->out.numPublisherIds);
4634                 }
4635                 _mem_save_numPublisherIds_0 = NDR_PULL_GET_MEM_CTX(ndr);
4636                 NDR_PULL_SET_MEM_CTX(ndr, r->out.numPublisherIds, LIBNDR_FLAG_REF_ALLOC);
4637                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.numPublisherIds));
4638                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_numPublisherIds_0, LIBNDR_FLAG_REF_ALLOC);
4639                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4640                         NDR_PULL_ALLOC(ndr, r->out.publisherIds);
4641                 }
4642                 _mem_save_publisherIds_0 = NDR_PULL_GET_MEM_CTX(ndr);
4643                 NDR_PULL_SET_MEM_CTX(ndr, r->out.publisherIds, LIBNDR_FLAG_REF_ALLOC);
4644                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_publisherIds));
4645                 if (_ptr_publisherIds) {
4646                         NDR_PULL_ALLOC(ndr, *r->out.publisherIds);
4647                 } else {
4648                         *r->out.publisherIds = NULL;
4649                 }
4650                 if (*r->out.publisherIds) {
4651                         _mem_save_publisherIds_1 = NDR_PULL_GET_MEM_CTX(ndr);
4652                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.publisherIds, 0);
4653                         NDR_CHECK(ndr_pull_array_size(ndr, r->out.publisherIds));
4654                         size_publisherIds_2 = ndr_get_array_size(ndr, r->out.publisherIds);
4655                         if (size_publisherIds_2 > MAX_RPC_PUBLISHER_COUNT) {
4656                                 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
4657                         }
4658                         NDR_PULL_ALLOC_N(ndr, *r->out.publisherIds, size_publisherIds_2);
4659                         _mem_save_publisherIds_2 = NDR_PULL_GET_MEM_CTX(ndr);
4660                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.publisherIds, 0);
4661                         for (cntr_publisherIds_2 = 0; cntr_publisherIds_2 < size_publisherIds_2; cntr_publisherIds_2++) {
4662                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_publisherIds));
4663                                 if (_ptr_publisherIds) {
4664                                         NDR_PULL_ALLOC(ndr, (*r->out.publisherIds)[cntr_publisherIds_2]);
4665                                 } else {
4666                                         (*r->out.publisherIds)[cntr_publisherIds_2] = NULL;
4667                                 }
4668                         }
4669                         for (cntr_publisherIds_2 = 0; cntr_publisherIds_2 < size_publisherIds_2; cntr_publisherIds_2++) {
4670                                 if ((*r->out.publisherIds)[cntr_publisherIds_2]) {
4671                                         _mem_save_publisherIds_3 = NDR_PULL_GET_MEM_CTX(ndr);
4672                                         NDR_PULL_SET_MEM_CTX(ndr, (*r->out.publisherIds)[cntr_publisherIds_2], 0);
4673                                         NDR_CHECK(ndr_pull_array_size(ndr, &(*r->out.publisherIds)[cntr_publisherIds_2]));
4674                                         NDR_CHECK(ndr_pull_array_length(ndr, &(*r->out.publisherIds)[cntr_publisherIds_2]));
4675                                         size_publisherIds_4 = ndr_get_array_size(ndr, &(*r->out.publisherIds)[cntr_publisherIds_2]);
4676                                         if (size_publisherIds_4 > MAX_RPC_PUBLISHER_COUNT) {
4677                                                 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
4678                                         }
4679                                         length_publisherIds_4 = ndr_get_array_length(ndr, &(*r->out.publisherIds)[cntr_publisherIds_2]);
4680                                         if (length_publisherIds_4 > MAX_RPC_PUBLISHER_COUNT) {
4681                                                 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
4682                                         }
4683                                         if (length_publisherIds_4 > size_publisherIds_4) {
4684                                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_publisherIds_4, length_publisherIds_4);
4685                                         }
4686                                         NDR_CHECK(ndr_check_string_terminator(ndr, length_publisherIds_4, sizeof(uint16_t)));
4687                                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &(*r->out.publisherIds)[cntr_publisherIds_2], length_publisherIds_4, sizeof(uint16_t), CH_UTF16));
4688                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_publisherIds_3, 0);
4689                                 }
4690                         }
4691                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_publisherIds_2, 0);
4692                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_publisherIds_1, 0);
4693                 }
4694                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_publisherIds_0, LIBNDR_FLAG_REF_ALLOC);
4695                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4696                 if (*r->out.publisherIds) {
4697                         NDR_CHECK(ndr_check_array_size(ndr, (void*)r->out.publisherIds, *r->out.numPublisherIds));
4698                 }
4699         }
4700         return NDR_ERR_SUCCESS;
4701 }
4702
4703 _PUBLIC_ void ndr_print_eventlog6_EvtRpcGetPublisherList(struct ndr_print *ndr, const char *name, int flags, const struct eventlog6_EvtRpcGetPublisherList *r)
4704 {
4705         uint32_t cntr_publisherIds_2;
4706         ndr_print_struct(ndr, name, "eventlog6_EvtRpcGetPublisherList");
4707         if (r == NULL) { ndr_print_null(ndr); return; }
4708         ndr->depth++;
4709         if (flags & NDR_SET_VALUES) {
4710                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4711         }
4712         if (flags & NDR_IN) {
4713                 ndr_print_struct(ndr, "in", "eventlog6_EvtRpcGetPublisherList");
4714                 ndr->depth++;
4715                 ndr_print_uint32(ndr, "flags", r->in.flags);
4716                 ndr->depth--;
4717         }
4718         if (flags & NDR_OUT) {
4719                 ndr_print_struct(ndr, "out", "eventlog6_EvtRpcGetPublisherList");
4720                 ndr->depth++;
4721                 ndr_print_ptr(ndr, "numPublisherIds", r->out.numPublisherIds);
4722                 ndr->depth++;
4723                 ndr_print_uint32(ndr, "numPublisherIds", *r->out.numPublisherIds);
4724                 ndr->depth--;
4725                 ndr_print_ptr(ndr, "publisherIds", r->out.publisherIds);
4726                 ndr->depth++;
4727                 ndr_print_ptr(ndr, "publisherIds", *r->out.publisherIds);
4728                 ndr->depth++;
4729                 if (*r->out.publisherIds) {
4730                         ndr->print(ndr, "%s: ARRAY(%d)", "publisherIds", (int)*r->out.numPublisherIds);
4731                         ndr->depth++;
4732                         for (cntr_publisherIds_2=0;cntr_publisherIds_2<*r->out.numPublisherIds;cntr_publisherIds_2++) {
4733                                 ndr_print_ptr(ndr, "publisherIds", (*r->out.publisherIds)[cntr_publisherIds_2]);
4734                                 ndr->depth++;
4735                                 if ((*r->out.publisherIds)[cntr_publisherIds_2]) {
4736                                         ndr_print_string(ndr, "publisherIds", (*r->out.publisherIds)[cntr_publisherIds_2]);
4737                                 }
4738                                 ndr->depth--;
4739                         }
4740                         ndr->depth--;
4741                 }
4742                 ndr->depth--;
4743                 ndr->depth--;
4744                 ndr_print_WERROR(ndr, "result", r->out.result);
4745                 ndr->depth--;
4746         }
4747         ndr->depth--;
4748 }
4749
4750 static enum ndr_err_code ndr_push_eventlog6_EvtRpcGetPublisherListForChannel(struct ndr_push *ndr, int flags, const struct eventlog6_EvtRpcGetPublisherListForChannel *r)
4751 {
4752         uint32_t cntr_publisherIds_2;
4753         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
4754         if (flags & NDR_IN) {
4755                 if (r->in.channelName == NULL) {
4756                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4757                 }
4758                 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, *r->in.channelName));
4759                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
4760         }
4761         if (flags & NDR_OUT) {
4762                 if (r->out.numPublisherIds == NULL) {
4763                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4764                 }
4765                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.numPublisherIds));
4766                 if (r->out.publisherIds == NULL) {
4767                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4768                 }
4769                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.publisherIds));
4770                 if (*r->out.publisherIds) {
4771                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, *r->out.numPublisherIds));
4772                         for (cntr_publisherIds_2 = 0; cntr_publisherIds_2 < *r->out.numPublisherIds; cntr_publisherIds_2++) {
4773                                 NDR_CHECK(ndr_push_unique_ptr(ndr, (*r->out.publisherIds)[cntr_publisherIds_2]));
4774                         }
4775                         for (cntr_publisherIds_2 = 0; cntr_publisherIds_2 < *r->out.numPublisherIds; cntr_publisherIds_2++) {
4776                                 if ((*r->out.publisherIds)[cntr_publisherIds_2]) {
4777                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length((*r->out.publisherIds)[cntr_publisherIds_2], CH_UTF16)));
4778                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4779                                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length((*r->out.publisherIds)[cntr_publisherIds_2], CH_UTF16)));
4780                                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, (*r->out.publisherIds)[cntr_publisherIds_2], ndr_charset_length((*r->out.publisherIds)[cntr_publisherIds_2], CH_UTF16), sizeof(uint16_t), CH_UTF16));
4781                                 }
4782                         }
4783                 }
4784                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4785         }
4786         return NDR_ERR_SUCCESS;
4787 }
4788
4789 static enum ndr_err_code ndr_pull_eventlog6_EvtRpcGetPublisherListForChannel(struct ndr_pull *ndr, int flags, struct eventlog6_EvtRpcGetPublisherListForChannel *r)
4790 {
4791         uint32_t _ptr_publisherIds;
4792         uint32_t size_publisherIds_2 = 0;
4793         uint32_t cntr_publisherIds_2;
4794         uint32_t size_publisherIds_4 = 0;
4795         uint32_t length_publisherIds_4 = 0;
4796         TALLOC_CTX *_mem_save_channelName_0;
4797         TALLOC_CTX *_mem_save_numPublisherIds_0;
4798         TALLOC_CTX *_mem_save_publisherIds_0;
4799         TALLOC_CTX *_mem_save_publisherIds_1;
4800         TALLOC_CTX *_mem_save_publisherIds_2;
4801         TALLOC_CTX *_mem_save_publisherIds_3;
4802         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
4803         if (flags & NDR_IN) {
4804                 ZERO_STRUCT(r->out);
4805
4806                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4807                         NDR_PULL_ALLOC(ndr, r->in.channelName);
4808                 }
4809                 _mem_save_channelName_0 = NDR_PULL_GET_MEM_CTX(ndr);
4810                 NDR_PULL_SET_MEM_CTX(ndr, r->in.channelName, LIBNDR_FLAG_REF_ALLOC);
4811                 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, r->in.channelName));
4812                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_channelName_0, LIBNDR_FLAG_REF_ALLOC);
4813                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
4814                 NDR_PULL_ALLOC(ndr, r->out.numPublisherIds);
4815                 ZERO_STRUCTP(r->out.numPublisherIds);
4816                 NDR_PULL_ALLOC(ndr, r->out.publisherIds);
4817                 ZERO_STRUCTP(r->out.publisherIds);
4818         }
4819         if (flags & NDR_OUT) {
4820                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4821                         NDR_PULL_ALLOC(ndr, r->out.numPublisherIds);
4822                 }
4823                 _mem_save_numPublisherIds_0 = NDR_PULL_GET_MEM_CTX(ndr);
4824                 NDR_PULL_SET_MEM_CTX(ndr, r->out.numPublisherIds, LIBNDR_FLAG_REF_ALLOC);
4825                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.numPublisherIds));
4826                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_numPublisherIds_0, LIBNDR_FLAG_REF_ALLOC);
4827                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4828                         NDR_PULL_ALLOC(ndr, r->out.publisherIds);
4829                 }
4830                 _mem_save_publisherIds_0 = NDR_PULL_GET_MEM_CTX(ndr);
4831                 NDR_PULL_SET_MEM_CTX(ndr, r->out.publisherIds, LIBNDR_FLAG_REF_ALLOC);
4832                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_publisherIds));
4833                 if (_ptr_publisherIds) {
4834                         NDR_PULL_ALLOC(ndr, *r->out.publisherIds);
4835                 } else {
4836                         *r->out.publisherIds = NULL;
4837                 }
4838                 if (*r->out.publisherIds) {
4839                         _mem_save_publisherIds_1 = NDR_PULL_GET_MEM_CTX(ndr);
4840                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.publisherIds, 0);
4841                         NDR_CHECK(ndr_pull_array_size(ndr, r->out.publisherIds));
4842                         size_publisherIds_2 = ndr_get_array_size(ndr, r->out.publisherIds);
4843                         if (size_publisherIds_2 > MAX_RPC_PUBLISHER_COUNT) {
4844                                 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
4845                         }
4846                         NDR_PULL_ALLOC_N(ndr, *r->out.publisherIds, size_publisherIds_2);
4847                         _mem_save_publisherIds_2 = NDR_PULL_GET_MEM_CTX(ndr);
4848                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.publisherIds, 0);
4849                         for (cntr_publisherIds_2 = 0; cntr_publisherIds_2 < size_publisherIds_2; cntr_publisherIds_2++) {
4850                                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_publisherIds));
4851                                 if (_ptr_publisherIds) {
4852                                         NDR_PULL_ALLOC(ndr, (*r->out.publisherIds)[cntr_publisherIds_2]);
4853                                 } else {
4854                                         (*r->out.publisherIds)[cntr_publisherIds_2] = NULL;
4855                                 }
4856                         }
4857                         for (cntr_publisherIds_2 = 0; cntr_publisherIds_2 < size_publisherIds_2; cntr_publisherIds_2++) {
4858                                 if ((*r->out.publisherIds)[cntr_publisherIds_2]) {
4859                                         _mem_save_publisherIds_3 = NDR_PULL_GET_MEM_CTX(ndr);
4860                                         NDR_PULL_SET_MEM_CTX(ndr, (*r->out.publisherIds)[cntr_publisherIds_2], 0);
4861                                         NDR_CHECK(ndr_pull_array_size(ndr, &(*r->out.publisherIds)[cntr_publisherIds_2]));
4862                                         NDR_CHECK(ndr_pull_array_length(ndr, &(*r->out.publisherIds)[cntr_publisherIds_2]));
4863                                         size_publisherIds_4 = ndr_get_array_size(ndr, &(*r->out.publisherIds)[cntr_publisherIds_2]);
4864                                         if (size_publisherIds_4 > MAX_RPC_PUBLISHER_COUNT) {
4865                                                 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
4866                                         }
4867                                         length_publisherIds_4 = ndr_get_array_length(ndr, &(*r->out.publisherIds)[cntr_publisherIds_2]);
4868                                         if (length_publisherIds_4 > MAX_RPC_PUBLISHER_COUNT) {
4869                                                 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
4870                                         }
4871                                         if (length_publisherIds_4 > size_publisherIds_4) {
4872                                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_publisherIds_4, length_publisherIds_4);
4873                                         }
4874                                         NDR_CHECK(ndr_check_string_terminator(ndr, length_publisherIds_4, sizeof(uint16_t)));
4875                                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &(*r->out.publisherIds)[cntr_publisherIds_2], length_publisherIds_4, sizeof(uint16_t), CH_UTF16));
4876                                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_publisherIds_3, 0);
4877                                 }
4878                         }
4879                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_publisherIds_2, 0);
4880                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_publisherIds_1, 0);
4881                 }
4882                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_publisherIds_0, LIBNDR_FLAG_REF_ALLOC);
4883                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4884                 if (*r->out.publisherIds) {
4885                         NDR_CHECK(ndr_check_array_size(ndr, (void*)r->out.publisherIds, *r->out.numPublisherIds));
4886                 }
4887         }
4888         return NDR_ERR_SUCCESS;
4889 }
4890
4891 _PUBLIC_ void ndr_print_eventlog6_EvtRpcGetPublisherListForChannel(struct ndr_print *ndr, const char *name, int flags, const struct eventlog6_EvtRpcGetPublisherListForChannel *r)
4892 {
4893         uint32_t cntr_publisherIds_2;
4894         ndr_print_struct(ndr, name, "eventlog6_EvtRpcGetPublisherListForChannel");
4895         if (r == NULL) { ndr_print_null(ndr); return; }
4896         ndr->depth++;
4897         if (flags & NDR_SET_VALUES) {
4898                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4899         }
4900         if (flags & NDR_IN) {
4901                 ndr_print_struct(ndr, "in", "eventlog6_EvtRpcGetPublisherListForChannel");
4902                 ndr->depth++;
4903                 ndr_print_ptr(ndr, "channelName", r->in.channelName);
4904                 ndr->depth++;
4905                 ndr_print_uint16(ndr, "channelName", *r->in.channelName);
4906                 ndr->depth--;
4907                 ndr_print_uint32(ndr, "flags", r->in.flags);
4908                 ndr->depth--;
4909         }
4910         if (flags & NDR_OUT) {
4911                 ndr_print_struct(ndr, "out", "eventlog6_EvtRpcGetPublisherListForChannel");
4912                 ndr->depth++;
4913                 ndr_print_ptr(ndr, "numPublisherIds", r->out.numPublisherIds);
4914                 ndr->depth++;
4915                 ndr_print_uint32(ndr, "numPublisherIds", *r->out.numPublisherIds);
4916                 ndr->depth--;
4917                 ndr_print_ptr(ndr, "publisherIds", r->out.publisherIds);
4918                 ndr->depth++;
4919                 ndr_print_ptr(ndr, "publisherIds", *r->out.publisherIds);
4920                 ndr->depth++;
4921                 if (*r->out.publisherIds) {
4922                         ndr->print(ndr, "%s: ARRAY(%d)", "publisherIds", (int)*r->out.numPublisherIds);
4923                         ndr->depth++;
4924                         for (cntr_publisherIds_2=0;cntr_publisherIds_2<*r->out.numPublisherIds;cntr_publisherIds_2++) {
4925                                 ndr_print_ptr(ndr, "publisherIds", (*r->out.publisherIds)[cntr_publisherIds_2]);
4926                                 ndr->depth++;
4927                                 if ((*r->out.publisherIds)[cntr_publisherIds_2]) {
4928                                         ndr_print_string(ndr, "publisherIds", (*r->out.publisherIds)[cntr_publisherIds_2]);
4929                                 }
4930                                 ndr->depth--;
4931                         }
4932                         ndr->depth--;
4933                 }
4934                 ndr->depth--;
4935                 ndr->depth--;
4936                 ndr_print_WERROR(ndr, "result", r->out.result);
4937                 ndr->depth--;
4938         }
4939         ndr->depth--;
4940 }
4941
4942 static enum ndr_err_code ndr_push_eventlog6_EvtRpcGetPublisherMetadata(struct ndr_push *ndr, int flags, const struct eventlog6_EvtRpcGetPublisherMetadata *r)
4943 {
4944         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
4945         if (flags & NDR_IN) {
4946                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.publisherId));
4947                 if (r->in.publisherId) {
4948                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.publisherId, CH_UTF16)));
4949                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4950                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.publisherId, CH_UTF16)));
4951                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.publisherId, ndr_charset_length(r->in.publisherId, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4952                 }
4953                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.logFilePath));
4954                 if (r->in.logFilePath) {
4955                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logFilePath, CH_UTF16)));
4956                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4957                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logFilePath, CH_UTF16)));
4958                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.logFilePath, ndr_charset_length(r->in.logFilePath, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4959                 }
4960                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.locale));
4961                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
4962         }
4963         if (flags & NDR_OUT) {
4964                 if (r->out.pubMetadataProps == NULL) {
4965                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4966                 }
4967                 NDR_CHECK(ndr_push_eventlog6_EvtRpcVariantList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.pubMetadataProps));
4968                 if (r->out.pubMetadata == NULL) {
4969                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4970                 }
4971                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.pubMetadata));
4972                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4973         }
4974         return NDR_ERR_SUCCESS;
4975 }
4976
4977 static enum ndr_err_code ndr_pull_eventlog6_EvtRpcGetPublisherMetadata(struct ndr_pull *ndr, int flags, struct eventlog6_EvtRpcGetPublisherMetadata *r)
4978 {
4979         uint32_t _ptr_publisherId;
4980         uint32_t size_publisherId_1 = 0;
4981         uint32_t length_publisherId_1 = 0;
4982         uint32_t _ptr_logFilePath;
4983         uint32_t size_logFilePath_1 = 0;
4984         uint32_t length_logFilePath_1 = 0;
4985         TALLOC_CTX *_mem_save_publisherId_0;
4986         TALLOC_CTX *_mem_save_logFilePath_0;
4987         TALLOC_CTX *_mem_save_pubMetadataProps_0;
4988         TALLOC_CTX *_mem_save_pubMetadata_0;
4989         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
4990         if (flags & NDR_IN) {
4991                 ZERO_STRUCT(r->out);
4992
4993                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_publisherId));
4994                 if (_ptr_publisherId) {
4995                         NDR_PULL_ALLOC(ndr, r->in.publisherId);
4996                 } else {
4997                         r->in.publisherId = NULL;
4998                 }
4999                 if (r->in.publisherId) {
5000                         _mem_save_publisherId_0 = NDR_PULL_GET_MEM_CTX(ndr);
5001                         NDR_PULL_SET_MEM_CTX(ndr, r->in.publisherId, 0);
5002                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.publisherId));
5003                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.publisherId));
5004                         size_publisherId_1 = ndr_get_array_size(ndr, &r->in.publisherId);
5005                         if (size_publisherId_1 > MAX_RPC_PUBLISHER_ID_LENGTH) {
5006                                 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
5007                         }
5008                         length_publisherId_1 = ndr_get_array_length(ndr, &r->in.publisherId);
5009                         if (length_publisherId_1 > MAX_RPC_PUBLISHER_ID_LENGTH) {
5010                                 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
5011                         }
5012                         if (length_publisherId_1 > size_publisherId_1) {
5013                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_publisherId_1, length_publisherId_1);
5014                         }
5015                         NDR_CHECK(ndr_check_string_terminator(ndr, length_publisherId_1, sizeof(uint16_t)));
5016                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.publisherId, length_publisherId_1, sizeof(uint16_t), CH_UTF16));
5017                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_publisherId_0, 0);
5018                 }
5019                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_logFilePath));
5020                 if (_ptr_logFilePath) {
5021                         NDR_PULL_ALLOC(ndr, r->in.logFilePath);
5022                 } else {
5023                         r->in.logFilePath = NULL;
5024                 }
5025                 if (r->in.logFilePath) {
5026                         _mem_save_logFilePath_0 = NDR_PULL_GET_MEM_CTX(ndr);
5027                         NDR_PULL_SET_MEM_CTX(ndr, r->in.logFilePath, 0);
5028                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logFilePath));
5029                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logFilePath));
5030                         size_logFilePath_1 = ndr_get_array_size(ndr, &r->in.logFilePath);
5031                         if (size_logFilePath_1 > MAX_RPC_FILE_PATH_LENGTH) {
5032                                 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
5033                         }
5034                         length_logFilePath_1 = ndr_get_array_length(ndr, &r->in.logFilePath);
5035                         if (length_logFilePath_1 > MAX_RPC_FILE_PATH_LENGTH) {
5036                                 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
5037                         }
5038                         if (length_logFilePath_1 > size_logFilePath_1) {
5039                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_logFilePath_1, length_logFilePath_1);
5040                         }
5041                         NDR_CHECK(ndr_check_string_terminator(ndr, length_logFilePath_1, sizeof(uint16_t)));
5042                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logFilePath, length_logFilePath_1, sizeof(uint16_t), CH_UTF16));
5043                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_logFilePath_0, 0);
5044                 }
5045                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.locale));
5046                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
5047                 NDR_PULL_ALLOC(ndr, r->out.pubMetadataProps);
5048                 ZERO_STRUCTP(r->out.pubMetadataProps);
5049                 NDR_PULL_ALLOC(ndr, r->out.pubMetadata);
5050                 ZERO_STRUCTP(r->out.pubMetadata);
5051         }
5052         if (flags & NDR_OUT) {
5053                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5054                         NDR_PULL_ALLOC(ndr, r->out.pubMetadataProps);
5055                 }
5056                 _mem_save_pubMetadataProps_0 = NDR_PULL_GET_MEM_CTX(ndr);
5057                 NDR_PULL_SET_MEM_CTX(ndr, r->out.pubMetadataProps, LIBNDR_FLAG_REF_ALLOC);
5058                 NDR_CHECK(ndr_pull_eventlog6_EvtRpcVariantList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.pubMetadataProps));
5059                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pubMetadataProps_0, LIBNDR_FLAG_REF_ALLOC);
5060                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5061                         NDR_PULL_ALLOC(ndr, r->out.pubMetadata);
5062                 }
5063                 _mem_save_pubMetadata_0 = NDR_PULL_GET_MEM_CTX(ndr);
5064                 NDR_PULL_SET_MEM_CTX(ndr, r->out.pubMetadata, LIBNDR_FLAG_REF_ALLOC);
5065                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.pubMetadata));
5066                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pubMetadata_0, LIBNDR_FLAG_REF_ALLOC);
5067                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5068         }
5069         return NDR_ERR_SUCCESS;
5070 }
5071
5072 _PUBLIC_ void ndr_print_eventlog6_EvtRpcGetPublisherMetadata(struct ndr_print *ndr, const char *name, int flags, const struct eventlog6_EvtRpcGetPublisherMetadata *r)
5073 {
5074         ndr_print_struct(ndr, name, "eventlog6_EvtRpcGetPublisherMetadata");
5075         if (r == NULL) { ndr_print_null(ndr); return; }
5076         ndr->depth++;
5077         if (flags & NDR_SET_VALUES) {
5078                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5079         }
5080         if (flags & NDR_IN) {
5081                 ndr_print_struct(ndr, "in", "eventlog6_EvtRpcGetPublisherMetadata");
5082                 ndr->depth++;
5083                 ndr_print_ptr(ndr, "publisherId", r->in.publisherId);
5084                 ndr->depth++;
5085                 if (r->in.publisherId) {
5086                         ndr_print_string(ndr, "publisherId", r->in.publisherId);
5087                 }
5088                 ndr->depth--;
5089                 ndr_print_ptr(ndr, "logFilePath", r->in.logFilePath);
5090                 ndr->depth++;
5091                 if (r->in.logFilePath) {
5092                         ndr_print_string(ndr, "logFilePath", r->in.logFilePath);
5093                 }
5094                 ndr->depth--;
5095                 ndr_print_uint32(ndr, "locale", r->in.locale);
5096                 ndr_print_uint32(ndr, "flags", r->in.flags);
5097                 ndr->depth--;
5098         }
5099         if (flags & NDR_OUT) {
5100                 ndr_print_struct(ndr, "out", "eventlog6_EvtRpcGetPublisherMetadata");
5101                 ndr->depth++;
5102                 ndr_print_ptr(ndr, "pubMetadataProps", r->out.pubMetadataProps);
5103                 ndr->depth++;
5104                 ndr_print_eventlog6_EvtRpcVariantList(ndr, "pubMetadataProps", r->out.pubMetadataProps);
5105                 ndr->depth--;
5106                 ndr_print_ptr(ndr, "pubMetadata", r->out.pubMetadata);
5107                 ndr->depth++;
5108                 ndr_print_policy_handle(ndr, "pubMetadata", r->out.pubMetadata);
5109                 ndr->depth--;
5110                 ndr_print_WERROR(ndr, "result", r->out.result);
5111                 ndr->depth--;
5112         }
5113         ndr->depth--;
5114 }
5115
5116 static enum ndr_err_code ndr_push_eventlog6_EvtRpcGetPublisherResourceMetadata(struct ndr_push *ndr, int flags, const struct eventlog6_EvtRpcGetPublisherResourceMetadata *r)
5117 {
5118         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
5119         if (flags & NDR_IN) {
5120                 if (r->in.handle == NULL) {
5121                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5122                 }
5123                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5124                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.propertyId));
5125                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
5126         }
5127         if (flags & NDR_OUT) {
5128                 if (r->out.pubMetadataProps == NULL) {
5129                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5130                 }
5131                 NDR_CHECK(ndr_push_eventlog6_EvtRpcVariantList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.pubMetadataProps));
5132                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5133         }
5134         return NDR_ERR_SUCCESS;
5135 }
5136
5137 static enum ndr_err_code ndr_pull_eventlog6_EvtRpcGetPublisherResourceMetadata(struct ndr_pull *ndr, int flags, struct eventlog6_EvtRpcGetPublisherResourceMetadata *r)
5138 {
5139         TALLOC_CTX *_mem_save_handle_0;
5140         TALLOC_CTX *_mem_save_pubMetadataProps_0;
5141         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
5142         if (flags & NDR_IN) {
5143                 ZERO_STRUCT(r->out);
5144
5145                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5146                         NDR_PULL_ALLOC(ndr, r->in.handle);
5147                 }
5148                 _mem_save_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
5149                 NDR_PULL_SET_MEM_CTX(ndr, r->in.handle, LIBNDR_FLAG_REF_ALLOC);
5150                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.handle));
5151                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_handle_0, LIBNDR_FLAG_REF_ALLOC);
5152                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.propertyId));
5153                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
5154                 NDR_PULL_ALLOC(ndr, r->out.pubMetadataProps);
5155                 ZERO_STRUCTP(r->out.pubMetadataProps);
5156         }
5157         if (flags & NDR_OUT) {
5158                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5159                         NDR_PULL_ALLOC(ndr, r->out.pubMetadataProps);
5160                 }
5161                 _mem_save_pubMetadataProps_0 = NDR_PULL_GET_MEM_CTX(ndr);
5162                 NDR_PULL_SET_MEM_CTX(ndr, r->out.pubMetadataProps, LIBNDR_FLAG_REF_ALLOC);
5163                 NDR_CHECK(ndr_pull_eventlog6_EvtRpcVariantList(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.pubMetadataProps));
5164                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pubMetadataProps_0, LIBNDR_FLAG_REF_ALLOC);
5165                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5166         }
5167         return NDR_ERR_SUCCESS;
5168 }
5169
5170 _PUBLIC_ void ndr_print_eventlog6_EvtRpcGetPublisherResourceMetadata(struct ndr_print *ndr, const char *name, int flags, const struct eventlog6_EvtRpcGetPublisherResourceMetadata *r)
5171 {
5172         ndr_print_struct(ndr, name, "eventlog6_EvtRpcGetPublisherResourceMetadata");
5173         if (r == NULL) { ndr_print_null(ndr); return; }
5174         ndr->depth++;
5175         if (flags & NDR_SET_VALUES) {
5176                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5177         }
5178         if (flags & NDR_IN) {
5179                 ndr_print_struct(ndr, "in", "eventlog6_EvtRpcGetPublisherResourceMetadata");
5180                 ndr->depth++;
5181                 ndr_print_ptr(ndr, "handle", r->in.handle);
5182                 ndr->depth++;
5183                 ndr_print_policy_handle(ndr, "handle", r->in.handle);
5184                 ndr->depth--;
5185                 ndr_print_uint32(ndr, "propertyId", r->in.propertyId);
5186                 ndr_print_uint32(ndr, "flags", r->in.flags);
5187                 ndr->depth--;
5188         }
5189         if (flags & NDR_OUT) {
5190                 ndr_print_struct(ndr, "out", "eventlog6_EvtRpcGetPublisherResourceMetadata");
5191                 ndr->depth++;
5192                 ndr_print_ptr(ndr, "pubMetadataProps", r->out.pubMetadataProps);
5193                 ndr->depth++;
5194                 ndr_print_eventlog6_EvtRpcVariantList(ndr, "pubMetadataProps", r->out.pubMetadataProps);
5195                 ndr->depth--;
5196                 ndr_print_WERROR(ndr, "result", r->out.result);
5197                 ndr->depth--;
5198         }
5199         ndr->depth--;
5200 }
5201
5202 static enum ndr_err_code ndr_push_eventlog6_EvtRpcGetEventMetadataEnum(struct ndr_push *ndr, int flags, const struct eventlog6_EvtRpcGetEventMetadataEnum *r)
5203 {
5204         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
5205         if (flags & NDR_IN) {
5206                 if (r->in.pubMetadata == NULL) {
5207                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5208                 }
5209                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.pubMetadata));
5210                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
5211                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.reservedForFilter));
5212                 if (r->in.reservedForFilter) {
5213                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.reservedForFilter, CH_UTF16)));
5214                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5215                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.reservedForFilter, CH_UTF16)));
5216                         NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.reservedForFilter, ndr_charset_length(r->in.reservedForFilter, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5217                 }
5218         }
5219         if (flags & NDR_OUT) {
5220                 if (r->out.eventMetaDataEnum == NULL) {
5221                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5222                 }
5223                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.eventMetaDataEnum));
5224                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5225         }
5226         return NDR_ERR_SUCCESS;
5227 }
5228
5229 static enum ndr_err_code ndr_pull_eventlog6_EvtRpcGetEventMetadataEnum(struct ndr_pull *ndr, int flags, struct eventlog6_EvtRpcGetEventMetadataEnum *r)
5230 {
5231         uint32_t _ptr_reservedForFilter;
5232         uint32_t size_reservedForFilter_1 = 0;
5233         uint32_t length_reservedForFilter_1 = 0;
5234         TALLOC_CTX *_mem_save_pubMetadata_0;
5235         TALLOC_CTX *_mem_save_reservedForFilter_0;
5236         TALLOC_CTX *_mem_save_eventMetaDataEnum_0;
5237         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
5238         if (flags & NDR_IN) {
5239                 ZERO_STRUCT(r->out);
5240
5241                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5242                         NDR_PULL_ALLOC(ndr, r->in.pubMetadata);
5243                 }
5244                 _mem_save_pubMetadata_0 = NDR_PULL_GET_MEM_CTX(ndr);
5245                 NDR_PULL_SET_MEM_CTX(ndr, r->in.pubMetadata, LIBNDR_FLAG_REF_ALLOC);
5246                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.pubMetadata));
5247                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pubMetadata_0, LIBNDR_FLAG_REF_ALLOC);
5248                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
5249                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_reservedForFilter));
5250                 if (_ptr_reservedForFilter) {
5251                         NDR_PULL_ALLOC(ndr, r->in.reservedForFilter);
5252                 } else {
5253                         r->in.reservedForFilter = NULL;
5254                 }
5255                 if (r->in.reservedForFilter) {
5256                         _mem_save_reservedForFilter_0 = NDR_PULL_GET_MEM_CTX(ndr);
5257                         NDR_PULL_SET_MEM_CTX(ndr, r->in.reservedForFilter, 0);
5258                         NDR_CHECK(ndr_pull_array_size(ndr, &r->in.reservedForFilter));
5259                         NDR_CHECK(ndr_pull_array_length(ndr, &r->in.reservedForFilter));
5260                         size_reservedForFilter_1 = ndr_get_array_size(ndr, &r->in.reservedForFilter);
5261                         if (size_reservedForFilter_1 > MAX_RPC_FILTER_LENGTH) {
5262                                 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
5263                         }
5264                         length_reservedForFilter_1 = ndr_get_array_length(ndr, &r->in.reservedForFilter);
5265                         if (length_reservedForFilter_1 > MAX_RPC_FILTER_LENGTH) {
5266                                 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
5267                         }
5268                         if (length_reservedForFilter_1 > size_reservedForFilter_1) {
5269                                 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_reservedForFilter_1, length_reservedForFilter_1);
5270                         }
5271                         NDR_CHECK(ndr_check_string_terminator(ndr, length_reservedForFilter_1, sizeof(uint16_t)));
5272                         NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.reservedForFilter, length_reservedForFilter_1, sizeof(uint16_t), CH_UTF16));
5273                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_reservedForFilter_0, 0);
5274                 }
5275                 NDR_PULL_ALLOC(ndr, r->out.eventMetaDataEnum);
5276                 ZERO_STRUCTP(r->out.eventMetaDataEnum);
5277         }
5278         if (flags & NDR_OUT) {
5279                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5280                         NDR_PULL_ALLOC(ndr, r->out.eventMetaDataEnum);
5281                 }
5282                 _mem_save_eventMetaDataEnum_0 = NDR_PULL_GET_MEM_CTX(ndr);
5283                 NDR_PULL_SET_MEM_CTX(ndr, r->out.eventMetaDataEnum, LIBNDR_FLAG_REF_ALLOC);
5284                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.eventMetaDataEnum));
5285                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_eventMetaDataEnum_0, LIBNDR_FLAG_REF_ALLOC);
5286                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5287         }
5288         return NDR_ERR_SUCCESS;
5289 }
5290
5291 _PUBLIC_ void ndr_print_eventlog6_EvtRpcGetEventMetadataEnum(struct ndr_print *ndr, const char *name, int flags, const struct eventlog6_EvtRpcGetEventMetadataEnum *r)
5292 {
5293         ndr_print_struct(ndr, name, "eventlog6_EvtRpcGetEventMetadataEnum");
5294         if (r == NULL) { ndr_print_null(ndr); return; }
5295         ndr->depth++;
5296         if (flags & NDR_SET_VALUES) {
5297                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5298         }
5299         if (flags & NDR_IN) {
5300                 ndr_print_struct(ndr, "in", "eventlog6_EvtRpcGetEventMetadataEnum");
5301                 ndr->depth++;
5302                 ndr_print_ptr(ndr, "pubMetadata", r->in.pubMetadata);
5303                 ndr->depth++;
5304                 ndr_print_policy_handle(ndr, "pubMetadata", r->in.pubMetadata);
5305                 ndr->depth--;
5306                 ndr_print_uint32(ndr, "flags", r->in.flags);
5307                 ndr_print_ptr(ndr, "reservedForFilter", r->in.reservedForFilter);
5308                 ndr->depth++;
5309                 if (r->in.reservedForFilter) {
5310                         ndr_print_string(ndr, "reservedForFilter", r->in.reservedForFilter);
5311                 }
5312                 ndr->depth--;
5313                 ndr->depth--;
5314         }
5315         if (flags & NDR_OUT) {
5316                 ndr_print_struct(ndr, "out", "eventlog6_EvtRpcGetEventMetadataEnum");
5317                 ndr->depth++;
5318                 ndr_print_ptr(ndr, "eventMetaDataEnum", r->out.eventMetaDataEnum);
5319                 ndr->depth++;
5320                 ndr_print_policy_handle(ndr, "eventMetaDataEnum", r->out.eventMetaDataEnum);
5321                 ndr->depth--;
5322                 ndr_print_WERROR(ndr, "result", r->out.result);
5323                 ndr->depth--;
5324         }
5325         ndr->depth--;
5326 }
5327
5328 static enum ndr_err_code ndr_push_eventlog6_EvtRpcGetNextEventMetadata(struct ndr_push *ndr, int flags, const struct eventlog6_EvtRpcGetNextEventMetadata *r)
5329 {
5330         uint32_t cntr_eventMetadataInstances_2;
5331         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
5332         if (flags & NDR_IN) {
5333                 if (r->in.eventMetaDataEnum == NULL) {
5334                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5335                 }
5336                 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.eventMetaDataEnum));
5337                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
5338                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.numRequested));
5339         }
5340         if (flags & NDR_OUT) {
5341                 if (r->out.numReturned == NULL) {
5342                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5343                 }
5344                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.numReturned));
5345                 if (r->out.eventMetadataInstances == NULL) {
5346                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5347                 }
5348                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.eventMetadataInstances));
5349                 if (*r->out.eventMetadataInstances) {
5350                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, *r->out.numReturned));
5351                         for (cntr_eventMetadataInstances_2 = 0; cntr_eventMetadataInstances_2 < *r->out.numReturned; cntr_eventMetadataInstances_2++) {
5352                                 NDR_CHECK(ndr_push_eventlog6_EvtRpcVariantList(ndr, NDR_SCALARS, &(*r->out.eventMetadataInstances)[cntr_eventMetadataInstances_2]));
5353                         }
5354                         for (cntr_eventMetadataInstances_2 = 0; cntr_eventMetadataInstances_2 < *r->out.numReturned; cntr_eventMetadataInstances_2++) {
5355                                 NDR_CHECK(ndr_push_eventlog6_EvtRpcVariantList(ndr, NDR_BUFFERS, &(*r->out.eventMetadataInstances)[cntr_eventMetadataInstances_2]));
5356                         }
5357                 }
5358                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5359         }
5360         return NDR_ERR_SUCCESS;
5361 }
5362
5363 static enum ndr_err_code ndr_pull_eventlog6_EvtRpcGetNextEventMetadata(struct ndr_pull *ndr, int flags, struct eventlog6_EvtRpcGetNextEventMetadata *r)
5364 {
5365         uint32_t _ptr_eventMetadataInstances;
5366         uint32_t size_eventMetadataInstances_2 = 0;
5367         uint32_t cntr_eventMetadataInstances_2;
5368         TALLOC_CTX *_mem_save_eventMetaDataEnum_0;
5369         TALLOC_CTX *_mem_save_numReturned_0;
5370         TALLOC_CTX *_mem_save_eventMetadataInstances_0;
5371         TALLOC_CTX *_mem_save_eventMetadataInstances_1;
5372         TALLOC_CTX *_mem_save_eventMetadataInstances_2;
5373         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
5374         if (flags & NDR_IN) {
5375                 ZERO_STRUCT(r->out);
5376
5377                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5378                         NDR_PULL_ALLOC(ndr, r->in.eventMetaDataEnum);
5379                 }
5380                 _mem_save_eventMetaDataEnum_0 = NDR_PULL_GET_MEM_CTX(ndr);
5381                 NDR_PULL_SET_MEM_CTX(ndr, r->in.eventMetaDataEnum, LIBNDR_FLAG_REF_ALLOC);
5382                 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.eventMetaDataEnum));
5383                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_eventMetaDataEnum_0, LIBNDR_FLAG_REF_ALLOC);
5384                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
5385                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.numRequested));
5386                 NDR_PULL_ALLOC(ndr, r->out.numReturned);
5387                 ZERO_STRUCTP(r->out.numReturned);
5388                 NDR_PULL_ALLOC(ndr, r->out.eventMetadataInstances);
5389                 ZERO_STRUCTP(r->out.eventMetadataInstances);
5390         }
5391         if (flags & NDR_OUT) {
5392                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5393                         NDR_PULL_ALLOC(ndr, r->out.numReturned);
5394                 }
5395                 _mem_save_numReturned_0 = NDR_PULL_GET_MEM_CTX(ndr);
5396                 NDR_PULL_SET_MEM_CTX(ndr, r->out.numReturned, LIBNDR_FLAG_REF_ALLOC);
5397                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.numReturned));
5398                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_numReturned_0, LIBNDR_FLAG_REF_ALLOC);
5399                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5400                         NDR_PULL_ALLOC(ndr, r->out.eventMetadataInstances);
5401                 }
5402                 _mem_save_eventMetadataInstances_0 = NDR_PULL_GET_MEM_CTX(ndr);
5403                 NDR_PULL_SET_MEM_CTX(ndr, r->out.eventMetadataInstances, LIBNDR_FLAG_REF_ALLOC);
5404                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_eventMetadataInstances));
5405                 if (_ptr_eventMetadataInstances) {
5406                         NDR_PULL_ALLOC(ndr, *r->out.eventMetadataInstances);
5407                 } else {
5408                         *r->out.eventMetadataInstances = NULL;
5409                 }
5410                 if (*r->out.eventMetadataInstances) {
5411                         _mem_save_eventMetadataInstances_1 = NDR_PULL_GET_MEM_CTX(ndr);
5412                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.eventMetadataInstances, 0);
5413                         NDR_CHECK(ndr_pull_array_size(ndr, r->out.eventMetadataInstances));
5414                         size_eventMetadataInstances_2 = ndr_get_array_size(ndr, r->out.eventMetadataInstances);
5415                         if (size_eventMetadataInstances_2 > MAX_RPC_EVENT_METADATA_COUNT) {
5416                                 return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
5417                         }
5418                         NDR_PULL_ALLOC_N(ndr, *r->out.eventMetadataInstances, size_eventMetadataInstances_2);
5419                         _mem_save_eventMetadataInstances_2 = NDR_PULL_GET_MEM_CTX(ndr);
5420                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.eventMetadataInstances, 0);
5421                         for (cntr_eventMetadataInstances_2 = 0; cntr_eventMetadataInstances_2 < size_eventMetadataInstances_2; cntr_eventMetadataInstances_2++) {
5422                                 NDR_CHECK(ndr_pull_eventlog6_EvtRpcVariantList(ndr, NDR_SCALARS, &(*r->out.eventMetadataInstances)[cntr_eventMetadataInstances_2]));
5423                         }
5424                         for (cntr_eventMetadataInstances_2 = 0; cntr_eventMetadataInstances_2 < size_eventMetadataInstances_2; cntr_eventMetadataInstances_2++) {
5425                                 NDR_CHECK(ndr_pull_eventlog6_EvtRpcVariantList(ndr, NDR_BUFFERS, &(*r->out.eventMetadataInstances)[cntr_eventMetadataInstances_2]));
5426                         }
5427                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_eventMetadataInstances_2, 0);
5428                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_eventMetadataInstances_1, 0);
5429                 }
5430                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_eventMetadataInstances_0, LIBNDR_FLAG_REF_ALLOC);
5431                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5432                 if (*r->out.eventMetadataInstances) {
5433                         NDR_CHECK(ndr_check_array_size(ndr, (void*)r->out.eventMetadataInstances, *r->out.numReturned));
5434                 }
5435         }
5436         return NDR_ERR_SUCCESS;
5437 }
5438
5439 _PUBLIC_ void ndr_print_eventlog6_EvtRpcGetNextEventMetadata(struct ndr_print *ndr, const char *name, int flags, const struct eventlog6_EvtRpcGetNextEventMetadata *r)
5440 {
5441         uint32_t cntr_eventMetadataInstances_2;
5442         ndr_print_struct(ndr, name, "eventlog6_EvtRpcGetNextEventMetadata");
5443         if (r == NULL) { ndr_print_null(ndr); return; }
5444         ndr->depth++;
5445         if (flags & NDR_SET_VALUES) {
5446                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5447         }
5448         if (flags & NDR_IN) {
5449                 ndr_print_struct(ndr, "in", "eventlog6_EvtRpcGetNextEventMetadata");
5450                 ndr->depth++;
5451                 ndr_print_ptr(ndr, "eventMetaDataEnum", r->in.eventMetaDataEnum);
5452                 ndr->depth++;
5453                 ndr_print_policy_handle(ndr, "eventMetaDataEnum", r->in.eventMetaDataEnum);
5454                 ndr->depth--;
5455                 ndr_print_uint32(ndr, "flags", r->in.flags);
5456                 ndr_print_uint32(ndr, "numRequested", r->in.numRequested);
5457                 ndr->depth--;
5458         }
5459         if (flags & NDR_OUT) {
5460                 ndr_print_struct(ndr, "out", "eventlog6_EvtRpcGetNextEventMetadata");
5461                 ndr->depth++;
5462                 ndr_print_ptr(ndr, "numReturned", r->out.numReturned);
5463                 ndr->depth++;
5464                 ndr_print_uint32(ndr, "numReturned", *r->out.numReturned);
5465                 ndr->depth--;
5466                 ndr_print_ptr(ndr, "eventMetadataInstances", r->out.eventMetadataInstances);
5467                 ndr->depth++;
5468                 ndr_print_ptr(ndr, "eventMetadataInstances", *r->out.eventMetadataInstances);
5469                 ndr->depth++;
5470                 if (*r->out.eventMetadataInstances) {
5471                         ndr->print(ndr, "%s: ARRAY(%d)", "eventMetadataInstances", (int)*r->out.numReturned);
5472                         ndr->depth++;
5473                         for (cntr_eventMetadataInstances_2=0;cntr_eventMetadataInstances_2<*r->out.numReturned;cntr_eventMetadataInstances_2++) {
5474                                 ndr_print_eventlog6_EvtRpcVariantList(ndr, "eventMetadataInstances", &(*r->out.eventMetadataInstances)[cntr_eventMetadataInstances_2]);
5475                         }
5476                         ndr->depth--;
5477                 }
5478                 ndr->depth--;
5479                 ndr->depth--;
5480                 ndr_print_WERROR(ndr, "result", r->out.result);
5481                 ndr->depth--;
5482         }
5483         ndr->depth--;
5484 }
5485
5486 static enum ndr_err_code ndr_push_eventlog6_EvtRpcGetClassicLogDisplayName(struct ndr_push *ndr, int flags, const struct eventlog6_EvtRpcGetClassicLogDisplayName *r)
5487 {
5488         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
5489         if (flags & NDR_IN) {
5490                 if (r->in.logName == NULL) {
5491                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5492                 }
5493                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logName, CH_UTF16)));
5494                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5495                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.logName, CH_UTF16)));
5496                 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.logName, ndr_charset_length(r->in.logName, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5497                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.locale));
5498                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
5499         }
5500         if (flags & NDR_OUT) {
5501                 if (r->out.displayName == NULL) {
5502                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5503                 }
5504                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.displayName));
5505                 if (*r->out.displayName) {
5506                         NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, **r->out.displayName));
5507                 }
5508                 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5509         }
5510         return NDR_ERR_SUCCESS;
5511 }
5512
5513 static enum ndr_err_code ndr_pull_eventlog6_EvtRpcGetClassicLogDisplayName(struct ndr_pull *ndr, int flags, struct eventlog6_EvtRpcGetClassicLogDisplayName *r)
5514 {
5515         uint32_t size_logName_1 = 0;
5516         uint32_t length_logName_1 = 0;
5517         uint32_t _ptr_displayName;
5518         TALLOC_CTX *_mem_save_displayName_0;
5519         TALLOC_CTX *_mem_save_displayName_1;
5520         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
5521         if (flags & NDR_IN) {
5522                 ZERO_STRUCT(r->out);
5523
5524                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.logName));
5525                 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.logName));
5526                 size_logName_1 = ndr_get_array_size(ndr, &r->in.logName);
5527                 if (size_logName_1 < 1 || size_logName_1 > MAX_RPC_CHANNEL_NAME_LENGTH) {
5528                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
5529                 }
5530                 length_logName_1 = ndr_get_array_length(ndr, &r->in.logName);
5531                 if (length_logName_1 < 1 || length_logName_1 > MAX_RPC_CHANNEL_NAME_LENGTH) {
5532                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value out of range");
5533                 }
5534                 if (length_logName_1 > size_logName_1) {
5535                         return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_logName_1, length_logName_1);
5536                 }
5537                 NDR_CHECK(ndr_check_string_terminator(ndr, length_logName_1, sizeof(uint16_t)));
5538                 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.logName, length_logName_1, sizeof(uint16_t), CH_UTF16));
5539                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.locale));
5540                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
5541                 NDR_PULL_ALLOC(ndr, r->out.displayName);
5542                 ZERO_STRUCTP(r->out.displayName);
5543         }
5544         if (flags & NDR_OUT) {
5545                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5546                         NDR_PULL_ALLOC(ndr, r->out.displayName);
5547                 }
5548                 _mem_save_displayName_0 = NDR_PULL_GET_MEM_CTX(ndr);
5549                 NDR_PULL_SET_MEM_CTX(ndr, r->out.displayName, LIBNDR_FLAG_REF_ALLOC);
5550                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_displayName));
5551                 if (_ptr_displayName) {
5552                         NDR_PULL_ALLOC(ndr, *r->out.displayName);
5553                 } else {
5554                         *r->out.displayName = NULL;
5555                 }
5556                 if (*r->out.displayName) {
5557                         _mem_save_displayName_1 = NDR_PULL_GET_MEM_CTX(ndr);
5558                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.displayName, 0);
5559                         NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, *r->out.displayName));
5560                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_displayName_1, 0);
5561                 }
5562                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_displayName_0, LIBNDR_FLAG_REF_ALLOC);
5563                 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5564         }
5565         return NDR_ERR_SUCCESS;
5566 }
5567
5568 _PUBLIC_ void ndr_print_eventlog6_EvtRpcGetClassicLogDisplayName(struct ndr_print *ndr, const char *name, int flags, const struct eventlog6_EvtRpcGetClassicLogDisplayName *r)
5569 {
5570         ndr_print_struct(ndr, name, "eventlog6_EvtRpcGetClassicLogDisplayName");
5571         if (r == NULL) { ndr_print_null(ndr); return; }
5572         ndr->depth++;
5573         if (flags & NDR_SET_VALUES) {
5574                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5575         }
5576         if (flags & NDR_IN) {
5577                 ndr_print_struct(ndr, "in", "eventlog6_EvtRpcGetClassicLogDisplayName");
5578                 ndr->depth++;
5579                 ndr_print_ptr(ndr, "logName", r->in.logName);
5580                 ndr->depth++;
5581                 ndr_print_string(ndr, "logName", r->in.logName);
5582                 ndr->depth--;
5583                 ndr_print_uint32(ndr, "locale", r->in.locale);
5584                 ndr_print_uint32(ndr, "flags", r->in.flags);
5585                 ndr->depth--;
5586         }
5587         if (flags & NDR_OUT) {
5588                 ndr_print_struct(ndr, "out", "eventlog6_EvtRpcGetClassicLogDisplayName");
5589                 ndr->depth++;
5590                 ndr_print_ptr(ndr, "displayName", r->out.displayName);
5591                 ndr->depth++;
5592                 ndr_print_ptr(ndr, "displayName", *r->out.displayName);
5593                 ndr->depth++;
5594                 if (*r->out.displayName) {
5595                         ndr_print_uint16(ndr, "displayName", **r->out.displayName);
5596                 }
5597                 ndr->depth--;
5598                 ndr->depth--;
5599                 ndr_print_WERROR(ndr, "result", r->out.result);
5600                 ndr->depth--;
5601         }
5602         ndr->depth--;
5603 }
5604
5605 static const struct ndr_interface_call eventlog6_calls[] = {
5606         {
5607                 "eventlog6_EvtRpcRegisterRemoteSubscription",
5608                 sizeof(struct eventlog6_EvtRpcRegisterRemoteSubscription),
5609                 (ndr_push_flags_fn_t) ndr_push_eventlog6_EvtRpcRegisterRemoteSubscription,
5610                 (ndr_pull_flags_fn_t) ndr_pull_eventlog6_EvtRpcRegisterRemoteSubscription,
5611                 (ndr_print_function_t) ndr_print_eventlog6_EvtRpcRegisterRemoteSubscription,
5612                 { 0, NULL },
5613                 { 0, NULL },
5614         },
5615         {
5616                 "eventlog6_EvtRpcRemoteSubscriptionNextAsync",
5617                 sizeof(struct eventlog6_EvtRpcRemoteSubscriptionNextAsync),
5618                 (ndr_push_flags_fn_t) ndr_push_eventlog6_EvtRpcRemoteSubscriptionNextAsync,
5619                 (ndr_pull_flags_fn_t) ndr_pull_eventlog6_EvtRpcRemoteSubscriptionNextAsync,
5620                 (ndr_print_function_t) ndr_print_eventlog6_EvtRpcRemoteSubscriptionNextAsync,
5621                 { 0, NULL },
5622                 { 0, NULL },
5623         },
5624         {
5625                 "eventlog6_EvtRpcRemoteSubscriptionNext",
5626                 sizeof(struct eventlog6_EvtRpcRemoteSubscriptionNext),
5627                 (ndr_push_flags_fn_t) ndr_push_eventlog6_EvtRpcRemoteSubscriptionNext,
5628                 (ndr_pull_flags_fn_t) ndr_pull_eventlog6_EvtRpcRemoteSubscriptionNext,
5629                 (ndr_print_function_t) ndr_print_eventlog6_EvtRpcRemoteSubscriptionNext,
5630                 { 0, NULL },
5631                 { 0, NULL },
5632         },
5633         {
5634                 "eventlog6_EvtRpcRemoteSubscriptionWaitAsync",
5635                 sizeof(struct eventlog6_EvtRpcRemoteSubscriptionWaitAsync),
5636                 (ndr_push_flags_fn_t) ndr_push_eventlog6_EvtRpcRemoteSubscriptionWaitAsync,
5637                 (ndr_pull_flags_fn_t) ndr_pull_eventlog6_EvtRpcRemoteSubscriptionWaitAsync,
5638                 (ndr_print_function_t) ndr_print_eventlog6_EvtRpcRemoteSubscriptionWaitAsync,
5639                 { 0, NULL },
5640                 { 0, NULL },
5641         },
5642         {
5643                 "eventlog6_EvtRpcRegisterControllableOperation",
5644                 sizeof(struct eventlog6_EvtRpcRegisterControllableOperation),
5645                 (ndr_push_flags_fn_t) ndr_push_eventlog6_EvtRpcRegisterControllableOperation,
5646                 (ndr_pull_flags_fn_t) ndr_pull_eventlog6_EvtRpcRegisterControllableOperation,
5647                 (ndr_print_function_t) ndr_print_eventlog6_EvtRpcRegisterControllableOperation,
5648                 { 0, NULL },
5649                 { 0, NULL },
5650         },
5651         {
5652                 "eventlog6_EvtRpcRegisterLogQuery",
5653                 sizeof(struct eventlog6_EvtRpcRegisterLogQuery),
5654                 (ndr_push_flags_fn_t) ndr_push_eventlog6_EvtRpcRegisterLogQuery,
5655                 (ndr_pull_flags_fn_t) ndr_pull_eventlog6_EvtRpcRegisterLogQuery,
5656                 (ndr_print_function_t) ndr_print_eventlog6_EvtRpcRegisterLogQuery,
5657                 { 0, NULL },
5658                 { 0, NULL },
5659         },
5660         {
5661                 "eventlog6_EvtRpcClearLog",
5662                 sizeof(struct eventlog6_EvtRpcClearLog),
5663                 (ndr_push_flags_fn_t) ndr_push_eventlog6_EvtRpcClearLog,
5664                 (ndr_pull_flags_fn_t) ndr_pull_eventlog6_EvtRpcClearLog,
5665                 (ndr_print_function_t) ndr_print_eventlog6_EvtRpcClearLog,
5666                 { 0, NULL },
5667                 { 0, NULL },
5668         },
5669         {
5670                 "eventlog6_EvtRpcExportLog",
5671                 sizeof(struct eventlog6_EvtRpcExportLog),
5672                 (ndr_push_flags_fn_t) ndr_push_eventlog6_EvtRpcExportLog,
5673                 (ndr_pull_flags_fn_t) ndr_pull_eventlog6_EvtRpcExportLog,
5674                 (ndr_print_function_t) ndr_print_eventlog6_EvtRpcExportLog,
5675                 { 0, NULL },
5676                 { 0, NULL },
5677         },
5678         {
5679                 "eventlog6_EvtRpcLocalizeExportLog",
5680                 sizeof(struct eventlog6_EvtRpcLocalizeExportLog),
5681                 (ndr_push_flags_fn_t) ndr_push_eventlog6_EvtRpcLocalizeExportLog,
5682                 (ndr_pull_flags_fn_t) ndr_pull_eventlog6_EvtRpcLocalizeExportLog,
5683                 (ndr_print_function_t) ndr_print_eventlog6_EvtRpcLocalizeExportLog,
5684                 { 0, NULL },
5685                 { 0, NULL },
5686         },
5687         {
5688                 "eventlog6_EvtRpcMessageRender",
5689                 sizeof(struct eventlog6_EvtRpcMessageRender),
5690                 (ndr_push_flags_fn_t) ndr_push_eventlog6_EvtRpcMessageRender,
5691                 (ndr_pull_flags_fn_t) ndr_pull_eventlog6_EvtRpcMessageRender,
5692                 (ndr_print_function_t) ndr_print_eventlog6_EvtRpcMessageRender,
5693                 { 0, NULL },
5694                 { 0, NULL },
5695         },
5696         {
5697                 "eventlog6_EvtRpcMessageRenderDefault",
5698                 sizeof(struct eventlog6_EvtRpcMessageRenderDefault),
5699                 (ndr_push_flags_fn_t) ndr_push_eventlog6_EvtRpcMessageRenderDefault,
5700                 (ndr_pull_flags_fn_t) ndr_pull_eventlog6_EvtRpcMessageRenderDefault,
5701                 (ndr_print_function_t) ndr_print_eventlog6_EvtRpcMessageRenderDefault,
5702                 { 0, NULL },
5703                 { 0, NULL },
5704         },
5705         {
5706                 "eventlog6_EvtRpcQueryNext",
5707                 sizeof(struct eventlog6_EvtRpcQueryNext),
5708                 (ndr_push_flags_fn_t) ndr_push_eventlog6_EvtRpcQueryNext,
5709                 (ndr_pull_flags_fn_t) ndr_pull_eventlog6_EvtRpcQueryNext,
5710                 (ndr_print_function_t) ndr_print_eventlog6_EvtRpcQueryNext,
5711                 { 0, NULL },
5712                 { 0, NULL },
5713         },
5714         {
5715                 "eventlog6_EvtRpcQuerySeek",
5716                 sizeof(struct eventlog6_EvtRpcQuerySeek),
5717                 (ndr_push_flags_fn_t) ndr_push_eventlog6_EvtRpcQuerySeek,
5718                 (ndr_pull_flags_fn_t) ndr_pull_eventlog6_EvtRpcQuerySeek,
5719                 (ndr_print_function_t) ndr_print_eventlog6_EvtRpcQuerySeek,
5720                 { 0, NULL },
5721                 { 0, NULL },
5722         },
5723         {
5724                 "eventlog6_EvtRpcClose",
5725                 sizeof(struct eventlog6_EvtRpcClose),
5726                 (ndr_push_flags_fn_t) ndr_push_eventlog6_EvtRpcClose,
5727                 (ndr_pull_flags_fn_t) ndr_pull_eventlog6_EvtRpcClose,
5728                 (ndr_print_function_t) ndr_print_eventlog6_EvtRpcClose,
5729                 { 0, NULL },
5730                 { 0, NULL },
5731         },
5732         {
5733                 "eventlog6_EvtRpcCancel",
5734                 sizeof(struct eventlog6_EvtRpcCancel),
5735                 (ndr_push_flags_fn_t) ndr_push_eventlog6_EvtRpcCancel,
5736                 (ndr_pull_flags_fn_t) ndr_pull_eventlog6_EvtRpcCancel,
5737                 (ndr_print_function_t) ndr_print_eventlog6_EvtRpcCancel,
5738                 { 0, NULL },
5739                 { 0, NULL },
5740         },
5741         {
5742                 "eventlog6_EvtRpcAssertConfig",
5743                 sizeof(struct eventlog6_EvtRpcAssertConfig),
5744                 (ndr_push_flags_fn_t) ndr_push_eventlog6_EvtRpcAssertConfig,
5745                 (ndr_pull_flags_fn_t) ndr_pull_eventlog6_EvtRpcAssertConfig,
5746                 (ndr_print_function_t) ndr_print_eventlog6_EvtRpcAssertConfig,
5747                 { 0, NULL },
5748                 { 0, NULL },
5749         },
5750         {
5751                 "eventlog6_EvtRpcRetractConfig",
5752                 sizeof(struct eventlog6_EvtRpcRetractConfig),
5753                 (ndr_push_flags_fn_t) ndr_push_eventlog6_EvtRpcRetractConfig,
5754                 (ndr_pull_flags_fn_t) ndr_pull_eventlog6_EvtRpcRetractConfig,
5755                 (ndr_print_function_t) ndr_print_eventlog6_EvtRpcRetractConfig,
5756                 { 0, NULL },
5757                 { 0, NULL },
5758         },
5759         {
5760                 "eventlog6_EvtRpcOpenLogHandle",
5761                 sizeof(struct eventlog6_EvtRpcOpenLogHandle),
5762                 (ndr_push_flags_fn_t) ndr_push_eventlog6_EvtRpcOpenLogHandle,
5763                 (ndr_pull_flags_fn_t) ndr_pull_eventlog6_EvtRpcOpenLogHandle,
5764                 (ndr_print_function_t) ndr_print_eventlog6_EvtRpcOpenLogHandle,
5765                 { 0, NULL },
5766                 { 0, NULL },
5767         },
5768         {
5769                 "eventlog6_EvtRpcGetLogFileInfo",
5770                 sizeof(struct eventlog6_EvtRpcGetLogFileInfo),
5771                 (ndr_push_flags_fn_t) ndr_push_eventlog6_EvtRpcGetLogFileInfo,
5772                 (ndr_pull_flags_fn_t) ndr_pull_eventlog6_EvtRpcGetLogFileInfo,
5773                 (ndr_print_function_t) ndr_print_eventlog6_EvtRpcGetLogFileInfo,
5774                 { 0, NULL },
5775                 { 0, NULL },
5776         },
5777         {
5778                 "eventlog6_EvtRpcGetChannelList",
5779                 sizeof(struct eventlog6_EvtRpcGetChannelList),
5780                 (ndr_push_flags_fn_t) ndr_push_eventlog6_EvtRpcGetChannelList,
5781                 (ndr_pull_flags_fn_t) ndr_pull_eventlog6_EvtRpcGetChannelList,
5782                 (ndr_print_function_t) ndr_print_eventlog6_EvtRpcGetChannelList,
5783                 { 0, NULL },
5784                 { 0, NULL },
5785         },
5786         {
5787                 "eventlog6_EvtRpcGetChannelConfig",
5788                 sizeof(struct eventlog6_EvtRpcGetChannelConfig),
5789                 (ndr_push_flags_fn_t) ndr_push_eventlog6_EvtRpcGetChannelConfig,
5790                 (ndr_pull_flags_fn_t) ndr_pull_eventlog6_EvtRpcGetChannelConfig,
5791                 (ndr_print_function_t) ndr_print_eventlog6_EvtRpcGetChannelConfig,
5792                 { 0, NULL },
5793                 { 0, NULL },
5794         },
5795         {
5796                 "eventlog6_EvtRpcPutChannelConfig",
5797                 sizeof(struct eventlog6_EvtRpcPutChannelConfig),
5798                 (ndr_push_flags_fn_t) ndr_push_eventlog6_EvtRpcPutChannelConfig,
5799                 (ndr_pull_flags_fn_t) ndr_pull_eventlog6_EvtRpcPutChannelConfig,
5800                 (ndr_print_function_t) ndr_print_eventlog6_EvtRpcPutChannelConfig,
5801                 { 0, NULL },
5802                 { 0, NULL },
5803         },
5804         {
5805                 "eventlog6_EvtRpcGetPublisherList",
5806                 sizeof(struct eventlog6_EvtRpcGetPublisherList),
5807                 (ndr_push_flags_fn_t) ndr_push_eventlog6_EvtRpcGetPublisherList,
5808                 (ndr_pull_flags_fn_t) ndr_pull_eventlog6_EvtRpcGetPublisherList,
5809                 (ndr_print_function_t) ndr_print_eventlog6_EvtRpcGetPublisherList,
5810                 { 0, NULL },
5811                 { 0, NULL },
5812         },
5813         {
5814                 "eventlog6_EvtRpcGetPublisherListForChannel",
5815                 sizeof(struct eventlog6_EvtRpcGetPublisherListForChannel),
5816                 (ndr_push_flags_fn_t) ndr_push_eventlog6_EvtRpcGetPublisherListForChannel,
5817                 (ndr_pull_flags_fn_t) ndr_pull_eventlog6_EvtRpcGetPublisherListForChannel,
5818                 (ndr_print_function_t) ndr_print_eventlog6_EvtRpcGetPublisherListForChannel,
5819                 { 0, NULL },
5820                 { 0, NULL },
5821         },
5822         {
5823                 "eventlog6_EvtRpcGetPublisherMetadata",
5824                 sizeof(struct eventlog6_EvtRpcGetPublisherMetadata),
5825                 (ndr_push_flags_fn_t) ndr_push_eventlog6_EvtRpcGetPublisherMetadata,
5826                 (ndr_pull_flags_fn_t) ndr_pull_eventlog6_EvtRpcGetPublisherMetadata,
5827                 (ndr_print_function_t) ndr_print_eventlog6_EvtRpcGetPublisherMetadata,
5828                 { 0, NULL },
5829                 { 0, NULL },
5830         },
5831         {
5832                 "eventlog6_EvtRpcGetPublisherResourceMetadata",
5833                 sizeof(struct eventlog6_EvtRpcGetPublisherResourceMetadata),
5834                 (ndr_push_flags_fn_t) ndr_push_eventlog6_EvtRpcGetPublisherResourceMetadata,
5835                 (ndr_pull_flags_fn_t) ndr_pull_eventlog6_EvtRpcGetPublisherResourceMetadata,
5836                 (ndr_print_function_t) ndr_print_eventlog6_EvtRpcGetPublisherResourceMetadata,
5837                 { 0, NULL },
5838                 { 0, NULL },
5839         },
5840         {
5841                 "eventlog6_EvtRpcGetEventMetadataEnum",
5842                 sizeof(struct eventlog6_EvtRpcGetEventMetadataEnum),
5843                 (ndr_push_flags_fn_t) ndr_push_eventlog6_EvtRpcGetEventMetadataEnum,
5844                 (ndr_pull_flags_fn_t) ndr_pull_eventlog6_EvtRpcGetEventMetadataEnum,
5845                 (ndr_print_function_t) ndr_print_eventlog6_EvtRpcGetEventMetadataEnum,
5846                 { 0, NULL },
5847                 { 0, NULL },
5848         },
5849         {
5850                 "eventlog6_EvtRpcGetNextEventMetadata",
5851                 sizeof(struct eventlog6_EvtRpcGetNextEventMetadata),
5852                 (ndr_push_flags_fn_t) ndr_push_eventlog6_EvtRpcGetNextEventMetadata,
5853                 (ndr_pull_flags_fn_t) ndr_pull_eventlog6_EvtRpcGetNextEventMetadata,
5854                 (ndr_print_function_t) ndr_print_eventlog6_EvtRpcGetNextEventMetadata,
5855                 { 0, NULL },
5856                 { 0, NULL },
5857         },
5858         {
5859                 "eventlog6_EvtRpcGetClassicLogDisplayName",
5860                 sizeof(struct eventlog6_EvtRpcGetClassicLogDisplayName),
5861                 (ndr_push_flags_fn_t) ndr_push_eventlog6_EvtRpcGetClassicLogDisplayName,
5862                 (ndr_pull_flags_fn_t) ndr_pull_eventlog6_EvtRpcGetClassicLogDisplayName,
5863                 (ndr_print_function_t) ndr_print_eventlog6_EvtRpcGetClassicLogDisplayName,
5864                 { 0, NULL },
5865                 { 0, NULL },
5866         },
5867         { NULL, 0, NULL, NULL, NULL }
5868 };
5869
5870 static const char * const eventlog6_endpoint_strings[] = {
5871         "ncacn_ip_tcp:", 
5872 };
5873
5874 static const struct ndr_interface_string_array eventlog6_endpoints = {
5875         .count  = 1,
5876         .names  = eventlog6_endpoint_strings
5877 };
5878
5879 static const char * const eventlog6_authservice_strings[] = {
5880         "host", 
5881 };
5882
5883 static const struct ndr_interface_string_array eventlog6_authservices = {
5884         .count  = 1,
5885         .names  = eventlog6_authservice_strings
5886 };
5887
5888
5889 const struct ndr_interface_table ndr_table_eventlog6 = {
5890         .name           = "eventlog6",
5891         .syntax_id      = {
5892                 {0xf6beaff7,0x1e19,0x4fbb,{0x9f,0x8f},{0xb8,0x9e,0x20,0x18,0x33,0x7c}},
5893                 NDR_EVENTLOG6_VERSION
5894         },
5895         .helpstring     = NDR_EVENTLOG6_HELPSTRING,
5896         .num_calls      = 29,
5897         .calls          = eventlog6_calls,
5898         .endpoints      = &eventlog6_endpoints,
5899         .authservices   = &eventlog6_authservices
5900 };
5901