rerun 'make samba3-idl'
[Samba.git] / librpc / gen_ndr / ndr_srvsvc.c
blob987faf1339feced70670b46619fab4ef97a71a38
1 /* parser auto-generated by pidl */
3 #include "includes.h"
4 #include "../librpc/gen_ndr/ndr_srvsvc.h"
6 #include "librpc/gen_ndr/ndr_security.h"
7 #include "librpc/gen_ndr/ndr_svcctl.h"
8 static enum ndr_err_code ndr_push_srvsvc_NetCharDevInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevInfo0 *r)
10 if (ndr_flags & NDR_SCALARS) {
11 NDR_CHECK(ndr_push_align(ndr, 4));
12 NDR_CHECK(ndr_push_unique_ptr(ndr, r->device));
14 if (ndr_flags & NDR_BUFFERS) {
15 if (r->device) {
16 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
17 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
18 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
19 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->device, ndr_charset_length(r->device, CH_UTF16), sizeof(uint16_t), CH_UTF16));
22 return NDR_ERR_SUCCESS;
25 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevInfo0 *r)
27 uint32_t _ptr_device;
28 uint32_t size_device_1 = 0;
29 uint32_t length_device_1 = 0;
30 TALLOC_CTX *_mem_save_device_0;
31 if (ndr_flags & NDR_SCALARS) {
32 NDR_CHECK(ndr_pull_align(ndr, 4));
33 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_device));
34 if (_ptr_device) {
35 NDR_PULL_ALLOC(ndr, r->device);
36 } else {
37 r->device = NULL;
40 if (ndr_flags & NDR_BUFFERS) {
41 if (r->device) {
42 _mem_save_device_0 = NDR_PULL_GET_MEM_CTX(ndr);
43 NDR_PULL_SET_MEM_CTX(ndr, r->device, 0);
44 NDR_CHECK(ndr_pull_array_size(ndr, &r->device));
45 NDR_CHECK(ndr_pull_array_length(ndr, &r->device));
46 size_device_1 = ndr_get_array_size(ndr, &r->device);
47 length_device_1 = ndr_get_array_length(ndr, &r->device);
48 if (length_device_1 > size_device_1) {
49 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_device_1, length_device_1);
51 NDR_CHECK(ndr_check_string_terminator(ndr, length_device_1, sizeof(uint16_t)));
52 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->device, length_device_1, sizeof(uint16_t), CH_UTF16));
53 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_device_0, 0);
56 return NDR_ERR_SUCCESS;
59 _PUBLIC_ void ndr_print_srvsvc_NetCharDevInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevInfo0 *r)
61 ndr_print_struct(ndr, name, "srvsvc_NetCharDevInfo0");
62 ndr->depth++;
63 ndr_print_ptr(ndr, "device", r->device);
64 ndr->depth++;
65 if (r->device) {
66 ndr_print_string(ndr, "device", r->device);
68 ndr->depth--;
69 ndr->depth--;
72 static enum ndr_err_code ndr_push_srvsvc_NetCharDevCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevCtr0 *r)
74 uint32_t cntr_array_1;
75 if (ndr_flags & NDR_SCALARS) {
76 NDR_CHECK(ndr_push_align(ndr, 4));
77 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
78 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
80 if (ndr_flags & NDR_BUFFERS) {
81 if (r->array) {
82 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
83 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
84 NDR_CHECK(ndr_push_srvsvc_NetCharDevInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
86 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
87 NDR_CHECK(ndr_push_srvsvc_NetCharDevInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
91 return NDR_ERR_SUCCESS;
94 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevCtr0 *r)
96 uint32_t _ptr_array;
97 uint32_t size_array_1 = 0;
98 uint32_t cntr_array_1;
99 TALLOC_CTX *_mem_save_array_0;
100 TALLOC_CTX *_mem_save_array_1;
101 if (ndr_flags & NDR_SCALARS) {
102 NDR_CHECK(ndr_pull_align(ndr, 4));
103 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
104 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
105 if (_ptr_array) {
106 NDR_PULL_ALLOC(ndr, r->array);
107 } else {
108 r->array = NULL;
111 if (ndr_flags & NDR_BUFFERS) {
112 if (r->array) {
113 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
114 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
115 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
116 size_array_1 = ndr_get_array_size(ndr, &r->array);
117 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
118 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
119 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
120 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
121 NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
123 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
124 NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
126 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
127 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
129 if (r->array) {
130 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
133 return NDR_ERR_SUCCESS;
136 _PUBLIC_ void ndr_print_srvsvc_NetCharDevCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevCtr0 *r)
138 uint32_t cntr_array_1;
139 ndr_print_struct(ndr, name, "srvsvc_NetCharDevCtr0");
140 ndr->depth++;
141 ndr_print_uint32(ndr, "count", r->count);
142 ndr_print_ptr(ndr, "array", r->array);
143 ndr->depth++;
144 if (r->array) {
145 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
146 ndr->depth++;
147 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
148 char *idx_1=NULL;
149 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
150 ndr_print_srvsvc_NetCharDevInfo0(ndr, "array", &r->array[cntr_array_1]);
151 free(idx_1);
154 ndr->depth--;
156 ndr->depth--;
157 ndr->depth--;
160 static enum ndr_err_code ndr_push_srvsvc_NetCharDevInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevInfo1 *r)
162 if (ndr_flags & NDR_SCALARS) {
163 NDR_CHECK(ndr_push_align(ndr, 4));
164 NDR_CHECK(ndr_push_unique_ptr(ndr, r->device));
165 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->status));
166 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
167 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
169 if (ndr_flags & NDR_BUFFERS) {
170 if (r->device) {
171 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
172 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
173 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
174 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->device, ndr_charset_length(r->device, CH_UTF16), sizeof(uint16_t), CH_UTF16));
176 if (r->user) {
177 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
178 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
179 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
180 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
183 return NDR_ERR_SUCCESS;
186 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevInfo1 *r)
188 uint32_t _ptr_device;
189 uint32_t size_device_1 = 0;
190 uint32_t length_device_1 = 0;
191 TALLOC_CTX *_mem_save_device_0;
192 uint32_t _ptr_user;
193 uint32_t size_user_1 = 0;
194 uint32_t length_user_1 = 0;
195 TALLOC_CTX *_mem_save_user_0;
196 if (ndr_flags & NDR_SCALARS) {
197 NDR_CHECK(ndr_pull_align(ndr, 4));
198 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_device));
199 if (_ptr_device) {
200 NDR_PULL_ALLOC(ndr, r->device);
201 } else {
202 r->device = NULL;
204 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->status));
205 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
206 if (_ptr_user) {
207 NDR_PULL_ALLOC(ndr, r->user);
208 } else {
209 r->user = NULL;
211 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
213 if (ndr_flags & NDR_BUFFERS) {
214 if (r->device) {
215 _mem_save_device_0 = NDR_PULL_GET_MEM_CTX(ndr);
216 NDR_PULL_SET_MEM_CTX(ndr, r->device, 0);
217 NDR_CHECK(ndr_pull_array_size(ndr, &r->device));
218 NDR_CHECK(ndr_pull_array_length(ndr, &r->device));
219 size_device_1 = ndr_get_array_size(ndr, &r->device);
220 length_device_1 = ndr_get_array_length(ndr, &r->device);
221 if (length_device_1 > size_device_1) {
222 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_device_1, length_device_1);
224 NDR_CHECK(ndr_check_string_terminator(ndr, length_device_1, sizeof(uint16_t)));
225 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->device, length_device_1, sizeof(uint16_t), CH_UTF16));
226 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_device_0, 0);
228 if (r->user) {
229 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
230 NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
231 NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
232 NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
233 size_user_1 = ndr_get_array_size(ndr, &r->user);
234 length_user_1 = ndr_get_array_length(ndr, &r->user);
235 if (length_user_1 > size_user_1) {
236 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_user_1, length_user_1);
238 NDR_CHECK(ndr_check_string_terminator(ndr, length_user_1, sizeof(uint16_t)));
239 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, length_user_1, sizeof(uint16_t), CH_UTF16));
240 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
243 return NDR_ERR_SUCCESS;
246 _PUBLIC_ void ndr_print_srvsvc_NetCharDevInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevInfo1 *r)
248 ndr_print_struct(ndr, name, "srvsvc_NetCharDevInfo1");
249 ndr->depth++;
250 ndr_print_ptr(ndr, "device", r->device);
251 ndr->depth++;
252 if (r->device) {
253 ndr_print_string(ndr, "device", r->device);
255 ndr->depth--;
256 ndr_print_uint32(ndr, "status", r->status);
257 ndr_print_ptr(ndr, "user", r->user);
258 ndr->depth++;
259 if (r->user) {
260 ndr_print_string(ndr, "user", r->user);
262 ndr->depth--;
263 ndr_print_uint32(ndr, "time", r->time);
264 ndr->depth--;
267 static enum ndr_err_code ndr_push_srvsvc_NetCharDevCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevCtr1 *r)
269 uint32_t cntr_array_1;
270 if (ndr_flags & NDR_SCALARS) {
271 NDR_CHECK(ndr_push_align(ndr, 4));
272 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
273 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
275 if (ndr_flags & NDR_BUFFERS) {
276 if (r->array) {
277 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
278 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
279 NDR_CHECK(ndr_push_srvsvc_NetCharDevInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
281 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
282 NDR_CHECK(ndr_push_srvsvc_NetCharDevInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
286 return NDR_ERR_SUCCESS;
289 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevCtr1 *r)
291 uint32_t _ptr_array;
292 uint32_t size_array_1 = 0;
293 uint32_t cntr_array_1;
294 TALLOC_CTX *_mem_save_array_0;
295 TALLOC_CTX *_mem_save_array_1;
296 if (ndr_flags & NDR_SCALARS) {
297 NDR_CHECK(ndr_pull_align(ndr, 4));
298 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
299 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
300 if (_ptr_array) {
301 NDR_PULL_ALLOC(ndr, r->array);
302 } else {
303 r->array = NULL;
306 if (ndr_flags & NDR_BUFFERS) {
307 if (r->array) {
308 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
309 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
310 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
311 size_array_1 = ndr_get_array_size(ndr, &r->array);
312 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
313 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
314 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
315 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
316 NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
318 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
319 NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
321 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
322 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
324 if (r->array) {
325 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
328 return NDR_ERR_SUCCESS;
331 _PUBLIC_ void ndr_print_srvsvc_NetCharDevCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevCtr1 *r)
333 uint32_t cntr_array_1;
334 ndr_print_struct(ndr, name, "srvsvc_NetCharDevCtr1");
335 ndr->depth++;
336 ndr_print_uint32(ndr, "count", r->count);
337 ndr_print_ptr(ndr, "array", r->array);
338 ndr->depth++;
339 if (r->array) {
340 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
341 ndr->depth++;
342 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
343 char *idx_1=NULL;
344 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
345 ndr_print_srvsvc_NetCharDevInfo1(ndr, "array", &r->array[cntr_array_1]);
346 free(idx_1);
349 ndr->depth--;
351 ndr->depth--;
352 ndr->depth--;
355 static enum ndr_err_code ndr_push_srvsvc_NetCharDevInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetCharDevInfo *r)
357 if (ndr_flags & NDR_SCALARS) {
358 int level = ndr_push_get_switch_value(ndr, r);
359 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
360 switch (level) {
361 case 0: {
362 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
363 break; }
365 case 1: {
366 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
367 break; }
369 default: {
370 break; }
374 if (ndr_flags & NDR_BUFFERS) {
375 int level = ndr_push_get_switch_value(ndr, r);
376 switch (level) {
377 case 0:
378 if (r->info0) {
379 NDR_CHECK(ndr_push_srvsvc_NetCharDevInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
381 break;
383 case 1:
384 if (r->info1) {
385 NDR_CHECK(ndr_push_srvsvc_NetCharDevInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
387 break;
389 default:
390 break;
394 return NDR_ERR_SUCCESS;
397 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetCharDevInfo *r)
399 int level;
400 uint32_t _level;
401 TALLOC_CTX *_mem_save_info0_0;
402 uint32_t _ptr_info0;
403 TALLOC_CTX *_mem_save_info1_0;
404 uint32_t _ptr_info1;
405 level = ndr_pull_get_switch_value(ndr, r);
406 if (ndr_flags & NDR_SCALARS) {
407 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
408 if (_level != level) {
409 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
411 switch (level) {
412 case 0: {
413 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
414 if (_ptr_info0) {
415 NDR_PULL_ALLOC(ndr, r->info0);
416 } else {
417 r->info0 = NULL;
419 break; }
421 case 1: {
422 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
423 if (_ptr_info1) {
424 NDR_PULL_ALLOC(ndr, r->info1);
425 } else {
426 r->info1 = NULL;
428 break; }
430 default: {
431 break; }
435 if (ndr_flags & NDR_BUFFERS) {
436 switch (level) {
437 case 0:
438 if (r->info0) {
439 _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
440 NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
441 NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
442 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
444 break;
446 case 1:
447 if (r->info1) {
448 _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
449 NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
450 NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
451 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
453 break;
455 default:
456 break;
460 return NDR_ERR_SUCCESS;
463 _PUBLIC_ void ndr_print_srvsvc_NetCharDevInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetCharDevInfo *r)
465 int level;
466 level = ndr_print_get_switch_value(ndr, r);
467 ndr_print_union(ndr, name, level, "srvsvc_NetCharDevInfo");
468 switch (level) {
469 case 0:
470 ndr_print_ptr(ndr, "info0", r->info0);
471 ndr->depth++;
472 if (r->info0) {
473 ndr_print_srvsvc_NetCharDevInfo0(ndr, "info0", r->info0);
475 ndr->depth--;
476 break;
478 case 1:
479 ndr_print_ptr(ndr, "info1", r->info1);
480 ndr->depth++;
481 if (r->info1) {
482 ndr_print_srvsvc_NetCharDevInfo1(ndr, "info1", r->info1);
484 ndr->depth--;
485 break;
487 default:
488 break;
493 static enum ndr_err_code ndr_push_srvsvc_NetCharDevCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetCharDevCtr *r)
495 if (ndr_flags & NDR_SCALARS) {
496 int level = ndr_push_get_switch_value(ndr, r);
497 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
498 switch (level) {
499 case 0: {
500 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0));
501 break; }
503 case 1: {
504 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
505 break; }
507 default: {
508 break; }
512 if (ndr_flags & NDR_BUFFERS) {
513 int level = ndr_push_get_switch_value(ndr, r);
514 switch (level) {
515 case 0:
516 if (r->ctr0) {
517 NDR_CHECK(ndr_push_srvsvc_NetCharDevCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
519 break;
521 case 1:
522 if (r->ctr1) {
523 NDR_CHECK(ndr_push_srvsvc_NetCharDevCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
525 break;
527 default:
528 break;
532 return NDR_ERR_SUCCESS;
535 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetCharDevCtr *r)
537 int level;
538 uint32_t _level;
539 TALLOC_CTX *_mem_save_ctr0_0;
540 uint32_t _ptr_ctr0;
541 TALLOC_CTX *_mem_save_ctr1_0;
542 uint32_t _ptr_ctr1;
543 level = ndr_pull_get_switch_value(ndr, r);
544 if (ndr_flags & NDR_SCALARS) {
545 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
546 if (_level != level) {
547 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
549 switch (level) {
550 case 0: {
551 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr0));
552 if (_ptr_ctr0) {
553 NDR_PULL_ALLOC(ndr, r->ctr0);
554 } else {
555 r->ctr0 = NULL;
557 break; }
559 case 1: {
560 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
561 if (_ptr_ctr1) {
562 NDR_PULL_ALLOC(ndr, r->ctr1);
563 } else {
564 r->ctr1 = NULL;
566 break; }
568 default: {
569 break; }
573 if (ndr_flags & NDR_BUFFERS) {
574 switch (level) {
575 case 0:
576 if (r->ctr0) {
577 _mem_save_ctr0_0 = NDR_PULL_GET_MEM_CTX(ndr);
578 NDR_PULL_SET_MEM_CTX(ndr, r->ctr0, 0);
579 NDR_CHECK(ndr_pull_srvsvc_NetCharDevCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
580 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr0_0, 0);
582 break;
584 case 1:
585 if (r->ctr1) {
586 _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
587 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
588 NDR_CHECK(ndr_pull_srvsvc_NetCharDevCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
589 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
591 break;
593 default:
594 break;
598 return NDR_ERR_SUCCESS;
601 _PUBLIC_ void ndr_print_srvsvc_NetCharDevCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetCharDevCtr *r)
603 int level;
604 level = ndr_print_get_switch_value(ndr, r);
605 ndr_print_union(ndr, name, level, "srvsvc_NetCharDevCtr");
606 switch (level) {
607 case 0:
608 ndr_print_ptr(ndr, "ctr0", r->ctr0);
609 ndr->depth++;
610 if (r->ctr0) {
611 ndr_print_srvsvc_NetCharDevCtr0(ndr, "ctr0", r->ctr0);
613 ndr->depth--;
614 break;
616 case 1:
617 ndr_print_ptr(ndr, "ctr1", r->ctr1);
618 ndr->depth++;
619 if (r->ctr1) {
620 ndr_print_srvsvc_NetCharDevCtr1(ndr, "ctr1", r->ctr1);
622 ndr->depth--;
623 break;
625 default:
626 break;
631 static enum ndr_err_code ndr_push_srvsvc_NetCharDevInfoCtr(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevInfoCtr *r)
633 if (ndr_flags & NDR_SCALARS) {
634 NDR_CHECK(ndr_push_align(ndr, 4));
635 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
636 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level));
637 NDR_CHECK(ndr_push_srvsvc_NetCharDevCtr(ndr, NDR_SCALARS, &r->ctr));
639 if (ndr_flags & NDR_BUFFERS) {
640 NDR_CHECK(ndr_push_srvsvc_NetCharDevCtr(ndr, NDR_BUFFERS, &r->ctr));
642 return NDR_ERR_SUCCESS;
645 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevInfoCtr(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevInfoCtr *r)
647 if (ndr_flags & NDR_SCALARS) {
648 NDR_CHECK(ndr_pull_align(ndr, 4));
649 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
650 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level));
651 NDR_CHECK(ndr_pull_srvsvc_NetCharDevCtr(ndr, NDR_SCALARS, &r->ctr));
653 if (ndr_flags & NDR_BUFFERS) {
654 NDR_CHECK(ndr_pull_srvsvc_NetCharDevCtr(ndr, NDR_BUFFERS, &r->ctr));
656 return NDR_ERR_SUCCESS;
659 _PUBLIC_ void ndr_print_srvsvc_NetCharDevInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevInfoCtr *r)
661 ndr_print_struct(ndr, name, "srvsvc_NetCharDevInfoCtr");
662 ndr->depth++;
663 ndr_print_uint32(ndr, "level", r->level);
664 ndr_print_set_switch_value(ndr, &r->ctr, r->level);
665 ndr_print_srvsvc_NetCharDevCtr(ndr, "ctr", &r->ctr);
666 ndr->depth--;
669 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevQInfo0 *r)
671 if (ndr_flags & NDR_SCALARS) {
672 NDR_CHECK(ndr_push_align(ndr, 4));
673 NDR_CHECK(ndr_push_unique_ptr(ndr, r->device));
675 if (ndr_flags & NDR_BUFFERS) {
676 if (r->device) {
677 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
678 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
679 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
680 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->device, ndr_charset_length(r->device, CH_UTF16), sizeof(uint16_t), CH_UTF16));
683 return NDR_ERR_SUCCESS;
686 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevQInfo0 *r)
688 uint32_t _ptr_device;
689 uint32_t size_device_1 = 0;
690 uint32_t length_device_1 = 0;
691 TALLOC_CTX *_mem_save_device_0;
692 if (ndr_flags & NDR_SCALARS) {
693 NDR_CHECK(ndr_pull_align(ndr, 4));
694 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_device));
695 if (_ptr_device) {
696 NDR_PULL_ALLOC(ndr, r->device);
697 } else {
698 r->device = NULL;
701 if (ndr_flags & NDR_BUFFERS) {
702 if (r->device) {
703 _mem_save_device_0 = NDR_PULL_GET_MEM_CTX(ndr);
704 NDR_PULL_SET_MEM_CTX(ndr, r->device, 0);
705 NDR_CHECK(ndr_pull_array_size(ndr, &r->device));
706 NDR_CHECK(ndr_pull_array_length(ndr, &r->device));
707 size_device_1 = ndr_get_array_size(ndr, &r->device);
708 length_device_1 = ndr_get_array_length(ndr, &r->device);
709 if (length_device_1 > size_device_1) {
710 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_device_1, length_device_1);
712 NDR_CHECK(ndr_check_string_terminator(ndr, length_device_1, sizeof(uint16_t)));
713 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->device, length_device_1, sizeof(uint16_t), CH_UTF16));
714 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_device_0, 0);
717 return NDR_ERR_SUCCESS;
720 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQInfo0 *r)
722 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQInfo0");
723 ndr->depth++;
724 ndr_print_ptr(ndr, "device", r->device);
725 ndr->depth++;
726 if (r->device) {
727 ndr_print_string(ndr, "device", r->device);
729 ndr->depth--;
730 ndr->depth--;
733 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevQCtr0 *r)
735 uint32_t cntr_array_1;
736 if (ndr_flags & NDR_SCALARS) {
737 NDR_CHECK(ndr_push_align(ndr, 4));
738 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
739 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
741 if (ndr_flags & NDR_BUFFERS) {
742 if (r->array) {
743 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
744 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
745 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
747 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
748 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
752 return NDR_ERR_SUCCESS;
755 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevQCtr0 *r)
757 uint32_t _ptr_array;
758 uint32_t size_array_1 = 0;
759 uint32_t cntr_array_1;
760 TALLOC_CTX *_mem_save_array_0;
761 TALLOC_CTX *_mem_save_array_1;
762 if (ndr_flags & NDR_SCALARS) {
763 NDR_CHECK(ndr_pull_align(ndr, 4));
764 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
765 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
766 if (_ptr_array) {
767 NDR_PULL_ALLOC(ndr, r->array);
768 } else {
769 r->array = NULL;
772 if (ndr_flags & NDR_BUFFERS) {
773 if (r->array) {
774 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
775 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
776 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
777 size_array_1 = ndr_get_array_size(ndr, &r->array);
778 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
779 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
780 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
781 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
782 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
784 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
785 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
787 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
788 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
790 if (r->array) {
791 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
794 return NDR_ERR_SUCCESS;
797 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQCtr0 *r)
799 uint32_t cntr_array_1;
800 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQCtr0");
801 ndr->depth++;
802 ndr_print_uint32(ndr, "count", r->count);
803 ndr_print_ptr(ndr, "array", r->array);
804 ndr->depth++;
805 if (r->array) {
806 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
807 ndr->depth++;
808 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
809 char *idx_1=NULL;
810 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
811 ndr_print_srvsvc_NetCharDevQInfo0(ndr, "array", &r->array[cntr_array_1]);
812 free(idx_1);
815 ndr->depth--;
817 ndr->depth--;
818 ndr->depth--;
821 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevQInfo1 *r)
823 if (ndr_flags & NDR_SCALARS) {
824 NDR_CHECK(ndr_push_align(ndr, 4));
825 NDR_CHECK(ndr_push_unique_ptr(ndr, r->device));
826 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->priority));
827 NDR_CHECK(ndr_push_unique_ptr(ndr, r->devices));
828 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->users));
829 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_ahead));
831 if (ndr_flags & NDR_BUFFERS) {
832 if (r->device) {
833 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
834 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
835 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
836 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->device, ndr_charset_length(r->device, CH_UTF16), sizeof(uint16_t), CH_UTF16));
838 if (r->devices) {
839 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->devices, CH_UTF16)));
840 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
841 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->devices, CH_UTF16)));
842 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->devices, ndr_charset_length(r->devices, CH_UTF16), sizeof(uint16_t), CH_UTF16));
845 return NDR_ERR_SUCCESS;
848 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevQInfo1 *r)
850 uint32_t _ptr_device;
851 uint32_t size_device_1 = 0;
852 uint32_t length_device_1 = 0;
853 TALLOC_CTX *_mem_save_device_0;
854 uint32_t _ptr_devices;
855 uint32_t size_devices_1 = 0;
856 uint32_t length_devices_1 = 0;
857 TALLOC_CTX *_mem_save_devices_0;
858 if (ndr_flags & NDR_SCALARS) {
859 NDR_CHECK(ndr_pull_align(ndr, 4));
860 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_device));
861 if (_ptr_device) {
862 NDR_PULL_ALLOC(ndr, r->device);
863 } else {
864 r->device = NULL;
866 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->priority));
867 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_devices));
868 if (_ptr_devices) {
869 NDR_PULL_ALLOC(ndr, r->devices);
870 } else {
871 r->devices = NULL;
873 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->users));
874 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_ahead));
876 if (ndr_flags & NDR_BUFFERS) {
877 if (r->device) {
878 _mem_save_device_0 = NDR_PULL_GET_MEM_CTX(ndr);
879 NDR_PULL_SET_MEM_CTX(ndr, r->device, 0);
880 NDR_CHECK(ndr_pull_array_size(ndr, &r->device));
881 NDR_CHECK(ndr_pull_array_length(ndr, &r->device));
882 size_device_1 = ndr_get_array_size(ndr, &r->device);
883 length_device_1 = ndr_get_array_length(ndr, &r->device);
884 if (length_device_1 > size_device_1) {
885 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_device_1, length_device_1);
887 NDR_CHECK(ndr_check_string_terminator(ndr, length_device_1, sizeof(uint16_t)));
888 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->device, length_device_1, sizeof(uint16_t), CH_UTF16));
889 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_device_0, 0);
891 if (r->devices) {
892 _mem_save_devices_0 = NDR_PULL_GET_MEM_CTX(ndr);
893 NDR_PULL_SET_MEM_CTX(ndr, r->devices, 0);
894 NDR_CHECK(ndr_pull_array_size(ndr, &r->devices));
895 NDR_CHECK(ndr_pull_array_length(ndr, &r->devices));
896 size_devices_1 = ndr_get_array_size(ndr, &r->devices);
897 length_devices_1 = ndr_get_array_length(ndr, &r->devices);
898 if (length_devices_1 > size_devices_1) {
899 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_devices_1, length_devices_1);
901 NDR_CHECK(ndr_check_string_terminator(ndr, length_devices_1, sizeof(uint16_t)));
902 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->devices, length_devices_1, sizeof(uint16_t), CH_UTF16));
903 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_devices_0, 0);
906 return NDR_ERR_SUCCESS;
909 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQInfo1 *r)
911 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQInfo1");
912 ndr->depth++;
913 ndr_print_ptr(ndr, "device", r->device);
914 ndr->depth++;
915 if (r->device) {
916 ndr_print_string(ndr, "device", r->device);
918 ndr->depth--;
919 ndr_print_uint32(ndr, "priority", r->priority);
920 ndr_print_ptr(ndr, "devices", r->devices);
921 ndr->depth++;
922 if (r->devices) {
923 ndr_print_string(ndr, "devices", r->devices);
925 ndr->depth--;
926 ndr_print_uint32(ndr, "users", r->users);
927 ndr_print_uint32(ndr, "num_ahead", r->num_ahead);
928 ndr->depth--;
931 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevQCtr1 *r)
933 uint32_t cntr_array_1;
934 if (ndr_flags & NDR_SCALARS) {
935 NDR_CHECK(ndr_push_align(ndr, 4));
936 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
937 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
939 if (ndr_flags & NDR_BUFFERS) {
940 if (r->array) {
941 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
942 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
943 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
945 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
946 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
950 return NDR_ERR_SUCCESS;
953 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevQCtr1 *r)
955 uint32_t _ptr_array;
956 uint32_t size_array_1 = 0;
957 uint32_t cntr_array_1;
958 TALLOC_CTX *_mem_save_array_0;
959 TALLOC_CTX *_mem_save_array_1;
960 if (ndr_flags & NDR_SCALARS) {
961 NDR_CHECK(ndr_pull_align(ndr, 4));
962 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
963 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
964 if (_ptr_array) {
965 NDR_PULL_ALLOC(ndr, r->array);
966 } else {
967 r->array = NULL;
970 if (ndr_flags & NDR_BUFFERS) {
971 if (r->array) {
972 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
973 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
974 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
975 size_array_1 = ndr_get_array_size(ndr, &r->array);
976 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
977 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
978 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
979 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
980 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
982 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
983 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
985 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
986 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
988 if (r->array) {
989 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
992 return NDR_ERR_SUCCESS;
995 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQCtr1 *r)
997 uint32_t cntr_array_1;
998 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQCtr1");
999 ndr->depth++;
1000 ndr_print_uint32(ndr, "count", r->count);
1001 ndr_print_ptr(ndr, "array", r->array);
1002 ndr->depth++;
1003 if (r->array) {
1004 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
1005 ndr->depth++;
1006 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
1007 char *idx_1=NULL;
1008 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
1009 ndr_print_srvsvc_NetCharDevQInfo1(ndr, "array", &r->array[cntr_array_1]);
1010 free(idx_1);
1013 ndr->depth--;
1015 ndr->depth--;
1016 ndr->depth--;
1019 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetCharDevQInfo *r)
1021 if (ndr_flags & NDR_SCALARS) {
1022 int level = ndr_push_get_switch_value(ndr, r);
1023 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
1024 switch (level) {
1025 case 0: {
1026 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
1027 break; }
1029 case 1: {
1030 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
1031 break; }
1033 default: {
1034 break; }
1038 if (ndr_flags & NDR_BUFFERS) {
1039 int level = ndr_push_get_switch_value(ndr, r);
1040 switch (level) {
1041 case 0:
1042 if (r->info0) {
1043 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
1045 break;
1047 case 1:
1048 if (r->info1) {
1049 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
1051 break;
1053 default:
1054 break;
1058 return NDR_ERR_SUCCESS;
1061 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetCharDevQInfo *r)
1063 int level;
1064 uint32_t _level;
1065 TALLOC_CTX *_mem_save_info0_0;
1066 uint32_t _ptr_info0;
1067 TALLOC_CTX *_mem_save_info1_0;
1068 uint32_t _ptr_info1;
1069 level = ndr_pull_get_switch_value(ndr, r);
1070 if (ndr_flags & NDR_SCALARS) {
1071 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
1072 if (_level != level) {
1073 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
1075 switch (level) {
1076 case 0: {
1077 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
1078 if (_ptr_info0) {
1079 NDR_PULL_ALLOC(ndr, r->info0);
1080 } else {
1081 r->info0 = NULL;
1083 break; }
1085 case 1: {
1086 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
1087 if (_ptr_info1) {
1088 NDR_PULL_ALLOC(ndr, r->info1);
1089 } else {
1090 r->info1 = NULL;
1092 break; }
1094 default: {
1095 break; }
1099 if (ndr_flags & NDR_BUFFERS) {
1100 switch (level) {
1101 case 0:
1102 if (r->info0) {
1103 _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
1104 NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
1105 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
1106 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
1108 break;
1110 case 1:
1111 if (r->info1) {
1112 _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
1113 NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
1114 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
1115 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
1117 break;
1119 default:
1120 break;
1124 return NDR_ERR_SUCCESS;
1127 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetCharDevQInfo *r)
1129 int level;
1130 level = ndr_print_get_switch_value(ndr, r);
1131 ndr_print_union(ndr, name, level, "srvsvc_NetCharDevQInfo");
1132 switch (level) {
1133 case 0:
1134 ndr_print_ptr(ndr, "info0", r->info0);
1135 ndr->depth++;
1136 if (r->info0) {
1137 ndr_print_srvsvc_NetCharDevQInfo0(ndr, "info0", r->info0);
1139 ndr->depth--;
1140 break;
1142 case 1:
1143 ndr_print_ptr(ndr, "info1", r->info1);
1144 ndr->depth++;
1145 if (r->info1) {
1146 ndr_print_srvsvc_NetCharDevQInfo1(ndr, "info1", r->info1);
1148 ndr->depth--;
1149 break;
1151 default:
1152 break;
1157 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetCharDevQCtr *r)
1159 if (ndr_flags & NDR_SCALARS) {
1160 int level = ndr_push_get_switch_value(ndr, r);
1161 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
1162 switch (level) {
1163 case 0: {
1164 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0));
1165 break; }
1167 case 1: {
1168 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
1169 break; }
1171 default: {
1172 break; }
1176 if (ndr_flags & NDR_BUFFERS) {
1177 int level = ndr_push_get_switch_value(ndr, r);
1178 switch (level) {
1179 case 0:
1180 if (r->ctr0) {
1181 NDR_CHECK(ndr_push_srvsvc_NetCharDevQCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
1183 break;
1185 case 1:
1186 if (r->ctr1) {
1187 NDR_CHECK(ndr_push_srvsvc_NetCharDevQCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
1189 break;
1191 default:
1192 break;
1196 return NDR_ERR_SUCCESS;
1199 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetCharDevQCtr *r)
1201 int level;
1202 uint32_t _level;
1203 TALLOC_CTX *_mem_save_ctr0_0;
1204 uint32_t _ptr_ctr0;
1205 TALLOC_CTX *_mem_save_ctr1_0;
1206 uint32_t _ptr_ctr1;
1207 level = ndr_pull_get_switch_value(ndr, r);
1208 if (ndr_flags & NDR_SCALARS) {
1209 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
1210 if (_level != level) {
1211 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
1213 switch (level) {
1214 case 0: {
1215 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr0));
1216 if (_ptr_ctr0) {
1217 NDR_PULL_ALLOC(ndr, r->ctr0);
1218 } else {
1219 r->ctr0 = NULL;
1221 break; }
1223 case 1: {
1224 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
1225 if (_ptr_ctr1) {
1226 NDR_PULL_ALLOC(ndr, r->ctr1);
1227 } else {
1228 r->ctr1 = NULL;
1230 break; }
1232 default: {
1233 break; }
1237 if (ndr_flags & NDR_BUFFERS) {
1238 switch (level) {
1239 case 0:
1240 if (r->ctr0) {
1241 _mem_save_ctr0_0 = NDR_PULL_GET_MEM_CTX(ndr);
1242 NDR_PULL_SET_MEM_CTX(ndr, r->ctr0, 0);
1243 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
1244 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr0_0, 0);
1246 break;
1248 case 1:
1249 if (r->ctr1) {
1250 _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
1251 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
1252 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
1253 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
1255 break;
1257 default:
1258 break;
1262 return NDR_ERR_SUCCESS;
1265 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetCharDevQCtr *r)
1267 int level;
1268 level = ndr_print_get_switch_value(ndr, r);
1269 ndr_print_union(ndr, name, level, "srvsvc_NetCharDevQCtr");
1270 switch (level) {
1271 case 0:
1272 ndr_print_ptr(ndr, "ctr0", r->ctr0);
1273 ndr->depth++;
1274 if (r->ctr0) {
1275 ndr_print_srvsvc_NetCharDevQCtr0(ndr, "ctr0", r->ctr0);
1277 ndr->depth--;
1278 break;
1280 case 1:
1281 ndr_print_ptr(ndr, "ctr1", r->ctr1);
1282 ndr->depth++;
1283 if (r->ctr1) {
1284 ndr_print_srvsvc_NetCharDevQCtr1(ndr, "ctr1", r->ctr1);
1286 ndr->depth--;
1287 break;
1289 default:
1290 break;
1295 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQInfoCtr(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevQInfoCtr *r)
1297 if (ndr_flags & NDR_SCALARS) {
1298 NDR_CHECK(ndr_push_align(ndr, 4));
1299 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
1300 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level));
1301 NDR_CHECK(ndr_push_srvsvc_NetCharDevQCtr(ndr, NDR_SCALARS, &r->ctr));
1303 if (ndr_flags & NDR_BUFFERS) {
1304 NDR_CHECK(ndr_push_srvsvc_NetCharDevQCtr(ndr, NDR_BUFFERS, &r->ctr));
1306 return NDR_ERR_SUCCESS;
1309 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQInfoCtr(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevQInfoCtr *r)
1311 if (ndr_flags & NDR_SCALARS) {
1312 NDR_CHECK(ndr_pull_align(ndr, 4));
1313 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
1314 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level));
1315 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQCtr(ndr, NDR_SCALARS, &r->ctr));
1317 if (ndr_flags & NDR_BUFFERS) {
1318 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQCtr(ndr, NDR_BUFFERS, &r->ctr));
1320 return NDR_ERR_SUCCESS;
1323 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQInfoCtr *r)
1325 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQInfoCtr");
1326 ndr->depth++;
1327 ndr_print_uint32(ndr, "level", r->level);
1328 ndr_print_set_switch_value(ndr, &r->ctr, r->level);
1329 ndr_print_srvsvc_NetCharDevQCtr(ndr, "ctr", &r->ctr);
1330 ndr->depth--;
1333 static enum ndr_err_code ndr_push_srvsvc_NetConnInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetConnInfo0 *r)
1335 if (ndr_flags & NDR_SCALARS) {
1336 NDR_CHECK(ndr_push_align(ndr, 4));
1337 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->conn_id));
1339 if (ndr_flags & NDR_BUFFERS) {
1341 return NDR_ERR_SUCCESS;
1344 static enum ndr_err_code ndr_pull_srvsvc_NetConnInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnInfo0 *r)
1346 if (ndr_flags & NDR_SCALARS) {
1347 NDR_CHECK(ndr_pull_align(ndr, 4));
1348 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->conn_id));
1350 if (ndr_flags & NDR_BUFFERS) {
1352 return NDR_ERR_SUCCESS;
1355 _PUBLIC_ void ndr_print_srvsvc_NetConnInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnInfo0 *r)
1357 ndr_print_struct(ndr, name, "srvsvc_NetConnInfo0");
1358 ndr->depth++;
1359 ndr_print_uint32(ndr, "conn_id", r->conn_id);
1360 ndr->depth--;
1363 static enum ndr_err_code ndr_push_srvsvc_NetConnCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetConnCtr0 *r)
1365 uint32_t cntr_array_1;
1366 if (ndr_flags & NDR_SCALARS) {
1367 NDR_CHECK(ndr_push_align(ndr, 4));
1368 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1369 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
1371 if (ndr_flags & NDR_BUFFERS) {
1372 if (r->array) {
1373 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1374 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
1375 NDR_CHECK(ndr_push_srvsvc_NetConnInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
1379 return NDR_ERR_SUCCESS;
1382 static enum ndr_err_code ndr_pull_srvsvc_NetConnCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnCtr0 *r)
1384 uint32_t _ptr_array;
1385 uint32_t size_array_1 = 0;
1386 uint32_t cntr_array_1;
1387 TALLOC_CTX *_mem_save_array_0;
1388 TALLOC_CTX *_mem_save_array_1;
1389 if (ndr_flags & NDR_SCALARS) {
1390 NDR_CHECK(ndr_pull_align(ndr, 4));
1391 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
1392 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
1393 if (_ptr_array) {
1394 NDR_PULL_ALLOC(ndr, r->array);
1395 } else {
1396 r->array = NULL;
1399 if (ndr_flags & NDR_BUFFERS) {
1400 if (r->array) {
1401 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
1402 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
1403 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
1404 size_array_1 = ndr_get_array_size(ndr, &r->array);
1405 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
1406 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
1407 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
1408 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
1409 NDR_CHECK(ndr_pull_srvsvc_NetConnInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
1411 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
1412 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
1414 if (r->array) {
1415 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
1418 return NDR_ERR_SUCCESS;
1421 _PUBLIC_ void ndr_print_srvsvc_NetConnCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnCtr0 *r)
1423 uint32_t cntr_array_1;
1424 ndr_print_struct(ndr, name, "srvsvc_NetConnCtr0");
1425 ndr->depth++;
1426 ndr_print_uint32(ndr, "count", r->count);
1427 ndr_print_ptr(ndr, "array", r->array);
1428 ndr->depth++;
1429 if (r->array) {
1430 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
1431 ndr->depth++;
1432 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
1433 char *idx_1=NULL;
1434 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
1435 ndr_print_srvsvc_NetConnInfo0(ndr, "array", &r->array[cntr_array_1]);
1436 free(idx_1);
1439 ndr->depth--;
1441 ndr->depth--;
1442 ndr->depth--;
1445 static enum ndr_err_code ndr_push_srvsvc_NetConnInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetConnInfo1 *r)
1447 if (ndr_flags & NDR_SCALARS) {
1448 NDR_CHECK(ndr_push_align(ndr, 4));
1449 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->conn_id));
1450 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->conn_type));
1451 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_open));
1452 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_users));
1453 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->conn_time));
1454 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
1455 NDR_CHECK(ndr_push_unique_ptr(ndr, r->share));
1457 if (ndr_flags & NDR_BUFFERS) {
1458 if (r->user) {
1459 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
1460 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1461 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
1462 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1464 if (r->share) {
1465 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->share, CH_UTF16)));
1466 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1467 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->share, CH_UTF16)));
1468 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->share, ndr_charset_length(r->share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1471 return NDR_ERR_SUCCESS;
1474 static enum ndr_err_code ndr_pull_srvsvc_NetConnInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnInfo1 *r)
1476 uint32_t _ptr_user;
1477 uint32_t size_user_1 = 0;
1478 uint32_t length_user_1 = 0;
1479 TALLOC_CTX *_mem_save_user_0;
1480 uint32_t _ptr_share;
1481 uint32_t size_share_1 = 0;
1482 uint32_t length_share_1 = 0;
1483 TALLOC_CTX *_mem_save_share_0;
1484 if (ndr_flags & NDR_SCALARS) {
1485 NDR_CHECK(ndr_pull_align(ndr, 4));
1486 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->conn_id));
1487 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->conn_type));
1488 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_open));
1489 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_users));
1490 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->conn_time));
1491 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
1492 if (_ptr_user) {
1493 NDR_PULL_ALLOC(ndr, r->user);
1494 } else {
1495 r->user = NULL;
1497 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share));
1498 if (_ptr_share) {
1499 NDR_PULL_ALLOC(ndr, r->share);
1500 } else {
1501 r->share = NULL;
1504 if (ndr_flags & NDR_BUFFERS) {
1505 if (r->user) {
1506 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
1507 NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
1508 NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
1509 NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
1510 size_user_1 = ndr_get_array_size(ndr, &r->user);
1511 length_user_1 = ndr_get_array_length(ndr, &r->user);
1512 if (length_user_1 > size_user_1) {
1513 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_user_1, length_user_1);
1515 NDR_CHECK(ndr_check_string_terminator(ndr, length_user_1, sizeof(uint16_t)));
1516 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, length_user_1, sizeof(uint16_t), CH_UTF16));
1517 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
1519 if (r->share) {
1520 _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr);
1521 NDR_PULL_SET_MEM_CTX(ndr, r->share, 0);
1522 NDR_CHECK(ndr_pull_array_size(ndr, &r->share));
1523 NDR_CHECK(ndr_pull_array_length(ndr, &r->share));
1524 size_share_1 = ndr_get_array_size(ndr, &r->share);
1525 length_share_1 = ndr_get_array_length(ndr, &r->share);
1526 if (length_share_1 > size_share_1) {
1527 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_share_1, length_share_1);
1529 NDR_CHECK(ndr_check_string_terminator(ndr, length_share_1, sizeof(uint16_t)));
1530 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->share, length_share_1, sizeof(uint16_t), CH_UTF16));
1531 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0);
1534 return NDR_ERR_SUCCESS;
1537 _PUBLIC_ void ndr_print_srvsvc_NetConnInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnInfo1 *r)
1539 ndr_print_struct(ndr, name, "srvsvc_NetConnInfo1");
1540 ndr->depth++;
1541 ndr_print_uint32(ndr, "conn_id", r->conn_id);
1542 ndr_print_uint32(ndr, "conn_type", r->conn_type);
1543 ndr_print_uint32(ndr, "num_open", r->num_open);
1544 ndr_print_uint32(ndr, "num_users", r->num_users);
1545 ndr_print_uint32(ndr, "conn_time", r->conn_time);
1546 ndr_print_ptr(ndr, "user", r->user);
1547 ndr->depth++;
1548 if (r->user) {
1549 ndr_print_string(ndr, "user", r->user);
1551 ndr->depth--;
1552 ndr_print_ptr(ndr, "share", r->share);
1553 ndr->depth++;
1554 if (r->share) {
1555 ndr_print_string(ndr, "share", r->share);
1557 ndr->depth--;
1558 ndr->depth--;
1561 static enum ndr_err_code ndr_push_srvsvc_NetConnCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetConnCtr1 *r)
1563 uint32_t cntr_array_1;
1564 if (ndr_flags & NDR_SCALARS) {
1565 NDR_CHECK(ndr_push_align(ndr, 4));
1566 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1567 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
1569 if (ndr_flags & NDR_BUFFERS) {
1570 if (r->array) {
1571 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1572 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
1573 NDR_CHECK(ndr_push_srvsvc_NetConnInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
1575 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
1576 NDR_CHECK(ndr_push_srvsvc_NetConnInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
1580 return NDR_ERR_SUCCESS;
1583 static enum ndr_err_code ndr_pull_srvsvc_NetConnCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnCtr1 *r)
1585 uint32_t _ptr_array;
1586 uint32_t size_array_1 = 0;
1587 uint32_t cntr_array_1;
1588 TALLOC_CTX *_mem_save_array_0;
1589 TALLOC_CTX *_mem_save_array_1;
1590 if (ndr_flags & NDR_SCALARS) {
1591 NDR_CHECK(ndr_pull_align(ndr, 4));
1592 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
1593 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
1594 if (_ptr_array) {
1595 NDR_PULL_ALLOC(ndr, r->array);
1596 } else {
1597 r->array = NULL;
1600 if (ndr_flags & NDR_BUFFERS) {
1601 if (r->array) {
1602 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
1603 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
1604 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
1605 size_array_1 = ndr_get_array_size(ndr, &r->array);
1606 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
1607 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
1608 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
1609 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
1610 NDR_CHECK(ndr_pull_srvsvc_NetConnInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
1612 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
1613 NDR_CHECK(ndr_pull_srvsvc_NetConnInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
1615 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
1616 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
1618 if (r->array) {
1619 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
1622 return NDR_ERR_SUCCESS;
1625 _PUBLIC_ void ndr_print_srvsvc_NetConnCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnCtr1 *r)
1627 uint32_t cntr_array_1;
1628 ndr_print_struct(ndr, name, "srvsvc_NetConnCtr1");
1629 ndr->depth++;
1630 ndr_print_uint32(ndr, "count", r->count);
1631 ndr_print_ptr(ndr, "array", r->array);
1632 ndr->depth++;
1633 if (r->array) {
1634 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
1635 ndr->depth++;
1636 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
1637 char *idx_1=NULL;
1638 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
1639 ndr_print_srvsvc_NetConnInfo1(ndr, "array", &r->array[cntr_array_1]);
1640 free(idx_1);
1643 ndr->depth--;
1645 ndr->depth--;
1646 ndr->depth--;
1649 static enum ndr_err_code ndr_push_srvsvc_NetConnCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetConnCtr *r)
1651 if (ndr_flags & NDR_SCALARS) {
1652 int level = ndr_push_get_switch_value(ndr, r);
1653 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
1654 switch (level) {
1655 case 0: {
1656 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0));
1657 break; }
1659 case 1: {
1660 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
1661 break; }
1663 default: {
1664 break; }
1668 if (ndr_flags & NDR_BUFFERS) {
1669 int level = ndr_push_get_switch_value(ndr, r);
1670 switch (level) {
1671 case 0:
1672 if (r->ctr0) {
1673 NDR_CHECK(ndr_push_srvsvc_NetConnCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
1675 break;
1677 case 1:
1678 if (r->ctr1) {
1679 NDR_CHECK(ndr_push_srvsvc_NetConnCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
1681 break;
1683 default:
1684 break;
1688 return NDR_ERR_SUCCESS;
1691 static enum ndr_err_code ndr_pull_srvsvc_NetConnCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetConnCtr *r)
1693 int level;
1694 uint32_t _level;
1695 TALLOC_CTX *_mem_save_ctr0_0;
1696 uint32_t _ptr_ctr0;
1697 TALLOC_CTX *_mem_save_ctr1_0;
1698 uint32_t _ptr_ctr1;
1699 level = ndr_pull_get_switch_value(ndr, r);
1700 if (ndr_flags & NDR_SCALARS) {
1701 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
1702 if (_level != level) {
1703 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
1705 switch (level) {
1706 case 0: {
1707 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr0));
1708 if (_ptr_ctr0) {
1709 NDR_PULL_ALLOC(ndr, r->ctr0);
1710 } else {
1711 r->ctr0 = NULL;
1713 break; }
1715 case 1: {
1716 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
1717 if (_ptr_ctr1) {
1718 NDR_PULL_ALLOC(ndr, r->ctr1);
1719 } else {
1720 r->ctr1 = NULL;
1722 break; }
1724 default: {
1725 break; }
1729 if (ndr_flags & NDR_BUFFERS) {
1730 switch (level) {
1731 case 0:
1732 if (r->ctr0) {
1733 _mem_save_ctr0_0 = NDR_PULL_GET_MEM_CTX(ndr);
1734 NDR_PULL_SET_MEM_CTX(ndr, r->ctr0, 0);
1735 NDR_CHECK(ndr_pull_srvsvc_NetConnCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
1736 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr0_0, 0);
1738 break;
1740 case 1:
1741 if (r->ctr1) {
1742 _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
1743 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
1744 NDR_CHECK(ndr_pull_srvsvc_NetConnCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
1745 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
1747 break;
1749 default:
1750 break;
1754 return NDR_ERR_SUCCESS;
1757 _PUBLIC_ void ndr_print_srvsvc_NetConnCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetConnCtr *r)
1759 int level;
1760 level = ndr_print_get_switch_value(ndr, r);
1761 ndr_print_union(ndr, name, level, "srvsvc_NetConnCtr");
1762 switch (level) {
1763 case 0:
1764 ndr_print_ptr(ndr, "ctr0", r->ctr0);
1765 ndr->depth++;
1766 if (r->ctr0) {
1767 ndr_print_srvsvc_NetConnCtr0(ndr, "ctr0", r->ctr0);
1769 ndr->depth--;
1770 break;
1772 case 1:
1773 ndr_print_ptr(ndr, "ctr1", r->ctr1);
1774 ndr->depth++;
1775 if (r->ctr1) {
1776 ndr_print_srvsvc_NetConnCtr1(ndr, "ctr1", r->ctr1);
1778 ndr->depth--;
1779 break;
1781 default:
1782 break;
1787 static enum ndr_err_code ndr_push_srvsvc_NetConnInfoCtr(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetConnInfoCtr *r)
1789 if (ndr_flags & NDR_SCALARS) {
1790 NDR_CHECK(ndr_push_align(ndr, 4));
1791 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
1792 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level));
1793 NDR_CHECK(ndr_push_srvsvc_NetConnCtr(ndr, NDR_SCALARS, &r->ctr));
1795 if (ndr_flags & NDR_BUFFERS) {
1796 NDR_CHECK(ndr_push_srvsvc_NetConnCtr(ndr, NDR_BUFFERS, &r->ctr));
1798 return NDR_ERR_SUCCESS;
1801 static enum ndr_err_code ndr_pull_srvsvc_NetConnInfoCtr(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnInfoCtr *r)
1803 if (ndr_flags & NDR_SCALARS) {
1804 NDR_CHECK(ndr_pull_align(ndr, 4));
1805 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
1806 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level));
1807 NDR_CHECK(ndr_pull_srvsvc_NetConnCtr(ndr, NDR_SCALARS, &r->ctr));
1809 if (ndr_flags & NDR_BUFFERS) {
1810 NDR_CHECK(ndr_pull_srvsvc_NetConnCtr(ndr, NDR_BUFFERS, &r->ctr));
1812 return NDR_ERR_SUCCESS;
1815 _PUBLIC_ void ndr_print_srvsvc_NetConnInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnInfoCtr *r)
1817 ndr_print_struct(ndr, name, "srvsvc_NetConnInfoCtr");
1818 ndr->depth++;
1819 ndr_print_uint32(ndr, "level", r->level);
1820 ndr_print_set_switch_value(ndr, &r->ctr, r->level);
1821 ndr_print_srvsvc_NetConnCtr(ndr, "ctr", &r->ctr);
1822 ndr->depth--;
1825 static enum ndr_err_code ndr_push_srvsvc_NetFileInfo2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetFileInfo2 *r)
1827 if (ndr_flags & NDR_SCALARS) {
1828 NDR_CHECK(ndr_push_align(ndr, 4));
1829 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fid));
1831 if (ndr_flags & NDR_BUFFERS) {
1833 return NDR_ERR_SUCCESS;
1836 static enum ndr_err_code ndr_pull_srvsvc_NetFileInfo2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileInfo2 *r)
1838 if (ndr_flags & NDR_SCALARS) {
1839 NDR_CHECK(ndr_pull_align(ndr, 4));
1840 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fid));
1842 if (ndr_flags & NDR_BUFFERS) {
1844 return NDR_ERR_SUCCESS;
1847 _PUBLIC_ void ndr_print_srvsvc_NetFileInfo2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileInfo2 *r)
1849 ndr_print_struct(ndr, name, "srvsvc_NetFileInfo2");
1850 ndr->depth++;
1851 ndr_print_uint32(ndr, "fid", r->fid);
1852 ndr->depth--;
1855 static enum ndr_err_code ndr_push_srvsvc_NetFileCtr2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetFileCtr2 *r)
1857 uint32_t cntr_array_1;
1858 if (ndr_flags & NDR_SCALARS) {
1859 NDR_CHECK(ndr_push_align(ndr, 4));
1860 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1861 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
1863 if (ndr_flags & NDR_BUFFERS) {
1864 if (r->array) {
1865 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1866 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
1867 NDR_CHECK(ndr_push_srvsvc_NetFileInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
1871 return NDR_ERR_SUCCESS;
1874 static enum ndr_err_code ndr_pull_srvsvc_NetFileCtr2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileCtr2 *r)
1876 uint32_t _ptr_array;
1877 uint32_t size_array_1 = 0;
1878 uint32_t cntr_array_1;
1879 TALLOC_CTX *_mem_save_array_0;
1880 TALLOC_CTX *_mem_save_array_1;
1881 if (ndr_flags & NDR_SCALARS) {
1882 NDR_CHECK(ndr_pull_align(ndr, 4));
1883 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
1884 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
1885 if (_ptr_array) {
1886 NDR_PULL_ALLOC(ndr, r->array);
1887 } else {
1888 r->array = NULL;
1891 if (ndr_flags & NDR_BUFFERS) {
1892 if (r->array) {
1893 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
1894 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
1895 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
1896 size_array_1 = ndr_get_array_size(ndr, &r->array);
1897 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
1898 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
1899 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
1900 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
1901 NDR_CHECK(ndr_pull_srvsvc_NetFileInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
1903 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
1904 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
1906 if (r->array) {
1907 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
1910 return NDR_ERR_SUCCESS;
1913 _PUBLIC_ void ndr_print_srvsvc_NetFileCtr2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileCtr2 *r)
1915 uint32_t cntr_array_1;
1916 ndr_print_struct(ndr, name, "srvsvc_NetFileCtr2");
1917 ndr->depth++;
1918 ndr_print_uint32(ndr, "count", r->count);
1919 ndr_print_ptr(ndr, "array", r->array);
1920 ndr->depth++;
1921 if (r->array) {
1922 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
1923 ndr->depth++;
1924 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
1925 char *idx_1=NULL;
1926 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
1927 ndr_print_srvsvc_NetFileInfo2(ndr, "array", &r->array[cntr_array_1]);
1928 free(idx_1);
1931 ndr->depth--;
1933 ndr->depth--;
1934 ndr->depth--;
1937 static enum ndr_err_code ndr_push_srvsvc_NetFileInfo3(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetFileInfo3 *r)
1939 if (ndr_flags & NDR_SCALARS) {
1940 NDR_CHECK(ndr_push_align(ndr, 4));
1941 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fid));
1942 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->permissions));
1943 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_locks));
1944 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
1945 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
1947 if (ndr_flags & NDR_BUFFERS) {
1948 if (r->path) {
1949 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
1950 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1951 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
1952 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1954 if (r->user) {
1955 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
1956 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1957 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
1958 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1961 return NDR_ERR_SUCCESS;
1964 static enum ndr_err_code ndr_pull_srvsvc_NetFileInfo3(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileInfo3 *r)
1966 uint32_t _ptr_path;
1967 uint32_t size_path_1 = 0;
1968 uint32_t length_path_1 = 0;
1969 TALLOC_CTX *_mem_save_path_0;
1970 uint32_t _ptr_user;
1971 uint32_t size_user_1 = 0;
1972 uint32_t length_user_1 = 0;
1973 TALLOC_CTX *_mem_save_user_0;
1974 if (ndr_flags & NDR_SCALARS) {
1975 NDR_CHECK(ndr_pull_align(ndr, 4));
1976 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fid));
1977 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->permissions));
1978 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_locks));
1979 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
1980 if (_ptr_path) {
1981 NDR_PULL_ALLOC(ndr, r->path);
1982 } else {
1983 r->path = NULL;
1985 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
1986 if (_ptr_user) {
1987 NDR_PULL_ALLOC(ndr, r->user);
1988 } else {
1989 r->user = NULL;
1992 if (ndr_flags & NDR_BUFFERS) {
1993 if (r->path) {
1994 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
1995 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
1996 NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
1997 NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
1998 size_path_1 = ndr_get_array_size(ndr, &r->path);
1999 length_path_1 = ndr_get_array_length(ndr, &r->path);
2000 if (length_path_1 > size_path_1) {
2001 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_path_1, length_path_1);
2003 NDR_CHECK(ndr_check_string_terminator(ndr, length_path_1, sizeof(uint16_t)));
2004 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, length_path_1, sizeof(uint16_t), CH_UTF16));
2005 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
2007 if (r->user) {
2008 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
2009 NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
2010 NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
2011 NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
2012 size_user_1 = ndr_get_array_size(ndr, &r->user);
2013 length_user_1 = ndr_get_array_length(ndr, &r->user);
2014 if (length_user_1 > size_user_1) {
2015 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_user_1, length_user_1);
2017 NDR_CHECK(ndr_check_string_terminator(ndr, length_user_1, sizeof(uint16_t)));
2018 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, length_user_1, sizeof(uint16_t), CH_UTF16));
2019 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
2022 return NDR_ERR_SUCCESS;
2025 _PUBLIC_ void ndr_print_srvsvc_NetFileInfo3(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileInfo3 *r)
2027 ndr_print_struct(ndr, name, "srvsvc_NetFileInfo3");
2028 ndr->depth++;
2029 ndr_print_uint32(ndr, "fid", r->fid);
2030 ndr_print_uint32(ndr, "permissions", r->permissions);
2031 ndr_print_uint32(ndr, "num_locks", r->num_locks);
2032 ndr_print_ptr(ndr, "path", r->path);
2033 ndr->depth++;
2034 if (r->path) {
2035 ndr_print_string(ndr, "path", r->path);
2037 ndr->depth--;
2038 ndr_print_ptr(ndr, "user", r->user);
2039 ndr->depth++;
2040 if (r->user) {
2041 ndr_print_string(ndr, "user", r->user);
2043 ndr->depth--;
2044 ndr->depth--;
2047 static enum ndr_err_code ndr_push_srvsvc_NetFileCtr3(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetFileCtr3 *r)
2049 uint32_t cntr_array_1;
2050 if (ndr_flags & NDR_SCALARS) {
2051 NDR_CHECK(ndr_push_align(ndr, 4));
2052 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2053 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
2055 if (ndr_flags & NDR_BUFFERS) {
2056 if (r->array) {
2057 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2058 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2059 NDR_CHECK(ndr_push_srvsvc_NetFileInfo3(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
2061 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2062 NDR_CHECK(ndr_push_srvsvc_NetFileInfo3(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
2066 return NDR_ERR_SUCCESS;
2069 static enum ndr_err_code ndr_pull_srvsvc_NetFileCtr3(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileCtr3 *r)
2071 uint32_t _ptr_array;
2072 uint32_t size_array_1 = 0;
2073 uint32_t cntr_array_1;
2074 TALLOC_CTX *_mem_save_array_0;
2075 TALLOC_CTX *_mem_save_array_1;
2076 if (ndr_flags & NDR_SCALARS) {
2077 NDR_CHECK(ndr_pull_align(ndr, 4));
2078 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2079 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
2080 if (_ptr_array) {
2081 NDR_PULL_ALLOC(ndr, r->array);
2082 } else {
2083 r->array = NULL;
2086 if (ndr_flags & NDR_BUFFERS) {
2087 if (r->array) {
2088 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
2089 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
2090 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
2091 size_array_1 = ndr_get_array_size(ndr, &r->array);
2092 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
2093 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
2094 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
2095 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
2096 NDR_CHECK(ndr_pull_srvsvc_NetFileInfo3(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
2098 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
2099 NDR_CHECK(ndr_pull_srvsvc_NetFileInfo3(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
2101 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
2102 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
2104 if (r->array) {
2105 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
2108 return NDR_ERR_SUCCESS;
2111 _PUBLIC_ void ndr_print_srvsvc_NetFileCtr3(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileCtr3 *r)
2113 uint32_t cntr_array_1;
2114 ndr_print_struct(ndr, name, "srvsvc_NetFileCtr3");
2115 ndr->depth++;
2116 ndr_print_uint32(ndr, "count", r->count);
2117 ndr_print_ptr(ndr, "array", r->array);
2118 ndr->depth++;
2119 if (r->array) {
2120 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
2121 ndr->depth++;
2122 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
2123 char *idx_1=NULL;
2124 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
2125 ndr_print_srvsvc_NetFileInfo3(ndr, "array", &r->array[cntr_array_1]);
2126 free(idx_1);
2129 ndr->depth--;
2131 ndr->depth--;
2132 ndr->depth--;
2135 static enum ndr_err_code ndr_push_srvsvc_NetFileInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetFileInfo *r)
2137 if (ndr_flags & NDR_SCALARS) {
2138 int level = ndr_push_get_switch_value(ndr, r);
2139 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
2140 switch (level) {
2141 case 2: {
2142 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
2143 break; }
2145 case 3: {
2146 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3));
2147 break; }
2149 default: {
2150 break; }
2154 if (ndr_flags & NDR_BUFFERS) {
2155 int level = ndr_push_get_switch_value(ndr, r);
2156 switch (level) {
2157 case 2:
2158 if (r->info2) {
2159 NDR_CHECK(ndr_push_srvsvc_NetFileInfo2(ndr, NDR_SCALARS, r->info2));
2161 break;
2163 case 3:
2164 if (r->info3) {
2165 NDR_CHECK(ndr_push_srvsvc_NetFileInfo3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
2167 break;
2169 default:
2170 break;
2174 return NDR_ERR_SUCCESS;
2177 static enum ndr_err_code ndr_pull_srvsvc_NetFileInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetFileInfo *r)
2179 int level;
2180 uint32_t _level;
2181 TALLOC_CTX *_mem_save_info2_0;
2182 uint32_t _ptr_info2;
2183 TALLOC_CTX *_mem_save_info3_0;
2184 uint32_t _ptr_info3;
2185 level = ndr_pull_get_switch_value(ndr, r);
2186 if (ndr_flags & NDR_SCALARS) {
2187 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
2188 if (_level != level) {
2189 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
2191 switch (level) {
2192 case 2: {
2193 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
2194 if (_ptr_info2) {
2195 NDR_PULL_ALLOC(ndr, r->info2);
2196 } else {
2197 r->info2 = NULL;
2199 break; }
2201 case 3: {
2202 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info3));
2203 if (_ptr_info3) {
2204 NDR_PULL_ALLOC(ndr, r->info3);
2205 } else {
2206 r->info3 = NULL;
2208 break; }
2210 default: {
2211 break; }
2215 if (ndr_flags & NDR_BUFFERS) {
2216 switch (level) {
2217 case 2:
2218 if (r->info2) {
2219 _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
2220 NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
2221 NDR_CHECK(ndr_pull_srvsvc_NetFileInfo2(ndr, NDR_SCALARS, r->info2));
2222 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
2224 break;
2226 case 3:
2227 if (r->info3) {
2228 _mem_save_info3_0 = NDR_PULL_GET_MEM_CTX(ndr);
2229 NDR_PULL_SET_MEM_CTX(ndr, r->info3, 0);
2230 NDR_CHECK(ndr_pull_srvsvc_NetFileInfo3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
2231 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info3_0, 0);
2233 break;
2235 default:
2236 break;
2240 return NDR_ERR_SUCCESS;
2243 _PUBLIC_ void ndr_print_srvsvc_NetFileInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetFileInfo *r)
2245 int level;
2246 level = ndr_print_get_switch_value(ndr, r);
2247 ndr_print_union(ndr, name, level, "srvsvc_NetFileInfo");
2248 switch (level) {
2249 case 2:
2250 ndr_print_ptr(ndr, "info2", r->info2);
2251 ndr->depth++;
2252 if (r->info2) {
2253 ndr_print_srvsvc_NetFileInfo2(ndr, "info2", r->info2);
2255 ndr->depth--;
2256 break;
2258 case 3:
2259 ndr_print_ptr(ndr, "info3", r->info3);
2260 ndr->depth++;
2261 if (r->info3) {
2262 ndr_print_srvsvc_NetFileInfo3(ndr, "info3", r->info3);
2264 ndr->depth--;
2265 break;
2267 default:
2268 break;
2273 static enum ndr_err_code ndr_push_srvsvc_NetFileCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetFileCtr *r)
2275 if (ndr_flags & NDR_SCALARS) {
2276 int level = ndr_push_get_switch_value(ndr, r);
2277 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
2278 switch (level) {
2279 case 2: {
2280 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr2));
2281 break; }
2283 case 3: {
2284 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr3));
2285 break; }
2287 default: {
2288 break; }
2292 if (ndr_flags & NDR_BUFFERS) {
2293 int level = ndr_push_get_switch_value(ndr, r);
2294 switch (level) {
2295 case 2:
2296 if (r->ctr2) {
2297 NDR_CHECK(ndr_push_srvsvc_NetFileCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
2299 break;
2301 case 3:
2302 if (r->ctr3) {
2303 NDR_CHECK(ndr_push_srvsvc_NetFileCtr3(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr3));
2305 break;
2307 default:
2308 break;
2312 return NDR_ERR_SUCCESS;
2315 static enum ndr_err_code ndr_pull_srvsvc_NetFileCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetFileCtr *r)
2317 int level;
2318 uint32_t _level;
2319 TALLOC_CTX *_mem_save_ctr2_0;
2320 uint32_t _ptr_ctr2;
2321 TALLOC_CTX *_mem_save_ctr3_0;
2322 uint32_t _ptr_ctr3;
2323 level = ndr_pull_get_switch_value(ndr, r);
2324 if (ndr_flags & NDR_SCALARS) {
2325 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
2326 if (_level != level) {
2327 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
2329 switch (level) {
2330 case 2: {
2331 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr2));
2332 if (_ptr_ctr2) {
2333 NDR_PULL_ALLOC(ndr, r->ctr2);
2334 } else {
2335 r->ctr2 = NULL;
2337 break; }
2339 case 3: {
2340 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr3));
2341 if (_ptr_ctr3) {
2342 NDR_PULL_ALLOC(ndr, r->ctr3);
2343 } else {
2344 r->ctr3 = NULL;
2346 break; }
2348 default: {
2349 break; }
2353 if (ndr_flags & NDR_BUFFERS) {
2354 switch (level) {
2355 case 2:
2356 if (r->ctr2) {
2357 _mem_save_ctr2_0 = NDR_PULL_GET_MEM_CTX(ndr);
2358 NDR_PULL_SET_MEM_CTX(ndr, r->ctr2, 0);
2359 NDR_CHECK(ndr_pull_srvsvc_NetFileCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
2360 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr2_0, 0);
2362 break;
2364 case 3:
2365 if (r->ctr3) {
2366 _mem_save_ctr3_0 = NDR_PULL_GET_MEM_CTX(ndr);
2367 NDR_PULL_SET_MEM_CTX(ndr, r->ctr3, 0);
2368 NDR_CHECK(ndr_pull_srvsvc_NetFileCtr3(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr3));
2369 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr3_0, 0);
2371 break;
2373 default:
2374 break;
2378 return NDR_ERR_SUCCESS;
2381 _PUBLIC_ void ndr_print_srvsvc_NetFileCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetFileCtr *r)
2383 int level;
2384 level = ndr_print_get_switch_value(ndr, r);
2385 ndr_print_union(ndr, name, level, "srvsvc_NetFileCtr");
2386 switch (level) {
2387 case 2:
2388 ndr_print_ptr(ndr, "ctr2", r->ctr2);
2389 ndr->depth++;
2390 if (r->ctr2) {
2391 ndr_print_srvsvc_NetFileCtr2(ndr, "ctr2", r->ctr2);
2393 ndr->depth--;
2394 break;
2396 case 3:
2397 ndr_print_ptr(ndr, "ctr3", r->ctr3);
2398 ndr->depth++;
2399 if (r->ctr3) {
2400 ndr_print_srvsvc_NetFileCtr3(ndr, "ctr3", r->ctr3);
2402 ndr->depth--;
2403 break;
2405 default:
2406 break;
2411 static enum ndr_err_code ndr_push_srvsvc_NetFileInfoCtr(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetFileInfoCtr *r)
2413 if (ndr_flags & NDR_SCALARS) {
2414 NDR_CHECK(ndr_push_align(ndr, 4));
2415 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
2416 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level));
2417 NDR_CHECK(ndr_push_srvsvc_NetFileCtr(ndr, NDR_SCALARS, &r->ctr));
2419 if (ndr_flags & NDR_BUFFERS) {
2420 NDR_CHECK(ndr_push_srvsvc_NetFileCtr(ndr, NDR_BUFFERS, &r->ctr));
2422 return NDR_ERR_SUCCESS;
2425 static enum ndr_err_code ndr_pull_srvsvc_NetFileInfoCtr(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileInfoCtr *r)
2427 if (ndr_flags & NDR_SCALARS) {
2428 NDR_CHECK(ndr_pull_align(ndr, 4));
2429 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
2430 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level));
2431 NDR_CHECK(ndr_pull_srvsvc_NetFileCtr(ndr, NDR_SCALARS, &r->ctr));
2433 if (ndr_flags & NDR_BUFFERS) {
2434 NDR_CHECK(ndr_pull_srvsvc_NetFileCtr(ndr, NDR_BUFFERS, &r->ctr));
2436 return NDR_ERR_SUCCESS;
2439 _PUBLIC_ void ndr_print_srvsvc_NetFileInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileInfoCtr *r)
2441 ndr_print_struct(ndr, name, "srvsvc_NetFileInfoCtr");
2442 ndr->depth++;
2443 ndr_print_uint32(ndr, "level", r->level);
2444 ndr_print_set_switch_value(ndr, &r->ctr, r->level);
2445 ndr_print_srvsvc_NetFileCtr(ndr, "ctr", &r->ctr);
2446 ndr->depth--;
2449 static enum ndr_err_code ndr_push_srvsvc_NetSessInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfo0 *r)
2451 if (ndr_flags & NDR_SCALARS) {
2452 NDR_CHECK(ndr_push_align(ndr, 4));
2453 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client));
2455 if (ndr_flags & NDR_BUFFERS) {
2456 if (r->client) {
2457 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
2458 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2459 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
2460 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client, ndr_charset_length(r->client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2463 return NDR_ERR_SUCCESS;
2466 static enum ndr_err_code ndr_pull_srvsvc_NetSessInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfo0 *r)
2468 uint32_t _ptr_client;
2469 uint32_t size_client_1 = 0;
2470 uint32_t length_client_1 = 0;
2471 TALLOC_CTX *_mem_save_client_0;
2472 if (ndr_flags & NDR_SCALARS) {
2473 NDR_CHECK(ndr_pull_align(ndr, 4));
2474 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
2475 if (_ptr_client) {
2476 NDR_PULL_ALLOC(ndr, r->client);
2477 } else {
2478 r->client = NULL;
2481 if (ndr_flags & NDR_BUFFERS) {
2482 if (r->client) {
2483 _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
2484 NDR_PULL_SET_MEM_CTX(ndr, r->client, 0);
2485 NDR_CHECK(ndr_pull_array_size(ndr, &r->client));
2486 NDR_CHECK(ndr_pull_array_length(ndr, &r->client));
2487 size_client_1 = ndr_get_array_size(ndr, &r->client);
2488 length_client_1 = ndr_get_array_length(ndr, &r->client);
2489 if (length_client_1 > size_client_1) {
2490 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_client_1, length_client_1);
2492 NDR_CHECK(ndr_check_string_terminator(ndr, length_client_1, sizeof(uint16_t)));
2493 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client, length_client_1, sizeof(uint16_t), CH_UTF16));
2494 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
2497 return NDR_ERR_SUCCESS;
2500 _PUBLIC_ void ndr_print_srvsvc_NetSessInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo0 *r)
2502 ndr_print_struct(ndr, name, "srvsvc_NetSessInfo0");
2503 ndr->depth++;
2504 ndr_print_ptr(ndr, "client", r->client);
2505 ndr->depth++;
2506 if (r->client) {
2507 ndr_print_string(ndr, "client", r->client);
2509 ndr->depth--;
2510 ndr->depth--;
2513 static enum ndr_err_code ndr_push_srvsvc_NetSessCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessCtr0 *r)
2515 uint32_t cntr_array_1;
2516 if (ndr_flags & NDR_SCALARS) {
2517 NDR_CHECK(ndr_push_align(ndr, 4));
2518 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2519 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
2521 if (ndr_flags & NDR_BUFFERS) {
2522 if (r->array) {
2523 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2524 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2525 NDR_CHECK(ndr_push_srvsvc_NetSessInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
2527 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2528 NDR_CHECK(ndr_push_srvsvc_NetSessInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
2532 return NDR_ERR_SUCCESS;
2535 static enum ndr_err_code ndr_pull_srvsvc_NetSessCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr0 *r)
2537 uint32_t _ptr_array;
2538 uint32_t size_array_1 = 0;
2539 uint32_t cntr_array_1;
2540 TALLOC_CTX *_mem_save_array_0;
2541 TALLOC_CTX *_mem_save_array_1;
2542 if (ndr_flags & NDR_SCALARS) {
2543 NDR_CHECK(ndr_pull_align(ndr, 4));
2544 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2545 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
2546 if (_ptr_array) {
2547 NDR_PULL_ALLOC(ndr, r->array);
2548 } else {
2549 r->array = NULL;
2552 if (ndr_flags & NDR_BUFFERS) {
2553 if (r->array) {
2554 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
2555 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
2556 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
2557 size_array_1 = ndr_get_array_size(ndr, &r->array);
2558 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
2559 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
2560 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
2561 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
2562 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
2564 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
2565 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
2567 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
2568 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
2570 if (r->array) {
2571 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
2574 return NDR_ERR_SUCCESS;
2577 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr0 *r)
2579 uint32_t cntr_array_1;
2580 ndr_print_struct(ndr, name, "srvsvc_NetSessCtr0");
2581 ndr->depth++;
2582 ndr_print_uint32(ndr, "count", r->count);
2583 ndr_print_ptr(ndr, "array", r->array);
2584 ndr->depth++;
2585 if (r->array) {
2586 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
2587 ndr->depth++;
2588 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
2589 char *idx_1=NULL;
2590 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
2591 ndr_print_srvsvc_NetSessInfo0(ndr, "array", &r->array[cntr_array_1]);
2592 free(idx_1);
2595 ndr->depth--;
2597 ndr->depth--;
2598 ndr->depth--;
2601 static enum ndr_err_code ndr_push_srvsvc_NetSessInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfo1 *r)
2603 if (ndr_flags & NDR_SCALARS) {
2604 NDR_CHECK(ndr_push_align(ndr, 4));
2605 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client));
2606 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
2607 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_open));
2608 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
2609 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idle_time));
2610 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->user_flags));
2612 if (ndr_flags & NDR_BUFFERS) {
2613 if (r->client) {
2614 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
2615 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2616 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
2617 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client, ndr_charset_length(r->client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2619 if (r->user) {
2620 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
2621 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2622 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
2623 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2626 return NDR_ERR_SUCCESS;
2629 static enum ndr_err_code ndr_pull_srvsvc_NetSessInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfo1 *r)
2631 uint32_t _ptr_client;
2632 uint32_t size_client_1 = 0;
2633 uint32_t length_client_1 = 0;
2634 TALLOC_CTX *_mem_save_client_0;
2635 uint32_t _ptr_user;
2636 uint32_t size_user_1 = 0;
2637 uint32_t length_user_1 = 0;
2638 TALLOC_CTX *_mem_save_user_0;
2639 if (ndr_flags & NDR_SCALARS) {
2640 NDR_CHECK(ndr_pull_align(ndr, 4));
2641 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
2642 if (_ptr_client) {
2643 NDR_PULL_ALLOC(ndr, r->client);
2644 } else {
2645 r->client = NULL;
2647 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
2648 if (_ptr_user) {
2649 NDR_PULL_ALLOC(ndr, r->user);
2650 } else {
2651 r->user = NULL;
2653 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_open));
2654 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
2655 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idle_time));
2656 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->user_flags));
2658 if (ndr_flags & NDR_BUFFERS) {
2659 if (r->client) {
2660 _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
2661 NDR_PULL_SET_MEM_CTX(ndr, r->client, 0);
2662 NDR_CHECK(ndr_pull_array_size(ndr, &r->client));
2663 NDR_CHECK(ndr_pull_array_length(ndr, &r->client));
2664 size_client_1 = ndr_get_array_size(ndr, &r->client);
2665 length_client_1 = ndr_get_array_length(ndr, &r->client);
2666 if (length_client_1 > size_client_1) {
2667 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_client_1, length_client_1);
2669 NDR_CHECK(ndr_check_string_terminator(ndr, length_client_1, sizeof(uint16_t)));
2670 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client, length_client_1, sizeof(uint16_t), CH_UTF16));
2671 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
2673 if (r->user) {
2674 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
2675 NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
2676 NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
2677 NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
2678 size_user_1 = ndr_get_array_size(ndr, &r->user);
2679 length_user_1 = ndr_get_array_length(ndr, &r->user);
2680 if (length_user_1 > size_user_1) {
2681 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_user_1, length_user_1);
2683 NDR_CHECK(ndr_check_string_terminator(ndr, length_user_1, sizeof(uint16_t)));
2684 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, length_user_1, sizeof(uint16_t), CH_UTF16));
2685 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
2688 return NDR_ERR_SUCCESS;
2691 _PUBLIC_ void ndr_print_srvsvc_NetSessInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo1 *r)
2693 ndr_print_struct(ndr, name, "srvsvc_NetSessInfo1");
2694 ndr->depth++;
2695 ndr_print_ptr(ndr, "client", r->client);
2696 ndr->depth++;
2697 if (r->client) {
2698 ndr_print_string(ndr, "client", r->client);
2700 ndr->depth--;
2701 ndr_print_ptr(ndr, "user", r->user);
2702 ndr->depth++;
2703 if (r->user) {
2704 ndr_print_string(ndr, "user", r->user);
2706 ndr->depth--;
2707 ndr_print_uint32(ndr, "num_open", r->num_open);
2708 ndr_print_uint32(ndr, "time", r->time);
2709 ndr_print_uint32(ndr, "idle_time", r->idle_time);
2710 ndr_print_uint32(ndr, "user_flags", r->user_flags);
2711 ndr->depth--;
2714 static enum ndr_err_code ndr_push_srvsvc_NetSessCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessCtr1 *r)
2716 uint32_t cntr_array_1;
2717 if (ndr_flags & NDR_SCALARS) {
2718 NDR_CHECK(ndr_push_align(ndr, 4));
2719 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2720 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
2722 if (ndr_flags & NDR_BUFFERS) {
2723 if (r->array) {
2724 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2725 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2726 NDR_CHECK(ndr_push_srvsvc_NetSessInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
2728 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2729 NDR_CHECK(ndr_push_srvsvc_NetSessInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
2733 return NDR_ERR_SUCCESS;
2736 static enum ndr_err_code ndr_pull_srvsvc_NetSessCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr1 *r)
2738 uint32_t _ptr_array;
2739 uint32_t size_array_1 = 0;
2740 uint32_t cntr_array_1;
2741 TALLOC_CTX *_mem_save_array_0;
2742 TALLOC_CTX *_mem_save_array_1;
2743 if (ndr_flags & NDR_SCALARS) {
2744 NDR_CHECK(ndr_pull_align(ndr, 4));
2745 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2746 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
2747 if (_ptr_array) {
2748 NDR_PULL_ALLOC(ndr, r->array);
2749 } else {
2750 r->array = NULL;
2753 if (ndr_flags & NDR_BUFFERS) {
2754 if (r->array) {
2755 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
2756 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
2757 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
2758 size_array_1 = ndr_get_array_size(ndr, &r->array);
2759 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
2760 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
2761 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
2762 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
2763 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
2765 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
2766 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
2768 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
2769 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
2771 if (r->array) {
2772 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
2775 return NDR_ERR_SUCCESS;
2778 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr1 *r)
2780 uint32_t cntr_array_1;
2781 ndr_print_struct(ndr, name, "srvsvc_NetSessCtr1");
2782 ndr->depth++;
2783 ndr_print_uint32(ndr, "count", r->count);
2784 ndr_print_ptr(ndr, "array", r->array);
2785 ndr->depth++;
2786 if (r->array) {
2787 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
2788 ndr->depth++;
2789 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
2790 char *idx_1=NULL;
2791 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
2792 ndr_print_srvsvc_NetSessInfo1(ndr, "array", &r->array[cntr_array_1]);
2793 free(idx_1);
2796 ndr->depth--;
2798 ndr->depth--;
2799 ndr->depth--;
2802 static enum ndr_err_code ndr_push_srvsvc_NetSessInfo2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfo2 *r)
2804 if (ndr_flags & NDR_SCALARS) {
2805 NDR_CHECK(ndr_push_align(ndr, 4));
2806 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client));
2807 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
2808 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_open));
2809 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
2810 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idle_time));
2811 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->user_flags));
2812 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client_type));
2814 if (ndr_flags & NDR_BUFFERS) {
2815 if (r->client) {
2816 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
2817 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2818 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
2819 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client, ndr_charset_length(r->client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2821 if (r->user) {
2822 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
2823 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2824 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
2825 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2827 if (r->client_type) {
2828 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client_type, CH_UTF16)));
2829 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2830 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client_type, CH_UTF16)));
2831 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client_type, ndr_charset_length(r->client_type, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2834 return NDR_ERR_SUCCESS;
2837 static enum ndr_err_code ndr_pull_srvsvc_NetSessInfo2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfo2 *r)
2839 uint32_t _ptr_client;
2840 uint32_t size_client_1 = 0;
2841 uint32_t length_client_1 = 0;
2842 TALLOC_CTX *_mem_save_client_0;
2843 uint32_t _ptr_user;
2844 uint32_t size_user_1 = 0;
2845 uint32_t length_user_1 = 0;
2846 TALLOC_CTX *_mem_save_user_0;
2847 uint32_t _ptr_client_type;
2848 uint32_t size_client_type_1 = 0;
2849 uint32_t length_client_type_1 = 0;
2850 TALLOC_CTX *_mem_save_client_type_0;
2851 if (ndr_flags & NDR_SCALARS) {
2852 NDR_CHECK(ndr_pull_align(ndr, 4));
2853 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
2854 if (_ptr_client) {
2855 NDR_PULL_ALLOC(ndr, r->client);
2856 } else {
2857 r->client = NULL;
2859 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
2860 if (_ptr_user) {
2861 NDR_PULL_ALLOC(ndr, r->user);
2862 } else {
2863 r->user = NULL;
2865 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_open));
2866 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
2867 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idle_time));
2868 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->user_flags));
2869 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client_type));
2870 if (_ptr_client_type) {
2871 NDR_PULL_ALLOC(ndr, r->client_type);
2872 } else {
2873 r->client_type = NULL;
2876 if (ndr_flags & NDR_BUFFERS) {
2877 if (r->client) {
2878 _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
2879 NDR_PULL_SET_MEM_CTX(ndr, r->client, 0);
2880 NDR_CHECK(ndr_pull_array_size(ndr, &r->client));
2881 NDR_CHECK(ndr_pull_array_length(ndr, &r->client));
2882 size_client_1 = ndr_get_array_size(ndr, &r->client);
2883 length_client_1 = ndr_get_array_length(ndr, &r->client);
2884 if (length_client_1 > size_client_1) {
2885 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_client_1, length_client_1);
2887 NDR_CHECK(ndr_check_string_terminator(ndr, length_client_1, sizeof(uint16_t)));
2888 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client, length_client_1, sizeof(uint16_t), CH_UTF16));
2889 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
2891 if (r->user) {
2892 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
2893 NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
2894 NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
2895 NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
2896 size_user_1 = ndr_get_array_size(ndr, &r->user);
2897 length_user_1 = ndr_get_array_length(ndr, &r->user);
2898 if (length_user_1 > size_user_1) {
2899 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_user_1, length_user_1);
2901 NDR_CHECK(ndr_check_string_terminator(ndr, length_user_1, sizeof(uint16_t)));
2902 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, length_user_1, sizeof(uint16_t), CH_UTF16));
2903 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
2905 if (r->client_type) {
2906 _mem_save_client_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
2907 NDR_PULL_SET_MEM_CTX(ndr, r->client_type, 0);
2908 NDR_CHECK(ndr_pull_array_size(ndr, &r->client_type));
2909 NDR_CHECK(ndr_pull_array_length(ndr, &r->client_type));
2910 size_client_type_1 = ndr_get_array_size(ndr, &r->client_type);
2911 length_client_type_1 = ndr_get_array_length(ndr, &r->client_type);
2912 if (length_client_type_1 > size_client_type_1) {
2913 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_client_type_1, length_client_type_1);
2915 NDR_CHECK(ndr_check_string_terminator(ndr, length_client_type_1, sizeof(uint16_t)));
2916 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client_type, length_client_type_1, sizeof(uint16_t), CH_UTF16));
2917 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_type_0, 0);
2920 return NDR_ERR_SUCCESS;
2923 _PUBLIC_ void ndr_print_srvsvc_NetSessInfo2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo2 *r)
2925 ndr_print_struct(ndr, name, "srvsvc_NetSessInfo2");
2926 ndr->depth++;
2927 ndr_print_ptr(ndr, "client", r->client);
2928 ndr->depth++;
2929 if (r->client) {
2930 ndr_print_string(ndr, "client", r->client);
2932 ndr->depth--;
2933 ndr_print_ptr(ndr, "user", r->user);
2934 ndr->depth++;
2935 if (r->user) {
2936 ndr_print_string(ndr, "user", r->user);
2938 ndr->depth--;
2939 ndr_print_uint32(ndr, "num_open", r->num_open);
2940 ndr_print_uint32(ndr, "time", r->time);
2941 ndr_print_uint32(ndr, "idle_time", r->idle_time);
2942 ndr_print_uint32(ndr, "user_flags", r->user_flags);
2943 ndr_print_ptr(ndr, "client_type", r->client_type);
2944 ndr->depth++;
2945 if (r->client_type) {
2946 ndr_print_string(ndr, "client_type", r->client_type);
2948 ndr->depth--;
2949 ndr->depth--;
2952 static enum ndr_err_code ndr_push_srvsvc_NetSessCtr2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessCtr2 *r)
2954 uint32_t cntr_array_1;
2955 if (ndr_flags & NDR_SCALARS) {
2956 NDR_CHECK(ndr_push_align(ndr, 4));
2957 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2958 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
2960 if (ndr_flags & NDR_BUFFERS) {
2961 if (r->array) {
2962 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2963 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2964 NDR_CHECK(ndr_push_srvsvc_NetSessInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
2966 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2967 NDR_CHECK(ndr_push_srvsvc_NetSessInfo2(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
2971 return NDR_ERR_SUCCESS;
2974 static enum ndr_err_code ndr_pull_srvsvc_NetSessCtr2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr2 *r)
2976 uint32_t _ptr_array;
2977 uint32_t size_array_1 = 0;
2978 uint32_t cntr_array_1;
2979 TALLOC_CTX *_mem_save_array_0;
2980 TALLOC_CTX *_mem_save_array_1;
2981 if (ndr_flags & NDR_SCALARS) {
2982 NDR_CHECK(ndr_pull_align(ndr, 4));
2983 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2984 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
2985 if (_ptr_array) {
2986 NDR_PULL_ALLOC(ndr, r->array);
2987 } else {
2988 r->array = NULL;
2991 if (ndr_flags & NDR_BUFFERS) {
2992 if (r->array) {
2993 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
2994 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
2995 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
2996 size_array_1 = ndr_get_array_size(ndr, &r->array);
2997 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
2998 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
2999 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
3000 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
3001 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
3003 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
3004 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo2(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
3006 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
3007 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
3009 if (r->array) {
3010 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
3013 return NDR_ERR_SUCCESS;
3016 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr2 *r)
3018 uint32_t cntr_array_1;
3019 ndr_print_struct(ndr, name, "srvsvc_NetSessCtr2");
3020 ndr->depth++;
3021 ndr_print_uint32(ndr, "count", r->count);
3022 ndr_print_ptr(ndr, "array", r->array);
3023 ndr->depth++;
3024 if (r->array) {
3025 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
3026 ndr->depth++;
3027 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
3028 char *idx_1=NULL;
3029 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
3030 ndr_print_srvsvc_NetSessInfo2(ndr, "array", &r->array[cntr_array_1]);
3031 free(idx_1);
3034 ndr->depth--;
3036 ndr->depth--;
3037 ndr->depth--;
3040 static enum ndr_err_code ndr_push_srvsvc_NetSessInfo10(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfo10 *r)
3042 if (ndr_flags & NDR_SCALARS) {
3043 NDR_CHECK(ndr_push_align(ndr, 4));
3044 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client));
3045 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
3046 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
3047 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idle_time));
3049 if (ndr_flags & NDR_BUFFERS) {
3050 if (r->client) {
3051 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
3052 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3053 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
3054 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client, ndr_charset_length(r->client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3056 if (r->user) {
3057 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
3058 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3059 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
3060 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3063 return NDR_ERR_SUCCESS;
3066 static enum ndr_err_code ndr_pull_srvsvc_NetSessInfo10(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfo10 *r)
3068 uint32_t _ptr_client;
3069 uint32_t size_client_1 = 0;
3070 uint32_t length_client_1 = 0;
3071 TALLOC_CTX *_mem_save_client_0;
3072 uint32_t _ptr_user;
3073 uint32_t size_user_1 = 0;
3074 uint32_t length_user_1 = 0;
3075 TALLOC_CTX *_mem_save_user_0;
3076 if (ndr_flags & NDR_SCALARS) {
3077 NDR_CHECK(ndr_pull_align(ndr, 4));
3078 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
3079 if (_ptr_client) {
3080 NDR_PULL_ALLOC(ndr, r->client);
3081 } else {
3082 r->client = NULL;
3084 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
3085 if (_ptr_user) {
3086 NDR_PULL_ALLOC(ndr, r->user);
3087 } else {
3088 r->user = NULL;
3090 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
3091 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idle_time));
3093 if (ndr_flags & NDR_BUFFERS) {
3094 if (r->client) {
3095 _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
3096 NDR_PULL_SET_MEM_CTX(ndr, r->client, 0);
3097 NDR_CHECK(ndr_pull_array_size(ndr, &r->client));
3098 NDR_CHECK(ndr_pull_array_length(ndr, &r->client));
3099 size_client_1 = ndr_get_array_size(ndr, &r->client);
3100 length_client_1 = ndr_get_array_length(ndr, &r->client);
3101 if (length_client_1 > size_client_1) {
3102 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_client_1, length_client_1);
3104 NDR_CHECK(ndr_check_string_terminator(ndr, length_client_1, sizeof(uint16_t)));
3105 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client, length_client_1, sizeof(uint16_t), CH_UTF16));
3106 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
3108 if (r->user) {
3109 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
3110 NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
3111 NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
3112 NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
3113 size_user_1 = ndr_get_array_size(ndr, &r->user);
3114 length_user_1 = ndr_get_array_length(ndr, &r->user);
3115 if (length_user_1 > size_user_1) {
3116 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_user_1, length_user_1);
3118 NDR_CHECK(ndr_check_string_terminator(ndr, length_user_1, sizeof(uint16_t)));
3119 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, length_user_1, sizeof(uint16_t), CH_UTF16));
3120 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
3123 return NDR_ERR_SUCCESS;
3126 _PUBLIC_ void ndr_print_srvsvc_NetSessInfo10(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo10 *r)
3128 ndr_print_struct(ndr, name, "srvsvc_NetSessInfo10");
3129 ndr->depth++;
3130 ndr_print_ptr(ndr, "client", r->client);
3131 ndr->depth++;
3132 if (r->client) {
3133 ndr_print_string(ndr, "client", r->client);
3135 ndr->depth--;
3136 ndr_print_ptr(ndr, "user", r->user);
3137 ndr->depth++;
3138 if (r->user) {
3139 ndr_print_string(ndr, "user", r->user);
3141 ndr->depth--;
3142 ndr_print_uint32(ndr, "time", r->time);
3143 ndr_print_uint32(ndr, "idle_time", r->idle_time);
3144 ndr->depth--;
3147 static enum ndr_err_code ndr_push_srvsvc_NetSessCtr10(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessCtr10 *r)
3149 uint32_t cntr_array_1;
3150 if (ndr_flags & NDR_SCALARS) {
3151 NDR_CHECK(ndr_push_align(ndr, 4));
3152 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
3153 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
3155 if (ndr_flags & NDR_BUFFERS) {
3156 if (r->array) {
3157 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
3158 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3159 NDR_CHECK(ndr_push_srvsvc_NetSessInfo10(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
3161 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3162 NDR_CHECK(ndr_push_srvsvc_NetSessInfo10(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
3166 return NDR_ERR_SUCCESS;
3169 static enum ndr_err_code ndr_pull_srvsvc_NetSessCtr10(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr10 *r)
3171 uint32_t _ptr_array;
3172 uint32_t size_array_1 = 0;
3173 uint32_t cntr_array_1;
3174 TALLOC_CTX *_mem_save_array_0;
3175 TALLOC_CTX *_mem_save_array_1;
3176 if (ndr_flags & NDR_SCALARS) {
3177 NDR_CHECK(ndr_pull_align(ndr, 4));
3178 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
3179 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
3180 if (_ptr_array) {
3181 NDR_PULL_ALLOC(ndr, r->array);
3182 } else {
3183 r->array = NULL;
3186 if (ndr_flags & NDR_BUFFERS) {
3187 if (r->array) {
3188 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
3189 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
3190 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
3191 size_array_1 = ndr_get_array_size(ndr, &r->array);
3192 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
3193 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
3194 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
3195 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
3196 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo10(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
3198 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
3199 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo10(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
3201 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
3202 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
3204 if (r->array) {
3205 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
3208 return NDR_ERR_SUCCESS;
3211 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr10(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr10 *r)
3213 uint32_t cntr_array_1;
3214 ndr_print_struct(ndr, name, "srvsvc_NetSessCtr10");
3215 ndr->depth++;
3216 ndr_print_uint32(ndr, "count", r->count);
3217 ndr_print_ptr(ndr, "array", r->array);
3218 ndr->depth++;
3219 if (r->array) {
3220 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
3221 ndr->depth++;
3222 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
3223 char *idx_1=NULL;
3224 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
3225 ndr_print_srvsvc_NetSessInfo10(ndr, "array", &r->array[cntr_array_1]);
3226 free(idx_1);
3229 ndr->depth--;
3231 ndr->depth--;
3232 ndr->depth--;
3235 static enum ndr_err_code ndr_push_srvsvc_NetSessInfo502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfo502 *r)
3237 if (ndr_flags & NDR_SCALARS) {
3238 NDR_CHECK(ndr_push_align(ndr, 4));
3239 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client));
3240 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
3241 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_open));
3242 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
3243 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idle_time));
3244 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->user_flags));
3245 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client_type));
3246 NDR_CHECK(ndr_push_unique_ptr(ndr, r->transport));
3248 if (ndr_flags & NDR_BUFFERS) {
3249 if (r->client) {
3250 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
3251 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3252 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
3253 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client, ndr_charset_length(r->client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3255 if (r->user) {
3256 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
3257 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3258 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
3259 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3261 if (r->client_type) {
3262 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client_type, CH_UTF16)));
3263 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3264 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client_type, CH_UTF16)));
3265 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client_type, ndr_charset_length(r->client_type, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3267 if (r->transport) {
3268 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->transport, CH_UTF16)));
3269 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3270 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->transport, CH_UTF16)));
3271 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->transport, ndr_charset_length(r->transport, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3274 return NDR_ERR_SUCCESS;
3277 static enum ndr_err_code ndr_pull_srvsvc_NetSessInfo502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfo502 *r)
3279 uint32_t _ptr_client;
3280 uint32_t size_client_1 = 0;
3281 uint32_t length_client_1 = 0;
3282 TALLOC_CTX *_mem_save_client_0;
3283 uint32_t _ptr_user;
3284 uint32_t size_user_1 = 0;
3285 uint32_t length_user_1 = 0;
3286 TALLOC_CTX *_mem_save_user_0;
3287 uint32_t _ptr_client_type;
3288 uint32_t size_client_type_1 = 0;
3289 uint32_t length_client_type_1 = 0;
3290 TALLOC_CTX *_mem_save_client_type_0;
3291 uint32_t _ptr_transport;
3292 uint32_t size_transport_1 = 0;
3293 uint32_t length_transport_1 = 0;
3294 TALLOC_CTX *_mem_save_transport_0;
3295 if (ndr_flags & NDR_SCALARS) {
3296 NDR_CHECK(ndr_pull_align(ndr, 4));
3297 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
3298 if (_ptr_client) {
3299 NDR_PULL_ALLOC(ndr, r->client);
3300 } else {
3301 r->client = NULL;
3303 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
3304 if (_ptr_user) {
3305 NDR_PULL_ALLOC(ndr, r->user);
3306 } else {
3307 r->user = NULL;
3309 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_open));
3310 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
3311 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idle_time));
3312 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->user_flags));
3313 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client_type));
3314 if (_ptr_client_type) {
3315 NDR_PULL_ALLOC(ndr, r->client_type);
3316 } else {
3317 r->client_type = NULL;
3319 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_transport));
3320 if (_ptr_transport) {
3321 NDR_PULL_ALLOC(ndr, r->transport);
3322 } else {
3323 r->transport = NULL;
3326 if (ndr_flags & NDR_BUFFERS) {
3327 if (r->client) {
3328 _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
3329 NDR_PULL_SET_MEM_CTX(ndr, r->client, 0);
3330 NDR_CHECK(ndr_pull_array_size(ndr, &r->client));
3331 NDR_CHECK(ndr_pull_array_length(ndr, &r->client));
3332 size_client_1 = ndr_get_array_size(ndr, &r->client);
3333 length_client_1 = ndr_get_array_length(ndr, &r->client);
3334 if (length_client_1 > size_client_1) {
3335 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_client_1, length_client_1);
3337 NDR_CHECK(ndr_check_string_terminator(ndr, length_client_1, sizeof(uint16_t)));
3338 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client, length_client_1, sizeof(uint16_t), CH_UTF16));
3339 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
3341 if (r->user) {
3342 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
3343 NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
3344 NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
3345 NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
3346 size_user_1 = ndr_get_array_size(ndr, &r->user);
3347 length_user_1 = ndr_get_array_length(ndr, &r->user);
3348 if (length_user_1 > size_user_1) {
3349 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_user_1, length_user_1);
3351 NDR_CHECK(ndr_check_string_terminator(ndr, length_user_1, sizeof(uint16_t)));
3352 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, length_user_1, sizeof(uint16_t), CH_UTF16));
3353 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
3355 if (r->client_type) {
3356 _mem_save_client_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
3357 NDR_PULL_SET_MEM_CTX(ndr, r->client_type, 0);
3358 NDR_CHECK(ndr_pull_array_size(ndr, &r->client_type));
3359 NDR_CHECK(ndr_pull_array_length(ndr, &r->client_type));
3360 size_client_type_1 = ndr_get_array_size(ndr, &r->client_type);
3361 length_client_type_1 = ndr_get_array_length(ndr, &r->client_type);
3362 if (length_client_type_1 > size_client_type_1) {
3363 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_client_type_1, length_client_type_1);
3365 NDR_CHECK(ndr_check_string_terminator(ndr, length_client_type_1, sizeof(uint16_t)));
3366 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client_type, length_client_type_1, sizeof(uint16_t), CH_UTF16));
3367 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_type_0, 0);
3369 if (r->transport) {
3370 _mem_save_transport_0 = NDR_PULL_GET_MEM_CTX(ndr);
3371 NDR_PULL_SET_MEM_CTX(ndr, r->transport, 0);
3372 NDR_CHECK(ndr_pull_array_size(ndr, &r->transport));
3373 NDR_CHECK(ndr_pull_array_length(ndr, &r->transport));
3374 size_transport_1 = ndr_get_array_size(ndr, &r->transport);
3375 length_transport_1 = ndr_get_array_length(ndr, &r->transport);
3376 if (length_transport_1 > size_transport_1) {
3377 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_transport_1, length_transport_1);
3379 NDR_CHECK(ndr_check_string_terminator(ndr, length_transport_1, sizeof(uint16_t)));
3380 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->transport, length_transport_1, sizeof(uint16_t), CH_UTF16));
3381 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_transport_0, 0);
3384 return NDR_ERR_SUCCESS;
3387 _PUBLIC_ void ndr_print_srvsvc_NetSessInfo502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo502 *r)
3389 ndr_print_struct(ndr, name, "srvsvc_NetSessInfo502");
3390 ndr->depth++;
3391 ndr_print_ptr(ndr, "client", r->client);
3392 ndr->depth++;
3393 if (r->client) {
3394 ndr_print_string(ndr, "client", r->client);
3396 ndr->depth--;
3397 ndr_print_ptr(ndr, "user", r->user);
3398 ndr->depth++;
3399 if (r->user) {
3400 ndr_print_string(ndr, "user", r->user);
3402 ndr->depth--;
3403 ndr_print_uint32(ndr, "num_open", r->num_open);
3404 ndr_print_uint32(ndr, "time", r->time);
3405 ndr_print_uint32(ndr, "idle_time", r->idle_time);
3406 ndr_print_uint32(ndr, "user_flags", r->user_flags);
3407 ndr_print_ptr(ndr, "client_type", r->client_type);
3408 ndr->depth++;
3409 if (r->client_type) {
3410 ndr_print_string(ndr, "client_type", r->client_type);
3412 ndr->depth--;
3413 ndr_print_ptr(ndr, "transport", r->transport);
3414 ndr->depth++;
3415 if (r->transport) {
3416 ndr_print_string(ndr, "transport", r->transport);
3418 ndr->depth--;
3419 ndr->depth--;
3422 static enum ndr_err_code ndr_push_srvsvc_NetSessCtr502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessCtr502 *r)
3424 uint32_t cntr_array_1;
3425 if (ndr_flags & NDR_SCALARS) {
3426 NDR_CHECK(ndr_push_align(ndr, 4));
3427 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
3428 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
3430 if (ndr_flags & NDR_BUFFERS) {
3431 if (r->array) {
3432 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
3433 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3434 NDR_CHECK(ndr_push_srvsvc_NetSessInfo502(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
3436 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3437 NDR_CHECK(ndr_push_srvsvc_NetSessInfo502(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
3441 return NDR_ERR_SUCCESS;
3444 static enum ndr_err_code ndr_pull_srvsvc_NetSessCtr502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr502 *r)
3446 uint32_t _ptr_array;
3447 uint32_t size_array_1 = 0;
3448 uint32_t cntr_array_1;
3449 TALLOC_CTX *_mem_save_array_0;
3450 TALLOC_CTX *_mem_save_array_1;
3451 if (ndr_flags & NDR_SCALARS) {
3452 NDR_CHECK(ndr_pull_align(ndr, 4));
3453 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
3454 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
3455 if (_ptr_array) {
3456 NDR_PULL_ALLOC(ndr, r->array);
3457 } else {
3458 r->array = NULL;
3461 if (ndr_flags & NDR_BUFFERS) {
3462 if (r->array) {
3463 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
3464 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
3465 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
3466 size_array_1 = ndr_get_array_size(ndr, &r->array);
3467 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
3468 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
3469 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
3470 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
3471 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo502(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
3473 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
3474 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo502(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
3476 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
3477 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
3479 if (r->array) {
3480 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
3483 return NDR_ERR_SUCCESS;
3486 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr502 *r)
3488 uint32_t cntr_array_1;
3489 ndr_print_struct(ndr, name, "srvsvc_NetSessCtr502");
3490 ndr->depth++;
3491 ndr_print_uint32(ndr, "count", r->count);
3492 ndr_print_ptr(ndr, "array", r->array);
3493 ndr->depth++;
3494 if (r->array) {
3495 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
3496 ndr->depth++;
3497 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
3498 char *idx_1=NULL;
3499 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
3500 ndr_print_srvsvc_NetSessInfo502(ndr, "array", &r->array[cntr_array_1]);
3501 free(idx_1);
3504 ndr->depth--;
3506 ndr->depth--;
3507 ndr->depth--;
3510 static enum ndr_err_code ndr_push_srvsvc_NetSessCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetSessCtr *r)
3512 if (ndr_flags & NDR_SCALARS) {
3513 int level = ndr_push_get_switch_value(ndr, r);
3514 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
3515 switch (level) {
3516 case 0: {
3517 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0));
3518 break; }
3520 case 1: {
3521 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
3522 break; }
3524 case 2: {
3525 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr2));
3526 break; }
3528 case 10: {
3529 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr10));
3530 break; }
3532 case 502: {
3533 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr502));
3534 break; }
3536 default: {
3537 break; }
3541 if (ndr_flags & NDR_BUFFERS) {
3542 int level = ndr_push_get_switch_value(ndr, r);
3543 switch (level) {
3544 case 0:
3545 if (r->ctr0) {
3546 NDR_CHECK(ndr_push_srvsvc_NetSessCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
3548 break;
3550 case 1:
3551 if (r->ctr1) {
3552 NDR_CHECK(ndr_push_srvsvc_NetSessCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
3554 break;
3556 case 2:
3557 if (r->ctr2) {
3558 NDR_CHECK(ndr_push_srvsvc_NetSessCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
3560 break;
3562 case 10:
3563 if (r->ctr10) {
3564 NDR_CHECK(ndr_push_srvsvc_NetSessCtr10(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr10));
3566 break;
3568 case 502:
3569 if (r->ctr502) {
3570 NDR_CHECK(ndr_push_srvsvc_NetSessCtr502(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr502));
3572 break;
3574 default:
3575 break;
3579 return NDR_ERR_SUCCESS;
3582 static enum ndr_err_code ndr_pull_srvsvc_NetSessCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetSessCtr *r)
3584 int level;
3585 uint32_t _level;
3586 TALLOC_CTX *_mem_save_ctr0_0;
3587 uint32_t _ptr_ctr0;
3588 TALLOC_CTX *_mem_save_ctr1_0;
3589 uint32_t _ptr_ctr1;
3590 TALLOC_CTX *_mem_save_ctr2_0;
3591 uint32_t _ptr_ctr2;
3592 TALLOC_CTX *_mem_save_ctr10_0;
3593 uint32_t _ptr_ctr10;
3594 TALLOC_CTX *_mem_save_ctr502_0;
3595 uint32_t _ptr_ctr502;
3596 level = ndr_pull_get_switch_value(ndr, r);
3597 if (ndr_flags & NDR_SCALARS) {
3598 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
3599 if (_level != level) {
3600 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
3602 switch (level) {
3603 case 0: {
3604 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr0));
3605 if (_ptr_ctr0) {
3606 NDR_PULL_ALLOC(ndr, r->ctr0);
3607 } else {
3608 r->ctr0 = NULL;
3610 break; }
3612 case 1: {
3613 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
3614 if (_ptr_ctr1) {
3615 NDR_PULL_ALLOC(ndr, r->ctr1);
3616 } else {
3617 r->ctr1 = NULL;
3619 break; }
3621 case 2: {
3622 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr2));
3623 if (_ptr_ctr2) {
3624 NDR_PULL_ALLOC(ndr, r->ctr2);
3625 } else {
3626 r->ctr2 = NULL;
3628 break; }
3630 case 10: {
3631 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr10));
3632 if (_ptr_ctr10) {
3633 NDR_PULL_ALLOC(ndr, r->ctr10);
3634 } else {
3635 r->ctr10 = NULL;
3637 break; }
3639 case 502: {
3640 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr502));
3641 if (_ptr_ctr502) {
3642 NDR_PULL_ALLOC(ndr, r->ctr502);
3643 } else {
3644 r->ctr502 = NULL;
3646 break; }
3648 default: {
3649 break; }
3653 if (ndr_flags & NDR_BUFFERS) {
3654 switch (level) {
3655 case 0:
3656 if (r->ctr0) {
3657 _mem_save_ctr0_0 = NDR_PULL_GET_MEM_CTX(ndr);
3658 NDR_PULL_SET_MEM_CTX(ndr, r->ctr0, 0);
3659 NDR_CHECK(ndr_pull_srvsvc_NetSessCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
3660 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr0_0, 0);
3662 break;
3664 case 1:
3665 if (r->ctr1) {
3666 _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
3667 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
3668 NDR_CHECK(ndr_pull_srvsvc_NetSessCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
3669 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
3671 break;
3673 case 2:
3674 if (r->ctr2) {
3675 _mem_save_ctr2_0 = NDR_PULL_GET_MEM_CTX(ndr);
3676 NDR_PULL_SET_MEM_CTX(ndr, r->ctr2, 0);
3677 NDR_CHECK(ndr_pull_srvsvc_NetSessCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
3678 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr2_0, 0);
3680 break;
3682 case 10:
3683 if (r->ctr10) {
3684 _mem_save_ctr10_0 = NDR_PULL_GET_MEM_CTX(ndr);
3685 NDR_PULL_SET_MEM_CTX(ndr, r->ctr10, 0);
3686 NDR_CHECK(ndr_pull_srvsvc_NetSessCtr10(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr10));
3687 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr10_0, 0);
3689 break;
3691 case 502:
3692 if (r->ctr502) {
3693 _mem_save_ctr502_0 = NDR_PULL_GET_MEM_CTX(ndr);
3694 NDR_PULL_SET_MEM_CTX(ndr, r->ctr502, 0);
3695 NDR_CHECK(ndr_pull_srvsvc_NetSessCtr502(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr502));
3696 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr502_0, 0);
3698 break;
3700 default:
3701 break;
3705 return NDR_ERR_SUCCESS;
3708 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetSessCtr *r)
3710 int level;
3711 level = ndr_print_get_switch_value(ndr, r);
3712 ndr_print_union(ndr, name, level, "srvsvc_NetSessCtr");
3713 switch (level) {
3714 case 0:
3715 ndr_print_ptr(ndr, "ctr0", r->ctr0);
3716 ndr->depth++;
3717 if (r->ctr0) {
3718 ndr_print_srvsvc_NetSessCtr0(ndr, "ctr0", r->ctr0);
3720 ndr->depth--;
3721 break;
3723 case 1:
3724 ndr_print_ptr(ndr, "ctr1", r->ctr1);
3725 ndr->depth++;
3726 if (r->ctr1) {
3727 ndr_print_srvsvc_NetSessCtr1(ndr, "ctr1", r->ctr1);
3729 ndr->depth--;
3730 break;
3732 case 2:
3733 ndr_print_ptr(ndr, "ctr2", r->ctr2);
3734 ndr->depth++;
3735 if (r->ctr2) {
3736 ndr_print_srvsvc_NetSessCtr2(ndr, "ctr2", r->ctr2);
3738 ndr->depth--;
3739 break;
3741 case 10:
3742 ndr_print_ptr(ndr, "ctr10", r->ctr10);
3743 ndr->depth++;
3744 if (r->ctr10) {
3745 ndr_print_srvsvc_NetSessCtr10(ndr, "ctr10", r->ctr10);
3747 ndr->depth--;
3748 break;
3750 case 502:
3751 ndr_print_ptr(ndr, "ctr502", r->ctr502);
3752 ndr->depth++;
3753 if (r->ctr502) {
3754 ndr_print_srvsvc_NetSessCtr502(ndr, "ctr502", r->ctr502);
3756 ndr->depth--;
3757 break;
3759 default:
3760 break;
3765 static enum ndr_err_code ndr_push_srvsvc_NetSessInfoCtr(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfoCtr *r)
3767 if (ndr_flags & NDR_SCALARS) {
3768 NDR_CHECK(ndr_push_align(ndr, 4));
3769 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
3770 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level));
3771 NDR_CHECK(ndr_push_srvsvc_NetSessCtr(ndr, NDR_SCALARS, &r->ctr));
3773 if (ndr_flags & NDR_BUFFERS) {
3774 NDR_CHECK(ndr_push_srvsvc_NetSessCtr(ndr, NDR_BUFFERS, &r->ctr));
3776 return NDR_ERR_SUCCESS;
3779 static enum ndr_err_code ndr_pull_srvsvc_NetSessInfoCtr(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfoCtr *r)
3781 if (ndr_flags & NDR_SCALARS) {
3782 NDR_CHECK(ndr_pull_align(ndr, 4));
3783 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
3784 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level));
3785 NDR_CHECK(ndr_pull_srvsvc_NetSessCtr(ndr, NDR_SCALARS, &r->ctr));
3787 if (ndr_flags & NDR_BUFFERS) {
3788 NDR_CHECK(ndr_pull_srvsvc_NetSessCtr(ndr, NDR_BUFFERS, &r->ctr));
3790 return NDR_ERR_SUCCESS;
3793 _PUBLIC_ void ndr_print_srvsvc_NetSessInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfoCtr *r)
3795 ndr_print_struct(ndr, name, "srvsvc_NetSessInfoCtr");
3796 ndr->depth++;
3797 ndr_print_uint32(ndr, "level", r->level);
3798 ndr_print_set_switch_value(ndr, &r->ctr, r->level);
3799 ndr_print_srvsvc_NetSessCtr(ndr, "ctr", &r->ctr);
3800 ndr->depth--;
3803 static enum ndr_err_code ndr_push_srvsvc_ShareType(struct ndr_push *ndr, int ndr_flags, enum srvsvc_ShareType r)
3806 uint32_t _flags_save_ENUM = ndr->flags;
3807 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
3808 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
3809 ndr->flags = _flags_save_ENUM;
3811 return NDR_ERR_SUCCESS;
3814 static enum ndr_err_code ndr_pull_srvsvc_ShareType(struct ndr_pull *ndr, int ndr_flags, enum srvsvc_ShareType *r)
3816 uint32_t v;
3818 uint32_t _flags_save_ENUM = ndr->flags;
3819 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
3820 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
3821 *r = v;
3822 ndr->flags = _flags_save_ENUM;
3824 return NDR_ERR_SUCCESS;
3827 _PUBLIC_ void ndr_print_srvsvc_ShareType(struct ndr_print *ndr, const char *name, enum srvsvc_ShareType r)
3829 const char *val = NULL;
3832 uint32_t _flags_save_ENUM = ndr->flags;
3833 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
3834 switch (r) {
3835 case STYPE_DISKTREE: val = "STYPE_DISKTREE"; break;
3836 case STYPE_DISKTREE_TEMPORARY: val = "STYPE_DISKTREE_TEMPORARY"; break;
3837 case STYPE_DISKTREE_HIDDEN: val = "STYPE_DISKTREE_HIDDEN"; break;
3838 case STYPE_PRINTQ: val = "STYPE_PRINTQ"; break;
3839 case STYPE_PRINTQ_TEMPORARY: val = "STYPE_PRINTQ_TEMPORARY"; break;
3840 case STYPE_PRINTQ_HIDDEN: val = "STYPE_PRINTQ_HIDDEN"; break;
3841 case STYPE_DEVICE: val = "STYPE_DEVICE"; break;
3842 case STYPE_DEVICE_TEMPORARY: val = "STYPE_DEVICE_TEMPORARY"; break;
3843 case STYPE_DEVICE_HIDDEN: val = "STYPE_DEVICE_HIDDEN"; break;
3844 case STYPE_IPC: val = "STYPE_IPC"; break;
3845 case STYPE_IPC_TEMPORARY: val = "STYPE_IPC_TEMPORARY"; break;
3846 case STYPE_IPC_HIDDEN: val = "STYPE_IPC_HIDDEN"; break;
3848 ndr_print_enum(ndr, name, "ENUM", val, r);
3849 ndr->flags = _flags_save_ENUM;
3853 static enum ndr_err_code ndr_push_srvsvc_NetShareInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo0 *r)
3855 if (ndr_flags & NDR_SCALARS) {
3856 NDR_CHECK(ndr_push_align(ndr, 4));
3857 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
3859 if (ndr_flags & NDR_BUFFERS) {
3860 if (r->name) {
3861 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
3862 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3863 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
3864 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3867 return NDR_ERR_SUCCESS;
3870 static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo0 *r)
3872 uint32_t _ptr_name;
3873 uint32_t size_name_1 = 0;
3874 uint32_t length_name_1 = 0;
3875 TALLOC_CTX *_mem_save_name_0;
3876 if (ndr_flags & NDR_SCALARS) {
3877 NDR_CHECK(ndr_pull_align(ndr, 4));
3878 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
3879 if (_ptr_name) {
3880 NDR_PULL_ALLOC(ndr, r->name);
3881 } else {
3882 r->name = NULL;
3885 if (ndr_flags & NDR_BUFFERS) {
3886 if (r->name) {
3887 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
3888 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
3889 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
3890 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
3891 size_name_1 = ndr_get_array_size(ndr, &r->name);
3892 length_name_1 = ndr_get_array_length(ndr, &r->name);
3893 if (length_name_1 > size_name_1) {
3894 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_name_1, length_name_1);
3896 NDR_CHECK(ndr_check_string_terminator(ndr, length_name_1, sizeof(uint16_t)));
3897 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, length_name_1, sizeof(uint16_t), CH_UTF16));
3898 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
3901 return NDR_ERR_SUCCESS;
3904 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo0 *r)
3906 ndr_print_struct(ndr, name, "srvsvc_NetShareInfo0");
3907 ndr->depth++;
3908 ndr_print_ptr(ndr, "name", r->name);
3909 ndr->depth++;
3910 if (r->name) {
3911 ndr_print_string(ndr, "name", r->name);
3913 ndr->depth--;
3914 ndr->depth--;
3917 static enum ndr_err_code ndr_push_srvsvc_NetShareCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr0 *r)
3919 uint32_t cntr_array_1;
3920 if (ndr_flags & NDR_SCALARS) {
3921 NDR_CHECK(ndr_push_align(ndr, 4));
3922 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
3923 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
3925 if (ndr_flags & NDR_BUFFERS) {
3926 if (r->array) {
3927 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
3928 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3929 NDR_CHECK(ndr_push_srvsvc_NetShareInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
3931 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3932 NDR_CHECK(ndr_push_srvsvc_NetShareInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
3936 return NDR_ERR_SUCCESS;
3939 static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr0 *r)
3941 uint32_t _ptr_array;
3942 uint32_t size_array_1 = 0;
3943 uint32_t cntr_array_1;
3944 TALLOC_CTX *_mem_save_array_0;
3945 TALLOC_CTX *_mem_save_array_1;
3946 if (ndr_flags & NDR_SCALARS) {
3947 NDR_CHECK(ndr_pull_align(ndr, 4));
3948 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
3949 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
3950 if (_ptr_array) {
3951 NDR_PULL_ALLOC(ndr, r->array);
3952 } else {
3953 r->array = NULL;
3956 if (ndr_flags & NDR_BUFFERS) {
3957 if (r->array) {
3958 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
3959 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
3960 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
3961 size_array_1 = ndr_get_array_size(ndr, &r->array);
3962 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
3963 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
3964 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
3965 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
3966 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
3968 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
3969 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
3971 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
3972 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
3974 if (r->array) {
3975 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
3978 return NDR_ERR_SUCCESS;
3981 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr0 *r)
3983 uint32_t cntr_array_1;
3984 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr0");
3985 ndr->depth++;
3986 ndr_print_uint32(ndr, "count", r->count);
3987 ndr_print_ptr(ndr, "array", r->array);
3988 ndr->depth++;
3989 if (r->array) {
3990 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
3991 ndr->depth++;
3992 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
3993 char *idx_1=NULL;
3994 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
3995 ndr_print_srvsvc_NetShareInfo0(ndr, "array", &r->array[cntr_array_1]);
3996 free(idx_1);
3999 ndr->depth--;
4001 ndr->depth--;
4002 ndr->depth--;
4005 static enum ndr_err_code ndr_push_srvsvc_NetShareInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo1 *r)
4007 if (ndr_flags & NDR_SCALARS) {
4008 NDR_CHECK(ndr_push_align(ndr, 4));
4009 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
4010 NDR_CHECK(ndr_push_srvsvc_ShareType(ndr, NDR_SCALARS, r->type));
4011 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
4013 if (ndr_flags & NDR_BUFFERS) {
4014 if (r->name) {
4015 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
4016 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4017 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
4018 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4020 if (r->comment) {
4021 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
4022 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4023 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
4024 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4027 return NDR_ERR_SUCCESS;
4030 static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo1 *r)
4032 uint32_t _ptr_name;
4033 uint32_t size_name_1 = 0;
4034 uint32_t length_name_1 = 0;
4035 TALLOC_CTX *_mem_save_name_0;
4036 uint32_t _ptr_comment;
4037 uint32_t size_comment_1 = 0;
4038 uint32_t length_comment_1 = 0;
4039 TALLOC_CTX *_mem_save_comment_0;
4040 if (ndr_flags & NDR_SCALARS) {
4041 NDR_CHECK(ndr_pull_align(ndr, 4));
4042 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
4043 if (_ptr_name) {
4044 NDR_PULL_ALLOC(ndr, r->name);
4045 } else {
4046 r->name = NULL;
4048 NDR_CHECK(ndr_pull_srvsvc_ShareType(ndr, NDR_SCALARS, &r->type));
4049 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
4050 if (_ptr_comment) {
4051 NDR_PULL_ALLOC(ndr, r->comment);
4052 } else {
4053 r->comment = NULL;
4056 if (ndr_flags & NDR_BUFFERS) {
4057 if (r->name) {
4058 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4059 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
4060 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
4061 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
4062 size_name_1 = ndr_get_array_size(ndr, &r->name);
4063 length_name_1 = ndr_get_array_length(ndr, &r->name);
4064 if (length_name_1 > size_name_1) {
4065 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_name_1, length_name_1);
4067 NDR_CHECK(ndr_check_string_terminator(ndr, length_name_1, sizeof(uint16_t)));
4068 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, length_name_1, sizeof(uint16_t), CH_UTF16));
4069 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
4071 if (r->comment) {
4072 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
4073 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
4074 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
4075 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
4076 size_comment_1 = ndr_get_array_size(ndr, &r->comment);
4077 length_comment_1 = ndr_get_array_length(ndr, &r->comment);
4078 if (length_comment_1 > size_comment_1) {
4079 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_comment_1, length_comment_1);
4081 NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_1, sizeof(uint16_t)));
4082 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, length_comment_1, sizeof(uint16_t), CH_UTF16));
4083 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
4086 return NDR_ERR_SUCCESS;
4089 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1 *r)
4091 ndr_print_struct(ndr, name, "srvsvc_NetShareInfo1");
4092 ndr->depth++;
4093 ndr_print_ptr(ndr, "name", r->name);
4094 ndr->depth++;
4095 if (r->name) {
4096 ndr_print_string(ndr, "name", r->name);
4098 ndr->depth--;
4099 ndr_print_srvsvc_ShareType(ndr, "type", r->type);
4100 ndr_print_ptr(ndr, "comment", r->comment);
4101 ndr->depth++;
4102 if (r->comment) {
4103 ndr_print_string(ndr, "comment", r->comment);
4105 ndr->depth--;
4106 ndr->depth--;
4109 static enum ndr_err_code ndr_push_srvsvc_NetShareCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1 *r)
4111 uint32_t cntr_array_1;
4112 if (ndr_flags & NDR_SCALARS) {
4113 NDR_CHECK(ndr_push_align(ndr, 4));
4114 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4115 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
4117 if (ndr_flags & NDR_BUFFERS) {
4118 if (r->array) {
4119 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4120 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4121 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4123 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4124 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
4128 return NDR_ERR_SUCCESS;
4131 static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1 *r)
4133 uint32_t _ptr_array;
4134 uint32_t size_array_1 = 0;
4135 uint32_t cntr_array_1;
4136 TALLOC_CTX *_mem_save_array_0;
4137 TALLOC_CTX *_mem_save_array_1;
4138 if (ndr_flags & NDR_SCALARS) {
4139 NDR_CHECK(ndr_pull_align(ndr, 4));
4140 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4141 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
4142 if (_ptr_array) {
4143 NDR_PULL_ALLOC(ndr, r->array);
4144 } else {
4145 r->array = NULL;
4148 if (ndr_flags & NDR_BUFFERS) {
4149 if (r->array) {
4150 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
4151 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4152 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
4153 size_array_1 = ndr_get_array_size(ndr, &r->array);
4154 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
4155 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
4156 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4157 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
4158 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4160 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
4161 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
4163 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
4164 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
4166 if (r->array) {
4167 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
4170 return NDR_ERR_SUCCESS;
4173 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1 *r)
4175 uint32_t cntr_array_1;
4176 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr1");
4177 ndr->depth++;
4178 ndr_print_uint32(ndr, "count", r->count);
4179 ndr_print_ptr(ndr, "array", r->array);
4180 ndr->depth++;
4181 if (r->array) {
4182 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
4183 ndr->depth++;
4184 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
4185 char *idx_1=NULL;
4186 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
4187 ndr_print_srvsvc_NetShareInfo1(ndr, "array", &r->array[cntr_array_1]);
4188 free(idx_1);
4191 ndr->depth--;
4193 ndr->depth--;
4194 ndr->depth--;
4197 static enum ndr_err_code ndr_push_srvsvc_NetShareInfo2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo2 *r)
4199 if (ndr_flags & NDR_SCALARS) {
4200 NDR_CHECK(ndr_push_align(ndr, 4));
4201 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
4202 NDR_CHECK(ndr_push_srvsvc_ShareType(ndr, NDR_SCALARS, r->type));
4203 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
4204 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->permissions));
4205 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_users));
4206 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->current_users));
4207 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
4208 NDR_CHECK(ndr_push_unique_ptr(ndr, r->password));
4210 if (ndr_flags & NDR_BUFFERS) {
4211 if (r->name) {
4212 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
4213 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4214 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
4215 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4217 if (r->comment) {
4218 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
4219 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4220 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
4221 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4223 if (r->path) {
4224 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
4225 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4226 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
4227 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4229 if (r->password) {
4230 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->password, CH_UTF16)));
4231 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4232 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->password, CH_UTF16)));
4233 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->password, ndr_charset_length(r->password, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4236 return NDR_ERR_SUCCESS;
4239 static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo2 *r)
4241 uint32_t _ptr_name;
4242 uint32_t size_name_1 = 0;
4243 uint32_t length_name_1 = 0;
4244 TALLOC_CTX *_mem_save_name_0;
4245 uint32_t _ptr_comment;
4246 uint32_t size_comment_1 = 0;
4247 uint32_t length_comment_1 = 0;
4248 TALLOC_CTX *_mem_save_comment_0;
4249 uint32_t _ptr_path;
4250 uint32_t size_path_1 = 0;
4251 uint32_t length_path_1 = 0;
4252 TALLOC_CTX *_mem_save_path_0;
4253 uint32_t _ptr_password;
4254 uint32_t size_password_1 = 0;
4255 uint32_t length_password_1 = 0;
4256 TALLOC_CTX *_mem_save_password_0;
4257 if (ndr_flags & NDR_SCALARS) {
4258 NDR_CHECK(ndr_pull_align(ndr, 4));
4259 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
4260 if (_ptr_name) {
4261 NDR_PULL_ALLOC(ndr, r->name);
4262 } else {
4263 r->name = NULL;
4265 NDR_CHECK(ndr_pull_srvsvc_ShareType(ndr, NDR_SCALARS, &r->type));
4266 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
4267 if (_ptr_comment) {
4268 NDR_PULL_ALLOC(ndr, r->comment);
4269 } else {
4270 r->comment = NULL;
4272 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->permissions));
4273 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_users));
4274 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->current_users));
4275 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
4276 if (_ptr_path) {
4277 NDR_PULL_ALLOC(ndr, r->path);
4278 } else {
4279 r->path = NULL;
4281 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
4282 if (_ptr_password) {
4283 NDR_PULL_ALLOC(ndr, r->password);
4284 } else {
4285 r->password = NULL;
4288 if (ndr_flags & NDR_BUFFERS) {
4289 if (r->name) {
4290 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4291 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
4292 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
4293 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
4294 size_name_1 = ndr_get_array_size(ndr, &r->name);
4295 length_name_1 = ndr_get_array_length(ndr, &r->name);
4296 if (length_name_1 > size_name_1) {
4297 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_name_1, length_name_1);
4299 NDR_CHECK(ndr_check_string_terminator(ndr, length_name_1, sizeof(uint16_t)));
4300 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, length_name_1, sizeof(uint16_t), CH_UTF16));
4301 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
4303 if (r->comment) {
4304 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
4305 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
4306 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
4307 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
4308 size_comment_1 = ndr_get_array_size(ndr, &r->comment);
4309 length_comment_1 = ndr_get_array_length(ndr, &r->comment);
4310 if (length_comment_1 > size_comment_1) {
4311 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_comment_1, length_comment_1);
4313 NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_1, sizeof(uint16_t)));
4314 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, length_comment_1, sizeof(uint16_t), CH_UTF16));
4315 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
4317 if (r->path) {
4318 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
4319 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
4320 NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
4321 NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
4322 size_path_1 = ndr_get_array_size(ndr, &r->path);
4323 length_path_1 = ndr_get_array_length(ndr, &r->path);
4324 if (length_path_1 > size_path_1) {
4325 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_path_1, length_path_1);
4327 NDR_CHECK(ndr_check_string_terminator(ndr, length_path_1, sizeof(uint16_t)));
4328 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, length_path_1, sizeof(uint16_t), CH_UTF16));
4329 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
4331 if (r->password) {
4332 _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
4333 NDR_PULL_SET_MEM_CTX(ndr, r->password, 0);
4334 NDR_CHECK(ndr_pull_array_size(ndr, &r->password));
4335 NDR_CHECK(ndr_pull_array_length(ndr, &r->password));
4336 size_password_1 = ndr_get_array_size(ndr, &r->password);
4337 length_password_1 = ndr_get_array_length(ndr, &r->password);
4338 if (length_password_1 > size_password_1) {
4339 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_password_1, length_password_1);
4341 NDR_CHECK(ndr_check_string_terminator(ndr, length_password_1, sizeof(uint16_t)));
4342 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->password, length_password_1, sizeof(uint16_t), CH_UTF16));
4343 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
4346 return NDR_ERR_SUCCESS;
4349 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo2 *r)
4351 ndr_print_struct(ndr, name, "srvsvc_NetShareInfo2");
4352 ndr->depth++;
4353 ndr_print_ptr(ndr, "name", r->name);
4354 ndr->depth++;
4355 if (r->name) {
4356 ndr_print_string(ndr, "name", r->name);
4358 ndr->depth--;
4359 ndr_print_srvsvc_ShareType(ndr, "type", r->type);
4360 ndr_print_ptr(ndr, "comment", r->comment);
4361 ndr->depth++;
4362 if (r->comment) {
4363 ndr_print_string(ndr, "comment", r->comment);
4365 ndr->depth--;
4366 ndr_print_uint32(ndr, "permissions", r->permissions);
4367 ndr_print_uint32(ndr, "max_users", r->max_users);
4368 ndr_print_uint32(ndr, "current_users", r->current_users);
4369 ndr_print_ptr(ndr, "path", r->path);
4370 ndr->depth++;
4371 if (r->path) {
4372 ndr_print_string(ndr, "path", r->path);
4374 ndr->depth--;
4375 ndr_print_ptr(ndr, "password", r->password);
4376 ndr->depth++;
4377 if (r->password) {
4378 ndr_print_string(ndr, "password", r->password);
4380 ndr->depth--;
4381 ndr->depth--;
4384 static enum ndr_err_code ndr_push_srvsvc_NetShareCtr2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr2 *r)
4386 uint32_t cntr_array_1;
4387 if (ndr_flags & NDR_SCALARS) {
4388 NDR_CHECK(ndr_push_align(ndr, 4));
4389 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4390 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
4392 if (ndr_flags & NDR_BUFFERS) {
4393 if (r->array) {
4394 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4395 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4396 NDR_CHECK(ndr_push_srvsvc_NetShareInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4398 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4399 NDR_CHECK(ndr_push_srvsvc_NetShareInfo2(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
4403 return NDR_ERR_SUCCESS;
4406 static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr2 *r)
4408 uint32_t _ptr_array;
4409 uint32_t size_array_1 = 0;
4410 uint32_t cntr_array_1;
4411 TALLOC_CTX *_mem_save_array_0;
4412 TALLOC_CTX *_mem_save_array_1;
4413 if (ndr_flags & NDR_SCALARS) {
4414 NDR_CHECK(ndr_pull_align(ndr, 4));
4415 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4416 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
4417 if (_ptr_array) {
4418 NDR_PULL_ALLOC(ndr, r->array);
4419 } else {
4420 r->array = NULL;
4423 if (ndr_flags & NDR_BUFFERS) {
4424 if (r->array) {
4425 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
4426 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4427 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
4428 size_array_1 = ndr_get_array_size(ndr, &r->array);
4429 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
4430 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
4431 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4432 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
4433 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4435 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
4436 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo2(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
4438 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
4439 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
4441 if (r->array) {
4442 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
4445 return NDR_ERR_SUCCESS;
4448 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr2 *r)
4450 uint32_t cntr_array_1;
4451 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr2");
4452 ndr->depth++;
4453 ndr_print_uint32(ndr, "count", r->count);
4454 ndr_print_ptr(ndr, "array", r->array);
4455 ndr->depth++;
4456 if (r->array) {
4457 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
4458 ndr->depth++;
4459 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
4460 char *idx_1=NULL;
4461 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
4462 ndr_print_srvsvc_NetShareInfo2(ndr, "array", &r->array[cntr_array_1]);
4463 free(idx_1);
4466 ndr->depth--;
4468 ndr->depth--;
4469 ndr->depth--;
4472 static enum ndr_err_code ndr_push_srvsvc_NetShareInfo501(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo501 *r)
4474 if (ndr_flags & NDR_SCALARS) {
4475 NDR_CHECK(ndr_push_align(ndr, 4));
4476 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
4477 NDR_CHECK(ndr_push_srvsvc_ShareType(ndr, NDR_SCALARS, r->type));
4478 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
4479 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->csc_policy));
4481 if (ndr_flags & NDR_BUFFERS) {
4482 if (r->name) {
4483 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
4484 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4485 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
4486 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4488 if (r->comment) {
4489 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
4490 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4491 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
4492 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4495 return NDR_ERR_SUCCESS;
4498 static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo501(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo501 *r)
4500 uint32_t _ptr_name;
4501 uint32_t size_name_1 = 0;
4502 uint32_t length_name_1 = 0;
4503 TALLOC_CTX *_mem_save_name_0;
4504 uint32_t _ptr_comment;
4505 uint32_t size_comment_1 = 0;
4506 uint32_t length_comment_1 = 0;
4507 TALLOC_CTX *_mem_save_comment_0;
4508 if (ndr_flags & NDR_SCALARS) {
4509 NDR_CHECK(ndr_pull_align(ndr, 4));
4510 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
4511 if (_ptr_name) {
4512 NDR_PULL_ALLOC(ndr, r->name);
4513 } else {
4514 r->name = NULL;
4516 NDR_CHECK(ndr_pull_srvsvc_ShareType(ndr, NDR_SCALARS, &r->type));
4517 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
4518 if (_ptr_comment) {
4519 NDR_PULL_ALLOC(ndr, r->comment);
4520 } else {
4521 r->comment = NULL;
4523 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->csc_policy));
4525 if (ndr_flags & NDR_BUFFERS) {
4526 if (r->name) {
4527 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4528 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
4529 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
4530 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
4531 size_name_1 = ndr_get_array_size(ndr, &r->name);
4532 length_name_1 = ndr_get_array_length(ndr, &r->name);
4533 if (length_name_1 > size_name_1) {
4534 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_name_1, length_name_1);
4536 NDR_CHECK(ndr_check_string_terminator(ndr, length_name_1, sizeof(uint16_t)));
4537 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, length_name_1, sizeof(uint16_t), CH_UTF16));
4538 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
4540 if (r->comment) {
4541 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
4542 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
4543 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
4544 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
4545 size_comment_1 = ndr_get_array_size(ndr, &r->comment);
4546 length_comment_1 = ndr_get_array_length(ndr, &r->comment);
4547 if (length_comment_1 > size_comment_1) {
4548 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_comment_1, length_comment_1);
4550 NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_1, sizeof(uint16_t)));
4551 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, length_comment_1, sizeof(uint16_t), CH_UTF16));
4552 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
4555 return NDR_ERR_SUCCESS;
4558 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo501(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo501 *r)
4560 ndr_print_struct(ndr, name, "srvsvc_NetShareInfo501");
4561 ndr->depth++;
4562 ndr_print_ptr(ndr, "name", r->name);
4563 ndr->depth++;
4564 if (r->name) {
4565 ndr_print_string(ndr, "name", r->name);
4567 ndr->depth--;
4568 ndr_print_srvsvc_ShareType(ndr, "type", r->type);
4569 ndr_print_ptr(ndr, "comment", r->comment);
4570 ndr->depth++;
4571 if (r->comment) {
4572 ndr_print_string(ndr, "comment", r->comment);
4574 ndr->depth--;
4575 ndr_print_uint32(ndr, "csc_policy", r->csc_policy);
4576 ndr->depth--;
4579 static enum ndr_err_code ndr_push_srvsvc_NetShareCtr501(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr501 *r)
4581 uint32_t cntr_array_1;
4582 if (ndr_flags & NDR_SCALARS) {
4583 NDR_CHECK(ndr_push_align(ndr, 4));
4584 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4585 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
4587 if (ndr_flags & NDR_BUFFERS) {
4588 if (r->array) {
4589 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4590 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4591 NDR_CHECK(ndr_push_srvsvc_NetShareInfo501(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4593 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4594 NDR_CHECK(ndr_push_srvsvc_NetShareInfo501(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
4598 return NDR_ERR_SUCCESS;
4601 static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr501(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr501 *r)
4603 uint32_t _ptr_array;
4604 uint32_t size_array_1 = 0;
4605 uint32_t cntr_array_1;
4606 TALLOC_CTX *_mem_save_array_0;
4607 TALLOC_CTX *_mem_save_array_1;
4608 if (ndr_flags & NDR_SCALARS) {
4609 NDR_CHECK(ndr_pull_align(ndr, 4));
4610 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4611 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
4612 if (_ptr_array) {
4613 NDR_PULL_ALLOC(ndr, r->array);
4614 } else {
4615 r->array = NULL;
4618 if (ndr_flags & NDR_BUFFERS) {
4619 if (r->array) {
4620 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
4621 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4622 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
4623 size_array_1 = ndr_get_array_size(ndr, &r->array);
4624 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
4625 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
4626 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4627 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
4628 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo501(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4630 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
4631 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo501(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
4633 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
4634 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
4636 if (r->array) {
4637 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
4640 return NDR_ERR_SUCCESS;
4643 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr501(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr501 *r)
4645 uint32_t cntr_array_1;
4646 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr501");
4647 ndr->depth++;
4648 ndr_print_uint32(ndr, "count", r->count);
4649 ndr_print_ptr(ndr, "array", r->array);
4650 ndr->depth++;
4651 if (r->array) {
4652 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
4653 ndr->depth++;
4654 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
4655 char *idx_1=NULL;
4656 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
4657 ndr_print_srvsvc_NetShareInfo501(ndr, "array", &r->array[cntr_array_1]);
4658 free(idx_1);
4661 ndr->depth--;
4663 ndr->depth--;
4664 ndr->depth--;
4667 static enum ndr_err_code ndr_push_srvsvc_NetShareInfo502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo502 *r)
4669 if (ndr_flags & NDR_SCALARS) {
4670 NDR_CHECK(ndr_push_align(ndr, 4));
4671 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
4672 NDR_CHECK(ndr_push_srvsvc_ShareType(ndr, NDR_SCALARS, r->type));
4673 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
4674 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->permissions));
4675 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_users));
4676 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->current_users));
4677 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
4678 NDR_CHECK(ndr_push_unique_ptr(ndr, r->password));
4679 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sd_buf));
4681 if (ndr_flags & NDR_BUFFERS) {
4682 if (r->name) {
4683 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
4684 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4685 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
4686 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4688 if (r->comment) {
4689 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
4690 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4691 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
4692 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4694 if (r->path) {
4695 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
4696 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4697 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
4698 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4700 if (r->password) {
4701 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->password, CH_UTF16)));
4702 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4703 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->password, CH_UTF16)));
4704 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->password, ndr_charset_length(r->password, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4706 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sd_buf));
4708 return NDR_ERR_SUCCESS;
4711 static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo502 *r)
4713 uint32_t _ptr_name;
4714 uint32_t size_name_1 = 0;
4715 uint32_t length_name_1 = 0;
4716 TALLOC_CTX *_mem_save_name_0;
4717 uint32_t _ptr_comment;
4718 uint32_t size_comment_1 = 0;
4719 uint32_t length_comment_1 = 0;
4720 TALLOC_CTX *_mem_save_comment_0;
4721 uint32_t _ptr_path;
4722 uint32_t size_path_1 = 0;
4723 uint32_t length_path_1 = 0;
4724 TALLOC_CTX *_mem_save_path_0;
4725 uint32_t _ptr_password;
4726 uint32_t size_password_1 = 0;
4727 uint32_t length_password_1 = 0;
4728 TALLOC_CTX *_mem_save_password_0;
4729 if (ndr_flags & NDR_SCALARS) {
4730 NDR_CHECK(ndr_pull_align(ndr, 4));
4731 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
4732 if (_ptr_name) {
4733 NDR_PULL_ALLOC(ndr, r->name);
4734 } else {
4735 r->name = NULL;
4737 NDR_CHECK(ndr_pull_srvsvc_ShareType(ndr, NDR_SCALARS, &r->type));
4738 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
4739 if (_ptr_comment) {
4740 NDR_PULL_ALLOC(ndr, r->comment);
4741 } else {
4742 r->comment = NULL;
4744 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->permissions));
4745 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_users));
4746 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->current_users));
4747 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
4748 if (_ptr_path) {
4749 NDR_PULL_ALLOC(ndr, r->path);
4750 } else {
4751 r->path = NULL;
4753 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
4754 if (_ptr_password) {
4755 NDR_PULL_ALLOC(ndr, r->password);
4756 } else {
4757 r->password = NULL;
4759 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sd_buf));
4761 if (ndr_flags & NDR_BUFFERS) {
4762 if (r->name) {
4763 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4764 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
4765 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
4766 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
4767 size_name_1 = ndr_get_array_size(ndr, &r->name);
4768 length_name_1 = ndr_get_array_length(ndr, &r->name);
4769 if (length_name_1 > size_name_1) {
4770 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_name_1, length_name_1);
4772 NDR_CHECK(ndr_check_string_terminator(ndr, length_name_1, sizeof(uint16_t)));
4773 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, length_name_1, sizeof(uint16_t), CH_UTF16));
4774 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
4776 if (r->comment) {
4777 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
4778 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
4779 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
4780 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
4781 size_comment_1 = ndr_get_array_size(ndr, &r->comment);
4782 length_comment_1 = ndr_get_array_length(ndr, &r->comment);
4783 if (length_comment_1 > size_comment_1) {
4784 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_comment_1, length_comment_1);
4786 NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_1, sizeof(uint16_t)));
4787 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, length_comment_1, sizeof(uint16_t), CH_UTF16));
4788 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
4790 if (r->path) {
4791 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
4792 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
4793 NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
4794 NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
4795 size_path_1 = ndr_get_array_size(ndr, &r->path);
4796 length_path_1 = ndr_get_array_length(ndr, &r->path);
4797 if (length_path_1 > size_path_1) {
4798 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_path_1, length_path_1);
4800 NDR_CHECK(ndr_check_string_terminator(ndr, length_path_1, sizeof(uint16_t)));
4801 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, length_path_1, sizeof(uint16_t), CH_UTF16));
4802 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
4804 if (r->password) {
4805 _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
4806 NDR_PULL_SET_MEM_CTX(ndr, r->password, 0);
4807 NDR_CHECK(ndr_pull_array_size(ndr, &r->password));
4808 NDR_CHECK(ndr_pull_array_length(ndr, &r->password));
4809 size_password_1 = ndr_get_array_size(ndr, &r->password);
4810 length_password_1 = ndr_get_array_length(ndr, &r->password);
4811 if (length_password_1 > size_password_1) {
4812 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_password_1, length_password_1);
4814 NDR_CHECK(ndr_check_string_terminator(ndr, length_password_1, sizeof(uint16_t)));
4815 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->password, length_password_1, sizeof(uint16_t), CH_UTF16));
4816 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
4818 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sd_buf));
4820 return NDR_ERR_SUCCESS;
4823 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo502 *r)
4825 ndr_print_struct(ndr, name, "srvsvc_NetShareInfo502");
4826 ndr->depth++;
4827 ndr_print_ptr(ndr, "name", r->name);
4828 ndr->depth++;
4829 if (r->name) {
4830 ndr_print_string(ndr, "name", r->name);
4832 ndr->depth--;
4833 ndr_print_srvsvc_ShareType(ndr, "type", r->type);
4834 ndr_print_ptr(ndr, "comment", r->comment);
4835 ndr->depth++;
4836 if (r->comment) {
4837 ndr_print_string(ndr, "comment", r->comment);
4839 ndr->depth--;
4840 ndr_print_uint32(ndr, "permissions", r->permissions);
4841 ndr_print_uint32(ndr, "max_users", r->max_users);
4842 ndr_print_uint32(ndr, "current_users", r->current_users);
4843 ndr_print_ptr(ndr, "path", r->path);
4844 ndr->depth++;
4845 if (r->path) {
4846 ndr_print_string(ndr, "path", r->path);
4848 ndr->depth--;
4849 ndr_print_ptr(ndr, "password", r->password);
4850 ndr->depth++;
4851 if (r->password) {
4852 ndr_print_string(ndr, "password", r->password);
4854 ndr->depth--;
4855 ndr_print_sec_desc_buf(ndr, "sd_buf", &r->sd_buf);
4856 ndr->depth--;
4859 static enum ndr_err_code ndr_push_srvsvc_NetShareCtr502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr502 *r)
4861 uint32_t cntr_array_1;
4862 if (ndr_flags & NDR_SCALARS) {
4863 NDR_CHECK(ndr_push_align(ndr, 4));
4864 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4865 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
4867 if (ndr_flags & NDR_BUFFERS) {
4868 if (r->array) {
4869 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4870 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4871 NDR_CHECK(ndr_push_srvsvc_NetShareInfo502(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4873 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4874 NDR_CHECK(ndr_push_srvsvc_NetShareInfo502(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
4878 return NDR_ERR_SUCCESS;
4881 static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr502 *r)
4883 uint32_t _ptr_array;
4884 uint32_t size_array_1 = 0;
4885 uint32_t cntr_array_1;
4886 TALLOC_CTX *_mem_save_array_0;
4887 TALLOC_CTX *_mem_save_array_1;
4888 if (ndr_flags & NDR_SCALARS) {
4889 NDR_CHECK(ndr_pull_align(ndr, 4));
4890 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4891 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
4892 if (_ptr_array) {
4893 NDR_PULL_ALLOC(ndr, r->array);
4894 } else {
4895 r->array = NULL;
4898 if (ndr_flags & NDR_BUFFERS) {
4899 if (r->array) {
4900 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
4901 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4902 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
4903 size_array_1 = ndr_get_array_size(ndr, &r->array);
4904 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
4905 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
4906 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4907 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
4908 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo502(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4910 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
4911 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo502(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
4913 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
4914 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
4916 if (r->array) {
4917 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
4920 return NDR_ERR_SUCCESS;
4923 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr502 *r)
4925 uint32_t cntr_array_1;
4926 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr502");
4927 ndr->depth++;
4928 ndr_print_uint32(ndr, "count", r->count);
4929 ndr_print_ptr(ndr, "array", r->array);
4930 ndr->depth++;
4931 if (r->array) {
4932 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
4933 ndr->depth++;
4934 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
4935 char *idx_1=NULL;
4936 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
4937 ndr_print_srvsvc_NetShareInfo502(ndr, "array", &r->array[cntr_array_1]);
4938 free(idx_1);
4941 ndr->depth--;
4943 ndr->depth--;
4944 ndr->depth--;
4947 static enum ndr_err_code ndr_push_srvsvc_NetShareInfo1004(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo1004 *r)
4949 if (ndr_flags & NDR_SCALARS) {
4950 NDR_CHECK(ndr_push_align(ndr, 4));
4951 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
4953 if (ndr_flags & NDR_BUFFERS) {
4954 if (r->comment) {
4955 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
4956 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4957 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
4958 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4961 return NDR_ERR_SUCCESS;
4964 static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo1004(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo1004 *r)
4966 uint32_t _ptr_comment;
4967 uint32_t size_comment_1 = 0;
4968 uint32_t length_comment_1 = 0;
4969 TALLOC_CTX *_mem_save_comment_0;
4970 if (ndr_flags & NDR_SCALARS) {
4971 NDR_CHECK(ndr_pull_align(ndr, 4));
4972 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
4973 if (_ptr_comment) {
4974 NDR_PULL_ALLOC(ndr, r->comment);
4975 } else {
4976 r->comment = NULL;
4979 if (ndr_flags & NDR_BUFFERS) {
4980 if (r->comment) {
4981 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
4982 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
4983 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
4984 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
4985 size_comment_1 = ndr_get_array_size(ndr, &r->comment);
4986 length_comment_1 = ndr_get_array_length(ndr, &r->comment);
4987 if (length_comment_1 > size_comment_1) {
4988 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_comment_1, length_comment_1);
4990 NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_1, sizeof(uint16_t)));
4991 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, length_comment_1, sizeof(uint16_t), CH_UTF16));
4992 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
4995 return NDR_ERR_SUCCESS;
4998 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1004(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1004 *r)
5000 ndr_print_struct(ndr, name, "srvsvc_NetShareInfo1004");
5001 ndr->depth++;
5002 ndr_print_ptr(ndr, "comment", r->comment);
5003 ndr->depth++;
5004 if (r->comment) {
5005 ndr_print_string(ndr, "comment", r->comment);
5007 ndr->depth--;
5008 ndr->depth--;
5011 static enum ndr_err_code ndr_push_srvsvc_NetShareCtr1004(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1004 *r)
5013 uint32_t cntr_array_1;
5014 if (ndr_flags & NDR_SCALARS) {
5015 NDR_CHECK(ndr_push_align(ndr, 4));
5016 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
5017 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
5019 if (ndr_flags & NDR_BUFFERS) {
5020 if (r->array) {
5021 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
5022 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
5023 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1004(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
5025 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
5026 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1004(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
5030 return NDR_ERR_SUCCESS;
5033 static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr1004(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1004 *r)
5035 uint32_t _ptr_array;
5036 uint32_t size_array_1 = 0;
5037 uint32_t cntr_array_1;
5038 TALLOC_CTX *_mem_save_array_0;
5039 TALLOC_CTX *_mem_save_array_1;
5040 if (ndr_flags & NDR_SCALARS) {
5041 NDR_CHECK(ndr_pull_align(ndr, 4));
5042 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
5043 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
5044 if (_ptr_array) {
5045 NDR_PULL_ALLOC(ndr, r->array);
5046 } else {
5047 r->array = NULL;
5050 if (ndr_flags & NDR_BUFFERS) {
5051 if (r->array) {
5052 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
5053 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
5054 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
5055 size_array_1 = ndr_get_array_size(ndr, &r->array);
5056 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
5057 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
5058 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
5059 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
5060 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1004(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
5062 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
5063 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1004(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
5065 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
5066 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
5068 if (r->array) {
5069 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
5072 return NDR_ERR_SUCCESS;
5075 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1004(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1004 *r)
5077 uint32_t cntr_array_1;
5078 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr1004");
5079 ndr->depth++;
5080 ndr_print_uint32(ndr, "count", r->count);
5081 ndr_print_ptr(ndr, "array", r->array);
5082 ndr->depth++;
5083 if (r->array) {
5084 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
5085 ndr->depth++;
5086 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
5087 char *idx_1=NULL;
5088 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
5089 ndr_print_srvsvc_NetShareInfo1004(ndr, "array", &r->array[cntr_array_1]);
5090 free(idx_1);
5093 ndr->depth--;
5095 ndr->depth--;
5096 ndr->depth--;
5099 static enum ndr_err_code ndr_push_NetShareInfo1005Flags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
5101 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
5102 return NDR_ERR_SUCCESS;
5105 static enum ndr_err_code ndr_pull_NetShareInfo1005Flags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
5107 uint32_t v;
5108 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
5109 *r = v;
5110 return NDR_ERR_SUCCESS;
5113 _PUBLIC_ void ndr_print_NetShareInfo1005Flags(struct ndr_print *ndr, const char *name, uint32_t r)
5115 ndr_print_uint32(ndr, name, r);
5116 ndr->depth++;
5117 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SHARE_1005_IN_DFS", SHARE_1005_IN_DFS, r);
5118 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SHARE_1005_DFS_ROOT", SHARE_1005_DFS_ROOT, r);
5119 ndr->depth--;
5122 static enum ndr_err_code ndr_push_srvsvc_NetShareInfo1005(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo1005 *r)
5124 if (ndr_flags & NDR_SCALARS) {
5125 NDR_CHECK(ndr_push_align(ndr, 4));
5126 NDR_CHECK(ndr_push_NetShareInfo1005Flags(ndr, NDR_SCALARS, r->dfs_flags));
5128 if (ndr_flags & NDR_BUFFERS) {
5130 return NDR_ERR_SUCCESS;
5133 static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo1005(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo1005 *r)
5135 if (ndr_flags & NDR_SCALARS) {
5136 NDR_CHECK(ndr_pull_align(ndr, 4));
5137 NDR_CHECK(ndr_pull_NetShareInfo1005Flags(ndr, NDR_SCALARS, &r->dfs_flags));
5139 if (ndr_flags & NDR_BUFFERS) {
5141 return NDR_ERR_SUCCESS;
5144 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1005(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1005 *r)
5146 ndr_print_struct(ndr, name, "srvsvc_NetShareInfo1005");
5147 ndr->depth++;
5148 ndr_print_NetShareInfo1005Flags(ndr, "dfs_flags", r->dfs_flags);
5149 ndr->depth--;
5152 static enum ndr_err_code ndr_push_srvsvc_NetShareCtr1005(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1005 *r)
5154 uint32_t cntr_array_1;
5155 if (ndr_flags & NDR_SCALARS) {
5156 NDR_CHECK(ndr_push_align(ndr, 4));
5157 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
5158 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
5160 if (ndr_flags & NDR_BUFFERS) {
5161 if (r->array) {
5162 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
5163 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
5164 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1005(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
5168 return NDR_ERR_SUCCESS;
5171 static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr1005(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1005 *r)
5173 uint32_t _ptr_array;
5174 uint32_t size_array_1 = 0;
5175 uint32_t cntr_array_1;
5176 TALLOC_CTX *_mem_save_array_0;
5177 TALLOC_CTX *_mem_save_array_1;
5178 if (ndr_flags & NDR_SCALARS) {
5179 NDR_CHECK(ndr_pull_align(ndr, 4));
5180 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
5181 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
5182 if (_ptr_array) {
5183 NDR_PULL_ALLOC(ndr, r->array);
5184 } else {
5185 r->array = NULL;
5188 if (ndr_flags & NDR_BUFFERS) {
5189 if (r->array) {
5190 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
5191 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
5192 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
5193 size_array_1 = ndr_get_array_size(ndr, &r->array);
5194 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
5195 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
5196 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
5197 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
5198 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1005(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
5200 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
5201 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
5203 if (r->array) {
5204 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
5207 return NDR_ERR_SUCCESS;
5210 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1005(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1005 *r)
5212 uint32_t cntr_array_1;
5213 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr1005");
5214 ndr->depth++;
5215 ndr_print_uint32(ndr, "count", r->count);
5216 ndr_print_ptr(ndr, "array", r->array);
5217 ndr->depth++;
5218 if (r->array) {
5219 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
5220 ndr->depth++;
5221 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
5222 char *idx_1=NULL;
5223 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
5224 ndr_print_srvsvc_NetShareInfo1005(ndr, "array", &r->array[cntr_array_1]);
5225 free(idx_1);
5228 ndr->depth--;
5230 ndr->depth--;
5231 ndr->depth--;
5234 static enum ndr_err_code ndr_push_srvsvc_NetShareInfo1006(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo1006 *r)
5236 if (ndr_flags & NDR_SCALARS) {
5237 NDR_CHECK(ndr_push_align(ndr, 4));
5238 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_users));
5240 if (ndr_flags & NDR_BUFFERS) {
5242 return NDR_ERR_SUCCESS;
5245 static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo1006(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo1006 *r)
5247 if (ndr_flags & NDR_SCALARS) {
5248 NDR_CHECK(ndr_pull_align(ndr, 4));
5249 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_users));
5251 if (ndr_flags & NDR_BUFFERS) {
5253 return NDR_ERR_SUCCESS;
5256 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1006(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1006 *r)
5258 ndr_print_struct(ndr, name, "srvsvc_NetShareInfo1006");
5259 ndr->depth++;
5260 ndr_print_uint32(ndr, "max_users", r->max_users);
5261 ndr->depth--;
5264 static enum ndr_err_code ndr_push_srvsvc_NetShareCtr1006(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1006 *r)
5266 uint32_t cntr_array_1;
5267 if (ndr_flags & NDR_SCALARS) {
5268 NDR_CHECK(ndr_push_align(ndr, 4));
5269 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
5270 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
5272 if (ndr_flags & NDR_BUFFERS) {
5273 if (r->array) {
5274 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
5275 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
5276 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1006(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
5280 return NDR_ERR_SUCCESS;
5283 static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr1006(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1006 *r)
5285 uint32_t _ptr_array;
5286 uint32_t size_array_1 = 0;
5287 uint32_t cntr_array_1;
5288 TALLOC_CTX *_mem_save_array_0;
5289 TALLOC_CTX *_mem_save_array_1;
5290 if (ndr_flags & NDR_SCALARS) {
5291 NDR_CHECK(ndr_pull_align(ndr, 4));
5292 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
5293 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
5294 if (_ptr_array) {
5295 NDR_PULL_ALLOC(ndr, r->array);
5296 } else {
5297 r->array = NULL;
5300 if (ndr_flags & NDR_BUFFERS) {
5301 if (r->array) {
5302 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
5303 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
5304 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
5305 size_array_1 = ndr_get_array_size(ndr, &r->array);
5306 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
5307 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
5308 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
5309 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
5310 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1006(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
5312 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
5313 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
5315 if (r->array) {
5316 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
5319 return NDR_ERR_SUCCESS;
5322 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1006(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1006 *r)
5324 uint32_t cntr_array_1;
5325 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr1006");
5326 ndr->depth++;
5327 ndr_print_uint32(ndr, "count", r->count);
5328 ndr_print_ptr(ndr, "array", r->array);
5329 ndr->depth++;
5330 if (r->array) {
5331 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
5332 ndr->depth++;
5333 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
5334 char *idx_1=NULL;
5335 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
5336 ndr_print_srvsvc_NetShareInfo1006(ndr, "array", &r->array[cntr_array_1]);
5337 free(idx_1);
5340 ndr->depth--;
5342 ndr->depth--;
5343 ndr->depth--;
5346 static enum ndr_err_code ndr_push_srvsvc_NetShareInfo1007(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo1007 *r)
5348 if (ndr_flags & NDR_SCALARS) {
5349 NDR_CHECK(ndr_push_align(ndr, 4));
5350 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags));
5351 NDR_CHECK(ndr_push_unique_ptr(ndr, r->alternate_directory_name));
5353 if (ndr_flags & NDR_BUFFERS) {
5354 if (r->alternate_directory_name) {
5355 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->alternate_directory_name, CH_UTF16)));
5356 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5357 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->alternate_directory_name, CH_UTF16)));
5358 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->alternate_directory_name, ndr_charset_length(r->alternate_directory_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5361 return NDR_ERR_SUCCESS;
5364 static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo1007(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo1007 *r)
5366 uint32_t _ptr_alternate_directory_name;
5367 uint32_t size_alternate_directory_name_1 = 0;
5368 uint32_t length_alternate_directory_name_1 = 0;
5369 TALLOC_CTX *_mem_save_alternate_directory_name_0;
5370 if (ndr_flags & NDR_SCALARS) {
5371 NDR_CHECK(ndr_pull_align(ndr, 4));
5372 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
5373 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_alternate_directory_name));
5374 if (_ptr_alternate_directory_name) {
5375 NDR_PULL_ALLOC(ndr, r->alternate_directory_name);
5376 } else {
5377 r->alternate_directory_name = NULL;
5380 if (ndr_flags & NDR_BUFFERS) {
5381 if (r->alternate_directory_name) {
5382 _mem_save_alternate_directory_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5383 NDR_PULL_SET_MEM_CTX(ndr, r->alternate_directory_name, 0);
5384 NDR_CHECK(ndr_pull_array_size(ndr, &r->alternate_directory_name));
5385 NDR_CHECK(ndr_pull_array_length(ndr, &r->alternate_directory_name));
5386 size_alternate_directory_name_1 = ndr_get_array_size(ndr, &r->alternate_directory_name);
5387 length_alternate_directory_name_1 = ndr_get_array_length(ndr, &r->alternate_directory_name);
5388 if (length_alternate_directory_name_1 > size_alternate_directory_name_1) {
5389 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_alternate_directory_name_1, length_alternate_directory_name_1);
5391 NDR_CHECK(ndr_check_string_terminator(ndr, length_alternate_directory_name_1, sizeof(uint16_t)));
5392 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->alternate_directory_name, length_alternate_directory_name_1, sizeof(uint16_t), CH_UTF16));
5393 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alternate_directory_name_0, 0);
5396 return NDR_ERR_SUCCESS;
5399 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1007(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1007 *r)
5401 ndr_print_struct(ndr, name, "srvsvc_NetShareInfo1007");
5402 ndr->depth++;
5403 ndr_print_uint32(ndr, "flags", r->flags);
5404 ndr_print_ptr(ndr, "alternate_directory_name", r->alternate_directory_name);
5405 ndr->depth++;
5406 if (r->alternate_directory_name) {
5407 ndr_print_string(ndr, "alternate_directory_name", r->alternate_directory_name);
5409 ndr->depth--;
5410 ndr->depth--;
5413 static enum ndr_err_code ndr_push_srvsvc_NetShareCtr1007(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1007 *r)
5415 uint32_t cntr_array_1;
5416 if (ndr_flags & NDR_SCALARS) {
5417 NDR_CHECK(ndr_push_align(ndr, 4));
5418 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
5419 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
5421 if (ndr_flags & NDR_BUFFERS) {
5422 if (r->array) {
5423 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
5424 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
5425 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1007(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
5427 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
5428 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1007(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
5432 return NDR_ERR_SUCCESS;
5435 static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr1007(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1007 *r)
5437 uint32_t _ptr_array;
5438 uint32_t size_array_1 = 0;
5439 uint32_t cntr_array_1;
5440 TALLOC_CTX *_mem_save_array_0;
5441 TALLOC_CTX *_mem_save_array_1;
5442 if (ndr_flags & NDR_SCALARS) {
5443 NDR_CHECK(ndr_pull_align(ndr, 4));
5444 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
5445 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
5446 if (_ptr_array) {
5447 NDR_PULL_ALLOC(ndr, r->array);
5448 } else {
5449 r->array = NULL;
5452 if (ndr_flags & NDR_BUFFERS) {
5453 if (r->array) {
5454 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
5455 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
5456 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
5457 size_array_1 = ndr_get_array_size(ndr, &r->array);
5458 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
5459 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
5460 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
5461 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
5462 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1007(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
5464 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
5465 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1007(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
5467 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
5468 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
5470 if (r->array) {
5471 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
5474 return NDR_ERR_SUCCESS;
5477 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1007(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1007 *r)
5479 uint32_t cntr_array_1;
5480 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr1007");
5481 ndr->depth++;
5482 ndr_print_uint32(ndr, "count", r->count);
5483 ndr_print_ptr(ndr, "array", r->array);
5484 ndr->depth++;
5485 if (r->array) {
5486 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
5487 ndr->depth++;
5488 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
5489 char *idx_1=NULL;
5490 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
5491 ndr_print_srvsvc_NetShareInfo1007(ndr, "array", &r->array[cntr_array_1]);
5492 free(idx_1);
5495 ndr->depth--;
5497 ndr->depth--;
5498 ndr->depth--;
5501 static enum ndr_err_code ndr_push_srvsvc_NetShareCtr1501(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1501 *r)
5503 uint32_t cntr_array_1;
5504 if (ndr_flags & NDR_SCALARS) {
5505 NDR_CHECK(ndr_push_align(ndr, 4));
5506 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
5507 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
5509 if (ndr_flags & NDR_BUFFERS) {
5510 if (r->array) {
5511 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
5512 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
5513 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
5515 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
5516 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
5520 return NDR_ERR_SUCCESS;
5523 static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr1501(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1501 *r)
5525 uint32_t _ptr_array;
5526 uint32_t size_array_1 = 0;
5527 uint32_t cntr_array_1;
5528 TALLOC_CTX *_mem_save_array_0;
5529 TALLOC_CTX *_mem_save_array_1;
5530 if (ndr_flags & NDR_SCALARS) {
5531 NDR_CHECK(ndr_pull_align(ndr, 4));
5532 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
5533 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
5534 if (_ptr_array) {
5535 NDR_PULL_ALLOC(ndr, r->array);
5536 } else {
5537 r->array = NULL;
5540 if (ndr_flags & NDR_BUFFERS) {
5541 if (r->array) {
5542 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
5543 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
5544 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
5545 size_array_1 = ndr_get_array_size(ndr, &r->array);
5546 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
5547 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
5548 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
5549 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
5550 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
5552 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
5553 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
5555 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
5556 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
5558 if (r->array) {
5559 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
5562 return NDR_ERR_SUCCESS;
5565 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1501(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1501 *r)
5567 uint32_t cntr_array_1;
5568 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr1501");
5569 ndr->depth++;
5570 ndr_print_uint32(ndr, "count", r->count);
5571 ndr_print_ptr(ndr, "array", r->array);
5572 ndr->depth++;
5573 if (r->array) {
5574 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
5575 ndr->depth++;
5576 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
5577 char *idx_1=NULL;
5578 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
5579 ndr_print_sec_desc_buf(ndr, "array", &r->array[cntr_array_1]);
5580 free(idx_1);
5583 ndr->depth--;
5585 ndr->depth--;
5586 ndr->depth--;
5589 static enum ndr_err_code ndr_push_srvsvc_NetShareInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetShareInfo *r)
5591 if (ndr_flags & NDR_SCALARS) {
5592 int level = ndr_push_get_switch_value(ndr, r);
5593 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
5594 switch (level) {
5595 case 0: {
5596 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
5597 break; }
5599 case 1: {
5600 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
5601 break; }
5603 case 2: {
5604 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
5605 break; }
5607 case 501: {
5608 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info501));
5609 break; }
5611 case 502: {
5612 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info502));
5613 break; }
5615 case 1004: {
5616 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1004));
5617 break; }
5619 case 1005: {
5620 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1005));
5621 break; }
5623 case 1006: {
5624 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1006));
5625 break; }
5627 case 1007: {
5628 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1007));
5629 break; }
5631 case 1501: {
5632 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1501));
5633 break; }
5635 default: {
5636 break; }
5640 if (ndr_flags & NDR_BUFFERS) {
5641 int level = ndr_push_get_switch_value(ndr, r);
5642 switch (level) {
5643 case 0:
5644 if (r->info0) {
5645 NDR_CHECK(ndr_push_srvsvc_NetShareInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
5647 break;
5649 case 1:
5650 if (r->info1) {
5651 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
5653 break;
5655 case 2:
5656 if (r->info2) {
5657 NDR_CHECK(ndr_push_srvsvc_NetShareInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
5659 break;
5661 case 501:
5662 if (r->info501) {
5663 NDR_CHECK(ndr_push_srvsvc_NetShareInfo501(ndr, NDR_SCALARS|NDR_BUFFERS, r->info501));
5665 break;
5667 case 502:
5668 if (r->info502) {
5669 NDR_CHECK(ndr_push_srvsvc_NetShareInfo502(ndr, NDR_SCALARS|NDR_BUFFERS, r->info502));
5671 break;
5673 case 1004:
5674 if (r->info1004) {
5675 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1004(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1004));
5677 break;
5679 case 1005:
5680 if (r->info1005) {
5681 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1005(ndr, NDR_SCALARS, r->info1005));
5683 break;
5685 case 1006:
5686 if (r->info1006) {
5687 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1006(ndr, NDR_SCALARS, r->info1006));
5689 break;
5691 case 1007:
5692 if (r->info1007) {
5693 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1007(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1007));
5695 break;
5697 case 1501:
5698 if (r->info1501) {
5699 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1501));
5701 break;
5703 default:
5704 break;
5708 return NDR_ERR_SUCCESS;
5711 static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetShareInfo *r)
5713 int level;
5714 uint32_t _level;
5715 TALLOC_CTX *_mem_save_info0_0;
5716 uint32_t _ptr_info0;
5717 TALLOC_CTX *_mem_save_info1_0;
5718 uint32_t _ptr_info1;
5719 TALLOC_CTX *_mem_save_info2_0;
5720 uint32_t _ptr_info2;
5721 TALLOC_CTX *_mem_save_info501_0;
5722 uint32_t _ptr_info501;
5723 TALLOC_CTX *_mem_save_info502_0;
5724 uint32_t _ptr_info502;
5725 TALLOC_CTX *_mem_save_info1004_0;
5726 uint32_t _ptr_info1004;
5727 TALLOC_CTX *_mem_save_info1005_0;
5728 uint32_t _ptr_info1005;
5729 TALLOC_CTX *_mem_save_info1006_0;
5730 uint32_t _ptr_info1006;
5731 TALLOC_CTX *_mem_save_info1007_0;
5732 uint32_t _ptr_info1007;
5733 TALLOC_CTX *_mem_save_info1501_0;
5734 uint32_t _ptr_info1501;
5735 level = ndr_pull_get_switch_value(ndr, r);
5736 if (ndr_flags & NDR_SCALARS) {
5737 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
5738 if (_level != level) {
5739 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
5741 switch (level) {
5742 case 0: {
5743 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
5744 if (_ptr_info0) {
5745 NDR_PULL_ALLOC(ndr, r->info0);
5746 } else {
5747 r->info0 = NULL;
5749 break; }
5751 case 1: {
5752 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
5753 if (_ptr_info1) {
5754 NDR_PULL_ALLOC(ndr, r->info1);
5755 } else {
5756 r->info1 = NULL;
5758 break; }
5760 case 2: {
5761 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
5762 if (_ptr_info2) {
5763 NDR_PULL_ALLOC(ndr, r->info2);
5764 } else {
5765 r->info2 = NULL;
5767 break; }
5769 case 501: {
5770 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info501));
5771 if (_ptr_info501) {
5772 NDR_PULL_ALLOC(ndr, r->info501);
5773 } else {
5774 r->info501 = NULL;
5776 break; }
5778 case 502: {
5779 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info502));
5780 if (_ptr_info502) {
5781 NDR_PULL_ALLOC(ndr, r->info502);
5782 } else {
5783 r->info502 = NULL;
5785 break; }
5787 case 1004: {
5788 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1004));
5789 if (_ptr_info1004) {
5790 NDR_PULL_ALLOC(ndr, r->info1004);
5791 } else {
5792 r->info1004 = NULL;
5794 break; }
5796 case 1005: {
5797 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1005));
5798 if (_ptr_info1005) {
5799 NDR_PULL_ALLOC(ndr, r->info1005);
5800 } else {
5801 r->info1005 = NULL;
5803 break; }
5805 case 1006: {
5806 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1006));
5807 if (_ptr_info1006) {
5808 NDR_PULL_ALLOC(ndr, r->info1006);
5809 } else {
5810 r->info1006 = NULL;
5812 break; }
5814 case 1007: {
5815 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1007));
5816 if (_ptr_info1007) {
5817 NDR_PULL_ALLOC(ndr, r->info1007);
5818 } else {
5819 r->info1007 = NULL;
5821 break; }
5823 case 1501: {
5824 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1501));
5825 if (_ptr_info1501) {
5826 NDR_PULL_ALLOC(ndr, r->info1501);
5827 } else {
5828 r->info1501 = NULL;
5830 break; }
5832 default: {
5833 break; }
5837 if (ndr_flags & NDR_BUFFERS) {
5838 switch (level) {
5839 case 0:
5840 if (r->info0) {
5841 _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
5842 NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
5843 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
5844 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
5846 break;
5848 case 1:
5849 if (r->info1) {
5850 _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
5851 NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
5852 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
5853 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
5855 break;
5857 case 2:
5858 if (r->info2) {
5859 _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
5860 NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
5861 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
5862 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
5864 break;
5866 case 501:
5867 if (r->info501) {
5868 _mem_save_info501_0 = NDR_PULL_GET_MEM_CTX(ndr);
5869 NDR_PULL_SET_MEM_CTX(ndr, r->info501, 0);
5870 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo501(ndr, NDR_SCALARS|NDR_BUFFERS, r->info501));
5871 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info501_0, 0);
5873 break;
5875 case 502:
5876 if (r->info502) {
5877 _mem_save_info502_0 = NDR_PULL_GET_MEM_CTX(ndr);
5878 NDR_PULL_SET_MEM_CTX(ndr, r->info502, 0);
5879 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo502(ndr, NDR_SCALARS|NDR_BUFFERS, r->info502));
5880 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info502_0, 0);
5882 break;
5884 case 1004:
5885 if (r->info1004) {
5886 _mem_save_info1004_0 = NDR_PULL_GET_MEM_CTX(ndr);
5887 NDR_PULL_SET_MEM_CTX(ndr, r->info1004, 0);
5888 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1004(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1004));
5889 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1004_0, 0);
5891 break;
5893 case 1005:
5894 if (r->info1005) {
5895 _mem_save_info1005_0 = NDR_PULL_GET_MEM_CTX(ndr);
5896 NDR_PULL_SET_MEM_CTX(ndr, r->info1005, 0);
5897 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1005(ndr, NDR_SCALARS, r->info1005));
5898 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1005_0, 0);
5900 break;
5902 case 1006:
5903 if (r->info1006) {
5904 _mem_save_info1006_0 = NDR_PULL_GET_MEM_CTX(ndr);
5905 NDR_PULL_SET_MEM_CTX(ndr, r->info1006, 0);
5906 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1006(ndr, NDR_SCALARS, r->info1006));
5907 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1006_0, 0);
5909 break;
5911 case 1007:
5912 if (r->info1007) {
5913 _mem_save_info1007_0 = NDR_PULL_GET_MEM_CTX(ndr);
5914 NDR_PULL_SET_MEM_CTX(ndr, r->info1007, 0);
5915 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1007(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1007));
5916 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1007_0, 0);
5918 break;
5920 case 1501:
5921 if (r->info1501) {
5922 _mem_save_info1501_0 = NDR_PULL_GET_MEM_CTX(ndr);
5923 NDR_PULL_SET_MEM_CTX(ndr, r->info1501, 0);
5924 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1501));
5925 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1501_0, 0);
5927 break;
5929 default:
5930 break;
5934 return NDR_ERR_SUCCESS;
5937 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetShareInfo *r)
5939 int level;
5940 level = ndr_print_get_switch_value(ndr, r);
5941 ndr_print_union(ndr, name, level, "srvsvc_NetShareInfo");
5942 switch (level) {
5943 case 0:
5944 ndr_print_ptr(ndr, "info0", r->info0);
5945 ndr->depth++;
5946 if (r->info0) {
5947 ndr_print_srvsvc_NetShareInfo0(ndr, "info0", r->info0);
5949 ndr->depth--;
5950 break;
5952 case 1:
5953 ndr_print_ptr(ndr, "info1", r->info1);
5954 ndr->depth++;
5955 if (r->info1) {
5956 ndr_print_srvsvc_NetShareInfo1(ndr, "info1", r->info1);
5958 ndr->depth--;
5959 break;
5961 case 2:
5962 ndr_print_ptr(ndr, "info2", r->info2);
5963 ndr->depth++;
5964 if (r->info2) {
5965 ndr_print_srvsvc_NetShareInfo2(ndr, "info2", r->info2);
5967 ndr->depth--;
5968 break;
5970 case 501:
5971 ndr_print_ptr(ndr, "info501", r->info501);
5972 ndr->depth++;
5973 if (r->info501) {
5974 ndr_print_srvsvc_NetShareInfo501(ndr, "info501", r->info501);
5976 ndr->depth--;
5977 break;
5979 case 502:
5980 ndr_print_ptr(ndr, "info502", r->info502);
5981 ndr->depth++;
5982 if (r->info502) {
5983 ndr_print_srvsvc_NetShareInfo502(ndr, "info502", r->info502);
5985 ndr->depth--;
5986 break;
5988 case 1004:
5989 ndr_print_ptr(ndr, "info1004", r->info1004);
5990 ndr->depth++;
5991 if (r->info1004) {
5992 ndr_print_srvsvc_NetShareInfo1004(ndr, "info1004", r->info1004);
5994 ndr->depth--;
5995 break;
5997 case 1005:
5998 ndr_print_ptr(ndr, "info1005", r->info1005);
5999 ndr->depth++;
6000 if (r->info1005) {
6001 ndr_print_srvsvc_NetShareInfo1005(ndr, "info1005", r->info1005);
6003 ndr->depth--;
6004 break;
6006 case 1006:
6007 ndr_print_ptr(ndr, "info1006", r->info1006);
6008 ndr->depth++;
6009 if (r->info1006) {
6010 ndr_print_srvsvc_NetShareInfo1006(ndr, "info1006", r->info1006);
6012 ndr->depth--;
6013 break;
6015 case 1007:
6016 ndr_print_ptr(ndr, "info1007", r->info1007);
6017 ndr->depth++;
6018 if (r->info1007) {
6019 ndr_print_srvsvc_NetShareInfo1007(ndr, "info1007", r->info1007);
6021 ndr->depth--;
6022 break;
6024 case 1501:
6025 ndr_print_ptr(ndr, "info1501", r->info1501);
6026 ndr->depth++;
6027 if (r->info1501) {
6028 ndr_print_sec_desc_buf(ndr, "info1501", r->info1501);
6030 ndr->depth--;
6031 break;
6033 default:
6034 break;
6039 static enum ndr_err_code ndr_push_srvsvc_NetShareCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetShareCtr *r)
6041 if (ndr_flags & NDR_SCALARS) {
6042 int level = ndr_push_get_switch_value(ndr, r);
6043 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
6044 switch (level) {
6045 case 0: {
6046 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0));
6047 break; }
6049 case 1: {
6050 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
6051 break; }
6053 case 2: {
6054 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr2));
6055 break; }
6057 case 501: {
6058 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr501));
6059 break; }
6061 case 502: {
6062 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr502));
6063 break; }
6065 case 1004: {
6066 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1004));
6067 break; }
6069 case 1005: {
6070 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1005));
6071 break; }
6073 case 1006: {
6074 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1006));
6075 break; }
6077 case 1007: {
6078 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1007));
6079 break; }
6081 case 1501: {
6082 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1501));
6083 break; }
6085 default: {
6086 break; }
6090 if (ndr_flags & NDR_BUFFERS) {
6091 int level = ndr_push_get_switch_value(ndr, r);
6092 switch (level) {
6093 case 0:
6094 if (r->ctr0) {
6095 NDR_CHECK(ndr_push_srvsvc_NetShareCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
6097 break;
6099 case 1:
6100 if (r->ctr1) {
6101 NDR_CHECK(ndr_push_srvsvc_NetShareCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
6103 break;
6105 case 2:
6106 if (r->ctr2) {
6107 NDR_CHECK(ndr_push_srvsvc_NetShareCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
6109 break;
6111 case 501:
6112 if (r->ctr501) {
6113 NDR_CHECK(ndr_push_srvsvc_NetShareCtr501(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr501));
6115 break;
6117 case 502:
6118 if (r->ctr502) {
6119 NDR_CHECK(ndr_push_srvsvc_NetShareCtr502(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr502));
6121 break;
6123 case 1004:
6124 if (r->ctr1004) {
6125 NDR_CHECK(ndr_push_srvsvc_NetShareCtr1004(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1004));
6127 break;
6129 case 1005:
6130 if (r->ctr1005) {
6131 NDR_CHECK(ndr_push_srvsvc_NetShareCtr1005(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1005));
6133 break;
6135 case 1006:
6136 if (r->ctr1006) {
6137 NDR_CHECK(ndr_push_srvsvc_NetShareCtr1006(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1006));
6139 break;
6141 case 1007:
6142 if (r->ctr1007) {
6143 NDR_CHECK(ndr_push_srvsvc_NetShareCtr1007(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1007));
6145 break;
6147 case 1501:
6148 if (r->ctr1501) {
6149 NDR_CHECK(ndr_push_srvsvc_NetShareCtr1501(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1501));
6151 break;
6153 default:
6154 break;
6158 return NDR_ERR_SUCCESS;
6161 static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetShareCtr *r)
6163 int level;
6164 uint32_t _level;
6165 TALLOC_CTX *_mem_save_ctr0_0;
6166 uint32_t _ptr_ctr0;
6167 TALLOC_CTX *_mem_save_ctr1_0;
6168 uint32_t _ptr_ctr1;
6169 TALLOC_CTX *_mem_save_ctr2_0;
6170 uint32_t _ptr_ctr2;
6171 TALLOC_CTX *_mem_save_ctr501_0;
6172 uint32_t _ptr_ctr501;
6173 TALLOC_CTX *_mem_save_ctr502_0;
6174 uint32_t _ptr_ctr502;
6175 TALLOC_CTX *_mem_save_ctr1004_0;
6176 uint32_t _ptr_ctr1004;
6177 TALLOC_CTX *_mem_save_ctr1005_0;
6178 uint32_t _ptr_ctr1005;
6179 TALLOC_CTX *_mem_save_ctr1006_0;
6180 uint32_t _ptr_ctr1006;
6181 TALLOC_CTX *_mem_save_ctr1007_0;
6182 uint32_t _ptr_ctr1007;
6183 TALLOC_CTX *_mem_save_ctr1501_0;
6184 uint32_t _ptr_ctr1501;
6185 level = ndr_pull_get_switch_value(ndr, r);
6186 if (ndr_flags & NDR_SCALARS) {
6187 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
6188 if (_level != level) {
6189 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
6191 switch (level) {
6192 case 0: {
6193 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr0));
6194 if (_ptr_ctr0) {
6195 NDR_PULL_ALLOC(ndr, r->ctr0);
6196 } else {
6197 r->ctr0 = NULL;
6199 break; }
6201 case 1: {
6202 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
6203 if (_ptr_ctr1) {
6204 NDR_PULL_ALLOC(ndr, r->ctr1);
6205 } else {
6206 r->ctr1 = NULL;
6208 break; }
6210 case 2: {
6211 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr2));
6212 if (_ptr_ctr2) {
6213 NDR_PULL_ALLOC(ndr, r->ctr2);
6214 } else {
6215 r->ctr2 = NULL;
6217 break; }
6219 case 501: {
6220 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr501));
6221 if (_ptr_ctr501) {
6222 NDR_PULL_ALLOC(ndr, r->ctr501);
6223 } else {
6224 r->ctr501 = NULL;
6226 break; }
6228 case 502: {
6229 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr502));
6230 if (_ptr_ctr502) {
6231 NDR_PULL_ALLOC(ndr, r->ctr502);
6232 } else {
6233 r->ctr502 = NULL;
6235 break; }
6237 case 1004: {
6238 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1004));
6239 if (_ptr_ctr1004) {
6240 NDR_PULL_ALLOC(ndr, r->ctr1004);
6241 } else {
6242 r->ctr1004 = NULL;
6244 break; }
6246 case 1005: {
6247 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1005));
6248 if (_ptr_ctr1005) {
6249 NDR_PULL_ALLOC(ndr, r->ctr1005);
6250 } else {
6251 r->ctr1005 = NULL;
6253 break; }
6255 case 1006: {
6256 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1006));
6257 if (_ptr_ctr1006) {
6258 NDR_PULL_ALLOC(ndr, r->ctr1006);
6259 } else {
6260 r->ctr1006 = NULL;
6262 break; }
6264 case 1007: {
6265 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1007));
6266 if (_ptr_ctr1007) {
6267 NDR_PULL_ALLOC(ndr, r->ctr1007);
6268 } else {
6269 r->ctr1007 = NULL;
6271 break; }
6273 case 1501: {
6274 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1501));
6275 if (_ptr_ctr1501) {
6276 NDR_PULL_ALLOC(ndr, r->ctr1501);
6277 } else {
6278 r->ctr1501 = NULL;
6280 break; }
6282 default: {
6283 break; }
6287 if (ndr_flags & NDR_BUFFERS) {
6288 switch (level) {
6289 case 0:
6290 if (r->ctr0) {
6291 _mem_save_ctr0_0 = NDR_PULL_GET_MEM_CTX(ndr);
6292 NDR_PULL_SET_MEM_CTX(ndr, r->ctr0, 0);
6293 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
6294 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr0_0, 0);
6296 break;
6298 case 1:
6299 if (r->ctr1) {
6300 _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
6301 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
6302 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
6303 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
6305 break;
6307 case 2:
6308 if (r->ctr2) {
6309 _mem_save_ctr2_0 = NDR_PULL_GET_MEM_CTX(ndr);
6310 NDR_PULL_SET_MEM_CTX(ndr, r->ctr2, 0);
6311 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
6312 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr2_0, 0);
6314 break;
6316 case 501:
6317 if (r->ctr501) {
6318 _mem_save_ctr501_0 = NDR_PULL_GET_MEM_CTX(ndr);
6319 NDR_PULL_SET_MEM_CTX(ndr, r->ctr501, 0);
6320 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr501(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr501));
6321 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr501_0, 0);
6323 break;
6325 case 502:
6326 if (r->ctr502) {
6327 _mem_save_ctr502_0 = NDR_PULL_GET_MEM_CTX(ndr);
6328 NDR_PULL_SET_MEM_CTX(ndr, r->ctr502, 0);
6329 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr502(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr502));
6330 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr502_0, 0);
6332 break;
6334 case 1004:
6335 if (r->ctr1004) {
6336 _mem_save_ctr1004_0 = NDR_PULL_GET_MEM_CTX(ndr);
6337 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1004, 0);
6338 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr1004(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1004));
6339 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1004_0, 0);
6341 break;
6343 case 1005:
6344 if (r->ctr1005) {
6345 _mem_save_ctr1005_0 = NDR_PULL_GET_MEM_CTX(ndr);
6346 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1005, 0);
6347 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr1005(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1005));
6348 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1005_0, 0);
6350 break;
6352 case 1006:
6353 if (r->ctr1006) {
6354 _mem_save_ctr1006_0 = NDR_PULL_GET_MEM_CTX(ndr);
6355 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1006, 0);
6356 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr1006(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1006));
6357 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1006_0, 0);
6359 break;
6361 case 1007:
6362 if (r->ctr1007) {
6363 _mem_save_ctr1007_0 = NDR_PULL_GET_MEM_CTX(ndr);
6364 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1007, 0);
6365 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr1007(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1007));
6366 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1007_0, 0);
6368 break;
6370 case 1501:
6371 if (r->ctr1501) {
6372 _mem_save_ctr1501_0 = NDR_PULL_GET_MEM_CTX(ndr);
6373 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1501, 0);
6374 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr1501(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1501));
6375 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1501_0, 0);
6377 break;
6379 default:
6380 break;
6384 return NDR_ERR_SUCCESS;
6387 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetShareCtr *r)
6389 int level;
6390 level = ndr_print_get_switch_value(ndr, r);
6391 ndr_print_union(ndr, name, level, "srvsvc_NetShareCtr");
6392 switch (level) {
6393 case 0:
6394 ndr_print_ptr(ndr, "ctr0", r->ctr0);
6395 ndr->depth++;
6396 if (r->ctr0) {
6397 ndr_print_srvsvc_NetShareCtr0(ndr, "ctr0", r->ctr0);
6399 ndr->depth--;
6400 break;
6402 case 1:
6403 ndr_print_ptr(ndr, "ctr1", r->ctr1);
6404 ndr->depth++;
6405 if (r->ctr1) {
6406 ndr_print_srvsvc_NetShareCtr1(ndr, "ctr1", r->ctr1);
6408 ndr->depth--;
6409 break;
6411 case 2:
6412 ndr_print_ptr(ndr, "ctr2", r->ctr2);
6413 ndr->depth++;
6414 if (r->ctr2) {
6415 ndr_print_srvsvc_NetShareCtr2(ndr, "ctr2", r->ctr2);
6417 ndr->depth--;
6418 break;
6420 case 501:
6421 ndr_print_ptr(ndr, "ctr501", r->ctr501);
6422 ndr->depth++;
6423 if (r->ctr501) {
6424 ndr_print_srvsvc_NetShareCtr501(ndr, "ctr501", r->ctr501);
6426 ndr->depth--;
6427 break;
6429 case 502:
6430 ndr_print_ptr(ndr, "ctr502", r->ctr502);
6431 ndr->depth++;
6432 if (r->ctr502) {
6433 ndr_print_srvsvc_NetShareCtr502(ndr, "ctr502", r->ctr502);
6435 ndr->depth--;
6436 break;
6438 case 1004:
6439 ndr_print_ptr(ndr, "ctr1004", r->ctr1004);
6440 ndr->depth++;
6441 if (r->ctr1004) {
6442 ndr_print_srvsvc_NetShareCtr1004(ndr, "ctr1004", r->ctr1004);
6444 ndr->depth--;
6445 break;
6447 case 1005:
6448 ndr_print_ptr(ndr, "ctr1005", r->ctr1005);
6449 ndr->depth++;
6450 if (r->ctr1005) {
6451 ndr_print_srvsvc_NetShareCtr1005(ndr, "ctr1005", r->ctr1005);
6453 ndr->depth--;
6454 break;
6456 case 1006:
6457 ndr_print_ptr(ndr, "ctr1006", r->ctr1006);
6458 ndr->depth++;
6459 if (r->ctr1006) {
6460 ndr_print_srvsvc_NetShareCtr1006(ndr, "ctr1006", r->ctr1006);
6462 ndr->depth--;
6463 break;
6465 case 1007:
6466 ndr_print_ptr(ndr, "ctr1007", r->ctr1007);
6467 ndr->depth++;
6468 if (r->ctr1007) {
6469 ndr_print_srvsvc_NetShareCtr1007(ndr, "ctr1007", r->ctr1007);
6471 ndr->depth--;
6472 break;
6474 case 1501:
6475 ndr_print_ptr(ndr, "ctr1501", r->ctr1501);
6476 ndr->depth++;
6477 if (r->ctr1501) {
6478 ndr_print_srvsvc_NetShareCtr1501(ndr, "ctr1501", r->ctr1501);
6480 ndr->depth--;
6481 break;
6483 default:
6484 break;
6489 static enum ndr_err_code ndr_push_srvsvc_NetShareInfoCtr(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfoCtr *r)
6491 if (ndr_flags & NDR_SCALARS) {
6492 NDR_CHECK(ndr_push_align(ndr, 4));
6493 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
6494 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level));
6495 NDR_CHECK(ndr_push_srvsvc_NetShareCtr(ndr, NDR_SCALARS, &r->ctr));
6497 if (ndr_flags & NDR_BUFFERS) {
6498 NDR_CHECK(ndr_push_srvsvc_NetShareCtr(ndr, NDR_BUFFERS, &r->ctr));
6500 return NDR_ERR_SUCCESS;
6503 static enum ndr_err_code ndr_pull_srvsvc_NetShareInfoCtr(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfoCtr *r)
6505 if (ndr_flags & NDR_SCALARS) {
6506 NDR_CHECK(ndr_pull_align(ndr, 4));
6507 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
6508 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level));
6509 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr(ndr, NDR_SCALARS, &r->ctr));
6511 if (ndr_flags & NDR_BUFFERS) {
6512 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr(ndr, NDR_BUFFERS, &r->ctr));
6514 return NDR_ERR_SUCCESS;
6517 _PUBLIC_ void ndr_print_srvsvc_NetShareInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfoCtr *r)
6519 ndr_print_struct(ndr, name, "srvsvc_NetShareInfoCtr");
6520 ndr->depth++;
6521 ndr_print_uint32(ndr, "level", r->level);
6522 ndr_print_set_switch_value(ndr, &r->ctr, r->level);
6523 ndr_print_srvsvc_NetShareCtr(ndr, "ctr", &r->ctr);
6524 ndr->depth--;
6527 _PUBLIC_ enum ndr_err_code ndr_push_srvsvc_PlatformId(struct ndr_push *ndr, int ndr_flags, enum srvsvc_PlatformId r)
6529 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
6530 return NDR_ERR_SUCCESS;
6533 _PUBLIC_ enum ndr_err_code ndr_pull_srvsvc_PlatformId(struct ndr_pull *ndr, int ndr_flags, enum srvsvc_PlatformId *r)
6535 uint32_t v;
6536 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
6537 *r = v;
6538 return NDR_ERR_SUCCESS;
6541 _PUBLIC_ void ndr_print_srvsvc_PlatformId(struct ndr_print *ndr, const char *name, enum srvsvc_PlatformId r)
6543 const char *val = NULL;
6545 switch (r) {
6546 case PLATFORM_ID_DOS: val = "PLATFORM_ID_DOS"; break;
6547 case PLATFORM_ID_OS2: val = "PLATFORM_ID_OS2"; break;
6548 case PLATFORM_ID_NT: val = "PLATFORM_ID_NT"; break;
6549 case PLATFORM_ID_OSF: val = "PLATFORM_ID_OSF"; break;
6550 case PLATFORM_ID_VMS: val = "PLATFORM_ID_VMS"; break;
6552 ndr_print_enum(ndr, name, "ENUM", val, r);
6555 _PUBLIC_ enum ndr_err_code ndr_push_srvsvc_NetSrvInfo100(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo100 *r)
6557 if (ndr_flags & NDR_SCALARS) {
6558 NDR_CHECK(ndr_push_align(ndr, 4));
6559 NDR_CHECK(ndr_push_srvsvc_PlatformId(ndr, NDR_SCALARS, r->platform_id));
6560 NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_name));
6562 if (ndr_flags & NDR_BUFFERS) {
6563 if (r->server_name) {
6564 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
6565 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6566 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
6567 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server_name, ndr_charset_length(r->server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6570 return NDR_ERR_SUCCESS;
6573 _PUBLIC_ enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo100(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo100 *r)
6575 uint32_t _ptr_server_name;
6576 uint32_t size_server_name_1 = 0;
6577 uint32_t length_server_name_1 = 0;
6578 TALLOC_CTX *_mem_save_server_name_0;
6579 if (ndr_flags & NDR_SCALARS) {
6580 NDR_CHECK(ndr_pull_align(ndr, 4));
6581 NDR_CHECK(ndr_pull_srvsvc_PlatformId(ndr, NDR_SCALARS, &r->platform_id));
6582 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
6583 if (_ptr_server_name) {
6584 NDR_PULL_ALLOC(ndr, r->server_name);
6585 } else {
6586 r->server_name = NULL;
6589 if (ndr_flags & NDR_BUFFERS) {
6590 if (r->server_name) {
6591 _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6592 NDR_PULL_SET_MEM_CTX(ndr, r->server_name, 0);
6593 NDR_CHECK(ndr_pull_array_size(ndr, &r->server_name));
6594 NDR_CHECK(ndr_pull_array_length(ndr, &r->server_name));
6595 size_server_name_1 = ndr_get_array_size(ndr, &r->server_name);
6596 length_server_name_1 = ndr_get_array_length(ndr, &r->server_name);
6597 if (length_server_name_1 > size_server_name_1) {
6598 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_name_1, length_server_name_1);
6600 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
6601 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
6602 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
6605 return NDR_ERR_SUCCESS;
6608 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo100(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo100 *r)
6610 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo100");
6611 ndr->depth++;
6612 ndr_print_srvsvc_PlatformId(ndr, "platform_id", r->platform_id);
6613 ndr_print_ptr(ndr, "server_name", r->server_name);
6614 ndr->depth++;
6615 if (r->server_name) {
6616 ndr_print_string(ndr, "server_name", r->server_name);
6618 ndr->depth--;
6619 ndr->depth--;
6622 _PUBLIC_ enum ndr_err_code ndr_push_srvsvc_NetSrvInfo101(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo101 *r)
6624 if (ndr_flags & NDR_SCALARS) {
6625 NDR_CHECK(ndr_push_align(ndr, 4));
6626 NDR_CHECK(ndr_push_srvsvc_PlatformId(ndr, NDR_SCALARS, r->platform_id));
6627 NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_name));
6628 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version_major));
6629 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version_minor));
6630 NDR_CHECK(ndr_push_svcctl_ServerType(ndr, NDR_SCALARS, r->server_type));
6631 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
6633 if (ndr_flags & NDR_BUFFERS) {
6634 if (r->server_name) {
6635 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
6636 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6637 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
6638 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server_name, ndr_charset_length(r->server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6640 if (r->comment) {
6641 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
6642 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6643 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
6644 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6647 return NDR_ERR_SUCCESS;
6650 _PUBLIC_ enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo101(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo101 *r)
6652 uint32_t _ptr_server_name;
6653 uint32_t size_server_name_1 = 0;
6654 uint32_t length_server_name_1 = 0;
6655 TALLOC_CTX *_mem_save_server_name_0;
6656 uint32_t _ptr_comment;
6657 uint32_t size_comment_1 = 0;
6658 uint32_t length_comment_1 = 0;
6659 TALLOC_CTX *_mem_save_comment_0;
6660 if (ndr_flags & NDR_SCALARS) {
6661 NDR_CHECK(ndr_pull_align(ndr, 4));
6662 NDR_CHECK(ndr_pull_srvsvc_PlatformId(ndr, NDR_SCALARS, &r->platform_id));
6663 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
6664 if (_ptr_server_name) {
6665 NDR_PULL_ALLOC(ndr, r->server_name);
6666 } else {
6667 r->server_name = NULL;
6669 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version_major));
6670 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version_minor));
6671 NDR_CHECK(ndr_pull_svcctl_ServerType(ndr, NDR_SCALARS, &r->server_type));
6672 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
6673 if (_ptr_comment) {
6674 NDR_PULL_ALLOC(ndr, r->comment);
6675 } else {
6676 r->comment = NULL;
6679 if (ndr_flags & NDR_BUFFERS) {
6680 if (r->server_name) {
6681 _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6682 NDR_PULL_SET_MEM_CTX(ndr, r->server_name, 0);
6683 NDR_CHECK(ndr_pull_array_size(ndr, &r->server_name));
6684 NDR_CHECK(ndr_pull_array_length(ndr, &r->server_name));
6685 size_server_name_1 = ndr_get_array_size(ndr, &r->server_name);
6686 length_server_name_1 = ndr_get_array_length(ndr, &r->server_name);
6687 if (length_server_name_1 > size_server_name_1) {
6688 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_name_1, length_server_name_1);
6690 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
6691 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
6692 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
6694 if (r->comment) {
6695 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
6696 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
6697 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
6698 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
6699 size_comment_1 = ndr_get_array_size(ndr, &r->comment);
6700 length_comment_1 = ndr_get_array_length(ndr, &r->comment);
6701 if (length_comment_1 > size_comment_1) {
6702 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_comment_1, length_comment_1);
6704 NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_1, sizeof(uint16_t)));
6705 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, length_comment_1, sizeof(uint16_t), CH_UTF16));
6706 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
6709 return NDR_ERR_SUCCESS;
6712 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo101(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo101 *r)
6714 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo101");
6715 ndr->depth++;
6716 ndr_print_srvsvc_PlatformId(ndr, "platform_id", r->platform_id);
6717 ndr_print_ptr(ndr, "server_name", r->server_name);
6718 ndr->depth++;
6719 if (r->server_name) {
6720 ndr_print_string(ndr, "server_name", r->server_name);
6722 ndr->depth--;
6723 ndr_print_uint32(ndr, "version_major", r->version_major);
6724 ndr_print_uint32(ndr, "version_minor", r->version_minor);
6725 ndr_print_svcctl_ServerType(ndr, "server_type", r->server_type);
6726 ndr_print_ptr(ndr, "comment", r->comment);
6727 ndr->depth++;
6728 if (r->comment) {
6729 ndr_print_string(ndr, "comment", r->comment);
6731 ndr->depth--;
6732 ndr->depth--;
6735 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo102(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo102 *r)
6737 if (ndr_flags & NDR_SCALARS) {
6738 NDR_CHECK(ndr_push_align(ndr, 4));
6739 NDR_CHECK(ndr_push_srvsvc_PlatformId(ndr, NDR_SCALARS, r->platform_id));
6740 NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_name));
6741 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version_major));
6742 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version_minor));
6743 NDR_CHECK(ndr_push_svcctl_ServerType(ndr, NDR_SCALARS, r->server_type));
6744 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
6745 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->users));
6746 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->disc));
6747 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->hidden));
6748 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->announce));
6749 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->anndelta));
6750 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->licenses));
6751 NDR_CHECK(ndr_push_unique_ptr(ndr, r->userpath));
6753 if (ndr_flags & NDR_BUFFERS) {
6754 if (r->server_name) {
6755 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
6756 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6757 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
6758 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server_name, ndr_charset_length(r->server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6760 if (r->comment) {
6761 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
6762 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6763 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
6764 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6766 if (r->userpath) {
6767 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->userpath, CH_UTF16)));
6768 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6769 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->userpath, CH_UTF16)));
6770 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->userpath, ndr_charset_length(r->userpath, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6773 return NDR_ERR_SUCCESS;
6776 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo102(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo102 *r)
6778 uint32_t _ptr_server_name;
6779 uint32_t size_server_name_1 = 0;
6780 uint32_t length_server_name_1 = 0;
6781 TALLOC_CTX *_mem_save_server_name_0;
6782 uint32_t _ptr_comment;
6783 uint32_t size_comment_1 = 0;
6784 uint32_t length_comment_1 = 0;
6785 TALLOC_CTX *_mem_save_comment_0;
6786 uint32_t _ptr_userpath;
6787 uint32_t size_userpath_1 = 0;
6788 uint32_t length_userpath_1 = 0;
6789 TALLOC_CTX *_mem_save_userpath_0;
6790 if (ndr_flags & NDR_SCALARS) {
6791 NDR_CHECK(ndr_pull_align(ndr, 4));
6792 NDR_CHECK(ndr_pull_srvsvc_PlatformId(ndr, NDR_SCALARS, &r->platform_id));
6793 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
6794 if (_ptr_server_name) {
6795 NDR_PULL_ALLOC(ndr, r->server_name);
6796 } else {
6797 r->server_name = NULL;
6799 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version_major));
6800 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version_minor));
6801 NDR_CHECK(ndr_pull_svcctl_ServerType(ndr, NDR_SCALARS, &r->server_type));
6802 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
6803 if (_ptr_comment) {
6804 NDR_PULL_ALLOC(ndr, r->comment);
6805 } else {
6806 r->comment = NULL;
6808 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->users));
6809 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->disc));
6810 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->hidden));
6811 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->announce));
6812 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->anndelta));
6813 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->licenses));
6814 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_userpath));
6815 if (_ptr_userpath) {
6816 NDR_PULL_ALLOC(ndr, r->userpath);
6817 } else {
6818 r->userpath = NULL;
6821 if (ndr_flags & NDR_BUFFERS) {
6822 if (r->server_name) {
6823 _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6824 NDR_PULL_SET_MEM_CTX(ndr, r->server_name, 0);
6825 NDR_CHECK(ndr_pull_array_size(ndr, &r->server_name));
6826 NDR_CHECK(ndr_pull_array_length(ndr, &r->server_name));
6827 size_server_name_1 = ndr_get_array_size(ndr, &r->server_name);
6828 length_server_name_1 = ndr_get_array_length(ndr, &r->server_name);
6829 if (length_server_name_1 > size_server_name_1) {
6830 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_name_1, length_server_name_1);
6832 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
6833 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
6834 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
6836 if (r->comment) {
6837 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
6838 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
6839 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
6840 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
6841 size_comment_1 = ndr_get_array_size(ndr, &r->comment);
6842 length_comment_1 = ndr_get_array_length(ndr, &r->comment);
6843 if (length_comment_1 > size_comment_1) {
6844 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_comment_1, length_comment_1);
6846 NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_1, sizeof(uint16_t)));
6847 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, length_comment_1, sizeof(uint16_t), CH_UTF16));
6848 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
6850 if (r->userpath) {
6851 _mem_save_userpath_0 = NDR_PULL_GET_MEM_CTX(ndr);
6852 NDR_PULL_SET_MEM_CTX(ndr, r->userpath, 0);
6853 NDR_CHECK(ndr_pull_array_size(ndr, &r->userpath));
6854 NDR_CHECK(ndr_pull_array_length(ndr, &r->userpath));
6855 size_userpath_1 = ndr_get_array_size(ndr, &r->userpath);
6856 length_userpath_1 = ndr_get_array_length(ndr, &r->userpath);
6857 if (length_userpath_1 > size_userpath_1) {
6858 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_userpath_1, length_userpath_1);
6860 NDR_CHECK(ndr_check_string_terminator(ndr, length_userpath_1, sizeof(uint16_t)));
6861 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->userpath, length_userpath_1, sizeof(uint16_t), CH_UTF16));
6862 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_userpath_0, 0);
6865 return NDR_ERR_SUCCESS;
6868 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo102(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo102 *r)
6870 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo102");
6871 ndr->depth++;
6872 ndr_print_srvsvc_PlatformId(ndr, "platform_id", r->platform_id);
6873 ndr_print_ptr(ndr, "server_name", r->server_name);
6874 ndr->depth++;
6875 if (r->server_name) {
6876 ndr_print_string(ndr, "server_name", r->server_name);
6878 ndr->depth--;
6879 ndr_print_uint32(ndr, "version_major", r->version_major);
6880 ndr_print_uint32(ndr, "version_minor", r->version_minor);
6881 ndr_print_svcctl_ServerType(ndr, "server_type", r->server_type);
6882 ndr_print_ptr(ndr, "comment", r->comment);
6883 ndr->depth++;
6884 if (r->comment) {
6885 ndr_print_string(ndr, "comment", r->comment);
6887 ndr->depth--;
6888 ndr_print_uint32(ndr, "users", r->users);
6889 ndr_print_uint32(ndr, "disc", r->disc);
6890 ndr_print_uint32(ndr, "hidden", r->hidden);
6891 ndr_print_uint32(ndr, "announce", r->announce);
6892 ndr_print_uint32(ndr, "anndelta", r->anndelta);
6893 ndr_print_uint32(ndr, "licenses", r->licenses);
6894 ndr_print_ptr(ndr, "userpath", r->userpath);
6895 ndr->depth++;
6896 if (r->userpath) {
6897 ndr_print_string(ndr, "userpath", r->userpath);
6899 ndr->depth--;
6900 ndr->depth--;
6903 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo402(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo402 *r)
6905 if (ndr_flags & NDR_SCALARS) {
6906 NDR_CHECK(ndr_push_align(ndr, 4));
6907 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ulist_mtime));
6908 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->glist_mtime));
6909 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->alist_mtime));
6910 NDR_CHECK(ndr_push_unique_ptr(ndr, r->alerts));
6911 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->security));
6912 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numadmin));
6913 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lanmask));
6914 NDR_CHECK(ndr_push_unique_ptr(ndr, r->guestaccount));
6915 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->chdevs));
6916 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->chdevqs));
6917 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->chdevjobs));
6918 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->connections));
6919 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->shares));
6920 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->openfiles));
6921 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessopen));
6922 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sesssvc));
6923 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessreqs));
6924 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->opensearch));
6925 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->activelocks));
6926 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numreqbufs));
6927 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sizereqbufs));
6928 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numbigbufs));
6929 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numfiletasks));
6930 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->alertsched));
6931 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->erroralert));
6932 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->logonalert));
6933 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->accessalert));
6934 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->diskalert));
6935 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->netioalert));
6936 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxaudits));
6937 NDR_CHECK(ndr_push_unique_ptr(ndr, r->srvheuristics));
6939 if (ndr_flags & NDR_BUFFERS) {
6940 if (r->alerts) {
6941 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->alerts, CH_UTF16)));
6942 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6943 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->alerts, CH_UTF16)));
6944 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->alerts, ndr_charset_length(r->alerts, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6946 if (r->guestaccount) {
6947 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->guestaccount, CH_UTF16)));
6948 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6949 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->guestaccount, CH_UTF16)));
6950 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->guestaccount, ndr_charset_length(r->guestaccount, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6952 if (r->srvheuristics) {
6953 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->srvheuristics, CH_UTF16)));
6954 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6955 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->srvheuristics, CH_UTF16)));
6956 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->srvheuristics, ndr_charset_length(r->srvheuristics, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6959 return NDR_ERR_SUCCESS;
6962 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo402(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo402 *r)
6964 uint32_t _ptr_alerts;
6965 uint32_t size_alerts_1 = 0;
6966 uint32_t length_alerts_1 = 0;
6967 TALLOC_CTX *_mem_save_alerts_0;
6968 uint32_t _ptr_guestaccount;
6969 uint32_t size_guestaccount_1 = 0;
6970 uint32_t length_guestaccount_1 = 0;
6971 TALLOC_CTX *_mem_save_guestaccount_0;
6972 uint32_t _ptr_srvheuristics;
6973 uint32_t size_srvheuristics_1 = 0;
6974 uint32_t length_srvheuristics_1 = 0;
6975 TALLOC_CTX *_mem_save_srvheuristics_0;
6976 if (ndr_flags & NDR_SCALARS) {
6977 NDR_CHECK(ndr_pull_align(ndr, 4));
6978 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ulist_mtime));
6979 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->glist_mtime));
6980 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->alist_mtime));
6981 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_alerts));
6982 if (_ptr_alerts) {
6983 NDR_PULL_ALLOC(ndr, r->alerts);
6984 } else {
6985 r->alerts = NULL;
6987 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->security));
6988 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numadmin));
6989 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lanmask));
6990 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_guestaccount));
6991 if (_ptr_guestaccount) {
6992 NDR_PULL_ALLOC(ndr, r->guestaccount);
6993 } else {
6994 r->guestaccount = NULL;
6996 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->chdevs));
6997 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->chdevqs));
6998 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->chdevjobs));
6999 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->connections));
7000 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->shares));
7001 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->openfiles));
7002 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessopen));
7003 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sesssvc));
7004 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessreqs));
7005 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->opensearch));
7006 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->activelocks));
7007 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numreqbufs));
7008 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sizereqbufs));
7009 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numbigbufs));
7010 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numfiletasks));
7011 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->alertsched));
7012 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->erroralert));
7013 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->logonalert));
7014 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->accessalert));
7015 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->diskalert));
7016 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->netioalert));
7017 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxaudits));
7018 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_srvheuristics));
7019 if (_ptr_srvheuristics) {
7020 NDR_PULL_ALLOC(ndr, r->srvheuristics);
7021 } else {
7022 r->srvheuristics = NULL;
7025 if (ndr_flags & NDR_BUFFERS) {
7026 if (r->alerts) {
7027 _mem_save_alerts_0 = NDR_PULL_GET_MEM_CTX(ndr);
7028 NDR_PULL_SET_MEM_CTX(ndr, r->alerts, 0);
7029 NDR_CHECK(ndr_pull_array_size(ndr, &r->alerts));
7030 NDR_CHECK(ndr_pull_array_length(ndr, &r->alerts));
7031 size_alerts_1 = ndr_get_array_size(ndr, &r->alerts);
7032 length_alerts_1 = ndr_get_array_length(ndr, &r->alerts);
7033 if (length_alerts_1 > size_alerts_1) {
7034 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_alerts_1, length_alerts_1);
7036 NDR_CHECK(ndr_check_string_terminator(ndr, length_alerts_1, sizeof(uint16_t)));
7037 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->alerts, length_alerts_1, sizeof(uint16_t), CH_UTF16));
7038 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alerts_0, 0);
7040 if (r->guestaccount) {
7041 _mem_save_guestaccount_0 = NDR_PULL_GET_MEM_CTX(ndr);
7042 NDR_PULL_SET_MEM_CTX(ndr, r->guestaccount, 0);
7043 NDR_CHECK(ndr_pull_array_size(ndr, &r->guestaccount));
7044 NDR_CHECK(ndr_pull_array_length(ndr, &r->guestaccount));
7045 size_guestaccount_1 = ndr_get_array_size(ndr, &r->guestaccount);
7046 length_guestaccount_1 = ndr_get_array_length(ndr, &r->guestaccount);
7047 if (length_guestaccount_1 > size_guestaccount_1) {
7048 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_guestaccount_1, length_guestaccount_1);
7050 NDR_CHECK(ndr_check_string_terminator(ndr, length_guestaccount_1, sizeof(uint16_t)));
7051 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->guestaccount, length_guestaccount_1, sizeof(uint16_t), CH_UTF16));
7052 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_guestaccount_0, 0);
7054 if (r->srvheuristics) {
7055 _mem_save_srvheuristics_0 = NDR_PULL_GET_MEM_CTX(ndr);
7056 NDR_PULL_SET_MEM_CTX(ndr, r->srvheuristics, 0);
7057 NDR_CHECK(ndr_pull_array_size(ndr, &r->srvheuristics));
7058 NDR_CHECK(ndr_pull_array_length(ndr, &r->srvheuristics));
7059 size_srvheuristics_1 = ndr_get_array_size(ndr, &r->srvheuristics);
7060 length_srvheuristics_1 = ndr_get_array_length(ndr, &r->srvheuristics);
7061 if (length_srvheuristics_1 > size_srvheuristics_1) {
7062 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_srvheuristics_1, length_srvheuristics_1);
7064 NDR_CHECK(ndr_check_string_terminator(ndr, length_srvheuristics_1, sizeof(uint16_t)));
7065 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->srvheuristics, length_srvheuristics_1, sizeof(uint16_t), CH_UTF16));
7066 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_srvheuristics_0, 0);
7069 return NDR_ERR_SUCCESS;
7072 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo402(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo402 *r)
7074 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo402");
7075 ndr->depth++;
7076 ndr_print_uint32(ndr, "ulist_mtime", r->ulist_mtime);
7077 ndr_print_uint32(ndr, "glist_mtime", r->glist_mtime);
7078 ndr_print_uint32(ndr, "alist_mtime", r->alist_mtime);
7079 ndr_print_ptr(ndr, "alerts", r->alerts);
7080 ndr->depth++;
7081 if (r->alerts) {
7082 ndr_print_string(ndr, "alerts", r->alerts);
7084 ndr->depth--;
7085 ndr_print_uint32(ndr, "security", r->security);
7086 ndr_print_uint32(ndr, "numadmin", r->numadmin);
7087 ndr_print_uint32(ndr, "lanmask", r->lanmask);
7088 ndr_print_ptr(ndr, "guestaccount", r->guestaccount);
7089 ndr->depth++;
7090 if (r->guestaccount) {
7091 ndr_print_string(ndr, "guestaccount", r->guestaccount);
7093 ndr->depth--;
7094 ndr_print_uint32(ndr, "chdevs", r->chdevs);
7095 ndr_print_uint32(ndr, "chdevqs", r->chdevqs);
7096 ndr_print_uint32(ndr, "chdevjobs", r->chdevjobs);
7097 ndr_print_uint32(ndr, "connections", r->connections);
7098 ndr_print_uint32(ndr, "shares", r->shares);
7099 ndr_print_uint32(ndr, "openfiles", r->openfiles);
7100 ndr_print_uint32(ndr, "sessopen", r->sessopen);
7101 ndr_print_uint32(ndr, "sesssvc", r->sesssvc);
7102 ndr_print_uint32(ndr, "sessreqs", r->sessreqs);
7103 ndr_print_uint32(ndr, "opensearch", r->opensearch);
7104 ndr_print_uint32(ndr, "activelocks", r->activelocks);
7105 ndr_print_uint32(ndr, "numreqbufs", r->numreqbufs);
7106 ndr_print_uint32(ndr, "sizereqbufs", r->sizereqbufs);
7107 ndr_print_uint32(ndr, "numbigbufs", r->numbigbufs);
7108 ndr_print_uint32(ndr, "numfiletasks", r->numfiletasks);
7109 ndr_print_uint32(ndr, "alertsched", r->alertsched);
7110 ndr_print_uint32(ndr, "erroralert", r->erroralert);
7111 ndr_print_uint32(ndr, "logonalert", r->logonalert);
7112 ndr_print_uint32(ndr, "accessalert", r->accessalert);
7113 ndr_print_uint32(ndr, "diskalert", r->diskalert);
7114 ndr_print_uint32(ndr, "netioalert", r->netioalert);
7115 ndr_print_uint32(ndr, "maxaudits", r->maxaudits);
7116 ndr_print_ptr(ndr, "srvheuristics", r->srvheuristics);
7117 ndr->depth++;
7118 if (r->srvheuristics) {
7119 ndr_print_string(ndr, "srvheuristics", r->srvheuristics);
7121 ndr->depth--;
7122 ndr->depth--;
7125 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo403(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo403 *r)
7127 if (ndr_flags & NDR_SCALARS) {
7128 NDR_CHECK(ndr_push_align(ndr, 4));
7129 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ulist_mtime));
7130 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->glist_mtime));
7131 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->alist_mtime));
7132 NDR_CHECK(ndr_push_unique_ptr(ndr, r->alerts));
7133 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->security));
7134 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numadmin));
7135 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lanmask));
7136 NDR_CHECK(ndr_push_unique_ptr(ndr, r->guestaccount));
7137 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->chdevs));
7138 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->chdevqs));
7139 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->chdevjobs));
7140 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->connections));
7141 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->shares));
7142 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->openfiles));
7143 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessopen));
7144 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sesssvc));
7145 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessreqs));
7146 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->opensearch));
7147 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->activelocks));
7148 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numreqbufs));
7149 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sizereqbufs));
7150 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numbigbufs));
7151 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numfiletasks));
7152 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->alertsched));
7153 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->erroralert));
7154 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->logonalert));
7155 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->accessalert));
7156 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->diskalert));
7157 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->netioalert));
7158 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxaudits));
7159 NDR_CHECK(ndr_push_unique_ptr(ndr, r->srvheuristics));
7160 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->auditedevents));
7161 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->auditprofile));
7162 NDR_CHECK(ndr_push_unique_ptr(ndr, r->autopath));
7164 if (ndr_flags & NDR_BUFFERS) {
7165 if (r->alerts) {
7166 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->alerts, CH_UTF16)));
7167 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
7168 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->alerts, CH_UTF16)));
7169 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->alerts, ndr_charset_length(r->alerts, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7171 if (r->guestaccount) {
7172 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->guestaccount, CH_UTF16)));
7173 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
7174 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->guestaccount, CH_UTF16)));
7175 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->guestaccount, ndr_charset_length(r->guestaccount, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7177 if (r->srvheuristics) {
7178 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->srvheuristics, CH_UTF16)));
7179 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
7180 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->srvheuristics, CH_UTF16)));
7181 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->srvheuristics, ndr_charset_length(r->srvheuristics, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7183 if (r->autopath) {
7184 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->autopath, CH_UTF16)));
7185 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
7186 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->autopath, CH_UTF16)));
7187 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->autopath, ndr_charset_length(r->autopath, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7190 return NDR_ERR_SUCCESS;
7193 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo403(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo403 *r)
7195 uint32_t _ptr_alerts;
7196 uint32_t size_alerts_1 = 0;
7197 uint32_t length_alerts_1 = 0;
7198 TALLOC_CTX *_mem_save_alerts_0;
7199 uint32_t _ptr_guestaccount;
7200 uint32_t size_guestaccount_1 = 0;
7201 uint32_t length_guestaccount_1 = 0;
7202 TALLOC_CTX *_mem_save_guestaccount_0;
7203 uint32_t _ptr_srvheuristics;
7204 uint32_t size_srvheuristics_1 = 0;
7205 uint32_t length_srvheuristics_1 = 0;
7206 TALLOC_CTX *_mem_save_srvheuristics_0;
7207 uint32_t _ptr_autopath;
7208 uint32_t size_autopath_1 = 0;
7209 uint32_t length_autopath_1 = 0;
7210 TALLOC_CTX *_mem_save_autopath_0;
7211 if (ndr_flags & NDR_SCALARS) {
7212 NDR_CHECK(ndr_pull_align(ndr, 4));
7213 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ulist_mtime));
7214 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->glist_mtime));
7215 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->alist_mtime));
7216 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_alerts));
7217 if (_ptr_alerts) {
7218 NDR_PULL_ALLOC(ndr, r->alerts);
7219 } else {
7220 r->alerts = NULL;
7222 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->security));
7223 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numadmin));
7224 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lanmask));
7225 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_guestaccount));
7226 if (_ptr_guestaccount) {
7227 NDR_PULL_ALLOC(ndr, r->guestaccount);
7228 } else {
7229 r->guestaccount = NULL;
7231 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->chdevs));
7232 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->chdevqs));
7233 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->chdevjobs));
7234 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->connections));
7235 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->shares));
7236 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->openfiles));
7237 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessopen));
7238 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sesssvc));
7239 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessreqs));
7240 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->opensearch));
7241 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->activelocks));
7242 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numreqbufs));
7243 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sizereqbufs));
7244 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numbigbufs));
7245 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numfiletasks));
7246 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->alertsched));
7247 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->erroralert));
7248 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->logonalert));
7249 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->accessalert));
7250 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->diskalert));
7251 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->netioalert));
7252 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxaudits));
7253 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_srvheuristics));
7254 if (_ptr_srvheuristics) {
7255 NDR_PULL_ALLOC(ndr, r->srvheuristics);
7256 } else {
7257 r->srvheuristics = NULL;
7259 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->auditedevents));
7260 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->auditprofile));
7261 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_autopath));
7262 if (_ptr_autopath) {
7263 NDR_PULL_ALLOC(ndr, r->autopath);
7264 } else {
7265 r->autopath = NULL;
7268 if (ndr_flags & NDR_BUFFERS) {
7269 if (r->alerts) {
7270 _mem_save_alerts_0 = NDR_PULL_GET_MEM_CTX(ndr);
7271 NDR_PULL_SET_MEM_CTX(ndr, r->alerts, 0);
7272 NDR_CHECK(ndr_pull_array_size(ndr, &r->alerts));
7273 NDR_CHECK(ndr_pull_array_length(ndr, &r->alerts));
7274 size_alerts_1 = ndr_get_array_size(ndr, &r->alerts);
7275 length_alerts_1 = ndr_get_array_length(ndr, &r->alerts);
7276 if (length_alerts_1 > size_alerts_1) {
7277 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_alerts_1, length_alerts_1);
7279 NDR_CHECK(ndr_check_string_terminator(ndr, length_alerts_1, sizeof(uint16_t)));
7280 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->alerts, length_alerts_1, sizeof(uint16_t), CH_UTF16));
7281 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alerts_0, 0);
7283 if (r->guestaccount) {
7284 _mem_save_guestaccount_0 = NDR_PULL_GET_MEM_CTX(ndr);
7285 NDR_PULL_SET_MEM_CTX(ndr, r->guestaccount, 0);
7286 NDR_CHECK(ndr_pull_array_size(ndr, &r->guestaccount));
7287 NDR_CHECK(ndr_pull_array_length(ndr, &r->guestaccount));
7288 size_guestaccount_1 = ndr_get_array_size(ndr, &r->guestaccount);
7289 length_guestaccount_1 = ndr_get_array_length(ndr, &r->guestaccount);
7290 if (length_guestaccount_1 > size_guestaccount_1) {
7291 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_guestaccount_1, length_guestaccount_1);
7293 NDR_CHECK(ndr_check_string_terminator(ndr, length_guestaccount_1, sizeof(uint16_t)));
7294 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->guestaccount, length_guestaccount_1, sizeof(uint16_t), CH_UTF16));
7295 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_guestaccount_0, 0);
7297 if (r->srvheuristics) {
7298 _mem_save_srvheuristics_0 = NDR_PULL_GET_MEM_CTX(ndr);
7299 NDR_PULL_SET_MEM_CTX(ndr, r->srvheuristics, 0);
7300 NDR_CHECK(ndr_pull_array_size(ndr, &r->srvheuristics));
7301 NDR_CHECK(ndr_pull_array_length(ndr, &r->srvheuristics));
7302 size_srvheuristics_1 = ndr_get_array_size(ndr, &r->srvheuristics);
7303 length_srvheuristics_1 = ndr_get_array_length(ndr, &r->srvheuristics);
7304 if (length_srvheuristics_1 > size_srvheuristics_1) {
7305 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_srvheuristics_1, length_srvheuristics_1);
7307 NDR_CHECK(ndr_check_string_terminator(ndr, length_srvheuristics_1, sizeof(uint16_t)));
7308 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->srvheuristics, length_srvheuristics_1, sizeof(uint16_t), CH_UTF16));
7309 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_srvheuristics_0, 0);
7311 if (r->autopath) {
7312 _mem_save_autopath_0 = NDR_PULL_GET_MEM_CTX(ndr);
7313 NDR_PULL_SET_MEM_CTX(ndr, r->autopath, 0);
7314 NDR_CHECK(ndr_pull_array_size(ndr, &r->autopath));
7315 NDR_CHECK(ndr_pull_array_length(ndr, &r->autopath));
7316 size_autopath_1 = ndr_get_array_size(ndr, &r->autopath);
7317 length_autopath_1 = ndr_get_array_length(ndr, &r->autopath);
7318 if (length_autopath_1 > size_autopath_1) {
7319 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_autopath_1, length_autopath_1);
7321 NDR_CHECK(ndr_check_string_terminator(ndr, length_autopath_1, sizeof(uint16_t)));
7322 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->autopath, length_autopath_1, sizeof(uint16_t), CH_UTF16));
7323 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_autopath_0, 0);
7326 return NDR_ERR_SUCCESS;
7329 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo403(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo403 *r)
7331 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo403");
7332 ndr->depth++;
7333 ndr_print_uint32(ndr, "ulist_mtime", r->ulist_mtime);
7334 ndr_print_uint32(ndr, "glist_mtime", r->glist_mtime);
7335 ndr_print_uint32(ndr, "alist_mtime", r->alist_mtime);
7336 ndr_print_ptr(ndr, "alerts", r->alerts);
7337 ndr->depth++;
7338 if (r->alerts) {
7339 ndr_print_string(ndr, "alerts", r->alerts);
7341 ndr->depth--;
7342 ndr_print_uint32(ndr, "security", r->security);
7343 ndr_print_uint32(ndr, "numadmin", r->numadmin);
7344 ndr_print_uint32(ndr, "lanmask", r->lanmask);
7345 ndr_print_ptr(ndr, "guestaccount", r->guestaccount);
7346 ndr->depth++;
7347 if (r->guestaccount) {
7348 ndr_print_string(ndr, "guestaccount", r->guestaccount);
7350 ndr->depth--;
7351 ndr_print_uint32(ndr, "chdevs", r->chdevs);
7352 ndr_print_uint32(ndr, "chdevqs", r->chdevqs);
7353 ndr_print_uint32(ndr, "chdevjobs", r->chdevjobs);
7354 ndr_print_uint32(ndr, "connections", r->connections);
7355 ndr_print_uint32(ndr, "shares", r->shares);
7356 ndr_print_uint32(ndr, "openfiles", r->openfiles);
7357 ndr_print_uint32(ndr, "sessopen", r->sessopen);
7358 ndr_print_uint32(ndr, "sesssvc", r->sesssvc);
7359 ndr_print_uint32(ndr, "sessreqs", r->sessreqs);
7360 ndr_print_uint32(ndr, "opensearch", r->opensearch);
7361 ndr_print_uint32(ndr, "activelocks", r->activelocks);
7362 ndr_print_uint32(ndr, "numreqbufs", r->numreqbufs);
7363 ndr_print_uint32(ndr, "sizereqbufs", r->sizereqbufs);
7364 ndr_print_uint32(ndr, "numbigbufs", r->numbigbufs);
7365 ndr_print_uint32(ndr, "numfiletasks", r->numfiletasks);
7366 ndr_print_uint32(ndr, "alertsched", r->alertsched);
7367 ndr_print_uint32(ndr, "erroralert", r->erroralert);
7368 ndr_print_uint32(ndr, "logonalert", r->logonalert);
7369 ndr_print_uint32(ndr, "accessalert", r->accessalert);
7370 ndr_print_uint32(ndr, "diskalert", r->diskalert);
7371 ndr_print_uint32(ndr, "netioalert", r->netioalert);
7372 ndr_print_uint32(ndr, "maxaudits", r->maxaudits);
7373 ndr_print_ptr(ndr, "srvheuristics", r->srvheuristics);
7374 ndr->depth++;
7375 if (r->srvheuristics) {
7376 ndr_print_string(ndr, "srvheuristics", r->srvheuristics);
7378 ndr->depth--;
7379 ndr_print_uint32(ndr, "auditedevents", r->auditedevents);
7380 ndr_print_uint32(ndr, "auditprofile", r->auditprofile);
7381 ndr_print_ptr(ndr, "autopath", r->autopath);
7382 ndr->depth++;
7383 if (r->autopath) {
7384 ndr_print_string(ndr, "autopath", r->autopath);
7386 ndr->depth--;
7387 ndr->depth--;
7390 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo502 *r)
7392 if (ndr_flags & NDR_SCALARS) {
7393 NDR_CHECK(ndr_push_align(ndr, 4));
7394 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessopen));
7395 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sesssvc));
7396 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->opensearch));
7397 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sizereqbufs));
7398 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initworkitems));
7399 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxworkitems));
7400 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rawworkitems));
7401 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->irpstacksize));
7402 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxrawbuflen));
7403 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessusers));
7404 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessconns));
7405 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxpagedmemoryusage));
7406 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxnonpagedmemoryusage));
7407 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesoftcompat));
7408 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableforcedlogoff));
7409 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timesource));
7410 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->acceptdownlevelapis));
7411 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lmannounce));
7413 if (ndr_flags & NDR_BUFFERS) {
7415 return NDR_ERR_SUCCESS;
7418 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo502 *r)
7420 if (ndr_flags & NDR_SCALARS) {
7421 NDR_CHECK(ndr_pull_align(ndr, 4));
7422 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessopen));
7423 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sesssvc));
7424 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->opensearch));
7425 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sizereqbufs));
7426 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initworkitems));
7427 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxworkitems));
7428 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rawworkitems));
7429 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->irpstacksize));
7430 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxrawbuflen));
7431 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessusers));
7432 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessconns));
7433 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxpagedmemoryusage));
7434 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxnonpagedmemoryusage));
7435 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesoftcompat));
7436 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableforcedlogoff));
7437 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timesource));
7438 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->acceptdownlevelapis));
7439 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lmannounce));
7441 if (ndr_flags & NDR_BUFFERS) {
7443 return NDR_ERR_SUCCESS;
7446 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo502 *r)
7448 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo502");
7449 ndr->depth++;
7450 ndr_print_uint32(ndr, "sessopen", r->sessopen);
7451 ndr_print_uint32(ndr, "sesssvc", r->sesssvc);
7452 ndr_print_uint32(ndr, "opensearch", r->opensearch);
7453 ndr_print_uint32(ndr, "sizereqbufs", r->sizereqbufs);
7454 ndr_print_uint32(ndr, "initworkitems", r->initworkitems);
7455 ndr_print_uint32(ndr, "maxworkitems", r->maxworkitems);
7456 ndr_print_uint32(ndr, "rawworkitems", r->rawworkitems);
7457 ndr_print_uint32(ndr, "irpstacksize", r->irpstacksize);
7458 ndr_print_uint32(ndr, "maxrawbuflen", r->maxrawbuflen);
7459 ndr_print_uint32(ndr, "sessusers", r->sessusers);
7460 ndr_print_uint32(ndr, "sessconns", r->sessconns);
7461 ndr_print_uint32(ndr, "maxpagedmemoryusage", r->maxpagedmemoryusage);
7462 ndr_print_uint32(ndr, "maxnonpagedmemoryusage", r->maxnonpagedmemoryusage);
7463 ndr_print_uint32(ndr, "enablesoftcompat", r->enablesoftcompat);
7464 ndr_print_uint32(ndr, "enableforcedlogoff", r->enableforcedlogoff);
7465 ndr_print_uint32(ndr, "timesource", r->timesource);
7466 ndr_print_uint32(ndr, "acceptdownlevelapis", r->acceptdownlevelapis);
7467 ndr_print_uint32(ndr, "lmannounce", r->lmannounce);
7468 ndr->depth--;
7471 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo503(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo503 *r)
7473 if (ndr_flags & NDR_SCALARS) {
7474 NDR_CHECK(ndr_push_align(ndr, 4));
7475 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessopen));
7476 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sesssvc));
7477 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->opensearch));
7478 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sizereqbufs));
7479 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initworkitems));
7480 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxworkitems));
7481 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rawworkitems));
7482 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->irpstacksize));
7483 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxrawbuflen));
7484 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessusers));
7485 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessconns));
7486 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxpagedmemoryusage));
7487 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxnonpagedmemoryusage));
7488 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesoftcompat));
7489 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableforcedlogoff));
7490 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timesource));
7491 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->acceptdownlevelapis));
7492 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lmannounce));
7493 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
7494 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxcopyreadlen));
7495 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxcopywritelen));
7496 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minkeepsearch));
7497 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxkeepsearch));
7498 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minkeepcomplsearch));
7499 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxkeepcomplsearch));
7500 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->threadcountadd));
7501 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numlockthreads));
7502 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->scavtimeout));
7503 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minrcvqueue));
7504 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minfreeworkitems));
7505 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->xactmemsize));
7506 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->threadpriority));
7507 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxmpxct));
7508 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->oplockbreakwait));
7509 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->oplockbreakresponsewait));
7510 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableoplocks));
7511 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableoplockforceclose));
7512 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablefcbopens));
7513 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableraw));
7514 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesharednetdrives));
7515 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minfreeconnections));
7516 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxfreeconnections));
7518 if (ndr_flags & NDR_BUFFERS) {
7519 if (r->domain) {
7520 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
7521 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
7522 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
7523 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7526 return NDR_ERR_SUCCESS;
7529 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo503(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo503 *r)
7531 uint32_t _ptr_domain;
7532 uint32_t size_domain_1 = 0;
7533 uint32_t length_domain_1 = 0;
7534 TALLOC_CTX *_mem_save_domain_0;
7535 if (ndr_flags & NDR_SCALARS) {
7536 NDR_CHECK(ndr_pull_align(ndr, 4));
7537 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessopen));
7538 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sesssvc));
7539 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->opensearch));
7540 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sizereqbufs));
7541 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initworkitems));
7542 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxworkitems));
7543 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rawworkitems));
7544 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->irpstacksize));
7545 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxrawbuflen));
7546 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessusers));
7547 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessconns));
7548 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxpagedmemoryusage));
7549 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxnonpagedmemoryusage));
7550 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesoftcompat));
7551 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableforcedlogoff));
7552 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timesource));
7553 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->acceptdownlevelapis));
7554 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lmannounce));
7555 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
7556 if (_ptr_domain) {
7557 NDR_PULL_ALLOC(ndr, r->domain);
7558 } else {
7559 r->domain = NULL;
7561 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxcopyreadlen));
7562 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxcopywritelen));
7563 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minkeepsearch));
7564 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxkeepsearch));
7565 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minkeepcomplsearch));
7566 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxkeepcomplsearch));
7567 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->threadcountadd));
7568 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numlockthreads));
7569 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->scavtimeout));
7570 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minrcvqueue));
7571 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minfreeworkitems));
7572 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->xactmemsize));
7573 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->threadpriority));
7574 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxmpxct));
7575 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->oplockbreakwait));
7576 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->oplockbreakresponsewait));
7577 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableoplocks));
7578 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableoplockforceclose));
7579 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablefcbopens));
7580 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableraw));
7581 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesharednetdrives));
7582 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minfreeconnections));
7583 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxfreeconnections));
7585 if (ndr_flags & NDR_BUFFERS) {
7586 if (r->domain) {
7587 _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
7588 NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
7589 NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
7590 NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
7591 size_domain_1 = ndr_get_array_size(ndr, &r->domain);
7592 length_domain_1 = ndr_get_array_length(ndr, &r->domain);
7593 if (length_domain_1 > size_domain_1) {
7594 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_domain_1, length_domain_1);
7596 NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_1, sizeof(uint16_t)));
7597 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, length_domain_1, sizeof(uint16_t), CH_UTF16));
7598 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
7601 return NDR_ERR_SUCCESS;
7604 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo503(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo503 *r)
7606 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo503");
7607 ndr->depth++;
7608 ndr_print_uint32(ndr, "sessopen", r->sessopen);
7609 ndr_print_uint32(ndr, "sesssvc", r->sesssvc);
7610 ndr_print_uint32(ndr, "opensearch", r->opensearch);
7611 ndr_print_uint32(ndr, "sizereqbufs", r->sizereqbufs);
7612 ndr_print_uint32(ndr, "initworkitems", r->initworkitems);
7613 ndr_print_uint32(ndr, "maxworkitems", r->maxworkitems);
7614 ndr_print_uint32(ndr, "rawworkitems", r->rawworkitems);
7615 ndr_print_uint32(ndr, "irpstacksize", r->irpstacksize);
7616 ndr_print_uint32(ndr, "maxrawbuflen", r->maxrawbuflen);
7617 ndr_print_uint32(ndr, "sessusers", r->sessusers);
7618 ndr_print_uint32(ndr, "sessconns", r->sessconns);
7619 ndr_print_uint32(ndr, "maxpagedmemoryusage", r->maxpagedmemoryusage);
7620 ndr_print_uint32(ndr, "maxnonpagedmemoryusage", r->maxnonpagedmemoryusage);
7621 ndr_print_uint32(ndr, "enablesoftcompat", r->enablesoftcompat);
7622 ndr_print_uint32(ndr, "enableforcedlogoff", r->enableforcedlogoff);
7623 ndr_print_uint32(ndr, "timesource", r->timesource);
7624 ndr_print_uint32(ndr, "acceptdownlevelapis", r->acceptdownlevelapis);
7625 ndr_print_uint32(ndr, "lmannounce", r->lmannounce);
7626 ndr_print_ptr(ndr, "domain", r->domain);
7627 ndr->depth++;
7628 if (r->domain) {
7629 ndr_print_string(ndr, "domain", r->domain);
7631 ndr->depth--;
7632 ndr_print_uint32(ndr, "maxcopyreadlen", r->maxcopyreadlen);
7633 ndr_print_uint32(ndr, "maxcopywritelen", r->maxcopywritelen);
7634 ndr_print_uint32(ndr, "minkeepsearch", r->minkeepsearch);
7635 ndr_print_uint32(ndr, "maxkeepsearch", r->maxkeepsearch);
7636 ndr_print_uint32(ndr, "minkeepcomplsearch", r->minkeepcomplsearch);
7637 ndr_print_uint32(ndr, "maxkeepcomplsearch", r->maxkeepcomplsearch);
7638 ndr_print_uint32(ndr, "threadcountadd", r->threadcountadd);
7639 ndr_print_uint32(ndr, "numlockthreads", r->numlockthreads);
7640 ndr_print_uint32(ndr, "scavtimeout", r->scavtimeout);
7641 ndr_print_uint32(ndr, "minrcvqueue", r->minrcvqueue);
7642 ndr_print_uint32(ndr, "minfreeworkitems", r->minfreeworkitems);
7643 ndr_print_uint32(ndr, "xactmemsize", r->xactmemsize);
7644 ndr_print_uint32(ndr, "threadpriority", r->threadpriority);
7645 ndr_print_uint32(ndr, "maxmpxct", r->maxmpxct);
7646 ndr_print_uint32(ndr, "oplockbreakwait", r->oplockbreakwait);
7647 ndr_print_uint32(ndr, "oplockbreakresponsewait", r->oplockbreakresponsewait);
7648 ndr_print_uint32(ndr, "enableoplocks", r->enableoplocks);
7649 ndr_print_uint32(ndr, "enableoplockforceclose", r->enableoplockforceclose);
7650 ndr_print_uint32(ndr, "enablefcbopens", r->enablefcbopens);
7651 ndr_print_uint32(ndr, "enableraw", r->enableraw);
7652 ndr_print_uint32(ndr, "enablesharednetdrives", r->enablesharednetdrives);
7653 ndr_print_uint32(ndr, "minfreeconnections", r->minfreeconnections);
7654 ndr_print_uint32(ndr, "maxfreeconnections", r->maxfreeconnections);
7655 ndr->depth--;
7658 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo599(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo599 *r)
7660 if (ndr_flags & NDR_SCALARS) {
7661 NDR_CHECK(ndr_push_align(ndr, 4));
7662 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessopen));
7663 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sesssvc));
7664 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->opensearch));
7665 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sizereqbufs));
7666 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initworkitems));
7667 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxworkitems));
7668 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rawworkitems));
7669 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->irpstacksize));
7670 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxrawbuflen));
7671 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessusers));
7672 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessconns));
7673 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxpagedmemoryusage));
7674 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxnonpagedmemoryusage));
7675 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesoftcompat));
7676 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableforcedlogoff));
7677 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timesource));
7678 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->acceptdownlevelapis));
7679 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lmannounce));
7680 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
7681 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxcopyreadlen));
7682 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxcopywritelen));
7683 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minkeepsearch));
7684 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minkeepcomplsearch));
7685 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxkeepcomplsearch));
7686 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->threadcountadd));
7687 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numlockthreads));
7688 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->scavtimeout));
7689 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minrcvqueue));
7690 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minfreeworkitems));
7691 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->xactmemsize));
7692 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->threadpriority));
7693 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxmpxct));
7694 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->oplockbreakwait));
7695 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->oplockbreakresponsewait));
7696 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableoplocks));
7697 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableoplockforceclose));
7698 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablefcbopens));
7699 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableraw));
7700 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesharednetdrives));
7701 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minfreeconnections));
7702 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxfreeconnections));
7703 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initsesstable));
7704 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initconntable));
7705 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initfiletable));
7706 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initsearchtable));
7707 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->alertsched));
7708 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->errortreshold));
7709 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->networkerrortreshold));
7710 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->diskspacetreshold));
7711 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
7712 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxlinkdelay));
7713 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minlinkthroughput));
7714 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->linkinfovalidtime));
7715 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->scavqosinfoupdatetime));
7716 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxworkitemidletime));
7718 if (ndr_flags & NDR_BUFFERS) {
7719 if (r->domain) {
7720 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
7721 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
7722 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
7723 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7726 return NDR_ERR_SUCCESS;
7729 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo599(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo599 *r)
7731 uint32_t _ptr_domain;
7732 uint32_t size_domain_1 = 0;
7733 uint32_t length_domain_1 = 0;
7734 TALLOC_CTX *_mem_save_domain_0;
7735 if (ndr_flags & NDR_SCALARS) {
7736 NDR_CHECK(ndr_pull_align(ndr, 4));
7737 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessopen));
7738 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sesssvc));
7739 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->opensearch));
7740 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sizereqbufs));
7741 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initworkitems));
7742 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxworkitems));
7743 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rawworkitems));
7744 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->irpstacksize));
7745 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxrawbuflen));
7746 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessusers));
7747 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessconns));
7748 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxpagedmemoryusage));
7749 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxnonpagedmemoryusage));
7750 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesoftcompat));
7751 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableforcedlogoff));
7752 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timesource));
7753 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->acceptdownlevelapis));
7754 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lmannounce));
7755 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
7756 if (_ptr_domain) {
7757 NDR_PULL_ALLOC(ndr, r->domain);
7758 } else {
7759 r->domain = NULL;
7761 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxcopyreadlen));
7762 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxcopywritelen));
7763 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minkeepsearch));
7764 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minkeepcomplsearch));
7765 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxkeepcomplsearch));
7766 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->threadcountadd));
7767 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numlockthreads));
7768 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->scavtimeout));
7769 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minrcvqueue));
7770 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minfreeworkitems));
7771 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->xactmemsize));
7772 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->threadpriority));
7773 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxmpxct));
7774 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->oplockbreakwait));
7775 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->oplockbreakresponsewait));
7776 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableoplocks));
7777 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableoplockforceclose));
7778 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablefcbopens));
7779 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableraw));
7780 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesharednetdrives));
7781 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minfreeconnections));
7782 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxfreeconnections));
7783 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initsesstable));
7784 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initconntable));
7785 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initfiletable));
7786 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initsearchtable));
7787 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->alertsched));
7788 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->errortreshold));
7789 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->networkerrortreshold));
7790 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->diskspacetreshold));
7791 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
7792 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxlinkdelay));
7793 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minlinkthroughput));
7794 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->linkinfovalidtime));
7795 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->scavqosinfoupdatetime));
7796 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxworkitemidletime));
7798 if (ndr_flags & NDR_BUFFERS) {
7799 if (r->domain) {
7800 _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
7801 NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
7802 NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
7803 NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
7804 size_domain_1 = ndr_get_array_size(ndr, &r->domain);
7805 length_domain_1 = ndr_get_array_length(ndr, &r->domain);
7806 if (length_domain_1 > size_domain_1) {
7807 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_domain_1, length_domain_1);
7809 NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_1, sizeof(uint16_t)));
7810 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, length_domain_1, sizeof(uint16_t), CH_UTF16));
7811 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
7814 return NDR_ERR_SUCCESS;
7817 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo599(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo599 *r)
7819 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo599");
7820 ndr->depth++;
7821 ndr_print_uint32(ndr, "sessopen", r->sessopen);
7822 ndr_print_uint32(ndr, "sesssvc", r->sesssvc);
7823 ndr_print_uint32(ndr, "opensearch", r->opensearch);
7824 ndr_print_uint32(ndr, "sizereqbufs", r->sizereqbufs);
7825 ndr_print_uint32(ndr, "initworkitems", r->initworkitems);
7826 ndr_print_uint32(ndr, "maxworkitems", r->maxworkitems);
7827 ndr_print_uint32(ndr, "rawworkitems", r->rawworkitems);
7828 ndr_print_uint32(ndr, "irpstacksize", r->irpstacksize);
7829 ndr_print_uint32(ndr, "maxrawbuflen", r->maxrawbuflen);
7830 ndr_print_uint32(ndr, "sessusers", r->sessusers);
7831 ndr_print_uint32(ndr, "sessconns", r->sessconns);
7832 ndr_print_uint32(ndr, "maxpagedmemoryusage", r->maxpagedmemoryusage);
7833 ndr_print_uint32(ndr, "maxnonpagedmemoryusage", r->maxnonpagedmemoryusage);
7834 ndr_print_uint32(ndr, "enablesoftcompat", r->enablesoftcompat);
7835 ndr_print_uint32(ndr, "enableforcedlogoff", r->enableforcedlogoff);
7836 ndr_print_uint32(ndr, "timesource", r->timesource);
7837 ndr_print_uint32(ndr, "acceptdownlevelapis", r->acceptdownlevelapis);
7838 ndr_print_uint32(ndr, "lmannounce", r->lmannounce);
7839 ndr_print_ptr(ndr, "domain", r->domain);
7840 ndr->depth++;
7841 if (r->domain) {
7842 ndr_print_string(ndr, "domain", r->domain);
7844 ndr->depth--;
7845 ndr_print_uint32(ndr, "maxcopyreadlen", r->maxcopyreadlen);
7846 ndr_print_uint32(ndr, "maxcopywritelen", r->maxcopywritelen);
7847 ndr_print_uint32(ndr, "minkeepsearch", r->minkeepsearch);
7848 ndr_print_uint32(ndr, "minkeepcomplsearch", r->minkeepcomplsearch);
7849 ndr_print_uint32(ndr, "maxkeepcomplsearch", r->maxkeepcomplsearch);
7850 ndr_print_uint32(ndr, "threadcountadd", r->threadcountadd);
7851 ndr_print_uint32(ndr, "numlockthreads", r->numlockthreads);
7852 ndr_print_uint32(ndr, "scavtimeout", r->scavtimeout);
7853 ndr_print_uint32(ndr, "minrcvqueue", r->minrcvqueue);
7854 ndr_print_uint32(ndr, "minfreeworkitems", r->minfreeworkitems);
7855 ndr_print_uint32(ndr, "xactmemsize", r->xactmemsize);
7856 ndr_print_uint32(ndr, "threadpriority", r->threadpriority);
7857 ndr_print_uint32(ndr, "maxmpxct", r->maxmpxct);
7858 ndr_print_uint32(ndr, "oplockbreakwait", r->oplockbreakwait);
7859 ndr_print_uint32(ndr, "oplockbreakresponsewait", r->oplockbreakresponsewait);
7860 ndr_print_uint32(ndr, "enableoplocks", r->enableoplocks);
7861 ndr_print_uint32(ndr, "enableoplockforceclose", r->enableoplockforceclose);
7862 ndr_print_uint32(ndr, "enablefcbopens", r->enablefcbopens);
7863 ndr_print_uint32(ndr, "enableraw", r->enableraw);
7864 ndr_print_uint32(ndr, "enablesharednetdrives", r->enablesharednetdrives);
7865 ndr_print_uint32(ndr, "minfreeconnections", r->minfreeconnections);
7866 ndr_print_uint32(ndr, "maxfreeconnections", r->maxfreeconnections);
7867 ndr_print_uint32(ndr, "initsesstable", r->initsesstable);
7868 ndr_print_uint32(ndr, "initconntable", r->initconntable);
7869 ndr_print_uint32(ndr, "initfiletable", r->initfiletable);
7870 ndr_print_uint32(ndr, "initsearchtable", r->initsearchtable);
7871 ndr_print_uint32(ndr, "alertsched", r->alertsched);
7872 ndr_print_uint32(ndr, "errortreshold", r->errortreshold);
7873 ndr_print_uint32(ndr, "networkerrortreshold", r->networkerrortreshold);
7874 ndr_print_uint32(ndr, "diskspacetreshold", r->diskspacetreshold);
7875 ndr_print_uint32(ndr, "reserved", r->reserved);
7876 ndr_print_uint32(ndr, "maxlinkdelay", r->maxlinkdelay);
7877 ndr_print_uint32(ndr, "minlinkthroughput", r->minlinkthroughput);
7878 ndr_print_uint32(ndr, "linkinfovalidtime", r->linkinfovalidtime);
7879 ndr_print_uint32(ndr, "scavqosinfoupdatetime", r->scavqosinfoupdatetime);
7880 ndr_print_uint32(ndr, "maxworkitemidletime", r->maxworkitemidletime);
7881 ndr->depth--;
7884 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1005(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1005 *r)
7886 if (ndr_flags & NDR_SCALARS) {
7887 NDR_CHECK(ndr_push_align(ndr, 4));
7888 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
7890 if (ndr_flags & NDR_BUFFERS) {
7891 if (r->comment) {
7892 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
7893 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
7894 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
7895 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7898 return NDR_ERR_SUCCESS;
7901 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1005(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1005 *r)
7903 uint32_t _ptr_comment;
7904 uint32_t size_comment_1 = 0;
7905 uint32_t length_comment_1 = 0;
7906 TALLOC_CTX *_mem_save_comment_0;
7907 if (ndr_flags & NDR_SCALARS) {
7908 NDR_CHECK(ndr_pull_align(ndr, 4));
7909 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
7910 if (_ptr_comment) {
7911 NDR_PULL_ALLOC(ndr, r->comment);
7912 } else {
7913 r->comment = NULL;
7916 if (ndr_flags & NDR_BUFFERS) {
7917 if (r->comment) {
7918 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
7919 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
7920 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
7921 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
7922 size_comment_1 = ndr_get_array_size(ndr, &r->comment);
7923 length_comment_1 = ndr_get_array_length(ndr, &r->comment);
7924 if (length_comment_1 > size_comment_1) {
7925 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_comment_1, length_comment_1);
7927 NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_1, sizeof(uint16_t)));
7928 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, length_comment_1, sizeof(uint16_t), CH_UTF16));
7929 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
7932 return NDR_ERR_SUCCESS;
7935 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1005(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1005 *r)
7937 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1005");
7938 ndr->depth++;
7939 ndr_print_ptr(ndr, "comment", r->comment);
7940 ndr->depth++;
7941 if (r->comment) {
7942 ndr_print_string(ndr, "comment", r->comment);
7944 ndr->depth--;
7945 ndr->depth--;
7948 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1010(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1010 *r)
7950 if (ndr_flags & NDR_SCALARS) {
7951 NDR_CHECK(ndr_push_align(ndr, 4));
7952 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->disc));
7954 if (ndr_flags & NDR_BUFFERS) {
7956 return NDR_ERR_SUCCESS;
7959 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1010(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1010 *r)
7961 if (ndr_flags & NDR_SCALARS) {
7962 NDR_CHECK(ndr_pull_align(ndr, 4));
7963 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->disc));
7965 if (ndr_flags & NDR_BUFFERS) {
7967 return NDR_ERR_SUCCESS;
7970 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1010(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1010 *r)
7972 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1010");
7973 ndr->depth++;
7974 ndr_print_uint32(ndr, "disc", r->disc);
7975 ndr->depth--;
7978 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1016(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1016 *r)
7980 if (ndr_flags & NDR_SCALARS) {
7981 NDR_CHECK(ndr_push_align(ndr, 4));
7982 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->hidden));
7984 if (ndr_flags & NDR_BUFFERS) {
7986 return NDR_ERR_SUCCESS;
7989 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1016(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1016 *r)
7991 if (ndr_flags & NDR_SCALARS) {
7992 NDR_CHECK(ndr_pull_align(ndr, 4));
7993 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->hidden));
7995 if (ndr_flags & NDR_BUFFERS) {
7997 return NDR_ERR_SUCCESS;
8000 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1016(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1016 *r)
8002 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1016");
8003 ndr->depth++;
8004 ndr_print_uint32(ndr, "hidden", r->hidden);
8005 ndr->depth--;
8008 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1017(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1017 *r)
8010 if (ndr_flags & NDR_SCALARS) {
8011 NDR_CHECK(ndr_push_align(ndr, 4));
8012 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->announce));
8014 if (ndr_flags & NDR_BUFFERS) {
8016 return NDR_ERR_SUCCESS;
8019 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1017(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1017 *r)
8021 if (ndr_flags & NDR_SCALARS) {
8022 NDR_CHECK(ndr_pull_align(ndr, 4));
8023 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->announce));
8025 if (ndr_flags & NDR_BUFFERS) {
8027 return NDR_ERR_SUCCESS;
8030 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1017(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1017 *r)
8032 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1017");
8033 ndr->depth++;
8034 ndr_print_uint32(ndr, "announce", r->announce);
8035 ndr->depth--;
8038 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1018(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1018 *r)
8040 if (ndr_flags & NDR_SCALARS) {
8041 NDR_CHECK(ndr_push_align(ndr, 4));
8042 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->anndelta));
8044 if (ndr_flags & NDR_BUFFERS) {
8046 return NDR_ERR_SUCCESS;
8049 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1018(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1018 *r)
8051 if (ndr_flags & NDR_SCALARS) {
8052 NDR_CHECK(ndr_pull_align(ndr, 4));
8053 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->anndelta));
8055 if (ndr_flags & NDR_BUFFERS) {
8057 return NDR_ERR_SUCCESS;
8060 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1018(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1018 *r)
8062 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1018");
8063 ndr->depth++;
8064 ndr_print_uint32(ndr, "anndelta", r->anndelta);
8065 ndr->depth--;
8068 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1107(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1107 *r)
8070 if (ndr_flags & NDR_SCALARS) {
8071 NDR_CHECK(ndr_push_align(ndr, 4));
8072 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->users));
8074 if (ndr_flags & NDR_BUFFERS) {
8076 return NDR_ERR_SUCCESS;
8079 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1107(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1107 *r)
8081 if (ndr_flags & NDR_SCALARS) {
8082 NDR_CHECK(ndr_pull_align(ndr, 4));
8083 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->users));
8085 if (ndr_flags & NDR_BUFFERS) {
8087 return NDR_ERR_SUCCESS;
8090 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1107(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1107 *r)
8092 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1107");
8093 ndr->depth++;
8094 ndr_print_uint32(ndr, "users", r->users);
8095 ndr->depth--;
8098 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1501(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1501 *r)
8100 if (ndr_flags & NDR_SCALARS) {
8101 NDR_CHECK(ndr_push_align(ndr, 4));
8102 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessopens));
8104 if (ndr_flags & NDR_BUFFERS) {
8106 return NDR_ERR_SUCCESS;
8109 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1501(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1501 *r)
8111 if (ndr_flags & NDR_SCALARS) {
8112 NDR_CHECK(ndr_pull_align(ndr, 4));
8113 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessopens));
8115 if (ndr_flags & NDR_BUFFERS) {
8117 return NDR_ERR_SUCCESS;
8120 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1501(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1501 *r)
8122 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1501");
8123 ndr->depth++;
8124 ndr_print_uint32(ndr, "sessopens", r->sessopens);
8125 ndr->depth--;
8128 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1502 *r)
8130 if (ndr_flags & NDR_SCALARS) {
8131 NDR_CHECK(ndr_push_align(ndr, 4));
8132 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessvcs));
8134 if (ndr_flags & NDR_BUFFERS) {
8136 return NDR_ERR_SUCCESS;
8139 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1502 *r)
8141 if (ndr_flags & NDR_SCALARS) {
8142 NDR_CHECK(ndr_pull_align(ndr, 4));
8143 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessvcs));
8145 if (ndr_flags & NDR_BUFFERS) {
8147 return NDR_ERR_SUCCESS;
8150 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1502 *r)
8152 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1502");
8153 ndr->depth++;
8154 ndr_print_uint32(ndr, "sessvcs", r->sessvcs);
8155 ndr->depth--;
8158 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1503(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1503 *r)
8160 if (ndr_flags & NDR_SCALARS) {
8161 NDR_CHECK(ndr_push_align(ndr, 4));
8162 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->opensearch));
8164 if (ndr_flags & NDR_BUFFERS) {
8166 return NDR_ERR_SUCCESS;
8169 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1503(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1503 *r)
8171 if (ndr_flags & NDR_SCALARS) {
8172 NDR_CHECK(ndr_pull_align(ndr, 4));
8173 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->opensearch));
8175 if (ndr_flags & NDR_BUFFERS) {
8177 return NDR_ERR_SUCCESS;
8180 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1503(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1503 *r)
8182 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1503");
8183 ndr->depth++;
8184 ndr_print_uint32(ndr, "opensearch", r->opensearch);
8185 ndr->depth--;
8188 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1506(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1506 *r)
8190 if (ndr_flags & NDR_SCALARS) {
8191 NDR_CHECK(ndr_push_align(ndr, 4));
8192 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxworkitems));
8194 if (ndr_flags & NDR_BUFFERS) {
8196 return NDR_ERR_SUCCESS;
8199 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1506(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1506 *r)
8201 if (ndr_flags & NDR_SCALARS) {
8202 NDR_CHECK(ndr_pull_align(ndr, 4));
8203 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxworkitems));
8205 if (ndr_flags & NDR_BUFFERS) {
8207 return NDR_ERR_SUCCESS;
8210 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1506(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1506 *r)
8212 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1506");
8213 ndr->depth++;
8214 ndr_print_uint32(ndr, "maxworkitems", r->maxworkitems);
8215 ndr->depth--;
8218 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1509(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1509 *r)
8220 if (ndr_flags & NDR_SCALARS) {
8221 NDR_CHECK(ndr_push_align(ndr, 4));
8222 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxrawbuflen));
8224 if (ndr_flags & NDR_BUFFERS) {
8226 return NDR_ERR_SUCCESS;
8229 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1509(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1509 *r)
8231 if (ndr_flags & NDR_SCALARS) {
8232 NDR_CHECK(ndr_pull_align(ndr, 4));
8233 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxrawbuflen));
8235 if (ndr_flags & NDR_BUFFERS) {
8237 return NDR_ERR_SUCCESS;
8240 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1509(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1509 *r)
8242 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1509");
8243 ndr->depth++;
8244 ndr_print_uint32(ndr, "maxrawbuflen", r->maxrawbuflen);
8245 ndr->depth--;
8248 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1510(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1510 *r)
8250 if (ndr_flags & NDR_SCALARS) {
8251 NDR_CHECK(ndr_push_align(ndr, 4));
8252 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessusers));
8254 if (ndr_flags & NDR_BUFFERS) {
8256 return NDR_ERR_SUCCESS;
8259 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1510(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1510 *r)
8261 if (ndr_flags & NDR_SCALARS) {
8262 NDR_CHECK(ndr_pull_align(ndr, 4));
8263 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessusers));
8265 if (ndr_flags & NDR_BUFFERS) {
8267 return NDR_ERR_SUCCESS;
8270 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1510(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1510 *r)
8272 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1510");
8273 ndr->depth++;
8274 ndr_print_uint32(ndr, "sessusers", r->sessusers);
8275 ndr->depth--;
8278 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1511(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1511 *r)
8280 if (ndr_flags & NDR_SCALARS) {
8281 NDR_CHECK(ndr_push_align(ndr, 4));
8282 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sesscons));
8284 if (ndr_flags & NDR_BUFFERS) {
8286 return NDR_ERR_SUCCESS;
8289 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1511(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1511 *r)
8291 if (ndr_flags & NDR_SCALARS) {
8292 NDR_CHECK(ndr_pull_align(ndr, 4));
8293 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sesscons));
8295 if (ndr_flags & NDR_BUFFERS) {
8297 return NDR_ERR_SUCCESS;
8300 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1511(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1511 *r)
8302 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1511");
8303 ndr->depth++;
8304 ndr_print_uint32(ndr, "sesscons", r->sesscons);
8305 ndr->depth--;
8308 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1512(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1512 *r)
8310 if (ndr_flags & NDR_SCALARS) {
8311 NDR_CHECK(ndr_push_align(ndr, 4));
8312 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxnonpagedmemoryusage));
8314 if (ndr_flags & NDR_BUFFERS) {
8316 return NDR_ERR_SUCCESS;
8319 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1512(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1512 *r)
8321 if (ndr_flags & NDR_SCALARS) {
8322 NDR_CHECK(ndr_pull_align(ndr, 4));
8323 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxnonpagedmemoryusage));
8325 if (ndr_flags & NDR_BUFFERS) {
8327 return NDR_ERR_SUCCESS;
8330 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1512(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1512 *r)
8332 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1512");
8333 ndr->depth++;
8334 ndr_print_uint32(ndr, "maxnonpagedmemoryusage", r->maxnonpagedmemoryusage);
8335 ndr->depth--;
8338 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1513(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1513 *r)
8340 if (ndr_flags & NDR_SCALARS) {
8341 NDR_CHECK(ndr_push_align(ndr, 4));
8342 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxpagedmemoryusage));
8344 if (ndr_flags & NDR_BUFFERS) {
8346 return NDR_ERR_SUCCESS;
8349 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1513(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1513 *r)
8351 if (ndr_flags & NDR_SCALARS) {
8352 NDR_CHECK(ndr_pull_align(ndr, 4));
8353 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxpagedmemoryusage));
8355 if (ndr_flags & NDR_BUFFERS) {
8357 return NDR_ERR_SUCCESS;
8360 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1513(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1513 *r)
8362 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1513");
8363 ndr->depth++;
8364 ndr_print_uint32(ndr, "maxpagedmemoryusage", r->maxpagedmemoryusage);
8365 ndr->depth--;
8368 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1514(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1514 *r)
8370 if (ndr_flags & NDR_SCALARS) {
8371 NDR_CHECK(ndr_push_align(ndr, 4));
8372 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesoftcompat));
8374 if (ndr_flags & NDR_BUFFERS) {
8376 return NDR_ERR_SUCCESS;
8379 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1514(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1514 *r)
8381 if (ndr_flags & NDR_SCALARS) {
8382 NDR_CHECK(ndr_pull_align(ndr, 4));
8383 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesoftcompat));
8385 if (ndr_flags & NDR_BUFFERS) {
8387 return NDR_ERR_SUCCESS;
8390 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1514(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1514 *r)
8392 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1514");
8393 ndr->depth++;
8394 ndr_print_uint32(ndr, "enablesoftcompat", r->enablesoftcompat);
8395 ndr->depth--;
8398 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1515(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1515 *r)
8400 if (ndr_flags & NDR_SCALARS) {
8401 NDR_CHECK(ndr_push_align(ndr, 4));
8402 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableforcedlogoff));
8404 if (ndr_flags & NDR_BUFFERS) {
8406 return NDR_ERR_SUCCESS;
8409 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1515(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1515 *r)
8411 if (ndr_flags & NDR_SCALARS) {
8412 NDR_CHECK(ndr_pull_align(ndr, 4));
8413 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableforcedlogoff));
8415 if (ndr_flags & NDR_BUFFERS) {
8417 return NDR_ERR_SUCCESS;
8420 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1515(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1515 *r)
8422 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1515");
8423 ndr->depth++;
8424 ndr_print_uint32(ndr, "enableforcedlogoff", r->enableforcedlogoff);
8425 ndr->depth--;
8428 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1516(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1516 *r)
8430 if (ndr_flags & NDR_SCALARS) {
8431 NDR_CHECK(ndr_push_align(ndr, 4));
8432 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timesource));
8434 if (ndr_flags & NDR_BUFFERS) {
8436 return NDR_ERR_SUCCESS;
8439 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1516(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1516 *r)
8441 if (ndr_flags & NDR_SCALARS) {
8442 NDR_CHECK(ndr_pull_align(ndr, 4));
8443 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timesource));
8445 if (ndr_flags & NDR_BUFFERS) {
8447 return NDR_ERR_SUCCESS;
8450 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1516(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1516 *r)
8452 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1516");
8453 ndr->depth++;
8454 ndr_print_uint32(ndr, "timesource", r->timesource);
8455 ndr->depth--;
8458 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1518(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1518 *r)
8460 if (ndr_flags & NDR_SCALARS) {
8461 NDR_CHECK(ndr_push_align(ndr, 4));
8462 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lmannounce));
8464 if (ndr_flags & NDR_BUFFERS) {
8466 return NDR_ERR_SUCCESS;
8469 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1518(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1518 *r)
8471 if (ndr_flags & NDR_SCALARS) {
8472 NDR_CHECK(ndr_pull_align(ndr, 4));
8473 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lmannounce));
8475 if (ndr_flags & NDR_BUFFERS) {
8477 return NDR_ERR_SUCCESS;
8480 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1518(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1518 *r)
8482 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1518");
8483 ndr->depth++;
8484 ndr_print_uint32(ndr, "lmannounce", r->lmannounce);
8485 ndr->depth--;
8488 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1520(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1520 *r)
8490 if (ndr_flags & NDR_SCALARS) {
8491 NDR_CHECK(ndr_push_align(ndr, 4));
8492 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxcopyreadlen));
8494 if (ndr_flags & NDR_BUFFERS) {
8496 return NDR_ERR_SUCCESS;
8499 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1520(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1520 *r)
8501 if (ndr_flags & NDR_SCALARS) {
8502 NDR_CHECK(ndr_pull_align(ndr, 4));
8503 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxcopyreadlen));
8505 if (ndr_flags & NDR_BUFFERS) {
8507 return NDR_ERR_SUCCESS;
8510 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1520(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1520 *r)
8512 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1520");
8513 ndr->depth++;
8514 ndr_print_uint32(ndr, "maxcopyreadlen", r->maxcopyreadlen);
8515 ndr->depth--;
8518 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1521(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1521 *r)
8520 if (ndr_flags & NDR_SCALARS) {
8521 NDR_CHECK(ndr_push_align(ndr, 4));
8522 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxcopywritelen));
8524 if (ndr_flags & NDR_BUFFERS) {
8526 return NDR_ERR_SUCCESS;
8529 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1521(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1521 *r)
8531 if (ndr_flags & NDR_SCALARS) {
8532 NDR_CHECK(ndr_pull_align(ndr, 4));
8533 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxcopywritelen));
8535 if (ndr_flags & NDR_BUFFERS) {
8537 return NDR_ERR_SUCCESS;
8540 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1521(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1521 *r)
8542 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1521");
8543 ndr->depth++;
8544 ndr_print_uint32(ndr, "maxcopywritelen", r->maxcopywritelen);
8545 ndr->depth--;
8548 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1522(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1522 *r)
8550 if (ndr_flags & NDR_SCALARS) {
8551 NDR_CHECK(ndr_push_align(ndr, 4));
8552 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minkeepsearch));
8554 if (ndr_flags & NDR_BUFFERS) {
8556 return NDR_ERR_SUCCESS;
8559 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1522(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1522 *r)
8561 if (ndr_flags & NDR_SCALARS) {
8562 NDR_CHECK(ndr_pull_align(ndr, 4));
8563 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minkeepsearch));
8565 if (ndr_flags & NDR_BUFFERS) {
8567 return NDR_ERR_SUCCESS;
8570 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1522(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1522 *r)
8572 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1522");
8573 ndr->depth++;
8574 ndr_print_uint32(ndr, "minkeepsearch", r->minkeepsearch);
8575 ndr->depth--;
8578 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1523(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1523 *r)
8580 if (ndr_flags & NDR_SCALARS) {
8581 NDR_CHECK(ndr_push_align(ndr, 4));
8582 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxkeepsearch));
8584 if (ndr_flags & NDR_BUFFERS) {
8586 return NDR_ERR_SUCCESS;
8589 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1523(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1523 *r)
8591 if (ndr_flags & NDR_SCALARS) {
8592 NDR_CHECK(ndr_pull_align(ndr, 4));
8593 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxkeepsearch));
8595 if (ndr_flags & NDR_BUFFERS) {
8597 return NDR_ERR_SUCCESS;
8600 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1523(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1523 *r)
8602 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1523");
8603 ndr->depth++;
8604 ndr_print_uint32(ndr, "maxkeepsearch", r->maxkeepsearch);
8605 ndr->depth--;
8608 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1524(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1524 *r)
8610 if (ndr_flags & NDR_SCALARS) {
8611 NDR_CHECK(ndr_push_align(ndr, 4));
8612 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minkeepcomplsearch));
8614 if (ndr_flags & NDR_BUFFERS) {
8616 return NDR_ERR_SUCCESS;
8619 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1524(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1524 *r)
8621 if (ndr_flags & NDR_SCALARS) {
8622 NDR_CHECK(ndr_pull_align(ndr, 4));
8623 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minkeepcomplsearch));
8625 if (ndr_flags & NDR_BUFFERS) {
8627 return NDR_ERR_SUCCESS;
8630 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1524(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1524 *r)
8632 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1524");
8633 ndr->depth++;
8634 ndr_print_uint32(ndr, "minkeepcomplsearch", r->minkeepcomplsearch);
8635 ndr->depth--;
8638 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1525(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1525 *r)
8640 if (ndr_flags & NDR_SCALARS) {
8641 NDR_CHECK(ndr_push_align(ndr, 4));
8642 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxkeepcomplsearch));
8644 if (ndr_flags & NDR_BUFFERS) {
8646 return NDR_ERR_SUCCESS;
8649 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1525(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1525 *r)
8651 if (ndr_flags & NDR_SCALARS) {
8652 NDR_CHECK(ndr_pull_align(ndr, 4));
8653 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxkeepcomplsearch));
8655 if (ndr_flags & NDR_BUFFERS) {
8657 return NDR_ERR_SUCCESS;
8660 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1525(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1525 *r)
8662 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1525");
8663 ndr->depth++;
8664 ndr_print_uint32(ndr, "maxkeepcomplsearch", r->maxkeepcomplsearch);
8665 ndr->depth--;
8668 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1528(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1528 *r)
8670 if (ndr_flags & NDR_SCALARS) {
8671 NDR_CHECK(ndr_push_align(ndr, 4));
8672 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->scavtimeout));
8674 if (ndr_flags & NDR_BUFFERS) {
8676 return NDR_ERR_SUCCESS;
8679 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1528(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1528 *r)
8681 if (ndr_flags & NDR_SCALARS) {
8682 NDR_CHECK(ndr_pull_align(ndr, 4));
8683 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->scavtimeout));
8685 if (ndr_flags & NDR_BUFFERS) {
8687 return NDR_ERR_SUCCESS;
8690 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1528(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1528 *r)
8692 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1528");
8693 ndr->depth++;
8694 ndr_print_uint32(ndr, "scavtimeout", r->scavtimeout);
8695 ndr->depth--;
8698 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1529(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1529 *r)
8700 if (ndr_flags & NDR_SCALARS) {
8701 NDR_CHECK(ndr_push_align(ndr, 4));
8702 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minrcvqueue));
8704 if (ndr_flags & NDR_BUFFERS) {
8706 return NDR_ERR_SUCCESS;
8709 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1529(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1529 *r)
8711 if (ndr_flags & NDR_SCALARS) {
8712 NDR_CHECK(ndr_pull_align(ndr, 4));
8713 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minrcvqueue));
8715 if (ndr_flags & NDR_BUFFERS) {
8717 return NDR_ERR_SUCCESS;
8720 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1529(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1529 *r)
8722 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1529");
8723 ndr->depth++;
8724 ndr_print_uint32(ndr, "minrcvqueue", r->minrcvqueue);
8725 ndr->depth--;
8728 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1530(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1530 *r)
8730 if (ndr_flags & NDR_SCALARS) {
8731 NDR_CHECK(ndr_push_align(ndr, 4));
8732 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minfreeworkitems));
8734 if (ndr_flags & NDR_BUFFERS) {
8736 return NDR_ERR_SUCCESS;
8739 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1530(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1530 *r)
8741 if (ndr_flags & NDR_SCALARS) {
8742 NDR_CHECK(ndr_pull_align(ndr, 4));
8743 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minfreeworkitems));
8745 if (ndr_flags & NDR_BUFFERS) {
8747 return NDR_ERR_SUCCESS;
8750 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1530(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1530 *r)
8752 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1530");
8753 ndr->depth++;
8754 ndr_print_uint32(ndr, "minfreeworkitems", r->minfreeworkitems);
8755 ndr->depth--;
8758 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1533(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1533 *r)
8760 if (ndr_flags & NDR_SCALARS) {
8761 NDR_CHECK(ndr_push_align(ndr, 4));
8762 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxmpxct));
8764 if (ndr_flags & NDR_BUFFERS) {
8766 return NDR_ERR_SUCCESS;
8769 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1533(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1533 *r)
8771 if (ndr_flags & NDR_SCALARS) {
8772 NDR_CHECK(ndr_pull_align(ndr, 4));
8773 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxmpxct));
8775 if (ndr_flags & NDR_BUFFERS) {
8777 return NDR_ERR_SUCCESS;
8780 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1533(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1533 *r)
8782 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1533");
8783 ndr->depth++;
8784 ndr_print_uint32(ndr, "maxmpxct", r->maxmpxct);
8785 ndr->depth--;
8788 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1534(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1534 *r)
8790 if (ndr_flags & NDR_SCALARS) {
8791 NDR_CHECK(ndr_push_align(ndr, 4));
8792 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->oplockbreakwait));
8794 if (ndr_flags & NDR_BUFFERS) {
8796 return NDR_ERR_SUCCESS;
8799 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1534(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1534 *r)
8801 if (ndr_flags & NDR_SCALARS) {
8802 NDR_CHECK(ndr_pull_align(ndr, 4));
8803 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->oplockbreakwait));
8805 if (ndr_flags & NDR_BUFFERS) {
8807 return NDR_ERR_SUCCESS;
8810 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1534(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1534 *r)
8812 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1534");
8813 ndr->depth++;
8814 ndr_print_uint32(ndr, "oplockbreakwait", r->oplockbreakwait);
8815 ndr->depth--;
8818 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1535(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1535 *r)
8820 if (ndr_flags & NDR_SCALARS) {
8821 NDR_CHECK(ndr_push_align(ndr, 4));
8822 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->oplockbreakresponsewait));
8824 if (ndr_flags & NDR_BUFFERS) {
8826 return NDR_ERR_SUCCESS;
8829 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1535(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1535 *r)
8831 if (ndr_flags & NDR_SCALARS) {
8832 NDR_CHECK(ndr_pull_align(ndr, 4));
8833 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->oplockbreakresponsewait));
8835 if (ndr_flags & NDR_BUFFERS) {
8837 return NDR_ERR_SUCCESS;
8840 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1535(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1535 *r)
8842 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1535");
8843 ndr->depth++;
8844 ndr_print_uint32(ndr, "oplockbreakresponsewait", r->oplockbreakresponsewait);
8845 ndr->depth--;
8848 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1536(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1536 *r)
8850 if (ndr_flags & NDR_SCALARS) {
8851 NDR_CHECK(ndr_push_align(ndr, 4));
8852 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableoplocks));
8854 if (ndr_flags & NDR_BUFFERS) {
8856 return NDR_ERR_SUCCESS;
8859 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1536(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1536 *r)
8861 if (ndr_flags & NDR_SCALARS) {
8862 NDR_CHECK(ndr_pull_align(ndr, 4));
8863 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableoplocks));
8865 if (ndr_flags & NDR_BUFFERS) {
8867 return NDR_ERR_SUCCESS;
8870 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1536(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1536 *r)
8872 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1536");
8873 ndr->depth++;
8874 ndr_print_uint32(ndr, "enableoplocks", r->enableoplocks);
8875 ndr->depth--;
8878 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1537(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1537 *r)
8880 if (ndr_flags & NDR_SCALARS) {
8881 NDR_CHECK(ndr_push_align(ndr, 4));
8882 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableoplockforceclose));
8884 if (ndr_flags & NDR_BUFFERS) {
8886 return NDR_ERR_SUCCESS;
8889 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1537(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1537 *r)
8891 if (ndr_flags & NDR_SCALARS) {
8892 NDR_CHECK(ndr_pull_align(ndr, 4));
8893 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableoplockforceclose));
8895 if (ndr_flags & NDR_BUFFERS) {
8897 return NDR_ERR_SUCCESS;
8900 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1537(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1537 *r)
8902 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1537");
8903 ndr->depth++;
8904 ndr_print_uint32(ndr, "enableoplockforceclose", r->enableoplockforceclose);
8905 ndr->depth--;
8908 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1538(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1538 *r)
8910 if (ndr_flags & NDR_SCALARS) {
8911 NDR_CHECK(ndr_push_align(ndr, 4));
8912 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablefcbopens));
8914 if (ndr_flags & NDR_BUFFERS) {
8916 return NDR_ERR_SUCCESS;
8919 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1538(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1538 *r)
8921 if (ndr_flags & NDR_SCALARS) {
8922 NDR_CHECK(ndr_pull_align(ndr, 4));
8923 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablefcbopens));
8925 if (ndr_flags & NDR_BUFFERS) {
8927 return NDR_ERR_SUCCESS;
8930 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1538(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1538 *r)
8932 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1538");
8933 ndr->depth++;
8934 ndr_print_uint32(ndr, "enablefcbopens", r->enablefcbopens);
8935 ndr->depth--;
8938 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1539(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1539 *r)
8940 if (ndr_flags & NDR_SCALARS) {
8941 NDR_CHECK(ndr_push_align(ndr, 4));
8942 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableraw));
8944 if (ndr_flags & NDR_BUFFERS) {
8946 return NDR_ERR_SUCCESS;
8949 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1539(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1539 *r)
8951 if (ndr_flags & NDR_SCALARS) {
8952 NDR_CHECK(ndr_pull_align(ndr, 4));
8953 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableraw));
8955 if (ndr_flags & NDR_BUFFERS) {
8957 return NDR_ERR_SUCCESS;
8960 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1539(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1539 *r)
8962 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1539");
8963 ndr->depth++;
8964 ndr_print_uint32(ndr, "enableraw", r->enableraw);
8965 ndr->depth--;
8968 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1540(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1540 *r)
8970 if (ndr_flags & NDR_SCALARS) {
8971 NDR_CHECK(ndr_push_align(ndr, 4));
8972 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesharednetdrives));
8974 if (ndr_flags & NDR_BUFFERS) {
8976 return NDR_ERR_SUCCESS;
8979 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1540(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1540 *r)
8981 if (ndr_flags & NDR_SCALARS) {
8982 NDR_CHECK(ndr_pull_align(ndr, 4));
8983 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesharednetdrives));
8985 if (ndr_flags & NDR_BUFFERS) {
8987 return NDR_ERR_SUCCESS;
8990 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1540(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1540 *r)
8992 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1540");
8993 ndr->depth++;
8994 ndr_print_uint32(ndr, "enablesharednetdrives", r->enablesharednetdrives);
8995 ndr->depth--;
8998 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1541(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1541 *r)
9000 if (ndr_flags & NDR_SCALARS) {
9001 NDR_CHECK(ndr_push_align(ndr, 4));
9002 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minfreeconnections));
9004 if (ndr_flags & NDR_BUFFERS) {
9006 return NDR_ERR_SUCCESS;
9009 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1541(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1541 *r)
9011 if (ndr_flags & NDR_SCALARS) {
9012 NDR_CHECK(ndr_pull_align(ndr, 4));
9013 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minfreeconnections));
9015 if (ndr_flags & NDR_BUFFERS) {
9017 return NDR_ERR_SUCCESS;
9020 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1541(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1541 *r)
9022 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1541");
9023 ndr->depth++;
9024 ndr_print_uint32(ndr, "minfreeconnections", r->minfreeconnections);
9025 ndr->depth--;
9028 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1542(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1542 *r)
9030 if (ndr_flags & NDR_SCALARS) {
9031 NDR_CHECK(ndr_push_align(ndr, 4));
9032 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxfreeconnections));
9034 if (ndr_flags & NDR_BUFFERS) {
9036 return NDR_ERR_SUCCESS;
9039 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1542(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1542 *r)
9041 if (ndr_flags & NDR_SCALARS) {
9042 NDR_CHECK(ndr_pull_align(ndr, 4));
9043 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxfreeconnections));
9045 if (ndr_flags & NDR_BUFFERS) {
9047 return NDR_ERR_SUCCESS;
9050 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1542(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1542 *r)
9052 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1542");
9053 ndr->depth++;
9054 ndr_print_uint32(ndr, "maxfreeconnections", r->maxfreeconnections);
9055 ndr->depth--;
9058 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1543(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1543 *r)
9060 if (ndr_flags & NDR_SCALARS) {
9061 NDR_CHECK(ndr_push_align(ndr, 4));
9062 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initsesstable));
9064 if (ndr_flags & NDR_BUFFERS) {
9066 return NDR_ERR_SUCCESS;
9069 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1543(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1543 *r)
9071 if (ndr_flags & NDR_SCALARS) {
9072 NDR_CHECK(ndr_pull_align(ndr, 4));
9073 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initsesstable));
9075 if (ndr_flags & NDR_BUFFERS) {
9077 return NDR_ERR_SUCCESS;
9080 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1543(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1543 *r)
9082 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1543");
9083 ndr->depth++;
9084 ndr_print_uint32(ndr, "initsesstable", r->initsesstable);
9085 ndr->depth--;
9088 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1544(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1544 *r)
9090 if (ndr_flags & NDR_SCALARS) {
9091 NDR_CHECK(ndr_push_align(ndr, 4));
9092 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initconntable));
9094 if (ndr_flags & NDR_BUFFERS) {
9096 return NDR_ERR_SUCCESS;
9099 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1544(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1544 *r)
9101 if (ndr_flags & NDR_SCALARS) {
9102 NDR_CHECK(ndr_pull_align(ndr, 4));
9103 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initconntable));
9105 if (ndr_flags & NDR_BUFFERS) {
9107 return NDR_ERR_SUCCESS;
9110 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1544(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1544 *r)
9112 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1544");
9113 ndr->depth++;
9114 ndr_print_uint32(ndr, "initconntable", r->initconntable);
9115 ndr->depth--;
9118 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1545(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1545 *r)
9120 if (ndr_flags & NDR_SCALARS) {
9121 NDR_CHECK(ndr_push_align(ndr, 4));
9122 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initfiletable));
9124 if (ndr_flags & NDR_BUFFERS) {
9126 return NDR_ERR_SUCCESS;
9129 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1545(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1545 *r)
9131 if (ndr_flags & NDR_SCALARS) {
9132 NDR_CHECK(ndr_pull_align(ndr, 4));
9133 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initfiletable));
9135 if (ndr_flags & NDR_BUFFERS) {
9137 return NDR_ERR_SUCCESS;
9140 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1545(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1545 *r)
9142 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1545");
9143 ndr->depth++;
9144 ndr_print_uint32(ndr, "initfiletable", r->initfiletable);
9145 ndr->depth--;
9148 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1546(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1546 *r)
9150 if (ndr_flags & NDR_SCALARS) {
9151 NDR_CHECK(ndr_push_align(ndr, 4));
9152 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initsearchtable));
9154 if (ndr_flags & NDR_BUFFERS) {
9156 return NDR_ERR_SUCCESS;
9159 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1546(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1546 *r)
9161 if (ndr_flags & NDR_SCALARS) {
9162 NDR_CHECK(ndr_pull_align(ndr, 4));
9163 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initsearchtable));
9165 if (ndr_flags & NDR_BUFFERS) {
9167 return NDR_ERR_SUCCESS;
9170 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1546(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1546 *r)
9172 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1546");
9173 ndr->depth++;
9174 ndr_print_uint32(ndr, "initsearchtable", r->initsearchtable);
9175 ndr->depth--;
9178 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1547(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1547 *r)
9180 if (ndr_flags & NDR_SCALARS) {
9181 NDR_CHECK(ndr_push_align(ndr, 4));
9182 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->alertsched));
9184 if (ndr_flags & NDR_BUFFERS) {
9186 return NDR_ERR_SUCCESS;
9189 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1547(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1547 *r)
9191 if (ndr_flags & NDR_SCALARS) {
9192 NDR_CHECK(ndr_pull_align(ndr, 4));
9193 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->alertsched));
9195 if (ndr_flags & NDR_BUFFERS) {
9197 return NDR_ERR_SUCCESS;
9200 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1547(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1547 *r)
9202 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1547");
9203 ndr->depth++;
9204 ndr_print_uint32(ndr, "alertsched", r->alertsched);
9205 ndr->depth--;
9208 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1548(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1548 *r)
9210 if (ndr_flags & NDR_SCALARS) {
9211 NDR_CHECK(ndr_push_align(ndr, 4));
9212 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->errortreshold));
9214 if (ndr_flags & NDR_BUFFERS) {
9216 return NDR_ERR_SUCCESS;
9219 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1548(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1548 *r)
9221 if (ndr_flags & NDR_SCALARS) {
9222 NDR_CHECK(ndr_pull_align(ndr, 4));
9223 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->errortreshold));
9225 if (ndr_flags & NDR_BUFFERS) {
9227 return NDR_ERR_SUCCESS;
9230 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1548(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1548 *r)
9232 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1548");
9233 ndr->depth++;
9234 ndr_print_uint32(ndr, "errortreshold", r->errortreshold);
9235 ndr->depth--;
9238 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1549(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1549 *r)
9240 if (ndr_flags & NDR_SCALARS) {
9241 NDR_CHECK(ndr_push_align(ndr, 4));
9242 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->networkerrortreshold));
9244 if (ndr_flags & NDR_BUFFERS) {
9246 return NDR_ERR_SUCCESS;
9249 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1549(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1549 *r)
9251 if (ndr_flags & NDR_SCALARS) {
9252 NDR_CHECK(ndr_pull_align(ndr, 4));
9253 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->networkerrortreshold));
9255 if (ndr_flags & NDR_BUFFERS) {
9257 return NDR_ERR_SUCCESS;
9260 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1549(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1549 *r)
9262 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1549");
9263 ndr->depth++;
9264 ndr_print_uint32(ndr, "networkerrortreshold", r->networkerrortreshold);
9265 ndr->depth--;
9268 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1550(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1550 *r)
9270 if (ndr_flags & NDR_SCALARS) {
9271 NDR_CHECK(ndr_push_align(ndr, 4));
9272 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->diskspacetreshold));
9274 if (ndr_flags & NDR_BUFFERS) {
9276 return NDR_ERR_SUCCESS;
9279 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1550(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1550 *r)
9281 if (ndr_flags & NDR_SCALARS) {
9282 NDR_CHECK(ndr_pull_align(ndr, 4));
9283 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->diskspacetreshold));
9285 if (ndr_flags & NDR_BUFFERS) {
9287 return NDR_ERR_SUCCESS;
9290 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1550(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1550 *r)
9292 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1550");
9293 ndr->depth++;
9294 ndr_print_uint32(ndr, "diskspacetreshold", r->diskspacetreshold);
9295 ndr->depth--;
9298 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1552(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1552 *r)
9300 if (ndr_flags & NDR_SCALARS) {
9301 NDR_CHECK(ndr_push_align(ndr, 4));
9302 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxlinkdelay));
9304 if (ndr_flags & NDR_BUFFERS) {
9306 return NDR_ERR_SUCCESS;
9309 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1552(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1552 *r)
9311 if (ndr_flags & NDR_SCALARS) {
9312 NDR_CHECK(ndr_pull_align(ndr, 4));
9313 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxlinkdelay));
9315 if (ndr_flags & NDR_BUFFERS) {
9317 return NDR_ERR_SUCCESS;
9320 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1552(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1552 *r)
9322 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1552");
9323 ndr->depth++;
9324 ndr_print_uint32(ndr, "maxlinkdelay", r->maxlinkdelay);
9325 ndr->depth--;
9328 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1553(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1553 *r)
9330 if (ndr_flags & NDR_SCALARS) {
9331 NDR_CHECK(ndr_push_align(ndr, 4));
9332 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minlinkthroughput));
9334 if (ndr_flags & NDR_BUFFERS) {
9336 return NDR_ERR_SUCCESS;
9339 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1553(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1553 *r)
9341 if (ndr_flags & NDR_SCALARS) {
9342 NDR_CHECK(ndr_pull_align(ndr, 4));
9343 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minlinkthroughput));
9345 if (ndr_flags & NDR_BUFFERS) {
9347 return NDR_ERR_SUCCESS;
9350 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1553(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1553 *r)
9352 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1553");
9353 ndr->depth++;
9354 ndr_print_uint32(ndr, "minlinkthroughput", r->minlinkthroughput);
9355 ndr->depth--;
9358 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1554(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1554 *r)
9360 if (ndr_flags & NDR_SCALARS) {
9361 NDR_CHECK(ndr_push_align(ndr, 4));
9362 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->linkinfovalidtime));
9364 if (ndr_flags & NDR_BUFFERS) {
9366 return NDR_ERR_SUCCESS;
9369 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1554(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1554 *r)
9371 if (ndr_flags & NDR_SCALARS) {
9372 NDR_CHECK(ndr_pull_align(ndr, 4));
9373 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->linkinfovalidtime));
9375 if (ndr_flags & NDR_BUFFERS) {
9377 return NDR_ERR_SUCCESS;
9380 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1554(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1554 *r)
9382 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1554");
9383 ndr->depth++;
9384 ndr_print_uint32(ndr, "linkinfovalidtime", r->linkinfovalidtime);
9385 ndr->depth--;
9388 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1555(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1555 *r)
9390 if (ndr_flags & NDR_SCALARS) {
9391 NDR_CHECK(ndr_push_align(ndr, 4));
9392 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->scavqosinfoupdatetime));
9394 if (ndr_flags & NDR_BUFFERS) {
9396 return NDR_ERR_SUCCESS;
9399 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1555(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1555 *r)
9401 if (ndr_flags & NDR_SCALARS) {
9402 NDR_CHECK(ndr_pull_align(ndr, 4));
9403 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->scavqosinfoupdatetime));
9405 if (ndr_flags & NDR_BUFFERS) {
9407 return NDR_ERR_SUCCESS;
9410 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1555(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1555 *r)
9412 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1555");
9413 ndr->depth++;
9414 ndr_print_uint32(ndr, "scavqosinfoupdatetime", r->scavqosinfoupdatetime);
9415 ndr->depth--;
9418 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1556(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1556 *r)
9420 if (ndr_flags & NDR_SCALARS) {
9421 NDR_CHECK(ndr_push_align(ndr, 4));
9422 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxworkitemidletime));
9424 if (ndr_flags & NDR_BUFFERS) {
9426 return NDR_ERR_SUCCESS;
9429 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1556(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1556 *r)
9431 if (ndr_flags & NDR_SCALARS) {
9432 NDR_CHECK(ndr_pull_align(ndr, 4));
9433 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxworkitemidletime));
9435 if (ndr_flags & NDR_BUFFERS) {
9437 return NDR_ERR_SUCCESS;
9440 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1556(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1556 *r)
9442 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1556");
9443 ndr->depth++;
9444 ndr_print_uint32(ndr, "maxworkitemidletime", r->maxworkitemidletime);
9445 ndr->depth--;
9448 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetSrvInfo *r)
9450 if (ndr_flags & NDR_SCALARS) {
9451 int level = ndr_push_get_switch_value(ndr, r);
9452 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
9453 switch (level) {
9454 case 100: {
9455 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info100));
9456 break; }
9458 case 101: {
9459 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info101));
9460 break; }
9462 case 102: {
9463 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info102));
9464 break; }
9466 case 402: {
9467 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info402));
9468 break; }
9470 case 403: {
9471 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info403));
9472 break; }
9474 case 502: {
9475 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info502));
9476 break; }
9478 case 503: {
9479 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info503));
9480 break; }
9482 case 599: {
9483 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info599));
9484 break; }
9486 case 1005: {
9487 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1005));
9488 break; }
9490 case 1010: {
9491 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1010));
9492 break; }
9494 case 1016: {
9495 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1016));
9496 break; }
9498 case 1017: {
9499 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1017));
9500 break; }
9502 case 1018: {
9503 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1018));
9504 break; }
9506 case 1107: {
9507 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1107));
9508 break; }
9510 case 1501: {
9511 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1501));
9512 break; }
9514 case 1502: {
9515 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1502));
9516 break; }
9518 case 1503: {
9519 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1503));
9520 break; }
9522 case 1506: {
9523 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1506));
9524 break; }
9526 case 1509: {
9527 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1509));
9528 break; }
9530 case 1510: {
9531 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1510));
9532 break; }
9534 case 1511: {
9535 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1511));
9536 break; }
9538 case 1512: {
9539 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1512));
9540 break; }
9542 case 1513: {
9543 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1513));
9544 break; }
9546 case 1514: {
9547 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1514));
9548 break; }
9550 case 1515: {
9551 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1515));
9552 break; }
9554 case 1516: {
9555 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1516));
9556 break; }
9558 case 1518: {
9559 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1518));
9560 break; }
9562 case 1520: {
9563 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1520));
9564 break; }
9566 case 1521: {
9567 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1521));
9568 break; }
9570 case 1522: {
9571 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1522));
9572 break; }
9574 case 1523: {
9575 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1523));
9576 break; }
9578 case 1524: {
9579 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1524));
9580 break; }
9582 case 1525: {
9583 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1525));
9584 break; }
9586 case 1528: {
9587 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1528));
9588 break; }
9590 case 1529: {
9591 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1529));
9592 break; }
9594 case 1530: {
9595 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1530));
9596 break; }
9598 case 1533: {
9599 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1533));
9600 break; }
9602 case 1534: {
9603 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1534));
9604 break; }
9606 case 1535: {
9607 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1535));
9608 break; }
9610 case 1536: {
9611 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1536));
9612 break; }
9614 case 1537: {
9615 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1537));
9616 break; }
9618 case 1538: {
9619 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1538));
9620 break; }
9622 case 1539: {
9623 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1539));
9624 break; }
9626 case 1540: {
9627 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1540));
9628 break; }
9630 case 1541: {
9631 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1541));
9632 break; }
9634 case 1542: {
9635 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1542));
9636 break; }
9638 case 1543: {
9639 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1543));
9640 break; }
9642 case 1544: {
9643 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1544));
9644 break; }
9646 case 1545: {
9647 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1545));
9648 break; }
9650 case 1546: {
9651 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1546));
9652 break; }
9654 case 1547: {
9655 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1547));
9656 break; }
9658 case 1548: {
9659 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1548));
9660 break; }
9662 case 1549: {
9663 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1549));
9664 break; }
9666 case 1550: {
9667 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1550));
9668 break; }
9670 case 1552: {
9671 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1552));
9672 break; }
9674 case 1553: {
9675 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1553));
9676 break; }
9678 case 1554: {
9679 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1554));
9680 break; }
9682 case 1555: {
9683 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1555));
9684 break; }
9686 case 1556: {
9687 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1556));
9688 break; }
9690 default: {
9691 break; }
9695 if (ndr_flags & NDR_BUFFERS) {
9696 int level = ndr_push_get_switch_value(ndr, r);
9697 switch (level) {
9698 case 100:
9699 if (r->info100) {
9700 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo100(ndr, NDR_SCALARS|NDR_BUFFERS, r->info100));
9702 break;
9704 case 101:
9705 if (r->info101) {
9706 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo101(ndr, NDR_SCALARS|NDR_BUFFERS, r->info101));
9708 break;
9710 case 102:
9711 if (r->info102) {
9712 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo102(ndr, NDR_SCALARS|NDR_BUFFERS, r->info102));
9714 break;
9716 case 402:
9717 if (r->info402) {
9718 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo402(ndr, NDR_SCALARS|NDR_BUFFERS, r->info402));
9720 break;
9722 case 403:
9723 if (r->info403) {
9724 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo403(ndr, NDR_SCALARS|NDR_BUFFERS, r->info403));
9726 break;
9728 case 502:
9729 if (r->info502) {
9730 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo502(ndr, NDR_SCALARS, r->info502));
9732 break;
9734 case 503:
9735 if (r->info503) {
9736 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo503(ndr, NDR_SCALARS|NDR_BUFFERS, r->info503));
9738 break;
9740 case 599:
9741 if (r->info599) {
9742 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo599(ndr, NDR_SCALARS|NDR_BUFFERS, r->info599));
9744 break;
9746 case 1005:
9747 if (r->info1005) {
9748 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1005(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1005));
9750 break;
9752 case 1010:
9753 if (r->info1010) {
9754 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1010(ndr, NDR_SCALARS, r->info1010));
9756 break;
9758 case 1016:
9759 if (r->info1016) {
9760 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1016(ndr, NDR_SCALARS, r->info1016));
9762 break;
9764 case 1017:
9765 if (r->info1017) {
9766 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1017(ndr, NDR_SCALARS, r->info1017));
9768 break;
9770 case 1018:
9771 if (r->info1018) {
9772 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1018(ndr, NDR_SCALARS, r->info1018));
9774 break;
9776 case 1107:
9777 if (r->info1107) {
9778 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1107(ndr, NDR_SCALARS, r->info1107));
9780 break;
9782 case 1501:
9783 if (r->info1501) {
9784 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1501(ndr, NDR_SCALARS, r->info1501));
9786 break;
9788 case 1502:
9789 if (r->info1502) {
9790 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1502(ndr, NDR_SCALARS, r->info1502));
9792 break;
9794 case 1503:
9795 if (r->info1503) {
9796 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1503(ndr, NDR_SCALARS, r->info1503));
9798 break;
9800 case 1506:
9801 if (r->info1506) {
9802 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1506(ndr, NDR_SCALARS, r->info1506));
9804 break;
9806 case 1509:
9807 if (r->info1509) {
9808 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1509(ndr, NDR_SCALARS, r->info1509));
9810 break;
9812 case 1510:
9813 if (r->info1510) {
9814 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1510(ndr, NDR_SCALARS, r->info1510));
9816 break;
9818 case 1511:
9819 if (r->info1511) {
9820 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1511(ndr, NDR_SCALARS, r->info1511));
9822 break;
9824 case 1512:
9825 if (r->info1512) {
9826 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1512(ndr, NDR_SCALARS, r->info1512));
9828 break;
9830 case 1513:
9831 if (r->info1513) {
9832 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1513(ndr, NDR_SCALARS, r->info1513));
9834 break;
9836 case 1514:
9837 if (r->info1514) {
9838 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1514(ndr, NDR_SCALARS, r->info1514));
9840 break;
9842 case 1515:
9843 if (r->info1515) {
9844 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1515(ndr, NDR_SCALARS, r->info1515));
9846 break;
9848 case 1516:
9849 if (r->info1516) {
9850 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1516(ndr, NDR_SCALARS, r->info1516));
9852 break;
9854 case 1518:
9855 if (r->info1518) {
9856 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1518(ndr, NDR_SCALARS, r->info1518));
9858 break;
9860 case 1520:
9861 if (r->info1520) {
9862 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1520(ndr, NDR_SCALARS, r->info1520));
9864 break;
9866 case 1521:
9867 if (r->info1521) {
9868 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1521(ndr, NDR_SCALARS, r->info1521));
9870 break;
9872 case 1522:
9873 if (r->info1522) {
9874 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1522(ndr, NDR_SCALARS, r->info1522));
9876 break;
9878 case 1523:
9879 if (r->info1523) {
9880 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1523(ndr, NDR_SCALARS, r->info1523));
9882 break;
9884 case 1524:
9885 if (r->info1524) {
9886 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1524(ndr, NDR_SCALARS, r->info1524));
9888 break;
9890 case 1525:
9891 if (r->info1525) {
9892 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1525(ndr, NDR_SCALARS, r->info1525));
9894 break;
9896 case 1528:
9897 if (r->info1528) {
9898 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1528(ndr, NDR_SCALARS, r->info1528));
9900 break;
9902 case 1529:
9903 if (r->info1529) {
9904 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1529(ndr, NDR_SCALARS, r->info1529));
9906 break;
9908 case 1530:
9909 if (r->info1530) {
9910 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1530(ndr, NDR_SCALARS, r->info1530));
9912 break;
9914 case 1533:
9915 if (r->info1533) {
9916 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1533(ndr, NDR_SCALARS, r->info1533));
9918 break;
9920 case 1534:
9921 if (r->info1534) {
9922 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1534(ndr, NDR_SCALARS, r->info1534));
9924 break;
9926 case 1535:
9927 if (r->info1535) {
9928 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1535(ndr, NDR_SCALARS, r->info1535));
9930 break;
9932 case 1536:
9933 if (r->info1536) {
9934 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1536(ndr, NDR_SCALARS, r->info1536));
9936 break;
9938 case 1537:
9939 if (r->info1537) {
9940 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1537(ndr, NDR_SCALARS, r->info1537));
9942 break;
9944 case 1538:
9945 if (r->info1538) {
9946 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1538(ndr, NDR_SCALARS, r->info1538));
9948 break;
9950 case 1539:
9951 if (r->info1539) {
9952 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1539(ndr, NDR_SCALARS, r->info1539));
9954 break;
9956 case 1540:
9957 if (r->info1540) {
9958 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1540(ndr, NDR_SCALARS, r->info1540));
9960 break;
9962 case 1541:
9963 if (r->info1541) {
9964 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1541(ndr, NDR_SCALARS, r->info1541));
9966 break;
9968 case 1542:
9969 if (r->info1542) {
9970 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1542(ndr, NDR_SCALARS, r->info1542));
9972 break;
9974 case 1543:
9975 if (r->info1543) {
9976 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1543(ndr, NDR_SCALARS, r->info1543));
9978 break;
9980 case 1544:
9981 if (r->info1544) {
9982 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1544(ndr, NDR_SCALARS, r->info1544));
9984 break;
9986 case 1545:
9987 if (r->info1545) {
9988 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1545(ndr, NDR_SCALARS, r->info1545));
9990 break;
9992 case 1546:
9993 if (r->info1546) {
9994 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1546(ndr, NDR_SCALARS, r->info1546));
9996 break;
9998 case 1547:
9999 if (r->info1547) {
10000 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1547(ndr, NDR_SCALARS, r->info1547));
10002 break;
10004 case 1548:
10005 if (r->info1548) {
10006 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1548(ndr, NDR_SCALARS, r->info1548));
10008 break;
10010 case 1549:
10011 if (r->info1549) {
10012 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1549(ndr, NDR_SCALARS, r->info1549));
10014 break;
10016 case 1550:
10017 if (r->info1550) {
10018 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1550(ndr, NDR_SCALARS, r->info1550));
10020 break;
10022 case 1552:
10023 if (r->info1552) {
10024 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1552(ndr, NDR_SCALARS, r->info1552));
10026 break;
10028 case 1553:
10029 if (r->info1553) {
10030 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1553(ndr, NDR_SCALARS, r->info1553));
10032 break;
10034 case 1554:
10035 if (r->info1554) {
10036 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1554(ndr, NDR_SCALARS, r->info1554));
10038 break;
10040 case 1555:
10041 if (r->info1555) {
10042 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1555(ndr, NDR_SCALARS, r->info1555));
10044 break;
10046 case 1556:
10047 if (r->info1556) {
10048 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1556(ndr, NDR_SCALARS, r->info1556));
10050 break;
10052 default:
10053 break;
10057 return NDR_ERR_SUCCESS;
10060 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetSrvInfo *r)
10062 int level;
10063 uint32_t _level;
10064 TALLOC_CTX *_mem_save_info100_0;
10065 uint32_t _ptr_info100;
10066 TALLOC_CTX *_mem_save_info101_0;
10067 uint32_t _ptr_info101;
10068 TALLOC_CTX *_mem_save_info102_0;
10069 uint32_t _ptr_info102;
10070 TALLOC_CTX *_mem_save_info402_0;
10071 uint32_t _ptr_info402;
10072 TALLOC_CTX *_mem_save_info403_0;
10073 uint32_t _ptr_info403;
10074 TALLOC_CTX *_mem_save_info502_0;
10075 uint32_t _ptr_info502;
10076 TALLOC_CTX *_mem_save_info503_0;
10077 uint32_t _ptr_info503;
10078 TALLOC_CTX *_mem_save_info599_0;
10079 uint32_t _ptr_info599;
10080 TALLOC_CTX *_mem_save_info1005_0;
10081 uint32_t _ptr_info1005;
10082 TALLOC_CTX *_mem_save_info1010_0;
10083 uint32_t _ptr_info1010;
10084 TALLOC_CTX *_mem_save_info1016_0;
10085 uint32_t _ptr_info1016;
10086 TALLOC_CTX *_mem_save_info1017_0;
10087 uint32_t _ptr_info1017;
10088 TALLOC_CTX *_mem_save_info1018_0;
10089 uint32_t _ptr_info1018;
10090 TALLOC_CTX *_mem_save_info1107_0;
10091 uint32_t _ptr_info1107;
10092 TALLOC_CTX *_mem_save_info1501_0;
10093 uint32_t _ptr_info1501;
10094 TALLOC_CTX *_mem_save_info1502_0;
10095 uint32_t _ptr_info1502;
10096 TALLOC_CTX *_mem_save_info1503_0;
10097 uint32_t _ptr_info1503;
10098 TALLOC_CTX *_mem_save_info1506_0;
10099 uint32_t _ptr_info1506;
10100 TALLOC_CTX *_mem_save_info1509_0;
10101 uint32_t _ptr_info1509;
10102 TALLOC_CTX *_mem_save_info1510_0;
10103 uint32_t _ptr_info1510;
10104 TALLOC_CTX *_mem_save_info1511_0;
10105 uint32_t _ptr_info1511;
10106 TALLOC_CTX *_mem_save_info1512_0;
10107 uint32_t _ptr_info1512;
10108 TALLOC_CTX *_mem_save_info1513_0;
10109 uint32_t _ptr_info1513;
10110 TALLOC_CTX *_mem_save_info1514_0;
10111 uint32_t _ptr_info1514;
10112 TALLOC_CTX *_mem_save_info1515_0;
10113 uint32_t _ptr_info1515;
10114 TALLOC_CTX *_mem_save_info1516_0;
10115 uint32_t _ptr_info1516;
10116 TALLOC_CTX *_mem_save_info1518_0;
10117 uint32_t _ptr_info1518;
10118 TALLOC_CTX *_mem_save_info1520_0;
10119 uint32_t _ptr_info1520;
10120 TALLOC_CTX *_mem_save_info1521_0;
10121 uint32_t _ptr_info1521;
10122 TALLOC_CTX *_mem_save_info1522_0;
10123 uint32_t _ptr_info1522;
10124 TALLOC_CTX *_mem_save_info1523_0;
10125 uint32_t _ptr_info1523;
10126 TALLOC_CTX *_mem_save_info1524_0;
10127 uint32_t _ptr_info1524;
10128 TALLOC_CTX *_mem_save_info1525_0;
10129 uint32_t _ptr_info1525;
10130 TALLOC_CTX *_mem_save_info1528_0;
10131 uint32_t _ptr_info1528;
10132 TALLOC_CTX *_mem_save_info1529_0;
10133 uint32_t _ptr_info1529;
10134 TALLOC_CTX *_mem_save_info1530_0;
10135 uint32_t _ptr_info1530;
10136 TALLOC_CTX *_mem_save_info1533_0;
10137 uint32_t _ptr_info1533;
10138 TALLOC_CTX *_mem_save_info1534_0;
10139 uint32_t _ptr_info1534;
10140 TALLOC_CTX *_mem_save_info1535_0;
10141 uint32_t _ptr_info1535;
10142 TALLOC_CTX *_mem_save_info1536_0;
10143 uint32_t _ptr_info1536;
10144 TALLOC_CTX *_mem_save_info1537_0;
10145 uint32_t _ptr_info1537;
10146 TALLOC_CTX *_mem_save_info1538_0;
10147 uint32_t _ptr_info1538;
10148 TALLOC_CTX *_mem_save_info1539_0;
10149 uint32_t _ptr_info1539;
10150 TALLOC_CTX *_mem_save_info1540_0;
10151 uint32_t _ptr_info1540;
10152 TALLOC_CTX *_mem_save_info1541_0;
10153 uint32_t _ptr_info1541;
10154 TALLOC_CTX *_mem_save_info1542_0;
10155 uint32_t _ptr_info1542;
10156 TALLOC_CTX *_mem_save_info1543_0;
10157 uint32_t _ptr_info1543;
10158 TALLOC_CTX *_mem_save_info1544_0;
10159 uint32_t _ptr_info1544;
10160 TALLOC_CTX *_mem_save_info1545_0;
10161 uint32_t _ptr_info1545;
10162 TALLOC_CTX *_mem_save_info1546_0;
10163 uint32_t _ptr_info1546;
10164 TALLOC_CTX *_mem_save_info1547_0;
10165 uint32_t _ptr_info1547;
10166 TALLOC_CTX *_mem_save_info1548_0;
10167 uint32_t _ptr_info1548;
10168 TALLOC_CTX *_mem_save_info1549_0;
10169 uint32_t _ptr_info1549;
10170 TALLOC_CTX *_mem_save_info1550_0;
10171 uint32_t _ptr_info1550;
10172 TALLOC_CTX *_mem_save_info1552_0;
10173 uint32_t _ptr_info1552;
10174 TALLOC_CTX *_mem_save_info1553_0;
10175 uint32_t _ptr_info1553;
10176 TALLOC_CTX *_mem_save_info1554_0;
10177 uint32_t _ptr_info1554;
10178 TALLOC_CTX *_mem_save_info1555_0;
10179 uint32_t _ptr_info1555;
10180 TALLOC_CTX *_mem_save_info1556_0;
10181 uint32_t _ptr_info1556;
10182 level = ndr_pull_get_switch_value(ndr, r);
10183 if (ndr_flags & NDR_SCALARS) {
10184 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
10185 if (_level != level) {
10186 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
10188 switch (level) {
10189 case 100: {
10190 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info100));
10191 if (_ptr_info100) {
10192 NDR_PULL_ALLOC(ndr, r->info100);
10193 } else {
10194 r->info100 = NULL;
10196 break; }
10198 case 101: {
10199 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info101));
10200 if (_ptr_info101) {
10201 NDR_PULL_ALLOC(ndr, r->info101);
10202 } else {
10203 r->info101 = NULL;
10205 break; }
10207 case 102: {
10208 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info102));
10209 if (_ptr_info102) {
10210 NDR_PULL_ALLOC(ndr, r->info102);
10211 } else {
10212 r->info102 = NULL;
10214 break; }
10216 case 402: {
10217 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info402));
10218 if (_ptr_info402) {
10219 NDR_PULL_ALLOC(ndr, r->info402);
10220 } else {
10221 r->info402 = NULL;
10223 break; }
10225 case 403: {
10226 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info403));
10227 if (_ptr_info403) {
10228 NDR_PULL_ALLOC(ndr, r->info403);
10229 } else {
10230 r->info403 = NULL;
10232 break; }
10234 case 502: {
10235 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info502));
10236 if (_ptr_info502) {
10237 NDR_PULL_ALLOC(ndr, r->info502);
10238 } else {
10239 r->info502 = NULL;
10241 break; }
10243 case 503: {
10244 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info503));
10245 if (_ptr_info503) {
10246 NDR_PULL_ALLOC(ndr, r->info503);
10247 } else {
10248 r->info503 = NULL;
10250 break; }
10252 case 599: {
10253 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info599));
10254 if (_ptr_info599) {
10255 NDR_PULL_ALLOC(ndr, r->info599);
10256 } else {
10257 r->info599 = NULL;
10259 break; }
10261 case 1005: {
10262 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1005));
10263 if (_ptr_info1005) {
10264 NDR_PULL_ALLOC(ndr, r->info1005);
10265 } else {
10266 r->info1005 = NULL;
10268 break; }
10270 case 1010: {
10271 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1010));
10272 if (_ptr_info1010) {
10273 NDR_PULL_ALLOC(ndr, r->info1010);
10274 } else {
10275 r->info1010 = NULL;
10277 break; }
10279 case 1016: {
10280 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1016));
10281 if (_ptr_info1016) {
10282 NDR_PULL_ALLOC(ndr, r->info1016);
10283 } else {
10284 r->info1016 = NULL;
10286 break; }
10288 case 1017: {
10289 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1017));
10290 if (_ptr_info1017) {
10291 NDR_PULL_ALLOC(ndr, r->info1017);
10292 } else {
10293 r->info1017 = NULL;
10295 break; }
10297 case 1018: {
10298 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1018));
10299 if (_ptr_info1018) {
10300 NDR_PULL_ALLOC(ndr, r->info1018);
10301 } else {
10302 r->info1018 = NULL;
10304 break; }
10306 case 1107: {
10307 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1107));
10308 if (_ptr_info1107) {
10309 NDR_PULL_ALLOC(ndr, r->info1107);
10310 } else {
10311 r->info1107 = NULL;
10313 break; }
10315 case 1501: {
10316 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1501));
10317 if (_ptr_info1501) {
10318 NDR_PULL_ALLOC(ndr, r->info1501);
10319 } else {
10320 r->info1501 = NULL;
10322 break; }
10324 case 1502: {
10325 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1502));
10326 if (_ptr_info1502) {
10327 NDR_PULL_ALLOC(ndr, r->info1502);
10328 } else {
10329 r->info1502 = NULL;
10331 break; }
10333 case 1503: {
10334 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1503));
10335 if (_ptr_info1503) {
10336 NDR_PULL_ALLOC(ndr, r->info1503);
10337 } else {
10338 r->info1503 = NULL;
10340 break; }
10342 case 1506: {
10343 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1506));
10344 if (_ptr_info1506) {
10345 NDR_PULL_ALLOC(ndr, r->info1506);
10346 } else {
10347 r->info1506 = NULL;
10349 break; }
10351 case 1509: {
10352 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1509));
10353 if (_ptr_info1509) {
10354 NDR_PULL_ALLOC(ndr, r->info1509);
10355 } else {
10356 r->info1509 = NULL;
10358 break; }
10360 case 1510: {
10361 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1510));
10362 if (_ptr_info1510) {
10363 NDR_PULL_ALLOC(ndr, r->info1510);
10364 } else {
10365 r->info1510 = NULL;
10367 break; }
10369 case 1511: {
10370 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1511));
10371 if (_ptr_info1511) {
10372 NDR_PULL_ALLOC(ndr, r->info1511);
10373 } else {
10374 r->info1511 = NULL;
10376 break; }
10378 case 1512: {
10379 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1512));
10380 if (_ptr_info1512) {
10381 NDR_PULL_ALLOC(ndr, r->info1512);
10382 } else {
10383 r->info1512 = NULL;
10385 break; }
10387 case 1513: {
10388 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1513));
10389 if (_ptr_info1513) {
10390 NDR_PULL_ALLOC(ndr, r->info1513);
10391 } else {
10392 r->info1513 = NULL;
10394 break; }
10396 case 1514: {
10397 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1514));
10398 if (_ptr_info1514) {
10399 NDR_PULL_ALLOC(ndr, r->info1514);
10400 } else {
10401 r->info1514 = NULL;
10403 break; }
10405 case 1515: {
10406 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1515));
10407 if (_ptr_info1515) {
10408 NDR_PULL_ALLOC(ndr, r->info1515);
10409 } else {
10410 r->info1515 = NULL;
10412 break; }
10414 case 1516: {
10415 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1516));
10416 if (_ptr_info1516) {
10417 NDR_PULL_ALLOC(ndr, r->info1516);
10418 } else {
10419 r->info1516 = NULL;
10421 break; }
10423 case 1518: {
10424 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1518));
10425 if (_ptr_info1518) {
10426 NDR_PULL_ALLOC(ndr, r->info1518);
10427 } else {
10428 r->info1518 = NULL;
10430 break; }
10432 case 1520: {
10433 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1520));
10434 if (_ptr_info1520) {
10435 NDR_PULL_ALLOC(ndr, r->info1520);
10436 } else {
10437 r->info1520 = NULL;
10439 break; }
10441 case 1521: {
10442 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1521));
10443 if (_ptr_info1521) {
10444 NDR_PULL_ALLOC(ndr, r->info1521);
10445 } else {
10446 r->info1521 = NULL;
10448 break; }
10450 case 1522: {
10451 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1522));
10452 if (_ptr_info1522) {
10453 NDR_PULL_ALLOC(ndr, r->info1522);
10454 } else {
10455 r->info1522 = NULL;
10457 break; }
10459 case 1523: {
10460 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1523));
10461 if (_ptr_info1523) {
10462 NDR_PULL_ALLOC(ndr, r->info1523);
10463 } else {
10464 r->info1523 = NULL;
10466 break; }
10468 case 1524: {
10469 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1524));
10470 if (_ptr_info1524) {
10471 NDR_PULL_ALLOC(ndr, r->info1524);
10472 } else {
10473 r->info1524 = NULL;
10475 break; }
10477 case 1525: {
10478 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1525));
10479 if (_ptr_info1525) {
10480 NDR_PULL_ALLOC(ndr, r->info1525);
10481 } else {
10482 r->info1525 = NULL;
10484 break; }
10486 case 1528: {
10487 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1528));
10488 if (_ptr_info1528) {
10489 NDR_PULL_ALLOC(ndr, r->info1528);
10490 } else {
10491 r->info1528 = NULL;
10493 break; }
10495 case 1529: {
10496 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1529));
10497 if (_ptr_info1529) {
10498 NDR_PULL_ALLOC(ndr, r->info1529);
10499 } else {
10500 r->info1529 = NULL;
10502 break; }
10504 case 1530: {
10505 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1530));
10506 if (_ptr_info1530) {
10507 NDR_PULL_ALLOC(ndr, r->info1530);
10508 } else {
10509 r->info1530 = NULL;
10511 break; }
10513 case 1533: {
10514 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1533));
10515 if (_ptr_info1533) {
10516 NDR_PULL_ALLOC(ndr, r->info1533);
10517 } else {
10518 r->info1533 = NULL;
10520 break; }
10522 case 1534: {
10523 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1534));
10524 if (_ptr_info1534) {
10525 NDR_PULL_ALLOC(ndr, r->info1534);
10526 } else {
10527 r->info1534 = NULL;
10529 break; }
10531 case 1535: {
10532 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1535));
10533 if (_ptr_info1535) {
10534 NDR_PULL_ALLOC(ndr, r->info1535);
10535 } else {
10536 r->info1535 = NULL;
10538 break; }
10540 case 1536: {
10541 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1536));
10542 if (_ptr_info1536) {
10543 NDR_PULL_ALLOC(ndr, r->info1536);
10544 } else {
10545 r->info1536 = NULL;
10547 break; }
10549 case 1537: {
10550 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1537));
10551 if (_ptr_info1537) {
10552 NDR_PULL_ALLOC(ndr, r->info1537);
10553 } else {
10554 r->info1537 = NULL;
10556 break; }
10558 case 1538: {
10559 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1538));
10560 if (_ptr_info1538) {
10561 NDR_PULL_ALLOC(ndr, r->info1538);
10562 } else {
10563 r->info1538 = NULL;
10565 break; }
10567 case 1539: {
10568 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1539));
10569 if (_ptr_info1539) {
10570 NDR_PULL_ALLOC(ndr, r->info1539);
10571 } else {
10572 r->info1539 = NULL;
10574 break; }
10576 case 1540: {
10577 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1540));
10578 if (_ptr_info1540) {
10579 NDR_PULL_ALLOC(ndr, r->info1540);
10580 } else {
10581 r->info1540 = NULL;
10583 break; }
10585 case 1541: {
10586 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1541));
10587 if (_ptr_info1541) {
10588 NDR_PULL_ALLOC(ndr, r->info1541);
10589 } else {
10590 r->info1541 = NULL;
10592 break; }
10594 case 1542: {
10595 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1542));
10596 if (_ptr_info1542) {
10597 NDR_PULL_ALLOC(ndr, r->info1542);
10598 } else {
10599 r->info1542 = NULL;
10601 break; }
10603 case 1543: {
10604 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1543));
10605 if (_ptr_info1543) {
10606 NDR_PULL_ALLOC(ndr, r->info1543);
10607 } else {
10608 r->info1543 = NULL;
10610 break; }
10612 case 1544: {
10613 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1544));
10614 if (_ptr_info1544) {
10615 NDR_PULL_ALLOC(ndr, r->info1544);
10616 } else {
10617 r->info1544 = NULL;
10619 break; }
10621 case 1545: {
10622 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1545));
10623 if (_ptr_info1545) {
10624 NDR_PULL_ALLOC(ndr, r->info1545);
10625 } else {
10626 r->info1545 = NULL;
10628 break; }
10630 case 1546: {
10631 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1546));
10632 if (_ptr_info1546) {
10633 NDR_PULL_ALLOC(ndr, r->info1546);
10634 } else {
10635 r->info1546 = NULL;
10637 break; }
10639 case 1547: {
10640 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1547));
10641 if (_ptr_info1547) {
10642 NDR_PULL_ALLOC(ndr, r->info1547);
10643 } else {
10644 r->info1547 = NULL;
10646 break; }
10648 case 1548: {
10649 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1548));
10650 if (_ptr_info1548) {
10651 NDR_PULL_ALLOC(ndr, r->info1548);
10652 } else {
10653 r->info1548 = NULL;
10655 break; }
10657 case 1549: {
10658 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1549));
10659 if (_ptr_info1549) {
10660 NDR_PULL_ALLOC(ndr, r->info1549);
10661 } else {
10662 r->info1549 = NULL;
10664 break; }
10666 case 1550: {
10667 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1550));
10668 if (_ptr_info1550) {
10669 NDR_PULL_ALLOC(ndr, r->info1550);
10670 } else {
10671 r->info1550 = NULL;
10673 break; }
10675 case 1552: {
10676 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1552));
10677 if (_ptr_info1552) {
10678 NDR_PULL_ALLOC(ndr, r->info1552);
10679 } else {
10680 r->info1552 = NULL;
10682 break; }
10684 case 1553: {
10685 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1553));
10686 if (_ptr_info1553) {
10687 NDR_PULL_ALLOC(ndr, r->info1553);
10688 } else {
10689 r->info1553 = NULL;
10691 break; }
10693 case 1554: {
10694 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1554));
10695 if (_ptr_info1554) {
10696 NDR_PULL_ALLOC(ndr, r->info1554);
10697 } else {
10698 r->info1554 = NULL;
10700 break; }
10702 case 1555: {
10703 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1555));
10704 if (_ptr_info1555) {
10705 NDR_PULL_ALLOC(ndr, r->info1555);
10706 } else {
10707 r->info1555 = NULL;
10709 break; }
10711 case 1556: {
10712 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1556));
10713 if (_ptr_info1556) {
10714 NDR_PULL_ALLOC(ndr, r->info1556);
10715 } else {
10716 r->info1556 = NULL;
10718 break; }
10720 default: {
10721 break; }
10725 if (ndr_flags & NDR_BUFFERS) {
10726 switch (level) {
10727 case 100:
10728 if (r->info100) {
10729 _mem_save_info100_0 = NDR_PULL_GET_MEM_CTX(ndr);
10730 NDR_PULL_SET_MEM_CTX(ndr, r->info100, 0);
10731 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo100(ndr, NDR_SCALARS|NDR_BUFFERS, r->info100));
10732 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info100_0, 0);
10734 break;
10736 case 101:
10737 if (r->info101) {
10738 _mem_save_info101_0 = NDR_PULL_GET_MEM_CTX(ndr);
10739 NDR_PULL_SET_MEM_CTX(ndr, r->info101, 0);
10740 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo101(ndr, NDR_SCALARS|NDR_BUFFERS, r->info101));
10741 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info101_0, 0);
10743 break;
10745 case 102:
10746 if (r->info102) {
10747 _mem_save_info102_0 = NDR_PULL_GET_MEM_CTX(ndr);
10748 NDR_PULL_SET_MEM_CTX(ndr, r->info102, 0);
10749 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo102(ndr, NDR_SCALARS|NDR_BUFFERS, r->info102));
10750 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info102_0, 0);
10752 break;
10754 case 402:
10755 if (r->info402) {
10756 _mem_save_info402_0 = NDR_PULL_GET_MEM_CTX(ndr);
10757 NDR_PULL_SET_MEM_CTX(ndr, r->info402, 0);
10758 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo402(ndr, NDR_SCALARS|NDR_BUFFERS, r->info402));
10759 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info402_0, 0);
10761 break;
10763 case 403:
10764 if (r->info403) {
10765 _mem_save_info403_0 = NDR_PULL_GET_MEM_CTX(ndr);
10766 NDR_PULL_SET_MEM_CTX(ndr, r->info403, 0);
10767 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo403(ndr, NDR_SCALARS|NDR_BUFFERS, r->info403));
10768 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info403_0, 0);
10770 break;
10772 case 502:
10773 if (r->info502) {
10774 _mem_save_info502_0 = NDR_PULL_GET_MEM_CTX(ndr);
10775 NDR_PULL_SET_MEM_CTX(ndr, r->info502, 0);
10776 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo502(ndr, NDR_SCALARS, r->info502));
10777 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info502_0, 0);
10779 break;
10781 case 503:
10782 if (r->info503) {
10783 _mem_save_info503_0 = NDR_PULL_GET_MEM_CTX(ndr);
10784 NDR_PULL_SET_MEM_CTX(ndr, r->info503, 0);
10785 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo503(ndr, NDR_SCALARS|NDR_BUFFERS, r->info503));
10786 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info503_0, 0);
10788 break;
10790 case 599:
10791 if (r->info599) {
10792 _mem_save_info599_0 = NDR_PULL_GET_MEM_CTX(ndr);
10793 NDR_PULL_SET_MEM_CTX(ndr, r->info599, 0);
10794 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo599(ndr, NDR_SCALARS|NDR_BUFFERS, r->info599));
10795 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info599_0, 0);
10797 break;
10799 case 1005:
10800 if (r->info1005) {
10801 _mem_save_info1005_0 = NDR_PULL_GET_MEM_CTX(ndr);
10802 NDR_PULL_SET_MEM_CTX(ndr, r->info1005, 0);
10803 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1005(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1005));
10804 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1005_0, 0);
10806 break;
10808 case 1010:
10809 if (r->info1010) {
10810 _mem_save_info1010_0 = NDR_PULL_GET_MEM_CTX(ndr);
10811 NDR_PULL_SET_MEM_CTX(ndr, r->info1010, 0);
10812 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1010(ndr, NDR_SCALARS, r->info1010));
10813 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1010_0, 0);
10815 break;
10817 case 1016:
10818 if (r->info1016) {
10819 _mem_save_info1016_0 = NDR_PULL_GET_MEM_CTX(ndr);
10820 NDR_PULL_SET_MEM_CTX(ndr, r->info1016, 0);
10821 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1016(ndr, NDR_SCALARS, r->info1016));
10822 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1016_0, 0);
10824 break;
10826 case 1017:
10827 if (r->info1017) {
10828 _mem_save_info1017_0 = NDR_PULL_GET_MEM_CTX(ndr);
10829 NDR_PULL_SET_MEM_CTX(ndr, r->info1017, 0);
10830 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1017(ndr, NDR_SCALARS, r->info1017));
10831 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1017_0, 0);
10833 break;
10835 case 1018:
10836 if (r->info1018) {
10837 _mem_save_info1018_0 = NDR_PULL_GET_MEM_CTX(ndr);
10838 NDR_PULL_SET_MEM_CTX(ndr, r->info1018, 0);
10839 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1018(ndr, NDR_SCALARS, r->info1018));
10840 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1018_0, 0);
10842 break;
10844 case 1107:
10845 if (r->info1107) {
10846 _mem_save_info1107_0 = NDR_PULL_GET_MEM_CTX(ndr);
10847 NDR_PULL_SET_MEM_CTX(ndr, r->info1107, 0);
10848 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1107(ndr, NDR_SCALARS, r->info1107));
10849 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1107_0, 0);
10851 break;
10853 case 1501:
10854 if (r->info1501) {
10855 _mem_save_info1501_0 = NDR_PULL_GET_MEM_CTX(ndr);
10856 NDR_PULL_SET_MEM_CTX(ndr, r->info1501, 0);
10857 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1501(ndr, NDR_SCALARS, r->info1501));
10858 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1501_0, 0);
10860 break;
10862 case 1502:
10863 if (r->info1502) {
10864 _mem_save_info1502_0 = NDR_PULL_GET_MEM_CTX(ndr);
10865 NDR_PULL_SET_MEM_CTX(ndr, r->info1502, 0);
10866 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1502(ndr, NDR_SCALARS, r->info1502));
10867 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1502_0, 0);
10869 break;
10871 case 1503:
10872 if (r->info1503) {
10873 _mem_save_info1503_0 = NDR_PULL_GET_MEM_CTX(ndr);
10874 NDR_PULL_SET_MEM_CTX(ndr, r->info1503, 0);
10875 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1503(ndr, NDR_SCALARS, r->info1503));
10876 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1503_0, 0);
10878 break;
10880 case 1506:
10881 if (r->info1506) {
10882 _mem_save_info1506_0 = NDR_PULL_GET_MEM_CTX(ndr);
10883 NDR_PULL_SET_MEM_CTX(ndr, r->info1506, 0);
10884 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1506(ndr, NDR_SCALARS, r->info1506));
10885 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1506_0, 0);
10887 break;
10889 case 1509:
10890 if (r->info1509) {
10891 _mem_save_info1509_0 = NDR_PULL_GET_MEM_CTX(ndr);
10892 NDR_PULL_SET_MEM_CTX(ndr, r->info1509, 0);
10893 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1509(ndr, NDR_SCALARS, r->info1509));
10894 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1509_0, 0);
10896 break;
10898 case 1510:
10899 if (r->info1510) {
10900 _mem_save_info1510_0 = NDR_PULL_GET_MEM_CTX(ndr);
10901 NDR_PULL_SET_MEM_CTX(ndr, r->info1510, 0);
10902 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1510(ndr, NDR_SCALARS, r->info1510));
10903 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1510_0, 0);
10905 break;
10907 case 1511:
10908 if (r->info1511) {
10909 _mem_save_info1511_0 = NDR_PULL_GET_MEM_CTX(ndr);
10910 NDR_PULL_SET_MEM_CTX(ndr, r->info1511, 0);
10911 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1511(ndr, NDR_SCALARS, r->info1511));
10912 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1511_0, 0);
10914 break;
10916 case 1512:
10917 if (r->info1512) {
10918 _mem_save_info1512_0 = NDR_PULL_GET_MEM_CTX(ndr);
10919 NDR_PULL_SET_MEM_CTX(ndr, r->info1512, 0);
10920 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1512(ndr, NDR_SCALARS, r->info1512));
10921 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1512_0, 0);
10923 break;
10925 case 1513:
10926 if (r->info1513) {
10927 _mem_save_info1513_0 = NDR_PULL_GET_MEM_CTX(ndr);
10928 NDR_PULL_SET_MEM_CTX(ndr, r->info1513, 0);
10929 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1513(ndr, NDR_SCALARS, r->info1513));
10930 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1513_0, 0);
10932 break;
10934 case 1514:
10935 if (r->info1514) {
10936 _mem_save_info1514_0 = NDR_PULL_GET_MEM_CTX(ndr);
10937 NDR_PULL_SET_MEM_CTX(ndr, r->info1514, 0);
10938 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1514(ndr, NDR_SCALARS, r->info1514));
10939 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1514_0, 0);
10941 break;
10943 case 1515:
10944 if (r->info1515) {
10945 _mem_save_info1515_0 = NDR_PULL_GET_MEM_CTX(ndr);
10946 NDR_PULL_SET_MEM_CTX(ndr, r->info1515, 0);
10947 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1515(ndr, NDR_SCALARS, r->info1515));
10948 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1515_0, 0);
10950 break;
10952 case 1516:
10953 if (r->info1516) {
10954 _mem_save_info1516_0 = NDR_PULL_GET_MEM_CTX(ndr);
10955 NDR_PULL_SET_MEM_CTX(ndr, r->info1516, 0);
10956 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1516(ndr, NDR_SCALARS, r->info1516));
10957 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1516_0, 0);
10959 break;
10961 case 1518:
10962 if (r->info1518) {
10963 _mem_save_info1518_0 = NDR_PULL_GET_MEM_CTX(ndr);
10964 NDR_PULL_SET_MEM_CTX(ndr, r->info1518, 0);
10965 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1518(ndr, NDR_SCALARS, r->info1518));
10966 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1518_0, 0);
10968 break;
10970 case 1520:
10971 if (r->info1520) {
10972 _mem_save_info1520_0 = NDR_PULL_GET_MEM_CTX(ndr);
10973 NDR_PULL_SET_MEM_CTX(ndr, r->info1520, 0);
10974 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1520(ndr, NDR_SCALARS, r->info1520));
10975 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1520_0, 0);
10977 break;
10979 case 1521:
10980 if (r->info1521) {
10981 _mem_save_info1521_0 = NDR_PULL_GET_MEM_CTX(ndr);
10982 NDR_PULL_SET_MEM_CTX(ndr, r->info1521, 0);
10983 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1521(ndr, NDR_SCALARS, r->info1521));
10984 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1521_0, 0);
10986 break;
10988 case 1522:
10989 if (r->info1522) {
10990 _mem_save_info1522_0 = NDR_PULL_GET_MEM_CTX(ndr);
10991 NDR_PULL_SET_MEM_CTX(ndr, r->info1522, 0);
10992 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1522(ndr, NDR_SCALARS, r->info1522));
10993 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1522_0, 0);
10995 break;
10997 case 1523:
10998 if (r->info1523) {
10999 _mem_save_info1523_0 = NDR_PULL_GET_MEM_CTX(ndr);
11000 NDR_PULL_SET_MEM_CTX(ndr, r->info1523, 0);
11001 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1523(ndr, NDR_SCALARS, r->info1523));
11002 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1523_0, 0);
11004 break;
11006 case 1524:
11007 if (r->info1524) {
11008 _mem_save_info1524_0 = NDR_PULL_GET_MEM_CTX(ndr);
11009 NDR_PULL_SET_MEM_CTX(ndr, r->info1524, 0);
11010 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1524(ndr, NDR_SCALARS, r->info1524));
11011 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1524_0, 0);
11013 break;
11015 case 1525:
11016 if (r->info1525) {
11017 _mem_save_info1525_0 = NDR_PULL_GET_MEM_CTX(ndr);
11018 NDR_PULL_SET_MEM_CTX(ndr, r->info1525, 0);
11019 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1525(ndr, NDR_SCALARS, r->info1525));
11020 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1525_0, 0);
11022 break;
11024 case 1528:
11025 if (r->info1528) {
11026 _mem_save_info1528_0 = NDR_PULL_GET_MEM_CTX(ndr);
11027 NDR_PULL_SET_MEM_CTX(ndr, r->info1528, 0);
11028 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1528(ndr, NDR_SCALARS, r->info1528));
11029 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1528_0, 0);
11031 break;
11033 case 1529:
11034 if (r->info1529) {
11035 _mem_save_info1529_0 = NDR_PULL_GET_MEM_CTX(ndr);
11036 NDR_PULL_SET_MEM_CTX(ndr, r->info1529, 0);
11037 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1529(ndr, NDR_SCALARS, r->info1529));
11038 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1529_0, 0);
11040 break;
11042 case 1530:
11043 if (r->info1530) {
11044 _mem_save_info1530_0 = NDR_PULL_GET_MEM_CTX(ndr);
11045 NDR_PULL_SET_MEM_CTX(ndr, r->info1530, 0);
11046 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1530(ndr, NDR_SCALARS, r->info1530));
11047 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1530_0, 0);
11049 break;
11051 case 1533:
11052 if (r->info1533) {
11053 _mem_save_info1533_0 = NDR_PULL_GET_MEM_CTX(ndr);
11054 NDR_PULL_SET_MEM_CTX(ndr, r->info1533, 0);
11055 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1533(ndr, NDR_SCALARS, r->info1533));
11056 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1533_0, 0);
11058 break;
11060 case 1534:
11061 if (r->info1534) {
11062 _mem_save_info1534_0 = NDR_PULL_GET_MEM_CTX(ndr);
11063 NDR_PULL_SET_MEM_CTX(ndr, r->info1534, 0);
11064 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1534(ndr, NDR_SCALARS, r->info1534));
11065 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1534_0, 0);
11067 break;
11069 case 1535:
11070 if (r->info1535) {
11071 _mem_save_info1535_0 = NDR_PULL_GET_MEM_CTX(ndr);
11072 NDR_PULL_SET_MEM_CTX(ndr, r->info1535, 0);
11073 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1535(ndr, NDR_SCALARS, r->info1535));
11074 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1535_0, 0);
11076 break;
11078 case 1536:
11079 if (r->info1536) {
11080 _mem_save_info1536_0 = NDR_PULL_GET_MEM_CTX(ndr);
11081 NDR_PULL_SET_MEM_CTX(ndr, r->info1536, 0);
11082 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1536(ndr, NDR_SCALARS, r->info1536));
11083 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1536_0, 0);
11085 break;
11087 case 1537:
11088 if (r->info1537) {
11089 _mem_save_info1537_0 = NDR_PULL_GET_MEM_CTX(ndr);
11090 NDR_PULL_SET_MEM_CTX(ndr, r->info1537, 0);
11091 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1537(ndr, NDR_SCALARS, r->info1537));
11092 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1537_0, 0);
11094 break;
11096 case 1538:
11097 if (r->info1538) {
11098 _mem_save_info1538_0 = NDR_PULL_GET_MEM_CTX(ndr);
11099 NDR_PULL_SET_MEM_CTX(ndr, r->info1538, 0);
11100 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1538(ndr, NDR_SCALARS, r->info1538));
11101 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1538_0, 0);
11103 break;
11105 case 1539:
11106 if (r->info1539) {
11107 _mem_save_info1539_0 = NDR_PULL_GET_MEM_CTX(ndr);
11108 NDR_PULL_SET_MEM_CTX(ndr, r->info1539, 0);
11109 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1539(ndr, NDR_SCALARS, r->info1539));
11110 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1539_0, 0);
11112 break;
11114 case 1540:
11115 if (r->info1540) {
11116 _mem_save_info1540_0 = NDR_PULL_GET_MEM_CTX(ndr);
11117 NDR_PULL_SET_MEM_CTX(ndr, r->info1540, 0);
11118 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1540(ndr, NDR_SCALARS, r->info1540));
11119 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1540_0, 0);
11121 break;
11123 case 1541:
11124 if (r->info1541) {
11125 _mem_save_info1541_0 = NDR_PULL_GET_MEM_CTX(ndr);
11126 NDR_PULL_SET_MEM_CTX(ndr, r->info1541, 0);
11127 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1541(ndr, NDR_SCALARS, r->info1541));
11128 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1541_0, 0);
11130 break;
11132 case 1542:
11133 if (r->info1542) {
11134 _mem_save_info1542_0 = NDR_PULL_GET_MEM_CTX(ndr);
11135 NDR_PULL_SET_MEM_CTX(ndr, r->info1542, 0);
11136 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1542(ndr, NDR_SCALARS, r->info1542));
11137 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1542_0, 0);
11139 break;
11141 case 1543:
11142 if (r->info1543) {
11143 _mem_save_info1543_0 = NDR_PULL_GET_MEM_CTX(ndr);
11144 NDR_PULL_SET_MEM_CTX(ndr, r->info1543, 0);
11145 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1543(ndr, NDR_SCALARS, r->info1543));
11146 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1543_0, 0);
11148 break;
11150 case 1544:
11151 if (r->info1544) {
11152 _mem_save_info1544_0 = NDR_PULL_GET_MEM_CTX(ndr);
11153 NDR_PULL_SET_MEM_CTX(ndr, r->info1544, 0);
11154 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1544(ndr, NDR_SCALARS, r->info1544));
11155 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1544_0, 0);
11157 break;
11159 case 1545:
11160 if (r->info1545) {
11161 _mem_save_info1545_0 = NDR_PULL_GET_MEM_CTX(ndr);
11162 NDR_PULL_SET_MEM_CTX(ndr, r->info1545, 0);
11163 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1545(ndr, NDR_SCALARS, r->info1545));
11164 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1545_0, 0);
11166 break;
11168 case 1546:
11169 if (r->info1546) {
11170 _mem_save_info1546_0 = NDR_PULL_GET_MEM_CTX(ndr);
11171 NDR_PULL_SET_MEM_CTX(ndr, r->info1546, 0);
11172 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1546(ndr, NDR_SCALARS, r->info1546));
11173 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1546_0, 0);
11175 break;
11177 case 1547:
11178 if (r->info1547) {
11179 _mem_save_info1547_0 = NDR_PULL_GET_MEM_CTX(ndr);
11180 NDR_PULL_SET_MEM_CTX(ndr, r->info1547, 0);
11181 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1547(ndr, NDR_SCALARS, r->info1547));
11182 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1547_0, 0);
11184 break;
11186 case 1548:
11187 if (r->info1548) {
11188 _mem_save_info1548_0 = NDR_PULL_GET_MEM_CTX(ndr);
11189 NDR_PULL_SET_MEM_CTX(ndr, r->info1548, 0);
11190 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1548(ndr, NDR_SCALARS, r->info1548));
11191 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1548_0, 0);
11193 break;
11195 case 1549:
11196 if (r->info1549) {
11197 _mem_save_info1549_0 = NDR_PULL_GET_MEM_CTX(ndr);
11198 NDR_PULL_SET_MEM_CTX(ndr, r->info1549, 0);
11199 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1549(ndr, NDR_SCALARS, r->info1549));
11200 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1549_0, 0);
11202 break;
11204 case 1550:
11205 if (r->info1550) {
11206 _mem_save_info1550_0 = NDR_PULL_GET_MEM_CTX(ndr);
11207 NDR_PULL_SET_MEM_CTX(ndr, r->info1550, 0);
11208 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1550(ndr, NDR_SCALARS, r->info1550));
11209 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1550_0, 0);
11211 break;
11213 case 1552:
11214 if (r->info1552) {
11215 _mem_save_info1552_0 = NDR_PULL_GET_MEM_CTX(ndr);
11216 NDR_PULL_SET_MEM_CTX(ndr, r->info1552, 0);
11217 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1552(ndr, NDR_SCALARS, r->info1552));
11218 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1552_0, 0);
11220 break;
11222 case 1553:
11223 if (r->info1553) {
11224 _mem_save_info1553_0 = NDR_PULL_GET_MEM_CTX(ndr);
11225 NDR_PULL_SET_MEM_CTX(ndr, r->info1553, 0);
11226 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1553(ndr, NDR_SCALARS, r->info1553));
11227 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1553_0, 0);
11229 break;
11231 case 1554:
11232 if (r->info1554) {
11233 _mem_save_info1554_0 = NDR_PULL_GET_MEM_CTX(ndr);
11234 NDR_PULL_SET_MEM_CTX(ndr, r->info1554, 0);
11235 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1554(ndr, NDR_SCALARS, r->info1554));
11236 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1554_0, 0);
11238 break;
11240 case 1555:
11241 if (r->info1555) {
11242 _mem_save_info1555_0 = NDR_PULL_GET_MEM_CTX(ndr);
11243 NDR_PULL_SET_MEM_CTX(ndr, r->info1555, 0);
11244 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1555(ndr, NDR_SCALARS, r->info1555));
11245 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1555_0, 0);
11247 break;
11249 case 1556:
11250 if (r->info1556) {
11251 _mem_save_info1556_0 = NDR_PULL_GET_MEM_CTX(ndr);
11252 NDR_PULL_SET_MEM_CTX(ndr, r->info1556, 0);
11253 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1556(ndr, NDR_SCALARS, r->info1556));
11254 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1556_0, 0);
11256 break;
11258 default:
11259 break;
11263 return NDR_ERR_SUCCESS;
11266 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetSrvInfo *r)
11268 int level;
11269 level = ndr_print_get_switch_value(ndr, r);
11270 ndr_print_union(ndr, name, level, "srvsvc_NetSrvInfo");
11271 switch (level) {
11272 case 100:
11273 ndr_print_ptr(ndr, "info100", r->info100);
11274 ndr->depth++;
11275 if (r->info100) {
11276 ndr_print_srvsvc_NetSrvInfo100(ndr, "info100", r->info100);
11278 ndr->depth--;
11279 break;
11281 case 101:
11282 ndr_print_ptr(ndr, "info101", r->info101);
11283 ndr->depth++;
11284 if (r->info101) {
11285 ndr_print_srvsvc_NetSrvInfo101(ndr, "info101", r->info101);
11287 ndr->depth--;
11288 break;
11290 case 102:
11291 ndr_print_ptr(ndr, "info102", r->info102);
11292 ndr->depth++;
11293 if (r->info102) {
11294 ndr_print_srvsvc_NetSrvInfo102(ndr, "info102", r->info102);
11296 ndr->depth--;
11297 break;
11299 case 402:
11300 ndr_print_ptr(ndr, "info402", r->info402);
11301 ndr->depth++;
11302 if (r->info402) {
11303 ndr_print_srvsvc_NetSrvInfo402(ndr, "info402", r->info402);
11305 ndr->depth--;
11306 break;
11308 case 403:
11309 ndr_print_ptr(ndr, "info403", r->info403);
11310 ndr->depth++;
11311 if (r->info403) {
11312 ndr_print_srvsvc_NetSrvInfo403(ndr, "info403", r->info403);
11314 ndr->depth--;
11315 break;
11317 case 502:
11318 ndr_print_ptr(ndr, "info502", r->info502);
11319 ndr->depth++;
11320 if (r->info502) {
11321 ndr_print_srvsvc_NetSrvInfo502(ndr, "info502", r->info502);
11323 ndr->depth--;
11324 break;
11326 case 503:
11327 ndr_print_ptr(ndr, "info503", r->info503);
11328 ndr->depth++;
11329 if (r->info503) {
11330 ndr_print_srvsvc_NetSrvInfo503(ndr, "info503", r->info503);
11332 ndr->depth--;
11333 break;
11335 case 599:
11336 ndr_print_ptr(ndr, "info599", r->info599);
11337 ndr->depth++;
11338 if (r->info599) {
11339 ndr_print_srvsvc_NetSrvInfo599(ndr, "info599", r->info599);
11341 ndr->depth--;
11342 break;
11344 case 1005:
11345 ndr_print_ptr(ndr, "info1005", r->info1005);
11346 ndr->depth++;
11347 if (r->info1005) {
11348 ndr_print_srvsvc_NetSrvInfo1005(ndr, "info1005", r->info1005);
11350 ndr->depth--;
11351 break;
11353 case 1010:
11354 ndr_print_ptr(ndr, "info1010", r->info1010);
11355 ndr->depth++;
11356 if (r->info1010) {
11357 ndr_print_srvsvc_NetSrvInfo1010(ndr, "info1010", r->info1010);
11359 ndr->depth--;
11360 break;
11362 case 1016:
11363 ndr_print_ptr(ndr, "info1016", r->info1016);
11364 ndr->depth++;
11365 if (r->info1016) {
11366 ndr_print_srvsvc_NetSrvInfo1016(ndr, "info1016", r->info1016);
11368 ndr->depth--;
11369 break;
11371 case 1017:
11372 ndr_print_ptr(ndr, "info1017", r->info1017);
11373 ndr->depth++;
11374 if (r->info1017) {
11375 ndr_print_srvsvc_NetSrvInfo1017(ndr, "info1017", r->info1017);
11377 ndr->depth--;
11378 break;
11380 case 1018:
11381 ndr_print_ptr(ndr, "info1018", r->info1018);
11382 ndr->depth++;
11383 if (r->info1018) {
11384 ndr_print_srvsvc_NetSrvInfo1018(ndr, "info1018", r->info1018);
11386 ndr->depth--;
11387 break;
11389 case 1107:
11390 ndr_print_ptr(ndr, "info1107", r->info1107);
11391 ndr->depth++;
11392 if (r->info1107) {
11393 ndr_print_srvsvc_NetSrvInfo1107(ndr, "info1107", r->info1107);
11395 ndr->depth--;
11396 break;
11398 case 1501:
11399 ndr_print_ptr(ndr, "info1501", r->info1501);
11400 ndr->depth++;
11401 if (r->info1501) {
11402 ndr_print_srvsvc_NetSrvInfo1501(ndr, "info1501", r->info1501);
11404 ndr->depth--;
11405 break;
11407 case 1502:
11408 ndr_print_ptr(ndr, "info1502", r->info1502);
11409 ndr->depth++;
11410 if (r->info1502) {
11411 ndr_print_srvsvc_NetSrvInfo1502(ndr, "info1502", r->info1502);
11413 ndr->depth--;
11414 break;
11416 case 1503:
11417 ndr_print_ptr(ndr, "info1503", r->info1503);
11418 ndr->depth++;
11419 if (r->info1503) {
11420 ndr_print_srvsvc_NetSrvInfo1503(ndr, "info1503", r->info1503);
11422 ndr->depth--;
11423 break;
11425 case 1506:
11426 ndr_print_ptr(ndr, "info1506", r->info1506);
11427 ndr->depth++;
11428 if (r->info1506) {
11429 ndr_print_srvsvc_NetSrvInfo1506(ndr, "info1506", r->info1506);
11431 ndr->depth--;
11432 break;
11434 case 1509:
11435 ndr_print_ptr(ndr, "info1509", r->info1509);
11436 ndr->depth++;
11437 if (r->info1509) {
11438 ndr_print_srvsvc_NetSrvInfo1509(ndr, "info1509", r->info1509);
11440 ndr->depth--;
11441 break;
11443 case 1510:
11444 ndr_print_ptr(ndr, "info1510", r->info1510);
11445 ndr->depth++;
11446 if (r->info1510) {
11447 ndr_print_srvsvc_NetSrvInfo1510(ndr, "info1510", r->info1510);
11449 ndr->depth--;
11450 break;
11452 case 1511:
11453 ndr_print_ptr(ndr, "info1511", r->info1511);
11454 ndr->depth++;
11455 if (r->info1511) {
11456 ndr_print_srvsvc_NetSrvInfo1511(ndr, "info1511", r->info1511);
11458 ndr->depth--;
11459 break;
11461 case 1512:
11462 ndr_print_ptr(ndr, "info1512", r->info1512);
11463 ndr->depth++;
11464 if (r->info1512) {
11465 ndr_print_srvsvc_NetSrvInfo1512(ndr, "info1512", r->info1512);
11467 ndr->depth--;
11468 break;
11470 case 1513:
11471 ndr_print_ptr(ndr, "info1513", r->info1513);
11472 ndr->depth++;
11473 if (r->info1513) {
11474 ndr_print_srvsvc_NetSrvInfo1513(ndr, "info1513", r->info1513);
11476 ndr->depth--;
11477 break;
11479 case 1514:
11480 ndr_print_ptr(ndr, "info1514", r->info1514);
11481 ndr->depth++;
11482 if (r->info1514) {
11483 ndr_print_srvsvc_NetSrvInfo1514(ndr, "info1514", r->info1514);
11485 ndr->depth--;
11486 break;
11488 case 1515:
11489 ndr_print_ptr(ndr, "info1515", r->info1515);
11490 ndr->depth++;
11491 if (r->info1515) {
11492 ndr_print_srvsvc_NetSrvInfo1515(ndr, "info1515", r->info1515);
11494 ndr->depth--;
11495 break;
11497 case 1516:
11498 ndr_print_ptr(ndr, "info1516", r->info1516);
11499 ndr->depth++;
11500 if (r->info1516) {
11501 ndr_print_srvsvc_NetSrvInfo1516(ndr, "info1516", r->info1516);
11503 ndr->depth--;
11504 break;
11506 case 1518:
11507 ndr_print_ptr(ndr, "info1518", r->info1518);
11508 ndr->depth++;
11509 if (r->info1518) {
11510 ndr_print_srvsvc_NetSrvInfo1518(ndr, "info1518", r->info1518);
11512 ndr->depth--;
11513 break;
11515 case 1520:
11516 ndr_print_ptr(ndr, "info1520", r->info1520);
11517 ndr->depth++;
11518 if (r->info1520) {
11519 ndr_print_srvsvc_NetSrvInfo1520(ndr, "info1520", r->info1520);
11521 ndr->depth--;
11522 break;
11524 case 1521:
11525 ndr_print_ptr(ndr, "info1521", r->info1521);
11526 ndr->depth++;
11527 if (r->info1521) {
11528 ndr_print_srvsvc_NetSrvInfo1521(ndr, "info1521", r->info1521);
11530 ndr->depth--;
11531 break;
11533 case 1522:
11534 ndr_print_ptr(ndr, "info1522", r->info1522);
11535 ndr->depth++;
11536 if (r->info1522) {
11537 ndr_print_srvsvc_NetSrvInfo1522(ndr, "info1522", r->info1522);
11539 ndr->depth--;
11540 break;
11542 case 1523:
11543 ndr_print_ptr(ndr, "info1523", r->info1523);
11544 ndr->depth++;
11545 if (r->info1523) {
11546 ndr_print_srvsvc_NetSrvInfo1523(ndr, "info1523", r->info1523);
11548 ndr->depth--;
11549 break;
11551 case 1524:
11552 ndr_print_ptr(ndr, "info1524", r->info1524);
11553 ndr->depth++;
11554 if (r->info1524) {
11555 ndr_print_srvsvc_NetSrvInfo1524(ndr, "info1524", r->info1524);
11557 ndr->depth--;
11558 break;
11560 case 1525:
11561 ndr_print_ptr(ndr, "info1525", r->info1525);
11562 ndr->depth++;
11563 if (r->info1525) {
11564 ndr_print_srvsvc_NetSrvInfo1525(ndr, "info1525", r->info1525);
11566 ndr->depth--;
11567 break;
11569 case 1528:
11570 ndr_print_ptr(ndr, "info1528", r->info1528);
11571 ndr->depth++;
11572 if (r->info1528) {
11573 ndr_print_srvsvc_NetSrvInfo1528(ndr, "info1528", r->info1528);
11575 ndr->depth--;
11576 break;
11578 case 1529:
11579 ndr_print_ptr(ndr, "info1529", r->info1529);
11580 ndr->depth++;
11581 if (r->info1529) {
11582 ndr_print_srvsvc_NetSrvInfo1529(ndr, "info1529", r->info1529);
11584 ndr->depth--;
11585 break;
11587 case 1530:
11588 ndr_print_ptr(ndr, "info1530", r->info1530);
11589 ndr->depth++;
11590 if (r->info1530) {
11591 ndr_print_srvsvc_NetSrvInfo1530(ndr, "info1530", r->info1530);
11593 ndr->depth--;
11594 break;
11596 case 1533:
11597 ndr_print_ptr(ndr, "info1533", r->info1533);
11598 ndr->depth++;
11599 if (r->info1533) {
11600 ndr_print_srvsvc_NetSrvInfo1533(ndr, "info1533", r->info1533);
11602 ndr->depth--;
11603 break;
11605 case 1534:
11606 ndr_print_ptr(ndr, "info1534", r->info1534);
11607 ndr->depth++;
11608 if (r->info1534) {
11609 ndr_print_srvsvc_NetSrvInfo1534(ndr, "info1534", r->info1534);
11611 ndr->depth--;
11612 break;
11614 case 1535:
11615 ndr_print_ptr(ndr, "info1535", r->info1535);
11616 ndr->depth++;
11617 if (r->info1535) {
11618 ndr_print_srvsvc_NetSrvInfo1535(ndr, "info1535", r->info1535);
11620 ndr->depth--;
11621 break;
11623 case 1536:
11624 ndr_print_ptr(ndr, "info1536", r->info1536);
11625 ndr->depth++;
11626 if (r->info1536) {
11627 ndr_print_srvsvc_NetSrvInfo1536(ndr, "info1536", r->info1536);
11629 ndr->depth--;
11630 break;
11632 case 1537:
11633 ndr_print_ptr(ndr, "info1537", r->info1537);
11634 ndr->depth++;
11635 if (r->info1537) {
11636 ndr_print_srvsvc_NetSrvInfo1537(ndr, "info1537", r->info1537);
11638 ndr->depth--;
11639 break;
11641 case 1538:
11642 ndr_print_ptr(ndr, "info1538", r->info1538);
11643 ndr->depth++;
11644 if (r->info1538) {
11645 ndr_print_srvsvc_NetSrvInfo1538(ndr, "info1538", r->info1538);
11647 ndr->depth--;
11648 break;
11650 case 1539:
11651 ndr_print_ptr(ndr, "info1539", r->info1539);
11652 ndr->depth++;
11653 if (r->info1539) {
11654 ndr_print_srvsvc_NetSrvInfo1539(ndr, "info1539", r->info1539);
11656 ndr->depth--;
11657 break;
11659 case 1540:
11660 ndr_print_ptr(ndr, "info1540", r->info1540);
11661 ndr->depth++;
11662 if (r->info1540) {
11663 ndr_print_srvsvc_NetSrvInfo1540(ndr, "info1540", r->info1540);
11665 ndr->depth--;
11666 break;
11668 case 1541:
11669 ndr_print_ptr(ndr, "info1541", r->info1541);
11670 ndr->depth++;
11671 if (r->info1541) {
11672 ndr_print_srvsvc_NetSrvInfo1541(ndr, "info1541", r->info1541);
11674 ndr->depth--;
11675 break;
11677 case 1542:
11678 ndr_print_ptr(ndr, "info1542", r->info1542);
11679 ndr->depth++;
11680 if (r->info1542) {
11681 ndr_print_srvsvc_NetSrvInfo1542(ndr, "info1542", r->info1542);
11683 ndr->depth--;
11684 break;
11686 case 1543:
11687 ndr_print_ptr(ndr, "info1543", r->info1543);
11688 ndr->depth++;
11689 if (r->info1543) {
11690 ndr_print_srvsvc_NetSrvInfo1543(ndr, "info1543", r->info1543);
11692 ndr->depth--;
11693 break;
11695 case 1544:
11696 ndr_print_ptr(ndr, "info1544", r->info1544);
11697 ndr->depth++;
11698 if (r->info1544) {
11699 ndr_print_srvsvc_NetSrvInfo1544(ndr, "info1544", r->info1544);
11701 ndr->depth--;
11702 break;
11704 case 1545:
11705 ndr_print_ptr(ndr, "info1545", r->info1545);
11706 ndr->depth++;
11707 if (r->info1545) {
11708 ndr_print_srvsvc_NetSrvInfo1545(ndr, "info1545", r->info1545);
11710 ndr->depth--;
11711 break;
11713 case 1546:
11714 ndr_print_ptr(ndr, "info1546", r->info1546);
11715 ndr->depth++;
11716 if (r->info1546) {
11717 ndr_print_srvsvc_NetSrvInfo1546(ndr, "info1546", r->info1546);
11719 ndr->depth--;
11720 break;
11722 case 1547:
11723 ndr_print_ptr(ndr, "info1547", r->info1547);
11724 ndr->depth++;
11725 if (r->info1547) {
11726 ndr_print_srvsvc_NetSrvInfo1547(ndr, "info1547", r->info1547);
11728 ndr->depth--;
11729 break;
11731 case 1548:
11732 ndr_print_ptr(ndr, "info1548", r->info1548);
11733 ndr->depth++;
11734 if (r->info1548) {
11735 ndr_print_srvsvc_NetSrvInfo1548(ndr, "info1548", r->info1548);
11737 ndr->depth--;
11738 break;
11740 case 1549:
11741 ndr_print_ptr(ndr, "info1549", r->info1549);
11742 ndr->depth++;
11743 if (r->info1549) {
11744 ndr_print_srvsvc_NetSrvInfo1549(ndr, "info1549", r->info1549);
11746 ndr->depth--;
11747 break;
11749 case 1550:
11750 ndr_print_ptr(ndr, "info1550", r->info1550);
11751 ndr->depth++;
11752 if (r->info1550) {
11753 ndr_print_srvsvc_NetSrvInfo1550(ndr, "info1550", r->info1550);
11755 ndr->depth--;
11756 break;
11758 case 1552:
11759 ndr_print_ptr(ndr, "info1552", r->info1552);
11760 ndr->depth++;
11761 if (r->info1552) {
11762 ndr_print_srvsvc_NetSrvInfo1552(ndr, "info1552", r->info1552);
11764 ndr->depth--;
11765 break;
11767 case 1553:
11768 ndr_print_ptr(ndr, "info1553", r->info1553);
11769 ndr->depth++;
11770 if (r->info1553) {
11771 ndr_print_srvsvc_NetSrvInfo1553(ndr, "info1553", r->info1553);
11773 ndr->depth--;
11774 break;
11776 case 1554:
11777 ndr_print_ptr(ndr, "info1554", r->info1554);
11778 ndr->depth++;
11779 if (r->info1554) {
11780 ndr_print_srvsvc_NetSrvInfo1554(ndr, "info1554", r->info1554);
11782 ndr->depth--;
11783 break;
11785 case 1555:
11786 ndr_print_ptr(ndr, "info1555", r->info1555);
11787 ndr->depth++;
11788 if (r->info1555) {
11789 ndr_print_srvsvc_NetSrvInfo1555(ndr, "info1555", r->info1555);
11791 ndr->depth--;
11792 break;
11794 case 1556:
11795 ndr_print_ptr(ndr, "info1556", r->info1556);
11796 ndr->depth++;
11797 if (r->info1556) {
11798 ndr_print_srvsvc_NetSrvInfo1556(ndr, "info1556", r->info1556);
11800 ndr->depth--;
11801 break;
11803 default:
11804 break;
11809 static enum ndr_err_code ndr_push_srvsvc_NetDiskInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetDiskInfo0 *r)
11811 if (ndr_flags & NDR_SCALARS) {
11812 NDR_CHECK(ndr_push_align(ndr, 4));
11813 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
11814 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen(r->disk) + 1));
11815 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->disk, strlen(r->disk) + 1, sizeof(uint16_t), CH_UTF16));
11817 if (ndr_flags & NDR_BUFFERS) {
11819 return NDR_ERR_SUCCESS;
11822 static enum ndr_err_code ndr_pull_srvsvc_NetDiskInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetDiskInfo0 *r)
11824 uint32_t size_disk_0 = 0;
11825 if (ndr_flags & NDR_SCALARS) {
11826 NDR_CHECK(ndr_pull_align(ndr, 4));
11827 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__disk_offset));
11828 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__disk_length));
11829 size_disk_0 = r->__disk_length;
11830 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->disk, size_disk_0, sizeof(uint16_t), CH_UTF16));
11832 if (ndr_flags & NDR_BUFFERS) {
11834 return NDR_ERR_SUCCESS;
11837 _PUBLIC_ void ndr_print_srvsvc_NetDiskInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetDiskInfo0 *r)
11839 ndr_print_struct(ndr, name, "srvsvc_NetDiskInfo0");
11840 ndr->depth++;
11841 ndr_print_uint32(ndr, "__disk_offset", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->__disk_offset);
11842 ndr_print_uint32(ndr, "__disk_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen(r->disk) + 1:r->__disk_length);
11843 ndr_print_string(ndr, "disk", r->disk);
11844 ndr->depth--;
11847 static enum ndr_err_code ndr_push_srvsvc_NetDiskInfo(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetDiskInfo *r)
11849 uint32_t cntr_disks_1;
11850 if (ndr_flags & NDR_SCALARS) {
11851 NDR_CHECK(ndr_push_align(ndr, 4));
11852 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
11853 NDR_CHECK(ndr_push_unique_ptr(ndr, r->disks));
11855 if (ndr_flags & NDR_BUFFERS) {
11856 if (r->disks) {
11857 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
11858 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
11859 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
11860 for (cntr_disks_1 = 0; cntr_disks_1 < r->count; cntr_disks_1++) {
11861 NDR_CHECK(ndr_push_srvsvc_NetDiskInfo0(ndr, NDR_SCALARS, &r->disks[cntr_disks_1]));
11865 return NDR_ERR_SUCCESS;
11868 static enum ndr_err_code ndr_pull_srvsvc_NetDiskInfo(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetDiskInfo *r)
11870 uint32_t _ptr_disks;
11871 uint32_t size_disks_1 = 0;
11872 uint32_t length_disks_1 = 0;
11873 uint32_t cntr_disks_1;
11874 TALLOC_CTX *_mem_save_disks_0;
11875 TALLOC_CTX *_mem_save_disks_1;
11876 if (ndr_flags & NDR_SCALARS) {
11877 NDR_CHECK(ndr_pull_align(ndr, 4));
11878 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
11879 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_disks));
11880 if (_ptr_disks) {
11881 NDR_PULL_ALLOC(ndr, r->disks);
11882 } else {
11883 r->disks = NULL;
11886 if (ndr_flags & NDR_BUFFERS) {
11887 if (r->disks) {
11888 _mem_save_disks_0 = NDR_PULL_GET_MEM_CTX(ndr);
11889 NDR_PULL_SET_MEM_CTX(ndr, r->disks, 0);
11890 NDR_CHECK(ndr_pull_array_size(ndr, &r->disks));
11891 NDR_CHECK(ndr_pull_array_length(ndr, &r->disks));
11892 size_disks_1 = ndr_get_array_size(ndr, &r->disks);
11893 length_disks_1 = ndr_get_array_length(ndr, &r->disks);
11894 if (length_disks_1 > size_disks_1) {
11895 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_disks_1, length_disks_1);
11897 NDR_PULL_ALLOC_N(ndr, r->disks, size_disks_1);
11898 _mem_save_disks_1 = NDR_PULL_GET_MEM_CTX(ndr);
11899 NDR_PULL_SET_MEM_CTX(ndr, r->disks, 0);
11900 for (cntr_disks_1 = 0; cntr_disks_1 < length_disks_1; cntr_disks_1++) {
11901 NDR_CHECK(ndr_pull_srvsvc_NetDiskInfo0(ndr, NDR_SCALARS, &r->disks[cntr_disks_1]));
11903 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_disks_1, 0);
11904 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_disks_0, 0);
11906 if (r->disks) {
11907 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->disks, r->count));
11909 if (r->disks) {
11910 NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->disks, r->count));
11913 return NDR_ERR_SUCCESS;
11916 _PUBLIC_ void ndr_print_srvsvc_NetDiskInfo(struct ndr_print *ndr, const char *name, const struct srvsvc_NetDiskInfo *r)
11918 uint32_t cntr_disks_1;
11919 ndr_print_struct(ndr, name, "srvsvc_NetDiskInfo");
11920 ndr->depth++;
11921 ndr_print_uint32(ndr, "count", r->count);
11922 ndr_print_ptr(ndr, "disks", r->disks);
11923 ndr->depth++;
11924 if (r->disks) {
11925 ndr->print(ndr, "%s: ARRAY(%d)", "disks", (int)r->count);
11926 ndr->depth++;
11927 for (cntr_disks_1=0;cntr_disks_1<r->count;cntr_disks_1++) {
11928 char *idx_1=NULL;
11929 if (asprintf(&idx_1, "[%d]", cntr_disks_1) != -1) {
11930 ndr_print_srvsvc_NetDiskInfo0(ndr, "disks", &r->disks[cntr_disks_1]);
11931 free(idx_1);
11934 ndr->depth--;
11936 ndr->depth--;
11937 ndr->depth--;
11940 static enum ndr_err_code ndr_push_srvsvc_Statistics(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_Statistics *r)
11942 if (ndr_flags & NDR_SCALARS) {
11943 NDR_CHECK(ndr_push_align(ndr, 4));
11944 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->start));
11945 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fopens));
11946 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->devopens));
11947 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->jobsqueued));
11948 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sopens));
11949 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->stimeouts));
11950 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->serrorout));
11951 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pwerrors));
11952 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->permerrors));
11953 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->syserrors));
11954 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bytessent_low));
11955 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bytessent_high));
11956 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bytesrcvd_low));
11957 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bytesrcvd_high));
11958 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->avresponse));
11959 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reqbufneed));
11960 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bigbufneed));
11962 if (ndr_flags & NDR_BUFFERS) {
11964 return NDR_ERR_SUCCESS;
11967 static enum ndr_err_code ndr_pull_srvsvc_Statistics(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_Statistics *r)
11969 if (ndr_flags & NDR_SCALARS) {
11970 NDR_CHECK(ndr_pull_align(ndr, 4));
11971 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->start));
11972 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fopens));
11973 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->devopens));
11974 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->jobsqueued));
11975 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sopens));
11976 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->stimeouts));
11977 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->serrorout));
11978 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pwerrors));
11979 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->permerrors));
11980 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->syserrors));
11981 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bytessent_low));
11982 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bytessent_high));
11983 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bytesrcvd_low));
11984 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bytesrcvd_high));
11985 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->avresponse));
11986 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reqbufneed));
11987 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bigbufneed));
11989 if (ndr_flags & NDR_BUFFERS) {
11991 return NDR_ERR_SUCCESS;
11994 _PUBLIC_ void ndr_print_srvsvc_Statistics(struct ndr_print *ndr, const char *name, const struct srvsvc_Statistics *r)
11996 ndr_print_struct(ndr, name, "srvsvc_Statistics");
11997 ndr->depth++;
11998 ndr_print_uint32(ndr, "start", r->start);
11999 ndr_print_uint32(ndr, "fopens", r->fopens);
12000 ndr_print_uint32(ndr, "devopens", r->devopens);
12001 ndr_print_uint32(ndr, "jobsqueued", r->jobsqueued);
12002 ndr_print_uint32(ndr, "sopens", r->sopens);
12003 ndr_print_uint32(ndr, "stimeouts", r->stimeouts);
12004 ndr_print_uint32(ndr, "serrorout", r->serrorout);
12005 ndr_print_uint32(ndr, "pwerrors", r->pwerrors);
12006 ndr_print_uint32(ndr, "permerrors", r->permerrors);
12007 ndr_print_uint32(ndr, "syserrors", r->syserrors);
12008 ndr_print_uint32(ndr, "bytessent_low", r->bytessent_low);
12009 ndr_print_uint32(ndr, "bytessent_high", r->bytessent_high);
12010 ndr_print_uint32(ndr, "bytesrcvd_low", r->bytesrcvd_low);
12011 ndr_print_uint32(ndr, "bytesrcvd_high", r->bytesrcvd_high);
12012 ndr_print_uint32(ndr, "avresponse", r->avresponse);
12013 ndr_print_uint32(ndr, "reqbufneed", r->reqbufneed);
12014 ndr_print_uint32(ndr, "bigbufneed", r->bigbufneed);
12015 ndr->depth--;
12018 static enum ndr_err_code ndr_push_srvsvc_NetTransportInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportInfo0 *r)
12020 if (ndr_flags & NDR_SCALARS) {
12021 NDR_CHECK(ndr_push_align(ndr, 4));
12022 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->vcs));
12023 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
12024 NDR_CHECK(ndr_push_unique_ptr(ndr, r->addr));
12025 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->addr_len));
12026 NDR_CHECK(ndr_push_unique_ptr(ndr, r->net_addr));
12028 if (ndr_flags & NDR_BUFFERS) {
12029 if (r->name) {
12030 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
12031 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
12032 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
12033 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12035 if (r->addr) {
12036 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->addr_len));
12037 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->addr, r->addr_len));
12039 if (r->net_addr) {
12040 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
12041 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
12042 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
12043 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->net_addr, ndr_charset_length(r->net_addr, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12046 return NDR_ERR_SUCCESS;
12049 static enum ndr_err_code ndr_pull_srvsvc_NetTransportInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportInfo0 *r)
12051 uint32_t _ptr_name;
12052 uint32_t size_name_1 = 0;
12053 uint32_t length_name_1 = 0;
12054 TALLOC_CTX *_mem_save_name_0;
12055 uint32_t _ptr_addr;
12056 uint32_t size_addr_1 = 0;
12057 TALLOC_CTX *_mem_save_addr_0;
12058 uint32_t _ptr_net_addr;
12059 uint32_t size_net_addr_1 = 0;
12060 uint32_t length_net_addr_1 = 0;
12061 TALLOC_CTX *_mem_save_net_addr_0;
12062 if (ndr_flags & NDR_SCALARS) {
12063 NDR_CHECK(ndr_pull_align(ndr, 4));
12064 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->vcs));
12065 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
12066 if (_ptr_name) {
12067 NDR_PULL_ALLOC(ndr, r->name);
12068 } else {
12069 r->name = NULL;
12071 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_addr));
12072 if (_ptr_addr) {
12073 NDR_PULL_ALLOC(ndr, r->addr);
12074 } else {
12075 r->addr = NULL;
12077 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->addr_len));
12078 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_net_addr));
12079 if (_ptr_net_addr) {
12080 NDR_PULL_ALLOC(ndr, r->net_addr);
12081 } else {
12082 r->net_addr = NULL;
12085 if (ndr_flags & NDR_BUFFERS) {
12086 if (r->name) {
12087 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
12088 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
12089 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
12090 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
12091 size_name_1 = ndr_get_array_size(ndr, &r->name);
12092 length_name_1 = ndr_get_array_length(ndr, &r->name);
12093 if (length_name_1 > size_name_1) {
12094 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_name_1, length_name_1);
12096 NDR_CHECK(ndr_check_string_terminator(ndr, length_name_1, sizeof(uint16_t)));
12097 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, length_name_1, sizeof(uint16_t), CH_UTF16));
12098 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
12100 if (r->addr) {
12101 _mem_save_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
12102 NDR_PULL_SET_MEM_CTX(ndr, r->addr, 0);
12103 NDR_CHECK(ndr_pull_array_size(ndr, &r->addr));
12104 size_addr_1 = ndr_get_array_size(ndr, &r->addr);
12105 NDR_PULL_ALLOC_N(ndr, r->addr, size_addr_1);
12106 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->addr, size_addr_1));
12107 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_addr_0, 0);
12109 if (r->net_addr) {
12110 _mem_save_net_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
12111 NDR_PULL_SET_MEM_CTX(ndr, r->net_addr, 0);
12112 NDR_CHECK(ndr_pull_array_size(ndr, &r->net_addr));
12113 NDR_CHECK(ndr_pull_array_length(ndr, &r->net_addr));
12114 size_net_addr_1 = ndr_get_array_size(ndr, &r->net_addr);
12115 length_net_addr_1 = ndr_get_array_length(ndr, &r->net_addr);
12116 if (length_net_addr_1 > size_net_addr_1) {
12117 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_net_addr_1, length_net_addr_1);
12119 NDR_CHECK(ndr_check_string_terminator(ndr, length_net_addr_1, sizeof(uint16_t)));
12120 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->net_addr, length_net_addr_1, sizeof(uint16_t), CH_UTF16));
12121 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_net_addr_0, 0);
12123 if (r->addr) {
12124 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->addr, r->addr_len));
12127 return NDR_ERR_SUCCESS;
12130 _PUBLIC_ void ndr_print_srvsvc_NetTransportInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportInfo0 *r)
12132 ndr_print_struct(ndr, name, "srvsvc_NetTransportInfo0");
12133 ndr->depth++;
12134 ndr_print_uint32(ndr, "vcs", r->vcs);
12135 ndr_print_ptr(ndr, "name", r->name);
12136 ndr->depth++;
12137 if (r->name) {
12138 ndr_print_string(ndr, "name", r->name);
12140 ndr->depth--;
12141 ndr_print_ptr(ndr, "addr", r->addr);
12142 ndr->depth++;
12143 if (r->addr) {
12144 ndr_print_array_uint8(ndr, "addr", r->addr, r->addr_len);
12146 ndr->depth--;
12147 ndr_print_uint32(ndr, "addr_len", r->addr_len);
12148 ndr_print_ptr(ndr, "net_addr", r->net_addr);
12149 ndr->depth++;
12150 if (r->net_addr) {
12151 ndr_print_string(ndr, "net_addr", r->net_addr);
12153 ndr->depth--;
12154 ndr->depth--;
12157 static enum ndr_err_code ndr_push_srvsvc_NetTransportCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportCtr0 *r)
12159 uint32_t cntr_array_1;
12160 if (ndr_flags & NDR_SCALARS) {
12161 NDR_CHECK(ndr_push_align(ndr, 4));
12162 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
12163 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
12165 if (ndr_flags & NDR_BUFFERS) {
12166 if (r->array) {
12167 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
12168 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12169 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
12171 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12172 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
12176 return NDR_ERR_SUCCESS;
12179 static enum ndr_err_code ndr_pull_srvsvc_NetTransportCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportCtr0 *r)
12181 uint32_t _ptr_array;
12182 uint32_t size_array_1 = 0;
12183 uint32_t cntr_array_1;
12184 TALLOC_CTX *_mem_save_array_0;
12185 TALLOC_CTX *_mem_save_array_1;
12186 if (ndr_flags & NDR_SCALARS) {
12187 NDR_CHECK(ndr_pull_align(ndr, 4));
12188 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
12189 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
12190 if (_ptr_array) {
12191 NDR_PULL_ALLOC(ndr, r->array);
12192 } else {
12193 r->array = NULL;
12196 if (ndr_flags & NDR_BUFFERS) {
12197 if (r->array) {
12198 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
12199 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
12200 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
12201 size_array_1 = ndr_get_array_size(ndr, &r->array);
12202 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
12203 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
12204 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
12205 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
12206 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
12208 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
12209 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
12211 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
12212 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
12214 if (r->array) {
12215 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
12218 return NDR_ERR_SUCCESS;
12221 _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportCtr0 *r)
12223 uint32_t cntr_array_1;
12224 ndr_print_struct(ndr, name, "srvsvc_NetTransportCtr0");
12225 ndr->depth++;
12226 ndr_print_uint32(ndr, "count", r->count);
12227 ndr_print_ptr(ndr, "array", r->array);
12228 ndr->depth++;
12229 if (r->array) {
12230 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
12231 ndr->depth++;
12232 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
12233 char *idx_1=NULL;
12234 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
12235 ndr_print_srvsvc_NetTransportInfo0(ndr, "array", &r->array[cntr_array_1]);
12236 free(idx_1);
12239 ndr->depth--;
12241 ndr->depth--;
12242 ndr->depth--;
12245 static enum ndr_err_code ndr_push_srvsvc_NetTransportInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportInfo1 *r)
12247 if (ndr_flags & NDR_SCALARS) {
12248 NDR_CHECK(ndr_push_align(ndr, 4));
12249 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->vcs));
12250 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
12251 NDR_CHECK(ndr_push_unique_ptr(ndr, r->addr));
12252 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->addr_len));
12253 NDR_CHECK(ndr_push_unique_ptr(ndr, r->net_addr));
12254 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
12256 if (ndr_flags & NDR_BUFFERS) {
12257 if (r->name) {
12258 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
12259 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
12260 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
12261 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12263 if (r->addr) {
12264 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->addr_len));
12265 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->addr, r->addr_len));
12267 if (r->net_addr) {
12268 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
12269 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
12270 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
12271 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->net_addr, ndr_charset_length(r->net_addr, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12273 if (r->domain) {
12274 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
12275 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
12276 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
12277 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12280 return NDR_ERR_SUCCESS;
12283 static enum ndr_err_code ndr_pull_srvsvc_NetTransportInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportInfo1 *r)
12285 uint32_t _ptr_name;
12286 uint32_t size_name_1 = 0;
12287 uint32_t length_name_1 = 0;
12288 TALLOC_CTX *_mem_save_name_0;
12289 uint32_t _ptr_addr;
12290 uint32_t size_addr_1 = 0;
12291 TALLOC_CTX *_mem_save_addr_0;
12292 uint32_t _ptr_net_addr;
12293 uint32_t size_net_addr_1 = 0;
12294 uint32_t length_net_addr_1 = 0;
12295 TALLOC_CTX *_mem_save_net_addr_0;
12296 uint32_t _ptr_domain;
12297 uint32_t size_domain_1 = 0;
12298 uint32_t length_domain_1 = 0;
12299 TALLOC_CTX *_mem_save_domain_0;
12300 if (ndr_flags & NDR_SCALARS) {
12301 NDR_CHECK(ndr_pull_align(ndr, 4));
12302 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->vcs));
12303 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
12304 if (_ptr_name) {
12305 NDR_PULL_ALLOC(ndr, r->name);
12306 } else {
12307 r->name = NULL;
12309 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_addr));
12310 if (_ptr_addr) {
12311 NDR_PULL_ALLOC(ndr, r->addr);
12312 } else {
12313 r->addr = NULL;
12315 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->addr_len));
12316 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_net_addr));
12317 if (_ptr_net_addr) {
12318 NDR_PULL_ALLOC(ndr, r->net_addr);
12319 } else {
12320 r->net_addr = NULL;
12322 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
12323 if (_ptr_domain) {
12324 NDR_PULL_ALLOC(ndr, r->domain);
12325 } else {
12326 r->domain = NULL;
12329 if (ndr_flags & NDR_BUFFERS) {
12330 if (r->name) {
12331 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
12332 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
12333 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
12334 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
12335 size_name_1 = ndr_get_array_size(ndr, &r->name);
12336 length_name_1 = ndr_get_array_length(ndr, &r->name);
12337 if (length_name_1 > size_name_1) {
12338 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_name_1, length_name_1);
12340 NDR_CHECK(ndr_check_string_terminator(ndr, length_name_1, sizeof(uint16_t)));
12341 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, length_name_1, sizeof(uint16_t), CH_UTF16));
12342 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
12344 if (r->addr) {
12345 _mem_save_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
12346 NDR_PULL_SET_MEM_CTX(ndr, r->addr, 0);
12347 NDR_CHECK(ndr_pull_array_size(ndr, &r->addr));
12348 size_addr_1 = ndr_get_array_size(ndr, &r->addr);
12349 NDR_PULL_ALLOC_N(ndr, r->addr, size_addr_1);
12350 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->addr, size_addr_1));
12351 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_addr_0, 0);
12353 if (r->net_addr) {
12354 _mem_save_net_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
12355 NDR_PULL_SET_MEM_CTX(ndr, r->net_addr, 0);
12356 NDR_CHECK(ndr_pull_array_size(ndr, &r->net_addr));
12357 NDR_CHECK(ndr_pull_array_length(ndr, &r->net_addr));
12358 size_net_addr_1 = ndr_get_array_size(ndr, &r->net_addr);
12359 length_net_addr_1 = ndr_get_array_length(ndr, &r->net_addr);
12360 if (length_net_addr_1 > size_net_addr_1) {
12361 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_net_addr_1, length_net_addr_1);
12363 NDR_CHECK(ndr_check_string_terminator(ndr, length_net_addr_1, sizeof(uint16_t)));
12364 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->net_addr, length_net_addr_1, sizeof(uint16_t), CH_UTF16));
12365 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_net_addr_0, 0);
12367 if (r->domain) {
12368 _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
12369 NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
12370 NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
12371 NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
12372 size_domain_1 = ndr_get_array_size(ndr, &r->domain);
12373 length_domain_1 = ndr_get_array_length(ndr, &r->domain);
12374 if (length_domain_1 > size_domain_1) {
12375 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_domain_1, length_domain_1);
12377 NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_1, sizeof(uint16_t)));
12378 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, length_domain_1, sizeof(uint16_t), CH_UTF16));
12379 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
12381 if (r->addr) {
12382 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->addr, r->addr_len));
12385 return NDR_ERR_SUCCESS;
12388 _PUBLIC_ void ndr_print_srvsvc_NetTransportInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportInfo1 *r)
12390 ndr_print_struct(ndr, name, "srvsvc_NetTransportInfo1");
12391 ndr->depth++;
12392 ndr_print_uint32(ndr, "vcs", r->vcs);
12393 ndr_print_ptr(ndr, "name", r->name);
12394 ndr->depth++;
12395 if (r->name) {
12396 ndr_print_string(ndr, "name", r->name);
12398 ndr->depth--;
12399 ndr_print_ptr(ndr, "addr", r->addr);
12400 ndr->depth++;
12401 if (r->addr) {
12402 ndr_print_array_uint8(ndr, "addr", r->addr, r->addr_len);
12404 ndr->depth--;
12405 ndr_print_uint32(ndr, "addr_len", r->addr_len);
12406 ndr_print_ptr(ndr, "net_addr", r->net_addr);
12407 ndr->depth++;
12408 if (r->net_addr) {
12409 ndr_print_string(ndr, "net_addr", r->net_addr);
12411 ndr->depth--;
12412 ndr_print_ptr(ndr, "domain", r->domain);
12413 ndr->depth++;
12414 if (r->domain) {
12415 ndr_print_string(ndr, "domain", r->domain);
12417 ndr->depth--;
12418 ndr->depth--;
12421 static enum ndr_err_code ndr_push_srvsvc_NetTransportCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportCtr1 *r)
12423 uint32_t cntr_array_1;
12424 if (ndr_flags & NDR_SCALARS) {
12425 NDR_CHECK(ndr_push_align(ndr, 4));
12426 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
12427 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
12429 if (ndr_flags & NDR_BUFFERS) {
12430 if (r->array) {
12431 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
12432 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12433 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
12435 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12436 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
12440 return NDR_ERR_SUCCESS;
12443 static enum ndr_err_code ndr_pull_srvsvc_NetTransportCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportCtr1 *r)
12445 uint32_t _ptr_array;
12446 uint32_t size_array_1 = 0;
12447 uint32_t cntr_array_1;
12448 TALLOC_CTX *_mem_save_array_0;
12449 TALLOC_CTX *_mem_save_array_1;
12450 if (ndr_flags & NDR_SCALARS) {
12451 NDR_CHECK(ndr_pull_align(ndr, 4));
12452 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
12453 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
12454 if (_ptr_array) {
12455 NDR_PULL_ALLOC(ndr, r->array);
12456 } else {
12457 r->array = NULL;
12460 if (ndr_flags & NDR_BUFFERS) {
12461 if (r->array) {
12462 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
12463 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
12464 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
12465 size_array_1 = ndr_get_array_size(ndr, &r->array);
12466 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
12467 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
12468 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
12469 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
12470 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
12472 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
12473 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
12475 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
12476 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
12478 if (r->array) {
12479 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
12482 return NDR_ERR_SUCCESS;
12485 _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportCtr1 *r)
12487 uint32_t cntr_array_1;
12488 ndr_print_struct(ndr, name, "srvsvc_NetTransportCtr1");
12489 ndr->depth++;
12490 ndr_print_uint32(ndr, "count", r->count);
12491 ndr_print_ptr(ndr, "array", r->array);
12492 ndr->depth++;
12493 if (r->array) {
12494 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
12495 ndr->depth++;
12496 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
12497 char *idx_1=NULL;
12498 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
12499 ndr_print_srvsvc_NetTransportInfo1(ndr, "array", &r->array[cntr_array_1]);
12500 free(idx_1);
12503 ndr->depth--;
12505 ndr->depth--;
12506 ndr->depth--;
12509 static enum ndr_err_code ndr_push_srvsvc_NetTransportInfo2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportInfo2 *r)
12511 if (ndr_flags & NDR_SCALARS) {
12512 NDR_CHECK(ndr_push_align(ndr, 4));
12513 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->vcs));
12514 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
12515 NDR_CHECK(ndr_push_unique_ptr(ndr, r->addr));
12516 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->addr_len));
12517 NDR_CHECK(ndr_push_unique_ptr(ndr, r->net_addr));
12518 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
12519 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown));
12521 if (ndr_flags & NDR_BUFFERS) {
12522 if (r->name) {
12523 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
12524 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
12525 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
12526 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12528 if (r->addr) {
12529 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->addr_len));
12530 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->addr, r->addr_len));
12532 if (r->net_addr) {
12533 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
12534 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
12535 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
12536 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->net_addr, ndr_charset_length(r->net_addr, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12538 if (r->domain) {
12539 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
12540 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
12541 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
12542 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12545 return NDR_ERR_SUCCESS;
12548 static enum ndr_err_code ndr_pull_srvsvc_NetTransportInfo2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportInfo2 *r)
12550 uint32_t _ptr_name;
12551 uint32_t size_name_1 = 0;
12552 uint32_t length_name_1 = 0;
12553 TALLOC_CTX *_mem_save_name_0;
12554 uint32_t _ptr_addr;
12555 uint32_t size_addr_1 = 0;
12556 TALLOC_CTX *_mem_save_addr_0;
12557 uint32_t _ptr_net_addr;
12558 uint32_t size_net_addr_1 = 0;
12559 uint32_t length_net_addr_1 = 0;
12560 TALLOC_CTX *_mem_save_net_addr_0;
12561 uint32_t _ptr_domain;
12562 uint32_t size_domain_1 = 0;
12563 uint32_t length_domain_1 = 0;
12564 TALLOC_CTX *_mem_save_domain_0;
12565 if (ndr_flags & NDR_SCALARS) {
12566 NDR_CHECK(ndr_pull_align(ndr, 4));
12567 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->vcs));
12568 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
12569 if (_ptr_name) {
12570 NDR_PULL_ALLOC(ndr, r->name);
12571 } else {
12572 r->name = NULL;
12574 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_addr));
12575 if (_ptr_addr) {
12576 NDR_PULL_ALLOC(ndr, r->addr);
12577 } else {
12578 r->addr = NULL;
12580 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->addr_len));
12581 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_net_addr));
12582 if (_ptr_net_addr) {
12583 NDR_PULL_ALLOC(ndr, r->net_addr);
12584 } else {
12585 r->net_addr = NULL;
12587 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
12588 if (_ptr_domain) {
12589 NDR_PULL_ALLOC(ndr, r->domain);
12590 } else {
12591 r->domain = NULL;
12593 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown));
12595 if (ndr_flags & NDR_BUFFERS) {
12596 if (r->name) {
12597 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
12598 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
12599 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
12600 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
12601 size_name_1 = ndr_get_array_size(ndr, &r->name);
12602 length_name_1 = ndr_get_array_length(ndr, &r->name);
12603 if (length_name_1 > size_name_1) {
12604 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_name_1, length_name_1);
12606 NDR_CHECK(ndr_check_string_terminator(ndr, length_name_1, sizeof(uint16_t)));
12607 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, length_name_1, sizeof(uint16_t), CH_UTF16));
12608 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
12610 if (r->addr) {
12611 _mem_save_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
12612 NDR_PULL_SET_MEM_CTX(ndr, r->addr, 0);
12613 NDR_CHECK(ndr_pull_array_size(ndr, &r->addr));
12614 size_addr_1 = ndr_get_array_size(ndr, &r->addr);
12615 NDR_PULL_ALLOC_N(ndr, r->addr, size_addr_1);
12616 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->addr, size_addr_1));
12617 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_addr_0, 0);
12619 if (r->net_addr) {
12620 _mem_save_net_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
12621 NDR_PULL_SET_MEM_CTX(ndr, r->net_addr, 0);
12622 NDR_CHECK(ndr_pull_array_size(ndr, &r->net_addr));
12623 NDR_CHECK(ndr_pull_array_length(ndr, &r->net_addr));
12624 size_net_addr_1 = ndr_get_array_size(ndr, &r->net_addr);
12625 length_net_addr_1 = ndr_get_array_length(ndr, &r->net_addr);
12626 if (length_net_addr_1 > size_net_addr_1) {
12627 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_net_addr_1, length_net_addr_1);
12629 NDR_CHECK(ndr_check_string_terminator(ndr, length_net_addr_1, sizeof(uint16_t)));
12630 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->net_addr, length_net_addr_1, sizeof(uint16_t), CH_UTF16));
12631 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_net_addr_0, 0);
12633 if (r->domain) {
12634 _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
12635 NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
12636 NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
12637 NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
12638 size_domain_1 = ndr_get_array_size(ndr, &r->domain);
12639 length_domain_1 = ndr_get_array_length(ndr, &r->domain);
12640 if (length_domain_1 > size_domain_1) {
12641 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_domain_1, length_domain_1);
12643 NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_1, sizeof(uint16_t)));
12644 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, length_domain_1, sizeof(uint16_t), CH_UTF16));
12645 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
12647 if (r->addr) {
12648 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->addr, r->addr_len));
12651 return NDR_ERR_SUCCESS;
12654 _PUBLIC_ void ndr_print_srvsvc_NetTransportInfo2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportInfo2 *r)
12656 ndr_print_struct(ndr, name, "srvsvc_NetTransportInfo2");
12657 ndr->depth++;
12658 ndr_print_uint32(ndr, "vcs", r->vcs);
12659 ndr_print_ptr(ndr, "name", r->name);
12660 ndr->depth++;
12661 if (r->name) {
12662 ndr_print_string(ndr, "name", r->name);
12664 ndr->depth--;
12665 ndr_print_ptr(ndr, "addr", r->addr);
12666 ndr->depth++;
12667 if (r->addr) {
12668 ndr_print_array_uint8(ndr, "addr", r->addr, r->addr_len);
12670 ndr->depth--;
12671 ndr_print_uint32(ndr, "addr_len", r->addr_len);
12672 ndr_print_ptr(ndr, "net_addr", r->net_addr);
12673 ndr->depth++;
12674 if (r->net_addr) {
12675 ndr_print_string(ndr, "net_addr", r->net_addr);
12677 ndr->depth--;
12678 ndr_print_ptr(ndr, "domain", r->domain);
12679 ndr->depth++;
12680 if (r->domain) {
12681 ndr_print_string(ndr, "domain", r->domain);
12683 ndr->depth--;
12684 ndr_print_uint32(ndr, "unknown", r->unknown);
12685 ndr->depth--;
12688 static enum ndr_err_code ndr_push_srvsvc_NetTransportCtr2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportCtr2 *r)
12690 uint32_t cntr_array_1;
12691 if (ndr_flags & NDR_SCALARS) {
12692 NDR_CHECK(ndr_push_align(ndr, 4));
12693 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
12694 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
12696 if (ndr_flags & NDR_BUFFERS) {
12697 if (r->array) {
12698 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
12699 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12700 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
12702 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12703 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo2(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
12707 return NDR_ERR_SUCCESS;
12710 static enum ndr_err_code ndr_pull_srvsvc_NetTransportCtr2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportCtr2 *r)
12712 uint32_t _ptr_array;
12713 uint32_t size_array_1 = 0;
12714 uint32_t cntr_array_1;
12715 TALLOC_CTX *_mem_save_array_0;
12716 TALLOC_CTX *_mem_save_array_1;
12717 if (ndr_flags & NDR_SCALARS) {
12718 NDR_CHECK(ndr_pull_align(ndr, 4));
12719 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
12720 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
12721 if (_ptr_array) {
12722 NDR_PULL_ALLOC(ndr, r->array);
12723 } else {
12724 r->array = NULL;
12727 if (ndr_flags & NDR_BUFFERS) {
12728 if (r->array) {
12729 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
12730 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
12731 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
12732 size_array_1 = ndr_get_array_size(ndr, &r->array);
12733 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
12734 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
12735 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
12736 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
12737 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
12739 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
12740 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo2(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
12742 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
12743 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
12745 if (r->array) {
12746 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
12749 return NDR_ERR_SUCCESS;
12752 _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportCtr2 *r)
12754 uint32_t cntr_array_1;
12755 ndr_print_struct(ndr, name, "srvsvc_NetTransportCtr2");
12756 ndr->depth++;
12757 ndr_print_uint32(ndr, "count", r->count);
12758 ndr_print_ptr(ndr, "array", r->array);
12759 ndr->depth++;
12760 if (r->array) {
12761 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
12762 ndr->depth++;
12763 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
12764 char *idx_1=NULL;
12765 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
12766 ndr_print_srvsvc_NetTransportInfo2(ndr, "array", &r->array[cntr_array_1]);
12767 free(idx_1);
12770 ndr->depth--;
12772 ndr->depth--;
12773 ndr->depth--;
12776 static enum ndr_err_code ndr_push_srvsvc_NetTransportInfo3(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportInfo3 *r)
12778 if (ndr_flags & NDR_SCALARS) {
12779 NDR_CHECK(ndr_push_align(ndr, 4));
12780 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->vcs));
12781 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
12782 NDR_CHECK(ndr_push_unique_ptr(ndr, r->addr));
12783 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->addr_len));
12784 NDR_CHECK(ndr_push_unique_ptr(ndr, r->net_addr));
12785 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
12786 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
12787 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2));
12788 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->unknown3, 256));
12790 if (ndr_flags & NDR_BUFFERS) {
12791 if (r->name) {
12792 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
12793 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
12794 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
12795 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12797 if (r->addr) {
12798 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->addr_len));
12799 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->addr, r->addr_len));
12801 if (r->net_addr) {
12802 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
12803 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
12804 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
12805 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->net_addr, ndr_charset_length(r->net_addr, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12807 if (r->domain) {
12808 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
12809 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
12810 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
12811 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12814 return NDR_ERR_SUCCESS;
12817 static enum ndr_err_code ndr_pull_srvsvc_NetTransportInfo3(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportInfo3 *r)
12819 uint32_t _ptr_name;
12820 uint32_t size_name_1 = 0;
12821 uint32_t length_name_1 = 0;
12822 TALLOC_CTX *_mem_save_name_0;
12823 uint32_t _ptr_addr;
12824 uint32_t size_addr_1 = 0;
12825 TALLOC_CTX *_mem_save_addr_0;
12826 uint32_t _ptr_net_addr;
12827 uint32_t size_net_addr_1 = 0;
12828 uint32_t length_net_addr_1 = 0;
12829 TALLOC_CTX *_mem_save_net_addr_0;
12830 uint32_t _ptr_domain;
12831 uint32_t size_domain_1 = 0;
12832 uint32_t length_domain_1 = 0;
12833 TALLOC_CTX *_mem_save_domain_0;
12834 uint32_t size_unknown3_0 = 0;
12835 if (ndr_flags & NDR_SCALARS) {
12836 NDR_CHECK(ndr_pull_align(ndr, 4));
12837 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->vcs));
12838 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
12839 if (_ptr_name) {
12840 NDR_PULL_ALLOC(ndr, r->name);
12841 } else {
12842 r->name = NULL;
12844 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_addr));
12845 if (_ptr_addr) {
12846 NDR_PULL_ALLOC(ndr, r->addr);
12847 } else {
12848 r->addr = NULL;
12850 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->addr_len));
12851 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_net_addr));
12852 if (_ptr_net_addr) {
12853 NDR_PULL_ALLOC(ndr, r->net_addr);
12854 } else {
12855 r->net_addr = NULL;
12857 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
12858 if (_ptr_domain) {
12859 NDR_PULL_ALLOC(ndr, r->domain);
12860 } else {
12861 r->domain = NULL;
12863 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
12864 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
12865 size_unknown3_0 = 256;
12866 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->unknown3, size_unknown3_0));
12868 if (ndr_flags & NDR_BUFFERS) {
12869 if (r->name) {
12870 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
12871 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
12872 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
12873 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
12874 size_name_1 = ndr_get_array_size(ndr, &r->name);
12875 length_name_1 = ndr_get_array_length(ndr, &r->name);
12876 if (length_name_1 > size_name_1) {
12877 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_name_1, length_name_1);
12879 NDR_CHECK(ndr_check_string_terminator(ndr, length_name_1, sizeof(uint16_t)));
12880 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, length_name_1, sizeof(uint16_t), CH_UTF16));
12881 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
12883 if (r->addr) {
12884 _mem_save_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
12885 NDR_PULL_SET_MEM_CTX(ndr, r->addr, 0);
12886 NDR_CHECK(ndr_pull_array_size(ndr, &r->addr));
12887 size_addr_1 = ndr_get_array_size(ndr, &r->addr);
12888 NDR_PULL_ALLOC_N(ndr, r->addr, size_addr_1);
12889 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->addr, size_addr_1));
12890 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_addr_0, 0);
12892 if (r->net_addr) {
12893 _mem_save_net_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
12894 NDR_PULL_SET_MEM_CTX(ndr, r->net_addr, 0);
12895 NDR_CHECK(ndr_pull_array_size(ndr, &r->net_addr));
12896 NDR_CHECK(ndr_pull_array_length(ndr, &r->net_addr));
12897 size_net_addr_1 = ndr_get_array_size(ndr, &r->net_addr);
12898 length_net_addr_1 = ndr_get_array_length(ndr, &r->net_addr);
12899 if (length_net_addr_1 > size_net_addr_1) {
12900 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_net_addr_1, length_net_addr_1);
12902 NDR_CHECK(ndr_check_string_terminator(ndr, length_net_addr_1, sizeof(uint16_t)));
12903 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->net_addr, length_net_addr_1, sizeof(uint16_t), CH_UTF16));
12904 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_net_addr_0, 0);
12906 if (r->domain) {
12907 _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
12908 NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
12909 NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
12910 NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
12911 size_domain_1 = ndr_get_array_size(ndr, &r->domain);
12912 length_domain_1 = ndr_get_array_length(ndr, &r->domain);
12913 if (length_domain_1 > size_domain_1) {
12914 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_domain_1, length_domain_1);
12916 NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_1, sizeof(uint16_t)));
12917 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, length_domain_1, sizeof(uint16_t), CH_UTF16));
12918 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
12920 if (r->addr) {
12921 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->addr, r->addr_len));
12924 return NDR_ERR_SUCCESS;
12927 _PUBLIC_ void ndr_print_srvsvc_NetTransportInfo3(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportInfo3 *r)
12929 ndr_print_struct(ndr, name, "srvsvc_NetTransportInfo3");
12930 ndr->depth++;
12931 ndr_print_uint32(ndr, "vcs", r->vcs);
12932 ndr_print_ptr(ndr, "name", r->name);
12933 ndr->depth++;
12934 if (r->name) {
12935 ndr_print_string(ndr, "name", r->name);
12937 ndr->depth--;
12938 ndr_print_ptr(ndr, "addr", r->addr);
12939 ndr->depth++;
12940 if (r->addr) {
12941 ndr_print_array_uint8(ndr, "addr", r->addr, r->addr_len);
12943 ndr->depth--;
12944 ndr_print_uint32(ndr, "addr_len", r->addr_len);
12945 ndr_print_ptr(ndr, "net_addr", r->net_addr);
12946 ndr->depth++;
12947 if (r->net_addr) {
12948 ndr_print_string(ndr, "net_addr", r->net_addr);
12950 ndr->depth--;
12951 ndr_print_ptr(ndr, "domain", r->domain);
12952 ndr->depth++;
12953 if (r->domain) {
12954 ndr_print_string(ndr, "domain", r->domain);
12956 ndr->depth--;
12957 ndr_print_uint32(ndr, "unknown1", r->unknown1);
12958 ndr_print_uint32(ndr, "unknown2", r->unknown2);
12959 ndr_print_array_uint8(ndr, "unknown3", r->unknown3, 256);
12960 ndr->depth--;
12963 static enum ndr_err_code ndr_push_srvsvc_NetTransportCtr3(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportCtr3 *r)
12965 uint32_t cntr_array_1;
12966 if (ndr_flags & NDR_SCALARS) {
12967 NDR_CHECK(ndr_push_align(ndr, 4));
12968 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
12969 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
12971 if (ndr_flags & NDR_BUFFERS) {
12972 if (r->array) {
12973 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
12974 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12975 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo3(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
12977 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12978 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo3(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
12982 return NDR_ERR_SUCCESS;
12985 static enum ndr_err_code ndr_pull_srvsvc_NetTransportCtr3(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportCtr3 *r)
12987 uint32_t _ptr_array;
12988 uint32_t size_array_1 = 0;
12989 uint32_t cntr_array_1;
12990 TALLOC_CTX *_mem_save_array_0;
12991 TALLOC_CTX *_mem_save_array_1;
12992 if (ndr_flags & NDR_SCALARS) {
12993 NDR_CHECK(ndr_pull_align(ndr, 4));
12994 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
12995 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
12996 if (_ptr_array) {
12997 NDR_PULL_ALLOC(ndr, r->array);
12998 } else {
12999 r->array = NULL;
13002 if (ndr_flags & NDR_BUFFERS) {
13003 if (r->array) {
13004 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
13005 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
13006 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
13007 size_array_1 = ndr_get_array_size(ndr, &r->array);
13008 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
13009 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
13010 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
13011 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
13012 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo3(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
13014 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
13015 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo3(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
13017 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
13018 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
13020 if (r->array) {
13021 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
13024 return NDR_ERR_SUCCESS;
13027 _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr3(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportCtr3 *r)
13029 uint32_t cntr_array_1;
13030 ndr_print_struct(ndr, name, "srvsvc_NetTransportCtr3");
13031 ndr->depth++;
13032 ndr_print_uint32(ndr, "count", r->count);
13033 ndr_print_ptr(ndr, "array", r->array);
13034 ndr->depth++;
13035 if (r->array) {
13036 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
13037 ndr->depth++;
13038 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
13039 char *idx_1=NULL;
13040 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
13041 ndr_print_srvsvc_NetTransportInfo3(ndr, "array", &r->array[cntr_array_1]);
13042 free(idx_1);
13045 ndr->depth--;
13047 ndr->depth--;
13048 ndr->depth--;
13051 static enum ndr_err_code ndr_push_srvsvc_NetTransportCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetTransportCtr *r)
13053 if (ndr_flags & NDR_SCALARS) {
13054 int level = ndr_push_get_switch_value(ndr, r);
13055 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
13056 switch (level) {
13057 case 0: {
13058 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0));
13059 break; }
13061 case 1: {
13062 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
13063 break; }
13065 case 2: {
13066 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr2));
13067 break; }
13069 case 3: {
13070 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr3));
13071 break; }
13073 default: {
13074 break; }
13078 if (ndr_flags & NDR_BUFFERS) {
13079 int level = ndr_push_get_switch_value(ndr, r);
13080 switch (level) {
13081 case 0:
13082 if (r->ctr0) {
13083 NDR_CHECK(ndr_push_srvsvc_NetTransportCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
13085 break;
13087 case 1:
13088 if (r->ctr1) {
13089 NDR_CHECK(ndr_push_srvsvc_NetTransportCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
13091 break;
13093 case 2:
13094 if (r->ctr2) {
13095 NDR_CHECK(ndr_push_srvsvc_NetTransportCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
13097 break;
13099 case 3:
13100 if (r->ctr3) {
13101 NDR_CHECK(ndr_push_srvsvc_NetTransportCtr3(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr3));
13103 break;
13105 default:
13106 break;
13110 return NDR_ERR_SUCCESS;
13113 static enum ndr_err_code ndr_pull_srvsvc_NetTransportCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetTransportCtr *r)
13115 int level;
13116 uint32_t _level;
13117 TALLOC_CTX *_mem_save_ctr0_0;
13118 uint32_t _ptr_ctr0;
13119 TALLOC_CTX *_mem_save_ctr1_0;
13120 uint32_t _ptr_ctr1;
13121 TALLOC_CTX *_mem_save_ctr2_0;
13122 uint32_t _ptr_ctr2;
13123 TALLOC_CTX *_mem_save_ctr3_0;
13124 uint32_t _ptr_ctr3;
13125 level = ndr_pull_get_switch_value(ndr, r);
13126 if (ndr_flags & NDR_SCALARS) {
13127 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
13128 if (_level != level) {
13129 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
13131 switch (level) {
13132 case 0: {
13133 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr0));
13134 if (_ptr_ctr0) {
13135 NDR_PULL_ALLOC(ndr, r->ctr0);
13136 } else {
13137 r->ctr0 = NULL;
13139 break; }
13141 case 1: {
13142 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
13143 if (_ptr_ctr1) {
13144 NDR_PULL_ALLOC(ndr, r->ctr1);
13145 } else {
13146 r->ctr1 = NULL;
13148 break; }
13150 case 2: {
13151 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr2));
13152 if (_ptr_ctr2) {
13153 NDR_PULL_ALLOC(ndr, r->ctr2);
13154 } else {
13155 r->ctr2 = NULL;
13157 break; }
13159 case 3: {
13160 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr3));
13161 if (_ptr_ctr3) {
13162 NDR_PULL_ALLOC(ndr, r->ctr3);
13163 } else {
13164 r->ctr3 = NULL;
13166 break; }
13168 default: {
13169 break; }
13173 if (ndr_flags & NDR_BUFFERS) {
13174 switch (level) {
13175 case 0:
13176 if (r->ctr0) {
13177 _mem_save_ctr0_0 = NDR_PULL_GET_MEM_CTX(ndr);
13178 NDR_PULL_SET_MEM_CTX(ndr, r->ctr0, 0);
13179 NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
13180 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr0_0, 0);
13182 break;
13184 case 1:
13185 if (r->ctr1) {
13186 _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
13187 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
13188 NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
13189 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
13191 break;
13193 case 2:
13194 if (r->ctr2) {
13195 _mem_save_ctr2_0 = NDR_PULL_GET_MEM_CTX(ndr);
13196 NDR_PULL_SET_MEM_CTX(ndr, r->ctr2, 0);
13197 NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
13198 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr2_0, 0);
13200 break;
13202 case 3:
13203 if (r->ctr3) {
13204 _mem_save_ctr3_0 = NDR_PULL_GET_MEM_CTX(ndr);
13205 NDR_PULL_SET_MEM_CTX(ndr, r->ctr3, 0);
13206 NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr3(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr3));
13207 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr3_0, 0);
13209 break;
13211 default:
13212 break;
13216 return NDR_ERR_SUCCESS;
13219 _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetTransportCtr *r)
13221 int level;
13222 level = ndr_print_get_switch_value(ndr, r);
13223 ndr_print_union(ndr, name, level, "srvsvc_NetTransportCtr");
13224 switch (level) {
13225 case 0:
13226 ndr_print_ptr(ndr, "ctr0", r->ctr0);
13227 ndr->depth++;
13228 if (r->ctr0) {
13229 ndr_print_srvsvc_NetTransportCtr0(ndr, "ctr0", r->ctr0);
13231 ndr->depth--;
13232 break;
13234 case 1:
13235 ndr_print_ptr(ndr, "ctr1", r->ctr1);
13236 ndr->depth++;
13237 if (r->ctr1) {
13238 ndr_print_srvsvc_NetTransportCtr1(ndr, "ctr1", r->ctr1);
13240 ndr->depth--;
13241 break;
13243 case 2:
13244 ndr_print_ptr(ndr, "ctr2", r->ctr2);
13245 ndr->depth++;
13246 if (r->ctr2) {
13247 ndr_print_srvsvc_NetTransportCtr2(ndr, "ctr2", r->ctr2);
13249 ndr->depth--;
13250 break;
13252 case 3:
13253 ndr_print_ptr(ndr, "ctr3", r->ctr3);
13254 ndr->depth++;
13255 if (r->ctr3) {
13256 ndr_print_srvsvc_NetTransportCtr3(ndr, "ctr3", r->ctr3);
13258 ndr->depth--;
13259 break;
13261 default:
13262 break;
13267 static enum ndr_err_code ndr_push_srvsvc_NetTransportInfoCtr(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportInfoCtr *r)
13269 if (ndr_flags & NDR_SCALARS) {
13270 NDR_CHECK(ndr_push_align(ndr, 4));
13271 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
13272 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level));
13273 NDR_CHECK(ndr_push_srvsvc_NetTransportCtr(ndr, NDR_SCALARS, &r->ctr));
13275 if (ndr_flags & NDR_BUFFERS) {
13276 NDR_CHECK(ndr_push_srvsvc_NetTransportCtr(ndr, NDR_BUFFERS, &r->ctr));
13278 return NDR_ERR_SUCCESS;
13281 static enum ndr_err_code ndr_pull_srvsvc_NetTransportInfoCtr(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportInfoCtr *r)
13283 if (ndr_flags & NDR_SCALARS) {
13284 NDR_CHECK(ndr_pull_align(ndr, 4));
13285 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
13286 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level));
13287 NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr(ndr, NDR_SCALARS, &r->ctr));
13289 if (ndr_flags & NDR_BUFFERS) {
13290 NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr(ndr, NDR_BUFFERS, &r->ctr));
13292 return NDR_ERR_SUCCESS;
13295 _PUBLIC_ void ndr_print_srvsvc_NetTransportInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportInfoCtr *r)
13297 ndr_print_struct(ndr, name, "srvsvc_NetTransportInfoCtr");
13298 ndr->depth++;
13299 ndr_print_uint32(ndr, "level", r->level);
13300 ndr_print_set_switch_value(ndr, &r->ctr, r->level);
13301 ndr_print_srvsvc_NetTransportCtr(ndr, "ctr", &r->ctr);
13302 ndr->depth--;
13305 static enum ndr_err_code ndr_push_srvsvc_NetRemoteTODInfo(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetRemoteTODInfo *r)
13307 if (ndr_flags & NDR_SCALARS) {
13308 NDR_CHECK(ndr_push_align(ndr, 4));
13309 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->elapsed));
13310 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->msecs));
13311 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->hours));
13312 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->mins));
13313 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->secs));
13314 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->hunds));
13315 NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, r->timezone));
13316 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->tinterval));
13317 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->day));
13318 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->month));
13319 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->year));
13320 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->weekday));
13322 if (ndr_flags & NDR_BUFFERS) {
13324 return NDR_ERR_SUCCESS;
13327 static enum ndr_err_code ndr_pull_srvsvc_NetRemoteTODInfo(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetRemoteTODInfo *r)
13329 if (ndr_flags & NDR_SCALARS) {
13330 NDR_CHECK(ndr_pull_align(ndr, 4));
13331 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->elapsed));
13332 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->msecs));
13333 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->hours));
13334 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->mins));
13335 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->secs));
13336 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->hunds));
13337 NDR_CHECK(ndr_pull_int32(ndr, NDR_SCALARS, &r->timezone));
13338 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->tinterval));
13339 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->day));
13340 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->month));
13341 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->year));
13342 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->weekday));
13344 if (ndr_flags & NDR_BUFFERS) {
13346 return NDR_ERR_SUCCESS;
13349 _PUBLIC_ void ndr_print_srvsvc_NetRemoteTODInfo(struct ndr_print *ndr, const char *name, const struct srvsvc_NetRemoteTODInfo *r)
13351 ndr_print_struct(ndr, name, "srvsvc_NetRemoteTODInfo");
13352 ndr->depth++;
13353 ndr_print_uint32(ndr, "elapsed", r->elapsed);
13354 ndr_print_uint32(ndr, "msecs", r->msecs);
13355 ndr_print_uint32(ndr, "hours", r->hours);
13356 ndr_print_uint32(ndr, "mins", r->mins);
13357 ndr_print_uint32(ndr, "secs", r->secs);
13358 ndr_print_uint32(ndr, "hunds", r->hunds);
13359 ndr_print_int32(ndr, "timezone", r->timezone);
13360 ndr_print_uint32(ndr, "tinterval", r->tinterval);
13361 ndr_print_uint32(ndr, "day", r->day);
13362 ndr_print_uint32(ndr, "month", r->month);
13363 ndr_print_uint32(ndr, "year", r->year);
13364 ndr_print_uint32(ndr, "weekday", r->weekday);
13365 ndr->depth--;
13368 static enum ndr_err_code ndr_push_srvsvc_NetTransportInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetTransportInfo *r)
13370 if (ndr_flags & NDR_SCALARS) {
13371 int level = ndr_push_get_switch_value(ndr, r);
13372 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
13373 switch (level) {
13374 case 0: {
13375 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo0(ndr, NDR_SCALARS, &r->info0));
13376 break; }
13378 case 1: {
13379 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo1(ndr, NDR_SCALARS, &r->info1));
13380 break; }
13382 case 2: {
13383 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo2(ndr, NDR_SCALARS, &r->info2));
13384 break; }
13386 case 3: {
13387 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo3(ndr, NDR_SCALARS, &r->info3));
13388 break; }
13390 default:
13391 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
13394 if (ndr_flags & NDR_BUFFERS) {
13395 int level = ndr_push_get_switch_value(ndr, r);
13396 switch (level) {
13397 case 0:
13398 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo0(ndr, NDR_BUFFERS, &r->info0));
13399 break;
13401 case 1:
13402 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo1(ndr, NDR_BUFFERS, &r->info1));
13403 break;
13405 case 2:
13406 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo2(ndr, NDR_BUFFERS, &r->info2));
13407 break;
13409 case 3:
13410 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo3(ndr, NDR_BUFFERS, &r->info3));
13411 break;
13413 default:
13414 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
13417 return NDR_ERR_SUCCESS;
13420 static enum ndr_err_code ndr_pull_srvsvc_NetTransportInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetTransportInfo *r)
13422 int level;
13423 uint32_t _level;
13424 level = ndr_pull_get_switch_value(ndr, r);
13425 if (ndr_flags & NDR_SCALARS) {
13426 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
13427 if (_level != level) {
13428 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
13430 switch (level) {
13431 case 0: {
13432 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo0(ndr, NDR_SCALARS, &r->info0));
13433 break; }
13435 case 1: {
13436 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo1(ndr, NDR_SCALARS, &r->info1));
13437 break; }
13439 case 2: {
13440 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo2(ndr, NDR_SCALARS, &r->info2));
13441 break; }
13443 case 3: {
13444 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo3(ndr, NDR_SCALARS, &r->info3));
13445 break; }
13447 default:
13448 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
13451 if (ndr_flags & NDR_BUFFERS) {
13452 switch (level) {
13453 case 0:
13454 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo0(ndr, NDR_BUFFERS, &r->info0));
13455 break;
13457 case 1:
13458 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo1(ndr, NDR_BUFFERS, &r->info1));
13459 break;
13461 case 2:
13462 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo2(ndr, NDR_BUFFERS, &r->info2));
13463 break;
13465 case 3:
13466 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo3(ndr, NDR_BUFFERS, &r->info3));
13467 break;
13469 default:
13470 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
13473 return NDR_ERR_SUCCESS;
13476 _PUBLIC_ void ndr_print_srvsvc_NetTransportInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetTransportInfo *r)
13478 int level;
13479 level = ndr_print_get_switch_value(ndr, r);
13480 ndr_print_union(ndr, name, level, "srvsvc_NetTransportInfo");
13481 switch (level) {
13482 case 0:
13483 ndr_print_srvsvc_NetTransportInfo0(ndr, "info0", &r->info0);
13484 break;
13486 case 1:
13487 ndr_print_srvsvc_NetTransportInfo1(ndr, "info1", &r->info1);
13488 break;
13490 case 2:
13491 ndr_print_srvsvc_NetTransportInfo2(ndr, "info2", &r->info2);
13492 break;
13494 case 3:
13495 ndr_print_srvsvc_NetTransportInfo3(ndr, "info3", &r->info3);
13496 break;
13498 default:
13499 ndr_print_bad_level(ndr, name, level);
13503 static enum ndr_err_code ndr_push_srvsvc_NetCharDevEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevEnum *r)
13505 if (flags & NDR_IN) {
13506 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
13507 if (r->in.server_unc) {
13508 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13509 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
13510 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13511 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
13513 if (r->in.info_ctr == NULL) {
13514 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13516 NDR_CHECK(ndr_push_srvsvc_NetCharDevInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
13517 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
13518 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
13519 if (r->in.resume_handle) {
13520 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
13523 if (flags & NDR_OUT) {
13524 if (r->out.info_ctr == NULL) {
13525 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13527 NDR_CHECK(ndr_push_srvsvc_NetCharDevInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
13528 if (r->out.totalentries == NULL) {
13529 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13531 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
13532 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
13533 if (r->out.resume_handle) {
13534 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
13536 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
13538 return NDR_ERR_SUCCESS;
13541 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevEnum *r)
13543 uint32_t _ptr_server_unc;
13544 uint32_t size_server_unc_1 = 0;
13545 uint32_t length_server_unc_1 = 0;
13546 uint32_t _ptr_resume_handle;
13547 TALLOC_CTX *_mem_save_server_unc_0;
13548 TALLOC_CTX *_mem_save_info_ctr_0;
13549 TALLOC_CTX *_mem_save_totalentries_0;
13550 TALLOC_CTX *_mem_save_resume_handle_0;
13551 if (flags & NDR_IN) {
13552 ZERO_STRUCT(r->out);
13554 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
13555 if (_ptr_server_unc) {
13556 NDR_PULL_ALLOC(ndr, r->in.server_unc);
13557 } else {
13558 r->in.server_unc = NULL;
13560 if (r->in.server_unc) {
13561 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
13562 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
13563 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
13564 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
13565 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
13566 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
13567 if (length_server_unc_1 > size_server_unc_1) {
13568 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
13570 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
13571 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
13572 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
13574 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13575 NDR_PULL_ALLOC(ndr, r->in.info_ctr);
13577 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
13578 NDR_PULL_SET_MEM_CTX(ndr, r->in.info_ctr, LIBNDR_FLAG_REF_ALLOC);
13579 NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
13580 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
13581 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
13582 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
13583 if (_ptr_resume_handle) {
13584 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
13585 } else {
13586 r->in.resume_handle = NULL;
13588 if (r->in.resume_handle) {
13589 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
13590 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
13591 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
13592 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
13594 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
13595 *r->out.info_ctr = *r->in.info_ctr;
13596 NDR_PULL_ALLOC(ndr, r->out.totalentries);
13597 ZERO_STRUCTP(r->out.totalentries);
13599 if (flags & NDR_OUT) {
13600 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13601 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
13603 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
13604 NDR_PULL_SET_MEM_CTX(ndr, r->out.info_ctr, LIBNDR_FLAG_REF_ALLOC);
13605 NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
13606 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
13607 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13608 NDR_PULL_ALLOC(ndr, r->out.totalentries);
13610 _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
13611 NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
13612 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
13613 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
13614 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
13615 if (_ptr_resume_handle) {
13616 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
13617 } else {
13618 r->out.resume_handle = NULL;
13620 if (r->out.resume_handle) {
13621 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
13622 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
13623 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
13624 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
13626 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
13628 return NDR_ERR_SUCCESS;
13631 _PUBLIC_ void ndr_print_srvsvc_NetCharDevEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevEnum *r)
13633 ndr_print_struct(ndr, name, "srvsvc_NetCharDevEnum");
13634 ndr->depth++;
13635 if (flags & NDR_SET_VALUES) {
13636 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
13638 if (flags & NDR_IN) {
13639 ndr_print_struct(ndr, "in", "srvsvc_NetCharDevEnum");
13640 ndr->depth++;
13641 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
13642 ndr->depth++;
13643 if (r->in.server_unc) {
13644 ndr_print_string(ndr, "server_unc", r->in.server_unc);
13646 ndr->depth--;
13647 ndr_print_ptr(ndr, "info_ctr", r->in.info_ctr);
13648 ndr->depth++;
13649 ndr_print_srvsvc_NetCharDevInfoCtr(ndr, "info_ctr", r->in.info_ctr);
13650 ndr->depth--;
13651 ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
13652 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
13653 ndr->depth++;
13654 if (r->in.resume_handle) {
13655 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
13657 ndr->depth--;
13658 ndr->depth--;
13660 if (flags & NDR_OUT) {
13661 ndr_print_struct(ndr, "out", "srvsvc_NetCharDevEnum");
13662 ndr->depth++;
13663 ndr_print_ptr(ndr, "info_ctr", r->out.info_ctr);
13664 ndr->depth++;
13665 ndr_print_srvsvc_NetCharDevInfoCtr(ndr, "info_ctr", r->out.info_ctr);
13666 ndr->depth--;
13667 ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
13668 ndr->depth++;
13669 ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
13670 ndr->depth--;
13671 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
13672 ndr->depth++;
13673 if (r->out.resume_handle) {
13674 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
13676 ndr->depth--;
13677 ndr_print_WERROR(ndr, "result", r->out.result);
13678 ndr->depth--;
13680 ndr->depth--;
13683 static enum ndr_err_code ndr_push_srvsvc_NetCharDevGetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevGetInfo *r)
13685 if (flags & NDR_IN) {
13686 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
13687 if (r->in.server_unc) {
13688 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13689 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
13690 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13691 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
13693 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.device_name, CH_UTF16)));
13694 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
13695 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.device_name, CH_UTF16)));
13696 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.device_name, ndr_charset_length(r->in.device_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
13697 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
13699 if (flags & NDR_OUT) {
13700 if (r->out.info == NULL) {
13701 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13703 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
13704 NDR_CHECK(ndr_push_srvsvc_NetCharDevInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
13705 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
13707 return NDR_ERR_SUCCESS;
13710 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevGetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevGetInfo *r)
13712 uint32_t _ptr_server_unc;
13713 uint32_t size_server_unc_1 = 0;
13714 uint32_t length_server_unc_1 = 0;
13715 uint32_t size_device_name_0 = 0;
13716 uint32_t length_device_name_0 = 0;
13717 TALLOC_CTX *_mem_save_server_unc_0;
13718 TALLOC_CTX *_mem_save_info_0;
13719 if (flags & NDR_IN) {
13720 ZERO_STRUCT(r->out);
13722 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
13723 if (_ptr_server_unc) {
13724 NDR_PULL_ALLOC(ndr, r->in.server_unc);
13725 } else {
13726 r->in.server_unc = NULL;
13728 if (r->in.server_unc) {
13729 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
13730 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
13731 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
13732 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
13733 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
13734 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
13735 if (length_server_unc_1 > size_server_unc_1) {
13736 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
13738 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
13739 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
13740 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
13742 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.device_name));
13743 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.device_name));
13744 size_device_name_0 = ndr_get_array_size(ndr, &r->in.device_name);
13745 length_device_name_0 = ndr_get_array_length(ndr, &r->in.device_name);
13746 if (length_device_name_0 > size_device_name_0) {
13747 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_device_name_0, length_device_name_0);
13749 NDR_CHECK(ndr_check_string_terminator(ndr, length_device_name_0, sizeof(uint16_t)));
13750 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.device_name, length_device_name_0, sizeof(uint16_t), CH_UTF16));
13751 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
13752 NDR_PULL_ALLOC(ndr, r->out.info);
13753 ZERO_STRUCTP(r->out.info);
13755 if (flags & NDR_OUT) {
13756 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13757 NDR_PULL_ALLOC(ndr, r->out.info);
13759 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
13760 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
13761 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
13762 NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
13763 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
13764 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
13766 return NDR_ERR_SUCCESS;
13769 _PUBLIC_ void ndr_print_srvsvc_NetCharDevGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevGetInfo *r)
13771 ndr_print_struct(ndr, name, "srvsvc_NetCharDevGetInfo");
13772 ndr->depth++;
13773 if (flags & NDR_SET_VALUES) {
13774 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
13776 if (flags & NDR_IN) {
13777 ndr_print_struct(ndr, "in", "srvsvc_NetCharDevGetInfo");
13778 ndr->depth++;
13779 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
13780 ndr->depth++;
13781 if (r->in.server_unc) {
13782 ndr_print_string(ndr, "server_unc", r->in.server_unc);
13784 ndr->depth--;
13785 ndr_print_string(ndr, "device_name", r->in.device_name);
13786 ndr_print_uint32(ndr, "level", r->in.level);
13787 ndr->depth--;
13789 if (flags & NDR_OUT) {
13790 ndr_print_struct(ndr, "out", "srvsvc_NetCharDevGetInfo");
13791 ndr->depth++;
13792 ndr_print_ptr(ndr, "info", r->out.info);
13793 ndr->depth++;
13794 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
13795 ndr_print_srvsvc_NetCharDevInfo(ndr, "info", r->out.info);
13796 ndr->depth--;
13797 ndr_print_WERROR(ndr, "result", r->out.result);
13798 ndr->depth--;
13800 ndr->depth--;
13803 static enum ndr_err_code ndr_push_srvsvc_NetCharDevControl(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevControl *r)
13805 if (flags & NDR_IN) {
13806 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
13807 if (r->in.server_unc) {
13808 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13809 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
13810 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13811 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
13813 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.device_name, CH_UTF16)));
13814 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
13815 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.device_name, CH_UTF16)));
13816 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.device_name, ndr_charset_length(r->in.device_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
13817 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.opcode));
13819 if (flags & NDR_OUT) {
13820 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
13822 return NDR_ERR_SUCCESS;
13825 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevControl(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevControl *r)
13827 uint32_t _ptr_server_unc;
13828 uint32_t size_server_unc_1 = 0;
13829 uint32_t length_server_unc_1 = 0;
13830 uint32_t size_device_name_0 = 0;
13831 uint32_t length_device_name_0 = 0;
13832 TALLOC_CTX *_mem_save_server_unc_0;
13833 if (flags & NDR_IN) {
13834 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
13835 if (_ptr_server_unc) {
13836 NDR_PULL_ALLOC(ndr, r->in.server_unc);
13837 } else {
13838 r->in.server_unc = NULL;
13840 if (r->in.server_unc) {
13841 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
13842 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
13843 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
13844 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
13845 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
13846 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
13847 if (length_server_unc_1 > size_server_unc_1) {
13848 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
13850 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
13851 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
13852 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
13854 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.device_name));
13855 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.device_name));
13856 size_device_name_0 = ndr_get_array_size(ndr, &r->in.device_name);
13857 length_device_name_0 = ndr_get_array_length(ndr, &r->in.device_name);
13858 if (length_device_name_0 > size_device_name_0) {
13859 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_device_name_0, length_device_name_0);
13861 NDR_CHECK(ndr_check_string_terminator(ndr, length_device_name_0, sizeof(uint16_t)));
13862 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.device_name, length_device_name_0, sizeof(uint16_t), CH_UTF16));
13863 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.opcode));
13865 if (flags & NDR_OUT) {
13866 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
13868 return NDR_ERR_SUCCESS;
13871 _PUBLIC_ void ndr_print_srvsvc_NetCharDevControl(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevControl *r)
13873 ndr_print_struct(ndr, name, "srvsvc_NetCharDevControl");
13874 ndr->depth++;
13875 if (flags & NDR_SET_VALUES) {
13876 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
13878 if (flags & NDR_IN) {
13879 ndr_print_struct(ndr, "in", "srvsvc_NetCharDevControl");
13880 ndr->depth++;
13881 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
13882 ndr->depth++;
13883 if (r->in.server_unc) {
13884 ndr_print_string(ndr, "server_unc", r->in.server_unc);
13886 ndr->depth--;
13887 ndr_print_string(ndr, "device_name", r->in.device_name);
13888 ndr_print_uint32(ndr, "opcode", r->in.opcode);
13889 ndr->depth--;
13891 if (flags & NDR_OUT) {
13892 ndr_print_struct(ndr, "out", "srvsvc_NetCharDevControl");
13893 ndr->depth++;
13894 ndr_print_WERROR(ndr, "result", r->out.result);
13895 ndr->depth--;
13897 ndr->depth--;
13900 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevQEnum *r)
13902 if (flags & NDR_IN) {
13903 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
13904 if (r->in.server_unc) {
13905 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13906 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
13907 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13908 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
13910 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.user));
13911 if (r->in.user) {
13912 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
13913 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
13914 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
13915 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.user, ndr_charset_length(r->in.user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
13917 if (r->in.info_ctr == NULL) {
13918 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13920 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
13921 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
13922 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
13923 if (r->in.resume_handle) {
13924 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
13927 if (flags & NDR_OUT) {
13928 if (r->out.info_ctr == NULL) {
13929 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13931 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
13932 if (r->out.totalentries == NULL) {
13933 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13935 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
13936 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
13937 if (r->out.resume_handle) {
13938 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
13940 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
13942 return NDR_ERR_SUCCESS;
13945 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevQEnum *r)
13947 uint32_t _ptr_server_unc;
13948 uint32_t size_server_unc_1 = 0;
13949 uint32_t length_server_unc_1 = 0;
13950 uint32_t _ptr_user;
13951 uint32_t size_user_1 = 0;
13952 uint32_t length_user_1 = 0;
13953 uint32_t _ptr_resume_handle;
13954 TALLOC_CTX *_mem_save_server_unc_0;
13955 TALLOC_CTX *_mem_save_user_0;
13956 TALLOC_CTX *_mem_save_info_ctr_0;
13957 TALLOC_CTX *_mem_save_totalentries_0;
13958 TALLOC_CTX *_mem_save_resume_handle_0;
13959 if (flags & NDR_IN) {
13960 ZERO_STRUCT(r->out);
13962 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
13963 if (_ptr_server_unc) {
13964 NDR_PULL_ALLOC(ndr, r->in.server_unc);
13965 } else {
13966 r->in.server_unc = NULL;
13968 if (r->in.server_unc) {
13969 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
13970 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
13971 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
13972 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
13973 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
13974 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
13975 if (length_server_unc_1 > size_server_unc_1) {
13976 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
13978 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
13979 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
13980 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
13982 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
13983 if (_ptr_user) {
13984 NDR_PULL_ALLOC(ndr, r->in.user);
13985 } else {
13986 r->in.user = NULL;
13988 if (r->in.user) {
13989 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
13990 NDR_PULL_SET_MEM_CTX(ndr, r->in.user, 0);
13991 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.user));
13992 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.user));
13993 size_user_1 = ndr_get_array_size(ndr, &r->in.user);
13994 length_user_1 = ndr_get_array_length(ndr, &r->in.user);
13995 if (length_user_1 > size_user_1) {
13996 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_user_1, length_user_1);
13998 NDR_CHECK(ndr_check_string_terminator(ndr, length_user_1, sizeof(uint16_t)));
13999 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.user, length_user_1, sizeof(uint16_t), CH_UTF16));
14000 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
14002 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14003 NDR_PULL_ALLOC(ndr, r->in.info_ctr);
14005 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
14006 NDR_PULL_SET_MEM_CTX(ndr, r->in.info_ctr, LIBNDR_FLAG_REF_ALLOC);
14007 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
14008 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
14009 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
14010 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
14011 if (_ptr_resume_handle) {
14012 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
14013 } else {
14014 r->in.resume_handle = NULL;
14016 if (r->in.resume_handle) {
14017 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
14018 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
14019 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
14020 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
14022 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
14023 *r->out.info_ctr = *r->in.info_ctr;
14024 NDR_PULL_ALLOC(ndr, r->out.totalentries);
14025 ZERO_STRUCTP(r->out.totalentries);
14027 if (flags & NDR_OUT) {
14028 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14029 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
14031 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
14032 NDR_PULL_SET_MEM_CTX(ndr, r->out.info_ctr, LIBNDR_FLAG_REF_ALLOC);
14033 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
14034 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
14035 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14036 NDR_PULL_ALLOC(ndr, r->out.totalentries);
14038 _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
14039 NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
14040 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
14041 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
14042 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
14043 if (_ptr_resume_handle) {
14044 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
14045 } else {
14046 r->out.resume_handle = NULL;
14048 if (r->out.resume_handle) {
14049 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
14050 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
14051 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
14052 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
14054 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
14056 return NDR_ERR_SUCCESS;
14059 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQEnum *r)
14061 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQEnum");
14062 ndr->depth++;
14063 if (flags & NDR_SET_VALUES) {
14064 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14066 if (flags & NDR_IN) {
14067 ndr_print_struct(ndr, "in", "srvsvc_NetCharDevQEnum");
14068 ndr->depth++;
14069 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
14070 ndr->depth++;
14071 if (r->in.server_unc) {
14072 ndr_print_string(ndr, "server_unc", r->in.server_unc);
14074 ndr->depth--;
14075 ndr_print_ptr(ndr, "user", r->in.user);
14076 ndr->depth++;
14077 if (r->in.user) {
14078 ndr_print_string(ndr, "user", r->in.user);
14080 ndr->depth--;
14081 ndr_print_ptr(ndr, "info_ctr", r->in.info_ctr);
14082 ndr->depth++;
14083 ndr_print_srvsvc_NetCharDevQInfoCtr(ndr, "info_ctr", r->in.info_ctr);
14084 ndr->depth--;
14085 ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
14086 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
14087 ndr->depth++;
14088 if (r->in.resume_handle) {
14089 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
14091 ndr->depth--;
14092 ndr->depth--;
14094 if (flags & NDR_OUT) {
14095 ndr_print_struct(ndr, "out", "srvsvc_NetCharDevQEnum");
14096 ndr->depth++;
14097 ndr_print_ptr(ndr, "info_ctr", r->out.info_ctr);
14098 ndr->depth++;
14099 ndr_print_srvsvc_NetCharDevQInfoCtr(ndr, "info_ctr", r->out.info_ctr);
14100 ndr->depth--;
14101 ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
14102 ndr->depth++;
14103 ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
14104 ndr->depth--;
14105 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
14106 ndr->depth++;
14107 if (r->out.resume_handle) {
14108 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
14110 ndr->depth--;
14111 ndr_print_WERROR(ndr, "result", r->out.result);
14112 ndr->depth--;
14114 ndr->depth--;
14117 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQGetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevQGetInfo *r)
14119 if (flags & NDR_IN) {
14120 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
14121 if (r->in.server_unc) {
14122 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14123 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
14124 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14125 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
14127 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
14128 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
14129 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
14130 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.queue_name, ndr_charset_length(r->in.queue_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
14131 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
14132 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
14133 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
14134 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.user, ndr_charset_length(r->in.user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
14135 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
14137 if (flags & NDR_OUT) {
14138 if (r->out.info == NULL) {
14139 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14141 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
14142 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
14143 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
14145 return NDR_ERR_SUCCESS;
14148 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQGetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevQGetInfo *r)
14150 uint32_t _ptr_server_unc;
14151 uint32_t size_server_unc_1 = 0;
14152 uint32_t length_server_unc_1 = 0;
14153 uint32_t size_queue_name_0 = 0;
14154 uint32_t length_queue_name_0 = 0;
14155 uint32_t size_user_0 = 0;
14156 uint32_t length_user_0 = 0;
14157 TALLOC_CTX *_mem_save_server_unc_0;
14158 TALLOC_CTX *_mem_save_info_0;
14159 if (flags & NDR_IN) {
14160 ZERO_STRUCT(r->out);
14162 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
14163 if (_ptr_server_unc) {
14164 NDR_PULL_ALLOC(ndr, r->in.server_unc);
14165 } else {
14166 r->in.server_unc = NULL;
14168 if (r->in.server_unc) {
14169 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
14170 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
14171 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
14172 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
14173 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
14174 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
14175 if (length_server_unc_1 > size_server_unc_1) {
14176 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
14178 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
14179 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
14180 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
14182 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.queue_name));
14183 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.queue_name));
14184 size_queue_name_0 = ndr_get_array_size(ndr, &r->in.queue_name);
14185 length_queue_name_0 = ndr_get_array_length(ndr, &r->in.queue_name);
14186 if (length_queue_name_0 > size_queue_name_0) {
14187 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_queue_name_0, length_queue_name_0);
14189 NDR_CHECK(ndr_check_string_terminator(ndr, length_queue_name_0, sizeof(uint16_t)));
14190 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.queue_name, length_queue_name_0, sizeof(uint16_t), CH_UTF16));
14191 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.user));
14192 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.user));
14193 size_user_0 = ndr_get_array_size(ndr, &r->in.user);
14194 length_user_0 = ndr_get_array_length(ndr, &r->in.user);
14195 if (length_user_0 > size_user_0) {
14196 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_user_0, length_user_0);
14198 NDR_CHECK(ndr_check_string_terminator(ndr, length_user_0, sizeof(uint16_t)));
14199 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.user, length_user_0, sizeof(uint16_t), CH_UTF16));
14200 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
14201 NDR_PULL_ALLOC(ndr, r->out.info);
14202 ZERO_STRUCTP(r->out.info);
14204 if (flags & NDR_OUT) {
14205 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14206 NDR_PULL_ALLOC(ndr, r->out.info);
14208 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
14209 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
14210 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
14211 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
14212 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
14213 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
14215 return NDR_ERR_SUCCESS;
14218 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQGetInfo *r)
14220 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQGetInfo");
14221 ndr->depth++;
14222 if (flags & NDR_SET_VALUES) {
14223 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14225 if (flags & NDR_IN) {
14226 ndr_print_struct(ndr, "in", "srvsvc_NetCharDevQGetInfo");
14227 ndr->depth++;
14228 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
14229 ndr->depth++;
14230 if (r->in.server_unc) {
14231 ndr_print_string(ndr, "server_unc", r->in.server_unc);
14233 ndr->depth--;
14234 ndr_print_string(ndr, "queue_name", r->in.queue_name);
14235 ndr_print_string(ndr, "user", r->in.user);
14236 ndr_print_uint32(ndr, "level", r->in.level);
14237 ndr->depth--;
14239 if (flags & NDR_OUT) {
14240 ndr_print_struct(ndr, "out", "srvsvc_NetCharDevQGetInfo");
14241 ndr->depth++;
14242 ndr_print_ptr(ndr, "info", r->out.info);
14243 ndr->depth++;
14244 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
14245 ndr_print_srvsvc_NetCharDevQInfo(ndr, "info", r->out.info);
14246 ndr->depth--;
14247 ndr_print_WERROR(ndr, "result", r->out.result);
14248 ndr->depth--;
14250 ndr->depth--;
14253 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQSetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevQSetInfo *r)
14255 if (flags & NDR_IN) {
14256 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
14257 if (r->in.server_unc) {
14258 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14259 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
14260 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14261 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
14263 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
14264 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
14265 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
14266 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.queue_name, ndr_charset_length(r->in.queue_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
14267 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
14268 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.info, r->in.level));
14269 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
14270 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.parm_error));
14271 if (r->in.parm_error) {
14272 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.parm_error));
14275 if (flags & NDR_OUT) {
14276 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.parm_error));
14277 if (r->out.parm_error) {
14278 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.parm_error));
14280 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
14282 return NDR_ERR_SUCCESS;
14285 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQSetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevQSetInfo *r)
14287 uint32_t _ptr_server_unc;
14288 uint32_t size_server_unc_1 = 0;
14289 uint32_t length_server_unc_1 = 0;
14290 uint32_t size_queue_name_0 = 0;
14291 uint32_t length_queue_name_0 = 0;
14292 uint32_t _ptr_parm_error;
14293 TALLOC_CTX *_mem_save_server_unc_0;
14294 TALLOC_CTX *_mem_save_parm_error_0;
14295 if (flags & NDR_IN) {
14296 ZERO_STRUCT(r->out);
14298 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
14299 if (_ptr_server_unc) {
14300 NDR_PULL_ALLOC(ndr, r->in.server_unc);
14301 } else {
14302 r->in.server_unc = NULL;
14304 if (r->in.server_unc) {
14305 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
14306 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
14307 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
14308 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
14309 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
14310 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
14311 if (length_server_unc_1 > size_server_unc_1) {
14312 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
14314 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
14315 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
14316 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
14318 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.queue_name));
14319 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.queue_name));
14320 size_queue_name_0 = ndr_get_array_size(ndr, &r->in.queue_name);
14321 length_queue_name_0 = ndr_get_array_length(ndr, &r->in.queue_name);
14322 if (length_queue_name_0 > size_queue_name_0) {
14323 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_queue_name_0, length_queue_name_0);
14325 NDR_CHECK(ndr_check_string_terminator(ndr, length_queue_name_0, sizeof(uint16_t)));
14326 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.queue_name, length_queue_name_0, sizeof(uint16_t), CH_UTF16));
14327 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
14328 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.info, r->in.level));
14329 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
14330 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
14331 if (_ptr_parm_error) {
14332 NDR_PULL_ALLOC(ndr, r->in.parm_error);
14333 } else {
14334 r->in.parm_error = NULL;
14336 if (r->in.parm_error) {
14337 _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
14338 NDR_PULL_SET_MEM_CTX(ndr, r->in.parm_error, 0);
14339 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.parm_error));
14340 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
14343 if (flags & NDR_OUT) {
14344 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
14345 if (_ptr_parm_error) {
14346 NDR_PULL_ALLOC(ndr, r->out.parm_error);
14347 } else {
14348 r->out.parm_error = NULL;
14350 if (r->out.parm_error) {
14351 _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
14352 NDR_PULL_SET_MEM_CTX(ndr, r->out.parm_error, 0);
14353 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.parm_error));
14354 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
14356 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
14358 return NDR_ERR_SUCCESS;
14361 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQSetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQSetInfo *r)
14363 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQSetInfo");
14364 ndr->depth++;
14365 if (flags & NDR_SET_VALUES) {
14366 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14368 if (flags & NDR_IN) {
14369 ndr_print_struct(ndr, "in", "srvsvc_NetCharDevQSetInfo");
14370 ndr->depth++;
14371 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
14372 ndr->depth++;
14373 if (r->in.server_unc) {
14374 ndr_print_string(ndr, "server_unc", r->in.server_unc);
14376 ndr->depth--;
14377 ndr_print_string(ndr, "queue_name", r->in.queue_name);
14378 ndr_print_uint32(ndr, "level", r->in.level);
14379 ndr_print_set_switch_value(ndr, &r->in.info, r->in.level);
14380 ndr_print_srvsvc_NetCharDevQInfo(ndr, "info", &r->in.info);
14381 ndr_print_ptr(ndr, "parm_error", r->in.parm_error);
14382 ndr->depth++;
14383 if (r->in.parm_error) {
14384 ndr_print_uint32(ndr, "parm_error", *r->in.parm_error);
14386 ndr->depth--;
14387 ndr->depth--;
14389 if (flags & NDR_OUT) {
14390 ndr_print_struct(ndr, "out", "srvsvc_NetCharDevQSetInfo");
14391 ndr->depth++;
14392 ndr_print_ptr(ndr, "parm_error", r->out.parm_error);
14393 ndr->depth++;
14394 if (r->out.parm_error) {
14395 ndr_print_uint32(ndr, "parm_error", *r->out.parm_error);
14397 ndr->depth--;
14398 ndr_print_WERROR(ndr, "result", r->out.result);
14399 ndr->depth--;
14401 ndr->depth--;
14404 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQPurge(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevQPurge *r)
14406 if (flags & NDR_IN) {
14407 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
14408 if (r->in.server_unc) {
14409 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14410 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
14411 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14412 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
14414 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
14415 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
14416 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
14417 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.queue_name, ndr_charset_length(r->in.queue_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
14419 if (flags & NDR_OUT) {
14420 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
14422 return NDR_ERR_SUCCESS;
14425 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQPurge(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevQPurge *r)
14427 uint32_t _ptr_server_unc;
14428 uint32_t size_server_unc_1 = 0;
14429 uint32_t length_server_unc_1 = 0;
14430 uint32_t size_queue_name_0 = 0;
14431 uint32_t length_queue_name_0 = 0;
14432 TALLOC_CTX *_mem_save_server_unc_0;
14433 if (flags & NDR_IN) {
14434 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
14435 if (_ptr_server_unc) {
14436 NDR_PULL_ALLOC(ndr, r->in.server_unc);
14437 } else {
14438 r->in.server_unc = NULL;
14440 if (r->in.server_unc) {
14441 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
14442 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
14443 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
14444 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
14445 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
14446 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
14447 if (length_server_unc_1 > size_server_unc_1) {
14448 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
14450 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
14451 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
14452 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
14454 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.queue_name));
14455 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.queue_name));
14456 size_queue_name_0 = ndr_get_array_size(ndr, &r->in.queue_name);
14457 length_queue_name_0 = ndr_get_array_length(ndr, &r->in.queue_name);
14458 if (length_queue_name_0 > size_queue_name_0) {
14459 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_queue_name_0, length_queue_name_0);
14461 NDR_CHECK(ndr_check_string_terminator(ndr, length_queue_name_0, sizeof(uint16_t)));
14462 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.queue_name, length_queue_name_0, sizeof(uint16_t), CH_UTF16));
14464 if (flags & NDR_OUT) {
14465 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
14467 return NDR_ERR_SUCCESS;
14470 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQPurge(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQPurge *r)
14472 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQPurge");
14473 ndr->depth++;
14474 if (flags & NDR_SET_VALUES) {
14475 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14477 if (flags & NDR_IN) {
14478 ndr_print_struct(ndr, "in", "srvsvc_NetCharDevQPurge");
14479 ndr->depth++;
14480 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
14481 ndr->depth++;
14482 if (r->in.server_unc) {
14483 ndr_print_string(ndr, "server_unc", r->in.server_unc);
14485 ndr->depth--;
14486 ndr_print_string(ndr, "queue_name", r->in.queue_name);
14487 ndr->depth--;
14489 if (flags & NDR_OUT) {
14490 ndr_print_struct(ndr, "out", "srvsvc_NetCharDevQPurge");
14491 ndr->depth++;
14492 ndr_print_WERROR(ndr, "result", r->out.result);
14493 ndr->depth--;
14495 ndr->depth--;
14498 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQPurgeSelf(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevQPurgeSelf *r)
14500 if (flags & NDR_IN) {
14501 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
14502 if (r->in.server_unc) {
14503 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14504 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
14505 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14506 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
14508 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
14509 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
14510 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
14511 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.queue_name, ndr_charset_length(r->in.queue_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
14512 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
14513 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
14514 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
14515 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.computer_name, ndr_charset_length(r->in.computer_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
14517 if (flags & NDR_OUT) {
14518 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
14520 return NDR_ERR_SUCCESS;
14523 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQPurgeSelf(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevQPurgeSelf *r)
14525 uint32_t _ptr_server_unc;
14526 uint32_t size_server_unc_1 = 0;
14527 uint32_t length_server_unc_1 = 0;
14528 uint32_t size_queue_name_0 = 0;
14529 uint32_t length_queue_name_0 = 0;
14530 uint32_t size_computer_name_0 = 0;
14531 uint32_t length_computer_name_0 = 0;
14532 TALLOC_CTX *_mem_save_server_unc_0;
14533 if (flags & NDR_IN) {
14534 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
14535 if (_ptr_server_unc) {
14536 NDR_PULL_ALLOC(ndr, r->in.server_unc);
14537 } else {
14538 r->in.server_unc = NULL;
14540 if (r->in.server_unc) {
14541 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
14542 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
14543 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
14544 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
14545 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
14546 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
14547 if (length_server_unc_1 > size_server_unc_1) {
14548 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
14550 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
14551 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
14552 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
14554 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.queue_name));
14555 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.queue_name));
14556 size_queue_name_0 = ndr_get_array_size(ndr, &r->in.queue_name);
14557 length_queue_name_0 = ndr_get_array_length(ndr, &r->in.queue_name);
14558 if (length_queue_name_0 > size_queue_name_0) {
14559 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_queue_name_0, length_queue_name_0);
14561 NDR_CHECK(ndr_check_string_terminator(ndr, length_queue_name_0, sizeof(uint16_t)));
14562 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.queue_name, length_queue_name_0, sizeof(uint16_t), CH_UTF16));
14563 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
14564 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
14565 size_computer_name_0 = ndr_get_array_size(ndr, &r->in.computer_name);
14566 length_computer_name_0 = ndr_get_array_length(ndr, &r->in.computer_name);
14567 if (length_computer_name_0 > size_computer_name_0) {
14568 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_computer_name_0, length_computer_name_0);
14570 NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_0, sizeof(uint16_t)));
14571 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_0, sizeof(uint16_t), CH_UTF16));
14573 if (flags & NDR_OUT) {
14574 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
14576 return NDR_ERR_SUCCESS;
14579 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQPurgeSelf(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQPurgeSelf *r)
14581 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQPurgeSelf");
14582 ndr->depth++;
14583 if (flags & NDR_SET_VALUES) {
14584 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14586 if (flags & NDR_IN) {
14587 ndr_print_struct(ndr, "in", "srvsvc_NetCharDevQPurgeSelf");
14588 ndr->depth++;
14589 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
14590 ndr->depth++;
14591 if (r->in.server_unc) {
14592 ndr_print_string(ndr, "server_unc", r->in.server_unc);
14594 ndr->depth--;
14595 ndr_print_string(ndr, "queue_name", r->in.queue_name);
14596 ndr_print_string(ndr, "computer_name", r->in.computer_name);
14597 ndr->depth--;
14599 if (flags & NDR_OUT) {
14600 ndr_print_struct(ndr, "out", "srvsvc_NetCharDevQPurgeSelf");
14601 ndr->depth++;
14602 ndr_print_WERROR(ndr, "result", r->out.result);
14603 ndr->depth--;
14605 ndr->depth--;
14608 static enum ndr_err_code ndr_push_srvsvc_NetConnEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetConnEnum *r)
14610 if (flags & NDR_IN) {
14611 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
14612 if (r->in.server_unc) {
14613 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14614 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
14615 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14616 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
14618 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.path));
14619 if (r->in.path) {
14620 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
14621 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
14622 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
14623 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path, ndr_charset_length(r->in.path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
14625 if (r->in.info_ctr == NULL) {
14626 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14628 NDR_CHECK(ndr_push_srvsvc_NetConnInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
14629 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
14630 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
14631 if (r->in.resume_handle) {
14632 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
14635 if (flags & NDR_OUT) {
14636 if (r->out.info_ctr == NULL) {
14637 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14639 NDR_CHECK(ndr_push_srvsvc_NetConnInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
14640 if (r->out.totalentries == NULL) {
14641 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14643 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
14644 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
14645 if (r->out.resume_handle) {
14646 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
14648 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
14650 return NDR_ERR_SUCCESS;
14653 static enum ndr_err_code ndr_pull_srvsvc_NetConnEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetConnEnum *r)
14655 uint32_t _ptr_server_unc;
14656 uint32_t size_server_unc_1 = 0;
14657 uint32_t length_server_unc_1 = 0;
14658 uint32_t _ptr_path;
14659 uint32_t size_path_1 = 0;
14660 uint32_t length_path_1 = 0;
14661 uint32_t _ptr_resume_handle;
14662 TALLOC_CTX *_mem_save_server_unc_0;
14663 TALLOC_CTX *_mem_save_path_0;
14664 TALLOC_CTX *_mem_save_info_ctr_0;
14665 TALLOC_CTX *_mem_save_totalentries_0;
14666 TALLOC_CTX *_mem_save_resume_handle_0;
14667 if (flags & NDR_IN) {
14668 ZERO_STRUCT(r->out);
14670 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
14671 if (_ptr_server_unc) {
14672 NDR_PULL_ALLOC(ndr, r->in.server_unc);
14673 } else {
14674 r->in.server_unc = NULL;
14676 if (r->in.server_unc) {
14677 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
14678 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
14679 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
14680 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
14681 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
14682 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
14683 if (length_server_unc_1 > size_server_unc_1) {
14684 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
14686 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
14687 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
14688 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
14690 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
14691 if (_ptr_path) {
14692 NDR_PULL_ALLOC(ndr, r->in.path);
14693 } else {
14694 r->in.path = NULL;
14696 if (r->in.path) {
14697 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
14698 NDR_PULL_SET_MEM_CTX(ndr, r->in.path, 0);
14699 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path));
14700 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path));
14701 size_path_1 = ndr_get_array_size(ndr, &r->in.path);
14702 length_path_1 = ndr_get_array_length(ndr, &r->in.path);
14703 if (length_path_1 > size_path_1) {
14704 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_path_1, length_path_1);
14706 NDR_CHECK(ndr_check_string_terminator(ndr, length_path_1, sizeof(uint16_t)));
14707 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path, length_path_1, sizeof(uint16_t), CH_UTF16));
14708 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
14710 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14711 NDR_PULL_ALLOC(ndr, r->in.info_ctr);
14713 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
14714 NDR_PULL_SET_MEM_CTX(ndr, r->in.info_ctr, LIBNDR_FLAG_REF_ALLOC);
14715 NDR_CHECK(ndr_pull_srvsvc_NetConnInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
14716 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
14717 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
14718 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
14719 if (_ptr_resume_handle) {
14720 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
14721 } else {
14722 r->in.resume_handle = NULL;
14724 if (r->in.resume_handle) {
14725 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
14726 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
14727 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
14728 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
14730 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
14731 *r->out.info_ctr = *r->in.info_ctr;
14732 NDR_PULL_ALLOC(ndr, r->out.totalentries);
14733 ZERO_STRUCTP(r->out.totalentries);
14735 if (flags & NDR_OUT) {
14736 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14737 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
14739 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
14740 NDR_PULL_SET_MEM_CTX(ndr, r->out.info_ctr, LIBNDR_FLAG_REF_ALLOC);
14741 NDR_CHECK(ndr_pull_srvsvc_NetConnInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
14742 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
14743 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14744 NDR_PULL_ALLOC(ndr, r->out.totalentries);
14746 _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
14747 NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
14748 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
14749 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
14750 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
14751 if (_ptr_resume_handle) {
14752 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
14753 } else {
14754 r->out.resume_handle = NULL;
14756 if (r->out.resume_handle) {
14757 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
14758 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
14759 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
14760 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
14762 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
14764 return NDR_ERR_SUCCESS;
14767 _PUBLIC_ void ndr_print_srvsvc_NetConnEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetConnEnum *r)
14769 ndr_print_struct(ndr, name, "srvsvc_NetConnEnum");
14770 ndr->depth++;
14771 if (flags & NDR_SET_VALUES) {
14772 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14774 if (flags & NDR_IN) {
14775 ndr_print_struct(ndr, "in", "srvsvc_NetConnEnum");
14776 ndr->depth++;
14777 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
14778 ndr->depth++;
14779 if (r->in.server_unc) {
14780 ndr_print_string(ndr, "server_unc", r->in.server_unc);
14782 ndr->depth--;
14783 ndr_print_ptr(ndr, "path", r->in.path);
14784 ndr->depth++;
14785 if (r->in.path) {
14786 ndr_print_string(ndr, "path", r->in.path);
14788 ndr->depth--;
14789 ndr_print_ptr(ndr, "info_ctr", r->in.info_ctr);
14790 ndr->depth++;
14791 ndr_print_srvsvc_NetConnInfoCtr(ndr, "info_ctr", r->in.info_ctr);
14792 ndr->depth--;
14793 ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
14794 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
14795 ndr->depth++;
14796 if (r->in.resume_handle) {
14797 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
14799 ndr->depth--;
14800 ndr->depth--;
14802 if (flags & NDR_OUT) {
14803 ndr_print_struct(ndr, "out", "srvsvc_NetConnEnum");
14804 ndr->depth++;
14805 ndr_print_ptr(ndr, "info_ctr", r->out.info_ctr);
14806 ndr->depth++;
14807 ndr_print_srvsvc_NetConnInfoCtr(ndr, "info_ctr", r->out.info_ctr);
14808 ndr->depth--;
14809 ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
14810 ndr->depth++;
14811 ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
14812 ndr->depth--;
14813 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
14814 ndr->depth++;
14815 if (r->out.resume_handle) {
14816 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
14818 ndr->depth--;
14819 ndr_print_WERROR(ndr, "result", r->out.result);
14820 ndr->depth--;
14822 ndr->depth--;
14825 static enum ndr_err_code ndr_push_srvsvc_NetFileEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetFileEnum *r)
14827 if (flags & NDR_IN) {
14828 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
14829 if (r->in.server_unc) {
14830 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14831 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
14832 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14833 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
14835 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.path));
14836 if (r->in.path) {
14837 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
14838 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
14839 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
14840 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path, ndr_charset_length(r->in.path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
14842 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.user));
14843 if (r->in.user) {
14844 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
14845 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
14846 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
14847 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.user, ndr_charset_length(r->in.user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
14849 if (r->in.info_ctr == NULL) {
14850 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14852 NDR_CHECK(ndr_push_srvsvc_NetFileInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
14853 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
14854 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
14855 if (r->in.resume_handle) {
14856 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
14859 if (flags & NDR_OUT) {
14860 if (r->out.info_ctr == NULL) {
14861 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14863 NDR_CHECK(ndr_push_srvsvc_NetFileInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
14864 if (r->out.totalentries == NULL) {
14865 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14867 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
14868 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
14869 if (r->out.resume_handle) {
14870 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
14872 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
14874 return NDR_ERR_SUCCESS;
14877 static enum ndr_err_code ndr_pull_srvsvc_NetFileEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetFileEnum *r)
14879 uint32_t _ptr_server_unc;
14880 uint32_t size_server_unc_1 = 0;
14881 uint32_t length_server_unc_1 = 0;
14882 uint32_t _ptr_path;
14883 uint32_t size_path_1 = 0;
14884 uint32_t length_path_1 = 0;
14885 uint32_t _ptr_user;
14886 uint32_t size_user_1 = 0;
14887 uint32_t length_user_1 = 0;
14888 uint32_t _ptr_resume_handle;
14889 TALLOC_CTX *_mem_save_server_unc_0;
14890 TALLOC_CTX *_mem_save_path_0;
14891 TALLOC_CTX *_mem_save_user_0;
14892 TALLOC_CTX *_mem_save_info_ctr_0;
14893 TALLOC_CTX *_mem_save_totalentries_0;
14894 TALLOC_CTX *_mem_save_resume_handle_0;
14895 if (flags & NDR_IN) {
14896 ZERO_STRUCT(r->out);
14898 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
14899 if (_ptr_server_unc) {
14900 NDR_PULL_ALLOC(ndr, r->in.server_unc);
14901 } else {
14902 r->in.server_unc = NULL;
14904 if (r->in.server_unc) {
14905 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
14906 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
14907 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
14908 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
14909 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
14910 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
14911 if (length_server_unc_1 > size_server_unc_1) {
14912 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
14914 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
14915 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
14916 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
14918 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
14919 if (_ptr_path) {
14920 NDR_PULL_ALLOC(ndr, r->in.path);
14921 } else {
14922 r->in.path = NULL;
14924 if (r->in.path) {
14925 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
14926 NDR_PULL_SET_MEM_CTX(ndr, r->in.path, 0);
14927 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path));
14928 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path));
14929 size_path_1 = ndr_get_array_size(ndr, &r->in.path);
14930 length_path_1 = ndr_get_array_length(ndr, &r->in.path);
14931 if (length_path_1 > size_path_1) {
14932 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_path_1, length_path_1);
14934 NDR_CHECK(ndr_check_string_terminator(ndr, length_path_1, sizeof(uint16_t)));
14935 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path, length_path_1, sizeof(uint16_t), CH_UTF16));
14936 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
14938 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
14939 if (_ptr_user) {
14940 NDR_PULL_ALLOC(ndr, r->in.user);
14941 } else {
14942 r->in.user = NULL;
14944 if (r->in.user) {
14945 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
14946 NDR_PULL_SET_MEM_CTX(ndr, r->in.user, 0);
14947 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.user));
14948 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.user));
14949 size_user_1 = ndr_get_array_size(ndr, &r->in.user);
14950 length_user_1 = ndr_get_array_length(ndr, &r->in.user);
14951 if (length_user_1 > size_user_1) {
14952 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_user_1, length_user_1);
14954 NDR_CHECK(ndr_check_string_terminator(ndr, length_user_1, sizeof(uint16_t)));
14955 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.user, length_user_1, sizeof(uint16_t), CH_UTF16));
14956 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
14958 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14959 NDR_PULL_ALLOC(ndr, r->in.info_ctr);
14961 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
14962 NDR_PULL_SET_MEM_CTX(ndr, r->in.info_ctr, LIBNDR_FLAG_REF_ALLOC);
14963 NDR_CHECK(ndr_pull_srvsvc_NetFileInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
14964 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
14965 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
14966 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
14967 if (_ptr_resume_handle) {
14968 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
14969 } else {
14970 r->in.resume_handle = NULL;
14972 if (r->in.resume_handle) {
14973 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
14974 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
14975 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
14976 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
14978 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
14979 *r->out.info_ctr = *r->in.info_ctr;
14980 NDR_PULL_ALLOC(ndr, r->out.totalentries);
14981 ZERO_STRUCTP(r->out.totalentries);
14983 if (flags & NDR_OUT) {
14984 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14985 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
14987 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
14988 NDR_PULL_SET_MEM_CTX(ndr, r->out.info_ctr, LIBNDR_FLAG_REF_ALLOC);
14989 NDR_CHECK(ndr_pull_srvsvc_NetFileInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
14990 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
14991 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14992 NDR_PULL_ALLOC(ndr, r->out.totalentries);
14994 _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
14995 NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
14996 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
14997 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
14998 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
14999 if (_ptr_resume_handle) {
15000 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
15001 } else {
15002 r->out.resume_handle = NULL;
15004 if (r->out.resume_handle) {
15005 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
15006 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
15007 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
15008 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
15010 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15012 return NDR_ERR_SUCCESS;
15015 _PUBLIC_ void ndr_print_srvsvc_NetFileEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetFileEnum *r)
15017 ndr_print_struct(ndr, name, "srvsvc_NetFileEnum");
15018 ndr->depth++;
15019 if (flags & NDR_SET_VALUES) {
15020 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15022 if (flags & NDR_IN) {
15023 ndr_print_struct(ndr, "in", "srvsvc_NetFileEnum");
15024 ndr->depth++;
15025 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
15026 ndr->depth++;
15027 if (r->in.server_unc) {
15028 ndr_print_string(ndr, "server_unc", r->in.server_unc);
15030 ndr->depth--;
15031 ndr_print_ptr(ndr, "path", r->in.path);
15032 ndr->depth++;
15033 if (r->in.path) {
15034 ndr_print_string(ndr, "path", r->in.path);
15036 ndr->depth--;
15037 ndr_print_ptr(ndr, "user", r->in.user);
15038 ndr->depth++;
15039 if (r->in.user) {
15040 ndr_print_string(ndr, "user", r->in.user);
15042 ndr->depth--;
15043 ndr_print_ptr(ndr, "info_ctr", r->in.info_ctr);
15044 ndr->depth++;
15045 ndr_print_srvsvc_NetFileInfoCtr(ndr, "info_ctr", r->in.info_ctr);
15046 ndr->depth--;
15047 ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
15048 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
15049 ndr->depth++;
15050 if (r->in.resume_handle) {
15051 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
15053 ndr->depth--;
15054 ndr->depth--;
15056 if (flags & NDR_OUT) {
15057 ndr_print_struct(ndr, "out", "srvsvc_NetFileEnum");
15058 ndr->depth++;
15059 ndr_print_ptr(ndr, "info_ctr", r->out.info_ctr);
15060 ndr->depth++;
15061 ndr_print_srvsvc_NetFileInfoCtr(ndr, "info_ctr", r->out.info_ctr);
15062 ndr->depth--;
15063 ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
15064 ndr->depth++;
15065 ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
15066 ndr->depth--;
15067 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
15068 ndr->depth++;
15069 if (r->out.resume_handle) {
15070 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
15072 ndr->depth--;
15073 ndr_print_WERROR(ndr, "result", r->out.result);
15074 ndr->depth--;
15076 ndr->depth--;
15079 static enum ndr_err_code ndr_push_srvsvc_NetFileGetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetFileGetInfo *r)
15081 if (flags & NDR_IN) {
15082 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
15083 if (r->in.server_unc) {
15084 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15085 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
15086 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15087 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
15089 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.fid));
15090 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
15092 if (flags & NDR_OUT) {
15093 if (r->out.info == NULL) {
15094 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15096 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
15097 NDR_CHECK(ndr_push_srvsvc_NetFileInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
15098 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15100 return NDR_ERR_SUCCESS;
15103 static enum ndr_err_code ndr_pull_srvsvc_NetFileGetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetFileGetInfo *r)
15105 uint32_t _ptr_server_unc;
15106 uint32_t size_server_unc_1 = 0;
15107 uint32_t length_server_unc_1 = 0;
15108 TALLOC_CTX *_mem_save_server_unc_0;
15109 TALLOC_CTX *_mem_save_info_0;
15110 if (flags & NDR_IN) {
15111 ZERO_STRUCT(r->out);
15113 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
15114 if (_ptr_server_unc) {
15115 NDR_PULL_ALLOC(ndr, r->in.server_unc);
15116 } else {
15117 r->in.server_unc = NULL;
15119 if (r->in.server_unc) {
15120 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
15121 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
15122 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
15123 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
15124 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
15125 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
15126 if (length_server_unc_1 > size_server_unc_1) {
15127 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
15129 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
15130 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
15131 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
15133 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.fid));
15134 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
15135 NDR_PULL_ALLOC(ndr, r->out.info);
15136 ZERO_STRUCTP(r->out.info);
15138 if (flags & NDR_OUT) {
15139 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15140 NDR_PULL_ALLOC(ndr, r->out.info);
15142 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
15143 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
15144 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
15145 NDR_CHECK(ndr_pull_srvsvc_NetFileInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
15146 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
15147 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15149 return NDR_ERR_SUCCESS;
15152 _PUBLIC_ void ndr_print_srvsvc_NetFileGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetFileGetInfo *r)
15154 ndr_print_struct(ndr, name, "srvsvc_NetFileGetInfo");
15155 ndr->depth++;
15156 if (flags & NDR_SET_VALUES) {
15157 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15159 if (flags & NDR_IN) {
15160 ndr_print_struct(ndr, "in", "srvsvc_NetFileGetInfo");
15161 ndr->depth++;
15162 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
15163 ndr->depth++;
15164 if (r->in.server_unc) {
15165 ndr_print_string(ndr, "server_unc", r->in.server_unc);
15167 ndr->depth--;
15168 ndr_print_uint32(ndr, "fid", r->in.fid);
15169 ndr_print_uint32(ndr, "level", r->in.level);
15170 ndr->depth--;
15172 if (flags & NDR_OUT) {
15173 ndr_print_struct(ndr, "out", "srvsvc_NetFileGetInfo");
15174 ndr->depth++;
15175 ndr_print_ptr(ndr, "info", r->out.info);
15176 ndr->depth++;
15177 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
15178 ndr_print_srvsvc_NetFileInfo(ndr, "info", r->out.info);
15179 ndr->depth--;
15180 ndr_print_WERROR(ndr, "result", r->out.result);
15181 ndr->depth--;
15183 ndr->depth--;
15186 static enum ndr_err_code ndr_push_srvsvc_NetFileClose(struct ndr_push *ndr, int flags, const struct srvsvc_NetFileClose *r)
15188 if (flags & NDR_IN) {
15189 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
15190 if (r->in.server_unc) {
15191 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15192 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
15193 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15194 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
15196 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.fid));
15198 if (flags & NDR_OUT) {
15199 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15201 return NDR_ERR_SUCCESS;
15204 static enum ndr_err_code ndr_pull_srvsvc_NetFileClose(struct ndr_pull *ndr, int flags, struct srvsvc_NetFileClose *r)
15206 uint32_t _ptr_server_unc;
15207 uint32_t size_server_unc_1 = 0;
15208 uint32_t length_server_unc_1 = 0;
15209 TALLOC_CTX *_mem_save_server_unc_0;
15210 if (flags & NDR_IN) {
15211 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
15212 if (_ptr_server_unc) {
15213 NDR_PULL_ALLOC(ndr, r->in.server_unc);
15214 } else {
15215 r->in.server_unc = NULL;
15217 if (r->in.server_unc) {
15218 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
15219 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
15220 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
15221 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
15222 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
15223 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
15224 if (length_server_unc_1 > size_server_unc_1) {
15225 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
15227 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
15228 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
15229 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
15231 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.fid));
15233 if (flags & NDR_OUT) {
15234 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15236 return NDR_ERR_SUCCESS;
15239 _PUBLIC_ void ndr_print_srvsvc_NetFileClose(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetFileClose *r)
15241 ndr_print_struct(ndr, name, "srvsvc_NetFileClose");
15242 ndr->depth++;
15243 if (flags & NDR_SET_VALUES) {
15244 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15246 if (flags & NDR_IN) {
15247 ndr_print_struct(ndr, "in", "srvsvc_NetFileClose");
15248 ndr->depth++;
15249 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
15250 ndr->depth++;
15251 if (r->in.server_unc) {
15252 ndr_print_string(ndr, "server_unc", r->in.server_unc);
15254 ndr->depth--;
15255 ndr_print_uint32(ndr, "fid", r->in.fid);
15256 ndr->depth--;
15258 if (flags & NDR_OUT) {
15259 ndr_print_struct(ndr, "out", "srvsvc_NetFileClose");
15260 ndr->depth++;
15261 ndr_print_WERROR(ndr, "result", r->out.result);
15262 ndr->depth--;
15264 ndr->depth--;
15267 static enum ndr_err_code ndr_push_srvsvc_NetSessEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetSessEnum *r)
15269 if (flags & NDR_IN) {
15270 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
15271 if (r->in.server_unc) {
15272 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15273 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
15274 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15275 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
15277 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.client));
15278 if (r->in.client) {
15279 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.client, CH_UTF16)));
15280 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
15281 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.client, CH_UTF16)));
15282 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.client, ndr_charset_length(r->in.client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
15284 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.user));
15285 if (r->in.user) {
15286 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
15287 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
15288 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
15289 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.user, ndr_charset_length(r->in.user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
15291 if (r->in.info_ctr == NULL) {
15292 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15294 NDR_CHECK(ndr_push_srvsvc_NetSessInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
15295 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
15296 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
15297 if (r->in.resume_handle) {
15298 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
15301 if (flags & NDR_OUT) {
15302 if (r->out.info_ctr == NULL) {
15303 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15305 NDR_CHECK(ndr_push_srvsvc_NetSessInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
15306 if (r->out.totalentries == NULL) {
15307 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15309 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
15310 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
15311 if (r->out.resume_handle) {
15312 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
15314 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15316 return NDR_ERR_SUCCESS;
15319 static enum ndr_err_code ndr_pull_srvsvc_NetSessEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetSessEnum *r)
15321 uint32_t _ptr_server_unc;
15322 uint32_t size_server_unc_1 = 0;
15323 uint32_t length_server_unc_1 = 0;
15324 uint32_t _ptr_client;
15325 uint32_t size_client_1 = 0;
15326 uint32_t length_client_1 = 0;
15327 uint32_t _ptr_user;
15328 uint32_t size_user_1 = 0;
15329 uint32_t length_user_1 = 0;
15330 uint32_t _ptr_resume_handle;
15331 TALLOC_CTX *_mem_save_server_unc_0;
15332 TALLOC_CTX *_mem_save_client_0;
15333 TALLOC_CTX *_mem_save_user_0;
15334 TALLOC_CTX *_mem_save_info_ctr_0;
15335 TALLOC_CTX *_mem_save_totalentries_0;
15336 TALLOC_CTX *_mem_save_resume_handle_0;
15337 if (flags & NDR_IN) {
15338 ZERO_STRUCT(r->out);
15340 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
15341 if (_ptr_server_unc) {
15342 NDR_PULL_ALLOC(ndr, r->in.server_unc);
15343 } else {
15344 r->in.server_unc = NULL;
15346 if (r->in.server_unc) {
15347 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
15348 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
15349 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
15350 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
15351 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
15352 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
15353 if (length_server_unc_1 > size_server_unc_1) {
15354 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
15356 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
15357 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
15358 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
15360 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
15361 if (_ptr_client) {
15362 NDR_PULL_ALLOC(ndr, r->in.client);
15363 } else {
15364 r->in.client = NULL;
15366 if (r->in.client) {
15367 _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
15368 NDR_PULL_SET_MEM_CTX(ndr, r->in.client, 0);
15369 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.client));
15370 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.client));
15371 size_client_1 = ndr_get_array_size(ndr, &r->in.client);
15372 length_client_1 = ndr_get_array_length(ndr, &r->in.client);
15373 if (length_client_1 > size_client_1) {
15374 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_client_1, length_client_1);
15376 NDR_CHECK(ndr_check_string_terminator(ndr, length_client_1, sizeof(uint16_t)));
15377 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.client, length_client_1, sizeof(uint16_t), CH_UTF16));
15378 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
15380 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
15381 if (_ptr_user) {
15382 NDR_PULL_ALLOC(ndr, r->in.user);
15383 } else {
15384 r->in.user = NULL;
15386 if (r->in.user) {
15387 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
15388 NDR_PULL_SET_MEM_CTX(ndr, r->in.user, 0);
15389 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.user));
15390 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.user));
15391 size_user_1 = ndr_get_array_size(ndr, &r->in.user);
15392 length_user_1 = ndr_get_array_length(ndr, &r->in.user);
15393 if (length_user_1 > size_user_1) {
15394 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_user_1, length_user_1);
15396 NDR_CHECK(ndr_check_string_terminator(ndr, length_user_1, sizeof(uint16_t)));
15397 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.user, length_user_1, sizeof(uint16_t), CH_UTF16));
15398 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
15400 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15401 NDR_PULL_ALLOC(ndr, r->in.info_ctr);
15403 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
15404 NDR_PULL_SET_MEM_CTX(ndr, r->in.info_ctr, LIBNDR_FLAG_REF_ALLOC);
15405 NDR_CHECK(ndr_pull_srvsvc_NetSessInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
15406 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
15407 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
15408 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
15409 if (_ptr_resume_handle) {
15410 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
15411 } else {
15412 r->in.resume_handle = NULL;
15414 if (r->in.resume_handle) {
15415 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
15416 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
15417 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
15418 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
15420 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
15421 *r->out.info_ctr = *r->in.info_ctr;
15422 NDR_PULL_ALLOC(ndr, r->out.totalentries);
15423 ZERO_STRUCTP(r->out.totalentries);
15425 if (flags & NDR_OUT) {
15426 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15427 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
15429 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
15430 NDR_PULL_SET_MEM_CTX(ndr, r->out.info_ctr, LIBNDR_FLAG_REF_ALLOC);
15431 NDR_CHECK(ndr_pull_srvsvc_NetSessInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
15432 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
15433 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15434 NDR_PULL_ALLOC(ndr, r->out.totalentries);
15436 _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
15437 NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
15438 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
15439 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
15440 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
15441 if (_ptr_resume_handle) {
15442 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
15443 } else {
15444 r->out.resume_handle = NULL;
15446 if (r->out.resume_handle) {
15447 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
15448 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
15449 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
15450 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
15452 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15454 return NDR_ERR_SUCCESS;
15457 _PUBLIC_ void ndr_print_srvsvc_NetSessEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSessEnum *r)
15459 ndr_print_struct(ndr, name, "srvsvc_NetSessEnum");
15460 ndr->depth++;
15461 if (flags & NDR_SET_VALUES) {
15462 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15464 if (flags & NDR_IN) {
15465 ndr_print_struct(ndr, "in", "srvsvc_NetSessEnum");
15466 ndr->depth++;
15467 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
15468 ndr->depth++;
15469 if (r->in.server_unc) {
15470 ndr_print_string(ndr, "server_unc", r->in.server_unc);
15472 ndr->depth--;
15473 ndr_print_ptr(ndr, "client", r->in.client);
15474 ndr->depth++;
15475 if (r->in.client) {
15476 ndr_print_string(ndr, "client", r->in.client);
15478 ndr->depth--;
15479 ndr_print_ptr(ndr, "user", r->in.user);
15480 ndr->depth++;
15481 if (r->in.user) {
15482 ndr_print_string(ndr, "user", r->in.user);
15484 ndr->depth--;
15485 ndr_print_ptr(ndr, "info_ctr", r->in.info_ctr);
15486 ndr->depth++;
15487 ndr_print_srvsvc_NetSessInfoCtr(ndr, "info_ctr", r->in.info_ctr);
15488 ndr->depth--;
15489 ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
15490 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
15491 ndr->depth++;
15492 if (r->in.resume_handle) {
15493 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
15495 ndr->depth--;
15496 ndr->depth--;
15498 if (flags & NDR_OUT) {
15499 ndr_print_struct(ndr, "out", "srvsvc_NetSessEnum");
15500 ndr->depth++;
15501 ndr_print_ptr(ndr, "info_ctr", r->out.info_ctr);
15502 ndr->depth++;
15503 ndr_print_srvsvc_NetSessInfoCtr(ndr, "info_ctr", r->out.info_ctr);
15504 ndr->depth--;
15505 ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
15506 ndr->depth++;
15507 ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
15508 ndr->depth--;
15509 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
15510 ndr->depth++;
15511 if (r->out.resume_handle) {
15512 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
15514 ndr->depth--;
15515 ndr_print_WERROR(ndr, "result", r->out.result);
15516 ndr->depth--;
15518 ndr->depth--;
15521 static enum ndr_err_code ndr_push_srvsvc_NetSessDel(struct ndr_push *ndr, int flags, const struct srvsvc_NetSessDel *r)
15523 if (flags & NDR_IN) {
15524 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
15525 if (r->in.server_unc) {
15526 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15527 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
15528 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15529 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
15531 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.client));
15532 if (r->in.client) {
15533 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.client, CH_UTF16)));
15534 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
15535 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.client, CH_UTF16)));
15536 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.client, ndr_charset_length(r->in.client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
15538 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.user));
15539 if (r->in.user) {
15540 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
15541 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
15542 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
15543 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.user, ndr_charset_length(r->in.user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
15546 if (flags & NDR_OUT) {
15547 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15549 return NDR_ERR_SUCCESS;
15552 static enum ndr_err_code ndr_pull_srvsvc_NetSessDel(struct ndr_pull *ndr, int flags, struct srvsvc_NetSessDel *r)
15554 uint32_t _ptr_server_unc;
15555 uint32_t size_server_unc_1 = 0;
15556 uint32_t length_server_unc_1 = 0;
15557 uint32_t _ptr_client;
15558 uint32_t size_client_1 = 0;
15559 uint32_t length_client_1 = 0;
15560 uint32_t _ptr_user;
15561 uint32_t size_user_1 = 0;
15562 uint32_t length_user_1 = 0;
15563 TALLOC_CTX *_mem_save_server_unc_0;
15564 TALLOC_CTX *_mem_save_client_0;
15565 TALLOC_CTX *_mem_save_user_0;
15566 if (flags & NDR_IN) {
15567 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
15568 if (_ptr_server_unc) {
15569 NDR_PULL_ALLOC(ndr, r->in.server_unc);
15570 } else {
15571 r->in.server_unc = NULL;
15573 if (r->in.server_unc) {
15574 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
15575 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
15576 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
15577 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
15578 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
15579 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
15580 if (length_server_unc_1 > size_server_unc_1) {
15581 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
15583 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
15584 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
15585 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
15587 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
15588 if (_ptr_client) {
15589 NDR_PULL_ALLOC(ndr, r->in.client);
15590 } else {
15591 r->in.client = NULL;
15593 if (r->in.client) {
15594 _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
15595 NDR_PULL_SET_MEM_CTX(ndr, r->in.client, 0);
15596 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.client));
15597 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.client));
15598 size_client_1 = ndr_get_array_size(ndr, &r->in.client);
15599 length_client_1 = ndr_get_array_length(ndr, &r->in.client);
15600 if (length_client_1 > size_client_1) {
15601 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_client_1, length_client_1);
15603 NDR_CHECK(ndr_check_string_terminator(ndr, length_client_1, sizeof(uint16_t)));
15604 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.client, length_client_1, sizeof(uint16_t), CH_UTF16));
15605 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
15607 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
15608 if (_ptr_user) {
15609 NDR_PULL_ALLOC(ndr, r->in.user);
15610 } else {
15611 r->in.user = NULL;
15613 if (r->in.user) {
15614 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
15615 NDR_PULL_SET_MEM_CTX(ndr, r->in.user, 0);
15616 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.user));
15617 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.user));
15618 size_user_1 = ndr_get_array_size(ndr, &r->in.user);
15619 length_user_1 = ndr_get_array_length(ndr, &r->in.user);
15620 if (length_user_1 > size_user_1) {
15621 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_user_1, length_user_1);
15623 NDR_CHECK(ndr_check_string_terminator(ndr, length_user_1, sizeof(uint16_t)));
15624 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.user, length_user_1, sizeof(uint16_t), CH_UTF16));
15625 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
15628 if (flags & NDR_OUT) {
15629 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15631 return NDR_ERR_SUCCESS;
15634 _PUBLIC_ void ndr_print_srvsvc_NetSessDel(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSessDel *r)
15636 ndr_print_struct(ndr, name, "srvsvc_NetSessDel");
15637 ndr->depth++;
15638 if (flags & NDR_SET_VALUES) {
15639 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15641 if (flags & NDR_IN) {
15642 ndr_print_struct(ndr, "in", "srvsvc_NetSessDel");
15643 ndr->depth++;
15644 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
15645 ndr->depth++;
15646 if (r->in.server_unc) {
15647 ndr_print_string(ndr, "server_unc", r->in.server_unc);
15649 ndr->depth--;
15650 ndr_print_ptr(ndr, "client", r->in.client);
15651 ndr->depth++;
15652 if (r->in.client) {
15653 ndr_print_string(ndr, "client", r->in.client);
15655 ndr->depth--;
15656 ndr_print_ptr(ndr, "user", r->in.user);
15657 ndr->depth++;
15658 if (r->in.user) {
15659 ndr_print_string(ndr, "user", r->in.user);
15661 ndr->depth--;
15662 ndr->depth--;
15664 if (flags & NDR_OUT) {
15665 ndr_print_struct(ndr, "out", "srvsvc_NetSessDel");
15666 ndr->depth++;
15667 ndr_print_WERROR(ndr, "result", r->out.result);
15668 ndr->depth--;
15670 ndr->depth--;
15673 static enum ndr_err_code ndr_push_srvsvc_NetShareAdd(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareAdd *r)
15675 if (flags & NDR_IN) {
15676 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
15677 if (r->in.server_unc) {
15678 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15679 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
15680 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15681 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
15683 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
15684 if (r->in.info == NULL) {
15685 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15687 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
15688 NDR_CHECK(ndr_push_srvsvc_NetShareInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
15689 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.parm_error));
15690 if (r->in.parm_error) {
15691 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.parm_error));
15694 if (flags & NDR_OUT) {
15695 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.parm_error));
15696 if (r->out.parm_error) {
15697 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.parm_error));
15699 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15701 return NDR_ERR_SUCCESS;
15704 static enum ndr_err_code ndr_pull_srvsvc_NetShareAdd(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareAdd *r)
15706 uint32_t _ptr_server_unc;
15707 uint32_t size_server_unc_1 = 0;
15708 uint32_t length_server_unc_1 = 0;
15709 uint32_t _ptr_parm_error;
15710 TALLOC_CTX *_mem_save_server_unc_0;
15711 TALLOC_CTX *_mem_save_info_0;
15712 TALLOC_CTX *_mem_save_parm_error_0;
15713 if (flags & NDR_IN) {
15714 ZERO_STRUCT(r->out);
15716 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
15717 if (_ptr_server_unc) {
15718 NDR_PULL_ALLOC(ndr, r->in.server_unc);
15719 } else {
15720 r->in.server_unc = NULL;
15722 if (r->in.server_unc) {
15723 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
15724 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
15725 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
15726 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
15727 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
15728 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
15729 if (length_server_unc_1 > size_server_unc_1) {
15730 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
15732 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
15733 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
15734 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
15736 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
15737 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15738 NDR_PULL_ALLOC(ndr, r->in.info);
15740 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
15741 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
15742 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
15743 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
15744 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
15745 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
15746 if (_ptr_parm_error) {
15747 NDR_PULL_ALLOC(ndr, r->in.parm_error);
15748 } else {
15749 r->in.parm_error = NULL;
15751 if (r->in.parm_error) {
15752 _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
15753 NDR_PULL_SET_MEM_CTX(ndr, r->in.parm_error, 0);
15754 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.parm_error));
15755 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
15758 if (flags & NDR_OUT) {
15759 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
15760 if (_ptr_parm_error) {
15761 NDR_PULL_ALLOC(ndr, r->out.parm_error);
15762 } else {
15763 r->out.parm_error = NULL;
15765 if (r->out.parm_error) {
15766 _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
15767 NDR_PULL_SET_MEM_CTX(ndr, r->out.parm_error, 0);
15768 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.parm_error));
15769 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
15771 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15773 return NDR_ERR_SUCCESS;
15776 _PUBLIC_ void ndr_print_srvsvc_NetShareAdd(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareAdd *r)
15778 ndr_print_struct(ndr, name, "srvsvc_NetShareAdd");
15779 ndr->depth++;
15780 if (flags & NDR_SET_VALUES) {
15781 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15783 if (flags & NDR_IN) {
15784 ndr_print_struct(ndr, "in", "srvsvc_NetShareAdd");
15785 ndr->depth++;
15786 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
15787 ndr->depth++;
15788 if (r->in.server_unc) {
15789 ndr_print_string(ndr, "server_unc", r->in.server_unc);
15791 ndr->depth--;
15792 ndr_print_uint32(ndr, "level", r->in.level);
15793 ndr_print_ptr(ndr, "info", r->in.info);
15794 ndr->depth++;
15795 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
15796 ndr_print_srvsvc_NetShareInfo(ndr, "info", r->in.info);
15797 ndr->depth--;
15798 ndr_print_ptr(ndr, "parm_error", r->in.parm_error);
15799 ndr->depth++;
15800 if (r->in.parm_error) {
15801 ndr_print_uint32(ndr, "parm_error", *r->in.parm_error);
15803 ndr->depth--;
15804 ndr->depth--;
15806 if (flags & NDR_OUT) {
15807 ndr_print_struct(ndr, "out", "srvsvc_NetShareAdd");
15808 ndr->depth++;
15809 ndr_print_ptr(ndr, "parm_error", r->out.parm_error);
15810 ndr->depth++;
15811 if (r->out.parm_error) {
15812 ndr_print_uint32(ndr, "parm_error", *r->out.parm_error);
15814 ndr->depth--;
15815 ndr_print_WERROR(ndr, "result", r->out.result);
15816 ndr->depth--;
15818 ndr->depth--;
15821 static enum ndr_err_code ndr_push_srvsvc_NetShareEnumAll(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareEnumAll *r)
15823 if (flags & NDR_IN) {
15824 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
15825 if (r->in.server_unc) {
15826 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15827 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
15828 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15829 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
15831 if (r->in.info_ctr == NULL) {
15832 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15834 NDR_CHECK(ndr_push_srvsvc_NetShareInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
15835 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
15836 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
15837 if (r->in.resume_handle) {
15838 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
15841 if (flags & NDR_OUT) {
15842 if (r->out.info_ctr == NULL) {
15843 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15845 NDR_CHECK(ndr_push_srvsvc_NetShareInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
15846 if (r->out.totalentries == NULL) {
15847 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15849 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
15850 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
15851 if (r->out.resume_handle) {
15852 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
15854 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15856 return NDR_ERR_SUCCESS;
15859 static enum ndr_err_code ndr_pull_srvsvc_NetShareEnumAll(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareEnumAll *r)
15861 uint32_t _ptr_server_unc;
15862 uint32_t size_server_unc_1 = 0;
15863 uint32_t length_server_unc_1 = 0;
15864 uint32_t _ptr_resume_handle;
15865 TALLOC_CTX *_mem_save_server_unc_0;
15866 TALLOC_CTX *_mem_save_info_ctr_0;
15867 TALLOC_CTX *_mem_save_totalentries_0;
15868 TALLOC_CTX *_mem_save_resume_handle_0;
15869 if (flags & NDR_IN) {
15870 ZERO_STRUCT(r->out);
15872 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
15873 if (_ptr_server_unc) {
15874 NDR_PULL_ALLOC(ndr, r->in.server_unc);
15875 } else {
15876 r->in.server_unc = NULL;
15878 if (r->in.server_unc) {
15879 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
15880 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
15881 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
15882 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
15883 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
15884 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
15885 if (length_server_unc_1 > size_server_unc_1) {
15886 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
15888 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
15889 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
15890 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
15892 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15893 NDR_PULL_ALLOC(ndr, r->in.info_ctr);
15895 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
15896 NDR_PULL_SET_MEM_CTX(ndr, r->in.info_ctr, LIBNDR_FLAG_REF_ALLOC);
15897 NDR_CHECK(ndr_pull_srvsvc_NetShareInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
15898 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
15899 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
15900 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
15901 if (_ptr_resume_handle) {
15902 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
15903 } else {
15904 r->in.resume_handle = NULL;
15906 if (r->in.resume_handle) {
15907 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
15908 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
15909 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
15910 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
15912 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
15913 *r->out.info_ctr = *r->in.info_ctr;
15914 NDR_PULL_ALLOC(ndr, r->out.totalentries);
15915 ZERO_STRUCTP(r->out.totalentries);
15917 if (flags & NDR_OUT) {
15918 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15919 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
15921 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
15922 NDR_PULL_SET_MEM_CTX(ndr, r->out.info_ctr, LIBNDR_FLAG_REF_ALLOC);
15923 NDR_CHECK(ndr_pull_srvsvc_NetShareInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
15924 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
15925 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15926 NDR_PULL_ALLOC(ndr, r->out.totalentries);
15928 _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
15929 NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
15930 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
15931 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
15932 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
15933 if (_ptr_resume_handle) {
15934 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
15935 } else {
15936 r->out.resume_handle = NULL;
15938 if (r->out.resume_handle) {
15939 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
15940 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
15941 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
15942 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
15944 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15946 return NDR_ERR_SUCCESS;
15949 _PUBLIC_ void ndr_print_srvsvc_NetShareEnumAll(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareEnumAll *r)
15951 ndr_print_struct(ndr, name, "srvsvc_NetShareEnumAll");
15952 ndr->depth++;
15953 if (flags & NDR_SET_VALUES) {
15954 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15956 if (flags & NDR_IN) {
15957 ndr_print_struct(ndr, "in", "srvsvc_NetShareEnumAll");
15958 ndr->depth++;
15959 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
15960 ndr->depth++;
15961 if (r->in.server_unc) {
15962 ndr_print_string(ndr, "server_unc", r->in.server_unc);
15964 ndr->depth--;
15965 ndr_print_ptr(ndr, "info_ctr", r->in.info_ctr);
15966 ndr->depth++;
15967 ndr_print_srvsvc_NetShareInfoCtr(ndr, "info_ctr", r->in.info_ctr);
15968 ndr->depth--;
15969 ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
15970 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
15971 ndr->depth++;
15972 if (r->in.resume_handle) {
15973 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
15975 ndr->depth--;
15976 ndr->depth--;
15978 if (flags & NDR_OUT) {
15979 ndr_print_struct(ndr, "out", "srvsvc_NetShareEnumAll");
15980 ndr->depth++;
15981 ndr_print_ptr(ndr, "info_ctr", r->out.info_ctr);
15982 ndr->depth++;
15983 ndr_print_srvsvc_NetShareInfoCtr(ndr, "info_ctr", r->out.info_ctr);
15984 ndr->depth--;
15985 ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
15986 ndr->depth++;
15987 ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
15988 ndr->depth--;
15989 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
15990 ndr->depth++;
15991 if (r->out.resume_handle) {
15992 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
15994 ndr->depth--;
15995 ndr_print_WERROR(ndr, "result", r->out.result);
15996 ndr->depth--;
15998 ndr->depth--;
16001 static enum ndr_err_code ndr_push_srvsvc_NetShareGetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareGetInfo *r)
16003 if (flags & NDR_IN) {
16004 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
16005 if (r->in.server_unc) {
16006 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16007 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
16008 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16009 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
16011 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
16012 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
16013 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
16014 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share_name, ndr_charset_length(r->in.share_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
16015 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
16017 if (flags & NDR_OUT) {
16018 if (r->out.info == NULL) {
16019 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16021 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
16022 NDR_CHECK(ndr_push_srvsvc_NetShareInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
16023 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16025 return NDR_ERR_SUCCESS;
16028 static enum ndr_err_code ndr_pull_srvsvc_NetShareGetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareGetInfo *r)
16030 uint32_t _ptr_server_unc;
16031 uint32_t size_server_unc_1 = 0;
16032 uint32_t length_server_unc_1 = 0;
16033 uint32_t size_share_name_0 = 0;
16034 uint32_t length_share_name_0 = 0;
16035 TALLOC_CTX *_mem_save_server_unc_0;
16036 TALLOC_CTX *_mem_save_info_0;
16037 if (flags & NDR_IN) {
16038 ZERO_STRUCT(r->out);
16040 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
16041 if (_ptr_server_unc) {
16042 NDR_PULL_ALLOC(ndr, r->in.server_unc);
16043 } else {
16044 r->in.server_unc = NULL;
16046 if (r->in.server_unc) {
16047 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
16048 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
16049 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
16050 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
16051 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
16052 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
16053 if (length_server_unc_1 > size_server_unc_1) {
16054 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
16056 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
16057 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
16058 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
16060 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share_name));
16061 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share_name));
16062 size_share_name_0 = ndr_get_array_size(ndr, &r->in.share_name);
16063 length_share_name_0 = ndr_get_array_length(ndr, &r->in.share_name);
16064 if (length_share_name_0 > size_share_name_0) {
16065 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_share_name_0, length_share_name_0);
16067 NDR_CHECK(ndr_check_string_terminator(ndr, length_share_name_0, sizeof(uint16_t)));
16068 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share_name, length_share_name_0, sizeof(uint16_t), CH_UTF16));
16069 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
16070 NDR_PULL_ALLOC(ndr, r->out.info);
16071 ZERO_STRUCTP(r->out.info);
16073 if (flags & NDR_OUT) {
16074 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16075 NDR_PULL_ALLOC(ndr, r->out.info);
16077 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
16078 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
16079 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
16080 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
16081 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
16082 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16084 return NDR_ERR_SUCCESS;
16087 _PUBLIC_ void ndr_print_srvsvc_NetShareGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareGetInfo *r)
16089 ndr_print_struct(ndr, name, "srvsvc_NetShareGetInfo");
16090 ndr->depth++;
16091 if (flags & NDR_SET_VALUES) {
16092 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16094 if (flags & NDR_IN) {
16095 ndr_print_struct(ndr, "in", "srvsvc_NetShareGetInfo");
16096 ndr->depth++;
16097 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
16098 ndr->depth++;
16099 if (r->in.server_unc) {
16100 ndr_print_string(ndr, "server_unc", r->in.server_unc);
16102 ndr->depth--;
16103 ndr_print_string(ndr, "share_name", r->in.share_name);
16104 ndr_print_uint32(ndr, "level", r->in.level);
16105 ndr->depth--;
16107 if (flags & NDR_OUT) {
16108 ndr_print_struct(ndr, "out", "srvsvc_NetShareGetInfo");
16109 ndr->depth++;
16110 ndr_print_ptr(ndr, "info", r->out.info);
16111 ndr->depth++;
16112 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
16113 ndr_print_srvsvc_NetShareInfo(ndr, "info", r->out.info);
16114 ndr->depth--;
16115 ndr_print_WERROR(ndr, "result", r->out.result);
16116 ndr->depth--;
16118 ndr->depth--;
16121 static enum ndr_err_code ndr_push_srvsvc_NetShareSetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareSetInfo *r)
16123 if (flags & NDR_IN) {
16124 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
16125 if (r->in.server_unc) {
16126 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16127 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
16128 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16129 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
16131 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
16132 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
16133 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
16134 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share_name, ndr_charset_length(r->in.share_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
16135 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
16136 if (r->in.info == NULL) {
16137 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16139 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
16140 NDR_CHECK(ndr_push_srvsvc_NetShareInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
16141 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.parm_error));
16142 if (r->in.parm_error) {
16143 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.parm_error));
16146 if (flags & NDR_OUT) {
16147 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.parm_error));
16148 if (r->out.parm_error) {
16149 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.parm_error));
16151 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16153 return NDR_ERR_SUCCESS;
16156 static enum ndr_err_code ndr_pull_srvsvc_NetShareSetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareSetInfo *r)
16158 uint32_t _ptr_server_unc;
16159 uint32_t size_server_unc_1 = 0;
16160 uint32_t length_server_unc_1 = 0;
16161 uint32_t size_share_name_0 = 0;
16162 uint32_t length_share_name_0 = 0;
16163 uint32_t _ptr_parm_error;
16164 TALLOC_CTX *_mem_save_server_unc_0;
16165 TALLOC_CTX *_mem_save_info_0;
16166 TALLOC_CTX *_mem_save_parm_error_0;
16167 if (flags & NDR_IN) {
16168 ZERO_STRUCT(r->out);
16170 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
16171 if (_ptr_server_unc) {
16172 NDR_PULL_ALLOC(ndr, r->in.server_unc);
16173 } else {
16174 r->in.server_unc = NULL;
16176 if (r->in.server_unc) {
16177 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
16178 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
16179 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
16180 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
16181 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
16182 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
16183 if (length_server_unc_1 > size_server_unc_1) {
16184 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
16186 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
16187 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
16188 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
16190 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share_name));
16191 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share_name));
16192 size_share_name_0 = ndr_get_array_size(ndr, &r->in.share_name);
16193 length_share_name_0 = ndr_get_array_length(ndr, &r->in.share_name);
16194 if (length_share_name_0 > size_share_name_0) {
16195 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_share_name_0, length_share_name_0);
16197 NDR_CHECK(ndr_check_string_terminator(ndr, length_share_name_0, sizeof(uint16_t)));
16198 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share_name, length_share_name_0, sizeof(uint16_t), CH_UTF16));
16199 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
16200 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16201 NDR_PULL_ALLOC(ndr, r->in.info);
16203 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
16204 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
16205 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
16206 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
16207 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
16208 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
16209 if (_ptr_parm_error) {
16210 NDR_PULL_ALLOC(ndr, r->in.parm_error);
16211 } else {
16212 r->in.parm_error = NULL;
16214 if (r->in.parm_error) {
16215 _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
16216 NDR_PULL_SET_MEM_CTX(ndr, r->in.parm_error, 0);
16217 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.parm_error));
16218 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
16221 if (flags & NDR_OUT) {
16222 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
16223 if (_ptr_parm_error) {
16224 NDR_PULL_ALLOC(ndr, r->out.parm_error);
16225 } else {
16226 r->out.parm_error = NULL;
16228 if (r->out.parm_error) {
16229 _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
16230 NDR_PULL_SET_MEM_CTX(ndr, r->out.parm_error, 0);
16231 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.parm_error));
16232 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
16234 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16236 return NDR_ERR_SUCCESS;
16239 _PUBLIC_ void ndr_print_srvsvc_NetShareSetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareSetInfo *r)
16241 ndr_print_struct(ndr, name, "srvsvc_NetShareSetInfo");
16242 ndr->depth++;
16243 if (flags & NDR_SET_VALUES) {
16244 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16246 if (flags & NDR_IN) {
16247 ndr_print_struct(ndr, "in", "srvsvc_NetShareSetInfo");
16248 ndr->depth++;
16249 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
16250 ndr->depth++;
16251 if (r->in.server_unc) {
16252 ndr_print_string(ndr, "server_unc", r->in.server_unc);
16254 ndr->depth--;
16255 ndr_print_string(ndr, "share_name", r->in.share_name);
16256 ndr_print_uint32(ndr, "level", r->in.level);
16257 ndr_print_ptr(ndr, "info", r->in.info);
16258 ndr->depth++;
16259 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
16260 ndr_print_srvsvc_NetShareInfo(ndr, "info", r->in.info);
16261 ndr->depth--;
16262 ndr_print_ptr(ndr, "parm_error", r->in.parm_error);
16263 ndr->depth++;
16264 if (r->in.parm_error) {
16265 ndr_print_uint32(ndr, "parm_error", *r->in.parm_error);
16267 ndr->depth--;
16268 ndr->depth--;
16270 if (flags & NDR_OUT) {
16271 ndr_print_struct(ndr, "out", "srvsvc_NetShareSetInfo");
16272 ndr->depth++;
16273 ndr_print_ptr(ndr, "parm_error", r->out.parm_error);
16274 ndr->depth++;
16275 if (r->out.parm_error) {
16276 ndr_print_uint32(ndr, "parm_error", *r->out.parm_error);
16278 ndr->depth--;
16279 ndr_print_WERROR(ndr, "result", r->out.result);
16280 ndr->depth--;
16282 ndr->depth--;
16285 static enum ndr_err_code ndr_push_srvsvc_NetShareDel(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareDel *r)
16287 if (flags & NDR_IN) {
16288 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
16289 if (r->in.server_unc) {
16290 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16291 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
16292 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16293 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
16295 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
16296 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
16297 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
16298 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share_name, ndr_charset_length(r->in.share_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
16299 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.reserved));
16301 if (flags & NDR_OUT) {
16302 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16304 return NDR_ERR_SUCCESS;
16307 static enum ndr_err_code ndr_pull_srvsvc_NetShareDel(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareDel *r)
16309 uint32_t _ptr_server_unc;
16310 uint32_t size_server_unc_1 = 0;
16311 uint32_t length_server_unc_1 = 0;
16312 uint32_t size_share_name_0 = 0;
16313 uint32_t length_share_name_0 = 0;
16314 TALLOC_CTX *_mem_save_server_unc_0;
16315 if (flags & NDR_IN) {
16316 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
16317 if (_ptr_server_unc) {
16318 NDR_PULL_ALLOC(ndr, r->in.server_unc);
16319 } else {
16320 r->in.server_unc = NULL;
16322 if (r->in.server_unc) {
16323 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
16324 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
16325 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
16326 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
16327 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
16328 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
16329 if (length_server_unc_1 > size_server_unc_1) {
16330 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
16332 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
16333 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
16334 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
16336 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share_name));
16337 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share_name));
16338 size_share_name_0 = ndr_get_array_size(ndr, &r->in.share_name);
16339 length_share_name_0 = ndr_get_array_length(ndr, &r->in.share_name);
16340 if (length_share_name_0 > size_share_name_0) {
16341 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_share_name_0, length_share_name_0);
16343 NDR_CHECK(ndr_check_string_terminator(ndr, length_share_name_0, sizeof(uint16_t)));
16344 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share_name, length_share_name_0, sizeof(uint16_t), CH_UTF16));
16345 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.reserved));
16347 if (flags & NDR_OUT) {
16348 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16350 return NDR_ERR_SUCCESS;
16353 _PUBLIC_ void ndr_print_srvsvc_NetShareDel(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareDel *r)
16355 ndr_print_struct(ndr, name, "srvsvc_NetShareDel");
16356 ndr->depth++;
16357 if (flags & NDR_SET_VALUES) {
16358 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16360 if (flags & NDR_IN) {
16361 ndr_print_struct(ndr, "in", "srvsvc_NetShareDel");
16362 ndr->depth++;
16363 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
16364 ndr->depth++;
16365 if (r->in.server_unc) {
16366 ndr_print_string(ndr, "server_unc", r->in.server_unc);
16368 ndr->depth--;
16369 ndr_print_string(ndr, "share_name", r->in.share_name);
16370 ndr_print_uint32(ndr, "reserved", r->in.reserved);
16371 ndr->depth--;
16373 if (flags & NDR_OUT) {
16374 ndr_print_struct(ndr, "out", "srvsvc_NetShareDel");
16375 ndr->depth++;
16376 ndr_print_WERROR(ndr, "result", r->out.result);
16377 ndr->depth--;
16379 ndr->depth--;
16382 static enum ndr_err_code ndr_push_srvsvc_NetShareDelSticky(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareDelSticky *r)
16384 if (flags & NDR_IN) {
16385 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
16386 if (r->in.server_unc) {
16387 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16388 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
16389 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16390 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
16392 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
16393 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
16394 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
16395 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share_name, ndr_charset_length(r->in.share_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
16396 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.reserved));
16398 if (flags & NDR_OUT) {
16399 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16401 return NDR_ERR_SUCCESS;
16404 static enum ndr_err_code ndr_pull_srvsvc_NetShareDelSticky(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareDelSticky *r)
16406 uint32_t _ptr_server_unc;
16407 uint32_t size_server_unc_1 = 0;
16408 uint32_t length_server_unc_1 = 0;
16409 uint32_t size_share_name_0 = 0;
16410 uint32_t length_share_name_0 = 0;
16411 TALLOC_CTX *_mem_save_server_unc_0;
16412 if (flags & NDR_IN) {
16413 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
16414 if (_ptr_server_unc) {
16415 NDR_PULL_ALLOC(ndr, r->in.server_unc);
16416 } else {
16417 r->in.server_unc = NULL;
16419 if (r->in.server_unc) {
16420 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
16421 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
16422 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
16423 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
16424 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
16425 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
16426 if (length_server_unc_1 > size_server_unc_1) {
16427 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
16429 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
16430 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
16431 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
16433 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share_name));
16434 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share_name));
16435 size_share_name_0 = ndr_get_array_size(ndr, &r->in.share_name);
16436 length_share_name_0 = ndr_get_array_length(ndr, &r->in.share_name);
16437 if (length_share_name_0 > size_share_name_0) {
16438 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_share_name_0, length_share_name_0);
16440 NDR_CHECK(ndr_check_string_terminator(ndr, length_share_name_0, sizeof(uint16_t)));
16441 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share_name, length_share_name_0, sizeof(uint16_t), CH_UTF16));
16442 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.reserved));
16444 if (flags & NDR_OUT) {
16445 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16447 return NDR_ERR_SUCCESS;
16450 _PUBLIC_ void ndr_print_srvsvc_NetShareDelSticky(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareDelSticky *r)
16452 ndr_print_struct(ndr, name, "srvsvc_NetShareDelSticky");
16453 ndr->depth++;
16454 if (flags & NDR_SET_VALUES) {
16455 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16457 if (flags & NDR_IN) {
16458 ndr_print_struct(ndr, "in", "srvsvc_NetShareDelSticky");
16459 ndr->depth++;
16460 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
16461 ndr->depth++;
16462 if (r->in.server_unc) {
16463 ndr_print_string(ndr, "server_unc", r->in.server_unc);
16465 ndr->depth--;
16466 ndr_print_string(ndr, "share_name", r->in.share_name);
16467 ndr_print_uint32(ndr, "reserved", r->in.reserved);
16468 ndr->depth--;
16470 if (flags & NDR_OUT) {
16471 ndr_print_struct(ndr, "out", "srvsvc_NetShareDelSticky");
16472 ndr->depth++;
16473 ndr_print_WERROR(ndr, "result", r->out.result);
16474 ndr->depth--;
16476 ndr->depth--;
16479 static enum ndr_err_code ndr_push_srvsvc_NetShareCheck(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareCheck *r)
16481 if (flags & NDR_IN) {
16482 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
16483 if (r->in.server_unc) {
16484 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16485 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
16486 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16487 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
16489 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.device_name, CH_UTF16)));
16490 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
16491 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.device_name, CH_UTF16)));
16492 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.device_name, ndr_charset_length(r->in.device_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
16494 if (flags & NDR_OUT) {
16495 if (r->out.type == NULL) {
16496 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16498 NDR_CHECK(ndr_push_srvsvc_ShareType(ndr, NDR_SCALARS, *r->out.type));
16499 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16501 return NDR_ERR_SUCCESS;
16504 static enum ndr_err_code ndr_pull_srvsvc_NetShareCheck(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareCheck *r)
16506 uint32_t _ptr_server_unc;
16507 uint32_t size_server_unc_1 = 0;
16508 uint32_t length_server_unc_1 = 0;
16509 uint32_t size_device_name_0 = 0;
16510 uint32_t length_device_name_0 = 0;
16511 TALLOC_CTX *_mem_save_server_unc_0;
16512 TALLOC_CTX *_mem_save_type_0;
16513 if (flags & NDR_IN) {
16514 ZERO_STRUCT(r->out);
16516 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
16517 if (_ptr_server_unc) {
16518 NDR_PULL_ALLOC(ndr, r->in.server_unc);
16519 } else {
16520 r->in.server_unc = NULL;
16522 if (r->in.server_unc) {
16523 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
16524 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
16525 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
16526 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
16527 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
16528 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
16529 if (length_server_unc_1 > size_server_unc_1) {
16530 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
16532 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
16533 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
16534 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
16536 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.device_name));
16537 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.device_name));
16538 size_device_name_0 = ndr_get_array_size(ndr, &r->in.device_name);
16539 length_device_name_0 = ndr_get_array_length(ndr, &r->in.device_name);
16540 if (length_device_name_0 > size_device_name_0) {
16541 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_device_name_0, length_device_name_0);
16543 NDR_CHECK(ndr_check_string_terminator(ndr, length_device_name_0, sizeof(uint16_t)));
16544 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.device_name, length_device_name_0, sizeof(uint16_t), CH_UTF16));
16545 NDR_PULL_ALLOC(ndr, r->out.type);
16546 ZERO_STRUCTP(r->out.type);
16548 if (flags & NDR_OUT) {
16549 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16550 NDR_PULL_ALLOC(ndr, r->out.type);
16552 _mem_save_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
16553 NDR_PULL_SET_MEM_CTX(ndr, r->out.type, LIBNDR_FLAG_REF_ALLOC);
16554 NDR_CHECK(ndr_pull_srvsvc_ShareType(ndr, NDR_SCALARS, r->out.type));
16555 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_type_0, LIBNDR_FLAG_REF_ALLOC);
16556 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16558 return NDR_ERR_SUCCESS;
16561 _PUBLIC_ void ndr_print_srvsvc_NetShareCheck(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareCheck *r)
16563 ndr_print_struct(ndr, name, "srvsvc_NetShareCheck");
16564 ndr->depth++;
16565 if (flags & NDR_SET_VALUES) {
16566 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16568 if (flags & NDR_IN) {
16569 ndr_print_struct(ndr, "in", "srvsvc_NetShareCheck");
16570 ndr->depth++;
16571 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
16572 ndr->depth++;
16573 if (r->in.server_unc) {
16574 ndr_print_string(ndr, "server_unc", r->in.server_unc);
16576 ndr->depth--;
16577 ndr_print_string(ndr, "device_name", r->in.device_name);
16578 ndr->depth--;
16580 if (flags & NDR_OUT) {
16581 ndr_print_struct(ndr, "out", "srvsvc_NetShareCheck");
16582 ndr->depth++;
16583 ndr_print_ptr(ndr, "type", r->out.type);
16584 ndr->depth++;
16585 ndr_print_srvsvc_ShareType(ndr, "type", *r->out.type);
16586 ndr->depth--;
16587 ndr_print_WERROR(ndr, "result", r->out.result);
16588 ndr->depth--;
16590 ndr->depth--;
16593 static enum ndr_err_code ndr_push_srvsvc_NetSrvGetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetSrvGetInfo *r)
16595 if (flags & NDR_IN) {
16596 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
16597 if (r->in.server_unc) {
16598 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16599 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
16600 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16601 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
16603 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
16605 if (flags & NDR_OUT) {
16606 if (r->out.info == NULL) {
16607 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16609 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
16610 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
16611 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16613 return NDR_ERR_SUCCESS;
16616 static enum ndr_err_code ndr_pull_srvsvc_NetSrvGetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetSrvGetInfo *r)
16618 uint32_t _ptr_server_unc;
16619 uint32_t size_server_unc_1 = 0;
16620 uint32_t length_server_unc_1 = 0;
16621 TALLOC_CTX *_mem_save_server_unc_0;
16622 TALLOC_CTX *_mem_save_info_0;
16623 if (flags & NDR_IN) {
16624 ZERO_STRUCT(r->out);
16626 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
16627 if (_ptr_server_unc) {
16628 NDR_PULL_ALLOC(ndr, r->in.server_unc);
16629 } else {
16630 r->in.server_unc = NULL;
16632 if (r->in.server_unc) {
16633 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
16634 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
16635 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
16636 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
16637 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
16638 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
16639 if (length_server_unc_1 > size_server_unc_1) {
16640 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
16642 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
16643 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
16644 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
16646 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
16647 NDR_PULL_ALLOC(ndr, r->out.info);
16648 ZERO_STRUCTP(r->out.info);
16650 if (flags & NDR_OUT) {
16651 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16652 NDR_PULL_ALLOC(ndr, r->out.info);
16654 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
16655 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
16656 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
16657 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
16658 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
16659 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16661 return NDR_ERR_SUCCESS;
16664 _PUBLIC_ void ndr_print_srvsvc_NetSrvGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSrvGetInfo *r)
16666 ndr_print_struct(ndr, name, "srvsvc_NetSrvGetInfo");
16667 ndr->depth++;
16668 if (flags & NDR_SET_VALUES) {
16669 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16671 if (flags & NDR_IN) {
16672 ndr_print_struct(ndr, "in", "srvsvc_NetSrvGetInfo");
16673 ndr->depth++;
16674 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
16675 ndr->depth++;
16676 if (r->in.server_unc) {
16677 ndr_print_string(ndr, "server_unc", r->in.server_unc);
16679 ndr->depth--;
16680 ndr_print_uint32(ndr, "level", r->in.level);
16681 ndr->depth--;
16683 if (flags & NDR_OUT) {
16684 ndr_print_struct(ndr, "out", "srvsvc_NetSrvGetInfo");
16685 ndr->depth++;
16686 ndr_print_ptr(ndr, "info", r->out.info);
16687 ndr->depth++;
16688 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
16689 ndr_print_srvsvc_NetSrvInfo(ndr, "info", r->out.info);
16690 ndr->depth--;
16691 ndr_print_WERROR(ndr, "result", r->out.result);
16692 ndr->depth--;
16694 ndr->depth--;
16697 static enum ndr_err_code ndr_push_srvsvc_NetSrvSetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetSrvSetInfo *r)
16699 if (flags & NDR_IN) {
16700 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
16701 if (r->in.server_unc) {
16702 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16703 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
16704 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16705 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
16707 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
16708 if (r->in.info == NULL) {
16709 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16711 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
16712 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
16713 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.parm_error));
16714 if (r->in.parm_error) {
16715 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.parm_error));
16718 if (flags & NDR_OUT) {
16719 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.parm_error));
16720 if (r->out.parm_error) {
16721 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.parm_error));
16723 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16725 return NDR_ERR_SUCCESS;
16728 static enum ndr_err_code ndr_pull_srvsvc_NetSrvSetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetSrvSetInfo *r)
16730 uint32_t _ptr_server_unc;
16731 uint32_t size_server_unc_1 = 0;
16732 uint32_t length_server_unc_1 = 0;
16733 uint32_t _ptr_parm_error;
16734 TALLOC_CTX *_mem_save_server_unc_0;
16735 TALLOC_CTX *_mem_save_info_0;
16736 TALLOC_CTX *_mem_save_parm_error_0;
16737 if (flags & NDR_IN) {
16738 ZERO_STRUCT(r->out);
16740 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
16741 if (_ptr_server_unc) {
16742 NDR_PULL_ALLOC(ndr, r->in.server_unc);
16743 } else {
16744 r->in.server_unc = NULL;
16746 if (r->in.server_unc) {
16747 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
16748 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
16749 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
16750 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
16751 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
16752 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
16753 if (length_server_unc_1 > size_server_unc_1) {
16754 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
16756 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
16757 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
16758 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
16760 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
16761 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16762 NDR_PULL_ALLOC(ndr, r->in.info);
16764 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
16765 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
16766 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
16767 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
16768 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
16769 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
16770 if (_ptr_parm_error) {
16771 NDR_PULL_ALLOC(ndr, r->in.parm_error);
16772 } else {
16773 r->in.parm_error = NULL;
16775 if (r->in.parm_error) {
16776 _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
16777 NDR_PULL_SET_MEM_CTX(ndr, r->in.parm_error, 0);
16778 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.parm_error));
16779 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
16782 if (flags & NDR_OUT) {
16783 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
16784 if (_ptr_parm_error) {
16785 NDR_PULL_ALLOC(ndr, r->out.parm_error);
16786 } else {
16787 r->out.parm_error = NULL;
16789 if (r->out.parm_error) {
16790 _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
16791 NDR_PULL_SET_MEM_CTX(ndr, r->out.parm_error, 0);
16792 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.parm_error));
16793 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
16795 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16797 return NDR_ERR_SUCCESS;
16800 _PUBLIC_ void ndr_print_srvsvc_NetSrvSetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSrvSetInfo *r)
16802 ndr_print_struct(ndr, name, "srvsvc_NetSrvSetInfo");
16803 ndr->depth++;
16804 if (flags & NDR_SET_VALUES) {
16805 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16807 if (flags & NDR_IN) {
16808 ndr_print_struct(ndr, "in", "srvsvc_NetSrvSetInfo");
16809 ndr->depth++;
16810 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
16811 ndr->depth++;
16812 if (r->in.server_unc) {
16813 ndr_print_string(ndr, "server_unc", r->in.server_unc);
16815 ndr->depth--;
16816 ndr_print_uint32(ndr, "level", r->in.level);
16817 ndr_print_ptr(ndr, "info", r->in.info);
16818 ndr->depth++;
16819 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
16820 ndr_print_srvsvc_NetSrvInfo(ndr, "info", r->in.info);
16821 ndr->depth--;
16822 ndr_print_ptr(ndr, "parm_error", r->in.parm_error);
16823 ndr->depth++;
16824 if (r->in.parm_error) {
16825 ndr_print_uint32(ndr, "parm_error", *r->in.parm_error);
16827 ndr->depth--;
16828 ndr->depth--;
16830 if (flags & NDR_OUT) {
16831 ndr_print_struct(ndr, "out", "srvsvc_NetSrvSetInfo");
16832 ndr->depth++;
16833 ndr_print_ptr(ndr, "parm_error", r->out.parm_error);
16834 ndr->depth++;
16835 if (r->out.parm_error) {
16836 ndr_print_uint32(ndr, "parm_error", *r->out.parm_error);
16838 ndr->depth--;
16839 ndr_print_WERROR(ndr, "result", r->out.result);
16840 ndr->depth--;
16842 ndr->depth--;
16845 static enum ndr_err_code ndr_push_srvsvc_NetDiskEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetDiskEnum *r)
16847 if (flags & NDR_IN) {
16848 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
16849 if (r->in.server_unc) {
16850 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16851 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
16852 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16853 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
16855 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
16856 if (r->in.info == NULL) {
16857 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16859 NDR_CHECK(ndr_push_srvsvc_NetDiskInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
16860 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.maxlen));
16861 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
16862 if (r->in.resume_handle) {
16863 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
16866 if (flags & NDR_OUT) {
16867 if (r->out.info == NULL) {
16868 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16870 NDR_CHECK(ndr_push_srvsvc_NetDiskInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
16871 if (r->out.totalentries == NULL) {
16872 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16874 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
16875 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
16876 if (r->out.resume_handle) {
16877 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
16879 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16881 return NDR_ERR_SUCCESS;
16884 static enum ndr_err_code ndr_pull_srvsvc_NetDiskEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetDiskEnum *r)
16886 uint32_t _ptr_server_unc;
16887 uint32_t size_server_unc_1 = 0;
16888 uint32_t length_server_unc_1 = 0;
16889 uint32_t _ptr_resume_handle;
16890 TALLOC_CTX *_mem_save_server_unc_0;
16891 TALLOC_CTX *_mem_save_info_0;
16892 TALLOC_CTX *_mem_save_totalentries_0;
16893 TALLOC_CTX *_mem_save_resume_handle_0;
16894 if (flags & NDR_IN) {
16895 ZERO_STRUCT(r->out);
16897 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
16898 if (_ptr_server_unc) {
16899 NDR_PULL_ALLOC(ndr, r->in.server_unc);
16900 } else {
16901 r->in.server_unc = NULL;
16903 if (r->in.server_unc) {
16904 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
16905 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
16906 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
16907 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
16908 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
16909 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
16910 if (length_server_unc_1 > size_server_unc_1) {
16911 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
16913 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
16914 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
16915 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
16917 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
16918 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16919 NDR_PULL_ALLOC(ndr, r->in.info);
16921 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
16922 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
16923 NDR_CHECK(ndr_pull_srvsvc_NetDiskInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
16924 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
16925 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.maxlen));
16926 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
16927 if (_ptr_resume_handle) {
16928 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
16929 } else {
16930 r->in.resume_handle = NULL;
16932 if (r->in.resume_handle) {
16933 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
16934 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
16935 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
16936 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
16938 NDR_PULL_ALLOC(ndr, r->out.info);
16939 *r->out.info = *r->in.info;
16940 NDR_PULL_ALLOC(ndr, r->out.totalentries);
16941 ZERO_STRUCTP(r->out.totalentries);
16943 if (flags & NDR_OUT) {
16944 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16945 NDR_PULL_ALLOC(ndr, r->out.info);
16947 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
16948 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
16949 NDR_CHECK(ndr_pull_srvsvc_NetDiskInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
16950 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
16951 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16952 NDR_PULL_ALLOC(ndr, r->out.totalentries);
16954 _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
16955 NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
16956 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
16957 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
16958 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
16959 if (_ptr_resume_handle) {
16960 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
16961 } else {
16962 r->out.resume_handle = NULL;
16964 if (r->out.resume_handle) {
16965 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
16966 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
16967 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
16968 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
16970 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16972 return NDR_ERR_SUCCESS;
16975 _PUBLIC_ void ndr_print_srvsvc_NetDiskEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetDiskEnum *r)
16977 ndr_print_struct(ndr, name, "srvsvc_NetDiskEnum");
16978 ndr->depth++;
16979 if (flags & NDR_SET_VALUES) {
16980 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16982 if (flags & NDR_IN) {
16983 ndr_print_struct(ndr, "in", "srvsvc_NetDiskEnum");
16984 ndr->depth++;
16985 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
16986 ndr->depth++;
16987 if (r->in.server_unc) {
16988 ndr_print_string(ndr, "server_unc", r->in.server_unc);
16990 ndr->depth--;
16991 ndr_print_uint32(ndr, "level", r->in.level);
16992 ndr_print_ptr(ndr, "info", r->in.info);
16993 ndr->depth++;
16994 ndr_print_srvsvc_NetDiskInfo(ndr, "info", r->in.info);
16995 ndr->depth--;
16996 ndr_print_uint32(ndr, "maxlen", r->in.maxlen);
16997 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
16998 ndr->depth++;
16999 if (r->in.resume_handle) {
17000 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
17002 ndr->depth--;
17003 ndr->depth--;
17005 if (flags & NDR_OUT) {
17006 ndr_print_struct(ndr, "out", "srvsvc_NetDiskEnum");
17007 ndr->depth++;
17008 ndr_print_ptr(ndr, "info", r->out.info);
17009 ndr->depth++;
17010 ndr_print_srvsvc_NetDiskInfo(ndr, "info", r->out.info);
17011 ndr->depth--;
17012 ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
17013 ndr->depth++;
17014 ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
17015 ndr->depth--;
17016 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
17017 ndr->depth++;
17018 if (r->out.resume_handle) {
17019 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
17021 ndr->depth--;
17022 ndr_print_WERROR(ndr, "result", r->out.result);
17023 ndr->depth--;
17025 ndr->depth--;
17028 static enum ndr_err_code ndr_push_srvsvc_NetServerStatisticsGet(struct ndr_push *ndr, int flags, const struct srvsvc_NetServerStatisticsGet *r)
17030 if (flags & NDR_IN) {
17031 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
17032 if (r->in.server_unc) {
17033 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17034 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17035 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17036 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17038 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service));
17039 if (r->in.service) {
17040 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.service, CH_UTF16)));
17041 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17042 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.service, CH_UTF16)));
17043 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.service, ndr_charset_length(r->in.service, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17045 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
17046 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.options));
17048 if (flags & NDR_OUT) {
17049 if (r->out.stats == NULL) {
17050 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17052 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.stats));
17053 if (*r->out.stats) {
17054 NDR_CHECK(ndr_push_srvsvc_Statistics(ndr, NDR_SCALARS, *r->out.stats));
17056 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17058 return NDR_ERR_SUCCESS;
17061 static enum ndr_err_code ndr_pull_srvsvc_NetServerStatisticsGet(struct ndr_pull *ndr, int flags, struct srvsvc_NetServerStatisticsGet *r)
17063 uint32_t _ptr_server_unc;
17064 uint32_t size_server_unc_1 = 0;
17065 uint32_t length_server_unc_1 = 0;
17066 uint32_t _ptr_service;
17067 uint32_t size_service_1 = 0;
17068 uint32_t length_service_1 = 0;
17069 uint32_t _ptr_stats;
17070 TALLOC_CTX *_mem_save_server_unc_0;
17071 TALLOC_CTX *_mem_save_service_0;
17072 TALLOC_CTX *_mem_save_stats_0;
17073 TALLOC_CTX *_mem_save_stats_1;
17074 if (flags & NDR_IN) {
17075 ZERO_STRUCT(r->out);
17077 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
17078 if (_ptr_server_unc) {
17079 NDR_PULL_ALLOC(ndr, r->in.server_unc);
17080 } else {
17081 r->in.server_unc = NULL;
17083 if (r->in.server_unc) {
17084 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
17085 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
17086 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
17087 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
17088 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
17089 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
17090 if (length_server_unc_1 > size_server_unc_1) {
17091 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
17093 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
17094 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
17095 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
17097 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service));
17098 if (_ptr_service) {
17099 NDR_PULL_ALLOC(ndr, r->in.service);
17100 } else {
17101 r->in.service = NULL;
17103 if (r->in.service) {
17104 _mem_save_service_0 = NDR_PULL_GET_MEM_CTX(ndr);
17105 NDR_PULL_SET_MEM_CTX(ndr, r->in.service, 0);
17106 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service));
17107 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service));
17108 size_service_1 = ndr_get_array_size(ndr, &r->in.service);
17109 length_service_1 = ndr_get_array_length(ndr, &r->in.service);
17110 if (length_service_1 > size_service_1) {
17111 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_service_1, length_service_1);
17113 NDR_CHECK(ndr_check_string_terminator(ndr, length_service_1, sizeof(uint16_t)));
17114 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.service, length_service_1, sizeof(uint16_t), CH_UTF16));
17115 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_0, 0);
17117 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
17118 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.options));
17119 NDR_PULL_ALLOC(ndr, r->out.stats);
17120 ZERO_STRUCTP(r->out.stats);
17122 if (flags & NDR_OUT) {
17123 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17124 NDR_PULL_ALLOC(ndr, r->out.stats);
17126 _mem_save_stats_0 = NDR_PULL_GET_MEM_CTX(ndr);
17127 NDR_PULL_SET_MEM_CTX(ndr, r->out.stats, LIBNDR_FLAG_REF_ALLOC);
17128 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_stats));
17129 if (_ptr_stats) {
17130 NDR_PULL_ALLOC(ndr, *r->out.stats);
17131 } else {
17132 *r->out.stats = NULL;
17134 if (*r->out.stats) {
17135 _mem_save_stats_1 = NDR_PULL_GET_MEM_CTX(ndr);
17136 NDR_PULL_SET_MEM_CTX(ndr, *r->out.stats, 0);
17137 NDR_CHECK(ndr_pull_srvsvc_Statistics(ndr, NDR_SCALARS, *r->out.stats));
17138 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stats_1, 0);
17140 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stats_0, LIBNDR_FLAG_REF_ALLOC);
17141 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17143 return NDR_ERR_SUCCESS;
17146 _PUBLIC_ void ndr_print_srvsvc_NetServerStatisticsGet(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetServerStatisticsGet *r)
17148 ndr_print_struct(ndr, name, "srvsvc_NetServerStatisticsGet");
17149 ndr->depth++;
17150 if (flags & NDR_SET_VALUES) {
17151 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17153 if (flags & NDR_IN) {
17154 ndr_print_struct(ndr, "in", "srvsvc_NetServerStatisticsGet");
17155 ndr->depth++;
17156 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
17157 ndr->depth++;
17158 if (r->in.server_unc) {
17159 ndr_print_string(ndr, "server_unc", r->in.server_unc);
17161 ndr->depth--;
17162 ndr_print_ptr(ndr, "service", r->in.service);
17163 ndr->depth++;
17164 if (r->in.service) {
17165 ndr_print_string(ndr, "service", r->in.service);
17167 ndr->depth--;
17168 ndr_print_uint32(ndr, "level", r->in.level);
17169 ndr_print_uint32(ndr, "options", r->in.options);
17170 ndr->depth--;
17172 if (flags & NDR_OUT) {
17173 ndr_print_struct(ndr, "out", "srvsvc_NetServerStatisticsGet");
17174 ndr->depth++;
17175 ndr_print_ptr(ndr, "stats", r->out.stats);
17176 ndr->depth++;
17177 ndr_print_ptr(ndr, "stats", *r->out.stats);
17178 ndr->depth++;
17179 if (*r->out.stats) {
17180 ndr_print_srvsvc_Statistics(ndr, "stats", *r->out.stats);
17182 ndr->depth--;
17183 ndr->depth--;
17184 ndr_print_WERROR(ndr, "result", r->out.result);
17185 ndr->depth--;
17187 ndr->depth--;
17190 static enum ndr_err_code ndr_push_srvsvc_NetTransportAdd(struct ndr_push *ndr, int flags, const struct srvsvc_NetTransportAdd *r)
17192 if (flags & NDR_IN) {
17193 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
17194 if (r->in.server_unc) {
17195 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17196 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17197 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17198 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17200 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
17201 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.info, r->in.level));
17202 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
17204 if (flags & NDR_OUT) {
17205 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17207 return NDR_ERR_SUCCESS;
17210 static enum ndr_err_code ndr_pull_srvsvc_NetTransportAdd(struct ndr_pull *ndr, int flags, struct srvsvc_NetTransportAdd *r)
17212 uint32_t _ptr_server_unc;
17213 uint32_t size_server_unc_1 = 0;
17214 uint32_t length_server_unc_1 = 0;
17215 TALLOC_CTX *_mem_save_server_unc_0;
17216 if (flags & NDR_IN) {
17217 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
17218 if (_ptr_server_unc) {
17219 NDR_PULL_ALLOC(ndr, r->in.server_unc);
17220 } else {
17221 r->in.server_unc = NULL;
17223 if (r->in.server_unc) {
17224 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
17225 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
17226 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
17227 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
17228 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
17229 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
17230 if (length_server_unc_1 > size_server_unc_1) {
17231 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
17233 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
17234 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
17235 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
17237 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
17238 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.info, r->in.level));
17239 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
17241 if (flags & NDR_OUT) {
17242 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17244 return NDR_ERR_SUCCESS;
17247 _PUBLIC_ void ndr_print_srvsvc_NetTransportAdd(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetTransportAdd *r)
17249 ndr_print_struct(ndr, name, "srvsvc_NetTransportAdd");
17250 ndr->depth++;
17251 if (flags & NDR_SET_VALUES) {
17252 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17254 if (flags & NDR_IN) {
17255 ndr_print_struct(ndr, "in", "srvsvc_NetTransportAdd");
17256 ndr->depth++;
17257 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
17258 ndr->depth++;
17259 if (r->in.server_unc) {
17260 ndr_print_string(ndr, "server_unc", r->in.server_unc);
17262 ndr->depth--;
17263 ndr_print_uint32(ndr, "level", r->in.level);
17264 ndr_print_set_switch_value(ndr, &r->in.info, r->in.level);
17265 ndr_print_srvsvc_NetTransportInfo(ndr, "info", &r->in.info);
17266 ndr->depth--;
17268 if (flags & NDR_OUT) {
17269 ndr_print_struct(ndr, "out", "srvsvc_NetTransportAdd");
17270 ndr->depth++;
17271 ndr_print_WERROR(ndr, "result", r->out.result);
17272 ndr->depth--;
17274 ndr->depth--;
17277 static enum ndr_err_code ndr_push_srvsvc_NetTransportEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetTransportEnum *r)
17279 if (flags & NDR_IN) {
17280 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
17281 if (r->in.server_unc) {
17282 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17283 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17284 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17285 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17287 if (r->in.transports == NULL) {
17288 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17290 NDR_CHECK(ndr_push_srvsvc_NetTransportInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.transports));
17291 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
17292 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
17293 if (r->in.resume_handle) {
17294 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
17297 if (flags & NDR_OUT) {
17298 if (r->out.transports == NULL) {
17299 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17301 NDR_CHECK(ndr_push_srvsvc_NetTransportInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.transports));
17302 if (r->out.totalentries == NULL) {
17303 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17305 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
17306 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
17307 if (r->out.resume_handle) {
17308 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
17310 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17312 return NDR_ERR_SUCCESS;
17315 static enum ndr_err_code ndr_pull_srvsvc_NetTransportEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetTransportEnum *r)
17317 uint32_t _ptr_server_unc;
17318 uint32_t size_server_unc_1 = 0;
17319 uint32_t length_server_unc_1 = 0;
17320 uint32_t _ptr_resume_handle;
17321 TALLOC_CTX *_mem_save_server_unc_0;
17322 TALLOC_CTX *_mem_save_transports_0;
17323 TALLOC_CTX *_mem_save_totalentries_0;
17324 TALLOC_CTX *_mem_save_resume_handle_0;
17325 if (flags & NDR_IN) {
17326 ZERO_STRUCT(r->out);
17328 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
17329 if (_ptr_server_unc) {
17330 NDR_PULL_ALLOC(ndr, r->in.server_unc);
17331 } else {
17332 r->in.server_unc = NULL;
17334 if (r->in.server_unc) {
17335 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
17336 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
17337 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
17338 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
17339 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
17340 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
17341 if (length_server_unc_1 > size_server_unc_1) {
17342 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
17344 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
17345 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
17346 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
17348 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17349 NDR_PULL_ALLOC(ndr, r->in.transports);
17351 _mem_save_transports_0 = NDR_PULL_GET_MEM_CTX(ndr);
17352 NDR_PULL_SET_MEM_CTX(ndr, r->in.transports, LIBNDR_FLAG_REF_ALLOC);
17353 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.transports));
17354 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_transports_0, LIBNDR_FLAG_REF_ALLOC);
17355 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
17356 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
17357 if (_ptr_resume_handle) {
17358 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
17359 } else {
17360 r->in.resume_handle = NULL;
17362 if (r->in.resume_handle) {
17363 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
17364 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
17365 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
17366 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
17368 NDR_PULL_ALLOC(ndr, r->out.transports);
17369 *r->out.transports = *r->in.transports;
17370 NDR_PULL_ALLOC(ndr, r->out.totalentries);
17371 ZERO_STRUCTP(r->out.totalentries);
17373 if (flags & NDR_OUT) {
17374 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17375 NDR_PULL_ALLOC(ndr, r->out.transports);
17377 _mem_save_transports_0 = NDR_PULL_GET_MEM_CTX(ndr);
17378 NDR_PULL_SET_MEM_CTX(ndr, r->out.transports, LIBNDR_FLAG_REF_ALLOC);
17379 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.transports));
17380 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_transports_0, LIBNDR_FLAG_REF_ALLOC);
17381 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17382 NDR_PULL_ALLOC(ndr, r->out.totalentries);
17384 _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
17385 NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
17386 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
17387 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
17388 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
17389 if (_ptr_resume_handle) {
17390 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
17391 } else {
17392 r->out.resume_handle = NULL;
17394 if (r->out.resume_handle) {
17395 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
17396 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
17397 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
17398 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
17400 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17402 return NDR_ERR_SUCCESS;
17405 _PUBLIC_ void ndr_print_srvsvc_NetTransportEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetTransportEnum *r)
17407 ndr_print_struct(ndr, name, "srvsvc_NetTransportEnum");
17408 ndr->depth++;
17409 if (flags & NDR_SET_VALUES) {
17410 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17412 if (flags & NDR_IN) {
17413 ndr_print_struct(ndr, "in", "srvsvc_NetTransportEnum");
17414 ndr->depth++;
17415 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
17416 ndr->depth++;
17417 if (r->in.server_unc) {
17418 ndr_print_string(ndr, "server_unc", r->in.server_unc);
17420 ndr->depth--;
17421 ndr_print_ptr(ndr, "transports", r->in.transports);
17422 ndr->depth++;
17423 ndr_print_srvsvc_NetTransportInfoCtr(ndr, "transports", r->in.transports);
17424 ndr->depth--;
17425 ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
17426 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
17427 ndr->depth++;
17428 if (r->in.resume_handle) {
17429 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
17431 ndr->depth--;
17432 ndr->depth--;
17434 if (flags & NDR_OUT) {
17435 ndr_print_struct(ndr, "out", "srvsvc_NetTransportEnum");
17436 ndr->depth++;
17437 ndr_print_ptr(ndr, "transports", r->out.transports);
17438 ndr->depth++;
17439 ndr_print_srvsvc_NetTransportInfoCtr(ndr, "transports", r->out.transports);
17440 ndr->depth--;
17441 ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
17442 ndr->depth++;
17443 ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
17444 ndr->depth--;
17445 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
17446 ndr->depth++;
17447 if (r->out.resume_handle) {
17448 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
17450 ndr->depth--;
17451 ndr_print_WERROR(ndr, "result", r->out.result);
17452 ndr->depth--;
17454 ndr->depth--;
17457 static enum ndr_err_code ndr_push_srvsvc_NetTransportDel(struct ndr_push *ndr, int flags, const struct srvsvc_NetTransportDel *r)
17459 if (flags & NDR_IN) {
17460 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
17461 if (r->in.server_unc) {
17462 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17463 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17464 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17465 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17467 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
17468 if (r->in.info0 == NULL) {
17469 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17471 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info0));
17473 if (flags & NDR_OUT) {
17474 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17476 return NDR_ERR_SUCCESS;
17479 static enum ndr_err_code ndr_pull_srvsvc_NetTransportDel(struct ndr_pull *ndr, int flags, struct srvsvc_NetTransportDel *r)
17481 uint32_t _ptr_server_unc;
17482 uint32_t size_server_unc_1 = 0;
17483 uint32_t length_server_unc_1 = 0;
17484 TALLOC_CTX *_mem_save_server_unc_0;
17485 TALLOC_CTX *_mem_save_info0_0;
17486 if (flags & NDR_IN) {
17487 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
17488 if (_ptr_server_unc) {
17489 NDR_PULL_ALLOC(ndr, r->in.server_unc);
17490 } else {
17491 r->in.server_unc = NULL;
17493 if (r->in.server_unc) {
17494 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
17495 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
17496 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
17497 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
17498 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
17499 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
17500 if (length_server_unc_1 > size_server_unc_1) {
17501 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
17503 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
17504 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
17505 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
17507 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
17508 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17509 NDR_PULL_ALLOC(ndr, r->in.info0);
17511 _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
17512 NDR_PULL_SET_MEM_CTX(ndr, r->in.info0, LIBNDR_FLAG_REF_ALLOC);
17513 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info0));
17514 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, LIBNDR_FLAG_REF_ALLOC);
17516 if (flags & NDR_OUT) {
17517 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17519 return NDR_ERR_SUCCESS;
17522 _PUBLIC_ void ndr_print_srvsvc_NetTransportDel(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetTransportDel *r)
17524 ndr_print_struct(ndr, name, "srvsvc_NetTransportDel");
17525 ndr->depth++;
17526 if (flags & NDR_SET_VALUES) {
17527 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17529 if (flags & NDR_IN) {
17530 ndr_print_struct(ndr, "in", "srvsvc_NetTransportDel");
17531 ndr->depth++;
17532 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
17533 ndr->depth++;
17534 if (r->in.server_unc) {
17535 ndr_print_string(ndr, "server_unc", r->in.server_unc);
17537 ndr->depth--;
17538 ndr_print_uint32(ndr, "level", r->in.level);
17539 ndr_print_ptr(ndr, "info0", r->in.info0);
17540 ndr->depth++;
17541 ndr_print_srvsvc_NetTransportInfo0(ndr, "info0", r->in.info0);
17542 ndr->depth--;
17543 ndr->depth--;
17545 if (flags & NDR_OUT) {
17546 ndr_print_struct(ndr, "out", "srvsvc_NetTransportDel");
17547 ndr->depth++;
17548 ndr_print_WERROR(ndr, "result", r->out.result);
17549 ndr->depth--;
17551 ndr->depth--;
17554 static enum ndr_err_code ndr_push_srvsvc_NetRemoteTOD(struct ndr_push *ndr, int flags, const struct srvsvc_NetRemoteTOD *r)
17556 if (flags & NDR_IN) {
17557 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
17558 if (r->in.server_unc) {
17559 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17560 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17561 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17562 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17565 if (flags & NDR_OUT) {
17566 if (r->out.info == NULL) {
17567 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17569 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
17570 if (*r->out.info) {
17571 NDR_CHECK(ndr_push_srvsvc_NetRemoteTODInfo(ndr, NDR_SCALARS, *r->out.info));
17573 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17575 return NDR_ERR_SUCCESS;
17578 static enum ndr_err_code ndr_pull_srvsvc_NetRemoteTOD(struct ndr_pull *ndr, int flags, struct srvsvc_NetRemoteTOD *r)
17580 uint32_t _ptr_server_unc;
17581 uint32_t size_server_unc_1 = 0;
17582 uint32_t length_server_unc_1 = 0;
17583 uint32_t _ptr_info;
17584 TALLOC_CTX *_mem_save_server_unc_0;
17585 TALLOC_CTX *_mem_save_info_0;
17586 TALLOC_CTX *_mem_save_info_1;
17587 if (flags & NDR_IN) {
17588 ZERO_STRUCT(r->out);
17590 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
17591 if (_ptr_server_unc) {
17592 NDR_PULL_ALLOC(ndr, r->in.server_unc);
17593 } else {
17594 r->in.server_unc = NULL;
17596 if (r->in.server_unc) {
17597 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
17598 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
17599 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
17600 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
17601 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
17602 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
17603 if (length_server_unc_1 > size_server_unc_1) {
17604 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
17606 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
17607 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
17608 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
17610 NDR_PULL_ALLOC(ndr, r->out.info);
17611 ZERO_STRUCTP(r->out.info);
17613 if (flags & NDR_OUT) {
17614 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17615 NDR_PULL_ALLOC(ndr, r->out.info);
17617 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
17618 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
17619 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
17620 if (_ptr_info) {
17621 NDR_PULL_ALLOC(ndr, *r->out.info);
17622 } else {
17623 *r->out.info = NULL;
17625 if (*r->out.info) {
17626 _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
17627 NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
17628 NDR_CHECK(ndr_pull_srvsvc_NetRemoteTODInfo(ndr, NDR_SCALARS, *r->out.info));
17629 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
17631 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
17632 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17634 return NDR_ERR_SUCCESS;
17637 _PUBLIC_ void ndr_print_srvsvc_NetRemoteTOD(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetRemoteTOD *r)
17639 ndr_print_struct(ndr, name, "srvsvc_NetRemoteTOD");
17640 ndr->depth++;
17641 if (flags & NDR_SET_VALUES) {
17642 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17644 if (flags & NDR_IN) {
17645 ndr_print_struct(ndr, "in", "srvsvc_NetRemoteTOD");
17646 ndr->depth++;
17647 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
17648 ndr->depth++;
17649 if (r->in.server_unc) {
17650 ndr_print_string(ndr, "server_unc", r->in.server_unc);
17652 ndr->depth--;
17653 ndr->depth--;
17655 if (flags & NDR_OUT) {
17656 ndr_print_struct(ndr, "out", "srvsvc_NetRemoteTOD");
17657 ndr->depth++;
17658 ndr_print_ptr(ndr, "info", r->out.info);
17659 ndr->depth++;
17660 ndr_print_ptr(ndr, "info", *r->out.info);
17661 ndr->depth++;
17662 if (*r->out.info) {
17663 ndr_print_srvsvc_NetRemoteTODInfo(ndr, "info", *r->out.info);
17665 ndr->depth--;
17666 ndr->depth--;
17667 ndr_print_WERROR(ndr, "result", r->out.result);
17668 ndr->depth--;
17670 ndr->depth--;
17673 static enum ndr_err_code ndr_push_srvsvc_NetSetServiceBits(struct ndr_push *ndr, int flags, const struct srvsvc_NetSetServiceBits *r)
17675 if (flags & NDR_IN) {
17676 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
17677 if (r->in.server_unc) {
17678 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17679 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17680 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17681 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17683 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.transport));
17684 if (r->in.transport) {
17685 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.transport, CH_UTF16)));
17686 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17687 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.transport, CH_UTF16)));
17688 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.transport, ndr_charset_length(r->in.transport, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17690 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.servicebits));
17691 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.updateimmediately));
17693 if (flags & NDR_OUT) {
17694 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17696 return NDR_ERR_SUCCESS;
17699 static enum ndr_err_code ndr_pull_srvsvc_NetSetServiceBits(struct ndr_pull *ndr, int flags, struct srvsvc_NetSetServiceBits *r)
17701 uint32_t _ptr_server_unc;
17702 uint32_t size_server_unc_1 = 0;
17703 uint32_t length_server_unc_1 = 0;
17704 uint32_t _ptr_transport;
17705 uint32_t size_transport_1 = 0;
17706 uint32_t length_transport_1 = 0;
17707 TALLOC_CTX *_mem_save_server_unc_0;
17708 TALLOC_CTX *_mem_save_transport_0;
17709 if (flags & NDR_IN) {
17710 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
17711 if (_ptr_server_unc) {
17712 NDR_PULL_ALLOC(ndr, r->in.server_unc);
17713 } else {
17714 r->in.server_unc = NULL;
17716 if (r->in.server_unc) {
17717 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
17718 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
17719 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
17720 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
17721 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
17722 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
17723 if (length_server_unc_1 > size_server_unc_1) {
17724 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
17726 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
17727 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
17728 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
17730 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_transport));
17731 if (_ptr_transport) {
17732 NDR_PULL_ALLOC(ndr, r->in.transport);
17733 } else {
17734 r->in.transport = NULL;
17736 if (r->in.transport) {
17737 _mem_save_transport_0 = NDR_PULL_GET_MEM_CTX(ndr);
17738 NDR_PULL_SET_MEM_CTX(ndr, r->in.transport, 0);
17739 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.transport));
17740 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.transport));
17741 size_transport_1 = ndr_get_array_size(ndr, &r->in.transport);
17742 length_transport_1 = ndr_get_array_length(ndr, &r->in.transport);
17743 if (length_transport_1 > size_transport_1) {
17744 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_transport_1, length_transport_1);
17746 NDR_CHECK(ndr_check_string_terminator(ndr, length_transport_1, sizeof(uint16_t)));
17747 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.transport, length_transport_1, sizeof(uint16_t), CH_UTF16));
17748 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_transport_0, 0);
17750 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.servicebits));
17751 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.updateimmediately));
17753 if (flags & NDR_OUT) {
17754 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17756 return NDR_ERR_SUCCESS;
17759 _PUBLIC_ void ndr_print_srvsvc_NetSetServiceBits(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSetServiceBits *r)
17761 ndr_print_struct(ndr, name, "srvsvc_NetSetServiceBits");
17762 ndr->depth++;
17763 if (flags & NDR_SET_VALUES) {
17764 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17766 if (flags & NDR_IN) {
17767 ndr_print_struct(ndr, "in", "srvsvc_NetSetServiceBits");
17768 ndr->depth++;
17769 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
17770 ndr->depth++;
17771 if (r->in.server_unc) {
17772 ndr_print_string(ndr, "server_unc", r->in.server_unc);
17774 ndr->depth--;
17775 ndr_print_ptr(ndr, "transport", r->in.transport);
17776 ndr->depth++;
17777 if (r->in.transport) {
17778 ndr_print_string(ndr, "transport", r->in.transport);
17780 ndr->depth--;
17781 ndr_print_uint32(ndr, "servicebits", r->in.servicebits);
17782 ndr_print_uint32(ndr, "updateimmediately", r->in.updateimmediately);
17783 ndr->depth--;
17785 if (flags & NDR_OUT) {
17786 ndr_print_struct(ndr, "out", "srvsvc_NetSetServiceBits");
17787 ndr->depth++;
17788 ndr_print_WERROR(ndr, "result", r->out.result);
17789 ndr->depth--;
17791 ndr->depth--;
17794 static enum ndr_err_code ndr_push_srvsvc_NetPathType(struct ndr_push *ndr, int flags, const struct srvsvc_NetPathType *r)
17796 if (flags & NDR_IN) {
17797 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
17798 if (r->in.server_unc) {
17799 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17800 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17801 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17802 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17804 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
17805 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17806 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
17807 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path, ndr_charset_length(r->in.path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17808 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.pathflags));
17810 if (flags & NDR_OUT) {
17811 if (r->out.pathtype == NULL) {
17812 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17814 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pathtype));
17815 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17817 return NDR_ERR_SUCCESS;
17820 static enum ndr_err_code ndr_pull_srvsvc_NetPathType(struct ndr_pull *ndr, int flags, struct srvsvc_NetPathType *r)
17822 uint32_t _ptr_server_unc;
17823 uint32_t size_server_unc_1 = 0;
17824 uint32_t length_server_unc_1 = 0;
17825 uint32_t size_path_0 = 0;
17826 uint32_t length_path_0 = 0;
17827 TALLOC_CTX *_mem_save_server_unc_0;
17828 TALLOC_CTX *_mem_save_pathtype_0;
17829 if (flags & NDR_IN) {
17830 ZERO_STRUCT(r->out);
17832 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
17833 if (_ptr_server_unc) {
17834 NDR_PULL_ALLOC(ndr, r->in.server_unc);
17835 } else {
17836 r->in.server_unc = NULL;
17838 if (r->in.server_unc) {
17839 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
17840 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
17841 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
17842 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
17843 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
17844 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
17845 if (length_server_unc_1 > size_server_unc_1) {
17846 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
17848 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
17849 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
17850 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
17852 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path));
17853 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path));
17854 size_path_0 = ndr_get_array_size(ndr, &r->in.path);
17855 length_path_0 = ndr_get_array_length(ndr, &r->in.path);
17856 if (length_path_0 > size_path_0) {
17857 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_path_0, length_path_0);
17859 NDR_CHECK(ndr_check_string_terminator(ndr, length_path_0, sizeof(uint16_t)));
17860 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path, length_path_0, sizeof(uint16_t), CH_UTF16));
17861 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.pathflags));
17862 NDR_PULL_ALLOC(ndr, r->out.pathtype);
17863 ZERO_STRUCTP(r->out.pathtype);
17865 if (flags & NDR_OUT) {
17866 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17867 NDR_PULL_ALLOC(ndr, r->out.pathtype);
17869 _mem_save_pathtype_0 = NDR_PULL_GET_MEM_CTX(ndr);
17870 NDR_PULL_SET_MEM_CTX(ndr, r->out.pathtype, LIBNDR_FLAG_REF_ALLOC);
17871 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pathtype));
17872 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pathtype_0, LIBNDR_FLAG_REF_ALLOC);
17873 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17875 return NDR_ERR_SUCCESS;
17878 _PUBLIC_ void ndr_print_srvsvc_NetPathType(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetPathType *r)
17880 ndr_print_struct(ndr, name, "srvsvc_NetPathType");
17881 ndr->depth++;
17882 if (flags & NDR_SET_VALUES) {
17883 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17885 if (flags & NDR_IN) {
17886 ndr_print_struct(ndr, "in", "srvsvc_NetPathType");
17887 ndr->depth++;
17888 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
17889 ndr->depth++;
17890 if (r->in.server_unc) {
17891 ndr_print_string(ndr, "server_unc", r->in.server_unc);
17893 ndr->depth--;
17894 ndr_print_string(ndr, "path", r->in.path);
17895 ndr_print_uint32(ndr, "pathflags", r->in.pathflags);
17896 ndr->depth--;
17898 if (flags & NDR_OUT) {
17899 ndr_print_struct(ndr, "out", "srvsvc_NetPathType");
17900 ndr->depth++;
17901 ndr_print_ptr(ndr, "pathtype", r->out.pathtype);
17902 ndr->depth++;
17903 ndr_print_uint32(ndr, "pathtype", *r->out.pathtype);
17904 ndr->depth--;
17905 ndr_print_WERROR(ndr, "result", r->out.result);
17906 ndr->depth--;
17908 ndr->depth--;
17911 static enum ndr_err_code ndr_push_srvsvc_NetPathCanonicalize(struct ndr_push *ndr, int flags, const struct srvsvc_NetPathCanonicalize *r)
17913 if (flags & NDR_IN) {
17914 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
17915 if (r->in.server_unc) {
17916 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17917 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17918 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17919 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17921 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
17922 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17923 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
17924 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path, ndr_charset_length(r->in.path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17925 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.maxbuf));
17926 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.prefix, CH_UTF16)));
17927 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17928 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.prefix, CH_UTF16)));
17929 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.prefix, ndr_charset_length(r->in.prefix, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17930 if (r->in.pathtype == NULL) {
17931 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17933 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.pathtype));
17934 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.pathflags));
17936 if (flags & NDR_OUT) {
17937 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.maxbuf));
17938 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.can_path, r->in.maxbuf));
17939 if (r->out.pathtype == NULL) {
17940 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17942 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pathtype));
17943 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17945 return NDR_ERR_SUCCESS;
17948 static enum ndr_err_code ndr_pull_srvsvc_NetPathCanonicalize(struct ndr_pull *ndr, int flags, struct srvsvc_NetPathCanonicalize *r)
17950 uint32_t _ptr_server_unc;
17951 uint32_t size_server_unc_1 = 0;
17952 uint32_t length_server_unc_1 = 0;
17953 uint32_t size_path_0 = 0;
17954 uint32_t length_path_0 = 0;
17955 uint32_t size_can_path_0 = 0;
17956 uint32_t size_prefix_0 = 0;
17957 uint32_t length_prefix_0 = 0;
17958 TALLOC_CTX *_mem_save_server_unc_0;
17959 TALLOC_CTX *_mem_save_pathtype_0;
17960 if (flags & NDR_IN) {
17961 ZERO_STRUCT(r->out);
17963 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
17964 if (_ptr_server_unc) {
17965 NDR_PULL_ALLOC(ndr, r->in.server_unc);
17966 } else {
17967 r->in.server_unc = NULL;
17969 if (r->in.server_unc) {
17970 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
17971 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
17972 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
17973 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
17974 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
17975 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
17976 if (length_server_unc_1 > size_server_unc_1) {
17977 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
17979 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
17980 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
17981 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
17983 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path));
17984 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path));
17985 size_path_0 = ndr_get_array_size(ndr, &r->in.path);
17986 length_path_0 = ndr_get_array_length(ndr, &r->in.path);
17987 if (length_path_0 > size_path_0) {
17988 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_path_0, length_path_0);
17990 NDR_CHECK(ndr_check_string_terminator(ndr, length_path_0, sizeof(uint16_t)));
17991 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path, length_path_0, sizeof(uint16_t), CH_UTF16));
17992 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.maxbuf));
17993 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.prefix));
17994 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.prefix));
17995 size_prefix_0 = ndr_get_array_size(ndr, &r->in.prefix);
17996 length_prefix_0 = ndr_get_array_length(ndr, &r->in.prefix);
17997 if (length_prefix_0 > size_prefix_0) {
17998 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_prefix_0, length_prefix_0);
18000 NDR_CHECK(ndr_check_string_terminator(ndr, length_prefix_0, sizeof(uint16_t)));
18001 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.prefix, length_prefix_0, sizeof(uint16_t), CH_UTF16));
18002 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18003 NDR_PULL_ALLOC(ndr, r->in.pathtype);
18005 _mem_save_pathtype_0 = NDR_PULL_GET_MEM_CTX(ndr);
18006 NDR_PULL_SET_MEM_CTX(ndr, r->in.pathtype, LIBNDR_FLAG_REF_ALLOC);
18007 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.pathtype));
18008 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pathtype_0, LIBNDR_FLAG_REF_ALLOC);
18009 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.pathflags));
18010 NDR_PULL_ALLOC(ndr, r->out.pathtype);
18011 *r->out.pathtype = *r->in.pathtype;
18013 if (flags & NDR_OUT) {
18014 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.can_path));
18015 size_can_path_0 = ndr_get_array_size(ndr, &r->out.can_path);
18016 NDR_PULL_ALLOC_N(ndr, r->out.can_path, size_can_path_0);
18017 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.can_path, size_can_path_0));
18018 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18019 NDR_PULL_ALLOC(ndr, r->out.pathtype);
18021 _mem_save_pathtype_0 = NDR_PULL_GET_MEM_CTX(ndr);
18022 NDR_PULL_SET_MEM_CTX(ndr, r->out.pathtype, LIBNDR_FLAG_REF_ALLOC);
18023 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pathtype));
18024 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pathtype_0, LIBNDR_FLAG_REF_ALLOC);
18025 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18026 if (r->out.can_path) {
18027 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.can_path, r->in.maxbuf));
18030 return NDR_ERR_SUCCESS;
18033 _PUBLIC_ void ndr_print_srvsvc_NetPathCanonicalize(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetPathCanonicalize *r)
18035 ndr_print_struct(ndr, name, "srvsvc_NetPathCanonicalize");
18036 ndr->depth++;
18037 if (flags & NDR_SET_VALUES) {
18038 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18040 if (flags & NDR_IN) {
18041 ndr_print_struct(ndr, "in", "srvsvc_NetPathCanonicalize");
18042 ndr->depth++;
18043 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
18044 ndr->depth++;
18045 if (r->in.server_unc) {
18046 ndr_print_string(ndr, "server_unc", r->in.server_unc);
18048 ndr->depth--;
18049 ndr_print_string(ndr, "path", r->in.path);
18050 ndr_print_uint32(ndr, "maxbuf", r->in.maxbuf);
18051 ndr_print_string(ndr, "prefix", r->in.prefix);
18052 ndr_print_ptr(ndr, "pathtype", r->in.pathtype);
18053 ndr->depth++;
18054 ndr_print_uint32(ndr, "pathtype", *r->in.pathtype);
18055 ndr->depth--;
18056 ndr_print_uint32(ndr, "pathflags", r->in.pathflags);
18057 ndr->depth--;
18059 if (flags & NDR_OUT) {
18060 ndr_print_struct(ndr, "out", "srvsvc_NetPathCanonicalize");
18061 ndr->depth++;
18062 ndr_print_array_uint8(ndr, "can_path", r->out.can_path, r->in.maxbuf);
18063 ndr_print_ptr(ndr, "pathtype", r->out.pathtype);
18064 ndr->depth++;
18065 ndr_print_uint32(ndr, "pathtype", *r->out.pathtype);
18066 ndr->depth--;
18067 ndr_print_WERROR(ndr, "result", r->out.result);
18068 ndr->depth--;
18070 ndr->depth--;
18073 static enum ndr_err_code ndr_push_srvsvc_NetPathCompare(struct ndr_push *ndr, int flags, const struct srvsvc_NetPathCompare *r)
18075 if (flags & NDR_IN) {
18076 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
18077 if (r->in.server_unc) {
18078 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18079 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
18080 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18081 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18083 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path1, CH_UTF16)));
18084 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
18085 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path1, CH_UTF16)));
18086 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path1, ndr_charset_length(r->in.path1, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18087 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path2, CH_UTF16)));
18088 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
18089 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path2, CH_UTF16)));
18090 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path2, ndr_charset_length(r->in.path2, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18091 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.pathtype));
18092 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.pathflags));
18094 if (flags & NDR_OUT) {
18095 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18097 return NDR_ERR_SUCCESS;
18100 static enum ndr_err_code ndr_pull_srvsvc_NetPathCompare(struct ndr_pull *ndr, int flags, struct srvsvc_NetPathCompare *r)
18102 uint32_t _ptr_server_unc;
18103 uint32_t size_server_unc_1 = 0;
18104 uint32_t length_server_unc_1 = 0;
18105 uint32_t size_path1_0 = 0;
18106 uint32_t length_path1_0 = 0;
18107 uint32_t size_path2_0 = 0;
18108 uint32_t length_path2_0 = 0;
18109 TALLOC_CTX *_mem_save_server_unc_0;
18110 if (flags & NDR_IN) {
18111 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
18112 if (_ptr_server_unc) {
18113 NDR_PULL_ALLOC(ndr, r->in.server_unc);
18114 } else {
18115 r->in.server_unc = NULL;
18117 if (r->in.server_unc) {
18118 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
18119 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
18120 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
18121 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
18122 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
18123 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
18124 if (length_server_unc_1 > size_server_unc_1) {
18125 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
18127 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
18128 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
18129 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
18131 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path1));
18132 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path1));
18133 size_path1_0 = ndr_get_array_size(ndr, &r->in.path1);
18134 length_path1_0 = ndr_get_array_length(ndr, &r->in.path1);
18135 if (length_path1_0 > size_path1_0) {
18136 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_path1_0, length_path1_0);
18138 NDR_CHECK(ndr_check_string_terminator(ndr, length_path1_0, sizeof(uint16_t)));
18139 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path1, length_path1_0, sizeof(uint16_t), CH_UTF16));
18140 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path2));
18141 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path2));
18142 size_path2_0 = ndr_get_array_size(ndr, &r->in.path2);
18143 length_path2_0 = ndr_get_array_length(ndr, &r->in.path2);
18144 if (length_path2_0 > size_path2_0) {
18145 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_path2_0, length_path2_0);
18147 NDR_CHECK(ndr_check_string_terminator(ndr, length_path2_0, sizeof(uint16_t)));
18148 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path2, length_path2_0, sizeof(uint16_t), CH_UTF16));
18149 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.pathtype));
18150 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.pathflags));
18152 if (flags & NDR_OUT) {
18153 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18155 return NDR_ERR_SUCCESS;
18158 _PUBLIC_ void ndr_print_srvsvc_NetPathCompare(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetPathCompare *r)
18160 ndr_print_struct(ndr, name, "srvsvc_NetPathCompare");
18161 ndr->depth++;
18162 if (flags & NDR_SET_VALUES) {
18163 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18165 if (flags & NDR_IN) {
18166 ndr_print_struct(ndr, "in", "srvsvc_NetPathCompare");
18167 ndr->depth++;
18168 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
18169 ndr->depth++;
18170 if (r->in.server_unc) {
18171 ndr_print_string(ndr, "server_unc", r->in.server_unc);
18173 ndr->depth--;
18174 ndr_print_string(ndr, "path1", r->in.path1);
18175 ndr_print_string(ndr, "path2", r->in.path2);
18176 ndr_print_uint32(ndr, "pathtype", r->in.pathtype);
18177 ndr_print_uint32(ndr, "pathflags", r->in.pathflags);
18178 ndr->depth--;
18180 if (flags & NDR_OUT) {
18181 ndr_print_struct(ndr, "out", "srvsvc_NetPathCompare");
18182 ndr->depth++;
18183 ndr_print_WERROR(ndr, "result", r->out.result);
18184 ndr->depth--;
18186 ndr->depth--;
18189 static enum ndr_err_code ndr_push_srvsvc_NetNameValidate(struct ndr_push *ndr, int flags, const struct srvsvc_NetNameValidate *r)
18191 if (flags & NDR_IN) {
18192 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
18193 if (r->in.server_unc) {
18194 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18195 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
18196 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18197 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18199 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.name, CH_UTF16)));
18200 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
18201 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.name, CH_UTF16)));
18202 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.name, ndr_charset_length(r->in.name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18203 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.name_type));
18204 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
18206 if (flags & NDR_OUT) {
18207 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18209 return NDR_ERR_SUCCESS;
18212 static enum ndr_err_code ndr_pull_srvsvc_NetNameValidate(struct ndr_pull *ndr, int flags, struct srvsvc_NetNameValidate *r)
18214 uint32_t _ptr_server_unc;
18215 uint32_t size_server_unc_1 = 0;
18216 uint32_t length_server_unc_1 = 0;
18217 uint32_t size_name_0 = 0;
18218 uint32_t length_name_0 = 0;
18219 TALLOC_CTX *_mem_save_server_unc_0;
18220 if (flags & NDR_IN) {
18221 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
18222 if (_ptr_server_unc) {
18223 NDR_PULL_ALLOC(ndr, r->in.server_unc);
18224 } else {
18225 r->in.server_unc = NULL;
18227 if (r->in.server_unc) {
18228 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
18229 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
18230 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
18231 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
18232 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
18233 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
18234 if (length_server_unc_1 > size_server_unc_1) {
18235 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
18237 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
18238 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
18239 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
18241 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.name));
18242 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.name));
18243 size_name_0 = ndr_get_array_size(ndr, &r->in.name);
18244 length_name_0 = ndr_get_array_length(ndr, &r->in.name);
18245 if (length_name_0 > size_name_0) {
18246 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_name_0, length_name_0);
18248 NDR_CHECK(ndr_check_string_terminator(ndr, length_name_0, sizeof(uint16_t)));
18249 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.name, length_name_0, sizeof(uint16_t), CH_UTF16));
18250 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.name_type));
18251 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
18253 if (flags & NDR_OUT) {
18254 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18256 return NDR_ERR_SUCCESS;
18259 _PUBLIC_ void ndr_print_srvsvc_NetNameValidate(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetNameValidate *r)
18261 ndr_print_struct(ndr, name, "srvsvc_NetNameValidate");
18262 ndr->depth++;
18263 if (flags & NDR_SET_VALUES) {
18264 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18266 if (flags & NDR_IN) {
18267 ndr_print_struct(ndr, "in", "srvsvc_NetNameValidate");
18268 ndr->depth++;
18269 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
18270 ndr->depth++;
18271 if (r->in.server_unc) {
18272 ndr_print_string(ndr, "server_unc", r->in.server_unc);
18274 ndr->depth--;
18275 ndr_print_string(ndr, "name", r->in.name);
18276 ndr_print_uint32(ndr, "name_type", r->in.name_type);
18277 ndr_print_uint32(ndr, "flags", r->in.flags);
18278 ndr->depth--;
18280 if (flags & NDR_OUT) {
18281 ndr_print_struct(ndr, "out", "srvsvc_NetNameValidate");
18282 ndr->depth++;
18283 ndr_print_WERROR(ndr, "result", r->out.result);
18284 ndr->depth--;
18286 ndr->depth--;
18289 static enum ndr_err_code ndr_push_srvsvc_NETRPRNAMECANONICALIZE(struct ndr_push *ndr, int flags, const struct srvsvc_NETRPRNAMECANONICALIZE *r)
18291 if (flags & NDR_IN) {
18293 if (flags & NDR_OUT) {
18294 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18296 return NDR_ERR_SUCCESS;
18299 static enum ndr_err_code ndr_pull_srvsvc_NETRPRNAMECANONICALIZE(struct ndr_pull *ndr, int flags, struct srvsvc_NETRPRNAMECANONICALIZE *r)
18301 if (flags & NDR_IN) {
18303 if (flags & NDR_OUT) {
18304 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18306 return NDR_ERR_SUCCESS;
18309 _PUBLIC_ void ndr_print_srvsvc_NETRPRNAMECANONICALIZE(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRPRNAMECANONICALIZE *r)
18311 ndr_print_struct(ndr, name, "srvsvc_NETRPRNAMECANONICALIZE");
18312 ndr->depth++;
18313 if (flags & NDR_SET_VALUES) {
18314 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18316 if (flags & NDR_IN) {
18317 ndr_print_struct(ndr, "in", "srvsvc_NETRPRNAMECANONICALIZE");
18318 ndr->depth++;
18319 ndr->depth--;
18321 if (flags & NDR_OUT) {
18322 ndr_print_struct(ndr, "out", "srvsvc_NETRPRNAMECANONICALIZE");
18323 ndr->depth++;
18324 ndr_print_WERROR(ndr, "result", r->out.result);
18325 ndr->depth--;
18327 ndr->depth--;
18330 static enum ndr_err_code ndr_push_srvsvc_NetPRNameCompare(struct ndr_push *ndr, int flags, const struct srvsvc_NetPRNameCompare *r)
18332 if (flags & NDR_IN) {
18333 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
18334 if (r->in.server_unc) {
18335 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18336 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
18337 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18338 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18340 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.name1, CH_UTF16)));
18341 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
18342 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.name1, CH_UTF16)));
18343 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.name1, ndr_charset_length(r->in.name1, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18344 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.name2, CH_UTF16)));
18345 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
18346 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.name2, CH_UTF16)));
18347 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.name2, ndr_charset_length(r->in.name2, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18348 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.name_type));
18349 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
18351 if (flags & NDR_OUT) {
18352 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18354 return NDR_ERR_SUCCESS;
18357 static enum ndr_err_code ndr_pull_srvsvc_NetPRNameCompare(struct ndr_pull *ndr, int flags, struct srvsvc_NetPRNameCompare *r)
18359 uint32_t _ptr_server_unc;
18360 uint32_t size_server_unc_1 = 0;
18361 uint32_t length_server_unc_1 = 0;
18362 uint32_t size_name1_0 = 0;
18363 uint32_t length_name1_0 = 0;
18364 uint32_t size_name2_0 = 0;
18365 uint32_t length_name2_0 = 0;
18366 TALLOC_CTX *_mem_save_server_unc_0;
18367 if (flags & NDR_IN) {
18368 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
18369 if (_ptr_server_unc) {
18370 NDR_PULL_ALLOC(ndr, r->in.server_unc);
18371 } else {
18372 r->in.server_unc = NULL;
18374 if (r->in.server_unc) {
18375 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
18376 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
18377 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
18378 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
18379 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
18380 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
18381 if (length_server_unc_1 > size_server_unc_1) {
18382 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
18384 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
18385 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
18386 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
18388 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.name1));
18389 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.name1));
18390 size_name1_0 = ndr_get_array_size(ndr, &r->in.name1);
18391 length_name1_0 = ndr_get_array_length(ndr, &r->in.name1);
18392 if (length_name1_0 > size_name1_0) {
18393 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_name1_0, length_name1_0);
18395 NDR_CHECK(ndr_check_string_terminator(ndr, length_name1_0, sizeof(uint16_t)));
18396 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.name1, length_name1_0, sizeof(uint16_t), CH_UTF16));
18397 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.name2));
18398 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.name2));
18399 size_name2_0 = ndr_get_array_size(ndr, &r->in.name2);
18400 length_name2_0 = ndr_get_array_length(ndr, &r->in.name2);
18401 if (length_name2_0 > size_name2_0) {
18402 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_name2_0, length_name2_0);
18404 NDR_CHECK(ndr_check_string_terminator(ndr, length_name2_0, sizeof(uint16_t)));
18405 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.name2, length_name2_0, sizeof(uint16_t), CH_UTF16));
18406 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.name_type));
18407 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
18409 if (flags & NDR_OUT) {
18410 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18412 return NDR_ERR_SUCCESS;
18415 _PUBLIC_ void ndr_print_srvsvc_NetPRNameCompare(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetPRNameCompare *r)
18417 ndr_print_struct(ndr, name, "srvsvc_NetPRNameCompare");
18418 ndr->depth++;
18419 if (flags & NDR_SET_VALUES) {
18420 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18422 if (flags & NDR_IN) {
18423 ndr_print_struct(ndr, "in", "srvsvc_NetPRNameCompare");
18424 ndr->depth++;
18425 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
18426 ndr->depth++;
18427 if (r->in.server_unc) {
18428 ndr_print_string(ndr, "server_unc", r->in.server_unc);
18430 ndr->depth--;
18431 ndr_print_string(ndr, "name1", r->in.name1);
18432 ndr_print_string(ndr, "name2", r->in.name2);
18433 ndr_print_uint32(ndr, "name_type", r->in.name_type);
18434 ndr_print_uint32(ndr, "flags", r->in.flags);
18435 ndr->depth--;
18437 if (flags & NDR_OUT) {
18438 ndr_print_struct(ndr, "out", "srvsvc_NetPRNameCompare");
18439 ndr->depth++;
18440 ndr_print_WERROR(ndr, "result", r->out.result);
18441 ndr->depth--;
18443 ndr->depth--;
18446 static enum ndr_err_code ndr_push_srvsvc_NetShareEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareEnum *r)
18448 if (flags & NDR_IN) {
18449 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
18450 if (r->in.server_unc) {
18451 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18452 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
18453 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18454 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18456 if (r->in.info_ctr == NULL) {
18457 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18459 NDR_CHECK(ndr_push_srvsvc_NetShareInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
18460 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
18461 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
18462 if (r->in.resume_handle) {
18463 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
18466 if (flags & NDR_OUT) {
18467 if (r->out.info_ctr == NULL) {
18468 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18470 NDR_CHECK(ndr_push_srvsvc_NetShareInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
18471 if (r->out.totalentries == NULL) {
18472 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18474 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
18475 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
18476 if (r->out.resume_handle) {
18477 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
18479 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18481 return NDR_ERR_SUCCESS;
18484 static enum ndr_err_code ndr_pull_srvsvc_NetShareEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareEnum *r)
18486 uint32_t _ptr_server_unc;
18487 uint32_t size_server_unc_1 = 0;
18488 uint32_t length_server_unc_1 = 0;
18489 uint32_t _ptr_resume_handle;
18490 TALLOC_CTX *_mem_save_server_unc_0;
18491 TALLOC_CTX *_mem_save_info_ctr_0;
18492 TALLOC_CTX *_mem_save_totalentries_0;
18493 TALLOC_CTX *_mem_save_resume_handle_0;
18494 if (flags & NDR_IN) {
18495 ZERO_STRUCT(r->out);
18497 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
18498 if (_ptr_server_unc) {
18499 NDR_PULL_ALLOC(ndr, r->in.server_unc);
18500 } else {
18501 r->in.server_unc = NULL;
18503 if (r->in.server_unc) {
18504 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
18505 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
18506 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
18507 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
18508 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
18509 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
18510 if (length_server_unc_1 > size_server_unc_1) {
18511 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
18513 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
18514 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
18515 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
18517 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18518 NDR_PULL_ALLOC(ndr, r->in.info_ctr);
18520 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
18521 NDR_PULL_SET_MEM_CTX(ndr, r->in.info_ctr, LIBNDR_FLAG_REF_ALLOC);
18522 NDR_CHECK(ndr_pull_srvsvc_NetShareInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
18523 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
18524 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
18525 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
18526 if (_ptr_resume_handle) {
18527 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
18528 } else {
18529 r->in.resume_handle = NULL;
18531 if (r->in.resume_handle) {
18532 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
18533 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
18534 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
18535 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
18537 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
18538 *r->out.info_ctr = *r->in.info_ctr;
18539 NDR_PULL_ALLOC(ndr, r->out.totalentries);
18540 ZERO_STRUCTP(r->out.totalentries);
18542 if (flags & NDR_OUT) {
18543 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18544 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
18546 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
18547 NDR_PULL_SET_MEM_CTX(ndr, r->out.info_ctr, LIBNDR_FLAG_REF_ALLOC);
18548 NDR_CHECK(ndr_pull_srvsvc_NetShareInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
18549 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
18550 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18551 NDR_PULL_ALLOC(ndr, r->out.totalentries);
18553 _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
18554 NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
18555 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
18556 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
18557 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
18558 if (_ptr_resume_handle) {
18559 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
18560 } else {
18561 r->out.resume_handle = NULL;
18563 if (r->out.resume_handle) {
18564 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
18565 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
18566 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
18567 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
18569 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18571 return NDR_ERR_SUCCESS;
18574 _PUBLIC_ void ndr_print_srvsvc_NetShareEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareEnum *r)
18576 ndr_print_struct(ndr, name, "srvsvc_NetShareEnum");
18577 ndr->depth++;
18578 if (flags & NDR_SET_VALUES) {
18579 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18581 if (flags & NDR_IN) {
18582 ndr_print_struct(ndr, "in", "srvsvc_NetShareEnum");
18583 ndr->depth++;
18584 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
18585 ndr->depth++;
18586 if (r->in.server_unc) {
18587 ndr_print_string(ndr, "server_unc", r->in.server_unc);
18589 ndr->depth--;
18590 ndr_print_ptr(ndr, "info_ctr", r->in.info_ctr);
18591 ndr->depth++;
18592 ndr_print_srvsvc_NetShareInfoCtr(ndr, "info_ctr", r->in.info_ctr);
18593 ndr->depth--;
18594 ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
18595 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
18596 ndr->depth++;
18597 if (r->in.resume_handle) {
18598 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
18600 ndr->depth--;
18601 ndr->depth--;
18603 if (flags & NDR_OUT) {
18604 ndr_print_struct(ndr, "out", "srvsvc_NetShareEnum");
18605 ndr->depth++;
18606 ndr_print_ptr(ndr, "info_ctr", r->out.info_ctr);
18607 ndr->depth++;
18608 ndr_print_srvsvc_NetShareInfoCtr(ndr, "info_ctr", r->out.info_ctr);
18609 ndr->depth--;
18610 ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
18611 ndr->depth++;
18612 ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
18613 ndr->depth--;
18614 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
18615 ndr->depth++;
18616 if (r->out.resume_handle) {
18617 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
18619 ndr->depth--;
18620 ndr_print_WERROR(ndr, "result", r->out.result);
18621 ndr->depth--;
18623 ndr->depth--;
18626 static enum ndr_err_code ndr_push_srvsvc_NetShareDelStart(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareDelStart *r)
18628 if (flags & NDR_IN) {
18629 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
18630 if (r->in.server_unc) {
18631 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18632 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
18633 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18634 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18636 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
18637 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
18638 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
18639 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share, ndr_charset_length(r->in.share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18640 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.reserved));
18642 if (flags & NDR_OUT) {
18643 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.hnd));
18644 if (r->out.hnd) {
18645 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.hnd));
18647 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18649 return NDR_ERR_SUCCESS;
18652 static enum ndr_err_code ndr_pull_srvsvc_NetShareDelStart(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareDelStart *r)
18654 uint32_t _ptr_server_unc;
18655 uint32_t size_server_unc_1 = 0;
18656 uint32_t length_server_unc_1 = 0;
18657 uint32_t size_share_0 = 0;
18658 uint32_t length_share_0 = 0;
18659 uint32_t _ptr_hnd;
18660 TALLOC_CTX *_mem_save_server_unc_0;
18661 TALLOC_CTX *_mem_save_hnd_0;
18662 if (flags & NDR_IN) {
18663 ZERO_STRUCT(r->out);
18665 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
18666 if (_ptr_server_unc) {
18667 NDR_PULL_ALLOC(ndr, r->in.server_unc);
18668 } else {
18669 r->in.server_unc = NULL;
18671 if (r->in.server_unc) {
18672 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
18673 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
18674 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
18675 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
18676 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
18677 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
18678 if (length_server_unc_1 > size_server_unc_1) {
18679 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
18681 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
18682 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
18683 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
18685 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share));
18686 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share));
18687 size_share_0 = ndr_get_array_size(ndr, &r->in.share);
18688 length_share_0 = ndr_get_array_length(ndr, &r->in.share);
18689 if (length_share_0 > size_share_0) {
18690 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_share_0, length_share_0);
18692 NDR_CHECK(ndr_check_string_terminator(ndr, length_share_0, sizeof(uint16_t)));
18693 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share, length_share_0, sizeof(uint16_t), CH_UTF16));
18694 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.reserved));
18696 if (flags & NDR_OUT) {
18697 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_hnd));
18698 if (_ptr_hnd) {
18699 NDR_PULL_ALLOC(ndr, r->out.hnd);
18700 } else {
18701 r->out.hnd = NULL;
18703 if (r->out.hnd) {
18704 _mem_save_hnd_0 = NDR_PULL_GET_MEM_CTX(ndr);
18705 NDR_PULL_SET_MEM_CTX(ndr, r->out.hnd, 0);
18706 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.hnd));
18707 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hnd_0, 0);
18709 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18711 return NDR_ERR_SUCCESS;
18714 _PUBLIC_ void ndr_print_srvsvc_NetShareDelStart(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareDelStart *r)
18716 ndr_print_struct(ndr, name, "srvsvc_NetShareDelStart");
18717 ndr->depth++;
18718 if (flags & NDR_SET_VALUES) {
18719 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18721 if (flags & NDR_IN) {
18722 ndr_print_struct(ndr, "in", "srvsvc_NetShareDelStart");
18723 ndr->depth++;
18724 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
18725 ndr->depth++;
18726 if (r->in.server_unc) {
18727 ndr_print_string(ndr, "server_unc", r->in.server_unc);
18729 ndr->depth--;
18730 ndr_print_string(ndr, "share", r->in.share);
18731 ndr_print_uint32(ndr, "reserved", r->in.reserved);
18732 ndr->depth--;
18734 if (flags & NDR_OUT) {
18735 ndr_print_struct(ndr, "out", "srvsvc_NetShareDelStart");
18736 ndr->depth++;
18737 ndr_print_ptr(ndr, "hnd", r->out.hnd);
18738 ndr->depth++;
18739 if (r->out.hnd) {
18740 ndr_print_policy_handle(ndr, "hnd", r->out.hnd);
18742 ndr->depth--;
18743 ndr_print_WERROR(ndr, "result", r->out.result);
18744 ndr->depth--;
18746 ndr->depth--;
18749 static enum ndr_err_code ndr_push_srvsvc_NetShareDelCommit(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareDelCommit *r)
18751 if (flags & NDR_IN) {
18752 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.hnd));
18753 if (r->in.hnd) {
18754 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.hnd));
18757 if (flags & NDR_OUT) {
18758 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.hnd));
18759 if (r->out.hnd) {
18760 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.hnd));
18762 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18764 return NDR_ERR_SUCCESS;
18767 static enum ndr_err_code ndr_pull_srvsvc_NetShareDelCommit(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareDelCommit *r)
18769 uint32_t _ptr_hnd;
18770 TALLOC_CTX *_mem_save_hnd_0;
18771 if (flags & NDR_IN) {
18772 ZERO_STRUCT(r->out);
18774 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_hnd));
18775 if (_ptr_hnd) {
18776 NDR_PULL_ALLOC(ndr, r->in.hnd);
18777 } else {
18778 r->in.hnd = NULL;
18780 if (r->in.hnd) {
18781 _mem_save_hnd_0 = NDR_PULL_GET_MEM_CTX(ndr);
18782 NDR_PULL_SET_MEM_CTX(ndr, r->in.hnd, 0);
18783 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.hnd));
18784 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hnd_0, 0);
18787 if (flags & NDR_OUT) {
18788 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_hnd));
18789 if (_ptr_hnd) {
18790 NDR_PULL_ALLOC(ndr, r->out.hnd);
18791 } else {
18792 r->out.hnd = NULL;
18794 if (r->out.hnd) {
18795 _mem_save_hnd_0 = NDR_PULL_GET_MEM_CTX(ndr);
18796 NDR_PULL_SET_MEM_CTX(ndr, r->out.hnd, 0);
18797 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.hnd));
18798 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hnd_0, 0);
18800 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18802 return NDR_ERR_SUCCESS;
18805 _PUBLIC_ void ndr_print_srvsvc_NetShareDelCommit(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareDelCommit *r)
18807 ndr_print_struct(ndr, name, "srvsvc_NetShareDelCommit");
18808 ndr->depth++;
18809 if (flags & NDR_SET_VALUES) {
18810 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18812 if (flags & NDR_IN) {
18813 ndr_print_struct(ndr, "in", "srvsvc_NetShareDelCommit");
18814 ndr->depth++;
18815 ndr_print_ptr(ndr, "hnd", r->in.hnd);
18816 ndr->depth++;
18817 if (r->in.hnd) {
18818 ndr_print_policy_handle(ndr, "hnd", r->in.hnd);
18820 ndr->depth--;
18821 ndr->depth--;
18823 if (flags & NDR_OUT) {
18824 ndr_print_struct(ndr, "out", "srvsvc_NetShareDelCommit");
18825 ndr->depth++;
18826 ndr_print_ptr(ndr, "hnd", r->out.hnd);
18827 ndr->depth++;
18828 if (r->out.hnd) {
18829 ndr_print_policy_handle(ndr, "hnd", r->out.hnd);
18831 ndr->depth--;
18832 ndr_print_WERROR(ndr, "result", r->out.result);
18833 ndr->depth--;
18835 ndr->depth--;
18838 static enum ndr_err_code ndr_push_srvsvc_NetGetFileSecurity(struct ndr_push *ndr, int flags, const struct srvsvc_NetGetFileSecurity *r)
18840 if (flags & NDR_IN) {
18841 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
18842 if (r->in.server_unc) {
18843 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18844 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
18845 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18846 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18848 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.share));
18849 if (r->in.share) {
18850 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
18851 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
18852 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
18853 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share, ndr_charset_length(r->in.share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18855 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.file, CH_UTF16)));
18856 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
18857 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.file, CH_UTF16)));
18858 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.file, ndr_charset_length(r->in.file, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18859 NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.securityinformation));
18861 if (flags & NDR_OUT) {
18862 if (r->out.sd_buf == NULL) {
18863 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18865 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.sd_buf));
18866 if (*r->out.sd_buf) {
18867 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sd_buf));
18869 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18871 return NDR_ERR_SUCCESS;
18874 static enum ndr_err_code ndr_pull_srvsvc_NetGetFileSecurity(struct ndr_pull *ndr, int flags, struct srvsvc_NetGetFileSecurity *r)
18876 uint32_t _ptr_server_unc;
18877 uint32_t size_server_unc_1 = 0;
18878 uint32_t length_server_unc_1 = 0;
18879 uint32_t _ptr_share;
18880 uint32_t size_share_1 = 0;
18881 uint32_t length_share_1 = 0;
18882 uint32_t size_file_0 = 0;
18883 uint32_t length_file_0 = 0;
18884 uint32_t _ptr_sd_buf;
18885 TALLOC_CTX *_mem_save_server_unc_0;
18886 TALLOC_CTX *_mem_save_share_0;
18887 TALLOC_CTX *_mem_save_sd_buf_0;
18888 TALLOC_CTX *_mem_save_sd_buf_1;
18889 if (flags & NDR_IN) {
18890 ZERO_STRUCT(r->out);
18892 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
18893 if (_ptr_server_unc) {
18894 NDR_PULL_ALLOC(ndr, r->in.server_unc);
18895 } else {
18896 r->in.server_unc = NULL;
18898 if (r->in.server_unc) {
18899 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
18900 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
18901 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
18902 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
18903 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
18904 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
18905 if (length_server_unc_1 > size_server_unc_1) {
18906 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
18908 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
18909 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
18910 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
18912 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share));
18913 if (_ptr_share) {
18914 NDR_PULL_ALLOC(ndr, r->in.share);
18915 } else {
18916 r->in.share = NULL;
18918 if (r->in.share) {
18919 _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr);
18920 NDR_PULL_SET_MEM_CTX(ndr, r->in.share, 0);
18921 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share));
18922 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share));
18923 size_share_1 = ndr_get_array_size(ndr, &r->in.share);
18924 length_share_1 = ndr_get_array_length(ndr, &r->in.share);
18925 if (length_share_1 > size_share_1) {
18926 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_share_1, length_share_1);
18928 NDR_CHECK(ndr_check_string_terminator(ndr, length_share_1, sizeof(uint16_t)));
18929 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share, length_share_1, sizeof(uint16_t), CH_UTF16));
18930 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0);
18932 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.file));
18933 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.file));
18934 size_file_0 = ndr_get_array_size(ndr, &r->in.file);
18935 length_file_0 = ndr_get_array_length(ndr, &r->in.file);
18936 if (length_file_0 > size_file_0) {
18937 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_file_0, length_file_0);
18939 NDR_CHECK(ndr_check_string_terminator(ndr, length_file_0, sizeof(uint16_t)));
18940 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.file, length_file_0, sizeof(uint16_t), CH_UTF16));
18941 NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.securityinformation));
18942 NDR_PULL_ALLOC(ndr, r->out.sd_buf);
18943 ZERO_STRUCTP(r->out.sd_buf);
18945 if (flags & NDR_OUT) {
18946 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18947 NDR_PULL_ALLOC(ndr, r->out.sd_buf);
18949 _mem_save_sd_buf_0 = NDR_PULL_GET_MEM_CTX(ndr);
18950 NDR_PULL_SET_MEM_CTX(ndr, r->out.sd_buf, LIBNDR_FLAG_REF_ALLOC);
18951 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sd_buf));
18952 if (_ptr_sd_buf) {
18953 NDR_PULL_ALLOC(ndr, *r->out.sd_buf);
18954 } else {
18955 *r->out.sd_buf = NULL;
18957 if (*r->out.sd_buf) {
18958 _mem_save_sd_buf_1 = NDR_PULL_GET_MEM_CTX(ndr);
18959 NDR_PULL_SET_MEM_CTX(ndr, *r->out.sd_buf, 0);
18960 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sd_buf));
18961 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sd_buf_1, 0);
18963 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sd_buf_0, LIBNDR_FLAG_REF_ALLOC);
18964 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18966 return NDR_ERR_SUCCESS;
18969 _PUBLIC_ void ndr_print_srvsvc_NetGetFileSecurity(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetGetFileSecurity *r)
18971 ndr_print_struct(ndr, name, "srvsvc_NetGetFileSecurity");
18972 ndr->depth++;
18973 if (flags & NDR_SET_VALUES) {
18974 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18976 if (flags & NDR_IN) {
18977 ndr_print_struct(ndr, "in", "srvsvc_NetGetFileSecurity");
18978 ndr->depth++;
18979 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
18980 ndr->depth++;
18981 if (r->in.server_unc) {
18982 ndr_print_string(ndr, "server_unc", r->in.server_unc);
18984 ndr->depth--;
18985 ndr_print_ptr(ndr, "share", r->in.share);
18986 ndr->depth++;
18987 if (r->in.share) {
18988 ndr_print_string(ndr, "share", r->in.share);
18990 ndr->depth--;
18991 ndr_print_string(ndr, "file", r->in.file);
18992 ndr_print_security_secinfo(ndr, "securityinformation", r->in.securityinformation);
18993 ndr->depth--;
18995 if (flags & NDR_OUT) {
18996 ndr_print_struct(ndr, "out", "srvsvc_NetGetFileSecurity");
18997 ndr->depth++;
18998 ndr_print_ptr(ndr, "sd_buf", r->out.sd_buf);
18999 ndr->depth++;
19000 ndr_print_ptr(ndr, "sd_buf", *r->out.sd_buf);
19001 ndr->depth++;
19002 if (*r->out.sd_buf) {
19003 ndr_print_sec_desc_buf(ndr, "sd_buf", *r->out.sd_buf);
19005 ndr->depth--;
19006 ndr->depth--;
19007 ndr_print_WERROR(ndr, "result", r->out.result);
19008 ndr->depth--;
19010 ndr->depth--;
19013 static enum ndr_err_code ndr_push_srvsvc_NetSetFileSecurity(struct ndr_push *ndr, int flags, const struct srvsvc_NetSetFileSecurity *r)
19015 if (flags & NDR_IN) {
19016 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
19017 if (r->in.server_unc) {
19018 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
19019 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
19020 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
19021 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
19023 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.share));
19024 if (r->in.share) {
19025 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
19026 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
19027 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
19028 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share, ndr_charset_length(r->in.share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
19030 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.file, CH_UTF16)));
19031 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
19032 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.file, CH_UTF16)));
19033 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.file, ndr_charset_length(r->in.file, CH_UTF16), sizeof(uint16_t), CH_UTF16));
19034 NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.securityinformation));
19035 if (r->in.sd_buf == NULL) {
19036 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
19038 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sd_buf));
19040 if (flags & NDR_OUT) {
19041 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19043 return NDR_ERR_SUCCESS;
19046 static enum ndr_err_code ndr_pull_srvsvc_NetSetFileSecurity(struct ndr_pull *ndr, int flags, struct srvsvc_NetSetFileSecurity *r)
19048 uint32_t _ptr_server_unc;
19049 uint32_t size_server_unc_1 = 0;
19050 uint32_t length_server_unc_1 = 0;
19051 uint32_t _ptr_share;
19052 uint32_t size_share_1 = 0;
19053 uint32_t length_share_1 = 0;
19054 uint32_t size_file_0 = 0;
19055 uint32_t length_file_0 = 0;
19056 TALLOC_CTX *_mem_save_server_unc_0;
19057 TALLOC_CTX *_mem_save_share_0;
19058 TALLOC_CTX *_mem_save_sd_buf_0;
19059 if (flags & NDR_IN) {
19060 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
19061 if (_ptr_server_unc) {
19062 NDR_PULL_ALLOC(ndr, r->in.server_unc);
19063 } else {
19064 r->in.server_unc = NULL;
19066 if (r->in.server_unc) {
19067 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
19068 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
19069 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
19070 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
19071 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
19072 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
19073 if (length_server_unc_1 > size_server_unc_1) {
19074 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
19076 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
19077 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
19078 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
19080 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share));
19081 if (_ptr_share) {
19082 NDR_PULL_ALLOC(ndr, r->in.share);
19083 } else {
19084 r->in.share = NULL;
19086 if (r->in.share) {
19087 _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr);
19088 NDR_PULL_SET_MEM_CTX(ndr, r->in.share, 0);
19089 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share));
19090 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share));
19091 size_share_1 = ndr_get_array_size(ndr, &r->in.share);
19092 length_share_1 = ndr_get_array_length(ndr, &r->in.share);
19093 if (length_share_1 > size_share_1) {
19094 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_share_1, length_share_1);
19096 NDR_CHECK(ndr_check_string_terminator(ndr, length_share_1, sizeof(uint16_t)));
19097 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share, length_share_1, sizeof(uint16_t), CH_UTF16));
19098 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0);
19100 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.file));
19101 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.file));
19102 size_file_0 = ndr_get_array_size(ndr, &r->in.file);
19103 length_file_0 = ndr_get_array_length(ndr, &r->in.file);
19104 if (length_file_0 > size_file_0) {
19105 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_file_0, length_file_0);
19107 NDR_CHECK(ndr_check_string_terminator(ndr, length_file_0, sizeof(uint16_t)));
19108 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.file, length_file_0, sizeof(uint16_t), CH_UTF16));
19109 NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.securityinformation));
19110 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
19111 NDR_PULL_ALLOC(ndr, r->in.sd_buf);
19113 _mem_save_sd_buf_0 = NDR_PULL_GET_MEM_CTX(ndr);
19114 NDR_PULL_SET_MEM_CTX(ndr, r->in.sd_buf, LIBNDR_FLAG_REF_ALLOC);
19115 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sd_buf));
19116 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sd_buf_0, LIBNDR_FLAG_REF_ALLOC);
19118 if (flags & NDR_OUT) {
19119 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19121 return NDR_ERR_SUCCESS;
19124 _PUBLIC_ void ndr_print_srvsvc_NetSetFileSecurity(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSetFileSecurity *r)
19126 ndr_print_struct(ndr, name, "srvsvc_NetSetFileSecurity");
19127 ndr->depth++;
19128 if (flags & NDR_SET_VALUES) {
19129 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19131 if (flags & NDR_IN) {
19132 ndr_print_struct(ndr, "in", "srvsvc_NetSetFileSecurity");
19133 ndr->depth++;
19134 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
19135 ndr->depth++;
19136 if (r->in.server_unc) {
19137 ndr_print_string(ndr, "server_unc", r->in.server_unc);
19139 ndr->depth--;
19140 ndr_print_ptr(ndr, "share", r->in.share);
19141 ndr->depth++;
19142 if (r->in.share) {
19143 ndr_print_string(ndr, "share", r->in.share);
19145 ndr->depth--;
19146 ndr_print_string(ndr, "file", r->in.file);
19147 ndr_print_security_secinfo(ndr, "securityinformation", r->in.securityinformation);
19148 ndr_print_ptr(ndr, "sd_buf", r->in.sd_buf);
19149 ndr->depth++;
19150 ndr_print_sec_desc_buf(ndr, "sd_buf", r->in.sd_buf);
19151 ndr->depth--;
19152 ndr->depth--;
19154 if (flags & NDR_OUT) {
19155 ndr_print_struct(ndr, "out", "srvsvc_NetSetFileSecurity");
19156 ndr->depth++;
19157 ndr_print_WERROR(ndr, "result", r->out.result);
19158 ndr->depth--;
19160 ndr->depth--;
19163 static enum ndr_err_code ndr_push_srvsvc_NetServerTransportAddEx(struct ndr_push *ndr, int flags, const struct srvsvc_NetServerTransportAddEx *r)
19165 if (flags & NDR_IN) {
19166 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
19167 if (r->in.server_unc) {
19168 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
19169 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
19170 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
19171 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
19173 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
19174 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.info, r->in.level));
19175 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
19177 if (flags & NDR_OUT) {
19178 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19180 return NDR_ERR_SUCCESS;
19183 static enum ndr_err_code ndr_pull_srvsvc_NetServerTransportAddEx(struct ndr_pull *ndr, int flags, struct srvsvc_NetServerTransportAddEx *r)
19185 uint32_t _ptr_server_unc;
19186 uint32_t size_server_unc_1 = 0;
19187 uint32_t length_server_unc_1 = 0;
19188 TALLOC_CTX *_mem_save_server_unc_0;
19189 if (flags & NDR_IN) {
19190 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
19191 if (_ptr_server_unc) {
19192 NDR_PULL_ALLOC(ndr, r->in.server_unc);
19193 } else {
19194 r->in.server_unc = NULL;
19196 if (r->in.server_unc) {
19197 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
19198 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
19199 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
19200 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
19201 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
19202 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
19203 if (length_server_unc_1 > size_server_unc_1) {
19204 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
19206 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
19207 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
19208 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
19210 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
19211 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.info, r->in.level));
19212 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
19214 if (flags & NDR_OUT) {
19215 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19217 return NDR_ERR_SUCCESS;
19220 _PUBLIC_ void ndr_print_srvsvc_NetServerTransportAddEx(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetServerTransportAddEx *r)
19222 ndr_print_struct(ndr, name, "srvsvc_NetServerTransportAddEx");
19223 ndr->depth++;
19224 if (flags & NDR_SET_VALUES) {
19225 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19227 if (flags & NDR_IN) {
19228 ndr_print_struct(ndr, "in", "srvsvc_NetServerTransportAddEx");
19229 ndr->depth++;
19230 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
19231 ndr->depth++;
19232 if (r->in.server_unc) {
19233 ndr_print_string(ndr, "server_unc", r->in.server_unc);
19235 ndr->depth--;
19236 ndr_print_uint32(ndr, "level", r->in.level);
19237 ndr_print_set_switch_value(ndr, &r->in.info, r->in.level);
19238 ndr_print_srvsvc_NetTransportInfo(ndr, "info", &r->in.info);
19239 ndr->depth--;
19241 if (flags & NDR_OUT) {
19242 ndr_print_struct(ndr, "out", "srvsvc_NetServerTransportAddEx");
19243 ndr->depth++;
19244 ndr_print_WERROR(ndr, "result", r->out.result);
19245 ndr->depth--;
19247 ndr->depth--;
19250 static enum ndr_err_code ndr_push_srvsvc_NetServerSetServiceBitsEx(struct ndr_push *ndr, int flags, const struct srvsvc_NetServerSetServiceBitsEx *r)
19252 if (flags & NDR_IN) {
19253 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
19254 if (r->in.server_unc) {
19255 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
19256 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
19257 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
19258 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_unc, ndr_charset_length(r->in.server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
19260 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.emulated_server_unc));
19261 if (r->in.emulated_server_unc) {
19262 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.emulated_server_unc, CH_UTF16)));
19263 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
19264 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.emulated_server_unc, CH_UTF16)));
19265 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.emulated_server_unc, ndr_charset_length(r->in.emulated_server_unc, CH_UTF16), sizeof(uint16_t), CH_UTF16));
19267 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.transport));
19268 if (r->in.transport) {
19269 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.transport, CH_UTF16)));
19270 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
19271 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.transport, CH_UTF16)));
19272 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.transport, ndr_charset_length(r->in.transport, CH_UTF16), sizeof(uint16_t), CH_UTF16));
19274 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.servicebitsofinterest));
19275 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.servicebits));
19276 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.updateimmediately));
19278 if (flags & NDR_OUT) {
19279 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19281 return NDR_ERR_SUCCESS;
19284 static enum ndr_err_code ndr_pull_srvsvc_NetServerSetServiceBitsEx(struct ndr_pull *ndr, int flags, struct srvsvc_NetServerSetServiceBitsEx *r)
19286 uint32_t _ptr_server_unc;
19287 uint32_t size_server_unc_1 = 0;
19288 uint32_t length_server_unc_1 = 0;
19289 uint32_t _ptr_emulated_server_unc;
19290 uint32_t size_emulated_server_unc_1 = 0;
19291 uint32_t length_emulated_server_unc_1 = 0;
19292 uint32_t _ptr_transport;
19293 uint32_t size_transport_1 = 0;
19294 uint32_t length_transport_1 = 0;
19295 TALLOC_CTX *_mem_save_server_unc_0;
19296 TALLOC_CTX *_mem_save_emulated_server_unc_0;
19297 TALLOC_CTX *_mem_save_transport_0;
19298 if (flags & NDR_IN) {
19299 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
19300 if (_ptr_server_unc) {
19301 NDR_PULL_ALLOC(ndr, r->in.server_unc);
19302 } else {
19303 r->in.server_unc = NULL;
19305 if (r->in.server_unc) {
19306 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
19307 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
19308 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
19309 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
19310 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
19311 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
19312 if (length_server_unc_1 > size_server_unc_1) {
19313 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
19315 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
19316 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
19317 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
19319 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_emulated_server_unc));
19320 if (_ptr_emulated_server_unc) {
19321 NDR_PULL_ALLOC(ndr, r->in.emulated_server_unc);
19322 } else {
19323 r->in.emulated_server_unc = NULL;
19325 if (r->in.emulated_server_unc) {
19326 _mem_save_emulated_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
19327 NDR_PULL_SET_MEM_CTX(ndr, r->in.emulated_server_unc, 0);
19328 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.emulated_server_unc));
19329 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.emulated_server_unc));
19330 size_emulated_server_unc_1 = ndr_get_array_size(ndr, &r->in.emulated_server_unc);
19331 length_emulated_server_unc_1 = ndr_get_array_length(ndr, &r->in.emulated_server_unc);
19332 if (length_emulated_server_unc_1 > size_emulated_server_unc_1) {
19333 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_emulated_server_unc_1, length_emulated_server_unc_1);
19335 NDR_CHECK(ndr_check_string_terminator(ndr, length_emulated_server_unc_1, sizeof(uint16_t)));
19336 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.emulated_server_unc, length_emulated_server_unc_1, sizeof(uint16_t), CH_UTF16));
19337 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_emulated_server_unc_0, 0);
19339 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_transport));
19340 if (_ptr_transport) {
19341 NDR_PULL_ALLOC(ndr, r->in.transport);
19342 } else {
19343 r->in.transport = NULL;
19345 if (r->in.transport) {
19346 _mem_save_transport_0 = NDR_PULL_GET_MEM_CTX(ndr);
19347 NDR_PULL_SET_MEM_CTX(ndr, r->in.transport, 0);
19348 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.transport));
19349 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.transport));
19350 size_transport_1 = ndr_get_array_size(ndr, &r->in.transport);
19351 length_transport_1 = ndr_get_array_length(ndr, &r->in.transport);
19352 if (length_transport_1 > size_transport_1) {
19353 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_transport_1, length_transport_1);
19355 NDR_CHECK(ndr_check_string_terminator(ndr, length_transport_1, sizeof(uint16_t)));
19356 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.transport, length_transport_1, sizeof(uint16_t), CH_UTF16));
19357 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_transport_0, 0);
19359 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.servicebitsofinterest));
19360 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.servicebits));
19361 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.updateimmediately));
19363 if (flags & NDR_OUT) {
19364 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19366 return NDR_ERR_SUCCESS;
19369 _PUBLIC_ void ndr_print_srvsvc_NetServerSetServiceBitsEx(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetServerSetServiceBitsEx *r)
19371 ndr_print_struct(ndr, name, "srvsvc_NetServerSetServiceBitsEx");
19372 ndr->depth++;
19373 if (flags & NDR_SET_VALUES) {
19374 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19376 if (flags & NDR_IN) {
19377 ndr_print_struct(ndr, "in", "srvsvc_NetServerSetServiceBitsEx");
19378 ndr->depth++;
19379 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
19380 ndr->depth++;
19381 if (r->in.server_unc) {
19382 ndr_print_string(ndr, "server_unc", r->in.server_unc);
19384 ndr->depth--;
19385 ndr_print_ptr(ndr, "emulated_server_unc", r->in.emulated_server_unc);
19386 ndr->depth++;
19387 if (r->in.emulated_server_unc) {
19388 ndr_print_string(ndr, "emulated_server_unc", r->in.emulated_server_unc);
19390 ndr->depth--;
19391 ndr_print_ptr(ndr, "transport", r->in.transport);
19392 ndr->depth++;
19393 if (r->in.transport) {
19394 ndr_print_string(ndr, "transport", r->in.transport);
19396 ndr->depth--;
19397 ndr_print_uint32(ndr, "servicebitsofinterest", r->in.servicebitsofinterest);
19398 ndr_print_uint32(ndr, "servicebits", r->in.servicebits);
19399 ndr_print_uint32(ndr, "updateimmediately", r->in.updateimmediately);
19400 ndr->depth--;
19402 if (flags & NDR_OUT) {
19403 ndr_print_struct(ndr, "out", "srvsvc_NetServerSetServiceBitsEx");
19404 ndr->depth++;
19405 ndr_print_WERROR(ndr, "result", r->out.result);
19406 ndr->depth--;
19408 ndr->depth--;
19411 static enum ndr_err_code ndr_push_srvsvc_NETRDFSGETVERSION(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSGETVERSION *r)
19413 if (flags & NDR_IN) {
19415 if (flags & NDR_OUT) {
19416 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19418 return NDR_ERR_SUCCESS;
19421 static enum ndr_err_code ndr_pull_srvsvc_NETRDFSGETVERSION(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSGETVERSION *r)
19423 if (flags & NDR_IN) {
19425 if (flags & NDR_OUT) {
19426 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19428 return NDR_ERR_SUCCESS;
19431 _PUBLIC_ void ndr_print_srvsvc_NETRDFSGETVERSION(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSGETVERSION *r)
19433 ndr_print_struct(ndr, name, "srvsvc_NETRDFSGETVERSION");
19434 ndr->depth++;
19435 if (flags & NDR_SET_VALUES) {
19436 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19438 if (flags & NDR_IN) {
19439 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSGETVERSION");
19440 ndr->depth++;
19441 ndr->depth--;
19443 if (flags & NDR_OUT) {
19444 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSGETVERSION");
19445 ndr->depth++;
19446 ndr_print_WERROR(ndr, "result", r->out.result);
19447 ndr->depth--;
19449 ndr->depth--;
19452 static enum ndr_err_code ndr_push_srvsvc_NETRDFSCREATELOCALPARTITION(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSCREATELOCALPARTITION *r)
19454 if (flags & NDR_IN) {
19456 if (flags & NDR_OUT) {
19457 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19459 return NDR_ERR_SUCCESS;
19462 static enum ndr_err_code ndr_pull_srvsvc_NETRDFSCREATELOCALPARTITION(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSCREATELOCALPARTITION *r)
19464 if (flags & NDR_IN) {
19466 if (flags & NDR_OUT) {
19467 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19469 return NDR_ERR_SUCCESS;
19472 _PUBLIC_ void ndr_print_srvsvc_NETRDFSCREATELOCALPARTITION(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSCREATELOCALPARTITION *r)
19474 ndr_print_struct(ndr, name, "srvsvc_NETRDFSCREATELOCALPARTITION");
19475 ndr->depth++;
19476 if (flags & NDR_SET_VALUES) {
19477 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19479 if (flags & NDR_IN) {
19480 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSCREATELOCALPARTITION");
19481 ndr->depth++;
19482 ndr->depth--;
19484 if (flags & NDR_OUT) {
19485 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSCREATELOCALPARTITION");
19486 ndr->depth++;
19487 ndr_print_WERROR(ndr, "result", r->out.result);
19488 ndr->depth--;
19490 ndr->depth--;
19493 static enum ndr_err_code ndr_push_srvsvc_NETRDFSDELETELOCALPARTITION(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSDELETELOCALPARTITION *r)
19495 if (flags & NDR_IN) {
19497 if (flags & NDR_OUT) {
19498 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19500 return NDR_ERR_SUCCESS;
19503 static enum ndr_err_code ndr_pull_srvsvc_NETRDFSDELETELOCALPARTITION(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSDELETELOCALPARTITION *r)
19505 if (flags & NDR_IN) {
19507 if (flags & NDR_OUT) {
19508 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19510 return NDR_ERR_SUCCESS;
19513 _PUBLIC_ void ndr_print_srvsvc_NETRDFSDELETELOCALPARTITION(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSDELETELOCALPARTITION *r)
19515 ndr_print_struct(ndr, name, "srvsvc_NETRDFSDELETELOCALPARTITION");
19516 ndr->depth++;
19517 if (flags & NDR_SET_VALUES) {
19518 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19520 if (flags & NDR_IN) {
19521 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSDELETELOCALPARTITION");
19522 ndr->depth++;
19523 ndr->depth--;
19525 if (flags & NDR_OUT) {
19526 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSDELETELOCALPARTITION");
19527 ndr->depth++;
19528 ndr_print_WERROR(ndr, "result", r->out.result);
19529 ndr->depth--;
19531 ndr->depth--;
19534 static enum ndr_err_code ndr_push_srvsvc_NETRDFSSETLOCALVOLUMESTATE(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSSETLOCALVOLUMESTATE *r)
19536 if (flags & NDR_IN) {
19538 if (flags & NDR_OUT) {
19539 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19541 return NDR_ERR_SUCCESS;
19544 static enum ndr_err_code ndr_pull_srvsvc_NETRDFSSETLOCALVOLUMESTATE(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSSETLOCALVOLUMESTATE *r)
19546 if (flags & NDR_IN) {
19548 if (flags & NDR_OUT) {
19549 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19551 return NDR_ERR_SUCCESS;
19554 _PUBLIC_ void ndr_print_srvsvc_NETRDFSSETLOCALVOLUMESTATE(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSSETLOCALVOLUMESTATE *r)
19556 ndr_print_struct(ndr, name, "srvsvc_NETRDFSSETLOCALVOLUMESTATE");
19557 ndr->depth++;
19558 if (flags & NDR_SET_VALUES) {
19559 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19561 if (flags & NDR_IN) {
19562 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSSETLOCALVOLUMESTATE");
19563 ndr->depth++;
19564 ndr->depth--;
19566 if (flags & NDR_OUT) {
19567 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSSETLOCALVOLUMESTATE");
19568 ndr->depth++;
19569 ndr_print_WERROR(ndr, "result", r->out.result);
19570 ndr->depth--;
19572 ndr->depth--;
19575 static enum ndr_err_code ndr_push_srvsvc_NETRDFSSETSERVERINFO(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSSETSERVERINFO *r)
19577 if (flags & NDR_IN) {
19579 if (flags & NDR_OUT) {
19580 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19582 return NDR_ERR_SUCCESS;
19585 static enum ndr_err_code ndr_pull_srvsvc_NETRDFSSETSERVERINFO(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSSETSERVERINFO *r)
19587 if (flags & NDR_IN) {
19589 if (flags & NDR_OUT) {
19590 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19592 return NDR_ERR_SUCCESS;
19595 _PUBLIC_ void ndr_print_srvsvc_NETRDFSSETSERVERINFO(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSSETSERVERINFO *r)
19597 ndr_print_struct(ndr, name, "srvsvc_NETRDFSSETSERVERINFO");
19598 ndr->depth++;
19599 if (flags & NDR_SET_VALUES) {
19600 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19602 if (flags & NDR_IN) {
19603 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSSETSERVERINFO");
19604 ndr->depth++;
19605 ndr->depth--;
19607 if (flags & NDR_OUT) {
19608 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSSETSERVERINFO");
19609 ndr->depth++;
19610 ndr_print_WERROR(ndr, "result", r->out.result);
19611 ndr->depth--;
19613 ndr->depth--;
19616 static enum ndr_err_code ndr_push_srvsvc_NETRDFSCREATEEXITPOINT(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSCREATEEXITPOINT *r)
19618 if (flags & NDR_IN) {
19620 if (flags & NDR_OUT) {
19621 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19623 return NDR_ERR_SUCCESS;
19626 static enum ndr_err_code ndr_pull_srvsvc_NETRDFSCREATEEXITPOINT(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSCREATEEXITPOINT *r)
19628 if (flags & NDR_IN) {
19630 if (flags & NDR_OUT) {
19631 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19633 return NDR_ERR_SUCCESS;
19636 _PUBLIC_ void ndr_print_srvsvc_NETRDFSCREATEEXITPOINT(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSCREATEEXITPOINT *r)
19638 ndr_print_struct(ndr, name, "srvsvc_NETRDFSCREATEEXITPOINT");
19639 ndr->depth++;
19640 if (flags & NDR_SET_VALUES) {
19641 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19643 if (flags & NDR_IN) {
19644 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSCREATEEXITPOINT");
19645 ndr->depth++;
19646 ndr->depth--;
19648 if (flags & NDR_OUT) {
19649 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSCREATEEXITPOINT");
19650 ndr->depth++;
19651 ndr_print_WERROR(ndr, "result", r->out.result);
19652 ndr->depth--;
19654 ndr->depth--;
19657 static enum ndr_err_code ndr_push_srvsvc_NETRDFSDELETEEXITPOINT(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSDELETEEXITPOINT *r)
19659 if (flags & NDR_IN) {
19661 if (flags & NDR_OUT) {
19662 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19664 return NDR_ERR_SUCCESS;
19667 static enum ndr_err_code ndr_pull_srvsvc_NETRDFSDELETEEXITPOINT(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSDELETEEXITPOINT *r)
19669 if (flags & NDR_IN) {
19671 if (flags & NDR_OUT) {
19672 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19674 return NDR_ERR_SUCCESS;
19677 _PUBLIC_ void ndr_print_srvsvc_NETRDFSDELETEEXITPOINT(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSDELETEEXITPOINT *r)
19679 ndr_print_struct(ndr, name, "srvsvc_NETRDFSDELETEEXITPOINT");
19680 ndr->depth++;
19681 if (flags & NDR_SET_VALUES) {
19682 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19684 if (flags & NDR_IN) {
19685 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSDELETEEXITPOINT");
19686 ndr->depth++;
19687 ndr->depth--;
19689 if (flags & NDR_OUT) {
19690 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSDELETEEXITPOINT");
19691 ndr->depth++;
19692 ndr_print_WERROR(ndr, "result", r->out.result);
19693 ndr->depth--;
19695 ndr->depth--;
19698 static enum ndr_err_code ndr_push_srvsvc_NETRDFSMODIFYPREFIX(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSMODIFYPREFIX *r)
19700 if (flags & NDR_IN) {
19702 if (flags & NDR_OUT) {
19703 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19705 return NDR_ERR_SUCCESS;
19708 static enum ndr_err_code ndr_pull_srvsvc_NETRDFSMODIFYPREFIX(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSMODIFYPREFIX *r)
19710 if (flags & NDR_IN) {
19712 if (flags & NDR_OUT) {
19713 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19715 return NDR_ERR_SUCCESS;
19718 _PUBLIC_ void ndr_print_srvsvc_NETRDFSMODIFYPREFIX(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSMODIFYPREFIX *r)
19720 ndr_print_struct(ndr, name, "srvsvc_NETRDFSMODIFYPREFIX");
19721 ndr->depth++;
19722 if (flags & NDR_SET_VALUES) {
19723 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19725 if (flags & NDR_IN) {
19726 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSMODIFYPREFIX");
19727 ndr->depth++;
19728 ndr->depth--;
19730 if (flags & NDR_OUT) {
19731 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSMODIFYPREFIX");
19732 ndr->depth++;
19733 ndr_print_WERROR(ndr, "result", r->out.result);
19734 ndr->depth--;
19736 ndr->depth--;
19739 static enum ndr_err_code ndr_push_srvsvc_NETRDFSFIXLOCALVOLUME(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSFIXLOCALVOLUME *r)
19741 if (flags & NDR_IN) {
19743 if (flags & NDR_OUT) {
19744 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19746 return NDR_ERR_SUCCESS;
19749 static enum ndr_err_code ndr_pull_srvsvc_NETRDFSFIXLOCALVOLUME(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSFIXLOCALVOLUME *r)
19751 if (flags & NDR_IN) {
19753 if (flags & NDR_OUT) {
19754 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19756 return NDR_ERR_SUCCESS;
19759 _PUBLIC_ void ndr_print_srvsvc_NETRDFSFIXLOCALVOLUME(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSFIXLOCALVOLUME *r)
19761 ndr_print_struct(ndr, name, "srvsvc_NETRDFSFIXLOCALVOLUME");
19762 ndr->depth++;
19763 if (flags & NDR_SET_VALUES) {
19764 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19766 if (flags & NDR_IN) {
19767 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSFIXLOCALVOLUME");
19768 ndr->depth++;
19769 ndr->depth--;
19771 if (flags & NDR_OUT) {
19772 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSFIXLOCALVOLUME");
19773 ndr->depth++;
19774 ndr_print_WERROR(ndr, "result", r->out.result);
19775 ndr->depth--;
19777 ndr->depth--;
19780 static enum ndr_err_code ndr_push_srvsvc_NETRDFSMANAGERREPORTSITEINFO(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSMANAGERREPORTSITEINFO *r)
19782 if (flags & NDR_IN) {
19784 if (flags & NDR_OUT) {
19785 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19787 return NDR_ERR_SUCCESS;
19790 static enum ndr_err_code ndr_pull_srvsvc_NETRDFSMANAGERREPORTSITEINFO(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSMANAGERREPORTSITEINFO *r)
19792 if (flags & NDR_IN) {
19794 if (flags & NDR_OUT) {
19795 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19797 return NDR_ERR_SUCCESS;
19800 _PUBLIC_ void ndr_print_srvsvc_NETRDFSMANAGERREPORTSITEINFO(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSMANAGERREPORTSITEINFO *r)
19802 ndr_print_struct(ndr, name, "srvsvc_NETRDFSMANAGERREPORTSITEINFO");
19803 ndr->depth++;
19804 if (flags & NDR_SET_VALUES) {
19805 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19807 if (flags & NDR_IN) {
19808 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSMANAGERREPORTSITEINFO");
19809 ndr->depth++;
19810 ndr->depth--;
19812 if (flags & NDR_OUT) {
19813 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSMANAGERREPORTSITEINFO");
19814 ndr->depth++;
19815 ndr_print_WERROR(ndr, "result", r->out.result);
19816 ndr->depth--;
19818 ndr->depth--;
19821 static enum ndr_err_code ndr_push_srvsvc_NETRSERVERTRANSPORTDELEX(struct ndr_push *ndr, int flags, const struct srvsvc_NETRSERVERTRANSPORTDELEX *r)
19823 if (flags & NDR_IN) {
19825 if (flags & NDR_OUT) {
19826 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19828 return NDR_ERR_SUCCESS;
19831 static enum ndr_err_code ndr_pull_srvsvc_NETRSERVERTRANSPORTDELEX(struct ndr_pull *ndr, int flags, struct srvsvc_NETRSERVERTRANSPORTDELEX *r)
19833 if (flags & NDR_IN) {
19835 if (flags & NDR_OUT) {
19836 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19838 return NDR_ERR_SUCCESS;
19841 _PUBLIC_ void ndr_print_srvsvc_NETRSERVERTRANSPORTDELEX(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRSERVERTRANSPORTDELEX *r)
19843 ndr_print_struct(ndr, name, "srvsvc_NETRSERVERTRANSPORTDELEX");
19844 ndr->depth++;
19845 if (flags & NDR_SET_VALUES) {
19846 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19848 if (flags & NDR_IN) {
19849 ndr_print_struct(ndr, "in", "srvsvc_NETRSERVERTRANSPORTDELEX");
19850 ndr->depth++;
19851 ndr->depth--;
19853 if (flags & NDR_OUT) {
19854 ndr_print_struct(ndr, "out", "srvsvc_NETRSERVERTRANSPORTDELEX");
19855 ndr->depth++;
19856 ndr_print_WERROR(ndr, "result", r->out.result);
19857 ndr->depth--;
19859 ndr->depth--;
19862 static const struct ndr_interface_call srvsvc_calls[] = {
19864 "srvsvc_NetCharDevEnum",
19865 sizeof(struct srvsvc_NetCharDevEnum),
19866 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevEnum,
19867 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevEnum,
19868 (ndr_print_function_t) ndr_print_srvsvc_NetCharDevEnum,
19869 false,
19872 "srvsvc_NetCharDevGetInfo",
19873 sizeof(struct srvsvc_NetCharDevGetInfo),
19874 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevGetInfo,
19875 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevGetInfo,
19876 (ndr_print_function_t) ndr_print_srvsvc_NetCharDevGetInfo,
19877 false,
19880 "srvsvc_NetCharDevControl",
19881 sizeof(struct srvsvc_NetCharDevControl),
19882 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevControl,
19883 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevControl,
19884 (ndr_print_function_t) ndr_print_srvsvc_NetCharDevControl,
19885 false,
19888 "srvsvc_NetCharDevQEnum",
19889 sizeof(struct srvsvc_NetCharDevQEnum),
19890 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevQEnum,
19891 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevQEnum,
19892 (ndr_print_function_t) ndr_print_srvsvc_NetCharDevQEnum,
19893 false,
19896 "srvsvc_NetCharDevQGetInfo",
19897 sizeof(struct srvsvc_NetCharDevQGetInfo),
19898 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevQGetInfo,
19899 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevQGetInfo,
19900 (ndr_print_function_t) ndr_print_srvsvc_NetCharDevQGetInfo,
19901 false,
19904 "srvsvc_NetCharDevQSetInfo",
19905 sizeof(struct srvsvc_NetCharDevQSetInfo),
19906 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevQSetInfo,
19907 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevQSetInfo,
19908 (ndr_print_function_t) ndr_print_srvsvc_NetCharDevQSetInfo,
19909 false,
19912 "srvsvc_NetCharDevQPurge",
19913 sizeof(struct srvsvc_NetCharDevQPurge),
19914 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevQPurge,
19915 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevQPurge,
19916 (ndr_print_function_t) ndr_print_srvsvc_NetCharDevQPurge,
19917 false,
19920 "srvsvc_NetCharDevQPurgeSelf",
19921 sizeof(struct srvsvc_NetCharDevQPurgeSelf),
19922 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevQPurgeSelf,
19923 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevQPurgeSelf,
19924 (ndr_print_function_t) ndr_print_srvsvc_NetCharDevQPurgeSelf,
19925 false,
19928 "srvsvc_NetConnEnum",
19929 sizeof(struct srvsvc_NetConnEnum),
19930 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetConnEnum,
19931 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetConnEnum,
19932 (ndr_print_function_t) ndr_print_srvsvc_NetConnEnum,
19933 false,
19936 "srvsvc_NetFileEnum",
19937 sizeof(struct srvsvc_NetFileEnum),
19938 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetFileEnum,
19939 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetFileEnum,
19940 (ndr_print_function_t) ndr_print_srvsvc_NetFileEnum,
19941 false,
19944 "srvsvc_NetFileGetInfo",
19945 sizeof(struct srvsvc_NetFileGetInfo),
19946 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetFileGetInfo,
19947 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetFileGetInfo,
19948 (ndr_print_function_t) ndr_print_srvsvc_NetFileGetInfo,
19949 false,
19952 "srvsvc_NetFileClose",
19953 sizeof(struct srvsvc_NetFileClose),
19954 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetFileClose,
19955 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetFileClose,
19956 (ndr_print_function_t) ndr_print_srvsvc_NetFileClose,
19957 false,
19960 "srvsvc_NetSessEnum",
19961 sizeof(struct srvsvc_NetSessEnum),
19962 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetSessEnum,
19963 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetSessEnum,
19964 (ndr_print_function_t) ndr_print_srvsvc_NetSessEnum,
19965 false,
19968 "srvsvc_NetSessDel",
19969 sizeof(struct srvsvc_NetSessDel),
19970 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetSessDel,
19971 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetSessDel,
19972 (ndr_print_function_t) ndr_print_srvsvc_NetSessDel,
19973 false,
19976 "srvsvc_NetShareAdd",
19977 sizeof(struct srvsvc_NetShareAdd),
19978 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareAdd,
19979 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareAdd,
19980 (ndr_print_function_t) ndr_print_srvsvc_NetShareAdd,
19981 false,
19984 "srvsvc_NetShareEnumAll",
19985 sizeof(struct srvsvc_NetShareEnumAll),
19986 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareEnumAll,
19987 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareEnumAll,
19988 (ndr_print_function_t) ndr_print_srvsvc_NetShareEnumAll,
19989 false,
19992 "srvsvc_NetShareGetInfo",
19993 sizeof(struct srvsvc_NetShareGetInfo),
19994 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareGetInfo,
19995 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareGetInfo,
19996 (ndr_print_function_t) ndr_print_srvsvc_NetShareGetInfo,
19997 false,
20000 "srvsvc_NetShareSetInfo",
20001 sizeof(struct srvsvc_NetShareSetInfo),
20002 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareSetInfo,
20003 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareSetInfo,
20004 (ndr_print_function_t) ndr_print_srvsvc_NetShareSetInfo,
20005 false,
20008 "srvsvc_NetShareDel",
20009 sizeof(struct srvsvc_NetShareDel),
20010 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareDel,
20011 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareDel,
20012 (ndr_print_function_t) ndr_print_srvsvc_NetShareDel,
20013 false,
20016 "srvsvc_NetShareDelSticky",
20017 sizeof(struct srvsvc_NetShareDelSticky),
20018 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareDelSticky,
20019 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareDelSticky,
20020 (ndr_print_function_t) ndr_print_srvsvc_NetShareDelSticky,
20021 false,
20024 "srvsvc_NetShareCheck",
20025 sizeof(struct srvsvc_NetShareCheck),
20026 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareCheck,
20027 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareCheck,
20028 (ndr_print_function_t) ndr_print_srvsvc_NetShareCheck,
20029 false,
20032 "srvsvc_NetSrvGetInfo",
20033 sizeof(struct srvsvc_NetSrvGetInfo),
20034 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetSrvGetInfo,
20035 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetSrvGetInfo,
20036 (ndr_print_function_t) ndr_print_srvsvc_NetSrvGetInfo,
20037 false,
20040 "srvsvc_NetSrvSetInfo",
20041 sizeof(struct srvsvc_NetSrvSetInfo),
20042 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetSrvSetInfo,
20043 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetSrvSetInfo,
20044 (ndr_print_function_t) ndr_print_srvsvc_NetSrvSetInfo,
20045 false,
20048 "srvsvc_NetDiskEnum",
20049 sizeof(struct srvsvc_NetDiskEnum),
20050 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetDiskEnum,
20051 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetDiskEnum,
20052 (ndr_print_function_t) ndr_print_srvsvc_NetDiskEnum,
20053 false,
20056 "srvsvc_NetServerStatisticsGet",
20057 sizeof(struct srvsvc_NetServerStatisticsGet),
20058 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetServerStatisticsGet,
20059 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetServerStatisticsGet,
20060 (ndr_print_function_t) ndr_print_srvsvc_NetServerStatisticsGet,
20061 false,
20064 "srvsvc_NetTransportAdd",
20065 sizeof(struct srvsvc_NetTransportAdd),
20066 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetTransportAdd,
20067 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetTransportAdd,
20068 (ndr_print_function_t) ndr_print_srvsvc_NetTransportAdd,
20069 false,
20072 "srvsvc_NetTransportEnum",
20073 sizeof(struct srvsvc_NetTransportEnum),
20074 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetTransportEnum,
20075 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetTransportEnum,
20076 (ndr_print_function_t) ndr_print_srvsvc_NetTransportEnum,
20077 false,
20080 "srvsvc_NetTransportDel",
20081 sizeof(struct srvsvc_NetTransportDel),
20082 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetTransportDel,
20083 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetTransportDel,
20084 (ndr_print_function_t) ndr_print_srvsvc_NetTransportDel,
20085 false,
20088 "srvsvc_NetRemoteTOD",
20089 sizeof(struct srvsvc_NetRemoteTOD),
20090 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetRemoteTOD,
20091 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetRemoteTOD,
20092 (ndr_print_function_t) ndr_print_srvsvc_NetRemoteTOD,
20093 false,
20096 "srvsvc_NetSetServiceBits",
20097 sizeof(struct srvsvc_NetSetServiceBits),
20098 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetSetServiceBits,
20099 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetSetServiceBits,
20100 (ndr_print_function_t) ndr_print_srvsvc_NetSetServiceBits,
20101 false,
20104 "srvsvc_NetPathType",
20105 sizeof(struct srvsvc_NetPathType),
20106 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetPathType,
20107 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetPathType,
20108 (ndr_print_function_t) ndr_print_srvsvc_NetPathType,
20109 false,
20112 "srvsvc_NetPathCanonicalize",
20113 sizeof(struct srvsvc_NetPathCanonicalize),
20114 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetPathCanonicalize,
20115 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetPathCanonicalize,
20116 (ndr_print_function_t) ndr_print_srvsvc_NetPathCanonicalize,
20117 false,
20120 "srvsvc_NetPathCompare",
20121 sizeof(struct srvsvc_NetPathCompare),
20122 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetPathCompare,
20123 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetPathCompare,
20124 (ndr_print_function_t) ndr_print_srvsvc_NetPathCompare,
20125 false,
20128 "srvsvc_NetNameValidate",
20129 sizeof(struct srvsvc_NetNameValidate),
20130 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetNameValidate,
20131 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetNameValidate,
20132 (ndr_print_function_t) ndr_print_srvsvc_NetNameValidate,
20133 false,
20136 "srvsvc_NETRPRNAMECANONICALIZE",
20137 sizeof(struct srvsvc_NETRPRNAMECANONICALIZE),
20138 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRPRNAMECANONICALIZE,
20139 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRPRNAMECANONICALIZE,
20140 (ndr_print_function_t) ndr_print_srvsvc_NETRPRNAMECANONICALIZE,
20141 false,
20144 "srvsvc_NetPRNameCompare",
20145 sizeof(struct srvsvc_NetPRNameCompare),
20146 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetPRNameCompare,
20147 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetPRNameCompare,
20148 (ndr_print_function_t) ndr_print_srvsvc_NetPRNameCompare,
20149 false,
20152 "srvsvc_NetShareEnum",
20153 sizeof(struct srvsvc_NetShareEnum),
20154 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareEnum,
20155 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareEnum,
20156 (ndr_print_function_t) ndr_print_srvsvc_NetShareEnum,
20157 false,
20160 "srvsvc_NetShareDelStart",
20161 sizeof(struct srvsvc_NetShareDelStart),
20162 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareDelStart,
20163 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareDelStart,
20164 (ndr_print_function_t) ndr_print_srvsvc_NetShareDelStart,
20165 false,
20168 "srvsvc_NetShareDelCommit",
20169 sizeof(struct srvsvc_NetShareDelCommit),
20170 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareDelCommit,
20171 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareDelCommit,
20172 (ndr_print_function_t) ndr_print_srvsvc_NetShareDelCommit,
20173 false,
20176 "srvsvc_NetGetFileSecurity",
20177 sizeof(struct srvsvc_NetGetFileSecurity),
20178 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetGetFileSecurity,
20179 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetGetFileSecurity,
20180 (ndr_print_function_t) ndr_print_srvsvc_NetGetFileSecurity,
20181 false,
20184 "srvsvc_NetSetFileSecurity",
20185 sizeof(struct srvsvc_NetSetFileSecurity),
20186 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetSetFileSecurity,
20187 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetSetFileSecurity,
20188 (ndr_print_function_t) ndr_print_srvsvc_NetSetFileSecurity,
20189 false,
20192 "srvsvc_NetServerTransportAddEx",
20193 sizeof(struct srvsvc_NetServerTransportAddEx),
20194 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetServerTransportAddEx,
20195 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetServerTransportAddEx,
20196 (ndr_print_function_t) ndr_print_srvsvc_NetServerTransportAddEx,
20197 false,
20200 "srvsvc_NetServerSetServiceBitsEx",
20201 sizeof(struct srvsvc_NetServerSetServiceBitsEx),
20202 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetServerSetServiceBitsEx,
20203 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetServerSetServiceBitsEx,
20204 (ndr_print_function_t) ndr_print_srvsvc_NetServerSetServiceBitsEx,
20205 false,
20208 "srvsvc_NETRDFSGETVERSION",
20209 sizeof(struct srvsvc_NETRDFSGETVERSION),
20210 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSGETVERSION,
20211 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSGETVERSION,
20212 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSGETVERSION,
20213 false,
20216 "srvsvc_NETRDFSCREATELOCALPARTITION",
20217 sizeof(struct srvsvc_NETRDFSCREATELOCALPARTITION),
20218 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSCREATELOCALPARTITION,
20219 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSCREATELOCALPARTITION,
20220 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSCREATELOCALPARTITION,
20221 false,
20224 "srvsvc_NETRDFSDELETELOCALPARTITION",
20225 sizeof(struct srvsvc_NETRDFSDELETELOCALPARTITION),
20226 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSDELETELOCALPARTITION,
20227 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSDELETELOCALPARTITION,
20228 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSDELETELOCALPARTITION,
20229 false,
20232 "srvsvc_NETRDFSSETLOCALVOLUMESTATE",
20233 sizeof(struct srvsvc_NETRDFSSETLOCALVOLUMESTATE),
20234 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSSETLOCALVOLUMESTATE,
20235 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSSETLOCALVOLUMESTATE,
20236 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSSETLOCALVOLUMESTATE,
20237 false,
20240 "srvsvc_NETRDFSSETSERVERINFO",
20241 sizeof(struct srvsvc_NETRDFSSETSERVERINFO),
20242 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSSETSERVERINFO,
20243 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSSETSERVERINFO,
20244 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSSETSERVERINFO,
20245 false,
20248 "srvsvc_NETRDFSCREATEEXITPOINT",
20249 sizeof(struct srvsvc_NETRDFSCREATEEXITPOINT),
20250 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSCREATEEXITPOINT,
20251 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSCREATEEXITPOINT,
20252 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSCREATEEXITPOINT,
20253 false,
20256 "srvsvc_NETRDFSDELETEEXITPOINT",
20257 sizeof(struct srvsvc_NETRDFSDELETEEXITPOINT),
20258 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSDELETEEXITPOINT,
20259 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSDELETEEXITPOINT,
20260 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSDELETEEXITPOINT,
20261 false,
20264 "srvsvc_NETRDFSMODIFYPREFIX",
20265 sizeof(struct srvsvc_NETRDFSMODIFYPREFIX),
20266 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSMODIFYPREFIX,
20267 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSMODIFYPREFIX,
20268 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSMODIFYPREFIX,
20269 false,
20272 "srvsvc_NETRDFSFIXLOCALVOLUME",
20273 sizeof(struct srvsvc_NETRDFSFIXLOCALVOLUME),
20274 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSFIXLOCALVOLUME,
20275 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSFIXLOCALVOLUME,
20276 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSFIXLOCALVOLUME,
20277 false,
20280 "srvsvc_NETRDFSMANAGERREPORTSITEINFO",
20281 sizeof(struct srvsvc_NETRDFSMANAGERREPORTSITEINFO),
20282 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSMANAGERREPORTSITEINFO,
20283 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSMANAGERREPORTSITEINFO,
20284 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSMANAGERREPORTSITEINFO,
20285 false,
20288 "srvsvc_NETRSERVERTRANSPORTDELEX",
20289 sizeof(struct srvsvc_NETRSERVERTRANSPORTDELEX),
20290 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRSERVERTRANSPORTDELEX,
20291 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRSERVERTRANSPORTDELEX,
20292 (ndr_print_function_t) ndr_print_srvsvc_NETRSERVERTRANSPORTDELEX,
20293 false,
20295 { NULL, 0, NULL, NULL, NULL, false }
20298 static const char * const srvsvc_endpoint_strings[] = {
20299 "ncacn_np:[\\pipe\\srvsvc]",
20300 "ncacn_ip_tcp:",
20301 "ncalrpc:",
20304 static const struct ndr_interface_string_array srvsvc_endpoints = {
20305 .count = 3,
20306 .names = srvsvc_endpoint_strings
20309 static const char * const srvsvc_authservice_strings[] = {
20310 "host",
20313 static const struct ndr_interface_string_array srvsvc_authservices = {
20314 .count = 1,
20315 .names = srvsvc_authservice_strings
20319 const struct ndr_interface_table ndr_table_srvsvc = {
20320 .name = "srvsvc",
20321 .syntax_id = {
20322 {0x4b324fc8,0x1670,0x01d3,{0x12,0x78},{0x5a,0x47,0xbf,0x6e,0xe1,0x88}},
20323 NDR_SRVSVC_VERSION
20325 .helpstring = NDR_SRVSVC_HELPSTRING,
20326 .num_calls = 54,
20327 .calls = srvsvc_calls,
20328 .endpoints = &srvsvc_endpoints,
20329 .authservices = &srvsvc_authservices