re-run make idl after Jelmer's "poperly cast array lengths" pidl change.
[Samba.git] / source / librpc / gen_ndr / ndr_srvsvc.c
blobd97ee0171c139e552046fb04c2e0ae76d61de20e
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 TALLOC_CTX *_mem_save_device_0;
29 if (ndr_flags & NDR_SCALARS) {
30 NDR_CHECK(ndr_pull_align(ndr, 4));
31 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_device));
32 if (_ptr_device) {
33 NDR_PULL_ALLOC(ndr, r->device);
34 } else {
35 r->device = NULL;
38 if (ndr_flags & NDR_BUFFERS) {
39 if (r->device) {
40 _mem_save_device_0 = NDR_PULL_GET_MEM_CTX(ndr);
41 NDR_PULL_SET_MEM_CTX(ndr, r->device, 0);
42 NDR_CHECK(ndr_pull_array_size(ndr, &r->device));
43 NDR_CHECK(ndr_pull_array_length(ndr, &r->device));
44 if (ndr_get_array_length(ndr, &r->device) > ndr_get_array_size(ndr, &r->device)) {
45 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->device), ndr_get_array_length(ndr, &r->device));
47 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->device), sizeof(uint16_t)));
48 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->device, ndr_get_array_length(ndr, &r->device), sizeof(uint16_t), CH_UTF16));
49 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_device_0, 0);
52 return NDR_ERR_SUCCESS;
55 _PUBLIC_ void ndr_print_srvsvc_NetCharDevInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevInfo0 *r)
57 ndr_print_struct(ndr, name, "srvsvc_NetCharDevInfo0");
58 ndr->depth++;
59 ndr_print_ptr(ndr, "device", r->device);
60 ndr->depth++;
61 if (r->device) {
62 ndr_print_string(ndr, "device", r->device);
64 ndr->depth--;
65 ndr->depth--;
68 static enum ndr_err_code ndr_push_srvsvc_NetCharDevCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevCtr0 *r)
70 uint32_t cntr_array_1;
71 if (ndr_flags & NDR_SCALARS) {
72 NDR_CHECK(ndr_push_align(ndr, 4));
73 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
74 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
76 if (ndr_flags & NDR_BUFFERS) {
77 if (r->array) {
78 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
79 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
80 NDR_CHECK(ndr_push_srvsvc_NetCharDevInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
82 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
83 NDR_CHECK(ndr_push_srvsvc_NetCharDevInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
87 return NDR_ERR_SUCCESS;
90 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevCtr0 *r)
92 uint32_t _ptr_array;
93 uint32_t cntr_array_1;
94 TALLOC_CTX *_mem_save_array_0;
95 TALLOC_CTX *_mem_save_array_1;
96 if (ndr_flags & NDR_SCALARS) {
97 NDR_CHECK(ndr_pull_align(ndr, 4));
98 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
99 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
100 if (_ptr_array) {
101 NDR_PULL_ALLOC(ndr, r->array);
102 } else {
103 r->array = NULL;
106 if (ndr_flags & NDR_BUFFERS) {
107 if (r->array) {
108 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
109 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
110 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
111 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
112 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
113 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
114 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
115 NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
117 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
118 NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
120 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
121 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
123 if (r->array) {
124 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
127 return NDR_ERR_SUCCESS;
130 _PUBLIC_ void ndr_print_srvsvc_NetCharDevCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevCtr0 *r)
132 uint32_t cntr_array_1;
133 ndr_print_struct(ndr, name, "srvsvc_NetCharDevCtr0");
134 ndr->depth++;
135 ndr_print_uint32(ndr, "count", r->count);
136 ndr_print_ptr(ndr, "array", r->array);
137 ndr->depth++;
138 if (r->array) {
139 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
140 ndr->depth++;
141 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
142 char *idx_1=NULL;
143 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
144 ndr_print_srvsvc_NetCharDevInfo0(ndr, "array", &r->array[cntr_array_1]);
145 free(idx_1);
148 ndr->depth--;
150 ndr->depth--;
151 ndr->depth--;
154 static enum ndr_err_code ndr_push_srvsvc_NetCharDevInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevInfo1 *r)
156 if (ndr_flags & NDR_SCALARS) {
157 NDR_CHECK(ndr_push_align(ndr, 4));
158 NDR_CHECK(ndr_push_unique_ptr(ndr, r->device));
159 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->status));
160 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
161 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
163 if (ndr_flags & NDR_BUFFERS) {
164 if (r->device) {
165 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
166 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
167 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
168 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->device, ndr_charset_length(r->device, CH_UTF16), sizeof(uint16_t), CH_UTF16));
170 if (r->user) {
171 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, 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->user, CH_UTF16)));
174 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
177 return NDR_ERR_SUCCESS;
180 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevInfo1 *r)
182 uint32_t _ptr_device;
183 TALLOC_CTX *_mem_save_device_0;
184 uint32_t _ptr_user;
185 TALLOC_CTX *_mem_save_user_0;
186 if (ndr_flags & NDR_SCALARS) {
187 NDR_CHECK(ndr_pull_align(ndr, 4));
188 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_device));
189 if (_ptr_device) {
190 NDR_PULL_ALLOC(ndr, r->device);
191 } else {
192 r->device = NULL;
194 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->status));
195 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
196 if (_ptr_user) {
197 NDR_PULL_ALLOC(ndr, r->user);
198 } else {
199 r->user = NULL;
201 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
203 if (ndr_flags & NDR_BUFFERS) {
204 if (r->device) {
205 _mem_save_device_0 = NDR_PULL_GET_MEM_CTX(ndr);
206 NDR_PULL_SET_MEM_CTX(ndr, r->device, 0);
207 NDR_CHECK(ndr_pull_array_size(ndr, &r->device));
208 NDR_CHECK(ndr_pull_array_length(ndr, &r->device));
209 if (ndr_get_array_length(ndr, &r->device) > ndr_get_array_size(ndr, &r->device)) {
210 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->device), ndr_get_array_length(ndr, &r->device));
212 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->device), sizeof(uint16_t)));
213 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->device, ndr_get_array_length(ndr, &r->device), sizeof(uint16_t), CH_UTF16));
214 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_device_0, 0);
216 if (r->user) {
217 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
218 NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
219 NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
220 NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
221 if (ndr_get_array_length(ndr, &r->user) > ndr_get_array_size(ndr, &r->user)) {
222 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->user), ndr_get_array_length(ndr, &r->user));
224 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t)));
225 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t), CH_UTF16));
226 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
229 return NDR_ERR_SUCCESS;
232 _PUBLIC_ void ndr_print_srvsvc_NetCharDevInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevInfo1 *r)
234 ndr_print_struct(ndr, name, "srvsvc_NetCharDevInfo1");
235 ndr->depth++;
236 ndr_print_ptr(ndr, "device", r->device);
237 ndr->depth++;
238 if (r->device) {
239 ndr_print_string(ndr, "device", r->device);
241 ndr->depth--;
242 ndr_print_uint32(ndr, "status", r->status);
243 ndr_print_ptr(ndr, "user", r->user);
244 ndr->depth++;
245 if (r->user) {
246 ndr_print_string(ndr, "user", r->user);
248 ndr->depth--;
249 ndr_print_uint32(ndr, "time", r->time);
250 ndr->depth--;
253 static enum ndr_err_code ndr_push_srvsvc_NetCharDevCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevCtr1 *r)
255 uint32_t cntr_array_1;
256 if (ndr_flags & NDR_SCALARS) {
257 NDR_CHECK(ndr_push_align(ndr, 4));
258 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
259 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
261 if (ndr_flags & NDR_BUFFERS) {
262 if (r->array) {
263 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
264 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
265 NDR_CHECK(ndr_push_srvsvc_NetCharDevInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
267 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
268 NDR_CHECK(ndr_push_srvsvc_NetCharDevInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
272 return NDR_ERR_SUCCESS;
275 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevCtr1 *r)
277 uint32_t _ptr_array;
278 uint32_t cntr_array_1;
279 TALLOC_CTX *_mem_save_array_0;
280 TALLOC_CTX *_mem_save_array_1;
281 if (ndr_flags & NDR_SCALARS) {
282 NDR_CHECK(ndr_pull_align(ndr, 4));
283 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
284 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
285 if (_ptr_array) {
286 NDR_PULL_ALLOC(ndr, r->array);
287 } else {
288 r->array = NULL;
291 if (ndr_flags & NDR_BUFFERS) {
292 if (r->array) {
293 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
294 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
295 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
296 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
297 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
298 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
299 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
300 NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
302 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
303 NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
305 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
306 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
308 if (r->array) {
309 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
312 return NDR_ERR_SUCCESS;
315 _PUBLIC_ void ndr_print_srvsvc_NetCharDevCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevCtr1 *r)
317 uint32_t cntr_array_1;
318 ndr_print_struct(ndr, name, "srvsvc_NetCharDevCtr1");
319 ndr->depth++;
320 ndr_print_uint32(ndr, "count", r->count);
321 ndr_print_ptr(ndr, "array", r->array);
322 ndr->depth++;
323 if (r->array) {
324 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
325 ndr->depth++;
326 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
327 char *idx_1=NULL;
328 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
329 ndr_print_srvsvc_NetCharDevInfo1(ndr, "array", &r->array[cntr_array_1]);
330 free(idx_1);
333 ndr->depth--;
335 ndr->depth--;
336 ndr->depth--;
339 static enum ndr_err_code ndr_push_srvsvc_NetCharDevInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetCharDevInfo *r)
341 if (ndr_flags & NDR_SCALARS) {
342 int level = ndr_push_get_switch_value(ndr, r);
343 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
344 switch (level) {
345 case 0: {
346 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
347 break; }
349 case 1: {
350 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
351 break; }
353 default: {
354 break; }
358 if (ndr_flags & NDR_BUFFERS) {
359 int level = ndr_push_get_switch_value(ndr, r);
360 switch (level) {
361 case 0:
362 if (r->info0) {
363 NDR_CHECK(ndr_push_srvsvc_NetCharDevInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
365 break;
367 case 1:
368 if (r->info1) {
369 NDR_CHECK(ndr_push_srvsvc_NetCharDevInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
371 break;
373 default:
374 break;
378 return NDR_ERR_SUCCESS;
381 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetCharDevInfo *r)
383 int level;
384 uint32_t _level;
385 TALLOC_CTX *_mem_save_info0_0;
386 TALLOC_CTX *_mem_save_info1_0;
387 level = ndr_pull_get_switch_value(ndr, r);
388 if (ndr_flags & NDR_SCALARS) {
389 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
390 if (_level != level) {
391 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
393 switch (level) {
394 case 0: {
395 uint32_t _ptr_info0;
396 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
397 if (_ptr_info0) {
398 NDR_PULL_ALLOC(ndr, r->info0);
399 } else {
400 r->info0 = NULL;
402 break; }
404 case 1: {
405 uint32_t _ptr_info1;
406 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
407 if (_ptr_info1) {
408 NDR_PULL_ALLOC(ndr, r->info1);
409 } else {
410 r->info1 = NULL;
412 break; }
414 default: {
415 break; }
419 if (ndr_flags & NDR_BUFFERS) {
420 switch (level) {
421 case 0:
422 if (r->info0) {
423 _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
424 NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
425 NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
426 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
428 break;
430 case 1:
431 if (r->info1) {
432 _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
433 NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
434 NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
435 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
437 break;
439 default:
440 break;
444 return NDR_ERR_SUCCESS;
447 _PUBLIC_ void ndr_print_srvsvc_NetCharDevInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetCharDevInfo *r)
449 int level;
450 level = ndr_print_get_switch_value(ndr, r);
451 ndr_print_union(ndr, name, level, "srvsvc_NetCharDevInfo");
452 switch (level) {
453 case 0:
454 ndr_print_ptr(ndr, "info0", r->info0);
455 ndr->depth++;
456 if (r->info0) {
457 ndr_print_srvsvc_NetCharDevInfo0(ndr, "info0", r->info0);
459 ndr->depth--;
460 break;
462 case 1:
463 ndr_print_ptr(ndr, "info1", r->info1);
464 ndr->depth++;
465 if (r->info1) {
466 ndr_print_srvsvc_NetCharDevInfo1(ndr, "info1", r->info1);
468 ndr->depth--;
469 break;
471 default:
472 break;
477 static enum ndr_err_code ndr_push_srvsvc_NetCharDevCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetCharDevCtr *r)
479 if (ndr_flags & NDR_SCALARS) {
480 int level = ndr_push_get_switch_value(ndr, r);
481 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
482 switch (level) {
483 case 0: {
484 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0));
485 break; }
487 case 1: {
488 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
489 break; }
491 default: {
492 break; }
496 if (ndr_flags & NDR_BUFFERS) {
497 int level = ndr_push_get_switch_value(ndr, r);
498 switch (level) {
499 case 0:
500 if (r->ctr0) {
501 NDR_CHECK(ndr_push_srvsvc_NetCharDevCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
503 break;
505 case 1:
506 if (r->ctr1) {
507 NDR_CHECK(ndr_push_srvsvc_NetCharDevCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
509 break;
511 default:
512 break;
516 return NDR_ERR_SUCCESS;
519 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetCharDevCtr *r)
521 int level;
522 uint32_t _level;
523 TALLOC_CTX *_mem_save_ctr0_0;
524 TALLOC_CTX *_mem_save_ctr1_0;
525 level = ndr_pull_get_switch_value(ndr, r);
526 if (ndr_flags & NDR_SCALARS) {
527 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
528 if (_level != level) {
529 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
531 switch (level) {
532 case 0: {
533 uint32_t _ptr_ctr0;
534 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr0));
535 if (_ptr_ctr0) {
536 NDR_PULL_ALLOC(ndr, r->ctr0);
537 } else {
538 r->ctr0 = NULL;
540 break; }
542 case 1: {
543 uint32_t _ptr_ctr1;
544 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
545 if (_ptr_ctr1) {
546 NDR_PULL_ALLOC(ndr, r->ctr1);
547 } else {
548 r->ctr1 = NULL;
550 break; }
552 default: {
553 break; }
557 if (ndr_flags & NDR_BUFFERS) {
558 switch (level) {
559 case 0:
560 if (r->ctr0) {
561 _mem_save_ctr0_0 = NDR_PULL_GET_MEM_CTX(ndr);
562 NDR_PULL_SET_MEM_CTX(ndr, r->ctr0, 0);
563 NDR_CHECK(ndr_pull_srvsvc_NetCharDevCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
564 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr0_0, 0);
566 break;
568 case 1:
569 if (r->ctr1) {
570 _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
571 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
572 NDR_CHECK(ndr_pull_srvsvc_NetCharDevCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
573 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
575 break;
577 default:
578 break;
582 return NDR_ERR_SUCCESS;
585 _PUBLIC_ void ndr_print_srvsvc_NetCharDevCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetCharDevCtr *r)
587 int level;
588 level = ndr_print_get_switch_value(ndr, r);
589 ndr_print_union(ndr, name, level, "srvsvc_NetCharDevCtr");
590 switch (level) {
591 case 0:
592 ndr_print_ptr(ndr, "ctr0", r->ctr0);
593 ndr->depth++;
594 if (r->ctr0) {
595 ndr_print_srvsvc_NetCharDevCtr0(ndr, "ctr0", r->ctr0);
597 ndr->depth--;
598 break;
600 case 1:
601 ndr_print_ptr(ndr, "ctr1", r->ctr1);
602 ndr->depth++;
603 if (r->ctr1) {
604 ndr_print_srvsvc_NetCharDevCtr1(ndr, "ctr1", r->ctr1);
606 ndr->depth--;
607 break;
609 default:
610 break;
615 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevQInfo0 *r)
617 if (ndr_flags & NDR_SCALARS) {
618 NDR_CHECK(ndr_push_align(ndr, 4));
619 NDR_CHECK(ndr_push_unique_ptr(ndr, r->device));
621 if (ndr_flags & NDR_BUFFERS) {
622 if (r->device) {
623 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
624 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
625 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
626 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->device, ndr_charset_length(r->device, CH_UTF16), sizeof(uint16_t), CH_UTF16));
629 return NDR_ERR_SUCCESS;
632 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevQInfo0 *r)
634 uint32_t _ptr_device;
635 TALLOC_CTX *_mem_save_device_0;
636 if (ndr_flags & NDR_SCALARS) {
637 NDR_CHECK(ndr_pull_align(ndr, 4));
638 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_device));
639 if (_ptr_device) {
640 NDR_PULL_ALLOC(ndr, r->device);
641 } else {
642 r->device = NULL;
645 if (ndr_flags & NDR_BUFFERS) {
646 if (r->device) {
647 _mem_save_device_0 = NDR_PULL_GET_MEM_CTX(ndr);
648 NDR_PULL_SET_MEM_CTX(ndr, r->device, 0);
649 NDR_CHECK(ndr_pull_array_size(ndr, &r->device));
650 NDR_CHECK(ndr_pull_array_length(ndr, &r->device));
651 if (ndr_get_array_length(ndr, &r->device) > ndr_get_array_size(ndr, &r->device)) {
652 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->device), ndr_get_array_length(ndr, &r->device));
654 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->device), sizeof(uint16_t)));
655 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->device, ndr_get_array_length(ndr, &r->device), sizeof(uint16_t), CH_UTF16));
656 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_device_0, 0);
659 return NDR_ERR_SUCCESS;
662 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQInfo0 *r)
664 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQInfo0");
665 ndr->depth++;
666 ndr_print_ptr(ndr, "device", r->device);
667 ndr->depth++;
668 if (r->device) {
669 ndr_print_string(ndr, "device", r->device);
671 ndr->depth--;
672 ndr->depth--;
675 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevQCtr0 *r)
677 uint32_t cntr_array_1;
678 if (ndr_flags & NDR_SCALARS) {
679 NDR_CHECK(ndr_push_align(ndr, 4));
680 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
681 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
683 if (ndr_flags & NDR_BUFFERS) {
684 if (r->array) {
685 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
686 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
687 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
689 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
690 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
694 return NDR_ERR_SUCCESS;
697 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevQCtr0 *r)
699 uint32_t _ptr_array;
700 uint32_t cntr_array_1;
701 TALLOC_CTX *_mem_save_array_0;
702 TALLOC_CTX *_mem_save_array_1;
703 if (ndr_flags & NDR_SCALARS) {
704 NDR_CHECK(ndr_pull_align(ndr, 4));
705 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
706 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
707 if (_ptr_array) {
708 NDR_PULL_ALLOC(ndr, r->array);
709 } else {
710 r->array = NULL;
713 if (ndr_flags & NDR_BUFFERS) {
714 if (r->array) {
715 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
716 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
717 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
718 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
719 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
720 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
721 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
722 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
724 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
725 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
727 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
728 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
730 if (r->array) {
731 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
734 return NDR_ERR_SUCCESS;
737 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQCtr0 *r)
739 uint32_t cntr_array_1;
740 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQCtr0");
741 ndr->depth++;
742 ndr_print_uint32(ndr, "count", r->count);
743 ndr_print_ptr(ndr, "array", r->array);
744 ndr->depth++;
745 if (r->array) {
746 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
747 ndr->depth++;
748 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
749 char *idx_1=NULL;
750 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
751 ndr_print_srvsvc_NetCharDevQInfo0(ndr, "array", &r->array[cntr_array_1]);
752 free(idx_1);
755 ndr->depth--;
757 ndr->depth--;
758 ndr->depth--;
761 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevQInfo1 *r)
763 if (ndr_flags & NDR_SCALARS) {
764 NDR_CHECK(ndr_push_align(ndr, 4));
765 NDR_CHECK(ndr_push_unique_ptr(ndr, r->device));
766 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->priority));
767 NDR_CHECK(ndr_push_unique_ptr(ndr, r->devices));
768 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->users));
769 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_ahead));
771 if (ndr_flags & NDR_BUFFERS) {
772 if (r->device) {
773 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
774 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
775 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
776 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->device, ndr_charset_length(r->device, CH_UTF16), sizeof(uint16_t), CH_UTF16));
778 if (r->devices) {
779 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->devices, CH_UTF16)));
780 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
781 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->devices, CH_UTF16)));
782 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->devices, ndr_charset_length(r->devices, CH_UTF16), sizeof(uint16_t), CH_UTF16));
785 return NDR_ERR_SUCCESS;
788 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevQInfo1 *r)
790 uint32_t _ptr_device;
791 TALLOC_CTX *_mem_save_device_0;
792 uint32_t _ptr_devices;
793 TALLOC_CTX *_mem_save_devices_0;
794 if (ndr_flags & NDR_SCALARS) {
795 NDR_CHECK(ndr_pull_align(ndr, 4));
796 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_device));
797 if (_ptr_device) {
798 NDR_PULL_ALLOC(ndr, r->device);
799 } else {
800 r->device = NULL;
802 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->priority));
803 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_devices));
804 if (_ptr_devices) {
805 NDR_PULL_ALLOC(ndr, r->devices);
806 } else {
807 r->devices = NULL;
809 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->users));
810 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_ahead));
812 if (ndr_flags & NDR_BUFFERS) {
813 if (r->device) {
814 _mem_save_device_0 = NDR_PULL_GET_MEM_CTX(ndr);
815 NDR_PULL_SET_MEM_CTX(ndr, r->device, 0);
816 NDR_CHECK(ndr_pull_array_size(ndr, &r->device));
817 NDR_CHECK(ndr_pull_array_length(ndr, &r->device));
818 if (ndr_get_array_length(ndr, &r->device) > ndr_get_array_size(ndr, &r->device)) {
819 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->device), ndr_get_array_length(ndr, &r->device));
821 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->device), sizeof(uint16_t)));
822 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->device, ndr_get_array_length(ndr, &r->device), sizeof(uint16_t), CH_UTF16));
823 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_device_0, 0);
825 if (r->devices) {
826 _mem_save_devices_0 = NDR_PULL_GET_MEM_CTX(ndr);
827 NDR_PULL_SET_MEM_CTX(ndr, r->devices, 0);
828 NDR_CHECK(ndr_pull_array_size(ndr, &r->devices));
829 NDR_CHECK(ndr_pull_array_length(ndr, &r->devices));
830 if (ndr_get_array_length(ndr, &r->devices) > ndr_get_array_size(ndr, &r->devices)) {
831 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->devices), ndr_get_array_length(ndr, &r->devices));
833 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->devices), sizeof(uint16_t)));
834 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->devices, ndr_get_array_length(ndr, &r->devices), sizeof(uint16_t), CH_UTF16));
835 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_devices_0, 0);
838 return NDR_ERR_SUCCESS;
841 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQInfo1 *r)
843 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQInfo1");
844 ndr->depth++;
845 ndr_print_ptr(ndr, "device", r->device);
846 ndr->depth++;
847 if (r->device) {
848 ndr_print_string(ndr, "device", r->device);
850 ndr->depth--;
851 ndr_print_uint32(ndr, "priority", r->priority);
852 ndr_print_ptr(ndr, "devices", r->devices);
853 ndr->depth++;
854 if (r->devices) {
855 ndr_print_string(ndr, "devices", r->devices);
857 ndr->depth--;
858 ndr_print_uint32(ndr, "users", r->users);
859 ndr_print_uint32(ndr, "num_ahead", r->num_ahead);
860 ndr->depth--;
863 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevQCtr1 *r)
865 uint32_t cntr_array_1;
866 if (ndr_flags & NDR_SCALARS) {
867 NDR_CHECK(ndr_push_align(ndr, 4));
868 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
869 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
871 if (ndr_flags & NDR_BUFFERS) {
872 if (r->array) {
873 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
874 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
875 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
877 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
878 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
882 return NDR_ERR_SUCCESS;
885 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevQCtr1 *r)
887 uint32_t _ptr_array;
888 uint32_t cntr_array_1;
889 TALLOC_CTX *_mem_save_array_0;
890 TALLOC_CTX *_mem_save_array_1;
891 if (ndr_flags & NDR_SCALARS) {
892 NDR_CHECK(ndr_pull_align(ndr, 4));
893 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
894 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
895 if (_ptr_array) {
896 NDR_PULL_ALLOC(ndr, r->array);
897 } else {
898 r->array = NULL;
901 if (ndr_flags & NDR_BUFFERS) {
902 if (r->array) {
903 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
904 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
905 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
906 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
907 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
908 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
909 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
910 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
912 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
913 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
915 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
916 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
918 if (r->array) {
919 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
922 return NDR_ERR_SUCCESS;
925 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQCtr1 *r)
927 uint32_t cntr_array_1;
928 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQCtr1");
929 ndr->depth++;
930 ndr_print_uint32(ndr, "count", r->count);
931 ndr_print_ptr(ndr, "array", r->array);
932 ndr->depth++;
933 if (r->array) {
934 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
935 ndr->depth++;
936 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
937 char *idx_1=NULL;
938 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
939 ndr_print_srvsvc_NetCharDevQInfo1(ndr, "array", &r->array[cntr_array_1]);
940 free(idx_1);
943 ndr->depth--;
945 ndr->depth--;
946 ndr->depth--;
949 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetCharDevQInfo *r)
951 if (ndr_flags & NDR_SCALARS) {
952 int level = ndr_push_get_switch_value(ndr, r);
953 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
954 switch (level) {
955 case 0: {
956 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
957 break; }
959 case 1: {
960 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
961 break; }
963 default: {
964 break; }
968 if (ndr_flags & NDR_BUFFERS) {
969 int level = ndr_push_get_switch_value(ndr, r);
970 switch (level) {
971 case 0:
972 if (r->info0) {
973 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
975 break;
977 case 1:
978 if (r->info1) {
979 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
981 break;
983 default:
984 break;
988 return NDR_ERR_SUCCESS;
991 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetCharDevQInfo *r)
993 int level;
994 uint32_t _level;
995 TALLOC_CTX *_mem_save_info0_0;
996 TALLOC_CTX *_mem_save_info1_0;
997 level = ndr_pull_get_switch_value(ndr, r);
998 if (ndr_flags & NDR_SCALARS) {
999 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
1000 if (_level != level) {
1001 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
1003 switch (level) {
1004 case 0: {
1005 uint32_t _ptr_info0;
1006 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
1007 if (_ptr_info0) {
1008 NDR_PULL_ALLOC(ndr, r->info0);
1009 } else {
1010 r->info0 = NULL;
1012 break; }
1014 case 1: {
1015 uint32_t _ptr_info1;
1016 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
1017 if (_ptr_info1) {
1018 NDR_PULL_ALLOC(ndr, r->info1);
1019 } else {
1020 r->info1 = NULL;
1022 break; }
1024 default: {
1025 break; }
1029 if (ndr_flags & NDR_BUFFERS) {
1030 switch (level) {
1031 case 0:
1032 if (r->info0) {
1033 _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
1034 NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
1035 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
1036 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
1038 break;
1040 case 1:
1041 if (r->info1) {
1042 _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
1043 NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
1044 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
1045 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
1047 break;
1049 default:
1050 break;
1054 return NDR_ERR_SUCCESS;
1057 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetCharDevQInfo *r)
1059 int level;
1060 level = ndr_print_get_switch_value(ndr, r);
1061 ndr_print_union(ndr, name, level, "srvsvc_NetCharDevQInfo");
1062 switch (level) {
1063 case 0:
1064 ndr_print_ptr(ndr, "info0", r->info0);
1065 ndr->depth++;
1066 if (r->info0) {
1067 ndr_print_srvsvc_NetCharDevQInfo0(ndr, "info0", r->info0);
1069 ndr->depth--;
1070 break;
1072 case 1:
1073 ndr_print_ptr(ndr, "info1", r->info1);
1074 ndr->depth++;
1075 if (r->info1) {
1076 ndr_print_srvsvc_NetCharDevQInfo1(ndr, "info1", r->info1);
1078 ndr->depth--;
1079 break;
1081 default:
1082 break;
1087 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetCharDevQCtr *r)
1089 if (ndr_flags & NDR_SCALARS) {
1090 int level = ndr_push_get_switch_value(ndr, r);
1091 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
1092 switch (level) {
1093 case 0: {
1094 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0));
1095 break; }
1097 case 1: {
1098 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
1099 break; }
1101 default: {
1102 break; }
1106 if (ndr_flags & NDR_BUFFERS) {
1107 int level = ndr_push_get_switch_value(ndr, r);
1108 switch (level) {
1109 case 0:
1110 if (r->ctr0) {
1111 NDR_CHECK(ndr_push_srvsvc_NetCharDevQCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
1113 break;
1115 case 1:
1116 if (r->ctr1) {
1117 NDR_CHECK(ndr_push_srvsvc_NetCharDevQCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
1119 break;
1121 default:
1122 break;
1126 return NDR_ERR_SUCCESS;
1129 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetCharDevQCtr *r)
1131 int level;
1132 uint32_t _level;
1133 TALLOC_CTX *_mem_save_ctr0_0;
1134 TALLOC_CTX *_mem_save_ctr1_0;
1135 level = ndr_pull_get_switch_value(ndr, r);
1136 if (ndr_flags & NDR_SCALARS) {
1137 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
1138 if (_level != level) {
1139 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
1141 switch (level) {
1142 case 0: {
1143 uint32_t _ptr_ctr0;
1144 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr0));
1145 if (_ptr_ctr0) {
1146 NDR_PULL_ALLOC(ndr, r->ctr0);
1147 } else {
1148 r->ctr0 = NULL;
1150 break; }
1152 case 1: {
1153 uint32_t _ptr_ctr1;
1154 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
1155 if (_ptr_ctr1) {
1156 NDR_PULL_ALLOC(ndr, r->ctr1);
1157 } else {
1158 r->ctr1 = NULL;
1160 break; }
1162 default: {
1163 break; }
1167 if (ndr_flags & NDR_BUFFERS) {
1168 switch (level) {
1169 case 0:
1170 if (r->ctr0) {
1171 _mem_save_ctr0_0 = NDR_PULL_GET_MEM_CTX(ndr);
1172 NDR_PULL_SET_MEM_CTX(ndr, r->ctr0, 0);
1173 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
1174 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr0_0, 0);
1176 break;
1178 case 1:
1179 if (r->ctr1) {
1180 _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
1181 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
1182 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
1183 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
1185 break;
1187 default:
1188 break;
1192 return NDR_ERR_SUCCESS;
1195 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetCharDevQCtr *r)
1197 int level;
1198 level = ndr_print_get_switch_value(ndr, r);
1199 ndr_print_union(ndr, name, level, "srvsvc_NetCharDevQCtr");
1200 switch (level) {
1201 case 0:
1202 ndr_print_ptr(ndr, "ctr0", r->ctr0);
1203 ndr->depth++;
1204 if (r->ctr0) {
1205 ndr_print_srvsvc_NetCharDevQCtr0(ndr, "ctr0", r->ctr0);
1207 ndr->depth--;
1208 break;
1210 case 1:
1211 ndr_print_ptr(ndr, "ctr1", r->ctr1);
1212 ndr->depth++;
1213 if (r->ctr1) {
1214 ndr_print_srvsvc_NetCharDevQCtr1(ndr, "ctr1", r->ctr1);
1216 ndr->depth--;
1217 break;
1219 default:
1220 break;
1225 static enum ndr_err_code ndr_push_srvsvc_NetConnInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetConnInfo0 *r)
1227 if (ndr_flags & NDR_SCALARS) {
1228 NDR_CHECK(ndr_push_align(ndr, 4));
1229 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->conn_id));
1231 if (ndr_flags & NDR_BUFFERS) {
1233 return NDR_ERR_SUCCESS;
1236 static enum ndr_err_code ndr_pull_srvsvc_NetConnInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnInfo0 *r)
1238 if (ndr_flags & NDR_SCALARS) {
1239 NDR_CHECK(ndr_pull_align(ndr, 4));
1240 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->conn_id));
1242 if (ndr_flags & NDR_BUFFERS) {
1244 return NDR_ERR_SUCCESS;
1247 _PUBLIC_ void ndr_print_srvsvc_NetConnInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnInfo0 *r)
1249 ndr_print_struct(ndr, name, "srvsvc_NetConnInfo0");
1250 ndr->depth++;
1251 ndr_print_uint32(ndr, "conn_id", r->conn_id);
1252 ndr->depth--;
1255 static enum ndr_err_code ndr_push_srvsvc_NetConnCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetConnCtr0 *r)
1257 uint32_t cntr_array_1;
1258 if (ndr_flags & NDR_SCALARS) {
1259 NDR_CHECK(ndr_push_align(ndr, 4));
1260 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1261 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
1263 if (ndr_flags & NDR_BUFFERS) {
1264 if (r->array) {
1265 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1266 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
1267 NDR_CHECK(ndr_push_srvsvc_NetConnInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
1271 return NDR_ERR_SUCCESS;
1274 static enum ndr_err_code ndr_pull_srvsvc_NetConnCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnCtr0 *r)
1276 uint32_t _ptr_array;
1277 uint32_t cntr_array_1;
1278 TALLOC_CTX *_mem_save_array_0;
1279 TALLOC_CTX *_mem_save_array_1;
1280 if (ndr_flags & NDR_SCALARS) {
1281 NDR_CHECK(ndr_pull_align(ndr, 4));
1282 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
1283 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
1284 if (_ptr_array) {
1285 NDR_PULL_ALLOC(ndr, r->array);
1286 } else {
1287 r->array = NULL;
1290 if (ndr_flags & NDR_BUFFERS) {
1291 if (r->array) {
1292 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
1293 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
1294 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
1295 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
1296 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
1297 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
1298 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
1299 NDR_CHECK(ndr_pull_srvsvc_NetConnInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
1301 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
1302 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
1304 if (r->array) {
1305 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
1308 return NDR_ERR_SUCCESS;
1311 _PUBLIC_ void ndr_print_srvsvc_NetConnCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnCtr0 *r)
1313 uint32_t cntr_array_1;
1314 ndr_print_struct(ndr, name, "srvsvc_NetConnCtr0");
1315 ndr->depth++;
1316 ndr_print_uint32(ndr, "count", r->count);
1317 ndr_print_ptr(ndr, "array", r->array);
1318 ndr->depth++;
1319 if (r->array) {
1320 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
1321 ndr->depth++;
1322 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
1323 char *idx_1=NULL;
1324 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
1325 ndr_print_srvsvc_NetConnInfo0(ndr, "array", &r->array[cntr_array_1]);
1326 free(idx_1);
1329 ndr->depth--;
1331 ndr->depth--;
1332 ndr->depth--;
1335 static enum ndr_err_code ndr_push_srvsvc_NetConnInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetConnInfo1 *r)
1337 if (ndr_flags & NDR_SCALARS) {
1338 NDR_CHECK(ndr_push_align(ndr, 4));
1339 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->conn_id));
1340 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->conn_type));
1341 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_open));
1342 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_users));
1343 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->conn_time));
1344 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
1345 NDR_CHECK(ndr_push_unique_ptr(ndr, r->share));
1347 if (ndr_flags & NDR_BUFFERS) {
1348 if (r->user) {
1349 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
1350 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1351 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
1352 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1354 if (r->share) {
1355 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->share, CH_UTF16)));
1356 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1357 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->share, CH_UTF16)));
1358 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->share, ndr_charset_length(r->share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1361 return NDR_ERR_SUCCESS;
1364 static enum ndr_err_code ndr_pull_srvsvc_NetConnInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnInfo1 *r)
1366 uint32_t _ptr_user;
1367 TALLOC_CTX *_mem_save_user_0;
1368 uint32_t _ptr_share;
1369 TALLOC_CTX *_mem_save_share_0;
1370 if (ndr_flags & NDR_SCALARS) {
1371 NDR_CHECK(ndr_pull_align(ndr, 4));
1372 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->conn_id));
1373 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->conn_type));
1374 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_open));
1375 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_users));
1376 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->conn_time));
1377 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
1378 if (_ptr_user) {
1379 NDR_PULL_ALLOC(ndr, r->user);
1380 } else {
1381 r->user = NULL;
1383 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share));
1384 if (_ptr_share) {
1385 NDR_PULL_ALLOC(ndr, r->share);
1386 } else {
1387 r->share = NULL;
1390 if (ndr_flags & NDR_BUFFERS) {
1391 if (r->user) {
1392 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
1393 NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
1394 NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
1395 NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
1396 if (ndr_get_array_length(ndr, &r->user) > ndr_get_array_size(ndr, &r->user)) {
1397 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->user), ndr_get_array_length(ndr, &r->user));
1399 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t)));
1400 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t), CH_UTF16));
1401 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
1403 if (r->share) {
1404 _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr);
1405 NDR_PULL_SET_MEM_CTX(ndr, r->share, 0);
1406 NDR_CHECK(ndr_pull_array_size(ndr, &r->share));
1407 NDR_CHECK(ndr_pull_array_length(ndr, &r->share));
1408 if (ndr_get_array_length(ndr, &r->share) > ndr_get_array_size(ndr, &r->share)) {
1409 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->share), ndr_get_array_length(ndr, &r->share));
1411 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->share), sizeof(uint16_t)));
1412 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->share, ndr_get_array_length(ndr, &r->share), sizeof(uint16_t), CH_UTF16));
1413 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0);
1416 return NDR_ERR_SUCCESS;
1419 _PUBLIC_ void ndr_print_srvsvc_NetConnInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnInfo1 *r)
1421 ndr_print_struct(ndr, name, "srvsvc_NetConnInfo1");
1422 ndr->depth++;
1423 ndr_print_uint32(ndr, "conn_id", r->conn_id);
1424 ndr_print_uint32(ndr, "conn_type", r->conn_type);
1425 ndr_print_uint32(ndr, "num_open", r->num_open);
1426 ndr_print_uint32(ndr, "num_users", r->num_users);
1427 ndr_print_uint32(ndr, "conn_time", r->conn_time);
1428 ndr_print_ptr(ndr, "user", r->user);
1429 ndr->depth++;
1430 if (r->user) {
1431 ndr_print_string(ndr, "user", r->user);
1433 ndr->depth--;
1434 ndr_print_ptr(ndr, "share", r->share);
1435 ndr->depth++;
1436 if (r->share) {
1437 ndr_print_string(ndr, "share", r->share);
1439 ndr->depth--;
1440 ndr->depth--;
1443 static enum ndr_err_code ndr_push_srvsvc_NetConnCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetConnCtr1 *r)
1445 uint32_t cntr_array_1;
1446 if (ndr_flags & NDR_SCALARS) {
1447 NDR_CHECK(ndr_push_align(ndr, 4));
1448 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1449 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
1451 if (ndr_flags & NDR_BUFFERS) {
1452 if (r->array) {
1453 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1454 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
1455 NDR_CHECK(ndr_push_srvsvc_NetConnInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
1457 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
1458 NDR_CHECK(ndr_push_srvsvc_NetConnInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
1462 return NDR_ERR_SUCCESS;
1465 static enum ndr_err_code ndr_pull_srvsvc_NetConnCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnCtr1 *r)
1467 uint32_t _ptr_array;
1468 uint32_t cntr_array_1;
1469 TALLOC_CTX *_mem_save_array_0;
1470 TALLOC_CTX *_mem_save_array_1;
1471 if (ndr_flags & NDR_SCALARS) {
1472 NDR_CHECK(ndr_pull_align(ndr, 4));
1473 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
1474 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
1475 if (_ptr_array) {
1476 NDR_PULL_ALLOC(ndr, r->array);
1477 } else {
1478 r->array = NULL;
1481 if (ndr_flags & NDR_BUFFERS) {
1482 if (r->array) {
1483 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
1484 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
1485 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
1486 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
1487 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
1488 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
1489 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
1490 NDR_CHECK(ndr_pull_srvsvc_NetConnInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
1492 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
1493 NDR_CHECK(ndr_pull_srvsvc_NetConnInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
1495 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
1496 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
1498 if (r->array) {
1499 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
1502 return NDR_ERR_SUCCESS;
1505 _PUBLIC_ void ndr_print_srvsvc_NetConnCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnCtr1 *r)
1507 uint32_t cntr_array_1;
1508 ndr_print_struct(ndr, name, "srvsvc_NetConnCtr1");
1509 ndr->depth++;
1510 ndr_print_uint32(ndr, "count", r->count);
1511 ndr_print_ptr(ndr, "array", r->array);
1512 ndr->depth++;
1513 if (r->array) {
1514 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
1515 ndr->depth++;
1516 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
1517 char *idx_1=NULL;
1518 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
1519 ndr_print_srvsvc_NetConnInfo1(ndr, "array", &r->array[cntr_array_1]);
1520 free(idx_1);
1523 ndr->depth--;
1525 ndr->depth--;
1526 ndr->depth--;
1529 static enum ndr_err_code ndr_push_srvsvc_NetConnCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetConnCtr *r)
1531 if (ndr_flags & NDR_SCALARS) {
1532 int level = ndr_push_get_switch_value(ndr, r);
1533 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
1534 switch (level) {
1535 case 0: {
1536 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0));
1537 break; }
1539 case 1: {
1540 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
1541 break; }
1543 default: {
1544 break; }
1548 if (ndr_flags & NDR_BUFFERS) {
1549 int level = ndr_push_get_switch_value(ndr, r);
1550 switch (level) {
1551 case 0:
1552 if (r->ctr0) {
1553 NDR_CHECK(ndr_push_srvsvc_NetConnCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
1555 break;
1557 case 1:
1558 if (r->ctr1) {
1559 NDR_CHECK(ndr_push_srvsvc_NetConnCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
1561 break;
1563 default:
1564 break;
1568 return NDR_ERR_SUCCESS;
1571 static enum ndr_err_code ndr_pull_srvsvc_NetConnCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetConnCtr *r)
1573 int level;
1574 uint32_t _level;
1575 TALLOC_CTX *_mem_save_ctr0_0;
1576 TALLOC_CTX *_mem_save_ctr1_0;
1577 level = ndr_pull_get_switch_value(ndr, r);
1578 if (ndr_flags & NDR_SCALARS) {
1579 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
1580 if (_level != level) {
1581 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
1583 switch (level) {
1584 case 0: {
1585 uint32_t _ptr_ctr0;
1586 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr0));
1587 if (_ptr_ctr0) {
1588 NDR_PULL_ALLOC(ndr, r->ctr0);
1589 } else {
1590 r->ctr0 = NULL;
1592 break; }
1594 case 1: {
1595 uint32_t _ptr_ctr1;
1596 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
1597 if (_ptr_ctr1) {
1598 NDR_PULL_ALLOC(ndr, r->ctr1);
1599 } else {
1600 r->ctr1 = NULL;
1602 break; }
1604 default: {
1605 break; }
1609 if (ndr_flags & NDR_BUFFERS) {
1610 switch (level) {
1611 case 0:
1612 if (r->ctr0) {
1613 _mem_save_ctr0_0 = NDR_PULL_GET_MEM_CTX(ndr);
1614 NDR_PULL_SET_MEM_CTX(ndr, r->ctr0, 0);
1615 NDR_CHECK(ndr_pull_srvsvc_NetConnCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
1616 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr0_0, 0);
1618 break;
1620 case 1:
1621 if (r->ctr1) {
1622 _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
1623 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
1624 NDR_CHECK(ndr_pull_srvsvc_NetConnCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
1625 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
1627 break;
1629 default:
1630 break;
1634 return NDR_ERR_SUCCESS;
1637 _PUBLIC_ void ndr_print_srvsvc_NetConnCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetConnCtr *r)
1639 int level;
1640 level = ndr_print_get_switch_value(ndr, r);
1641 ndr_print_union(ndr, name, level, "srvsvc_NetConnCtr");
1642 switch (level) {
1643 case 0:
1644 ndr_print_ptr(ndr, "ctr0", r->ctr0);
1645 ndr->depth++;
1646 if (r->ctr0) {
1647 ndr_print_srvsvc_NetConnCtr0(ndr, "ctr0", r->ctr0);
1649 ndr->depth--;
1650 break;
1652 case 1:
1653 ndr_print_ptr(ndr, "ctr1", r->ctr1);
1654 ndr->depth++;
1655 if (r->ctr1) {
1656 ndr_print_srvsvc_NetConnCtr1(ndr, "ctr1", r->ctr1);
1658 ndr->depth--;
1659 break;
1661 default:
1662 break;
1667 static enum ndr_err_code ndr_push_srvsvc_NetConnInfoCtr(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetConnInfoCtr *r)
1669 if (ndr_flags & NDR_SCALARS) {
1670 NDR_CHECK(ndr_push_align(ndr, 4));
1671 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
1672 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level));
1673 NDR_CHECK(ndr_push_srvsvc_NetConnCtr(ndr, NDR_SCALARS, &r->ctr));
1675 if (ndr_flags & NDR_BUFFERS) {
1676 NDR_CHECK(ndr_push_srvsvc_NetConnCtr(ndr, NDR_BUFFERS, &r->ctr));
1678 return NDR_ERR_SUCCESS;
1681 static enum ndr_err_code ndr_pull_srvsvc_NetConnInfoCtr(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnInfoCtr *r)
1683 if (ndr_flags & NDR_SCALARS) {
1684 NDR_CHECK(ndr_pull_align(ndr, 4));
1685 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
1686 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level));
1687 NDR_CHECK(ndr_pull_srvsvc_NetConnCtr(ndr, NDR_SCALARS, &r->ctr));
1689 if (ndr_flags & NDR_BUFFERS) {
1690 NDR_CHECK(ndr_pull_srvsvc_NetConnCtr(ndr, NDR_BUFFERS, &r->ctr));
1692 return NDR_ERR_SUCCESS;
1695 _PUBLIC_ void ndr_print_srvsvc_NetConnInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnInfoCtr *r)
1697 ndr_print_struct(ndr, name, "srvsvc_NetConnInfoCtr");
1698 ndr->depth++;
1699 ndr_print_uint32(ndr, "level", r->level);
1700 ndr_print_set_switch_value(ndr, &r->ctr, r->level);
1701 ndr_print_srvsvc_NetConnCtr(ndr, "ctr", &r->ctr);
1702 ndr->depth--;
1705 static enum ndr_err_code ndr_push_srvsvc_NetFileInfo2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetFileInfo2 *r)
1707 if (ndr_flags & NDR_SCALARS) {
1708 NDR_CHECK(ndr_push_align(ndr, 4));
1709 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fid));
1711 if (ndr_flags & NDR_BUFFERS) {
1713 return NDR_ERR_SUCCESS;
1716 static enum ndr_err_code ndr_pull_srvsvc_NetFileInfo2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileInfo2 *r)
1718 if (ndr_flags & NDR_SCALARS) {
1719 NDR_CHECK(ndr_pull_align(ndr, 4));
1720 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fid));
1722 if (ndr_flags & NDR_BUFFERS) {
1724 return NDR_ERR_SUCCESS;
1727 _PUBLIC_ void ndr_print_srvsvc_NetFileInfo2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileInfo2 *r)
1729 ndr_print_struct(ndr, name, "srvsvc_NetFileInfo2");
1730 ndr->depth++;
1731 ndr_print_uint32(ndr, "fid", r->fid);
1732 ndr->depth--;
1735 static enum ndr_err_code ndr_push_srvsvc_NetFileCtr2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetFileCtr2 *r)
1737 uint32_t cntr_array_1;
1738 if (ndr_flags & NDR_SCALARS) {
1739 NDR_CHECK(ndr_push_align(ndr, 4));
1740 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1741 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
1743 if (ndr_flags & NDR_BUFFERS) {
1744 if (r->array) {
1745 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1746 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
1747 NDR_CHECK(ndr_push_srvsvc_NetFileInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
1751 return NDR_ERR_SUCCESS;
1754 static enum ndr_err_code ndr_pull_srvsvc_NetFileCtr2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileCtr2 *r)
1756 uint32_t _ptr_array;
1757 uint32_t cntr_array_1;
1758 TALLOC_CTX *_mem_save_array_0;
1759 TALLOC_CTX *_mem_save_array_1;
1760 if (ndr_flags & NDR_SCALARS) {
1761 NDR_CHECK(ndr_pull_align(ndr, 4));
1762 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
1763 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
1764 if (_ptr_array) {
1765 NDR_PULL_ALLOC(ndr, r->array);
1766 } else {
1767 r->array = NULL;
1770 if (ndr_flags & NDR_BUFFERS) {
1771 if (r->array) {
1772 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
1773 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
1774 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
1775 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
1776 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
1777 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
1778 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
1779 NDR_CHECK(ndr_pull_srvsvc_NetFileInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
1781 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
1782 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
1784 if (r->array) {
1785 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
1788 return NDR_ERR_SUCCESS;
1791 _PUBLIC_ void ndr_print_srvsvc_NetFileCtr2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileCtr2 *r)
1793 uint32_t cntr_array_1;
1794 ndr_print_struct(ndr, name, "srvsvc_NetFileCtr2");
1795 ndr->depth++;
1796 ndr_print_uint32(ndr, "count", r->count);
1797 ndr_print_ptr(ndr, "array", r->array);
1798 ndr->depth++;
1799 if (r->array) {
1800 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
1801 ndr->depth++;
1802 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
1803 char *idx_1=NULL;
1804 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
1805 ndr_print_srvsvc_NetFileInfo2(ndr, "array", &r->array[cntr_array_1]);
1806 free(idx_1);
1809 ndr->depth--;
1811 ndr->depth--;
1812 ndr->depth--;
1815 static enum ndr_err_code ndr_push_srvsvc_NetFileInfo3(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetFileInfo3 *r)
1817 if (ndr_flags & NDR_SCALARS) {
1818 NDR_CHECK(ndr_push_align(ndr, 4));
1819 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fid));
1820 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->permissions));
1821 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_locks));
1822 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
1823 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
1825 if (ndr_flags & NDR_BUFFERS) {
1826 if (r->path) {
1827 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
1828 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1829 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
1830 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1832 if (r->user) {
1833 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
1834 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1835 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
1836 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1839 return NDR_ERR_SUCCESS;
1842 static enum ndr_err_code ndr_pull_srvsvc_NetFileInfo3(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileInfo3 *r)
1844 uint32_t _ptr_path;
1845 TALLOC_CTX *_mem_save_path_0;
1846 uint32_t _ptr_user;
1847 TALLOC_CTX *_mem_save_user_0;
1848 if (ndr_flags & NDR_SCALARS) {
1849 NDR_CHECK(ndr_pull_align(ndr, 4));
1850 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fid));
1851 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->permissions));
1852 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_locks));
1853 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
1854 if (_ptr_path) {
1855 NDR_PULL_ALLOC(ndr, r->path);
1856 } else {
1857 r->path = NULL;
1859 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
1860 if (_ptr_user) {
1861 NDR_PULL_ALLOC(ndr, r->user);
1862 } else {
1863 r->user = NULL;
1866 if (ndr_flags & NDR_BUFFERS) {
1867 if (r->path) {
1868 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
1869 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
1870 NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
1871 NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
1872 if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) {
1873 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->path), ndr_get_array_length(ndr, &r->path));
1875 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t)));
1876 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16));
1877 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
1879 if (r->user) {
1880 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
1881 NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
1882 NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
1883 NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
1884 if (ndr_get_array_length(ndr, &r->user) > ndr_get_array_size(ndr, &r->user)) {
1885 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->user), ndr_get_array_length(ndr, &r->user));
1887 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t)));
1888 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t), CH_UTF16));
1889 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
1892 return NDR_ERR_SUCCESS;
1895 _PUBLIC_ void ndr_print_srvsvc_NetFileInfo3(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileInfo3 *r)
1897 ndr_print_struct(ndr, name, "srvsvc_NetFileInfo3");
1898 ndr->depth++;
1899 ndr_print_uint32(ndr, "fid", r->fid);
1900 ndr_print_uint32(ndr, "permissions", r->permissions);
1901 ndr_print_uint32(ndr, "num_locks", r->num_locks);
1902 ndr_print_ptr(ndr, "path", r->path);
1903 ndr->depth++;
1904 if (r->path) {
1905 ndr_print_string(ndr, "path", r->path);
1907 ndr->depth--;
1908 ndr_print_ptr(ndr, "user", r->user);
1909 ndr->depth++;
1910 if (r->user) {
1911 ndr_print_string(ndr, "user", r->user);
1913 ndr->depth--;
1914 ndr->depth--;
1917 static enum ndr_err_code ndr_push_srvsvc_NetFileCtr3(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetFileCtr3 *r)
1919 uint32_t cntr_array_1;
1920 if (ndr_flags & NDR_SCALARS) {
1921 NDR_CHECK(ndr_push_align(ndr, 4));
1922 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1923 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
1925 if (ndr_flags & NDR_BUFFERS) {
1926 if (r->array) {
1927 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1928 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
1929 NDR_CHECK(ndr_push_srvsvc_NetFileInfo3(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
1931 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
1932 NDR_CHECK(ndr_push_srvsvc_NetFileInfo3(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
1936 return NDR_ERR_SUCCESS;
1939 static enum ndr_err_code ndr_pull_srvsvc_NetFileCtr3(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileCtr3 *r)
1941 uint32_t _ptr_array;
1942 uint32_t cntr_array_1;
1943 TALLOC_CTX *_mem_save_array_0;
1944 TALLOC_CTX *_mem_save_array_1;
1945 if (ndr_flags & NDR_SCALARS) {
1946 NDR_CHECK(ndr_pull_align(ndr, 4));
1947 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
1948 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
1949 if (_ptr_array) {
1950 NDR_PULL_ALLOC(ndr, r->array);
1951 } else {
1952 r->array = NULL;
1955 if (ndr_flags & NDR_BUFFERS) {
1956 if (r->array) {
1957 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
1958 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
1959 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
1960 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
1961 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
1962 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
1963 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
1964 NDR_CHECK(ndr_pull_srvsvc_NetFileInfo3(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
1966 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
1967 NDR_CHECK(ndr_pull_srvsvc_NetFileInfo3(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
1969 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
1970 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
1972 if (r->array) {
1973 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
1976 return NDR_ERR_SUCCESS;
1979 _PUBLIC_ void ndr_print_srvsvc_NetFileCtr3(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileCtr3 *r)
1981 uint32_t cntr_array_1;
1982 ndr_print_struct(ndr, name, "srvsvc_NetFileCtr3");
1983 ndr->depth++;
1984 ndr_print_uint32(ndr, "count", r->count);
1985 ndr_print_ptr(ndr, "array", r->array);
1986 ndr->depth++;
1987 if (r->array) {
1988 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
1989 ndr->depth++;
1990 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
1991 char *idx_1=NULL;
1992 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
1993 ndr_print_srvsvc_NetFileInfo3(ndr, "array", &r->array[cntr_array_1]);
1994 free(idx_1);
1997 ndr->depth--;
1999 ndr->depth--;
2000 ndr->depth--;
2003 static enum ndr_err_code ndr_push_srvsvc_NetFileInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetFileInfo *r)
2005 if (ndr_flags & NDR_SCALARS) {
2006 int level = ndr_push_get_switch_value(ndr, r);
2007 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
2008 switch (level) {
2009 case 2: {
2010 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
2011 break; }
2013 case 3: {
2014 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3));
2015 break; }
2017 default: {
2018 break; }
2022 if (ndr_flags & NDR_BUFFERS) {
2023 int level = ndr_push_get_switch_value(ndr, r);
2024 switch (level) {
2025 case 2:
2026 if (r->info2) {
2027 NDR_CHECK(ndr_push_srvsvc_NetFileInfo2(ndr, NDR_SCALARS, r->info2));
2029 break;
2031 case 3:
2032 if (r->info3) {
2033 NDR_CHECK(ndr_push_srvsvc_NetFileInfo3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
2035 break;
2037 default:
2038 break;
2042 return NDR_ERR_SUCCESS;
2045 static enum ndr_err_code ndr_pull_srvsvc_NetFileInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetFileInfo *r)
2047 int level;
2048 uint32_t _level;
2049 TALLOC_CTX *_mem_save_info2_0;
2050 TALLOC_CTX *_mem_save_info3_0;
2051 level = ndr_pull_get_switch_value(ndr, r);
2052 if (ndr_flags & NDR_SCALARS) {
2053 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
2054 if (_level != level) {
2055 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
2057 switch (level) {
2058 case 2: {
2059 uint32_t _ptr_info2;
2060 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
2061 if (_ptr_info2) {
2062 NDR_PULL_ALLOC(ndr, r->info2);
2063 } else {
2064 r->info2 = NULL;
2066 break; }
2068 case 3: {
2069 uint32_t _ptr_info3;
2070 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info3));
2071 if (_ptr_info3) {
2072 NDR_PULL_ALLOC(ndr, r->info3);
2073 } else {
2074 r->info3 = NULL;
2076 break; }
2078 default: {
2079 break; }
2083 if (ndr_flags & NDR_BUFFERS) {
2084 switch (level) {
2085 case 2:
2086 if (r->info2) {
2087 _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
2088 NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
2089 NDR_CHECK(ndr_pull_srvsvc_NetFileInfo2(ndr, NDR_SCALARS, r->info2));
2090 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
2092 break;
2094 case 3:
2095 if (r->info3) {
2096 _mem_save_info3_0 = NDR_PULL_GET_MEM_CTX(ndr);
2097 NDR_PULL_SET_MEM_CTX(ndr, r->info3, 0);
2098 NDR_CHECK(ndr_pull_srvsvc_NetFileInfo3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
2099 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info3_0, 0);
2101 break;
2103 default:
2104 break;
2108 return NDR_ERR_SUCCESS;
2111 _PUBLIC_ void ndr_print_srvsvc_NetFileInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetFileInfo *r)
2113 int level;
2114 level = ndr_print_get_switch_value(ndr, r);
2115 ndr_print_union(ndr, name, level, "srvsvc_NetFileInfo");
2116 switch (level) {
2117 case 2:
2118 ndr_print_ptr(ndr, "info2", r->info2);
2119 ndr->depth++;
2120 if (r->info2) {
2121 ndr_print_srvsvc_NetFileInfo2(ndr, "info2", r->info2);
2123 ndr->depth--;
2124 break;
2126 case 3:
2127 ndr_print_ptr(ndr, "info3", r->info3);
2128 ndr->depth++;
2129 if (r->info3) {
2130 ndr_print_srvsvc_NetFileInfo3(ndr, "info3", r->info3);
2132 ndr->depth--;
2133 break;
2135 default:
2136 break;
2141 static enum ndr_err_code ndr_push_srvsvc_NetFileCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetFileCtr *r)
2143 if (ndr_flags & NDR_SCALARS) {
2144 int level = ndr_push_get_switch_value(ndr, r);
2145 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
2146 switch (level) {
2147 case 2: {
2148 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr2));
2149 break; }
2151 case 3: {
2152 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr3));
2153 break; }
2155 default: {
2156 break; }
2160 if (ndr_flags & NDR_BUFFERS) {
2161 int level = ndr_push_get_switch_value(ndr, r);
2162 switch (level) {
2163 case 2:
2164 if (r->ctr2) {
2165 NDR_CHECK(ndr_push_srvsvc_NetFileCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
2167 break;
2169 case 3:
2170 if (r->ctr3) {
2171 NDR_CHECK(ndr_push_srvsvc_NetFileCtr3(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr3));
2173 break;
2175 default:
2176 break;
2180 return NDR_ERR_SUCCESS;
2183 static enum ndr_err_code ndr_pull_srvsvc_NetFileCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetFileCtr *r)
2185 int level;
2186 uint32_t _level;
2187 TALLOC_CTX *_mem_save_ctr2_0;
2188 TALLOC_CTX *_mem_save_ctr3_0;
2189 level = ndr_pull_get_switch_value(ndr, r);
2190 if (ndr_flags & NDR_SCALARS) {
2191 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
2192 if (_level != level) {
2193 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
2195 switch (level) {
2196 case 2: {
2197 uint32_t _ptr_ctr2;
2198 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr2));
2199 if (_ptr_ctr2) {
2200 NDR_PULL_ALLOC(ndr, r->ctr2);
2201 } else {
2202 r->ctr2 = NULL;
2204 break; }
2206 case 3: {
2207 uint32_t _ptr_ctr3;
2208 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr3));
2209 if (_ptr_ctr3) {
2210 NDR_PULL_ALLOC(ndr, r->ctr3);
2211 } else {
2212 r->ctr3 = NULL;
2214 break; }
2216 default: {
2217 break; }
2221 if (ndr_flags & NDR_BUFFERS) {
2222 switch (level) {
2223 case 2:
2224 if (r->ctr2) {
2225 _mem_save_ctr2_0 = NDR_PULL_GET_MEM_CTX(ndr);
2226 NDR_PULL_SET_MEM_CTX(ndr, r->ctr2, 0);
2227 NDR_CHECK(ndr_pull_srvsvc_NetFileCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
2228 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr2_0, 0);
2230 break;
2232 case 3:
2233 if (r->ctr3) {
2234 _mem_save_ctr3_0 = NDR_PULL_GET_MEM_CTX(ndr);
2235 NDR_PULL_SET_MEM_CTX(ndr, r->ctr3, 0);
2236 NDR_CHECK(ndr_pull_srvsvc_NetFileCtr3(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr3));
2237 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr3_0, 0);
2239 break;
2241 default:
2242 break;
2246 return NDR_ERR_SUCCESS;
2249 _PUBLIC_ void ndr_print_srvsvc_NetFileCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetFileCtr *r)
2251 int level;
2252 level = ndr_print_get_switch_value(ndr, r);
2253 ndr_print_union(ndr, name, level, "srvsvc_NetFileCtr");
2254 switch (level) {
2255 case 2:
2256 ndr_print_ptr(ndr, "ctr2", r->ctr2);
2257 ndr->depth++;
2258 if (r->ctr2) {
2259 ndr_print_srvsvc_NetFileCtr2(ndr, "ctr2", r->ctr2);
2261 ndr->depth--;
2262 break;
2264 case 3:
2265 ndr_print_ptr(ndr, "ctr3", r->ctr3);
2266 ndr->depth++;
2267 if (r->ctr3) {
2268 ndr_print_srvsvc_NetFileCtr3(ndr, "ctr3", r->ctr3);
2270 ndr->depth--;
2271 break;
2273 default:
2274 break;
2279 static enum ndr_err_code ndr_push_srvsvc_NetFileInfoCtr(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetFileInfoCtr *r)
2281 if (ndr_flags & NDR_SCALARS) {
2282 NDR_CHECK(ndr_push_align(ndr, 4));
2283 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
2284 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level));
2285 NDR_CHECK(ndr_push_srvsvc_NetFileCtr(ndr, NDR_SCALARS, &r->ctr));
2287 if (ndr_flags & NDR_BUFFERS) {
2288 NDR_CHECK(ndr_push_srvsvc_NetFileCtr(ndr, NDR_BUFFERS, &r->ctr));
2290 return NDR_ERR_SUCCESS;
2293 static enum ndr_err_code ndr_pull_srvsvc_NetFileInfoCtr(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileInfoCtr *r)
2295 if (ndr_flags & NDR_SCALARS) {
2296 NDR_CHECK(ndr_pull_align(ndr, 4));
2297 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
2298 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level));
2299 NDR_CHECK(ndr_pull_srvsvc_NetFileCtr(ndr, NDR_SCALARS, &r->ctr));
2301 if (ndr_flags & NDR_BUFFERS) {
2302 NDR_CHECK(ndr_pull_srvsvc_NetFileCtr(ndr, NDR_BUFFERS, &r->ctr));
2304 return NDR_ERR_SUCCESS;
2307 _PUBLIC_ void ndr_print_srvsvc_NetFileInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileInfoCtr *r)
2309 ndr_print_struct(ndr, name, "srvsvc_NetFileInfoCtr");
2310 ndr->depth++;
2311 ndr_print_uint32(ndr, "level", r->level);
2312 ndr_print_set_switch_value(ndr, &r->ctr, r->level);
2313 ndr_print_srvsvc_NetFileCtr(ndr, "ctr", &r->ctr);
2314 ndr->depth--;
2317 static enum ndr_err_code ndr_push_srvsvc_NetSessInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfo0 *r)
2319 if (ndr_flags & NDR_SCALARS) {
2320 NDR_CHECK(ndr_push_align(ndr, 4));
2321 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client));
2323 if (ndr_flags & NDR_BUFFERS) {
2324 if (r->client) {
2325 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
2326 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2327 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
2328 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client, ndr_charset_length(r->client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2331 return NDR_ERR_SUCCESS;
2334 static enum ndr_err_code ndr_pull_srvsvc_NetSessInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfo0 *r)
2336 uint32_t _ptr_client;
2337 TALLOC_CTX *_mem_save_client_0;
2338 if (ndr_flags & NDR_SCALARS) {
2339 NDR_CHECK(ndr_pull_align(ndr, 4));
2340 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
2341 if (_ptr_client) {
2342 NDR_PULL_ALLOC(ndr, r->client);
2343 } else {
2344 r->client = NULL;
2347 if (ndr_flags & NDR_BUFFERS) {
2348 if (r->client) {
2349 _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
2350 NDR_PULL_SET_MEM_CTX(ndr, r->client, 0);
2351 NDR_CHECK(ndr_pull_array_size(ndr, &r->client));
2352 NDR_CHECK(ndr_pull_array_length(ndr, &r->client));
2353 if (ndr_get_array_length(ndr, &r->client) > ndr_get_array_size(ndr, &r->client)) {
2354 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->client), ndr_get_array_length(ndr, &r->client));
2356 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->client), sizeof(uint16_t)));
2357 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client, ndr_get_array_length(ndr, &r->client), sizeof(uint16_t), CH_UTF16));
2358 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
2361 return NDR_ERR_SUCCESS;
2364 _PUBLIC_ void ndr_print_srvsvc_NetSessInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo0 *r)
2366 ndr_print_struct(ndr, name, "srvsvc_NetSessInfo0");
2367 ndr->depth++;
2368 ndr_print_ptr(ndr, "client", r->client);
2369 ndr->depth++;
2370 if (r->client) {
2371 ndr_print_string(ndr, "client", r->client);
2373 ndr->depth--;
2374 ndr->depth--;
2377 static enum ndr_err_code ndr_push_srvsvc_NetSessCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessCtr0 *r)
2379 uint32_t cntr_array_1;
2380 if (ndr_flags & NDR_SCALARS) {
2381 NDR_CHECK(ndr_push_align(ndr, 4));
2382 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2383 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
2385 if (ndr_flags & NDR_BUFFERS) {
2386 if (r->array) {
2387 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2388 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2389 NDR_CHECK(ndr_push_srvsvc_NetSessInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
2391 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2392 NDR_CHECK(ndr_push_srvsvc_NetSessInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
2396 return NDR_ERR_SUCCESS;
2399 static enum ndr_err_code ndr_pull_srvsvc_NetSessCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr0 *r)
2401 uint32_t _ptr_array;
2402 uint32_t cntr_array_1;
2403 TALLOC_CTX *_mem_save_array_0;
2404 TALLOC_CTX *_mem_save_array_1;
2405 if (ndr_flags & NDR_SCALARS) {
2406 NDR_CHECK(ndr_pull_align(ndr, 4));
2407 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2408 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
2409 if (_ptr_array) {
2410 NDR_PULL_ALLOC(ndr, r->array);
2411 } else {
2412 r->array = NULL;
2415 if (ndr_flags & NDR_BUFFERS) {
2416 if (r->array) {
2417 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
2418 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
2419 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
2420 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
2421 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
2422 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
2423 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2424 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
2426 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2427 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
2429 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
2430 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
2432 if (r->array) {
2433 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
2436 return NDR_ERR_SUCCESS;
2439 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr0 *r)
2441 uint32_t cntr_array_1;
2442 ndr_print_struct(ndr, name, "srvsvc_NetSessCtr0");
2443 ndr->depth++;
2444 ndr_print_uint32(ndr, "count", r->count);
2445 ndr_print_ptr(ndr, "array", r->array);
2446 ndr->depth++;
2447 if (r->array) {
2448 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
2449 ndr->depth++;
2450 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
2451 char *idx_1=NULL;
2452 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
2453 ndr_print_srvsvc_NetSessInfo0(ndr, "array", &r->array[cntr_array_1]);
2454 free(idx_1);
2457 ndr->depth--;
2459 ndr->depth--;
2460 ndr->depth--;
2463 static enum ndr_err_code ndr_push_srvsvc_NetSessInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfo1 *r)
2465 if (ndr_flags & NDR_SCALARS) {
2466 NDR_CHECK(ndr_push_align(ndr, 4));
2467 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client));
2468 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
2469 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_open));
2470 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
2471 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idle_time));
2472 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->user_flags));
2474 if (ndr_flags & NDR_BUFFERS) {
2475 if (r->client) {
2476 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
2477 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2478 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
2479 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client, ndr_charset_length(r->client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2481 if (r->user) {
2482 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
2483 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2484 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
2485 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2488 return NDR_ERR_SUCCESS;
2491 static enum ndr_err_code ndr_pull_srvsvc_NetSessInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfo1 *r)
2493 uint32_t _ptr_client;
2494 TALLOC_CTX *_mem_save_client_0;
2495 uint32_t _ptr_user;
2496 TALLOC_CTX *_mem_save_user_0;
2497 if (ndr_flags & NDR_SCALARS) {
2498 NDR_CHECK(ndr_pull_align(ndr, 4));
2499 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
2500 if (_ptr_client) {
2501 NDR_PULL_ALLOC(ndr, r->client);
2502 } else {
2503 r->client = NULL;
2505 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
2506 if (_ptr_user) {
2507 NDR_PULL_ALLOC(ndr, r->user);
2508 } else {
2509 r->user = NULL;
2511 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_open));
2512 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
2513 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idle_time));
2514 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->user_flags));
2516 if (ndr_flags & NDR_BUFFERS) {
2517 if (r->client) {
2518 _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
2519 NDR_PULL_SET_MEM_CTX(ndr, r->client, 0);
2520 NDR_CHECK(ndr_pull_array_size(ndr, &r->client));
2521 NDR_CHECK(ndr_pull_array_length(ndr, &r->client));
2522 if (ndr_get_array_length(ndr, &r->client) > ndr_get_array_size(ndr, &r->client)) {
2523 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->client), ndr_get_array_length(ndr, &r->client));
2525 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->client), sizeof(uint16_t)));
2526 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client, ndr_get_array_length(ndr, &r->client), sizeof(uint16_t), CH_UTF16));
2527 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
2529 if (r->user) {
2530 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
2531 NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
2532 NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
2533 NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
2534 if (ndr_get_array_length(ndr, &r->user) > ndr_get_array_size(ndr, &r->user)) {
2535 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->user), ndr_get_array_length(ndr, &r->user));
2537 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t)));
2538 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t), CH_UTF16));
2539 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
2542 return NDR_ERR_SUCCESS;
2545 _PUBLIC_ void ndr_print_srvsvc_NetSessInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo1 *r)
2547 ndr_print_struct(ndr, name, "srvsvc_NetSessInfo1");
2548 ndr->depth++;
2549 ndr_print_ptr(ndr, "client", r->client);
2550 ndr->depth++;
2551 if (r->client) {
2552 ndr_print_string(ndr, "client", r->client);
2554 ndr->depth--;
2555 ndr_print_ptr(ndr, "user", r->user);
2556 ndr->depth++;
2557 if (r->user) {
2558 ndr_print_string(ndr, "user", r->user);
2560 ndr->depth--;
2561 ndr_print_uint32(ndr, "num_open", r->num_open);
2562 ndr_print_uint32(ndr, "time", r->time);
2563 ndr_print_uint32(ndr, "idle_time", r->idle_time);
2564 ndr_print_uint32(ndr, "user_flags", r->user_flags);
2565 ndr->depth--;
2568 static enum ndr_err_code ndr_push_srvsvc_NetSessCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessCtr1 *r)
2570 uint32_t cntr_array_1;
2571 if (ndr_flags & NDR_SCALARS) {
2572 NDR_CHECK(ndr_push_align(ndr, 4));
2573 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2574 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
2576 if (ndr_flags & NDR_BUFFERS) {
2577 if (r->array) {
2578 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2579 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2580 NDR_CHECK(ndr_push_srvsvc_NetSessInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
2582 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2583 NDR_CHECK(ndr_push_srvsvc_NetSessInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
2587 return NDR_ERR_SUCCESS;
2590 static enum ndr_err_code ndr_pull_srvsvc_NetSessCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr1 *r)
2592 uint32_t _ptr_array;
2593 uint32_t cntr_array_1;
2594 TALLOC_CTX *_mem_save_array_0;
2595 TALLOC_CTX *_mem_save_array_1;
2596 if (ndr_flags & NDR_SCALARS) {
2597 NDR_CHECK(ndr_pull_align(ndr, 4));
2598 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2599 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
2600 if (_ptr_array) {
2601 NDR_PULL_ALLOC(ndr, r->array);
2602 } else {
2603 r->array = NULL;
2606 if (ndr_flags & NDR_BUFFERS) {
2607 if (r->array) {
2608 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
2609 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
2610 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
2611 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
2612 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
2613 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
2614 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2615 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
2617 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2618 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
2620 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
2621 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
2623 if (r->array) {
2624 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
2627 return NDR_ERR_SUCCESS;
2630 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr1 *r)
2632 uint32_t cntr_array_1;
2633 ndr_print_struct(ndr, name, "srvsvc_NetSessCtr1");
2634 ndr->depth++;
2635 ndr_print_uint32(ndr, "count", r->count);
2636 ndr_print_ptr(ndr, "array", r->array);
2637 ndr->depth++;
2638 if (r->array) {
2639 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
2640 ndr->depth++;
2641 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
2642 char *idx_1=NULL;
2643 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
2644 ndr_print_srvsvc_NetSessInfo1(ndr, "array", &r->array[cntr_array_1]);
2645 free(idx_1);
2648 ndr->depth--;
2650 ndr->depth--;
2651 ndr->depth--;
2654 static enum ndr_err_code ndr_push_srvsvc_NetSessInfo2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfo2 *r)
2656 if (ndr_flags & NDR_SCALARS) {
2657 NDR_CHECK(ndr_push_align(ndr, 4));
2658 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client));
2659 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
2660 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_open));
2661 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
2662 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idle_time));
2663 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->user_flags));
2664 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client_type));
2666 if (ndr_flags & NDR_BUFFERS) {
2667 if (r->client) {
2668 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
2669 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2670 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
2671 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client, ndr_charset_length(r->client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2673 if (r->user) {
2674 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
2675 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2676 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
2677 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2679 if (r->client_type) {
2680 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client_type, CH_UTF16)));
2681 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2682 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client_type, CH_UTF16)));
2683 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client_type, ndr_charset_length(r->client_type, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2686 return NDR_ERR_SUCCESS;
2689 static enum ndr_err_code ndr_pull_srvsvc_NetSessInfo2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfo2 *r)
2691 uint32_t _ptr_client;
2692 TALLOC_CTX *_mem_save_client_0;
2693 uint32_t _ptr_user;
2694 TALLOC_CTX *_mem_save_user_0;
2695 uint32_t _ptr_client_type;
2696 TALLOC_CTX *_mem_save_client_type_0;
2697 if (ndr_flags & NDR_SCALARS) {
2698 NDR_CHECK(ndr_pull_align(ndr, 4));
2699 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
2700 if (_ptr_client) {
2701 NDR_PULL_ALLOC(ndr, r->client);
2702 } else {
2703 r->client = NULL;
2705 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
2706 if (_ptr_user) {
2707 NDR_PULL_ALLOC(ndr, r->user);
2708 } else {
2709 r->user = NULL;
2711 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_open));
2712 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
2713 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idle_time));
2714 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->user_flags));
2715 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client_type));
2716 if (_ptr_client_type) {
2717 NDR_PULL_ALLOC(ndr, r->client_type);
2718 } else {
2719 r->client_type = NULL;
2722 if (ndr_flags & NDR_BUFFERS) {
2723 if (r->client) {
2724 _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
2725 NDR_PULL_SET_MEM_CTX(ndr, r->client, 0);
2726 NDR_CHECK(ndr_pull_array_size(ndr, &r->client));
2727 NDR_CHECK(ndr_pull_array_length(ndr, &r->client));
2728 if (ndr_get_array_length(ndr, &r->client) > ndr_get_array_size(ndr, &r->client)) {
2729 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->client), ndr_get_array_length(ndr, &r->client));
2731 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->client), sizeof(uint16_t)));
2732 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client, ndr_get_array_length(ndr, &r->client), sizeof(uint16_t), CH_UTF16));
2733 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
2735 if (r->user) {
2736 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
2737 NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
2738 NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
2739 NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
2740 if (ndr_get_array_length(ndr, &r->user) > ndr_get_array_size(ndr, &r->user)) {
2741 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->user), ndr_get_array_length(ndr, &r->user));
2743 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t)));
2744 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t), CH_UTF16));
2745 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
2747 if (r->client_type) {
2748 _mem_save_client_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
2749 NDR_PULL_SET_MEM_CTX(ndr, r->client_type, 0);
2750 NDR_CHECK(ndr_pull_array_size(ndr, &r->client_type));
2751 NDR_CHECK(ndr_pull_array_length(ndr, &r->client_type));
2752 if (ndr_get_array_length(ndr, &r->client_type) > ndr_get_array_size(ndr, &r->client_type)) {
2753 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->client_type), ndr_get_array_length(ndr, &r->client_type));
2755 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->client_type), sizeof(uint16_t)));
2756 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client_type, ndr_get_array_length(ndr, &r->client_type), sizeof(uint16_t), CH_UTF16));
2757 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_type_0, 0);
2760 return NDR_ERR_SUCCESS;
2763 _PUBLIC_ void ndr_print_srvsvc_NetSessInfo2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo2 *r)
2765 ndr_print_struct(ndr, name, "srvsvc_NetSessInfo2");
2766 ndr->depth++;
2767 ndr_print_ptr(ndr, "client", r->client);
2768 ndr->depth++;
2769 if (r->client) {
2770 ndr_print_string(ndr, "client", r->client);
2772 ndr->depth--;
2773 ndr_print_ptr(ndr, "user", r->user);
2774 ndr->depth++;
2775 if (r->user) {
2776 ndr_print_string(ndr, "user", r->user);
2778 ndr->depth--;
2779 ndr_print_uint32(ndr, "num_open", r->num_open);
2780 ndr_print_uint32(ndr, "time", r->time);
2781 ndr_print_uint32(ndr, "idle_time", r->idle_time);
2782 ndr_print_uint32(ndr, "user_flags", r->user_flags);
2783 ndr_print_ptr(ndr, "client_type", r->client_type);
2784 ndr->depth++;
2785 if (r->client_type) {
2786 ndr_print_string(ndr, "client_type", r->client_type);
2788 ndr->depth--;
2789 ndr->depth--;
2792 static enum ndr_err_code ndr_push_srvsvc_NetSessCtr2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessCtr2 *r)
2794 uint32_t cntr_array_1;
2795 if (ndr_flags & NDR_SCALARS) {
2796 NDR_CHECK(ndr_push_align(ndr, 4));
2797 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2798 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
2800 if (ndr_flags & NDR_BUFFERS) {
2801 if (r->array) {
2802 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2803 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2804 NDR_CHECK(ndr_push_srvsvc_NetSessInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
2806 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2807 NDR_CHECK(ndr_push_srvsvc_NetSessInfo2(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
2811 return NDR_ERR_SUCCESS;
2814 static enum ndr_err_code ndr_pull_srvsvc_NetSessCtr2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr2 *r)
2816 uint32_t _ptr_array;
2817 uint32_t cntr_array_1;
2818 TALLOC_CTX *_mem_save_array_0;
2819 TALLOC_CTX *_mem_save_array_1;
2820 if (ndr_flags & NDR_SCALARS) {
2821 NDR_CHECK(ndr_pull_align(ndr, 4));
2822 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2823 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
2824 if (_ptr_array) {
2825 NDR_PULL_ALLOC(ndr, r->array);
2826 } else {
2827 r->array = NULL;
2830 if (ndr_flags & NDR_BUFFERS) {
2831 if (r->array) {
2832 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
2833 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
2834 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
2835 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
2836 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
2837 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
2838 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2839 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
2841 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2842 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo2(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
2844 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
2845 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
2847 if (r->array) {
2848 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
2851 return NDR_ERR_SUCCESS;
2854 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr2 *r)
2856 uint32_t cntr_array_1;
2857 ndr_print_struct(ndr, name, "srvsvc_NetSessCtr2");
2858 ndr->depth++;
2859 ndr_print_uint32(ndr, "count", r->count);
2860 ndr_print_ptr(ndr, "array", r->array);
2861 ndr->depth++;
2862 if (r->array) {
2863 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
2864 ndr->depth++;
2865 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
2866 char *idx_1=NULL;
2867 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
2868 ndr_print_srvsvc_NetSessInfo2(ndr, "array", &r->array[cntr_array_1]);
2869 free(idx_1);
2872 ndr->depth--;
2874 ndr->depth--;
2875 ndr->depth--;
2878 static enum ndr_err_code ndr_push_srvsvc_NetSessInfo10(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfo10 *r)
2880 if (ndr_flags & NDR_SCALARS) {
2881 NDR_CHECK(ndr_push_align(ndr, 4));
2882 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client));
2883 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
2884 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
2885 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idle_time));
2887 if (ndr_flags & NDR_BUFFERS) {
2888 if (r->client) {
2889 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
2890 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2891 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
2892 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client, ndr_charset_length(r->client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2894 if (r->user) {
2895 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
2896 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2897 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
2898 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2901 return NDR_ERR_SUCCESS;
2904 static enum ndr_err_code ndr_pull_srvsvc_NetSessInfo10(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfo10 *r)
2906 uint32_t _ptr_client;
2907 TALLOC_CTX *_mem_save_client_0;
2908 uint32_t _ptr_user;
2909 TALLOC_CTX *_mem_save_user_0;
2910 if (ndr_flags & NDR_SCALARS) {
2911 NDR_CHECK(ndr_pull_align(ndr, 4));
2912 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
2913 if (_ptr_client) {
2914 NDR_PULL_ALLOC(ndr, r->client);
2915 } else {
2916 r->client = NULL;
2918 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
2919 if (_ptr_user) {
2920 NDR_PULL_ALLOC(ndr, r->user);
2921 } else {
2922 r->user = NULL;
2924 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
2925 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idle_time));
2927 if (ndr_flags & NDR_BUFFERS) {
2928 if (r->client) {
2929 _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
2930 NDR_PULL_SET_MEM_CTX(ndr, r->client, 0);
2931 NDR_CHECK(ndr_pull_array_size(ndr, &r->client));
2932 NDR_CHECK(ndr_pull_array_length(ndr, &r->client));
2933 if (ndr_get_array_length(ndr, &r->client) > ndr_get_array_size(ndr, &r->client)) {
2934 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->client), ndr_get_array_length(ndr, &r->client));
2936 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->client), sizeof(uint16_t)));
2937 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client, ndr_get_array_length(ndr, &r->client), sizeof(uint16_t), CH_UTF16));
2938 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
2940 if (r->user) {
2941 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
2942 NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
2943 NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
2944 NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
2945 if (ndr_get_array_length(ndr, &r->user) > ndr_get_array_size(ndr, &r->user)) {
2946 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->user), ndr_get_array_length(ndr, &r->user));
2948 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t)));
2949 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t), CH_UTF16));
2950 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
2953 return NDR_ERR_SUCCESS;
2956 _PUBLIC_ void ndr_print_srvsvc_NetSessInfo10(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo10 *r)
2958 ndr_print_struct(ndr, name, "srvsvc_NetSessInfo10");
2959 ndr->depth++;
2960 ndr_print_ptr(ndr, "client", r->client);
2961 ndr->depth++;
2962 if (r->client) {
2963 ndr_print_string(ndr, "client", r->client);
2965 ndr->depth--;
2966 ndr_print_ptr(ndr, "user", r->user);
2967 ndr->depth++;
2968 if (r->user) {
2969 ndr_print_string(ndr, "user", r->user);
2971 ndr->depth--;
2972 ndr_print_uint32(ndr, "time", r->time);
2973 ndr_print_uint32(ndr, "idle_time", r->idle_time);
2974 ndr->depth--;
2977 static enum ndr_err_code ndr_push_srvsvc_NetSessCtr10(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessCtr10 *r)
2979 uint32_t cntr_array_1;
2980 if (ndr_flags & NDR_SCALARS) {
2981 NDR_CHECK(ndr_push_align(ndr, 4));
2982 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2983 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
2985 if (ndr_flags & NDR_BUFFERS) {
2986 if (r->array) {
2987 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2988 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2989 NDR_CHECK(ndr_push_srvsvc_NetSessInfo10(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
2991 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2992 NDR_CHECK(ndr_push_srvsvc_NetSessInfo10(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
2996 return NDR_ERR_SUCCESS;
2999 static enum ndr_err_code ndr_pull_srvsvc_NetSessCtr10(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr10 *r)
3001 uint32_t _ptr_array;
3002 uint32_t cntr_array_1;
3003 TALLOC_CTX *_mem_save_array_0;
3004 TALLOC_CTX *_mem_save_array_1;
3005 if (ndr_flags & NDR_SCALARS) {
3006 NDR_CHECK(ndr_pull_align(ndr, 4));
3007 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
3008 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
3009 if (_ptr_array) {
3010 NDR_PULL_ALLOC(ndr, r->array);
3011 } else {
3012 r->array = NULL;
3015 if (ndr_flags & NDR_BUFFERS) {
3016 if (r->array) {
3017 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
3018 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
3019 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
3020 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
3021 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
3022 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
3023 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3024 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo10(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
3026 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3027 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo10(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
3029 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
3030 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
3032 if (r->array) {
3033 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
3036 return NDR_ERR_SUCCESS;
3039 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr10(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr10 *r)
3041 uint32_t cntr_array_1;
3042 ndr_print_struct(ndr, name, "srvsvc_NetSessCtr10");
3043 ndr->depth++;
3044 ndr_print_uint32(ndr, "count", r->count);
3045 ndr_print_ptr(ndr, "array", r->array);
3046 ndr->depth++;
3047 if (r->array) {
3048 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
3049 ndr->depth++;
3050 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
3051 char *idx_1=NULL;
3052 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
3053 ndr_print_srvsvc_NetSessInfo10(ndr, "array", &r->array[cntr_array_1]);
3054 free(idx_1);
3057 ndr->depth--;
3059 ndr->depth--;
3060 ndr->depth--;
3063 static enum ndr_err_code ndr_push_srvsvc_NetSessInfo502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfo502 *r)
3065 if (ndr_flags & NDR_SCALARS) {
3066 NDR_CHECK(ndr_push_align(ndr, 4));
3067 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client));
3068 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
3069 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_open));
3070 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
3071 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idle_time));
3072 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->user_flags));
3073 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client_type));
3074 NDR_CHECK(ndr_push_unique_ptr(ndr, r->transport));
3076 if (ndr_flags & NDR_BUFFERS) {
3077 if (r->client) {
3078 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
3079 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3080 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
3081 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client, ndr_charset_length(r->client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3083 if (r->user) {
3084 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
3085 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3086 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
3087 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3089 if (r->client_type) {
3090 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client_type, CH_UTF16)));
3091 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3092 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client_type, CH_UTF16)));
3093 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client_type, ndr_charset_length(r->client_type, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3095 if (r->transport) {
3096 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->transport, CH_UTF16)));
3097 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3098 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->transport, CH_UTF16)));
3099 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->transport, ndr_charset_length(r->transport, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3102 return NDR_ERR_SUCCESS;
3105 static enum ndr_err_code ndr_pull_srvsvc_NetSessInfo502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfo502 *r)
3107 uint32_t _ptr_client;
3108 TALLOC_CTX *_mem_save_client_0;
3109 uint32_t _ptr_user;
3110 TALLOC_CTX *_mem_save_user_0;
3111 uint32_t _ptr_client_type;
3112 TALLOC_CTX *_mem_save_client_type_0;
3113 uint32_t _ptr_transport;
3114 TALLOC_CTX *_mem_save_transport_0;
3115 if (ndr_flags & NDR_SCALARS) {
3116 NDR_CHECK(ndr_pull_align(ndr, 4));
3117 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
3118 if (_ptr_client) {
3119 NDR_PULL_ALLOC(ndr, r->client);
3120 } else {
3121 r->client = NULL;
3123 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
3124 if (_ptr_user) {
3125 NDR_PULL_ALLOC(ndr, r->user);
3126 } else {
3127 r->user = NULL;
3129 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_open));
3130 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
3131 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idle_time));
3132 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->user_flags));
3133 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client_type));
3134 if (_ptr_client_type) {
3135 NDR_PULL_ALLOC(ndr, r->client_type);
3136 } else {
3137 r->client_type = NULL;
3139 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_transport));
3140 if (_ptr_transport) {
3141 NDR_PULL_ALLOC(ndr, r->transport);
3142 } else {
3143 r->transport = NULL;
3146 if (ndr_flags & NDR_BUFFERS) {
3147 if (r->client) {
3148 _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
3149 NDR_PULL_SET_MEM_CTX(ndr, r->client, 0);
3150 NDR_CHECK(ndr_pull_array_size(ndr, &r->client));
3151 NDR_CHECK(ndr_pull_array_length(ndr, &r->client));
3152 if (ndr_get_array_length(ndr, &r->client) > ndr_get_array_size(ndr, &r->client)) {
3153 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->client), ndr_get_array_length(ndr, &r->client));
3155 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->client), sizeof(uint16_t)));
3156 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client, ndr_get_array_length(ndr, &r->client), sizeof(uint16_t), CH_UTF16));
3157 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
3159 if (r->user) {
3160 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
3161 NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
3162 NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
3163 NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
3164 if (ndr_get_array_length(ndr, &r->user) > ndr_get_array_size(ndr, &r->user)) {
3165 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->user), ndr_get_array_length(ndr, &r->user));
3167 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t)));
3168 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t), CH_UTF16));
3169 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
3171 if (r->client_type) {
3172 _mem_save_client_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
3173 NDR_PULL_SET_MEM_CTX(ndr, r->client_type, 0);
3174 NDR_CHECK(ndr_pull_array_size(ndr, &r->client_type));
3175 NDR_CHECK(ndr_pull_array_length(ndr, &r->client_type));
3176 if (ndr_get_array_length(ndr, &r->client_type) > ndr_get_array_size(ndr, &r->client_type)) {
3177 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->client_type), ndr_get_array_length(ndr, &r->client_type));
3179 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->client_type), sizeof(uint16_t)));
3180 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client_type, ndr_get_array_length(ndr, &r->client_type), sizeof(uint16_t), CH_UTF16));
3181 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_type_0, 0);
3183 if (r->transport) {
3184 _mem_save_transport_0 = NDR_PULL_GET_MEM_CTX(ndr);
3185 NDR_PULL_SET_MEM_CTX(ndr, r->transport, 0);
3186 NDR_CHECK(ndr_pull_array_size(ndr, &r->transport));
3187 NDR_CHECK(ndr_pull_array_length(ndr, &r->transport));
3188 if (ndr_get_array_length(ndr, &r->transport) > ndr_get_array_size(ndr, &r->transport)) {
3189 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->transport), ndr_get_array_length(ndr, &r->transport));
3191 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->transport), sizeof(uint16_t)));
3192 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->transport, ndr_get_array_length(ndr, &r->transport), sizeof(uint16_t), CH_UTF16));
3193 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_transport_0, 0);
3196 return NDR_ERR_SUCCESS;
3199 _PUBLIC_ void ndr_print_srvsvc_NetSessInfo502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo502 *r)
3201 ndr_print_struct(ndr, name, "srvsvc_NetSessInfo502");
3202 ndr->depth++;
3203 ndr_print_ptr(ndr, "client", r->client);
3204 ndr->depth++;
3205 if (r->client) {
3206 ndr_print_string(ndr, "client", r->client);
3208 ndr->depth--;
3209 ndr_print_ptr(ndr, "user", r->user);
3210 ndr->depth++;
3211 if (r->user) {
3212 ndr_print_string(ndr, "user", r->user);
3214 ndr->depth--;
3215 ndr_print_uint32(ndr, "num_open", r->num_open);
3216 ndr_print_uint32(ndr, "time", r->time);
3217 ndr_print_uint32(ndr, "idle_time", r->idle_time);
3218 ndr_print_uint32(ndr, "user_flags", r->user_flags);
3219 ndr_print_ptr(ndr, "client_type", r->client_type);
3220 ndr->depth++;
3221 if (r->client_type) {
3222 ndr_print_string(ndr, "client_type", r->client_type);
3224 ndr->depth--;
3225 ndr_print_ptr(ndr, "transport", r->transport);
3226 ndr->depth++;
3227 if (r->transport) {
3228 ndr_print_string(ndr, "transport", r->transport);
3230 ndr->depth--;
3231 ndr->depth--;
3234 static enum ndr_err_code ndr_push_srvsvc_NetSessCtr502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessCtr502 *r)
3236 uint32_t cntr_array_1;
3237 if (ndr_flags & NDR_SCALARS) {
3238 NDR_CHECK(ndr_push_align(ndr, 4));
3239 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
3240 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
3242 if (ndr_flags & NDR_BUFFERS) {
3243 if (r->array) {
3244 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
3245 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3246 NDR_CHECK(ndr_push_srvsvc_NetSessInfo502(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
3248 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3249 NDR_CHECK(ndr_push_srvsvc_NetSessInfo502(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
3253 return NDR_ERR_SUCCESS;
3256 static enum ndr_err_code ndr_pull_srvsvc_NetSessCtr502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr502 *r)
3258 uint32_t _ptr_array;
3259 uint32_t cntr_array_1;
3260 TALLOC_CTX *_mem_save_array_0;
3261 TALLOC_CTX *_mem_save_array_1;
3262 if (ndr_flags & NDR_SCALARS) {
3263 NDR_CHECK(ndr_pull_align(ndr, 4));
3264 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
3265 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
3266 if (_ptr_array) {
3267 NDR_PULL_ALLOC(ndr, r->array);
3268 } else {
3269 r->array = NULL;
3272 if (ndr_flags & NDR_BUFFERS) {
3273 if (r->array) {
3274 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
3275 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
3276 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
3277 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
3278 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
3279 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
3280 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3281 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo502(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
3283 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3284 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo502(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
3286 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
3287 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
3289 if (r->array) {
3290 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
3293 return NDR_ERR_SUCCESS;
3296 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr502 *r)
3298 uint32_t cntr_array_1;
3299 ndr_print_struct(ndr, name, "srvsvc_NetSessCtr502");
3300 ndr->depth++;
3301 ndr_print_uint32(ndr, "count", r->count);
3302 ndr_print_ptr(ndr, "array", r->array);
3303 ndr->depth++;
3304 if (r->array) {
3305 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
3306 ndr->depth++;
3307 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
3308 char *idx_1=NULL;
3309 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
3310 ndr_print_srvsvc_NetSessInfo502(ndr, "array", &r->array[cntr_array_1]);
3311 free(idx_1);
3314 ndr->depth--;
3316 ndr->depth--;
3317 ndr->depth--;
3320 static enum ndr_err_code ndr_push_srvsvc_NetSessCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetSessCtr *r)
3322 if (ndr_flags & NDR_SCALARS) {
3323 int level = ndr_push_get_switch_value(ndr, r);
3324 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
3325 switch (level) {
3326 case 0: {
3327 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0));
3328 break; }
3330 case 1: {
3331 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
3332 break; }
3334 case 2: {
3335 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr2));
3336 break; }
3338 case 10: {
3339 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr10));
3340 break; }
3342 case 502: {
3343 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr502));
3344 break; }
3346 default: {
3347 break; }
3351 if (ndr_flags & NDR_BUFFERS) {
3352 int level = ndr_push_get_switch_value(ndr, r);
3353 switch (level) {
3354 case 0:
3355 if (r->ctr0) {
3356 NDR_CHECK(ndr_push_srvsvc_NetSessCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
3358 break;
3360 case 1:
3361 if (r->ctr1) {
3362 NDR_CHECK(ndr_push_srvsvc_NetSessCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
3364 break;
3366 case 2:
3367 if (r->ctr2) {
3368 NDR_CHECK(ndr_push_srvsvc_NetSessCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
3370 break;
3372 case 10:
3373 if (r->ctr10) {
3374 NDR_CHECK(ndr_push_srvsvc_NetSessCtr10(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr10));
3376 break;
3378 case 502:
3379 if (r->ctr502) {
3380 NDR_CHECK(ndr_push_srvsvc_NetSessCtr502(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr502));
3382 break;
3384 default:
3385 break;
3389 return NDR_ERR_SUCCESS;
3392 static enum ndr_err_code ndr_pull_srvsvc_NetSessCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetSessCtr *r)
3394 int level;
3395 uint32_t _level;
3396 TALLOC_CTX *_mem_save_ctr0_0;
3397 TALLOC_CTX *_mem_save_ctr1_0;
3398 TALLOC_CTX *_mem_save_ctr2_0;
3399 TALLOC_CTX *_mem_save_ctr10_0;
3400 TALLOC_CTX *_mem_save_ctr502_0;
3401 level = ndr_pull_get_switch_value(ndr, r);
3402 if (ndr_flags & NDR_SCALARS) {
3403 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
3404 if (_level != level) {
3405 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
3407 switch (level) {
3408 case 0: {
3409 uint32_t _ptr_ctr0;
3410 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr0));
3411 if (_ptr_ctr0) {
3412 NDR_PULL_ALLOC(ndr, r->ctr0);
3413 } else {
3414 r->ctr0 = NULL;
3416 break; }
3418 case 1: {
3419 uint32_t _ptr_ctr1;
3420 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
3421 if (_ptr_ctr1) {
3422 NDR_PULL_ALLOC(ndr, r->ctr1);
3423 } else {
3424 r->ctr1 = NULL;
3426 break; }
3428 case 2: {
3429 uint32_t _ptr_ctr2;
3430 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr2));
3431 if (_ptr_ctr2) {
3432 NDR_PULL_ALLOC(ndr, r->ctr2);
3433 } else {
3434 r->ctr2 = NULL;
3436 break; }
3438 case 10: {
3439 uint32_t _ptr_ctr10;
3440 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr10));
3441 if (_ptr_ctr10) {
3442 NDR_PULL_ALLOC(ndr, r->ctr10);
3443 } else {
3444 r->ctr10 = NULL;
3446 break; }
3448 case 502: {
3449 uint32_t _ptr_ctr502;
3450 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr502));
3451 if (_ptr_ctr502) {
3452 NDR_PULL_ALLOC(ndr, r->ctr502);
3453 } else {
3454 r->ctr502 = NULL;
3456 break; }
3458 default: {
3459 break; }
3463 if (ndr_flags & NDR_BUFFERS) {
3464 switch (level) {
3465 case 0:
3466 if (r->ctr0) {
3467 _mem_save_ctr0_0 = NDR_PULL_GET_MEM_CTX(ndr);
3468 NDR_PULL_SET_MEM_CTX(ndr, r->ctr0, 0);
3469 NDR_CHECK(ndr_pull_srvsvc_NetSessCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
3470 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr0_0, 0);
3472 break;
3474 case 1:
3475 if (r->ctr1) {
3476 _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
3477 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
3478 NDR_CHECK(ndr_pull_srvsvc_NetSessCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
3479 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
3481 break;
3483 case 2:
3484 if (r->ctr2) {
3485 _mem_save_ctr2_0 = NDR_PULL_GET_MEM_CTX(ndr);
3486 NDR_PULL_SET_MEM_CTX(ndr, r->ctr2, 0);
3487 NDR_CHECK(ndr_pull_srvsvc_NetSessCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
3488 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr2_0, 0);
3490 break;
3492 case 10:
3493 if (r->ctr10) {
3494 _mem_save_ctr10_0 = NDR_PULL_GET_MEM_CTX(ndr);
3495 NDR_PULL_SET_MEM_CTX(ndr, r->ctr10, 0);
3496 NDR_CHECK(ndr_pull_srvsvc_NetSessCtr10(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr10));
3497 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr10_0, 0);
3499 break;
3501 case 502:
3502 if (r->ctr502) {
3503 _mem_save_ctr502_0 = NDR_PULL_GET_MEM_CTX(ndr);
3504 NDR_PULL_SET_MEM_CTX(ndr, r->ctr502, 0);
3505 NDR_CHECK(ndr_pull_srvsvc_NetSessCtr502(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr502));
3506 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr502_0, 0);
3508 break;
3510 default:
3511 break;
3515 return NDR_ERR_SUCCESS;
3518 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetSessCtr *r)
3520 int level;
3521 level = ndr_print_get_switch_value(ndr, r);
3522 ndr_print_union(ndr, name, level, "srvsvc_NetSessCtr");
3523 switch (level) {
3524 case 0:
3525 ndr_print_ptr(ndr, "ctr0", r->ctr0);
3526 ndr->depth++;
3527 if (r->ctr0) {
3528 ndr_print_srvsvc_NetSessCtr0(ndr, "ctr0", r->ctr0);
3530 ndr->depth--;
3531 break;
3533 case 1:
3534 ndr_print_ptr(ndr, "ctr1", r->ctr1);
3535 ndr->depth++;
3536 if (r->ctr1) {
3537 ndr_print_srvsvc_NetSessCtr1(ndr, "ctr1", r->ctr1);
3539 ndr->depth--;
3540 break;
3542 case 2:
3543 ndr_print_ptr(ndr, "ctr2", r->ctr2);
3544 ndr->depth++;
3545 if (r->ctr2) {
3546 ndr_print_srvsvc_NetSessCtr2(ndr, "ctr2", r->ctr2);
3548 ndr->depth--;
3549 break;
3551 case 10:
3552 ndr_print_ptr(ndr, "ctr10", r->ctr10);
3553 ndr->depth++;
3554 if (r->ctr10) {
3555 ndr_print_srvsvc_NetSessCtr10(ndr, "ctr10", r->ctr10);
3557 ndr->depth--;
3558 break;
3560 case 502:
3561 ndr_print_ptr(ndr, "ctr502", r->ctr502);
3562 ndr->depth++;
3563 if (r->ctr502) {
3564 ndr_print_srvsvc_NetSessCtr502(ndr, "ctr502", r->ctr502);
3566 ndr->depth--;
3567 break;
3569 default:
3570 break;
3575 static enum ndr_err_code ndr_push_srvsvc_NetSessInfoCtr(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfoCtr *r)
3577 if (ndr_flags & NDR_SCALARS) {
3578 NDR_CHECK(ndr_push_align(ndr, 4));
3579 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
3580 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level));
3581 NDR_CHECK(ndr_push_srvsvc_NetSessCtr(ndr, NDR_SCALARS, &r->ctr));
3583 if (ndr_flags & NDR_BUFFERS) {
3584 NDR_CHECK(ndr_push_srvsvc_NetSessCtr(ndr, NDR_BUFFERS, &r->ctr));
3586 return NDR_ERR_SUCCESS;
3589 static enum ndr_err_code ndr_pull_srvsvc_NetSessInfoCtr(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfoCtr *r)
3591 if (ndr_flags & NDR_SCALARS) {
3592 NDR_CHECK(ndr_pull_align(ndr, 4));
3593 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
3594 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level));
3595 NDR_CHECK(ndr_pull_srvsvc_NetSessCtr(ndr, NDR_SCALARS, &r->ctr));
3597 if (ndr_flags & NDR_BUFFERS) {
3598 NDR_CHECK(ndr_pull_srvsvc_NetSessCtr(ndr, NDR_BUFFERS, &r->ctr));
3600 return NDR_ERR_SUCCESS;
3603 _PUBLIC_ void ndr_print_srvsvc_NetSessInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfoCtr *r)
3605 ndr_print_struct(ndr, name, "srvsvc_NetSessInfoCtr");
3606 ndr->depth++;
3607 ndr_print_uint32(ndr, "level", r->level);
3608 ndr_print_set_switch_value(ndr, &r->ctr, r->level);
3609 ndr_print_srvsvc_NetSessCtr(ndr, "ctr", &r->ctr);
3610 ndr->depth--;
3613 static enum ndr_err_code ndr_push_srvsvc_ShareType(struct ndr_push *ndr, int ndr_flags, enum srvsvc_ShareType r)
3616 uint32_t _flags_save_ENUM = ndr->flags;
3617 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
3618 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
3619 ndr->flags = _flags_save_ENUM;
3621 return NDR_ERR_SUCCESS;
3624 static enum ndr_err_code ndr_pull_srvsvc_ShareType(struct ndr_pull *ndr, int ndr_flags, enum srvsvc_ShareType *r)
3626 uint32_t v;
3628 uint32_t _flags_save_ENUM = ndr->flags;
3629 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
3630 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
3631 *r = v;
3632 ndr->flags = _flags_save_ENUM;
3634 return NDR_ERR_SUCCESS;
3637 _PUBLIC_ void ndr_print_srvsvc_ShareType(struct ndr_print *ndr, const char *name, enum srvsvc_ShareType r)
3639 const char *val = NULL;
3642 uint32_t _flags_save_ENUM = ndr->flags;
3643 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
3644 switch (r) {
3645 case STYPE_DISKTREE: val = "STYPE_DISKTREE"; break;
3646 case STYPE_DISKTREE_TEMPORARY: val = "STYPE_DISKTREE_TEMPORARY"; break;
3647 case STYPE_DISKTREE_HIDDEN: val = "STYPE_DISKTREE_HIDDEN"; break;
3648 case STYPE_PRINTQ: val = "STYPE_PRINTQ"; break;
3649 case STYPE_PRINTQ_TEMPORARY: val = "STYPE_PRINTQ_TEMPORARY"; break;
3650 case STYPE_PRINTQ_HIDDEN: val = "STYPE_PRINTQ_HIDDEN"; break;
3651 case STYPE_DEVICE: val = "STYPE_DEVICE"; break;
3652 case STYPE_DEVICE_TEMPORARY: val = "STYPE_DEVICE_TEMPORARY"; break;
3653 case STYPE_DEVICE_HIDDEN: val = "STYPE_DEVICE_HIDDEN"; break;
3654 case STYPE_IPC: val = "STYPE_IPC"; break;
3655 case STYPE_IPC_TEMPORARY: val = "STYPE_IPC_TEMPORARY"; break;
3656 case STYPE_IPC_HIDDEN: val = "STYPE_IPC_HIDDEN"; break;
3658 ndr_print_enum(ndr, name, "ENUM", val, r);
3659 ndr->flags = _flags_save_ENUM;
3663 static enum ndr_err_code ndr_push_srvsvc_NetShareInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo0 *r)
3665 if (ndr_flags & NDR_SCALARS) {
3666 NDR_CHECK(ndr_push_align(ndr, 4));
3667 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
3669 if (ndr_flags & NDR_BUFFERS) {
3670 if (r->name) {
3671 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
3672 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3673 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
3674 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3677 return NDR_ERR_SUCCESS;
3680 static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo0 *r)
3682 uint32_t _ptr_name;
3683 TALLOC_CTX *_mem_save_name_0;
3684 if (ndr_flags & NDR_SCALARS) {
3685 NDR_CHECK(ndr_pull_align(ndr, 4));
3686 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
3687 if (_ptr_name) {
3688 NDR_PULL_ALLOC(ndr, r->name);
3689 } else {
3690 r->name = NULL;
3693 if (ndr_flags & NDR_BUFFERS) {
3694 if (r->name) {
3695 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
3696 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
3697 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
3698 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
3699 if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->name)) {
3700 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->name), ndr_get_array_length(ndr, &r->name));
3702 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t)));
3703 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t), CH_UTF16));
3704 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
3707 return NDR_ERR_SUCCESS;
3710 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo0 *r)
3712 ndr_print_struct(ndr, name, "srvsvc_NetShareInfo0");
3713 ndr->depth++;
3714 ndr_print_ptr(ndr, "name", r->name);
3715 ndr->depth++;
3716 if (r->name) {
3717 ndr_print_string(ndr, "name", r->name);
3719 ndr->depth--;
3720 ndr->depth--;
3723 static enum ndr_err_code ndr_push_srvsvc_NetShareCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr0 *r)
3725 uint32_t cntr_array_1;
3726 if (ndr_flags & NDR_SCALARS) {
3727 NDR_CHECK(ndr_push_align(ndr, 4));
3728 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
3729 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
3731 if (ndr_flags & NDR_BUFFERS) {
3732 if (r->array) {
3733 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
3734 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3735 NDR_CHECK(ndr_push_srvsvc_NetShareInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
3737 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3738 NDR_CHECK(ndr_push_srvsvc_NetShareInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
3742 return NDR_ERR_SUCCESS;
3745 static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr0 *r)
3747 uint32_t _ptr_array;
3748 uint32_t cntr_array_1;
3749 TALLOC_CTX *_mem_save_array_0;
3750 TALLOC_CTX *_mem_save_array_1;
3751 if (ndr_flags & NDR_SCALARS) {
3752 NDR_CHECK(ndr_pull_align(ndr, 4));
3753 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
3754 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
3755 if (_ptr_array) {
3756 NDR_PULL_ALLOC(ndr, r->array);
3757 } else {
3758 r->array = NULL;
3761 if (ndr_flags & NDR_BUFFERS) {
3762 if (r->array) {
3763 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
3764 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
3765 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
3766 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
3767 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
3768 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
3769 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3770 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
3772 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3773 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
3775 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
3776 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
3778 if (r->array) {
3779 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
3782 return NDR_ERR_SUCCESS;
3785 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr0 *r)
3787 uint32_t cntr_array_1;
3788 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr0");
3789 ndr->depth++;
3790 ndr_print_uint32(ndr, "count", r->count);
3791 ndr_print_ptr(ndr, "array", r->array);
3792 ndr->depth++;
3793 if (r->array) {
3794 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
3795 ndr->depth++;
3796 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
3797 char *idx_1=NULL;
3798 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
3799 ndr_print_srvsvc_NetShareInfo0(ndr, "array", &r->array[cntr_array_1]);
3800 free(idx_1);
3803 ndr->depth--;
3805 ndr->depth--;
3806 ndr->depth--;
3809 static enum ndr_err_code ndr_push_srvsvc_NetShareInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo1 *r)
3811 if (ndr_flags & NDR_SCALARS) {
3812 NDR_CHECK(ndr_push_align(ndr, 4));
3813 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
3814 NDR_CHECK(ndr_push_srvsvc_ShareType(ndr, NDR_SCALARS, r->type));
3815 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
3817 if (ndr_flags & NDR_BUFFERS) {
3818 if (r->name) {
3819 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
3820 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3821 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
3822 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3824 if (r->comment) {
3825 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
3826 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3827 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
3828 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3831 return NDR_ERR_SUCCESS;
3834 static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo1 *r)
3836 uint32_t _ptr_name;
3837 TALLOC_CTX *_mem_save_name_0;
3838 uint32_t _ptr_comment;
3839 TALLOC_CTX *_mem_save_comment_0;
3840 if (ndr_flags & NDR_SCALARS) {
3841 NDR_CHECK(ndr_pull_align(ndr, 4));
3842 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
3843 if (_ptr_name) {
3844 NDR_PULL_ALLOC(ndr, r->name);
3845 } else {
3846 r->name = NULL;
3848 NDR_CHECK(ndr_pull_srvsvc_ShareType(ndr, NDR_SCALARS, &r->type));
3849 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
3850 if (_ptr_comment) {
3851 NDR_PULL_ALLOC(ndr, r->comment);
3852 } else {
3853 r->comment = NULL;
3856 if (ndr_flags & NDR_BUFFERS) {
3857 if (r->name) {
3858 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
3859 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
3860 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
3861 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
3862 if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->name)) {
3863 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->name), ndr_get_array_length(ndr, &r->name));
3865 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t)));
3866 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t), CH_UTF16));
3867 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
3869 if (r->comment) {
3870 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
3871 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
3872 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
3873 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
3874 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
3875 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
3877 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
3878 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
3879 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
3882 return NDR_ERR_SUCCESS;
3885 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1 *r)
3887 ndr_print_struct(ndr, name, "srvsvc_NetShareInfo1");
3888 ndr->depth++;
3889 ndr_print_ptr(ndr, "name", r->name);
3890 ndr->depth++;
3891 if (r->name) {
3892 ndr_print_string(ndr, "name", r->name);
3894 ndr->depth--;
3895 ndr_print_srvsvc_ShareType(ndr, "type", r->type);
3896 ndr_print_ptr(ndr, "comment", r->comment);
3897 ndr->depth++;
3898 if (r->comment) {
3899 ndr_print_string(ndr, "comment", r->comment);
3901 ndr->depth--;
3902 ndr->depth--;
3905 static enum ndr_err_code ndr_push_srvsvc_NetShareCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1 *r)
3907 uint32_t cntr_array_1;
3908 if (ndr_flags & NDR_SCALARS) {
3909 NDR_CHECK(ndr_push_align(ndr, 4));
3910 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
3911 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
3913 if (ndr_flags & NDR_BUFFERS) {
3914 if (r->array) {
3915 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
3916 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3917 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
3919 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3920 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
3924 return NDR_ERR_SUCCESS;
3927 static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1 *r)
3929 uint32_t _ptr_array;
3930 uint32_t cntr_array_1;
3931 TALLOC_CTX *_mem_save_array_0;
3932 TALLOC_CTX *_mem_save_array_1;
3933 if (ndr_flags & NDR_SCALARS) {
3934 NDR_CHECK(ndr_pull_align(ndr, 4));
3935 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
3936 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
3937 if (_ptr_array) {
3938 NDR_PULL_ALLOC(ndr, r->array);
3939 } else {
3940 r->array = NULL;
3943 if (ndr_flags & NDR_BUFFERS) {
3944 if (r->array) {
3945 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
3946 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
3947 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
3948 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
3949 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
3950 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
3951 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3952 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
3954 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3955 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
3957 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
3958 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
3960 if (r->array) {
3961 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
3964 return NDR_ERR_SUCCESS;
3967 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1 *r)
3969 uint32_t cntr_array_1;
3970 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr1");
3971 ndr->depth++;
3972 ndr_print_uint32(ndr, "count", r->count);
3973 ndr_print_ptr(ndr, "array", r->array);
3974 ndr->depth++;
3975 if (r->array) {
3976 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
3977 ndr->depth++;
3978 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
3979 char *idx_1=NULL;
3980 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
3981 ndr_print_srvsvc_NetShareInfo1(ndr, "array", &r->array[cntr_array_1]);
3982 free(idx_1);
3985 ndr->depth--;
3987 ndr->depth--;
3988 ndr->depth--;
3991 static enum ndr_err_code ndr_push_srvsvc_NetShareInfo2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo2 *r)
3993 if (ndr_flags & NDR_SCALARS) {
3994 NDR_CHECK(ndr_push_align(ndr, 4));
3995 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
3996 NDR_CHECK(ndr_push_srvsvc_ShareType(ndr, NDR_SCALARS, r->type));
3997 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
3998 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->permissions));
3999 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_users));
4000 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->current_users));
4001 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
4002 NDR_CHECK(ndr_push_unique_ptr(ndr, r->password));
4004 if (ndr_flags & NDR_BUFFERS) {
4005 if (r->name) {
4006 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
4007 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4008 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
4009 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4011 if (r->comment) {
4012 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
4013 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4014 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
4015 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4017 if (r->path) {
4018 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
4019 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4020 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
4021 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4023 if (r->password) {
4024 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->password, CH_UTF16)));
4025 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4026 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->password, CH_UTF16)));
4027 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->password, ndr_charset_length(r->password, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4030 return NDR_ERR_SUCCESS;
4033 static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo2 *r)
4035 uint32_t _ptr_name;
4036 TALLOC_CTX *_mem_save_name_0;
4037 uint32_t _ptr_comment;
4038 TALLOC_CTX *_mem_save_comment_0;
4039 uint32_t _ptr_path;
4040 TALLOC_CTX *_mem_save_path_0;
4041 uint32_t _ptr_password;
4042 TALLOC_CTX *_mem_save_password_0;
4043 if (ndr_flags & NDR_SCALARS) {
4044 NDR_CHECK(ndr_pull_align(ndr, 4));
4045 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
4046 if (_ptr_name) {
4047 NDR_PULL_ALLOC(ndr, r->name);
4048 } else {
4049 r->name = NULL;
4051 NDR_CHECK(ndr_pull_srvsvc_ShareType(ndr, NDR_SCALARS, &r->type));
4052 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
4053 if (_ptr_comment) {
4054 NDR_PULL_ALLOC(ndr, r->comment);
4055 } else {
4056 r->comment = NULL;
4058 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->permissions));
4059 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_users));
4060 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->current_users));
4061 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
4062 if (_ptr_path) {
4063 NDR_PULL_ALLOC(ndr, r->path);
4064 } else {
4065 r->path = NULL;
4067 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
4068 if (_ptr_password) {
4069 NDR_PULL_ALLOC(ndr, r->password);
4070 } else {
4071 r->password = NULL;
4074 if (ndr_flags & NDR_BUFFERS) {
4075 if (r->name) {
4076 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4077 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
4078 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
4079 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
4080 if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->name)) {
4081 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->name), ndr_get_array_length(ndr, &r->name));
4083 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t)));
4084 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t), CH_UTF16));
4085 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
4087 if (r->comment) {
4088 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
4089 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
4090 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
4091 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
4092 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
4093 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
4095 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
4096 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
4097 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
4099 if (r->path) {
4100 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
4101 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
4102 NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
4103 NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
4104 if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) {
4105 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->path), ndr_get_array_length(ndr, &r->path));
4107 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t)));
4108 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16));
4109 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
4111 if (r->password) {
4112 _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
4113 NDR_PULL_SET_MEM_CTX(ndr, r->password, 0);
4114 NDR_CHECK(ndr_pull_array_size(ndr, &r->password));
4115 NDR_CHECK(ndr_pull_array_length(ndr, &r->password));
4116 if (ndr_get_array_length(ndr, &r->password) > ndr_get_array_size(ndr, &r->password)) {
4117 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->password), ndr_get_array_length(ndr, &r->password));
4119 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->password), sizeof(uint16_t)));
4120 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->password, ndr_get_array_length(ndr, &r->password), sizeof(uint16_t), CH_UTF16));
4121 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
4124 return NDR_ERR_SUCCESS;
4127 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo2 *r)
4129 ndr_print_struct(ndr, name, "srvsvc_NetShareInfo2");
4130 ndr->depth++;
4131 ndr_print_ptr(ndr, "name", r->name);
4132 ndr->depth++;
4133 if (r->name) {
4134 ndr_print_string(ndr, "name", r->name);
4136 ndr->depth--;
4137 ndr_print_srvsvc_ShareType(ndr, "type", r->type);
4138 ndr_print_ptr(ndr, "comment", r->comment);
4139 ndr->depth++;
4140 if (r->comment) {
4141 ndr_print_string(ndr, "comment", r->comment);
4143 ndr->depth--;
4144 ndr_print_uint32(ndr, "permissions", r->permissions);
4145 ndr_print_uint32(ndr, "max_users", r->max_users);
4146 ndr_print_uint32(ndr, "current_users", r->current_users);
4147 ndr_print_ptr(ndr, "path", r->path);
4148 ndr->depth++;
4149 if (r->path) {
4150 ndr_print_string(ndr, "path", r->path);
4152 ndr->depth--;
4153 ndr_print_ptr(ndr, "password", r->password);
4154 ndr->depth++;
4155 if (r->password) {
4156 ndr_print_string(ndr, "password", r->password);
4158 ndr->depth--;
4159 ndr->depth--;
4162 static enum ndr_err_code ndr_push_srvsvc_NetShareCtr2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr2 *r)
4164 uint32_t cntr_array_1;
4165 if (ndr_flags & NDR_SCALARS) {
4166 NDR_CHECK(ndr_push_align(ndr, 4));
4167 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4168 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
4170 if (ndr_flags & NDR_BUFFERS) {
4171 if (r->array) {
4172 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4173 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4174 NDR_CHECK(ndr_push_srvsvc_NetShareInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4176 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4177 NDR_CHECK(ndr_push_srvsvc_NetShareInfo2(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
4181 return NDR_ERR_SUCCESS;
4184 static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr2 *r)
4186 uint32_t _ptr_array;
4187 uint32_t cntr_array_1;
4188 TALLOC_CTX *_mem_save_array_0;
4189 TALLOC_CTX *_mem_save_array_1;
4190 if (ndr_flags & NDR_SCALARS) {
4191 NDR_CHECK(ndr_pull_align(ndr, 4));
4192 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4193 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
4194 if (_ptr_array) {
4195 NDR_PULL_ALLOC(ndr, r->array);
4196 } else {
4197 r->array = NULL;
4200 if (ndr_flags & NDR_BUFFERS) {
4201 if (r->array) {
4202 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
4203 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4204 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
4205 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
4206 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
4207 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4208 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4209 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4211 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4212 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo2(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
4214 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
4215 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
4217 if (r->array) {
4218 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
4221 return NDR_ERR_SUCCESS;
4224 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr2 *r)
4226 uint32_t cntr_array_1;
4227 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr2");
4228 ndr->depth++;
4229 ndr_print_uint32(ndr, "count", r->count);
4230 ndr_print_ptr(ndr, "array", r->array);
4231 ndr->depth++;
4232 if (r->array) {
4233 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
4234 ndr->depth++;
4235 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
4236 char *idx_1=NULL;
4237 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
4238 ndr_print_srvsvc_NetShareInfo2(ndr, "array", &r->array[cntr_array_1]);
4239 free(idx_1);
4242 ndr->depth--;
4244 ndr->depth--;
4245 ndr->depth--;
4248 static enum ndr_err_code ndr_push_srvsvc_NetShareInfo501(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo501 *r)
4250 if (ndr_flags & NDR_SCALARS) {
4251 NDR_CHECK(ndr_push_align(ndr, 4));
4252 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
4253 NDR_CHECK(ndr_push_srvsvc_ShareType(ndr, NDR_SCALARS, r->type));
4254 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
4255 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->csc_policy));
4257 if (ndr_flags & NDR_BUFFERS) {
4258 if (r->name) {
4259 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
4260 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4261 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
4262 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4264 if (r->comment) {
4265 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
4266 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4267 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
4268 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4271 return NDR_ERR_SUCCESS;
4274 static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo501(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo501 *r)
4276 uint32_t _ptr_name;
4277 TALLOC_CTX *_mem_save_name_0;
4278 uint32_t _ptr_comment;
4279 TALLOC_CTX *_mem_save_comment_0;
4280 if (ndr_flags & NDR_SCALARS) {
4281 NDR_CHECK(ndr_pull_align(ndr, 4));
4282 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
4283 if (_ptr_name) {
4284 NDR_PULL_ALLOC(ndr, r->name);
4285 } else {
4286 r->name = NULL;
4288 NDR_CHECK(ndr_pull_srvsvc_ShareType(ndr, NDR_SCALARS, &r->type));
4289 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
4290 if (_ptr_comment) {
4291 NDR_PULL_ALLOC(ndr, r->comment);
4292 } else {
4293 r->comment = NULL;
4295 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->csc_policy));
4297 if (ndr_flags & NDR_BUFFERS) {
4298 if (r->name) {
4299 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4300 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
4301 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
4302 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
4303 if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->name)) {
4304 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->name), ndr_get_array_length(ndr, &r->name));
4306 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t)));
4307 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t), CH_UTF16));
4308 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
4310 if (r->comment) {
4311 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
4312 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
4313 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
4314 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
4315 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
4316 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
4318 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
4319 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
4320 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
4323 return NDR_ERR_SUCCESS;
4326 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo501(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo501 *r)
4328 ndr_print_struct(ndr, name, "srvsvc_NetShareInfo501");
4329 ndr->depth++;
4330 ndr_print_ptr(ndr, "name", r->name);
4331 ndr->depth++;
4332 if (r->name) {
4333 ndr_print_string(ndr, "name", r->name);
4335 ndr->depth--;
4336 ndr_print_srvsvc_ShareType(ndr, "type", r->type);
4337 ndr_print_ptr(ndr, "comment", r->comment);
4338 ndr->depth++;
4339 if (r->comment) {
4340 ndr_print_string(ndr, "comment", r->comment);
4342 ndr->depth--;
4343 ndr_print_uint32(ndr, "csc_policy", r->csc_policy);
4344 ndr->depth--;
4347 static enum ndr_err_code ndr_push_srvsvc_NetShareCtr501(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr501 *r)
4349 uint32_t cntr_array_1;
4350 if (ndr_flags & NDR_SCALARS) {
4351 NDR_CHECK(ndr_push_align(ndr, 4));
4352 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4353 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
4355 if (ndr_flags & NDR_BUFFERS) {
4356 if (r->array) {
4357 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4358 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4359 NDR_CHECK(ndr_push_srvsvc_NetShareInfo501(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4361 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4362 NDR_CHECK(ndr_push_srvsvc_NetShareInfo501(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
4366 return NDR_ERR_SUCCESS;
4369 static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr501(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr501 *r)
4371 uint32_t _ptr_array;
4372 uint32_t cntr_array_1;
4373 TALLOC_CTX *_mem_save_array_0;
4374 TALLOC_CTX *_mem_save_array_1;
4375 if (ndr_flags & NDR_SCALARS) {
4376 NDR_CHECK(ndr_pull_align(ndr, 4));
4377 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4378 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
4379 if (_ptr_array) {
4380 NDR_PULL_ALLOC(ndr, r->array);
4381 } else {
4382 r->array = NULL;
4385 if (ndr_flags & NDR_BUFFERS) {
4386 if (r->array) {
4387 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
4388 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4389 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
4390 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
4391 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
4392 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4393 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4394 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo501(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4396 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4397 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo501(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
4399 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
4400 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
4402 if (r->array) {
4403 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
4406 return NDR_ERR_SUCCESS;
4409 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr501(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr501 *r)
4411 uint32_t cntr_array_1;
4412 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr501");
4413 ndr->depth++;
4414 ndr_print_uint32(ndr, "count", r->count);
4415 ndr_print_ptr(ndr, "array", r->array);
4416 ndr->depth++;
4417 if (r->array) {
4418 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
4419 ndr->depth++;
4420 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
4421 char *idx_1=NULL;
4422 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
4423 ndr_print_srvsvc_NetShareInfo501(ndr, "array", &r->array[cntr_array_1]);
4424 free(idx_1);
4427 ndr->depth--;
4429 ndr->depth--;
4430 ndr->depth--;
4433 static enum ndr_err_code ndr_push_srvsvc_NetShareInfo502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo502 *r)
4435 if (ndr_flags & NDR_SCALARS) {
4436 NDR_CHECK(ndr_push_align(ndr, 4));
4437 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
4438 NDR_CHECK(ndr_push_srvsvc_ShareType(ndr, NDR_SCALARS, r->type));
4439 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
4440 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->permissions));
4441 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_users));
4442 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->current_users));
4443 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
4444 NDR_CHECK(ndr_push_unique_ptr(ndr, r->password));
4445 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sd_buf));
4447 if (ndr_flags & NDR_BUFFERS) {
4448 if (r->name) {
4449 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
4450 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4451 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
4452 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4454 if (r->comment) {
4455 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
4456 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4457 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
4458 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4460 if (r->path) {
4461 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
4462 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4463 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
4464 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4466 if (r->password) {
4467 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->password, CH_UTF16)));
4468 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4469 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->password, CH_UTF16)));
4470 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->password, ndr_charset_length(r->password, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4472 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sd_buf));
4474 return NDR_ERR_SUCCESS;
4477 static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo502 *r)
4479 uint32_t _ptr_name;
4480 TALLOC_CTX *_mem_save_name_0;
4481 uint32_t _ptr_comment;
4482 TALLOC_CTX *_mem_save_comment_0;
4483 uint32_t _ptr_path;
4484 TALLOC_CTX *_mem_save_path_0;
4485 uint32_t _ptr_password;
4486 TALLOC_CTX *_mem_save_password_0;
4487 if (ndr_flags & NDR_SCALARS) {
4488 NDR_CHECK(ndr_pull_align(ndr, 4));
4489 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
4490 if (_ptr_name) {
4491 NDR_PULL_ALLOC(ndr, r->name);
4492 } else {
4493 r->name = NULL;
4495 NDR_CHECK(ndr_pull_srvsvc_ShareType(ndr, NDR_SCALARS, &r->type));
4496 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
4497 if (_ptr_comment) {
4498 NDR_PULL_ALLOC(ndr, r->comment);
4499 } else {
4500 r->comment = NULL;
4502 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->permissions));
4503 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_users));
4504 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->current_users));
4505 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
4506 if (_ptr_path) {
4507 NDR_PULL_ALLOC(ndr, r->path);
4508 } else {
4509 r->path = NULL;
4511 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
4512 if (_ptr_password) {
4513 NDR_PULL_ALLOC(ndr, r->password);
4514 } else {
4515 r->password = NULL;
4517 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sd_buf));
4519 if (ndr_flags & NDR_BUFFERS) {
4520 if (r->name) {
4521 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4522 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
4523 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
4524 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
4525 if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->name)) {
4526 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->name), ndr_get_array_length(ndr, &r->name));
4528 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t)));
4529 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t), CH_UTF16));
4530 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
4532 if (r->comment) {
4533 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
4534 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
4535 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
4536 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
4537 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
4538 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
4540 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
4541 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
4542 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
4544 if (r->path) {
4545 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
4546 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
4547 NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
4548 NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
4549 if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) {
4550 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->path), ndr_get_array_length(ndr, &r->path));
4552 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t)));
4553 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16));
4554 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
4556 if (r->password) {
4557 _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
4558 NDR_PULL_SET_MEM_CTX(ndr, r->password, 0);
4559 NDR_CHECK(ndr_pull_array_size(ndr, &r->password));
4560 NDR_CHECK(ndr_pull_array_length(ndr, &r->password));
4561 if (ndr_get_array_length(ndr, &r->password) > ndr_get_array_size(ndr, &r->password)) {
4562 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->password), ndr_get_array_length(ndr, &r->password));
4564 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->password), sizeof(uint16_t)));
4565 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->password, ndr_get_array_length(ndr, &r->password), sizeof(uint16_t), CH_UTF16));
4566 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
4568 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sd_buf));
4570 return NDR_ERR_SUCCESS;
4573 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo502 *r)
4575 ndr_print_struct(ndr, name, "srvsvc_NetShareInfo502");
4576 ndr->depth++;
4577 ndr_print_ptr(ndr, "name", r->name);
4578 ndr->depth++;
4579 if (r->name) {
4580 ndr_print_string(ndr, "name", r->name);
4582 ndr->depth--;
4583 ndr_print_srvsvc_ShareType(ndr, "type", r->type);
4584 ndr_print_ptr(ndr, "comment", r->comment);
4585 ndr->depth++;
4586 if (r->comment) {
4587 ndr_print_string(ndr, "comment", r->comment);
4589 ndr->depth--;
4590 ndr_print_uint32(ndr, "permissions", r->permissions);
4591 ndr_print_uint32(ndr, "max_users", r->max_users);
4592 ndr_print_uint32(ndr, "current_users", r->current_users);
4593 ndr_print_ptr(ndr, "path", r->path);
4594 ndr->depth++;
4595 if (r->path) {
4596 ndr_print_string(ndr, "path", r->path);
4598 ndr->depth--;
4599 ndr_print_ptr(ndr, "password", r->password);
4600 ndr->depth++;
4601 if (r->password) {
4602 ndr_print_string(ndr, "password", r->password);
4604 ndr->depth--;
4605 ndr_print_sec_desc_buf(ndr, "sd_buf", &r->sd_buf);
4606 ndr->depth--;
4609 static enum ndr_err_code ndr_push_srvsvc_NetShareCtr502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr502 *r)
4611 uint32_t cntr_array_1;
4612 if (ndr_flags & NDR_SCALARS) {
4613 NDR_CHECK(ndr_push_align(ndr, 4));
4614 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4615 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
4617 if (ndr_flags & NDR_BUFFERS) {
4618 if (r->array) {
4619 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4620 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4621 NDR_CHECK(ndr_push_srvsvc_NetShareInfo502(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4623 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4624 NDR_CHECK(ndr_push_srvsvc_NetShareInfo502(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
4628 return NDR_ERR_SUCCESS;
4631 static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr502 *r)
4633 uint32_t _ptr_array;
4634 uint32_t cntr_array_1;
4635 TALLOC_CTX *_mem_save_array_0;
4636 TALLOC_CTX *_mem_save_array_1;
4637 if (ndr_flags & NDR_SCALARS) {
4638 NDR_CHECK(ndr_pull_align(ndr, 4));
4639 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4640 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
4641 if (_ptr_array) {
4642 NDR_PULL_ALLOC(ndr, r->array);
4643 } else {
4644 r->array = NULL;
4647 if (ndr_flags & NDR_BUFFERS) {
4648 if (r->array) {
4649 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
4650 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4651 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
4652 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
4653 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
4654 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4655 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4656 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo502(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4658 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4659 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo502(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
4661 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
4662 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
4664 if (r->array) {
4665 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
4668 return NDR_ERR_SUCCESS;
4671 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr502 *r)
4673 uint32_t cntr_array_1;
4674 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr502");
4675 ndr->depth++;
4676 ndr_print_uint32(ndr, "count", r->count);
4677 ndr_print_ptr(ndr, "array", r->array);
4678 ndr->depth++;
4679 if (r->array) {
4680 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
4681 ndr->depth++;
4682 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
4683 char *idx_1=NULL;
4684 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
4685 ndr_print_srvsvc_NetShareInfo502(ndr, "array", &r->array[cntr_array_1]);
4686 free(idx_1);
4689 ndr->depth--;
4691 ndr->depth--;
4692 ndr->depth--;
4695 static enum ndr_err_code ndr_push_srvsvc_NetShareInfo1004(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo1004 *r)
4697 if (ndr_flags & NDR_SCALARS) {
4698 NDR_CHECK(ndr_push_align(ndr, 4));
4699 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
4701 if (ndr_flags & NDR_BUFFERS) {
4702 if (r->comment) {
4703 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
4704 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4705 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
4706 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4709 return NDR_ERR_SUCCESS;
4712 static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo1004(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo1004 *r)
4714 uint32_t _ptr_comment;
4715 TALLOC_CTX *_mem_save_comment_0;
4716 if (ndr_flags & NDR_SCALARS) {
4717 NDR_CHECK(ndr_pull_align(ndr, 4));
4718 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
4719 if (_ptr_comment) {
4720 NDR_PULL_ALLOC(ndr, r->comment);
4721 } else {
4722 r->comment = NULL;
4725 if (ndr_flags & NDR_BUFFERS) {
4726 if (r->comment) {
4727 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
4728 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
4729 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
4730 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
4731 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
4732 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
4734 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
4735 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
4736 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
4739 return NDR_ERR_SUCCESS;
4742 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1004(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1004 *r)
4744 ndr_print_struct(ndr, name, "srvsvc_NetShareInfo1004");
4745 ndr->depth++;
4746 ndr_print_ptr(ndr, "comment", r->comment);
4747 ndr->depth++;
4748 if (r->comment) {
4749 ndr_print_string(ndr, "comment", r->comment);
4751 ndr->depth--;
4752 ndr->depth--;
4755 static enum ndr_err_code ndr_push_srvsvc_NetShareCtr1004(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1004 *r)
4757 uint32_t cntr_array_1;
4758 if (ndr_flags & NDR_SCALARS) {
4759 NDR_CHECK(ndr_push_align(ndr, 4));
4760 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4761 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
4763 if (ndr_flags & NDR_BUFFERS) {
4764 if (r->array) {
4765 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4766 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4767 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1004(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4769 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4770 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1004(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
4774 return NDR_ERR_SUCCESS;
4777 static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr1004(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1004 *r)
4779 uint32_t _ptr_array;
4780 uint32_t cntr_array_1;
4781 TALLOC_CTX *_mem_save_array_0;
4782 TALLOC_CTX *_mem_save_array_1;
4783 if (ndr_flags & NDR_SCALARS) {
4784 NDR_CHECK(ndr_pull_align(ndr, 4));
4785 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4786 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
4787 if (_ptr_array) {
4788 NDR_PULL_ALLOC(ndr, r->array);
4789 } else {
4790 r->array = NULL;
4793 if (ndr_flags & NDR_BUFFERS) {
4794 if (r->array) {
4795 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
4796 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4797 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
4798 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
4799 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
4800 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4801 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4802 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1004(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4804 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4805 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1004(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
4807 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
4808 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
4810 if (r->array) {
4811 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
4814 return NDR_ERR_SUCCESS;
4817 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1004(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1004 *r)
4819 uint32_t cntr_array_1;
4820 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr1004");
4821 ndr->depth++;
4822 ndr_print_uint32(ndr, "count", r->count);
4823 ndr_print_ptr(ndr, "array", r->array);
4824 ndr->depth++;
4825 if (r->array) {
4826 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
4827 ndr->depth++;
4828 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
4829 char *idx_1=NULL;
4830 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
4831 ndr_print_srvsvc_NetShareInfo1004(ndr, "array", &r->array[cntr_array_1]);
4832 free(idx_1);
4835 ndr->depth--;
4837 ndr->depth--;
4838 ndr->depth--;
4841 static enum ndr_err_code ndr_push_NetShareInfo1005Flags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
4843 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
4844 return NDR_ERR_SUCCESS;
4847 static enum ndr_err_code ndr_pull_NetShareInfo1005Flags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
4849 uint32_t v;
4850 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
4851 *r = v;
4852 return NDR_ERR_SUCCESS;
4855 _PUBLIC_ void ndr_print_NetShareInfo1005Flags(struct ndr_print *ndr, const char *name, uint32_t r)
4857 ndr_print_uint32(ndr, name, r);
4858 ndr->depth++;
4859 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SHARE_1005_IN_DFS", SHARE_1005_IN_DFS, r);
4860 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SHARE_1005_DFS_ROOT", SHARE_1005_DFS_ROOT, r);
4861 ndr->depth--;
4864 static enum ndr_err_code ndr_push_srvsvc_NetShareInfo1005(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo1005 *r)
4866 if (ndr_flags & NDR_SCALARS) {
4867 NDR_CHECK(ndr_push_align(ndr, 4));
4868 NDR_CHECK(ndr_push_NetShareInfo1005Flags(ndr, NDR_SCALARS, r->dfs_flags));
4870 if (ndr_flags & NDR_BUFFERS) {
4872 return NDR_ERR_SUCCESS;
4875 static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo1005(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo1005 *r)
4877 if (ndr_flags & NDR_SCALARS) {
4878 NDR_CHECK(ndr_pull_align(ndr, 4));
4879 NDR_CHECK(ndr_pull_NetShareInfo1005Flags(ndr, NDR_SCALARS, &r->dfs_flags));
4881 if (ndr_flags & NDR_BUFFERS) {
4883 return NDR_ERR_SUCCESS;
4886 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1005(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1005 *r)
4888 ndr_print_struct(ndr, name, "srvsvc_NetShareInfo1005");
4889 ndr->depth++;
4890 ndr_print_NetShareInfo1005Flags(ndr, "dfs_flags", r->dfs_flags);
4891 ndr->depth--;
4894 static enum ndr_err_code ndr_push_srvsvc_NetShareCtr1005(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1005 *r)
4896 uint32_t cntr_array_1;
4897 if (ndr_flags & NDR_SCALARS) {
4898 NDR_CHECK(ndr_push_align(ndr, 4));
4899 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4900 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
4902 if (ndr_flags & NDR_BUFFERS) {
4903 if (r->array) {
4904 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4905 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4906 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1005(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4910 return NDR_ERR_SUCCESS;
4913 static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr1005(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1005 *r)
4915 uint32_t _ptr_array;
4916 uint32_t cntr_array_1;
4917 TALLOC_CTX *_mem_save_array_0;
4918 TALLOC_CTX *_mem_save_array_1;
4919 if (ndr_flags & NDR_SCALARS) {
4920 NDR_CHECK(ndr_pull_align(ndr, 4));
4921 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4922 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
4923 if (_ptr_array) {
4924 NDR_PULL_ALLOC(ndr, r->array);
4925 } else {
4926 r->array = NULL;
4929 if (ndr_flags & NDR_BUFFERS) {
4930 if (r->array) {
4931 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
4932 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4933 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
4934 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
4935 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
4936 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4937 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4938 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1005(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4940 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
4941 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
4943 if (r->array) {
4944 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
4947 return NDR_ERR_SUCCESS;
4950 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1005(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1005 *r)
4952 uint32_t cntr_array_1;
4953 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr1005");
4954 ndr->depth++;
4955 ndr_print_uint32(ndr, "count", r->count);
4956 ndr_print_ptr(ndr, "array", r->array);
4957 ndr->depth++;
4958 if (r->array) {
4959 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
4960 ndr->depth++;
4961 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
4962 char *idx_1=NULL;
4963 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
4964 ndr_print_srvsvc_NetShareInfo1005(ndr, "array", &r->array[cntr_array_1]);
4965 free(idx_1);
4968 ndr->depth--;
4970 ndr->depth--;
4971 ndr->depth--;
4974 static enum ndr_err_code ndr_push_srvsvc_NetShareInfo1006(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo1006 *r)
4976 if (ndr_flags & NDR_SCALARS) {
4977 NDR_CHECK(ndr_push_align(ndr, 4));
4978 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_users));
4980 if (ndr_flags & NDR_BUFFERS) {
4982 return NDR_ERR_SUCCESS;
4985 static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo1006(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo1006 *r)
4987 if (ndr_flags & NDR_SCALARS) {
4988 NDR_CHECK(ndr_pull_align(ndr, 4));
4989 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_users));
4991 if (ndr_flags & NDR_BUFFERS) {
4993 return NDR_ERR_SUCCESS;
4996 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1006(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1006 *r)
4998 ndr_print_struct(ndr, name, "srvsvc_NetShareInfo1006");
4999 ndr->depth++;
5000 ndr_print_uint32(ndr, "max_users", r->max_users);
5001 ndr->depth--;
5004 static enum ndr_err_code ndr_push_srvsvc_NetShareCtr1006(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1006 *r)
5006 uint32_t cntr_array_1;
5007 if (ndr_flags & NDR_SCALARS) {
5008 NDR_CHECK(ndr_push_align(ndr, 4));
5009 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
5010 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
5012 if (ndr_flags & NDR_BUFFERS) {
5013 if (r->array) {
5014 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
5015 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
5016 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1006(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
5020 return NDR_ERR_SUCCESS;
5023 static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr1006(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1006 *r)
5025 uint32_t _ptr_array;
5026 uint32_t cntr_array_1;
5027 TALLOC_CTX *_mem_save_array_0;
5028 TALLOC_CTX *_mem_save_array_1;
5029 if (ndr_flags & NDR_SCALARS) {
5030 NDR_CHECK(ndr_pull_align(ndr, 4));
5031 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
5032 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
5033 if (_ptr_array) {
5034 NDR_PULL_ALLOC(ndr, r->array);
5035 } else {
5036 r->array = NULL;
5039 if (ndr_flags & NDR_BUFFERS) {
5040 if (r->array) {
5041 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
5042 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
5043 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
5044 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
5045 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
5046 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
5047 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
5048 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1006(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
5050 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
5051 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
5053 if (r->array) {
5054 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
5057 return NDR_ERR_SUCCESS;
5060 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1006(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1006 *r)
5062 uint32_t cntr_array_1;
5063 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr1006");
5064 ndr->depth++;
5065 ndr_print_uint32(ndr, "count", r->count);
5066 ndr_print_ptr(ndr, "array", r->array);
5067 ndr->depth++;
5068 if (r->array) {
5069 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
5070 ndr->depth++;
5071 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
5072 char *idx_1=NULL;
5073 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
5074 ndr_print_srvsvc_NetShareInfo1006(ndr, "array", &r->array[cntr_array_1]);
5075 free(idx_1);
5078 ndr->depth--;
5080 ndr->depth--;
5081 ndr->depth--;
5084 static enum ndr_err_code ndr_push_srvsvc_NetShareInfo1007(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo1007 *r)
5086 if (ndr_flags & NDR_SCALARS) {
5087 NDR_CHECK(ndr_push_align(ndr, 4));
5088 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags));
5089 NDR_CHECK(ndr_push_unique_ptr(ndr, r->alternate_directory_name));
5091 if (ndr_flags & NDR_BUFFERS) {
5092 if (r->alternate_directory_name) {
5093 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->alternate_directory_name, CH_UTF16)));
5094 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5095 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->alternate_directory_name, CH_UTF16)));
5096 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));
5099 return NDR_ERR_SUCCESS;
5102 static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo1007(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo1007 *r)
5104 uint32_t _ptr_alternate_directory_name;
5105 TALLOC_CTX *_mem_save_alternate_directory_name_0;
5106 if (ndr_flags & NDR_SCALARS) {
5107 NDR_CHECK(ndr_pull_align(ndr, 4));
5108 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
5109 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_alternate_directory_name));
5110 if (_ptr_alternate_directory_name) {
5111 NDR_PULL_ALLOC(ndr, r->alternate_directory_name);
5112 } else {
5113 r->alternate_directory_name = NULL;
5116 if (ndr_flags & NDR_BUFFERS) {
5117 if (r->alternate_directory_name) {
5118 _mem_save_alternate_directory_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5119 NDR_PULL_SET_MEM_CTX(ndr, r->alternate_directory_name, 0);
5120 NDR_CHECK(ndr_pull_array_size(ndr, &r->alternate_directory_name));
5121 NDR_CHECK(ndr_pull_array_length(ndr, &r->alternate_directory_name));
5122 if (ndr_get_array_length(ndr, &r->alternate_directory_name) > ndr_get_array_size(ndr, &r->alternate_directory_name)) {
5123 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->alternate_directory_name), ndr_get_array_length(ndr, &r->alternate_directory_name));
5125 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->alternate_directory_name), sizeof(uint16_t)));
5126 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->alternate_directory_name, ndr_get_array_length(ndr, &r->alternate_directory_name), sizeof(uint16_t), CH_UTF16));
5127 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alternate_directory_name_0, 0);
5130 return NDR_ERR_SUCCESS;
5133 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1007(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1007 *r)
5135 ndr_print_struct(ndr, name, "srvsvc_NetShareInfo1007");
5136 ndr->depth++;
5137 ndr_print_uint32(ndr, "flags", r->flags);
5138 ndr_print_ptr(ndr, "alternate_directory_name", r->alternate_directory_name);
5139 ndr->depth++;
5140 if (r->alternate_directory_name) {
5141 ndr_print_string(ndr, "alternate_directory_name", r->alternate_directory_name);
5143 ndr->depth--;
5144 ndr->depth--;
5147 static enum ndr_err_code ndr_push_srvsvc_NetShareCtr1007(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1007 *r)
5149 uint32_t cntr_array_1;
5150 if (ndr_flags & NDR_SCALARS) {
5151 NDR_CHECK(ndr_push_align(ndr, 4));
5152 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
5153 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
5155 if (ndr_flags & NDR_BUFFERS) {
5156 if (r->array) {
5157 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
5158 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
5159 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1007(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
5161 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
5162 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1007(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
5166 return NDR_ERR_SUCCESS;
5169 static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr1007(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1007 *r)
5171 uint32_t _ptr_array;
5172 uint32_t cntr_array_1;
5173 TALLOC_CTX *_mem_save_array_0;
5174 TALLOC_CTX *_mem_save_array_1;
5175 if (ndr_flags & NDR_SCALARS) {
5176 NDR_CHECK(ndr_pull_align(ndr, 4));
5177 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
5178 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
5179 if (_ptr_array) {
5180 NDR_PULL_ALLOC(ndr, r->array);
5181 } else {
5182 r->array = NULL;
5185 if (ndr_flags & NDR_BUFFERS) {
5186 if (r->array) {
5187 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
5188 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
5189 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
5190 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
5191 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
5192 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
5193 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
5194 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1007(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
5196 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
5197 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1007(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
5199 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
5200 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
5202 if (r->array) {
5203 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
5206 return NDR_ERR_SUCCESS;
5209 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1007(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1007 *r)
5211 uint32_t cntr_array_1;
5212 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr1007");
5213 ndr->depth++;
5214 ndr_print_uint32(ndr, "count", r->count);
5215 ndr_print_ptr(ndr, "array", r->array);
5216 ndr->depth++;
5217 if (r->array) {
5218 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
5219 ndr->depth++;
5220 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
5221 char *idx_1=NULL;
5222 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
5223 ndr_print_srvsvc_NetShareInfo1007(ndr, "array", &r->array[cntr_array_1]);
5224 free(idx_1);
5227 ndr->depth--;
5229 ndr->depth--;
5230 ndr->depth--;
5233 static enum ndr_err_code ndr_push_srvsvc_NetShareCtr1501(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1501 *r)
5235 uint32_t cntr_array_1;
5236 if (ndr_flags & NDR_SCALARS) {
5237 NDR_CHECK(ndr_push_align(ndr, 4));
5238 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
5239 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
5241 if (ndr_flags & NDR_BUFFERS) {
5242 if (r->array) {
5243 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
5244 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
5245 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
5247 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
5248 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
5252 return NDR_ERR_SUCCESS;
5255 static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr1501(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1501 *r)
5257 uint32_t _ptr_array;
5258 uint32_t cntr_array_1;
5259 TALLOC_CTX *_mem_save_array_0;
5260 TALLOC_CTX *_mem_save_array_1;
5261 if (ndr_flags & NDR_SCALARS) {
5262 NDR_CHECK(ndr_pull_align(ndr, 4));
5263 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
5264 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
5265 if (_ptr_array) {
5266 NDR_PULL_ALLOC(ndr, r->array);
5267 } else {
5268 r->array = NULL;
5271 if (ndr_flags & NDR_BUFFERS) {
5272 if (r->array) {
5273 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
5274 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
5275 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
5276 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
5277 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
5278 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
5279 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
5280 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
5282 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
5283 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
5285 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
5286 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
5288 if (r->array) {
5289 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
5292 return NDR_ERR_SUCCESS;
5295 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1501(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1501 *r)
5297 uint32_t cntr_array_1;
5298 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr1501");
5299 ndr->depth++;
5300 ndr_print_uint32(ndr, "count", r->count);
5301 ndr_print_ptr(ndr, "array", r->array);
5302 ndr->depth++;
5303 if (r->array) {
5304 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
5305 ndr->depth++;
5306 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
5307 char *idx_1=NULL;
5308 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
5309 ndr_print_sec_desc_buf(ndr, "array", &r->array[cntr_array_1]);
5310 free(idx_1);
5313 ndr->depth--;
5315 ndr->depth--;
5316 ndr->depth--;
5319 static enum ndr_err_code ndr_push_srvsvc_NetShareInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetShareInfo *r)
5321 if (ndr_flags & NDR_SCALARS) {
5322 int level = ndr_push_get_switch_value(ndr, r);
5323 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
5324 switch (level) {
5325 case 0: {
5326 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
5327 break; }
5329 case 1: {
5330 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
5331 break; }
5333 case 2: {
5334 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
5335 break; }
5337 case 501: {
5338 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info501));
5339 break; }
5341 case 502: {
5342 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info502));
5343 break; }
5345 case 1004: {
5346 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1004));
5347 break; }
5349 case 1005: {
5350 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1005));
5351 break; }
5353 case 1006: {
5354 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1006));
5355 break; }
5357 case 1007: {
5358 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1007));
5359 break; }
5361 case 1501: {
5362 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1501));
5363 break; }
5365 default: {
5366 break; }
5370 if (ndr_flags & NDR_BUFFERS) {
5371 int level = ndr_push_get_switch_value(ndr, r);
5372 switch (level) {
5373 case 0:
5374 if (r->info0) {
5375 NDR_CHECK(ndr_push_srvsvc_NetShareInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
5377 break;
5379 case 1:
5380 if (r->info1) {
5381 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
5383 break;
5385 case 2:
5386 if (r->info2) {
5387 NDR_CHECK(ndr_push_srvsvc_NetShareInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
5389 break;
5391 case 501:
5392 if (r->info501) {
5393 NDR_CHECK(ndr_push_srvsvc_NetShareInfo501(ndr, NDR_SCALARS|NDR_BUFFERS, r->info501));
5395 break;
5397 case 502:
5398 if (r->info502) {
5399 NDR_CHECK(ndr_push_srvsvc_NetShareInfo502(ndr, NDR_SCALARS|NDR_BUFFERS, r->info502));
5401 break;
5403 case 1004:
5404 if (r->info1004) {
5405 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1004(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1004));
5407 break;
5409 case 1005:
5410 if (r->info1005) {
5411 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1005(ndr, NDR_SCALARS, r->info1005));
5413 break;
5415 case 1006:
5416 if (r->info1006) {
5417 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1006(ndr, NDR_SCALARS, r->info1006));
5419 break;
5421 case 1007:
5422 if (r->info1007) {
5423 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1007(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1007));
5425 break;
5427 case 1501:
5428 if (r->info1501) {
5429 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1501));
5431 break;
5433 default:
5434 break;
5438 return NDR_ERR_SUCCESS;
5441 static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetShareInfo *r)
5443 int level;
5444 uint32_t _level;
5445 TALLOC_CTX *_mem_save_info0_0;
5446 TALLOC_CTX *_mem_save_info1_0;
5447 TALLOC_CTX *_mem_save_info2_0;
5448 TALLOC_CTX *_mem_save_info501_0;
5449 TALLOC_CTX *_mem_save_info502_0;
5450 TALLOC_CTX *_mem_save_info1004_0;
5451 TALLOC_CTX *_mem_save_info1005_0;
5452 TALLOC_CTX *_mem_save_info1006_0;
5453 TALLOC_CTX *_mem_save_info1007_0;
5454 TALLOC_CTX *_mem_save_info1501_0;
5455 level = ndr_pull_get_switch_value(ndr, r);
5456 if (ndr_flags & NDR_SCALARS) {
5457 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
5458 if (_level != level) {
5459 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
5461 switch (level) {
5462 case 0: {
5463 uint32_t _ptr_info0;
5464 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
5465 if (_ptr_info0) {
5466 NDR_PULL_ALLOC(ndr, r->info0);
5467 } else {
5468 r->info0 = NULL;
5470 break; }
5472 case 1: {
5473 uint32_t _ptr_info1;
5474 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
5475 if (_ptr_info1) {
5476 NDR_PULL_ALLOC(ndr, r->info1);
5477 } else {
5478 r->info1 = NULL;
5480 break; }
5482 case 2: {
5483 uint32_t _ptr_info2;
5484 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
5485 if (_ptr_info2) {
5486 NDR_PULL_ALLOC(ndr, r->info2);
5487 } else {
5488 r->info2 = NULL;
5490 break; }
5492 case 501: {
5493 uint32_t _ptr_info501;
5494 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info501));
5495 if (_ptr_info501) {
5496 NDR_PULL_ALLOC(ndr, r->info501);
5497 } else {
5498 r->info501 = NULL;
5500 break; }
5502 case 502: {
5503 uint32_t _ptr_info502;
5504 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info502));
5505 if (_ptr_info502) {
5506 NDR_PULL_ALLOC(ndr, r->info502);
5507 } else {
5508 r->info502 = NULL;
5510 break; }
5512 case 1004: {
5513 uint32_t _ptr_info1004;
5514 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1004));
5515 if (_ptr_info1004) {
5516 NDR_PULL_ALLOC(ndr, r->info1004);
5517 } else {
5518 r->info1004 = NULL;
5520 break; }
5522 case 1005: {
5523 uint32_t _ptr_info1005;
5524 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1005));
5525 if (_ptr_info1005) {
5526 NDR_PULL_ALLOC(ndr, r->info1005);
5527 } else {
5528 r->info1005 = NULL;
5530 break; }
5532 case 1006: {
5533 uint32_t _ptr_info1006;
5534 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1006));
5535 if (_ptr_info1006) {
5536 NDR_PULL_ALLOC(ndr, r->info1006);
5537 } else {
5538 r->info1006 = NULL;
5540 break; }
5542 case 1007: {
5543 uint32_t _ptr_info1007;
5544 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1007));
5545 if (_ptr_info1007) {
5546 NDR_PULL_ALLOC(ndr, r->info1007);
5547 } else {
5548 r->info1007 = NULL;
5550 break; }
5552 case 1501: {
5553 uint32_t _ptr_info1501;
5554 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1501));
5555 if (_ptr_info1501) {
5556 NDR_PULL_ALLOC(ndr, r->info1501);
5557 } else {
5558 r->info1501 = NULL;
5560 break; }
5562 default: {
5563 break; }
5567 if (ndr_flags & NDR_BUFFERS) {
5568 switch (level) {
5569 case 0:
5570 if (r->info0) {
5571 _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
5572 NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
5573 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
5574 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
5576 break;
5578 case 1:
5579 if (r->info1) {
5580 _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
5581 NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
5582 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
5583 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
5585 break;
5587 case 2:
5588 if (r->info2) {
5589 _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
5590 NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
5591 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
5592 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
5594 break;
5596 case 501:
5597 if (r->info501) {
5598 _mem_save_info501_0 = NDR_PULL_GET_MEM_CTX(ndr);
5599 NDR_PULL_SET_MEM_CTX(ndr, r->info501, 0);
5600 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo501(ndr, NDR_SCALARS|NDR_BUFFERS, r->info501));
5601 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info501_0, 0);
5603 break;
5605 case 502:
5606 if (r->info502) {
5607 _mem_save_info502_0 = NDR_PULL_GET_MEM_CTX(ndr);
5608 NDR_PULL_SET_MEM_CTX(ndr, r->info502, 0);
5609 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo502(ndr, NDR_SCALARS|NDR_BUFFERS, r->info502));
5610 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info502_0, 0);
5612 break;
5614 case 1004:
5615 if (r->info1004) {
5616 _mem_save_info1004_0 = NDR_PULL_GET_MEM_CTX(ndr);
5617 NDR_PULL_SET_MEM_CTX(ndr, r->info1004, 0);
5618 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1004(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1004));
5619 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1004_0, 0);
5621 break;
5623 case 1005:
5624 if (r->info1005) {
5625 _mem_save_info1005_0 = NDR_PULL_GET_MEM_CTX(ndr);
5626 NDR_PULL_SET_MEM_CTX(ndr, r->info1005, 0);
5627 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1005(ndr, NDR_SCALARS, r->info1005));
5628 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1005_0, 0);
5630 break;
5632 case 1006:
5633 if (r->info1006) {
5634 _mem_save_info1006_0 = NDR_PULL_GET_MEM_CTX(ndr);
5635 NDR_PULL_SET_MEM_CTX(ndr, r->info1006, 0);
5636 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1006(ndr, NDR_SCALARS, r->info1006));
5637 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1006_0, 0);
5639 break;
5641 case 1007:
5642 if (r->info1007) {
5643 _mem_save_info1007_0 = NDR_PULL_GET_MEM_CTX(ndr);
5644 NDR_PULL_SET_MEM_CTX(ndr, r->info1007, 0);
5645 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1007(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1007));
5646 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1007_0, 0);
5648 break;
5650 case 1501:
5651 if (r->info1501) {
5652 _mem_save_info1501_0 = NDR_PULL_GET_MEM_CTX(ndr);
5653 NDR_PULL_SET_MEM_CTX(ndr, r->info1501, 0);
5654 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1501));
5655 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1501_0, 0);
5657 break;
5659 default:
5660 break;
5664 return NDR_ERR_SUCCESS;
5667 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetShareInfo *r)
5669 int level;
5670 level = ndr_print_get_switch_value(ndr, r);
5671 ndr_print_union(ndr, name, level, "srvsvc_NetShareInfo");
5672 switch (level) {
5673 case 0:
5674 ndr_print_ptr(ndr, "info0", r->info0);
5675 ndr->depth++;
5676 if (r->info0) {
5677 ndr_print_srvsvc_NetShareInfo0(ndr, "info0", r->info0);
5679 ndr->depth--;
5680 break;
5682 case 1:
5683 ndr_print_ptr(ndr, "info1", r->info1);
5684 ndr->depth++;
5685 if (r->info1) {
5686 ndr_print_srvsvc_NetShareInfo1(ndr, "info1", r->info1);
5688 ndr->depth--;
5689 break;
5691 case 2:
5692 ndr_print_ptr(ndr, "info2", r->info2);
5693 ndr->depth++;
5694 if (r->info2) {
5695 ndr_print_srvsvc_NetShareInfo2(ndr, "info2", r->info2);
5697 ndr->depth--;
5698 break;
5700 case 501:
5701 ndr_print_ptr(ndr, "info501", r->info501);
5702 ndr->depth++;
5703 if (r->info501) {
5704 ndr_print_srvsvc_NetShareInfo501(ndr, "info501", r->info501);
5706 ndr->depth--;
5707 break;
5709 case 502:
5710 ndr_print_ptr(ndr, "info502", r->info502);
5711 ndr->depth++;
5712 if (r->info502) {
5713 ndr_print_srvsvc_NetShareInfo502(ndr, "info502", r->info502);
5715 ndr->depth--;
5716 break;
5718 case 1004:
5719 ndr_print_ptr(ndr, "info1004", r->info1004);
5720 ndr->depth++;
5721 if (r->info1004) {
5722 ndr_print_srvsvc_NetShareInfo1004(ndr, "info1004", r->info1004);
5724 ndr->depth--;
5725 break;
5727 case 1005:
5728 ndr_print_ptr(ndr, "info1005", r->info1005);
5729 ndr->depth++;
5730 if (r->info1005) {
5731 ndr_print_srvsvc_NetShareInfo1005(ndr, "info1005", r->info1005);
5733 ndr->depth--;
5734 break;
5736 case 1006:
5737 ndr_print_ptr(ndr, "info1006", r->info1006);
5738 ndr->depth++;
5739 if (r->info1006) {
5740 ndr_print_srvsvc_NetShareInfo1006(ndr, "info1006", r->info1006);
5742 ndr->depth--;
5743 break;
5745 case 1007:
5746 ndr_print_ptr(ndr, "info1007", r->info1007);
5747 ndr->depth++;
5748 if (r->info1007) {
5749 ndr_print_srvsvc_NetShareInfo1007(ndr, "info1007", r->info1007);
5751 ndr->depth--;
5752 break;
5754 case 1501:
5755 ndr_print_ptr(ndr, "info1501", r->info1501);
5756 ndr->depth++;
5757 if (r->info1501) {
5758 ndr_print_sec_desc_buf(ndr, "info1501", r->info1501);
5760 ndr->depth--;
5761 break;
5763 default:
5764 break;
5769 static enum ndr_err_code ndr_push_srvsvc_NetShareCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetShareCtr *r)
5771 if (ndr_flags & NDR_SCALARS) {
5772 int level = ndr_push_get_switch_value(ndr, r);
5773 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
5774 switch (level) {
5775 case 0: {
5776 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0));
5777 break; }
5779 case 1: {
5780 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
5781 break; }
5783 case 2: {
5784 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr2));
5785 break; }
5787 case 501: {
5788 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr501));
5789 break; }
5791 case 502: {
5792 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr502));
5793 break; }
5795 case 1004: {
5796 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1004));
5797 break; }
5799 case 1005: {
5800 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1005));
5801 break; }
5803 case 1006: {
5804 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1006));
5805 break; }
5807 case 1007: {
5808 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1007));
5809 break; }
5811 case 1501: {
5812 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1501));
5813 break; }
5815 default: {
5816 break; }
5820 if (ndr_flags & NDR_BUFFERS) {
5821 int level = ndr_push_get_switch_value(ndr, r);
5822 switch (level) {
5823 case 0:
5824 if (r->ctr0) {
5825 NDR_CHECK(ndr_push_srvsvc_NetShareCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
5827 break;
5829 case 1:
5830 if (r->ctr1) {
5831 NDR_CHECK(ndr_push_srvsvc_NetShareCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
5833 break;
5835 case 2:
5836 if (r->ctr2) {
5837 NDR_CHECK(ndr_push_srvsvc_NetShareCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
5839 break;
5841 case 501:
5842 if (r->ctr501) {
5843 NDR_CHECK(ndr_push_srvsvc_NetShareCtr501(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr501));
5845 break;
5847 case 502:
5848 if (r->ctr502) {
5849 NDR_CHECK(ndr_push_srvsvc_NetShareCtr502(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr502));
5851 break;
5853 case 1004:
5854 if (r->ctr1004) {
5855 NDR_CHECK(ndr_push_srvsvc_NetShareCtr1004(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1004));
5857 break;
5859 case 1005:
5860 if (r->ctr1005) {
5861 NDR_CHECK(ndr_push_srvsvc_NetShareCtr1005(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1005));
5863 break;
5865 case 1006:
5866 if (r->ctr1006) {
5867 NDR_CHECK(ndr_push_srvsvc_NetShareCtr1006(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1006));
5869 break;
5871 case 1007:
5872 if (r->ctr1007) {
5873 NDR_CHECK(ndr_push_srvsvc_NetShareCtr1007(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1007));
5875 break;
5877 case 1501:
5878 if (r->ctr1501) {
5879 NDR_CHECK(ndr_push_srvsvc_NetShareCtr1501(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1501));
5881 break;
5883 default:
5884 break;
5888 return NDR_ERR_SUCCESS;
5891 static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetShareCtr *r)
5893 int level;
5894 uint32_t _level;
5895 TALLOC_CTX *_mem_save_ctr0_0;
5896 TALLOC_CTX *_mem_save_ctr1_0;
5897 TALLOC_CTX *_mem_save_ctr2_0;
5898 TALLOC_CTX *_mem_save_ctr501_0;
5899 TALLOC_CTX *_mem_save_ctr502_0;
5900 TALLOC_CTX *_mem_save_ctr1004_0;
5901 TALLOC_CTX *_mem_save_ctr1005_0;
5902 TALLOC_CTX *_mem_save_ctr1006_0;
5903 TALLOC_CTX *_mem_save_ctr1007_0;
5904 TALLOC_CTX *_mem_save_ctr1501_0;
5905 level = ndr_pull_get_switch_value(ndr, r);
5906 if (ndr_flags & NDR_SCALARS) {
5907 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
5908 if (_level != level) {
5909 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
5911 switch (level) {
5912 case 0: {
5913 uint32_t _ptr_ctr0;
5914 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr0));
5915 if (_ptr_ctr0) {
5916 NDR_PULL_ALLOC(ndr, r->ctr0);
5917 } else {
5918 r->ctr0 = NULL;
5920 break; }
5922 case 1: {
5923 uint32_t _ptr_ctr1;
5924 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
5925 if (_ptr_ctr1) {
5926 NDR_PULL_ALLOC(ndr, r->ctr1);
5927 } else {
5928 r->ctr1 = NULL;
5930 break; }
5932 case 2: {
5933 uint32_t _ptr_ctr2;
5934 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr2));
5935 if (_ptr_ctr2) {
5936 NDR_PULL_ALLOC(ndr, r->ctr2);
5937 } else {
5938 r->ctr2 = NULL;
5940 break; }
5942 case 501: {
5943 uint32_t _ptr_ctr501;
5944 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr501));
5945 if (_ptr_ctr501) {
5946 NDR_PULL_ALLOC(ndr, r->ctr501);
5947 } else {
5948 r->ctr501 = NULL;
5950 break; }
5952 case 502: {
5953 uint32_t _ptr_ctr502;
5954 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr502));
5955 if (_ptr_ctr502) {
5956 NDR_PULL_ALLOC(ndr, r->ctr502);
5957 } else {
5958 r->ctr502 = NULL;
5960 break; }
5962 case 1004: {
5963 uint32_t _ptr_ctr1004;
5964 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1004));
5965 if (_ptr_ctr1004) {
5966 NDR_PULL_ALLOC(ndr, r->ctr1004);
5967 } else {
5968 r->ctr1004 = NULL;
5970 break; }
5972 case 1005: {
5973 uint32_t _ptr_ctr1005;
5974 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1005));
5975 if (_ptr_ctr1005) {
5976 NDR_PULL_ALLOC(ndr, r->ctr1005);
5977 } else {
5978 r->ctr1005 = NULL;
5980 break; }
5982 case 1006: {
5983 uint32_t _ptr_ctr1006;
5984 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1006));
5985 if (_ptr_ctr1006) {
5986 NDR_PULL_ALLOC(ndr, r->ctr1006);
5987 } else {
5988 r->ctr1006 = NULL;
5990 break; }
5992 case 1007: {
5993 uint32_t _ptr_ctr1007;
5994 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1007));
5995 if (_ptr_ctr1007) {
5996 NDR_PULL_ALLOC(ndr, r->ctr1007);
5997 } else {
5998 r->ctr1007 = NULL;
6000 break; }
6002 case 1501: {
6003 uint32_t _ptr_ctr1501;
6004 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1501));
6005 if (_ptr_ctr1501) {
6006 NDR_PULL_ALLOC(ndr, r->ctr1501);
6007 } else {
6008 r->ctr1501 = NULL;
6010 break; }
6012 default: {
6013 break; }
6017 if (ndr_flags & NDR_BUFFERS) {
6018 switch (level) {
6019 case 0:
6020 if (r->ctr0) {
6021 _mem_save_ctr0_0 = NDR_PULL_GET_MEM_CTX(ndr);
6022 NDR_PULL_SET_MEM_CTX(ndr, r->ctr0, 0);
6023 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
6024 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr0_0, 0);
6026 break;
6028 case 1:
6029 if (r->ctr1) {
6030 _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
6031 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
6032 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
6033 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
6035 break;
6037 case 2:
6038 if (r->ctr2) {
6039 _mem_save_ctr2_0 = NDR_PULL_GET_MEM_CTX(ndr);
6040 NDR_PULL_SET_MEM_CTX(ndr, r->ctr2, 0);
6041 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
6042 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr2_0, 0);
6044 break;
6046 case 501:
6047 if (r->ctr501) {
6048 _mem_save_ctr501_0 = NDR_PULL_GET_MEM_CTX(ndr);
6049 NDR_PULL_SET_MEM_CTX(ndr, r->ctr501, 0);
6050 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr501(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr501));
6051 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr501_0, 0);
6053 break;
6055 case 502:
6056 if (r->ctr502) {
6057 _mem_save_ctr502_0 = NDR_PULL_GET_MEM_CTX(ndr);
6058 NDR_PULL_SET_MEM_CTX(ndr, r->ctr502, 0);
6059 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr502(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr502));
6060 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr502_0, 0);
6062 break;
6064 case 1004:
6065 if (r->ctr1004) {
6066 _mem_save_ctr1004_0 = NDR_PULL_GET_MEM_CTX(ndr);
6067 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1004, 0);
6068 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr1004(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1004));
6069 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1004_0, 0);
6071 break;
6073 case 1005:
6074 if (r->ctr1005) {
6075 _mem_save_ctr1005_0 = NDR_PULL_GET_MEM_CTX(ndr);
6076 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1005, 0);
6077 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr1005(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1005));
6078 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1005_0, 0);
6080 break;
6082 case 1006:
6083 if (r->ctr1006) {
6084 _mem_save_ctr1006_0 = NDR_PULL_GET_MEM_CTX(ndr);
6085 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1006, 0);
6086 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr1006(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1006));
6087 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1006_0, 0);
6089 break;
6091 case 1007:
6092 if (r->ctr1007) {
6093 _mem_save_ctr1007_0 = NDR_PULL_GET_MEM_CTX(ndr);
6094 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1007, 0);
6095 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr1007(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1007));
6096 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1007_0, 0);
6098 break;
6100 case 1501:
6101 if (r->ctr1501) {
6102 _mem_save_ctr1501_0 = NDR_PULL_GET_MEM_CTX(ndr);
6103 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1501, 0);
6104 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr1501(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1501));
6105 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1501_0, 0);
6107 break;
6109 default:
6110 break;
6114 return NDR_ERR_SUCCESS;
6117 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetShareCtr *r)
6119 int level;
6120 level = ndr_print_get_switch_value(ndr, r);
6121 ndr_print_union(ndr, name, level, "srvsvc_NetShareCtr");
6122 switch (level) {
6123 case 0:
6124 ndr_print_ptr(ndr, "ctr0", r->ctr0);
6125 ndr->depth++;
6126 if (r->ctr0) {
6127 ndr_print_srvsvc_NetShareCtr0(ndr, "ctr0", r->ctr0);
6129 ndr->depth--;
6130 break;
6132 case 1:
6133 ndr_print_ptr(ndr, "ctr1", r->ctr1);
6134 ndr->depth++;
6135 if (r->ctr1) {
6136 ndr_print_srvsvc_NetShareCtr1(ndr, "ctr1", r->ctr1);
6138 ndr->depth--;
6139 break;
6141 case 2:
6142 ndr_print_ptr(ndr, "ctr2", r->ctr2);
6143 ndr->depth++;
6144 if (r->ctr2) {
6145 ndr_print_srvsvc_NetShareCtr2(ndr, "ctr2", r->ctr2);
6147 ndr->depth--;
6148 break;
6150 case 501:
6151 ndr_print_ptr(ndr, "ctr501", r->ctr501);
6152 ndr->depth++;
6153 if (r->ctr501) {
6154 ndr_print_srvsvc_NetShareCtr501(ndr, "ctr501", r->ctr501);
6156 ndr->depth--;
6157 break;
6159 case 502:
6160 ndr_print_ptr(ndr, "ctr502", r->ctr502);
6161 ndr->depth++;
6162 if (r->ctr502) {
6163 ndr_print_srvsvc_NetShareCtr502(ndr, "ctr502", r->ctr502);
6165 ndr->depth--;
6166 break;
6168 case 1004:
6169 ndr_print_ptr(ndr, "ctr1004", r->ctr1004);
6170 ndr->depth++;
6171 if (r->ctr1004) {
6172 ndr_print_srvsvc_NetShareCtr1004(ndr, "ctr1004", r->ctr1004);
6174 ndr->depth--;
6175 break;
6177 case 1005:
6178 ndr_print_ptr(ndr, "ctr1005", r->ctr1005);
6179 ndr->depth++;
6180 if (r->ctr1005) {
6181 ndr_print_srvsvc_NetShareCtr1005(ndr, "ctr1005", r->ctr1005);
6183 ndr->depth--;
6184 break;
6186 case 1006:
6187 ndr_print_ptr(ndr, "ctr1006", r->ctr1006);
6188 ndr->depth++;
6189 if (r->ctr1006) {
6190 ndr_print_srvsvc_NetShareCtr1006(ndr, "ctr1006", r->ctr1006);
6192 ndr->depth--;
6193 break;
6195 case 1007:
6196 ndr_print_ptr(ndr, "ctr1007", r->ctr1007);
6197 ndr->depth++;
6198 if (r->ctr1007) {
6199 ndr_print_srvsvc_NetShareCtr1007(ndr, "ctr1007", r->ctr1007);
6201 ndr->depth--;
6202 break;
6204 case 1501:
6205 ndr_print_ptr(ndr, "ctr1501", r->ctr1501);
6206 ndr->depth++;
6207 if (r->ctr1501) {
6208 ndr_print_srvsvc_NetShareCtr1501(ndr, "ctr1501", r->ctr1501);
6210 ndr->depth--;
6211 break;
6213 default:
6214 break;
6219 static enum ndr_err_code ndr_push_srvsvc_NetShareInfoCtr(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfoCtr *r)
6221 if (ndr_flags & NDR_SCALARS) {
6222 NDR_CHECK(ndr_push_align(ndr, 4));
6223 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
6224 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level));
6225 NDR_CHECK(ndr_push_srvsvc_NetShareCtr(ndr, NDR_SCALARS, &r->ctr));
6227 if (ndr_flags & NDR_BUFFERS) {
6228 NDR_CHECK(ndr_push_srvsvc_NetShareCtr(ndr, NDR_BUFFERS, &r->ctr));
6230 return NDR_ERR_SUCCESS;
6233 static enum ndr_err_code ndr_pull_srvsvc_NetShareInfoCtr(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfoCtr *r)
6235 if (ndr_flags & NDR_SCALARS) {
6236 NDR_CHECK(ndr_pull_align(ndr, 4));
6237 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
6238 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level));
6239 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr(ndr, NDR_SCALARS, &r->ctr));
6241 if (ndr_flags & NDR_BUFFERS) {
6242 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr(ndr, NDR_BUFFERS, &r->ctr));
6244 return NDR_ERR_SUCCESS;
6247 _PUBLIC_ void ndr_print_srvsvc_NetShareInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfoCtr *r)
6249 ndr_print_struct(ndr, name, "srvsvc_NetShareInfoCtr");
6250 ndr->depth++;
6251 ndr_print_uint32(ndr, "level", r->level);
6252 ndr_print_set_switch_value(ndr, &r->ctr, r->level);
6253 ndr_print_srvsvc_NetShareCtr(ndr, "ctr", &r->ctr);
6254 ndr->depth--;
6257 _PUBLIC_ enum ndr_err_code ndr_push_srvsvc_PlatformId(struct ndr_push *ndr, int ndr_flags, enum srvsvc_PlatformId r)
6259 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
6260 return NDR_ERR_SUCCESS;
6263 _PUBLIC_ enum ndr_err_code ndr_pull_srvsvc_PlatformId(struct ndr_pull *ndr, int ndr_flags, enum srvsvc_PlatformId *r)
6265 uint32_t v;
6266 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
6267 *r = v;
6268 return NDR_ERR_SUCCESS;
6271 _PUBLIC_ void ndr_print_srvsvc_PlatformId(struct ndr_print *ndr, const char *name, enum srvsvc_PlatformId r)
6273 const char *val = NULL;
6275 switch (r) {
6276 case PLATFORM_ID_DOS: val = "PLATFORM_ID_DOS"; break;
6277 case PLATFORM_ID_OS2: val = "PLATFORM_ID_OS2"; break;
6278 case PLATFORM_ID_NT: val = "PLATFORM_ID_NT"; break;
6279 case PLATFORM_ID_OSF: val = "PLATFORM_ID_OSF"; break;
6280 case PLATFORM_ID_VMS: val = "PLATFORM_ID_VMS"; break;
6282 ndr_print_enum(ndr, name, "ENUM", val, r);
6285 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo100(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo100 *r)
6287 if (ndr_flags & NDR_SCALARS) {
6288 NDR_CHECK(ndr_push_align(ndr, 4));
6289 NDR_CHECK(ndr_push_srvsvc_PlatformId(ndr, NDR_SCALARS, r->platform_id));
6290 NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_name));
6292 if (ndr_flags & NDR_BUFFERS) {
6293 if (r->server_name) {
6294 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
6295 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6296 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
6297 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server_name, ndr_charset_length(r->server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6300 return NDR_ERR_SUCCESS;
6303 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo100(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo100 *r)
6305 uint32_t _ptr_server_name;
6306 TALLOC_CTX *_mem_save_server_name_0;
6307 if (ndr_flags & NDR_SCALARS) {
6308 NDR_CHECK(ndr_pull_align(ndr, 4));
6309 NDR_CHECK(ndr_pull_srvsvc_PlatformId(ndr, NDR_SCALARS, &r->platform_id));
6310 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
6311 if (_ptr_server_name) {
6312 NDR_PULL_ALLOC(ndr, r->server_name);
6313 } else {
6314 r->server_name = NULL;
6317 if (ndr_flags & NDR_BUFFERS) {
6318 if (r->server_name) {
6319 _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6320 NDR_PULL_SET_MEM_CTX(ndr, r->server_name, 0);
6321 NDR_CHECK(ndr_pull_array_size(ndr, &r->server_name));
6322 NDR_CHECK(ndr_pull_array_length(ndr, &r->server_name));
6323 if (ndr_get_array_length(ndr, &r->server_name) > ndr_get_array_size(ndr, &r->server_name)) {
6324 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->server_name), ndr_get_array_length(ndr, &r->server_name));
6326 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->server_name), sizeof(uint16_t)));
6327 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server_name, ndr_get_array_length(ndr, &r->server_name), sizeof(uint16_t), CH_UTF16));
6328 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
6331 return NDR_ERR_SUCCESS;
6334 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo100(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo100 *r)
6336 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo100");
6337 ndr->depth++;
6338 ndr_print_srvsvc_PlatformId(ndr, "platform_id", r->platform_id);
6339 ndr_print_ptr(ndr, "server_name", r->server_name);
6340 ndr->depth++;
6341 if (r->server_name) {
6342 ndr_print_string(ndr, "server_name", r->server_name);
6344 ndr->depth--;
6345 ndr->depth--;
6348 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo101(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo101 *r)
6350 if (ndr_flags & NDR_SCALARS) {
6351 NDR_CHECK(ndr_push_align(ndr, 4));
6352 NDR_CHECK(ndr_push_srvsvc_PlatformId(ndr, NDR_SCALARS, r->platform_id));
6353 NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_name));
6354 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version_major));
6355 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version_minor));
6356 NDR_CHECK(ndr_push_svcctl_ServerType(ndr, NDR_SCALARS, r->server_type));
6357 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
6359 if (ndr_flags & NDR_BUFFERS) {
6360 if (r->server_name) {
6361 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
6362 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6363 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
6364 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server_name, ndr_charset_length(r->server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6366 if (r->comment) {
6367 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
6368 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6369 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
6370 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6373 return NDR_ERR_SUCCESS;
6376 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo101(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo101 *r)
6378 uint32_t _ptr_server_name;
6379 TALLOC_CTX *_mem_save_server_name_0;
6380 uint32_t _ptr_comment;
6381 TALLOC_CTX *_mem_save_comment_0;
6382 if (ndr_flags & NDR_SCALARS) {
6383 NDR_CHECK(ndr_pull_align(ndr, 4));
6384 NDR_CHECK(ndr_pull_srvsvc_PlatformId(ndr, NDR_SCALARS, &r->platform_id));
6385 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
6386 if (_ptr_server_name) {
6387 NDR_PULL_ALLOC(ndr, r->server_name);
6388 } else {
6389 r->server_name = NULL;
6391 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version_major));
6392 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version_minor));
6393 NDR_CHECK(ndr_pull_svcctl_ServerType(ndr, NDR_SCALARS, &r->server_type));
6394 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
6395 if (_ptr_comment) {
6396 NDR_PULL_ALLOC(ndr, r->comment);
6397 } else {
6398 r->comment = NULL;
6401 if (ndr_flags & NDR_BUFFERS) {
6402 if (r->server_name) {
6403 _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6404 NDR_PULL_SET_MEM_CTX(ndr, r->server_name, 0);
6405 NDR_CHECK(ndr_pull_array_size(ndr, &r->server_name));
6406 NDR_CHECK(ndr_pull_array_length(ndr, &r->server_name));
6407 if (ndr_get_array_length(ndr, &r->server_name) > ndr_get_array_size(ndr, &r->server_name)) {
6408 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->server_name), ndr_get_array_length(ndr, &r->server_name));
6410 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->server_name), sizeof(uint16_t)));
6411 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server_name, ndr_get_array_length(ndr, &r->server_name), sizeof(uint16_t), CH_UTF16));
6412 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
6414 if (r->comment) {
6415 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
6416 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
6417 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
6418 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
6419 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
6420 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
6422 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
6423 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
6424 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
6427 return NDR_ERR_SUCCESS;
6430 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo101(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo101 *r)
6432 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo101");
6433 ndr->depth++;
6434 ndr_print_srvsvc_PlatformId(ndr, "platform_id", r->platform_id);
6435 ndr_print_ptr(ndr, "server_name", r->server_name);
6436 ndr->depth++;
6437 if (r->server_name) {
6438 ndr_print_string(ndr, "server_name", r->server_name);
6440 ndr->depth--;
6441 ndr_print_uint32(ndr, "version_major", r->version_major);
6442 ndr_print_uint32(ndr, "version_minor", r->version_minor);
6443 ndr_print_svcctl_ServerType(ndr, "server_type", r->server_type);
6444 ndr_print_ptr(ndr, "comment", r->comment);
6445 ndr->depth++;
6446 if (r->comment) {
6447 ndr_print_string(ndr, "comment", r->comment);
6449 ndr->depth--;
6450 ndr->depth--;
6453 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo102(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo102 *r)
6455 if (ndr_flags & NDR_SCALARS) {
6456 NDR_CHECK(ndr_push_align(ndr, 4));
6457 NDR_CHECK(ndr_push_srvsvc_PlatformId(ndr, NDR_SCALARS, r->platform_id));
6458 NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_name));
6459 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version_major));
6460 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version_minor));
6461 NDR_CHECK(ndr_push_svcctl_ServerType(ndr, NDR_SCALARS, r->server_type));
6462 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
6463 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->users));
6464 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->disc));
6465 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->hidden));
6466 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->announce));
6467 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->anndelta));
6468 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->licenses));
6469 NDR_CHECK(ndr_push_unique_ptr(ndr, r->userpath));
6471 if (ndr_flags & NDR_BUFFERS) {
6472 if (r->server_name) {
6473 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
6474 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6475 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
6476 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server_name, ndr_charset_length(r->server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6478 if (r->comment) {
6479 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
6480 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6481 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
6482 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6484 if (r->userpath) {
6485 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->userpath, CH_UTF16)));
6486 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6487 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->userpath, CH_UTF16)));
6488 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->userpath, ndr_charset_length(r->userpath, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6491 return NDR_ERR_SUCCESS;
6494 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo102(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo102 *r)
6496 uint32_t _ptr_server_name;
6497 TALLOC_CTX *_mem_save_server_name_0;
6498 uint32_t _ptr_comment;
6499 TALLOC_CTX *_mem_save_comment_0;
6500 uint32_t _ptr_userpath;
6501 TALLOC_CTX *_mem_save_userpath_0;
6502 if (ndr_flags & NDR_SCALARS) {
6503 NDR_CHECK(ndr_pull_align(ndr, 4));
6504 NDR_CHECK(ndr_pull_srvsvc_PlatformId(ndr, NDR_SCALARS, &r->platform_id));
6505 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
6506 if (_ptr_server_name) {
6507 NDR_PULL_ALLOC(ndr, r->server_name);
6508 } else {
6509 r->server_name = NULL;
6511 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version_major));
6512 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version_minor));
6513 NDR_CHECK(ndr_pull_svcctl_ServerType(ndr, NDR_SCALARS, &r->server_type));
6514 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
6515 if (_ptr_comment) {
6516 NDR_PULL_ALLOC(ndr, r->comment);
6517 } else {
6518 r->comment = NULL;
6520 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->users));
6521 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->disc));
6522 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->hidden));
6523 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->announce));
6524 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->anndelta));
6525 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->licenses));
6526 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_userpath));
6527 if (_ptr_userpath) {
6528 NDR_PULL_ALLOC(ndr, r->userpath);
6529 } else {
6530 r->userpath = NULL;
6533 if (ndr_flags & NDR_BUFFERS) {
6534 if (r->server_name) {
6535 _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6536 NDR_PULL_SET_MEM_CTX(ndr, r->server_name, 0);
6537 NDR_CHECK(ndr_pull_array_size(ndr, &r->server_name));
6538 NDR_CHECK(ndr_pull_array_length(ndr, &r->server_name));
6539 if (ndr_get_array_length(ndr, &r->server_name) > ndr_get_array_size(ndr, &r->server_name)) {
6540 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->server_name), ndr_get_array_length(ndr, &r->server_name));
6542 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->server_name), sizeof(uint16_t)));
6543 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server_name, ndr_get_array_length(ndr, &r->server_name), sizeof(uint16_t), CH_UTF16));
6544 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
6546 if (r->comment) {
6547 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
6548 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
6549 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
6550 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
6551 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
6552 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
6554 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
6555 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
6556 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
6558 if (r->userpath) {
6559 _mem_save_userpath_0 = NDR_PULL_GET_MEM_CTX(ndr);
6560 NDR_PULL_SET_MEM_CTX(ndr, r->userpath, 0);
6561 NDR_CHECK(ndr_pull_array_size(ndr, &r->userpath));
6562 NDR_CHECK(ndr_pull_array_length(ndr, &r->userpath));
6563 if (ndr_get_array_length(ndr, &r->userpath) > ndr_get_array_size(ndr, &r->userpath)) {
6564 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->userpath), ndr_get_array_length(ndr, &r->userpath));
6566 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->userpath), sizeof(uint16_t)));
6567 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->userpath, ndr_get_array_length(ndr, &r->userpath), sizeof(uint16_t), CH_UTF16));
6568 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_userpath_0, 0);
6571 return NDR_ERR_SUCCESS;
6574 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo102(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo102 *r)
6576 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo102");
6577 ndr->depth++;
6578 ndr_print_srvsvc_PlatformId(ndr, "platform_id", r->platform_id);
6579 ndr_print_ptr(ndr, "server_name", r->server_name);
6580 ndr->depth++;
6581 if (r->server_name) {
6582 ndr_print_string(ndr, "server_name", r->server_name);
6584 ndr->depth--;
6585 ndr_print_uint32(ndr, "version_major", r->version_major);
6586 ndr_print_uint32(ndr, "version_minor", r->version_minor);
6587 ndr_print_svcctl_ServerType(ndr, "server_type", r->server_type);
6588 ndr_print_ptr(ndr, "comment", r->comment);
6589 ndr->depth++;
6590 if (r->comment) {
6591 ndr_print_string(ndr, "comment", r->comment);
6593 ndr->depth--;
6594 ndr_print_uint32(ndr, "users", r->users);
6595 ndr_print_uint32(ndr, "disc", r->disc);
6596 ndr_print_uint32(ndr, "hidden", r->hidden);
6597 ndr_print_uint32(ndr, "announce", r->announce);
6598 ndr_print_uint32(ndr, "anndelta", r->anndelta);
6599 ndr_print_uint32(ndr, "licenses", r->licenses);
6600 ndr_print_ptr(ndr, "userpath", r->userpath);
6601 ndr->depth++;
6602 if (r->userpath) {
6603 ndr_print_string(ndr, "userpath", r->userpath);
6605 ndr->depth--;
6606 ndr->depth--;
6609 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo402(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo402 *r)
6611 if (ndr_flags & NDR_SCALARS) {
6612 NDR_CHECK(ndr_push_align(ndr, 4));
6613 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ulist_mtime));
6614 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->glist_mtime));
6615 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->alist_mtime));
6616 NDR_CHECK(ndr_push_unique_ptr(ndr, r->alerts));
6617 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->security));
6618 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numadmin));
6619 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lanmask));
6620 NDR_CHECK(ndr_push_unique_ptr(ndr, r->guestaccount));
6621 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->chdevs));
6622 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->chdevqs));
6623 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->chdevjobs));
6624 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->connections));
6625 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->shares));
6626 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->openfiles));
6627 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessopen));
6628 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sesssvc));
6629 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessreqs));
6630 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->opensearch));
6631 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->activelocks));
6632 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sizereqbufs));
6633 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numbigbufs));
6634 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numfiletasks));
6635 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->alertsched));
6636 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->erroralert));
6637 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->logonalert));
6638 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->accessalert));
6639 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->diskalert));
6640 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->netioalert));
6641 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxaudits));
6642 NDR_CHECK(ndr_push_unique_ptr(ndr, r->srvheuristics));
6644 if (ndr_flags & NDR_BUFFERS) {
6645 if (r->alerts) {
6646 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->alerts, CH_UTF16)));
6647 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6648 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->alerts, CH_UTF16)));
6649 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->alerts, ndr_charset_length(r->alerts, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6651 if (r->guestaccount) {
6652 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->guestaccount, CH_UTF16)));
6653 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6654 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->guestaccount, CH_UTF16)));
6655 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->guestaccount, ndr_charset_length(r->guestaccount, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6657 if (r->srvheuristics) {
6658 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->srvheuristics, CH_UTF16)));
6659 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6660 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->srvheuristics, CH_UTF16)));
6661 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->srvheuristics, ndr_charset_length(r->srvheuristics, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6664 return NDR_ERR_SUCCESS;
6667 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo402(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo402 *r)
6669 uint32_t _ptr_alerts;
6670 TALLOC_CTX *_mem_save_alerts_0;
6671 uint32_t _ptr_guestaccount;
6672 TALLOC_CTX *_mem_save_guestaccount_0;
6673 uint32_t _ptr_srvheuristics;
6674 TALLOC_CTX *_mem_save_srvheuristics_0;
6675 if (ndr_flags & NDR_SCALARS) {
6676 NDR_CHECK(ndr_pull_align(ndr, 4));
6677 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ulist_mtime));
6678 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->glist_mtime));
6679 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->alist_mtime));
6680 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_alerts));
6681 if (_ptr_alerts) {
6682 NDR_PULL_ALLOC(ndr, r->alerts);
6683 } else {
6684 r->alerts = NULL;
6686 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->security));
6687 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numadmin));
6688 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lanmask));
6689 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_guestaccount));
6690 if (_ptr_guestaccount) {
6691 NDR_PULL_ALLOC(ndr, r->guestaccount);
6692 } else {
6693 r->guestaccount = NULL;
6695 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->chdevs));
6696 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->chdevqs));
6697 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->chdevjobs));
6698 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->connections));
6699 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->shares));
6700 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->openfiles));
6701 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessopen));
6702 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sesssvc));
6703 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessreqs));
6704 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->opensearch));
6705 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->activelocks));
6706 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sizereqbufs));
6707 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numbigbufs));
6708 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numfiletasks));
6709 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->alertsched));
6710 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->erroralert));
6711 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->logonalert));
6712 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->accessalert));
6713 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->diskalert));
6714 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->netioalert));
6715 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxaudits));
6716 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_srvheuristics));
6717 if (_ptr_srvheuristics) {
6718 NDR_PULL_ALLOC(ndr, r->srvheuristics);
6719 } else {
6720 r->srvheuristics = NULL;
6723 if (ndr_flags & NDR_BUFFERS) {
6724 if (r->alerts) {
6725 _mem_save_alerts_0 = NDR_PULL_GET_MEM_CTX(ndr);
6726 NDR_PULL_SET_MEM_CTX(ndr, r->alerts, 0);
6727 NDR_CHECK(ndr_pull_array_size(ndr, &r->alerts));
6728 NDR_CHECK(ndr_pull_array_length(ndr, &r->alerts));
6729 if (ndr_get_array_length(ndr, &r->alerts) > ndr_get_array_size(ndr, &r->alerts)) {
6730 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->alerts), ndr_get_array_length(ndr, &r->alerts));
6732 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->alerts), sizeof(uint16_t)));
6733 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->alerts, ndr_get_array_length(ndr, &r->alerts), sizeof(uint16_t), CH_UTF16));
6734 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alerts_0, 0);
6736 if (r->guestaccount) {
6737 _mem_save_guestaccount_0 = NDR_PULL_GET_MEM_CTX(ndr);
6738 NDR_PULL_SET_MEM_CTX(ndr, r->guestaccount, 0);
6739 NDR_CHECK(ndr_pull_array_size(ndr, &r->guestaccount));
6740 NDR_CHECK(ndr_pull_array_length(ndr, &r->guestaccount));
6741 if (ndr_get_array_length(ndr, &r->guestaccount) > ndr_get_array_size(ndr, &r->guestaccount)) {
6742 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->guestaccount), ndr_get_array_length(ndr, &r->guestaccount));
6744 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->guestaccount), sizeof(uint16_t)));
6745 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->guestaccount, ndr_get_array_length(ndr, &r->guestaccount), sizeof(uint16_t), CH_UTF16));
6746 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_guestaccount_0, 0);
6748 if (r->srvheuristics) {
6749 _mem_save_srvheuristics_0 = NDR_PULL_GET_MEM_CTX(ndr);
6750 NDR_PULL_SET_MEM_CTX(ndr, r->srvheuristics, 0);
6751 NDR_CHECK(ndr_pull_array_size(ndr, &r->srvheuristics));
6752 NDR_CHECK(ndr_pull_array_length(ndr, &r->srvheuristics));
6753 if (ndr_get_array_length(ndr, &r->srvheuristics) > ndr_get_array_size(ndr, &r->srvheuristics)) {
6754 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->srvheuristics), ndr_get_array_length(ndr, &r->srvheuristics));
6756 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->srvheuristics), sizeof(uint16_t)));
6757 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->srvheuristics, ndr_get_array_length(ndr, &r->srvheuristics), sizeof(uint16_t), CH_UTF16));
6758 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_srvheuristics_0, 0);
6761 return NDR_ERR_SUCCESS;
6764 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo402(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo402 *r)
6766 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo402");
6767 ndr->depth++;
6768 ndr_print_uint32(ndr, "ulist_mtime", r->ulist_mtime);
6769 ndr_print_uint32(ndr, "glist_mtime", r->glist_mtime);
6770 ndr_print_uint32(ndr, "alist_mtime", r->alist_mtime);
6771 ndr_print_ptr(ndr, "alerts", r->alerts);
6772 ndr->depth++;
6773 if (r->alerts) {
6774 ndr_print_string(ndr, "alerts", r->alerts);
6776 ndr->depth--;
6777 ndr_print_uint32(ndr, "security", r->security);
6778 ndr_print_uint32(ndr, "numadmin", r->numadmin);
6779 ndr_print_uint32(ndr, "lanmask", r->lanmask);
6780 ndr_print_ptr(ndr, "guestaccount", r->guestaccount);
6781 ndr->depth++;
6782 if (r->guestaccount) {
6783 ndr_print_string(ndr, "guestaccount", r->guestaccount);
6785 ndr->depth--;
6786 ndr_print_uint32(ndr, "chdevs", r->chdevs);
6787 ndr_print_uint32(ndr, "chdevqs", r->chdevqs);
6788 ndr_print_uint32(ndr, "chdevjobs", r->chdevjobs);
6789 ndr_print_uint32(ndr, "connections", r->connections);
6790 ndr_print_uint32(ndr, "shares", r->shares);
6791 ndr_print_uint32(ndr, "openfiles", r->openfiles);
6792 ndr_print_uint32(ndr, "sessopen", r->sessopen);
6793 ndr_print_uint32(ndr, "sesssvc", r->sesssvc);
6794 ndr_print_uint32(ndr, "sessreqs", r->sessreqs);
6795 ndr_print_uint32(ndr, "opensearch", r->opensearch);
6796 ndr_print_uint32(ndr, "activelocks", r->activelocks);
6797 ndr_print_uint32(ndr, "sizereqbufs", r->sizereqbufs);
6798 ndr_print_uint32(ndr, "numbigbufs", r->numbigbufs);
6799 ndr_print_uint32(ndr, "numfiletasks", r->numfiletasks);
6800 ndr_print_uint32(ndr, "alertsched", r->alertsched);
6801 ndr_print_uint32(ndr, "erroralert", r->erroralert);
6802 ndr_print_uint32(ndr, "logonalert", r->logonalert);
6803 ndr_print_uint32(ndr, "accessalert", r->accessalert);
6804 ndr_print_uint32(ndr, "diskalert", r->diskalert);
6805 ndr_print_uint32(ndr, "netioalert", r->netioalert);
6806 ndr_print_uint32(ndr, "maxaudits", r->maxaudits);
6807 ndr_print_ptr(ndr, "srvheuristics", r->srvheuristics);
6808 ndr->depth++;
6809 if (r->srvheuristics) {
6810 ndr_print_string(ndr, "srvheuristics", r->srvheuristics);
6812 ndr->depth--;
6813 ndr->depth--;
6816 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo403(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo403 *r)
6818 if (ndr_flags & NDR_SCALARS) {
6819 NDR_CHECK(ndr_push_align(ndr, 4));
6820 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ulist_mtime));
6821 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->glist_mtime));
6822 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->alist_mtime));
6823 NDR_CHECK(ndr_push_unique_ptr(ndr, r->alerts));
6824 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->security));
6825 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numadmin));
6826 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lanmask));
6827 NDR_CHECK(ndr_push_unique_ptr(ndr, r->guestaccount));
6828 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->chdevs));
6829 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->chdevqs));
6830 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->chdevjobs));
6831 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->connections));
6832 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->shares));
6833 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->openfiles));
6834 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessopen));
6835 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sesssvc));
6836 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessreqs));
6837 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->opensearch));
6838 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->activelocks));
6839 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sizereqbufs));
6840 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numbigbufs));
6841 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numfiletasks));
6842 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->alertsched));
6843 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->eroralert));
6844 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->logonalert));
6845 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->accessalert));
6846 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->diskalert));
6847 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->netioalert));
6848 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxaudits));
6849 NDR_CHECK(ndr_push_unique_ptr(ndr, r->srvheuristics));
6850 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->auditedevents));
6851 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->auditprofile));
6852 NDR_CHECK(ndr_push_unique_ptr(ndr, r->autopath));
6854 if (ndr_flags & NDR_BUFFERS) {
6855 if (r->alerts) {
6856 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->alerts, CH_UTF16)));
6857 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6858 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->alerts, CH_UTF16)));
6859 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->alerts, ndr_charset_length(r->alerts, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6861 if (r->guestaccount) {
6862 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->guestaccount, CH_UTF16)));
6863 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6864 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->guestaccount, CH_UTF16)));
6865 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->guestaccount, ndr_charset_length(r->guestaccount, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6867 if (r->srvheuristics) {
6868 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->srvheuristics, CH_UTF16)));
6869 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6870 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->srvheuristics, CH_UTF16)));
6871 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->srvheuristics, ndr_charset_length(r->srvheuristics, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6873 if (r->autopath) {
6874 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->autopath, CH_UTF16)));
6875 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6876 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->autopath, CH_UTF16)));
6877 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->autopath, ndr_charset_length(r->autopath, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6880 return NDR_ERR_SUCCESS;
6883 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo403(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo403 *r)
6885 uint32_t _ptr_alerts;
6886 TALLOC_CTX *_mem_save_alerts_0;
6887 uint32_t _ptr_guestaccount;
6888 TALLOC_CTX *_mem_save_guestaccount_0;
6889 uint32_t _ptr_srvheuristics;
6890 TALLOC_CTX *_mem_save_srvheuristics_0;
6891 uint32_t _ptr_autopath;
6892 TALLOC_CTX *_mem_save_autopath_0;
6893 if (ndr_flags & NDR_SCALARS) {
6894 NDR_CHECK(ndr_pull_align(ndr, 4));
6895 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ulist_mtime));
6896 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->glist_mtime));
6897 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->alist_mtime));
6898 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_alerts));
6899 if (_ptr_alerts) {
6900 NDR_PULL_ALLOC(ndr, r->alerts);
6901 } else {
6902 r->alerts = NULL;
6904 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->security));
6905 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numadmin));
6906 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lanmask));
6907 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_guestaccount));
6908 if (_ptr_guestaccount) {
6909 NDR_PULL_ALLOC(ndr, r->guestaccount);
6910 } else {
6911 r->guestaccount = NULL;
6913 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->chdevs));
6914 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->chdevqs));
6915 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->chdevjobs));
6916 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->connections));
6917 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->shares));
6918 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->openfiles));
6919 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessopen));
6920 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sesssvc));
6921 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessreqs));
6922 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->opensearch));
6923 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->activelocks));
6924 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sizereqbufs));
6925 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numbigbufs));
6926 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numfiletasks));
6927 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->alertsched));
6928 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->eroralert));
6929 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->logonalert));
6930 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->accessalert));
6931 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->diskalert));
6932 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->netioalert));
6933 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxaudits));
6934 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_srvheuristics));
6935 if (_ptr_srvheuristics) {
6936 NDR_PULL_ALLOC(ndr, r->srvheuristics);
6937 } else {
6938 r->srvheuristics = NULL;
6940 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->auditedevents));
6941 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->auditprofile));
6942 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_autopath));
6943 if (_ptr_autopath) {
6944 NDR_PULL_ALLOC(ndr, r->autopath);
6945 } else {
6946 r->autopath = NULL;
6949 if (ndr_flags & NDR_BUFFERS) {
6950 if (r->alerts) {
6951 _mem_save_alerts_0 = NDR_PULL_GET_MEM_CTX(ndr);
6952 NDR_PULL_SET_MEM_CTX(ndr, r->alerts, 0);
6953 NDR_CHECK(ndr_pull_array_size(ndr, &r->alerts));
6954 NDR_CHECK(ndr_pull_array_length(ndr, &r->alerts));
6955 if (ndr_get_array_length(ndr, &r->alerts) > ndr_get_array_size(ndr, &r->alerts)) {
6956 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->alerts), ndr_get_array_length(ndr, &r->alerts));
6958 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->alerts), sizeof(uint16_t)));
6959 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->alerts, ndr_get_array_length(ndr, &r->alerts), sizeof(uint16_t), CH_UTF16));
6960 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alerts_0, 0);
6962 if (r->guestaccount) {
6963 _mem_save_guestaccount_0 = NDR_PULL_GET_MEM_CTX(ndr);
6964 NDR_PULL_SET_MEM_CTX(ndr, r->guestaccount, 0);
6965 NDR_CHECK(ndr_pull_array_size(ndr, &r->guestaccount));
6966 NDR_CHECK(ndr_pull_array_length(ndr, &r->guestaccount));
6967 if (ndr_get_array_length(ndr, &r->guestaccount) > ndr_get_array_size(ndr, &r->guestaccount)) {
6968 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->guestaccount), ndr_get_array_length(ndr, &r->guestaccount));
6970 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->guestaccount), sizeof(uint16_t)));
6971 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->guestaccount, ndr_get_array_length(ndr, &r->guestaccount), sizeof(uint16_t), CH_UTF16));
6972 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_guestaccount_0, 0);
6974 if (r->srvheuristics) {
6975 _mem_save_srvheuristics_0 = NDR_PULL_GET_MEM_CTX(ndr);
6976 NDR_PULL_SET_MEM_CTX(ndr, r->srvheuristics, 0);
6977 NDR_CHECK(ndr_pull_array_size(ndr, &r->srvheuristics));
6978 NDR_CHECK(ndr_pull_array_length(ndr, &r->srvheuristics));
6979 if (ndr_get_array_length(ndr, &r->srvheuristics) > ndr_get_array_size(ndr, &r->srvheuristics)) {
6980 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->srvheuristics), ndr_get_array_length(ndr, &r->srvheuristics));
6982 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->srvheuristics), sizeof(uint16_t)));
6983 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->srvheuristics, ndr_get_array_length(ndr, &r->srvheuristics), sizeof(uint16_t), CH_UTF16));
6984 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_srvheuristics_0, 0);
6986 if (r->autopath) {
6987 _mem_save_autopath_0 = NDR_PULL_GET_MEM_CTX(ndr);
6988 NDR_PULL_SET_MEM_CTX(ndr, r->autopath, 0);
6989 NDR_CHECK(ndr_pull_array_size(ndr, &r->autopath));
6990 NDR_CHECK(ndr_pull_array_length(ndr, &r->autopath));
6991 if (ndr_get_array_length(ndr, &r->autopath) > ndr_get_array_size(ndr, &r->autopath)) {
6992 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->autopath), ndr_get_array_length(ndr, &r->autopath));
6994 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->autopath), sizeof(uint16_t)));
6995 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->autopath, ndr_get_array_length(ndr, &r->autopath), sizeof(uint16_t), CH_UTF16));
6996 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_autopath_0, 0);
6999 return NDR_ERR_SUCCESS;
7002 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo403(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo403 *r)
7004 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo403");
7005 ndr->depth++;
7006 ndr_print_uint32(ndr, "ulist_mtime", r->ulist_mtime);
7007 ndr_print_uint32(ndr, "glist_mtime", r->glist_mtime);
7008 ndr_print_uint32(ndr, "alist_mtime", r->alist_mtime);
7009 ndr_print_ptr(ndr, "alerts", r->alerts);
7010 ndr->depth++;
7011 if (r->alerts) {
7012 ndr_print_string(ndr, "alerts", r->alerts);
7014 ndr->depth--;
7015 ndr_print_uint32(ndr, "security", r->security);
7016 ndr_print_uint32(ndr, "numadmin", r->numadmin);
7017 ndr_print_uint32(ndr, "lanmask", r->lanmask);
7018 ndr_print_ptr(ndr, "guestaccount", r->guestaccount);
7019 ndr->depth++;
7020 if (r->guestaccount) {
7021 ndr_print_string(ndr, "guestaccount", r->guestaccount);
7023 ndr->depth--;
7024 ndr_print_uint32(ndr, "chdevs", r->chdevs);
7025 ndr_print_uint32(ndr, "chdevqs", r->chdevqs);
7026 ndr_print_uint32(ndr, "chdevjobs", r->chdevjobs);
7027 ndr_print_uint32(ndr, "connections", r->connections);
7028 ndr_print_uint32(ndr, "shares", r->shares);
7029 ndr_print_uint32(ndr, "openfiles", r->openfiles);
7030 ndr_print_uint32(ndr, "sessopen", r->sessopen);
7031 ndr_print_uint32(ndr, "sesssvc", r->sesssvc);
7032 ndr_print_uint32(ndr, "sessreqs", r->sessreqs);
7033 ndr_print_uint32(ndr, "opensearch", r->opensearch);
7034 ndr_print_uint32(ndr, "activelocks", r->activelocks);
7035 ndr_print_uint32(ndr, "sizereqbufs", r->sizereqbufs);
7036 ndr_print_uint32(ndr, "numbigbufs", r->numbigbufs);
7037 ndr_print_uint32(ndr, "numfiletasks", r->numfiletasks);
7038 ndr_print_uint32(ndr, "alertsched", r->alertsched);
7039 ndr_print_uint32(ndr, "eroralert", r->eroralert);
7040 ndr_print_uint32(ndr, "logonalert", r->logonalert);
7041 ndr_print_uint32(ndr, "accessalert", r->accessalert);
7042 ndr_print_uint32(ndr, "diskalert", r->diskalert);
7043 ndr_print_uint32(ndr, "netioalert", r->netioalert);
7044 ndr_print_uint32(ndr, "maxaudits", r->maxaudits);
7045 ndr_print_ptr(ndr, "srvheuristics", r->srvheuristics);
7046 ndr->depth++;
7047 if (r->srvheuristics) {
7048 ndr_print_string(ndr, "srvheuristics", r->srvheuristics);
7050 ndr->depth--;
7051 ndr_print_uint32(ndr, "auditedevents", r->auditedevents);
7052 ndr_print_uint32(ndr, "auditprofile", r->auditprofile);
7053 ndr_print_ptr(ndr, "autopath", r->autopath);
7054 ndr->depth++;
7055 if (r->autopath) {
7056 ndr_print_string(ndr, "autopath", r->autopath);
7058 ndr->depth--;
7059 ndr->depth--;
7062 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo502 *r)
7064 if (ndr_flags & NDR_SCALARS) {
7065 NDR_CHECK(ndr_push_align(ndr, 4));
7066 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessopen));
7067 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sesssvc));
7068 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->opensearch));
7069 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sizereqbufs));
7070 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initworkitems));
7071 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxworkitems));
7072 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rawworkitems));
7073 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->irpstacksize));
7074 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxrawbuflen));
7075 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessusers));
7076 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessconns));
7077 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxpagedmemoryusage));
7078 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxnonpagedmemoryusage));
7079 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesoftcompat));
7080 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableforcedlogoff));
7081 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timesource));
7082 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->acceptdownlevelapis));
7083 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lmannounce));
7085 if (ndr_flags & NDR_BUFFERS) {
7087 return NDR_ERR_SUCCESS;
7090 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo502 *r)
7092 if (ndr_flags & NDR_SCALARS) {
7093 NDR_CHECK(ndr_pull_align(ndr, 4));
7094 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessopen));
7095 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sesssvc));
7096 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->opensearch));
7097 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sizereqbufs));
7098 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initworkitems));
7099 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxworkitems));
7100 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rawworkitems));
7101 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->irpstacksize));
7102 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxrawbuflen));
7103 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessusers));
7104 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessconns));
7105 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxpagedmemoryusage));
7106 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxnonpagedmemoryusage));
7107 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesoftcompat));
7108 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableforcedlogoff));
7109 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timesource));
7110 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->acceptdownlevelapis));
7111 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lmannounce));
7113 if (ndr_flags & NDR_BUFFERS) {
7115 return NDR_ERR_SUCCESS;
7118 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo502 *r)
7120 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo502");
7121 ndr->depth++;
7122 ndr_print_uint32(ndr, "sessopen", r->sessopen);
7123 ndr_print_uint32(ndr, "sesssvc", r->sesssvc);
7124 ndr_print_uint32(ndr, "opensearch", r->opensearch);
7125 ndr_print_uint32(ndr, "sizereqbufs", r->sizereqbufs);
7126 ndr_print_uint32(ndr, "initworkitems", r->initworkitems);
7127 ndr_print_uint32(ndr, "maxworkitems", r->maxworkitems);
7128 ndr_print_uint32(ndr, "rawworkitems", r->rawworkitems);
7129 ndr_print_uint32(ndr, "irpstacksize", r->irpstacksize);
7130 ndr_print_uint32(ndr, "maxrawbuflen", r->maxrawbuflen);
7131 ndr_print_uint32(ndr, "sessusers", r->sessusers);
7132 ndr_print_uint32(ndr, "sessconns", r->sessconns);
7133 ndr_print_uint32(ndr, "maxpagedmemoryusage", r->maxpagedmemoryusage);
7134 ndr_print_uint32(ndr, "maxnonpagedmemoryusage", r->maxnonpagedmemoryusage);
7135 ndr_print_uint32(ndr, "enablesoftcompat", r->enablesoftcompat);
7136 ndr_print_uint32(ndr, "enableforcedlogoff", r->enableforcedlogoff);
7137 ndr_print_uint32(ndr, "timesource", r->timesource);
7138 ndr_print_uint32(ndr, "acceptdownlevelapis", r->acceptdownlevelapis);
7139 ndr_print_uint32(ndr, "lmannounce", r->lmannounce);
7140 ndr->depth--;
7143 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo503(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo503 *r)
7145 if (ndr_flags & NDR_SCALARS) {
7146 NDR_CHECK(ndr_push_align(ndr, 4));
7147 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessopen));
7148 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sesssvc));
7149 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->opensearch));
7150 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sizereqbufs));
7151 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initworkitems));
7152 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxworkitems));
7153 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rawworkitems));
7154 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->irpstacksize));
7155 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxrawbuflen));
7156 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessusers));
7157 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessconns));
7158 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxpagedmemoryusage));
7159 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxnonpagedmemoryusage));
7160 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesoftcompat));
7161 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableforcedlogoff));
7162 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timesource));
7163 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->acceptdownlevelapis));
7164 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lmannounce));
7165 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
7166 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxcopyreadlen));
7167 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxcopywritelen));
7168 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minkeepsearch));
7169 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxkeepsearch));
7170 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minkeepcomplsearch));
7171 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxkeepcomplsearch));
7172 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->threadcountadd));
7173 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numlockthreads));
7174 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->scavtimeout));
7175 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minrcvqueue));
7176 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minfreeworkitems));
7177 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->xactmemsize));
7178 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->threadpriority));
7179 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxmpxct));
7180 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->oplockbreakwait));
7181 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->oplockbreakresponsewait));
7182 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableoplocks));
7183 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableoplockforceclose));
7184 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablefcbopens));
7185 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableraw));
7186 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesharednetdrives));
7187 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minfreeconnections));
7188 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxfreeconnections));
7190 if (ndr_flags & NDR_BUFFERS) {
7191 if (r->domain) {
7192 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
7193 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
7194 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
7195 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7198 return NDR_ERR_SUCCESS;
7201 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo503(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo503 *r)
7203 uint32_t _ptr_domain;
7204 TALLOC_CTX *_mem_save_domain_0;
7205 if (ndr_flags & NDR_SCALARS) {
7206 NDR_CHECK(ndr_pull_align(ndr, 4));
7207 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessopen));
7208 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sesssvc));
7209 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->opensearch));
7210 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sizereqbufs));
7211 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initworkitems));
7212 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxworkitems));
7213 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rawworkitems));
7214 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->irpstacksize));
7215 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxrawbuflen));
7216 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessusers));
7217 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessconns));
7218 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxpagedmemoryusage));
7219 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxnonpagedmemoryusage));
7220 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesoftcompat));
7221 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableforcedlogoff));
7222 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timesource));
7223 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->acceptdownlevelapis));
7224 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lmannounce));
7225 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
7226 if (_ptr_domain) {
7227 NDR_PULL_ALLOC(ndr, r->domain);
7228 } else {
7229 r->domain = NULL;
7231 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxcopyreadlen));
7232 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxcopywritelen));
7233 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minkeepsearch));
7234 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxkeepsearch));
7235 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minkeepcomplsearch));
7236 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxkeepcomplsearch));
7237 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->threadcountadd));
7238 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numlockthreads));
7239 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->scavtimeout));
7240 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minrcvqueue));
7241 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minfreeworkitems));
7242 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->xactmemsize));
7243 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->threadpriority));
7244 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxmpxct));
7245 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->oplockbreakwait));
7246 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->oplockbreakresponsewait));
7247 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableoplocks));
7248 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableoplockforceclose));
7249 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablefcbopens));
7250 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableraw));
7251 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesharednetdrives));
7252 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minfreeconnections));
7253 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxfreeconnections));
7255 if (ndr_flags & NDR_BUFFERS) {
7256 if (r->domain) {
7257 _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
7258 NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
7259 NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
7260 NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
7261 if (ndr_get_array_length(ndr, &r->domain) > ndr_get_array_size(ndr, &r->domain)) {
7262 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->domain), ndr_get_array_length(ndr, &r->domain));
7264 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t)));
7265 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t), CH_UTF16));
7266 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
7269 return NDR_ERR_SUCCESS;
7272 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo503(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo503 *r)
7274 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo503");
7275 ndr->depth++;
7276 ndr_print_uint32(ndr, "sessopen", r->sessopen);
7277 ndr_print_uint32(ndr, "sesssvc", r->sesssvc);
7278 ndr_print_uint32(ndr, "opensearch", r->opensearch);
7279 ndr_print_uint32(ndr, "sizereqbufs", r->sizereqbufs);
7280 ndr_print_uint32(ndr, "initworkitems", r->initworkitems);
7281 ndr_print_uint32(ndr, "maxworkitems", r->maxworkitems);
7282 ndr_print_uint32(ndr, "rawworkitems", r->rawworkitems);
7283 ndr_print_uint32(ndr, "irpstacksize", r->irpstacksize);
7284 ndr_print_uint32(ndr, "maxrawbuflen", r->maxrawbuflen);
7285 ndr_print_uint32(ndr, "sessusers", r->sessusers);
7286 ndr_print_uint32(ndr, "sessconns", r->sessconns);
7287 ndr_print_uint32(ndr, "maxpagedmemoryusage", r->maxpagedmemoryusage);
7288 ndr_print_uint32(ndr, "maxnonpagedmemoryusage", r->maxnonpagedmemoryusage);
7289 ndr_print_uint32(ndr, "enablesoftcompat", r->enablesoftcompat);
7290 ndr_print_uint32(ndr, "enableforcedlogoff", r->enableforcedlogoff);
7291 ndr_print_uint32(ndr, "timesource", r->timesource);
7292 ndr_print_uint32(ndr, "acceptdownlevelapis", r->acceptdownlevelapis);
7293 ndr_print_uint32(ndr, "lmannounce", r->lmannounce);
7294 ndr_print_ptr(ndr, "domain", r->domain);
7295 ndr->depth++;
7296 if (r->domain) {
7297 ndr_print_string(ndr, "domain", r->domain);
7299 ndr->depth--;
7300 ndr_print_uint32(ndr, "maxcopyreadlen", r->maxcopyreadlen);
7301 ndr_print_uint32(ndr, "maxcopywritelen", r->maxcopywritelen);
7302 ndr_print_uint32(ndr, "minkeepsearch", r->minkeepsearch);
7303 ndr_print_uint32(ndr, "maxkeepsearch", r->maxkeepsearch);
7304 ndr_print_uint32(ndr, "minkeepcomplsearch", r->minkeepcomplsearch);
7305 ndr_print_uint32(ndr, "maxkeepcomplsearch", r->maxkeepcomplsearch);
7306 ndr_print_uint32(ndr, "threadcountadd", r->threadcountadd);
7307 ndr_print_uint32(ndr, "numlockthreads", r->numlockthreads);
7308 ndr_print_uint32(ndr, "scavtimeout", r->scavtimeout);
7309 ndr_print_uint32(ndr, "minrcvqueue", r->minrcvqueue);
7310 ndr_print_uint32(ndr, "minfreeworkitems", r->minfreeworkitems);
7311 ndr_print_uint32(ndr, "xactmemsize", r->xactmemsize);
7312 ndr_print_uint32(ndr, "threadpriority", r->threadpriority);
7313 ndr_print_uint32(ndr, "maxmpxct", r->maxmpxct);
7314 ndr_print_uint32(ndr, "oplockbreakwait", r->oplockbreakwait);
7315 ndr_print_uint32(ndr, "oplockbreakresponsewait", r->oplockbreakresponsewait);
7316 ndr_print_uint32(ndr, "enableoplocks", r->enableoplocks);
7317 ndr_print_uint32(ndr, "enableoplockforceclose", r->enableoplockforceclose);
7318 ndr_print_uint32(ndr, "enablefcbopens", r->enablefcbopens);
7319 ndr_print_uint32(ndr, "enableraw", r->enableraw);
7320 ndr_print_uint32(ndr, "enablesharednetdrives", r->enablesharednetdrives);
7321 ndr_print_uint32(ndr, "minfreeconnections", r->minfreeconnections);
7322 ndr_print_uint32(ndr, "maxfreeconnections", r->maxfreeconnections);
7323 ndr->depth--;
7326 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo599(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo599 *r)
7328 if (ndr_flags & NDR_SCALARS) {
7329 NDR_CHECK(ndr_push_align(ndr, 4));
7330 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessopen));
7331 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sesssvc));
7332 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->opensearch));
7333 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sizereqbufs));
7334 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initworkitems));
7335 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxworkitems));
7336 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rawworkitems));
7337 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->irpstacksize));
7338 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxrawbuflen));
7339 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessusers));
7340 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessconns));
7341 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxpagedmemoryusage));
7342 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxnonpagedmemoryusage));
7343 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesoftcompat));
7344 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableforcedlogoff));
7345 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timesource));
7346 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->acceptdownlevelapis));
7347 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lmannounce));
7348 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
7349 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxcopyreadlen));
7350 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxcopywritelen));
7351 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minkeepsearch));
7352 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minkeepcomplsearch));
7353 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxkeepcomplsearch));
7354 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->threadcountadd));
7355 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numlockthreads));
7356 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->scavtimeout));
7357 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minrcvqueue));
7358 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minfreeworkitems));
7359 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->xactmemsize));
7360 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->threadpriority));
7361 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxmpxct));
7362 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->oplockbreakwait));
7363 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->oplockbreakresponsewait));
7364 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableoplocks));
7365 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableoplockforceclose));
7366 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablefcbopens));
7367 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableraw));
7368 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesharednetdrives));
7369 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minfreeconnections));
7370 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxfreeconnections));
7371 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initsesstable));
7372 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initconntable));
7373 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initfiletable));
7374 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initsearchtable));
7375 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->alertsched));
7376 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->errortreshold));
7377 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->networkerrortreshold));
7378 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->diskspacetreshold));
7379 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
7380 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxlinkdelay));
7381 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minlinkthroughput));
7382 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->linkinfovalidtime));
7383 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->scavqosinfoupdatetime));
7384 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxworkitemidletime));
7386 if (ndr_flags & NDR_BUFFERS) {
7387 if (r->domain) {
7388 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
7389 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
7390 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
7391 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7394 return NDR_ERR_SUCCESS;
7397 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo599(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo599 *r)
7399 uint32_t _ptr_domain;
7400 TALLOC_CTX *_mem_save_domain_0;
7401 if (ndr_flags & NDR_SCALARS) {
7402 NDR_CHECK(ndr_pull_align(ndr, 4));
7403 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessopen));
7404 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sesssvc));
7405 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->opensearch));
7406 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sizereqbufs));
7407 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initworkitems));
7408 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxworkitems));
7409 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rawworkitems));
7410 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->irpstacksize));
7411 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxrawbuflen));
7412 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessusers));
7413 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessconns));
7414 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxpagedmemoryusage));
7415 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxnonpagedmemoryusage));
7416 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesoftcompat));
7417 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableforcedlogoff));
7418 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timesource));
7419 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->acceptdownlevelapis));
7420 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lmannounce));
7421 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
7422 if (_ptr_domain) {
7423 NDR_PULL_ALLOC(ndr, r->domain);
7424 } else {
7425 r->domain = NULL;
7427 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxcopyreadlen));
7428 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxcopywritelen));
7429 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minkeepsearch));
7430 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minkeepcomplsearch));
7431 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxkeepcomplsearch));
7432 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->threadcountadd));
7433 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numlockthreads));
7434 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->scavtimeout));
7435 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minrcvqueue));
7436 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minfreeworkitems));
7437 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->xactmemsize));
7438 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->threadpriority));
7439 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxmpxct));
7440 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->oplockbreakwait));
7441 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->oplockbreakresponsewait));
7442 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableoplocks));
7443 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableoplockforceclose));
7444 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablefcbopens));
7445 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableraw));
7446 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesharednetdrives));
7447 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minfreeconnections));
7448 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxfreeconnections));
7449 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initsesstable));
7450 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initconntable));
7451 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initfiletable));
7452 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initsearchtable));
7453 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->alertsched));
7454 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->errortreshold));
7455 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->networkerrortreshold));
7456 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->diskspacetreshold));
7457 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
7458 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxlinkdelay));
7459 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minlinkthroughput));
7460 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->linkinfovalidtime));
7461 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->scavqosinfoupdatetime));
7462 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxworkitemidletime));
7464 if (ndr_flags & NDR_BUFFERS) {
7465 if (r->domain) {
7466 _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
7467 NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
7468 NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
7469 NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
7470 if (ndr_get_array_length(ndr, &r->domain) > ndr_get_array_size(ndr, &r->domain)) {
7471 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->domain), ndr_get_array_length(ndr, &r->domain));
7473 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t)));
7474 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t), CH_UTF16));
7475 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
7478 return NDR_ERR_SUCCESS;
7481 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo599(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo599 *r)
7483 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo599");
7484 ndr->depth++;
7485 ndr_print_uint32(ndr, "sessopen", r->sessopen);
7486 ndr_print_uint32(ndr, "sesssvc", r->sesssvc);
7487 ndr_print_uint32(ndr, "opensearch", r->opensearch);
7488 ndr_print_uint32(ndr, "sizereqbufs", r->sizereqbufs);
7489 ndr_print_uint32(ndr, "initworkitems", r->initworkitems);
7490 ndr_print_uint32(ndr, "maxworkitems", r->maxworkitems);
7491 ndr_print_uint32(ndr, "rawworkitems", r->rawworkitems);
7492 ndr_print_uint32(ndr, "irpstacksize", r->irpstacksize);
7493 ndr_print_uint32(ndr, "maxrawbuflen", r->maxrawbuflen);
7494 ndr_print_uint32(ndr, "sessusers", r->sessusers);
7495 ndr_print_uint32(ndr, "sessconns", r->sessconns);
7496 ndr_print_uint32(ndr, "maxpagedmemoryusage", r->maxpagedmemoryusage);
7497 ndr_print_uint32(ndr, "maxnonpagedmemoryusage", r->maxnonpagedmemoryusage);
7498 ndr_print_uint32(ndr, "enablesoftcompat", r->enablesoftcompat);
7499 ndr_print_uint32(ndr, "enableforcedlogoff", r->enableforcedlogoff);
7500 ndr_print_uint32(ndr, "timesource", r->timesource);
7501 ndr_print_uint32(ndr, "acceptdownlevelapis", r->acceptdownlevelapis);
7502 ndr_print_uint32(ndr, "lmannounce", r->lmannounce);
7503 ndr_print_ptr(ndr, "domain", r->domain);
7504 ndr->depth++;
7505 if (r->domain) {
7506 ndr_print_string(ndr, "domain", r->domain);
7508 ndr->depth--;
7509 ndr_print_uint32(ndr, "maxcopyreadlen", r->maxcopyreadlen);
7510 ndr_print_uint32(ndr, "maxcopywritelen", r->maxcopywritelen);
7511 ndr_print_uint32(ndr, "minkeepsearch", r->minkeepsearch);
7512 ndr_print_uint32(ndr, "minkeepcomplsearch", r->minkeepcomplsearch);
7513 ndr_print_uint32(ndr, "maxkeepcomplsearch", r->maxkeepcomplsearch);
7514 ndr_print_uint32(ndr, "threadcountadd", r->threadcountadd);
7515 ndr_print_uint32(ndr, "numlockthreads", r->numlockthreads);
7516 ndr_print_uint32(ndr, "scavtimeout", r->scavtimeout);
7517 ndr_print_uint32(ndr, "minrcvqueue", r->minrcvqueue);
7518 ndr_print_uint32(ndr, "minfreeworkitems", r->minfreeworkitems);
7519 ndr_print_uint32(ndr, "xactmemsize", r->xactmemsize);
7520 ndr_print_uint32(ndr, "threadpriority", r->threadpriority);
7521 ndr_print_uint32(ndr, "maxmpxct", r->maxmpxct);
7522 ndr_print_uint32(ndr, "oplockbreakwait", r->oplockbreakwait);
7523 ndr_print_uint32(ndr, "oplockbreakresponsewait", r->oplockbreakresponsewait);
7524 ndr_print_uint32(ndr, "enableoplocks", r->enableoplocks);
7525 ndr_print_uint32(ndr, "enableoplockforceclose", r->enableoplockforceclose);
7526 ndr_print_uint32(ndr, "enablefcbopens", r->enablefcbopens);
7527 ndr_print_uint32(ndr, "enableraw", r->enableraw);
7528 ndr_print_uint32(ndr, "enablesharednetdrives", r->enablesharednetdrives);
7529 ndr_print_uint32(ndr, "minfreeconnections", r->minfreeconnections);
7530 ndr_print_uint32(ndr, "maxfreeconnections", r->maxfreeconnections);
7531 ndr_print_uint32(ndr, "initsesstable", r->initsesstable);
7532 ndr_print_uint32(ndr, "initconntable", r->initconntable);
7533 ndr_print_uint32(ndr, "initfiletable", r->initfiletable);
7534 ndr_print_uint32(ndr, "initsearchtable", r->initsearchtable);
7535 ndr_print_uint32(ndr, "alertsched", r->alertsched);
7536 ndr_print_uint32(ndr, "errortreshold", r->errortreshold);
7537 ndr_print_uint32(ndr, "networkerrortreshold", r->networkerrortreshold);
7538 ndr_print_uint32(ndr, "diskspacetreshold", r->diskspacetreshold);
7539 ndr_print_uint32(ndr, "reserved", r->reserved);
7540 ndr_print_uint32(ndr, "maxlinkdelay", r->maxlinkdelay);
7541 ndr_print_uint32(ndr, "minlinkthroughput", r->minlinkthroughput);
7542 ndr_print_uint32(ndr, "linkinfovalidtime", r->linkinfovalidtime);
7543 ndr_print_uint32(ndr, "scavqosinfoupdatetime", r->scavqosinfoupdatetime);
7544 ndr_print_uint32(ndr, "maxworkitemidletime", r->maxworkitemidletime);
7545 ndr->depth--;
7548 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1005(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1005 *r)
7550 if (ndr_flags & NDR_SCALARS) {
7551 NDR_CHECK(ndr_push_align(ndr, 4));
7552 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
7554 if (ndr_flags & NDR_BUFFERS) {
7555 if (r->comment) {
7556 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
7557 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
7558 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
7559 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7562 return NDR_ERR_SUCCESS;
7565 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1005(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1005 *r)
7567 uint32_t _ptr_comment;
7568 TALLOC_CTX *_mem_save_comment_0;
7569 if (ndr_flags & NDR_SCALARS) {
7570 NDR_CHECK(ndr_pull_align(ndr, 4));
7571 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
7572 if (_ptr_comment) {
7573 NDR_PULL_ALLOC(ndr, r->comment);
7574 } else {
7575 r->comment = NULL;
7578 if (ndr_flags & NDR_BUFFERS) {
7579 if (r->comment) {
7580 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
7581 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
7582 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
7583 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
7584 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
7585 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
7587 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
7588 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
7589 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
7592 return NDR_ERR_SUCCESS;
7595 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1005(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1005 *r)
7597 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1005");
7598 ndr->depth++;
7599 ndr_print_ptr(ndr, "comment", r->comment);
7600 ndr->depth++;
7601 if (r->comment) {
7602 ndr_print_string(ndr, "comment", r->comment);
7604 ndr->depth--;
7605 ndr->depth--;
7608 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1010(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1010 *r)
7610 if (ndr_flags & NDR_SCALARS) {
7611 NDR_CHECK(ndr_push_align(ndr, 4));
7612 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->disc));
7614 if (ndr_flags & NDR_BUFFERS) {
7616 return NDR_ERR_SUCCESS;
7619 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1010(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1010 *r)
7621 if (ndr_flags & NDR_SCALARS) {
7622 NDR_CHECK(ndr_pull_align(ndr, 4));
7623 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->disc));
7625 if (ndr_flags & NDR_BUFFERS) {
7627 return NDR_ERR_SUCCESS;
7630 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1010(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1010 *r)
7632 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1010");
7633 ndr->depth++;
7634 ndr_print_uint32(ndr, "disc", r->disc);
7635 ndr->depth--;
7638 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1016(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1016 *r)
7640 if (ndr_flags & NDR_SCALARS) {
7641 NDR_CHECK(ndr_push_align(ndr, 4));
7642 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->hidden));
7644 if (ndr_flags & NDR_BUFFERS) {
7646 return NDR_ERR_SUCCESS;
7649 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1016(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1016 *r)
7651 if (ndr_flags & NDR_SCALARS) {
7652 NDR_CHECK(ndr_pull_align(ndr, 4));
7653 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->hidden));
7655 if (ndr_flags & NDR_BUFFERS) {
7657 return NDR_ERR_SUCCESS;
7660 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1016(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1016 *r)
7662 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1016");
7663 ndr->depth++;
7664 ndr_print_uint32(ndr, "hidden", r->hidden);
7665 ndr->depth--;
7668 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1017(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1017 *r)
7670 if (ndr_flags & NDR_SCALARS) {
7671 NDR_CHECK(ndr_push_align(ndr, 4));
7672 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->announce));
7674 if (ndr_flags & NDR_BUFFERS) {
7676 return NDR_ERR_SUCCESS;
7679 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1017(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1017 *r)
7681 if (ndr_flags & NDR_SCALARS) {
7682 NDR_CHECK(ndr_pull_align(ndr, 4));
7683 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->announce));
7685 if (ndr_flags & NDR_BUFFERS) {
7687 return NDR_ERR_SUCCESS;
7690 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1017(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1017 *r)
7692 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1017");
7693 ndr->depth++;
7694 ndr_print_uint32(ndr, "announce", r->announce);
7695 ndr->depth--;
7698 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1018(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1018 *r)
7700 if (ndr_flags & NDR_SCALARS) {
7701 NDR_CHECK(ndr_push_align(ndr, 4));
7702 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->anndelta));
7704 if (ndr_flags & NDR_BUFFERS) {
7706 return NDR_ERR_SUCCESS;
7709 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1018(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1018 *r)
7711 if (ndr_flags & NDR_SCALARS) {
7712 NDR_CHECK(ndr_pull_align(ndr, 4));
7713 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->anndelta));
7715 if (ndr_flags & NDR_BUFFERS) {
7717 return NDR_ERR_SUCCESS;
7720 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1018(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1018 *r)
7722 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1018");
7723 ndr->depth++;
7724 ndr_print_uint32(ndr, "anndelta", r->anndelta);
7725 ndr->depth--;
7728 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1107(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1107 *r)
7730 if (ndr_flags & NDR_SCALARS) {
7731 NDR_CHECK(ndr_push_align(ndr, 4));
7732 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->users));
7734 if (ndr_flags & NDR_BUFFERS) {
7736 return NDR_ERR_SUCCESS;
7739 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1107(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1107 *r)
7741 if (ndr_flags & NDR_SCALARS) {
7742 NDR_CHECK(ndr_pull_align(ndr, 4));
7743 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->users));
7745 if (ndr_flags & NDR_BUFFERS) {
7747 return NDR_ERR_SUCCESS;
7750 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1107(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1107 *r)
7752 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1107");
7753 ndr->depth++;
7754 ndr_print_uint32(ndr, "users", r->users);
7755 ndr->depth--;
7758 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1501(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1501 *r)
7760 if (ndr_flags & NDR_SCALARS) {
7761 NDR_CHECK(ndr_push_align(ndr, 4));
7762 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessopens));
7764 if (ndr_flags & NDR_BUFFERS) {
7766 return NDR_ERR_SUCCESS;
7769 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1501(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1501 *r)
7771 if (ndr_flags & NDR_SCALARS) {
7772 NDR_CHECK(ndr_pull_align(ndr, 4));
7773 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessopens));
7775 if (ndr_flags & NDR_BUFFERS) {
7777 return NDR_ERR_SUCCESS;
7780 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1501(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1501 *r)
7782 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1501");
7783 ndr->depth++;
7784 ndr_print_uint32(ndr, "sessopens", r->sessopens);
7785 ndr->depth--;
7788 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1502 *r)
7790 if (ndr_flags & NDR_SCALARS) {
7791 NDR_CHECK(ndr_push_align(ndr, 4));
7792 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessvcs));
7794 if (ndr_flags & NDR_BUFFERS) {
7796 return NDR_ERR_SUCCESS;
7799 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1502 *r)
7801 if (ndr_flags & NDR_SCALARS) {
7802 NDR_CHECK(ndr_pull_align(ndr, 4));
7803 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessvcs));
7805 if (ndr_flags & NDR_BUFFERS) {
7807 return NDR_ERR_SUCCESS;
7810 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1502 *r)
7812 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1502");
7813 ndr->depth++;
7814 ndr_print_uint32(ndr, "sessvcs", r->sessvcs);
7815 ndr->depth--;
7818 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1503(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1503 *r)
7820 if (ndr_flags & NDR_SCALARS) {
7821 NDR_CHECK(ndr_push_align(ndr, 4));
7822 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->opensearch));
7824 if (ndr_flags & NDR_BUFFERS) {
7826 return NDR_ERR_SUCCESS;
7829 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1503(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1503 *r)
7831 if (ndr_flags & NDR_SCALARS) {
7832 NDR_CHECK(ndr_pull_align(ndr, 4));
7833 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->opensearch));
7835 if (ndr_flags & NDR_BUFFERS) {
7837 return NDR_ERR_SUCCESS;
7840 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1503(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1503 *r)
7842 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1503");
7843 ndr->depth++;
7844 ndr_print_uint32(ndr, "opensearch", r->opensearch);
7845 ndr->depth--;
7848 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1506(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1506 *r)
7850 if (ndr_flags & NDR_SCALARS) {
7851 NDR_CHECK(ndr_push_align(ndr, 4));
7852 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxworkitems));
7854 if (ndr_flags & NDR_BUFFERS) {
7856 return NDR_ERR_SUCCESS;
7859 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1506(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1506 *r)
7861 if (ndr_flags & NDR_SCALARS) {
7862 NDR_CHECK(ndr_pull_align(ndr, 4));
7863 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxworkitems));
7865 if (ndr_flags & NDR_BUFFERS) {
7867 return NDR_ERR_SUCCESS;
7870 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1506(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1506 *r)
7872 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1506");
7873 ndr->depth++;
7874 ndr_print_uint32(ndr, "maxworkitems", r->maxworkitems);
7875 ndr->depth--;
7878 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1509(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1509 *r)
7880 if (ndr_flags & NDR_SCALARS) {
7881 NDR_CHECK(ndr_push_align(ndr, 4));
7882 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxrawbuflen));
7884 if (ndr_flags & NDR_BUFFERS) {
7886 return NDR_ERR_SUCCESS;
7889 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1509(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1509 *r)
7891 if (ndr_flags & NDR_SCALARS) {
7892 NDR_CHECK(ndr_pull_align(ndr, 4));
7893 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxrawbuflen));
7895 if (ndr_flags & NDR_BUFFERS) {
7897 return NDR_ERR_SUCCESS;
7900 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1509(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1509 *r)
7902 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1509");
7903 ndr->depth++;
7904 ndr_print_uint32(ndr, "maxrawbuflen", r->maxrawbuflen);
7905 ndr->depth--;
7908 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1510(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1510 *r)
7910 if (ndr_flags & NDR_SCALARS) {
7911 NDR_CHECK(ndr_push_align(ndr, 4));
7912 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessusers));
7914 if (ndr_flags & NDR_BUFFERS) {
7916 return NDR_ERR_SUCCESS;
7919 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1510(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1510 *r)
7921 if (ndr_flags & NDR_SCALARS) {
7922 NDR_CHECK(ndr_pull_align(ndr, 4));
7923 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessusers));
7925 if (ndr_flags & NDR_BUFFERS) {
7927 return NDR_ERR_SUCCESS;
7930 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1510(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1510 *r)
7932 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1510");
7933 ndr->depth++;
7934 ndr_print_uint32(ndr, "sessusers", r->sessusers);
7935 ndr->depth--;
7938 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1511(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1511 *r)
7940 if (ndr_flags & NDR_SCALARS) {
7941 NDR_CHECK(ndr_push_align(ndr, 4));
7942 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sesscons));
7944 if (ndr_flags & NDR_BUFFERS) {
7946 return NDR_ERR_SUCCESS;
7949 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1511(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1511 *r)
7951 if (ndr_flags & NDR_SCALARS) {
7952 NDR_CHECK(ndr_pull_align(ndr, 4));
7953 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sesscons));
7955 if (ndr_flags & NDR_BUFFERS) {
7957 return NDR_ERR_SUCCESS;
7960 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1511(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1511 *r)
7962 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1511");
7963 ndr->depth++;
7964 ndr_print_uint32(ndr, "sesscons", r->sesscons);
7965 ndr->depth--;
7968 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1512(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1512 *r)
7970 if (ndr_flags & NDR_SCALARS) {
7971 NDR_CHECK(ndr_push_align(ndr, 4));
7972 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxnonpagedmemoryusage));
7974 if (ndr_flags & NDR_BUFFERS) {
7976 return NDR_ERR_SUCCESS;
7979 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1512(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1512 *r)
7981 if (ndr_flags & NDR_SCALARS) {
7982 NDR_CHECK(ndr_pull_align(ndr, 4));
7983 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxnonpagedmemoryusage));
7985 if (ndr_flags & NDR_BUFFERS) {
7987 return NDR_ERR_SUCCESS;
7990 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1512(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1512 *r)
7992 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1512");
7993 ndr->depth++;
7994 ndr_print_uint32(ndr, "maxnonpagedmemoryusage", r->maxnonpagedmemoryusage);
7995 ndr->depth--;
7998 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1513(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1513 *r)
8000 if (ndr_flags & NDR_SCALARS) {
8001 NDR_CHECK(ndr_push_align(ndr, 4));
8002 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxpagedmemoryusage));
8004 if (ndr_flags & NDR_BUFFERS) {
8006 return NDR_ERR_SUCCESS;
8009 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1513(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1513 *r)
8011 if (ndr_flags & NDR_SCALARS) {
8012 NDR_CHECK(ndr_pull_align(ndr, 4));
8013 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxpagedmemoryusage));
8015 if (ndr_flags & NDR_BUFFERS) {
8017 return NDR_ERR_SUCCESS;
8020 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1513(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1513 *r)
8022 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1513");
8023 ndr->depth++;
8024 ndr_print_uint32(ndr, "maxpagedmemoryusage", r->maxpagedmemoryusage);
8025 ndr->depth--;
8028 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1514(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1514 *r)
8030 if (ndr_flags & NDR_SCALARS) {
8031 NDR_CHECK(ndr_push_align(ndr, 4));
8032 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesoftcompat));
8034 if (ndr_flags & NDR_BUFFERS) {
8036 return NDR_ERR_SUCCESS;
8039 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1514(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1514 *r)
8041 if (ndr_flags & NDR_SCALARS) {
8042 NDR_CHECK(ndr_pull_align(ndr, 4));
8043 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesoftcompat));
8045 if (ndr_flags & NDR_BUFFERS) {
8047 return NDR_ERR_SUCCESS;
8050 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1514(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1514 *r)
8052 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1514");
8053 ndr->depth++;
8054 ndr_print_uint32(ndr, "enablesoftcompat", r->enablesoftcompat);
8055 ndr->depth--;
8058 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1515(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1515 *r)
8060 if (ndr_flags & NDR_SCALARS) {
8061 NDR_CHECK(ndr_push_align(ndr, 4));
8062 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableforcedlogoff));
8064 if (ndr_flags & NDR_BUFFERS) {
8066 return NDR_ERR_SUCCESS;
8069 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1515(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1515 *r)
8071 if (ndr_flags & NDR_SCALARS) {
8072 NDR_CHECK(ndr_pull_align(ndr, 4));
8073 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableforcedlogoff));
8075 if (ndr_flags & NDR_BUFFERS) {
8077 return NDR_ERR_SUCCESS;
8080 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1515(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1515 *r)
8082 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1515");
8083 ndr->depth++;
8084 ndr_print_uint32(ndr, "enableforcedlogoff", r->enableforcedlogoff);
8085 ndr->depth--;
8088 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1516(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1516 *r)
8090 if (ndr_flags & NDR_SCALARS) {
8091 NDR_CHECK(ndr_push_align(ndr, 4));
8092 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timesource));
8094 if (ndr_flags & NDR_BUFFERS) {
8096 return NDR_ERR_SUCCESS;
8099 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1516(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1516 *r)
8101 if (ndr_flags & NDR_SCALARS) {
8102 NDR_CHECK(ndr_pull_align(ndr, 4));
8103 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timesource));
8105 if (ndr_flags & NDR_BUFFERS) {
8107 return NDR_ERR_SUCCESS;
8110 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1516(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1516 *r)
8112 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1516");
8113 ndr->depth++;
8114 ndr_print_uint32(ndr, "timesource", r->timesource);
8115 ndr->depth--;
8118 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1518(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1518 *r)
8120 if (ndr_flags & NDR_SCALARS) {
8121 NDR_CHECK(ndr_push_align(ndr, 4));
8122 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lmannounce));
8124 if (ndr_flags & NDR_BUFFERS) {
8126 return NDR_ERR_SUCCESS;
8129 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1518(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1518 *r)
8131 if (ndr_flags & NDR_SCALARS) {
8132 NDR_CHECK(ndr_pull_align(ndr, 4));
8133 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lmannounce));
8135 if (ndr_flags & NDR_BUFFERS) {
8137 return NDR_ERR_SUCCESS;
8140 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1518(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1518 *r)
8142 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1518");
8143 ndr->depth++;
8144 ndr_print_uint32(ndr, "lmannounce", r->lmannounce);
8145 ndr->depth--;
8148 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1520(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1520 *r)
8150 if (ndr_flags & NDR_SCALARS) {
8151 NDR_CHECK(ndr_push_align(ndr, 4));
8152 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxcopyreadlen));
8154 if (ndr_flags & NDR_BUFFERS) {
8156 return NDR_ERR_SUCCESS;
8159 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1520(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1520 *r)
8161 if (ndr_flags & NDR_SCALARS) {
8162 NDR_CHECK(ndr_pull_align(ndr, 4));
8163 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxcopyreadlen));
8165 if (ndr_flags & NDR_BUFFERS) {
8167 return NDR_ERR_SUCCESS;
8170 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1520(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1520 *r)
8172 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1520");
8173 ndr->depth++;
8174 ndr_print_uint32(ndr, "maxcopyreadlen", r->maxcopyreadlen);
8175 ndr->depth--;
8178 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1521(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1521 *r)
8180 if (ndr_flags & NDR_SCALARS) {
8181 NDR_CHECK(ndr_push_align(ndr, 4));
8182 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxcopywritelen));
8184 if (ndr_flags & NDR_BUFFERS) {
8186 return NDR_ERR_SUCCESS;
8189 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1521(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1521 *r)
8191 if (ndr_flags & NDR_SCALARS) {
8192 NDR_CHECK(ndr_pull_align(ndr, 4));
8193 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxcopywritelen));
8195 if (ndr_flags & NDR_BUFFERS) {
8197 return NDR_ERR_SUCCESS;
8200 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1521(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1521 *r)
8202 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1521");
8203 ndr->depth++;
8204 ndr_print_uint32(ndr, "maxcopywritelen", r->maxcopywritelen);
8205 ndr->depth--;
8208 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1522(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1522 *r)
8210 if (ndr_flags & NDR_SCALARS) {
8211 NDR_CHECK(ndr_push_align(ndr, 4));
8212 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minkeepsearch));
8214 if (ndr_flags & NDR_BUFFERS) {
8216 return NDR_ERR_SUCCESS;
8219 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1522(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1522 *r)
8221 if (ndr_flags & NDR_SCALARS) {
8222 NDR_CHECK(ndr_pull_align(ndr, 4));
8223 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minkeepsearch));
8225 if (ndr_flags & NDR_BUFFERS) {
8227 return NDR_ERR_SUCCESS;
8230 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1522(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1522 *r)
8232 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1522");
8233 ndr->depth++;
8234 ndr_print_uint32(ndr, "minkeepsearch", r->minkeepsearch);
8235 ndr->depth--;
8238 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1523(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1523 *r)
8240 if (ndr_flags & NDR_SCALARS) {
8241 NDR_CHECK(ndr_push_align(ndr, 4));
8242 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxkeepsearch));
8244 if (ndr_flags & NDR_BUFFERS) {
8246 return NDR_ERR_SUCCESS;
8249 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1523(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1523 *r)
8251 if (ndr_flags & NDR_SCALARS) {
8252 NDR_CHECK(ndr_pull_align(ndr, 4));
8253 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxkeepsearch));
8255 if (ndr_flags & NDR_BUFFERS) {
8257 return NDR_ERR_SUCCESS;
8260 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1523(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1523 *r)
8262 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1523");
8263 ndr->depth++;
8264 ndr_print_uint32(ndr, "maxkeepsearch", r->maxkeepsearch);
8265 ndr->depth--;
8268 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1524(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1524 *r)
8270 if (ndr_flags & NDR_SCALARS) {
8271 NDR_CHECK(ndr_push_align(ndr, 4));
8272 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minkeepcomplsearch));
8274 if (ndr_flags & NDR_BUFFERS) {
8276 return NDR_ERR_SUCCESS;
8279 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1524(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1524 *r)
8281 if (ndr_flags & NDR_SCALARS) {
8282 NDR_CHECK(ndr_pull_align(ndr, 4));
8283 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minkeepcomplsearch));
8285 if (ndr_flags & NDR_BUFFERS) {
8287 return NDR_ERR_SUCCESS;
8290 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1524(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1524 *r)
8292 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1524");
8293 ndr->depth++;
8294 ndr_print_uint32(ndr, "minkeepcomplsearch", r->minkeepcomplsearch);
8295 ndr->depth--;
8298 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1525(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1525 *r)
8300 if (ndr_flags & NDR_SCALARS) {
8301 NDR_CHECK(ndr_push_align(ndr, 4));
8302 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxkeepcomplsearch));
8304 if (ndr_flags & NDR_BUFFERS) {
8306 return NDR_ERR_SUCCESS;
8309 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1525(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1525 *r)
8311 if (ndr_flags & NDR_SCALARS) {
8312 NDR_CHECK(ndr_pull_align(ndr, 4));
8313 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxkeepcomplsearch));
8315 if (ndr_flags & NDR_BUFFERS) {
8317 return NDR_ERR_SUCCESS;
8320 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1525(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1525 *r)
8322 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1525");
8323 ndr->depth++;
8324 ndr_print_uint32(ndr, "maxkeepcomplsearch", r->maxkeepcomplsearch);
8325 ndr->depth--;
8328 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1528(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1528 *r)
8330 if (ndr_flags & NDR_SCALARS) {
8331 NDR_CHECK(ndr_push_align(ndr, 4));
8332 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->scavtimeout));
8334 if (ndr_flags & NDR_BUFFERS) {
8336 return NDR_ERR_SUCCESS;
8339 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1528(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1528 *r)
8341 if (ndr_flags & NDR_SCALARS) {
8342 NDR_CHECK(ndr_pull_align(ndr, 4));
8343 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->scavtimeout));
8345 if (ndr_flags & NDR_BUFFERS) {
8347 return NDR_ERR_SUCCESS;
8350 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1528(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1528 *r)
8352 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1528");
8353 ndr->depth++;
8354 ndr_print_uint32(ndr, "scavtimeout", r->scavtimeout);
8355 ndr->depth--;
8358 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1529(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1529 *r)
8360 if (ndr_flags & NDR_SCALARS) {
8361 NDR_CHECK(ndr_push_align(ndr, 4));
8362 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minrcvqueue));
8364 if (ndr_flags & NDR_BUFFERS) {
8366 return NDR_ERR_SUCCESS;
8369 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1529(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1529 *r)
8371 if (ndr_flags & NDR_SCALARS) {
8372 NDR_CHECK(ndr_pull_align(ndr, 4));
8373 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minrcvqueue));
8375 if (ndr_flags & NDR_BUFFERS) {
8377 return NDR_ERR_SUCCESS;
8380 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1529(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1529 *r)
8382 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1529");
8383 ndr->depth++;
8384 ndr_print_uint32(ndr, "minrcvqueue", r->minrcvqueue);
8385 ndr->depth--;
8388 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1530(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1530 *r)
8390 if (ndr_flags & NDR_SCALARS) {
8391 NDR_CHECK(ndr_push_align(ndr, 4));
8392 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minfreeworkitems));
8394 if (ndr_flags & NDR_BUFFERS) {
8396 return NDR_ERR_SUCCESS;
8399 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1530(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1530 *r)
8401 if (ndr_flags & NDR_SCALARS) {
8402 NDR_CHECK(ndr_pull_align(ndr, 4));
8403 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minfreeworkitems));
8405 if (ndr_flags & NDR_BUFFERS) {
8407 return NDR_ERR_SUCCESS;
8410 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1530(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1530 *r)
8412 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1530");
8413 ndr->depth++;
8414 ndr_print_uint32(ndr, "minfreeworkitems", r->minfreeworkitems);
8415 ndr->depth--;
8418 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1533(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1533 *r)
8420 if (ndr_flags & NDR_SCALARS) {
8421 NDR_CHECK(ndr_push_align(ndr, 4));
8422 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxmpxct));
8424 if (ndr_flags & NDR_BUFFERS) {
8426 return NDR_ERR_SUCCESS;
8429 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1533(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1533 *r)
8431 if (ndr_flags & NDR_SCALARS) {
8432 NDR_CHECK(ndr_pull_align(ndr, 4));
8433 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxmpxct));
8435 if (ndr_flags & NDR_BUFFERS) {
8437 return NDR_ERR_SUCCESS;
8440 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1533(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1533 *r)
8442 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1533");
8443 ndr->depth++;
8444 ndr_print_uint32(ndr, "maxmpxct", r->maxmpxct);
8445 ndr->depth--;
8448 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1534(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1534 *r)
8450 if (ndr_flags & NDR_SCALARS) {
8451 NDR_CHECK(ndr_push_align(ndr, 4));
8452 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->oplockbreakwait));
8454 if (ndr_flags & NDR_BUFFERS) {
8456 return NDR_ERR_SUCCESS;
8459 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1534(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1534 *r)
8461 if (ndr_flags & NDR_SCALARS) {
8462 NDR_CHECK(ndr_pull_align(ndr, 4));
8463 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->oplockbreakwait));
8465 if (ndr_flags & NDR_BUFFERS) {
8467 return NDR_ERR_SUCCESS;
8470 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1534(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1534 *r)
8472 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1534");
8473 ndr->depth++;
8474 ndr_print_uint32(ndr, "oplockbreakwait", r->oplockbreakwait);
8475 ndr->depth--;
8478 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1535(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1535 *r)
8480 if (ndr_flags & NDR_SCALARS) {
8481 NDR_CHECK(ndr_push_align(ndr, 4));
8482 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->oplockbreakresponsewait));
8484 if (ndr_flags & NDR_BUFFERS) {
8486 return NDR_ERR_SUCCESS;
8489 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1535(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1535 *r)
8491 if (ndr_flags & NDR_SCALARS) {
8492 NDR_CHECK(ndr_pull_align(ndr, 4));
8493 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->oplockbreakresponsewait));
8495 if (ndr_flags & NDR_BUFFERS) {
8497 return NDR_ERR_SUCCESS;
8500 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1535(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1535 *r)
8502 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1535");
8503 ndr->depth++;
8504 ndr_print_uint32(ndr, "oplockbreakresponsewait", r->oplockbreakresponsewait);
8505 ndr->depth--;
8508 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1536(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1536 *r)
8510 if (ndr_flags & NDR_SCALARS) {
8511 NDR_CHECK(ndr_push_align(ndr, 4));
8512 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableoplocks));
8514 if (ndr_flags & NDR_BUFFERS) {
8516 return NDR_ERR_SUCCESS;
8519 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1536(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1536 *r)
8521 if (ndr_flags & NDR_SCALARS) {
8522 NDR_CHECK(ndr_pull_align(ndr, 4));
8523 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableoplocks));
8525 if (ndr_flags & NDR_BUFFERS) {
8527 return NDR_ERR_SUCCESS;
8530 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1536(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1536 *r)
8532 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1536");
8533 ndr->depth++;
8534 ndr_print_uint32(ndr, "enableoplocks", r->enableoplocks);
8535 ndr->depth--;
8538 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1537(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1537 *r)
8540 if (ndr_flags & NDR_SCALARS) {
8541 NDR_CHECK(ndr_push_align(ndr, 4));
8542 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableoplockforceclose));
8544 if (ndr_flags & NDR_BUFFERS) {
8546 return NDR_ERR_SUCCESS;
8549 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1537(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1537 *r)
8551 if (ndr_flags & NDR_SCALARS) {
8552 NDR_CHECK(ndr_pull_align(ndr, 4));
8553 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableoplockforceclose));
8555 if (ndr_flags & NDR_BUFFERS) {
8557 return NDR_ERR_SUCCESS;
8560 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1537(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1537 *r)
8562 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1537");
8563 ndr->depth++;
8564 ndr_print_uint32(ndr, "enableoplockforceclose", r->enableoplockforceclose);
8565 ndr->depth--;
8568 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1538(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1538 *r)
8570 if (ndr_flags & NDR_SCALARS) {
8571 NDR_CHECK(ndr_push_align(ndr, 4));
8572 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablefcbopens));
8574 if (ndr_flags & NDR_BUFFERS) {
8576 return NDR_ERR_SUCCESS;
8579 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1538(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1538 *r)
8581 if (ndr_flags & NDR_SCALARS) {
8582 NDR_CHECK(ndr_pull_align(ndr, 4));
8583 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablefcbopens));
8585 if (ndr_flags & NDR_BUFFERS) {
8587 return NDR_ERR_SUCCESS;
8590 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1538(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1538 *r)
8592 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1538");
8593 ndr->depth++;
8594 ndr_print_uint32(ndr, "enablefcbopens", r->enablefcbopens);
8595 ndr->depth--;
8598 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1539(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1539 *r)
8600 if (ndr_flags & NDR_SCALARS) {
8601 NDR_CHECK(ndr_push_align(ndr, 4));
8602 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableraw));
8604 if (ndr_flags & NDR_BUFFERS) {
8606 return NDR_ERR_SUCCESS;
8609 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1539(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1539 *r)
8611 if (ndr_flags & NDR_SCALARS) {
8612 NDR_CHECK(ndr_pull_align(ndr, 4));
8613 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableraw));
8615 if (ndr_flags & NDR_BUFFERS) {
8617 return NDR_ERR_SUCCESS;
8620 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1539(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1539 *r)
8622 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1539");
8623 ndr->depth++;
8624 ndr_print_uint32(ndr, "enableraw", r->enableraw);
8625 ndr->depth--;
8628 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1540(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1540 *r)
8630 if (ndr_flags & NDR_SCALARS) {
8631 NDR_CHECK(ndr_push_align(ndr, 4));
8632 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesharednetdrives));
8634 if (ndr_flags & NDR_BUFFERS) {
8636 return NDR_ERR_SUCCESS;
8639 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1540(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1540 *r)
8641 if (ndr_flags & NDR_SCALARS) {
8642 NDR_CHECK(ndr_pull_align(ndr, 4));
8643 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesharednetdrives));
8645 if (ndr_flags & NDR_BUFFERS) {
8647 return NDR_ERR_SUCCESS;
8650 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1540(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1540 *r)
8652 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1540");
8653 ndr->depth++;
8654 ndr_print_uint32(ndr, "enablesharednetdrives", r->enablesharednetdrives);
8655 ndr->depth--;
8658 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1541(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1541 *r)
8660 if (ndr_flags & NDR_SCALARS) {
8661 NDR_CHECK(ndr_push_align(ndr, 4));
8662 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minfreeconnections));
8664 if (ndr_flags & NDR_BUFFERS) {
8666 return NDR_ERR_SUCCESS;
8669 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1541(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1541 *r)
8671 if (ndr_flags & NDR_SCALARS) {
8672 NDR_CHECK(ndr_pull_align(ndr, 4));
8673 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minfreeconnections));
8675 if (ndr_flags & NDR_BUFFERS) {
8677 return NDR_ERR_SUCCESS;
8680 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1541(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1541 *r)
8682 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1541");
8683 ndr->depth++;
8684 ndr_print_uint32(ndr, "minfreeconnections", r->minfreeconnections);
8685 ndr->depth--;
8688 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1542(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1542 *r)
8690 if (ndr_flags & NDR_SCALARS) {
8691 NDR_CHECK(ndr_push_align(ndr, 4));
8692 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxfreeconnections));
8694 if (ndr_flags & NDR_BUFFERS) {
8696 return NDR_ERR_SUCCESS;
8699 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1542(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1542 *r)
8701 if (ndr_flags & NDR_SCALARS) {
8702 NDR_CHECK(ndr_pull_align(ndr, 4));
8703 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxfreeconnections));
8705 if (ndr_flags & NDR_BUFFERS) {
8707 return NDR_ERR_SUCCESS;
8710 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1542(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1542 *r)
8712 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1542");
8713 ndr->depth++;
8714 ndr_print_uint32(ndr, "maxfreeconnections", r->maxfreeconnections);
8715 ndr->depth--;
8718 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1543(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1543 *r)
8720 if (ndr_flags & NDR_SCALARS) {
8721 NDR_CHECK(ndr_push_align(ndr, 4));
8722 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initsesstable));
8724 if (ndr_flags & NDR_BUFFERS) {
8726 return NDR_ERR_SUCCESS;
8729 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1543(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1543 *r)
8731 if (ndr_flags & NDR_SCALARS) {
8732 NDR_CHECK(ndr_pull_align(ndr, 4));
8733 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initsesstable));
8735 if (ndr_flags & NDR_BUFFERS) {
8737 return NDR_ERR_SUCCESS;
8740 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1543(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1543 *r)
8742 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1543");
8743 ndr->depth++;
8744 ndr_print_uint32(ndr, "initsesstable", r->initsesstable);
8745 ndr->depth--;
8748 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1544(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1544 *r)
8750 if (ndr_flags & NDR_SCALARS) {
8751 NDR_CHECK(ndr_push_align(ndr, 4));
8752 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initconntable));
8754 if (ndr_flags & NDR_BUFFERS) {
8756 return NDR_ERR_SUCCESS;
8759 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1544(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1544 *r)
8761 if (ndr_flags & NDR_SCALARS) {
8762 NDR_CHECK(ndr_pull_align(ndr, 4));
8763 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initconntable));
8765 if (ndr_flags & NDR_BUFFERS) {
8767 return NDR_ERR_SUCCESS;
8770 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1544(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1544 *r)
8772 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1544");
8773 ndr->depth++;
8774 ndr_print_uint32(ndr, "initconntable", r->initconntable);
8775 ndr->depth--;
8778 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1545(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1545 *r)
8780 if (ndr_flags & NDR_SCALARS) {
8781 NDR_CHECK(ndr_push_align(ndr, 4));
8782 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initfiletable));
8784 if (ndr_flags & NDR_BUFFERS) {
8786 return NDR_ERR_SUCCESS;
8789 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1545(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1545 *r)
8791 if (ndr_flags & NDR_SCALARS) {
8792 NDR_CHECK(ndr_pull_align(ndr, 4));
8793 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initfiletable));
8795 if (ndr_flags & NDR_BUFFERS) {
8797 return NDR_ERR_SUCCESS;
8800 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1545(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1545 *r)
8802 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1545");
8803 ndr->depth++;
8804 ndr_print_uint32(ndr, "initfiletable", r->initfiletable);
8805 ndr->depth--;
8808 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1546(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1546 *r)
8810 if (ndr_flags & NDR_SCALARS) {
8811 NDR_CHECK(ndr_push_align(ndr, 4));
8812 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initsearchtable));
8814 if (ndr_flags & NDR_BUFFERS) {
8816 return NDR_ERR_SUCCESS;
8819 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1546(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1546 *r)
8821 if (ndr_flags & NDR_SCALARS) {
8822 NDR_CHECK(ndr_pull_align(ndr, 4));
8823 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initsearchtable));
8825 if (ndr_flags & NDR_BUFFERS) {
8827 return NDR_ERR_SUCCESS;
8830 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1546(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1546 *r)
8832 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1546");
8833 ndr->depth++;
8834 ndr_print_uint32(ndr, "initsearchtable", r->initsearchtable);
8835 ndr->depth--;
8838 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1547(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1547 *r)
8840 if (ndr_flags & NDR_SCALARS) {
8841 NDR_CHECK(ndr_push_align(ndr, 4));
8842 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->alertsched));
8844 if (ndr_flags & NDR_BUFFERS) {
8846 return NDR_ERR_SUCCESS;
8849 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1547(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1547 *r)
8851 if (ndr_flags & NDR_SCALARS) {
8852 NDR_CHECK(ndr_pull_align(ndr, 4));
8853 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->alertsched));
8855 if (ndr_flags & NDR_BUFFERS) {
8857 return NDR_ERR_SUCCESS;
8860 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1547(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1547 *r)
8862 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1547");
8863 ndr->depth++;
8864 ndr_print_uint32(ndr, "alertsched", r->alertsched);
8865 ndr->depth--;
8868 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1548(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1548 *r)
8870 if (ndr_flags & NDR_SCALARS) {
8871 NDR_CHECK(ndr_push_align(ndr, 4));
8872 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->errortreshold));
8874 if (ndr_flags & NDR_BUFFERS) {
8876 return NDR_ERR_SUCCESS;
8879 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1548(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1548 *r)
8881 if (ndr_flags & NDR_SCALARS) {
8882 NDR_CHECK(ndr_pull_align(ndr, 4));
8883 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->errortreshold));
8885 if (ndr_flags & NDR_BUFFERS) {
8887 return NDR_ERR_SUCCESS;
8890 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1548(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1548 *r)
8892 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1548");
8893 ndr->depth++;
8894 ndr_print_uint32(ndr, "errortreshold", r->errortreshold);
8895 ndr->depth--;
8898 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1549(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1549 *r)
8900 if (ndr_flags & NDR_SCALARS) {
8901 NDR_CHECK(ndr_push_align(ndr, 4));
8902 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->networkerrortreshold));
8904 if (ndr_flags & NDR_BUFFERS) {
8906 return NDR_ERR_SUCCESS;
8909 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1549(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1549 *r)
8911 if (ndr_flags & NDR_SCALARS) {
8912 NDR_CHECK(ndr_pull_align(ndr, 4));
8913 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->networkerrortreshold));
8915 if (ndr_flags & NDR_BUFFERS) {
8917 return NDR_ERR_SUCCESS;
8920 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1549(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1549 *r)
8922 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1549");
8923 ndr->depth++;
8924 ndr_print_uint32(ndr, "networkerrortreshold", r->networkerrortreshold);
8925 ndr->depth--;
8928 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1550(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1550 *r)
8930 if (ndr_flags & NDR_SCALARS) {
8931 NDR_CHECK(ndr_push_align(ndr, 4));
8932 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->diskspacetreshold));
8934 if (ndr_flags & NDR_BUFFERS) {
8936 return NDR_ERR_SUCCESS;
8939 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1550(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1550 *r)
8941 if (ndr_flags & NDR_SCALARS) {
8942 NDR_CHECK(ndr_pull_align(ndr, 4));
8943 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->diskspacetreshold));
8945 if (ndr_flags & NDR_BUFFERS) {
8947 return NDR_ERR_SUCCESS;
8950 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1550(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1550 *r)
8952 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1550");
8953 ndr->depth++;
8954 ndr_print_uint32(ndr, "diskspacetreshold", r->diskspacetreshold);
8955 ndr->depth--;
8958 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1552(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1552 *r)
8960 if (ndr_flags & NDR_SCALARS) {
8961 NDR_CHECK(ndr_push_align(ndr, 4));
8962 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxlinkdelay));
8964 if (ndr_flags & NDR_BUFFERS) {
8966 return NDR_ERR_SUCCESS;
8969 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1552(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1552 *r)
8971 if (ndr_flags & NDR_SCALARS) {
8972 NDR_CHECK(ndr_pull_align(ndr, 4));
8973 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxlinkdelay));
8975 if (ndr_flags & NDR_BUFFERS) {
8977 return NDR_ERR_SUCCESS;
8980 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1552(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1552 *r)
8982 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1552");
8983 ndr->depth++;
8984 ndr_print_uint32(ndr, "maxlinkdelay", r->maxlinkdelay);
8985 ndr->depth--;
8988 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1553(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1553 *r)
8990 if (ndr_flags & NDR_SCALARS) {
8991 NDR_CHECK(ndr_push_align(ndr, 4));
8992 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minlinkthroughput));
8994 if (ndr_flags & NDR_BUFFERS) {
8996 return NDR_ERR_SUCCESS;
8999 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1553(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1553 *r)
9001 if (ndr_flags & NDR_SCALARS) {
9002 NDR_CHECK(ndr_pull_align(ndr, 4));
9003 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minlinkthroughput));
9005 if (ndr_flags & NDR_BUFFERS) {
9007 return NDR_ERR_SUCCESS;
9010 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1553(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1553 *r)
9012 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1553");
9013 ndr->depth++;
9014 ndr_print_uint32(ndr, "minlinkthroughput", r->minlinkthroughput);
9015 ndr->depth--;
9018 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1554(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1554 *r)
9020 if (ndr_flags & NDR_SCALARS) {
9021 NDR_CHECK(ndr_push_align(ndr, 4));
9022 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->linkinfovalidtime));
9024 if (ndr_flags & NDR_BUFFERS) {
9026 return NDR_ERR_SUCCESS;
9029 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1554(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1554 *r)
9031 if (ndr_flags & NDR_SCALARS) {
9032 NDR_CHECK(ndr_pull_align(ndr, 4));
9033 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->linkinfovalidtime));
9035 if (ndr_flags & NDR_BUFFERS) {
9037 return NDR_ERR_SUCCESS;
9040 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1554(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1554 *r)
9042 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1554");
9043 ndr->depth++;
9044 ndr_print_uint32(ndr, "linkinfovalidtime", r->linkinfovalidtime);
9045 ndr->depth--;
9048 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1555(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1555 *r)
9050 if (ndr_flags & NDR_SCALARS) {
9051 NDR_CHECK(ndr_push_align(ndr, 4));
9052 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->scavqosinfoupdatetime));
9054 if (ndr_flags & NDR_BUFFERS) {
9056 return NDR_ERR_SUCCESS;
9059 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1555(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1555 *r)
9061 if (ndr_flags & NDR_SCALARS) {
9062 NDR_CHECK(ndr_pull_align(ndr, 4));
9063 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->scavqosinfoupdatetime));
9065 if (ndr_flags & NDR_BUFFERS) {
9067 return NDR_ERR_SUCCESS;
9070 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1555(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1555 *r)
9072 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1555");
9073 ndr->depth++;
9074 ndr_print_uint32(ndr, "scavqosinfoupdatetime", r->scavqosinfoupdatetime);
9075 ndr->depth--;
9078 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1556(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1556 *r)
9080 if (ndr_flags & NDR_SCALARS) {
9081 NDR_CHECK(ndr_push_align(ndr, 4));
9082 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxworkitemidletime));
9084 if (ndr_flags & NDR_BUFFERS) {
9086 return NDR_ERR_SUCCESS;
9089 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1556(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1556 *r)
9091 if (ndr_flags & NDR_SCALARS) {
9092 NDR_CHECK(ndr_pull_align(ndr, 4));
9093 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxworkitemidletime));
9095 if (ndr_flags & NDR_BUFFERS) {
9097 return NDR_ERR_SUCCESS;
9100 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1556(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1556 *r)
9102 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1556");
9103 ndr->depth++;
9104 ndr_print_uint32(ndr, "maxworkitemidletime", r->maxworkitemidletime);
9105 ndr->depth--;
9108 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetSrvInfo *r)
9110 if (ndr_flags & NDR_SCALARS) {
9111 int level = ndr_push_get_switch_value(ndr, r);
9112 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
9113 switch (level) {
9114 case 100: {
9115 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info100));
9116 break; }
9118 case 101: {
9119 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info101));
9120 break; }
9122 case 102: {
9123 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info102));
9124 break; }
9126 case 402: {
9127 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info402));
9128 break; }
9130 case 403: {
9131 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info403));
9132 break; }
9134 case 502: {
9135 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info502));
9136 break; }
9138 case 503: {
9139 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info503));
9140 break; }
9142 case 599: {
9143 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info599));
9144 break; }
9146 case 1005: {
9147 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1005));
9148 break; }
9150 case 1010: {
9151 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1010));
9152 break; }
9154 case 1016: {
9155 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1016));
9156 break; }
9158 case 1017: {
9159 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1017));
9160 break; }
9162 case 1018: {
9163 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1018));
9164 break; }
9166 case 1107: {
9167 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1107));
9168 break; }
9170 case 1501: {
9171 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1501));
9172 break; }
9174 case 1502: {
9175 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1502));
9176 break; }
9178 case 1503: {
9179 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1503));
9180 break; }
9182 case 1506: {
9183 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1506));
9184 break; }
9186 case 1509: {
9187 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1509));
9188 break; }
9190 case 1510: {
9191 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1510));
9192 break; }
9194 case 1511: {
9195 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1511));
9196 break; }
9198 case 1512: {
9199 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1512));
9200 break; }
9202 case 1513: {
9203 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1513));
9204 break; }
9206 case 1514: {
9207 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1514));
9208 break; }
9210 case 1515: {
9211 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1515));
9212 break; }
9214 case 1516: {
9215 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1516));
9216 break; }
9218 case 1518: {
9219 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1518));
9220 break; }
9222 case 1520: {
9223 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1520));
9224 break; }
9226 case 1521: {
9227 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1521));
9228 break; }
9230 case 1522: {
9231 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1522));
9232 break; }
9234 case 1523: {
9235 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1523));
9236 break; }
9238 case 1524: {
9239 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1524));
9240 break; }
9242 case 1525: {
9243 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1525));
9244 break; }
9246 case 1528: {
9247 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1528));
9248 break; }
9250 case 1529: {
9251 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1529));
9252 break; }
9254 case 1530: {
9255 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1530));
9256 break; }
9258 case 1533: {
9259 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1533));
9260 break; }
9262 case 1534: {
9263 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1534));
9264 break; }
9266 case 1535: {
9267 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1535));
9268 break; }
9270 case 1536: {
9271 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1536));
9272 break; }
9274 case 1537: {
9275 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1537));
9276 break; }
9278 case 1538: {
9279 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1538));
9280 break; }
9282 case 1539: {
9283 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1539));
9284 break; }
9286 case 1540: {
9287 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1540));
9288 break; }
9290 case 1541: {
9291 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1541));
9292 break; }
9294 case 1542: {
9295 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1542));
9296 break; }
9298 case 1543: {
9299 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1543));
9300 break; }
9302 case 1544: {
9303 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1544));
9304 break; }
9306 case 1545: {
9307 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1545));
9308 break; }
9310 case 1546: {
9311 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1546));
9312 break; }
9314 case 1547: {
9315 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1547));
9316 break; }
9318 case 1548: {
9319 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1548));
9320 break; }
9322 case 1549: {
9323 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1549));
9324 break; }
9326 case 1550: {
9327 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1550));
9328 break; }
9330 case 1552: {
9331 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1552));
9332 break; }
9334 case 1553: {
9335 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1553));
9336 break; }
9338 case 1554: {
9339 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1554));
9340 break; }
9342 case 1555: {
9343 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1555));
9344 break; }
9346 case 1556: {
9347 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1556));
9348 break; }
9350 default: {
9351 break; }
9355 if (ndr_flags & NDR_BUFFERS) {
9356 int level = ndr_push_get_switch_value(ndr, r);
9357 switch (level) {
9358 case 100:
9359 if (r->info100) {
9360 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo100(ndr, NDR_SCALARS|NDR_BUFFERS, r->info100));
9362 break;
9364 case 101:
9365 if (r->info101) {
9366 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo101(ndr, NDR_SCALARS|NDR_BUFFERS, r->info101));
9368 break;
9370 case 102:
9371 if (r->info102) {
9372 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo102(ndr, NDR_SCALARS|NDR_BUFFERS, r->info102));
9374 break;
9376 case 402:
9377 if (r->info402) {
9378 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo402(ndr, NDR_SCALARS|NDR_BUFFERS, r->info402));
9380 break;
9382 case 403:
9383 if (r->info403) {
9384 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo403(ndr, NDR_SCALARS|NDR_BUFFERS, r->info403));
9386 break;
9388 case 502:
9389 if (r->info502) {
9390 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo502(ndr, NDR_SCALARS, r->info502));
9392 break;
9394 case 503:
9395 if (r->info503) {
9396 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo503(ndr, NDR_SCALARS|NDR_BUFFERS, r->info503));
9398 break;
9400 case 599:
9401 if (r->info599) {
9402 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo599(ndr, NDR_SCALARS|NDR_BUFFERS, r->info599));
9404 break;
9406 case 1005:
9407 if (r->info1005) {
9408 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1005(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1005));
9410 break;
9412 case 1010:
9413 if (r->info1010) {
9414 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1010(ndr, NDR_SCALARS, r->info1010));
9416 break;
9418 case 1016:
9419 if (r->info1016) {
9420 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1016(ndr, NDR_SCALARS, r->info1016));
9422 break;
9424 case 1017:
9425 if (r->info1017) {
9426 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1017(ndr, NDR_SCALARS, r->info1017));
9428 break;
9430 case 1018:
9431 if (r->info1018) {
9432 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1018(ndr, NDR_SCALARS, r->info1018));
9434 break;
9436 case 1107:
9437 if (r->info1107) {
9438 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1107(ndr, NDR_SCALARS, r->info1107));
9440 break;
9442 case 1501:
9443 if (r->info1501) {
9444 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1501(ndr, NDR_SCALARS, r->info1501));
9446 break;
9448 case 1502:
9449 if (r->info1502) {
9450 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1502(ndr, NDR_SCALARS, r->info1502));
9452 break;
9454 case 1503:
9455 if (r->info1503) {
9456 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1503(ndr, NDR_SCALARS, r->info1503));
9458 break;
9460 case 1506:
9461 if (r->info1506) {
9462 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1506(ndr, NDR_SCALARS, r->info1506));
9464 break;
9466 case 1509:
9467 if (r->info1509) {
9468 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1509(ndr, NDR_SCALARS, r->info1509));
9470 break;
9472 case 1510:
9473 if (r->info1510) {
9474 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1510(ndr, NDR_SCALARS, r->info1510));
9476 break;
9478 case 1511:
9479 if (r->info1511) {
9480 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1511(ndr, NDR_SCALARS, r->info1511));
9482 break;
9484 case 1512:
9485 if (r->info1512) {
9486 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1512(ndr, NDR_SCALARS, r->info1512));
9488 break;
9490 case 1513:
9491 if (r->info1513) {
9492 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1513(ndr, NDR_SCALARS, r->info1513));
9494 break;
9496 case 1514:
9497 if (r->info1514) {
9498 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1514(ndr, NDR_SCALARS, r->info1514));
9500 break;
9502 case 1515:
9503 if (r->info1515) {
9504 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1515(ndr, NDR_SCALARS, r->info1515));
9506 break;
9508 case 1516:
9509 if (r->info1516) {
9510 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1516(ndr, NDR_SCALARS, r->info1516));
9512 break;
9514 case 1518:
9515 if (r->info1518) {
9516 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1518(ndr, NDR_SCALARS, r->info1518));
9518 break;
9520 case 1520:
9521 if (r->info1520) {
9522 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1520(ndr, NDR_SCALARS, r->info1520));
9524 break;
9526 case 1521:
9527 if (r->info1521) {
9528 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1521(ndr, NDR_SCALARS, r->info1521));
9530 break;
9532 case 1522:
9533 if (r->info1522) {
9534 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1522(ndr, NDR_SCALARS, r->info1522));
9536 break;
9538 case 1523:
9539 if (r->info1523) {
9540 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1523(ndr, NDR_SCALARS, r->info1523));
9542 break;
9544 case 1524:
9545 if (r->info1524) {
9546 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1524(ndr, NDR_SCALARS, r->info1524));
9548 break;
9550 case 1525:
9551 if (r->info1525) {
9552 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1525(ndr, NDR_SCALARS, r->info1525));
9554 break;
9556 case 1528:
9557 if (r->info1528) {
9558 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1528(ndr, NDR_SCALARS, r->info1528));
9560 break;
9562 case 1529:
9563 if (r->info1529) {
9564 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1529(ndr, NDR_SCALARS, r->info1529));
9566 break;
9568 case 1530:
9569 if (r->info1530) {
9570 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1530(ndr, NDR_SCALARS, r->info1530));
9572 break;
9574 case 1533:
9575 if (r->info1533) {
9576 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1533(ndr, NDR_SCALARS, r->info1533));
9578 break;
9580 case 1534:
9581 if (r->info1534) {
9582 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1534(ndr, NDR_SCALARS, r->info1534));
9584 break;
9586 case 1535:
9587 if (r->info1535) {
9588 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1535(ndr, NDR_SCALARS, r->info1535));
9590 break;
9592 case 1536:
9593 if (r->info1536) {
9594 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1536(ndr, NDR_SCALARS, r->info1536));
9596 break;
9598 case 1537:
9599 if (r->info1537) {
9600 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1537(ndr, NDR_SCALARS, r->info1537));
9602 break;
9604 case 1538:
9605 if (r->info1538) {
9606 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1538(ndr, NDR_SCALARS, r->info1538));
9608 break;
9610 case 1539:
9611 if (r->info1539) {
9612 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1539(ndr, NDR_SCALARS, r->info1539));
9614 break;
9616 case 1540:
9617 if (r->info1540) {
9618 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1540(ndr, NDR_SCALARS, r->info1540));
9620 break;
9622 case 1541:
9623 if (r->info1541) {
9624 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1541(ndr, NDR_SCALARS, r->info1541));
9626 break;
9628 case 1542:
9629 if (r->info1542) {
9630 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1542(ndr, NDR_SCALARS, r->info1542));
9632 break;
9634 case 1543:
9635 if (r->info1543) {
9636 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1543(ndr, NDR_SCALARS, r->info1543));
9638 break;
9640 case 1544:
9641 if (r->info1544) {
9642 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1544(ndr, NDR_SCALARS, r->info1544));
9644 break;
9646 case 1545:
9647 if (r->info1545) {
9648 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1545(ndr, NDR_SCALARS, r->info1545));
9650 break;
9652 case 1546:
9653 if (r->info1546) {
9654 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1546(ndr, NDR_SCALARS, r->info1546));
9656 break;
9658 case 1547:
9659 if (r->info1547) {
9660 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1547(ndr, NDR_SCALARS, r->info1547));
9662 break;
9664 case 1548:
9665 if (r->info1548) {
9666 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1548(ndr, NDR_SCALARS, r->info1548));
9668 break;
9670 case 1549:
9671 if (r->info1549) {
9672 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1549(ndr, NDR_SCALARS, r->info1549));
9674 break;
9676 case 1550:
9677 if (r->info1550) {
9678 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1550(ndr, NDR_SCALARS, r->info1550));
9680 break;
9682 case 1552:
9683 if (r->info1552) {
9684 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1552(ndr, NDR_SCALARS, r->info1552));
9686 break;
9688 case 1553:
9689 if (r->info1553) {
9690 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1553(ndr, NDR_SCALARS, r->info1553));
9692 break;
9694 case 1554:
9695 if (r->info1554) {
9696 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1554(ndr, NDR_SCALARS, r->info1554));
9698 break;
9700 case 1555:
9701 if (r->info1555) {
9702 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1555(ndr, NDR_SCALARS, r->info1555));
9704 break;
9706 case 1556:
9707 if (r->info1556) {
9708 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1556(ndr, NDR_SCALARS, r->info1556));
9710 break;
9712 default:
9713 break;
9717 return NDR_ERR_SUCCESS;
9720 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetSrvInfo *r)
9722 int level;
9723 uint32_t _level;
9724 TALLOC_CTX *_mem_save_info100_0;
9725 TALLOC_CTX *_mem_save_info101_0;
9726 TALLOC_CTX *_mem_save_info102_0;
9727 TALLOC_CTX *_mem_save_info402_0;
9728 TALLOC_CTX *_mem_save_info403_0;
9729 TALLOC_CTX *_mem_save_info502_0;
9730 TALLOC_CTX *_mem_save_info503_0;
9731 TALLOC_CTX *_mem_save_info599_0;
9732 TALLOC_CTX *_mem_save_info1005_0;
9733 TALLOC_CTX *_mem_save_info1010_0;
9734 TALLOC_CTX *_mem_save_info1016_0;
9735 TALLOC_CTX *_mem_save_info1017_0;
9736 TALLOC_CTX *_mem_save_info1018_0;
9737 TALLOC_CTX *_mem_save_info1107_0;
9738 TALLOC_CTX *_mem_save_info1501_0;
9739 TALLOC_CTX *_mem_save_info1502_0;
9740 TALLOC_CTX *_mem_save_info1503_0;
9741 TALLOC_CTX *_mem_save_info1506_0;
9742 TALLOC_CTX *_mem_save_info1509_0;
9743 TALLOC_CTX *_mem_save_info1510_0;
9744 TALLOC_CTX *_mem_save_info1511_0;
9745 TALLOC_CTX *_mem_save_info1512_0;
9746 TALLOC_CTX *_mem_save_info1513_0;
9747 TALLOC_CTX *_mem_save_info1514_0;
9748 TALLOC_CTX *_mem_save_info1515_0;
9749 TALLOC_CTX *_mem_save_info1516_0;
9750 TALLOC_CTX *_mem_save_info1518_0;
9751 TALLOC_CTX *_mem_save_info1520_0;
9752 TALLOC_CTX *_mem_save_info1521_0;
9753 TALLOC_CTX *_mem_save_info1522_0;
9754 TALLOC_CTX *_mem_save_info1523_0;
9755 TALLOC_CTX *_mem_save_info1524_0;
9756 TALLOC_CTX *_mem_save_info1525_0;
9757 TALLOC_CTX *_mem_save_info1528_0;
9758 TALLOC_CTX *_mem_save_info1529_0;
9759 TALLOC_CTX *_mem_save_info1530_0;
9760 TALLOC_CTX *_mem_save_info1533_0;
9761 TALLOC_CTX *_mem_save_info1534_0;
9762 TALLOC_CTX *_mem_save_info1535_0;
9763 TALLOC_CTX *_mem_save_info1536_0;
9764 TALLOC_CTX *_mem_save_info1537_0;
9765 TALLOC_CTX *_mem_save_info1538_0;
9766 TALLOC_CTX *_mem_save_info1539_0;
9767 TALLOC_CTX *_mem_save_info1540_0;
9768 TALLOC_CTX *_mem_save_info1541_0;
9769 TALLOC_CTX *_mem_save_info1542_0;
9770 TALLOC_CTX *_mem_save_info1543_0;
9771 TALLOC_CTX *_mem_save_info1544_0;
9772 TALLOC_CTX *_mem_save_info1545_0;
9773 TALLOC_CTX *_mem_save_info1546_0;
9774 TALLOC_CTX *_mem_save_info1547_0;
9775 TALLOC_CTX *_mem_save_info1548_0;
9776 TALLOC_CTX *_mem_save_info1549_0;
9777 TALLOC_CTX *_mem_save_info1550_0;
9778 TALLOC_CTX *_mem_save_info1552_0;
9779 TALLOC_CTX *_mem_save_info1553_0;
9780 TALLOC_CTX *_mem_save_info1554_0;
9781 TALLOC_CTX *_mem_save_info1555_0;
9782 TALLOC_CTX *_mem_save_info1556_0;
9783 level = ndr_pull_get_switch_value(ndr, r);
9784 if (ndr_flags & NDR_SCALARS) {
9785 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
9786 if (_level != level) {
9787 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
9789 switch (level) {
9790 case 100: {
9791 uint32_t _ptr_info100;
9792 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info100));
9793 if (_ptr_info100) {
9794 NDR_PULL_ALLOC(ndr, r->info100);
9795 } else {
9796 r->info100 = NULL;
9798 break; }
9800 case 101: {
9801 uint32_t _ptr_info101;
9802 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info101));
9803 if (_ptr_info101) {
9804 NDR_PULL_ALLOC(ndr, r->info101);
9805 } else {
9806 r->info101 = NULL;
9808 break; }
9810 case 102: {
9811 uint32_t _ptr_info102;
9812 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info102));
9813 if (_ptr_info102) {
9814 NDR_PULL_ALLOC(ndr, r->info102);
9815 } else {
9816 r->info102 = NULL;
9818 break; }
9820 case 402: {
9821 uint32_t _ptr_info402;
9822 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info402));
9823 if (_ptr_info402) {
9824 NDR_PULL_ALLOC(ndr, r->info402);
9825 } else {
9826 r->info402 = NULL;
9828 break; }
9830 case 403: {
9831 uint32_t _ptr_info403;
9832 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info403));
9833 if (_ptr_info403) {
9834 NDR_PULL_ALLOC(ndr, r->info403);
9835 } else {
9836 r->info403 = NULL;
9838 break; }
9840 case 502: {
9841 uint32_t _ptr_info502;
9842 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info502));
9843 if (_ptr_info502) {
9844 NDR_PULL_ALLOC(ndr, r->info502);
9845 } else {
9846 r->info502 = NULL;
9848 break; }
9850 case 503: {
9851 uint32_t _ptr_info503;
9852 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info503));
9853 if (_ptr_info503) {
9854 NDR_PULL_ALLOC(ndr, r->info503);
9855 } else {
9856 r->info503 = NULL;
9858 break; }
9860 case 599: {
9861 uint32_t _ptr_info599;
9862 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info599));
9863 if (_ptr_info599) {
9864 NDR_PULL_ALLOC(ndr, r->info599);
9865 } else {
9866 r->info599 = NULL;
9868 break; }
9870 case 1005: {
9871 uint32_t _ptr_info1005;
9872 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1005));
9873 if (_ptr_info1005) {
9874 NDR_PULL_ALLOC(ndr, r->info1005);
9875 } else {
9876 r->info1005 = NULL;
9878 break; }
9880 case 1010: {
9881 uint32_t _ptr_info1010;
9882 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1010));
9883 if (_ptr_info1010) {
9884 NDR_PULL_ALLOC(ndr, r->info1010);
9885 } else {
9886 r->info1010 = NULL;
9888 break; }
9890 case 1016: {
9891 uint32_t _ptr_info1016;
9892 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1016));
9893 if (_ptr_info1016) {
9894 NDR_PULL_ALLOC(ndr, r->info1016);
9895 } else {
9896 r->info1016 = NULL;
9898 break; }
9900 case 1017: {
9901 uint32_t _ptr_info1017;
9902 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1017));
9903 if (_ptr_info1017) {
9904 NDR_PULL_ALLOC(ndr, r->info1017);
9905 } else {
9906 r->info1017 = NULL;
9908 break; }
9910 case 1018: {
9911 uint32_t _ptr_info1018;
9912 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1018));
9913 if (_ptr_info1018) {
9914 NDR_PULL_ALLOC(ndr, r->info1018);
9915 } else {
9916 r->info1018 = NULL;
9918 break; }
9920 case 1107: {
9921 uint32_t _ptr_info1107;
9922 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1107));
9923 if (_ptr_info1107) {
9924 NDR_PULL_ALLOC(ndr, r->info1107);
9925 } else {
9926 r->info1107 = NULL;
9928 break; }
9930 case 1501: {
9931 uint32_t _ptr_info1501;
9932 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1501));
9933 if (_ptr_info1501) {
9934 NDR_PULL_ALLOC(ndr, r->info1501);
9935 } else {
9936 r->info1501 = NULL;
9938 break; }
9940 case 1502: {
9941 uint32_t _ptr_info1502;
9942 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1502));
9943 if (_ptr_info1502) {
9944 NDR_PULL_ALLOC(ndr, r->info1502);
9945 } else {
9946 r->info1502 = NULL;
9948 break; }
9950 case 1503: {
9951 uint32_t _ptr_info1503;
9952 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1503));
9953 if (_ptr_info1503) {
9954 NDR_PULL_ALLOC(ndr, r->info1503);
9955 } else {
9956 r->info1503 = NULL;
9958 break; }
9960 case 1506: {
9961 uint32_t _ptr_info1506;
9962 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1506));
9963 if (_ptr_info1506) {
9964 NDR_PULL_ALLOC(ndr, r->info1506);
9965 } else {
9966 r->info1506 = NULL;
9968 break; }
9970 case 1509: {
9971 uint32_t _ptr_info1509;
9972 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1509));
9973 if (_ptr_info1509) {
9974 NDR_PULL_ALLOC(ndr, r->info1509);
9975 } else {
9976 r->info1509 = NULL;
9978 break; }
9980 case 1510: {
9981 uint32_t _ptr_info1510;
9982 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1510));
9983 if (_ptr_info1510) {
9984 NDR_PULL_ALLOC(ndr, r->info1510);
9985 } else {
9986 r->info1510 = NULL;
9988 break; }
9990 case 1511: {
9991 uint32_t _ptr_info1511;
9992 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1511));
9993 if (_ptr_info1511) {
9994 NDR_PULL_ALLOC(ndr, r->info1511);
9995 } else {
9996 r->info1511 = NULL;
9998 break; }
10000 case 1512: {
10001 uint32_t _ptr_info1512;
10002 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1512));
10003 if (_ptr_info1512) {
10004 NDR_PULL_ALLOC(ndr, r->info1512);
10005 } else {
10006 r->info1512 = NULL;
10008 break; }
10010 case 1513: {
10011 uint32_t _ptr_info1513;
10012 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1513));
10013 if (_ptr_info1513) {
10014 NDR_PULL_ALLOC(ndr, r->info1513);
10015 } else {
10016 r->info1513 = NULL;
10018 break; }
10020 case 1514: {
10021 uint32_t _ptr_info1514;
10022 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1514));
10023 if (_ptr_info1514) {
10024 NDR_PULL_ALLOC(ndr, r->info1514);
10025 } else {
10026 r->info1514 = NULL;
10028 break; }
10030 case 1515: {
10031 uint32_t _ptr_info1515;
10032 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1515));
10033 if (_ptr_info1515) {
10034 NDR_PULL_ALLOC(ndr, r->info1515);
10035 } else {
10036 r->info1515 = NULL;
10038 break; }
10040 case 1516: {
10041 uint32_t _ptr_info1516;
10042 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1516));
10043 if (_ptr_info1516) {
10044 NDR_PULL_ALLOC(ndr, r->info1516);
10045 } else {
10046 r->info1516 = NULL;
10048 break; }
10050 case 1518: {
10051 uint32_t _ptr_info1518;
10052 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1518));
10053 if (_ptr_info1518) {
10054 NDR_PULL_ALLOC(ndr, r->info1518);
10055 } else {
10056 r->info1518 = NULL;
10058 break; }
10060 case 1520: {
10061 uint32_t _ptr_info1520;
10062 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1520));
10063 if (_ptr_info1520) {
10064 NDR_PULL_ALLOC(ndr, r->info1520);
10065 } else {
10066 r->info1520 = NULL;
10068 break; }
10070 case 1521: {
10071 uint32_t _ptr_info1521;
10072 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1521));
10073 if (_ptr_info1521) {
10074 NDR_PULL_ALLOC(ndr, r->info1521);
10075 } else {
10076 r->info1521 = NULL;
10078 break; }
10080 case 1522: {
10081 uint32_t _ptr_info1522;
10082 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1522));
10083 if (_ptr_info1522) {
10084 NDR_PULL_ALLOC(ndr, r->info1522);
10085 } else {
10086 r->info1522 = NULL;
10088 break; }
10090 case 1523: {
10091 uint32_t _ptr_info1523;
10092 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1523));
10093 if (_ptr_info1523) {
10094 NDR_PULL_ALLOC(ndr, r->info1523);
10095 } else {
10096 r->info1523 = NULL;
10098 break; }
10100 case 1524: {
10101 uint32_t _ptr_info1524;
10102 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1524));
10103 if (_ptr_info1524) {
10104 NDR_PULL_ALLOC(ndr, r->info1524);
10105 } else {
10106 r->info1524 = NULL;
10108 break; }
10110 case 1525: {
10111 uint32_t _ptr_info1525;
10112 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1525));
10113 if (_ptr_info1525) {
10114 NDR_PULL_ALLOC(ndr, r->info1525);
10115 } else {
10116 r->info1525 = NULL;
10118 break; }
10120 case 1528: {
10121 uint32_t _ptr_info1528;
10122 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1528));
10123 if (_ptr_info1528) {
10124 NDR_PULL_ALLOC(ndr, r->info1528);
10125 } else {
10126 r->info1528 = NULL;
10128 break; }
10130 case 1529: {
10131 uint32_t _ptr_info1529;
10132 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1529));
10133 if (_ptr_info1529) {
10134 NDR_PULL_ALLOC(ndr, r->info1529);
10135 } else {
10136 r->info1529 = NULL;
10138 break; }
10140 case 1530: {
10141 uint32_t _ptr_info1530;
10142 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1530));
10143 if (_ptr_info1530) {
10144 NDR_PULL_ALLOC(ndr, r->info1530);
10145 } else {
10146 r->info1530 = NULL;
10148 break; }
10150 case 1533: {
10151 uint32_t _ptr_info1533;
10152 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1533));
10153 if (_ptr_info1533) {
10154 NDR_PULL_ALLOC(ndr, r->info1533);
10155 } else {
10156 r->info1533 = NULL;
10158 break; }
10160 case 1534: {
10161 uint32_t _ptr_info1534;
10162 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1534));
10163 if (_ptr_info1534) {
10164 NDR_PULL_ALLOC(ndr, r->info1534);
10165 } else {
10166 r->info1534 = NULL;
10168 break; }
10170 case 1535: {
10171 uint32_t _ptr_info1535;
10172 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1535));
10173 if (_ptr_info1535) {
10174 NDR_PULL_ALLOC(ndr, r->info1535);
10175 } else {
10176 r->info1535 = NULL;
10178 break; }
10180 case 1536: {
10181 uint32_t _ptr_info1536;
10182 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1536));
10183 if (_ptr_info1536) {
10184 NDR_PULL_ALLOC(ndr, r->info1536);
10185 } else {
10186 r->info1536 = NULL;
10188 break; }
10190 case 1537: {
10191 uint32_t _ptr_info1537;
10192 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1537));
10193 if (_ptr_info1537) {
10194 NDR_PULL_ALLOC(ndr, r->info1537);
10195 } else {
10196 r->info1537 = NULL;
10198 break; }
10200 case 1538: {
10201 uint32_t _ptr_info1538;
10202 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1538));
10203 if (_ptr_info1538) {
10204 NDR_PULL_ALLOC(ndr, r->info1538);
10205 } else {
10206 r->info1538 = NULL;
10208 break; }
10210 case 1539: {
10211 uint32_t _ptr_info1539;
10212 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1539));
10213 if (_ptr_info1539) {
10214 NDR_PULL_ALLOC(ndr, r->info1539);
10215 } else {
10216 r->info1539 = NULL;
10218 break; }
10220 case 1540: {
10221 uint32_t _ptr_info1540;
10222 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1540));
10223 if (_ptr_info1540) {
10224 NDR_PULL_ALLOC(ndr, r->info1540);
10225 } else {
10226 r->info1540 = NULL;
10228 break; }
10230 case 1541: {
10231 uint32_t _ptr_info1541;
10232 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1541));
10233 if (_ptr_info1541) {
10234 NDR_PULL_ALLOC(ndr, r->info1541);
10235 } else {
10236 r->info1541 = NULL;
10238 break; }
10240 case 1542: {
10241 uint32_t _ptr_info1542;
10242 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1542));
10243 if (_ptr_info1542) {
10244 NDR_PULL_ALLOC(ndr, r->info1542);
10245 } else {
10246 r->info1542 = NULL;
10248 break; }
10250 case 1543: {
10251 uint32_t _ptr_info1543;
10252 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1543));
10253 if (_ptr_info1543) {
10254 NDR_PULL_ALLOC(ndr, r->info1543);
10255 } else {
10256 r->info1543 = NULL;
10258 break; }
10260 case 1544: {
10261 uint32_t _ptr_info1544;
10262 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1544));
10263 if (_ptr_info1544) {
10264 NDR_PULL_ALLOC(ndr, r->info1544);
10265 } else {
10266 r->info1544 = NULL;
10268 break; }
10270 case 1545: {
10271 uint32_t _ptr_info1545;
10272 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1545));
10273 if (_ptr_info1545) {
10274 NDR_PULL_ALLOC(ndr, r->info1545);
10275 } else {
10276 r->info1545 = NULL;
10278 break; }
10280 case 1546: {
10281 uint32_t _ptr_info1546;
10282 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1546));
10283 if (_ptr_info1546) {
10284 NDR_PULL_ALLOC(ndr, r->info1546);
10285 } else {
10286 r->info1546 = NULL;
10288 break; }
10290 case 1547: {
10291 uint32_t _ptr_info1547;
10292 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1547));
10293 if (_ptr_info1547) {
10294 NDR_PULL_ALLOC(ndr, r->info1547);
10295 } else {
10296 r->info1547 = NULL;
10298 break; }
10300 case 1548: {
10301 uint32_t _ptr_info1548;
10302 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1548));
10303 if (_ptr_info1548) {
10304 NDR_PULL_ALLOC(ndr, r->info1548);
10305 } else {
10306 r->info1548 = NULL;
10308 break; }
10310 case 1549: {
10311 uint32_t _ptr_info1549;
10312 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1549));
10313 if (_ptr_info1549) {
10314 NDR_PULL_ALLOC(ndr, r->info1549);
10315 } else {
10316 r->info1549 = NULL;
10318 break; }
10320 case 1550: {
10321 uint32_t _ptr_info1550;
10322 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1550));
10323 if (_ptr_info1550) {
10324 NDR_PULL_ALLOC(ndr, r->info1550);
10325 } else {
10326 r->info1550 = NULL;
10328 break; }
10330 case 1552: {
10331 uint32_t _ptr_info1552;
10332 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1552));
10333 if (_ptr_info1552) {
10334 NDR_PULL_ALLOC(ndr, r->info1552);
10335 } else {
10336 r->info1552 = NULL;
10338 break; }
10340 case 1553: {
10341 uint32_t _ptr_info1553;
10342 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1553));
10343 if (_ptr_info1553) {
10344 NDR_PULL_ALLOC(ndr, r->info1553);
10345 } else {
10346 r->info1553 = NULL;
10348 break; }
10350 case 1554: {
10351 uint32_t _ptr_info1554;
10352 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1554));
10353 if (_ptr_info1554) {
10354 NDR_PULL_ALLOC(ndr, r->info1554);
10355 } else {
10356 r->info1554 = NULL;
10358 break; }
10360 case 1555: {
10361 uint32_t _ptr_info1555;
10362 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1555));
10363 if (_ptr_info1555) {
10364 NDR_PULL_ALLOC(ndr, r->info1555);
10365 } else {
10366 r->info1555 = NULL;
10368 break; }
10370 case 1556: {
10371 uint32_t _ptr_info1556;
10372 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1556));
10373 if (_ptr_info1556) {
10374 NDR_PULL_ALLOC(ndr, r->info1556);
10375 } else {
10376 r->info1556 = NULL;
10378 break; }
10380 default: {
10381 break; }
10385 if (ndr_flags & NDR_BUFFERS) {
10386 switch (level) {
10387 case 100:
10388 if (r->info100) {
10389 _mem_save_info100_0 = NDR_PULL_GET_MEM_CTX(ndr);
10390 NDR_PULL_SET_MEM_CTX(ndr, r->info100, 0);
10391 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo100(ndr, NDR_SCALARS|NDR_BUFFERS, r->info100));
10392 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info100_0, 0);
10394 break;
10396 case 101:
10397 if (r->info101) {
10398 _mem_save_info101_0 = NDR_PULL_GET_MEM_CTX(ndr);
10399 NDR_PULL_SET_MEM_CTX(ndr, r->info101, 0);
10400 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo101(ndr, NDR_SCALARS|NDR_BUFFERS, r->info101));
10401 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info101_0, 0);
10403 break;
10405 case 102:
10406 if (r->info102) {
10407 _mem_save_info102_0 = NDR_PULL_GET_MEM_CTX(ndr);
10408 NDR_PULL_SET_MEM_CTX(ndr, r->info102, 0);
10409 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo102(ndr, NDR_SCALARS|NDR_BUFFERS, r->info102));
10410 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info102_0, 0);
10412 break;
10414 case 402:
10415 if (r->info402) {
10416 _mem_save_info402_0 = NDR_PULL_GET_MEM_CTX(ndr);
10417 NDR_PULL_SET_MEM_CTX(ndr, r->info402, 0);
10418 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo402(ndr, NDR_SCALARS|NDR_BUFFERS, r->info402));
10419 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info402_0, 0);
10421 break;
10423 case 403:
10424 if (r->info403) {
10425 _mem_save_info403_0 = NDR_PULL_GET_MEM_CTX(ndr);
10426 NDR_PULL_SET_MEM_CTX(ndr, r->info403, 0);
10427 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo403(ndr, NDR_SCALARS|NDR_BUFFERS, r->info403));
10428 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info403_0, 0);
10430 break;
10432 case 502:
10433 if (r->info502) {
10434 _mem_save_info502_0 = NDR_PULL_GET_MEM_CTX(ndr);
10435 NDR_PULL_SET_MEM_CTX(ndr, r->info502, 0);
10436 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo502(ndr, NDR_SCALARS, r->info502));
10437 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info502_0, 0);
10439 break;
10441 case 503:
10442 if (r->info503) {
10443 _mem_save_info503_0 = NDR_PULL_GET_MEM_CTX(ndr);
10444 NDR_PULL_SET_MEM_CTX(ndr, r->info503, 0);
10445 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo503(ndr, NDR_SCALARS|NDR_BUFFERS, r->info503));
10446 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info503_0, 0);
10448 break;
10450 case 599:
10451 if (r->info599) {
10452 _mem_save_info599_0 = NDR_PULL_GET_MEM_CTX(ndr);
10453 NDR_PULL_SET_MEM_CTX(ndr, r->info599, 0);
10454 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo599(ndr, NDR_SCALARS|NDR_BUFFERS, r->info599));
10455 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info599_0, 0);
10457 break;
10459 case 1005:
10460 if (r->info1005) {
10461 _mem_save_info1005_0 = NDR_PULL_GET_MEM_CTX(ndr);
10462 NDR_PULL_SET_MEM_CTX(ndr, r->info1005, 0);
10463 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1005(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1005));
10464 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1005_0, 0);
10466 break;
10468 case 1010:
10469 if (r->info1010) {
10470 _mem_save_info1010_0 = NDR_PULL_GET_MEM_CTX(ndr);
10471 NDR_PULL_SET_MEM_CTX(ndr, r->info1010, 0);
10472 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1010(ndr, NDR_SCALARS, r->info1010));
10473 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1010_0, 0);
10475 break;
10477 case 1016:
10478 if (r->info1016) {
10479 _mem_save_info1016_0 = NDR_PULL_GET_MEM_CTX(ndr);
10480 NDR_PULL_SET_MEM_CTX(ndr, r->info1016, 0);
10481 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1016(ndr, NDR_SCALARS, r->info1016));
10482 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1016_0, 0);
10484 break;
10486 case 1017:
10487 if (r->info1017) {
10488 _mem_save_info1017_0 = NDR_PULL_GET_MEM_CTX(ndr);
10489 NDR_PULL_SET_MEM_CTX(ndr, r->info1017, 0);
10490 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1017(ndr, NDR_SCALARS, r->info1017));
10491 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1017_0, 0);
10493 break;
10495 case 1018:
10496 if (r->info1018) {
10497 _mem_save_info1018_0 = NDR_PULL_GET_MEM_CTX(ndr);
10498 NDR_PULL_SET_MEM_CTX(ndr, r->info1018, 0);
10499 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1018(ndr, NDR_SCALARS, r->info1018));
10500 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1018_0, 0);
10502 break;
10504 case 1107:
10505 if (r->info1107) {
10506 _mem_save_info1107_0 = NDR_PULL_GET_MEM_CTX(ndr);
10507 NDR_PULL_SET_MEM_CTX(ndr, r->info1107, 0);
10508 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1107(ndr, NDR_SCALARS, r->info1107));
10509 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1107_0, 0);
10511 break;
10513 case 1501:
10514 if (r->info1501) {
10515 _mem_save_info1501_0 = NDR_PULL_GET_MEM_CTX(ndr);
10516 NDR_PULL_SET_MEM_CTX(ndr, r->info1501, 0);
10517 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1501(ndr, NDR_SCALARS, r->info1501));
10518 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1501_0, 0);
10520 break;
10522 case 1502:
10523 if (r->info1502) {
10524 _mem_save_info1502_0 = NDR_PULL_GET_MEM_CTX(ndr);
10525 NDR_PULL_SET_MEM_CTX(ndr, r->info1502, 0);
10526 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1502(ndr, NDR_SCALARS, r->info1502));
10527 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1502_0, 0);
10529 break;
10531 case 1503:
10532 if (r->info1503) {
10533 _mem_save_info1503_0 = NDR_PULL_GET_MEM_CTX(ndr);
10534 NDR_PULL_SET_MEM_CTX(ndr, r->info1503, 0);
10535 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1503(ndr, NDR_SCALARS, r->info1503));
10536 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1503_0, 0);
10538 break;
10540 case 1506:
10541 if (r->info1506) {
10542 _mem_save_info1506_0 = NDR_PULL_GET_MEM_CTX(ndr);
10543 NDR_PULL_SET_MEM_CTX(ndr, r->info1506, 0);
10544 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1506(ndr, NDR_SCALARS, r->info1506));
10545 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1506_0, 0);
10547 break;
10549 case 1509:
10550 if (r->info1509) {
10551 _mem_save_info1509_0 = NDR_PULL_GET_MEM_CTX(ndr);
10552 NDR_PULL_SET_MEM_CTX(ndr, r->info1509, 0);
10553 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1509(ndr, NDR_SCALARS, r->info1509));
10554 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1509_0, 0);
10556 break;
10558 case 1510:
10559 if (r->info1510) {
10560 _mem_save_info1510_0 = NDR_PULL_GET_MEM_CTX(ndr);
10561 NDR_PULL_SET_MEM_CTX(ndr, r->info1510, 0);
10562 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1510(ndr, NDR_SCALARS, r->info1510));
10563 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1510_0, 0);
10565 break;
10567 case 1511:
10568 if (r->info1511) {
10569 _mem_save_info1511_0 = NDR_PULL_GET_MEM_CTX(ndr);
10570 NDR_PULL_SET_MEM_CTX(ndr, r->info1511, 0);
10571 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1511(ndr, NDR_SCALARS, r->info1511));
10572 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1511_0, 0);
10574 break;
10576 case 1512:
10577 if (r->info1512) {
10578 _mem_save_info1512_0 = NDR_PULL_GET_MEM_CTX(ndr);
10579 NDR_PULL_SET_MEM_CTX(ndr, r->info1512, 0);
10580 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1512(ndr, NDR_SCALARS, r->info1512));
10581 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1512_0, 0);
10583 break;
10585 case 1513:
10586 if (r->info1513) {
10587 _mem_save_info1513_0 = NDR_PULL_GET_MEM_CTX(ndr);
10588 NDR_PULL_SET_MEM_CTX(ndr, r->info1513, 0);
10589 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1513(ndr, NDR_SCALARS, r->info1513));
10590 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1513_0, 0);
10592 break;
10594 case 1514:
10595 if (r->info1514) {
10596 _mem_save_info1514_0 = NDR_PULL_GET_MEM_CTX(ndr);
10597 NDR_PULL_SET_MEM_CTX(ndr, r->info1514, 0);
10598 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1514(ndr, NDR_SCALARS, r->info1514));
10599 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1514_0, 0);
10601 break;
10603 case 1515:
10604 if (r->info1515) {
10605 _mem_save_info1515_0 = NDR_PULL_GET_MEM_CTX(ndr);
10606 NDR_PULL_SET_MEM_CTX(ndr, r->info1515, 0);
10607 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1515(ndr, NDR_SCALARS, r->info1515));
10608 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1515_0, 0);
10610 break;
10612 case 1516:
10613 if (r->info1516) {
10614 _mem_save_info1516_0 = NDR_PULL_GET_MEM_CTX(ndr);
10615 NDR_PULL_SET_MEM_CTX(ndr, r->info1516, 0);
10616 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1516(ndr, NDR_SCALARS, r->info1516));
10617 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1516_0, 0);
10619 break;
10621 case 1518:
10622 if (r->info1518) {
10623 _mem_save_info1518_0 = NDR_PULL_GET_MEM_CTX(ndr);
10624 NDR_PULL_SET_MEM_CTX(ndr, r->info1518, 0);
10625 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1518(ndr, NDR_SCALARS, r->info1518));
10626 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1518_0, 0);
10628 break;
10630 case 1520:
10631 if (r->info1520) {
10632 _mem_save_info1520_0 = NDR_PULL_GET_MEM_CTX(ndr);
10633 NDR_PULL_SET_MEM_CTX(ndr, r->info1520, 0);
10634 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1520(ndr, NDR_SCALARS, r->info1520));
10635 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1520_0, 0);
10637 break;
10639 case 1521:
10640 if (r->info1521) {
10641 _mem_save_info1521_0 = NDR_PULL_GET_MEM_CTX(ndr);
10642 NDR_PULL_SET_MEM_CTX(ndr, r->info1521, 0);
10643 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1521(ndr, NDR_SCALARS, r->info1521));
10644 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1521_0, 0);
10646 break;
10648 case 1522:
10649 if (r->info1522) {
10650 _mem_save_info1522_0 = NDR_PULL_GET_MEM_CTX(ndr);
10651 NDR_PULL_SET_MEM_CTX(ndr, r->info1522, 0);
10652 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1522(ndr, NDR_SCALARS, r->info1522));
10653 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1522_0, 0);
10655 break;
10657 case 1523:
10658 if (r->info1523) {
10659 _mem_save_info1523_0 = NDR_PULL_GET_MEM_CTX(ndr);
10660 NDR_PULL_SET_MEM_CTX(ndr, r->info1523, 0);
10661 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1523(ndr, NDR_SCALARS, r->info1523));
10662 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1523_0, 0);
10664 break;
10666 case 1524:
10667 if (r->info1524) {
10668 _mem_save_info1524_0 = NDR_PULL_GET_MEM_CTX(ndr);
10669 NDR_PULL_SET_MEM_CTX(ndr, r->info1524, 0);
10670 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1524(ndr, NDR_SCALARS, r->info1524));
10671 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1524_0, 0);
10673 break;
10675 case 1525:
10676 if (r->info1525) {
10677 _mem_save_info1525_0 = NDR_PULL_GET_MEM_CTX(ndr);
10678 NDR_PULL_SET_MEM_CTX(ndr, r->info1525, 0);
10679 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1525(ndr, NDR_SCALARS, r->info1525));
10680 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1525_0, 0);
10682 break;
10684 case 1528:
10685 if (r->info1528) {
10686 _mem_save_info1528_0 = NDR_PULL_GET_MEM_CTX(ndr);
10687 NDR_PULL_SET_MEM_CTX(ndr, r->info1528, 0);
10688 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1528(ndr, NDR_SCALARS, r->info1528));
10689 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1528_0, 0);
10691 break;
10693 case 1529:
10694 if (r->info1529) {
10695 _mem_save_info1529_0 = NDR_PULL_GET_MEM_CTX(ndr);
10696 NDR_PULL_SET_MEM_CTX(ndr, r->info1529, 0);
10697 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1529(ndr, NDR_SCALARS, r->info1529));
10698 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1529_0, 0);
10700 break;
10702 case 1530:
10703 if (r->info1530) {
10704 _mem_save_info1530_0 = NDR_PULL_GET_MEM_CTX(ndr);
10705 NDR_PULL_SET_MEM_CTX(ndr, r->info1530, 0);
10706 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1530(ndr, NDR_SCALARS, r->info1530));
10707 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1530_0, 0);
10709 break;
10711 case 1533:
10712 if (r->info1533) {
10713 _mem_save_info1533_0 = NDR_PULL_GET_MEM_CTX(ndr);
10714 NDR_PULL_SET_MEM_CTX(ndr, r->info1533, 0);
10715 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1533(ndr, NDR_SCALARS, r->info1533));
10716 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1533_0, 0);
10718 break;
10720 case 1534:
10721 if (r->info1534) {
10722 _mem_save_info1534_0 = NDR_PULL_GET_MEM_CTX(ndr);
10723 NDR_PULL_SET_MEM_CTX(ndr, r->info1534, 0);
10724 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1534(ndr, NDR_SCALARS, r->info1534));
10725 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1534_0, 0);
10727 break;
10729 case 1535:
10730 if (r->info1535) {
10731 _mem_save_info1535_0 = NDR_PULL_GET_MEM_CTX(ndr);
10732 NDR_PULL_SET_MEM_CTX(ndr, r->info1535, 0);
10733 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1535(ndr, NDR_SCALARS, r->info1535));
10734 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1535_0, 0);
10736 break;
10738 case 1536:
10739 if (r->info1536) {
10740 _mem_save_info1536_0 = NDR_PULL_GET_MEM_CTX(ndr);
10741 NDR_PULL_SET_MEM_CTX(ndr, r->info1536, 0);
10742 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1536(ndr, NDR_SCALARS, r->info1536));
10743 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1536_0, 0);
10745 break;
10747 case 1537:
10748 if (r->info1537) {
10749 _mem_save_info1537_0 = NDR_PULL_GET_MEM_CTX(ndr);
10750 NDR_PULL_SET_MEM_CTX(ndr, r->info1537, 0);
10751 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1537(ndr, NDR_SCALARS, r->info1537));
10752 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1537_0, 0);
10754 break;
10756 case 1538:
10757 if (r->info1538) {
10758 _mem_save_info1538_0 = NDR_PULL_GET_MEM_CTX(ndr);
10759 NDR_PULL_SET_MEM_CTX(ndr, r->info1538, 0);
10760 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1538(ndr, NDR_SCALARS, r->info1538));
10761 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1538_0, 0);
10763 break;
10765 case 1539:
10766 if (r->info1539) {
10767 _mem_save_info1539_0 = NDR_PULL_GET_MEM_CTX(ndr);
10768 NDR_PULL_SET_MEM_CTX(ndr, r->info1539, 0);
10769 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1539(ndr, NDR_SCALARS, r->info1539));
10770 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1539_0, 0);
10772 break;
10774 case 1540:
10775 if (r->info1540) {
10776 _mem_save_info1540_0 = NDR_PULL_GET_MEM_CTX(ndr);
10777 NDR_PULL_SET_MEM_CTX(ndr, r->info1540, 0);
10778 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1540(ndr, NDR_SCALARS, r->info1540));
10779 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1540_0, 0);
10781 break;
10783 case 1541:
10784 if (r->info1541) {
10785 _mem_save_info1541_0 = NDR_PULL_GET_MEM_CTX(ndr);
10786 NDR_PULL_SET_MEM_CTX(ndr, r->info1541, 0);
10787 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1541(ndr, NDR_SCALARS, r->info1541));
10788 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1541_0, 0);
10790 break;
10792 case 1542:
10793 if (r->info1542) {
10794 _mem_save_info1542_0 = NDR_PULL_GET_MEM_CTX(ndr);
10795 NDR_PULL_SET_MEM_CTX(ndr, r->info1542, 0);
10796 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1542(ndr, NDR_SCALARS, r->info1542));
10797 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1542_0, 0);
10799 break;
10801 case 1543:
10802 if (r->info1543) {
10803 _mem_save_info1543_0 = NDR_PULL_GET_MEM_CTX(ndr);
10804 NDR_PULL_SET_MEM_CTX(ndr, r->info1543, 0);
10805 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1543(ndr, NDR_SCALARS, r->info1543));
10806 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1543_0, 0);
10808 break;
10810 case 1544:
10811 if (r->info1544) {
10812 _mem_save_info1544_0 = NDR_PULL_GET_MEM_CTX(ndr);
10813 NDR_PULL_SET_MEM_CTX(ndr, r->info1544, 0);
10814 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1544(ndr, NDR_SCALARS, r->info1544));
10815 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1544_0, 0);
10817 break;
10819 case 1545:
10820 if (r->info1545) {
10821 _mem_save_info1545_0 = NDR_PULL_GET_MEM_CTX(ndr);
10822 NDR_PULL_SET_MEM_CTX(ndr, r->info1545, 0);
10823 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1545(ndr, NDR_SCALARS, r->info1545));
10824 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1545_0, 0);
10826 break;
10828 case 1546:
10829 if (r->info1546) {
10830 _mem_save_info1546_0 = NDR_PULL_GET_MEM_CTX(ndr);
10831 NDR_PULL_SET_MEM_CTX(ndr, r->info1546, 0);
10832 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1546(ndr, NDR_SCALARS, r->info1546));
10833 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1546_0, 0);
10835 break;
10837 case 1547:
10838 if (r->info1547) {
10839 _mem_save_info1547_0 = NDR_PULL_GET_MEM_CTX(ndr);
10840 NDR_PULL_SET_MEM_CTX(ndr, r->info1547, 0);
10841 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1547(ndr, NDR_SCALARS, r->info1547));
10842 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1547_0, 0);
10844 break;
10846 case 1548:
10847 if (r->info1548) {
10848 _mem_save_info1548_0 = NDR_PULL_GET_MEM_CTX(ndr);
10849 NDR_PULL_SET_MEM_CTX(ndr, r->info1548, 0);
10850 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1548(ndr, NDR_SCALARS, r->info1548));
10851 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1548_0, 0);
10853 break;
10855 case 1549:
10856 if (r->info1549) {
10857 _mem_save_info1549_0 = NDR_PULL_GET_MEM_CTX(ndr);
10858 NDR_PULL_SET_MEM_CTX(ndr, r->info1549, 0);
10859 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1549(ndr, NDR_SCALARS, r->info1549));
10860 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1549_0, 0);
10862 break;
10864 case 1550:
10865 if (r->info1550) {
10866 _mem_save_info1550_0 = NDR_PULL_GET_MEM_CTX(ndr);
10867 NDR_PULL_SET_MEM_CTX(ndr, r->info1550, 0);
10868 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1550(ndr, NDR_SCALARS, r->info1550));
10869 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1550_0, 0);
10871 break;
10873 case 1552:
10874 if (r->info1552) {
10875 _mem_save_info1552_0 = NDR_PULL_GET_MEM_CTX(ndr);
10876 NDR_PULL_SET_MEM_CTX(ndr, r->info1552, 0);
10877 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1552(ndr, NDR_SCALARS, r->info1552));
10878 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1552_0, 0);
10880 break;
10882 case 1553:
10883 if (r->info1553) {
10884 _mem_save_info1553_0 = NDR_PULL_GET_MEM_CTX(ndr);
10885 NDR_PULL_SET_MEM_CTX(ndr, r->info1553, 0);
10886 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1553(ndr, NDR_SCALARS, r->info1553));
10887 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1553_0, 0);
10889 break;
10891 case 1554:
10892 if (r->info1554) {
10893 _mem_save_info1554_0 = NDR_PULL_GET_MEM_CTX(ndr);
10894 NDR_PULL_SET_MEM_CTX(ndr, r->info1554, 0);
10895 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1554(ndr, NDR_SCALARS, r->info1554));
10896 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1554_0, 0);
10898 break;
10900 case 1555:
10901 if (r->info1555) {
10902 _mem_save_info1555_0 = NDR_PULL_GET_MEM_CTX(ndr);
10903 NDR_PULL_SET_MEM_CTX(ndr, r->info1555, 0);
10904 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1555(ndr, NDR_SCALARS, r->info1555));
10905 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1555_0, 0);
10907 break;
10909 case 1556:
10910 if (r->info1556) {
10911 _mem_save_info1556_0 = NDR_PULL_GET_MEM_CTX(ndr);
10912 NDR_PULL_SET_MEM_CTX(ndr, r->info1556, 0);
10913 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1556(ndr, NDR_SCALARS, r->info1556));
10914 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1556_0, 0);
10916 break;
10918 default:
10919 break;
10923 return NDR_ERR_SUCCESS;
10926 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetSrvInfo *r)
10928 int level;
10929 level = ndr_print_get_switch_value(ndr, r);
10930 ndr_print_union(ndr, name, level, "srvsvc_NetSrvInfo");
10931 switch (level) {
10932 case 100:
10933 ndr_print_ptr(ndr, "info100", r->info100);
10934 ndr->depth++;
10935 if (r->info100) {
10936 ndr_print_srvsvc_NetSrvInfo100(ndr, "info100", r->info100);
10938 ndr->depth--;
10939 break;
10941 case 101:
10942 ndr_print_ptr(ndr, "info101", r->info101);
10943 ndr->depth++;
10944 if (r->info101) {
10945 ndr_print_srvsvc_NetSrvInfo101(ndr, "info101", r->info101);
10947 ndr->depth--;
10948 break;
10950 case 102:
10951 ndr_print_ptr(ndr, "info102", r->info102);
10952 ndr->depth++;
10953 if (r->info102) {
10954 ndr_print_srvsvc_NetSrvInfo102(ndr, "info102", r->info102);
10956 ndr->depth--;
10957 break;
10959 case 402:
10960 ndr_print_ptr(ndr, "info402", r->info402);
10961 ndr->depth++;
10962 if (r->info402) {
10963 ndr_print_srvsvc_NetSrvInfo402(ndr, "info402", r->info402);
10965 ndr->depth--;
10966 break;
10968 case 403:
10969 ndr_print_ptr(ndr, "info403", r->info403);
10970 ndr->depth++;
10971 if (r->info403) {
10972 ndr_print_srvsvc_NetSrvInfo403(ndr, "info403", r->info403);
10974 ndr->depth--;
10975 break;
10977 case 502:
10978 ndr_print_ptr(ndr, "info502", r->info502);
10979 ndr->depth++;
10980 if (r->info502) {
10981 ndr_print_srvsvc_NetSrvInfo502(ndr, "info502", r->info502);
10983 ndr->depth--;
10984 break;
10986 case 503:
10987 ndr_print_ptr(ndr, "info503", r->info503);
10988 ndr->depth++;
10989 if (r->info503) {
10990 ndr_print_srvsvc_NetSrvInfo503(ndr, "info503", r->info503);
10992 ndr->depth--;
10993 break;
10995 case 599:
10996 ndr_print_ptr(ndr, "info599", r->info599);
10997 ndr->depth++;
10998 if (r->info599) {
10999 ndr_print_srvsvc_NetSrvInfo599(ndr, "info599", r->info599);
11001 ndr->depth--;
11002 break;
11004 case 1005:
11005 ndr_print_ptr(ndr, "info1005", r->info1005);
11006 ndr->depth++;
11007 if (r->info1005) {
11008 ndr_print_srvsvc_NetSrvInfo1005(ndr, "info1005", r->info1005);
11010 ndr->depth--;
11011 break;
11013 case 1010:
11014 ndr_print_ptr(ndr, "info1010", r->info1010);
11015 ndr->depth++;
11016 if (r->info1010) {
11017 ndr_print_srvsvc_NetSrvInfo1010(ndr, "info1010", r->info1010);
11019 ndr->depth--;
11020 break;
11022 case 1016:
11023 ndr_print_ptr(ndr, "info1016", r->info1016);
11024 ndr->depth++;
11025 if (r->info1016) {
11026 ndr_print_srvsvc_NetSrvInfo1016(ndr, "info1016", r->info1016);
11028 ndr->depth--;
11029 break;
11031 case 1017:
11032 ndr_print_ptr(ndr, "info1017", r->info1017);
11033 ndr->depth++;
11034 if (r->info1017) {
11035 ndr_print_srvsvc_NetSrvInfo1017(ndr, "info1017", r->info1017);
11037 ndr->depth--;
11038 break;
11040 case 1018:
11041 ndr_print_ptr(ndr, "info1018", r->info1018);
11042 ndr->depth++;
11043 if (r->info1018) {
11044 ndr_print_srvsvc_NetSrvInfo1018(ndr, "info1018", r->info1018);
11046 ndr->depth--;
11047 break;
11049 case 1107:
11050 ndr_print_ptr(ndr, "info1107", r->info1107);
11051 ndr->depth++;
11052 if (r->info1107) {
11053 ndr_print_srvsvc_NetSrvInfo1107(ndr, "info1107", r->info1107);
11055 ndr->depth--;
11056 break;
11058 case 1501:
11059 ndr_print_ptr(ndr, "info1501", r->info1501);
11060 ndr->depth++;
11061 if (r->info1501) {
11062 ndr_print_srvsvc_NetSrvInfo1501(ndr, "info1501", r->info1501);
11064 ndr->depth--;
11065 break;
11067 case 1502:
11068 ndr_print_ptr(ndr, "info1502", r->info1502);
11069 ndr->depth++;
11070 if (r->info1502) {
11071 ndr_print_srvsvc_NetSrvInfo1502(ndr, "info1502", r->info1502);
11073 ndr->depth--;
11074 break;
11076 case 1503:
11077 ndr_print_ptr(ndr, "info1503", r->info1503);
11078 ndr->depth++;
11079 if (r->info1503) {
11080 ndr_print_srvsvc_NetSrvInfo1503(ndr, "info1503", r->info1503);
11082 ndr->depth--;
11083 break;
11085 case 1506:
11086 ndr_print_ptr(ndr, "info1506", r->info1506);
11087 ndr->depth++;
11088 if (r->info1506) {
11089 ndr_print_srvsvc_NetSrvInfo1506(ndr, "info1506", r->info1506);
11091 ndr->depth--;
11092 break;
11094 case 1509:
11095 ndr_print_ptr(ndr, "info1509", r->info1509);
11096 ndr->depth++;
11097 if (r->info1509) {
11098 ndr_print_srvsvc_NetSrvInfo1509(ndr, "info1509", r->info1509);
11100 ndr->depth--;
11101 break;
11103 case 1510:
11104 ndr_print_ptr(ndr, "info1510", r->info1510);
11105 ndr->depth++;
11106 if (r->info1510) {
11107 ndr_print_srvsvc_NetSrvInfo1510(ndr, "info1510", r->info1510);
11109 ndr->depth--;
11110 break;
11112 case 1511:
11113 ndr_print_ptr(ndr, "info1511", r->info1511);
11114 ndr->depth++;
11115 if (r->info1511) {
11116 ndr_print_srvsvc_NetSrvInfo1511(ndr, "info1511", r->info1511);
11118 ndr->depth--;
11119 break;
11121 case 1512:
11122 ndr_print_ptr(ndr, "info1512", r->info1512);
11123 ndr->depth++;
11124 if (r->info1512) {
11125 ndr_print_srvsvc_NetSrvInfo1512(ndr, "info1512", r->info1512);
11127 ndr->depth--;
11128 break;
11130 case 1513:
11131 ndr_print_ptr(ndr, "info1513", r->info1513);
11132 ndr->depth++;
11133 if (r->info1513) {
11134 ndr_print_srvsvc_NetSrvInfo1513(ndr, "info1513", r->info1513);
11136 ndr->depth--;
11137 break;
11139 case 1514:
11140 ndr_print_ptr(ndr, "info1514", r->info1514);
11141 ndr->depth++;
11142 if (r->info1514) {
11143 ndr_print_srvsvc_NetSrvInfo1514(ndr, "info1514", r->info1514);
11145 ndr->depth--;
11146 break;
11148 case 1515:
11149 ndr_print_ptr(ndr, "info1515", r->info1515);
11150 ndr->depth++;
11151 if (r->info1515) {
11152 ndr_print_srvsvc_NetSrvInfo1515(ndr, "info1515", r->info1515);
11154 ndr->depth--;
11155 break;
11157 case 1516:
11158 ndr_print_ptr(ndr, "info1516", r->info1516);
11159 ndr->depth++;
11160 if (r->info1516) {
11161 ndr_print_srvsvc_NetSrvInfo1516(ndr, "info1516", r->info1516);
11163 ndr->depth--;
11164 break;
11166 case 1518:
11167 ndr_print_ptr(ndr, "info1518", r->info1518);
11168 ndr->depth++;
11169 if (r->info1518) {
11170 ndr_print_srvsvc_NetSrvInfo1518(ndr, "info1518", r->info1518);
11172 ndr->depth--;
11173 break;
11175 case 1520:
11176 ndr_print_ptr(ndr, "info1520", r->info1520);
11177 ndr->depth++;
11178 if (r->info1520) {
11179 ndr_print_srvsvc_NetSrvInfo1520(ndr, "info1520", r->info1520);
11181 ndr->depth--;
11182 break;
11184 case 1521:
11185 ndr_print_ptr(ndr, "info1521", r->info1521);
11186 ndr->depth++;
11187 if (r->info1521) {
11188 ndr_print_srvsvc_NetSrvInfo1521(ndr, "info1521", r->info1521);
11190 ndr->depth--;
11191 break;
11193 case 1522:
11194 ndr_print_ptr(ndr, "info1522", r->info1522);
11195 ndr->depth++;
11196 if (r->info1522) {
11197 ndr_print_srvsvc_NetSrvInfo1522(ndr, "info1522", r->info1522);
11199 ndr->depth--;
11200 break;
11202 case 1523:
11203 ndr_print_ptr(ndr, "info1523", r->info1523);
11204 ndr->depth++;
11205 if (r->info1523) {
11206 ndr_print_srvsvc_NetSrvInfo1523(ndr, "info1523", r->info1523);
11208 ndr->depth--;
11209 break;
11211 case 1524:
11212 ndr_print_ptr(ndr, "info1524", r->info1524);
11213 ndr->depth++;
11214 if (r->info1524) {
11215 ndr_print_srvsvc_NetSrvInfo1524(ndr, "info1524", r->info1524);
11217 ndr->depth--;
11218 break;
11220 case 1525:
11221 ndr_print_ptr(ndr, "info1525", r->info1525);
11222 ndr->depth++;
11223 if (r->info1525) {
11224 ndr_print_srvsvc_NetSrvInfo1525(ndr, "info1525", r->info1525);
11226 ndr->depth--;
11227 break;
11229 case 1528:
11230 ndr_print_ptr(ndr, "info1528", r->info1528);
11231 ndr->depth++;
11232 if (r->info1528) {
11233 ndr_print_srvsvc_NetSrvInfo1528(ndr, "info1528", r->info1528);
11235 ndr->depth--;
11236 break;
11238 case 1529:
11239 ndr_print_ptr(ndr, "info1529", r->info1529);
11240 ndr->depth++;
11241 if (r->info1529) {
11242 ndr_print_srvsvc_NetSrvInfo1529(ndr, "info1529", r->info1529);
11244 ndr->depth--;
11245 break;
11247 case 1530:
11248 ndr_print_ptr(ndr, "info1530", r->info1530);
11249 ndr->depth++;
11250 if (r->info1530) {
11251 ndr_print_srvsvc_NetSrvInfo1530(ndr, "info1530", r->info1530);
11253 ndr->depth--;
11254 break;
11256 case 1533:
11257 ndr_print_ptr(ndr, "info1533", r->info1533);
11258 ndr->depth++;
11259 if (r->info1533) {
11260 ndr_print_srvsvc_NetSrvInfo1533(ndr, "info1533", r->info1533);
11262 ndr->depth--;
11263 break;
11265 case 1534:
11266 ndr_print_ptr(ndr, "info1534", r->info1534);
11267 ndr->depth++;
11268 if (r->info1534) {
11269 ndr_print_srvsvc_NetSrvInfo1534(ndr, "info1534", r->info1534);
11271 ndr->depth--;
11272 break;
11274 case 1535:
11275 ndr_print_ptr(ndr, "info1535", r->info1535);
11276 ndr->depth++;
11277 if (r->info1535) {
11278 ndr_print_srvsvc_NetSrvInfo1535(ndr, "info1535", r->info1535);
11280 ndr->depth--;
11281 break;
11283 case 1536:
11284 ndr_print_ptr(ndr, "info1536", r->info1536);
11285 ndr->depth++;
11286 if (r->info1536) {
11287 ndr_print_srvsvc_NetSrvInfo1536(ndr, "info1536", r->info1536);
11289 ndr->depth--;
11290 break;
11292 case 1537:
11293 ndr_print_ptr(ndr, "info1537", r->info1537);
11294 ndr->depth++;
11295 if (r->info1537) {
11296 ndr_print_srvsvc_NetSrvInfo1537(ndr, "info1537", r->info1537);
11298 ndr->depth--;
11299 break;
11301 case 1538:
11302 ndr_print_ptr(ndr, "info1538", r->info1538);
11303 ndr->depth++;
11304 if (r->info1538) {
11305 ndr_print_srvsvc_NetSrvInfo1538(ndr, "info1538", r->info1538);
11307 ndr->depth--;
11308 break;
11310 case 1539:
11311 ndr_print_ptr(ndr, "info1539", r->info1539);
11312 ndr->depth++;
11313 if (r->info1539) {
11314 ndr_print_srvsvc_NetSrvInfo1539(ndr, "info1539", r->info1539);
11316 ndr->depth--;
11317 break;
11319 case 1540:
11320 ndr_print_ptr(ndr, "info1540", r->info1540);
11321 ndr->depth++;
11322 if (r->info1540) {
11323 ndr_print_srvsvc_NetSrvInfo1540(ndr, "info1540", r->info1540);
11325 ndr->depth--;
11326 break;
11328 case 1541:
11329 ndr_print_ptr(ndr, "info1541", r->info1541);
11330 ndr->depth++;
11331 if (r->info1541) {
11332 ndr_print_srvsvc_NetSrvInfo1541(ndr, "info1541", r->info1541);
11334 ndr->depth--;
11335 break;
11337 case 1542:
11338 ndr_print_ptr(ndr, "info1542", r->info1542);
11339 ndr->depth++;
11340 if (r->info1542) {
11341 ndr_print_srvsvc_NetSrvInfo1542(ndr, "info1542", r->info1542);
11343 ndr->depth--;
11344 break;
11346 case 1543:
11347 ndr_print_ptr(ndr, "info1543", r->info1543);
11348 ndr->depth++;
11349 if (r->info1543) {
11350 ndr_print_srvsvc_NetSrvInfo1543(ndr, "info1543", r->info1543);
11352 ndr->depth--;
11353 break;
11355 case 1544:
11356 ndr_print_ptr(ndr, "info1544", r->info1544);
11357 ndr->depth++;
11358 if (r->info1544) {
11359 ndr_print_srvsvc_NetSrvInfo1544(ndr, "info1544", r->info1544);
11361 ndr->depth--;
11362 break;
11364 case 1545:
11365 ndr_print_ptr(ndr, "info1545", r->info1545);
11366 ndr->depth++;
11367 if (r->info1545) {
11368 ndr_print_srvsvc_NetSrvInfo1545(ndr, "info1545", r->info1545);
11370 ndr->depth--;
11371 break;
11373 case 1546:
11374 ndr_print_ptr(ndr, "info1546", r->info1546);
11375 ndr->depth++;
11376 if (r->info1546) {
11377 ndr_print_srvsvc_NetSrvInfo1546(ndr, "info1546", r->info1546);
11379 ndr->depth--;
11380 break;
11382 case 1547:
11383 ndr_print_ptr(ndr, "info1547", r->info1547);
11384 ndr->depth++;
11385 if (r->info1547) {
11386 ndr_print_srvsvc_NetSrvInfo1547(ndr, "info1547", r->info1547);
11388 ndr->depth--;
11389 break;
11391 case 1548:
11392 ndr_print_ptr(ndr, "info1548", r->info1548);
11393 ndr->depth++;
11394 if (r->info1548) {
11395 ndr_print_srvsvc_NetSrvInfo1548(ndr, "info1548", r->info1548);
11397 ndr->depth--;
11398 break;
11400 case 1549:
11401 ndr_print_ptr(ndr, "info1549", r->info1549);
11402 ndr->depth++;
11403 if (r->info1549) {
11404 ndr_print_srvsvc_NetSrvInfo1549(ndr, "info1549", r->info1549);
11406 ndr->depth--;
11407 break;
11409 case 1550:
11410 ndr_print_ptr(ndr, "info1550", r->info1550);
11411 ndr->depth++;
11412 if (r->info1550) {
11413 ndr_print_srvsvc_NetSrvInfo1550(ndr, "info1550", r->info1550);
11415 ndr->depth--;
11416 break;
11418 case 1552:
11419 ndr_print_ptr(ndr, "info1552", r->info1552);
11420 ndr->depth++;
11421 if (r->info1552) {
11422 ndr_print_srvsvc_NetSrvInfo1552(ndr, "info1552", r->info1552);
11424 ndr->depth--;
11425 break;
11427 case 1553:
11428 ndr_print_ptr(ndr, "info1553", r->info1553);
11429 ndr->depth++;
11430 if (r->info1553) {
11431 ndr_print_srvsvc_NetSrvInfo1553(ndr, "info1553", r->info1553);
11433 ndr->depth--;
11434 break;
11436 case 1554:
11437 ndr_print_ptr(ndr, "info1554", r->info1554);
11438 ndr->depth++;
11439 if (r->info1554) {
11440 ndr_print_srvsvc_NetSrvInfo1554(ndr, "info1554", r->info1554);
11442 ndr->depth--;
11443 break;
11445 case 1555:
11446 ndr_print_ptr(ndr, "info1555", r->info1555);
11447 ndr->depth++;
11448 if (r->info1555) {
11449 ndr_print_srvsvc_NetSrvInfo1555(ndr, "info1555", r->info1555);
11451 ndr->depth--;
11452 break;
11454 case 1556:
11455 ndr_print_ptr(ndr, "info1556", r->info1556);
11456 ndr->depth++;
11457 if (r->info1556) {
11458 ndr_print_srvsvc_NetSrvInfo1556(ndr, "info1556", r->info1556);
11460 ndr->depth--;
11461 break;
11463 default:
11464 break;
11469 static enum ndr_err_code ndr_push_srvsvc_NetDiskInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetDiskInfo0 *r)
11471 if (ndr_flags & NDR_SCALARS) {
11472 NDR_CHECK(ndr_push_align(ndr, 4));
11474 uint32_t _flags_save_string = ndr->flags;
11475 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_LEN4);
11476 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->disk));
11477 ndr->flags = _flags_save_string;
11480 if (ndr_flags & NDR_BUFFERS) {
11482 return NDR_ERR_SUCCESS;
11485 static enum ndr_err_code ndr_pull_srvsvc_NetDiskInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetDiskInfo0 *r)
11487 if (ndr_flags & NDR_SCALARS) {
11488 NDR_CHECK(ndr_pull_align(ndr, 4));
11490 uint32_t _flags_save_string = ndr->flags;
11491 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_LEN4);
11492 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->disk));
11493 ndr->flags = _flags_save_string;
11496 if (ndr_flags & NDR_BUFFERS) {
11498 return NDR_ERR_SUCCESS;
11501 _PUBLIC_ void ndr_print_srvsvc_NetDiskInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetDiskInfo0 *r)
11503 ndr_print_struct(ndr, name, "srvsvc_NetDiskInfo0");
11504 ndr->depth++;
11505 ndr_print_string(ndr, "disk", r->disk);
11506 ndr->depth--;
11509 static enum ndr_err_code ndr_push_srvsvc_NetDiskInfo(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetDiskInfo *r)
11511 uint32_t cntr_disks_1;
11512 if (ndr_flags & NDR_SCALARS) {
11513 NDR_CHECK(ndr_push_align(ndr, 4));
11514 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
11515 NDR_CHECK(ndr_push_unique_ptr(ndr, r->disks));
11517 if (ndr_flags & NDR_BUFFERS) {
11518 if (r->disks) {
11519 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
11520 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
11521 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
11522 for (cntr_disks_1 = 0; cntr_disks_1 < r->count; cntr_disks_1++) {
11523 NDR_CHECK(ndr_push_srvsvc_NetDiskInfo0(ndr, NDR_SCALARS, &r->disks[cntr_disks_1]));
11527 return NDR_ERR_SUCCESS;
11530 static enum ndr_err_code ndr_pull_srvsvc_NetDiskInfo(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetDiskInfo *r)
11532 uint32_t _ptr_disks;
11533 uint32_t cntr_disks_1;
11534 TALLOC_CTX *_mem_save_disks_0;
11535 TALLOC_CTX *_mem_save_disks_1;
11536 if (ndr_flags & NDR_SCALARS) {
11537 NDR_CHECK(ndr_pull_align(ndr, 4));
11538 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
11539 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_disks));
11540 if (_ptr_disks) {
11541 NDR_PULL_ALLOC(ndr, r->disks);
11542 } else {
11543 r->disks = NULL;
11546 if (ndr_flags & NDR_BUFFERS) {
11547 if (r->disks) {
11548 _mem_save_disks_0 = NDR_PULL_GET_MEM_CTX(ndr);
11549 NDR_PULL_SET_MEM_CTX(ndr, r->disks, 0);
11550 NDR_CHECK(ndr_pull_array_size(ndr, &r->disks));
11551 NDR_CHECK(ndr_pull_array_length(ndr, &r->disks));
11552 if (ndr_get_array_length(ndr, &r->disks) > ndr_get_array_size(ndr, &r->disks)) {
11553 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->disks), ndr_get_array_length(ndr, &r->disks));
11555 NDR_PULL_ALLOC_N(ndr, r->disks, ndr_get_array_size(ndr, &r->disks));
11556 _mem_save_disks_1 = NDR_PULL_GET_MEM_CTX(ndr);
11557 NDR_PULL_SET_MEM_CTX(ndr, r->disks, 0);
11558 for (cntr_disks_1 = 0; cntr_disks_1 < r->count; cntr_disks_1++) {
11559 NDR_CHECK(ndr_pull_srvsvc_NetDiskInfo0(ndr, NDR_SCALARS, &r->disks[cntr_disks_1]));
11561 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_disks_1, 0);
11562 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_disks_0, 0);
11564 if (r->disks) {
11565 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->disks, r->count));
11567 if (r->disks) {
11568 NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->disks, r->count));
11571 return NDR_ERR_SUCCESS;
11574 _PUBLIC_ void ndr_print_srvsvc_NetDiskInfo(struct ndr_print *ndr, const char *name, const struct srvsvc_NetDiskInfo *r)
11576 uint32_t cntr_disks_1;
11577 ndr_print_struct(ndr, name, "srvsvc_NetDiskInfo");
11578 ndr->depth++;
11579 ndr_print_uint32(ndr, "count", r->count);
11580 ndr_print_ptr(ndr, "disks", r->disks);
11581 ndr->depth++;
11582 if (r->disks) {
11583 ndr->print(ndr, "%s: ARRAY(%d)", "disks", (int)r->count);
11584 ndr->depth++;
11585 for (cntr_disks_1=0;cntr_disks_1<r->count;cntr_disks_1++) {
11586 char *idx_1=NULL;
11587 if (asprintf(&idx_1, "[%d]", cntr_disks_1) != -1) {
11588 ndr_print_srvsvc_NetDiskInfo0(ndr, "disks", &r->disks[cntr_disks_1]);
11589 free(idx_1);
11592 ndr->depth--;
11594 ndr->depth--;
11595 ndr->depth--;
11598 static enum ndr_err_code ndr_push_srvsvc_Statistics(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_Statistics *r)
11600 if (ndr_flags & NDR_SCALARS) {
11601 NDR_CHECK(ndr_push_align(ndr, 4));
11602 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->start));
11603 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fopens));
11604 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->devopens));
11605 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->jobsqueued));
11606 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sopens));
11607 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->stimeouts));
11608 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->serrorout));
11609 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pwerrors));
11610 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->permerrors));
11611 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->syserrors));
11612 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bytessent_low));
11613 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bytessent_high));
11614 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bytesrcvd_low));
11615 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bytesrcvd_high));
11616 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->avresponse));
11617 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reqbufneed));
11618 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bigbufneed));
11620 if (ndr_flags & NDR_BUFFERS) {
11622 return NDR_ERR_SUCCESS;
11625 static enum ndr_err_code ndr_pull_srvsvc_Statistics(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_Statistics *r)
11627 if (ndr_flags & NDR_SCALARS) {
11628 NDR_CHECK(ndr_pull_align(ndr, 4));
11629 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->start));
11630 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fopens));
11631 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->devopens));
11632 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->jobsqueued));
11633 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sopens));
11634 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->stimeouts));
11635 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->serrorout));
11636 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pwerrors));
11637 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->permerrors));
11638 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->syserrors));
11639 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bytessent_low));
11640 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bytessent_high));
11641 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bytesrcvd_low));
11642 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bytesrcvd_high));
11643 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->avresponse));
11644 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reqbufneed));
11645 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bigbufneed));
11647 if (ndr_flags & NDR_BUFFERS) {
11649 return NDR_ERR_SUCCESS;
11652 _PUBLIC_ void ndr_print_srvsvc_Statistics(struct ndr_print *ndr, const char *name, const struct srvsvc_Statistics *r)
11654 ndr_print_struct(ndr, name, "srvsvc_Statistics");
11655 ndr->depth++;
11656 ndr_print_uint32(ndr, "start", r->start);
11657 ndr_print_uint32(ndr, "fopens", r->fopens);
11658 ndr_print_uint32(ndr, "devopens", r->devopens);
11659 ndr_print_uint32(ndr, "jobsqueued", r->jobsqueued);
11660 ndr_print_uint32(ndr, "sopens", r->sopens);
11661 ndr_print_uint32(ndr, "stimeouts", r->stimeouts);
11662 ndr_print_uint32(ndr, "serrorout", r->serrorout);
11663 ndr_print_uint32(ndr, "pwerrors", r->pwerrors);
11664 ndr_print_uint32(ndr, "permerrors", r->permerrors);
11665 ndr_print_uint32(ndr, "syserrors", r->syserrors);
11666 ndr_print_uint32(ndr, "bytessent_low", r->bytessent_low);
11667 ndr_print_uint32(ndr, "bytessent_high", r->bytessent_high);
11668 ndr_print_uint32(ndr, "bytesrcvd_low", r->bytesrcvd_low);
11669 ndr_print_uint32(ndr, "bytesrcvd_high", r->bytesrcvd_high);
11670 ndr_print_uint32(ndr, "avresponse", r->avresponse);
11671 ndr_print_uint32(ndr, "reqbufneed", r->reqbufneed);
11672 ndr_print_uint32(ndr, "bigbufneed", r->bigbufneed);
11673 ndr->depth--;
11676 static enum ndr_err_code ndr_push_srvsvc_NetTransportInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportInfo0 *r)
11678 if (ndr_flags & NDR_SCALARS) {
11679 NDR_CHECK(ndr_push_align(ndr, 4));
11680 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->vcs));
11681 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
11682 NDR_CHECK(ndr_push_unique_ptr(ndr, r->addr));
11683 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->addr_len));
11684 NDR_CHECK(ndr_push_unique_ptr(ndr, r->net_addr));
11686 if (ndr_flags & NDR_BUFFERS) {
11687 if (r->name) {
11688 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
11689 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
11690 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
11691 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11693 if (r->addr) {
11694 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->addr_len));
11695 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->addr, r->addr_len));
11697 if (r->net_addr) {
11698 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
11699 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
11700 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
11701 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->net_addr, ndr_charset_length(r->net_addr, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11704 return NDR_ERR_SUCCESS;
11707 static enum ndr_err_code ndr_pull_srvsvc_NetTransportInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportInfo0 *r)
11709 uint32_t _ptr_name;
11710 TALLOC_CTX *_mem_save_name_0;
11711 uint32_t _ptr_addr;
11712 TALLOC_CTX *_mem_save_addr_0;
11713 uint32_t _ptr_net_addr;
11714 TALLOC_CTX *_mem_save_net_addr_0;
11715 if (ndr_flags & NDR_SCALARS) {
11716 NDR_CHECK(ndr_pull_align(ndr, 4));
11717 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->vcs));
11718 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
11719 if (_ptr_name) {
11720 NDR_PULL_ALLOC(ndr, r->name);
11721 } else {
11722 r->name = NULL;
11724 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_addr));
11725 if (_ptr_addr) {
11726 NDR_PULL_ALLOC(ndr, r->addr);
11727 } else {
11728 r->addr = NULL;
11730 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->addr_len));
11731 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_net_addr));
11732 if (_ptr_net_addr) {
11733 NDR_PULL_ALLOC(ndr, r->net_addr);
11734 } else {
11735 r->net_addr = NULL;
11738 if (ndr_flags & NDR_BUFFERS) {
11739 if (r->name) {
11740 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
11741 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
11742 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
11743 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
11744 if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->name)) {
11745 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->name), ndr_get_array_length(ndr, &r->name));
11747 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t)));
11748 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t), CH_UTF16));
11749 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
11751 if (r->addr) {
11752 _mem_save_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
11753 NDR_PULL_SET_MEM_CTX(ndr, r->addr, 0);
11754 NDR_CHECK(ndr_pull_array_size(ndr, &r->addr));
11755 NDR_PULL_ALLOC_N(ndr, r->addr, ndr_get_array_size(ndr, &r->addr));
11756 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->addr, ndr_get_array_size(ndr, &r->addr)));
11757 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_addr_0, 0);
11759 if (r->net_addr) {
11760 _mem_save_net_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
11761 NDR_PULL_SET_MEM_CTX(ndr, r->net_addr, 0);
11762 NDR_CHECK(ndr_pull_array_size(ndr, &r->net_addr));
11763 NDR_CHECK(ndr_pull_array_length(ndr, &r->net_addr));
11764 if (ndr_get_array_length(ndr, &r->net_addr) > ndr_get_array_size(ndr, &r->net_addr)) {
11765 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->net_addr), ndr_get_array_length(ndr, &r->net_addr));
11767 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->net_addr), sizeof(uint16_t)));
11768 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->net_addr, ndr_get_array_length(ndr, &r->net_addr), sizeof(uint16_t), CH_UTF16));
11769 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_net_addr_0, 0);
11771 if (r->addr) {
11772 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->addr, r->addr_len));
11775 return NDR_ERR_SUCCESS;
11778 _PUBLIC_ void ndr_print_srvsvc_NetTransportInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportInfo0 *r)
11780 ndr_print_struct(ndr, name, "srvsvc_NetTransportInfo0");
11781 ndr->depth++;
11782 ndr_print_uint32(ndr, "vcs", r->vcs);
11783 ndr_print_ptr(ndr, "name", r->name);
11784 ndr->depth++;
11785 if (r->name) {
11786 ndr_print_string(ndr, "name", r->name);
11788 ndr->depth--;
11789 ndr_print_ptr(ndr, "addr", r->addr);
11790 ndr->depth++;
11791 if (r->addr) {
11792 ndr_print_array_uint8(ndr, "addr", r->addr, r->addr_len);
11794 ndr->depth--;
11795 ndr_print_uint32(ndr, "addr_len", r->addr_len);
11796 ndr_print_ptr(ndr, "net_addr", r->net_addr);
11797 ndr->depth++;
11798 if (r->net_addr) {
11799 ndr_print_string(ndr, "net_addr", r->net_addr);
11801 ndr->depth--;
11802 ndr->depth--;
11805 static enum ndr_err_code ndr_push_srvsvc_NetTransportCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportCtr0 *r)
11807 uint32_t cntr_array_1;
11808 if (ndr_flags & NDR_SCALARS) {
11809 NDR_CHECK(ndr_push_align(ndr, 4));
11810 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
11811 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
11813 if (ndr_flags & NDR_BUFFERS) {
11814 if (r->array) {
11815 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
11816 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
11817 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
11819 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
11820 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
11824 return NDR_ERR_SUCCESS;
11827 static enum ndr_err_code ndr_pull_srvsvc_NetTransportCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportCtr0 *r)
11829 uint32_t _ptr_array;
11830 uint32_t cntr_array_1;
11831 TALLOC_CTX *_mem_save_array_0;
11832 TALLOC_CTX *_mem_save_array_1;
11833 if (ndr_flags & NDR_SCALARS) {
11834 NDR_CHECK(ndr_pull_align(ndr, 4));
11835 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
11836 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
11837 if (_ptr_array) {
11838 NDR_PULL_ALLOC(ndr, r->array);
11839 } else {
11840 r->array = NULL;
11843 if (ndr_flags & NDR_BUFFERS) {
11844 if (r->array) {
11845 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
11846 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
11847 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
11848 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
11849 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
11850 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
11851 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
11852 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
11854 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
11855 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
11857 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
11858 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
11860 if (r->array) {
11861 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
11864 return NDR_ERR_SUCCESS;
11867 _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportCtr0 *r)
11869 uint32_t cntr_array_1;
11870 ndr_print_struct(ndr, name, "srvsvc_NetTransportCtr0");
11871 ndr->depth++;
11872 ndr_print_uint32(ndr, "count", r->count);
11873 ndr_print_ptr(ndr, "array", r->array);
11874 ndr->depth++;
11875 if (r->array) {
11876 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
11877 ndr->depth++;
11878 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
11879 char *idx_1=NULL;
11880 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
11881 ndr_print_srvsvc_NetTransportInfo0(ndr, "array", &r->array[cntr_array_1]);
11882 free(idx_1);
11885 ndr->depth--;
11887 ndr->depth--;
11888 ndr->depth--;
11891 static enum ndr_err_code ndr_push_srvsvc_NetTransportInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportInfo1 *r)
11893 if (ndr_flags & NDR_SCALARS) {
11894 NDR_CHECK(ndr_push_align(ndr, 4));
11895 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->vcs));
11896 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
11897 NDR_CHECK(ndr_push_unique_ptr(ndr, r->addr));
11898 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->addr_len));
11899 NDR_CHECK(ndr_push_unique_ptr(ndr, r->net_addr));
11900 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
11902 if (ndr_flags & NDR_BUFFERS) {
11903 if (r->name) {
11904 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
11905 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
11906 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
11907 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11909 if (r->addr) {
11910 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->addr_len));
11911 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->addr, r->addr_len));
11913 if (r->net_addr) {
11914 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
11915 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
11916 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
11917 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->net_addr, ndr_charset_length(r->net_addr, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11919 if (r->domain) {
11920 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
11921 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
11922 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
11923 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11926 return NDR_ERR_SUCCESS;
11929 static enum ndr_err_code ndr_pull_srvsvc_NetTransportInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportInfo1 *r)
11931 uint32_t _ptr_name;
11932 TALLOC_CTX *_mem_save_name_0;
11933 uint32_t _ptr_addr;
11934 TALLOC_CTX *_mem_save_addr_0;
11935 uint32_t _ptr_net_addr;
11936 TALLOC_CTX *_mem_save_net_addr_0;
11937 uint32_t _ptr_domain;
11938 TALLOC_CTX *_mem_save_domain_0;
11939 if (ndr_flags & NDR_SCALARS) {
11940 NDR_CHECK(ndr_pull_align(ndr, 4));
11941 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->vcs));
11942 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
11943 if (_ptr_name) {
11944 NDR_PULL_ALLOC(ndr, r->name);
11945 } else {
11946 r->name = NULL;
11948 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_addr));
11949 if (_ptr_addr) {
11950 NDR_PULL_ALLOC(ndr, r->addr);
11951 } else {
11952 r->addr = NULL;
11954 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->addr_len));
11955 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_net_addr));
11956 if (_ptr_net_addr) {
11957 NDR_PULL_ALLOC(ndr, r->net_addr);
11958 } else {
11959 r->net_addr = NULL;
11961 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
11962 if (_ptr_domain) {
11963 NDR_PULL_ALLOC(ndr, r->domain);
11964 } else {
11965 r->domain = NULL;
11968 if (ndr_flags & NDR_BUFFERS) {
11969 if (r->name) {
11970 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
11971 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
11972 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
11973 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
11974 if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->name)) {
11975 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->name), ndr_get_array_length(ndr, &r->name));
11977 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t)));
11978 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t), CH_UTF16));
11979 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
11981 if (r->addr) {
11982 _mem_save_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
11983 NDR_PULL_SET_MEM_CTX(ndr, r->addr, 0);
11984 NDR_CHECK(ndr_pull_array_size(ndr, &r->addr));
11985 NDR_PULL_ALLOC_N(ndr, r->addr, ndr_get_array_size(ndr, &r->addr));
11986 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->addr, ndr_get_array_size(ndr, &r->addr)));
11987 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_addr_0, 0);
11989 if (r->net_addr) {
11990 _mem_save_net_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
11991 NDR_PULL_SET_MEM_CTX(ndr, r->net_addr, 0);
11992 NDR_CHECK(ndr_pull_array_size(ndr, &r->net_addr));
11993 NDR_CHECK(ndr_pull_array_length(ndr, &r->net_addr));
11994 if (ndr_get_array_length(ndr, &r->net_addr) > ndr_get_array_size(ndr, &r->net_addr)) {
11995 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->net_addr), ndr_get_array_length(ndr, &r->net_addr));
11997 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->net_addr), sizeof(uint16_t)));
11998 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->net_addr, ndr_get_array_length(ndr, &r->net_addr), sizeof(uint16_t), CH_UTF16));
11999 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_net_addr_0, 0);
12001 if (r->domain) {
12002 _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
12003 NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
12004 NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
12005 NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
12006 if (ndr_get_array_length(ndr, &r->domain) > ndr_get_array_size(ndr, &r->domain)) {
12007 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->domain), ndr_get_array_length(ndr, &r->domain));
12009 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t)));
12010 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t), CH_UTF16));
12011 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
12013 if (r->addr) {
12014 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->addr, r->addr_len));
12017 return NDR_ERR_SUCCESS;
12020 _PUBLIC_ void ndr_print_srvsvc_NetTransportInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportInfo1 *r)
12022 ndr_print_struct(ndr, name, "srvsvc_NetTransportInfo1");
12023 ndr->depth++;
12024 ndr_print_uint32(ndr, "vcs", r->vcs);
12025 ndr_print_ptr(ndr, "name", r->name);
12026 ndr->depth++;
12027 if (r->name) {
12028 ndr_print_string(ndr, "name", r->name);
12030 ndr->depth--;
12031 ndr_print_ptr(ndr, "addr", r->addr);
12032 ndr->depth++;
12033 if (r->addr) {
12034 ndr_print_array_uint8(ndr, "addr", r->addr, r->addr_len);
12036 ndr->depth--;
12037 ndr_print_uint32(ndr, "addr_len", r->addr_len);
12038 ndr_print_ptr(ndr, "net_addr", r->net_addr);
12039 ndr->depth++;
12040 if (r->net_addr) {
12041 ndr_print_string(ndr, "net_addr", r->net_addr);
12043 ndr->depth--;
12044 ndr_print_ptr(ndr, "domain", r->domain);
12045 ndr->depth++;
12046 if (r->domain) {
12047 ndr_print_string(ndr, "domain", r->domain);
12049 ndr->depth--;
12050 ndr->depth--;
12053 static enum ndr_err_code ndr_push_srvsvc_NetTransportCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportCtr1 *r)
12055 uint32_t cntr_array_1;
12056 if (ndr_flags & NDR_SCALARS) {
12057 NDR_CHECK(ndr_push_align(ndr, 4));
12058 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
12059 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
12061 if (ndr_flags & NDR_BUFFERS) {
12062 if (r->array) {
12063 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
12064 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12065 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
12067 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12068 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
12072 return NDR_ERR_SUCCESS;
12075 static enum ndr_err_code ndr_pull_srvsvc_NetTransportCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportCtr1 *r)
12077 uint32_t _ptr_array;
12078 uint32_t cntr_array_1;
12079 TALLOC_CTX *_mem_save_array_0;
12080 TALLOC_CTX *_mem_save_array_1;
12081 if (ndr_flags & NDR_SCALARS) {
12082 NDR_CHECK(ndr_pull_align(ndr, 4));
12083 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
12084 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
12085 if (_ptr_array) {
12086 NDR_PULL_ALLOC(ndr, r->array);
12087 } else {
12088 r->array = NULL;
12091 if (ndr_flags & NDR_BUFFERS) {
12092 if (r->array) {
12093 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
12094 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
12095 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
12096 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
12097 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
12098 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
12099 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12100 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
12102 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12103 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
12105 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
12106 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
12108 if (r->array) {
12109 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
12112 return NDR_ERR_SUCCESS;
12115 _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportCtr1 *r)
12117 uint32_t cntr_array_1;
12118 ndr_print_struct(ndr, name, "srvsvc_NetTransportCtr1");
12119 ndr->depth++;
12120 ndr_print_uint32(ndr, "count", r->count);
12121 ndr_print_ptr(ndr, "array", r->array);
12122 ndr->depth++;
12123 if (r->array) {
12124 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
12125 ndr->depth++;
12126 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
12127 char *idx_1=NULL;
12128 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
12129 ndr_print_srvsvc_NetTransportInfo1(ndr, "array", &r->array[cntr_array_1]);
12130 free(idx_1);
12133 ndr->depth--;
12135 ndr->depth--;
12136 ndr->depth--;
12139 static enum ndr_err_code ndr_push_srvsvc_NetTransportInfo2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportInfo2 *r)
12141 if (ndr_flags & NDR_SCALARS) {
12142 NDR_CHECK(ndr_push_align(ndr, 4));
12143 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->vcs));
12144 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
12145 NDR_CHECK(ndr_push_unique_ptr(ndr, r->addr));
12146 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->addr_len));
12147 NDR_CHECK(ndr_push_unique_ptr(ndr, r->net_addr));
12148 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
12149 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown));
12151 if (ndr_flags & NDR_BUFFERS) {
12152 if (r->name) {
12153 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
12154 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
12155 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
12156 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12158 if (r->addr) {
12159 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->addr_len));
12160 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->addr, r->addr_len));
12162 if (r->net_addr) {
12163 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
12164 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
12165 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
12166 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->net_addr, ndr_charset_length(r->net_addr, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12168 if (r->domain) {
12169 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
12170 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
12171 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
12172 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12175 return NDR_ERR_SUCCESS;
12178 static enum ndr_err_code ndr_pull_srvsvc_NetTransportInfo2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportInfo2 *r)
12180 uint32_t _ptr_name;
12181 TALLOC_CTX *_mem_save_name_0;
12182 uint32_t _ptr_addr;
12183 TALLOC_CTX *_mem_save_addr_0;
12184 uint32_t _ptr_net_addr;
12185 TALLOC_CTX *_mem_save_net_addr_0;
12186 uint32_t _ptr_domain;
12187 TALLOC_CTX *_mem_save_domain_0;
12188 if (ndr_flags & NDR_SCALARS) {
12189 NDR_CHECK(ndr_pull_align(ndr, 4));
12190 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->vcs));
12191 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
12192 if (_ptr_name) {
12193 NDR_PULL_ALLOC(ndr, r->name);
12194 } else {
12195 r->name = NULL;
12197 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_addr));
12198 if (_ptr_addr) {
12199 NDR_PULL_ALLOC(ndr, r->addr);
12200 } else {
12201 r->addr = NULL;
12203 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->addr_len));
12204 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_net_addr));
12205 if (_ptr_net_addr) {
12206 NDR_PULL_ALLOC(ndr, r->net_addr);
12207 } else {
12208 r->net_addr = NULL;
12210 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
12211 if (_ptr_domain) {
12212 NDR_PULL_ALLOC(ndr, r->domain);
12213 } else {
12214 r->domain = NULL;
12216 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown));
12218 if (ndr_flags & NDR_BUFFERS) {
12219 if (r->name) {
12220 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
12221 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
12222 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
12223 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
12224 if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->name)) {
12225 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->name), ndr_get_array_length(ndr, &r->name));
12227 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t)));
12228 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t), CH_UTF16));
12229 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
12231 if (r->addr) {
12232 _mem_save_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
12233 NDR_PULL_SET_MEM_CTX(ndr, r->addr, 0);
12234 NDR_CHECK(ndr_pull_array_size(ndr, &r->addr));
12235 NDR_PULL_ALLOC_N(ndr, r->addr, ndr_get_array_size(ndr, &r->addr));
12236 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->addr, ndr_get_array_size(ndr, &r->addr)));
12237 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_addr_0, 0);
12239 if (r->net_addr) {
12240 _mem_save_net_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
12241 NDR_PULL_SET_MEM_CTX(ndr, r->net_addr, 0);
12242 NDR_CHECK(ndr_pull_array_size(ndr, &r->net_addr));
12243 NDR_CHECK(ndr_pull_array_length(ndr, &r->net_addr));
12244 if (ndr_get_array_length(ndr, &r->net_addr) > ndr_get_array_size(ndr, &r->net_addr)) {
12245 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->net_addr), ndr_get_array_length(ndr, &r->net_addr));
12247 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->net_addr), sizeof(uint16_t)));
12248 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->net_addr, ndr_get_array_length(ndr, &r->net_addr), sizeof(uint16_t), CH_UTF16));
12249 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_net_addr_0, 0);
12251 if (r->domain) {
12252 _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
12253 NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
12254 NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
12255 NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
12256 if (ndr_get_array_length(ndr, &r->domain) > ndr_get_array_size(ndr, &r->domain)) {
12257 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->domain), ndr_get_array_length(ndr, &r->domain));
12259 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t)));
12260 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t), CH_UTF16));
12261 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
12263 if (r->addr) {
12264 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->addr, r->addr_len));
12267 return NDR_ERR_SUCCESS;
12270 _PUBLIC_ void ndr_print_srvsvc_NetTransportInfo2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportInfo2 *r)
12272 ndr_print_struct(ndr, name, "srvsvc_NetTransportInfo2");
12273 ndr->depth++;
12274 ndr_print_uint32(ndr, "vcs", r->vcs);
12275 ndr_print_ptr(ndr, "name", r->name);
12276 ndr->depth++;
12277 if (r->name) {
12278 ndr_print_string(ndr, "name", r->name);
12280 ndr->depth--;
12281 ndr_print_ptr(ndr, "addr", r->addr);
12282 ndr->depth++;
12283 if (r->addr) {
12284 ndr_print_array_uint8(ndr, "addr", r->addr, r->addr_len);
12286 ndr->depth--;
12287 ndr_print_uint32(ndr, "addr_len", r->addr_len);
12288 ndr_print_ptr(ndr, "net_addr", r->net_addr);
12289 ndr->depth++;
12290 if (r->net_addr) {
12291 ndr_print_string(ndr, "net_addr", r->net_addr);
12293 ndr->depth--;
12294 ndr_print_ptr(ndr, "domain", r->domain);
12295 ndr->depth++;
12296 if (r->domain) {
12297 ndr_print_string(ndr, "domain", r->domain);
12299 ndr->depth--;
12300 ndr_print_uint32(ndr, "unknown", r->unknown);
12301 ndr->depth--;
12304 static enum ndr_err_code ndr_push_srvsvc_NetTransportCtr2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportCtr2 *r)
12306 uint32_t cntr_array_1;
12307 if (ndr_flags & NDR_SCALARS) {
12308 NDR_CHECK(ndr_push_align(ndr, 4));
12309 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
12310 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
12312 if (ndr_flags & NDR_BUFFERS) {
12313 if (r->array) {
12314 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
12315 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12316 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
12318 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12319 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo2(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
12323 return NDR_ERR_SUCCESS;
12326 static enum ndr_err_code ndr_pull_srvsvc_NetTransportCtr2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportCtr2 *r)
12328 uint32_t _ptr_array;
12329 uint32_t cntr_array_1;
12330 TALLOC_CTX *_mem_save_array_0;
12331 TALLOC_CTX *_mem_save_array_1;
12332 if (ndr_flags & NDR_SCALARS) {
12333 NDR_CHECK(ndr_pull_align(ndr, 4));
12334 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
12335 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
12336 if (_ptr_array) {
12337 NDR_PULL_ALLOC(ndr, r->array);
12338 } else {
12339 r->array = NULL;
12342 if (ndr_flags & NDR_BUFFERS) {
12343 if (r->array) {
12344 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
12345 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
12346 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
12347 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
12348 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
12349 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
12350 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12351 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
12353 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12354 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo2(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
12356 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
12357 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
12359 if (r->array) {
12360 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
12363 return NDR_ERR_SUCCESS;
12366 _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportCtr2 *r)
12368 uint32_t cntr_array_1;
12369 ndr_print_struct(ndr, name, "srvsvc_NetTransportCtr2");
12370 ndr->depth++;
12371 ndr_print_uint32(ndr, "count", r->count);
12372 ndr_print_ptr(ndr, "array", r->array);
12373 ndr->depth++;
12374 if (r->array) {
12375 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
12376 ndr->depth++;
12377 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
12378 char *idx_1=NULL;
12379 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
12380 ndr_print_srvsvc_NetTransportInfo2(ndr, "array", &r->array[cntr_array_1]);
12381 free(idx_1);
12384 ndr->depth--;
12386 ndr->depth--;
12387 ndr->depth--;
12390 static enum ndr_err_code ndr_push_srvsvc_NetTransportInfo3(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportInfo3 *r)
12392 if (ndr_flags & NDR_SCALARS) {
12393 NDR_CHECK(ndr_push_align(ndr, 4));
12394 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->vcs));
12395 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
12396 NDR_CHECK(ndr_push_unique_ptr(ndr, r->addr));
12397 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->addr_len));
12398 NDR_CHECK(ndr_push_unique_ptr(ndr, r->net_addr));
12399 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
12400 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
12401 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2));
12402 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->unknown3, 256));
12404 if (ndr_flags & NDR_BUFFERS) {
12405 if (r->name) {
12406 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
12407 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
12408 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
12409 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12411 if (r->addr) {
12412 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->addr_len));
12413 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->addr, r->addr_len));
12415 if (r->net_addr) {
12416 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
12417 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
12418 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
12419 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->net_addr, ndr_charset_length(r->net_addr, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12421 if (r->domain) {
12422 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
12423 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
12424 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
12425 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12428 return NDR_ERR_SUCCESS;
12431 static enum ndr_err_code ndr_pull_srvsvc_NetTransportInfo3(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportInfo3 *r)
12433 uint32_t _ptr_name;
12434 TALLOC_CTX *_mem_save_name_0;
12435 uint32_t _ptr_addr;
12436 TALLOC_CTX *_mem_save_addr_0;
12437 uint32_t _ptr_net_addr;
12438 TALLOC_CTX *_mem_save_net_addr_0;
12439 uint32_t _ptr_domain;
12440 TALLOC_CTX *_mem_save_domain_0;
12441 if (ndr_flags & NDR_SCALARS) {
12442 NDR_CHECK(ndr_pull_align(ndr, 4));
12443 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->vcs));
12444 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
12445 if (_ptr_name) {
12446 NDR_PULL_ALLOC(ndr, r->name);
12447 } else {
12448 r->name = NULL;
12450 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_addr));
12451 if (_ptr_addr) {
12452 NDR_PULL_ALLOC(ndr, r->addr);
12453 } else {
12454 r->addr = NULL;
12456 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->addr_len));
12457 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_net_addr));
12458 if (_ptr_net_addr) {
12459 NDR_PULL_ALLOC(ndr, r->net_addr);
12460 } else {
12461 r->net_addr = NULL;
12463 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
12464 if (_ptr_domain) {
12465 NDR_PULL_ALLOC(ndr, r->domain);
12466 } else {
12467 r->domain = NULL;
12469 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
12470 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
12471 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->unknown3, 256));
12473 if (ndr_flags & NDR_BUFFERS) {
12474 if (r->name) {
12475 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
12476 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
12477 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
12478 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
12479 if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->name)) {
12480 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->name), ndr_get_array_length(ndr, &r->name));
12482 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t)));
12483 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t), CH_UTF16));
12484 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
12486 if (r->addr) {
12487 _mem_save_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
12488 NDR_PULL_SET_MEM_CTX(ndr, r->addr, 0);
12489 NDR_CHECK(ndr_pull_array_size(ndr, &r->addr));
12490 NDR_PULL_ALLOC_N(ndr, r->addr, ndr_get_array_size(ndr, &r->addr));
12491 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->addr, ndr_get_array_size(ndr, &r->addr)));
12492 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_addr_0, 0);
12494 if (r->net_addr) {
12495 _mem_save_net_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
12496 NDR_PULL_SET_MEM_CTX(ndr, r->net_addr, 0);
12497 NDR_CHECK(ndr_pull_array_size(ndr, &r->net_addr));
12498 NDR_CHECK(ndr_pull_array_length(ndr, &r->net_addr));
12499 if (ndr_get_array_length(ndr, &r->net_addr) > ndr_get_array_size(ndr, &r->net_addr)) {
12500 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->net_addr), ndr_get_array_length(ndr, &r->net_addr));
12502 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->net_addr), sizeof(uint16_t)));
12503 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->net_addr, ndr_get_array_length(ndr, &r->net_addr), sizeof(uint16_t), CH_UTF16));
12504 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_net_addr_0, 0);
12506 if (r->domain) {
12507 _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
12508 NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
12509 NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
12510 NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
12511 if (ndr_get_array_length(ndr, &r->domain) > ndr_get_array_size(ndr, &r->domain)) {
12512 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->domain), ndr_get_array_length(ndr, &r->domain));
12514 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t)));
12515 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t), CH_UTF16));
12516 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
12518 if (r->addr) {
12519 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->addr, r->addr_len));
12522 return NDR_ERR_SUCCESS;
12525 _PUBLIC_ void ndr_print_srvsvc_NetTransportInfo3(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportInfo3 *r)
12527 ndr_print_struct(ndr, name, "srvsvc_NetTransportInfo3");
12528 ndr->depth++;
12529 ndr_print_uint32(ndr, "vcs", r->vcs);
12530 ndr_print_ptr(ndr, "name", r->name);
12531 ndr->depth++;
12532 if (r->name) {
12533 ndr_print_string(ndr, "name", r->name);
12535 ndr->depth--;
12536 ndr_print_ptr(ndr, "addr", r->addr);
12537 ndr->depth++;
12538 if (r->addr) {
12539 ndr_print_array_uint8(ndr, "addr", r->addr, r->addr_len);
12541 ndr->depth--;
12542 ndr_print_uint32(ndr, "addr_len", r->addr_len);
12543 ndr_print_ptr(ndr, "net_addr", r->net_addr);
12544 ndr->depth++;
12545 if (r->net_addr) {
12546 ndr_print_string(ndr, "net_addr", r->net_addr);
12548 ndr->depth--;
12549 ndr_print_ptr(ndr, "domain", r->domain);
12550 ndr->depth++;
12551 if (r->domain) {
12552 ndr_print_string(ndr, "domain", r->domain);
12554 ndr->depth--;
12555 ndr_print_uint32(ndr, "unknown1", r->unknown1);
12556 ndr_print_uint32(ndr, "unknown2", r->unknown2);
12557 ndr_print_array_uint8(ndr, "unknown3", r->unknown3, 256);
12558 ndr->depth--;
12561 static enum ndr_err_code ndr_push_srvsvc_NetTransportCtr3(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportCtr3 *r)
12563 uint32_t cntr_array_1;
12564 if (ndr_flags & NDR_SCALARS) {
12565 NDR_CHECK(ndr_push_align(ndr, 4));
12566 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
12567 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
12569 if (ndr_flags & NDR_BUFFERS) {
12570 if (r->array) {
12571 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
12572 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12573 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo3(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
12575 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12576 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo3(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
12580 return NDR_ERR_SUCCESS;
12583 static enum ndr_err_code ndr_pull_srvsvc_NetTransportCtr3(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportCtr3 *r)
12585 uint32_t _ptr_array;
12586 uint32_t cntr_array_1;
12587 TALLOC_CTX *_mem_save_array_0;
12588 TALLOC_CTX *_mem_save_array_1;
12589 if (ndr_flags & NDR_SCALARS) {
12590 NDR_CHECK(ndr_pull_align(ndr, 4));
12591 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
12592 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
12593 if (_ptr_array) {
12594 NDR_PULL_ALLOC(ndr, r->array);
12595 } else {
12596 r->array = NULL;
12599 if (ndr_flags & NDR_BUFFERS) {
12600 if (r->array) {
12601 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
12602 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
12603 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
12604 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
12605 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
12606 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
12607 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12608 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo3(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
12610 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12611 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo3(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
12613 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
12614 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
12616 if (r->array) {
12617 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
12620 return NDR_ERR_SUCCESS;
12623 _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr3(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportCtr3 *r)
12625 uint32_t cntr_array_1;
12626 ndr_print_struct(ndr, name, "srvsvc_NetTransportCtr3");
12627 ndr->depth++;
12628 ndr_print_uint32(ndr, "count", r->count);
12629 ndr_print_ptr(ndr, "array", r->array);
12630 ndr->depth++;
12631 if (r->array) {
12632 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
12633 ndr->depth++;
12634 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
12635 char *idx_1=NULL;
12636 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
12637 ndr_print_srvsvc_NetTransportInfo3(ndr, "array", &r->array[cntr_array_1]);
12638 free(idx_1);
12641 ndr->depth--;
12643 ndr->depth--;
12644 ndr->depth--;
12647 static enum ndr_err_code ndr_push_srvsvc_NetTransportCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetTransportCtr *r)
12649 if (ndr_flags & NDR_SCALARS) {
12650 int level = ndr_push_get_switch_value(ndr, r);
12651 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
12652 switch (level) {
12653 case 0: {
12654 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0));
12655 break; }
12657 case 1: {
12658 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
12659 break; }
12661 case 2: {
12662 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr2));
12663 break; }
12665 case 3: {
12666 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr3));
12667 break; }
12669 default: {
12670 break; }
12674 if (ndr_flags & NDR_BUFFERS) {
12675 int level = ndr_push_get_switch_value(ndr, r);
12676 switch (level) {
12677 case 0:
12678 if (r->ctr0) {
12679 NDR_CHECK(ndr_push_srvsvc_NetTransportCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
12681 break;
12683 case 1:
12684 if (r->ctr1) {
12685 NDR_CHECK(ndr_push_srvsvc_NetTransportCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
12687 break;
12689 case 2:
12690 if (r->ctr2) {
12691 NDR_CHECK(ndr_push_srvsvc_NetTransportCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
12693 break;
12695 case 3:
12696 if (r->ctr3) {
12697 NDR_CHECK(ndr_push_srvsvc_NetTransportCtr3(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr3));
12699 break;
12701 default:
12702 break;
12706 return NDR_ERR_SUCCESS;
12709 static enum ndr_err_code ndr_pull_srvsvc_NetTransportCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetTransportCtr *r)
12711 int level;
12712 uint32_t _level;
12713 TALLOC_CTX *_mem_save_ctr0_0;
12714 TALLOC_CTX *_mem_save_ctr1_0;
12715 TALLOC_CTX *_mem_save_ctr2_0;
12716 TALLOC_CTX *_mem_save_ctr3_0;
12717 level = ndr_pull_get_switch_value(ndr, r);
12718 if (ndr_flags & NDR_SCALARS) {
12719 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
12720 if (_level != level) {
12721 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
12723 switch (level) {
12724 case 0: {
12725 uint32_t _ptr_ctr0;
12726 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr0));
12727 if (_ptr_ctr0) {
12728 NDR_PULL_ALLOC(ndr, r->ctr0);
12729 } else {
12730 r->ctr0 = NULL;
12732 break; }
12734 case 1: {
12735 uint32_t _ptr_ctr1;
12736 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
12737 if (_ptr_ctr1) {
12738 NDR_PULL_ALLOC(ndr, r->ctr1);
12739 } else {
12740 r->ctr1 = NULL;
12742 break; }
12744 case 2: {
12745 uint32_t _ptr_ctr2;
12746 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr2));
12747 if (_ptr_ctr2) {
12748 NDR_PULL_ALLOC(ndr, r->ctr2);
12749 } else {
12750 r->ctr2 = NULL;
12752 break; }
12754 case 3: {
12755 uint32_t _ptr_ctr3;
12756 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr3));
12757 if (_ptr_ctr3) {
12758 NDR_PULL_ALLOC(ndr, r->ctr3);
12759 } else {
12760 r->ctr3 = NULL;
12762 break; }
12764 default: {
12765 break; }
12769 if (ndr_flags & NDR_BUFFERS) {
12770 switch (level) {
12771 case 0:
12772 if (r->ctr0) {
12773 _mem_save_ctr0_0 = NDR_PULL_GET_MEM_CTX(ndr);
12774 NDR_PULL_SET_MEM_CTX(ndr, r->ctr0, 0);
12775 NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
12776 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr0_0, 0);
12778 break;
12780 case 1:
12781 if (r->ctr1) {
12782 _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
12783 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
12784 NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
12785 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
12787 break;
12789 case 2:
12790 if (r->ctr2) {
12791 _mem_save_ctr2_0 = NDR_PULL_GET_MEM_CTX(ndr);
12792 NDR_PULL_SET_MEM_CTX(ndr, r->ctr2, 0);
12793 NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
12794 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr2_0, 0);
12796 break;
12798 case 3:
12799 if (r->ctr3) {
12800 _mem_save_ctr3_0 = NDR_PULL_GET_MEM_CTX(ndr);
12801 NDR_PULL_SET_MEM_CTX(ndr, r->ctr3, 0);
12802 NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr3(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr3));
12803 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr3_0, 0);
12805 break;
12807 default:
12808 break;
12812 return NDR_ERR_SUCCESS;
12815 _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetTransportCtr *r)
12817 int level;
12818 level = ndr_print_get_switch_value(ndr, r);
12819 ndr_print_union(ndr, name, level, "srvsvc_NetTransportCtr");
12820 switch (level) {
12821 case 0:
12822 ndr_print_ptr(ndr, "ctr0", r->ctr0);
12823 ndr->depth++;
12824 if (r->ctr0) {
12825 ndr_print_srvsvc_NetTransportCtr0(ndr, "ctr0", r->ctr0);
12827 ndr->depth--;
12828 break;
12830 case 1:
12831 ndr_print_ptr(ndr, "ctr1", r->ctr1);
12832 ndr->depth++;
12833 if (r->ctr1) {
12834 ndr_print_srvsvc_NetTransportCtr1(ndr, "ctr1", r->ctr1);
12836 ndr->depth--;
12837 break;
12839 case 2:
12840 ndr_print_ptr(ndr, "ctr2", r->ctr2);
12841 ndr->depth++;
12842 if (r->ctr2) {
12843 ndr_print_srvsvc_NetTransportCtr2(ndr, "ctr2", r->ctr2);
12845 ndr->depth--;
12846 break;
12848 case 3:
12849 ndr_print_ptr(ndr, "ctr3", r->ctr3);
12850 ndr->depth++;
12851 if (r->ctr3) {
12852 ndr_print_srvsvc_NetTransportCtr3(ndr, "ctr3", r->ctr3);
12854 ndr->depth--;
12855 break;
12857 default:
12858 break;
12863 static enum ndr_err_code ndr_push_srvsvc_NetRemoteTODInfo(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetRemoteTODInfo *r)
12865 if (ndr_flags & NDR_SCALARS) {
12866 NDR_CHECK(ndr_push_align(ndr, 4));
12867 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->elapsed));
12868 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->msecs));
12869 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->hours));
12870 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->mins));
12871 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->secs));
12872 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->hunds));
12873 NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, r->timezone));
12874 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->tinterval));
12875 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->day));
12876 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->month));
12877 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->year));
12878 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->weekday));
12880 if (ndr_flags & NDR_BUFFERS) {
12882 return NDR_ERR_SUCCESS;
12885 static enum ndr_err_code ndr_pull_srvsvc_NetRemoteTODInfo(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetRemoteTODInfo *r)
12887 if (ndr_flags & NDR_SCALARS) {
12888 NDR_CHECK(ndr_pull_align(ndr, 4));
12889 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->elapsed));
12890 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->msecs));
12891 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->hours));
12892 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->mins));
12893 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->secs));
12894 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->hunds));
12895 NDR_CHECK(ndr_pull_int32(ndr, NDR_SCALARS, &r->timezone));
12896 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->tinterval));
12897 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->day));
12898 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->month));
12899 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->year));
12900 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->weekday));
12902 if (ndr_flags & NDR_BUFFERS) {
12904 return NDR_ERR_SUCCESS;
12907 _PUBLIC_ void ndr_print_srvsvc_NetRemoteTODInfo(struct ndr_print *ndr, const char *name, const struct srvsvc_NetRemoteTODInfo *r)
12909 ndr_print_struct(ndr, name, "srvsvc_NetRemoteTODInfo");
12910 ndr->depth++;
12911 ndr_print_uint32(ndr, "elapsed", r->elapsed);
12912 ndr_print_uint32(ndr, "msecs", r->msecs);
12913 ndr_print_uint32(ndr, "hours", r->hours);
12914 ndr_print_uint32(ndr, "mins", r->mins);
12915 ndr_print_uint32(ndr, "secs", r->secs);
12916 ndr_print_uint32(ndr, "hunds", r->hunds);
12917 ndr_print_int32(ndr, "timezone", r->timezone);
12918 ndr_print_uint32(ndr, "tinterval", r->tinterval);
12919 ndr_print_uint32(ndr, "day", r->day);
12920 ndr_print_uint32(ndr, "month", r->month);
12921 ndr_print_uint32(ndr, "year", r->year);
12922 ndr_print_uint32(ndr, "weekday", r->weekday);
12923 ndr->depth--;
12926 static enum ndr_err_code ndr_push_srvsvc_NetTransportInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetTransportInfo *r)
12928 if (ndr_flags & NDR_SCALARS) {
12929 int level = ndr_push_get_switch_value(ndr, r);
12930 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
12931 switch (level) {
12932 case 0: {
12933 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo0(ndr, NDR_SCALARS, &r->info0));
12934 break; }
12936 case 1: {
12937 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo1(ndr, NDR_SCALARS, &r->info1));
12938 break; }
12940 case 2: {
12941 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo2(ndr, NDR_SCALARS, &r->info2));
12942 break; }
12944 case 3: {
12945 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo3(ndr, NDR_SCALARS, &r->info3));
12946 break; }
12948 default:
12949 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
12952 if (ndr_flags & NDR_BUFFERS) {
12953 int level = ndr_push_get_switch_value(ndr, r);
12954 switch (level) {
12955 case 0:
12956 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo0(ndr, NDR_BUFFERS, &r->info0));
12957 break;
12959 case 1:
12960 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo1(ndr, NDR_BUFFERS, &r->info1));
12961 break;
12963 case 2:
12964 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo2(ndr, NDR_BUFFERS, &r->info2));
12965 break;
12967 case 3:
12968 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo3(ndr, NDR_BUFFERS, &r->info3));
12969 break;
12971 default:
12972 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
12975 return NDR_ERR_SUCCESS;
12978 static enum ndr_err_code ndr_pull_srvsvc_NetTransportInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetTransportInfo *r)
12980 int level;
12981 uint32_t _level;
12982 level = ndr_pull_get_switch_value(ndr, r);
12983 if (ndr_flags & NDR_SCALARS) {
12984 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
12985 if (_level != level) {
12986 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
12988 switch (level) {
12989 case 0: {
12990 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo0(ndr, NDR_SCALARS, &r->info0));
12991 break; }
12993 case 1: {
12994 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo1(ndr, NDR_SCALARS, &r->info1));
12995 break; }
12997 case 2: {
12998 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo2(ndr, NDR_SCALARS, &r->info2));
12999 break; }
13001 case 3: {
13002 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo3(ndr, NDR_SCALARS, &r->info3));
13003 break; }
13005 default:
13006 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
13009 if (ndr_flags & NDR_BUFFERS) {
13010 switch (level) {
13011 case 0:
13012 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo0(ndr, NDR_BUFFERS, &r->info0));
13013 break;
13015 case 1:
13016 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo1(ndr, NDR_BUFFERS, &r->info1));
13017 break;
13019 case 2:
13020 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo2(ndr, NDR_BUFFERS, &r->info2));
13021 break;
13023 case 3:
13024 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo3(ndr, NDR_BUFFERS, &r->info3));
13025 break;
13027 default:
13028 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
13031 return NDR_ERR_SUCCESS;
13034 _PUBLIC_ void ndr_print_srvsvc_NetTransportInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetTransportInfo *r)
13036 int level;
13037 level = ndr_print_get_switch_value(ndr, r);
13038 ndr_print_union(ndr, name, level, "srvsvc_NetTransportInfo");
13039 switch (level) {
13040 case 0:
13041 ndr_print_srvsvc_NetTransportInfo0(ndr, "info0", &r->info0);
13042 break;
13044 case 1:
13045 ndr_print_srvsvc_NetTransportInfo1(ndr, "info1", &r->info1);
13046 break;
13048 case 2:
13049 ndr_print_srvsvc_NetTransportInfo2(ndr, "info2", &r->info2);
13050 break;
13052 case 3:
13053 ndr_print_srvsvc_NetTransportInfo3(ndr, "info3", &r->info3);
13054 break;
13056 default:
13057 ndr_print_bad_level(ndr, name, level);
13061 static enum ndr_err_code ndr_push_srvsvc_NetCharDevEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevEnum *r)
13063 if (flags & NDR_IN) {
13064 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
13065 if (r->in.server_unc) {
13066 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13067 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
13068 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13069 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));
13071 if (r->in.level == NULL) {
13072 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13074 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.level));
13075 if (r->in.ctr == NULL) {
13076 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13078 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.ctr, *r->in.level));
13079 NDR_CHECK(ndr_push_srvsvc_NetCharDevCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
13080 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
13081 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
13082 if (r->in.resume_handle) {
13083 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
13086 if (flags & NDR_OUT) {
13087 if (r->out.level == NULL) {
13088 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13090 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level));
13091 if (r->out.ctr == NULL) {
13092 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13094 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ctr, *r->out.level));
13095 NDR_CHECK(ndr_push_srvsvc_NetCharDevCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
13096 if (r->out.totalentries == NULL) {
13097 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13099 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
13100 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
13101 if (r->out.resume_handle) {
13102 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
13104 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
13106 return NDR_ERR_SUCCESS;
13109 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevEnum *r)
13111 uint32_t _ptr_server_unc;
13112 uint32_t _ptr_resume_handle;
13113 TALLOC_CTX *_mem_save_server_unc_0;
13114 TALLOC_CTX *_mem_save_level_0;
13115 TALLOC_CTX *_mem_save_ctr_0;
13116 TALLOC_CTX *_mem_save_totalentries_0;
13117 TALLOC_CTX *_mem_save_resume_handle_0;
13118 if (flags & NDR_IN) {
13119 ZERO_STRUCT(r->out);
13121 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
13122 if (_ptr_server_unc) {
13123 NDR_PULL_ALLOC(ndr, r->in.server_unc);
13124 } else {
13125 r->in.server_unc = NULL;
13127 if (r->in.server_unc) {
13128 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
13129 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
13130 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
13131 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
13132 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
13133 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
13135 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
13136 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
13137 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
13139 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13140 NDR_PULL_ALLOC(ndr, r->in.level);
13142 _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr);
13143 NDR_PULL_SET_MEM_CTX(ndr, r->in.level, LIBNDR_FLAG_REF_ALLOC);
13144 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.level));
13145 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC);
13146 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13147 NDR_PULL_ALLOC(ndr, r->in.ctr);
13149 _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
13150 NDR_PULL_SET_MEM_CTX(ndr, r->in.ctr, LIBNDR_FLAG_REF_ALLOC);
13151 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.ctr, *r->in.level));
13152 NDR_CHECK(ndr_pull_srvsvc_NetCharDevCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
13153 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
13154 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
13155 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
13156 if (_ptr_resume_handle) {
13157 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
13158 } else {
13159 r->in.resume_handle = NULL;
13161 if (r->in.resume_handle) {
13162 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
13163 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
13164 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
13165 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
13167 NDR_PULL_ALLOC(ndr, r->out.level);
13168 *r->out.level = *r->in.level;
13169 NDR_PULL_ALLOC(ndr, r->out.ctr);
13170 *r->out.ctr = *r->in.ctr;
13171 NDR_PULL_ALLOC(ndr, r->out.totalentries);
13172 ZERO_STRUCTP(r->out.totalentries);
13174 if (flags & NDR_OUT) {
13175 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13176 NDR_PULL_ALLOC(ndr, r->out.level);
13178 _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr);
13179 NDR_PULL_SET_MEM_CTX(ndr, r->out.level, LIBNDR_FLAG_REF_ALLOC);
13180 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.level));
13181 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC);
13182 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13183 NDR_PULL_ALLOC(ndr, r->out.ctr);
13185 _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
13186 NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
13187 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ctr, *r->out.level));
13188 NDR_CHECK(ndr_pull_srvsvc_NetCharDevCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
13189 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
13190 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13191 NDR_PULL_ALLOC(ndr, r->out.totalentries);
13193 _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
13194 NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
13195 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
13196 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
13197 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
13198 if (_ptr_resume_handle) {
13199 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
13200 } else {
13201 r->out.resume_handle = NULL;
13203 if (r->out.resume_handle) {
13204 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
13205 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
13206 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
13207 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
13209 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
13211 return NDR_ERR_SUCCESS;
13214 _PUBLIC_ void ndr_print_srvsvc_NetCharDevEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevEnum *r)
13216 ndr_print_struct(ndr, name, "srvsvc_NetCharDevEnum");
13217 ndr->depth++;
13218 if (flags & NDR_SET_VALUES) {
13219 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
13221 if (flags & NDR_IN) {
13222 ndr_print_struct(ndr, "in", "srvsvc_NetCharDevEnum");
13223 ndr->depth++;
13224 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
13225 ndr->depth++;
13226 if (r->in.server_unc) {
13227 ndr_print_string(ndr, "server_unc", r->in.server_unc);
13229 ndr->depth--;
13230 ndr_print_ptr(ndr, "level", r->in.level);
13231 ndr->depth++;
13232 ndr_print_uint32(ndr, "level", *r->in.level);
13233 ndr->depth--;
13234 ndr_print_ptr(ndr, "ctr", r->in.ctr);
13235 ndr->depth++;
13236 ndr_print_set_switch_value(ndr, r->in.ctr, *r->in.level);
13237 ndr_print_srvsvc_NetCharDevCtr(ndr, "ctr", r->in.ctr);
13238 ndr->depth--;
13239 ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
13240 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
13241 ndr->depth++;
13242 if (r->in.resume_handle) {
13243 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
13245 ndr->depth--;
13246 ndr->depth--;
13248 if (flags & NDR_OUT) {
13249 ndr_print_struct(ndr, "out", "srvsvc_NetCharDevEnum");
13250 ndr->depth++;
13251 ndr_print_ptr(ndr, "level", r->out.level);
13252 ndr->depth++;
13253 ndr_print_uint32(ndr, "level", *r->out.level);
13254 ndr->depth--;
13255 ndr_print_ptr(ndr, "ctr", r->out.ctr);
13256 ndr->depth++;
13257 ndr_print_set_switch_value(ndr, r->out.ctr, *r->out.level);
13258 ndr_print_srvsvc_NetCharDevCtr(ndr, "ctr", r->out.ctr);
13259 ndr->depth--;
13260 ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
13261 ndr->depth++;
13262 ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
13263 ndr->depth--;
13264 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
13265 ndr->depth++;
13266 if (r->out.resume_handle) {
13267 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
13269 ndr->depth--;
13270 ndr_print_WERROR(ndr, "result", r->out.result);
13271 ndr->depth--;
13273 ndr->depth--;
13276 static enum ndr_err_code ndr_push_srvsvc_NetCharDevGetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevGetInfo *r)
13278 if (flags & NDR_IN) {
13279 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
13280 if (r->in.server_unc) {
13281 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13282 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
13283 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13284 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));
13286 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.device_name, CH_UTF16)));
13287 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
13288 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.device_name, CH_UTF16)));
13289 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));
13290 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
13292 if (flags & NDR_OUT) {
13293 if (r->out.info == NULL) {
13294 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13296 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
13297 NDR_CHECK(ndr_push_srvsvc_NetCharDevInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
13298 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
13300 return NDR_ERR_SUCCESS;
13303 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevGetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevGetInfo *r)
13305 uint32_t _ptr_server_unc;
13306 TALLOC_CTX *_mem_save_server_unc_0;
13307 TALLOC_CTX *_mem_save_info_0;
13308 if (flags & NDR_IN) {
13309 ZERO_STRUCT(r->out);
13311 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
13312 if (_ptr_server_unc) {
13313 NDR_PULL_ALLOC(ndr, r->in.server_unc);
13314 } else {
13315 r->in.server_unc = NULL;
13317 if (r->in.server_unc) {
13318 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
13319 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
13320 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
13321 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
13322 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
13323 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
13325 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
13326 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
13327 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
13329 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.device_name));
13330 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.device_name));
13331 if (ndr_get_array_length(ndr, &r->in.device_name) > ndr_get_array_size(ndr, &r->in.device_name)) {
13332 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.device_name), ndr_get_array_length(ndr, &r->in.device_name));
13334 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.device_name), sizeof(uint16_t)));
13335 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.device_name, ndr_get_array_length(ndr, &r->in.device_name), sizeof(uint16_t), CH_UTF16));
13336 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
13337 NDR_PULL_ALLOC(ndr, r->out.info);
13338 ZERO_STRUCTP(r->out.info);
13340 if (flags & NDR_OUT) {
13341 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13342 NDR_PULL_ALLOC(ndr, r->out.info);
13344 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
13345 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
13346 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
13347 NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
13348 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
13349 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
13351 return NDR_ERR_SUCCESS;
13354 _PUBLIC_ void ndr_print_srvsvc_NetCharDevGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevGetInfo *r)
13356 ndr_print_struct(ndr, name, "srvsvc_NetCharDevGetInfo");
13357 ndr->depth++;
13358 if (flags & NDR_SET_VALUES) {
13359 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
13361 if (flags & NDR_IN) {
13362 ndr_print_struct(ndr, "in", "srvsvc_NetCharDevGetInfo");
13363 ndr->depth++;
13364 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
13365 ndr->depth++;
13366 if (r->in.server_unc) {
13367 ndr_print_string(ndr, "server_unc", r->in.server_unc);
13369 ndr->depth--;
13370 ndr_print_string(ndr, "device_name", r->in.device_name);
13371 ndr_print_uint32(ndr, "level", r->in.level);
13372 ndr->depth--;
13374 if (flags & NDR_OUT) {
13375 ndr_print_struct(ndr, "out", "srvsvc_NetCharDevGetInfo");
13376 ndr->depth++;
13377 ndr_print_ptr(ndr, "info", r->out.info);
13378 ndr->depth++;
13379 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
13380 ndr_print_srvsvc_NetCharDevInfo(ndr, "info", r->out.info);
13381 ndr->depth--;
13382 ndr_print_WERROR(ndr, "result", r->out.result);
13383 ndr->depth--;
13385 ndr->depth--;
13388 static enum ndr_err_code ndr_push_srvsvc_NetCharDevControl(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevControl *r)
13390 if (flags & NDR_IN) {
13391 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
13392 if (r->in.server_unc) {
13393 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13394 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
13395 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13396 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));
13398 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.device_name, CH_UTF16)));
13399 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
13400 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.device_name, CH_UTF16)));
13401 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));
13402 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.opcode));
13404 if (flags & NDR_OUT) {
13405 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
13407 return NDR_ERR_SUCCESS;
13410 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevControl(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevControl *r)
13412 uint32_t _ptr_server_unc;
13413 TALLOC_CTX *_mem_save_server_unc_0;
13414 if (flags & NDR_IN) {
13415 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
13416 if (_ptr_server_unc) {
13417 NDR_PULL_ALLOC(ndr, r->in.server_unc);
13418 } else {
13419 r->in.server_unc = NULL;
13421 if (r->in.server_unc) {
13422 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
13423 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
13424 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
13425 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
13426 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
13427 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
13429 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
13430 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
13431 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
13433 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.device_name));
13434 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.device_name));
13435 if (ndr_get_array_length(ndr, &r->in.device_name) > ndr_get_array_size(ndr, &r->in.device_name)) {
13436 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.device_name), ndr_get_array_length(ndr, &r->in.device_name));
13438 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.device_name), sizeof(uint16_t)));
13439 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.device_name, ndr_get_array_length(ndr, &r->in.device_name), sizeof(uint16_t), CH_UTF16));
13440 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.opcode));
13442 if (flags & NDR_OUT) {
13443 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
13445 return NDR_ERR_SUCCESS;
13448 _PUBLIC_ void ndr_print_srvsvc_NetCharDevControl(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevControl *r)
13450 ndr_print_struct(ndr, name, "srvsvc_NetCharDevControl");
13451 ndr->depth++;
13452 if (flags & NDR_SET_VALUES) {
13453 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
13455 if (flags & NDR_IN) {
13456 ndr_print_struct(ndr, "in", "srvsvc_NetCharDevControl");
13457 ndr->depth++;
13458 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
13459 ndr->depth++;
13460 if (r->in.server_unc) {
13461 ndr_print_string(ndr, "server_unc", r->in.server_unc);
13463 ndr->depth--;
13464 ndr_print_string(ndr, "device_name", r->in.device_name);
13465 ndr_print_uint32(ndr, "opcode", r->in.opcode);
13466 ndr->depth--;
13468 if (flags & NDR_OUT) {
13469 ndr_print_struct(ndr, "out", "srvsvc_NetCharDevControl");
13470 ndr->depth++;
13471 ndr_print_WERROR(ndr, "result", r->out.result);
13472 ndr->depth--;
13474 ndr->depth--;
13477 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevQEnum *r)
13479 if (flags & NDR_IN) {
13480 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
13481 if (r->in.server_unc) {
13482 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13483 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
13484 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13485 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));
13487 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.user));
13488 if (r->in.user) {
13489 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
13490 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
13491 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
13492 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.user, ndr_charset_length(r->in.user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
13494 if (r->in.level == NULL) {
13495 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13497 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.level));
13498 if (r->in.ctr == NULL) {
13499 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13501 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.ctr, *r->in.level));
13502 NDR_CHECK(ndr_push_srvsvc_NetCharDevQCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
13503 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
13504 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
13505 if (r->in.resume_handle) {
13506 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
13509 if (flags & NDR_OUT) {
13510 if (r->out.level == NULL) {
13511 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13513 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level));
13514 if (r->out.ctr == NULL) {
13515 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13517 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ctr, *r->out.level));
13518 NDR_CHECK(ndr_push_srvsvc_NetCharDevQCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
13519 if (r->out.totalentries == NULL) {
13520 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13522 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
13523 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
13524 if (r->out.resume_handle) {
13525 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
13527 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
13529 return NDR_ERR_SUCCESS;
13532 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevQEnum *r)
13534 uint32_t _ptr_server_unc;
13535 uint32_t _ptr_user;
13536 uint32_t _ptr_resume_handle;
13537 TALLOC_CTX *_mem_save_server_unc_0;
13538 TALLOC_CTX *_mem_save_user_0;
13539 TALLOC_CTX *_mem_save_level_0;
13540 TALLOC_CTX *_mem_save_ctr_0;
13541 TALLOC_CTX *_mem_save_totalentries_0;
13542 TALLOC_CTX *_mem_save_resume_handle_0;
13543 if (flags & NDR_IN) {
13544 ZERO_STRUCT(r->out);
13546 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
13547 if (_ptr_server_unc) {
13548 NDR_PULL_ALLOC(ndr, r->in.server_unc);
13549 } else {
13550 r->in.server_unc = NULL;
13552 if (r->in.server_unc) {
13553 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
13554 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
13555 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
13556 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
13557 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
13558 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
13560 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
13561 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
13562 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
13564 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
13565 if (_ptr_user) {
13566 NDR_PULL_ALLOC(ndr, r->in.user);
13567 } else {
13568 r->in.user = NULL;
13570 if (r->in.user) {
13571 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
13572 NDR_PULL_SET_MEM_CTX(ndr, r->in.user, 0);
13573 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.user));
13574 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.user));
13575 if (ndr_get_array_length(ndr, &r->in.user) > ndr_get_array_size(ndr, &r->in.user)) {
13576 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.user), ndr_get_array_length(ndr, &r->in.user));
13578 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.user), sizeof(uint16_t)));
13579 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.user, ndr_get_array_length(ndr, &r->in.user), sizeof(uint16_t), CH_UTF16));
13580 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
13582 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13583 NDR_PULL_ALLOC(ndr, r->in.level);
13585 _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr);
13586 NDR_PULL_SET_MEM_CTX(ndr, r->in.level, LIBNDR_FLAG_REF_ALLOC);
13587 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.level));
13588 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC);
13589 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13590 NDR_PULL_ALLOC(ndr, r->in.ctr);
13592 _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
13593 NDR_PULL_SET_MEM_CTX(ndr, r->in.ctr, LIBNDR_FLAG_REF_ALLOC);
13594 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.ctr, *r->in.level));
13595 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
13596 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
13597 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
13598 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
13599 if (_ptr_resume_handle) {
13600 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
13601 } else {
13602 r->in.resume_handle = NULL;
13604 if (r->in.resume_handle) {
13605 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
13606 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
13607 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
13608 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
13610 NDR_PULL_ALLOC(ndr, r->out.level);
13611 *r->out.level = *r->in.level;
13612 NDR_PULL_ALLOC(ndr, r->out.ctr);
13613 *r->out.ctr = *r->in.ctr;
13614 NDR_PULL_ALLOC(ndr, r->out.totalentries);
13615 ZERO_STRUCTP(r->out.totalentries);
13617 if (flags & NDR_OUT) {
13618 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13619 NDR_PULL_ALLOC(ndr, r->out.level);
13621 _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr);
13622 NDR_PULL_SET_MEM_CTX(ndr, r->out.level, LIBNDR_FLAG_REF_ALLOC);
13623 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.level));
13624 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC);
13625 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13626 NDR_PULL_ALLOC(ndr, r->out.ctr);
13628 _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
13629 NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
13630 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ctr, *r->out.level));
13631 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
13632 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
13633 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13634 NDR_PULL_ALLOC(ndr, r->out.totalentries);
13636 _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
13637 NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
13638 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
13639 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
13640 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
13641 if (_ptr_resume_handle) {
13642 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
13643 } else {
13644 r->out.resume_handle = NULL;
13646 if (r->out.resume_handle) {
13647 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
13648 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
13649 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
13650 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
13652 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
13654 return NDR_ERR_SUCCESS;
13657 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQEnum *r)
13659 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQEnum");
13660 ndr->depth++;
13661 if (flags & NDR_SET_VALUES) {
13662 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
13664 if (flags & NDR_IN) {
13665 ndr_print_struct(ndr, "in", "srvsvc_NetCharDevQEnum");
13666 ndr->depth++;
13667 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
13668 ndr->depth++;
13669 if (r->in.server_unc) {
13670 ndr_print_string(ndr, "server_unc", r->in.server_unc);
13672 ndr->depth--;
13673 ndr_print_ptr(ndr, "user", r->in.user);
13674 ndr->depth++;
13675 if (r->in.user) {
13676 ndr_print_string(ndr, "user", r->in.user);
13678 ndr->depth--;
13679 ndr_print_ptr(ndr, "level", r->in.level);
13680 ndr->depth++;
13681 ndr_print_uint32(ndr, "level", *r->in.level);
13682 ndr->depth--;
13683 ndr_print_ptr(ndr, "ctr", r->in.ctr);
13684 ndr->depth++;
13685 ndr_print_set_switch_value(ndr, r->in.ctr, *r->in.level);
13686 ndr_print_srvsvc_NetCharDevQCtr(ndr, "ctr", r->in.ctr);
13687 ndr->depth--;
13688 ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
13689 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
13690 ndr->depth++;
13691 if (r->in.resume_handle) {
13692 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
13694 ndr->depth--;
13695 ndr->depth--;
13697 if (flags & NDR_OUT) {
13698 ndr_print_struct(ndr, "out", "srvsvc_NetCharDevQEnum");
13699 ndr->depth++;
13700 ndr_print_ptr(ndr, "level", r->out.level);
13701 ndr->depth++;
13702 ndr_print_uint32(ndr, "level", *r->out.level);
13703 ndr->depth--;
13704 ndr_print_ptr(ndr, "ctr", r->out.ctr);
13705 ndr->depth++;
13706 ndr_print_set_switch_value(ndr, r->out.ctr, *r->out.level);
13707 ndr_print_srvsvc_NetCharDevQCtr(ndr, "ctr", r->out.ctr);
13708 ndr->depth--;
13709 ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
13710 ndr->depth++;
13711 ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
13712 ndr->depth--;
13713 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
13714 ndr->depth++;
13715 if (r->out.resume_handle) {
13716 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
13718 ndr->depth--;
13719 ndr_print_WERROR(ndr, "result", r->out.result);
13720 ndr->depth--;
13722 ndr->depth--;
13725 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQGetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevQGetInfo *r)
13727 if (flags & NDR_IN) {
13728 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
13729 if (r->in.server_unc) {
13730 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13731 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
13732 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13733 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));
13735 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
13736 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
13737 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
13738 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));
13739 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
13740 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
13741 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
13742 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.user, ndr_charset_length(r->in.user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
13743 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
13745 if (flags & NDR_OUT) {
13746 if (r->out.info == NULL) {
13747 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13749 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
13750 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
13751 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
13753 return NDR_ERR_SUCCESS;
13756 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQGetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevQGetInfo *r)
13758 uint32_t _ptr_server_unc;
13759 TALLOC_CTX *_mem_save_server_unc_0;
13760 TALLOC_CTX *_mem_save_info_0;
13761 if (flags & NDR_IN) {
13762 ZERO_STRUCT(r->out);
13764 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
13765 if (_ptr_server_unc) {
13766 NDR_PULL_ALLOC(ndr, r->in.server_unc);
13767 } else {
13768 r->in.server_unc = NULL;
13770 if (r->in.server_unc) {
13771 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
13772 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
13773 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
13774 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
13775 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
13776 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
13778 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
13779 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
13780 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
13782 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.queue_name));
13783 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.queue_name));
13784 if (ndr_get_array_length(ndr, &r->in.queue_name) > ndr_get_array_size(ndr, &r->in.queue_name)) {
13785 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.queue_name), ndr_get_array_length(ndr, &r->in.queue_name));
13787 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.queue_name), sizeof(uint16_t)));
13788 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.queue_name, ndr_get_array_length(ndr, &r->in.queue_name), sizeof(uint16_t), CH_UTF16));
13789 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.user));
13790 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.user));
13791 if (ndr_get_array_length(ndr, &r->in.user) > ndr_get_array_size(ndr, &r->in.user)) {
13792 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.user), ndr_get_array_length(ndr, &r->in.user));
13794 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.user), sizeof(uint16_t)));
13795 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.user, ndr_get_array_length(ndr, &r->in.user), sizeof(uint16_t), CH_UTF16));
13796 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
13797 NDR_PULL_ALLOC(ndr, r->out.info);
13798 ZERO_STRUCTP(r->out.info);
13800 if (flags & NDR_OUT) {
13801 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13802 NDR_PULL_ALLOC(ndr, r->out.info);
13804 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
13805 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
13806 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
13807 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
13808 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
13809 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
13811 return NDR_ERR_SUCCESS;
13814 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQGetInfo *r)
13816 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQGetInfo");
13817 ndr->depth++;
13818 if (flags & NDR_SET_VALUES) {
13819 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
13821 if (flags & NDR_IN) {
13822 ndr_print_struct(ndr, "in", "srvsvc_NetCharDevQGetInfo");
13823 ndr->depth++;
13824 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
13825 ndr->depth++;
13826 if (r->in.server_unc) {
13827 ndr_print_string(ndr, "server_unc", r->in.server_unc);
13829 ndr->depth--;
13830 ndr_print_string(ndr, "queue_name", r->in.queue_name);
13831 ndr_print_string(ndr, "user", r->in.user);
13832 ndr_print_uint32(ndr, "level", r->in.level);
13833 ndr->depth--;
13835 if (flags & NDR_OUT) {
13836 ndr_print_struct(ndr, "out", "srvsvc_NetCharDevQGetInfo");
13837 ndr->depth++;
13838 ndr_print_ptr(ndr, "info", r->out.info);
13839 ndr->depth++;
13840 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
13841 ndr_print_srvsvc_NetCharDevQInfo(ndr, "info", r->out.info);
13842 ndr->depth--;
13843 ndr_print_WERROR(ndr, "result", r->out.result);
13844 ndr->depth--;
13846 ndr->depth--;
13849 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQSetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevQSetInfo *r)
13851 if (flags & NDR_IN) {
13852 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
13853 if (r->in.server_unc) {
13854 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13855 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
13856 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13857 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));
13859 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
13860 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
13861 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
13862 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));
13863 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
13864 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.info, r->in.level));
13865 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
13866 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.parm_error));
13867 if (r->in.parm_error) {
13868 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.parm_error));
13871 if (flags & NDR_OUT) {
13872 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.parm_error));
13873 if (r->out.parm_error) {
13874 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.parm_error));
13876 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
13878 return NDR_ERR_SUCCESS;
13881 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQSetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevQSetInfo *r)
13883 uint32_t _ptr_server_unc;
13884 uint32_t _ptr_parm_error;
13885 TALLOC_CTX *_mem_save_server_unc_0;
13886 TALLOC_CTX *_mem_save_parm_error_0;
13887 if (flags & NDR_IN) {
13888 ZERO_STRUCT(r->out);
13890 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
13891 if (_ptr_server_unc) {
13892 NDR_PULL_ALLOC(ndr, r->in.server_unc);
13893 } else {
13894 r->in.server_unc = NULL;
13896 if (r->in.server_unc) {
13897 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
13898 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
13899 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
13900 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
13901 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
13902 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
13904 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
13905 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
13906 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
13908 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.queue_name));
13909 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.queue_name));
13910 if (ndr_get_array_length(ndr, &r->in.queue_name) > ndr_get_array_size(ndr, &r->in.queue_name)) {
13911 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.queue_name), ndr_get_array_length(ndr, &r->in.queue_name));
13913 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.queue_name), sizeof(uint16_t)));
13914 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.queue_name, ndr_get_array_length(ndr, &r->in.queue_name), sizeof(uint16_t), CH_UTF16));
13915 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
13916 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.info, r->in.level));
13917 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
13918 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
13919 if (_ptr_parm_error) {
13920 NDR_PULL_ALLOC(ndr, r->in.parm_error);
13921 } else {
13922 r->in.parm_error = NULL;
13924 if (r->in.parm_error) {
13925 _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
13926 NDR_PULL_SET_MEM_CTX(ndr, r->in.parm_error, 0);
13927 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.parm_error));
13928 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
13931 if (flags & NDR_OUT) {
13932 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
13933 if (_ptr_parm_error) {
13934 NDR_PULL_ALLOC(ndr, r->out.parm_error);
13935 } else {
13936 r->out.parm_error = NULL;
13938 if (r->out.parm_error) {
13939 _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
13940 NDR_PULL_SET_MEM_CTX(ndr, r->out.parm_error, 0);
13941 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.parm_error));
13942 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
13944 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
13946 return NDR_ERR_SUCCESS;
13949 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQSetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQSetInfo *r)
13951 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQSetInfo");
13952 ndr->depth++;
13953 if (flags & NDR_SET_VALUES) {
13954 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
13956 if (flags & NDR_IN) {
13957 ndr_print_struct(ndr, "in", "srvsvc_NetCharDevQSetInfo");
13958 ndr->depth++;
13959 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
13960 ndr->depth++;
13961 if (r->in.server_unc) {
13962 ndr_print_string(ndr, "server_unc", r->in.server_unc);
13964 ndr->depth--;
13965 ndr_print_string(ndr, "queue_name", r->in.queue_name);
13966 ndr_print_uint32(ndr, "level", r->in.level);
13967 ndr_print_set_switch_value(ndr, &r->in.info, r->in.level);
13968 ndr_print_srvsvc_NetCharDevQInfo(ndr, "info", &r->in.info);
13969 ndr_print_ptr(ndr, "parm_error", r->in.parm_error);
13970 ndr->depth++;
13971 if (r->in.parm_error) {
13972 ndr_print_uint32(ndr, "parm_error", *r->in.parm_error);
13974 ndr->depth--;
13975 ndr->depth--;
13977 if (flags & NDR_OUT) {
13978 ndr_print_struct(ndr, "out", "srvsvc_NetCharDevQSetInfo");
13979 ndr->depth++;
13980 ndr_print_ptr(ndr, "parm_error", r->out.parm_error);
13981 ndr->depth++;
13982 if (r->out.parm_error) {
13983 ndr_print_uint32(ndr, "parm_error", *r->out.parm_error);
13985 ndr->depth--;
13986 ndr_print_WERROR(ndr, "result", r->out.result);
13987 ndr->depth--;
13989 ndr->depth--;
13992 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQPurge(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevQPurge *r)
13994 if (flags & NDR_IN) {
13995 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
13996 if (r->in.server_unc) {
13997 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13998 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
13999 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14000 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));
14002 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
14003 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
14004 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
14005 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));
14007 if (flags & NDR_OUT) {
14008 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
14010 return NDR_ERR_SUCCESS;
14013 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQPurge(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevQPurge *r)
14015 uint32_t _ptr_server_unc;
14016 TALLOC_CTX *_mem_save_server_unc_0;
14017 if (flags & NDR_IN) {
14018 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
14019 if (_ptr_server_unc) {
14020 NDR_PULL_ALLOC(ndr, r->in.server_unc);
14021 } else {
14022 r->in.server_unc = NULL;
14024 if (r->in.server_unc) {
14025 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
14026 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
14027 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
14028 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
14029 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
14030 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
14032 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
14033 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
14034 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
14036 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.queue_name));
14037 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.queue_name));
14038 if (ndr_get_array_length(ndr, &r->in.queue_name) > ndr_get_array_size(ndr, &r->in.queue_name)) {
14039 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.queue_name), ndr_get_array_length(ndr, &r->in.queue_name));
14041 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.queue_name), sizeof(uint16_t)));
14042 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.queue_name, ndr_get_array_length(ndr, &r->in.queue_name), sizeof(uint16_t), CH_UTF16));
14044 if (flags & NDR_OUT) {
14045 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
14047 return NDR_ERR_SUCCESS;
14050 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQPurge(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQPurge *r)
14052 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQPurge");
14053 ndr->depth++;
14054 if (flags & NDR_SET_VALUES) {
14055 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14057 if (flags & NDR_IN) {
14058 ndr_print_struct(ndr, "in", "srvsvc_NetCharDevQPurge");
14059 ndr->depth++;
14060 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
14061 ndr->depth++;
14062 if (r->in.server_unc) {
14063 ndr_print_string(ndr, "server_unc", r->in.server_unc);
14065 ndr->depth--;
14066 ndr_print_string(ndr, "queue_name", r->in.queue_name);
14067 ndr->depth--;
14069 if (flags & NDR_OUT) {
14070 ndr_print_struct(ndr, "out", "srvsvc_NetCharDevQPurge");
14071 ndr->depth++;
14072 ndr_print_WERROR(ndr, "result", r->out.result);
14073 ndr->depth--;
14075 ndr->depth--;
14078 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQPurgeSelf(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevQPurgeSelf *r)
14080 if (flags & NDR_IN) {
14081 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
14082 if (r->in.server_unc) {
14083 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14084 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
14085 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14086 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));
14088 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
14089 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
14090 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
14091 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));
14092 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
14093 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
14094 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
14095 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));
14097 if (flags & NDR_OUT) {
14098 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
14100 return NDR_ERR_SUCCESS;
14103 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQPurgeSelf(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevQPurgeSelf *r)
14105 uint32_t _ptr_server_unc;
14106 TALLOC_CTX *_mem_save_server_unc_0;
14107 if (flags & NDR_IN) {
14108 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
14109 if (_ptr_server_unc) {
14110 NDR_PULL_ALLOC(ndr, r->in.server_unc);
14111 } else {
14112 r->in.server_unc = NULL;
14114 if (r->in.server_unc) {
14115 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
14116 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
14117 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
14118 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
14119 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
14120 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
14122 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
14123 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
14124 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
14126 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.queue_name));
14127 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.queue_name));
14128 if (ndr_get_array_length(ndr, &r->in.queue_name) > ndr_get_array_size(ndr, &r->in.queue_name)) {
14129 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.queue_name), ndr_get_array_length(ndr, &r->in.queue_name));
14131 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.queue_name), sizeof(uint16_t)));
14132 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.queue_name, ndr_get_array_length(ndr, &r->in.queue_name), sizeof(uint16_t), CH_UTF16));
14133 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
14134 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
14135 if (ndr_get_array_length(ndr, &r->in.computer_name) > ndr_get_array_size(ndr, &r->in.computer_name)) {
14136 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.computer_name), ndr_get_array_length(ndr, &r->in.computer_name));
14138 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.computer_name), sizeof(uint16_t)));
14139 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, ndr_get_array_length(ndr, &r->in.computer_name), sizeof(uint16_t), CH_UTF16));
14141 if (flags & NDR_OUT) {
14142 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
14144 return NDR_ERR_SUCCESS;
14147 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQPurgeSelf(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQPurgeSelf *r)
14149 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQPurgeSelf");
14150 ndr->depth++;
14151 if (flags & NDR_SET_VALUES) {
14152 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14154 if (flags & NDR_IN) {
14155 ndr_print_struct(ndr, "in", "srvsvc_NetCharDevQPurgeSelf");
14156 ndr->depth++;
14157 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
14158 ndr->depth++;
14159 if (r->in.server_unc) {
14160 ndr_print_string(ndr, "server_unc", r->in.server_unc);
14162 ndr->depth--;
14163 ndr_print_string(ndr, "queue_name", r->in.queue_name);
14164 ndr_print_string(ndr, "computer_name", r->in.computer_name);
14165 ndr->depth--;
14167 if (flags & NDR_OUT) {
14168 ndr_print_struct(ndr, "out", "srvsvc_NetCharDevQPurgeSelf");
14169 ndr->depth++;
14170 ndr_print_WERROR(ndr, "result", r->out.result);
14171 ndr->depth--;
14173 ndr->depth--;
14176 static enum ndr_err_code ndr_push_srvsvc_NetConnEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetConnEnum *r)
14178 if (flags & NDR_IN) {
14179 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
14180 if (r->in.server_unc) {
14181 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14182 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
14183 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14184 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));
14186 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.path));
14187 if (r->in.path) {
14188 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
14189 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
14190 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
14191 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path, ndr_charset_length(r->in.path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
14193 if (r->in.info_ctr == NULL) {
14194 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14196 NDR_CHECK(ndr_push_srvsvc_NetConnInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
14197 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
14198 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
14199 if (r->in.resume_handle) {
14200 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
14203 if (flags & NDR_OUT) {
14204 if (r->out.info_ctr == NULL) {
14205 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14207 NDR_CHECK(ndr_push_srvsvc_NetConnInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
14208 if (r->out.totalentries == NULL) {
14209 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14211 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
14212 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
14213 if (r->out.resume_handle) {
14214 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
14216 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
14218 return NDR_ERR_SUCCESS;
14221 static enum ndr_err_code ndr_pull_srvsvc_NetConnEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetConnEnum *r)
14223 uint32_t _ptr_server_unc;
14224 uint32_t _ptr_path;
14225 uint32_t _ptr_resume_handle;
14226 TALLOC_CTX *_mem_save_server_unc_0;
14227 TALLOC_CTX *_mem_save_path_0;
14228 TALLOC_CTX *_mem_save_info_ctr_0;
14229 TALLOC_CTX *_mem_save_totalentries_0;
14230 TALLOC_CTX *_mem_save_resume_handle_0;
14231 if (flags & NDR_IN) {
14232 ZERO_STRUCT(r->out);
14234 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
14235 if (_ptr_server_unc) {
14236 NDR_PULL_ALLOC(ndr, r->in.server_unc);
14237 } else {
14238 r->in.server_unc = NULL;
14240 if (r->in.server_unc) {
14241 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
14242 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
14243 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
14244 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
14245 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
14246 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
14248 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
14249 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
14250 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
14252 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
14253 if (_ptr_path) {
14254 NDR_PULL_ALLOC(ndr, r->in.path);
14255 } else {
14256 r->in.path = NULL;
14258 if (r->in.path) {
14259 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
14260 NDR_PULL_SET_MEM_CTX(ndr, r->in.path, 0);
14261 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path));
14262 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path));
14263 if (ndr_get_array_length(ndr, &r->in.path) > ndr_get_array_size(ndr, &r->in.path)) {
14264 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.path), ndr_get_array_length(ndr, &r->in.path));
14266 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t)));
14267 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t), CH_UTF16));
14268 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
14270 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14271 NDR_PULL_ALLOC(ndr, r->in.info_ctr);
14273 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
14274 NDR_PULL_SET_MEM_CTX(ndr, r->in.info_ctr, LIBNDR_FLAG_REF_ALLOC);
14275 NDR_CHECK(ndr_pull_srvsvc_NetConnInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
14276 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
14277 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
14278 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
14279 if (_ptr_resume_handle) {
14280 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
14281 } else {
14282 r->in.resume_handle = NULL;
14284 if (r->in.resume_handle) {
14285 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
14286 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
14287 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
14288 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
14290 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
14291 *r->out.info_ctr = *r->in.info_ctr;
14292 NDR_PULL_ALLOC(ndr, r->out.totalentries);
14293 ZERO_STRUCTP(r->out.totalentries);
14295 if (flags & NDR_OUT) {
14296 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14297 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
14299 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
14300 NDR_PULL_SET_MEM_CTX(ndr, r->out.info_ctr, LIBNDR_FLAG_REF_ALLOC);
14301 NDR_CHECK(ndr_pull_srvsvc_NetConnInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
14302 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
14303 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14304 NDR_PULL_ALLOC(ndr, r->out.totalentries);
14306 _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
14307 NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
14308 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
14309 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
14310 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
14311 if (_ptr_resume_handle) {
14312 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
14313 } else {
14314 r->out.resume_handle = NULL;
14316 if (r->out.resume_handle) {
14317 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
14318 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
14319 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
14320 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
14322 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
14324 return NDR_ERR_SUCCESS;
14327 _PUBLIC_ void ndr_print_srvsvc_NetConnEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetConnEnum *r)
14329 ndr_print_struct(ndr, name, "srvsvc_NetConnEnum");
14330 ndr->depth++;
14331 if (flags & NDR_SET_VALUES) {
14332 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14334 if (flags & NDR_IN) {
14335 ndr_print_struct(ndr, "in", "srvsvc_NetConnEnum");
14336 ndr->depth++;
14337 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
14338 ndr->depth++;
14339 if (r->in.server_unc) {
14340 ndr_print_string(ndr, "server_unc", r->in.server_unc);
14342 ndr->depth--;
14343 ndr_print_ptr(ndr, "path", r->in.path);
14344 ndr->depth++;
14345 if (r->in.path) {
14346 ndr_print_string(ndr, "path", r->in.path);
14348 ndr->depth--;
14349 ndr_print_ptr(ndr, "info_ctr", r->in.info_ctr);
14350 ndr->depth++;
14351 ndr_print_srvsvc_NetConnInfoCtr(ndr, "info_ctr", r->in.info_ctr);
14352 ndr->depth--;
14353 ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
14354 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
14355 ndr->depth++;
14356 if (r->in.resume_handle) {
14357 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
14359 ndr->depth--;
14360 ndr->depth--;
14362 if (flags & NDR_OUT) {
14363 ndr_print_struct(ndr, "out", "srvsvc_NetConnEnum");
14364 ndr->depth++;
14365 ndr_print_ptr(ndr, "info_ctr", r->out.info_ctr);
14366 ndr->depth++;
14367 ndr_print_srvsvc_NetConnInfoCtr(ndr, "info_ctr", r->out.info_ctr);
14368 ndr->depth--;
14369 ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
14370 ndr->depth++;
14371 ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
14372 ndr->depth--;
14373 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
14374 ndr->depth++;
14375 if (r->out.resume_handle) {
14376 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
14378 ndr->depth--;
14379 ndr_print_WERROR(ndr, "result", r->out.result);
14380 ndr->depth--;
14382 ndr->depth--;
14385 static enum ndr_err_code ndr_push_srvsvc_NetFileEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetFileEnum *r)
14387 if (flags & NDR_IN) {
14388 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
14389 if (r->in.server_unc) {
14390 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14391 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
14392 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14393 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));
14395 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.path));
14396 if (r->in.path) {
14397 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
14398 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
14399 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
14400 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path, ndr_charset_length(r->in.path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
14402 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.user));
14403 if (r->in.user) {
14404 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
14405 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
14406 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
14407 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.user, ndr_charset_length(r->in.user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
14409 if (r->in.info_ctr == NULL) {
14410 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14412 NDR_CHECK(ndr_push_srvsvc_NetFileInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
14413 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
14414 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
14415 if (r->in.resume_handle) {
14416 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
14419 if (flags & NDR_OUT) {
14420 if (r->out.info_ctr == NULL) {
14421 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14423 NDR_CHECK(ndr_push_srvsvc_NetFileInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
14424 if (r->out.totalentries == NULL) {
14425 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14427 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
14428 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
14429 if (r->out.resume_handle) {
14430 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
14432 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
14434 return NDR_ERR_SUCCESS;
14437 static enum ndr_err_code ndr_pull_srvsvc_NetFileEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetFileEnum *r)
14439 uint32_t _ptr_server_unc;
14440 uint32_t _ptr_path;
14441 uint32_t _ptr_user;
14442 uint32_t _ptr_resume_handle;
14443 TALLOC_CTX *_mem_save_server_unc_0;
14444 TALLOC_CTX *_mem_save_path_0;
14445 TALLOC_CTX *_mem_save_user_0;
14446 TALLOC_CTX *_mem_save_info_ctr_0;
14447 TALLOC_CTX *_mem_save_totalentries_0;
14448 TALLOC_CTX *_mem_save_resume_handle_0;
14449 if (flags & NDR_IN) {
14450 ZERO_STRUCT(r->out);
14452 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
14453 if (_ptr_server_unc) {
14454 NDR_PULL_ALLOC(ndr, r->in.server_unc);
14455 } else {
14456 r->in.server_unc = NULL;
14458 if (r->in.server_unc) {
14459 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
14460 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
14461 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
14462 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
14463 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
14464 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
14466 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
14467 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
14468 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
14470 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
14471 if (_ptr_path) {
14472 NDR_PULL_ALLOC(ndr, r->in.path);
14473 } else {
14474 r->in.path = NULL;
14476 if (r->in.path) {
14477 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
14478 NDR_PULL_SET_MEM_CTX(ndr, r->in.path, 0);
14479 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path));
14480 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path));
14481 if (ndr_get_array_length(ndr, &r->in.path) > ndr_get_array_size(ndr, &r->in.path)) {
14482 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.path), ndr_get_array_length(ndr, &r->in.path));
14484 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t)));
14485 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t), CH_UTF16));
14486 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
14488 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
14489 if (_ptr_user) {
14490 NDR_PULL_ALLOC(ndr, r->in.user);
14491 } else {
14492 r->in.user = NULL;
14494 if (r->in.user) {
14495 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
14496 NDR_PULL_SET_MEM_CTX(ndr, r->in.user, 0);
14497 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.user));
14498 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.user));
14499 if (ndr_get_array_length(ndr, &r->in.user) > ndr_get_array_size(ndr, &r->in.user)) {
14500 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.user), ndr_get_array_length(ndr, &r->in.user));
14502 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.user), sizeof(uint16_t)));
14503 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.user, ndr_get_array_length(ndr, &r->in.user), sizeof(uint16_t), CH_UTF16));
14504 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
14506 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14507 NDR_PULL_ALLOC(ndr, r->in.info_ctr);
14509 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
14510 NDR_PULL_SET_MEM_CTX(ndr, r->in.info_ctr, LIBNDR_FLAG_REF_ALLOC);
14511 NDR_CHECK(ndr_pull_srvsvc_NetFileInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
14512 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
14513 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
14514 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
14515 if (_ptr_resume_handle) {
14516 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
14517 } else {
14518 r->in.resume_handle = NULL;
14520 if (r->in.resume_handle) {
14521 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
14522 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
14523 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
14524 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
14526 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
14527 *r->out.info_ctr = *r->in.info_ctr;
14528 NDR_PULL_ALLOC(ndr, r->out.totalentries);
14529 ZERO_STRUCTP(r->out.totalentries);
14531 if (flags & NDR_OUT) {
14532 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14533 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
14535 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
14536 NDR_PULL_SET_MEM_CTX(ndr, r->out.info_ctr, LIBNDR_FLAG_REF_ALLOC);
14537 NDR_CHECK(ndr_pull_srvsvc_NetFileInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
14538 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
14539 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14540 NDR_PULL_ALLOC(ndr, r->out.totalentries);
14542 _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
14543 NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
14544 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
14545 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
14546 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
14547 if (_ptr_resume_handle) {
14548 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
14549 } else {
14550 r->out.resume_handle = NULL;
14552 if (r->out.resume_handle) {
14553 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
14554 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
14555 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
14556 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
14558 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
14560 return NDR_ERR_SUCCESS;
14563 _PUBLIC_ void ndr_print_srvsvc_NetFileEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetFileEnum *r)
14565 ndr_print_struct(ndr, name, "srvsvc_NetFileEnum");
14566 ndr->depth++;
14567 if (flags & NDR_SET_VALUES) {
14568 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14570 if (flags & NDR_IN) {
14571 ndr_print_struct(ndr, "in", "srvsvc_NetFileEnum");
14572 ndr->depth++;
14573 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
14574 ndr->depth++;
14575 if (r->in.server_unc) {
14576 ndr_print_string(ndr, "server_unc", r->in.server_unc);
14578 ndr->depth--;
14579 ndr_print_ptr(ndr, "path", r->in.path);
14580 ndr->depth++;
14581 if (r->in.path) {
14582 ndr_print_string(ndr, "path", r->in.path);
14584 ndr->depth--;
14585 ndr_print_ptr(ndr, "user", r->in.user);
14586 ndr->depth++;
14587 if (r->in.user) {
14588 ndr_print_string(ndr, "user", r->in.user);
14590 ndr->depth--;
14591 ndr_print_ptr(ndr, "info_ctr", r->in.info_ctr);
14592 ndr->depth++;
14593 ndr_print_srvsvc_NetFileInfoCtr(ndr, "info_ctr", r->in.info_ctr);
14594 ndr->depth--;
14595 ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
14596 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
14597 ndr->depth++;
14598 if (r->in.resume_handle) {
14599 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
14601 ndr->depth--;
14602 ndr->depth--;
14604 if (flags & NDR_OUT) {
14605 ndr_print_struct(ndr, "out", "srvsvc_NetFileEnum");
14606 ndr->depth++;
14607 ndr_print_ptr(ndr, "info_ctr", r->out.info_ctr);
14608 ndr->depth++;
14609 ndr_print_srvsvc_NetFileInfoCtr(ndr, "info_ctr", r->out.info_ctr);
14610 ndr->depth--;
14611 ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
14612 ndr->depth++;
14613 ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
14614 ndr->depth--;
14615 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
14616 ndr->depth++;
14617 if (r->out.resume_handle) {
14618 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
14620 ndr->depth--;
14621 ndr_print_WERROR(ndr, "result", r->out.result);
14622 ndr->depth--;
14624 ndr->depth--;
14627 static enum ndr_err_code ndr_push_srvsvc_NetFileGetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetFileGetInfo *r)
14629 if (flags & NDR_IN) {
14630 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
14631 if (r->in.server_unc) {
14632 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14633 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
14634 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14635 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));
14637 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.fid));
14638 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
14640 if (flags & NDR_OUT) {
14641 if (r->out.info == NULL) {
14642 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14644 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
14645 NDR_CHECK(ndr_push_srvsvc_NetFileInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
14646 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
14648 return NDR_ERR_SUCCESS;
14651 static enum ndr_err_code ndr_pull_srvsvc_NetFileGetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetFileGetInfo *r)
14653 uint32_t _ptr_server_unc;
14654 TALLOC_CTX *_mem_save_server_unc_0;
14655 TALLOC_CTX *_mem_save_info_0;
14656 if (flags & NDR_IN) {
14657 ZERO_STRUCT(r->out);
14659 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
14660 if (_ptr_server_unc) {
14661 NDR_PULL_ALLOC(ndr, r->in.server_unc);
14662 } else {
14663 r->in.server_unc = NULL;
14665 if (r->in.server_unc) {
14666 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
14667 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
14668 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
14669 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
14670 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
14671 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
14673 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
14674 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
14675 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
14677 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.fid));
14678 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
14679 NDR_PULL_ALLOC(ndr, r->out.info);
14680 ZERO_STRUCTP(r->out.info);
14682 if (flags & NDR_OUT) {
14683 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14684 NDR_PULL_ALLOC(ndr, r->out.info);
14686 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
14687 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
14688 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
14689 NDR_CHECK(ndr_pull_srvsvc_NetFileInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
14690 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
14691 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
14693 return NDR_ERR_SUCCESS;
14696 _PUBLIC_ void ndr_print_srvsvc_NetFileGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetFileGetInfo *r)
14698 ndr_print_struct(ndr, name, "srvsvc_NetFileGetInfo");
14699 ndr->depth++;
14700 if (flags & NDR_SET_VALUES) {
14701 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14703 if (flags & NDR_IN) {
14704 ndr_print_struct(ndr, "in", "srvsvc_NetFileGetInfo");
14705 ndr->depth++;
14706 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
14707 ndr->depth++;
14708 if (r->in.server_unc) {
14709 ndr_print_string(ndr, "server_unc", r->in.server_unc);
14711 ndr->depth--;
14712 ndr_print_uint32(ndr, "fid", r->in.fid);
14713 ndr_print_uint32(ndr, "level", r->in.level);
14714 ndr->depth--;
14716 if (flags & NDR_OUT) {
14717 ndr_print_struct(ndr, "out", "srvsvc_NetFileGetInfo");
14718 ndr->depth++;
14719 ndr_print_ptr(ndr, "info", r->out.info);
14720 ndr->depth++;
14721 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
14722 ndr_print_srvsvc_NetFileInfo(ndr, "info", r->out.info);
14723 ndr->depth--;
14724 ndr_print_WERROR(ndr, "result", r->out.result);
14725 ndr->depth--;
14727 ndr->depth--;
14730 static enum ndr_err_code ndr_push_srvsvc_NetFileClose(struct ndr_push *ndr, int flags, const struct srvsvc_NetFileClose *r)
14732 if (flags & NDR_IN) {
14733 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
14734 if (r->in.server_unc) {
14735 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14736 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
14737 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14738 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));
14740 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.fid));
14742 if (flags & NDR_OUT) {
14743 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
14745 return NDR_ERR_SUCCESS;
14748 static enum ndr_err_code ndr_pull_srvsvc_NetFileClose(struct ndr_pull *ndr, int flags, struct srvsvc_NetFileClose *r)
14750 uint32_t _ptr_server_unc;
14751 TALLOC_CTX *_mem_save_server_unc_0;
14752 if (flags & NDR_IN) {
14753 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
14754 if (_ptr_server_unc) {
14755 NDR_PULL_ALLOC(ndr, r->in.server_unc);
14756 } else {
14757 r->in.server_unc = NULL;
14759 if (r->in.server_unc) {
14760 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
14761 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
14762 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
14763 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
14764 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
14765 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
14767 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
14768 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
14769 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
14771 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.fid));
14773 if (flags & NDR_OUT) {
14774 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
14776 return NDR_ERR_SUCCESS;
14779 _PUBLIC_ void ndr_print_srvsvc_NetFileClose(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetFileClose *r)
14781 ndr_print_struct(ndr, name, "srvsvc_NetFileClose");
14782 ndr->depth++;
14783 if (flags & NDR_SET_VALUES) {
14784 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14786 if (flags & NDR_IN) {
14787 ndr_print_struct(ndr, "in", "srvsvc_NetFileClose");
14788 ndr->depth++;
14789 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
14790 ndr->depth++;
14791 if (r->in.server_unc) {
14792 ndr_print_string(ndr, "server_unc", r->in.server_unc);
14794 ndr->depth--;
14795 ndr_print_uint32(ndr, "fid", r->in.fid);
14796 ndr->depth--;
14798 if (flags & NDR_OUT) {
14799 ndr_print_struct(ndr, "out", "srvsvc_NetFileClose");
14800 ndr->depth++;
14801 ndr_print_WERROR(ndr, "result", r->out.result);
14802 ndr->depth--;
14804 ndr->depth--;
14807 static enum ndr_err_code ndr_push_srvsvc_NetSessEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetSessEnum *r)
14809 if (flags & NDR_IN) {
14810 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
14811 if (r->in.server_unc) {
14812 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14813 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
14814 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14815 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));
14817 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.client));
14818 if (r->in.client) {
14819 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.client, CH_UTF16)));
14820 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
14821 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.client, CH_UTF16)));
14822 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.client, ndr_charset_length(r->in.client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
14824 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.user));
14825 if (r->in.user) {
14826 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
14827 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
14828 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
14829 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.user, ndr_charset_length(r->in.user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
14831 if (r->in.info_ctr == NULL) {
14832 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14834 NDR_CHECK(ndr_push_srvsvc_NetSessInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
14835 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
14836 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
14837 if (r->in.resume_handle) {
14838 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
14841 if (flags & NDR_OUT) {
14842 if (r->out.info_ctr == NULL) {
14843 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14845 NDR_CHECK(ndr_push_srvsvc_NetSessInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
14846 if (r->out.totalentries == NULL) {
14847 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14849 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
14850 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
14851 if (r->out.resume_handle) {
14852 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
14854 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
14856 return NDR_ERR_SUCCESS;
14859 static enum ndr_err_code ndr_pull_srvsvc_NetSessEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetSessEnum *r)
14861 uint32_t _ptr_server_unc;
14862 uint32_t _ptr_client;
14863 uint32_t _ptr_user;
14864 uint32_t _ptr_resume_handle;
14865 TALLOC_CTX *_mem_save_server_unc_0;
14866 TALLOC_CTX *_mem_save_client_0;
14867 TALLOC_CTX *_mem_save_user_0;
14868 TALLOC_CTX *_mem_save_info_ctr_0;
14869 TALLOC_CTX *_mem_save_totalentries_0;
14870 TALLOC_CTX *_mem_save_resume_handle_0;
14871 if (flags & NDR_IN) {
14872 ZERO_STRUCT(r->out);
14874 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
14875 if (_ptr_server_unc) {
14876 NDR_PULL_ALLOC(ndr, r->in.server_unc);
14877 } else {
14878 r->in.server_unc = NULL;
14880 if (r->in.server_unc) {
14881 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
14882 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
14883 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
14884 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
14885 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
14886 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
14888 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
14889 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
14890 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
14892 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
14893 if (_ptr_client) {
14894 NDR_PULL_ALLOC(ndr, r->in.client);
14895 } else {
14896 r->in.client = NULL;
14898 if (r->in.client) {
14899 _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
14900 NDR_PULL_SET_MEM_CTX(ndr, r->in.client, 0);
14901 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.client));
14902 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.client));
14903 if (ndr_get_array_length(ndr, &r->in.client) > ndr_get_array_size(ndr, &r->in.client)) {
14904 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.client), ndr_get_array_length(ndr, &r->in.client));
14906 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.client), sizeof(uint16_t)));
14907 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.client, ndr_get_array_length(ndr, &r->in.client), sizeof(uint16_t), CH_UTF16));
14908 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
14910 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
14911 if (_ptr_user) {
14912 NDR_PULL_ALLOC(ndr, r->in.user);
14913 } else {
14914 r->in.user = NULL;
14916 if (r->in.user) {
14917 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
14918 NDR_PULL_SET_MEM_CTX(ndr, r->in.user, 0);
14919 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.user));
14920 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.user));
14921 if (ndr_get_array_length(ndr, &r->in.user) > ndr_get_array_size(ndr, &r->in.user)) {
14922 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.user), ndr_get_array_length(ndr, &r->in.user));
14924 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.user), sizeof(uint16_t)));
14925 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.user, ndr_get_array_length(ndr, &r->in.user), sizeof(uint16_t), CH_UTF16));
14926 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
14928 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14929 NDR_PULL_ALLOC(ndr, r->in.info_ctr);
14931 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
14932 NDR_PULL_SET_MEM_CTX(ndr, r->in.info_ctr, LIBNDR_FLAG_REF_ALLOC);
14933 NDR_CHECK(ndr_pull_srvsvc_NetSessInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
14934 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
14935 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
14936 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
14937 if (_ptr_resume_handle) {
14938 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
14939 } else {
14940 r->in.resume_handle = NULL;
14942 if (r->in.resume_handle) {
14943 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
14944 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
14945 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
14946 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
14948 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
14949 *r->out.info_ctr = *r->in.info_ctr;
14950 NDR_PULL_ALLOC(ndr, r->out.totalentries);
14951 ZERO_STRUCTP(r->out.totalentries);
14953 if (flags & NDR_OUT) {
14954 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14955 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
14957 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
14958 NDR_PULL_SET_MEM_CTX(ndr, r->out.info_ctr, LIBNDR_FLAG_REF_ALLOC);
14959 NDR_CHECK(ndr_pull_srvsvc_NetSessInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
14960 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
14961 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14962 NDR_PULL_ALLOC(ndr, r->out.totalentries);
14964 _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
14965 NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
14966 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
14967 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
14968 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
14969 if (_ptr_resume_handle) {
14970 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
14971 } else {
14972 r->out.resume_handle = NULL;
14974 if (r->out.resume_handle) {
14975 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
14976 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
14977 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
14978 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
14980 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
14982 return NDR_ERR_SUCCESS;
14985 _PUBLIC_ void ndr_print_srvsvc_NetSessEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSessEnum *r)
14987 ndr_print_struct(ndr, name, "srvsvc_NetSessEnum");
14988 ndr->depth++;
14989 if (flags & NDR_SET_VALUES) {
14990 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14992 if (flags & NDR_IN) {
14993 ndr_print_struct(ndr, "in", "srvsvc_NetSessEnum");
14994 ndr->depth++;
14995 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
14996 ndr->depth++;
14997 if (r->in.server_unc) {
14998 ndr_print_string(ndr, "server_unc", r->in.server_unc);
15000 ndr->depth--;
15001 ndr_print_ptr(ndr, "client", r->in.client);
15002 ndr->depth++;
15003 if (r->in.client) {
15004 ndr_print_string(ndr, "client", r->in.client);
15006 ndr->depth--;
15007 ndr_print_ptr(ndr, "user", r->in.user);
15008 ndr->depth++;
15009 if (r->in.user) {
15010 ndr_print_string(ndr, "user", r->in.user);
15012 ndr->depth--;
15013 ndr_print_ptr(ndr, "info_ctr", r->in.info_ctr);
15014 ndr->depth++;
15015 ndr_print_srvsvc_NetSessInfoCtr(ndr, "info_ctr", r->in.info_ctr);
15016 ndr->depth--;
15017 ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
15018 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
15019 ndr->depth++;
15020 if (r->in.resume_handle) {
15021 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
15023 ndr->depth--;
15024 ndr->depth--;
15026 if (flags & NDR_OUT) {
15027 ndr_print_struct(ndr, "out", "srvsvc_NetSessEnum");
15028 ndr->depth++;
15029 ndr_print_ptr(ndr, "info_ctr", r->out.info_ctr);
15030 ndr->depth++;
15031 ndr_print_srvsvc_NetSessInfoCtr(ndr, "info_ctr", r->out.info_ctr);
15032 ndr->depth--;
15033 ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
15034 ndr->depth++;
15035 ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
15036 ndr->depth--;
15037 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
15038 ndr->depth++;
15039 if (r->out.resume_handle) {
15040 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
15042 ndr->depth--;
15043 ndr_print_WERROR(ndr, "result", r->out.result);
15044 ndr->depth--;
15046 ndr->depth--;
15049 static enum ndr_err_code ndr_push_srvsvc_NetSessDel(struct ndr_push *ndr, int flags, const struct srvsvc_NetSessDel *r)
15051 if (flags & NDR_IN) {
15052 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
15053 if (r->in.server_unc) {
15054 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15055 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
15056 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15057 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));
15059 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.client));
15060 if (r->in.client) {
15061 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.client, CH_UTF16)));
15062 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
15063 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.client, CH_UTF16)));
15064 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.client, ndr_charset_length(r->in.client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
15066 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.user));
15067 if (r->in.user) {
15068 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
15069 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
15070 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
15071 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.user, ndr_charset_length(r->in.user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
15074 if (flags & NDR_OUT) {
15075 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15077 return NDR_ERR_SUCCESS;
15080 static enum ndr_err_code ndr_pull_srvsvc_NetSessDel(struct ndr_pull *ndr, int flags, struct srvsvc_NetSessDel *r)
15082 uint32_t _ptr_server_unc;
15083 uint32_t _ptr_client;
15084 uint32_t _ptr_user;
15085 TALLOC_CTX *_mem_save_server_unc_0;
15086 TALLOC_CTX *_mem_save_client_0;
15087 TALLOC_CTX *_mem_save_user_0;
15088 if (flags & NDR_IN) {
15089 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
15090 if (_ptr_server_unc) {
15091 NDR_PULL_ALLOC(ndr, r->in.server_unc);
15092 } else {
15093 r->in.server_unc = NULL;
15095 if (r->in.server_unc) {
15096 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
15097 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
15098 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
15099 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
15100 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
15101 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
15103 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
15104 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
15105 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
15107 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
15108 if (_ptr_client) {
15109 NDR_PULL_ALLOC(ndr, r->in.client);
15110 } else {
15111 r->in.client = NULL;
15113 if (r->in.client) {
15114 _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
15115 NDR_PULL_SET_MEM_CTX(ndr, r->in.client, 0);
15116 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.client));
15117 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.client));
15118 if (ndr_get_array_length(ndr, &r->in.client) > ndr_get_array_size(ndr, &r->in.client)) {
15119 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.client), ndr_get_array_length(ndr, &r->in.client));
15121 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.client), sizeof(uint16_t)));
15122 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.client, ndr_get_array_length(ndr, &r->in.client), sizeof(uint16_t), CH_UTF16));
15123 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
15125 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
15126 if (_ptr_user) {
15127 NDR_PULL_ALLOC(ndr, r->in.user);
15128 } else {
15129 r->in.user = NULL;
15131 if (r->in.user) {
15132 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
15133 NDR_PULL_SET_MEM_CTX(ndr, r->in.user, 0);
15134 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.user));
15135 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.user));
15136 if (ndr_get_array_length(ndr, &r->in.user) > ndr_get_array_size(ndr, &r->in.user)) {
15137 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.user), ndr_get_array_length(ndr, &r->in.user));
15139 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.user), sizeof(uint16_t)));
15140 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.user, ndr_get_array_length(ndr, &r->in.user), sizeof(uint16_t), CH_UTF16));
15141 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
15144 if (flags & NDR_OUT) {
15145 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15147 return NDR_ERR_SUCCESS;
15150 _PUBLIC_ void ndr_print_srvsvc_NetSessDel(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSessDel *r)
15152 ndr_print_struct(ndr, name, "srvsvc_NetSessDel");
15153 ndr->depth++;
15154 if (flags & NDR_SET_VALUES) {
15155 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15157 if (flags & NDR_IN) {
15158 ndr_print_struct(ndr, "in", "srvsvc_NetSessDel");
15159 ndr->depth++;
15160 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
15161 ndr->depth++;
15162 if (r->in.server_unc) {
15163 ndr_print_string(ndr, "server_unc", r->in.server_unc);
15165 ndr->depth--;
15166 ndr_print_ptr(ndr, "client", r->in.client);
15167 ndr->depth++;
15168 if (r->in.client) {
15169 ndr_print_string(ndr, "client", r->in.client);
15171 ndr->depth--;
15172 ndr_print_ptr(ndr, "user", r->in.user);
15173 ndr->depth++;
15174 if (r->in.user) {
15175 ndr_print_string(ndr, "user", r->in.user);
15177 ndr->depth--;
15178 ndr->depth--;
15180 if (flags & NDR_OUT) {
15181 ndr_print_struct(ndr, "out", "srvsvc_NetSessDel");
15182 ndr->depth++;
15183 ndr_print_WERROR(ndr, "result", r->out.result);
15184 ndr->depth--;
15186 ndr->depth--;
15189 static enum ndr_err_code ndr_push_srvsvc_NetShareAdd(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareAdd *r)
15191 if (flags & NDR_IN) {
15192 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
15193 if (r->in.server_unc) {
15194 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15195 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
15196 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15197 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));
15199 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
15200 if (r->in.info == NULL) {
15201 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15203 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
15204 NDR_CHECK(ndr_push_srvsvc_NetShareInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
15205 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.parm_error));
15206 if (r->in.parm_error) {
15207 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.parm_error));
15210 if (flags & NDR_OUT) {
15211 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.parm_error));
15212 if (r->out.parm_error) {
15213 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.parm_error));
15215 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15217 return NDR_ERR_SUCCESS;
15220 static enum ndr_err_code ndr_pull_srvsvc_NetShareAdd(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareAdd *r)
15222 uint32_t _ptr_server_unc;
15223 uint32_t _ptr_parm_error;
15224 TALLOC_CTX *_mem_save_server_unc_0;
15225 TALLOC_CTX *_mem_save_info_0;
15226 TALLOC_CTX *_mem_save_parm_error_0;
15227 if (flags & NDR_IN) {
15228 ZERO_STRUCT(r->out);
15230 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
15231 if (_ptr_server_unc) {
15232 NDR_PULL_ALLOC(ndr, r->in.server_unc);
15233 } else {
15234 r->in.server_unc = NULL;
15236 if (r->in.server_unc) {
15237 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
15238 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
15239 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
15240 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
15241 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
15242 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
15244 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
15245 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
15246 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
15248 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
15249 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15250 NDR_PULL_ALLOC(ndr, r->in.info);
15252 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
15253 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
15254 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
15255 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
15256 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
15257 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
15258 if (_ptr_parm_error) {
15259 NDR_PULL_ALLOC(ndr, r->in.parm_error);
15260 } else {
15261 r->in.parm_error = NULL;
15263 if (r->in.parm_error) {
15264 _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
15265 NDR_PULL_SET_MEM_CTX(ndr, r->in.parm_error, 0);
15266 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.parm_error));
15267 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
15270 if (flags & NDR_OUT) {
15271 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
15272 if (_ptr_parm_error) {
15273 NDR_PULL_ALLOC(ndr, r->out.parm_error);
15274 } else {
15275 r->out.parm_error = NULL;
15277 if (r->out.parm_error) {
15278 _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
15279 NDR_PULL_SET_MEM_CTX(ndr, r->out.parm_error, 0);
15280 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.parm_error));
15281 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
15283 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15285 return NDR_ERR_SUCCESS;
15288 _PUBLIC_ void ndr_print_srvsvc_NetShareAdd(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareAdd *r)
15290 ndr_print_struct(ndr, name, "srvsvc_NetShareAdd");
15291 ndr->depth++;
15292 if (flags & NDR_SET_VALUES) {
15293 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15295 if (flags & NDR_IN) {
15296 ndr_print_struct(ndr, "in", "srvsvc_NetShareAdd");
15297 ndr->depth++;
15298 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
15299 ndr->depth++;
15300 if (r->in.server_unc) {
15301 ndr_print_string(ndr, "server_unc", r->in.server_unc);
15303 ndr->depth--;
15304 ndr_print_uint32(ndr, "level", r->in.level);
15305 ndr_print_ptr(ndr, "info", r->in.info);
15306 ndr->depth++;
15307 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
15308 ndr_print_srvsvc_NetShareInfo(ndr, "info", r->in.info);
15309 ndr->depth--;
15310 ndr_print_ptr(ndr, "parm_error", r->in.parm_error);
15311 ndr->depth++;
15312 if (r->in.parm_error) {
15313 ndr_print_uint32(ndr, "parm_error", *r->in.parm_error);
15315 ndr->depth--;
15316 ndr->depth--;
15318 if (flags & NDR_OUT) {
15319 ndr_print_struct(ndr, "out", "srvsvc_NetShareAdd");
15320 ndr->depth++;
15321 ndr_print_ptr(ndr, "parm_error", r->out.parm_error);
15322 ndr->depth++;
15323 if (r->out.parm_error) {
15324 ndr_print_uint32(ndr, "parm_error", *r->out.parm_error);
15326 ndr->depth--;
15327 ndr_print_WERROR(ndr, "result", r->out.result);
15328 ndr->depth--;
15330 ndr->depth--;
15333 static enum ndr_err_code ndr_push_srvsvc_NetShareEnumAll(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareEnumAll *r)
15335 if (flags & NDR_IN) {
15336 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
15337 if (r->in.server_unc) {
15338 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15339 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
15340 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15341 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));
15343 if (r->in.info_ctr == NULL) {
15344 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15346 NDR_CHECK(ndr_push_srvsvc_NetShareInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
15347 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
15348 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
15349 if (r->in.resume_handle) {
15350 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
15353 if (flags & NDR_OUT) {
15354 if (r->out.info_ctr == NULL) {
15355 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15357 NDR_CHECK(ndr_push_srvsvc_NetShareInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
15358 if (r->out.totalentries == NULL) {
15359 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15361 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
15362 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
15363 if (r->out.resume_handle) {
15364 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
15366 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15368 return NDR_ERR_SUCCESS;
15371 static enum ndr_err_code ndr_pull_srvsvc_NetShareEnumAll(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareEnumAll *r)
15373 uint32_t _ptr_server_unc;
15374 uint32_t _ptr_resume_handle;
15375 TALLOC_CTX *_mem_save_server_unc_0;
15376 TALLOC_CTX *_mem_save_info_ctr_0;
15377 TALLOC_CTX *_mem_save_totalentries_0;
15378 TALLOC_CTX *_mem_save_resume_handle_0;
15379 if (flags & NDR_IN) {
15380 ZERO_STRUCT(r->out);
15382 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
15383 if (_ptr_server_unc) {
15384 NDR_PULL_ALLOC(ndr, r->in.server_unc);
15385 } else {
15386 r->in.server_unc = NULL;
15388 if (r->in.server_unc) {
15389 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
15390 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
15391 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
15392 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
15393 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
15394 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
15396 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
15397 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
15398 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_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_NetShareInfoCtr(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_NetShareInfoCtr(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_NetShareEnumAll(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareEnumAll *r)
15459 ndr_print_struct(ndr, name, "srvsvc_NetShareEnumAll");
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_NetShareEnumAll");
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, "info_ctr", r->in.info_ctr);
15474 ndr->depth++;
15475 ndr_print_srvsvc_NetShareInfoCtr(ndr, "info_ctr", r->in.info_ctr);
15476 ndr->depth--;
15477 ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
15478 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
15479 ndr->depth++;
15480 if (r->in.resume_handle) {
15481 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
15483 ndr->depth--;
15484 ndr->depth--;
15486 if (flags & NDR_OUT) {
15487 ndr_print_struct(ndr, "out", "srvsvc_NetShareEnumAll");
15488 ndr->depth++;
15489 ndr_print_ptr(ndr, "info_ctr", r->out.info_ctr);
15490 ndr->depth++;
15491 ndr_print_srvsvc_NetShareInfoCtr(ndr, "info_ctr", r->out.info_ctr);
15492 ndr->depth--;
15493 ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
15494 ndr->depth++;
15495 ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
15496 ndr->depth--;
15497 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
15498 ndr->depth++;
15499 if (r->out.resume_handle) {
15500 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
15502 ndr->depth--;
15503 ndr_print_WERROR(ndr, "result", r->out.result);
15504 ndr->depth--;
15506 ndr->depth--;
15509 static enum ndr_err_code ndr_push_srvsvc_NetShareGetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareGetInfo *r)
15511 if (flags & NDR_IN) {
15512 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
15513 if (r->in.server_unc) {
15514 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15515 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
15516 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15517 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));
15519 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
15520 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
15521 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
15522 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));
15523 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
15525 if (flags & NDR_OUT) {
15526 if (r->out.info == NULL) {
15527 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15529 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
15530 NDR_CHECK(ndr_push_srvsvc_NetShareInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
15531 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15533 return NDR_ERR_SUCCESS;
15536 static enum ndr_err_code ndr_pull_srvsvc_NetShareGetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareGetInfo *r)
15538 uint32_t _ptr_server_unc;
15539 TALLOC_CTX *_mem_save_server_unc_0;
15540 TALLOC_CTX *_mem_save_info_0;
15541 if (flags & NDR_IN) {
15542 ZERO_STRUCT(r->out);
15544 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
15545 if (_ptr_server_unc) {
15546 NDR_PULL_ALLOC(ndr, r->in.server_unc);
15547 } else {
15548 r->in.server_unc = NULL;
15550 if (r->in.server_unc) {
15551 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
15552 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
15553 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
15554 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
15555 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
15556 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
15558 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
15559 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
15560 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
15562 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share_name));
15563 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share_name));
15564 if (ndr_get_array_length(ndr, &r->in.share_name) > ndr_get_array_size(ndr, &r->in.share_name)) {
15565 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.share_name), ndr_get_array_length(ndr, &r->in.share_name));
15567 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.share_name), sizeof(uint16_t)));
15568 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share_name, ndr_get_array_length(ndr, &r->in.share_name), sizeof(uint16_t), CH_UTF16));
15569 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
15570 NDR_PULL_ALLOC(ndr, r->out.info);
15571 ZERO_STRUCTP(r->out.info);
15573 if (flags & NDR_OUT) {
15574 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15575 NDR_PULL_ALLOC(ndr, r->out.info);
15577 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
15578 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
15579 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
15580 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
15581 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
15582 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15584 return NDR_ERR_SUCCESS;
15587 _PUBLIC_ void ndr_print_srvsvc_NetShareGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareGetInfo *r)
15589 ndr_print_struct(ndr, name, "srvsvc_NetShareGetInfo");
15590 ndr->depth++;
15591 if (flags & NDR_SET_VALUES) {
15592 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15594 if (flags & NDR_IN) {
15595 ndr_print_struct(ndr, "in", "srvsvc_NetShareGetInfo");
15596 ndr->depth++;
15597 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
15598 ndr->depth++;
15599 if (r->in.server_unc) {
15600 ndr_print_string(ndr, "server_unc", r->in.server_unc);
15602 ndr->depth--;
15603 ndr_print_string(ndr, "share_name", r->in.share_name);
15604 ndr_print_uint32(ndr, "level", r->in.level);
15605 ndr->depth--;
15607 if (flags & NDR_OUT) {
15608 ndr_print_struct(ndr, "out", "srvsvc_NetShareGetInfo");
15609 ndr->depth++;
15610 ndr_print_ptr(ndr, "info", r->out.info);
15611 ndr->depth++;
15612 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
15613 ndr_print_srvsvc_NetShareInfo(ndr, "info", r->out.info);
15614 ndr->depth--;
15615 ndr_print_WERROR(ndr, "result", r->out.result);
15616 ndr->depth--;
15618 ndr->depth--;
15621 static enum ndr_err_code ndr_push_srvsvc_NetShareSetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareSetInfo *r)
15623 if (flags & NDR_IN) {
15624 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
15625 if (r->in.server_unc) {
15626 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15627 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
15628 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15629 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));
15631 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
15632 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
15633 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
15634 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));
15635 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
15636 if (r->in.info == NULL) {
15637 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15639 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
15640 NDR_CHECK(ndr_push_srvsvc_NetShareInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
15641 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.parm_error));
15642 if (r->in.parm_error) {
15643 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.parm_error));
15646 if (flags & NDR_OUT) {
15647 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.parm_error));
15648 if (r->out.parm_error) {
15649 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.parm_error));
15651 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15653 return NDR_ERR_SUCCESS;
15656 static enum ndr_err_code ndr_pull_srvsvc_NetShareSetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareSetInfo *r)
15658 uint32_t _ptr_server_unc;
15659 uint32_t _ptr_parm_error;
15660 TALLOC_CTX *_mem_save_server_unc_0;
15661 TALLOC_CTX *_mem_save_info_0;
15662 TALLOC_CTX *_mem_save_parm_error_0;
15663 if (flags & NDR_IN) {
15664 ZERO_STRUCT(r->out);
15666 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
15667 if (_ptr_server_unc) {
15668 NDR_PULL_ALLOC(ndr, r->in.server_unc);
15669 } else {
15670 r->in.server_unc = NULL;
15672 if (r->in.server_unc) {
15673 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
15674 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
15675 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
15676 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
15677 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
15678 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
15680 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
15681 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
15682 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
15684 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share_name));
15685 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share_name));
15686 if (ndr_get_array_length(ndr, &r->in.share_name) > ndr_get_array_size(ndr, &r->in.share_name)) {
15687 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.share_name), ndr_get_array_length(ndr, &r->in.share_name));
15689 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.share_name), sizeof(uint16_t)));
15690 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share_name, ndr_get_array_length(ndr, &r->in.share_name), sizeof(uint16_t), CH_UTF16));
15691 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
15692 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15693 NDR_PULL_ALLOC(ndr, r->in.info);
15695 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
15696 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
15697 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
15698 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
15699 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
15700 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
15701 if (_ptr_parm_error) {
15702 NDR_PULL_ALLOC(ndr, r->in.parm_error);
15703 } else {
15704 r->in.parm_error = NULL;
15706 if (r->in.parm_error) {
15707 _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
15708 NDR_PULL_SET_MEM_CTX(ndr, r->in.parm_error, 0);
15709 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.parm_error));
15710 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
15713 if (flags & NDR_OUT) {
15714 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
15715 if (_ptr_parm_error) {
15716 NDR_PULL_ALLOC(ndr, r->out.parm_error);
15717 } else {
15718 r->out.parm_error = NULL;
15720 if (r->out.parm_error) {
15721 _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
15722 NDR_PULL_SET_MEM_CTX(ndr, r->out.parm_error, 0);
15723 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.parm_error));
15724 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
15726 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15728 return NDR_ERR_SUCCESS;
15731 _PUBLIC_ void ndr_print_srvsvc_NetShareSetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareSetInfo *r)
15733 ndr_print_struct(ndr, name, "srvsvc_NetShareSetInfo");
15734 ndr->depth++;
15735 if (flags & NDR_SET_VALUES) {
15736 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15738 if (flags & NDR_IN) {
15739 ndr_print_struct(ndr, "in", "srvsvc_NetShareSetInfo");
15740 ndr->depth++;
15741 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
15742 ndr->depth++;
15743 if (r->in.server_unc) {
15744 ndr_print_string(ndr, "server_unc", r->in.server_unc);
15746 ndr->depth--;
15747 ndr_print_string(ndr, "share_name", r->in.share_name);
15748 ndr_print_uint32(ndr, "level", r->in.level);
15749 ndr_print_ptr(ndr, "info", r->in.info);
15750 ndr->depth++;
15751 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
15752 ndr_print_srvsvc_NetShareInfo(ndr, "info", r->in.info);
15753 ndr->depth--;
15754 ndr_print_ptr(ndr, "parm_error", r->in.parm_error);
15755 ndr->depth++;
15756 if (r->in.parm_error) {
15757 ndr_print_uint32(ndr, "parm_error", *r->in.parm_error);
15759 ndr->depth--;
15760 ndr->depth--;
15762 if (flags & NDR_OUT) {
15763 ndr_print_struct(ndr, "out", "srvsvc_NetShareSetInfo");
15764 ndr->depth++;
15765 ndr_print_ptr(ndr, "parm_error", r->out.parm_error);
15766 ndr->depth++;
15767 if (r->out.parm_error) {
15768 ndr_print_uint32(ndr, "parm_error", *r->out.parm_error);
15770 ndr->depth--;
15771 ndr_print_WERROR(ndr, "result", r->out.result);
15772 ndr->depth--;
15774 ndr->depth--;
15777 static enum ndr_err_code ndr_push_srvsvc_NetShareDel(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareDel *r)
15779 if (flags & NDR_IN) {
15780 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
15781 if (r->in.server_unc) {
15782 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15783 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
15784 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15785 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));
15787 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
15788 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
15789 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
15790 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));
15791 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.reserved));
15793 if (flags & NDR_OUT) {
15794 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15796 return NDR_ERR_SUCCESS;
15799 static enum ndr_err_code ndr_pull_srvsvc_NetShareDel(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareDel *r)
15801 uint32_t _ptr_server_unc;
15802 TALLOC_CTX *_mem_save_server_unc_0;
15803 if (flags & NDR_IN) {
15804 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
15805 if (_ptr_server_unc) {
15806 NDR_PULL_ALLOC(ndr, r->in.server_unc);
15807 } else {
15808 r->in.server_unc = NULL;
15810 if (r->in.server_unc) {
15811 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
15812 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
15813 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
15814 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
15815 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
15816 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
15818 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
15819 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
15820 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
15822 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share_name));
15823 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share_name));
15824 if (ndr_get_array_length(ndr, &r->in.share_name) > ndr_get_array_size(ndr, &r->in.share_name)) {
15825 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.share_name), ndr_get_array_length(ndr, &r->in.share_name));
15827 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.share_name), sizeof(uint16_t)));
15828 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share_name, ndr_get_array_length(ndr, &r->in.share_name), sizeof(uint16_t), CH_UTF16));
15829 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.reserved));
15831 if (flags & NDR_OUT) {
15832 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15834 return NDR_ERR_SUCCESS;
15837 _PUBLIC_ void ndr_print_srvsvc_NetShareDel(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareDel *r)
15839 ndr_print_struct(ndr, name, "srvsvc_NetShareDel");
15840 ndr->depth++;
15841 if (flags & NDR_SET_VALUES) {
15842 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15844 if (flags & NDR_IN) {
15845 ndr_print_struct(ndr, "in", "srvsvc_NetShareDel");
15846 ndr->depth++;
15847 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
15848 ndr->depth++;
15849 if (r->in.server_unc) {
15850 ndr_print_string(ndr, "server_unc", r->in.server_unc);
15852 ndr->depth--;
15853 ndr_print_string(ndr, "share_name", r->in.share_name);
15854 ndr_print_uint32(ndr, "reserved", r->in.reserved);
15855 ndr->depth--;
15857 if (flags & NDR_OUT) {
15858 ndr_print_struct(ndr, "out", "srvsvc_NetShareDel");
15859 ndr->depth++;
15860 ndr_print_WERROR(ndr, "result", r->out.result);
15861 ndr->depth--;
15863 ndr->depth--;
15866 static enum ndr_err_code ndr_push_srvsvc_NetShareDelSticky(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareDelSticky *r)
15868 if (flags & NDR_IN) {
15869 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
15870 if (r->in.server_unc) {
15871 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15872 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
15873 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15874 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));
15876 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
15877 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
15878 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
15879 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));
15880 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.reserved));
15882 if (flags & NDR_OUT) {
15883 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15885 return NDR_ERR_SUCCESS;
15888 static enum ndr_err_code ndr_pull_srvsvc_NetShareDelSticky(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareDelSticky *r)
15890 uint32_t _ptr_server_unc;
15891 TALLOC_CTX *_mem_save_server_unc_0;
15892 if (flags & NDR_IN) {
15893 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
15894 if (_ptr_server_unc) {
15895 NDR_PULL_ALLOC(ndr, r->in.server_unc);
15896 } else {
15897 r->in.server_unc = NULL;
15899 if (r->in.server_unc) {
15900 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
15901 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
15902 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
15903 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
15904 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
15905 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
15907 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
15908 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
15909 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
15911 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share_name));
15912 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share_name));
15913 if (ndr_get_array_length(ndr, &r->in.share_name) > ndr_get_array_size(ndr, &r->in.share_name)) {
15914 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.share_name), ndr_get_array_length(ndr, &r->in.share_name));
15916 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.share_name), sizeof(uint16_t)));
15917 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share_name, ndr_get_array_length(ndr, &r->in.share_name), sizeof(uint16_t), CH_UTF16));
15918 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.reserved));
15920 if (flags & NDR_OUT) {
15921 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15923 return NDR_ERR_SUCCESS;
15926 _PUBLIC_ void ndr_print_srvsvc_NetShareDelSticky(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareDelSticky *r)
15928 ndr_print_struct(ndr, name, "srvsvc_NetShareDelSticky");
15929 ndr->depth++;
15930 if (flags & NDR_SET_VALUES) {
15931 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15933 if (flags & NDR_IN) {
15934 ndr_print_struct(ndr, "in", "srvsvc_NetShareDelSticky");
15935 ndr->depth++;
15936 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
15937 ndr->depth++;
15938 if (r->in.server_unc) {
15939 ndr_print_string(ndr, "server_unc", r->in.server_unc);
15941 ndr->depth--;
15942 ndr_print_string(ndr, "share_name", r->in.share_name);
15943 ndr_print_uint32(ndr, "reserved", r->in.reserved);
15944 ndr->depth--;
15946 if (flags & NDR_OUT) {
15947 ndr_print_struct(ndr, "out", "srvsvc_NetShareDelSticky");
15948 ndr->depth++;
15949 ndr_print_WERROR(ndr, "result", r->out.result);
15950 ndr->depth--;
15952 ndr->depth--;
15955 static enum ndr_err_code ndr_push_srvsvc_NetShareCheck(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareCheck *r)
15957 if (flags & NDR_IN) {
15958 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
15959 if (r->in.server_unc) {
15960 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15961 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
15962 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15963 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));
15965 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.device_name, CH_UTF16)));
15966 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
15967 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.device_name, CH_UTF16)));
15968 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));
15970 if (flags & NDR_OUT) {
15971 if (r->out.type == NULL) {
15972 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15974 NDR_CHECK(ndr_push_srvsvc_ShareType(ndr, NDR_SCALARS, *r->out.type));
15975 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15977 return NDR_ERR_SUCCESS;
15980 static enum ndr_err_code ndr_pull_srvsvc_NetShareCheck(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareCheck *r)
15982 uint32_t _ptr_server_unc;
15983 TALLOC_CTX *_mem_save_server_unc_0;
15984 TALLOC_CTX *_mem_save_type_0;
15985 if (flags & NDR_IN) {
15986 ZERO_STRUCT(r->out);
15988 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
15989 if (_ptr_server_unc) {
15990 NDR_PULL_ALLOC(ndr, r->in.server_unc);
15991 } else {
15992 r->in.server_unc = NULL;
15994 if (r->in.server_unc) {
15995 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
15996 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
15997 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
15998 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
15999 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
16000 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
16002 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
16003 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
16004 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
16006 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.device_name));
16007 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.device_name));
16008 if (ndr_get_array_length(ndr, &r->in.device_name) > ndr_get_array_size(ndr, &r->in.device_name)) {
16009 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.device_name), ndr_get_array_length(ndr, &r->in.device_name));
16011 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.device_name), sizeof(uint16_t)));
16012 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.device_name, ndr_get_array_length(ndr, &r->in.device_name), sizeof(uint16_t), CH_UTF16));
16013 NDR_PULL_ALLOC(ndr, r->out.type);
16014 ZERO_STRUCTP(r->out.type);
16016 if (flags & NDR_OUT) {
16017 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16018 NDR_PULL_ALLOC(ndr, r->out.type);
16020 _mem_save_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
16021 NDR_PULL_SET_MEM_CTX(ndr, r->out.type, LIBNDR_FLAG_REF_ALLOC);
16022 NDR_CHECK(ndr_pull_srvsvc_ShareType(ndr, NDR_SCALARS, r->out.type));
16023 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_type_0, LIBNDR_FLAG_REF_ALLOC);
16024 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16026 return NDR_ERR_SUCCESS;
16029 _PUBLIC_ void ndr_print_srvsvc_NetShareCheck(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareCheck *r)
16031 ndr_print_struct(ndr, name, "srvsvc_NetShareCheck");
16032 ndr->depth++;
16033 if (flags & NDR_SET_VALUES) {
16034 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16036 if (flags & NDR_IN) {
16037 ndr_print_struct(ndr, "in", "srvsvc_NetShareCheck");
16038 ndr->depth++;
16039 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
16040 ndr->depth++;
16041 if (r->in.server_unc) {
16042 ndr_print_string(ndr, "server_unc", r->in.server_unc);
16044 ndr->depth--;
16045 ndr_print_string(ndr, "device_name", r->in.device_name);
16046 ndr->depth--;
16048 if (flags & NDR_OUT) {
16049 ndr_print_struct(ndr, "out", "srvsvc_NetShareCheck");
16050 ndr->depth++;
16051 ndr_print_ptr(ndr, "type", r->out.type);
16052 ndr->depth++;
16053 ndr_print_srvsvc_ShareType(ndr, "type", *r->out.type);
16054 ndr->depth--;
16055 ndr_print_WERROR(ndr, "result", r->out.result);
16056 ndr->depth--;
16058 ndr->depth--;
16061 static enum ndr_err_code ndr_push_srvsvc_NetSrvGetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetSrvGetInfo *r)
16063 if (flags & NDR_IN) {
16064 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
16065 if (r->in.server_unc) {
16066 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16067 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
16068 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16069 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));
16071 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
16073 if (flags & NDR_OUT) {
16074 if (r->out.info == NULL) {
16075 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16077 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
16078 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
16079 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16081 return NDR_ERR_SUCCESS;
16084 static enum ndr_err_code ndr_pull_srvsvc_NetSrvGetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetSrvGetInfo *r)
16086 uint32_t _ptr_server_unc;
16087 TALLOC_CTX *_mem_save_server_unc_0;
16088 TALLOC_CTX *_mem_save_info_0;
16089 if (flags & NDR_IN) {
16090 ZERO_STRUCT(r->out);
16092 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
16093 if (_ptr_server_unc) {
16094 NDR_PULL_ALLOC(ndr, r->in.server_unc);
16095 } else {
16096 r->in.server_unc = NULL;
16098 if (r->in.server_unc) {
16099 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
16100 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
16101 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
16102 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
16103 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
16104 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
16106 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
16107 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
16108 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
16110 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
16111 NDR_PULL_ALLOC(ndr, r->out.info);
16112 ZERO_STRUCTP(r->out.info);
16114 if (flags & NDR_OUT) {
16115 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16116 NDR_PULL_ALLOC(ndr, r->out.info);
16118 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
16119 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
16120 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
16121 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
16122 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
16123 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16125 return NDR_ERR_SUCCESS;
16128 _PUBLIC_ void ndr_print_srvsvc_NetSrvGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSrvGetInfo *r)
16130 ndr_print_struct(ndr, name, "srvsvc_NetSrvGetInfo");
16131 ndr->depth++;
16132 if (flags & NDR_SET_VALUES) {
16133 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16135 if (flags & NDR_IN) {
16136 ndr_print_struct(ndr, "in", "srvsvc_NetSrvGetInfo");
16137 ndr->depth++;
16138 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
16139 ndr->depth++;
16140 if (r->in.server_unc) {
16141 ndr_print_string(ndr, "server_unc", r->in.server_unc);
16143 ndr->depth--;
16144 ndr_print_uint32(ndr, "level", r->in.level);
16145 ndr->depth--;
16147 if (flags & NDR_OUT) {
16148 ndr_print_struct(ndr, "out", "srvsvc_NetSrvGetInfo");
16149 ndr->depth++;
16150 ndr_print_ptr(ndr, "info", r->out.info);
16151 ndr->depth++;
16152 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
16153 ndr_print_srvsvc_NetSrvInfo(ndr, "info", r->out.info);
16154 ndr->depth--;
16155 ndr_print_WERROR(ndr, "result", r->out.result);
16156 ndr->depth--;
16158 ndr->depth--;
16161 static enum ndr_err_code ndr_push_srvsvc_NetSrvSetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetSrvSetInfo *r)
16163 if (flags & NDR_IN) {
16164 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
16165 if (r->in.server_unc) {
16166 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16167 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
16168 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16169 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));
16171 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
16172 if (r->in.info == NULL) {
16173 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16175 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
16176 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
16177 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.parm_error));
16178 if (r->in.parm_error) {
16179 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.parm_error));
16182 if (flags & NDR_OUT) {
16183 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.parm_error));
16184 if (r->out.parm_error) {
16185 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.parm_error));
16187 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16189 return NDR_ERR_SUCCESS;
16192 static enum ndr_err_code ndr_pull_srvsvc_NetSrvSetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetSrvSetInfo *r)
16194 uint32_t _ptr_server_unc;
16195 uint32_t _ptr_parm_error;
16196 TALLOC_CTX *_mem_save_server_unc_0;
16197 TALLOC_CTX *_mem_save_info_0;
16198 TALLOC_CTX *_mem_save_parm_error_0;
16199 if (flags & NDR_IN) {
16200 ZERO_STRUCT(r->out);
16202 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
16203 if (_ptr_server_unc) {
16204 NDR_PULL_ALLOC(ndr, r->in.server_unc);
16205 } else {
16206 r->in.server_unc = NULL;
16208 if (r->in.server_unc) {
16209 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
16210 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
16211 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
16212 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
16213 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
16214 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
16216 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
16217 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
16218 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
16220 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
16221 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16222 NDR_PULL_ALLOC(ndr, r->in.info);
16224 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
16225 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
16226 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
16227 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
16228 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
16229 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
16230 if (_ptr_parm_error) {
16231 NDR_PULL_ALLOC(ndr, r->in.parm_error);
16232 } else {
16233 r->in.parm_error = NULL;
16235 if (r->in.parm_error) {
16236 _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
16237 NDR_PULL_SET_MEM_CTX(ndr, r->in.parm_error, 0);
16238 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.parm_error));
16239 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
16242 if (flags & NDR_OUT) {
16243 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
16244 if (_ptr_parm_error) {
16245 NDR_PULL_ALLOC(ndr, r->out.parm_error);
16246 } else {
16247 r->out.parm_error = NULL;
16249 if (r->out.parm_error) {
16250 _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
16251 NDR_PULL_SET_MEM_CTX(ndr, r->out.parm_error, 0);
16252 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.parm_error));
16253 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
16255 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16257 return NDR_ERR_SUCCESS;
16260 _PUBLIC_ void ndr_print_srvsvc_NetSrvSetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSrvSetInfo *r)
16262 ndr_print_struct(ndr, name, "srvsvc_NetSrvSetInfo");
16263 ndr->depth++;
16264 if (flags & NDR_SET_VALUES) {
16265 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16267 if (flags & NDR_IN) {
16268 ndr_print_struct(ndr, "in", "srvsvc_NetSrvSetInfo");
16269 ndr->depth++;
16270 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
16271 ndr->depth++;
16272 if (r->in.server_unc) {
16273 ndr_print_string(ndr, "server_unc", r->in.server_unc);
16275 ndr->depth--;
16276 ndr_print_uint32(ndr, "level", r->in.level);
16277 ndr_print_ptr(ndr, "info", r->in.info);
16278 ndr->depth++;
16279 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
16280 ndr_print_srvsvc_NetSrvInfo(ndr, "info", r->in.info);
16281 ndr->depth--;
16282 ndr_print_ptr(ndr, "parm_error", r->in.parm_error);
16283 ndr->depth++;
16284 if (r->in.parm_error) {
16285 ndr_print_uint32(ndr, "parm_error", *r->in.parm_error);
16287 ndr->depth--;
16288 ndr->depth--;
16290 if (flags & NDR_OUT) {
16291 ndr_print_struct(ndr, "out", "srvsvc_NetSrvSetInfo");
16292 ndr->depth++;
16293 ndr_print_ptr(ndr, "parm_error", r->out.parm_error);
16294 ndr->depth++;
16295 if (r->out.parm_error) {
16296 ndr_print_uint32(ndr, "parm_error", *r->out.parm_error);
16298 ndr->depth--;
16299 ndr_print_WERROR(ndr, "result", r->out.result);
16300 ndr->depth--;
16302 ndr->depth--;
16305 static enum ndr_err_code ndr_push_srvsvc_NetDiskEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetDiskEnum *r)
16307 if (flags & NDR_IN) {
16308 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
16309 if (r->in.server_unc) {
16310 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16311 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
16312 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16313 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));
16315 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
16316 if (r->in.info == NULL) {
16317 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16319 NDR_CHECK(ndr_push_srvsvc_NetDiskInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
16320 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.maxlen));
16321 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
16322 if (r->in.resume_handle) {
16323 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
16326 if (flags & NDR_OUT) {
16327 if (r->out.info == NULL) {
16328 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16330 NDR_CHECK(ndr_push_srvsvc_NetDiskInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
16331 if (r->out.totalentries == NULL) {
16332 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16334 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
16335 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
16336 if (r->out.resume_handle) {
16337 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
16339 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16341 return NDR_ERR_SUCCESS;
16344 static enum ndr_err_code ndr_pull_srvsvc_NetDiskEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetDiskEnum *r)
16346 uint32_t _ptr_server_unc;
16347 uint32_t _ptr_resume_handle;
16348 TALLOC_CTX *_mem_save_server_unc_0;
16349 TALLOC_CTX *_mem_save_info_0;
16350 TALLOC_CTX *_mem_save_totalentries_0;
16351 TALLOC_CTX *_mem_save_resume_handle_0;
16352 if (flags & NDR_IN) {
16353 ZERO_STRUCT(r->out);
16355 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
16356 if (_ptr_server_unc) {
16357 NDR_PULL_ALLOC(ndr, r->in.server_unc);
16358 } else {
16359 r->in.server_unc = NULL;
16361 if (r->in.server_unc) {
16362 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
16363 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
16364 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
16365 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
16366 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
16367 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
16369 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
16370 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
16371 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
16373 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
16374 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16375 NDR_PULL_ALLOC(ndr, r->in.info);
16377 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
16378 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
16379 NDR_CHECK(ndr_pull_srvsvc_NetDiskInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
16380 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
16381 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.maxlen));
16382 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
16383 if (_ptr_resume_handle) {
16384 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
16385 } else {
16386 r->in.resume_handle = NULL;
16388 if (r->in.resume_handle) {
16389 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
16390 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
16391 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
16392 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
16394 NDR_PULL_ALLOC(ndr, r->out.info);
16395 *r->out.info = *r->in.info;
16396 NDR_PULL_ALLOC(ndr, r->out.totalentries);
16397 ZERO_STRUCTP(r->out.totalentries);
16399 if (flags & NDR_OUT) {
16400 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16401 NDR_PULL_ALLOC(ndr, r->out.info);
16403 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
16404 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
16405 NDR_CHECK(ndr_pull_srvsvc_NetDiskInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
16406 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
16407 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16408 NDR_PULL_ALLOC(ndr, r->out.totalentries);
16410 _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
16411 NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
16412 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
16413 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
16414 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
16415 if (_ptr_resume_handle) {
16416 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
16417 } else {
16418 r->out.resume_handle = NULL;
16420 if (r->out.resume_handle) {
16421 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
16422 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
16423 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
16424 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
16426 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16428 return NDR_ERR_SUCCESS;
16431 _PUBLIC_ void ndr_print_srvsvc_NetDiskEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetDiskEnum *r)
16433 ndr_print_struct(ndr, name, "srvsvc_NetDiskEnum");
16434 ndr->depth++;
16435 if (flags & NDR_SET_VALUES) {
16436 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16438 if (flags & NDR_IN) {
16439 ndr_print_struct(ndr, "in", "srvsvc_NetDiskEnum");
16440 ndr->depth++;
16441 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
16442 ndr->depth++;
16443 if (r->in.server_unc) {
16444 ndr_print_string(ndr, "server_unc", r->in.server_unc);
16446 ndr->depth--;
16447 ndr_print_uint32(ndr, "level", r->in.level);
16448 ndr_print_ptr(ndr, "info", r->in.info);
16449 ndr->depth++;
16450 ndr_print_srvsvc_NetDiskInfo(ndr, "info", r->in.info);
16451 ndr->depth--;
16452 ndr_print_uint32(ndr, "maxlen", r->in.maxlen);
16453 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
16454 ndr->depth++;
16455 if (r->in.resume_handle) {
16456 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
16458 ndr->depth--;
16459 ndr->depth--;
16461 if (flags & NDR_OUT) {
16462 ndr_print_struct(ndr, "out", "srvsvc_NetDiskEnum");
16463 ndr->depth++;
16464 ndr_print_ptr(ndr, "info", r->out.info);
16465 ndr->depth++;
16466 ndr_print_srvsvc_NetDiskInfo(ndr, "info", r->out.info);
16467 ndr->depth--;
16468 ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
16469 ndr->depth++;
16470 ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
16471 ndr->depth--;
16472 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
16473 ndr->depth++;
16474 if (r->out.resume_handle) {
16475 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
16477 ndr->depth--;
16478 ndr_print_WERROR(ndr, "result", r->out.result);
16479 ndr->depth--;
16481 ndr->depth--;
16484 static enum ndr_err_code ndr_push_srvsvc_NetServerStatisticsGet(struct ndr_push *ndr, int flags, const struct srvsvc_NetServerStatisticsGet *r)
16486 if (flags & NDR_IN) {
16487 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
16488 if (r->in.server_unc) {
16489 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, 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.server_unc, CH_UTF16)));
16492 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));
16494 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service));
16495 if (r->in.service) {
16496 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.service, CH_UTF16)));
16497 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
16498 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.service, CH_UTF16)));
16499 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.service, ndr_charset_length(r->in.service, CH_UTF16), sizeof(uint16_t), CH_UTF16));
16501 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
16502 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.options));
16504 if (flags & NDR_OUT) {
16505 if (r->out.stats == NULL) {
16506 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16508 NDR_CHECK(ndr_push_srvsvc_Statistics(ndr, NDR_SCALARS, r->out.stats));
16509 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16511 return NDR_ERR_SUCCESS;
16514 static enum ndr_err_code ndr_pull_srvsvc_NetServerStatisticsGet(struct ndr_pull *ndr, int flags, struct srvsvc_NetServerStatisticsGet *r)
16516 uint32_t _ptr_server_unc;
16517 uint32_t _ptr_service;
16518 TALLOC_CTX *_mem_save_server_unc_0;
16519 TALLOC_CTX *_mem_save_service_0;
16520 TALLOC_CTX *_mem_save_stats_0;
16521 if (flags & NDR_IN) {
16522 ZERO_STRUCT(r->out);
16524 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
16525 if (_ptr_server_unc) {
16526 NDR_PULL_ALLOC(ndr, r->in.server_unc);
16527 } else {
16528 r->in.server_unc = NULL;
16530 if (r->in.server_unc) {
16531 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
16532 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
16533 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
16534 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
16535 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
16536 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
16538 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
16539 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
16540 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
16542 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service));
16543 if (_ptr_service) {
16544 NDR_PULL_ALLOC(ndr, r->in.service);
16545 } else {
16546 r->in.service = NULL;
16548 if (r->in.service) {
16549 _mem_save_service_0 = NDR_PULL_GET_MEM_CTX(ndr);
16550 NDR_PULL_SET_MEM_CTX(ndr, r->in.service, 0);
16551 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service));
16552 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service));
16553 if (ndr_get_array_length(ndr, &r->in.service) > ndr_get_array_size(ndr, &r->in.service)) {
16554 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.service), ndr_get_array_length(ndr, &r->in.service));
16556 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.service), sizeof(uint16_t)));
16557 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.service, ndr_get_array_length(ndr, &r->in.service), sizeof(uint16_t), CH_UTF16));
16558 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_0, 0);
16560 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
16561 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.options));
16562 NDR_PULL_ALLOC(ndr, r->out.stats);
16563 ZERO_STRUCTP(r->out.stats);
16565 if (flags & NDR_OUT) {
16566 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16567 NDR_PULL_ALLOC(ndr, r->out.stats);
16569 _mem_save_stats_0 = NDR_PULL_GET_MEM_CTX(ndr);
16570 NDR_PULL_SET_MEM_CTX(ndr, r->out.stats, LIBNDR_FLAG_REF_ALLOC);
16571 NDR_CHECK(ndr_pull_srvsvc_Statistics(ndr, NDR_SCALARS, r->out.stats));
16572 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stats_0, LIBNDR_FLAG_REF_ALLOC);
16573 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16575 return NDR_ERR_SUCCESS;
16578 _PUBLIC_ void ndr_print_srvsvc_NetServerStatisticsGet(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetServerStatisticsGet *r)
16580 ndr_print_struct(ndr, name, "srvsvc_NetServerStatisticsGet");
16581 ndr->depth++;
16582 if (flags & NDR_SET_VALUES) {
16583 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16585 if (flags & NDR_IN) {
16586 ndr_print_struct(ndr, "in", "srvsvc_NetServerStatisticsGet");
16587 ndr->depth++;
16588 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
16589 ndr->depth++;
16590 if (r->in.server_unc) {
16591 ndr_print_string(ndr, "server_unc", r->in.server_unc);
16593 ndr->depth--;
16594 ndr_print_ptr(ndr, "service", r->in.service);
16595 ndr->depth++;
16596 if (r->in.service) {
16597 ndr_print_string(ndr, "service", r->in.service);
16599 ndr->depth--;
16600 ndr_print_uint32(ndr, "level", r->in.level);
16601 ndr_print_uint32(ndr, "options", r->in.options);
16602 ndr->depth--;
16604 if (flags & NDR_OUT) {
16605 ndr_print_struct(ndr, "out", "srvsvc_NetServerStatisticsGet");
16606 ndr->depth++;
16607 ndr_print_ptr(ndr, "stats", r->out.stats);
16608 ndr->depth++;
16609 ndr_print_srvsvc_Statistics(ndr, "stats", r->out.stats);
16610 ndr->depth--;
16611 ndr_print_WERROR(ndr, "result", r->out.result);
16612 ndr->depth--;
16614 ndr->depth--;
16617 static enum ndr_err_code ndr_push_srvsvc_NetTransportAdd(struct ndr_push *ndr, int flags, const struct srvsvc_NetTransportAdd *r)
16619 if (flags & NDR_IN) {
16620 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
16621 if (r->in.server_unc) {
16622 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16623 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
16624 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16625 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));
16627 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
16628 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.info, r->in.level));
16629 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
16631 if (flags & NDR_OUT) {
16632 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16634 return NDR_ERR_SUCCESS;
16637 static enum ndr_err_code ndr_pull_srvsvc_NetTransportAdd(struct ndr_pull *ndr, int flags, struct srvsvc_NetTransportAdd *r)
16639 uint32_t _ptr_server_unc;
16640 TALLOC_CTX *_mem_save_server_unc_0;
16641 if (flags & NDR_IN) {
16642 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
16643 if (_ptr_server_unc) {
16644 NDR_PULL_ALLOC(ndr, r->in.server_unc);
16645 } else {
16646 r->in.server_unc = NULL;
16648 if (r->in.server_unc) {
16649 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
16650 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
16651 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
16652 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
16653 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
16654 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
16656 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
16657 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
16658 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
16660 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
16661 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.info, r->in.level));
16662 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
16664 if (flags & NDR_OUT) {
16665 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16667 return NDR_ERR_SUCCESS;
16670 _PUBLIC_ void ndr_print_srvsvc_NetTransportAdd(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetTransportAdd *r)
16672 ndr_print_struct(ndr, name, "srvsvc_NetTransportAdd");
16673 ndr->depth++;
16674 if (flags & NDR_SET_VALUES) {
16675 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16677 if (flags & NDR_IN) {
16678 ndr_print_struct(ndr, "in", "srvsvc_NetTransportAdd");
16679 ndr->depth++;
16680 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
16681 ndr->depth++;
16682 if (r->in.server_unc) {
16683 ndr_print_string(ndr, "server_unc", r->in.server_unc);
16685 ndr->depth--;
16686 ndr_print_uint32(ndr, "level", r->in.level);
16687 ndr_print_set_switch_value(ndr, &r->in.info, r->in.level);
16688 ndr_print_srvsvc_NetTransportInfo(ndr, "info", &r->in.info);
16689 ndr->depth--;
16691 if (flags & NDR_OUT) {
16692 ndr_print_struct(ndr, "out", "srvsvc_NetTransportAdd");
16693 ndr->depth++;
16694 ndr_print_WERROR(ndr, "result", r->out.result);
16695 ndr->depth--;
16697 ndr->depth--;
16700 static enum ndr_err_code ndr_push_srvsvc_NetTransportEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetTransportEnum *r)
16702 if (flags & NDR_IN) {
16703 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
16704 if (r->in.server_unc) {
16705 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16706 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
16707 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16708 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));
16710 if (r->in.level == NULL) {
16711 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16713 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.level));
16714 if (r->in.transports == NULL) {
16715 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16717 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.transports, *r->in.level));
16718 NDR_CHECK(ndr_push_srvsvc_NetTransportCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.transports));
16719 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
16720 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
16721 if (r->in.resume_handle) {
16722 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
16725 if (flags & NDR_OUT) {
16726 if (r->out.level == NULL) {
16727 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16729 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level));
16730 if (r->out.transports == NULL) {
16731 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16733 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.transports, *r->out.level));
16734 NDR_CHECK(ndr_push_srvsvc_NetTransportCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.transports));
16735 if (r->out.totalentries == NULL) {
16736 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16738 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
16739 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
16740 if (r->out.resume_handle) {
16741 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
16743 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16745 return NDR_ERR_SUCCESS;
16748 static enum ndr_err_code ndr_pull_srvsvc_NetTransportEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetTransportEnum *r)
16750 uint32_t _ptr_server_unc;
16751 uint32_t _ptr_resume_handle;
16752 TALLOC_CTX *_mem_save_server_unc_0;
16753 TALLOC_CTX *_mem_save_level_0;
16754 TALLOC_CTX *_mem_save_transports_0;
16755 TALLOC_CTX *_mem_save_totalentries_0;
16756 TALLOC_CTX *_mem_save_resume_handle_0;
16757 if (flags & NDR_IN) {
16758 ZERO_STRUCT(r->out);
16760 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
16761 if (_ptr_server_unc) {
16762 NDR_PULL_ALLOC(ndr, r->in.server_unc);
16763 } else {
16764 r->in.server_unc = NULL;
16766 if (r->in.server_unc) {
16767 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
16768 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
16769 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
16770 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
16771 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
16772 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
16774 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
16775 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
16776 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
16778 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16779 NDR_PULL_ALLOC(ndr, r->in.level);
16781 _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr);
16782 NDR_PULL_SET_MEM_CTX(ndr, r->in.level, LIBNDR_FLAG_REF_ALLOC);
16783 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.level));
16784 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC);
16785 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16786 NDR_PULL_ALLOC(ndr, r->in.transports);
16788 _mem_save_transports_0 = NDR_PULL_GET_MEM_CTX(ndr);
16789 NDR_PULL_SET_MEM_CTX(ndr, r->in.transports, LIBNDR_FLAG_REF_ALLOC);
16790 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.transports, *r->in.level));
16791 NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.transports));
16792 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_transports_0, LIBNDR_FLAG_REF_ALLOC);
16793 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
16794 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
16795 if (_ptr_resume_handle) {
16796 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
16797 } else {
16798 r->in.resume_handle = NULL;
16800 if (r->in.resume_handle) {
16801 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
16802 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
16803 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
16804 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
16806 NDR_PULL_ALLOC(ndr, r->out.level);
16807 *r->out.level = *r->in.level;
16808 NDR_PULL_ALLOC(ndr, r->out.transports);
16809 *r->out.transports = *r->in.transports;
16810 NDR_PULL_ALLOC(ndr, r->out.totalentries);
16811 ZERO_STRUCTP(r->out.totalentries);
16813 if (flags & NDR_OUT) {
16814 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16815 NDR_PULL_ALLOC(ndr, r->out.level);
16817 _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr);
16818 NDR_PULL_SET_MEM_CTX(ndr, r->out.level, LIBNDR_FLAG_REF_ALLOC);
16819 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.level));
16820 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC);
16821 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16822 NDR_PULL_ALLOC(ndr, r->out.transports);
16824 _mem_save_transports_0 = NDR_PULL_GET_MEM_CTX(ndr);
16825 NDR_PULL_SET_MEM_CTX(ndr, r->out.transports, LIBNDR_FLAG_REF_ALLOC);
16826 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.transports, *r->out.level));
16827 NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.transports));
16828 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_transports_0, LIBNDR_FLAG_REF_ALLOC);
16829 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16830 NDR_PULL_ALLOC(ndr, r->out.totalentries);
16832 _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
16833 NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
16834 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
16835 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
16836 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
16837 if (_ptr_resume_handle) {
16838 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
16839 } else {
16840 r->out.resume_handle = NULL;
16842 if (r->out.resume_handle) {
16843 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
16844 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
16845 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
16846 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
16848 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16850 return NDR_ERR_SUCCESS;
16853 _PUBLIC_ void ndr_print_srvsvc_NetTransportEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetTransportEnum *r)
16855 ndr_print_struct(ndr, name, "srvsvc_NetTransportEnum");
16856 ndr->depth++;
16857 if (flags & NDR_SET_VALUES) {
16858 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16860 if (flags & NDR_IN) {
16861 ndr_print_struct(ndr, "in", "srvsvc_NetTransportEnum");
16862 ndr->depth++;
16863 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
16864 ndr->depth++;
16865 if (r->in.server_unc) {
16866 ndr_print_string(ndr, "server_unc", r->in.server_unc);
16868 ndr->depth--;
16869 ndr_print_ptr(ndr, "level", r->in.level);
16870 ndr->depth++;
16871 ndr_print_uint32(ndr, "level", *r->in.level);
16872 ndr->depth--;
16873 ndr_print_ptr(ndr, "transports", r->in.transports);
16874 ndr->depth++;
16875 ndr_print_set_switch_value(ndr, r->in.transports, *r->in.level);
16876 ndr_print_srvsvc_NetTransportCtr(ndr, "transports", r->in.transports);
16877 ndr->depth--;
16878 ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
16879 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
16880 ndr->depth++;
16881 if (r->in.resume_handle) {
16882 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
16884 ndr->depth--;
16885 ndr->depth--;
16887 if (flags & NDR_OUT) {
16888 ndr_print_struct(ndr, "out", "srvsvc_NetTransportEnum");
16889 ndr->depth++;
16890 ndr_print_ptr(ndr, "level", r->out.level);
16891 ndr->depth++;
16892 ndr_print_uint32(ndr, "level", *r->out.level);
16893 ndr->depth--;
16894 ndr_print_ptr(ndr, "transports", r->out.transports);
16895 ndr->depth++;
16896 ndr_print_set_switch_value(ndr, r->out.transports, *r->out.level);
16897 ndr_print_srvsvc_NetTransportCtr(ndr, "transports", r->out.transports);
16898 ndr->depth--;
16899 ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
16900 ndr->depth++;
16901 ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
16902 ndr->depth--;
16903 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
16904 ndr->depth++;
16905 if (r->out.resume_handle) {
16906 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
16908 ndr->depth--;
16909 ndr_print_WERROR(ndr, "result", r->out.result);
16910 ndr->depth--;
16912 ndr->depth--;
16915 static enum ndr_err_code ndr_push_srvsvc_NetTransportDel(struct ndr_push *ndr, int flags, const struct srvsvc_NetTransportDel *r)
16917 if (flags & NDR_IN) {
16918 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
16919 if (r->in.server_unc) {
16920 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16921 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
16922 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16923 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));
16925 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown));
16926 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.transport));
16928 if (flags & NDR_OUT) {
16929 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16931 return NDR_ERR_SUCCESS;
16934 static enum ndr_err_code ndr_pull_srvsvc_NetTransportDel(struct ndr_pull *ndr, int flags, struct srvsvc_NetTransportDel *r)
16936 uint32_t _ptr_server_unc;
16937 TALLOC_CTX *_mem_save_server_unc_0;
16938 if (flags & NDR_IN) {
16939 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
16940 if (_ptr_server_unc) {
16941 NDR_PULL_ALLOC(ndr, r->in.server_unc);
16942 } else {
16943 r->in.server_unc = NULL;
16945 if (r->in.server_unc) {
16946 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
16947 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
16948 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
16949 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
16950 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
16951 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
16953 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
16954 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
16955 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
16957 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown));
16958 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.transport));
16960 if (flags & NDR_OUT) {
16961 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16963 return NDR_ERR_SUCCESS;
16966 _PUBLIC_ void ndr_print_srvsvc_NetTransportDel(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetTransportDel *r)
16968 ndr_print_struct(ndr, name, "srvsvc_NetTransportDel");
16969 ndr->depth++;
16970 if (flags & NDR_SET_VALUES) {
16971 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16973 if (flags & NDR_IN) {
16974 ndr_print_struct(ndr, "in", "srvsvc_NetTransportDel");
16975 ndr->depth++;
16976 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
16977 ndr->depth++;
16978 if (r->in.server_unc) {
16979 ndr_print_string(ndr, "server_unc", r->in.server_unc);
16981 ndr->depth--;
16982 ndr_print_uint32(ndr, "unknown", r->in.unknown);
16983 ndr_print_srvsvc_NetTransportInfo0(ndr, "transport", &r->in.transport);
16984 ndr->depth--;
16986 if (flags & NDR_OUT) {
16987 ndr_print_struct(ndr, "out", "srvsvc_NetTransportDel");
16988 ndr->depth++;
16989 ndr_print_WERROR(ndr, "result", r->out.result);
16990 ndr->depth--;
16992 ndr->depth--;
16995 static enum ndr_err_code ndr_push_srvsvc_NetRemoteTOD(struct ndr_push *ndr, int flags, const struct srvsvc_NetRemoteTOD *r)
16997 if (flags & NDR_IN) {
16998 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
16999 if (r->in.server_unc) {
17000 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17001 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17002 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17003 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));
17006 if (flags & NDR_OUT) {
17007 if (r->out.info == NULL) {
17008 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17010 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
17011 if (*r->out.info) {
17012 NDR_CHECK(ndr_push_srvsvc_NetRemoteTODInfo(ndr, NDR_SCALARS, *r->out.info));
17014 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17016 return NDR_ERR_SUCCESS;
17019 static enum ndr_err_code ndr_pull_srvsvc_NetRemoteTOD(struct ndr_pull *ndr, int flags, struct srvsvc_NetRemoteTOD *r)
17021 uint32_t _ptr_server_unc;
17022 uint32_t _ptr_info;
17023 TALLOC_CTX *_mem_save_server_unc_0;
17024 TALLOC_CTX *_mem_save_info_0;
17025 TALLOC_CTX *_mem_save_info_1;
17026 if (flags & NDR_IN) {
17027 ZERO_STRUCT(r->out);
17029 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
17030 if (_ptr_server_unc) {
17031 NDR_PULL_ALLOC(ndr, r->in.server_unc);
17032 } else {
17033 r->in.server_unc = NULL;
17035 if (r->in.server_unc) {
17036 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
17037 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
17038 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
17039 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
17040 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
17041 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
17043 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
17044 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
17045 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
17047 NDR_PULL_ALLOC(ndr, r->out.info);
17048 ZERO_STRUCTP(r->out.info);
17050 if (flags & NDR_OUT) {
17051 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17052 NDR_PULL_ALLOC(ndr, r->out.info);
17054 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
17055 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
17056 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
17057 if (_ptr_info) {
17058 NDR_PULL_ALLOC(ndr, *r->out.info);
17059 } else {
17060 *r->out.info = NULL;
17062 if (*r->out.info) {
17063 _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
17064 NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
17065 NDR_CHECK(ndr_pull_srvsvc_NetRemoteTODInfo(ndr, NDR_SCALARS, *r->out.info));
17066 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
17068 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
17069 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17071 return NDR_ERR_SUCCESS;
17074 _PUBLIC_ void ndr_print_srvsvc_NetRemoteTOD(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetRemoteTOD *r)
17076 ndr_print_struct(ndr, name, "srvsvc_NetRemoteTOD");
17077 ndr->depth++;
17078 if (flags & NDR_SET_VALUES) {
17079 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17081 if (flags & NDR_IN) {
17082 ndr_print_struct(ndr, "in", "srvsvc_NetRemoteTOD");
17083 ndr->depth++;
17084 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
17085 ndr->depth++;
17086 if (r->in.server_unc) {
17087 ndr_print_string(ndr, "server_unc", r->in.server_unc);
17089 ndr->depth--;
17090 ndr->depth--;
17092 if (flags & NDR_OUT) {
17093 ndr_print_struct(ndr, "out", "srvsvc_NetRemoteTOD");
17094 ndr->depth++;
17095 ndr_print_ptr(ndr, "info", r->out.info);
17096 ndr->depth++;
17097 ndr_print_ptr(ndr, "info", *r->out.info);
17098 ndr->depth++;
17099 if (*r->out.info) {
17100 ndr_print_srvsvc_NetRemoteTODInfo(ndr, "info", *r->out.info);
17102 ndr->depth--;
17103 ndr->depth--;
17104 ndr_print_WERROR(ndr, "result", r->out.result);
17105 ndr->depth--;
17107 ndr->depth--;
17110 static enum ndr_err_code ndr_push_srvsvc_NetSetServiceBits(struct ndr_push *ndr, int flags, const struct srvsvc_NetSetServiceBits *r)
17112 if (flags & NDR_IN) {
17113 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
17114 if (r->in.server_unc) {
17115 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17116 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17117 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17118 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));
17120 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.transport));
17121 if (r->in.transport) {
17122 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.transport, CH_UTF16)));
17123 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17124 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.transport, CH_UTF16)));
17125 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.transport, ndr_charset_length(r->in.transport, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17127 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.servicebits));
17128 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.updateimmediately));
17130 if (flags & NDR_OUT) {
17131 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17133 return NDR_ERR_SUCCESS;
17136 static enum ndr_err_code ndr_pull_srvsvc_NetSetServiceBits(struct ndr_pull *ndr, int flags, struct srvsvc_NetSetServiceBits *r)
17138 uint32_t _ptr_server_unc;
17139 uint32_t _ptr_transport;
17140 TALLOC_CTX *_mem_save_server_unc_0;
17141 TALLOC_CTX *_mem_save_transport_0;
17142 if (flags & NDR_IN) {
17143 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
17144 if (_ptr_server_unc) {
17145 NDR_PULL_ALLOC(ndr, r->in.server_unc);
17146 } else {
17147 r->in.server_unc = NULL;
17149 if (r->in.server_unc) {
17150 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
17151 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
17152 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
17153 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
17154 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
17155 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
17157 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
17158 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
17159 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
17161 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_transport));
17162 if (_ptr_transport) {
17163 NDR_PULL_ALLOC(ndr, r->in.transport);
17164 } else {
17165 r->in.transport = NULL;
17167 if (r->in.transport) {
17168 _mem_save_transport_0 = NDR_PULL_GET_MEM_CTX(ndr);
17169 NDR_PULL_SET_MEM_CTX(ndr, r->in.transport, 0);
17170 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.transport));
17171 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.transport));
17172 if (ndr_get_array_length(ndr, &r->in.transport) > ndr_get_array_size(ndr, &r->in.transport)) {
17173 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.transport), ndr_get_array_length(ndr, &r->in.transport));
17175 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.transport), sizeof(uint16_t)));
17176 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.transport, ndr_get_array_length(ndr, &r->in.transport), sizeof(uint16_t), CH_UTF16));
17177 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_transport_0, 0);
17179 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.servicebits));
17180 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.updateimmediately));
17182 if (flags & NDR_OUT) {
17183 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17185 return NDR_ERR_SUCCESS;
17188 _PUBLIC_ void ndr_print_srvsvc_NetSetServiceBits(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSetServiceBits *r)
17190 ndr_print_struct(ndr, name, "srvsvc_NetSetServiceBits");
17191 ndr->depth++;
17192 if (flags & NDR_SET_VALUES) {
17193 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17195 if (flags & NDR_IN) {
17196 ndr_print_struct(ndr, "in", "srvsvc_NetSetServiceBits");
17197 ndr->depth++;
17198 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
17199 ndr->depth++;
17200 if (r->in.server_unc) {
17201 ndr_print_string(ndr, "server_unc", r->in.server_unc);
17203 ndr->depth--;
17204 ndr_print_ptr(ndr, "transport", r->in.transport);
17205 ndr->depth++;
17206 if (r->in.transport) {
17207 ndr_print_string(ndr, "transport", r->in.transport);
17209 ndr->depth--;
17210 ndr_print_uint32(ndr, "servicebits", r->in.servicebits);
17211 ndr_print_uint32(ndr, "updateimmediately", r->in.updateimmediately);
17212 ndr->depth--;
17214 if (flags & NDR_OUT) {
17215 ndr_print_struct(ndr, "out", "srvsvc_NetSetServiceBits");
17216 ndr->depth++;
17217 ndr_print_WERROR(ndr, "result", r->out.result);
17218 ndr->depth--;
17220 ndr->depth--;
17223 static enum ndr_err_code ndr_push_srvsvc_NetPathType(struct ndr_push *ndr, int flags, const struct srvsvc_NetPathType *r)
17225 if (flags & NDR_IN) {
17226 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
17227 if (r->in.server_unc) {
17228 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17229 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17230 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17231 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));
17233 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
17234 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17235 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
17236 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path, ndr_charset_length(r->in.path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17237 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.pathflags));
17239 if (flags & NDR_OUT) {
17240 if (r->out.pathtype == NULL) {
17241 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17243 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pathtype));
17244 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17246 return NDR_ERR_SUCCESS;
17249 static enum ndr_err_code ndr_pull_srvsvc_NetPathType(struct ndr_pull *ndr, int flags, struct srvsvc_NetPathType *r)
17251 uint32_t _ptr_server_unc;
17252 TALLOC_CTX *_mem_save_server_unc_0;
17253 TALLOC_CTX *_mem_save_pathtype_0;
17254 if (flags & NDR_IN) {
17255 ZERO_STRUCT(r->out);
17257 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
17258 if (_ptr_server_unc) {
17259 NDR_PULL_ALLOC(ndr, r->in.server_unc);
17260 } else {
17261 r->in.server_unc = NULL;
17263 if (r->in.server_unc) {
17264 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
17265 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
17266 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
17267 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
17268 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
17269 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
17271 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
17272 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
17273 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
17275 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path));
17276 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path));
17277 if (ndr_get_array_length(ndr, &r->in.path) > ndr_get_array_size(ndr, &r->in.path)) {
17278 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.path), ndr_get_array_length(ndr, &r->in.path));
17280 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t)));
17281 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t), CH_UTF16));
17282 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.pathflags));
17283 NDR_PULL_ALLOC(ndr, r->out.pathtype);
17284 ZERO_STRUCTP(r->out.pathtype);
17286 if (flags & NDR_OUT) {
17287 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17288 NDR_PULL_ALLOC(ndr, r->out.pathtype);
17290 _mem_save_pathtype_0 = NDR_PULL_GET_MEM_CTX(ndr);
17291 NDR_PULL_SET_MEM_CTX(ndr, r->out.pathtype, LIBNDR_FLAG_REF_ALLOC);
17292 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pathtype));
17293 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pathtype_0, LIBNDR_FLAG_REF_ALLOC);
17294 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17296 return NDR_ERR_SUCCESS;
17299 _PUBLIC_ void ndr_print_srvsvc_NetPathType(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetPathType *r)
17301 ndr_print_struct(ndr, name, "srvsvc_NetPathType");
17302 ndr->depth++;
17303 if (flags & NDR_SET_VALUES) {
17304 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17306 if (flags & NDR_IN) {
17307 ndr_print_struct(ndr, "in", "srvsvc_NetPathType");
17308 ndr->depth++;
17309 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
17310 ndr->depth++;
17311 if (r->in.server_unc) {
17312 ndr_print_string(ndr, "server_unc", r->in.server_unc);
17314 ndr->depth--;
17315 ndr_print_string(ndr, "path", r->in.path);
17316 ndr_print_uint32(ndr, "pathflags", r->in.pathflags);
17317 ndr->depth--;
17319 if (flags & NDR_OUT) {
17320 ndr_print_struct(ndr, "out", "srvsvc_NetPathType");
17321 ndr->depth++;
17322 ndr_print_ptr(ndr, "pathtype", r->out.pathtype);
17323 ndr->depth++;
17324 ndr_print_uint32(ndr, "pathtype", *r->out.pathtype);
17325 ndr->depth--;
17326 ndr_print_WERROR(ndr, "result", r->out.result);
17327 ndr->depth--;
17329 ndr->depth--;
17332 static enum ndr_err_code ndr_push_srvsvc_NetPathCanonicalize(struct ndr_push *ndr, int flags, const struct srvsvc_NetPathCanonicalize *r)
17334 if (flags & NDR_IN) {
17335 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
17336 if (r->in.server_unc) {
17337 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17338 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17339 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17340 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));
17342 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
17343 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17344 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
17345 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path, ndr_charset_length(r->in.path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17346 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.maxbuf));
17347 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.prefix, CH_UTF16)));
17348 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17349 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.prefix, CH_UTF16)));
17350 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.prefix, ndr_charset_length(r->in.prefix, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17351 if (r->in.pathtype == NULL) {
17352 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17354 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.pathtype));
17355 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.pathflags));
17357 if (flags & NDR_OUT) {
17358 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.maxbuf));
17359 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.can_path, r->in.maxbuf));
17360 if (r->out.pathtype == NULL) {
17361 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17363 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pathtype));
17364 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17366 return NDR_ERR_SUCCESS;
17369 static enum ndr_err_code ndr_pull_srvsvc_NetPathCanonicalize(struct ndr_pull *ndr, int flags, struct srvsvc_NetPathCanonicalize *r)
17371 uint32_t _ptr_server_unc;
17372 TALLOC_CTX *_mem_save_server_unc_0;
17373 TALLOC_CTX *_mem_save_pathtype_0;
17374 if (flags & NDR_IN) {
17375 ZERO_STRUCT(r->out);
17377 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
17378 if (_ptr_server_unc) {
17379 NDR_PULL_ALLOC(ndr, r->in.server_unc);
17380 } else {
17381 r->in.server_unc = NULL;
17383 if (r->in.server_unc) {
17384 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
17385 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
17386 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
17387 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
17388 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
17389 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
17391 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
17392 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
17393 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
17395 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path));
17396 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path));
17397 if (ndr_get_array_length(ndr, &r->in.path) > ndr_get_array_size(ndr, &r->in.path)) {
17398 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.path), ndr_get_array_length(ndr, &r->in.path));
17400 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t)));
17401 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t), CH_UTF16));
17402 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.maxbuf));
17403 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.prefix));
17404 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.prefix));
17405 if (ndr_get_array_length(ndr, &r->in.prefix) > ndr_get_array_size(ndr, &r->in.prefix)) {
17406 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.prefix), ndr_get_array_length(ndr, &r->in.prefix));
17408 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.prefix), sizeof(uint16_t)));
17409 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.prefix, ndr_get_array_length(ndr, &r->in.prefix), sizeof(uint16_t), CH_UTF16));
17410 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17411 NDR_PULL_ALLOC(ndr, r->in.pathtype);
17413 _mem_save_pathtype_0 = NDR_PULL_GET_MEM_CTX(ndr);
17414 NDR_PULL_SET_MEM_CTX(ndr, r->in.pathtype, LIBNDR_FLAG_REF_ALLOC);
17415 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.pathtype));
17416 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pathtype_0, LIBNDR_FLAG_REF_ALLOC);
17417 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.pathflags));
17418 NDR_PULL_ALLOC(ndr, r->out.pathtype);
17419 *r->out.pathtype = *r->in.pathtype;
17421 if (flags & NDR_OUT) {
17422 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.can_path));
17423 NDR_PULL_ALLOC_N(ndr, r->out.can_path, ndr_get_array_size(ndr, &r->out.can_path));
17424 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.can_path, ndr_get_array_size(ndr, &r->out.can_path)));
17425 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17426 NDR_PULL_ALLOC(ndr, r->out.pathtype);
17428 _mem_save_pathtype_0 = NDR_PULL_GET_MEM_CTX(ndr);
17429 NDR_PULL_SET_MEM_CTX(ndr, r->out.pathtype, LIBNDR_FLAG_REF_ALLOC);
17430 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pathtype));
17431 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pathtype_0, LIBNDR_FLAG_REF_ALLOC);
17432 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17433 if (r->out.can_path) {
17434 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.can_path, r->in.maxbuf));
17437 return NDR_ERR_SUCCESS;
17440 _PUBLIC_ void ndr_print_srvsvc_NetPathCanonicalize(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetPathCanonicalize *r)
17442 ndr_print_struct(ndr, name, "srvsvc_NetPathCanonicalize");
17443 ndr->depth++;
17444 if (flags & NDR_SET_VALUES) {
17445 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17447 if (flags & NDR_IN) {
17448 ndr_print_struct(ndr, "in", "srvsvc_NetPathCanonicalize");
17449 ndr->depth++;
17450 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
17451 ndr->depth++;
17452 if (r->in.server_unc) {
17453 ndr_print_string(ndr, "server_unc", r->in.server_unc);
17455 ndr->depth--;
17456 ndr_print_string(ndr, "path", r->in.path);
17457 ndr_print_uint32(ndr, "maxbuf", r->in.maxbuf);
17458 ndr_print_string(ndr, "prefix", r->in.prefix);
17459 ndr_print_ptr(ndr, "pathtype", r->in.pathtype);
17460 ndr->depth++;
17461 ndr_print_uint32(ndr, "pathtype", *r->in.pathtype);
17462 ndr->depth--;
17463 ndr_print_uint32(ndr, "pathflags", r->in.pathflags);
17464 ndr->depth--;
17466 if (flags & NDR_OUT) {
17467 ndr_print_struct(ndr, "out", "srvsvc_NetPathCanonicalize");
17468 ndr->depth++;
17469 ndr_print_array_uint8(ndr, "can_path", r->out.can_path, r->in.maxbuf);
17470 ndr_print_ptr(ndr, "pathtype", r->out.pathtype);
17471 ndr->depth++;
17472 ndr_print_uint32(ndr, "pathtype", *r->out.pathtype);
17473 ndr->depth--;
17474 ndr_print_WERROR(ndr, "result", r->out.result);
17475 ndr->depth--;
17477 ndr->depth--;
17480 static enum ndr_err_code ndr_push_srvsvc_NetPathCompare(struct ndr_push *ndr, int flags, const struct srvsvc_NetPathCompare *r)
17482 if (flags & NDR_IN) {
17483 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
17484 if (r->in.server_unc) {
17485 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17486 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17487 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17488 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));
17490 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path1, CH_UTF16)));
17491 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17492 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path1, CH_UTF16)));
17493 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path1, ndr_charset_length(r->in.path1, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17494 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path2, CH_UTF16)));
17495 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17496 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path2, CH_UTF16)));
17497 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path2, ndr_charset_length(r->in.path2, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17498 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.pathtype));
17499 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.pathflags));
17501 if (flags & NDR_OUT) {
17502 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17504 return NDR_ERR_SUCCESS;
17507 static enum ndr_err_code ndr_pull_srvsvc_NetPathCompare(struct ndr_pull *ndr, int flags, struct srvsvc_NetPathCompare *r)
17509 uint32_t _ptr_server_unc;
17510 TALLOC_CTX *_mem_save_server_unc_0;
17511 if (flags & NDR_IN) {
17512 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
17513 if (_ptr_server_unc) {
17514 NDR_PULL_ALLOC(ndr, r->in.server_unc);
17515 } else {
17516 r->in.server_unc = NULL;
17518 if (r->in.server_unc) {
17519 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
17520 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
17521 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
17522 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
17523 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
17524 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
17526 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
17527 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
17528 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
17530 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path1));
17531 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path1));
17532 if (ndr_get_array_length(ndr, &r->in.path1) > ndr_get_array_size(ndr, &r->in.path1)) {
17533 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.path1), ndr_get_array_length(ndr, &r->in.path1));
17535 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.path1), sizeof(uint16_t)));
17536 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path1, ndr_get_array_length(ndr, &r->in.path1), sizeof(uint16_t), CH_UTF16));
17537 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path2));
17538 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path2));
17539 if (ndr_get_array_length(ndr, &r->in.path2) > ndr_get_array_size(ndr, &r->in.path2)) {
17540 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.path2), ndr_get_array_length(ndr, &r->in.path2));
17542 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.path2), sizeof(uint16_t)));
17543 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path2, ndr_get_array_length(ndr, &r->in.path2), sizeof(uint16_t), CH_UTF16));
17544 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.pathtype));
17545 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.pathflags));
17547 if (flags & NDR_OUT) {
17548 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17550 return NDR_ERR_SUCCESS;
17553 _PUBLIC_ void ndr_print_srvsvc_NetPathCompare(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetPathCompare *r)
17555 ndr_print_struct(ndr, name, "srvsvc_NetPathCompare");
17556 ndr->depth++;
17557 if (flags & NDR_SET_VALUES) {
17558 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17560 if (flags & NDR_IN) {
17561 ndr_print_struct(ndr, "in", "srvsvc_NetPathCompare");
17562 ndr->depth++;
17563 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
17564 ndr->depth++;
17565 if (r->in.server_unc) {
17566 ndr_print_string(ndr, "server_unc", r->in.server_unc);
17568 ndr->depth--;
17569 ndr_print_string(ndr, "path1", r->in.path1);
17570 ndr_print_string(ndr, "path2", r->in.path2);
17571 ndr_print_uint32(ndr, "pathtype", r->in.pathtype);
17572 ndr_print_uint32(ndr, "pathflags", r->in.pathflags);
17573 ndr->depth--;
17575 if (flags & NDR_OUT) {
17576 ndr_print_struct(ndr, "out", "srvsvc_NetPathCompare");
17577 ndr->depth++;
17578 ndr_print_WERROR(ndr, "result", r->out.result);
17579 ndr->depth--;
17581 ndr->depth--;
17584 static enum ndr_err_code ndr_push_srvsvc_NetNameValidate(struct ndr_push *ndr, int flags, const struct srvsvc_NetNameValidate *r)
17586 if (flags & NDR_IN) {
17587 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
17588 if (r->in.server_unc) {
17589 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17590 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17591 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17592 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));
17594 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.name, CH_UTF16)));
17595 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17596 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.name, CH_UTF16)));
17597 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.name, ndr_charset_length(r->in.name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17598 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.name_type));
17599 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
17601 if (flags & NDR_OUT) {
17602 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17604 return NDR_ERR_SUCCESS;
17607 static enum ndr_err_code ndr_pull_srvsvc_NetNameValidate(struct ndr_pull *ndr, int flags, struct srvsvc_NetNameValidate *r)
17609 uint32_t _ptr_server_unc;
17610 TALLOC_CTX *_mem_save_server_unc_0;
17611 if (flags & NDR_IN) {
17612 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
17613 if (_ptr_server_unc) {
17614 NDR_PULL_ALLOC(ndr, r->in.server_unc);
17615 } else {
17616 r->in.server_unc = NULL;
17618 if (r->in.server_unc) {
17619 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
17620 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
17621 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
17622 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
17623 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
17624 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
17626 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
17627 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
17628 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
17630 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.name));
17631 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.name));
17632 if (ndr_get_array_length(ndr, &r->in.name) > ndr_get_array_size(ndr, &r->in.name)) {
17633 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.name), ndr_get_array_length(ndr, &r->in.name));
17635 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.name), sizeof(uint16_t)));
17636 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.name, ndr_get_array_length(ndr, &r->in.name), sizeof(uint16_t), CH_UTF16));
17637 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.name_type));
17638 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
17640 if (flags & NDR_OUT) {
17641 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17643 return NDR_ERR_SUCCESS;
17646 _PUBLIC_ void ndr_print_srvsvc_NetNameValidate(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetNameValidate *r)
17648 ndr_print_struct(ndr, name, "srvsvc_NetNameValidate");
17649 ndr->depth++;
17650 if (flags & NDR_SET_VALUES) {
17651 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17653 if (flags & NDR_IN) {
17654 ndr_print_struct(ndr, "in", "srvsvc_NetNameValidate");
17655 ndr->depth++;
17656 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
17657 ndr->depth++;
17658 if (r->in.server_unc) {
17659 ndr_print_string(ndr, "server_unc", r->in.server_unc);
17661 ndr->depth--;
17662 ndr_print_string(ndr, "name", r->in.name);
17663 ndr_print_uint32(ndr, "name_type", r->in.name_type);
17664 ndr_print_uint32(ndr, "flags", r->in.flags);
17665 ndr->depth--;
17667 if (flags & NDR_OUT) {
17668 ndr_print_struct(ndr, "out", "srvsvc_NetNameValidate");
17669 ndr->depth++;
17670 ndr_print_WERROR(ndr, "result", r->out.result);
17671 ndr->depth--;
17673 ndr->depth--;
17676 static enum ndr_err_code ndr_push_srvsvc_NETRPRNAMECANONICALIZE(struct ndr_push *ndr, int flags, const struct srvsvc_NETRPRNAMECANONICALIZE *r)
17678 if (flags & NDR_IN) {
17680 if (flags & NDR_OUT) {
17681 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17683 return NDR_ERR_SUCCESS;
17686 static enum ndr_err_code ndr_pull_srvsvc_NETRPRNAMECANONICALIZE(struct ndr_pull *ndr, int flags, struct srvsvc_NETRPRNAMECANONICALIZE *r)
17688 if (flags & NDR_IN) {
17690 if (flags & NDR_OUT) {
17691 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17693 return NDR_ERR_SUCCESS;
17696 _PUBLIC_ void ndr_print_srvsvc_NETRPRNAMECANONICALIZE(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRPRNAMECANONICALIZE *r)
17698 ndr_print_struct(ndr, name, "srvsvc_NETRPRNAMECANONICALIZE");
17699 ndr->depth++;
17700 if (flags & NDR_SET_VALUES) {
17701 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17703 if (flags & NDR_IN) {
17704 ndr_print_struct(ndr, "in", "srvsvc_NETRPRNAMECANONICALIZE");
17705 ndr->depth++;
17706 ndr->depth--;
17708 if (flags & NDR_OUT) {
17709 ndr_print_struct(ndr, "out", "srvsvc_NETRPRNAMECANONICALIZE");
17710 ndr->depth++;
17711 ndr_print_WERROR(ndr, "result", r->out.result);
17712 ndr->depth--;
17714 ndr->depth--;
17717 static enum ndr_err_code ndr_push_srvsvc_NetPRNameCompare(struct ndr_push *ndr, int flags, const struct srvsvc_NetPRNameCompare *r)
17719 if (flags & NDR_IN) {
17720 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
17721 if (r->in.server_unc) {
17722 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17723 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17724 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17725 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));
17727 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.name1, CH_UTF16)));
17728 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17729 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.name1, CH_UTF16)));
17730 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.name1, ndr_charset_length(r->in.name1, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17731 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.name2, CH_UTF16)));
17732 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17733 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.name2, CH_UTF16)));
17734 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.name2, ndr_charset_length(r->in.name2, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17735 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.name_type));
17736 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
17738 if (flags & NDR_OUT) {
17739 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17741 return NDR_ERR_SUCCESS;
17744 static enum ndr_err_code ndr_pull_srvsvc_NetPRNameCompare(struct ndr_pull *ndr, int flags, struct srvsvc_NetPRNameCompare *r)
17746 uint32_t _ptr_server_unc;
17747 TALLOC_CTX *_mem_save_server_unc_0;
17748 if (flags & NDR_IN) {
17749 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
17750 if (_ptr_server_unc) {
17751 NDR_PULL_ALLOC(ndr, r->in.server_unc);
17752 } else {
17753 r->in.server_unc = NULL;
17755 if (r->in.server_unc) {
17756 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
17757 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
17758 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
17759 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
17760 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
17761 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
17763 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
17764 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
17765 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
17767 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.name1));
17768 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.name1));
17769 if (ndr_get_array_length(ndr, &r->in.name1) > ndr_get_array_size(ndr, &r->in.name1)) {
17770 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.name1), ndr_get_array_length(ndr, &r->in.name1));
17772 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.name1), sizeof(uint16_t)));
17773 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.name1, ndr_get_array_length(ndr, &r->in.name1), sizeof(uint16_t), CH_UTF16));
17774 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.name2));
17775 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.name2));
17776 if (ndr_get_array_length(ndr, &r->in.name2) > ndr_get_array_size(ndr, &r->in.name2)) {
17777 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.name2), ndr_get_array_length(ndr, &r->in.name2));
17779 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.name2), sizeof(uint16_t)));
17780 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.name2, ndr_get_array_length(ndr, &r->in.name2), sizeof(uint16_t), CH_UTF16));
17781 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.name_type));
17782 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
17784 if (flags & NDR_OUT) {
17785 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17787 return NDR_ERR_SUCCESS;
17790 _PUBLIC_ void ndr_print_srvsvc_NetPRNameCompare(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetPRNameCompare *r)
17792 ndr_print_struct(ndr, name, "srvsvc_NetPRNameCompare");
17793 ndr->depth++;
17794 if (flags & NDR_SET_VALUES) {
17795 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17797 if (flags & NDR_IN) {
17798 ndr_print_struct(ndr, "in", "srvsvc_NetPRNameCompare");
17799 ndr->depth++;
17800 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
17801 ndr->depth++;
17802 if (r->in.server_unc) {
17803 ndr_print_string(ndr, "server_unc", r->in.server_unc);
17805 ndr->depth--;
17806 ndr_print_string(ndr, "name1", r->in.name1);
17807 ndr_print_string(ndr, "name2", r->in.name2);
17808 ndr_print_uint32(ndr, "name_type", r->in.name_type);
17809 ndr_print_uint32(ndr, "flags", r->in.flags);
17810 ndr->depth--;
17812 if (flags & NDR_OUT) {
17813 ndr_print_struct(ndr, "out", "srvsvc_NetPRNameCompare");
17814 ndr->depth++;
17815 ndr_print_WERROR(ndr, "result", r->out.result);
17816 ndr->depth--;
17818 ndr->depth--;
17821 static enum ndr_err_code ndr_push_srvsvc_NetShareEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareEnum *r)
17823 if (flags & NDR_IN) {
17824 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
17825 if (r->in.server_unc) {
17826 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17827 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17828 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17829 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));
17831 if (r->in.info_ctr == NULL) {
17832 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17834 NDR_CHECK(ndr_push_srvsvc_NetShareInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
17835 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
17836 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
17837 if (r->in.resume_handle) {
17838 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
17841 if (flags & NDR_OUT) {
17842 if (r->out.info_ctr == NULL) {
17843 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17845 NDR_CHECK(ndr_push_srvsvc_NetShareInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
17846 if (r->out.totalentries == NULL) {
17847 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17849 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
17850 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
17851 if (r->out.resume_handle) {
17852 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
17854 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17856 return NDR_ERR_SUCCESS;
17859 static enum ndr_err_code ndr_pull_srvsvc_NetShareEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareEnum *r)
17861 uint32_t _ptr_server_unc;
17862 uint32_t _ptr_resume_handle;
17863 TALLOC_CTX *_mem_save_server_unc_0;
17864 TALLOC_CTX *_mem_save_info_ctr_0;
17865 TALLOC_CTX *_mem_save_totalentries_0;
17866 TALLOC_CTX *_mem_save_resume_handle_0;
17867 if (flags & NDR_IN) {
17868 ZERO_STRUCT(r->out);
17870 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
17871 if (_ptr_server_unc) {
17872 NDR_PULL_ALLOC(ndr, r->in.server_unc);
17873 } else {
17874 r->in.server_unc = NULL;
17876 if (r->in.server_unc) {
17877 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
17878 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
17879 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
17880 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
17881 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
17882 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
17884 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
17885 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
17886 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
17888 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17889 NDR_PULL_ALLOC(ndr, r->in.info_ctr);
17891 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
17892 NDR_PULL_SET_MEM_CTX(ndr, r->in.info_ctr, LIBNDR_FLAG_REF_ALLOC);
17893 NDR_CHECK(ndr_pull_srvsvc_NetShareInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
17894 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
17895 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
17896 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
17897 if (_ptr_resume_handle) {
17898 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
17899 } else {
17900 r->in.resume_handle = NULL;
17902 if (r->in.resume_handle) {
17903 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
17904 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
17905 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
17906 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
17908 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
17909 *r->out.info_ctr = *r->in.info_ctr;
17910 NDR_PULL_ALLOC(ndr, r->out.totalentries);
17911 ZERO_STRUCTP(r->out.totalentries);
17913 if (flags & NDR_OUT) {
17914 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17915 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
17917 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
17918 NDR_PULL_SET_MEM_CTX(ndr, r->out.info_ctr, LIBNDR_FLAG_REF_ALLOC);
17919 NDR_CHECK(ndr_pull_srvsvc_NetShareInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
17920 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
17921 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17922 NDR_PULL_ALLOC(ndr, r->out.totalentries);
17924 _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
17925 NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
17926 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
17927 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
17928 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
17929 if (_ptr_resume_handle) {
17930 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
17931 } else {
17932 r->out.resume_handle = NULL;
17934 if (r->out.resume_handle) {
17935 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
17936 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
17937 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
17938 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
17940 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17942 return NDR_ERR_SUCCESS;
17945 _PUBLIC_ void ndr_print_srvsvc_NetShareEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareEnum *r)
17947 ndr_print_struct(ndr, name, "srvsvc_NetShareEnum");
17948 ndr->depth++;
17949 if (flags & NDR_SET_VALUES) {
17950 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17952 if (flags & NDR_IN) {
17953 ndr_print_struct(ndr, "in", "srvsvc_NetShareEnum");
17954 ndr->depth++;
17955 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
17956 ndr->depth++;
17957 if (r->in.server_unc) {
17958 ndr_print_string(ndr, "server_unc", r->in.server_unc);
17960 ndr->depth--;
17961 ndr_print_ptr(ndr, "info_ctr", r->in.info_ctr);
17962 ndr->depth++;
17963 ndr_print_srvsvc_NetShareInfoCtr(ndr, "info_ctr", r->in.info_ctr);
17964 ndr->depth--;
17965 ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
17966 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
17967 ndr->depth++;
17968 if (r->in.resume_handle) {
17969 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
17971 ndr->depth--;
17972 ndr->depth--;
17974 if (flags & NDR_OUT) {
17975 ndr_print_struct(ndr, "out", "srvsvc_NetShareEnum");
17976 ndr->depth++;
17977 ndr_print_ptr(ndr, "info_ctr", r->out.info_ctr);
17978 ndr->depth++;
17979 ndr_print_srvsvc_NetShareInfoCtr(ndr, "info_ctr", r->out.info_ctr);
17980 ndr->depth--;
17981 ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
17982 ndr->depth++;
17983 ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
17984 ndr->depth--;
17985 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
17986 ndr->depth++;
17987 if (r->out.resume_handle) {
17988 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
17990 ndr->depth--;
17991 ndr_print_WERROR(ndr, "result", r->out.result);
17992 ndr->depth--;
17994 ndr->depth--;
17997 static enum ndr_err_code ndr_push_srvsvc_NetShareDelStart(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareDelStart *r)
17999 if (flags & NDR_IN) {
18000 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
18001 if (r->in.server_unc) {
18002 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18003 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
18004 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18005 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));
18007 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
18008 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
18009 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
18010 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share, ndr_charset_length(r->in.share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18011 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.reserved));
18013 if (flags & NDR_OUT) {
18014 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.hnd));
18015 if (r->out.hnd) {
18016 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.hnd));
18018 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18020 return NDR_ERR_SUCCESS;
18023 static enum ndr_err_code ndr_pull_srvsvc_NetShareDelStart(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareDelStart *r)
18025 uint32_t _ptr_server_unc;
18026 uint32_t _ptr_hnd;
18027 TALLOC_CTX *_mem_save_server_unc_0;
18028 TALLOC_CTX *_mem_save_hnd_0;
18029 if (flags & NDR_IN) {
18030 ZERO_STRUCT(r->out);
18032 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
18033 if (_ptr_server_unc) {
18034 NDR_PULL_ALLOC(ndr, r->in.server_unc);
18035 } else {
18036 r->in.server_unc = NULL;
18038 if (r->in.server_unc) {
18039 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
18040 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
18041 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
18042 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
18043 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
18044 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
18046 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
18047 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
18048 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
18050 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share));
18051 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share));
18052 if (ndr_get_array_length(ndr, &r->in.share) > ndr_get_array_size(ndr, &r->in.share)) {
18053 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.share), ndr_get_array_length(ndr, &r->in.share));
18055 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t)));
18056 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t), CH_UTF16));
18057 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.reserved));
18059 if (flags & NDR_OUT) {
18060 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_hnd));
18061 if (_ptr_hnd) {
18062 NDR_PULL_ALLOC(ndr, r->out.hnd);
18063 } else {
18064 r->out.hnd = NULL;
18066 if (r->out.hnd) {
18067 _mem_save_hnd_0 = NDR_PULL_GET_MEM_CTX(ndr);
18068 NDR_PULL_SET_MEM_CTX(ndr, r->out.hnd, 0);
18069 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.hnd));
18070 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hnd_0, 0);
18072 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18074 return NDR_ERR_SUCCESS;
18077 _PUBLIC_ void ndr_print_srvsvc_NetShareDelStart(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareDelStart *r)
18079 ndr_print_struct(ndr, name, "srvsvc_NetShareDelStart");
18080 ndr->depth++;
18081 if (flags & NDR_SET_VALUES) {
18082 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18084 if (flags & NDR_IN) {
18085 ndr_print_struct(ndr, "in", "srvsvc_NetShareDelStart");
18086 ndr->depth++;
18087 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
18088 ndr->depth++;
18089 if (r->in.server_unc) {
18090 ndr_print_string(ndr, "server_unc", r->in.server_unc);
18092 ndr->depth--;
18093 ndr_print_string(ndr, "share", r->in.share);
18094 ndr_print_uint32(ndr, "reserved", r->in.reserved);
18095 ndr->depth--;
18097 if (flags & NDR_OUT) {
18098 ndr_print_struct(ndr, "out", "srvsvc_NetShareDelStart");
18099 ndr->depth++;
18100 ndr_print_ptr(ndr, "hnd", r->out.hnd);
18101 ndr->depth++;
18102 if (r->out.hnd) {
18103 ndr_print_policy_handle(ndr, "hnd", r->out.hnd);
18105 ndr->depth--;
18106 ndr_print_WERROR(ndr, "result", r->out.result);
18107 ndr->depth--;
18109 ndr->depth--;
18112 static enum ndr_err_code ndr_push_srvsvc_NetShareDelCommit(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareDelCommit *r)
18114 if (flags & NDR_IN) {
18115 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.hnd));
18116 if (r->in.hnd) {
18117 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.hnd));
18120 if (flags & NDR_OUT) {
18121 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.hnd));
18122 if (r->out.hnd) {
18123 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.hnd));
18125 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18127 return NDR_ERR_SUCCESS;
18130 static enum ndr_err_code ndr_pull_srvsvc_NetShareDelCommit(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareDelCommit *r)
18132 uint32_t _ptr_hnd;
18133 TALLOC_CTX *_mem_save_hnd_0;
18134 if (flags & NDR_IN) {
18135 ZERO_STRUCT(r->out);
18137 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_hnd));
18138 if (_ptr_hnd) {
18139 NDR_PULL_ALLOC(ndr, r->in.hnd);
18140 } else {
18141 r->in.hnd = NULL;
18143 if (r->in.hnd) {
18144 _mem_save_hnd_0 = NDR_PULL_GET_MEM_CTX(ndr);
18145 NDR_PULL_SET_MEM_CTX(ndr, r->in.hnd, 0);
18146 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.hnd));
18147 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hnd_0, 0);
18150 if (flags & NDR_OUT) {
18151 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_hnd));
18152 if (_ptr_hnd) {
18153 NDR_PULL_ALLOC(ndr, r->out.hnd);
18154 } else {
18155 r->out.hnd = NULL;
18157 if (r->out.hnd) {
18158 _mem_save_hnd_0 = NDR_PULL_GET_MEM_CTX(ndr);
18159 NDR_PULL_SET_MEM_CTX(ndr, r->out.hnd, 0);
18160 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.hnd));
18161 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hnd_0, 0);
18163 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18165 return NDR_ERR_SUCCESS;
18168 _PUBLIC_ void ndr_print_srvsvc_NetShareDelCommit(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareDelCommit *r)
18170 ndr_print_struct(ndr, name, "srvsvc_NetShareDelCommit");
18171 ndr->depth++;
18172 if (flags & NDR_SET_VALUES) {
18173 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18175 if (flags & NDR_IN) {
18176 ndr_print_struct(ndr, "in", "srvsvc_NetShareDelCommit");
18177 ndr->depth++;
18178 ndr_print_ptr(ndr, "hnd", r->in.hnd);
18179 ndr->depth++;
18180 if (r->in.hnd) {
18181 ndr_print_policy_handle(ndr, "hnd", r->in.hnd);
18183 ndr->depth--;
18184 ndr->depth--;
18186 if (flags & NDR_OUT) {
18187 ndr_print_struct(ndr, "out", "srvsvc_NetShareDelCommit");
18188 ndr->depth++;
18189 ndr_print_ptr(ndr, "hnd", r->out.hnd);
18190 ndr->depth++;
18191 if (r->out.hnd) {
18192 ndr_print_policy_handle(ndr, "hnd", r->out.hnd);
18194 ndr->depth--;
18195 ndr_print_WERROR(ndr, "result", r->out.result);
18196 ndr->depth--;
18198 ndr->depth--;
18201 static enum ndr_err_code ndr_push_srvsvc_NetGetFileSecurity(struct ndr_push *ndr, int flags, const struct srvsvc_NetGetFileSecurity *r)
18203 if (flags & NDR_IN) {
18204 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
18205 if (r->in.server_unc) {
18206 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18207 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
18208 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18209 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));
18211 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.share));
18212 if (r->in.share) {
18213 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
18214 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
18215 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
18216 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share, ndr_charset_length(r->in.share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18218 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.file, CH_UTF16)));
18219 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
18220 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.file, CH_UTF16)));
18221 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.file, ndr_charset_length(r->in.file, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18222 NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.securityinformation));
18224 if (flags & NDR_OUT) {
18225 if (r->out.sd_buf == NULL) {
18226 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18228 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.sd_buf));
18229 if (*r->out.sd_buf) {
18230 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sd_buf));
18232 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18234 return NDR_ERR_SUCCESS;
18237 static enum ndr_err_code ndr_pull_srvsvc_NetGetFileSecurity(struct ndr_pull *ndr, int flags, struct srvsvc_NetGetFileSecurity *r)
18239 uint32_t _ptr_server_unc;
18240 uint32_t _ptr_share;
18241 uint32_t _ptr_sd_buf;
18242 TALLOC_CTX *_mem_save_server_unc_0;
18243 TALLOC_CTX *_mem_save_share_0;
18244 TALLOC_CTX *_mem_save_sd_buf_0;
18245 TALLOC_CTX *_mem_save_sd_buf_1;
18246 if (flags & NDR_IN) {
18247 ZERO_STRUCT(r->out);
18249 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
18250 if (_ptr_server_unc) {
18251 NDR_PULL_ALLOC(ndr, r->in.server_unc);
18252 } else {
18253 r->in.server_unc = NULL;
18255 if (r->in.server_unc) {
18256 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
18257 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
18258 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
18259 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
18260 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
18261 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
18263 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
18264 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
18265 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
18267 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share));
18268 if (_ptr_share) {
18269 NDR_PULL_ALLOC(ndr, r->in.share);
18270 } else {
18271 r->in.share = NULL;
18273 if (r->in.share) {
18274 _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr);
18275 NDR_PULL_SET_MEM_CTX(ndr, r->in.share, 0);
18276 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share));
18277 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share));
18278 if (ndr_get_array_length(ndr, &r->in.share) > ndr_get_array_size(ndr, &r->in.share)) {
18279 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.share), ndr_get_array_length(ndr, &r->in.share));
18281 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t)));
18282 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t), CH_UTF16));
18283 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0);
18285 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.file));
18286 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.file));
18287 if (ndr_get_array_length(ndr, &r->in.file) > ndr_get_array_size(ndr, &r->in.file)) {
18288 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.file), ndr_get_array_length(ndr, &r->in.file));
18290 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.file), sizeof(uint16_t)));
18291 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.file, ndr_get_array_length(ndr, &r->in.file), sizeof(uint16_t), CH_UTF16));
18292 NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.securityinformation));
18293 NDR_PULL_ALLOC(ndr, r->out.sd_buf);
18294 ZERO_STRUCTP(r->out.sd_buf);
18296 if (flags & NDR_OUT) {
18297 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18298 NDR_PULL_ALLOC(ndr, r->out.sd_buf);
18300 _mem_save_sd_buf_0 = NDR_PULL_GET_MEM_CTX(ndr);
18301 NDR_PULL_SET_MEM_CTX(ndr, r->out.sd_buf, LIBNDR_FLAG_REF_ALLOC);
18302 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sd_buf));
18303 if (_ptr_sd_buf) {
18304 NDR_PULL_ALLOC(ndr, *r->out.sd_buf);
18305 } else {
18306 *r->out.sd_buf = NULL;
18308 if (*r->out.sd_buf) {
18309 _mem_save_sd_buf_1 = NDR_PULL_GET_MEM_CTX(ndr);
18310 NDR_PULL_SET_MEM_CTX(ndr, *r->out.sd_buf, 0);
18311 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sd_buf));
18312 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sd_buf_1, 0);
18314 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sd_buf_0, LIBNDR_FLAG_REF_ALLOC);
18315 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18317 return NDR_ERR_SUCCESS;
18320 _PUBLIC_ void ndr_print_srvsvc_NetGetFileSecurity(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetGetFileSecurity *r)
18322 ndr_print_struct(ndr, name, "srvsvc_NetGetFileSecurity");
18323 ndr->depth++;
18324 if (flags & NDR_SET_VALUES) {
18325 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18327 if (flags & NDR_IN) {
18328 ndr_print_struct(ndr, "in", "srvsvc_NetGetFileSecurity");
18329 ndr->depth++;
18330 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
18331 ndr->depth++;
18332 if (r->in.server_unc) {
18333 ndr_print_string(ndr, "server_unc", r->in.server_unc);
18335 ndr->depth--;
18336 ndr_print_ptr(ndr, "share", r->in.share);
18337 ndr->depth++;
18338 if (r->in.share) {
18339 ndr_print_string(ndr, "share", r->in.share);
18341 ndr->depth--;
18342 ndr_print_string(ndr, "file", r->in.file);
18343 ndr_print_security_secinfo(ndr, "securityinformation", r->in.securityinformation);
18344 ndr->depth--;
18346 if (flags & NDR_OUT) {
18347 ndr_print_struct(ndr, "out", "srvsvc_NetGetFileSecurity");
18348 ndr->depth++;
18349 ndr_print_ptr(ndr, "sd_buf", r->out.sd_buf);
18350 ndr->depth++;
18351 ndr_print_ptr(ndr, "sd_buf", *r->out.sd_buf);
18352 ndr->depth++;
18353 if (*r->out.sd_buf) {
18354 ndr_print_sec_desc_buf(ndr, "sd_buf", *r->out.sd_buf);
18356 ndr->depth--;
18357 ndr->depth--;
18358 ndr_print_WERROR(ndr, "result", r->out.result);
18359 ndr->depth--;
18361 ndr->depth--;
18364 static enum ndr_err_code ndr_push_srvsvc_NetSetFileSecurity(struct ndr_push *ndr, int flags, const struct srvsvc_NetSetFileSecurity *r)
18366 if (flags & NDR_IN) {
18367 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
18368 if (r->in.server_unc) {
18369 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18370 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
18371 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18372 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));
18374 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.share));
18375 if (r->in.share) {
18376 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
18377 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
18378 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
18379 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share, ndr_charset_length(r->in.share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18381 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.file, CH_UTF16)));
18382 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
18383 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.file, CH_UTF16)));
18384 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.file, ndr_charset_length(r->in.file, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18385 NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.securityinformation));
18386 if (r->in.sd_buf == NULL) {
18387 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18389 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sd_buf));
18391 if (flags & NDR_OUT) {
18392 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18394 return NDR_ERR_SUCCESS;
18397 static enum ndr_err_code ndr_pull_srvsvc_NetSetFileSecurity(struct ndr_pull *ndr, int flags, struct srvsvc_NetSetFileSecurity *r)
18399 uint32_t _ptr_server_unc;
18400 uint32_t _ptr_share;
18401 TALLOC_CTX *_mem_save_server_unc_0;
18402 TALLOC_CTX *_mem_save_share_0;
18403 TALLOC_CTX *_mem_save_sd_buf_0;
18404 if (flags & NDR_IN) {
18405 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
18406 if (_ptr_server_unc) {
18407 NDR_PULL_ALLOC(ndr, r->in.server_unc);
18408 } else {
18409 r->in.server_unc = NULL;
18411 if (r->in.server_unc) {
18412 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
18413 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
18414 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
18415 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
18416 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
18417 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
18419 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
18420 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
18421 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
18423 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share));
18424 if (_ptr_share) {
18425 NDR_PULL_ALLOC(ndr, r->in.share);
18426 } else {
18427 r->in.share = NULL;
18429 if (r->in.share) {
18430 _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr);
18431 NDR_PULL_SET_MEM_CTX(ndr, r->in.share, 0);
18432 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share));
18433 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share));
18434 if (ndr_get_array_length(ndr, &r->in.share) > ndr_get_array_size(ndr, &r->in.share)) {
18435 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.share), ndr_get_array_length(ndr, &r->in.share));
18437 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t)));
18438 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t), CH_UTF16));
18439 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0);
18441 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.file));
18442 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.file));
18443 if (ndr_get_array_length(ndr, &r->in.file) > ndr_get_array_size(ndr, &r->in.file)) {
18444 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.file), ndr_get_array_length(ndr, &r->in.file));
18446 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.file), sizeof(uint16_t)));
18447 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.file, ndr_get_array_length(ndr, &r->in.file), sizeof(uint16_t), CH_UTF16));
18448 NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.securityinformation));
18449 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18450 NDR_PULL_ALLOC(ndr, r->in.sd_buf);
18452 _mem_save_sd_buf_0 = NDR_PULL_GET_MEM_CTX(ndr);
18453 NDR_PULL_SET_MEM_CTX(ndr, r->in.sd_buf, LIBNDR_FLAG_REF_ALLOC);
18454 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sd_buf));
18455 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sd_buf_0, LIBNDR_FLAG_REF_ALLOC);
18457 if (flags & NDR_OUT) {
18458 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18460 return NDR_ERR_SUCCESS;
18463 _PUBLIC_ void ndr_print_srvsvc_NetSetFileSecurity(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSetFileSecurity *r)
18465 ndr_print_struct(ndr, name, "srvsvc_NetSetFileSecurity");
18466 ndr->depth++;
18467 if (flags & NDR_SET_VALUES) {
18468 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18470 if (flags & NDR_IN) {
18471 ndr_print_struct(ndr, "in", "srvsvc_NetSetFileSecurity");
18472 ndr->depth++;
18473 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
18474 ndr->depth++;
18475 if (r->in.server_unc) {
18476 ndr_print_string(ndr, "server_unc", r->in.server_unc);
18478 ndr->depth--;
18479 ndr_print_ptr(ndr, "share", r->in.share);
18480 ndr->depth++;
18481 if (r->in.share) {
18482 ndr_print_string(ndr, "share", r->in.share);
18484 ndr->depth--;
18485 ndr_print_string(ndr, "file", r->in.file);
18486 ndr_print_security_secinfo(ndr, "securityinformation", r->in.securityinformation);
18487 ndr_print_ptr(ndr, "sd_buf", r->in.sd_buf);
18488 ndr->depth++;
18489 ndr_print_sec_desc_buf(ndr, "sd_buf", r->in.sd_buf);
18490 ndr->depth--;
18491 ndr->depth--;
18493 if (flags & NDR_OUT) {
18494 ndr_print_struct(ndr, "out", "srvsvc_NetSetFileSecurity");
18495 ndr->depth++;
18496 ndr_print_WERROR(ndr, "result", r->out.result);
18497 ndr->depth--;
18499 ndr->depth--;
18502 static enum ndr_err_code ndr_push_srvsvc_NetServerTransportAddEx(struct ndr_push *ndr, int flags, const struct srvsvc_NetServerTransportAddEx *r)
18504 if (flags & NDR_IN) {
18505 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
18506 if (r->in.server_unc) {
18507 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18508 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
18509 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18510 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));
18512 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
18513 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.info, r->in.level));
18514 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
18516 if (flags & NDR_OUT) {
18517 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18519 return NDR_ERR_SUCCESS;
18522 static enum ndr_err_code ndr_pull_srvsvc_NetServerTransportAddEx(struct ndr_pull *ndr, int flags, struct srvsvc_NetServerTransportAddEx *r)
18524 uint32_t _ptr_server_unc;
18525 TALLOC_CTX *_mem_save_server_unc_0;
18526 if (flags & NDR_IN) {
18527 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
18528 if (_ptr_server_unc) {
18529 NDR_PULL_ALLOC(ndr, r->in.server_unc);
18530 } else {
18531 r->in.server_unc = NULL;
18533 if (r->in.server_unc) {
18534 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
18535 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
18536 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
18537 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
18538 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
18539 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
18541 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
18542 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
18543 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
18545 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
18546 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.info, r->in.level));
18547 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
18549 if (flags & NDR_OUT) {
18550 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18552 return NDR_ERR_SUCCESS;
18555 _PUBLIC_ void ndr_print_srvsvc_NetServerTransportAddEx(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetServerTransportAddEx *r)
18557 ndr_print_struct(ndr, name, "srvsvc_NetServerTransportAddEx");
18558 ndr->depth++;
18559 if (flags & NDR_SET_VALUES) {
18560 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18562 if (flags & NDR_IN) {
18563 ndr_print_struct(ndr, "in", "srvsvc_NetServerTransportAddEx");
18564 ndr->depth++;
18565 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
18566 ndr->depth++;
18567 if (r->in.server_unc) {
18568 ndr_print_string(ndr, "server_unc", r->in.server_unc);
18570 ndr->depth--;
18571 ndr_print_uint32(ndr, "level", r->in.level);
18572 ndr_print_set_switch_value(ndr, &r->in.info, r->in.level);
18573 ndr_print_srvsvc_NetTransportInfo(ndr, "info", &r->in.info);
18574 ndr->depth--;
18576 if (flags & NDR_OUT) {
18577 ndr_print_struct(ndr, "out", "srvsvc_NetServerTransportAddEx");
18578 ndr->depth++;
18579 ndr_print_WERROR(ndr, "result", r->out.result);
18580 ndr->depth--;
18582 ndr->depth--;
18585 static enum ndr_err_code ndr_push_srvsvc_NetServerSetServiceBitsEx(struct ndr_push *ndr, int flags, const struct srvsvc_NetServerSetServiceBitsEx *r)
18587 if (flags & NDR_IN) {
18588 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
18589 if (r->in.server_unc) {
18590 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18591 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
18592 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18593 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));
18595 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.emulated_server_unc));
18596 if (r->in.emulated_server_unc) {
18597 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.emulated_server_unc, CH_UTF16)));
18598 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
18599 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.emulated_server_unc, CH_UTF16)));
18600 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));
18602 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.transport));
18603 if (r->in.transport) {
18604 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.transport, CH_UTF16)));
18605 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
18606 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.transport, CH_UTF16)));
18607 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.transport, ndr_charset_length(r->in.transport, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18609 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.servicebitsofinterest));
18610 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.servicebits));
18611 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.updateimmediately));
18613 if (flags & NDR_OUT) {
18614 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18616 return NDR_ERR_SUCCESS;
18619 static enum ndr_err_code ndr_pull_srvsvc_NetServerSetServiceBitsEx(struct ndr_pull *ndr, int flags, struct srvsvc_NetServerSetServiceBitsEx *r)
18621 uint32_t _ptr_server_unc;
18622 uint32_t _ptr_emulated_server_unc;
18623 uint32_t _ptr_transport;
18624 TALLOC_CTX *_mem_save_server_unc_0;
18625 TALLOC_CTX *_mem_save_emulated_server_unc_0;
18626 TALLOC_CTX *_mem_save_transport_0;
18627 if (flags & NDR_IN) {
18628 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
18629 if (_ptr_server_unc) {
18630 NDR_PULL_ALLOC(ndr, r->in.server_unc);
18631 } else {
18632 r->in.server_unc = NULL;
18634 if (r->in.server_unc) {
18635 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
18636 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
18637 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
18638 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
18639 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
18640 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
18642 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
18643 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
18644 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
18646 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_emulated_server_unc));
18647 if (_ptr_emulated_server_unc) {
18648 NDR_PULL_ALLOC(ndr, r->in.emulated_server_unc);
18649 } else {
18650 r->in.emulated_server_unc = NULL;
18652 if (r->in.emulated_server_unc) {
18653 _mem_save_emulated_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
18654 NDR_PULL_SET_MEM_CTX(ndr, r->in.emulated_server_unc, 0);
18655 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.emulated_server_unc));
18656 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.emulated_server_unc));
18657 if (ndr_get_array_length(ndr, &r->in.emulated_server_unc) > ndr_get_array_size(ndr, &r->in.emulated_server_unc)) {
18658 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.emulated_server_unc), ndr_get_array_length(ndr, &r->in.emulated_server_unc));
18660 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.emulated_server_unc), sizeof(uint16_t)));
18661 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.emulated_server_unc, ndr_get_array_length(ndr, &r->in.emulated_server_unc), sizeof(uint16_t), CH_UTF16));
18662 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_emulated_server_unc_0, 0);
18664 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_transport));
18665 if (_ptr_transport) {
18666 NDR_PULL_ALLOC(ndr, r->in.transport);
18667 } else {
18668 r->in.transport = NULL;
18670 if (r->in.transport) {
18671 _mem_save_transport_0 = NDR_PULL_GET_MEM_CTX(ndr);
18672 NDR_PULL_SET_MEM_CTX(ndr, r->in.transport, 0);
18673 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.transport));
18674 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.transport));
18675 if (ndr_get_array_length(ndr, &r->in.transport) > ndr_get_array_size(ndr, &r->in.transport)) {
18676 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.transport), ndr_get_array_length(ndr, &r->in.transport));
18678 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.transport), sizeof(uint16_t)));
18679 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.transport, ndr_get_array_length(ndr, &r->in.transport), sizeof(uint16_t), CH_UTF16));
18680 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_transport_0, 0);
18682 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.servicebitsofinterest));
18683 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.servicebits));
18684 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.updateimmediately));
18686 if (flags & NDR_OUT) {
18687 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18689 return NDR_ERR_SUCCESS;
18692 _PUBLIC_ void ndr_print_srvsvc_NetServerSetServiceBitsEx(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetServerSetServiceBitsEx *r)
18694 ndr_print_struct(ndr, name, "srvsvc_NetServerSetServiceBitsEx");
18695 ndr->depth++;
18696 if (flags & NDR_SET_VALUES) {
18697 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18699 if (flags & NDR_IN) {
18700 ndr_print_struct(ndr, "in", "srvsvc_NetServerSetServiceBitsEx");
18701 ndr->depth++;
18702 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
18703 ndr->depth++;
18704 if (r->in.server_unc) {
18705 ndr_print_string(ndr, "server_unc", r->in.server_unc);
18707 ndr->depth--;
18708 ndr_print_ptr(ndr, "emulated_server_unc", r->in.emulated_server_unc);
18709 ndr->depth++;
18710 if (r->in.emulated_server_unc) {
18711 ndr_print_string(ndr, "emulated_server_unc", r->in.emulated_server_unc);
18713 ndr->depth--;
18714 ndr_print_ptr(ndr, "transport", r->in.transport);
18715 ndr->depth++;
18716 if (r->in.transport) {
18717 ndr_print_string(ndr, "transport", r->in.transport);
18719 ndr->depth--;
18720 ndr_print_uint32(ndr, "servicebitsofinterest", r->in.servicebitsofinterest);
18721 ndr_print_uint32(ndr, "servicebits", r->in.servicebits);
18722 ndr_print_uint32(ndr, "updateimmediately", r->in.updateimmediately);
18723 ndr->depth--;
18725 if (flags & NDR_OUT) {
18726 ndr_print_struct(ndr, "out", "srvsvc_NetServerSetServiceBitsEx");
18727 ndr->depth++;
18728 ndr_print_WERROR(ndr, "result", r->out.result);
18729 ndr->depth--;
18731 ndr->depth--;
18734 static enum ndr_err_code ndr_push_srvsvc_NETRDFSGETVERSION(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSGETVERSION *r)
18736 if (flags & NDR_IN) {
18738 if (flags & NDR_OUT) {
18739 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18741 return NDR_ERR_SUCCESS;
18744 static enum ndr_err_code ndr_pull_srvsvc_NETRDFSGETVERSION(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSGETVERSION *r)
18746 if (flags & NDR_IN) {
18748 if (flags & NDR_OUT) {
18749 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18751 return NDR_ERR_SUCCESS;
18754 _PUBLIC_ void ndr_print_srvsvc_NETRDFSGETVERSION(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSGETVERSION *r)
18756 ndr_print_struct(ndr, name, "srvsvc_NETRDFSGETVERSION");
18757 ndr->depth++;
18758 if (flags & NDR_SET_VALUES) {
18759 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18761 if (flags & NDR_IN) {
18762 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSGETVERSION");
18763 ndr->depth++;
18764 ndr->depth--;
18766 if (flags & NDR_OUT) {
18767 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSGETVERSION");
18768 ndr->depth++;
18769 ndr_print_WERROR(ndr, "result", r->out.result);
18770 ndr->depth--;
18772 ndr->depth--;
18775 static enum ndr_err_code ndr_push_srvsvc_NETRDFSCREATELOCALPARTITION(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSCREATELOCALPARTITION *r)
18777 if (flags & NDR_IN) {
18779 if (flags & NDR_OUT) {
18780 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18782 return NDR_ERR_SUCCESS;
18785 static enum ndr_err_code ndr_pull_srvsvc_NETRDFSCREATELOCALPARTITION(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSCREATELOCALPARTITION *r)
18787 if (flags & NDR_IN) {
18789 if (flags & NDR_OUT) {
18790 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18792 return NDR_ERR_SUCCESS;
18795 _PUBLIC_ void ndr_print_srvsvc_NETRDFSCREATELOCALPARTITION(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSCREATELOCALPARTITION *r)
18797 ndr_print_struct(ndr, name, "srvsvc_NETRDFSCREATELOCALPARTITION");
18798 ndr->depth++;
18799 if (flags & NDR_SET_VALUES) {
18800 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18802 if (flags & NDR_IN) {
18803 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSCREATELOCALPARTITION");
18804 ndr->depth++;
18805 ndr->depth--;
18807 if (flags & NDR_OUT) {
18808 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSCREATELOCALPARTITION");
18809 ndr->depth++;
18810 ndr_print_WERROR(ndr, "result", r->out.result);
18811 ndr->depth--;
18813 ndr->depth--;
18816 static enum ndr_err_code ndr_push_srvsvc_NETRDFSDELETELOCALPARTITION(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSDELETELOCALPARTITION *r)
18818 if (flags & NDR_IN) {
18820 if (flags & NDR_OUT) {
18821 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18823 return NDR_ERR_SUCCESS;
18826 static enum ndr_err_code ndr_pull_srvsvc_NETRDFSDELETELOCALPARTITION(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSDELETELOCALPARTITION *r)
18828 if (flags & NDR_IN) {
18830 if (flags & NDR_OUT) {
18831 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18833 return NDR_ERR_SUCCESS;
18836 _PUBLIC_ void ndr_print_srvsvc_NETRDFSDELETELOCALPARTITION(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSDELETELOCALPARTITION *r)
18838 ndr_print_struct(ndr, name, "srvsvc_NETRDFSDELETELOCALPARTITION");
18839 ndr->depth++;
18840 if (flags & NDR_SET_VALUES) {
18841 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18843 if (flags & NDR_IN) {
18844 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSDELETELOCALPARTITION");
18845 ndr->depth++;
18846 ndr->depth--;
18848 if (flags & NDR_OUT) {
18849 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSDELETELOCALPARTITION");
18850 ndr->depth++;
18851 ndr_print_WERROR(ndr, "result", r->out.result);
18852 ndr->depth--;
18854 ndr->depth--;
18857 static enum ndr_err_code ndr_push_srvsvc_NETRDFSSETLOCALVOLUMESTATE(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSSETLOCALVOLUMESTATE *r)
18859 if (flags & NDR_IN) {
18861 if (flags & NDR_OUT) {
18862 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18864 return NDR_ERR_SUCCESS;
18867 static enum ndr_err_code ndr_pull_srvsvc_NETRDFSSETLOCALVOLUMESTATE(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSSETLOCALVOLUMESTATE *r)
18869 if (flags & NDR_IN) {
18871 if (flags & NDR_OUT) {
18872 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18874 return NDR_ERR_SUCCESS;
18877 _PUBLIC_ void ndr_print_srvsvc_NETRDFSSETLOCALVOLUMESTATE(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSSETLOCALVOLUMESTATE *r)
18879 ndr_print_struct(ndr, name, "srvsvc_NETRDFSSETLOCALVOLUMESTATE");
18880 ndr->depth++;
18881 if (flags & NDR_SET_VALUES) {
18882 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18884 if (flags & NDR_IN) {
18885 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSSETLOCALVOLUMESTATE");
18886 ndr->depth++;
18887 ndr->depth--;
18889 if (flags & NDR_OUT) {
18890 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSSETLOCALVOLUMESTATE");
18891 ndr->depth++;
18892 ndr_print_WERROR(ndr, "result", r->out.result);
18893 ndr->depth--;
18895 ndr->depth--;
18898 static enum ndr_err_code ndr_push_srvsvc_NETRDFSSETSERVERINFO(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSSETSERVERINFO *r)
18900 if (flags & NDR_IN) {
18902 if (flags & NDR_OUT) {
18903 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18905 return NDR_ERR_SUCCESS;
18908 static enum ndr_err_code ndr_pull_srvsvc_NETRDFSSETSERVERINFO(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSSETSERVERINFO *r)
18910 if (flags & NDR_IN) {
18912 if (flags & NDR_OUT) {
18913 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18915 return NDR_ERR_SUCCESS;
18918 _PUBLIC_ void ndr_print_srvsvc_NETRDFSSETSERVERINFO(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSSETSERVERINFO *r)
18920 ndr_print_struct(ndr, name, "srvsvc_NETRDFSSETSERVERINFO");
18921 ndr->depth++;
18922 if (flags & NDR_SET_VALUES) {
18923 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18925 if (flags & NDR_IN) {
18926 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSSETSERVERINFO");
18927 ndr->depth++;
18928 ndr->depth--;
18930 if (flags & NDR_OUT) {
18931 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSSETSERVERINFO");
18932 ndr->depth++;
18933 ndr_print_WERROR(ndr, "result", r->out.result);
18934 ndr->depth--;
18936 ndr->depth--;
18939 static enum ndr_err_code ndr_push_srvsvc_NETRDFSCREATEEXITPOINT(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSCREATEEXITPOINT *r)
18941 if (flags & NDR_IN) {
18943 if (flags & NDR_OUT) {
18944 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18946 return NDR_ERR_SUCCESS;
18949 static enum ndr_err_code ndr_pull_srvsvc_NETRDFSCREATEEXITPOINT(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSCREATEEXITPOINT *r)
18951 if (flags & NDR_IN) {
18953 if (flags & NDR_OUT) {
18954 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18956 return NDR_ERR_SUCCESS;
18959 _PUBLIC_ void ndr_print_srvsvc_NETRDFSCREATEEXITPOINT(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSCREATEEXITPOINT *r)
18961 ndr_print_struct(ndr, name, "srvsvc_NETRDFSCREATEEXITPOINT");
18962 ndr->depth++;
18963 if (flags & NDR_SET_VALUES) {
18964 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18966 if (flags & NDR_IN) {
18967 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSCREATEEXITPOINT");
18968 ndr->depth++;
18969 ndr->depth--;
18971 if (flags & NDR_OUT) {
18972 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSCREATEEXITPOINT");
18973 ndr->depth++;
18974 ndr_print_WERROR(ndr, "result", r->out.result);
18975 ndr->depth--;
18977 ndr->depth--;
18980 static enum ndr_err_code ndr_push_srvsvc_NETRDFSDELETEEXITPOINT(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSDELETEEXITPOINT *r)
18982 if (flags & NDR_IN) {
18984 if (flags & NDR_OUT) {
18985 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18987 return NDR_ERR_SUCCESS;
18990 static enum ndr_err_code ndr_pull_srvsvc_NETRDFSDELETEEXITPOINT(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSDELETEEXITPOINT *r)
18992 if (flags & NDR_IN) {
18994 if (flags & NDR_OUT) {
18995 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18997 return NDR_ERR_SUCCESS;
19000 _PUBLIC_ void ndr_print_srvsvc_NETRDFSDELETEEXITPOINT(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSDELETEEXITPOINT *r)
19002 ndr_print_struct(ndr, name, "srvsvc_NETRDFSDELETEEXITPOINT");
19003 ndr->depth++;
19004 if (flags & NDR_SET_VALUES) {
19005 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19007 if (flags & NDR_IN) {
19008 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSDELETEEXITPOINT");
19009 ndr->depth++;
19010 ndr->depth--;
19012 if (flags & NDR_OUT) {
19013 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSDELETEEXITPOINT");
19014 ndr->depth++;
19015 ndr_print_WERROR(ndr, "result", r->out.result);
19016 ndr->depth--;
19018 ndr->depth--;
19021 static enum ndr_err_code ndr_push_srvsvc_NETRDFSMODIFYPREFIX(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSMODIFYPREFIX *r)
19023 if (flags & NDR_IN) {
19025 if (flags & NDR_OUT) {
19026 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19028 return NDR_ERR_SUCCESS;
19031 static enum ndr_err_code ndr_pull_srvsvc_NETRDFSMODIFYPREFIX(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSMODIFYPREFIX *r)
19033 if (flags & NDR_IN) {
19035 if (flags & NDR_OUT) {
19036 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19038 return NDR_ERR_SUCCESS;
19041 _PUBLIC_ void ndr_print_srvsvc_NETRDFSMODIFYPREFIX(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSMODIFYPREFIX *r)
19043 ndr_print_struct(ndr, name, "srvsvc_NETRDFSMODIFYPREFIX");
19044 ndr->depth++;
19045 if (flags & NDR_SET_VALUES) {
19046 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19048 if (flags & NDR_IN) {
19049 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSMODIFYPREFIX");
19050 ndr->depth++;
19051 ndr->depth--;
19053 if (flags & NDR_OUT) {
19054 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSMODIFYPREFIX");
19055 ndr->depth++;
19056 ndr_print_WERROR(ndr, "result", r->out.result);
19057 ndr->depth--;
19059 ndr->depth--;
19062 static enum ndr_err_code ndr_push_srvsvc_NETRDFSFIXLOCALVOLUME(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSFIXLOCALVOLUME *r)
19064 if (flags & NDR_IN) {
19066 if (flags & NDR_OUT) {
19067 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19069 return NDR_ERR_SUCCESS;
19072 static enum ndr_err_code ndr_pull_srvsvc_NETRDFSFIXLOCALVOLUME(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSFIXLOCALVOLUME *r)
19074 if (flags & NDR_IN) {
19076 if (flags & NDR_OUT) {
19077 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19079 return NDR_ERR_SUCCESS;
19082 _PUBLIC_ void ndr_print_srvsvc_NETRDFSFIXLOCALVOLUME(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSFIXLOCALVOLUME *r)
19084 ndr_print_struct(ndr, name, "srvsvc_NETRDFSFIXLOCALVOLUME");
19085 ndr->depth++;
19086 if (flags & NDR_SET_VALUES) {
19087 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19089 if (flags & NDR_IN) {
19090 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSFIXLOCALVOLUME");
19091 ndr->depth++;
19092 ndr->depth--;
19094 if (flags & NDR_OUT) {
19095 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSFIXLOCALVOLUME");
19096 ndr->depth++;
19097 ndr_print_WERROR(ndr, "result", r->out.result);
19098 ndr->depth--;
19100 ndr->depth--;
19103 static enum ndr_err_code ndr_push_srvsvc_NETRDFSMANAGERREPORTSITEINFO(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSMANAGERREPORTSITEINFO *r)
19105 if (flags & NDR_IN) {
19107 if (flags & NDR_OUT) {
19108 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19110 return NDR_ERR_SUCCESS;
19113 static enum ndr_err_code ndr_pull_srvsvc_NETRDFSMANAGERREPORTSITEINFO(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSMANAGERREPORTSITEINFO *r)
19115 if (flags & NDR_IN) {
19117 if (flags & NDR_OUT) {
19118 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19120 return NDR_ERR_SUCCESS;
19123 _PUBLIC_ void ndr_print_srvsvc_NETRDFSMANAGERREPORTSITEINFO(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSMANAGERREPORTSITEINFO *r)
19125 ndr_print_struct(ndr, name, "srvsvc_NETRDFSMANAGERREPORTSITEINFO");
19126 ndr->depth++;
19127 if (flags & NDR_SET_VALUES) {
19128 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19130 if (flags & NDR_IN) {
19131 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSMANAGERREPORTSITEINFO");
19132 ndr->depth++;
19133 ndr->depth--;
19135 if (flags & NDR_OUT) {
19136 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSMANAGERREPORTSITEINFO");
19137 ndr->depth++;
19138 ndr_print_WERROR(ndr, "result", r->out.result);
19139 ndr->depth--;
19141 ndr->depth--;
19144 static enum ndr_err_code ndr_push_srvsvc_NETRSERVERTRANSPORTDELEX(struct ndr_push *ndr, int flags, const struct srvsvc_NETRSERVERTRANSPORTDELEX *r)
19146 if (flags & NDR_IN) {
19148 if (flags & NDR_OUT) {
19149 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19151 return NDR_ERR_SUCCESS;
19154 static enum ndr_err_code ndr_pull_srvsvc_NETRSERVERTRANSPORTDELEX(struct ndr_pull *ndr, int flags, struct srvsvc_NETRSERVERTRANSPORTDELEX *r)
19156 if (flags & NDR_IN) {
19158 if (flags & NDR_OUT) {
19159 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19161 return NDR_ERR_SUCCESS;
19164 _PUBLIC_ void ndr_print_srvsvc_NETRSERVERTRANSPORTDELEX(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRSERVERTRANSPORTDELEX *r)
19166 ndr_print_struct(ndr, name, "srvsvc_NETRSERVERTRANSPORTDELEX");
19167 ndr->depth++;
19168 if (flags & NDR_SET_VALUES) {
19169 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19171 if (flags & NDR_IN) {
19172 ndr_print_struct(ndr, "in", "srvsvc_NETRSERVERTRANSPORTDELEX");
19173 ndr->depth++;
19174 ndr->depth--;
19176 if (flags & NDR_OUT) {
19177 ndr_print_struct(ndr, "out", "srvsvc_NETRSERVERTRANSPORTDELEX");
19178 ndr->depth++;
19179 ndr_print_WERROR(ndr, "result", r->out.result);
19180 ndr->depth--;
19182 ndr->depth--;
19185 static const struct ndr_interface_call srvsvc_calls[] = {
19187 "srvsvc_NetCharDevEnum",
19188 sizeof(struct srvsvc_NetCharDevEnum),
19189 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevEnum,
19190 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevEnum,
19191 (ndr_print_function_t) ndr_print_srvsvc_NetCharDevEnum,
19192 false,
19195 "srvsvc_NetCharDevGetInfo",
19196 sizeof(struct srvsvc_NetCharDevGetInfo),
19197 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevGetInfo,
19198 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevGetInfo,
19199 (ndr_print_function_t) ndr_print_srvsvc_NetCharDevGetInfo,
19200 false,
19203 "srvsvc_NetCharDevControl",
19204 sizeof(struct srvsvc_NetCharDevControl),
19205 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevControl,
19206 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevControl,
19207 (ndr_print_function_t) ndr_print_srvsvc_NetCharDevControl,
19208 false,
19211 "srvsvc_NetCharDevQEnum",
19212 sizeof(struct srvsvc_NetCharDevQEnum),
19213 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevQEnum,
19214 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevQEnum,
19215 (ndr_print_function_t) ndr_print_srvsvc_NetCharDevQEnum,
19216 false,
19219 "srvsvc_NetCharDevQGetInfo",
19220 sizeof(struct srvsvc_NetCharDevQGetInfo),
19221 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevQGetInfo,
19222 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevQGetInfo,
19223 (ndr_print_function_t) ndr_print_srvsvc_NetCharDevQGetInfo,
19224 false,
19227 "srvsvc_NetCharDevQSetInfo",
19228 sizeof(struct srvsvc_NetCharDevQSetInfo),
19229 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevQSetInfo,
19230 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevQSetInfo,
19231 (ndr_print_function_t) ndr_print_srvsvc_NetCharDevQSetInfo,
19232 false,
19235 "srvsvc_NetCharDevQPurge",
19236 sizeof(struct srvsvc_NetCharDevQPurge),
19237 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevQPurge,
19238 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevQPurge,
19239 (ndr_print_function_t) ndr_print_srvsvc_NetCharDevQPurge,
19240 false,
19243 "srvsvc_NetCharDevQPurgeSelf",
19244 sizeof(struct srvsvc_NetCharDevQPurgeSelf),
19245 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevQPurgeSelf,
19246 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevQPurgeSelf,
19247 (ndr_print_function_t) ndr_print_srvsvc_NetCharDevQPurgeSelf,
19248 false,
19251 "srvsvc_NetConnEnum",
19252 sizeof(struct srvsvc_NetConnEnum),
19253 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetConnEnum,
19254 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetConnEnum,
19255 (ndr_print_function_t) ndr_print_srvsvc_NetConnEnum,
19256 false,
19259 "srvsvc_NetFileEnum",
19260 sizeof(struct srvsvc_NetFileEnum),
19261 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetFileEnum,
19262 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetFileEnum,
19263 (ndr_print_function_t) ndr_print_srvsvc_NetFileEnum,
19264 false,
19267 "srvsvc_NetFileGetInfo",
19268 sizeof(struct srvsvc_NetFileGetInfo),
19269 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetFileGetInfo,
19270 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetFileGetInfo,
19271 (ndr_print_function_t) ndr_print_srvsvc_NetFileGetInfo,
19272 false,
19275 "srvsvc_NetFileClose",
19276 sizeof(struct srvsvc_NetFileClose),
19277 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetFileClose,
19278 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetFileClose,
19279 (ndr_print_function_t) ndr_print_srvsvc_NetFileClose,
19280 false,
19283 "srvsvc_NetSessEnum",
19284 sizeof(struct srvsvc_NetSessEnum),
19285 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetSessEnum,
19286 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetSessEnum,
19287 (ndr_print_function_t) ndr_print_srvsvc_NetSessEnum,
19288 false,
19291 "srvsvc_NetSessDel",
19292 sizeof(struct srvsvc_NetSessDel),
19293 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetSessDel,
19294 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetSessDel,
19295 (ndr_print_function_t) ndr_print_srvsvc_NetSessDel,
19296 false,
19299 "srvsvc_NetShareAdd",
19300 sizeof(struct srvsvc_NetShareAdd),
19301 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareAdd,
19302 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareAdd,
19303 (ndr_print_function_t) ndr_print_srvsvc_NetShareAdd,
19304 false,
19307 "srvsvc_NetShareEnumAll",
19308 sizeof(struct srvsvc_NetShareEnumAll),
19309 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareEnumAll,
19310 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareEnumAll,
19311 (ndr_print_function_t) ndr_print_srvsvc_NetShareEnumAll,
19312 false,
19315 "srvsvc_NetShareGetInfo",
19316 sizeof(struct srvsvc_NetShareGetInfo),
19317 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareGetInfo,
19318 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareGetInfo,
19319 (ndr_print_function_t) ndr_print_srvsvc_NetShareGetInfo,
19320 false,
19323 "srvsvc_NetShareSetInfo",
19324 sizeof(struct srvsvc_NetShareSetInfo),
19325 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareSetInfo,
19326 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareSetInfo,
19327 (ndr_print_function_t) ndr_print_srvsvc_NetShareSetInfo,
19328 false,
19331 "srvsvc_NetShareDel",
19332 sizeof(struct srvsvc_NetShareDel),
19333 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareDel,
19334 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareDel,
19335 (ndr_print_function_t) ndr_print_srvsvc_NetShareDel,
19336 false,
19339 "srvsvc_NetShareDelSticky",
19340 sizeof(struct srvsvc_NetShareDelSticky),
19341 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareDelSticky,
19342 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareDelSticky,
19343 (ndr_print_function_t) ndr_print_srvsvc_NetShareDelSticky,
19344 false,
19347 "srvsvc_NetShareCheck",
19348 sizeof(struct srvsvc_NetShareCheck),
19349 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareCheck,
19350 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareCheck,
19351 (ndr_print_function_t) ndr_print_srvsvc_NetShareCheck,
19352 false,
19355 "srvsvc_NetSrvGetInfo",
19356 sizeof(struct srvsvc_NetSrvGetInfo),
19357 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetSrvGetInfo,
19358 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetSrvGetInfo,
19359 (ndr_print_function_t) ndr_print_srvsvc_NetSrvGetInfo,
19360 false,
19363 "srvsvc_NetSrvSetInfo",
19364 sizeof(struct srvsvc_NetSrvSetInfo),
19365 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetSrvSetInfo,
19366 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetSrvSetInfo,
19367 (ndr_print_function_t) ndr_print_srvsvc_NetSrvSetInfo,
19368 false,
19371 "srvsvc_NetDiskEnum",
19372 sizeof(struct srvsvc_NetDiskEnum),
19373 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetDiskEnum,
19374 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetDiskEnum,
19375 (ndr_print_function_t) ndr_print_srvsvc_NetDiskEnum,
19376 false,
19379 "srvsvc_NetServerStatisticsGet",
19380 sizeof(struct srvsvc_NetServerStatisticsGet),
19381 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetServerStatisticsGet,
19382 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetServerStatisticsGet,
19383 (ndr_print_function_t) ndr_print_srvsvc_NetServerStatisticsGet,
19384 false,
19387 "srvsvc_NetTransportAdd",
19388 sizeof(struct srvsvc_NetTransportAdd),
19389 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetTransportAdd,
19390 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetTransportAdd,
19391 (ndr_print_function_t) ndr_print_srvsvc_NetTransportAdd,
19392 false,
19395 "srvsvc_NetTransportEnum",
19396 sizeof(struct srvsvc_NetTransportEnum),
19397 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetTransportEnum,
19398 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetTransportEnum,
19399 (ndr_print_function_t) ndr_print_srvsvc_NetTransportEnum,
19400 false,
19403 "srvsvc_NetTransportDel",
19404 sizeof(struct srvsvc_NetTransportDel),
19405 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetTransportDel,
19406 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetTransportDel,
19407 (ndr_print_function_t) ndr_print_srvsvc_NetTransportDel,
19408 false,
19411 "srvsvc_NetRemoteTOD",
19412 sizeof(struct srvsvc_NetRemoteTOD),
19413 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetRemoteTOD,
19414 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetRemoteTOD,
19415 (ndr_print_function_t) ndr_print_srvsvc_NetRemoteTOD,
19416 false,
19419 "srvsvc_NetSetServiceBits",
19420 sizeof(struct srvsvc_NetSetServiceBits),
19421 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetSetServiceBits,
19422 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetSetServiceBits,
19423 (ndr_print_function_t) ndr_print_srvsvc_NetSetServiceBits,
19424 false,
19427 "srvsvc_NetPathType",
19428 sizeof(struct srvsvc_NetPathType),
19429 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetPathType,
19430 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetPathType,
19431 (ndr_print_function_t) ndr_print_srvsvc_NetPathType,
19432 false,
19435 "srvsvc_NetPathCanonicalize",
19436 sizeof(struct srvsvc_NetPathCanonicalize),
19437 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetPathCanonicalize,
19438 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetPathCanonicalize,
19439 (ndr_print_function_t) ndr_print_srvsvc_NetPathCanonicalize,
19440 false,
19443 "srvsvc_NetPathCompare",
19444 sizeof(struct srvsvc_NetPathCompare),
19445 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetPathCompare,
19446 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetPathCompare,
19447 (ndr_print_function_t) ndr_print_srvsvc_NetPathCompare,
19448 false,
19451 "srvsvc_NetNameValidate",
19452 sizeof(struct srvsvc_NetNameValidate),
19453 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetNameValidate,
19454 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetNameValidate,
19455 (ndr_print_function_t) ndr_print_srvsvc_NetNameValidate,
19456 false,
19459 "srvsvc_NETRPRNAMECANONICALIZE",
19460 sizeof(struct srvsvc_NETRPRNAMECANONICALIZE),
19461 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRPRNAMECANONICALIZE,
19462 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRPRNAMECANONICALIZE,
19463 (ndr_print_function_t) ndr_print_srvsvc_NETRPRNAMECANONICALIZE,
19464 false,
19467 "srvsvc_NetPRNameCompare",
19468 sizeof(struct srvsvc_NetPRNameCompare),
19469 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetPRNameCompare,
19470 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetPRNameCompare,
19471 (ndr_print_function_t) ndr_print_srvsvc_NetPRNameCompare,
19472 false,
19475 "srvsvc_NetShareEnum",
19476 sizeof(struct srvsvc_NetShareEnum),
19477 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareEnum,
19478 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareEnum,
19479 (ndr_print_function_t) ndr_print_srvsvc_NetShareEnum,
19480 false,
19483 "srvsvc_NetShareDelStart",
19484 sizeof(struct srvsvc_NetShareDelStart),
19485 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareDelStart,
19486 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareDelStart,
19487 (ndr_print_function_t) ndr_print_srvsvc_NetShareDelStart,
19488 false,
19491 "srvsvc_NetShareDelCommit",
19492 sizeof(struct srvsvc_NetShareDelCommit),
19493 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareDelCommit,
19494 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareDelCommit,
19495 (ndr_print_function_t) ndr_print_srvsvc_NetShareDelCommit,
19496 false,
19499 "srvsvc_NetGetFileSecurity",
19500 sizeof(struct srvsvc_NetGetFileSecurity),
19501 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetGetFileSecurity,
19502 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetGetFileSecurity,
19503 (ndr_print_function_t) ndr_print_srvsvc_NetGetFileSecurity,
19504 false,
19507 "srvsvc_NetSetFileSecurity",
19508 sizeof(struct srvsvc_NetSetFileSecurity),
19509 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetSetFileSecurity,
19510 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetSetFileSecurity,
19511 (ndr_print_function_t) ndr_print_srvsvc_NetSetFileSecurity,
19512 false,
19515 "srvsvc_NetServerTransportAddEx",
19516 sizeof(struct srvsvc_NetServerTransportAddEx),
19517 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetServerTransportAddEx,
19518 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetServerTransportAddEx,
19519 (ndr_print_function_t) ndr_print_srvsvc_NetServerTransportAddEx,
19520 false,
19523 "srvsvc_NetServerSetServiceBitsEx",
19524 sizeof(struct srvsvc_NetServerSetServiceBitsEx),
19525 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetServerSetServiceBitsEx,
19526 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetServerSetServiceBitsEx,
19527 (ndr_print_function_t) ndr_print_srvsvc_NetServerSetServiceBitsEx,
19528 false,
19531 "srvsvc_NETRDFSGETVERSION",
19532 sizeof(struct srvsvc_NETRDFSGETVERSION),
19533 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSGETVERSION,
19534 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSGETVERSION,
19535 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSGETVERSION,
19536 false,
19539 "srvsvc_NETRDFSCREATELOCALPARTITION",
19540 sizeof(struct srvsvc_NETRDFSCREATELOCALPARTITION),
19541 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSCREATELOCALPARTITION,
19542 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSCREATELOCALPARTITION,
19543 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSCREATELOCALPARTITION,
19544 false,
19547 "srvsvc_NETRDFSDELETELOCALPARTITION",
19548 sizeof(struct srvsvc_NETRDFSDELETELOCALPARTITION),
19549 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSDELETELOCALPARTITION,
19550 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSDELETELOCALPARTITION,
19551 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSDELETELOCALPARTITION,
19552 false,
19555 "srvsvc_NETRDFSSETLOCALVOLUMESTATE",
19556 sizeof(struct srvsvc_NETRDFSSETLOCALVOLUMESTATE),
19557 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSSETLOCALVOLUMESTATE,
19558 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSSETLOCALVOLUMESTATE,
19559 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSSETLOCALVOLUMESTATE,
19560 false,
19563 "srvsvc_NETRDFSSETSERVERINFO",
19564 sizeof(struct srvsvc_NETRDFSSETSERVERINFO),
19565 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSSETSERVERINFO,
19566 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSSETSERVERINFO,
19567 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSSETSERVERINFO,
19568 false,
19571 "srvsvc_NETRDFSCREATEEXITPOINT",
19572 sizeof(struct srvsvc_NETRDFSCREATEEXITPOINT),
19573 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSCREATEEXITPOINT,
19574 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSCREATEEXITPOINT,
19575 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSCREATEEXITPOINT,
19576 false,
19579 "srvsvc_NETRDFSDELETEEXITPOINT",
19580 sizeof(struct srvsvc_NETRDFSDELETEEXITPOINT),
19581 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSDELETEEXITPOINT,
19582 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSDELETEEXITPOINT,
19583 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSDELETEEXITPOINT,
19584 false,
19587 "srvsvc_NETRDFSMODIFYPREFIX",
19588 sizeof(struct srvsvc_NETRDFSMODIFYPREFIX),
19589 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSMODIFYPREFIX,
19590 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSMODIFYPREFIX,
19591 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSMODIFYPREFIX,
19592 false,
19595 "srvsvc_NETRDFSFIXLOCALVOLUME",
19596 sizeof(struct srvsvc_NETRDFSFIXLOCALVOLUME),
19597 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSFIXLOCALVOLUME,
19598 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSFIXLOCALVOLUME,
19599 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSFIXLOCALVOLUME,
19600 false,
19603 "srvsvc_NETRDFSMANAGERREPORTSITEINFO",
19604 sizeof(struct srvsvc_NETRDFSMANAGERREPORTSITEINFO),
19605 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSMANAGERREPORTSITEINFO,
19606 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSMANAGERREPORTSITEINFO,
19607 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSMANAGERREPORTSITEINFO,
19608 false,
19611 "srvsvc_NETRSERVERTRANSPORTDELEX",
19612 sizeof(struct srvsvc_NETRSERVERTRANSPORTDELEX),
19613 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRSERVERTRANSPORTDELEX,
19614 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRSERVERTRANSPORTDELEX,
19615 (ndr_print_function_t) ndr_print_srvsvc_NETRSERVERTRANSPORTDELEX,
19616 false,
19618 { NULL, 0, NULL, NULL, NULL, false }
19621 static const char * const srvsvc_endpoint_strings[] = {
19622 "ncacn_np:[\\pipe\\srvsvc]",
19623 "ncacn_ip_tcp:",
19624 "ncalrpc:",
19627 static const struct ndr_interface_string_array srvsvc_endpoints = {
19628 .count = 3,
19629 .names = srvsvc_endpoint_strings
19632 static const char * const srvsvc_authservice_strings[] = {
19633 "host",
19636 static const struct ndr_interface_string_array srvsvc_authservices = {
19637 .count = 1,
19638 .names = srvsvc_authservice_strings
19642 const struct ndr_interface_table ndr_table_srvsvc = {
19643 .name = "srvsvc",
19644 .syntax_id = {
19645 {0x4b324fc8,0x1670,0x01d3,{0x12,0x78},{0x5a,0x47,0xbf,0x6e,0xe1,0x88}},
19646 NDR_SRVSVC_VERSION
19648 .helpstring = NDR_SRVSVC_HELPSTRING,
19649 .num_calls = 54,
19650 .calls = srvsvc_calls,
19651 .endpoints = &srvsvc_endpoints,
19652 .authservices = &srvsvc_authservices