r24541: merge from SAMBA_4_0:
[Samba/nascimento.git] / source3 / librpc / gen_ndr / ndr_srvsvc.c
blob7a67155b976beb8bcc277122adaa53395f9c6164
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 NTSTATUS 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 NT_STATUS_OK;
25 NTSTATUS 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 NT_STATUS_OK;
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 NTSTATUS 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 NT_STATUS_OK;
90 NTSTATUS 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 NT_STATUS_OK;
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", 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 asprintf(&idx_1, "[%d]", cntr_array_1);
144 if (idx_1) {
145 ndr_print_srvsvc_NetCharDevInfo0(ndr, "array", &r->array[cntr_array_1]);
146 free(idx_1);
149 ndr->depth--;
151 ndr->depth--;
152 ndr->depth--;
155 NTSTATUS ndr_push_srvsvc_NetCharDevInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevInfo1 *r)
157 if (ndr_flags & NDR_SCALARS) {
158 NDR_CHECK(ndr_push_align(ndr, 4));
159 NDR_CHECK(ndr_push_unique_ptr(ndr, r->device));
160 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->status));
161 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
162 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
164 if (ndr_flags & NDR_BUFFERS) {
165 if (r->device) {
166 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
167 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
168 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
169 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->device, ndr_charset_length(r->device, CH_UTF16), sizeof(uint16_t), CH_UTF16));
171 if (r->user) {
172 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
173 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
174 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
175 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
178 return NT_STATUS_OK;
181 NTSTATUS ndr_pull_srvsvc_NetCharDevInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevInfo1 *r)
183 uint32_t _ptr_device;
184 TALLOC_CTX *_mem_save_device_0;
185 uint32_t _ptr_user;
186 TALLOC_CTX *_mem_save_user_0;
187 if (ndr_flags & NDR_SCALARS) {
188 NDR_CHECK(ndr_pull_align(ndr, 4));
189 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_device));
190 if (_ptr_device) {
191 NDR_PULL_ALLOC(ndr, r->device);
192 } else {
193 r->device = NULL;
195 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->status));
196 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
197 if (_ptr_user) {
198 NDR_PULL_ALLOC(ndr, r->user);
199 } else {
200 r->user = NULL;
202 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
204 if (ndr_flags & NDR_BUFFERS) {
205 if (r->device) {
206 _mem_save_device_0 = NDR_PULL_GET_MEM_CTX(ndr);
207 NDR_PULL_SET_MEM_CTX(ndr, r->device, 0);
208 NDR_CHECK(ndr_pull_array_size(ndr, &r->device));
209 NDR_CHECK(ndr_pull_array_length(ndr, &r->device));
210 if (ndr_get_array_length(ndr, &r->device) > ndr_get_array_size(ndr, &r->device)) {
211 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));
213 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->device), sizeof(uint16_t)));
214 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->device, ndr_get_array_length(ndr, &r->device), sizeof(uint16_t), CH_UTF16));
215 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_device_0, 0);
217 if (r->user) {
218 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
219 NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
220 NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
221 NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
222 if (ndr_get_array_length(ndr, &r->user) > ndr_get_array_size(ndr, &r->user)) {
223 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));
225 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t)));
226 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t), CH_UTF16));
227 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
230 return NT_STATUS_OK;
233 _PUBLIC_ void ndr_print_srvsvc_NetCharDevInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevInfo1 *r)
235 ndr_print_struct(ndr, name, "srvsvc_NetCharDevInfo1");
236 ndr->depth++;
237 ndr_print_ptr(ndr, "device", r->device);
238 ndr->depth++;
239 if (r->device) {
240 ndr_print_string(ndr, "device", r->device);
242 ndr->depth--;
243 ndr_print_uint32(ndr, "status", r->status);
244 ndr_print_ptr(ndr, "user", r->user);
245 ndr->depth++;
246 if (r->user) {
247 ndr_print_string(ndr, "user", r->user);
249 ndr->depth--;
250 ndr_print_uint32(ndr, "time", r->time);
251 ndr->depth--;
254 NTSTATUS ndr_push_srvsvc_NetCharDevCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevCtr1 *r)
256 uint32_t cntr_array_1;
257 if (ndr_flags & NDR_SCALARS) {
258 NDR_CHECK(ndr_push_align(ndr, 4));
259 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
260 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
262 if (ndr_flags & NDR_BUFFERS) {
263 if (r->array) {
264 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
265 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
266 NDR_CHECK(ndr_push_srvsvc_NetCharDevInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
268 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
269 NDR_CHECK(ndr_push_srvsvc_NetCharDevInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
273 return NT_STATUS_OK;
276 NTSTATUS ndr_pull_srvsvc_NetCharDevCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevCtr1 *r)
278 uint32_t _ptr_array;
279 uint32_t cntr_array_1;
280 TALLOC_CTX *_mem_save_array_0;
281 TALLOC_CTX *_mem_save_array_1;
282 if (ndr_flags & NDR_SCALARS) {
283 NDR_CHECK(ndr_pull_align(ndr, 4));
284 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
285 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
286 if (_ptr_array) {
287 NDR_PULL_ALLOC(ndr, r->array);
288 } else {
289 r->array = NULL;
292 if (ndr_flags & NDR_BUFFERS) {
293 if (r->array) {
294 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
295 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
296 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
297 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
298 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
299 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
300 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
301 NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
303 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
304 NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
306 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
307 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
309 if (r->array) {
310 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
313 return NT_STATUS_OK;
316 _PUBLIC_ void ndr_print_srvsvc_NetCharDevCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevCtr1 *r)
318 uint32_t cntr_array_1;
319 ndr_print_struct(ndr, name, "srvsvc_NetCharDevCtr1");
320 ndr->depth++;
321 ndr_print_uint32(ndr, "count", r->count);
322 ndr_print_ptr(ndr, "array", r->array);
323 ndr->depth++;
324 if (r->array) {
325 ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
326 ndr->depth++;
327 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
328 char *idx_1=NULL;
329 asprintf(&idx_1, "[%d]", cntr_array_1);
330 if (idx_1) {
331 ndr_print_srvsvc_NetCharDevInfo1(ndr, "array", &r->array[cntr_array_1]);
332 free(idx_1);
335 ndr->depth--;
337 ndr->depth--;
338 ndr->depth--;
341 NTSTATUS ndr_push_srvsvc_NetCharDevInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetCharDevInfo *r)
343 if (ndr_flags & NDR_SCALARS) {
344 int level = ndr_push_get_switch_value(ndr, r);
345 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
346 switch (level) {
347 case 0:
348 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
349 break;
351 case 1:
352 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
353 break;
355 default:
356 break;
360 if (ndr_flags & NDR_BUFFERS) {
361 int level = ndr_push_get_switch_value(ndr, r);
362 switch (level) {
363 case 0:
364 if (r->info0) {
365 NDR_CHECK(ndr_push_srvsvc_NetCharDevInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
367 break;
369 case 1:
370 if (r->info1) {
371 NDR_CHECK(ndr_push_srvsvc_NetCharDevInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
373 break;
375 default:
376 break;
380 return NT_STATUS_OK;
383 NTSTATUS ndr_pull_srvsvc_NetCharDevInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetCharDevInfo *r)
385 int level;
386 uint32_t _level;
387 TALLOC_CTX *_mem_save_info0_0;
388 TALLOC_CTX *_mem_save_info1_0;
389 level = ndr_pull_get_switch_value(ndr, r);
390 if (ndr_flags & NDR_SCALARS) {
391 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
392 if (_level != level) {
393 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
395 switch (level) {
396 case 0: {
397 uint32_t _ptr_info0;
398 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
399 if (_ptr_info0) {
400 NDR_PULL_ALLOC(ndr, r->info0);
401 } else {
402 r->info0 = NULL;
404 break; }
406 case 1: {
407 uint32_t _ptr_info1;
408 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
409 if (_ptr_info1) {
410 NDR_PULL_ALLOC(ndr, r->info1);
411 } else {
412 r->info1 = NULL;
414 break; }
416 default: {
417 break; }
421 if (ndr_flags & NDR_BUFFERS) {
422 switch (level) {
423 case 0:
424 if (r->info0) {
425 _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
426 NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
427 NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
428 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
430 break;
432 case 1:
433 if (r->info1) {
434 _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
435 NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
436 NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
437 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
439 break;
441 default:
442 break;
446 return NT_STATUS_OK;
449 _PUBLIC_ void ndr_print_srvsvc_NetCharDevInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetCharDevInfo *r)
451 int level;
452 level = ndr_print_get_switch_value(ndr, r);
453 ndr_print_union(ndr, name, level, "srvsvc_NetCharDevInfo");
454 switch (level) {
455 case 0:
456 ndr_print_ptr(ndr, "info0", r->info0);
457 ndr->depth++;
458 if (r->info0) {
459 ndr_print_srvsvc_NetCharDevInfo0(ndr, "info0", r->info0);
461 ndr->depth--;
462 break;
464 case 1:
465 ndr_print_ptr(ndr, "info1", r->info1);
466 ndr->depth++;
467 if (r->info1) {
468 ndr_print_srvsvc_NetCharDevInfo1(ndr, "info1", r->info1);
470 ndr->depth--;
471 break;
473 default:
474 break;
479 NTSTATUS ndr_push_srvsvc_NetCharDevCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetCharDevCtr *r)
481 if (ndr_flags & NDR_SCALARS) {
482 int level = ndr_push_get_switch_value(ndr, r);
483 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
484 switch (level) {
485 case 0:
486 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0));
487 break;
489 case 1:
490 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
491 break;
493 default:
494 break;
498 if (ndr_flags & NDR_BUFFERS) {
499 int level = ndr_push_get_switch_value(ndr, r);
500 switch (level) {
501 case 0:
502 if (r->ctr0) {
503 NDR_CHECK(ndr_push_srvsvc_NetCharDevCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
505 break;
507 case 1:
508 if (r->ctr1) {
509 NDR_CHECK(ndr_push_srvsvc_NetCharDevCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
511 break;
513 default:
514 break;
518 return NT_STATUS_OK;
521 NTSTATUS ndr_pull_srvsvc_NetCharDevCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetCharDevCtr *r)
523 int level;
524 uint32_t _level;
525 TALLOC_CTX *_mem_save_ctr0_0;
526 TALLOC_CTX *_mem_save_ctr1_0;
527 level = ndr_pull_get_switch_value(ndr, r);
528 if (ndr_flags & NDR_SCALARS) {
529 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
530 if (_level != level) {
531 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
533 switch (level) {
534 case 0: {
535 uint32_t _ptr_ctr0;
536 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr0));
537 if (_ptr_ctr0) {
538 NDR_PULL_ALLOC(ndr, r->ctr0);
539 } else {
540 r->ctr0 = NULL;
542 break; }
544 case 1: {
545 uint32_t _ptr_ctr1;
546 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
547 if (_ptr_ctr1) {
548 NDR_PULL_ALLOC(ndr, r->ctr1);
549 } else {
550 r->ctr1 = NULL;
552 break; }
554 default: {
555 break; }
559 if (ndr_flags & NDR_BUFFERS) {
560 switch (level) {
561 case 0:
562 if (r->ctr0) {
563 _mem_save_ctr0_0 = NDR_PULL_GET_MEM_CTX(ndr);
564 NDR_PULL_SET_MEM_CTX(ndr, r->ctr0, 0);
565 NDR_CHECK(ndr_pull_srvsvc_NetCharDevCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
566 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr0_0, 0);
568 break;
570 case 1:
571 if (r->ctr1) {
572 _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
573 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
574 NDR_CHECK(ndr_pull_srvsvc_NetCharDevCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
575 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
577 break;
579 default:
580 break;
584 return NT_STATUS_OK;
587 _PUBLIC_ void ndr_print_srvsvc_NetCharDevCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetCharDevCtr *r)
589 int level;
590 level = ndr_print_get_switch_value(ndr, r);
591 ndr_print_union(ndr, name, level, "srvsvc_NetCharDevCtr");
592 switch (level) {
593 case 0:
594 ndr_print_ptr(ndr, "ctr0", r->ctr0);
595 ndr->depth++;
596 if (r->ctr0) {
597 ndr_print_srvsvc_NetCharDevCtr0(ndr, "ctr0", r->ctr0);
599 ndr->depth--;
600 break;
602 case 1:
603 ndr_print_ptr(ndr, "ctr1", r->ctr1);
604 ndr->depth++;
605 if (r->ctr1) {
606 ndr_print_srvsvc_NetCharDevCtr1(ndr, "ctr1", r->ctr1);
608 ndr->depth--;
609 break;
611 default:
612 break;
617 NTSTATUS ndr_push_srvsvc_NetCharDevQInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevQInfo0 *r)
619 if (ndr_flags & NDR_SCALARS) {
620 NDR_CHECK(ndr_push_align(ndr, 4));
621 NDR_CHECK(ndr_push_unique_ptr(ndr, r->device));
623 if (ndr_flags & NDR_BUFFERS) {
624 if (r->device) {
625 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
626 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
627 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
628 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->device, ndr_charset_length(r->device, CH_UTF16), sizeof(uint16_t), CH_UTF16));
631 return NT_STATUS_OK;
634 NTSTATUS ndr_pull_srvsvc_NetCharDevQInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevQInfo0 *r)
636 uint32_t _ptr_device;
637 TALLOC_CTX *_mem_save_device_0;
638 if (ndr_flags & NDR_SCALARS) {
639 NDR_CHECK(ndr_pull_align(ndr, 4));
640 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_device));
641 if (_ptr_device) {
642 NDR_PULL_ALLOC(ndr, r->device);
643 } else {
644 r->device = NULL;
647 if (ndr_flags & NDR_BUFFERS) {
648 if (r->device) {
649 _mem_save_device_0 = NDR_PULL_GET_MEM_CTX(ndr);
650 NDR_PULL_SET_MEM_CTX(ndr, r->device, 0);
651 NDR_CHECK(ndr_pull_array_size(ndr, &r->device));
652 NDR_CHECK(ndr_pull_array_length(ndr, &r->device));
653 if (ndr_get_array_length(ndr, &r->device) > ndr_get_array_size(ndr, &r->device)) {
654 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));
656 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->device), sizeof(uint16_t)));
657 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->device, ndr_get_array_length(ndr, &r->device), sizeof(uint16_t), CH_UTF16));
658 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_device_0, 0);
661 return NT_STATUS_OK;
664 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQInfo0 *r)
666 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQInfo0");
667 ndr->depth++;
668 ndr_print_ptr(ndr, "device", r->device);
669 ndr->depth++;
670 if (r->device) {
671 ndr_print_string(ndr, "device", r->device);
673 ndr->depth--;
674 ndr->depth--;
677 NTSTATUS ndr_push_srvsvc_NetCharDevQCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevQCtr0 *r)
679 uint32_t cntr_array_1;
680 if (ndr_flags & NDR_SCALARS) {
681 NDR_CHECK(ndr_push_align(ndr, 4));
682 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
683 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
685 if (ndr_flags & NDR_BUFFERS) {
686 if (r->array) {
687 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
688 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
689 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
691 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
692 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
696 return NT_STATUS_OK;
699 NTSTATUS ndr_pull_srvsvc_NetCharDevQCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevQCtr0 *r)
701 uint32_t _ptr_array;
702 uint32_t cntr_array_1;
703 TALLOC_CTX *_mem_save_array_0;
704 TALLOC_CTX *_mem_save_array_1;
705 if (ndr_flags & NDR_SCALARS) {
706 NDR_CHECK(ndr_pull_align(ndr, 4));
707 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
708 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
709 if (_ptr_array) {
710 NDR_PULL_ALLOC(ndr, r->array);
711 } else {
712 r->array = NULL;
715 if (ndr_flags & NDR_BUFFERS) {
716 if (r->array) {
717 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
718 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
719 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
720 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
721 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
722 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
723 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
724 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
726 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
727 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
729 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
730 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
732 if (r->array) {
733 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
736 return NT_STATUS_OK;
739 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQCtr0 *r)
741 uint32_t cntr_array_1;
742 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQCtr0");
743 ndr->depth++;
744 ndr_print_uint32(ndr, "count", r->count);
745 ndr_print_ptr(ndr, "array", r->array);
746 ndr->depth++;
747 if (r->array) {
748 ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
749 ndr->depth++;
750 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
751 char *idx_1=NULL;
752 asprintf(&idx_1, "[%d]", cntr_array_1);
753 if (idx_1) {
754 ndr_print_srvsvc_NetCharDevQInfo0(ndr, "array", &r->array[cntr_array_1]);
755 free(idx_1);
758 ndr->depth--;
760 ndr->depth--;
761 ndr->depth--;
764 NTSTATUS ndr_push_srvsvc_NetCharDevQInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevQInfo1 *r)
766 if (ndr_flags & NDR_SCALARS) {
767 NDR_CHECK(ndr_push_align(ndr, 4));
768 NDR_CHECK(ndr_push_unique_ptr(ndr, r->device));
769 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->priority));
770 NDR_CHECK(ndr_push_unique_ptr(ndr, r->devices));
771 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->users));
772 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_ahead));
774 if (ndr_flags & NDR_BUFFERS) {
775 if (r->device) {
776 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
777 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
778 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
779 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->device, ndr_charset_length(r->device, CH_UTF16), sizeof(uint16_t), CH_UTF16));
781 if (r->devices) {
782 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->devices, CH_UTF16)));
783 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
784 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->devices, CH_UTF16)));
785 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->devices, ndr_charset_length(r->devices, CH_UTF16), sizeof(uint16_t), CH_UTF16));
788 return NT_STATUS_OK;
791 NTSTATUS ndr_pull_srvsvc_NetCharDevQInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevQInfo1 *r)
793 uint32_t _ptr_device;
794 TALLOC_CTX *_mem_save_device_0;
795 uint32_t _ptr_devices;
796 TALLOC_CTX *_mem_save_devices_0;
797 if (ndr_flags & NDR_SCALARS) {
798 NDR_CHECK(ndr_pull_align(ndr, 4));
799 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_device));
800 if (_ptr_device) {
801 NDR_PULL_ALLOC(ndr, r->device);
802 } else {
803 r->device = NULL;
805 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->priority));
806 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_devices));
807 if (_ptr_devices) {
808 NDR_PULL_ALLOC(ndr, r->devices);
809 } else {
810 r->devices = NULL;
812 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->users));
813 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_ahead));
815 if (ndr_flags & NDR_BUFFERS) {
816 if (r->device) {
817 _mem_save_device_0 = NDR_PULL_GET_MEM_CTX(ndr);
818 NDR_PULL_SET_MEM_CTX(ndr, r->device, 0);
819 NDR_CHECK(ndr_pull_array_size(ndr, &r->device));
820 NDR_CHECK(ndr_pull_array_length(ndr, &r->device));
821 if (ndr_get_array_length(ndr, &r->device) > ndr_get_array_size(ndr, &r->device)) {
822 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));
824 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->device), sizeof(uint16_t)));
825 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->device, ndr_get_array_length(ndr, &r->device), sizeof(uint16_t), CH_UTF16));
826 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_device_0, 0);
828 if (r->devices) {
829 _mem_save_devices_0 = NDR_PULL_GET_MEM_CTX(ndr);
830 NDR_PULL_SET_MEM_CTX(ndr, r->devices, 0);
831 NDR_CHECK(ndr_pull_array_size(ndr, &r->devices));
832 NDR_CHECK(ndr_pull_array_length(ndr, &r->devices));
833 if (ndr_get_array_length(ndr, &r->devices) > ndr_get_array_size(ndr, &r->devices)) {
834 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));
836 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->devices), sizeof(uint16_t)));
837 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->devices, ndr_get_array_length(ndr, &r->devices), sizeof(uint16_t), CH_UTF16));
838 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_devices_0, 0);
841 return NT_STATUS_OK;
844 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQInfo1 *r)
846 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQInfo1");
847 ndr->depth++;
848 ndr_print_ptr(ndr, "device", r->device);
849 ndr->depth++;
850 if (r->device) {
851 ndr_print_string(ndr, "device", r->device);
853 ndr->depth--;
854 ndr_print_uint32(ndr, "priority", r->priority);
855 ndr_print_ptr(ndr, "devices", r->devices);
856 ndr->depth++;
857 if (r->devices) {
858 ndr_print_string(ndr, "devices", r->devices);
860 ndr->depth--;
861 ndr_print_uint32(ndr, "users", r->users);
862 ndr_print_uint32(ndr, "num_ahead", r->num_ahead);
863 ndr->depth--;
866 NTSTATUS ndr_push_srvsvc_NetCharDevQCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevQCtr1 *r)
868 uint32_t cntr_array_1;
869 if (ndr_flags & NDR_SCALARS) {
870 NDR_CHECK(ndr_push_align(ndr, 4));
871 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
872 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
874 if (ndr_flags & NDR_BUFFERS) {
875 if (r->array) {
876 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
877 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
878 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
880 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
881 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
885 return NT_STATUS_OK;
888 NTSTATUS ndr_pull_srvsvc_NetCharDevQCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevQCtr1 *r)
890 uint32_t _ptr_array;
891 uint32_t cntr_array_1;
892 TALLOC_CTX *_mem_save_array_0;
893 TALLOC_CTX *_mem_save_array_1;
894 if (ndr_flags & NDR_SCALARS) {
895 NDR_CHECK(ndr_pull_align(ndr, 4));
896 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
897 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
898 if (_ptr_array) {
899 NDR_PULL_ALLOC(ndr, r->array);
900 } else {
901 r->array = NULL;
904 if (ndr_flags & NDR_BUFFERS) {
905 if (r->array) {
906 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
907 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
908 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
909 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
910 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
911 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
912 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
913 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
915 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
916 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
918 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
919 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
921 if (r->array) {
922 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
925 return NT_STATUS_OK;
928 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQCtr1 *r)
930 uint32_t cntr_array_1;
931 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQCtr1");
932 ndr->depth++;
933 ndr_print_uint32(ndr, "count", r->count);
934 ndr_print_ptr(ndr, "array", r->array);
935 ndr->depth++;
936 if (r->array) {
937 ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
938 ndr->depth++;
939 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
940 char *idx_1=NULL;
941 asprintf(&idx_1, "[%d]", cntr_array_1);
942 if (idx_1) {
943 ndr_print_srvsvc_NetCharDevQInfo1(ndr, "array", &r->array[cntr_array_1]);
944 free(idx_1);
947 ndr->depth--;
949 ndr->depth--;
950 ndr->depth--;
953 NTSTATUS ndr_push_srvsvc_NetCharDevQInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetCharDevQInfo *r)
955 if (ndr_flags & NDR_SCALARS) {
956 int level = ndr_push_get_switch_value(ndr, r);
957 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
958 switch (level) {
959 case 0:
960 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
961 break;
963 case 1:
964 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
965 break;
967 default:
968 break;
972 if (ndr_flags & NDR_BUFFERS) {
973 int level = ndr_push_get_switch_value(ndr, r);
974 switch (level) {
975 case 0:
976 if (r->info0) {
977 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
979 break;
981 case 1:
982 if (r->info1) {
983 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
985 break;
987 default:
988 break;
992 return NT_STATUS_OK;
995 NTSTATUS ndr_pull_srvsvc_NetCharDevQInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetCharDevQInfo *r)
997 int level;
998 uint32_t _level;
999 TALLOC_CTX *_mem_save_info0_0;
1000 TALLOC_CTX *_mem_save_info1_0;
1001 level = ndr_pull_get_switch_value(ndr, r);
1002 if (ndr_flags & NDR_SCALARS) {
1003 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
1004 if (_level != level) {
1005 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
1007 switch (level) {
1008 case 0: {
1009 uint32_t _ptr_info0;
1010 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
1011 if (_ptr_info0) {
1012 NDR_PULL_ALLOC(ndr, r->info0);
1013 } else {
1014 r->info0 = NULL;
1016 break; }
1018 case 1: {
1019 uint32_t _ptr_info1;
1020 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
1021 if (_ptr_info1) {
1022 NDR_PULL_ALLOC(ndr, r->info1);
1023 } else {
1024 r->info1 = NULL;
1026 break; }
1028 default: {
1029 break; }
1033 if (ndr_flags & NDR_BUFFERS) {
1034 switch (level) {
1035 case 0:
1036 if (r->info0) {
1037 _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
1038 NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
1039 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
1040 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
1042 break;
1044 case 1:
1045 if (r->info1) {
1046 _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
1047 NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
1048 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
1049 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
1051 break;
1053 default:
1054 break;
1058 return NT_STATUS_OK;
1061 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetCharDevQInfo *r)
1063 int level;
1064 level = ndr_print_get_switch_value(ndr, r);
1065 ndr_print_union(ndr, name, level, "srvsvc_NetCharDevQInfo");
1066 switch (level) {
1067 case 0:
1068 ndr_print_ptr(ndr, "info0", r->info0);
1069 ndr->depth++;
1070 if (r->info0) {
1071 ndr_print_srvsvc_NetCharDevQInfo0(ndr, "info0", r->info0);
1073 ndr->depth--;
1074 break;
1076 case 1:
1077 ndr_print_ptr(ndr, "info1", r->info1);
1078 ndr->depth++;
1079 if (r->info1) {
1080 ndr_print_srvsvc_NetCharDevQInfo1(ndr, "info1", r->info1);
1082 ndr->depth--;
1083 break;
1085 default:
1086 break;
1091 NTSTATUS ndr_push_srvsvc_NetCharDevQCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetCharDevQCtr *r)
1093 if (ndr_flags & NDR_SCALARS) {
1094 int level = ndr_push_get_switch_value(ndr, r);
1095 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
1096 switch (level) {
1097 case 0:
1098 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0));
1099 break;
1101 case 1:
1102 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
1103 break;
1105 default:
1106 break;
1110 if (ndr_flags & NDR_BUFFERS) {
1111 int level = ndr_push_get_switch_value(ndr, r);
1112 switch (level) {
1113 case 0:
1114 if (r->ctr0) {
1115 NDR_CHECK(ndr_push_srvsvc_NetCharDevQCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
1117 break;
1119 case 1:
1120 if (r->ctr1) {
1121 NDR_CHECK(ndr_push_srvsvc_NetCharDevQCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
1123 break;
1125 default:
1126 break;
1130 return NT_STATUS_OK;
1133 NTSTATUS ndr_pull_srvsvc_NetCharDevQCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetCharDevQCtr *r)
1135 int level;
1136 uint32_t _level;
1137 TALLOC_CTX *_mem_save_ctr0_0;
1138 TALLOC_CTX *_mem_save_ctr1_0;
1139 level = ndr_pull_get_switch_value(ndr, r);
1140 if (ndr_flags & NDR_SCALARS) {
1141 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
1142 if (_level != level) {
1143 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
1145 switch (level) {
1146 case 0: {
1147 uint32_t _ptr_ctr0;
1148 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr0));
1149 if (_ptr_ctr0) {
1150 NDR_PULL_ALLOC(ndr, r->ctr0);
1151 } else {
1152 r->ctr0 = NULL;
1154 break; }
1156 case 1: {
1157 uint32_t _ptr_ctr1;
1158 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
1159 if (_ptr_ctr1) {
1160 NDR_PULL_ALLOC(ndr, r->ctr1);
1161 } else {
1162 r->ctr1 = NULL;
1164 break; }
1166 default: {
1167 break; }
1171 if (ndr_flags & NDR_BUFFERS) {
1172 switch (level) {
1173 case 0:
1174 if (r->ctr0) {
1175 _mem_save_ctr0_0 = NDR_PULL_GET_MEM_CTX(ndr);
1176 NDR_PULL_SET_MEM_CTX(ndr, r->ctr0, 0);
1177 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
1178 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr0_0, 0);
1180 break;
1182 case 1:
1183 if (r->ctr1) {
1184 _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
1185 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
1186 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
1187 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
1189 break;
1191 default:
1192 break;
1196 return NT_STATUS_OK;
1199 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetCharDevQCtr *r)
1201 int level;
1202 level = ndr_print_get_switch_value(ndr, r);
1203 ndr_print_union(ndr, name, level, "srvsvc_NetCharDevQCtr");
1204 switch (level) {
1205 case 0:
1206 ndr_print_ptr(ndr, "ctr0", r->ctr0);
1207 ndr->depth++;
1208 if (r->ctr0) {
1209 ndr_print_srvsvc_NetCharDevQCtr0(ndr, "ctr0", r->ctr0);
1211 ndr->depth--;
1212 break;
1214 case 1:
1215 ndr_print_ptr(ndr, "ctr1", r->ctr1);
1216 ndr->depth++;
1217 if (r->ctr1) {
1218 ndr_print_srvsvc_NetCharDevQCtr1(ndr, "ctr1", r->ctr1);
1220 ndr->depth--;
1221 break;
1223 default:
1224 break;
1229 NTSTATUS ndr_push_srvsvc_NetConnInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetConnInfo0 *r)
1231 if (ndr_flags & NDR_SCALARS) {
1232 NDR_CHECK(ndr_push_align(ndr, 4));
1233 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->conn_id));
1235 if (ndr_flags & NDR_BUFFERS) {
1237 return NT_STATUS_OK;
1240 NTSTATUS ndr_pull_srvsvc_NetConnInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnInfo0 *r)
1242 if (ndr_flags & NDR_SCALARS) {
1243 NDR_CHECK(ndr_pull_align(ndr, 4));
1244 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->conn_id));
1246 if (ndr_flags & NDR_BUFFERS) {
1248 return NT_STATUS_OK;
1251 _PUBLIC_ void ndr_print_srvsvc_NetConnInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnInfo0 *r)
1253 ndr_print_struct(ndr, name, "srvsvc_NetConnInfo0");
1254 ndr->depth++;
1255 ndr_print_uint32(ndr, "conn_id", r->conn_id);
1256 ndr->depth--;
1259 NTSTATUS ndr_push_srvsvc_NetConnCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetConnCtr0 *r)
1261 uint32_t cntr_array_1;
1262 if (ndr_flags & NDR_SCALARS) {
1263 NDR_CHECK(ndr_push_align(ndr, 4));
1264 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1265 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
1267 if (ndr_flags & NDR_BUFFERS) {
1268 if (r->array) {
1269 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1270 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
1271 NDR_CHECK(ndr_push_srvsvc_NetConnInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
1275 return NT_STATUS_OK;
1278 NTSTATUS ndr_pull_srvsvc_NetConnCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnCtr0 *r)
1280 uint32_t _ptr_array;
1281 uint32_t cntr_array_1;
1282 TALLOC_CTX *_mem_save_array_0;
1283 TALLOC_CTX *_mem_save_array_1;
1284 if (ndr_flags & NDR_SCALARS) {
1285 NDR_CHECK(ndr_pull_align(ndr, 4));
1286 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
1287 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
1288 if (_ptr_array) {
1289 NDR_PULL_ALLOC(ndr, r->array);
1290 } else {
1291 r->array = NULL;
1294 if (ndr_flags & NDR_BUFFERS) {
1295 if (r->array) {
1296 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
1297 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
1298 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
1299 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
1300 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
1301 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
1302 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
1303 NDR_CHECK(ndr_pull_srvsvc_NetConnInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
1305 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
1306 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
1308 if (r->array) {
1309 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
1312 return NT_STATUS_OK;
1315 _PUBLIC_ void ndr_print_srvsvc_NetConnCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnCtr0 *r)
1317 uint32_t cntr_array_1;
1318 ndr_print_struct(ndr, name, "srvsvc_NetConnCtr0");
1319 ndr->depth++;
1320 ndr_print_uint32(ndr, "count", r->count);
1321 ndr_print_ptr(ndr, "array", r->array);
1322 ndr->depth++;
1323 if (r->array) {
1324 ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
1325 ndr->depth++;
1326 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
1327 char *idx_1=NULL;
1328 asprintf(&idx_1, "[%d]", cntr_array_1);
1329 if (idx_1) {
1330 ndr_print_srvsvc_NetConnInfo0(ndr, "array", &r->array[cntr_array_1]);
1331 free(idx_1);
1334 ndr->depth--;
1336 ndr->depth--;
1337 ndr->depth--;
1340 NTSTATUS ndr_push_srvsvc_NetConnInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetConnInfo1 *r)
1342 if (ndr_flags & NDR_SCALARS) {
1343 NDR_CHECK(ndr_push_align(ndr, 4));
1344 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->conn_id));
1345 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->conn_type));
1346 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_open));
1347 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_users));
1348 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->conn_time));
1349 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
1350 NDR_CHECK(ndr_push_unique_ptr(ndr, r->share));
1352 if (ndr_flags & NDR_BUFFERS) {
1353 if (r->user) {
1354 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
1355 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1356 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
1357 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1359 if (r->share) {
1360 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->share, CH_UTF16)));
1361 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1362 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->share, CH_UTF16)));
1363 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->share, ndr_charset_length(r->share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1366 return NT_STATUS_OK;
1369 NTSTATUS ndr_pull_srvsvc_NetConnInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnInfo1 *r)
1371 uint32_t _ptr_user;
1372 TALLOC_CTX *_mem_save_user_0;
1373 uint32_t _ptr_share;
1374 TALLOC_CTX *_mem_save_share_0;
1375 if (ndr_flags & NDR_SCALARS) {
1376 NDR_CHECK(ndr_pull_align(ndr, 4));
1377 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->conn_id));
1378 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->conn_type));
1379 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_open));
1380 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_users));
1381 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->conn_time));
1382 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
1383 if (_ptr_user) {
1384 NDR_PULL_ALLOC(ndr, r->user);
1385 } else {
1386 r->user = NULL;
1388 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share));
1389 if (_ptr_share) {
1390 NDR_PULL_ALLOC(ndr, r->share);
1391 } else {
1392 r->share = NULL;
1395 if (ndr_flags & NDR_BUFFERS) {
1396 if (r->user) {
1397 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
1398 NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
1399 NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
1400 NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
1401 if (ndr_get_array_length(ndr, &r->user) > ndr_get_array_size(ndr, &r->user)) {
1402 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));
1404 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t)));
1405 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t), CH_UTF16));
1406 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
1408 if (r->share) {
1409 _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr);
1410 NDR_PULL_SET_MEM_CTX(ndr, r->share, 0);
1411 NDR_CHECK(ndr_pull_array_size(ndr, &r->share));
1412 NDR_CHECK(ndr_pull_array_length(ndr, &r->share));
1413 if (ndr_get_array_length(ndr, &r->share) > ndr_get_array_size(ndr, &r->share)) {
1414 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));
1416 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->share), sizeof(uint16_t)));
1417 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->share, ndr_get_array_length(ndr, &r->share), sizeof(uint16_t), CH_UTF16));
1418 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0);
1421 return NT_STATUS_OK;
1424 _PUBLIC_ void ndr_print_srvsvc_NetConnInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnInfo1 *r)
1426 ndr_print_struct(ndr, name, "srvsvc_NetConnInfo1");
1427 ndr->depth++;
1428 ndr_print_uint32(ndr, "conn_id", r->conn_id);
1429 ndr_print_uint32(ndr, "conn_type", r->conn_type);
1430 ndr_print_uint32(ndr, "num_open", r->num_open);
1431 ndr_print_uint32(ndr, "num_users", r->num_users);
1432 ndr_print_uint32(ndr, "conn_time", r->conn_time);
1433 ndr_print_ptr(ndr, "user", r->user);
1434 ndr->depth++;
1435 if (r->user) {
1436 ndr_print_string(ndr, "user", r->user);
1438 ndr->depth--;
1439 ndr_print_ptr(ndr, "share", r->share);
1440 ndr->depth++;
1441 if (r->share) {
1442 ndr_print_string(ndr, "share", r->share);
1444 ndr->depth--;
1445 ndr->depth--;
1448 NTSTATUS ndr_push_srvsvc_NetConnCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetConnCtr1 *r)
1450 uint32_t cntr_array_1;
1451 if (ndr_flags & NDR_SCALARS) {
1452 NDR_CHECK(ndr_push_align(ndr, 4));
1453 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1454 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
1456 if (ndr_flags & NDR_BUFFERS) {
1457 if (r->array) {
1458 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1459 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
1460 NDR_CHECK(ndr_push_srvsvc_NetConnInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
1462 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
1463 NDR_CHECK(ndr_push_srvsvc_NetConnInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
1467 return NT_STATUS_OK;
1470 NTSTATUS ndr_pull_srvsvc_NetConnCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnCtr1 *r)
1472 uint32_t _ptr_array;
1473 uint32_t cntr_array_1;
1474 TALLOC_CTX *_mem_save_array_0;
1475 TALLOC_CTX *_mem_save_array_1;
1476 if (ndr_flags & NDR_SCALARS) {
1477 NDR_CHECK(ndr_pull_align(ndr, 4));
1478 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
1479 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
1480 if (_ptr_array) {
1481 NDR_PULL_ALLOC(ndr, r->array);
1482 } else {
1483 r->array = NULL;
1486 if (ndr_flags & NDR_BUFFERS) {
1487 if (r->array) {
1488 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
1489 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
1490 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
1491 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
1492 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
1493 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
1494 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
1495 NDR_CHECK(ndr_pull_srvsvc_NetConnInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
1497 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
1498 NDR_CHECK(ndr_pull_srvsvc_NetConnInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
1500 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
1501 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
1503 if (r->array) {
1504 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
1507 return NT_STATUS_OK;
1510 _PUBLIC_ void ndr_print_srvsvc_NetConnCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnCtr1 *r)
1512 uint32_t cntr_array_1;
1513 ndr_print_struct(ndr, name, "srvsvc_NetConnCtr1");
1514 ndr->depth++;
1515 ndr_print_uint32(ndr, "count", r->count);
1516 ndr_print_ptr(ndr, "array", r->array);
1517 ndr->depth++;
1518 if (r->array) {
1519 ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
1520 ndr->depth++;
1521 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
1522 char *idx_1=NULL;
1523 asprintf(&idx_1, "[%d]", cntr_array_1);
1524 if (idx_1) {
1525 ndr_print_srvsvc_NetConnInfo1(ndr, "array", &r->array[cntr_array_1]);
1526 free(idx_1);
1529 ndr->depth--;
1531 ndr->depth--;
1532 ndr->depth--;
1535 NTSTATUS ndr_push_srvsvc_NetConnCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetConnCtr *r)
1537 if (ndr_flags & NDR_SCALARS) {
1538 int level = ndr_push_get_switch_value(ndr, r);
1539 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
1540 switch (level) {
1541 case 0:
1542 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0));
1543 break;
1545 case 1:
1546 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
1547 break;
1549 default:
1550 break;
1554 if (ndr_flags & NDR_BUFFERS) {
1555 int level = ndr_push_get_switch_value(ndr, r);
1556 switch (level) {
1557 case 0:
1558 if (r->ctr0) {
1559 NDR_CHECK(ndr_push_srvsvc_NetConnCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
1561 break;
1563 case 1:
1564 if (r->ctr1) {
1565 NDR_CHECK(ndr_push_srvsvc_NetConnCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
1567 break;
1569 default:
1570 break;
1574 return NT_STATUS_OK;
1577 NTSTATUS ndr_pull_srvsvc_NetConnCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetConnCtr *r)
1579 int level;
1580 uint32_t _level;
1581 TALLOC_CTX *_mem_save_ctr0_0;
1582 TALLOC_CTX *_mem_save_ctr1_0;
1583 level = ndr_pull_get_switch_value(ndr, r);
1584 if (ndr_flags & NDR_SCALARS) {
1585 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
1586 if (_level != level) {
1587 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
1589 switch (level) {
1590 case 0: {
1591 uint32_t _ptr_ctr0;
1592 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr0));
1593 if (_ptr_ctr0) {
1594 NDR_PULL_ALLOC(ndr, r->ctr0);
1595 } else {
1596 r->ctr0 = NULL;
1598 break; }
1600 case 1: {
1601 uint32_t _ptr_ctr1;
1602 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
1603 if (_ptr_ctr1) {
1604 NDR_PULL_ALLOC(ndr, r->ctr1);
1605 } else {
1606 r->ctr1 = NULL;
1608 break; }
1610 default: {
1611 break; }
1615 if (ndr_flags & NDR_BUFFERS) {
1616 switch (level) {
1617 case 0:
1618 if (r->ctr0) {
1619 _mem_save_ctr0_0 = NDR_PULL_GET_MEM_CTX(ndr);
1620 NDR_PULL_SET_MEM_CTX(ndr, r->ctr0, 0);
1621 NDR_CHECK(ndr_pull_srvsvc_NetConnCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
1622 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr0_0, 0);
1624 break;
1626 case 1:
1627 if (r->ctr1) {
1628 _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
1629 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
1630 NDR_CHECK(ndr_pull_srvsvc_NetConnCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
1631 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
1633 break;
1635 default:
1636 break;
1640 return NT_STATUS_OK;
1643 _PUBLIC_ void ndr_print_srvsvc_NetConnCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetConnCtr *r)
1645 int level;
1646 level = ndr_print_get_switch_value(ndr, r);
1647 ndr_print_union(ndr, name, level, "srvsvc_NetConnCtr");
1648 switch (level) {
1649 case 0:
1650 ndr_print_ptr(ndr, "ctr0", r->ctr0);
1651 ndr->depth++;
1652 if (r->ctr0) {
1653 ndr_print_srvsvc_NetConnCtr0(ndr, "ctr0", r->ctr0);
1655 ndr->depth--;
1656 break;
1658 case 1:
1659 ndr_print_ptr(ndr, "ctr1", r->ctr1);
1660 ndr->depth++;
1661 if (r->ctr1) {
1662 ndr_print_srvsvc_NetConnCtr1(ndr, "ctr1", r->ctr1);
1664 ndr->depth--;
1665 break;
1667 default:
1668 break;
1673 NTSTATUS ndr_push_srvsvc_NetFileInfo2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetFileInfo2 *r)
1675 if (ndr_flags & NDR_SCALARS) {
1676 NDR_CHECK(ndr_push_align(ndr, 4));
1677 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fid));
1679 if (ndr_flags & NDR_BUFFERS) {
1681 return NT_STATUS_OK;
1684 NTSTATUS ndr_pull_srvsvc_NetFileInfo2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileInfo2 *r)
1686 if (ndr_flags & NDR_SCALARS) {
1687 NDR_CHECK(ndr_pull_align(ndr, 4));
1688 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fid));
1690 if (ndr_flags & NDR_BUFFERS) {
1692 return NT_STATUS_OK;
1695 _PUBLIC_ void ndr_print_srvsvc_NetFileInfo2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileInfo2 *r)
1697 ndr_print_struct(ndr, name, "srvsvc_NetFileInfo2");
1698 ndr->depth++;
1699 ndr_print_uint32(ndr, "fid", r->fid);
1700 ndr->depth--;
1703 NTSTATUS ndr_push_srvsvc_NetFileCtr2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetFileCtr2 *r)
1705 uint32_t cntr_array_1;
1706 if (ndr_flags & NDR_SCALARS) {
1707 NDR_CHECK(ndr_push_align(ndr, 4));
1708 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1709 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
1711 if (ndr_flags & NDR_BUFFERS) {
1712 if (r->array) {
1713 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1714 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
1715 NDR_CHECK(ndr_push_srvsvc_NetFileInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
1719 return NT_STATUS_OK;
1722 NTSTATUS ndr_pull_srvsvc_NetFileCtr2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileCtr2 *r)
1724 uint32_t _ptr_array;
1725 uint32_t cntr_array_1;
1726 TALLOC_CTX *_mem_save_array_0;
1727 TALLOC_CTX *_mem_save_array_1;
1728 if (ndr_flags & NDR_SCALARS) {
1729 NDR_CHECK(ndr_pull_align(ndr, 4));
1730 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
1731 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
1732 if (_ptr_array) {
1733 NDR_PULL_ALLOC(ndr, r->array);
1734 } else {
1735 r->array = NULL;
1738 if (ndr_flags & NDR_BUFFERS) {
1739 if (r->array) {
1740 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
1741 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
1742 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
1743 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
1744 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
1745 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
1746 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
1747 NDR_CHECK(ndr_pull_srvsvc_NetFileInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
1749 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
1750 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
1752 if (r->array) {
1753 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
1756 return NT_STATUS_OK;
1759 _PUBLIC_ void ndr_print_srvsvc_NetFileCtr2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileCtr2 *r)
1761 uint32_t cntr_array_1;
1762 ndr_print_struct(ndr, name, "srvsvc_NetFileCtr2");
1763 ndr->depth++;
1764 ndr_print_uint32(ndr, "count", r->count);
1765 ndr_print_ptr(ndr, "array", r->array);
1766 ndr->depth++;
1767 if (r->array) {
1768 ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
1769 ndr->depth++;
1770 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
1771 char *idx_1=NULL;
1772 asprintf(&idx_1, "[%d]", cntr_array_1);
1773 if (idx_1) {
1774 ndr_print_srvsvc_NetFileInfo2(ndr, "array", &r->array[cntr_array_1]);
1775 free(idx_1);
1778 ndr->depth--;
1780 ndr->depth--;
1781 ndr->depth--;
1784 NTSTATUS ndr_push_srvsvc_NetFileInfo3(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetFileInfo3 *r)
1786 if (ndr_flags & NDR_SCALARS) {
1787 NDR_CHECK(ndr_push_align(ndr, 4));
1788 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fid));
1789 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->permissions));
1790 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_locks));
1791 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
1792 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
1794 if (ndr_flags & NDR_BUFFERS) {
1795 if (r->path) {
1796 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
1797 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1798 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
1799 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1801 if (r->user) {
1802 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
1803 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1804 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
1805 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1808 return NT_STATUS_OK;
1811 NTSTATUS ndr_pull_srvsvc_NetFileInfo3(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileInfo3 *r)
1813 uint32_t _ptr_path;
1814 TALLOC_CTX *_mem_save_path_0;
1815 uint32_t _ptr_user;
1816 TALLOC_CTX *_mem_save_user_0;
1817 if (ndr_flags & NDR_SCALARS) {
1818 NDR_CHECK(ndr_pull_align(ndr, 4));
1819 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fid));
1820 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->permissions));
1821 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_locks));
1822 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
1823 if (_ptr_path) {
1824 NDR_PULL_ALLOC(ndr, r->path);
1825 } else {
1826 r->path = NULL;
1828 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
1829 if (_ptr_user) {
1830 NDR_PULL_ALLOC(ndr, r->user);
1831 } else {
1832 r->user = NULL;
1835 if (ndr_flags & NDR_BUFFERS) {
1836 if (r->path) {
1837 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
1838 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
1839 NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
1840 NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
1841 if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) {
1842 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));
1844 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t)));
1845 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16));
1846 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
1848 if (r->user) {
1849 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
1850 NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
1851 NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
1852 NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
1853 if (ndr_get_array_length(ndr, &r->user) > ndr_get_array_size(ndr, &r->user)) {
1854 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));
1856 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t)));
1857 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t), CH_UTF16));
1858 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
1861 return NT_STATUS_OK;
1864 _PUBLIC_ void ndr_print_srvsvc_NetFileInfo3(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileInfo3 *r)
1866 ndr_print_struct(ndr, name, "srvsvc_NetFileInfo3");
1867 ndr->depth++;
1868 ndr_print_uint32(ndr, "fid", r->fid);
1869 ndr_print_uint32(ndr, "permissions", r->permissions);
1870 ndr_print_uint32(ndr, "num_locks", r->num_locks);
1871 ndr_print_ptr(ndr, "path", r->path);
1872 ndr->depth++;
1873 if (r->path) {
1874 ndr_print_string(ndr, "path", r->path);
1876 ndr->depth--;
1877 ndr_print_ptr(ndr, "user", r->user);
1878 ndr->depth++;
1879 if (r->user) {
1880 ndr_print_string(ndr, "user", r->user);
1882 ndr->depth--;
1883 ndr->depth--;
1886 NTSTATUS ndr_push_srvsvc_NetFileCtr3(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetFileCtr3 *r)
1888 uint32_t cntr_array_1;
1889 if (ndr_flags & NDR_SCALARS) {
1890 NDR_CHECK(ndr_push_align(ndr, 4));
1891 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1892 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
1894 if (ndr_flags & NDR_BUFFERS) {
1895 if (r->array) {
1896 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1897 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
1898 NDR_CHECK(ndr_push_srvsvc_NetFileInfo3(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
1900 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
1901 NDR_CHECK(ndr_push_srvsvc_NetFileInfo3(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
1905 return NT_STATUS_OK;
1908 NTSTATUS ndr_pull_srvsvc_NetFileCtr3(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileCtr3 *r)
1910 uint32_t _ptr_array;
1911 uint32_t cntr_array_1;
1912 TALLOC_CTX *_mem_save_array_0;
1913 TALLOC_CTX *_mem_save_array_1;
1914 if (ndr_flags & NDR_SCALARS) {
1915 NDR_CHECK(ndr_pull_align(ndr, 4));
1916 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
1917 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
1918 if (_ptr_array) {
1919 NDR_PULL_ALLOC(ndr, r->array);
1920 } else {
1921 r->array = NULL;
1924 if (ndr_flags & NDR_BUFFERS) {
1925 if (r->array) {
1926 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
1927 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
1928 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
1929 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
1930 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
1931 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
1932 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
1933 NDR_CHECK(ndr_pull_srvsvc_NetFileInfo3(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
1935 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
1936 NDR_CHECK(ndr_pull_srvsvc_NetFileInfo3(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
1938 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
1939 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
1941 if (r->array) {
1942 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
1945 return NT_STATUS_OK;
1948 _PUBLIC_ void ndr_print_srvsvc_NetFileCtr3(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileCtr3 *r)
1950 uint32_t cntr_array_1;
1951 ndr_print_struct(ndr, name, "srvsvc_NetFileCtr3");
1952 ndr->depth++;
1953 ndr_print_uint32(ndr, "count", r->count);
1954 ndr_print_ptr(ndr, "array", r->array);
1955 ndr->depth++;
1956 if (r->array) {
1957 ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
1958 ndr->depth++;
1959 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
1960 char *idx_1=NULL;
1961 asprintf(&idx_1, "[%d]", cntr_array_1);
1962 if (idx_1) {
1963 ndr_print_srvsvc_NetFileInfo3(ndr, "array", &r->array[cntr_array_1]);
1964 free(idx_1);
1967 ndr->depth--;
1969 ndr->depth--;
1970 ndr->depth--;
1973 NTSTATUS ndr_push_srvsvc_NetFileInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetFileInfo *r)
1975 if (ndr_flags & NDR_SCALARS) {
1976 int level = ndr_push_get_switch_value(ndr, r);
1977 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
1978 switch (level) {
1979 case 2:
1980 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
1981 break;
1983 case 3:
1984 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3));
1985 break;
1987 default:
1988 break;
1992 if (ndr_flags & NDR_BUFFERS) {
1993 int level = ndr_push_get_switch_value(ndr, r);
1994 switch (level) {
1995 case 2:
1996 if (r->info2) {
1997 NDR_CHECK(ndr_push_srvsvc_NetFileInfo2(ndr, NDR_SCALARS, r->info2));
1999 break;
2001 case 3:
2002 if (r->info3) {
2003 NDR_CHECK(ndr_push_srvsvc_NetFileInfo3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
2005 break;
2007 default:
2008 break;
2012 return NT_STATUS_OK;
2015 NTSTATUS ndr_pull_srvsvc_NetFileInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetFileInfo *r)
2017 int level;
2018 uint32_t _level;
2019 TALLOC_CTX *_mem_save_info2_0;
2020 TALLOC_CTX *_mem_save_info3_0;
2021 level = ndr_pull_get_switch_value(ndr, r);
2022 if (ndr_flags & NDR_SCALARS) {
2023 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
2024 if (_level != level) {
2025 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
2027 switch (level) {
2028 case 2: {
2029 uint32_t _ptr_info2;
2030 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
2031 if (_ptr_info2) {
2032 NDR_PULL_ALLOC(ndr, r->info2);
2033 } else {
2034 r->info2 = NULL;
2036 break; }
2038 case 3: {
2039 uint32_t _ptr_info3;
2040 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info3));
2041 if (_ptr_info3) {
2042 NDR_PULL_ALLOC(ndr, r->info3);
2043 } else {
2044 r->info3 = NULL;
2046 break; }
2048 default: {
2049 break; }
2053 if (ndr_flags & NDR_BUFFERS) {
2054 switch (level) {
2055 case 2:
2056 if (r->info2) {
2057 _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
2058 NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
2059 NDR_CHECK(ndr_pull_srvsvc_NetFileInfo2(ndr, NDR_SCALARS, r->info2));
2060 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
2062 break;
2064 case 3:
2065 if (r->info3) {
2066 _mem_save_info3_0 = NDR_PULL_GET_MEM_CTX(ndr);
2067 NDR_PULL_SET_MEM_CTX(ndr, r->info3, 0);
2068 NDR_CHECK(ndr_pull_srvsvc_NetFileInfo3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
2069 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info3_0, 0);
2071 break;
2073 default:
2074 break;
2078 return NT_STATUS_OK;
2081 _PUBLIC_ void ndr_print_srvsvc_NetFileInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetFileInfo *r)
2083 int level;
2084 level = ndr_print_get_switch_value(ndr, r);
2085 ndr_print_union(ndr, name, level, "srvsvc_NetFileInfo");
2086 switch (level) {
2087 case 2:
2088 ndr_print_ptr(ndr, "info2", r->info2);
2089 ndr->depth++;
2090 if (r->info2) {
2091 ndr_print_srvsvc_NetFileInfo2(ndr, "info2", r->info2);
2093 ndr->depth--;
2094 break;
2096 case 3:
2097 ndr_print_ptr(ndr, "info3", r->info3);
2098 ndr->depth++;
2099 if (r->info3) {
2100 ndr_print_srvsvc_NetFileInfo3(ndr, "info3", r->info3);
2102 ndr->depth--;
2103 break;
2105 default:
2106 break;
2111 NTSTATUS ndr_push_srvsvc_NetFileCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetFileCtr *r)
2113 if (ndr_flags & NDR_SCALARS) {
2114 int level = ndr_push_get_switch_value(ndr, r);
2115 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
2116 switch (level) {
2117 case 2:
2118 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr2));
2119 break;
2121 case 3:
2122 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr3));
2123 break;
2125 default:
2126 break;
2130 if (ndr_flags & NDR_BUFFERS) {
2131 int level = ndr_push_get_switch_value(ndr, r);
2132 switch (level) {
2133 case 2:
2134 if (r->ctr2) {
2135 NDR_CHECK(ndr_push_srvsvc_NetFileCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
2137 break;
2139 case 3:
2140 if (r->ctr3) {
2141 NDR_CHECK(ndr_push_srvsvc_NetFileCtr3(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr3));
2143 break;
2145 default:
2146 break;
2150 return NT_STATUS_OK;
2153 NTSTATUS ndr_pull_srvsvc_NetFileCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetFileCtr *r)
2155 int level;
2156 uint32_t _level;
2157 TALLOC_CTX *_mem_save_ctr2_0;
2158 TALLOC_CTX *_mem_save_ctr3_0;
2159 level = ndr_pull_get_switch_value(ndr, r);
2160 if (ndr_flags & NDR_SCALARS) {
2161 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
2162 if (_level != level) {
2163 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
2165 switch (level) {
2166 case 2: {
2167 uint32_t _ptr_ctr2;
2168 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr2));
2169 if (_ptr_ctr2) {
2170 NDR_PULL_ALLOC(ndr, r->ctr2);
2171 } else {
2172 r->ctr2 = NULL;
2174 break; }
2176 case 3: {
2177 uint32_t _ptr_ctr3;
2178 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr3));
2179 if (_ptr_ctr3) {
2180 NDR_PULL_ALLOC(ndr, r->ctr3);
2181 } else {
2182 r->ctr3 = NULL;
2184 break; }
2186 default: {
2187 break; }
2191 if (ndr_flags & NDR_BUFFERS) {
2192 switch (level) {
2193 case 2:
2194 if (r->ctr2) {
2195 _mem_save_ctr2_0 = NDR_PULL_GET_MEM_CTX(ndr);
2196 NDR_PULL_SET_MEM_CTX(ndr, r->ctr2, 0);
2197 NDR_CHECK(ndr_pull_srvsvc_NetFileCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
2198 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr2_0, 0);
2200 break;
2202 case 3:
2203 if (r->ctr3) {
2204 _mem_save_ctr3_0 = NDR_PULL_GET_MEM_CTX(ndr);
2205 NDR_PULL_SET_MEM_CTX(ndr, r->ctr3, 0);
2206 NDR_CHECK(ndr_pull_srvsvc_NetFileCtr3(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr3));
2207 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr3_0, 0);
2209 break;
2211 default:
2212 break;
2216 return NT_STATUS_OK;
2219 _PUBLIC_ void ndr_print_srvsvc_NetFileCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetFileCtr *r)
2221 int level;
2222 level = ndr_print_get_switch_value(ndr, r);
2223 ndr_print_union(ndr, name, level, "srvsvc_NetFileCtr");
2224 switch (level) {
2225 case 2:
2226 ndr_print_ptr(ndr, "ctr2", r->ctr2);
2227 ndr->depth++;
2228 if (r->ctr2) {
2229 ndr_print_srvsvc_NetFileCtr2(ndr, "ctr2", r->ctr2);
2231 ndr->depth--;
2232 break;
2234 case 3:
2235 ndr_print_ptr(ndr, "ctr3", r->ctr3);
2236 ndr->depth++;
2237 if (r->ctr3) {
2238 ndr_print_srvsvc_NetFileCtr3(ndr, "ctr3", r->ctr3);
2240 ndr->depth--;
2241 break;
2243 default:
2244 break;
2249 NTSTATUS ndr_push_srvsvc_NetSessInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfo0 *r)
2251 if (ndr_flags & NDR_SCALARS) {
2252 NDR_CHECK(ndr_push_align(ndr, 4));
2253 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client));
2255 if (ndr_flags & NDR_BUFFERS) {
2256 if (r->client) {
2257 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
2258 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2259 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
2260 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client, ndr_charset_length(r->client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2263 return NT_STATUS_OK;
2266 NTSTATUS ndr_pull_srvsvc_NetSessInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfo0 *r)
2268 uint32_t _ptr_client;
2269 TALLOC_CTX *_mem_save_client_0;
2270 if (ndr_flags & NDR_SCALARS) {
2271 NDR_CHECK(ndr_pull_align(ndr, 4));
2272 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
2273 if (_ptr_client) {
2274 NDR_PULL_ALLOC(ndr, r->client);
2275 } else {
2276 r->client = NULL;
2279 if (ndr_flags & NDR_BUFFERS) {
2280 if (r->client) {
2281 _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
2282 NDR_PULL_SET_MEM_CTX(ndr, r->client, 0);
2283 NDR_CHECK(ndr_pull_array_size(ndr, &r->client));
2284 NDR_CHECK(ndr_pull_array_length(ndr, &r->client));
2285 if (ndr_get_array_length(ndr, &r->client) > ndr_get_array_size(ndr, &r->client)) {
2286 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));
2288 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->client), sizeof(uint16_t)));
2289 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client, ndr_get_array_length(ndr, &r->client), sizeof(uint16_t), CH_UTF16));
2290 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
2293 return NT_STATUS_OK;
2296 _PUBLIC_ void ndr_print_srvsvc_NetSessInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo0 *r)
2298 ndr_print_struct(ndr, name, "srvsvc_NetSessInfo0");
2299 ndr->depth++;
2300 ndr_print_ptr(ndr, "client", r->client);
2301 ndr->depth++;
2302 if (r->client) {
2303 ndr_print_string(ndr, "client", r->client);
2305 ndr->depth--;
2306 ndr->depth--;
2309 NTSTATUS ndr_push_srvsvc_NetSessCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessCtr0 *r)
2311 uint32_t cntr_array_1;
2312 if (ndr_flags & NDR_SCALARS) {
2313 NDR_CHECK(ndr_push_align(ndr, 4));
2314 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2315 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
2317 if (ndr_flags & NDR_BUFFERS) {
2318 if (r->array) {
2319 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2320 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2321 NDR_CHECK(ndr_push_srvsvc_NetSessInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
2323 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2324 NDR_CHECK(ndr_push_srvsvc_NetSessInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
2328 return NT_STATUS_OK;
2331 NTSTATUS ndr_pull_srvsvc_NetSessCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr0 *r)
2333 uint32_t _ptr_array;
2334 uint32_t cntr_array_1;
2335 TALLOC_CTX *_mem_save_array_0;
2336 TALLOC_CTX *_mem_save_array_1;
2337 if (ndr_flags & NDR_SCALARS) {
2338 NDR_CHECK(ndr_pull_align(ndr, 4));
2339 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2340 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
2341 if (_ptr_array) {
2342 NDR_PULL_ALLOC(ndr, r->array);
2343 } else {
2344 r->array = NULL;
2347 if (ndr_flags & NDR_BUFFERS) {
2348 if (r->array) {
2349 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
2350 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
2351 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
2352 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
2353 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
2354 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
2355 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2356 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
2358 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2359 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
2361 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
2362 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
2364 if (r->array) {
2365 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
2368 return NT_STATUS_OK;
2371 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr0 *r)
2373 uint32_t cntr_array_1;
2374 ndr_print_struct(ndr, name, "srvsvc_NetSessCtr0");
2375 ndr->depth++;
2376 ndr_print_uint32(ndr, "count", r->count);
2377 ndr_print_ptr(ndr, "array", r->array);
2378 ndr->depth++;
2379 if (r->array) {
2380 ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
2381 ndr->depth++;
2382 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
2383 char *idx_1=NULL;
2384 asprintf(&idx_1, "[%d]", cntr_array_1);
2385 if (idx_1) {
2386 ndr_print_srvsvc_NetSessInfo0(ndr, "array", &r->array[cntr_array_1]);
2387 free(idx_1);
2390 ndr->depth--;
2392 ndr->depth--;
2393 ndr->depth--;
2396 NTSTATUS ndr_push_srvsvc_NetSessInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfo1 *r)
2398 if (ndr_flags & NDR_SCALARS) {
2399 NDR_CHECK(ndr_push_align(ndr, 4));
2400 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client));
2401 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
2402 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_open));
2403 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
2404 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idle_time));
2405 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->user_flags));
2407 if (ndr_flags & NDR_BUFFERS) {
2408 if (r->client) {
2409 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
2410 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2411 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
2412 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client, ndr_charset_length(r->client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2414 if (r->user) {
2415 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
2416 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2417 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
2418 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2421 return NT_STATUS_OK;
2424 NTSTATUS ndr_pull_srvsvc_NetSessInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfo1 *r)
2426 uint32_t _ptr_client;
2427 TALLOC_CTX *_mem_save_client_0;
2428 uint32_t _ptr_user;
2429 TALLOC_CTX *_mem_save_user_0;
2430 if (ndr_flags & NDR_SCALARS) {
2431 NDR_CHECK(ndr_pull_align(ndr, 4));
2432 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
2433 if (_ptr_client) {
2434 NDR_PULL_ALLOC(ndr, r->client);
2435 } else {
2436 r->client = NULL;
2438 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
2439 if (_ptr_user) {
2440 NDR_PULL_ALLOC(ndr, r->user);
2441 } else {
2442 r->user = NULL;
2444 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_open));
2445 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
2446 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idle_time));
2447 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->user_flags));
2449 if (ndr_flags & NDR_BUFFERS) {
2450 if (r->client) {
2451 _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
2452 NDR_PULL_SET_MEM_CTX(ndr, r->client, 0);
2453 NDR_CHECK(ndr_pull_array_size(ndr, &r->client));
2454 NDR_CHECK(ndr_pull_array_length(ndr, &r->client));
2455 if (ndr_get_array_length(ndr, &r->client) > ndr_get_array_size(ndr, &r->client)) {
2456 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));
2458 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->client), sizeof(uint16_t)));
2459 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client, ndr_get_array_length(ndr, &r->client), sizeof(uint16_t), CH_UTF16));
2460 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
2462 if (r->user) {
2463 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
2464 NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
2465 NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
2466 NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
2467 if (ndr_get_array_length(ndr, &r->user) > ndr_get_array_size(ndr, &r->user)) {
2468 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));
2470 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t)));
2471 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t), CH_UTF16));
2472 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
2475 return NT_STATUS_OK;
2478 _PUBLIC_ void ndr_print_srvsvc_NetSessInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo1 *r)
2480 ndr_print_struct(ndr, name, "srvsvc_NetSessInfo1");
2481 ndr->depth++;
2482 ndr_print_ptr(ndr, "client", r->client);
2483 ndr->depth++;
2484 if (r->client) {
2485 ndr_print_string(ndr, "client", r->client);
2487 ndr->depth--;
2488 ndr_print_ptr(ndr, "user", r->user);
2489 ndr->depth++;
2490 if (r->user) {
2491 ndr_print_string(ndr, "user", r->user);
2493 ndr->depth--;
2494 ndr_print_uint32(ndr, "num_open", r->num_open);
2495 ndr_print_uint32(ndr, "time", r->time);
2496 ndr_print_uint32(ndr, "idle_time", r->idle_time);
2497 ndr_print_uint32(ndr, "user_flags", r->user_flags);
2498 ndr->depth--;
2501 NTSTATUS ndr_push_srvsvc_NetSessCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessCtr1 *r)
2503 uint32_t cntr_array_1;
2504 if (ndr_flags & NDR_SCALARS) {
2505 NDR_CHECK(ndr_push_align(ndr, 4));
2506 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2507 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
2509 if (ndr_flags & NDR_BUFFERS) {
2510 if (r->array) {
2511 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2512 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2513 NDR_CHECK(ndr_push_srvsvc_NetSessInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
2515 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2516 NDR_CHECK(ndr_push_srvsvc_NetSessInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
2520 return NT_STATUS_OK;
2523 NTSTATUS ndr_pull_srvsvc_NetSessCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr1 *r)
2525 uint32_t _ptr_array;
2526 uint32_t cntr_array_1;
2527 TALLOC_CTX *_mem_save_array_0;
2528 TALLOC_CTX *_mem_save_array_1;
2529 if (ndr_flags & NDR_SCALARS) {
2530 NDR_CHECK(ndr_pull_align(ndr, 4));
2531 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2532 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
2533 if (_ptr_array) {
2534 NDR_PULL_ALLOC(ndr, r->array);
2535 } else {
2536 r->array = NULL;
2539 if (ndr_flags & NDR_BUFFERS) {
2540 if (r->array) {
2541 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
2542 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
2543 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
2544 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
2545 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
2546 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
2547 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2548 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
2550 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2551 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
2553 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
2554 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
2556 if (r->array) {
2557 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
2560 return NT_STATUS_OK;
2563 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr1 *r)
2565 uint32_t cntr_array_1;
2566 ndr_print_struct(ndr, name, "srvsvc_NetSessCtr1");
2567 ndr->depth++;
2568 ndr_print_uint32(ndr, "count", r->count);
2569 ndr_print_ptr(ndr, "array", r->array);
2570 ndr->depth++;
2571 if (r->array) {
2572 ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
2573 ndr->depth++;
2574 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
2575 char *idx_1=NULL;
2576 asprintf(&idx_1, "[%d]", cntr_array_1);
2577 if (idx_1) {
2578 ndr_print_srvsvc_NetSessInfo1(ndr, "array", &r->array[cntr_array_1]);
2579 free(idx_1);
2582 ndr->depth--;
2584 ndr->depth--;
2585 ndr->depth--;
2588 NTSTATUS ndr_push_srvsvc_NetSessInfo2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfo2 *r)
2590 if (ndr_flags & NDR_SCALARS) {
2591 NDR_CHECK(ndr_push_align(ndr, 4));
2592 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client));
2593 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
2594 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_open));
2595 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
2596 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idle_time));
2597 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->user_flags));
2598 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client_type));
2600 if (ndr_flags & NDR_BUFFERS) {
2601 if (r->client) {
2602 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
2603 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2604 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
2605 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client, ndr_charset_length(r->client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2607 if (r->user) {
2608 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
2609 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2610 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
2611 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2613 if (r->client_type) {
2614 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client_type, CH_UTF16)));
2615 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2616 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client_type, CH_UTF16)));
2617 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client_type, ndr_charset_length(r->client_type, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2620 return NT_STATUS_OK;
2623 NTSTATUS ndr_pull_srvsvc_NetSessInfo2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfo2 *r)
2625 uint32_t _ptr_client;
2626 TALLOC_CTX *_mem_save_client_0;
2627 uint32_t _ptr_user;
2628 TALLOC_CTX *_mem_save_user_0;
2629 uint32_t _ptr_client_type;
2630 TALLOC_CTX *_mem_save_client_type_0;
2631 if (ndr_flags & NDR_SCALARS) {
2632 NDR_CHECK(ndr_pull_align(ndr, 4));
2633 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
2634 if (_ptr_client) {
2635 NDR_PULL_ALLOC(ndr, r->client);
2636 } else {
2637 r->client = NULL;
2639 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
2640 if (_ptr_user) {
2641 NDR_PULL_ALLOC(ndr, r->user);
2642 } else {
2643 r->user = NULL;
2645 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_open));
2646 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
2647 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idle_time));
2648 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->user_flags));
2649 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client_type));
2650 if (_ptr_client_type) {
2651 NDR_PULL_ALLOC(ndr, r->client_type);
2652 } else {
2653 r->client_type = NULL;
2656 if (ndr_flags & NDR_BUFFERS) {
2657 if (r->client) {
2658 _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
2659 NDR_PULL_SET_MEM_CTX(ndr, r->client, 0);
2660 NDR_CHECK(ndr_pull_array_size(ndr, &r->client));
2661 NDR_CHECK(ndr_pull_array_length(ndr, &r->client));
2662 if (ndr_get_array_length(ndr, &r->client) > ndr_get_array_size(ndr, &r->client)) {
2663 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));
2665 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->client), sizeof(uint16_t)));
2666 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client, ndr_get_array_length(ndr, &r->client), sizeof(uint16_t), CH_UTF16));
2667 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
2669 if (r->user) {
2670 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
2671 NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
2672 NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
2673 NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
2674 if (ndr_get_array_length(ndr, &r->user) > ndr_get_array_size(ndr, &r->user)) {
2675 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));
2677 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t)));
2678 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t), CH_UTF16));
2679 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
2681 if (r->client_type) {
2682 _mem_save_client_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
2683 NDR_PULL_SET_MEM_CTX(ndr, r->client_type, 0);
2684 NDR_CHECK(ndr_pull_array_size(ndr, &r->client_type));
2685 NDR_CHECK(ndr_pull_array_length(ndr, &r->client_type));
2686 if (ndr_get_array_length(ndr, &r->client_type) > ndr_get_array_size(ndr, &r->client_type)) {
2687 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));
2689 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->client_type), sizeof(uint16_t)));
2690 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client_type, ndr_get_array_length(ndr, &r->client_type), sizeof(uint16_t), CH_UTF16));
2691 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_type_0, 0);
2694 return NT_STATUS_OK;
2697 _PUBLIC_ void ndr_print_srvsvc_NetSessInfo2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo2 *r)
2699 ndr_print_struct(ndr, name, "srvsvc_NetSessInfo2");
2700 ndr->depth++;
2701 ndr_print_ptr(ndr, "client", r->client);
2702 ndr->depth++;
2703 if (r->client) {
2704 ndr_print_string(ndr, "client", r->client);
2706 ndr->depth--;
2707 ndr_print_ptr(ndr, "user", r->user);
2708 ndr->depth++;
2709 if (r->user) {
2710 ndr_print_string(ndr, "user", r->user);
2712 ndr->depth--;
2713 ndr_print_uint32(ndr, "num_open", r->num_open);
2714 ndr_print_uint32(ndr, "time", r->time);
2715 ndr_print_uint32(ndr, "idle_time", r->idle_time);
2716 ndr_print_uint32(ndr, "user_flags", r->user_flags);
2717 ndr_print_ptr(ndr, "client_type", r->client_type);
2718 ndr->depth++;
2719 if (r->client_type) {
2720 ndr_print_string(ndr, "client_type", r->client_type);
2722 ndr->depth--;
2723 ndr->depth--;
2726 NTSTATUS ndr_push_srvsvc_NetSessCtr2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessCtr2 *r)
2728 uint32_t cntr_array_1;
2729 if (ndr_flags & NDR_SCALARS) {
2730 NDR_CHECK(ndr_push_align(ndr, 4));
2731 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2732 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
2734 if (ndr_flags & NDR_BUFFERS) {
2735 if (r->array) {
2736 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2737 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2738 NDR_CHECK(ndr_push_srvsvc_NetSessInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
2740 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2741 NDR_CHECK(ndr_push_srvsvc_NetSessInfo2(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
2745 return NT_STATUS_OK;
2748 NTSTATUS ndr_pull_srvsvc_NetSessCtr2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr2 *r)
2750 uint32_t _ptr_array;
2751 uint32_t cntr_array_1;
2752 TALLOC_CTX *_mem_save_array_0;
2753 TALLOC_CTX *_mem_save_array_1;
2754 if (ndr_flags & NDR_SCALARS) {
2755 NDR_CHECK(ndr_pull_align(ndr, 4));
2756 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2757 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
2758 if (_ptr_array) {
2759 NDR_PULL_ALLOC(ndr, r->array);
2760 } else {
2761 r->array = NULL;
2764 if (ndr_flags & NDR_BUFFERS) {
2765 if (r->array) {
2766 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
2767 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
2768 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
2769 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
2770 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
2771 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
2772 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2773 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
2775 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2776 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo2(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
2778 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
2779 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
2781 if (r->array) {
2782 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
2785 return NT_STATUS_OK;
2788 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr2 *r)
2790 uint32_t cntr_array_1;
2791 ndr_print_struct(ndr, name, "srvsvc_NetSessCtr2");
2792 ndr->depth++;
2793 ndr_print_uint32(ndr, "count", r->count);
2794 ndr_print_ptr(ndr, "array", r->array);
2795 ndr->depth++;
2796 if (r->array) {
2797 ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
2798 ndr->depth++;
2799 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
2800 char *idx_1=NULL;
2801 asprintf(&idx_1, "[%d]", cntr_array_1);
2802 if (idx_1) {
2803 ndr_print_srvsvc_NetSessInfo2(ndr, "array", &r->array[cntr_array_1]);
2804 free(idx_1);
2807 ndr->depth--;
2809 ndr->depth--;
2810 ndr->depth--;
2813 NTSTATUS ndr_push_srvsvc_NetSessInfo10(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfo10 *r)
2815 if (ndr_flags & NDR_SCALARS) {
2816 NDR_CHECK(ndr_push_align(ndr, 4));
2817 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client));
2818 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
2819 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
2820 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idle_time));
2822 if (ndr_flags & NDR_BUFFERS) {
2823 if (r->client) {
2824 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
2825 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2826 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
2827 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client, ndr_charset_length(r->client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2829 if (r->user) {
2830 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
2831 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
2832 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
2833 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2836 return NT_STATUS_OK;
2839 NTSTATUS ndr_pull_srvsvc_NetSessInfo10(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfo10 *r)
2841 uint32_t _ptr_client;
2842 TALLOC_CTX *_mem_save_client_0;
2843 uint32_t _ptr_user;
2844 TALLOC_CTX *_mem_save_user_0;
2845 if (ndr_flags & NDR_SCALARS) {
2846 NDR_CHECK(ndr_pull_align(ndr, 4));
2847 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
2848 if (_ptr_client) {
2849 NDR_PULL_ALLOC(ndr, r->client);
2850 } else {
2851 r->client = NULL;
2853 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
2854 if (_ptr_user) {
2855 NDR_PULL_ALLOC(ndr, r->user);
2856 } else {
2857 r->user = NULL;
2859 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
2860 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idle_time));
2862 if (ndr_flags & NDR_BUFFERS) {
2863 if (r->client) {
2864 _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
2865 NDR_PULL_SET_MEM_CTX(ndr, r->client, 0);
2866 NDR_CHECK(ndr_pull_array_size(ndr, &r->client));
2867 NDR_CHECK(ndr_pull_array_length(ndr, &r->client));
2868 if (ndr_get_array_length(ndr, &r->client) > ndr_get_array_size(ndr, &r->client)) {
2869 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));
2871 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->client), sizeof(uint16_t)));
2872 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client, ndr_get_array_length(ndr, &r->client), sizeof(uint16_t), CH_UTF16));
2873 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
2875 if (r->user) {
2876 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
2877 NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
2878 NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
2879 NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
2880 if (ndr_get_array_length(ndr, &r->user) > ndr_get_array_size(ndr, &r->user)) {
2881 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));
2883 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t)));
2884 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t), CH_UTF16));
2885 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
2888 return NT_STATUS_OK;
2891 _PUBLIC_ void ndr_print_srvsvc_NetSessInfo10(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo10 *r)
2893 ndr_print_struct(ndr, name, "srvsvc_NetSessInfo10");
2894 ndr->depth++;
2895 ndr_print_ptr(ndr, "client", r->client);
2896 ndr->depth++;
2897 if (r->client) {
2898 ndr_print_string(ndr, "client", r->client);
2900 ndr->depth--;
2901 ndr_print_ptr(ndr, "user", r->user);
2902 ndr->depth++;
2903 if (r->user) {
2904 ndr_print_string(ndr, "user", r->user);
2906 ndr->depth--;
2907 ndr_print_uint32(ndr, "time", r->time);
2908 ndr_print_uint32(ndr, "idle_time", r->idle_time);
2909 ndr->depth--;
2912 NTSTATUS ndr_push_srvsvc_NetSessCtr10(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessCtr10 *r)
2914 uint32_t cntr_array_1;
2915 if (ndr_flags & NDR_SCALARS) {
2916 NDR_CHECK(ndr_push_align(ndr, 4));
2917 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2918 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
2920 if (ndr_flags & NDR_BUFFERS) {
2921 if (r->array) {
2922 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2923 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2924 NDR_CHECK(ndr_push_srvsvc_NetSessInfo10(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
2926 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2927 NDR_CHECK(ndr_push_srvsvc_NetSessInfo10(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
2931 return NT_STATUS_OK;
2934 NTSTATUS ndr_pull_srvsvc_NetSessCtr10(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr10 *r)
2936 uint32_t _ptr_array;
2937 uint32_t cntr_array_1;
2938 TALLOC_CTX *_mem_save_array_0;
2939 TALLOC_CTX *_mem_save_array_1;
2940 if (ndr_flags & NDR_SCALARS) {
2941 NDR_CHECK(ndr_pull_align(ndr, 4));
2942 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2943 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
2944 if (_ptr_array) {
2945 NDR_PULL_ALLOC(ndr, r->array);
2946 } else {
2947 r->array = NULL;
2950 if (ndr_flags & NDR_BUFFERS) {
2951 if (r->array) {
2952 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
2953 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
2954 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
2955 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
2956 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
2957 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
2958 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2959 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo10(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
2961 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2962 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo10(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
2964 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
2965 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
2967 if (r->array) {
2968 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
2971 return NT_STATUS_OK;
2974 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr10(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr10 *r)
2976 uint32_t cntr_array_1;
2977 ndr_print_struct(ndr, name, "srvsvc_NetSessCtr10");
2978 ndr->depth++;
2979 ndr_print_uint32(ndr, "count", r->count);
2980 ndr_print_ptr(ndr, "array", r->array);
2981 ndr->depth++;
2982 if (r->array) {
2983 ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
2984 ndr->depth++;
2985 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
2986 char *idx_1=NULL;
2987 asprintf(&idx_1, "[%d]", cntr_array_1);
2988 if (idx_1) {
2989 ndr_print_srvsvc_NetSessInfo10(ndr, "array", &r->array[cntr_array_1]);
2990 free(idx_1);
2993 ndr->depth--;
2995 ndr->depth--;
2996 ndr->depth--;
2999 NTSTATUS ndr_push_srvsvc_NetSessInfo502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfo502 *r)
3001 if (ndr_flags & NDR_SCALARS) {
3002 NDR_CHECK(ndr_push_align(ndr, 4));
3003 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client));
3004 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
3005 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_open));
3006 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
3007 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idle_time));
3008 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->user_flags));
3009 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client_type));
3010 NDR_CHECK(ndr_push_unique_ptr(ndr, r->transport));
3012 if (ndr_flags & NDR_BUFFERS) {
3013 if (r->client) {
3014 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
3015 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3016 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
3017 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client, ndr_charset_length(r->client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3019 if (r->user) {
3020 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
3021 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3022 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
3023 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3025 if (r->client_type) {
3026 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client_type, CH_UTF16)));
3027 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3028 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->client_type, CH_UTF16)));
3029 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client_type, ndr_charset_length(r->client_type, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3031 if (r->transport) {
3032 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->transport, CH_UTF16)));
3033 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3034 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->transport, CH_UTF16)));
3035 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->transport, ndr_charset_length(r->transport, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3038 return NT_STATUS_OK;
3041 NTSTATUS ndr_pull_srvsvc_NetSessInfo502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfo502 *r)
3043 uint32_t _ptr_client;
3044 TALLOC_CTX *_mem_save_client_0;
3045 uint32_t _ptr_user;
3046 TALLOC_CTX *_mem_save_user_0;
3047 uint32_t _ptr_client_type;
3048 TALLOC_CTX *_mem_save_client_type_0;
3049 uint32_t _ptr_transport;
3050 TALLOC_CTX *_mem_save_transport_0;
3051 if (ndr_flags & NDR_SCALARS) {
3052 NDR_CHECK(ndr_pull_align(ndr, 4));
3053 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
3054 if (_ptr_client) {
3055 NDR_PULL_ALLOC(ndr, r->client);
3056 } else {
3057 r->client = NULL;
3059 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
3060 if (_ptr_user) {
3061 NDR_PULL_ALLOC(ndr, r->user);
3062 } else {
3063 r->user = NULL;
3065 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_open));
3066 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
3067 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idle_time));
3068 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->user_flags));
3069 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client_type));
3070 if (_ptr_client_type) {
3071 NDR_PULL_ALLOC(ndr, r->client_type);
3072 } else {
3073 r->client_type = NULL;
3075 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_transport));
3076 if (_ptr_transport) {
3077 NDR_PULL_ALLOC(ndr, r->transport);
3078 } else {
3079 r->transport = NULL;
3082 if (ndr_flags & NDR_BUFFERS) {
3083 if (r->client) {
3084 _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
3085 NDR_PULL_SET_MEM_CTX(ndr, r->client, 0);
3086 NDR_CHECK(ndr_pull_array_size(ndr, &r->client));
3087 NDR_CHECK(ndr_pull_array_length(ndr, &r->client));
3088 if (ndr_get_array_length(ndr, &r->client) > ndr_get_array_size(ndr, &r->client)) {
3089 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));
3091 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->client), sizeof(uint16_t)));
3092 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client, ndr_get_array_length(ndr, &r->client), sizeof(uint16_t), CH_UTF16));
3093 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
3095 if (r->user) {
3096 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
3097 NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
3098 NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
3099 NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
3100 if (ndr_get_array_length(ndr, &r->user) > ndr_get_array_size(ndr, &r->user)) {
3101 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));
3103 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t)));
3104 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t), CH_UTF16));
3105 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
3107 if (r->client_type) {
3108 _mem_save_client_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
3109 NDR_PULL_SET_MEM_CTX(ndr, r->client_type, 0);
3110 NDR_CHECK(ndr_pull_array_size(ndr, &r->client_type));
3111 NDR_CHECK(ndr_pull_array_length(ndr, &r->client_type));
3112 if (ndr_get_array_length(ndr, &r->client_type) > ndr_get_array_size(ndr, &r->client_type)) {
3113 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));
3115 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->client_type), sizeof(uint16_t)));
3116 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client_type, ndr_get_array_length(ndr, &r->client_type), sizeof(uint16_t), CH_UTF16));
3117 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_type_0, 0);
3119 if (r->transport) {
3120 _mem_save_transport_0 = NDR_PULL_GET_MEM_CTX(ndr);
3121 NDR_PULL_SET_MEM_CTX(ndr, r->transport, 0);
3122 NDR_CHECK(ndr_pull_array_size(ndr, &r->transport));
3123 NDR_CHECK(ndr_pull_array_length(ndr, &r->transport));
3124 if (ndr_get_array_length(ndr, &r->transport) > ndr_get_array_size(ndr, &r->transport)) {
3125 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));
3127 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->transport), sizeof(uint16_t)));
3128 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->transport, ndr_get_array_length(ndr, &r->transport), sizeof(uint16_t), CH_UTF16));
3129 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_transport_0, 0);
3132 return NT_STATUS_OK;
3135 _PUBLIC_ void ndr_print_srvsvc_NetSessInfo502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo502 *r)
3137 ndr_print_struct(ndr, name, "srvsvc_NetSessInfo502");
3138 ndr->depth++;
3139 ndr_print_ptr(ndr, "client", r->client);
3140 ndr->depth++;
3141 if (r->client) {
3142 ndr_print_string(ndr, "client", r->client);
3144 ndr->depth--;
3145 ndr_print_ptr(ndr, "user", r->user);
3146 ndr->depth++;
3147 if (r->user) {
3148 ndr_print_string(ndr, "user", r->user);
3150 ndr->depth--;
3151 ndr_print_uint32(ndr, "num_open", r->num_open);
3152 ndr_print_uint32(ndr, "time", r->time);
3153 ndr_print_uint32(ndr, "idle_time", r->idle_time);
3154 ndr_print_uint32(ndr, "user_flags", r->user_flags);
3155 ndr_print_ptr(ndr, "client_type", r->client_type);
3156 ndr->depth++;
3157 if (r->client_type) {
3158 ndr_print_string(ndr, "client_type", r->client_type);
3160 ndr->depth--;
3161 ndr_print_ptr(ndr, "transport", r->transport);
3162 ndr->depth++;
3163 if (r->transport) {
3164 ndr_print_string(ndr, "transport", r->transport);
3166 ndr->depth--;
3167 ndr->depth--;
3170 NTSTATUS ndr_push_srvsvc_NetSessCtr502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessCtr502 *r)
3172 uint32_t cntr_array_1;
3173 if (ndr_flags & NDR_SCALARS) {
3174 NDR_CHECK(ndr_push_align(ndr, 4));
3175 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
3176 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
3178 if (ndr_flags & NDR_BUFFERS) {
3179 if (r->array) {
3180 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
3181 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3182 NDR_CHECK(ndr_push_srvsvc_NetSessInfo502(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
3184 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3185 NDR_CHECK(ndr_push_srvsvc_NetSessInfo502(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
3189 return NT_STATUS_OK;
3192 NTSTATUS ndr_pull_srvsvc_NetSessCtr502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr502 *r)
3194 uint32_t _ptr_array;
3195 uint32_t cntr_array_1;
3196 TALLOC_CTX *_mem_save_array_0;
3197 TALLOC_CTX *_mem_save_array_1;
3198 if (ndr_flags & NDR_SCALARS) {
3199 NDR_CHECK(ndr_pull_align(ndr, 4));
3200 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
3201 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
3202 if (_ptr_array) {
3203 NDR_PULL_ALLOC(ndr, r->array);
3204 } else {
3205 r->array = NULL;
3208 if (ndr_flags & NDR_BUFFERS) {
3209 if (r->array) {
3210 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
3211 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
3212 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
3213 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
3214 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
3215 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
3216 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3217 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo502(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
3219 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3220 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo502(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
3222 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
3223 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
3225 if (r->array) {
3226 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
3229 return NT_STATUS_OK;
3232 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr502 *r)
3234 uint32_t cntr_array_1;
3235 ndr_print_struct(ndr, name, "srvsvc_NetSessCtr502");
3236 ndr->depth++;
3237 ndr_print_uint32(ndr, "count", r->count);
3238 ndr_print_ptr(ndr, "array", r->array);
3239 ndr->depth++;
3240 if (r->array) {
3241 ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
3242 ndr->depth++;
3243 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
3244 char *idx_1=NULL;
3245 asprintf(&idx_1, "[%d]", cntr_array_1);
3246 if (idx_1) {
3247 ndr_print_srvsvc_NetSessInfo502(ndr, "array", &r->array[cntr_array_1]);
3248 free(idx_1);
3251 ndr->depth--;
3253 ndr->depth--;
3254 ndr->depth--;
3257 NTSTATUS ndr_push_srvsvc_NetSessCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetSessCtr *r)
3259 if (ndr_flags & NDR_SCALARS) {
3260 int level = ndr_push_get_switch_value(ndr, r);
3261 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
3262 switch (level) {
3263 case 0:
3264 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0));
3265 break;
3267 case 1:
3268 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
3269 break;
3271 case 2:
3272 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr2));
3273 break;
3275 case 10:
3276 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr10));
3277 break;
3279 case 502:
3280 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr502));
3281 break;
3283 default:
3284 break;
3288 if (ndr_flags & NDR_BUFFERS) {
3289 int level = ndr_push_get_switch_value(ndr, r);
3290 switch (level) {
3291 case 0:
3292 if (r->ctr0) {
3293 NDR_CHECK(ndr_push_srvsvc_NetSessCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
3295 break;
3297 case 1:
3298 if (r->ctr1) {
3299 NDR_CHECK(ndr_push_srvsvc_NetSessCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
3301 break;
3303 case 2:
3304 if (r->ctr2) {
3305 NDR_CHECK(ndr_push_srvsvc_NetSessCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
3307 break;
3309 case 10:
3310 if (r->ctr10) {
3311 NDR_CHECK(ndr_push_srvsvc_NetSessCtr10(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr10));
3313 break;
3315 case 502:
3316 if (r->ctr502) {
3317 NDR_CHECK(ndr_push_srvsvc_NetSessCtr502(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr502));
3319 break;
3321 default:
3322 break;
3326 return NT_STATUS_OK;
3329 NTSTATUS ndr_pull_srvsvc_NetSessCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetSessCtr *r)
3331 int level;
3332 uint32_t _level;
3333 TALLOC_CTX *_mem_save_ctr0_0;
3334 TALLOC_CTX *_mem_save_ctr1_0;
3335 TALLOC_CTX *_mem_save_ctr2_0;
3336 TALLOC_CTX *_mem_save_ctr10_0;
3337 TALLOC_CTX *_mem_save_ctr502_0;
3338 level = ndr_pull_get_switch_value(ndr, r);
3339 if (ndr_flags & NDR_SCALARS) {
3340 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
3341 if (_level != level) {
3342 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
3344 switch (level) {
3345 case 0: {
3346 uint32_t _ptr_ctr0;
3347 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr0));
3348 if (_ptr_ctr0) {
3349 NDR_PULL_ALLOC(ndr, r->ctr0);
3350 } else {
3351 r->ctr0 = NULL;
3353 break; }
3355 case 1: {
3356 uint32_t _ptr_ctr1;
3357 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
3358 if (_ptr_ctr1) {
3359 NDR_PULL_ALLOC(ndr, r->ctr1);
3360 } else {
3361 r->ctr1 = NULL;
3363 break; }
3365 case 2: {
3366 uint32_t _ptr_ctr2;
3367 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr2));
3368 if (_ptr_ctr2) {
3369 NDR_PULL_ALLOC(ndr, r->ctr2);
3370 } else {
3371 r->ctr2 = NULL;
3373 break; }
3375 case 10: {
3376 uint32_t _ptr_ctr10;
3377 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr10));
3378 if (_ptr_ctr10) {
3379 NDR_PULL_ALLOC(ndr, r->ctr10);
3380 } else {
3381 r->ctr10 = NULL;
3383 break; }
3385 case 502: {
3386 uint32_t _ptr_ctr502;
3387 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr502));
3388 if (_ptr_ctr502) {
3389 NDR_PULL_ALLOC(ndr, r->ctr502);
3390 } else {
3391 r->ctr502 = NULL;
3393 break; }
3395 default: {
3396 break; }
3400 if (ndr_flags & NDR_BUFFERS) {
3401 switch (level) {
3402 case 0:
3403 if (r->ctr0) {
3404 _mem_save_ctr0_0 = NDR_PULL_GET_MEM_CTX(ndr);
3405 NDR_PULL_SET_MEM_CTX(ndr, r->ctr0, 0);
3406 NDR_CHECK(ndr_pull_srvsvc_NetSessCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
3407 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr0_0, 0);
3409 break;
3411 case 1:
3412 if (r->ctr1) {
3413 _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
3414 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
3415 NDR_CHECK(ndr_pull_srvsvc_NetSessCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
3416 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
3418 break;
3420 case 2:
3421 if (r->ctr2) {
3422 _mem_save_ctr2_0 = NDR_PULL_GET_MEM_CTX(ndr);
3423 NDR_PULL_SET_MEM_CTX(ndr, r->ctr2, 0);
3424 NDR_CHECK(ndr_pull_srvsvc_NetSessCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
3425 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr2_0, 0);
3427 break;
3429 case 10:
3430 if (r->ctr10) {
3431 _mem_save_ctr10_0 = NDR_PULL_GET_MEM_CTX(ndr);
3432 NDR_PULL_SET_MEM_CTX(ndr, r->ctr10, 0);
3433 NDR_CHECK(ndr_pull_srvsvc_NetSessCtr10(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr10));
3434 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr10_0, 0);
3436 break;
3438 case 502:
3439 if (r->ctr502) {
3440 _mem_save_ctr502_0 = NDR_PULL_GET_MEM_CTX(ndr);
3441 NDR_PULL_SET_MEM_CTX(ndr, r->ctr502, 0);
3442 NDR_CHECK(ndr_pull_srvsvc_NetSessCtr502(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr502));
3443 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr502_0, 0);
3445 break;
3447 default:
3448 break;
3452 return NT_STATUS_OK;
3455 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetSessCtr *r)
3457 int level;
3458 level = ndr_print_get_switch_value(ndr, r);
3459 ndr_print_union(ndr, name, level, "srvsvc_NetSessCtr");
3460 switch (level) {
3461 case 0:
3462 ndr_print_ptr(ndr, "ctr0", r->ctr0);
3463 ndr->depth++;
3464 if (r->ctr0) {
3465 ndr_print_srvsvc_NetSessCtr0(ndr, "ctr0", r->ctr0);
3467 ndr->depth--;
3468 break;
3470 case 1:
3471 ndr_print_ptr(ndr, "ctr1", r->ctr1);
3472 ndr->depth++;
3473 if (r->ctr1) {
3474 ndr_print_srvsvc_NetSessCtr1(ndr, "ctr1", r->ctr1);
3476 ndr->depth--;
3477 break;
3479 case 2:
3480 ndr_print_ptr(ndr, "ctr2", r->ctr2);
3481 ndr->depth++;
3482 if (r->ctr2) {
3483 ndr_print_srvsvc_NetSessCtr2(ndr, "ctr2", r->ctr2);
3485 ndr->depth--;
3486 break;
3488 case 10:
3489 ndr_print_ptr(ndr, "ctr10", r->ctr10);
3490 ndr->depth++;
3491 if (r->ctr10) {
3492 ndr_print_srvsvc_NetSessCtr10(ndr, "ctr10", r->ctr10);
3494 ndr->depth--;
3495 break;
3497 case 502:
3498 ndr_print_ptr(ndr, "ctr502", r->ctr502);
3499 ndr->depth++;
3500 if (r->ctr502) {
3501 ndr_print_srvsvc_NetSessCtr502(ndr, "ctr502", r->ctr502);
3503 ndr->depth--;
3504 break;
3506 default:
3507 break;
3512 NTSTATUS ndr_push_srvsvc_ShareType(struct ndr_push *ndr, int ndr_flags, enum srvsvc_ShareType r)
3515 uint32_t _flags_save_ENUM = ndr->flags;
3516 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
3517 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
3518 ndr->flags = _flags_save_ENUM;
3520 return NT_STATUS_OK;
3523 NTSTATUS ndr_pull_srvsvc_ShareType(struct ndr_pull *ndr, int ndr_flags, enum srvsvc_ShareType *r)
3525 uint32_t v;
3527 uint32_t _flags_save_ENUM = ndr->flags;
3528 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
3529 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
3530 *r = v;
3531 ndr->flags = _flags_save_ENUM;
3533 return NT_STATUS_OK;
3536 _PUBLIC_ void ndr_print_srvsvc_ShareType(struct ndr_print *ndr, const char *name, enum srvsvc_ShareType r)
3538 const char *val = NULL;
3541 uint32_t _flags_save_ENUM = ndr->flags;
3542 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
3543 switch (r) {
3544 case STYPE_DISKTREE: val = "STYPE_DISKTREE"; break;
3545 case STYPE_DISKTREE_TEMPORARY: val = "STYPE_DISKTREE_TEMPORARY"; break;
3546 case STYPE_DISKTREE_HIDDEN: val = "STYPE_DISKTREE_HIDDEN"; break;
3547 case STYPE_PRINTQ: val = "STYPE_PRINTQ"; break;
3548 case STYPE_PRINTQ_TEMPORARY: val = "STYPE_PRINTQ_TEMPORARY"; break;
3549 case STYPE_PRINTQ_HIDDEN: val = "STYPE_PRINTQ_HIDDEN"; break;
3550 case STYPE_DEVICE: val = "STYPE_DEVICE"; break;
3551 case STYPE_DEVICE_TEMPORARY: val = "STYPE_DEVICE_TEMPORARY"; break;
3552 case STYPE_DEVICE_HIDDEN: val = "STYPE_DEVICE_HIDDEN"; break;
3553 case STYPE_IPC: val = "STYPE_IPC"; break;
3554 case STYPE_IPC_TEMPORARY: val = "STYPE_IPC_TEMPORARY"; break;
3555 case STYPE_IPC_HIDDEN: val = "STYPE_IPC_HIDDEN"; break;
3557 ndr_print_enum(ndr, name, "ENUM", val, r);
3558 ndr->flags = _flags_save_ENUM;
3562 NTSTATUS ndr_push_srvsvc_NetShareInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo0 *r)
3564 if (ndr_flags & NDR_SCALARS) {
3565 NDR_CHECK(ndr_push_align(ndr, 4));
3566 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
3568 if (ndr_flags & NDR_BUFFERS) {
3569 if (r->name) {
3570 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
3571 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3572 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
3573 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3576 return NT_STATUS_OK;
3579 NTSTATUS ndr_pull_srvsvc_NetShareInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo0 *r)
3581 uint32_t _ptr_name;
3582 TALLOC_CTX *_mem_save_name_0;
3583 if (ndr_flags & NDR_SCALARS) {
3584 NDR_CHECK(ndr_pull_align(ndr, 4));
3585 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
3586 if (_ptr_name) {
3587 NDR_PULL_ALLOC(ndr, r->name);
3588 } else {
3589 r->name = NULL;
3592 if (ndr_flags & NDR_BUFFERS) {
3593 if (r->name) {
3594 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
3595 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
3596 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
3597 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
3598 if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->name)) {
3599 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));
3601 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t)));
3602 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t), CH_UTF16));
3603 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
3606 return NT_STATUS_OK;
3609 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo0 *r)
3611 ndr_print_struct(ndr, name, "srvsvc_NetShareInfo0");
3612 ndr->depth++;
3613 ndr_print_ptr(ndr, "name", r->name);
3614 ndr->depth++;
3615 if (r->name) {
3616 ndr_print_string(ndr, "name", r->name);
3618 ndr->depth--;
3619 ndr->depth--;
3622 NTSTATUS ndr_push_srvsvc_NetShareCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr0 *r)
3624 uint32_t cntr_array_1;
3625 if (ndr_flags & NDR_SCALARS) {
3626 NDR_CHECK(ndr_push_align(ndr, 4));
3627 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
3628 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
3630 if (ndr_flags & NDR_BUFFERS) {
3631 if (r->array) {
3632 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
3633 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3634 NDR_CHECK(ndr_push_srvsvc_NetShareInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
3636 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3637 NDR_CHECK(ndr_push_srvsvc_NetShareInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
3641 return NT_STATUS_OK;
3644 NTSTATUS ndr_pull_srvsvc_NetShareCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr0 *r)
3646 uint32_t _ptr_array;
3647 uint32_t cntr_array_1;
3648 TALLOC_CTX *_mem_save_array_0;
3649 TALLOC_CTX *_mem_save_array_1;
3650 if (ndr_flags & NDR_SCALARS) {
3651 NDR_CHECK(ndr_pull_align(ndr, 4));
3652 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
3653 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
3654 if (_ptr_array) {
3655 NDR_PULL_ALLOC(ndr, r->array);
3656 } else {
3657 r->array = NULL;
3660 if (ndr_flags & NDR_BUFFERS) {
3661 if (r->array) {
3662 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
3663 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
3664 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
3665 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
3666 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
3667 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
3668 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3669 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
3671 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3672 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
3674 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
3675 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
3677 if (r->array) {
3678 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
3681 return NT_STATUS_OK;
3684 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr0 *r)
3686 uint32_t cntr_array_1;
3687 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr0");
3688 ndr->depth++;
3689 ndr_print_uint32(ndr, "count", r->count);
3690 ndr_print_ptr(ndr, "array", r->array);
3691 ndr->depth++;
3692 if (r->array) {
3693 ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
3694 ndr->depth++;
3695 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
3696 char *idx_1=NULL;
3697 asprintf(&idx_1, "[%d]", cntr_array_1);
3698 if (idx_1) {
3699 ndr_print_srvsvc_NetShareInfo0(ndr, "array", &r->array[cntr_array_1]);
3700 free(idx_1);
3703 ndr->depth--;
3705 ndr->depth--;
3706 ndr->depth--;
3709 NTSTATUS ndr_push_srvsvc_NetShareInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo1 *r)
3711 if (ndr_flags & NDR_SCALARS) {
3712 NDR_CHECK(ndr_push_align(ndr, 4));
3713 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
3714 NDR_CHECK(ndr_push_srvsvc_ShareType(ndr, NDR_SCALARS, r->type));
3715 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
3717 if (ndr_flags & NDR_BUFFERS) {
3718 if (r->name) {
3719 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
3720 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3721 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
3722 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3724 if (r->comment) {
3725 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
3726 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3727 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
3728 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3731 return NT_STATUS_OK;
3734 NTSTATUS ndr_pull_srvsvc_NetShareInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo1 *r)
3736 uint32_t _ptr_name;
3737 TALLOC_CTX *_mem_save_name_0;
3738 uint32_t _ptr_comment;
3739 TALLOC_CTX *_mem_save_comment_0;
3740 if (ndr_flags & NDR_SCALARS) {
3741 NDR_CHECK(ndr_pull_align(ndr, 4));
3742 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
3743 if (_ptr_name) {
3744 NDR_PULL_ALLOC(ndr, r->name);
3745 } else {
3746 r->name = NULL;
3748 NDR_CHECK(ndr_pull_srvsvc_ShareType(ndr, NDR_SCALARS, &r->type));
3749 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
3750 if (_ptr_comment) {
3751 NDR_PULL_ALLOC(ndr, r->comment);
3752 } else {
3753 r->comment = NULL;
3756 if (ndr_flags & NDR_BUFFERS) {
3757 if (r->name) {
3758 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
3759 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
3760 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
3761 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
3762 if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->name)) {
3763 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));
3765 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t)));
3766 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t), CH_UTF16));
3767 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
3769 if (r->comment) {
3770 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
3771 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
3772 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
3773 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
3774 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
3775 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));
3777 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
3778 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
3779 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
3782 return NT_STATUS_OK;
3785 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1 *r)
3787 ndr_print_struct(ndr, name, "srvsvc_NetShareInfo1");
3788 ndr->depth++;
3789 ndr_print_ptr(ndr, "name", r->name);
3790 ndr->depth++;
3791 if (r->name) {
3792 ndr_print_string(ndr, "name", r->name);
3794 ndr->depth--;
3795 ndr_print_srvsvc_ShareType(ndr, "type", r->type);
3796 ndr_print_ptr(ndr, "comment", r->comment);
3797 ndr->depth++;
3798 if (r->comment) {
3799 ndr_print_string(ndr, "comment", r->comment);
3801 ndr->depth--;
3802 ndr->depth--;
3805 NTSTATUS ndr_push_srvsvc_NetShareCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1 *r)
3807 uint32_t cntr_array_1;
3808 if (ndr_flags & NDR_SCALARS) {
3809 NDR_CHECK(ndr_push_align(ndr, 4));
3810 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
3811 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
3813 if (ndr_flags & NDR_BUFFERS) {
3814 if (r->array) {
3815 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
3816 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3817 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
3819 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3820 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
3824 return NT_STATUS_OK;
3827 NTSTATUS ndr_pull_srvsvc_NetShareCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1 *r)
3829 uint32_t _ptr_array;
3830 uint32_t cntr_array_1;
3831 TALLOC_CTX *_mem_save_array_0;
3832 TALLOC_CTX *_mem_save_array_1;
3833 if (ndr_flags & NDR_SCALARS) {
3834 NDR_CHECK(ndr_pull_align(ndr, 4));
3835 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
3836 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
3837 if (_ptr_array) {
3838 NDR_PULL_ALLOC(ndr, r->array);
3839 } else {
3840 r->array = NULL;
3843 if (ndr_flags & NDR_BUFFERS) {
3844 if (r->array) {
3845 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
3846 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
3847 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
3848 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
3849 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
3850 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
3851 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3852 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
3854 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3855 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
3857 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
3858 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
3860 if (r->array) {
3861 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
3864 return NT_STATUS_OK;
3867 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1 *r)
3869 uint32_t cntr_array_1;
3870 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr1");
3871 ndr->depth++;
3872 ndr_print_uint32(ndr, "count", r->count);
3873 ndr_print_ptr(ndr, "array", r->array);
3874 ndr->depth++;
3875 if (r->array) {
3876 ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
3877 ndr->depth++;
3878 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
3879 char *idx_1=NULL;
3880 asprintf(&idx_1, "[%d]", cntr_array_1);
3881 if (idx_1) {
3882 ndr_print_srvsvc_NetShareInfo1(ndr, "array", &r->array[cntr_array_1]);
3883 free(idx_1);
3886 ndr->depth--;
3888 ndr->depth--;
3889 ndr->depth--;
3892 NTSTATUS ndr_push_srvsvc_NetShareInfo2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo2 *r)
3894 if (ndr_flags & NDR_SCALARS) {
3895 NDR_CHECK(ndr_push_align(ndr, 4));
3896 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
3897 NDR_CHECK(ndr_push_srvsvc_ShareType(ndr, NDR_SCALARS, r->type));
3898 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
3899 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->permissions));
3900 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_users));
3901 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->current_users));
3902 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
3903 NDR_CHECK(ndr_push_unique_ptr(ndr, r->password));
3905 if (ndr_flags & NDR_BUFFERS) {
3906 if (r->name) {
3907 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
3908 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3909 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
3910 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3912 if (r->comment) {
3913 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
3914 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3915 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
3916 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3918 if (r->path) {
3919 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
3920 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3921 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
3922 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3924 if (r->password) {
3925 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->password, CH_UTF16)));
3926 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3927 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->password, CH_UTF16)));
3928 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->password, ndr_charset_length(r->password, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3931 return NT_STATUS_OK;
3934 NTSTATUS ndr_pull_srvsvc_NetShareInfo2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo2 *r)
3936 uint32_t _ptr_name;
3937 TALLOC_CTX *_mem_save_name_0;
3938 uint32_t _ptr_comment;
3939 TALLOC_CTX *_mem_save_comment_0;
3940 uint32_t _ptr_path;
3941 TALLOC_CTX *_mem_save_path_0;
3942 uint32_t _ptr_password;
3943 TALLOC_CTX *_mem_save_password_0;
3944 if (ndr_flags & NDR_SCALARS) {
3945 NDR_CHECK(ndr_pull_align(ndr, 4));
3946 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
3947 if (_ptr_name) {
3948 NDR_PULL_ALLOC(ndr, r->name);
3949 } else {
3950 r->name = NULL;
3952 NDR_CHECK(ndr_pull_srvsvc_ShareType(ndr, NDR_SCALARS, &r->type));
3953 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
3954 if (_ptr_comment) {
3955 NDR_PULL_ALLOC(ndr, r->comment);
3956 } else {
3957 r->comment = NULL;
3959 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->permissions));
3960 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_users));
3961 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->current_users));
3962 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
3963 if (_ptr_path) {
3964 NDR_PULL_ALLOC(ndr, r->path);
3965 } else {
3966 r->path = NULL;
3968 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
3969 if (_ptr_password) {
3970 NDR_PULL_ALLOC(ndr, r->password);
3971 } else {
3972 r->password = NULL;
3975 if (ndr_flags & NDR_BUFFERS) {
3976 if (r->name) {
3977 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
3978 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
3979 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
3980 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
3981 if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->name)) {
3982 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));
3984 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t)));
3985 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t), CH_UTF16));
3986 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
3988 if (r->comment) {
3989 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
3990 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
3991 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
3992 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
3993 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
3994 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));
3996 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
3997 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
3998 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
4000 if (r->path) {
4001 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
4002 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
4003 NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
4004 NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
4005 if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) {
4006 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));
4008 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t)));
4009 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16));
4010 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
4012 if (r->password) {
4013 _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
4014 NDR_PULL_SET_MEM_CTX(ndr, r->password, 0);
4015 NDR_CHECK(ndr_pull_array_size(ndr, &r->password));
4016 NDR_CHECK(ndr_pull_array_length(ndr, &r->password));
4017 if (ndr_get_array_length(ndr, &r->password) > ndr_get_array_size(ndr, &r->password)) {
4018 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));
4020 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->password), sizeof(uint16_t)));
4021 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->password, ndr_get_array_length(ndr, &r->password), sizeof(uint16_t), CH_UTF16));
4022 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
4025 return NT_STATUS_OK;
4028 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo2 *r)
4030 ndr_print_struct(ndr, name, "srvsvc_NetShareInfo2");
4031 ndr->depth++;
4032 ndr_print_ptr(ndr, "name", r->name);
4033 ndr->depth++;
4034 if (r->name) {
4035 ndr_print_string(ndr, "name", r->name);
4037 ndr->depth--;
4038 ndr_print_srvsvc_ShareType(ndr, "type", r->type);
4039 ndr_print_ptr(ndr, "comment", r->comment);
4040 ndr->depth++;
4041 if (r->comment) {
4042 ndr_print_string(ndr, "comment", r->comment);
4044 ndr->depth--;
4045 ndr_print_uint32(ndr, "permissions", r->permissions);
4046 ndr_print_uint32(ndr, "max_users", r->max_users);
4047 ndr_print_uint32(ndr, "current_users", r->current_users);
4048 ndr_print_ptr(ndr, "path", r->path);
4049 ndr->depth++;
4050 if (r->path) {
4051 ndr_print_string(ndr, "path", r->path);
4053 ndr->depth--;
4054 ndr_print_ptr(ndr, "password", r->password);
4055 ndr->depth++;
4056 if (r->password) {
4057 ndr_print_string(ndr, "password", r->password);
4059 ndr->depth--;
4060 ndr->depth--;
4063 NTSTATUS ndr_push_srvsvc_NetShareCtr2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr2 *r)
4065 uint32_t cntr_array_1;
4066 if (ndr_flags & NDR_SCALARS) {
4067 NDR_CHECK(ndr_push_align(ndr, 4));
4068 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4069 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
4071 if (ndr_flags & NDR_BUFFERS) {
4072 if (r->array) {
4073 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4074 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4075 NDR_CHECK(ndr_push_srvsvc_NetShareInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4077 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4078 NDR_CHECK(ndr_push_srvsvc_NetShareInfo2(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
4082 return NT_STATUS_OK;
4085 NTSTATUS ndr_pull_srvsvc_NetShareCtr2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr2 *r)
4087 uint32_t _ptr_array;
4088 uint32_t cntr_array_1;
4089 TALLOC_CTX *_mem_save_array_0;
4090 TALLOC_CTX *_mem_save_array_1;
4091 if (ndr_flags & NDR_SCALARS) {
4092 NDR_CHECK(ndr_pull_align(ndr, 4));
4093 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4094 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
4095 if (_ptr_array) {
4096 NDR_PULL_ALLOC(ndr, r->array);
4097 } else {
4098 r->array = NULL;
4101 if (ndr_flags & NDR_BUFFERS) {
4102 if (r->array) {
4103 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
4104 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4105 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
4106 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
4107 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
4108 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4109 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4110 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4112 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4113 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo2(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
4115 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
4116 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
4118 if (r->array) {
4119 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
4122 return NT_STATUS_OK;
4125 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr2 *r)
4127 uint32_t cntr_array_1;
4128 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr2");
4129 ndr->depth++;
4130 ndr_print_uint32(ndr, "count", r->count);
4131 ndr_print_ptr(ndr, "array", r->array);
4132 ndr->depth++;
4133 if (r->array) {
4134 ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
4135 ndr->depth++;
4136 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
4137 char *idx_1=NULL;
4138 asprintf(&idx_1, "[%d]", cntr_array_1);
4139 if (idx_1) {
4140 ndr_print_srvsvc_NetShareInfo2(ndr, "array", &r->array[cntr_array_1]);
4141 free(idx_1);
4144 ndr->depth--;
4146 ndr->depth--;
4147 ndr->depth--;
4150 NTSTATUS ndr_push_srvsvc_NetShareInfo501(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo501 *r)
4152 if (ndr_flags & NDR_SCALARS) {
4153 NDR_CHECK(ndr_push_align(ndr, 4));
4154 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
4155 NDR_CHECK(ndr_push_srvsvc_ShareType(ndr, NDR_SCALARS, r->type));
4156 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
4157 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->csc_policy));
4159 if (ndr_flags & NDR_BUFFERS) {
4160 if (r->name) {
4161 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
4162 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4163 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
4164 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4166 if (r->comment) {
4167 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
4168 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4169 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
4170 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4173 return NT_STATUS_OK;
4176 NTSTATUS ndr_pull_srvsvc_NetShareInfo501(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo501 *r)
4178 uint32_t _ptr_name;
4179 TALLOC_CTX *_mem_save_name_0;
4180 uint32_t _ptr_comment;
4181 TALLOC_CTX *_mem_save_comment_0;
4182 if (ndr_flags & NDR_SCALARS) {
4183 NDR_CHECK(ndr_pull_align(ndr, 4));
4184 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
4185 if (_ptr_name) {
4186 NDR_PULL_ALLOC(ndr, r->name);
4187 } else {
4188 r->name = NULL;
4190 NDR_CHECK(ndr_pull_srvsvc_ShareType(ndr, NDR_SCALARS, &r->type));
4191 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
4192 if (_ptr_comment) {
4193 NDR_PULL_ALLOC(ndr, r->comment);
4194 } else {
4195 r->comment = NULL;
4197 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->csc_policy));
4199 if (ndr_flags & NDR_BUFFERS) {
4200 if (r->name) {
4201 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4202 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
4203 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
4204 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
4205 if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->name)) {
4206 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));
4208 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t)));
4209 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t), CH_UTF16));
4210 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
4212 if (r->comment) {
4213 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
4214 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
4215 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
4216 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
4217 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
4218 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));
4220 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
4221 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
4222 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
4225 return NT_STATUS_OK;
4228 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo501(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo501 *r)
4230 ndr_print_struct(ndr, name, "srvsvc_NetShareInfo501");
4231 ndr->depth++;
4232 ndr_print_ptr(ndr, "name", r->name);
4233 ndr->depth++;
4234 if (r->name) {
4235 ndr_print_string(ndr, "name", r->name);
4237 ndr->depth--;
4238 ndr_print_srvsvc_ShareType(ndr, "type", r->type);
4239 ndr_print_ptr(ndr, "comment", r->comment);
4240 ndr->depth++;
4241 if (r->comment) {
4242 ndr_print_string(ndr, "comment", r->comment);
4244 ndr->depth--;
4245 ndr_print_uint32(ndr, "csc_policy", r->csc_policy);
4246 ndr->depth--;
4249 NTSTATUS ndr_push_srvsvc_NetShareCtr501(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr501 *r)
4251 uint32_t cntr_array_1;
4252 if (ndr_flags & NDR_SCALARS) {
4253 NDR_CHECK(ndr_push_align(ndr, 4));
4254 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4255 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
4257 if (ndr_flags & NDR_BUFFERS) {
4258 if (r->array) {
4259 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4260 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4261 NDR_CHECK(ndr_push_srvsvc_NetShareInfo501(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4263 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4264 NDR_CHECK(ndr_push_srvsvc_NetShareInfo501(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
4268 return NT_STATUS_OK;
4271 NTSTATUS ndr_pull_srvsvc_NetShareCtr501(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr501 *r)
4273 uint32_t _ptr_array;
4274 uint32_t cntr_array_1;
4275 TALLOC_CTX *_mem_save_array_0;
4276 TALLOC_CTX *_mem_save_array_1;
4277 if (ndr_flags & NDR_SCALARS) {
4278 NDR_CHECK(ndr_pull_align(ndr, 4));
4279 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4280 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
4281 if (_ptr_array) {
4282 NDR_PULL_ALLOC(ndr, r->array);
4283 } else {
4284 r->array = NULL;
4287 if (ndr_flags & NDR_BUFFERS) {
4288 if (r->array) {
4289 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
4290 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4291 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
4292 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
4293 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
4294 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4295 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4296 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo501(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4298 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4299 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo501(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
4301 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
4302 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
4304 if (r->array) {
4305 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
4308 return NT_STATUS_OK;
4311 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr501(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr501 *r)
4313 uint32_t cntr_array_1;
4314 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr501");
4315 ndr->depth++;
4316 ndr_print_uint32(ndr, "count", r->count);
4317 ndr_print_ptr(ndr, "array", r->array);
4318 ndr->depth++;
4319 if (r->array) {
4320 ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
4321 ndr->depth++;
4322 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
4323 char *idx_1=NULL;
4324 asprintf(&idx_1, "[%d]", cntr_array_1);
4325 if (idx_1) {
4326 ndr_print_srvsvc_NetShareInfo501(ndr, "array", &r->array[cntr_array_1]);
4327 free(idx_1);
4330 ndr->depth--;
4332 ndr->depth--;
4333 ndr->depth--;
4336 NTSTATUS ndr_push_srvsvc_NetShareInfo502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo502 *r)
4338 if (ndr_flags & NDR_SCALARS) {
4339 NDR_CHECK(ndr_push_align(ndr, 4));
4340 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
4341 NDR_CHECK(ndr_push_srvsvc_ShareType(ndr, NDR_SCALARS, r->type));
4342 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
4343 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->permissions));
4344 NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, r->max_users));
4345 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->current_users));
4346 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
4347 NDR_CHECK(ndr_push_unique_ptr(ndr, r->password));
4348 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown));
4349 NDR_CHECK(ndr_push_unique_ptr(ndr, r->sd));
4351 if (ndr_flags & NDR_BUFFERS) {
4352 if (r->name) {
4353 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
4354 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4355 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
4356 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4358 if (r->comment) {
4359 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
4360 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4361 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
4362 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4364 if (r->path) {
4365 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
4366 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4367 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
4368 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4370 if (r->password) {
4371 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->password, CH_UTF16)));
4372 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4373 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->password, CH_UTF16)));
4374 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->password, ndr_charset_length(r->password, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4376 if (r->sd) {
4378 struct ndr_push *_ndr_sd;
4379 NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_sd, 4, -1));
4380 NDR_CHECK(ndr_push_security_descriptor(_ndr_sd, NDR_SCALARS|NDR_BUFFERS, r->sd));
4381 NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_sd, 4, -1));
4385 return NT_STATUS_OK;
4388 NTSTATUS ndr_pull_srvsvc_NetShareInfo502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo502 *r)
4390 uint32_t _ptr_name;
4391 TALLOC_CTX *_mem_save_name_0;
4392 uint32_t _ptr_comment;
4393 TALLOC_CTX *_mem_save_comment_0;
4394 uint32_t _ptr_path;
4395 TALLOC_CTX *_mem_save_path_0;
4396 uint32_t _ptr_password;
4397 TALLOC_CTX *_mem_save_password_0;
4398 uint32_t _ptr_sd;
4399 TALLOC_CTX *_mem_save_sd_0;
4400 if (ndr_flags & NDR_SCALARS) {
4401 NDR_CHECK(ndr_pull_align(ndr, 4));
4402 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
4403 if (_ptr_name) {
4404 NDR_PULL_ALLOC(ndr, r->name);
4405 } else {
4406 r->name = NULL;
4408 NDR_CHECK(ndr_pull_srvsvc_ShareType(ndr, NDR_SCALARS, &r->type));
4409 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
4410 if (_ptr_comment) {
4411 NDR_PULL_ALLOC(ndr, r->comment);
4412 } else {
4413 r->comment = NULL;
4415 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->permissions));
4416 NDR_CHECK(ndr_pull_int32(ndr, NDR_SCALARS, &r->max_users));
4417 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->current_users));
4418 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
4419 if (_ptr_path) {
4420 NDR_PULL_ALLOC(ndr, r->path);
4421 } else {
4422 r->path = NULL;
4424 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
4425 if (_ptr_password) {
4426 NDR_PULL_ALLOC(ndr, r->password);
4427 } else {
4428 r->password = NULL;
4430 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown));
4431 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sd));
4432 if (_ptr_sd) {
4433 NDR_PULL_ALLOC(ndr, r->sd);
4434 } else {
4435 r->sd = NULL;
4438 if (ndr_flags & NDR_BUFFERS) {
4439 if (r->name) {
4440 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4441 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
4442 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
4443 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
4444 if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->name)) {
4445 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));
4447 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t)));
4448 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t), CH_UTF16));
4449 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
4451 if (r->comment) {
4452 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
4453 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
4454 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
4455 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
4456 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
4457 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));
4459 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
4460 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
4461 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
4463 if (r->path) {
4464 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
4465 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
4466 NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
4467 NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
4468 if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) {
4469 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));
4471 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t)));
4472 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16));
4473 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
4475 if (r->password) {
4476 _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
4477 NDR_PULL_SET_MEM_CTX(ndr, r->password, 0);
4478 NDR_CHECK(ndr_pull_array_size(ndr, &r->password));
4479 NDR_CHECK(ndr_pull_array_length(ndr, &r->password));
4480 if (ndr_get_array_length(ndr, &r->password) > ndr_get_array_size(ndr, &r->password)) {
4481 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));
4483 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->password), sizeof(uint16_t)));
4484 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->password, ndr_get_array_length(ndr, &r->password), sizeof(uint16_t), CH_UTF16));
4485 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
4487 if (r->sd) {
4488 _mem_save_sd_0 = NDR_PULL_GET_MEM_CTX(ndr);
4489 NDR_PULL_SET_MEM_CTX(ndr, r->sd, 0);
4491 struct ndr_pull *_ndr_sd;
4492 NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_sd, 4, -1));
4493 NDR_CHECK(ndr_pull_security_descriptor(_ndr_sd, NDR_SCALARS|NDR_BUFFERS, r->sd));
4494 NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_sd, 4, -1));
4496 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sd_0, 0);
4499 return NT_STATUS_OK;
4502 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo502 *r)
4504 ndr_print_struct(ndr, name, "srvsvc_NetShareInfo502");
4505 ndr->depth++;
4506 ndr_print_ptr(ndr, "name", r->name);
4507 ndr->depth++;
4508 if (r->name) {
4509 ndr_print_string(ndr, "name", r->name);
4511 ndr->depth--;
4512 ndr_print_srvsvc_ShareType(ndr, "type", r->type);
4513 ndr_print_ptr(ndr, "comment", r->comment);
4514 ndr->depth++;
4515 if (r->comment) {
4516 ndr_print_string(ndr, "comment", r->comment);
4518 ndr->depth--;
4519 ndr_print_uint32(ndr, "permissions", r->permissions);
4520 ndr_print_int32(ndr, "max_users", r->max_users);
4521 ndr_print_uint32(ndr, "current_users", r->current_users);
4522 ndr_print_ptr(ndr, "path", r->path);
4523 ndr->depth++;
4524 if (r->path) {
4525 ndr_print_string(ndr, "path", r->path);
4527 ndr->depth--;
4528 ndr_print_ptr(ndr, "password", r->password);
4529 ndr->depth++;
4530 if (r->password) {
4531 ndr_print_string(ndr, "password", r->password);
4533 ndr->depth--;
4534 ndr_print_uint32(ndr, "unknown", r->unknown);
4535 ndr_print_ptr(ndr, "sd", r->sd);
4536 ndr->depth++;
4537 if (r->sd) {
4538 ndr_print_security_descriptor(ndr, "sd", r->sd);
4540 ndr->depth--;
4541 ndr->depth--;
4544 NTSTATUS ndr_push_srvsvc_NetShareCtr502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr502 *r)
4546 uint32_t cntr_array_1;
4547 if (ndr_flags & NDR_SCALARS) {
4548 NDR_CHECK(ndr_push_align(ndr, 4));
4549 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4550 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
4552 if (ndr_flags & NDR_BUFFERS) {
4553 if (r->array) {
4554 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4555 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4556 NDR_CHECK(ndr_push_srvsvc_NetShareInfo502(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4558 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4559 NDR_CHECK(ndr_push_srvsvc_NetShareInfo502(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
4563 return NT_STATUS_OK;
4566 NTSTATUS ndr_pull_srvsvc_NetShareCtr502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr502 *r)
4568 uint32_t _ptr_array;
4569 uint32_t cntr_array_1;
4570 TALLOC_CTX *_mem_save_array_0;
4571 TALLOC_CTX *_mem_save_array_1;
4572 if (ndr_flags & NDR_SCALARS) {
4573 NDR_CHECK(ndr_pull_align(ndr, 4));
4574 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4575 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
4576 if (_ptr_array) {
4577 NDR_PULL_ALLOC(ndr, r->array);
4578 } else {
4579 r->array = NULL;
4582 if (ndr_flags & NDR_BUFFERS) {
4583 if (r->array) {
4584 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
4585 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4586 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
4587 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
4588 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
4589 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4590 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4591 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo502(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4593 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4594 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo502(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
4596 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
4597 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
4599 if (r->array) {
4600 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
4603 return NT_STATUS_OK;
4606 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr502 *r)
4608 uint32_t cntr_array_1;
4609 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr502");
4610 ndr->depth++;
4611 ndr_print_uint32(ndr, "count", r->count);
4612 ndr_print_ptr(ndr, "array", r->array);
4613 ndr->depth++;
4614 if (r->array) {
4615 ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
4616 ndr->depth++;
4617 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
4618 char *idx_1=NULL;
4619 asprintf(&idx_1, "[%d]", cntr_array_1);
4620 if (idx_1) {
4621 ndr_print_srvsvc_NetShareInfo502(ndr, "array", &r->array[cntr_array_1]);
4622 free(idx_1);
4625 ndr->depth--;
4627 ndr->depth--;
4628 ndr->depth--;
4631 NTSTATUS ndr_push_srvsvc_NetShareInfo1004(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo1004 *r)
4633 if (ndr_flags & NDR_SCALARS) {
4634 NDR_CHECK(ndr_push_align(ndr, 4));
4635 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
4637 if (ndr_flags & NDR_BUFFERS) {
4638 if (r->comment) {
4639 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
4640 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4641 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
4642 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4645 return NT_STATUS_OK;
4648 NTSTATUS ndr_pull_srvsvc_NetShareInfo1004(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo1004 *r)
4650 uint32_t _ptr_comment;
4651 TALLOC_CTX *_mem_save_comment_0;
4652 if (ndr_flags & NDR_SCALARS) {
4653 NDR_CHECK(ndr_pull_align(ndr, 4));
4654 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
4655 if (_ptr_comment) {
4656 NDR_PULL_ALLOC(ndr, r->comment);
4657 } else {
4658 r->comment = NULL;
4661 if (ndr_flags & NDR_BUFFERS) {
4662 if (r->comment) {
4663 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
4664 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
4665 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
4666 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
4667 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
4668 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));
4670 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
4671 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
4672 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
4675 return NT_STATUS_OK;
4678 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1004(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1004 *r)
4680 ndr_print_struct(ndr, name, "srvsvc_NetShareInfo1004");
4681 ndr->depth++;
4682 ndr_print_ptr(ndr, "comment", r->comment);
4683 ndr->depth++;
4684 if (r->comment) {
4685 ndr_print_string(ndr, "comment", r->comment);
4687 ndr->depth--;
4688 ndr->depth--;
4691 NTSTATUS ndr_push_srvsvc_NetShareCtr1004(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1004 *r)
4693 uint32_t cntr_array_1;
4694 if (ndr_flags & NDR_SCALARS) {
4695 NDR_CHECK(ndr_push_align(ndr, 4));
4696 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4697 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
4699 if (ndr_flags & NDR_BUFFERS) {
4700 if (r->array) {
4701 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4702 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4703 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1004(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4705 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4706 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1004(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
4710 return NT_STATUS_OK;
4713 NTSTATUS ndr_pull_srvsvc_NetShareCtr1004(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1004 *r)
4715 uint32_t _ptr_array;
4716 uint32_t cntr_array_1;
4717 TALLOC_CTX *_mem_save_array_0;
4718 TALLOC_CTX *_mem_save_array_1;
4719 if (ndr_flags & NDR_SCALARS) {
4720 NDR_CHECK(ndr_pull_align(ndr, 4));
4721 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4722 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
4723 if (_ptr_array) {
4724 NDR_PULL_ALLOC(ndr, r->array);
4725 } else {
4726 r->array = NULL;
4729 if (ndr_flags & NDR_BUFFERS) {
4730 if (r->array) {
4731 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
4732 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4733 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
4734 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
4735 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
4736 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4737 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4738 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1004(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4740 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4741 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1004(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
4743 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
4744 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
4746 if (r->array) {
4747 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
4750 return NT_STATUS_OK;
4753 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1004(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1004 *r)
4755 uint32_t cntr_array_1;
4756 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr1004");
4757 ndr->depth++;
4758 ndr_print_uint32(ndr, "count", r->count);
4759 ndr_print_ptr(ndr, "array", r->array);
4760 ndr->depth++;
4761 if (r->array) {
4762 ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
4763 ndr->depth++;
4764 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
4765 char *idx_1=NULL;
4766 asprintf(&idx_1, "[%d]", cntr_array_1);
4767 if (idx_1) {
4768 ndr_print_srvsvc_NetShareInfo1004(ndr, "array", &r->array[cntr_array_1]);
4769 free(idx_1);
4772 ndr->depth--;
4774 ndr->depth--;
4775 ndr->depth--;
4778 NTSTATUS ndr_push_NetShareInfo1005Flags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
4780 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
4781 return NT_STATUS_OK;
4784 NTSTATUS ndr_pull_NetShareInfo1005Flags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
4786 uint32_t v;
4787 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
4788 *r = v;
4789 return NT_STATUS_OK;
4792 _PUBLIC_ void ndr_print_NetShareInfo1005Flags(struct ndr_print *ndr, const char *name, uint32_t r)
4794 ndr_print_uint32(ndr, name, r);
4795 ndr->depth++;
4796 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SHARE_1005_IN_DFS", SHARE_1005_IN_DFS, r);
4797 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SHARE_1005_DFS_ROOT", SHARE_1005_DFS_ROOT, r);
4798 ndr->depth--;
4801 NTSTATUS ndr_push_srvsvc_NetShareInfo1005(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo1005 *r)
4803 if (ndr_flags & NDR_SCALARS) {
4804 NDR_CHECK(ndr_push_align(ndr, 4));
4805 NDR_CHECK(ndr_push_NetShareInfo1005Flags(ndr, NDR_SCALARS, r->dfs_flags));
4807 if (ndr_flags & NDR_BUFFERS) {
4809 return NT_STATUS_OK;
4812 NTSTATUS ndr_pull_srvsvc_NetShareInfo1005(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo1005 *r)
4814 if (ndr_flags & NDR_SCALARS) {
4815 NDR_CHECK(ndr_pull_align(ndr, 4));
4816 NDR_CHECK(ndr_pull_NetShareInfo1005Flags(ndr, NDR_SCALARS, &r->dfs_flags));
4818 if (ndr_flags & NDR_BUFFERS) {
4820 return NT_STATUS_OK;
4823 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1005(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1005 *r)
4825 ndr_print_struct(ndr, name, "srvsvc_NetShareInfo1005");
4826 ndr->depth++;
4827 ndr_print_NetShareInfo1005Flags(ndr, "dfs_flags", r->dfs_flags);
4828 ndr->depth--;
4831 NTSTATUS ndr_push_srvsvc_NetShareCtr1005(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1005 *r)
4833 uint32_t cntr_array_1;
4834 if (ndr_flags & NDR_SCALARS) {
4835 NDR_CHECK(ndr_push_align(ndr, 4));
4836 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4837 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
4839 if (ndr_flags & NDR_BUFFERS) {
4840 if (r->array) {
4841 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4842 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4843 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1005(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4847 return NT_STATUS_OK;
4850 NTSTATUS ndr_pull_srvsvc_NetShareCtr1005(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1005 *r)
4852 uint32_t _ptr_array;
4853 uint32_t cntr_array_1;
4854 TALLOC_CTX *_mem_save_array_0;
4855 TALLOC_CTX *_mem_save_array_1;
4856 if (ndr_flags & NDR_SCALARS) {
4857 NDR_CHECK(ndr_pull_align(ndr, 4));
4858 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4859 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
4860 if (_ptr_array) {
4861 NDR_PULL_ALLOC(ndr, r->array);
4862 } else {
4863 r->array = NULL;
4866 if (ndr_flags & NDR_BUFFERS) {
4867 if (r->array) {
4868 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
4869 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4870 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
4871 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
4872 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
4873 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4874 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4875 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1005(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4877 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
4878 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
4880 if (r->array) {
4881 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
4884 return NT_STATUS_OK;
4887 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1005(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1005 *r)
4889 uint32_t cntr_array_1;
4890 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr1005");
4891 ndr->depth++;
4892 ndr_print_uint32(ndr, "count", r->count);
4893 ndr_print_ptr(ndr, "array", r->array);
4894 ndr->depth++;
4895 if (r->array) {
4896 ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
4897 ndr->depth++;
4898 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
4899 char *idx_1=NULL;
4900 asprintf(&idx_1, "[%d]", cntr_array_1);
4901 if (idx_1) {
4902 ndr_print_srvsvc_NetShareInfo1005(ndr, "array", &r->array[cntr_array_1]);
4903 free(idx_1);
4906 ndr->depth--;
4908 ndr->depth--;
4909 ndr->depth--;
4912 NTSTATUS ndr_push_srvsvc_NetShareInfo1006(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo1006 *r)
4914 if (ndr_flags & NDR_SCALARS) {
4915 NDR_CHECK(ndr_push_align(ndr, 4));
4916 NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, r->max_users));
4918 if (ndr_flags & NDR_BUFFERS) {
4920 return NT_STATUS_OK;
4923 NTSTATUS ndr_pull_srvsvc_NetShareInfo1006(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo1006 *r)
4925 if (ndr_flags & NDR_SCALARS) {
4926 NDR_CHECK(ndr_pull_align(ndr, 4));
4927 NDR_CHECK(ndr_pull_int32(ndr, NDR_SCALARS, &r->max_users));
4929 if (ndr_flags & NDR_BUFFERS) {
4931 return NT_STATUS_OK;
4934 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1006(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1006 *r)
4936 ndr_print_struct(ndr, name, "srvsvc_NetShareInfo1006");
4937 ndr->depth++;
4938 ndr_print_int32(ndr, "max_users", r->max_users);
4939 ndr->depth--;
4942 NTSTATUS ndr_push_srvsvc_NetShareCtr1006(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1006 *r)
4944 uint32_t cntr_array_1;
4945 if (ndr_flags & NDR_SCALARS) {
4946 NDR_CHECK(ndr_push_align(ndr, 4));
4947 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4948 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
4950 if (ndr_flags & NDR_BUFFERS) {
4951 if (r->array) {
4952 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4953 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4954 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1006(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4958 return NT_STATUS_OK;
4961 NTSTATUS ndr_pull_srvsvc_NetShareCtr1006(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1006 *r)
4963 uint32_t _ptr_array;
4964 uint32_t cntr_array_1;
4965 TALLOC_CTX *_mem_save_array_0;
4966 TALLOC_CTX *_mem_save_array_1;
4967 if (ndr_flags & NDR_SCALARS) {
4968 NDR_CHECK(ndr_pull_align(ndr, 4));
4969 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4970 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
4971 if (_ptr_array) {
4972 NDR_PULL_ALLOC(ndr, r->array);
4973 } else {
4974 r->array = NULL;
4977 if (ndr_flags & NDR_BUFFERS) {
4978 if (r->array) {
4979 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
4980 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4981 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
4982 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
4983 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
4984 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4985 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4986 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1006(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4988 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
4989 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
4991 if (r->array) {
4992 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
4995 return NT_STATUS_OK;
4998 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1006(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1006 *r)
5000 uint32_t cntr_array_1;
5001 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr1006");
5002 ndr->depth++;
5003 ndr_print_uint32(ndr, "count", r->count);
5004 ndr_print_ptr(ndr, "array", r->array);
5005 ndr->depth++;
5006 if (r->array) {
5007 ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
5008 ndr->depth++;
5009 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
5010 char *idx_1=NULL;
5011 asprintf(&idx_1, "[%d]", cntr_array_1);
5012 if (idx_1) {
5013 ndr_print_srvsvc_NetShareInfo1006(ndr, "array", &r->array[cntr_array_1]);
5014 free(idx_1);
5017 ndr->depth--;
5019 ndr->depth--;
5020 ndr->depth--;
5023 NTSTATUS ndr_push_srvsvc_NetShareInfo1007(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo1007 *r)
5025 if (ndr_flags & NDR_SCALARS) {
5026 NDR_CHECK(ndr_push_align(ndr, 4));
5027 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags));
5028 NDR_CHECK(ndr_push_unique_ptr(ndr, r->alternate_directory_name));
5030 if (ndr_flags & NDR_BUFFERS) {
5031 if (r->alternate_directory_name) {
5032 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->alternate_directory_name, CH_UTF16)));
5033 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5034 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->alternate_directory_name, CH_UTF16)));
5035 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));
5038 return NT_STATUS_OK;
5041 NTSTATUS ndr_pull_srvsvc_NetShareInfo1007(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo1007 *r)
5043 uint32_t _ptr_alternate_directory_name;
5044 TALLOC_CTX *_mem_save_alternate_directory_name_0;
5045 if (ndr_flags & NDR_SCALARS) {
5046 NDR_CHECK(ndr_pull_align(ndr, 4));
5047 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
5048 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_alternate_directory_name));
5049 if (_ptr_alternate_directory_name) {
5050 NDR_PULL_ALLOC(ndr, r->alternate_directory_name);
5051 } else {
5052 r->alternate_directory_name = NULL;
5055 if (ndr_flags & NDR_BUFFERS) {
5056 if (r->alternate_directory_name) {
5057 _mem_save_alternate_directory_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5058 NDR_PULL_SET_MEM_CTX(ndr, r->alternate_directory_name, 0);
5059 NDR_CHECK(ndr_pull_array_size(ndr, &r->alternate_directory_name));
5060 NDR_CHECK(ndr_pull_array_length(ndr, &r->alternate_directory_name));
5061 if (ndr_get_array_length(ndr, &r->alternate_directory_name) > ndr_get_array_size(ndr, &r->alternate_directory_name)) {
5062 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));
5064 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->alternate_directory_name), sizeof(uint16_t)));
5065 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));
5066 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alternate_directory_name_0, 0);
5069 return NT_STATUS_OK;
5072 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1007(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1007 *r)
5074 ndr_print_struct(ndr, name, "srvsvc_NetShareInfo1007");
5075 ndr->depth++;
5076 ndr_print_uint32(ndr, "flags", r->flags);
5077 ndr_print_ptr(ndr, "alternate_directory_name", r->alternate_directory_name);
5078 ndr->depth++;
5079 if (r->alternate_directory_name) {
5080 ndr_print_string(ndr, "alternate_directory_name", r->alternate_directory_name);
5082 ndr->depth--;
5083 ndr->depth--;
5086 NTSTATUS ndr_push_srvsvc_NetShareCtr1007(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1007 *r)
5088 uint32_t cntr_array_1;
5089 if (ndr_flags & NDR_SCALARS) {
5090 NDR_CHECK(ndr_push_align(ndr, 4));
5091 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
5092 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
5094 if (ndr_flags & NDR_BUFFERS) {
5095 if (r->array) {
5096 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
5097 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
5098 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1007(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
5100 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
5101 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1007(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
5105 return NT_STATUS_OK;
5108 NTSTATUS ndr_pull_srvsvc_NetShareCtr1007(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1007 *r)
5110 uint32_t _ptr_array;
5111 uint32_t cntr_array_1;
5112 TALLOC_CTX *_mem_save_array_0;
5113 TALLOC_CTX *_mem_save_array_1;
5114 if (ndr_flags & NDR_SCALARS) {
5115 NDR_CHECK(ndr_pull_align(ndr, 4));
5116 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
5117 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
5118 if (_ptr_array) {
5119 NDR_PULL_ALLOC(ndr, r->array);
5120 } else {
5121 r->array = NULL;
5124 if (ndr_flags & NDR_BUFFERS) {
5125 if (r->array) {
5126 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
5127 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
5128 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
5129 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
5130 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
5131 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
5132 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
5133 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1007(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
5135 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
5136 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1007(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
5138 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
5139 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
5141 if (r->array) {
5142 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
5145 return NT_STATUS_OK;
5148 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1007(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1007 *r)
5150 uint32_t cntr_array_1;
5151 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr1007");
5152 ndr->depth++;
5153 ndr_print_uint32(ndr, "count", r->count);
5154 ndr_print_ptr(ndr, "array", r->array);
5155 ndr->depth++;
5156 if (r->array) {
5157 ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
5158 ndr->depth++;
5159 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
5160 char *idx_1=NULL;
5161 asprintf(&idx_1, "[%d]", cntr_array_1);
5162 if (idx_1) {
5163 ndr_print_srvsvc_NetShareInfo1007(ndr, "array", &r->array[cntr_array_1]);
5164 free(idx_1);
5167 ndr->depth--;
5169 ndr->depth--;
5170 ndr->depth--;
5173 NTSTATUS ndr_push_srvsvc_NetShareCtr1501(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1501 *r)
5175 uint32_t cntr_array_1;
5176 if (ndr_flags & NDR_SCALARS) {
5177 NDR_CHECK(ndr_push_align(ndr, 4));
5178 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
5179 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
5181 if (ndr_flags & NDR_BUFFERS) {
5182 if (r->array) {
5183 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
5184 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
5185 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
5187 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
5188 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
5192 return NT_STATUS_OK;
5195 NTSTATUS ndr_pull_srvsvc_NetShareCtr1501(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1501 *r)
5197 uint32_t _ptr_array;
5198 uint32_t cntr_array_1;
5199 TALLOC_CTX *_mem_save_array_0;
5200 TALLOC_CTX *_mem_save_array_1;
5201 if (ndr_flags & NDR_SCALARS) {
5202 NDR_CHECK(ndr_pull_align(ndr, 4));
5203 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
5204 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
5205 if (_ptr_array) {
5206 NDR_PULL_ALLOC(ndr, r->array);
5207 } else {
5208 r->array = NULL;
5211 if (ndr_flags & NDR_BUFFERS) {
5212 if (r->array) {
5213 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
5214 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
5215 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
5216 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
5217 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
5218 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
5219 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
5220 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
5222 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
5223 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
5225 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
5226 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
5228 if (r->array) {
5229 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
5232 return NT_STATUS_OK;
5235 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1501(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1501 *r)
5237 uint32_t cntr_array_1;
5238 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr1501");
5239 ndr->depth++;
5240 ndr_print_uint32(ndr, "count", r->count);
5241 ndr_print_ptr(ndr, "array", r->array);
5242 ndr->depth++;
5243 if (r->array) {
5244 ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
5245 ndr->depth++;
5246 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
5247 char *idx_1=NULL;
5248 asprintf(&idx_1, "[%d]", cntr_array_1);
5249 if (idx_1) {
5250 ndr_print_sec_desc_buf(ndr, "array", &r->array[cntr_array_1]);
5251 free(idx_1);
5254 ndr->depth--;
5256 ndr->depth--;
5257 ndr->depth--;
5260 NTSTATUS ndr_push_srvsvc_NetShareInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetShareInfo *r)
5262 if (ndr_flags & NDR_SCALARS) {
5263 int level = ndr_push_get_switch_value(ndr, r);
5264 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
5265 switch (level) {
5266 case 0:
5267 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
5268 break;
5270 case 1:
5271 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
5272 break;
5274 case 2:
5275 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
5276 break;
5278 case 501:
5279 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info501));
5280 break;
5282 case 502:
5283 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info502));
5284 break;
5286 case 1004:
5287 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1004));
5288 break;
5290 case 1005:
5291 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1005));
5292 break;
5294 case 1006:
5295 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1006));
5296 break;
5298 case 1007:
5299 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1007));
5300 break;
5302 case 1501:
5303 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1501));
5304 break;
5306 default:
5307 break;
5311 if (ndr_flags & NDR_BUFFERS) {
5312 int level = ndr_push_get_switch_value(ndr, r);
5313 switch (level) {
5314 case 0:
5315 if (r->info0) {
5316 NDR_CHECK(ndr_push_srvsvc_NetShareInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
5318 break;
5320 case 1:
5321 if (r->info1) {
5322 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
5324 break;
5326 case 2:
5327 if (r->info2) {
5328 NDR_CHECK(ndr_push_srvsvc_NetShareInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
5330 break;
5332 case 501:
5333 if (r->info501) {
5334 NDR_CHECK(ndr_push_srvsvc_NetShareInfo501(ndr, NDR_SCALARS|NDR_BUFFERS, r->info501));
5336 break;
5338 case 502:
5339 if (r->info502) {
5340 NDR_CHECK(ndr_push_srvsvc_NetShareInfo502(ndr, NDR_SCALARS|NDR_BUFFERS, r->info502));
5342 break;
5344 case 1004:
5345 if (r->info1004) {
5346 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1004(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1004));
5348 break;
5350 case 1005:
5351 if (r->info1005) {
5352 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1005(ndr, NDR_SCALARS, r->info1005));
5354 break;
5356 case 1006:
5357 if (r->info1006) {
5358 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1006(ndr, NDR_SCALARS, r->info1006));
5360 break;
5362 case 1007:
5363 if (r->info1007) {
5364 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1007(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1007));
5366 break;
5368 case 1501:
5369 if (r->info1501) {
5370 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1501));
5372 break;
5374 default:
5375 break;
5379 return NT_STATUS_OK;
5382 NTSTATUS ndr_pull_srvsvc_NetShareInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetShareInfo *r)
5384 int level;
5385 uint32_t _level;
5386 TALLOC_CTX *_mem_save_info0_0;
5387 TALLOC_CTX *_mem_save_info1_0;
5388 TALLOC_CTX *_mem_save_info2_0;
5389 TALLOC_CTX *_mem_save_info501_0;
5390 TALLOC_CTX *_mem_save_info502_0;
5391 TALLOC_CTX *_mem_save_info1004_0;
5392 TALLOC_CTX *_mem_save_info1005_0;
5393 TALLOC_CTX *_mem_save_info1006_0;
5394 TALLOC_CTX *_mem_save_info1007_0;
5395 TALLOC_CTX *_mem_save_info1501_0;
5396 level = ndr_pull_get_switch_value(ndr, r);
5397 if (ndr_flags & NDR_SCALARS) {
5398 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
5399 if (_level != level) {
5400 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
5402 switch (level) {
5403 case 0: {
5404 uint32_t _ptr_info0;
5405 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
5406 if (_ptr_info0) {
5407 NDR_PULL_ALLOC(ndr, r->info0);
5408 } else {
5409 r->info0 = NULL;
5411 break; }
5413 case 1: {
5414 uint32_t _ptr_info1;
5415 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
5416 if (_ptr_info1) {
5417 NDR_PULL_ALLOC(ndr, r->info1);
5418 } else {
5419 r->info1 = NULL;
5421 break; }
5423 case 2: {
5424 uint32_t _ptr_info2;
5425 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
5426 if (_ptr_info2) {
5427 NDR_PULL_ALLOC(ndr, r->info2);
5428 } else {
5429 r->info2 = NULL;
5431 break; }
5433 case 501: {
5434 uint32_t _ptr_info501;
5435 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info501));
5436 if (_ptr_info501) {
5437 NDR_PULL_ALLOC(ndr, r->info501);
5438 } else {
5439 r->info501 = NULL;
5441 break; }
5443 case 502: {
5444 uint32_t _ptr_info502;
5445 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info502));
5446 if (_ptr_info502) {
5447 NDR_PULL_ALLOC(ndr, r->info502);
5448 } else {
5449 r->info502 = NULL;
5451 break; }
5453 case 1004: {
5454 uint32_t _ptr_info1004;
5455 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1004));
5456 if (_ptr_info1004) {
5457 NDR_PULL_ALLOC(ndr, r->info1004);
5458 } else {
5459 r->info1004 = NULL;
5461 break; }
5463 case 1005: {
5464 uint32_t _ptr_info1005;
5465 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1005));
5466 if (_ptr_info1005) {
5467 NDR_PULL_ALLOC(ndr, r->info1005);
5468 } else {
5469 r->info1005 = NULL;
5471 break; }
5473 case 1006: {
5474 uint32_t _ptr_info1006;
5475 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1006));
5476 if (_ptr_info1006) {
5477 NDR_PULL_ALLOC(ndr, r->info1006);
5478 } else {
5479 r->info1006 = NULL;
5481 break; }
5483 case 1007: {
5484 uint32_t _ptr_info1007;
5485 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1007));
5486 if (_ptr_info1007) {
5487 NDR_PULL_ALLOC(ndr, r->info1007);
5488 } else {
5489 r->info1007 = NULL;
5491 break; }
5493 case 1501: {
5494 uint32_t _ptr_info1501;
5495 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1501));
5496 if (_ptr_info1501) {
5497 NDR_PULL_ALLOC(ndr, r->info1501);
5498 } else {
5499 r->info1501 = NULL;
5501 break; }
5503 default: {
5504 break; }
5508 if (ndr_flags & NDR_BUFFERS) {
5509 switch (level) {
5510 case 0:
5511 if (r->info0) {
5512 _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
5513 NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
5514 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
5515 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
5517 break;
5519 case 1:
5520 if (r->info1) {
5521 _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
5522 NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
5523 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
5524 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
5526 break;
5528 case 2:
5529 if (r->info2) {
5530 _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
5531 NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
5532 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
5533 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
5535 break;
5537 case 501:
5538 if (r->info501) {
5539 _mem_save_info501_0 = NDR_PULL_GET_MEM_CTX(ndr);
5540 NDR_PULL_SET_MEM_CTX(ndr, r->info501, 0);
5541 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo501(ndr, NDR_SCALARS|NDR_BUFFERS, r->info501));
5542 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info501_0, 0);
5544 break;
5546 case 502:
5547 if (r->info502) {
5548 _mem_save_info502_0 = NDR_PULL_GET_MEM_CTX(ndr);
5549 NDR_PULL_SET_MEM_CTX(ndr, r->info502, 0);
5550 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo502(ndr, NDR_SCALARS|NDR_BUFFERS, r->info502));
5551 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info502_0, 0);
5553 break;
5555 case 1004:
5556 if (r->info1004) {
5557 _mem_save_info1004_0 = NDR_PULL_GET_MEM_CTX(ndr);
5558 NDR_PULL_SET_MEM_CTX(ndr, r->info1004, 0);
5559 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1004(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1004));
5560 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1004_0, 0);
5562 break;
5564 case 1005:
5565 if (r->info1005) {
5566 _mem_save_info1005_0 = NDR_PULL_GET_MEM_CTX(ndr);
5567 NDR_PULL_SET_MEM_CTX(ndr, r->info1005, 0);
5568 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1005(ndr, NDR_SCALARS, r->info1005));
5569 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1005_0, 0);
5571 break;
5573 case 1006:
5574 if (r->info1006) {
5575 _mem_save_info1006_0 = NDR_PULL_GET_MEM_CTX(ndr);
5576 NDR_PULL_SET_MEM_CTX(ndr, r->info1006, 0);
5577 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1006(ndr, NDR_SCALARS, r->info1006));
5578 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1006_0, 0);
5580 break;
5582 case 1007:
5583 if (r->info1007) {
5584 _mem_save_info1007_0 = NDR_PULL_GET_MEM_CTX(ndr);
5585 NDR_PULL_SET_MEM_CTX(ndr, r->info1007, 0);
5586 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1007(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1007));
5587 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1007_0, 0);
5589 break;
5591 case 1501:
5592 if (r->info1501) {
5593 _mem_save_info1501_0 = NDR_PULL_GET_MEM_CTX(ndr);
5594 NDR_PULL_SET_MEM_CTX(ndr, r->info1501, 0);
5595 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1501));
5596 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1501_0, 0);
5598 break;
5600 default:
5601 break;
5605 return NT_STATUS_OK;
5608 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetShareInfo *r)
5610 int level;
5611 level = ndr_print_get_switch_value(ndr, r);
5612 ndr_print_union(ndr, name, level, "srvsvc_NetShareInfo");
5613 switch (level) {
5614 case 0:
5615 ndr_print_ptr(ndr, "info0", r->info0);
5616 ndr->depth++;
5617 if (r->info0) {
5618 ndr_print_srvsvc_NetShareInfo0(ndr, "info0", r->info0);
5620 ndr->depth--;
5621 break;
5623 case 1:
5624 ndr_print_ptr(ndr, "info1", r->info1);
5625 ndr->depth++;
5626 if (r->info1) {
5627 ndr_print_srvsvc_NetShareInfo1(ndr, "info1", r->info1);
5629 ndr->depth--;
5630 break;
5632 case 2:
5633 ndr_print_ptr(ndr, "info2", r->info2);
5634 ndr->depth++;
5635 if (r->info2) {
5636 ndr_print_srvsvc_NetShareInfo2(ndr, "info2", r->info2);
5638 ndr->depth--;
5639 break;
5641 case 501:
5642 ndr_print_ptr(ndr, "info501", r->info501);
5643 ndr->depth++;
5644 if (r->info501) {
5645 ndr_print_srvsvc_NetShareInfo501(ndr, "info501", r->info501);
5647 ndr->depth--;
5648 break;
5650 case 502:
5651 ndr_print_ptr(ndr, "info502", r->info502);
5652 ndr->depth++;
5653 if (r->info502) {
5654 ndr_print_srvsvc_NetShareInfo502(ndr, "info502", r->info502);
5656 ndr->depth--;
5657 break;
5659 case 1004:
5660 ndr_print_ptr(ndr, "info1004", r->info1004);
5661 ndr->depth++;
5662 if (r->info1004) {
5663 ndr_print_srvsvc_NetShareInfo1004(ndr, "info1004", r->info1004);
5665 ndr->depth--;
5666 break;
5668 case 1005:
5669 ndr_print_ptr(ndr, "info1005", r->info1005);
5670 ndr->depth++;
5671 if (r->info1005) {
5672 ndr_print_srvsvc_NetShareInfo1005(ndr, "info1005", r->info1005);
5674 ndr->depth--;
5675 break;
5677 case 1006:
5678 ndr_print_ptr(ndr, "info1006", r->info1006);
5679 ndr->depth++;
5680 if (r->info1006) {
5681 ndr_print_srvsvc_NetShareInfo1006(ndr, "info1006", r->info1006);
5683 ndr->depth--;
5684 break;
5686 case 1007:
5687 ndr_print_ptr(ndr, "info1007", r->info1007);
5688 ndr->depth++;
5689 if (r->info1007) {
5690 ndr_print_srvsvc_NetShareInfo1007(ndr, "info1007", r->info1007);
5692 ndr->depth--;
5693 break;
5695 case 1501:
5696 ndr_print_ptr(ndr, "info1501", r->info1501);
5697 ndr->depth++;
5698 if (r->info1501) {
5699 ndr_print_sec_desc_buf(ndr, "info1501", r->info1501);
5701 ndr->depth--;
5702 break;
5704 default:
5705 break;
5710 NTSTATUS ndr_push_srvsvc_NetShareCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetShareCtr *r)
5712 if (ndr_flags & NDR_SCALARS) {
5713 int level = ndr_push_get_switch_value(ndr, r);
5714 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
5715 switch (level) {
5716 case 0:
5717 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0));
5718 break;
5720 case 1:
5721 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
5722 break;
5724 case 2:
5725 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr2));
5726 break;
5728 case 501:
5729 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr501));
5730 break;
5732 case 502:
5733 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr502));
5734 break;
5736 case 1004:
5737 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1004));
5738 break;
5740 case 1005:
5741 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1005));
5742 break;
5744 case 1006:
5745 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1006));
5746 break;
5748 case 1007:
5749 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1007));
5750 break;
5752 case 1501:
5753 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1501));
5754 break;
5756 default:
5757 break;
5761 if (ndr_flags & NDR_BUFFERS) {
5762 int level = ndr_push_get_switch_value(ndr, r);
5763 switch (level) {
5764 case 0:
5765 if (r->ctr0) {
5766 NDR_CHECK(ndr_push_srvsvc_NetShareCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
5768 break;
5770 case 1:
5771 if (r->ctr1) {
5772 NDR_CHECK(ndr_push_srvsvc_NetShareCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
5774 break;
5776 case 2:
5777 if (r->ctr2) {
5778 NDR_CHECK(ndr_push_srvsvc_NetShareCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
5780 break;
5782 case 501:
5783 if (r->ctr501) {
5784 NDR_CHECK(ndr_push_srvsvc_NetShareCtr501(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr501));
5786 break;
5788 case 502:
5789 if (r->ctr502) {
5790 NDR_CHECK(ndr_push_srvsvc_NetShareCtr502(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr502));
5792 break;
5794 case 1004:
5795 if (r->ctr1004) {
5796 NDR_CHECK(ndr_push_srvsvc_NetShareCtr1004(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1004));
5798 break;
5800 case 1005:
5801 if (r->ctr1005) {
5802 NDR_CHECK(ndr_push_srvsvc_NetShareCtr1005(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1005));
5804 break;
5806 case 1006:
5807 if (r->ctr1006) {
5808 NDR_CHECK(ndr_push_srvsvc_NetShareCtr1006(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1006));
5810 break;
5812 case 1007:
5813 if (r->ctr1007) {
5814 NDR_CHECK(ndr_push_srvsvc_NetShareCtr1007(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1007));
5816 break;
5818 case 1501:
5819 if (r->ctr1501) {
5820 NDR_CHECK(ndr_push_srvsvc_NetShareCtr1501(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1501));
5822 break;
5824 default:
5825 break;
5829 return NT_STATUS_OK;
5832 NTSTATUS ndr_pull_srvsvc_NetShareCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetShareCtr *r)
5834 int level;
5835 uint32_t _level;
5836 TALLOC_CTX *_mem_save_ctr0_0;
5837 TALLOC_CTX *_mem_save_ctr1_0;
5838 TALLOC_CTX *_mem_save_ctr2_0;
5839 TALLOC_CTX *_mem_save_ctr501_0;
5840 TALLOC_CTX *_mem_save_ctr502_0;
5841 TALLOC_CTX *_mem_save_ctr1004_0;
5842 TALLOC_CTX *_mem_save_ctr1005_0;
5843 TALLOC_CTX *_mem_save_ctr1006_0;
5844 TALLOC_CTX *_mem_save_ctr1007_0;
5845 TALLOC_CTX *_mem_save_ctr1501_0;
5846 level = ndr_pull_get_switch_value(ndr, r);
5847 if (ndr_flags & NDR_SCALARS) {
5848 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
5849 if (_level != level) {
5850 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
5852 switch (level) {
5853 case 0: {
5854 uint32_t _ptr_ctr0;
5855 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr0));
5856 if (_ptr_ctr0) {
5857 NDR_PULL_ALLOC(ndr, r->ctr0);
5858 } else {
5859 r->ctr0 = NULL;
5861 break; }
5863 case 1: {
5864 uint32_t _ptr_ctr1;
5865 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
5866 if (_ptr_ctr1) {
5867 NDR_PULL_ALLOC(ndr, r->ctr1);
5868 } else {
5869 r->ctr1 = NULL;
5871 break; }
5873 case 2: {
5874 uint32_t _ptr_ctr2;
5875 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr2));
5876 if (_ptr_ctr2) {
5877 NDR_PULL_ALLOC(ndr, r->ctr2);
5878 } else {
5879 r->ctr2 = NULL;
5881 break; }
5883 case 501: {
5884 uint32_t _ptr_ctr501;
5885 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr501));
5886 if (_ptr_ctr501) {
5887 NDR_PULL_ALLOC(ndr, r->ctr501);
5888 } else {
5889 r->ctr501 = NULL;
5891 break; }
5893 case 502: {
5894 uint32_t _ptr_ctr502;
5895 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr502));
5896 if (_ptr_ctr502) {
5897 NDR_PULL_ALLOC(ndr, r->ctr502);
5898 } else {
5899 r->ctr502 = NULL;
5901 break; }
5903 case 1004: {
5904 uint32_t _ptr_ctr1004;
5905 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1004));
5906 if (_ptr_ctr1004) {
5907 NDR_PULL_ALLOC(ndr, r->ctr1004);
5908 } else {
5909 r->ctr1004 = NULL;
5911 break; }
5913 case 1005: {
5914 uint32_t _ptr_ctr1005;
5915 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1005));
5916 if (_ptr_ctr1005) {
5917 NDR_PULL_ALLOC(ndr, r->ctr1005);
5918 } else {
5919 r->ctr1005 = NULL;
5921 break; }
5923 case 1006: {
5924 uint32_t _ptr_ctr1006;
5925 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1006));
5926 if (_ptr_ctr1006) {
5927 NDR_PULL_ALLOC(ndr, r->ctr1006);
5928 } else {
5929 r->ctr1006 = NULL;
5931 break; }
5933 case 1007: {
5934 uint32_t _ptr_ctr1007;
5935 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1007));
5936 if (_ptr_ctr1007) {
5937 NDR_PULL_ALLOC(ndr, r->ctr1007);
5938 } else {
5939 r->ctr1007 = NULL;
5941 break; }
5943 case 1501: {
5944 uint32_t _ptr_ctr1501;
5945 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1501));
5946 if (_ptr_ctr1501) {
5947 NDR_PULL_ALLOC(ndr, r->ctr1501);
5948 } else {
5949 r->ctr1501 = NULL;
5951 break; }
5953 default: {
5954 break; }
5958 if (ndr_flags & NDR_BUFFERS) {
5959 switch (level) {
5960 case 0:
5961 if (r->ctr0) {
5962 _mem_save_ctr0_0 = NDR_PULL_GET_MEM_CTX(ndr);
5963 NDR_PULL_SET_MEM_CTX(ndr, r->ctr0, 0);
5964 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
5965 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr0_0, 0);
5967 break;
5969 case 1:
5970 if (r->ctr1) {
5971 _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
5972 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
5973 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
5974 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
5976 break;
5978 case 2:
5979 if (r->ctr2) {
5980 _mem_save_ctr2_0 = NDR_PULL_GET_MEM_CTX(ndr);
5981 NDR_PULL_SET_MEM_CTX(ndr, r->ctr2, 0);
5982 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
5983 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr2_0, 0);
5985 break;
5987 case 501:
5988 if (r->ctr501) {
5989 _mem_save_ctr501_0 = NDR_PULL_GET_MEM_CTX(ndr);
5990 NDR_PULL_SET_MEM_CTX(ndr, r->ctr501, 0);
5991 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr501(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr501));
5992 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr501_0, 0);
5994 break;
5996 case 502:
5997 if (r->ctr502) {
5998 _mem_save_ctr502_0 = NDR_PULL_GET_MEM_CTX(ndr);
5999 NDR_PULL_SET_MEM_CTX(ndr, r->ctr502, 0);
6000 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr502(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr502));
6001 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr502_0, 0);
6003 break;
6005 case 1004:
6006 if (r->ctr1004) {
6007 _mem_save_ctr1004_0 = NDR_PULL_GET_MEM_CTX(ndr);
6008 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1004, 0);
6009 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr1004(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1004));
6010 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1004_0, 0);
6012 break;
6014 case 1005:
6015 if (r->ctr1005) {
6016 _mem_save_ctr1005_0 = NDR_PULL_GET_MEM_CTX(ndr);
6017 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1005, 0);
6018 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr1005(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1005));
6019 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1005_0, 0);
6021 break;
6023 case 1006:
6024 if (r->ctr1006) {
6025 _mem_save_ctr1006_0 = NDR_PULL_GET_MEM_CTX(ndr);
6026 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1006, 0);
6027 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr1006(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1006));
6028 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1006_0, 0);
6030 break;
6032 case 1007:
6033 if (r->ctr1007) {
6034 _mem_save_ctr1007_0 = NDR_PULL_GET_MEM_CTX(ndr);
6035 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1007, 0);
6036 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr1007(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1007));
6037 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1007_0, 0);
6039 break;
6041 case 1501:
6042 if (r->ctr1501) {
6043 _mem_save_ctr1501_0 = NDR_PULL_GET_MEM_CTX(ndr);
6044 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1501, 0);
6045 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr1501(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1501));
6046 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1501_0, 0);
6048 break;
6050 default:
6051 break;
6055 return NT_STATUS_OK;
6058 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetShareCtr *r)
6060 int level;
6061 level = ndr_print_get_switch_value(ndr, r);
6062 ndr_print_union(ndr, name, level, "srvsvc_NetShareCtr");
6063 switch (level) {
6064 case 0:
6065 ndr_print_ptr(ndr, "ctr0", r->ctr0);
6066 ndr->depth++;
6067 if (r->ctr0) {
6068 ndr_print_srvsvc_NetShareCtr0(ndr, "ctr0", r->ctr0);
6070 ndr->depth--;
6071 break;
6073 case 1:
6074 ndr_print_ptr(ndr, "ctr1", r->ctr1);
6075 ndr->depth++;
6076 if (r->ctr1) {
6077 ndr_print_srvsvc_NetShareCtr1(ndr, "ctr1", r->ctr1);
6079 ndr->depth--;
6080 break;
6082 case 2:
6083 ndr_print_ptr(ndr, "ctr2", r->ctr2);
6084 ndr->depth++;
6085 if (r->ctr2) {
6086 ndr_print_srvsvc_NetShareCtr2(ndr, "ctr2", r->ctr2);
6088 ndr->depth--;
6089 break;
6091 case 501:
6092 ndr_print_ptr(ndr, "ctr501", r->ctr501);
6093 ndr->depth++;
6094 if (r->ctr501) {
6095 ndr_print_srvsvc_NetShareCtr501(ndr, "ctr501", r->ctr501);
6097 ndr->depth--;
6098 break;
6100 case 502:
6101 ndr_print_ptr(ndr, "ctr502", r->ctr502);
6102 ndr->depth++;
6103 if (r->ctr502) {
6104 ndr_print_srvsvc_NetShareCtr502(ndr, "ctr502", r->ctr502);
6106 ndr->depth--;
6107 break;
6109 case 1004:
6110 ndr_print_ptr(ndr, "ctr1004", r->ctr1004);
6111 ndr->depth++;
6112 if (r->ctr1004) {
6113 ndr_print_srvsvc_NetShareCtr1004(ndr, "ctr1004", r->ctr1004);
6115 ndr->depth--;
6116 break;
6118 case 1005:
6119 ndr_print_ptr(ndr, "ctr1005", r->ctr1005);
6120 ndr->depth++;
6121 if (r->ctr1005) {
6122 ndr_print_srvsvc_NetShareCtr1005(ndr, "ctr1005", r->ctr1005);
6124 ndr->depth--;
6125 break;
6127 case 1006:
6128 ndr_print_ptr(ndr, "ctr1006", r->ctr1006);
6129 ndr->depth++;
6130 if (r->ctr1006) {
6131 ndr_print_srvsvc_NetShareCtr1006(ndr, "ctr1006", r->ctr1006);
6133 ndr->depth--;
6134 break;
6136 case 1007:
6137 ndr_print_ptr(ndr, "ctr1007", r->ctr1007);
6138 ndr->depth++;
6139 if (r->ctr1007) {
6140 ndr_print_srvsvc_NetShareCtr1007(ndr, "ctr1007", r->ctr1007);
6142 ndr->depth--;
6143 break;
6145 case 1501:
6146 ndr_print_ptr(ndr, "ctr1501", r->ctr1501);
6147 ndr->depth++;
6148 if (r->ctr1501) {
6149 ndr_print_srvsvc_NetShareCtr1501(ndr, "ctr1501", r->ctr1501);
6151 ndr->depth--;
6152 break;
6154 default:
6155 break;
6160 _PUBLIC_ NTSTATUS ndr_push_srvsvc_PlatformId(struct ndr_push *ndr, int ndr_flags, enum srvsvc_PlatformId r)
6162 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
6163 return NT_STATUS_OK;
6166 _PUBLIC_ NTSTATUS ndr_pull_srvsvc_PlatformId(struct ndr_pull *ndr, int ndr_flags, enum srvsvc_PlatformId *r)
6168 uint32_t v;
6169 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
6170 *r = v;
6171 return NT_STATUS_OK;
6174 _PUBLIC_ void ndr_print_srvsvc_PlatformId(struct ndr_print *ndr, const char *name, enum srvsvc_PlatformId r)
6176 const char *val = NULL;
6178 switch (r) {
6179 case PLATFORM_ID_DOS: val = "PLATFORM_ID_DOS"; break;
6180 case PLATFORM_ID_OS2: val = "PLATFORM_ID_OS2"; break;
6181 case PLATFORM_ID_NT: val = "PLATFORM_ID_NT"; break;
6182 case PLATFORM_ID_OSF: val = "PLATFORM_ID_OSF"; break;
6183 case PLATFORM_ID_VMS: val = "PLATFORM_ID_VMS"; break;
6185 ndr_print_enum(ndr, name, "ENUM", val, r);
6188 NTSTATUS ndr_push_srvsvc_NetSrvInfo100(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo100 *r)
6190 if (ndr_flags & NDR_SCALARS) {
6191 NDR_CHECK(ndr_push_align(ndr, 4));
6192 NDR_CHECK(ndr_push_srvsvc_PlatformId(ndr, NDR_SCALARS, r->platform_id));
6193 NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_name));
6195 if (ndr_flags & NDR_BUFFERS) {
6196 if (r->server_name) {
6197 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
6198 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6199 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
6200 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server_name, ndr_charset_length(r->server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6203 return NT_STATUS_OK;
6206 NTSTATUS ndr_pull_srvsvc_NetSrvInfo100(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo100 *r)
6208 uint32_t _ptr_server_name;
6209 TALLOC_CTX *_mem_save_server_name_0;
6210 if (ndr_flags & NDR_SCALARS) {
6211 NDR_CHECK(ndr_pull_align(ndr, 4));
6212 NDR_CHECK(ndr_pull_srvsvc_PlatformId(ndr, NDR_SCALARS, &r->platform_id));
6213 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
6214 if (_ptr_server_name) {
6215 NDR_PULL_ALLOC(ndr, r->server_name);
6216 } else {
6217 r->server_name = NULL;
6220 if (ndr_flags & NDR_BUFFERS) {
6221 if (r->server_name) {
6222 _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6223 NDR_PULL_SET_MEM_CTX(ndr, r->server_name, 0);
6224 NDR_CHECK(ndr_pull_array_size(ndr, &r->server_name));
6225 NDR_CHECK(ndr_pull_array_length(ndr, &r->server_name));
6226 if (ndr_get_array_length(ndr, &r->server_name) > ndr_get_array_size(ndr, &r->server_name)) {
6227 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));
6229 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->server_name), sizeof(uint16_t)));
6230 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server_name, ndr_get_array_length(ndr, &r->server_name), sizeof(uint16_t), CH_UTF16));
6231 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
6234 return NT_STATUS_OK;
6237 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo100(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo100 *r)
6239 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo100");
6240 ndr->depth++;
6241 ndr_print_srvsvc_PlatformId(ndr, "platform_id", r->platform_id);
6242 ndr_print_ptr(ndr, "server_name", r->server_name);
6243 ndr->depth++;
6244 if (r->server_name) {
6245 ndr_print_string(ndr, "server_name", r->server_name);
6247 ndr->depth--;
6248 ndr->depth--;
6251 NTSTATUS ndr_push_srvsvc_NetSrvInfo101(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo101 *r)
6253 if (ndr_flags & NDR_SCALARS) {
6254 NDR_CHECK(ndr_push_align(ndr, 4));
6255 NDR_CHECK(ndr_push_srvsvc_PlatformId(ndr, NDR_SCALARS, r->platform_id));
6256 NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_name));
6257 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version_major));
6258 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version_minor));
6259 NDR_CHECK(ndr_push_svcctl_ServerType(ndr, NDR_SCALARS, r->server_type));
6260 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
6262 if (ndr_flags & NDR_BUFFERS) {
6263 if (r->server_name) {
6264 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
6265 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6266 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
6267 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server_name, ndr_charset_length(r->server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6269 if (r->comment) {
6270 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
6271 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6272 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
6273 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6276 return NT_STATUS_OK;
6279 NTSTATUS ndr_pull_srvsvc_NetSrvInfo101(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo101 *r)
6281 uint32_t _ptr_server_name;
6282 TALLOC_CTX *_mem_save_server_name_0;
6283 uint32_t _ptr_comment;
6284 TALLOC_CTX *_mem_save_comment_0;
6285 if (ndr_flags & NDR_SCALARS) {
6286 NDR_CHECK(ndr_pull_align(ndr, 4));
6287 NDR_CHECK(ndr_pull_srvsvc_PlatformId(ndr, NDR_SCALARS, &r->platform_id));
6288 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
6289 if (_ptr_server_name) {
6290 NDR_PULL_ALLOC(ndr, r->server_name);
6291 } else {
6292 r->server_name = NULL;
6294 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version_major));
6295 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version_minor));
6296 NDR_CHECK(ndr_pull_svcctl_ServerType(ndr, NDR_SCALARS, &r->server_type));
6297 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
6298 if (_ptr_comment) {
6299 NDR_PULL_ALLOC(ndr, r->comment);
6300 } else {
6301 r->comment = NULL;
6304 if (ndr_flags & NDR_BUFFERS) {
6305 if (r->server_name) {
6306 _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6307 NDR_PULL_SET_MEM_CTX(ndr, r->server_name, 0);
6308 NDR_CHECK(ndr_pull_array_size(ndr, &r->server_name));
6309 NDR_CHECK(ndr_pull_array_length(ndr, &r->server_name));
6310 if (ndr_get_array_length(ndr, &r->server_name) > ndr_get_array_size(ndr, &r->server_name)) {
6311 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));
6313 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->server_name), sizeof(uint16_t)));
6314 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server_name, ndr_get_array_length(ndr, &r->server_name), sizeof(uint16_t), CH_UTF16));
6315 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
6317 if (r->comment) {
6318 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
6319 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
6320 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
6321 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
6322 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
6323 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));
6325 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
6326 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
6327 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
6330 return NT_STATUS_OK;
6333 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo101(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo101 *r)
6335 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo101");
6336 ndr->depth++;
6337 ndr_print_srvsvc_PlatformId(ndr, "platform_id", r->platform_id);
6338 ndr_print_ptr(ndr, "server_name", r->server_name);
6339 ndr->depth++;
6340 if (r->server_name) {
6341 ndr_print_string(ndr, "server_name", r->server_name);
6343 ndr->depth--;
6344 ndr_print_uint32(ndr, "version_major", r->version_major);
6345 ndr_print_uint32(ndr, "version_minor", r->version_minor);
6346 ndr_print_svcctl_ServerType(ndr, "server_type", r->server_type);
6347 ndr_print_ptr(ndr, "comment", r->comment);
6348 ndr->depth++;
6349 if (r->comment) {
6350 ndr_print_string(ndr, "comment", r->comment);
6352 ndr->depth--;
6353 ndr->depth--;
6356 NTSTATUS ndr_push_srvsvc_NetSrvInfo102(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo102 *r)
6358 if (ndr_flags & NDR_SCALARS) {
6359 NDR_CHECK(ndr_push_align(ndr, 4));
6360 NDR_CHECK(ndr_push_srvsvc_PlatformId(ndr, NDR_SCALARS, r->platform_id));
6361 NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_name));
6362 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version_major));
6363 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version_minor));
6364 NDR_CHECK(ndr_push_svcctl_ServerType(ndr, NDR_SCALARS, r->server_type));
6365 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
6366 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->users));
6367 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->disc));
6368 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->hidden));
6369 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->announce));
6370 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->anndelta));
6371 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->licenses));
6372 NDR_CHECK(ndr_push_unique_ptr(ndr, r->userpath));
6374 if (ndr_flags & NDR_BUFFERS) {
6375 if (r->server_name) {
6376 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
6377 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6378 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
6379 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server_name, ndr_charset_length(r->server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6381 if (r->comment) {
6382 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
6383 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6384 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
6385 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6387 if (r->userpath) {
6388 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->userpath, CH_UTF16)));
6389 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6390 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->userpath, CH_UTF16)));
6391 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->userpath, ndr_charset_length(r->userpath, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6394 return NT_STATUS_OK;
6397 NTSTATUS ndr_pull_srvsvc_NetSrvInfo102(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo102 *r)
6399 uint32_t _ptr_server_name;
6400 TALLOC_CTX *_mem_save_server_name_0;
6401 uint32_t _ptr_comment;
6402 TALLOC_CTX *_mem_save_comment_0;
6403 uint32_t _ptr_userpath;
6404 TALLOC_CTX *_mem_save_userpath_0;
6405 if (ndr_flags & NDR_SCALARS) {
6406 NDR_CHECK(ndr_pull_align(ndr, 4));
6407 NDR_CHECK(ndr_pull_srvsvc_PlatformId(ndr, NDR_SCALARS, &r->platform_id));
6408 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
6409 if (_ptr_server_name) {
6410 NDR_PULL_ALLOC(ndr, r->server_name);
6411 } else {
6412 r->server_name = NULL;
6414 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version_major));
6415 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version_minor));
6416 NDR_CHECK(ndr_pull_svcctl_ServerType(ndr, NDR_SCALARS, &r->server_type));
6417 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
6418 if (_ptr_comment) {
6419 NDR_PULL_ALLOC(ndr, r->comment);
6420 } else {
6421 r->comment = NULL;
6423 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->users));
6424 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->disc));
6425 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->hidden));
6426 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->announce));
6427 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->anndelta));
6428 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->licenses));
6429 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_userpath));
6430 if (_ptr_userpath) {
6431 NDR_PULL_ALLOC(ndr, r->userpath);
6432 } else {
6433 r->userpath = NULL;
6436 if (ndr_flags & NDR_BUFFERS) {
6437 if (r->server_name) {
6438 _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6439 NDR_PULL_SET_MEM_CTX(ndr, r->server_name, 0);
6440 NDR_CHECK(ndr_pull_array_size(ndr, &r->server_name));
6441 NDR_CHECK(ndr_pull_array_length(ndr, &r->server_name));
6442 if (ndr_get_array_length(ndr, &r->server_name) > ndr_get_array_size(ndr, &r->server_name)) {
6443 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));
6445 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->server_name), sizeof(uint16_t)));
6446 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server_name, ndr_get_array_length(ndr, &r->server_name), sizeof(uint16_t), CH_UTF16));
6447 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
6449 if (r->comment) {
6450 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
6451 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
6452 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
6453 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
6454 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
6455 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));
6457 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
6458 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
6459 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
6461 if (r->userpath) {
6462 _mem_save_userpath_0 = NDR_PULL_GET_MEM_CTX(ndr);
6463 NDR_PULL_SET_MEM_CTX(ndr, r->userpath, 0);
6464 NDR_CHECK(ndr_pull_array_size(ndr, &r->userpath));
6465 NDR_CHECK(ndr_pull_array_length(ndr, &r->userpath));
6466 if (ndr_get_array_length(ndr, &r->userpath) > ndr_get_array_size(ndr, &r->userpath)) {
6467 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));
6469 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->userpath), sizeof(uint16_t)));
6470 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->userpath, ndr_get_array_length(ndr, &r->userpath), sizeof(uint16_t), CH_UTF16));
6471 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_userpath_0, 0);
6474 return NT_STATUS_OK;
6477 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo102(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo102 *r)
6479 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo102");
6480 ndr->depth++;
6481 ndr_print_srvsvc_PlatformId(ndr, "platform_id", r->platform_id);
6482 ndr_print_ptr(ndr, "server_name", r->server_name);
6483 ndr->depth++;
6484 if (r->server_name) {
6485 ndr_print_string(ndr, "server_name", r->server_name);
6487 ndr->depth--;
6488 ndr_print_uint32(ndr, "version_major", r->version_major);
6489 ndr_print_uint32(ndr, "version_minor", r->version_minor);
6490 ndr_print_svcctl_ServerType(ndr, "server_type", r->server_type);
6491 ndr_print_ptr(ndr, "comment", r->comment);
6492 ndr->depth++;
6493 if (r->comment) {
6494 ndr_print_string(ndr, "comment", r->comment);
6496 ndr->depth--;
6497 ndr_print_uint32(ndr, "users", r->users);
6498 ndr_print_uint32(ndr, "disc", r->disc);
6499 ndr_print_uint32(ndr, "hidden", r->hidden);
6500 ndr_print_uint32(ndr, "announce", r->announce);
6501 ndr_print_uint32(ndr, "anndelta", r->anndelta);
6502 ndr_print_uint32(ndr, "licenses", r->licenses);
6503 ndr_print_ptr(ndr, "userpath", r->userpath);
6504 ndr->depth++;
6505 if (r->userpath) {
6506 ndr_print_string(ndr, "userpath", r->userpath);
6508 ndr->depth--;
6509 ndr->depth--;
6512 NTSTATUS ndr_push_srvsvc_NetSrvInfo402(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo402 *r)
6514 if (ndr_flags & NDR_SCALARS) {
6515 NDR_CHECK(ndr_push_align(ndr, 4));
6516 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ulist_mtime));
6517 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->glist_mtime));
6518 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->alist_mtime));
6519 NDR_CHECK(ndr_push_unique_ptr(ndr, r->alerts));
6520 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->security));
6521 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numadmin));
6522 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lanmask));
6523 NDR_CHECK(ndr_push_unique_ptr(ndr, r->guestaccount));
6524 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->chdevs));
6525 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->chdevqs));
6526 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->chdevjobs));
6527 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->connections));
6528 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->shares));
6529 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->openfiles));
6530 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessopen));
6531 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sesssvc));
6532 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessreqs));
6533 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->opensearch));
6534 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->activelocks));
6535 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sizereqbufs));
6536 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numbigbufs));
6537 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numfiletasks));
6538 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->alertsched));
6539 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->erroralert));
6540 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->logonalert));
6541 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->accessalert));
6542 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->diskalert));
6543 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->netioalert));
6544 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxaudits));
6545 NDR_CHECK(ndr_push_unique_ptr(ndr, r->srvheuristics));
6547 if (ndr_flags & NDR_BUFFERS) {
6548 if (r->alerts) {
6549 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->alerts, CH_UTF16)));
6550 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6551 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->alerts, CH_UTF16)));
6552 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->alerts, ndr_charset_length(r->alerts, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6554 if (r->guestaccount) {
6555 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->guestaccount, CH_UTF16)));
6556 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6557 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->guestaccount, CH_UTF16)));
6558 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->guestaccount, ndr_charset_length(r->guestaccount, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6560 if (r->srvheuristics) {
6561 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->srvheuristics, CH_UTF16)));
6562 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6563 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->srvheuristics, CH_UTF16)));
6564 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->srvheuristics, ndr_charset_length(r->srvheuristics, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6567 return NT_STATUS_OK;
6570 NTSTATUS ndr_pull_srvsvc_NetSrvInfo402(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo402 *r)
6572 uint32_t _ptr_alerts;
6573 TALLOC_CTX *_mem_save_alerts_0;
6574 uint32_t _ptr_guestaccount;
6575 TALLOC_CTX *_mem_save_guestaccount_0;
6576 uint32_t _ptr_srvheuristics;
6577 TALLOC_CTX *_mem_save_srvheuristics_0;
6578 if (ndr_flags & NDR_SCALARS) {
6579 NDR_CHECK(ndr_pull_align(ndr, 4));
6580 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ulist_mtime));
6581 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->glist_mtime));
6582 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->alist_mtime));
6583 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_alerts));
6584 if (_ptr_alerts) {
6585 NDR_PULL_ALLOC(ndr, r->alerts);
6586 } else {
6587 r->alerts = NULL;
6589 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->security));
6590 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numadmin));
6591 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lanmask));
6592 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_guestaccount));
6593 if (_ptr_guestaccount) {
6594 NDR_PULL_ALLOC(ndr, r->guestaccount);
6595 } else {
6596 r->guestaccount = NULL;
6598 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->chdevs));
6599 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->chdevqs));
6600 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->chdevjobs));
6601 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->connections));
6602 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->shares));
6603 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->openfiles));
6604 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessopen));
6605 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sesssvc));
6606 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessreqs));
6607 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->opensearch));
6608 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->activelocks));
6609 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sizereqbufs));
6610 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numbigbufs));
6611 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numfiletasks));
6612 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->alertsched));
6613 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->erroralert));
6614 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->logonalert));
6615 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->accessalert));
6616 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->diskalert));
6617 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->netioalert));
6618 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxaudits));
6619 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_srvheuristics));
6620 if (_ptr_srvheuristics) {
6621 NDR_PULL_ALLOC(ndr, r->srvheuristics);
6622 } else {
6623 r->srvheuristics = NULL;
6626 if (ndr_flags & NDR_BUFFERS) {
6627 if (r->alerts) {
6628 _mem_save_alerts_0 = NDR_PULL_GET_MEM_CTX(ndr);
6629 NDR_PULL_SET_MEM_CTX(ndr, r->alerts, 0);
6630 NDR_CHECK(ndr_pull_array_size(ndr, &r->alerts));
6631 NDR_CHECK(ndr_pull_array_length(ndr, &r->alerts));
6632 if (ndr_get_array_length(ndr, &r->alerts) > ndr_get_array_size(ndr, &r->alerts)) {
6633 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));
6635 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->alerts), sizeof(uint16_t)));
6636 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->alerts, ndr_get_array_length(ndr, &r->alerts), sizeof(uint16_t), CH_UTF16));
6637 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alerts_0, 0);
6639 if (r->guestaccount) {
6640 _mem_save_guestaccount_0 = NDR_PULL_GET_MEM_CTX(ndr);
6641 NDR_PULL_SET_MEM_CTX(ndr, r->guestaccount, 0);
6642 NDR_CHECK(ndr_pull_array_size(ndr, &r->guestaccount));
6643 NDR_CHECK(ndr_pull_array_length(ndr, &r->guestaccount));
6644 if (ndr_get_array_length(ndr, &r->guestaccount) > ndr_get_array_size(ndr, &r->guestaccount)) {
6645 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));
6647 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->guestaccount), sizeof(uint16_t)));
6648 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->guestaccount, ndr_get_array_length(ndr, &r->guestaccount), sizeof(uint16_t), CH_UTF16));
6649 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_guestaccount_0, 0);
6651 if (r->srvheuristics) {
6652 _mem_save_srvheuristics_0 = NDR_PULL_GET_MEM_CTX(ndr);
6653 NDR_PULL_SET_MEM_CTX(ndr, r->srvheuristics, 0);
6654 NDR_CHECK(ndr_pull_array_size(ndr, &r->srvheuristics));
6655 NDR_CHECK(ndr_pull_array_length(ndr, &r->srvheuristics));
6656 if (ndr_get_array_length(ndr, &r->srvheuristics) > ndr_get_array_size(ndr, &r->srvheuristics)) {
6657 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));
6659 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->srvheuristics), sizeof(uint16_t)));
6660 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->srvheuristics, ndr_get_array_length(ndr, &r->srvheuristics), sizeof(uint16_t), CH_UTF16));
6661 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_srvheuristics_0, 0);
6664 return NT_STATUS_OK;
6667 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo402(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo402 *r)
6669 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo402");
6670 ndr->depth++;
6671 ndr_print_uint32(ndr, "ulist_mtime", r->ulist_mtime);
6672 ndr_print_uint32(ndr, "glist_mtime", r->glist_mtime);
6673 ndr_print_uint32(ndr, "alist_mtime", r->alist_mtime);
6674 ndr_print_ptr(ndr, "alerts", r->alerts);
6675 ndr->depth++;
6676 if (r->alerts) {
6677 ndr_print_string(ndr, "alerts", r->alerts);
6679 ndr->depth--;
6680 ndr_print_uint32(ndr, "security", r->security);
6681 ndr_print_uint32(ndr, "numadmin", r->numadmin);
6682 ndr_print_uint32(ndr, "lanmask", r->lanmask);
6683 ndr_print_ptr(ndr, "guestaccount", r->guestaccount);
6684 ndr->depth++;
6685 if (r->guestaccount) {
6686 ndr_print_string(ndr, "guestaccount", r->guestaccount);
6688 ndr->depth--;
6689 ndr_print_uint32(ndr, "chdevs", r->chdevs);
6690 ndr_print_uint32(ndr, "chdevqs", r->chdevqs);
6691 ndr_print_uint32(ndr, "chdevjobs", r->chdevjobs);
6692 ndr_print_uint32(ndr, "connections", r->connections);
6693 ndr_print_uint32(ndr, "shares", r->shares);
6694 ndr_print_uint32(ndr, "openfiles", r->openfiles);
6695 ndr_print_uint32(ndr, "sessopen", r->sessopen);
6696 ndr_print_uint32(ndr, "sesssvc", r->sesssvc);
6697 ndr_print_uint32(ndr, "sessreqs", r->sessreqs);
6698 ndr_print_uint32(ndr, "opensearch", r->opensearch);
6699 ndr_print_uint32(ndr, "activelocks", r->activelocks);
6700 ndr_print_uint32(ndr, "sizereqbufs", r->sizereqbufs);
6701 ndr_print_uint32(ndr, "numbigbufs", r->numbigbufs);
6702 ndr_print_uint32(ndr, "numfiletasks", r->numfiletasks);
6703 ndr_print_uint32(ndr, "alertsched", r->alertsched);
6704 ndr_print_uint32(ndr, "erroralert", r->erroralert);
6705 ndr_print_uint32(ndr, "logonalert", r->logonalert);
6706 ndr_print_uint32(ndr, "accessalert", r->accessalert);
6707 ndr_print_uint32(ndr, "diskalert", r->diskalert);
6708 ndr_print_uint32(ndr, "netioalert", r->netioalert);
6709 ndr_print_uint32(ndr, "maxaudits", r->maxaudits);
6710 ndr_print_ptr(ndr, "srvheuristics", r->srvheuristics);
6711 ndr->depth++;
6712 if (r->srvheuristics) {
6713 ndr_print_string(ndr, "srvheuristics", r->srvheuristics);
6715 ndr->depth--;
6716 ndr->depth--;
6719 NTSTATUS ndr_push_srvsvc_NetSrvInfo403(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo403 *r)
6721 if (ndr_flags & NDR_SCALARS) {
6722 NDR_CHECK(ndr_push_align(ndr, 4));
6723 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ulist_mtime));
6724 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->glist_mtime));
6725 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->alist_mtime));
6726 NDR_CHECK(ndr_push_unique_ptr(ndr, r->alerts));
6727 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->security));
6728 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numadmin));
6729 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lanmask));
6730 NDR_CHECK(ndr_push_unique_ptr(ndr, r->guestaccount));
6731 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->chdevs));
6732 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->chdevqs));
6733 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->chdevjobs));
6734 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->connections));
6735 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->shares));
6736 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->openfiles));
6737 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessopen));
6738 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sesssvc));
6739 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessreqs));
6740 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->opensearch));
6741 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->activelocks));
6742 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sizereqbufs));
6743 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numbigbufs));
6744 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numfiletasks));
6745 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->alertsched));
6746 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->eroralert));
6747 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->logonalert));
6748 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->accessalert));
6749 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->diskalert));
6750 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->netioalert));
6751 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxaudits));
6752 NDR_CHECK(ndr_push_unique_ptr(ndr, r->srvheuristics));
6753 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->auditedevents));
6754 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->auditprofile));
6755 NDR_CHECK(ndr_push_unique_ptr(ndr, r->autopath));
6757 if (ndr_flags & NDR_BUFFERS) {
6758 if (r->alerts) {
6759 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->alerts, CH_UTF16)));
6760 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6761 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->alerts, CH_UTF16)));
6762 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->alerts, ndr_charset_length(r->alerts, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6764 if (r->guestaccount) {
6765 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->guestaccount, CH_UTF16)));
6766 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6767 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->guestaccount, CH_UTF16)));
6768 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->guestaccount, ndr_charset_length(r->guestaccount, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6770 if (r->srvheuristics) {
6771 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->srvheuristics, CH_UTF16)));
6772 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6773 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->srvheuristics, CH_UTF16)));
6774 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->srvheuristics, ndr_charset_length(r->srvheuristics, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6776 if (r->autopath) {
6777 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->autopath, CH_UTF16)));
6778 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
6779 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->autopath, CH_UTF16)));
6780 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->autopath, ndr_charset_length(r->autopath, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6783 return NT_STATUS_OK;
6786 NTSTATUS ndr_pull_srvsvc_NetSrvInfo403(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo403 *r)
6788 uint32_t _ptr_alerts;
6789 TALLOC_CTX *_mem_save_alerts_0;
6790 uint32_t _ptr_guestaccount;
6791 TALLOC_CTX *_mem_save_guestaccount_0;
6792 uint32_t _ptr_srvheuristics;
6793 TALLOC_CTX *_mem_save_srvheuristics_0;
6794 uint32_t _ptr_autopath;
6795 TALLOC_CTX *_mem_save_autopath_0;
6796 if (ndr_flags & NDR_SCALARS) {
6797 NDR_CHECK(ndr_pull_align(ndr, 4));
6798 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ulist_mtime));
6799 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->glist_mtime));
6800 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->alist_mtime));
6801 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_alerts));
6802 if (_ptr_alerts) {
6803 NDR_PULL_ALLOC(ndr, r->alerts);
6804 } else {
6805 r->alerts = NULL;
6807 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->security));
6808 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numadmin));
6809 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lanmask));
6810 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_guestaccount));
6811 if (_ptr_guestaccount) {
6812 NDR_PULL_ALLOC(ndr, r->guestaccount);
6813 } else {
6814 r->guestaccount = NULL;
6816 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->chdevs));
6817 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->chdevqs));
6818 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->chdevjobs));
6819 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->connections));
6820 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->shares));
6821 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->openfiles));
6822 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessopen));
6823 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sesssvc));
6824 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessreqs));
6825 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->opensearch));
6826 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->activelocks));
6827 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sizereqbufs));
6828 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numbigbufs));
6829 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numfiletasks));
6830 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->alertsched));
6831 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->eroralert));
6832 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->logonalert));
6833 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->accessalert));
6834 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->diskalert));
6835 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->netioalert));
6836 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxaudits));
6837 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_srvheuristics));
6838 if (_ptr_srvheuristics) {
6839 NDR_PULL_ALLOC(ndr, r->srvheuristics);
6840 } else {
6841 r->srvheuristics = NULL;
6843 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->auditedevents));
6844 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->auditprofile));
6845 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_autopath));
6846 if (_ptr_autopath) {
6847 NDR_PULL_ALLOC(ndr, r->autopath);
6848 } else {
6849 r->autopath = NULL;
6852 if (ndr_flags & NDR_BUFFERS) {
6853 if (r->alerts) {
6854 _mem_save_alerts_0 = NDR_PULL_GET_MEM_CTX(ndr);
6855 NDR_PULL_SET_MEM_CTX(ndr, r->alerts, 0);
6856 NDR_CHECK(ndr_pull_array_size(ndr, &r->alerts));
6857 NDR_CHECK(ndr_pull_array_length(ndr, &r->alerts));
6858 if (ndr_get_array_length(ndr, &r->alerts) > ndr_get_array_size(ndr, &r->alerts)) {
6859 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));
6861 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->alerts), sizeof(uint16_t)));
6862 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->alerts, ndr_get_array_length(ndr, &r->alerts), sizeof(uint16_t), CH_UTF16));
6863 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alerts_0, 0);
6865 if (r->guestaccount) {
6866 _mem_save_guestaccount_0 = NDR_PULL_GET_MEM_CTX(ndr);
6867 NDR_PULL_SET_MEM_CTX(ndr, r->guestaccount, 0);
6868 NDR_CHECK(ndr_pull_array_size(ndr, &r->guestaccount));
6869 NDR_CHECK(ndr_pull_array_length(ndr, &r->guestaccount));
6870 if (ndr_get_array_length(ndr, &r->guestaccount) > ndr_get_array_size(ndr, &r->guestaccount)) {
6871 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));
6873 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->guestaccount), sizeof(uint16_t)));
6874 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->guestaccount, ndr_get_array_length(ndr, &r->guestaccount), sizeof(uint16_t), CH_UTF16));
6875 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_guestaccount_0, 0);
6877 if (r->srvheuristics) {
6878 _mem_save_srvheuristics_0 = NDR_PULL_GET_MEM_CTX(ndr);
6879 NDR_PULL_SET_MEM_CTX(ndr, r->srvheuristics, 0);
6880 NDR_CHECK(ndr_pull_array_size(ndr, &r->srvheuristics));
6881 NDR_CHECK(ndr_pull_array_length(ndr, &r->srvheuristics));
6882 if (ndr_get_array_length(ndr, &r->srvheuristics) > ndr_get_array_size(ndr, &r->srvheuristics)) {
6883 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));
6885 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->srvheuristics), sizeof(uint16_t)));
6886 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->srvheuristics, ndr_get_array_length(ndr, &r->srvheuristics), sizeof(uint16_t), CH_UTF16));
6887 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_srvheuristics_0, 0);
6889 if (r->autopath) {
6890 _mem_save_autopath_0 = NDR_PULL_GET_MEM_CTX(ndr);
6891 NDR_PULL_SET_MEM_CTX(ndr, r->autopath, 0);
6892 NDR_CHECK(ndr_pull_array_size(ndr, &r->autopath));
6893 NDR_CHECK(ndr_pull_array_length(ndr, &r->autopath));
6894 if (ndr_get_array_length(ndr, &r->autopath) > ndr_get_array_size(ndr, &r->autopath)) {
6895 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));
6897 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->autopath), sizeof(uint16_t)));
6898 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->autopath, ndr_get_array_length(ndr, &r->autopath), sizeof(uint16_t), CH_UTF16));
6899 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_autopath_0, 0);
6902 return NT_STATUS_OK;
6905 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo403(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo403 *r)
6907 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo403");
6908 ndr->depth++;
6909 ndr_print_uint32(ndr, "ulist_mtime", r->ulist_mtime);
6910 ndr_print_uint32(ndr, "glist_mtime", r->glist_mtime);
6911 ndr_print_uint32(ndr, "alist_mtime", r->alist_mtime);
6912 ndr_print_ptr(ndr, "alerts", r->alerts);
6913 ndr->depth++;
6914 if (r->alerts) {
6915 ndr_print_string(ndr, "alerts", r->alerts);
6917 ndr->depth--;
6918 ndr_print_uint32(ndr, "security", r->security);
6919 ndr_print_uint32(ndr, "numadmin", r->numadmin);
6920 ndr_print_uint32(ndr, "lanmask", r->lanmask);
6921 ndr_print_ptr(ndr, "guestaccount", r->guestaccount);
6922 ndr->depth++;
6923 if (r->guestaccount) {
6924 ndr_print_string(ndr, "guestaccount", r->guestaccount);
6926 ndr->depth--;
6927 ndr_print_uint32(ndr, "chdevs", r->chdevs);
6928 ndr_print_uint32(ndr, "chdevqs", r->chdevqs);
6929 ndr_print_uint32(ndr, "chdevjobs", r->chdevjobs);
6930 ndr_print_uint32(ndr, "connections", r->connections);
6931 ndr_print_uint32(ndr, "shares", r->shares);
6932 ndr_print_uint32(ndr, "openfiles", r->openfiles);
6933 ndr_print_uint32(ndr, "sessopen", r->sessopen);
6934 ndr_print_uint32(ndr, "sesssvc", r->sesssvc);
6935 ndr_print_uint32(ndr, "sessreqs", r->sessreqs);
6936 ndr_print_uint32(ndr, "opensearch", r->opensearch);
6937 ndr_print_uint32(ndr, "activelocks", r->activelocks);
6938 ndr_print_uint32(ndr, "sizereqbufs", r->sizereqbufs);
6939 ndr_print_uint32(ndr, "numbigbufs", r->numbigbufs);
6940 ndr_print_uint32(ndr, "numfiletasks", r->numfiletasks);
6941 ndr_print_uint32(ndr, "alertsched", r->alertsched);
6942 ndr_print_uint32(ndr, "eroralert", r->eroralert);
6943 ndr_print_uint32(ndr, "logonalert", r->logonalert);
6944 ndr_print_uint32(ndr, "accessalert", r->accessalert);
6945 ndr_print_uint32(ndr, "diskalert", r->diskalert);
6946 ndr_print_uint32(ndr, "netioalert", r->netioalert);
6947 ndr_print_uint32(ndr, "maxaudits", r->maxaudits);
6948 ndr_print_ptr(ndr, "srvheuristics", r->srvheuristics);
6949 ndr->depth++;
6950 if (r->srvheuristics) {
6951 ndr_print_string(ndr, "srvheuristics", r->srvheuristics);
6953 ndr->depth--;
6954 ndr_print_uint32(ndr, "auditedevents", r->auditedevents);
6955 ndr_print_uint32(ndr, "auditprofile", r->auditprofile);
6956 ndr_print_ptr(ndr, "autopath", r->autopath);
6957 ndr->depth++;
6958 if (r->autopath) {
6959 ndr_print_string(ndr, "autopath", r->autopath);
6961 ndr->depth--;
6962 ndr->depth--;
6965 NTSTATUS ndr_push_srvsvc_NetSrvInfo502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo502 *r)
6967 if (ndr_flags & NDR_SCALARS) {
6968 NDR_CHECK(ndr_push_align(ndr, 4));
6969 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessopen));
6970 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sesssvc));
6971 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->opensearch));
6972 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sizereqbufs));
6973 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initworkitems));
6974 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxworkitems));
6975 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rawworkitems));
6976 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->irpstacksize));
6977 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxrawbuflen));
6978 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessusers));
6979 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessconns));
6980 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxpagedmemoryusage));
6981 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxnonpagedmemoryusage));
6982 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesoftcompat));
6983 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableforcedlogoff));
6984 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timesource));
6985 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->acceptdownlevelapis));
6986 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lmannounce));
6988 if (ndr_flags & NDR_BUFFERS) {
6990 return NT_STATUS_OK;
6993 NTSTATUS ndr_pull_srvsvc_NetSrvInfo502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo502 *r)
6995 if (ndr_flags & NDR_SCALARS) {
6996 NDR_CHECK(ndr_pull_align(ndr, 4));
6997 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessopen));
6998 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sesssvc));
6999 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->opensearch));
7000 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sizereqbufs));
7001 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initworkitems));
7002 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxworkitems));
7003 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rawworkitems));
7004 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->irpstacksize));
7005 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxrawbuflen));
7006 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessusers));
7007 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessconns));
7008 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxpagedmemoryusage));
7009 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxnonpagedmemoryusage));
7010 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesoftcompat));
7011 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableforcedlogoff));
7012 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timesource));
7013 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->acceptdownlevelapis));
7014 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lmannounce));
7016 if (ndr_flags & NDR_BUFFERS) {
7018 return NT_STATUS_OK;
7021 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo502 *r)
7023 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo502");
7024 ndr->depth++;
7025 ndr_print_uint32(ndr, "sessopen", r->sessopen);
7026 ndr_print_uint32(ndr, "sesssvc", r->sesssvc);
7027 ndr_print_uint32(ndr, "opensearch", r->opensearch);
7028 ndr_print_uint32(ndr, "sizereqbufs", r->sizereqbufs);
7029 ndr_print_uint32(ndr, "initworkitems", r->initworkitems);
7030 ndr_print_uint32(ndr, "maxworkitems", r->maxworkitems);
7031 ndr_print_uint32(ndr, "rawworkitems", r->rawworkitems);
7032 ndr_print_uint32(ndr, "irpstacksize", r->irpstacksize);
7033 ndr_print_uint32(ndr, "maxrawbuflen", r->maxrawbuflen);
7034 ndr_print_uint32(ndr, "sessusers", r->sessusers);
7035 ndr_print_uint32(ndr, "sessconns", r->sessconns);
7036 ndr_print_uint32(ndr, "maxpagedmemoryusage", r->maxpagedmemoryusage);
7037 ndr_print_uint32(ndr, "maxnonpagedmemoryusage", r->maxnonpagedmemoryusage);
7038 ndr_print_uint32(ndr, "enablesoftcompat", r->enablesoftcompat);
7039 ndr_print_uint32(ndr, "enableforcedlogoff", r->enableforcedlogoff);
7040 ndr_print_uint32(ndr, "timesource", r->timesource);
7041 ndr_print_uint32(ndr, "acceptdownlevelapis", r->acceptdownlevelapis);
7042 ndr_print_uint32(ndr, "lmannounce", r->lmannounce);
7043 ndr->depth--;
7046 NTSTATUS ndr_push_srvsvc_NetSrvInfo503(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo503 *r)
7048 if (ndr_flags & NDR_SCALARS) {
7049 NDR_CHECK(ndr_push_align(ndr, 4));
7050 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessopen));
7051 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sesssvc));
7052 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->opensearch));
7053 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sizereqbufs));
7054 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initworkitems));
7055 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxworkitems));
7056 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rawworkitems));
7057 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->irpstacksize));
7058 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxrawbuflen));
7059 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessusers));
7060 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessconns));
7061 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxpagedmemoryusage));
7062 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxnonpagedmemoryusage));
7063 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesoftcompat));
7064 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableforcedlogoff));
7065 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timesource));
7066 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->acceptdownlevelapis));
7067 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lmannounce));
7068 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
7069 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxcopyreadlen));
7070 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxcopywritelen));
7071 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minkeepsearch));
7072 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxkeepsearch));
7073 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minkeepcomplsearch));
7074 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxkeepcomplsearch));
7075 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->threadcountadd));
7076 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numlockthreads));
7077 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->scavtimeout));
7078 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minrcvqueue));
7079 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minfreeworkitems));
7080 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->xactmemsize));
7081 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->threadpriority));
7082 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxmpxct));
7083 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->oplockbreakwait));
7084 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->oplockbreakresponsewait));
7085 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableoplocks));
7086 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableoplockforceclose));
7087 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablefcbopens));
7088 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableraw));
7089 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesharednetdrives));
7090 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minfreeconnections));
7091 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxfreeconnections));
7093 if (ndr_flags & NDR_BUFFERS) {
7094 if (r->domain) {
7095 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
7096 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
7097 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
7098 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7101 return NT_STATUS_OK;
7104 NTSTATUS ndr_pull_srvsvc_NetSrvInfo503(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo503 *r)
7106 uint32_t _ptr_domain;
7107 TALLOC_CTX *_mem_save_domain_0;
7108 if (ndr_flags & NDR_SCALARS) {
7109 NDR_CHECK(ndr_pull_align(ndr, 4));
7110 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessopen));
7111 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sesssvc));
7112 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->opensearch));
7113 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sizereqbufs));
7114 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initworkitems));
7115 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxworkitems));
7116 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rawworkitems));
7117 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->irpstacksize));
7118 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxrawbuflen));
7119 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessusers));
7120 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessconns));
7121 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxpagedmemoryusage));
7122 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxnonpagedmemoryusage));
7123 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesoftcompat));
7124 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableforcedlogoff));
7125 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timesource));
7126 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->acceptdownlevelapis));
7127 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lmannounce));
7128 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
7129 if (_ptr_domain) {
7130 NDR_PULL_ALLOC(ndr, r->domain);
7131 } else {
7132 r->domain = NULL;
7134 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxcopyreadlen));
7135 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxcopywritelen));
7136 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minkeepsearch));
7137 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxkeepsearch));
7138 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minkeepcomplsearch));
7139 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxkeepcomplsearch));
7140 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->threadcountadd));
7141 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numlockthreads));
7142 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->scavtimeout));
7143 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minrcvqueue));
7144 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minfreeworkitems));
7145 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->xactmemsize));
7146 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->threadpriority));
7147 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxmpxct));
7148 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->oplockbreakwait));
7149 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->oplockbreakresponsewait));
7150 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableoplocks));
7151 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableoplockforceclose));
7152 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablefcbopens));
7153 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableraw));
7154 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesharednetdrives));
7155 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minfreeconnections));
7156 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxfreeconnections));
7158 if (ndr_flags & NDR_BUFFERS) {
7159 if (r->domain) {
7160 _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
7161 NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
7162 NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
7163 NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
7164 if (ndr_get_array_length(ndr, &r->domain) > ndr_get_array_size(ndr, &r->domain)) {
7165 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));
7167 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t)));
7168 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t), CH_UTF16));
7169 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
7172 return NT_STATUS_OK;
7175 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo503(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo503 *r)
7177 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo503");
7178 ndr->depth++;
7179 ndr_print_uint32(ndr, "sessopen", r->sessopen);
7180 ndr_print_uint32(ndr, "sesssvc", r->sesssvc);
7181 ndr_print_uint32(ndr, "opensearch", r->opensearch);
7182 ndr_print_uint32(ndr, "sizereqbufs", r->sizereqbufs);
7183 ndr_print_uint32(ndr, "initworkitems", r->initworkitems);
7184 ndr_print_uint32(ndr, "maxworkitems", r->maxworkitems);
7185 ndr_print_uint32(ndr, "rawworkitems", r->rawworkitems);
7186 ndr_print_uint32(ndr, "irpstacksize", r->irpstacksize);
7187 ndr_print_uint32(ndr, "maxrawbuflen", r->maxrawbuflen);
7188 ndr_print_uint32(ndr, "sessusers", r->sessusers);
7189 ndr_print_uint32(ndr, "sessconns", r->sessconns);
7190 ndr_print_uint32(ndr, "maxpagedmemoryusage", r->maxpagedmemoryusage);
7191 ndr_print_uint32(ndr, "maxnonpagedmemoryusage", r->maxnonpagedmemoryusage);
7192 ndr_print_uint32(ndr, "enablesoftcompat", r->enablesoftcompat);
7193 ndr_print_uint32(ndr, "enableforcedlogoff", r->enableforcedlogoff);
7194 ndr_print_uint32(ndr, "timesource", r->timesource);
7195 ndr_print_uint32(ndr, "acceptdownlevelapis", r->acceptdownlevelapis);
7196 ndr_print_uint32(ndr, "lmannounce", r->lmannounce);
7197 ndr_print_ptr(ndr, "domain", r->domain);
7198 ndr->depth++;
7199 if (r->domain) {
7200 ndr_print_string(ndr, "domain", r->domain);
7202 ndr->depth--;
7203 ndr_print_uint32(ndr, "maxcopyreadlen", r->maxcopyreadlen);
7204 ndr_print_uint32(ndr, "maxcopywritelen", r->maxcopywritelen);
7205 ndr_print_uint32(ndr, "minkeepsearch", r->minkeepsearch);
7206 ndr_print_uint32(ndr, "maxkeepsearch", r->maxkeepsearch);
7207 ndr_print_uint32(ndr, "minkeepcomplsearch", r->minkeepcomplsearch);
7208 ndr_print_uint32(ndr, "maxkeepcomplsearch", r->maxkeepcomplsearch);
7209 ndr_print_uint32(ndr, "threadcountadd", r->threadcountadd);
7210 ndr_print_uint32(ndr, "numlockthreads", r->numlockthreads);
7211 ndr_print_uint32(ndr, "scavtimeout", r->scavtimeout);
7212 ndr_print_uint32(ndr, "minrcvqueue", r->minrcvqueue);
7213 ndr_print_uint32(ndr, "minfreeworkitems", r->minfreeworkitems);
7214 ndr_print_uint32(ndr, "xactmemsize", r->xactmemsize);
7215 ndr_print_uint32(ndr, "threadpriority", r->threadpriority);
7216 ndr_print_uint32(ndr, "maxmpxct", r->maxmpxct);
7217 ndr_print_uint32(ndr, "oplockbreakwait", r->oplockbreakwait);
7218 ndr_print_uint32(ndr, "oplockbreakresponsewait", r->oplockbreakresponsewait);
7219 ndr_print_uint32(ndr, "enableoplocks", r->enableoplocks);
7220 ndr_print_uint32(ndr, "enableoplockforceclose", r->enableoplockforceclose);
7221 ndr_print_uint32(ndr, "enablefcbopens", r->enablefcbopens);
7222 ndr_print_uint32(ndr, "enableraw", r->enableraw);
7223 ndr_print_uint32(ndr, "enablesharednetdrives", r->enablesharednetdrives);
7224 ndr_print_uint32(ndr, "minfreeconnections", r->minfreeconnections);
7225 ndr_print_uint32(ndr, "maxfreeconnections", r->maxfreeconnections);
7226 ndr->depth--;
7229 NTSTATUS ndr_push_srvsvc_NetSrvInfo599(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo599 *r)
7231 if (ndr_flags & NDR_SCALARS) {
7232 NDR_CHECK(ndr_push_align(ndr, 4));
7233 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessopen));
7234 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sesssvc));
7235 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->opensearch));
7236 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sizereqbufs));
7237 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initworkitems));
7238 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxworkitems));
7239 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rawworkitems));
7240 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->irpstacksize));
7241 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxrawbuflen));
7242 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessusers));
7243 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessconns));
7244 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxpagedmemoryusage));
7245 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxnonpagedmemoryusage));
7246 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesoftcompat));
7247 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableforcedlogoff));
7248 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timesource));
7249 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->acceptdownlevelapis));
7250 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lmannounce));
7251 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
7252 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxcopyreadlen));
7253 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxcopywritelen));
7254 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minkeepsearch));
7255 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minkeepcomplsearch));
7256 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxkeepcomplsearch));
7257 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->threadcountadd));
7258 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numlockthreads));
7259 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->scavtimeout));
7260 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minrcvqueue));
7261 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minfreeworkitems));
7262 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->xactmemsize));
7263 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->threadpriority));
7264 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxmpxct));
7265 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->oplockbreakwait));
7266 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->oplockbreakresponsewait));
7267 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableoplocks));
7268 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableoplockforceclose));
7269 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablefcbopens));
7270 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableraw));
7271 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesharednetdrives));
7272 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minfreeconnections));
7273 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxfreeconnections));
7274 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initsesstable));
7275 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initconntable));
7276 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initfiletable));
7277 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initsearchtable));
7278 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->alertsched));
7279 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->errortreshold));
7280 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->networkerrortreshold));
7281 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->diskspacetreshold));
7282 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
7283 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxlinkdelay));
7284 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minlinkthroughput));
7285 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->linkinfovalidtime));
7286 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->scavqosinfoupdatetime));
7287 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxworkitemidletime));
7289 if (ndr_flags & NDR_BUFFERS) {
7290 if (r->domain) {
7291 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
7292 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
7293 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
7294 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7297 return NT_STATUS_OK;
7300 NTSTATUS ndr_pull_srvsvc_NetSrvInfo599(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo599 *r)
7302 uint32_t _ptr_domain;
7303 TALLOC_CTX *_mem_save_domain_0;
7304 if (ndr_flags & NDR_SCALARS) {
7305 NDR_CHECK(ndr_pull_align(ndr, 4));
7306 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessopen));
7307 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sesssvc));
7308 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->opensearch));
7309 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sizereqbufs));
7310 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initworkitems));
7311 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxworkitems));
7312 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rawworkitems));
7313 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->irpstacksize));
7314 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxrawbuflen));
7315 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessusers));
7316 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessconns));
7317 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxpagedmemoryusage));
7318 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxnonpagedmemoryusage));
7319 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesoftcompat));
7320 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableforcedlogoff));
7321 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timesource));
7322 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->acceptdownlevelapis));
7323 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lmannounce));
7324 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
7325 if (_ptr_domain) {
7326 NDR_PULL_ALLOC(ndr, r->domain);
7327 } else {
7328 r->domain = NULL;
7330 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxcopyreadlen));
7331 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxcopywritelen));
7332 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minkeepsearch));
7333 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minkeepcomplsearch));
7334 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxkeepcomplsearch));
7335 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->threadcountadd));
7336 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numlockthreads));
7337 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->scavtimeout));
7338 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minrcvqueue));
7339 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minfreeworkitems));
7340 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->xactmemsize));
7341 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->threadpriority));
7342 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxmpxct));
7343 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->oplockbreakwait));
7344 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->oplockbreakresponsewait));
7345 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableoplocks));
7346 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableoplockforceclose));
7347 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablefcbopens));
7348 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableraw));
7349 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesharednetdrives));
7350 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minfreeconnections));
7351 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxfreeconnections));
7352 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initsesstable));
7353 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initconntable));
7354 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initfiletable));
7355 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initsearchtable));
7356 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->alertsched));
7357 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->errortreshold));
7358 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->networkerrortreshold));
7359 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->diskspacetreshold));
7360 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
7361 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxlinkdelay));
7362 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minlinkthroughput));
7363 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->linkinfovalidtime));
7364 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->scavqosinfoupdatetime));
7365 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxworkitemidletime));
7367 if (ndr_flags & NDR_BUFFERS) {
7368 if (r->domain) {
7369 _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
7370 NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
7371 NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
7372 NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
7373 if (ndr_get_array_length(ndr, &r->domain) > ndr_get_array_size(ndr, &r->domain)) {
7374 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));
7376 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t)));
7377 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t), CH_UTF16));
7378 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
7381 return NT_STATUS_OK;
7384 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo599(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo599 *r)
7386 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo599");
7387 ndr->depth++;
7388 ndr_print_uint32(ndr, "sessopen", r->sessopen);
7389 ndr_print_uint32(ndr, "sesssvc", r->sesssvc);
7390 ndr_print_uint32(ndr, "opensearch", r->opensearch);
7391 ndr_print_uint32(ndr, "sizereqbufs", r->sizereqbufs);
7392 ndr_print_uint32(ndr, "initworkitems", r->initworkitems);
7393 ndr_print_uint32(ndr, "maxworkitems", r->maxworkitems);
7394 ndr_print_uint32(ndr, "rawworkitems", r->rawworkitems);
7395 ndr_print_uint32(ndr, "irpstacksize", r->irpstacksize);
7396 ndr_print_uint32(ndr, "maxrawbuflen", r->maxrawbuflen);
7397 ndr_print_uint32(ndr, "sessusers", r->sessusers);
7398 ndr_print_uint32(ndr, "sessconns", r->sessconns);
7399 ndr_print_uint32(ndr, "maxpagedmemoryusage", r->maxpagedmemoryusage);
7400 ndr_print_uint32(ndr, "maxnonpagedmemoryusage", r->maxnonpagedmemoryusage);
7401 ndr_print_uint32(ndr, "enablesoftcompat", r->enablesoftcompat);
7402 ndr_print_uint32(ndr, "enableforcedlogoff", r->enableforcedlogoff);
7403 ndr_print_uint32(ndr, "timesource", r->timesource);
7404 ndr_print_uint32(ndr, "acceptdownlevelapis", r->acceptdownlevelapis);
7405 ndr_print_uint32(ndr, "lmannounce", r->lmannounce);
7406 ndr_print_ptr(ndr, "domain", r->domain);
7407 ndr->depth++;
7408 if (r->domain) {
7409 ndr_print_string(ndr, "domain", r->domain);
7411 ndr->depth--;
7412 ndr_print_uint32(ndr, "maxcopyreadlen", r->maxcopyreadlen);
7413 ndr_print_uint32(ndr, "maxcopywritelen", r->maxcopywritelen);
7414 ndr_print_uint32(ndr, "minkeepsearch", r->minkeepsearch);
7415 ndr_print_uint32(ndr, "minkeepcomplsearch", r->minkeepcomplsearch);
7416 ndr_print_uint32(ndr, "maxkeepcomplsearch", r->maxkeepcomplsearch);
7417 ndr_print_uint32(ndr, "threadcountadd", r->threadcountadd);
7418 ndr_print_uint32(ndr, "numlockthreads", r->numlockthreads);
7419 ndr_print_uint32(ndr, "scavtimeout", r->scavtimeout);
7420 ndr_print_uint32(ndr, "minrcvqueue", r->minrcvqueue);
7421 ndr_print_uint32(ndr, "minfreeworkitems", r->minfreeworkitems);
7422 ndr_print_uint32(ndr, "xactmemsize", r->xactmemsize);
7423 ndr_print_uint32(ndr, "threadpriority", r->threadpriority);
7424 ndr_print_uint32(ndr, "maxmpxct", r->maxmpxct);
7425 ndr_print_uint32(ndr, "oplockbreakwait", r->oplockbreakwait);
7426 ndr_print_uint32(ndr, "oplockbreakresponsewait", r->oplockbreakresponsewait);
7427 ndr_print_uint32(ndr, "enableoplocks", r->enableoplocks);
7428 ndr_print_uint32(ndr, "enableoplockforceclose", r->enableoplockforceclose);
7429 ndr_print_uint32(ndr, "enablefcbopens", r->enablefcbopens);
7430 ndr_print_uint32(ndr, "enableraw", r->enableraw);
7431 ndr_print_uint32(ndr, "enablesharednetdrives", r->enablesharednetdrives);
7432 ndr_print_uint32(ndr, "minfreeconnections", r->minfreeconnections);
7433 ndr_print_uint32(ndr, "maxfreeconnections", r->maxfreeconnections);
7434 ndr_print_uint32(ndr, "initsesstable", r->initsesstable);
7435 ndr_print_uint32(ndr, "initconntable", r->initconntable);
7436 ndr_print_uint32(ndr, "initfiletable", r->initfiletable);
7437 ndr_print_uint32(ndr, "initsearchtable", r->initsearchtable);
7438 ndr_print_uint32(ndr, "alertsched", r->alertsched);
7439 ndr_print_uint32(ndr, "errortreshold", r->errortreshold);
7440 ndr_print_uint32(ndr, "networkerrortreshold", r->networkerrortreshold);
7441 ndr_print_uint32(ndr, "diskspacetreshold", r->diskspacetreshold);
7442 ndr_print_uint32(ndr, "reserved", r->reserved);
7443 ndr_print_uint32(ndr, "maxlinkdelay", r->maxlinkdelay);
7444 ndr_print_uint32(ndr, "minlinkthroughput", r->minlinkthroughput);
7445 ndr_print_uint32(ndr, "linkinfovalidtime", r->linkinfovalidtime);
7446 ndr_print_uint32(ndr, "scavqosinfoupdatetime", r->scavqosinfoupdatetime);
7447 ndr_print_uint32(ndr, "maxworkitemidletime", r->maxworkitemidletime);
7448 ndr->depth--;
7451 NTSTATUS ndr_push_srvsvc_NetSrvInfo1005(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1005 *r)
7453 if (ndr_flags & NDR_SCALARS) {
7454 NDR_CHECK(ndr_push_align(ndr, 4));
7455 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
7457 if (ndr_flags & NDR_BUFFERS) {
7458 if (r->comment) {
7459 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
7460 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
7461 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
7462 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7465 return NT_STATUS_OK;
7468 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1005(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1005 *r)
7470 uint32_t _ptr_comment;
7471 TALLOC_CTX *_mem_save_comment_0;
7472 if (ndr_flags & NDR_SCALARS) {
7473 NDR_CHECK(ndr_pull_align(ndr, 4));
7474 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
7475 if (_ptr_comment) {
7476 NDR_PULL_ALLOC(ndr, r->comment);
7477 } else {
7478 r->comment = NULL;
7481 if (ndr_flags & NDR_BUFFERS) {
7482 if (r->comment) {
7483 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
7484 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
7485 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
7486 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
7487 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
7488 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));
7490 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
7491 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
7492 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
7495 return NT_STATUS_OK;
7498 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1005(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1005 *r)
7500 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1005");
7501 ndr->depth++;
7502 ndr_print_ptr(ndr, "comment", r->comment);
7503 ndr->depth++;
7504 if (r->comment) {
7505 ndr_print_string(ndr, "comment", r->comment);
7507 ndr->depth--;
7508 ndr->depth--;
7511 NTSTATUS ndr_push_srvsvc_NetSrvInfo1010(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1010 *r)
7513 if (ndr_flags & NDR_SCALARS) {
7514 NDR_CHECK(ndr_push_align(ndr, 4));
7515 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->disc));
7517 if (ndr_flags & NDR_BUFFERS) {
7519 return NT_STATUS_OK;
7522 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1010(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1010 *r)
7524 if (ndr_flags & NDR_SCALARS) {
7525 NDR_CHECK(ndr_pull_align(ndr, 4));
7526 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->disc));
7528 if (ndr_flags & NDR_BUFFERS) {
7530 return NT_STATUS_OK;
7533 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1010(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1010 *r)
7535 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1010");
7536 ndr->depth++;
7537 ndr_print_uint32(ndr, "disc", r->disc);
7538 ndr->depth--;
7541 NTSTATUS ndr_push_srvsvc_NetSrvInfo1016(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1016 *r)
7543 if (ndr_flags & NDR_SCALARS) {
7544 NDR_CHECK(ndr_push_align(ndr, 4));
7545 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->hidden));
7547 if (ndr_flags & NDR_BUFFERS) {
7549 return NT_STATUS_OK;
7552 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1016(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1016 *r)
7554 if (ndr_flags & NDR_SCALARS) {
7555 NDR_CHECK(ndr_pull_align(ndr, 4));
7556 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->hidden));
7558 if (ndr_flags & NDR_BUFFERS) {
7560 return NT_STATUS_OK;
7563 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1016(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1016 *r)
7565 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1016");
7566 ndr->depth++;
7567 ndr_print_uint32(ndr, "hidden", r->hidden);
7568 ndr->depth--;
7571 NTSTATUS ndr_push_srvsvc_NetSrvInfo1017(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1017 *r)
7573 if (ndr_flags & NDR_SCALARS) {
7574 NDR_CHECK(ndr_push_align(ndr, 4));
7575 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->announce));
7577 if (ndr_flags & NDR_BUFFERS) {
7579 return NT_STATUS_OK;
7582 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1017(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1017 *r)
7584 if (ndr_flags & NDR_SCALARS) {
7585 NDR_CHECK(ndr_pull_align(ndr, 4));
7586 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->announce));
7588 if (ndr_flags & NDR_BUFFERS) {
7590 return NT_STATUS_OK;
7593 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1017(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1017 *r)
7595 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1017");
7596 ndr->depth++;
7597 ndr_print_uint32(ndr, "announce", r->announce);
7598 ndr->depth--;
7601 NTSTATUS ndr_push_srvsvc_NetSrvInfo1018(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1018 *r)
7603 if (ndr_flags & NDR_SCALARS) {
7604 NDR_CHECK(ndr_push_align(ndr, 4));
7605 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->anndelta));
7607 if (ndr_flags & NDR_BUFFERS) {
7609 return NT_STATUS_OK;
7612 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1018(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1018 *r)
7614 if (ndr_flags & NDR_SCALARS) {
7615 NDR_CHECK(ndr_pull_align(ndr, 4));
7616 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->anndelta));
7618 if (ndr_flags & NDR_BUFFERS) {
7620 return NT_STATUS_OK;
7623 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1018(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1018 *r)
7625 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1018");
7626 ndr->depth++;
7627 ndr_print_uint32(ndr, "anndelta", r->anndelta);
7628 ndr->depth--;
7631 NTSTATUS ndr_push_srvsvc_NetSrvInfo1107(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1107 *r)
7633 if (ndr_flags & NDR_SCALARS) {
7634 NDR_CHECK(ndr_push_align(ndr, 4));
7635 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->users));
7637 if (ndr_flags & NDR_BUFFERS) {
7639 return NT_STATUS_OK;
7642 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1107(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1107 *r)
7644 if (ndr_flags & NDR_SCALARS) {
7645 NDR_CHECK(ndr_pull_align(ndr, 4));
7646 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->users));
7648 if (ndr_flags & NDR_BUFFERS) {
7650 return NT_STATUS_OK;
7653 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1107(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1107 *r)
7655 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1107");
7656 ndr->depth++;
7657 ndr_print_uint32(ndr, "users", r->users);
7658 ndr->depth--;
7661 NTSTATUS ndr_push_srvsvc_NetSrvInfo1501(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1501 *r)
7663 if (ndr_flags & NDR_SCALARS) {
7664 NDR_CHECK(ndr_push_align(ndr, 4));
7665 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessopens));
7667 if (ndr_flags & NDR_BUFFERS) {
7669 return NT_STATUS_OK;
7672 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1501(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1501 *r)
7674 if (ndr_flags & NDR_SCALARS) {
7675 NDR_CHECK(ndr_pull_align(ndr, 4));
7676 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessopens));
7678 if (ndr_flags & NDR_BUFFERS) {
7680 return NT_STATUS_OK;
7683 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1501(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1501 *r)
7685 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1501");
7686 ndr->depth++;
7687 ndr_print_uint32(ndr, "sessopens", r->sessopens);
7688 ndr->depth--;
7691 NTSTATUS ndr_push_srvsvc_NetSrvInfo1502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1502 *r)
7693 if (ndr_flags & NDR_SCALARS) {
7694 NDR_CHECK(ndr_push_align(ndr, 4));
7695 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessvcs));
7697 if (ndr_flags & NDR_BUFFERS) {
7699 return NT_STATUS_OK;
7702 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1502 *r)
7704 if (ndr_flags & NDR_SCALARS) {
7705 NDR_CHECK(ndr_pull_align(ndr, 4));
7706 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessvcs));
7708 if (ndr_flags & NDR_BUFFERS) {
7710 return NT_STATUS_OK;
7713 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1502 *r)
7715 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1502");
7716 ndr->depth++;
7717 ndr_print_uint32(ndr, "sessvcs", r->sessvcs);
7718 ndr->depth--;
7721 NTSTATUS ndr_push_srvsvc_NetSrvInfo1503(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1503 *r)
7723 if (ndr_flags & NDR_SCALARS) {
7724 NDR_CHECK(ndr_push_align(ndr, 4));
7725 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->opensearch));
7727 if (ndr_flags & NDR_BUFFERS) {
7729 return NT_STATUS_OK;
7732 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1503(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1503 *r)
7734 if (ndr_flags & NDR_SCALARS) {
7735 NDR_CHECK(ndr_pull_align(ndr, 4));
7736 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->opensearch));
7738 if (ndr_flags & NDR_BUFFERS) {
7740 return NT_STATUS_OK;
7743 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1503(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1503 *r)
7745 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1503");
7746 ndr->depth++;
7747 ndr_print_uint32(ndr, "opensearch", r->opensearch);
7748 ndr->depth--;
7751 NTSTATUS ndr_push_srvsvc_NetSrvInfo1506(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1506 *r)
7753 if (ndr_flags & NDR_SCALARS) {
7754 NDR_CHECK(ndr_push_align(ndr, 4));
7755 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxworkitems));
7757 if (ndr_flags & NDR_BUFFERS) {
7759 return NT_STATUS_OK;
7762 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1506(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1506 *r)
7764 if (ndr_flags & NDR_SCALARS) {
7765 NDR_CHECK(ndr_pull_align(ndr, 4));
7766 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxworkitems));
7768 if (ndr_flags & NDR_BUFFERS) {
7770 return NT_STATUS_OK;
7773 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1506(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1506 *r)
7775 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1506");
7776 ndr->depth++;
7777 ndr_print_uint32(ndr, "maxworkitems", r->maxworkitems);
7778 ndr->depth--;
7781 NTSTATUS ndr_push_srvsvc_NetSrvInfo1509(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1509 *r)
7783 if (ndr_flags & NDR_SCALARS) {
7784 NDR_CHECK(ndr_push_align(ndr, 4));
7785 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxrawbuflen));
7787 if (ndr_flags & NDR_BUFFERS) {
7789 return NT_STATUS_OK;
7792 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1509(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1509 *r)
7794 if (ndr_flags & NDR_SCALARS) {
7795 NDR_CHECK(ndr_pull_align(ndr, 4));
7796 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxrawbuflen));
7798 if (ndr_flags & NDR_BUFFERS) {
7800 return NT_STATUS_OK;
7803 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1509(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1509 *r)
7805 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1509");
7806 ndr->depth++;
7807 ndr_print_uint32(ndr, "maxrawbuflen", r->maxrawbuflen);
7808 ndr->depth--;
7811 NTSTATUS ndr_push_srvsvc_NetSrvInfo1510(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1510 *r)
7813 if (ndr_flags & NDR_SCALARS) {
7814 NDR_CHECK(ndr_push_align(ndr, 4));
7815 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessusers));
7817 if (ndr_flags & NDR_BUFFERS) {
7819 return NT_STATUS_OK;
7822 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1510(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1510 *r)
7824 if (ndr_flags & NDR_SCALARS) {
7825 NDR_CHECK(ndr_pull_align(ndr, 4));
7826 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessusers));
7828 if (ndr_flags & NDR_BUFFERS) {
7830 return NT_STATUS_OK;
7833 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1510(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1510 *r)
7835 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1510");
7836 ndr->depth++;
7837 ndr_print_uint32(ndr, "sessusers", r->sessusers);
7838 ndr->depth--;
7841 NTSTATUS ndr_push_srvsvc_NetSrvInfo1511(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1511 *r)
7843 if (ndr_flags & NDR_SCALARS) {
7844 NDR_CHECK(ndr_push_align(ndr, 4));
7845 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sesscons));
7847 if (ndr_flags & NDR_BUFFERS) {
7849 return NT_STATUS_OK;
7852 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1511(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1511 *r)
7854 if (ndr_flags & NDR_SCALARS) {
7855 NDR_CHECK(ndr_pull_align(ndr, 4));
7856 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sesscons));
7858 if (ndr_flags & NDR_BUFFERS) {
7860 return NT_STATUS_OK;
7863 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1511(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1511 *r)
7865 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1511");
7866 ndr->depth++;
7867 ndr_print_uint32(ndr, "sesscons", r->sesscons);
7868 ndr->depth--;
7871 NTSTATUS ndr_push_srvsvc_NetSrvInfo1512(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1512 *r)
7873 if (ndr_flags & NDR_SCALARS) {
7874 NDR_CHECK(ndr_push_align(ndr, 4));
7875 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxnonpagedmemoryusage));
7877 if (ndr_flags & NDR_BUFFERS) {
7879 return NT_STATUS_OK;
7882 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1512(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1512 *r)
7884 if (ndr_flags & NDR_SCALARS) {
7885 NDR_CHECK(ndr_pull_align(ndr, 4));
7886 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxnonpagedmemoryusage));
7888 if (ndr_flags & NDR_BUFFERS) {
7890 return NT_STATUS_OK;
7893 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1512(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1512 *r)
7895 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1512");
7896 ndr->depth++;
7897 ndr_print_uint32(ndr, "maxnonpagedmemoryusage", r->maxnonpagedmemoryusage);
7898 ndr->depth--;
7901 NTSTATUS ndr_push_srvsvc_NetSrvInfo1513(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1513 *r)
7903 if (ndr_flags & NDR_SCALARS) {
7904 NDR_CHECK(ndr_push_align(ndr, 4));
7905 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxpagedmemoryusage));
7907 if (ndr_flags & NDR_BUFFERS) {
7909 return NT_STATUS_OK;
7912 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1513(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1513 *r)
7914 if (ndr_flags & NDR_SCALARS) {
7915 NDR_CHECK(ndr_pull_align(ndr, 4));
7916 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxpagedmemoryusage));
7918 if (ndr_flags & NDR_BUFFERS) {
7920 return NT_STATUS_OK;
7923 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1513(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1513 *r)
7925 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1513");
7926 ndr->depth++;
7927 ndr_print_uint32(ndr, "maxpagedmemoryusage", r->maxpagedmemoryusage);
7928 ndr->depth--;
7931 NTSTATUS ndr_push_srvsvc_NetSrvInfo1514(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1514 *r)
7933 if (ndr_flags & NDR_SCALARS) {
7934 NDR_CHECK(ndr_push_align(ndr, 4));
7935 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesoftcompat));
7937 if (ndr_flags & NDR_BUFFERS) {
7939 return NT_STATUS_OK;
7942 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1514(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1514 *r)
7944 if (ndr_flags & NDR_SCALARS) {
7945 NDR_CHECK(ndr_pull_align(ndr, 4));
7946 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesoftcompat));
7948 if (ndr_flags & NDR_BUFFERS) {
7950 return NT_STATUS_OK;
7953 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1514(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1514 *r)
7955 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1514");
7956 ndr->depth++;
7957 ndr_print_uint32(ndr, "enablesoftcompat", r->enablesoftcompat);
7958 ndr->depth--;
7961 NTSTATUS ndr_push_srvsvc_NetSrvInfo1515(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1515 *r)
7963 if (ndr_flags & NDR_SCALARS) {
7964 NDR_CHECK(ndr_push_align(ndr, 4));
7965 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableforcedlogoff));
7967 if (ndr_flags & NDR_BUFFERS) {
7969 return NT_STATUS_OK;
7972 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1515(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1515 *r)
7974 if (ndr_flags & NDR_SCALARS) {
7975 NDR_CHECK(ndr_pull_align(ndr, 4));
7976 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableforcedlogoff));
7978 if (ndr_flags & NDR_BUFFERS) {
7980 return NT_STATUS_OK;
7983 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1515(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1515 *r)
7985 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1515");
7986 ndr->depth++;
7987 ndr_print_uint32(ndr, "enableforcedlogoff", r->enableforcedlogoff);
7988 ndr->depth--;
7991 NTSTATUS ndr_push_srvsvc_NetSrvInfo1516(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1516 *r)
7993 if (ndr_flags & NDR_SCALARS) {
7994 NDR_CHECK(ndr_push_align(ndr, 4));
7995 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timesource));
7997 if (ndr_flags & NDR_BUFFERS) {
7999 return NT_STATUS_OK;
8002 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1516(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1516 *r)
8004 if (ndr_flags & NDR_SCALARS) {
8005 NDR_CHECK(ndr_pull_align(ndr, 4));
8006 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timesource));
8008 if (ndr_flags & NDR_BUFFERS) {
8010 return NT_STATUS_OK;
8013 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1516(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1516 *r)
8015 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1516");
8016 ndr->depth++;
8017 ndr_print_uint32(ndr, "timesource", r->timesource);
8018 ndr->depth--;
8021 NTSTATUS ndr_push_srvsvc_NetSrvInfo1518(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1518 *r)
8023 if (ndr_flags & NDR_SCALARS) {
8024 NDR_CHECK(ndr_push_align(ndr, 4));
8025 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lmannounce));
8027 if (ndr_flags & NDR_BUFFERS) {
8029 return NT_STATUS_OK;
8032 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1518(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1518 *r)
8034 if (ndr_flags & NDR_SCALARS) {
8035 NDR_CHECK(ndr_pull_align(ndr, 4));
8036 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lmannounce));
8038 if (ndr_flags & NDR_BUFFERS) {
8040 return NT_STATUS_OK;
8043 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1518(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1518 *r)
8045 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1518");
8046 ndr->depth++;
8047 ndr_print_uint32(ndr, "lmannounce", r->lmannounce);
8048 ndr->depth--;
8051 NTSTATUS ndr_push_srvsvc_NetSrvInfo1520(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1520 *r)
8053 if (ndr_flags & NDR_SCALARS) {
8054 NDR_CHECK(ndr_push_align(ndr, 4));
8055 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxcopyreadlen));
8057 if (ndr_flags & NDR_BUFFERS) {
8059 return NT_STATUS_OK;
8062 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1520(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1520 *r)
8064 if (ndr_flags & NDR_SCALARS) {
8065 NDR_CHECK(ndr_pull_align(ndr, 4));
8066 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxcopyreadlen));
8068 if (ndr_flags & NDR_BUFFERS) {
8070 return NT_STATUS_OK;
8073 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1520(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1520 *r)
8075 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1520");
8076 ndr->depth++;
8077 ndr_print_uint32(ndr, "maxcopyreadlen", r->maxcopyreadlen);
8078 ndr->depth--;
8081 NTSTATUS ndr_push_srvsvc_NetSrvInfo1521(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1521 *r)
8083 if (ndr_flags & NDR_SCALARS) {
8084 NDR_CHECK(ndr_push_align(ndr, 4));
8085 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxcopywritelen));
8087 if (ndr_flags & NDR_BUFFERS) {
8089 return NT_STATUS_OK;
8092 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1521(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1521 *r)
8094 if (ndr_flags & NDR_SCALARS) {
8095 NDR_CHECK(ndr_pull_align(ndr, 4));
8096 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxcopywritelen));
8098 if (ndr_flags & NDR_BUFFERS) {
8100 return NT_STATUS_OK;
8103 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1521(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1521 *r)
8105 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1521");
8106 ndr->depth++;
8107 ndr_print_uint32(ndr, "maxcopywritelen", r->maxcopywritelen);
8108 ndr->depth--;
8111 NTSTATUS ndr_push_srvsvc_NetSrvInfo1522(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1522 *r)
8113 if (ndr_flags & NDR_SCALARS) {
8114 NDR_CHECK(ndr_push_align(ndr, 4));
8115 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minkeepsearch));
8117 if (ndr_flags & NDR_BUFFERS) {
8119 return NT_STATUS_OK;
8122 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1522(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1522 *r)
8124 if (ndr_flags & NDR_SCALARS) {
8125 NDR_CHECK(ndr_pull_align(ndr, 4));
8126 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minkeepsearch));
8128 if (ndr_flags & NDR_BUFFERS) {
8130 return NT_STATUS_OK;
8133 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1522(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1522 *r)
8135 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1522");
8136 ndr->depth++;
8137 ndr_print_uint32(ndr, "minkeepsearch", r->minkeepsearch);
8138 ndr->depth--;
8141 NTSTATUS ndr_push_srvsvc_NetSrvInfo1523(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1523 *r)
8143 if (ndr_flags & NDR_SCALARS) {
8144 NDR_CHECK(ndr_push_align(ndr, 4));
8145 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxkeepsearch));
8147 if (ndr_flags & NDR_BUFFERS) {
8149 return NT_STATUS_OK;
8152 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1523(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1523 *r)
8154 if (ndr_flags & NDR_SCALARS) {
8155 NDR_CHECK(ndr_pull_align(ndr, 4));
8156 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxkeepsearch));
8158 if (ndr_flags & NDR_BUFFERS) {
8160 return NT_STATUS_OK;
8163 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1523(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1523 *r)
8165 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1523");
8166 ndr->depth++;
8167 ndr_print_uint32(ndr, "maxkeepsearch", r->maxkeepsearch);
8168 ndr->depth--;
8171 NTSTATUS ndr_push_srvsvc_NetSrvInfo1524(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1524 *r)
8173 if (ndr_flags & NDR_SCALARS) {
8174 NDR_CHECK(ndr_push_align(ndr, 4));
8175 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minkeepcomplsearch));
8177 if (ndr_flags & NDR_BUFFERS) {
8179 return NT_STATUS_OK;
8182 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1524(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1524 *r)
8184 if (ndr_flags & NDR_SCALARS) {
8185 NDR_CHECK(ndr_pull_align(ndr, 4));
8186 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minkeepcomplsearch));
8188 if (ndr_flags & NDR_BUFFERS) {
8190 return NT_STATUS_OK;
8193 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1524(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1524 *r)
8195 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1524");
8196 ndr->depth++;
8197 ndr_print_uint32(ndr, "minkeepcomplsearch", r->minkeepcomplsearch);
8198 ndr->depth--;
8201 NTSTATUS ndr_push_srvsvc_NetSrvInfo1525(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1525 *r)
8203 if (ndr_flags & NDR_SCALARS) {
8204 NDR_CHECK(ndr_push_align(ndr, 4));
8205 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxkeepcomplsearch));
8207 if (ndr_flags & NDR_BUFFERS) {
8209 return NT_STATUS_OK;
8212 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1525(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1525 *r)
8214 if (ndr_flags & NDR_SCALARS) {
8215 NDR_CHECK(ndr_pull_align(ndr, 4));
8216 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxkeepcomplsearch));
8218 if (ndr_flags & NDR_BUFFERS) {
8220 return NT_STATUS_OK;
8223 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1525(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1525 *r)
8225 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1525");
8226 ndr->depth++;
8227 ndr_print_uint32(ndr, "maxkeepcomplsearch", r->maxkeepcomplsearch);
8228 ndr->depth--;
8231 NTSTATUS ndr_push_srvsvc_NetSrvInfo1528(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1528 *r)
8233 if (ndr_flags & NDR_SCALARS) {
8234 NDR_CHECK(ndr_push_align(ndr, 4));
8235 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->scavtimeout));
8237 if (ndr_flags & NDR_BUFFERS) {
8239 return NT_STATUS_OK;
8242 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1528(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1528 *r)
8244 if (ndr_flags & NDR_SCALARS) {
8245 NDR_CHECK(ndr_pull_align(ndr, 4));
8246 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->scavtimeout));
8248 if (ndr_flags & NDR_BUFFERS) {
8250 return NT_STATUS_OK;
8253 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1528(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1528 *r)
8255 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1528");
8256 ndr->depth++;
8257 ndr_print_uint32(ndr, "scavtimeout", r->scavtimeout);
8258 ndr->depth--;
8261 NTSTATUS ndr_push_srvsvc_NetSrvInfo1529(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1529 *r)
8263 if (ndr_flags & NDR_SCALARS) {
8264 NDR_CHECK(ndr_push_align(ndr, 4));
8265 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minrcvqueue));
8267 if (ndr_flags & NDR_BUFFERS) {
8269 return NT_STATUS_OK;
8272 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1529(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1529 *r)
8274 if (ndr_flags & NDR_SCALARS) {
8275 NDR_CHECK(ndr_pull_align(ndr, 4));
8276 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minrcvqueue));
8278 if (ndr_flags & NDR_BUFFERS) {
8280 return NT_STATUS_OK;
8283 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1529(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1529 *r)
8285 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1529");
8286 ndr->depth++;
8287 ndr_print_uint32(ndr, "minrcvqueue", r->minrcvqueue);
8288 ndr->depth--;
8291 NTSTATUS ndr_push_srvsvc_NetSrvInfo1530(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1530 *r)
8293 if (ndr_flags & NDR_SCALARS) {
8294 NDR_CHECK(ndr_push_align(ndr, 4));
8295 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minfreeworkitems));
8297 if (ndr_flags & NDR_BUFFERS) {
8299 return NT_STATUS_OK;
8302 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1530(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1530 *r)
8304 if (ndr_flags & NDR_SCALARS) {
8305 NDR_CHECK(ndr_pull_align(ndr, 4));
8306 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minfreeworkitems));
8308 if (ndr_flags & NDR_BUFFERS) {
8310 return NT_STATUS_OK;
8313 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1530(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1530 *r)
8315 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1530");
8316 ndr->depth++;
8317 ndr_print_uint32(ndr, "minfreeworkitems", r->minfreeworkitems);
8318 ndr->depth--;
8321 NTSTATUS ndr_push_srvsvc_NetSrvInfo1533(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1533 *r)
8323 if (ndr_flags & NDR_SCALARS) {
8324 NDR_CHECK(ndr_push_align(ndr, 4));
8325 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxmpxct));
8327 if (ndr_flags & NDR_BUFFERS) {
8329 return NT_STATUS_OK;
8332 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1533(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1533 *r)
8334 if (ndr_flags & NDR_SCALARS) {
8335 NDR_CHECK(ndr_pull_align(ndr, 4));
8336 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxmpxct));
8338 if (ndr_flags & NDR_BUFFERS) {
8340 return NT_STATUS_OK;
8343 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1533(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1533 *r)
8345 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1533");
8346 ndr->depth++;
8347 ndr_print_uint32(ndr, "maxmpxct", r->maxmpxct);
8348 ndr->depth--;
8351 NTSTATUS ndr_push_srvsvc_NetSrvInfo1534(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1534 *r)
8353 if (ndr_flags & NDR_SCALARS) {
8354 NDR_CHECK(ndr_push_align(ndr, 4));
8355 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->oplockbreakwait));
8357 if (ndr_flags & NDR_BUFFERS) {
8359 return NT_STATUS_OK;
8362 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1534(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1534 *r)
8364 if (ndr_flags & NDR_SCALARS) {
8365 NDR_CHECK(ndr_pull_align(ndr, 4));
8366 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->oplockbreakwait));
8368 if (ndr_flags & NDR_BUFFERS) {
8370 return NT_STATUS_OK;
8373 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1534(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1534 *r)
8375 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1534");
8376 ndr->depth++;
8377 ndr_print_uint32(ndr, "oplockbreakwait", r->oplockbreakwait);
8378 ndr->depth--;
8381 NTSTATUS ndr_push_srvsvc_NetSrvInfo1535(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1535 *r)
8383 if (ndr_flags & NDR_SCALARS) {
8384 NDR_CHECK(ndr_push_align(ndr, 4));
8385 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->oplockbreakresponsewait));
8387 if (ndr_flags & NDR_BUFFERS) {
8389 return NT_STATUS_OK;
8392 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1535(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1535 *r)
8394 if (ndr_flags & NDR_SCALARS) {
8395 NDR_CHECK(ndr_pull_align(ndr, 4));
8396 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->oplockbreakresponsewait));
8398 if (ndr_flags & NDR_BUFFERS) {
8400 return NT_STATUS_OK;
8403 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1535(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1535 *r)
8405 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1535");
8406 ndr->depth++;
8407 ndr_print_uint32(ndr, "oplockbreakresponsewait", r->oplockbreakresponsewait);
8408 ndr->depth--;
8411 NTSTATUS ndr_push_srvsvc_NetSrvInfo1536(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1536 *r)
8413 if (ndr_flags & NDR_SCALARS) {
8414 NDR_CHECK(ndr_push_align(ndr, 4));
8415 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableoplocks));
8417 if (ndr_flags & NDR_BUFFERS) {
8419 return NT_STATUS_OK;
8422 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1536(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1536 *r)
8424 if (ndr_flags & NDR_SCALARS) {
8425 NDR_CHECK(ndr_pull_align(ndr, 4));
8426 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableoplocks));
8428 if (ndr_flags & NDR_BUFFERS) {
8430 return NT_STATUS_OK;
8433 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1536(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1536 *r)
8435 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1536");
8436 ndr->depth++;
8437 ndr_print_uint32(ndr, "enableoplocks", r->enableoplocks);
8438 ndr->depth--;
8441 NTSTATUS ndr_push_srvsvc_NetSrvInfo1537(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1537 *r)
8443 if (ndr_flags & NDR_SCALARS) {
8444 NDR_CHECK(ndr_push_align(ndr, 4));
8445 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableoplockforceclose));
8447 if (ndr_flags & NDR_BUFFERS) {
8449 return NT_STATUS_OK;
8452 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1537(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1537 *r)
8454 if (ndr_flags & NDR_SCALARS) {
8455 NDR_CHECK(ndr_pull_align(ndr, 4));
8456 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableoplockforceclose));
8458 if (ndr_flags & NDR_BUFFERS) {
8460 return NT_STATUS_OK;
8463 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1537(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1537 *r)
8465 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1537");
8466 ndr->depth++;
8467 ndr_print_uint32(ndr, "enableoplockforceclose", r->enableoplockforceclose);
8468 ndr->depth--;
8471 NTSTATUS ndr_push_srvsvc_NetSrvInfo1538(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1538 *r)
8473 if (ndr_flags & NDR_SCALARS) {
8474 NDR_CHECK(ndr_push_align(ndr, 4));
8475 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablefcbopens));
8477 if (ndr_flags & NDR_BUFFERS) {
8479 return NT_STATUS_OK;
8482 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1538(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1538 *r)
8484 if (ndr_flags & NDR_SCALARS) {
8485 NDR_CHECK(ndr_pull_align(ndr, 4));
8486 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablefcbopens));
8488 if (ndr_flags & NDR_BUFFERS) {
8490 return NT_STATUS_OK;
8493 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1538(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1538 *r)
8495 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1538");
8496 ndr->depth++;
8497 ndr_print_uint32(ndr, "enablefcbopens", r->enablefcbopens);
8498 ndr->depth--;
8501 NTSTATUS ndr_push_srvsvc_NetSrvInfo1539(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1539 *r)
8503 if (ndr_flags & NDR_SCALARS) {
8504 NDR_CHECK(ndr_push_align(ndr, 4));
8505 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableraw));
8507 if (ndr_flags & NDR_BUFFERS) {
8509 return NT_STATUS_OK;
8512 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1539(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1539 *r)
8514 if (ndr_flags & NDR_SCALARS) {
8515 NDR_CHECK(ndr_pull_align(ndr, 4));
8516 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableraw));
8518 if (ndr_flags & NDR_BUFFERS) {
8520 return NT_STATUS_OK;
8523 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1539(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1539 *r)
8525 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1539");
8526 ndr->depth++;
8527 ndr_print_uint32(ndr, "enableraw", r->enableraw);
8528 ndr->depth--;
8531 NTSTATUS ndr_push_srvsvc_NetSrvInfo1540(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1540 *r)
8533 if (ndr_flags & NDR_SCALARS) {
8534 NDR_CHECK(ndr_push_align(ndr, 4));
8535 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesharednetdrives));
8537 if (ndr_flags & NDR_BUFFERS) {
8539 return NT_STATUS_OK;
8542 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1540(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1540 *r)
8544 if (ndr_flags & NDR_SCALARS) {
8545 NDR_CHECK(ndr_pull_align(ndr, 4));
8546 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesharednetdrives));
8548 if (ndr_flags & NDR_BUFFERS) {
8550 return NT_STATUS_OK;
8553 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1540(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1540 *r)
8555 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1540");
8556 ndr->depth++;
8557 ndr_print_uint32(ndr, "enablesharednetdrives", r->enablesharednetdrives);
8558 ndr->depth--;
8561 NTSTATUS ndr_push_srvsvc_NetSrvInfo1541(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1541 *r)
8563 if (ndr_flags & NDR_SCALARS) {
8564 NDR_CHECK(ndr_push_align(ndr, 4));
8565 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minfreeconnections));
8567 if (ndr_flags & NDR_BUFFERS) {
8569 return NT_STATUS_OK;
8572 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1541(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1541 *r)
8574 if (ndr_flags & NDR_SCALARS) {
8575 NDR_CHECK(ndr_pull_align(ndr, 4));
8576 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minfreeconnections));
8578 if (ndr_flags & NDR_BUFFERS) {
8580 return NT_STATUS_OK;
8583 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1541(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1541 *r)
8585 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1541");
8586 ndr->depth++;
8587 ndr_print_uint32(ndr, "minfreeconnections", r->minfreeconnections);
8588 ndr->depth--;
8591 NTSTATUS ndr_push_srvsvc_NetSrvInfo1542(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1542 *r)
8593 if (ndr_flags & NDR_SCALARS) {
8594 NDR_CHECK(ndr_push_align(ndr, 4));
8595 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxfreeconnections));
8597 if (ndr_flags & NDR_BUFFERS) {
8599 return NT_STATUS_OK;
8602 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1542(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1542 *r)
8604 if (ndr_flags & NDR_SCALARS) {
8605 NDR_CHECK(ndr_pull_align(ndr, 4));
8606 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxfreeconnections));
8608 if (ndr_flags & NDR_BUFFERS) {
8610 return NT_STATUS_OK;
8613 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1542(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1542 *r)
8615 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1542");
8616 ndr->depth++;
8617 ndr_print_uint32(ndr, "maxfreeconnections", r->maxfreeconnections);
8618 ndr->depth--;
8621 NTSTATUS ndr_push_srvsvc_NetSrvInfo1543(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1543 *r)
8623 if (ndr_flags & NDR_SCALARS) {
8624 NDR_CHECK(ndr_push_align(ndr, 4));
8625 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initsesstable));
8627 if (ndr_flags & NDR_BUFFERS) {
8629 return NT_STATUS_OK;
8632 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1543(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1543 *r)
8634 if (ndr_flags & NDR_SCALARS) {
8635 NDR_CHECK(ndr_pull_align(ndr, 4));
8636 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initsesstable));
8638 if (ndr_flags & NDR_BUFFERS) {
8640 return NT_STATUS_OK;
8643 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1543(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1543 *r)
8645 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1543");
8646 ndr->depth++;
8647 ndr_print_uint32(ndr, "initsesstable", r->initsesstable);
8648 ndr->depth--;
8651 NTSTATUS ndr_push_srvsvc_NetSrvInfo1544(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1544 *r)
8653 if (ndr_flags & NDR_SCALARS) {
8654 NDR_CHECK(ndr_push_align(ndr, 4));
8655 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initconntable));
8657 if (ndr_flags & NDR_BUFFERS) {
8659 return NT_STATUS_OK;
8662 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1544(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1544 *r)
8664 if (ndr_flags & NDR_SCALARS) {
8665 NDR_CHECK(ndr_pull_align(ndr, 4));
8666 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initconntable));
8668 if (ndr_flags & NDR_BUFFERS) {
8670 return NT_STATUS_OK;
8673 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1544(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1544 *r)
8675 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1544");
8676 ndr->depth++;
8677 ndr_print_uint32(ndr, "initconntable", r->initconntable);
8678 ndr->depth--;
8681 NTSTATUS ndr_push_srvsvc_NetSrvInfo1545(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1545 *r)
8683 if (ndr_flags & NDR_SCALARS) {
8684 NDR_CHECK(ndr_push_align(ndr, 4));
8685 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initfiletable));
8687 if (ndr_flags & NDR_BUFFERS) {
8689 return NT_STATUS_OK;
8692 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1545(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1545 *r)
8694 if (ndr_flags & NDR_SCALARS) {
8695 NDR_CHECK(ndr_pull_align(ndr, 4));
8696 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initfiletable));
8698 if (ndr_flags & NDR_BUFFERS) {
8700 return NT_STATUS_OK;
8703 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1545(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1545 *r)
8705 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1545");
8706 ndr->depth++;
8707 ndr_print_uint32(ndr, "initfiletable", r->initfiletable);
8708 ndr->depth--;
8711 NTSTATUS ndr_push_srvsvc_NetSrvInfo1546(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1546 *r)
8713 if (ndr_flags & NDR_SCALARS) {
8714 NDR_CHECK(ndr_push_align(ndr, 4));
8715 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initsearchtable));
8717 if (ndr_flags & NDR_BUFFERS) {
8719 return NT_STATUS_OK;
8722 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1546(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1546 *r)
8724 if (ndr_flags & NDR_SCALARS) {
8725 NDR_CHECK(ndr_pull_align(ndr, 4));
8726 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initsearchtable));
8728 if (ndr_flags & NDR_BUFFERS) {
8730 return NT_STATUS_OK;
8733 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1546(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1546 *r)
8735 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1546");
8736 ndr->depth++;
8737 ndr_print_uint32(ndr, "initsearchtable", r->initsearchtable);
8738 ndr->depth--;
8741 NTSTATUS ndr_push_srvsvc_NetSrvInfo1547(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1547 *r)
8743 if (ndr_flags & NDR_SCALARS) {
8744 NDR_CHECK(ndr_push_align(ndr, 4));
8745 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->alertsched));
8747 if (ndr_flags & NDR_BUFFERS) {
8749 return NT_STATUS_OK;
8752 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1547(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1547 *r)
8754 if (ndr_flags & NDR_SCALARS) {
8755 NDR_CHECK(ndr_pull_align(ndr, 4));
8756 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->alertsched));
8758 if (ndr_flags & NDR_BUFFERS) {
8760 return NT_STATUS_OK;
8763 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1547(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1547 *r)
8765 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1547");
8766 ndr->depth++;
8767 ndr_print_uint32(ndr, "alertsched", r->alertsched);
8768 ndr->depth--;
8771 NTSTATUS ndr_push_srvsvc_NetSrvInfo1548(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1548 *r)
8773 if (ndr_flags & NDR_SCALARS) {
8774 NDR_CHECK(ndr_push_align(ndr, 4));
8775 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->errortreshold));
8777 if (ndr_flags & NDR_BUFFERS) {
8779 return NT_STATUS_OK;
8782 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1548(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1548 *r)
8784 if (ndr_flags & NDR_SCALARS) {
8785 NDR_CHECK(ndr_pull_align(ndr, 4));
8786 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->errortreshold));
8788 if (ndr_flags & NDR_BUFFERS) {
8790 return NT_STATUS_OK;
8793 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1548(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1548 *r)
8795 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1548");
8796 ndr->depth++;
8797 ndr_print_uint32(ndr, "errortreshold", r->errortreshold);
8798 ndr->depth--;
8801 NTSTATUS ndr_push_srvsvc_NetSrvInfo1549(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1549 *r)
8803 if (ndr_flags & NDR_SCALARS) {
8804 NDR_CHECK(ndr_push_align(ndr, 4));
8805 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->networkerrortreshold));
8807 if (ndr_flags & NDR_BUFFERS) {
8809 return NT_STATUS_OK;
8812 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1549(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1549 *r)
8814 if (ndr_flags & NDR_SCALARS) {
8815 NDR_CHECK(ndr_pull_align(ndr, 4));
8816 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->networkerrortreshold));
8818 if (ndr_flags & NDR_BUFFERS) {
8820 return NT_STATUS_OK;
8823 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1549(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1549 *r)
8825 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1549");
8826 ndr->depth++;
8827 ndr_print_uint32(ndr, "networkerrortreshold", r->networkerrortreshold);
8828 ndr->depth--;
8831 NTSTATUS ndr_push_srvsvc_NetSrvInfo1550(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1550 *r)
8833 if (ndr_flags & NDR_SCALARS) {
8834 NDR_CHECK(ndr_push_align(ndr, 4));
8835 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->diskspacetreshold));
8837 if (ndr_flags & NDR_BUFFERS) {
8839 return NT_STATUS_OK;
8842 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1550(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1550 *r)
8844 if (ndr_flags & NDR_SCALARS) {
8845 NDR_CHECK(ndr_pull_align(ndr, 4));
8846 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->diskspacetreshold));
8848 if (ndr_flags & NDR_BUFFERS) {
8850 return NT_STATUS_OK;
8853 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1550(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1550 *r)
8855 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1550");
8856 ndr->depth++;
8857 ndr_print_uint32(ndr, "diskspacetreshold", r->diskspacetreshold);
8858 ndr->depth--;
8861 NTSTATUS ndr_push_srvsvc_NetSrvInfo1552(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1552 *r)
8863 if (ndr_flags & NDR_SCALARS) {
8864 NDR_CHECK(ndr_push_align(ndr, 4));
8865 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxlinkdelay));
8867 if (ndr_flags & NDR_BUFFERS) {
8869 return NT_STATUS_OK;
8872 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1552(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1552 *r)
8874 if (ndr_flags & NDR_SCALARS) {
8875 NDR_CHECK(ndr_pull_align(ndr, 4));
8876 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxlinkdelay));
8878 if (ndr_flags & NDR_BUFFERS) {
8880 return NT_STATUS_OK;
8883 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1552(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1552 *r)
8885 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1552");
8886 ndr->depth++;
8887 ndr_print_uint32(ndr, "maxlinkdelay", r->maxlinkdelay);
8888 ndr->depth--;
8891 NTSTATUS ndr_push_srvsvc_NetSrvInfo1553(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1553 *r)
8893 if (ndr_flags & NDR_SCALARS) {
8894 NDR_CHECK(ndr_push_align(ndr, 4));
8895 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minlinkthroughput));
8897 if (ndr_flags & NDR_BUFFERS) {
8899 return NT_STATUS_OK;
8902 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1553(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1553 *r)
8904 if (ndr_flags & NDR_SCALARS) {
8905 NDR_CHECK(ndr_pull_align(ndr, 4));
8906 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minlinkthroughput));
8908 if (ndr_flags & NDR_BUFFERS) {
8910 return NT_STATUS_OK;
8913 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1553(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1553 *r)
8915 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1553");
8916 ndr->depth++;
8917 ndr_print_uint32(ndr, "minlinkthroughput", r->minlinkthroughput);
8918 ndr->depth--;
8921 NTSTATUS ndr_push_srvsvc_NetSrvInfo1554(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1554 *r)
8923 if (ndr_flags & NDR_SCALARS) {
8924 NDR_CHECK(ndr_push_align(ndr, 4));
8925 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->linkinfovalidtime));
8927 if (ndr_flags & NDR_BUFFERS) {
8929 return NT_STATUS_OK;
8932 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1554(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1554 *r)
8934 if (ndr_flags & NDR_SCALARS) {
8935 NDR_CHECK(ndr_pull_align(ndr, 4));
8936 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->linkinfovalidtime));
8938 if (ndr_flags & NDR_BUFFERS) {
8940 return NT_STATUS_OK;
8943 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1554(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1554 *r)
8945 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1554");
8946 ndr->depth++;
8947 ndr_print_uint32(ndr, "linkinfovalidtime", r->linkinfovalidtime);
8948 ndr->depth--;
8951 NTSTATUS ndr_push_srvsvc_NetSrvInfo1555(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1555 *r)
8953 if (ndr_flags & NDR_SCALARS) {
8954 NDR_CHECK(ndr_push_align(ndr, 4));
8955 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->scavqosinfoupdatetime));
8957 if (ndr_flags & NDR_BUFFERS) {
8959 return NT_STATUS_OK;
8962 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1555(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1555 *r)
8964 if (ndr_flags & NDR_SCALARS) {
8965 NDR_CHECK(ndr_pull_align(ndr, 4));
8966 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->scavqosinfoupdatetime));
8968 if (ndr_flags & NDR_BUFFERS) {
8970 return NT_STATUS_OK;
8973 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1555(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1555 *r)
8975 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1555");
8976 ndr->depth++;
8977 ndr_print_uint32(ndr, "scavqosinfoupdatetime", r->scavqosinfoupdatetime);
8978 ndr->depth--;
8981 NTSTATUS ndr_push_srvsvc_NetSrvInfo1556(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1556 *r)
8983 if (ndr_flags & NDR_SCALARS) {
8984 NDR_CHECK(ndr_push_align(ndr, 4));
8985 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxworkitemidletime));
8987 if (ndr_flags & NDR_BUFFERS) {
8989 return NT_STATUS_OK;
8992 NTSTATUS ndr_pull_srvsvc_NetSrvInfo1556(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1556 *r)
8994 if (ndr_flags & NDR_SCALARS) {
8995 NDR_CHECK(ndr_pull_align(ndr, 4));
8996 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxworkitemidletime));
8998 if (ndr_flags & NDR_BUFFERS) {
9000 return NT_STATUS_OK;
9003 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1556(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1556 *r)
9005 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1556");
9006 ndr->depth++;
9007 ndr_print_uint32(ndr, "maxworkitemidletime", r->maxworkitemidletime);
9008 ndr->depth--;
9011 NTSTATUS ndr_push_srvsvc_NetSrvInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetSrvInfo *r)
9013 if (ndr_flags & NDR_SCALARS) {
9014 int level = ndr_push_get_switch_value(ndr, r);
9015 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
9016 switch (level) {
9017 case 100:
9018 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info100));
9019 break;
9021 case 101:
9022 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info101));
9023 break;
9025 case 102:
9026 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info102));
9027 break;
9029 case 402:
9030 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info402));
9031 break;
9033 case 403:
9034 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info403));
9035 break;
9037 case 502:
9038 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info502));
9039 break;
9041 case 503:
9042 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info503));
9043 break;
9045 case 599:
9046 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info599));
9047 break;
9049 case 1005:
9050 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1005));
9051 break;
9053 case 1010:
9054 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1010));
9055 break;
9057 case 1016:
9058 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1016));
9059 break;
9061 case 1017:
9062 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1017));
9063 break;
9065 case 1018:
9066 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1018));
9067 break;
9069 case 1107:
9070 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1107));
9071 break;
9073 case 1501:
9074 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1501));
9075 break;
9077 case 1502:
9078 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1502));
9079 break;
9081 case 1503:
9082 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1503));
9083 break;
9085 case 1506:
9086 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1506));
9087 break;
9089 case 1509:
9090 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1509));
9091 break;
9093 case 1510:
9094 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1510));
9095 break;
9097 case 1511:
9098 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1511));
9099 break;
9101 case 1512:
9102 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1512));
9103 break;
9105 case 1513:
9106 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1513));
9107 break;
9109 case 1514:
9110 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1514));
9111 break;
9113 case 1515:
9114 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1515));
9115 break;
9117 case 1516:
9118 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1516));
9119 break;
9121 case 1518:
9122 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1518));
9123 break;
9125 case 1520:
9126 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1520));
9127 break;
9129 case 1521:
9130 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1521));
9131 break;
9133 case 1522:
9134 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1522));
9135 break;
9137 case 1523:
9138 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1523));
9139 break;
9141 case 1524:
9142 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1524));
9143 break;
9145 case 1525:
9146 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1525));
9147 break;
9149 case 1528:
9150 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1528));
9151 break;
9153 case 1529:
9154 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1529));
9155 break;
9157 case 1530:
9158 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1530));
9159 break;
9161 case 1533:
9162 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1533));
9163 break;
9165 case 1534:
9166 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1534));
9167 break;
9169 case 1535:
9170 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1535));
9171 break;
9173 case 1536:
9174 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1536));
9175 break;
9177 case 1537:
9178 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1537));
9179 break;
9181 case 1538:
9182 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1538));
9183 break;
9185 case 1539:
9186 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1539));
9187 break;
9189 case 1540:
9190 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1540));
9191 break;
9193 case 1541:
9194 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1541));
9195 break;
9197 case 1542:
9198 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1542));
9199 break;
9201 case 1543:
9202 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1543));
9203 break;
9205 case 1544:
9206 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1544));
9207 break;
9209 case 1545:
9210 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1545));
9211 break;
9213 case 1546:
9214 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1546));
9215 break;
9217 case 1547:
9218 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1547));
9219 break;
9221 case 1548:
9222 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1548));
9223 break;
9225 case 1549:
9226 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1549));
9227 break;
9229 case 1550:
9230 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1550));
9231 break;
9233 case 1552:
9234 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1552));
9235 break;
9237 case 1553:
9238 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1553));
9239 break;
9241 case 1554:
9242 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1554));
9243 break;
9245 case 1555:
9246 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1555));
9247 break;
9249 case 1556:
9250 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1556));
9251 break;
9253 default:
9254 break;
9258 if (ndr_flags & NDR_BUFFERS) {
9259 int level = ndr_push_get_switch_value(ndr, r);
9260 switch (level) {
9261 case 100:
9262 if (r->info100) {
9263 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo100(ndr, NDR_SCALARS|NDR_BUFFERS, r->info100));
9265 break;
9267 case 101:
9268 if (r->info101) {
9269 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo101(ndr, NDR_SCALARS|NDR_BUFFERS, r->info101));
9271 break;
9273 case 102:
9274 if (r->info102) {
9275 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo102(ndr, NDR_SCALARS|NDR_BUFFERS, r->info102));
9277 break;
9279 case 402:
9280 if (r->info402) {
9281 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo402(ndr, NDR_SCALARS|NDR_BUFFERS, r->info402));
9283 break;
9285 case 403:
9286 if (r->info403) {
9287 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo403(ndr, NDR_SCALARS|NDR_BUFFERS, r->info403));
9289 break;
9291 case 502:
9292 if (r->info502) {
9293 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo502(ndr, NDR_SCALARS, r->info502));
9295 break;
9297 case 503:
9298 if (r->info503) {
9299 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo503(ndr, NDR_SCALARS|NDR_BUFFERS, r->info503));
9301 break;
9303 case 599:
9304 if (r->info599) {
9305 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo599(ndr, NDR_SCALARS|NDR_BUFFERS, r->info599));
9307 break;
9309 case 1005:
9310 if (r->info1005) {
9311 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1005(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1005));
9313 break;
9315 case 1010:
9316 if (r->info1010) {
9317 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1010(ndr, NDR_SCALARS, r->info1010));
9319 break;
9321 case 1016:
9322 if (r->info1016) {
9323 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1016(ndr, NDR_SCALARS, r->info1016));
9325 break;
9327 case 1017:
9328 if (r->info1017) {
9329 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1017(ndr, NDR_SCALARS, r->info1017));
9331 break;
9333 case 1018:
9334 if (r->info1018) {
9335 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1018(ndr, NDR_SCALARS, r->info1018));
9337 break;
9339 case 1107:
9340 if (r->info1107) {
9341 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1107(ndr, NDR_SCALARS, r->info1107));
9343 break;
9345 case 1501:
9346 if (r->info1501) {
9347 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1501(ndr, NDR_SCALARS, r->info1501));
9349 break;
9351 case 1502:
9352 if (r->info1502) {
9353 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1502(ndr, NDR_SCALARS, r->info1502));
9355 break;
9357 case 1503:
9358 if (r->info1503) {
9359 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1503(ndr, NDR_SCALARS, r->info1503));
9361 break;
9363 case 1506:
9364 if (r->info1506) {
9365 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1506(ndr, NDR_SCALARS, r->info1506));
9367 break;
9369 case 1509:
9370 if (r->info1509) {
9371 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1509(ndr, NDR_SCALARS, r->info1509));
9373 break;
9375 case 1510:
9376 if (r->info1510) {
9377 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1510(ndr, NDR_SCALARS, r->info1510));
9379 break;
9381 case 1511:
9382 if (r->info1511) {
9383 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1511(ndr, NDR_SCALARS, r->info1511));
9385 break;
9387 case 1512:
9388 if (r->info1512) {
9389 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1512(ndr, NDR_SCALARS, r->info1512));
9391 break;
9393 case 1513:
9394 if (r->info1513) {
9395 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1513(ndr, NDR_SCALARS, r->info1513));
9397 break;
9399 case 1514:
9400 if (r->info1514) {
9401 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1514(ndr, NDR_SCALARS, r->info1514));
9403 break;
9405 case 1515:
9406 if (r->info1515) {
9407 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1515(ndr, NDR_SCALARS, r->info1515));
9409 break;
9411 case 1516:
9412 if (r->info1516) {
9413 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1516(ndr, NDR_SCALARS, r->info1516));
9415 break;
9417 case 1518:
9418 if (r->info1518) {
9419 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1518(ndr, NDR_SCALARS, r->info1518));
9421 break;
9423 case 1520:
9424 if (r->info1520) {
9425 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1520(ndr, NDR_SCALARS, r->info1520));
9427 break;
9429 case 1521:
9430 if (r->info1521) {
9431 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1521(ndr, NDR_SCALARS, r->info1521));
9433 break;
9435 case 1522:
9436 if (r->info1522) {
9437 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1522(ndr, NDR_SCALARS, r->info1522));
9439 break;
9441 case 1523:
9442 if (r->info1523) {
9443 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1523(ndr, NDR_SCALARS, r->info1523));
9445 break;
9447 case 1524:
9448 if (r->info1524) {
9449 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1524(ndr, NDR_SCALARS, r->info1524));
9451 break;
9453 case 1525:
9454 if (r->info1525) {
9455 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1525(ndr, NDR_SCALARS, r->info1525));
9457 break;
9459 case 1528:
9460 if (r->info1528) {
9461 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1528(ndr, NDR_SCALARS, r->info1528));
9463 break;
9465 case 1529:
9466 if (r->info1529) {
9467 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1529(ndr, NDR_SCALARS, r->info1529));
9469 break;
9471 case 1530:
9472 if (r->info1530) {
9473 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1530(ndr, NDR_SCALARS, r->info1530));
9475 break;
9477 case 1533:
9478 if (r->info1533) {
9479 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1533(ndr, NDR_SCALARS, r->info1533));
9481 break;
9483 case 1534:
9484 if (r->info1534) {
9485 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1534(ndr, NDR_SCALARS, r->info1534));
9487 break;
9489 case 1535:
9490 if (r->info1535) {
9491 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1535(ndr, NDR_SCALARS, r->info1535));
9493 break;
9495 case 1536:
9496 if (r->info1536) {
9497 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1536(ndr, NDR_SCALARS, r->info1536));
9499 break;
9501 case 1537:
9502 if (r->info1537) {
9503 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1537(ndr, NDR_SCALARS, r->info1537));
9505 break;
9507 case 1538:
9508 if (r->info1538) {
9509 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1538(ndr, NDR_SCALARS, r->info1538));
9511 break;
9513 case 1539:
9514 if (r->info1539) {
9515 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1539(ndr, NDR_SCALARS, r->info1539));
9517 break;
9519 case 1540:
9520 if (r->info1540) {
9521 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1540(ndr, NDR_SCALARS, r->info1540));
9523 break;
9525 case 1541:
9526 if (r->info1541) {
9527 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1541(ndr, NDR_SCALARS, r->info1541));
9529 break;
9531 case 1542:
9532 if (r->info1542) {
9533 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1542(ndr, NDR_SCALARS, r->info1542));
9535 break;
9537 case 1543:
9538 if (r->info1543) {
9539 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1543(ndr, NDR_SCALARS, r->info1543));
9541 break;
9543 case 1544:
9544 if (r->info1544) {
9545 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1544(ndr, NDR_SCALARS, r->info1544));
9547 break;
9549 case 1545:
9550 if (r->info1545) {
9551 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1545(ndr, NDR_SCALARS, r->info1545));
9553 break;
9555 case 1546:
9556 if (r->info1546) {
9557 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1546(ndr, NDR_SCALARS, r->info1546));
9559 break;
9561 case 1547:
9562 if (r->info1547) {
9563 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1547(ndr, NDR_SCALARS, r->info1547));
9565 break;
9567 case 1548:
9568 if (r->info1548) {
9569 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1548(ndr, NDR_SCALARS, r->info1548));
9571 break;
9573 case 1549:
9574 if (r->info1549) {
9575 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1549(ndr, NDR_SCALARS, r->info1549));
9577 break;
9579 case 1550:
9580 if (r->info1550) {
9581 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1550(ndr, NDR_SCALARS, r->info1550));
9583 break;
9585 case 1552:
9586 if (r->info1552) {
9587 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1552(ndr, NDR_SCALARS, r->info1552));
9589 break;
9591 case 1553:
9592 if (r->info1553) {
9593 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1553(ndr, NDR_SCALARS, r->info1553));
9595 break;
9597 case 1554:
9598 if (r->info1554) {
9599 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1554(ndr, NDR_SCALARS, r->info1554));
9601 break;
9603 case 1555:
9604 if (r->info1555) {
9605 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1555(ndr, NDR_SCALARS, r->info1555));
9607 break;
9609 case 1556:
9610 if (r->info1556) {
9611 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1556(ndr, NDR_SCALARS, r->info1556));
9613 break;
9615 default:
9616 break;
9620 return NT_STATUS_OK;
9623 NTSTATUS ndr_pull_srvsvc_NetSrvInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetSrvInfo *r)
9625 int level;
9626 uint32_t _level;
9627 TALLOC_CTX *_mem_save_info100_0;
9628 TALLOC_CTX *_mem_save_info101_0;
9629 TALLOC_CTX *_mem_save_info102_0;
9630 TALLOC_CTX *_mem_save_info402_0;
9631 TALLOC_CTX *_mem_save_info403_0;
9632 TALLOC_CTX *_mem_save_info502_0;
9633 TALLOC_CTX *_mem_save_info503_0;
9634 TALLOC_CTX *_mem_save_info599_0;
9635 TALLOC_CTX *_mem_save_info1005_0;
9636 TALLOC_CTX *_mem_save_info1010_0;
9637 TALLOC_CTX *_mem_save_info1016_0;
9638 TALLOC_CTX *_mem_save_info1017_0;
9639 TALLOC_CTX *_mem_save_info1018_0;
9640 TALLOC_CTX *_mem_save_info1107_0;
9641 TALLOC_CTX *_mem_save_info1501_0;
9642 TALLOC_CTX *_mem_save_info1502_0;
9643 TALLOC_CTX *_mem_save_info1503_0;
9644 TALLOC_CTX *_mem_save_info1506_0;
9645 TALLOC_CTX *_mem_save_info1509_0;
9646 TALLOC_CTX *_mem_save_info1510_0;
9647 TALLOC_CTX *_mem_save_info1511_0;
9648 TALLOC_CTX *_mem_save_info1512_0;
9649 TALLOC_CTX *_mem_save_info1513_0;
9650 TALLOC_CTX *_mem_save_info1514_0;
9651 TALLOC_CTX *_mem_save_info1515_0;
9652 TALLOC_CTX *_mem_save_info1516_0;
9653 TALLOC_CTX *_mem_save_info1518_0;
9654 TALLOC_CTX *_mem_save_info1520_0;
9655 TALLOC_CTX *_mem_save_info1521_0;
9656 TALLOC_CTX *_mem_save_info1522_0;
9657 TALLOC_CTX *_mem_save_info1523_0;
9658 TALLOC_CTX *_mem_save_info1524_0;
9659 TALLOC_CTX *_mem_save_info1525_0;
9660 TALLOC_CTX *_mem_save_info1528_0;
9661 TALLOC_CTX *_mem_save_info1529_0;
9662 TALLOC_CTX *_mem_save_info1530_0;
9663 TALLOC_CTX *_mem_save_info1533_0;
9664 TALLOC_CTX *_mem_save_info1534_0;
9665 TALLOC_CTX *_mem_save_info1535_0;
9666 TALLOC_CTX *_mem_save_info1536_0;
9667 TALLOC_CTX *_mem_save_info1537_0;
9668 TALLOC_CTX *_mem_save_info1538_0;
9669 TALLOC_CTX *_mem_save_info1539_0;
9670 TALLOC_CTX *_mem_save_info1540_0;
9671 TALLOC_CTX *_mem_save_info1541_0;
9672 TALLOC_CTX *_mem_save_info1542_0;
9673 TALLOC_CTX *_mem_save_info1543_0;
9674 TALLOC_CTX *_mem_save_info1544_0;
9675 TALLOC_CTX *_mem_save_info1545_0;
9676 TALLOC_CTX *_mem_save_info1546_0;
9677 TALLOC_CTX *_mem_save_info1547_0;
9678 TALLOC_CTX *_mem_save_info1548_0;
9679 TALLOC_CTX *_mem_save_info1549_0;
9680 TALLOC_CTX *_mem_save_info1550_0;
9681 TALLOC_CTX *_mem_save_info1552_0;
9682 TALLOC_CTX *_mem_save_info1553_0;
9683 TALLOC_CTX *_mem_save_info1554_0;
9684 TALLOC_CTX *_mem_save_info1555_0;
9685 TALLOC_CTX *_mem_save_info1556_0;
9686 level = ndr_pull_get_switch_value(ndr, r);
9687 if (ndr_flags & NDR_SCALARS) {
9688 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
9689 if (_level != level) {
9690 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
9692 switch (level) {
9693 case 100: {
9694 uint32_t _ptr_info100;
9695 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info100));
9696 if (_ptr_info100) {
9697 NDR_PULL_ALLOC(ndr, r->info100);
9698 } else {
9699 r->info100 = NULL;
9701 break; }
9703 case 101: {
9704 uint32_t _ptr_info101;
9705 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info101));
9706 if (_ptr_info101) {
9707 NDR_PULL_ALLOC(ndr, r->info101);
9708 } else {
9709 r->info101 = NULL;
9711 break; }
9713 case 102: {
9714 uint32_t _ptr_info102;
9715 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info102));
9716 if (_ptr_info102) {
9717 NDR_PULL_ALLOC(ndr, r->info102);
9718 } else {
9719 r->info102 = NULL;
9721 break; }
9723 case 402: {
9724 uint32_t _ptr_info402;
9725 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info402));
9726 if (_ptr_info402) {
9727 NDR_PULL_ALLOC(ndr, r->info402);
9728 } else {
9729 r->info402 = NULL;
9731 break; }
9733 case 403: {
9734 uint32_t _ptr_info403;
9735 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info403));
9736 if (_ptr_info403) {
9737 NDR_PULL_ALLOC(ndr, r->info403);
9738 } else {
9739 r->info403 = NULL;
9741 break; }
9743 case 502: {
9744 uint32_t _ptr_info502;
9745 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info502));
9746 if (_ptr_info502) {
9747 NDR_PULL_ALLOC(ndr, r->info502);
9748 } else {
9749 r->info502 = NULL;
9751 break; }
9753 case 503: {
9754 uint32_t _ptr_info503;
9755 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info503));
9756 if (_ptr_info503) {
9757 NDR_PULL_ALLOC(ndr, r->info503);
9758 } else {
9759 r->info503 = NULL;
9761 break; }
9763 case 599: {
9764 uint32_t _ptr_info599;
9765 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info599));
9766 if (_ptr_info599) {
9767 NDR_PULL_ALLOC(ndr, r->info599);
9768 } else {
9769 r->info599 = NULL;
9771 break; }
9773 case 1005: {
9774 uint32_t _ptr_info1005;
9775 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1005));
9776 if (_ptr_info1005) {
9777 NDR_PULL_ALLOC(ndr, r->info1005);
9778 } else {
9779 r->info1005 = NULL;
9781 break; }
9783 case 1010: {
9784 uint32_t _ptr_info1010;
9785 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1010));
9786 if (_ptr_info1010) {
9787 NDR_PULL_ALLOC(ndr, r->info1010);
9788 } else {
9789 r->info1010 = NULL;
9791 break; }
9793 case 1016: {
9794 uint32_t _ptr_info1016;
9795 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1016));
9796 if (_ptr_info1016) {
9797 NDR_PULL_ALLOC(ndr, r->info1016);
9798 } else {
9799 r->info1016 = NULL;
9801 break; }
9803 case 1017: {
9804 uint32_t _ptr_info1017;
9805 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1017));
9806 if (_ptr_info1017) {
9807 NDR_PULL_ALLOC(ndr, r->info1017);
9808 } else {
9809 r->info1017 = NULL;
9811 break; }
9813 case 1018: {
9814 uint32_t _ptr_info1018;
9815 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1018));
9816 if (_ptr_info1018) {
9817 NDR_PULL_ALLOC(ndr, r->info1018);
9818 } else {
9819 r->info1018 = NULL;
9821 break; }
9823 case 1107: {
9824 uint32_t _ptr_info1107;
9825 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1107));
9826 if (_ptr_info1107) {
9827 NDR_PULL_ALLOC(ndr, r->info1107);
9828 } else {
9829 r->info1107 = NULL;
9831 break; }
9833 case 1501: {
9834 uint32_t _ptr_info1501;
9835 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1501));
9836 if (_ptr_info1501) {
9837 NDR_PULL_ALLOC(ndr, r->info1501);
9838 } else {
9839 r->info1501 = NULL;
9841 break; }
9843 case 1502: {
9844 uint32_t _ptr_info1502;
9845 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1502));
9846 if (_ptr_info1502) {
9847 NDR_PULL_ALLOC(ndr, r->info1502);
9848 } else {
9849 r->info1502 = NULL;
9851 break; }
9853 case 1503: {
9854 uint32_t _ptr_info1503;
9855 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1503));
9856 if (_ptr_info1503) {
9857 NDR_PULL_ALLOC(ndr, r->info1503);
9858 } else {
9859 r->info1503 = NULL;
9861 break; }
9863 case 1506: {
9864 uint32_t _ptr_info1506;
9865 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1506));
9866 if (_ptr_info1506) {
9867 NDR_PULL_ALLOC(ndr, r->info1506);
9868 } else {
9869 r->info1506 = NULL;
9871 break; }
9873 case 1509: {
9874 uint32_t _ptr_info1509;
9875 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1509));
9876 if (_ptr_info1509) {
9877 NDR_PULL_ALLOC(ndr, r->info1509);
9878 } else {
9879 r->info1509 = NULL;
9881 break; }
9883 case 1510: {
9884 uint32_t _ptr_info1510;
9885 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1510));
9886 if (_ptr_info1510) {
9887 NDR_PULL_ALLOC(ndr, r->info1510);
9888 } else {
9889 r->info1510 = NULL;
9891 break; }
9893 case 1511: {
9894 uint32_t _ptr_info1511;
9895 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1511));
9896 if (_ptr_info1511) {
9897 NDR_PULL_ALLOC(ndr, r->info1511);
9898 } else {
9899 r->info1511 = NULL;
9901 break; }
9903 case 1512: {
9904 uint32_t _ptr_info1512;
9905 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1512));
9906 if (_ptr_info1512) {
9907 NDR_PULL_ALLOC(ndr, r->info1512);
9908 } else {
9909 r->info1512 = NULL;
9911 break; }
9913 case 1513: {
9914 uint32_t _ptr_info1513;
9915 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1513));
9916 if (_ptr_info1513) {
9917 NDR_PULL_ALLOC(ndr, r->info1513);
9918 } else {
9919 r->info1513 = NULL;
9921 break; }
9923 case 1514: {
9924 uint32_t _ptr_info1514;
9925 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1514));
9926 if (_ptr_info1514) {
9927 NDR_PULL_ALLOC(ndr, r->info1514);
9928 } else {
9929 r->info1514 = NULL;
9931 break; }
9933 case 1515: {
9934 uint32_t _ptr_info1515;
9935 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1515));
9936 if (_ptr_info1515) {
9937 NDR_PULL_ALLOC(ndr, r->info1515);
9938 } else {
9939 r->info1515 = NULL;
9941 break; }
9943 case 1516: {
9944 uint32_t _ptr_info1516;
9945 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1516));
9946 if (_ptr_info1516) {
9947 NDR_PULL_ALLOC(ndr, r->info1516);
9948 } else {
9949 r->info1516 = NULL;
9951 break; }
9953 case 1518: {
9954 uint32_t _ptr_info1518;
9955 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1518));
9956 if (_ptr_info1518) {
9957 NDR_PULL_ALLOC(ndr, r->info1518);
9958 } else {
9959 r->info1518 = NULL;
9961 break; }
9963 case 1520: {
9964 uint32_t _ptr_info1520;
9965 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1520));
9966 if (_ptr_info1520) {
9967 NDR_PULL_ALLOC(ndr, r->info1520);
9968 } else {
9969 r->info1520 = NULL;
9971 break; }
9973 case 1521: {
9974 uint32_t _ptr_info1521;
9975 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1521));
9976 if (_ptr_info1521) {
9977 NDR_PULL_ALLOC(ndr, r->info1521);
9978 } else {
9979 r->info1521 = NULL;
9981 break; }
9983 case 1522: {
9984 uint32_t _ptr_info1522;
9985 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1522));
9986 if (_ptr_info1522) {
9987 NDR_PULL_ALLOC(ndr, r->info1522);
9988 } else {
9989 r->info1522 = NULL;
9991 break; }
9993 case 1523: {
9994 uint32_t _ptr_info1523;
9995 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1523));
9996 if (_ptr_info1523) {
9997 NDR_PULL_ALLOC(ndr, r->info1523);
9998 } else {
9999 r->info1523 = NULL;
10001 break; }
10003 case 1524: {
10004 uint32_t _ptr_info1524;
10005 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1524));
10006 if (_ptr_info1524) {
10007 NDR_PULL_ALLOC(ndr, r->info1524);
10008 } else {
10009 r->info1524 = NULL;
10011 break; }
10013 case 1525: {
10014 uint32_t _ptr_info1525;
10015 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1525));
10016 if (_ptr_info1525) {
10017 NDR_PULL_ALLOC(ndr, r->info1525);
10018 } else {
10019 r->info1525 = NULL;
10021 break; }
10023 case 1528: {
10024 uint32_t _ptr_info1528;
10025 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1528));
10026 if (_ptr_info1528) {
10027 NDR_PULL_ALLOC(ndr, r->info1528);
10028 } else {
10029 r->info1528 = NULL;
10031 break; }
10033 case 1529: {
10034 uint32_t _ptr_info1529;
10035 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1529));
10036 if (_ptr_info1529) {
10037 NDR_PULL_ALLOC(ndr, r->info1529);
10038 } else {
10039 r->info1529 = NULL;
10041 break; }
10043 case 1530: {
10044 uint32_t _ptr_info1530;
10045 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1530));
10046 if (_ptr_info1530) {
10047 NDR_PULL_ALLOC(ndr, r->info1530);
10048 } else {
10049 r->info1530 = NULL;
10051 break; }
10053 case 1533: {
10054 uint32_t _ptr_info1533;
10055 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1533));
10056 if (_ptr_info1533) {
10057 NDR_PULL_ALLOC(ndr, r->info1533);
10058 } else {
10059 r->info1533 = NULL;
10061 break; }
10063 case 1534: {
10064 uint32_t _ptr_info1534;
10065 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1534));
10066 if (_ptr_info1534) {
10067 NDR_PULL_ALLOC(ndr, r->info1534);
10068 } else {
10069 r->info1534 = NULL;
10071 break; }
10073 case 1535: {
10074 uint32_t _ptr_info1535;
10075 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1535));
10076 if (_ptr_info1535) {
10077 NDR_PULL_ALLOC(ndr, r->info1535);
10078 } else {
10079 r->info1535 = NULL;
10081 break; }
10083 case 1536: {
10084 uint32_t _ptr_info1536;
10085 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1536));
10086 if (_ptr_info1536) {
10087 NDR_PULL_ALLOC(ndr, r->info1536);
10088 } else {
10089 r->info1536 = NULL;
10091 break; }
10093 case 1537: {
10094 uint32_t _ptr_info1537;
10095 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1537));
10096 if (_ptr_info1537) {
10097 NDR_PULL_ALLOC(ndr, r->info1537);
10098 } else {
10099 r->info1537 = NULL;
10101 break; }
10103 case 1538: {
10104 uint32_t _ptr_info1538;
10105 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1538));
10106 if (_ptr_info1538) {
10107 NDR_PULL_ALLOC(ndr, r->info1538);
10108 } else {
10109 r->info1538 = NULL;
10111 break; }
10113 case 1539: {
10114 uint32_t _ptr_info1539;
10115 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1539));
10116 if (_ptr_info1539) {
10117 NDR_PULL_ALLOC(ndr, r->info1539);
10118 } else {
10119 r->info1539 = NULL;
10121 break; }
10123 case 1540: {
10124 uint32_t _ptr_info1540;
10125 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1540));
10126 if (_ptr_info1540) {
10127 NDR_PULL_ALLOC(ndr, r->info1540);
10128 } else {
10129 r->info1540 = NULL;
10131 break; }
10133 case 1541: {
10134 uint32_t _ptr_info1541;
10135 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1541));
10136 if (_ptr_info1541) {
10137 NDR_PULL_ALLOC(ndr, r->info1541);
10138 } else {
10139 r->info1541 = NULL;
10141 break; }
10143 case 1542: {
10144 uint32_t _ptr_info1542;
10145 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1542));
10146 if (_ptr_info1542) {
10147 NDR_PULL_ALLOC(ndr, r->info1542);
10148 } else {
10149 r->info1542 = NULL;
10151 break; }
10153 case 1543: {
10154 uint32_t _ptr_info1543;
10155 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1543));
10156 if (_ptr_info1543) {
10157 NDR_PULL_ALLOC(ndr, r->info1543);
10158 } else {
10159 r->info1543 = NULL;
10161 break; }
10163 case 1544: {
10164 uint32_t _ptr_info1544;
10165 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1544));
10166 if (_ptr_info1544) {
10167 NDR_PULL_ALLOC(ndr, r->info1544);
10168 } else {
10169 r->info1544 = NULL;
10171 break; }
10173 case 1545: {
10174 uint32_t _ptr_info1545;
10175 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1545));
10176 if (_ptr_info1545) {
10177 NDR_PULL_ALLOC(ndr, r->info1545);
10178 } else {
10179 r->info1545 = NULL;
10181 break; }
10183 case 1546: {
10184 uint32_t _ptr_info1546;
10185 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1546));
10186 if (_ptr_info1546) {
10187 NDR_PULL_ALLOC(ndr, r->info1546);
10188 } else {
10189 r->info1546 = NULL;
10191 break; }
10193 case 1547: {
10194 uint32_t _ptr_info1547;
10195 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1547));
10196 if (_ptr_info1547) {
10197 NDR_PULL_ALLOC(ndr, r->info1547);
10198 } else {
10199 r->info1547 = NULL;
10201 break; }
10203 case 1548: {
10204 uint32_t _ptr_info1548;
10205 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1548));
10206 if (_ptr_info1548) {
10207 NDR_PULL_ALLOC(ndr, r->info1548);
10208 } else {
10209 r->info1548 = NULL;
10211 break; }
10213 case 1549: {
10214 uint32_t _ptr_info1549;
10215 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1549));
10216 if (_ptr_info1549) {
10217 NDR_PULL_ALLOC(ndr, r->info1549);
10218 } else {
10219 r->info1549 = NULL;
10221 break; }
10223 case 1550: {
10224 uint32_t _ptr_info1550;
10225 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1550));
10226 if (_ptr_info1550) {
10227 NDR_PULL_ALLOC(ndr, r->info1550);
10228 } else {
10229 r->info1550 = NULL;
10231 break; }
10233 case 1552: {
10234 uint32_t _ptr_info1552;
10235 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1552));
10236 if (_ptr_info1552) {
10237 NDR_PULL_ALLOC(ndr, r->info1552);
10238 } else {
10239 r->info1552 = NULL;
10241 break; }
10243 case 1553: {
10244 uint32_t _ptr_info1553;
10245 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1553));
10246 if (_ptr_info1553) {
10247 NDR_PULL_ALLOC(ndr, r->info1553);
10248 } else {
10249 r->info1553 = NULL;
10251 break; }
10253 case 1554: {
10254 uint32_t _ptr_info1554;
10255 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1554));
10256 if (_ptr_info1554) {
10257 NDR_PULL_ALLOC(ndr, r->info1554);
10258 } else {
10259 r->info1554 = NULL;
10261 break; }
10263 case 1555: {
10264 uint32_t _ptr_info1555;
10265 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1555));
10266 if (_ptr_info1555) {
10267 NDR_PULL_ALLOC(ndr, r->info1555);
10268 } else {
10269 r->info1555 = NULL;
10271 break; }
10273 case 1556: {
10274 uint32_t _ptr_info1556;
10275 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1556));
10276 if (_ptr_info1556) {
10277 NDR_PULL_ALLOC(ndr, r->info1556);
10278 } else {
10279 r->info1556 = NULL;
10281 break; }
10283 default: {
10284 break; }
10288 if (ndr_flags & NDR_BUFFERS) {
10289 switch (level) {
10290 case 100:
10291 if (r->info100) {
10292 _mem_save_info100_0 = NDR_PULL_GET_MEM_CTX(ndr);
10293 NDR_PULL_SET_MEM_CTX(ndr, r->info100, 0);
10294 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo100(ndr, NDR_SCALARS|NDR_BUFFERS, r->info100));
10295 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info100_0, 0);
10297 break;
10299 case 101:
10300 if (r->info101) {
10301 _mem_save_info101_0 = NDR_PULL_GET_MEM_CTX(ndr);
10302 NDR_PULL_SET_MEM_CTX(ndr, r->info101, 0);
10303 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo101(ndr, NDR_SCALARS|NDR_BUFFERS, r->info101));
10304 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info101_0, 0);
10306 break;
10308 case 102:
10309 if (r->info102) {
10310 _mem_save_info102_0 = NDR_PULL_GET_MEM_CTX(ndr);
10311 NDR_PULL_SET_MEM_CTX(ndr, r->info102, 0);
10312 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo102(ndr, NDR_SCALARS|NDR_BUFFERS, r->info102));
10313 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info102_0, 0);
10315 break;
10317 case 402:
10318 if (r->info402) {
10319 _mem_save_info402_0 = NDR_PULL_GET_MEM_CTX(ndr);
10320 NDR_PULL_SET_MEM_CTX(ndr, r->info402, 0);
10321 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo402(ndr, NDR_SCALARS|NDR_BUFFERS, r->info402));
10322 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info402_0, 0);
10324 break;
10326 case 403:
10327 if (r->info403) {
10328 _mem_save_info403_0 = NDR_PULL_GET_MEM_CTX(ndr);
10329 NDR_PULL_SET_MEM_CTX(ndr, r->info403, 0);
10330 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo403(ndr, NDR_SCALARS|NDR_BUFFERS, r->info403));
10331 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info403_0, 0);
10333 break;
10335 case 502:
10336 if (r->info502) {
10337 _mem_save_info502_0 = NDR_PULL_GET_MEM_CTX(ndr);
10338 NDR_PULL_SET_MEM_CTX(ndr, r->info502, 0);
10339 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo502(ndr, NDR_SCALARS, r->info502));
10340 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info502_0, 0);
10342 break;
10344 case 503:
10345 if (r->info503) {
10346 _mem_save_info503_0 = NDR_PULL_GET_MEM_CTX(ndr);
10347 NDR_PULL_SET_MEM_CTX(ndr, r->info503, 0);
10348 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo503(ndr, NDR_SCALARS|NDR_BUFFERS, r->info503));
10349 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info503_0, 0);
10351 break;
10353 case 599:
10354 if (r->info599) {
10355 _mem_save_info599_0 = NDR_PULL_GET_MEM_CTX(ndr);
10356 NDR_PULL_SET_MEM_CTX(ndr, r->info599, 0);
10357 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo599(ndr, NDR_SCALARS|NDR_BUFFERS, r->info599));
10358 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info599_0, 0);
10360 break;
10362 case 1005:
10363 if (r->info1005) {
10364 _mem_save_info1005_0 = NDR_PULL_GET_MEM_CTX(ndr);
10365 NDR_PULL_SET_MEM_CTX(ndr, r->info1005, 0);
10366 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1005(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1005));
10367 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1005_0, 0);
10369 break;
10371 case 1010:
10372 if (r->info1010) {
10373 _mem_save_info1010_0 = NDR_PULL_GET_MEM_CTX(ndr);
10374 NDR_PULL_SET_MEM_CTX(ndr, r->info1010, 0);
10375 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1010(ndr, NDR_SCALARS, r->info1010));
10376 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1010_0, 0);
10378 break;
10380 case 1016:
10381 if (r->info1016) {
10382 _mem_save_info1016_0 = NDR_PULL_GET_MEM_CTX(ndr);
10383 NDR_PULL_SET_MEM_CTX(ndr, r->info1016, 0);
10384 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1016(ndr, NDR_SCALARS, r->info1016));
10385 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1016_0, 0);
10387 break;
10389 case 1017:
10390 if (r->info1017) {
10391 _mem_save_info1017_0 = NDR_PULL_GET_MEM_CTX(ndr);
10392 NDR_PULL_SET_MEM_CTX(ndr, r->info1017, 0);
10393 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1017(ndr, NDR_SCALARS, r->info1017));
10394 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1017_0, 0);
10396 break;
10398 case 1018:
10399 if (r->info1018) {
10400 _mem_save_info1018_0 = NDR_PULL_GET_MEM_CTX(ndr);
10401 NDR_PULL_SET_MEM_CTX(ndr, r->info1018, 0);
10402 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1018(ndr, NDR_SCALARS, r->info1018));
10403 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1018_0, 0);
10405 break;
10407 case 1107:
10408 if (r->info1107) {
10409 _mem_save_info1107_0 = NDR_PULL_GET_MEM_CTX(ndr);
10410 NDR_PULL_SET_MEM_CTX(ndr, r->info1107, 0);
10411 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1107(ndr, NDR_SCALARS, r->info1107));
10412 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1107_0, 0);
10414 break;
10416 case 1501:
10417 if (r->info1501) {
10418 _mem_save_info1501_0 = NDR_PULL_GET_MEM_CTX(ndr);
10419 NDR_PULL_SET_MEM_CTX(ndr, r->info1501, 0);
10420 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1501(ndr, NDR_SCALARS, r->info1501));
10421 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1501_0, 0);
10423 break;
10425 case 1502:
10426 if (r->info1502) {
10427 _mem_save_info1502_0 = NDR_PULL_GET_MEM_CTX(ndr);
10428 NDR_PULL_SET_MEM_CTX(ndr, r->info1502, 0);
10429 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1502(ndr, NDR_SCALARS, r->info1502));
10430 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1502_0, 0);
10432 break;
10434 case 1503:
10435 if (r->info1503) {
10436 _mem_save_info1503_0 = NDR_PULL_GET_MEM_CTX(ndr);
10437 NDR_PULL_SET_MEM_CTX(ndr, r->info1503, 0);
10438 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1503(ndr, NDR_SCALARS, r->info1503));
10439 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1503_0, 0);
10441 break;
10443 case 1506:
10444 if (r->info1506) {
10445 _mem_save_info1506_0 = NDR_PULL_GET_MEM_CTX(ndr);
10446 NDR_PULL_SET_MEM_CTX(ndr, r->info1506, 0);
10447 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1506(ndr, NDR_SCALARS, r->info1506));
10448 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1506_0, 0);
10450 break;
10452 case 1509:
10453 if (r->info1509) {
10454 _mem_save_info1509_0 = NDR_PULL_GET_MEM_CTX(ndr);
10455 NDR_PULL_SET_MEM_CTX(ndr, r->info1509, 0);
10456 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1509(ndr, NDR_SCALARS, r->info1509));
10457 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1509_0, 0);
10459 break;
10461 case 1510:
10462 if (r->info1510) {
10463 _mem_save_info1510_0 = NDR_PULL_GET_MEM_CTX(ndr);
10464 NDR_PULL_SET_MEM_CTX(ndr, r->info1510, 0);
10465 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1510(ndr, NDR_SCALARS, r->info1510));
10466 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1510_0, 0);
10468 break;
10470 case 1511:
10471 if (r->info1511) {
10472 _mem_save_info1511_0 = NDR_PULL_GET_MEM_CTX(ndr);
10473 NDR_PULL_SET_MEM_CTX(ndr, r->info1511, 0);
10474 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1511(ndr, NDR_SCALARS, r->info1511));
10475 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1511_0, 0);
10477 break;
10479 case 1512:
10480 if (r->info1512) {
10481 _mem_save_info1512_0 = NDR_PULL_GET_MEM_CTX(ndr);
10482 NDR_PULL_SET_MEM_CTX(ndr, r->info1512, 0);
10483 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1512(ndr, NDR_SCALARS, r->info1512));
10484 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1512_0, 0);
10486 break;
10488 case 1513:
10489 if (r->info1513) {
10490 _mem_save_info1513_0 = NDR_PULL_GET_MEM_CTX(ndr);
10491 NDR_PULL_SET_MEM_CTX(ndr, r->info1513, 0);
10492 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1513(ndr, NDR_SCALARS, r->info1513));
10493 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1513_0, 0);
10495 break;
10497 case 1514:
10498 if (r->info1514) {
10499 _mem_save_info1514_0 = NDR_PULL_GET_MEM_CTX(ndr);
10500 NDR_PULL_SET_MEM_CTX(ndr, r->info1514, 0);
10501 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1514(ndr, NDR_SCALARS, r->info1514));
10502 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1514_0, 0);
10504 break;
10506 case 1515:
10507 if (r->info1515) {
10508 _mem_save_info1515_0 = NDR_PULL_GET_MEM_CTX(ndr);
10509 NDR_PULL_SET_MEM_CTX(ndr, r->info1515, 0);
10510 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1515(ndr, NDR_SCALARS, r->info1515));
10511 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1515_0, 0);
10513 break;
10515 case 1516:
10516 if (r->info1516) {
10517 _mem_save_info1516_0 = NDR_PULL_GET_MEM_CTX(ndr);
10518 NDR_PULL_SET_MEM_CTX(ndr, r->info1516, 0);
10519 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1516(ndr, NDR_SCALARS, r->info1516));
10520 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1516_0, 0);
10522 break;
10524 case 1518:
10525 if (r->info1518) {
10526 _mem_save_info1518_0 = NDR_PULL_GET_MEM_CTX(ndr);
10527 NDR_PULL_SET_MEM_CTX(ndr, r->info1518, 0);
10528 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1518(ndr, NDR_SCALARS, r->info1518));
10529 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1518_0, 0);
10531 break;
10533 case 1520:
10534 if (r->info1520) {
10535 _mem_save_info1520_0 = NDR_PULL_GET_MEM_CTX(ndr);
10536 NDR_PULL_SET_MEM_CTX(ndr, r->info1520, 0);
10537 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1520(ndr, NDR_SCALARS, r->info1520));
10538 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1520_0, 0);
10540 break;
10542 case 1521:
10543 if (r->info1521) {
10544 _mem_save_info1521_0 = NDR_PULL_GET_MEM_CTX(ndr);
10545 NDR_PULL_SET_MEM_CTX(ndr, r->info1521, 0);
10546 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1521(ndr, NDR_SCALARS, r->info1521));
10547 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1521_0, 0);
10549 break;
10551 case 1522:
10552 if (r->info1522) {
10553 _mem_save_info1522_0 = NDR_PULL_GET_MEM_CTX(ndr);
10554 NDR_PULL_SET_MEM_CTX(ndr, r->info1522, 0);
10555 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1522(ndr, NDR_SCALARS, r->info1522));
10556 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1522_0, 0);
10558 break;
10560 case 1523:
10561 if (r->info1523) {
10562 _mem_save_info1523_0 = NDR_PULL_GET_MEM_CTX(ndr);
10563 NDR_PULL_SET_MEM_CTX(ndr, r->info1523, 0);
10564 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1523(ndr, NDR_SCALARS, r->info1523));
10565 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1523_0, 0);
10567 break;
10569 case 1524:
10570 if (r->info1524) {
10571 _mem_save_info1524_0 = NDR_PULL_GET_MEM_CTX(ndr);
10572 NDR_PULL_SET_MEM_CTX(ndr, r->info1524, 0);
10573 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1524(ndr, NDR_SCALARS, r->info1524));
10574 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1524_0, 0);
10576 break;
10578 case 1525:
10579 if (r->info1525) {
10580 _mem_save_info1525_0 = NDR_PULL_GET_MEM_CTX(ndr);
10581 NDR_PULL_SET_MEM_CTX(ndr, r->info1525, 0);
10582 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1525(ndr, NDR_SCALARS, r->info1525));
10583 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1525_0, 0);
10585 break;
10587 case 1528:
10588 if (r->info1528) {
10589 _mem_save_info1528_0 = NDR_PULL_GET_MEM_CTX(ndr);
10590 NDR_PULL_SET_MEM_CTX(ndr, r->info1528, 0);
10591 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1528(ndr, NDR_SCALARS, r->info1528));
10592 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1528_0, 0);
10594 break;
10596 case 1529:
10597 if (r->info1529) {
10598 _mem_save_info1529_0 = NDR_PULL_GET_MEM_CTX(ndr);
10599 NDR_PULL_SET_MEM_CTX(ndr, r->info1529, 0);
10600 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1529(ndr, NDR_SCALARS, r->info1529));
10601 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1529_0, 0);
10603 break;
10605 case 1530:
10606 if (r->info1530) {
10607 _mem_save_info1530_0 = NDR_PULL_GET_MEM_CTX(ndr);
10608 NDR_PULL_SET_MEM_CTX(ndr, r->info1530, 0);
10609 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1530(ndr, NDR_SCALARS, r->info1530));
10610 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1530_0, 0);
10612 break;
10614 case 1533:
10615 if (r->info1533) {
10616 _mem_save_info1533_0 = NDR_PULL_GET_MEM_CTX(ndr);
10617 NDR_PULL_SET_MEM_CTX(ndr, r->info1533, 0);
10618 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1533(ndr, NDR_SCALARS, r->info1533));
10619 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1533_0, 0);
10621 break;
10623 case 1534:
10624 if (r->info1534) {
10625 _mem_save_info1534_0 = NDR_PULL_GET_MEM_CTX(ndr);
10626 NDR_PULL_SET_MEM_CTX(ndr, r->info1534, 0);
10627 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1534(ndr, NDR_SCALARS, r->info1534));
10628 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1534_0, 0);
10630 break;
10632 case 1535:
10633 if (r->info1535) {
10634 _mem_save_info1535_0 = NDR_PULL_GET_MEM_CTX(ndr);
10635 NDR_PULL_SET_MEM_CTX(ndr, r->info1535, 0);
10636 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1535(ndr, NDR_SCALARS, r->info1535));
10637 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1535_0, 0);
10639 break;
10641 case 1536:
10642 if (r->info1536) {
10643 _mem_save_info1536_0 = NDR_PULL_GET_MEM_CTX(ndr);
10644 NDR_PULL_SET_MEM_CTX(ndr, r->info1536, 0);
10645 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1536(ndr, NDR_SCALARS, r->info1536));
10646 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1536_0, 0);
10648 break;
10650 case 1537:
10651 if (r->info1537) {
10652 _mem_save_info1537_0 = NDR_PULL_GET_MEM_CTX(ndr);
10653 NDR_PULL_SET_MEM_CTX(ndr, r->info1537, 0);
10654 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1537(ndr, NDR_SCALARS, r->info1537));
10655 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1537_0, 0);
10657 break;
10659 case 1538:
10660 if (r->info1538) {
10661 _mem_save_info1538_0 = NDR_PULL_GET_MEM_CTX(ndr);
10662 NDR_PULL_SET_MEM_CTX(ndr, r->info1538, 0);
10663 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1538(ndr, NDR_SCALARS, r->info1538));
10664 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1538_0, 0);
10666 break;
10668 case 1539:
10669 if (r->info1539) {
10670 _mem_save_info1539_0 = NDR_PULL_GET_MEM_CTX(ndr);
10671 NDR_PULL_SET_MEM_CTX(ndr, r->info1539, 0);
10672 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1539(ndr, NDR_SCALARS, r->info1539));
10673 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1539_0, 0);
10675 break;
10677 case 1540:
10678 if (r->info1540) {
10679 _mem_save_info1540_0 = NDR_PULL_GET_MEM_CTX(ndr);
10680 NDR_PULL_SET_MEM_CTX(ndr, r->info1540, 0);
10681 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1540(ndr, NDR_SCALARS, r->info1540));
10682 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1540_0, 0);
10684 break;
10686 case 1541:
10687 if (r->info1541) {
10688 _mem_save_info1541_0 = NDR_PULL_GET_MEM_CTX(ndr);
10689 NDR_PULL_SET_MEM_CTX(ndr, r->info1541, 0);
10690 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1541(ndr, NDR_SCALARS, r->info1541));
10691 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1541_0, 0);
10693 break;
10695 case 1542:
10696 if (r->info1542) {
10697 _mem_save_info1542_0 = NDR_PULL_GET_MEM_CTX(ndr);
10698 NDR_PULL_SET_MEM_CTX(ndr, r->info1542, 0);
10699 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1542(ndr, NDR_SCALARS, r->info1542));
10700 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1542_0, 0);
10702 break;
10704 case 1543:
10705 if (r->info1543) {
10706 _mem_save_info1543_0 = NDR_PULL_GET_MEM_CTX(ndr);
10707 NDR_PULL_SET_MEM_CTX(ndr, r->info1543, 0);
10708 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1543(ndr, NDR_SCALARS, r->info1543));
10709 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1543_0, 0);
10711 break;
10713 case 1544:
10714 if (r->info1544) {
10715 _mem_save_info1544_0 = NDR_PULL_GET_MEM_CTX(ndr);
10716 NDR_PULL_SET_MEM_CTX(ndr, r->info1544, 0);
10717 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1544(ndr, NDR_SCALARS, r->info1544));
10718 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1544_0, 0);
10720 break;
10722 case 1545:
10723 if (r->info1545) {
10724 _mem_save_info1545_0 = NDR_PULL_GET_MEM_CTX(ndr);
10725 NDR_PULL_SET_MEM_CTX(ndr, r->info1545, 0);
10726 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1545(ndr, NDR_SCALARS, r->info1545));
10727 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1545_0, 0);
10729 break;
10731 case 1546:
10732 if (r->info1546) {
10733 _mem_save_info1546_0 = NDR_PULL_GET_MEM_CTX(ndr);
10734 NDR_PULL_SET_MEM_CTX(ndr, r->info1546, 0);
10735 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1546(ndr, NDR_SCALARS, r->info1546));
10736 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1546_0, 0);
10738 break;
10740 case 1547:
10741 if (r->info1547) {
10742 _mem_save_info1547_0 = NDR_PULL_GET_MEM_CTX(ndr);
10743 NDR_PULL_SET_MEM_CTX(ndr, r->info1547, 0);
10744 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1547(ndr, NDR_SCALARS, r->info1547));
10745 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1547_0, 0);
10747 break;
10749 case 1548:
10750 if (r->info1548) {
10751 _mem_save_info1548_0 = NDR_PULL_GET_MEM_CTX(ndr);
10752 NDR_PULL_SET_MEM_CTX(ndr, r->info1548, 0);
10753 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1548(ndr, NDR_SCALARS, r->info1548));
10754 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1548_0, 0);
10756 break;
10758 case 1549:
10759 if (r->info1549) {
10760 _mem_save_info1549_0 = NDR_PULL_GET_MEM_CTX(ndr);
10761 NDR_PULL_SET_MEM_CTX(ndr, r->info1549, 0);
10762 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1549(ndr, NDR_SCALARS, r->info1549));
10763 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1549_0, 0);
10765 break;
10767 case 1550:
10768 if (r->info1550) {
10769 _mem_save_info1550_0 = NDR_PULL_GET_MEM_CTX(ndr);
10770 NDR_PULL_SET_MEM_CTX(ndr, r->info1550, 0);
10771 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1550(ndr, NDR_SCALARS, r->info1550));
10772 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1550_0, 0);
10774 break;
10776 case 1552:
10777 if (r->info1552) {
10778 _mem_save_info1552_0 = NDR_PULL_GET_MEM_CTX(ndr);
10779 NDR_PULL_SET_MEM_CTX(ndr, r->info1552, 0);
10780 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1552(ndr, NDR_SCALARS, r->info1552));
10781 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1552_0, 0);
10783 break;
10785 case 1553:
10786 if (r->info1553) {
10787 _mem_save_info1553_0 = NDR_PULL_GET_MEM_CTX(ndr);
10788 NDR_PULL_SET_MEM_CTX(ndr, r->info1553, 0);
10789 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1553(ndr, NDR_SCALARS, r->info1553));
10790 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1553_0, 0);
10792 break;
10794 case 1554:
10795 if (r->info1554) {
10796 _mem_save_info1554_0 = NDR_PULL_GET_MEM_CTX(ndr);
10797 NDR_PULL_SET_MEM_CTX(ndr, r->info1554, 0);
10798 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1554(ndr, NDR_SCALARS, r->info1554));
10799 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1554_0, 0);
10801 break;
10803 case 1555:
10804 if (r->info1555) {
10805 _mem_save_info1555_0 = NDR_PULL_GET_MEM_CTX(ndr);
10806 NDR_PULL_SET_MEM_CTX(ndr, r->info1555, 0);
10807 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1555(ndr, NDR_SCALARS, r->info1555));
10808 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1555_0, 0);
10810 break;
10812 case 1556:
10813 if (r->info1556) {
10814 _mem_save_info1556_0 = NDR_PULL_GET_MEM_CTX(ndr);
10815 NDR_PULL_SET_MEM_CTX(ndr, r->info1556, 0);
10816 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1556(ndr, NDR_SCALARS, r->info1556));
10817 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1556_0, 0);
10819 break;
10821 default:
10822 break;
10826 return NT_STATUS_OK;
10829 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetSrvInfo *r)
10831 int level;
10832 level = ndr_print_get_switch_value(ndr, r);
10833 ndr_print_union(ndr, name, level, "srvsvc_NetSrvInfo");
10834 switch (level) {
10835 case 100:
10836 ndr_print_ptr(ndr, "info100", r->info100);
10837 ndr->depth++;
10838 if (r->info100) {
10839 ndr_print_srvsvc_NetSrvInfo100(ndr, "info100", r->info100);
10841 ndr->depth--;
10842 break;
10844 case 101:
10845 ndr_print_ptr(ndr, "info101", r->info101);
10846 ndr->depth++;
10847 if (r->info101) {
10848 ndr_print_srvsvc_NetSrvInfo101(ndr, "info101", r->info101);
10850 ndr->depth--;
10851 break;
10853 case 102:
10854 ndr_print_ptr(ndr, "info102", r->info102);
10855 ndr->depth++;
10856 if (r->info102) {
10857 ndr_print_srvsvc_NetSrvInfo102(ndr, "info102", r->info102);
10859 ndr->depth--;
10860 break;
10862 case 402:
10863 ndr_print_ptr(ndr, "info402", r->info402);
10864 ndr->depth++;
10865 if (r->info402) {
10866 ndr_print_srvsvc_NetSrvInfo402(ndr, "info402", r->info402);
10868 ndr->depth--;
10869 break;
10871 case 403:
10872 ndr_print_ptr(ndr, "info403", r->info403);
10873 ndr->depth++;
10874 if (r->info403) {
10875 ndr_print_srvsvc_NetSrvInfo403(ndr, "info403", r->info403);
10877 ndr->depth--;
10878 break;
10880 case 502:
10881 ndr_print_ptr(ndr, "info502", r->info502);
10882 ndr->depth++;
10883 if (r->info502) {
10884 ndr_print_srvsvc_NetSrvInfo502(ndr, "info502", r->info502);
10886 ndr->depth--;
10887 break;
10889 case 503:
10890 ndr_print_ptr(ndr, "info503", r->info503);
10891 ndr->depth++;
10892 if (r->info503) {
10893 ndr_print_srvsvc_NetSrvInfo503(ndr, "info503", r->info503);
10895 ndr->depth--;
10896 break;
10898 case 599:
10899 ndr_print_ptr(ndr, "info599", r->info599);
10900 ndr->depth++;
10901 if (r->info599) {
10902 ndr_print_srvsvc_NetSrvInfo599(ndr, "info599", r->info599);
10904 ndr->depth--;
10905 break;
10907 case 1005:
10908 ndr_print_ptr(ndr, "info1005", r->info1005);
10909 ndr->depth++;
10910 if (r->info1005) {
10911 ndr_print_srvsvc_NetSrvInfo1005(ndr, "info1005", r->info1005);
10913 ndr->depth--;
10914 break;
10916 case 1010:
10917 ndr_print_ptr(ndr, "info1010", r->info1010);
10918 ndr->depth++;
10919 if (r->info1010) {
10920 ndr_print_srvsvc_NetSrvInfo1010(ndr, "info1010", r->info1010);
10922 ndr->depth--;
10923 break;
10925 case 1016:
10926 ndr_print_ptr(ndr, "info1016", r->info1016);
10927 ndr->depth++;
10928 if (r->info1016) {
10929 ndr_print_srvsvc_NetSrvInfo1016(ndr, "info1016", r->info1016);
10931 ndr->depth--;
10932 break;
10934 case 1017:
10935 ndr_print_ptr(ndr, "info1017", r->info1017);
10936 ndr->depth++;
10937 if (r->info1017) {
10938 ndr_print_srvsvc_NetSrvInfo1017(ndr, "info1017", r->info1017);
10940 ndr->depth--;
10941 break;
10943 case 1018:
10944 ndr_print_ptr(ndr, "info1018", r->info1018);
10945 ndr->depth++;
10946 if (r->info1018) {
10947 ndr_print_srvsvc_NetSrvInfo1018(ndr, "info1018", r->info1018);
10949 ndr->depth--;
10950 break;
10952 case 1107:
10953 ndr_print_ptr(ndr, "info1107", r->info1107);
10954 ndr->depth++;
10955 if (r->info1107) {
10956 ndr_print_srvsvc_NetSrvInfo1107(ndr, "info1107", r->info1107);
10958 ndr->depth--;
10959 break;
10961 case 1501:
10962 ndr_print_ptr(ndr, "info1501", r->info1501);
10963 ndr->depth++;
10964 if (r->info1501) {
10965 ndr_print_srvsvc_NetSrvInfo1501(ndr, "info1501", r->info1501);
10967 ndr->depth--;
10968 break;
10970 case 1502:
10971 ndr_print_ptr(ndr, "info1502", r->info1502);
10972 ndr->depth++;
10973 if (r->info1502) {
10974 ndr_print_srvsvc_NetSrvInfo1502(ndr, "info1502", r->info1502);
10976 ndr->depth--;
10977 break;
10979 case 1503:
10980 ndr_print_ptr(ndr, "info1503", r->info1503);
10981 ndr->depth++;
10982 if (r->info1503) {
10983 ndr_print_srvsvc_NetSrvInfo1503(ndr, "info1503", r->info1503);
10985 ndr->depth--;
10986 break;
10988 case 1506:
10989 ndr_print_ptr(ndr, "info1506", r->info1506);
10990 ndr->depth++;
10991 if (r->info1506) {
10992 ndr_print_srvsvc_NetSrvInfo1506(ndr, "info1506", r->info1506);
10994 ndr->depth--;
10995 break;
10997 case 1509:
10998 ndr_print_ptr(ndr, "info1509", r->info1509);
10999 ndr->depth++;
11000 if (r->info1509) {
11001 ndr_print_srvsvc_NetSrvInfo1509(ndr, "info1509", r->info1509);
11003 ndr->depth--;
11004 break;
11006 case 1510:
11007 ndr_print_ptr(ndr, "info1510", r->info1510);
11008 ndr->depth++;
11009 if (r->info1510) {
11010 ndr_print_srvsvc_NetSrvInfo1510(ndr, "info1510", r->info1510);
11012 ndr->depth--;
11013 break;
11015 case 1511:
11016 ndr_print_ptr(ndr, "info1511", r->info1511);
11017 ndr->depth++;
11018 if (r->info1511) {
11019 ndr_print_srvsvc_NetSrvInfo1511(ndr, "info1511", r->info1511);
11021 ndr->depth--;
11022 break;
11024 case 1512:
11025 ndr_print_ptr(ndr, "info1512", r->info1512);
11026 ndr->depth++;
11027 if (r->info1512) {
11028 ndr_print_srvsvc_NetSrvInfo1512(ndr, "info1512", r->info1512);
11030 ndr->depth--;
11031 break;
11033 case 1513:
11034 ndr_print_ptr(ndr, "info1513", r->info1513);
11035 ndr->depth++;
11036 if (r->info1513) {
11037 ndr_print_srvsvc_NetSrvInfo1513(ndr, "info1513", r->info1513);
11039 ndr->depth--;
11040 break;
11042 case 1514:
11043 ndr_print_ptr(ndr, "info1514", r->info1514);
11044 ndr->depth++;
11045 if (r->info1514) {
11046 ndr_print_srvsvc_NetSrvInfo1514(ndr, "info1514", r->info1514);
11048 ndr->depth--;
11049 break;
11051 case 1515:
11052 ndr_print_ptr(ndr, "info1515", r->info1515);
11053 ndr->depth++;
11054 if (r->info1515) {
11055 ndr_print_srvsvc_NetSrvInfo1515(ndr, "info1515", r->info1515);
11057 ndr->depth--;
11058 break;
11060 case 1516:
11061 ndr_print_ptr(ndr, "info1516", r->info1516);
11062 ndr->depth++;
11063 if (r->info1516) {
11064 ndr_print_srvsvc_NetSrvInfo1516(ndr, "info1516", r->info1516);
11066 ndr->depth--;
11067 break;
11069 case 1518:
11070 ndr_print_ptr(ndr, "info1518", r->info1518);
11071 ndr->depth++;
11072 if (r->info1518) {
11073 ndr_print_srvsvc_NetSrvInfo1518(ndr, "info1518", r->info1518);
11075 ndr->depth--;
11076 break;
11078 case 1520:
11079 ndr_print_ptr(ndr, "info1520", r->info1520);
11080 ndr->depth++;
11081 if (r->info1520) {
11082 ndr_print_srvsvc_NetSrvInfo1520(ndr, "info1520", r->info1520);
11084 ndr->depth--;
11085 break;
11087 case 1521:
11088 ndr_print_ptr(ndr, "info1521", r->info1521);
11089 ndr->depth++;
11090 if (r->info1521) {
11091 ndr_print_srvsvc_NetSrvInfo1521(ndr, "info1521", r->info1521);
11093 ndr->depth--;
11094 break;
11096 case 1522:
11097 ndr_print_ptr(ndr, "info1522", r->info1522);
11098 ndr->depth++;
11099 if (r->info1522) {
11100 ndr_print_srvsvc_NetSrvInfo1522(ndr, "info1522", r->info1522);
11102 ndr->depth--;
11103 break;
11105 case 1523:
11106 ndr_print_ptr(ndr, "info1523", r->info1523);
11107 ndr->depth++;
11108 if (r->info1523) {
11109 ndr_print_srvsvc_NetSrvInfo1523(ndr, "info1523", r->info1523);
11111 ndr->depth--;
11112 break;
11114 case 1524:
11115 ndr_print_ptr(ndr, "info1524", r->info1524);
11116 ndr->depth++;
11117 if (r->info1524) {
11118 ndr_print_srvsvc_NetSrvInfo1524(ndr, "info1524", r->info1524);
11120 ndr->depth--;
11121 break;
11123 case 1525:
11124 ndr_print_ptr(ndr, "info1525", r->info1525);
11125 ndr->depth++;
11126 if (r->info1525) {
11127 ndr_print_srvsvc_NetSrvInfo1525(ndr, "info1525", r->info1525);
11129 ndr->depth--;
11130 break;
11132 case 1528:
11133 ndr_print_ptr(ndr, "info1528", r->info1528);
11134 ndr->depth++;
11135 if (r->info1528) {
11136 ndr_print_srvsvc_NetSrvInfo1528(ndr, "info1528", r->info1528);
11138 ndr->depth--;
11139 break;
11141 case 1529:
11142 ndr_print_ptr(ndr, "info1529", r->info1529);
11143 ndr->depth++;
11144 if (r->info1529) {
11145 ndr_print_srvsvc_NetSrvInfo1529(ndr, "info1529", r->info1529);
11147 ndr->depth--;
11148 break;
11150 case 1530:
11151 ndr_print_ptr(ndr, "info1530", r->info1530);
11152 ndr->depth++;
11153 if (r->info1530) {
11154 ndr_print_srvsvc_NetSrvInfo1530(ndr, "info1530", r->info1530);
11156 ndr->depth--;
11157 break;
11159 case 1533:
11160 ndr_print_ptr(ndr, "info1533", r->info1533);
11161 ndr->depth++;
11162 if (r->info1533) {
11163 ndr_print_srvsvc_NetSrvInfo1533(ndr, "info1533", r->info1533);
11165 ndr->depth--;
11166 break;
11168 case 1534:
11169 ndr_print_ptr(ndr, "info1534", r->info1534);
11170 ndr->depth++;
11171 if (r->info1534) {
11172 ndr_print_srvsvc_NetSrvInfo1534(ndr, "info1534", r->info1534);
11174 ndr->depth--;
11175 break;
11177 case 1535:
11178 ndr_print_ptr(ndr, "info1535", r->info1535);
11179 ndr->depth++;
11180 if (r->info1535) {
11181 ndr_print_srvsvc_NetSrvInfo1535(ndr, "info1535", r->info1535);
11183 ndr->depth--;
11184 break;
11186 case 1536:
11187 ndr_print_ptr(ndr, "info1536", r->info1536);
11188 ndr->depth++;
11189 if (r->info1536) {
11190 ndr_print_srvsvc_NetSrvInfo1536(ndr, "info1536", r->info1536);
11192 ndr->depth--;
11193 break;
11195 case 1537:
11196 ndr_print_ptr(ndr, "info1537", r->info1537);
11197 ndr->depth++;
11198 if (r->info1537) {
11199 ndr_print_srvsvc_NetSrvInfo1537(ndr, "info1537", r->info1537);
11201 ndr->depth--;
11202 break;
11204 case 1538:
11205 ndr_print_ptr(ndr, "info1538", r->info1538);
11206 ndr->depth++;
11207 if (r->info1538) {
11208 ndr_print_srvsvc_NetSrvInfo1538(ndr, "info1538", r->info1538);
11210 ndr->depth--;
11211 break;
11213 case 1539:
11214 ndr_print_ptr(ndr, "info1539", r->info1539);
11215 ndr->depth++;
11216 if (r->info1539) {
11217 ndr_print_srvsvc_NetSrvInfo1539(ndr, "info1539", r->info1539);
11219 ndr->depth--;
11220 break;
11222 case 1540:
11223 ndr_print_ptr(ndr, "info1540", r->info1540);
11224 ndr->depth++;
11225 if (r->info1540) {
11226 ndr_print_srvsvc_NetSrvInfo1540(ndr, "info1540", r->info1540);
11228 ndr->depth--;
11229 break;
11231 case 1541:
11232 ndr_print_ptr(ndr, "info1541", r->info1541);
11233 ndr->depth++;
11234 if (r->info1541) {
11235 ndr_print_srvsvc_NetSrvInfo1541(ndr, "info1541", r->info1541);
11237 ndr->depth--;
11238 break;
11240 case 1542:
11241 ndr_print_ptr(ndr, "info1542", r->info1542);
11242 ndr->depth++;
11243 if (r->info1542) {
11244 ndr_print_srvsvc_NetSrvInfo1542(ndr, "info1542", r->info1542);
11246 ndr->depth--;
11247 break;
11249 case 1543:
11250 ndr_print_ptr(ndr, "info1543", r->info1543);
11251 ndr->depth++;
11252 if (r->info1543) {
11253 ndr_print_srvsvc_NetSrvInfo1543(ndr, "info1543", r->info1543);
11255 ndr->depth--;
11256 break;
11258 case 1544:
11259 ndr_print_ptr(ndr, "info1544", r->info1544);
11260 ndr->depth++;
11261 if (r->info1544) {
11262 ndr_print_srvsvc_NetSrvInfo1544(ndr, "info1544", r->info1544);
11264 ndr->depth--;
11265 break;
11267 case 1545:
11268 ndr_print_ptr(ndr, "info1545", r->info1545);
11269 ndr->depth++;
11270 if (r->info1545) {
11271 ndr_print_srvsvc_NetSrvInfo1545(ndr, "info1545", r->info1545);
11273 ndr->depth--;
11274 break;
11276 case 1546:
11277 ndr_print_ptr(ndr, "info1546", r->info1546);
11278 ndr->depth++;
11279 if (r->info1546) {
11280 ndr_print_srvsvc_NetSrvInfo1546(ndr, "info1546", r->info1546);
11282 ndr->depth--;
11283 break;
11285 case 1547:
11286 ndr_print_ptr(ndr, "info1547", r->info1547);
11287 ndr->depth++;
11288 if (r->info1547) {
11289 ndr_print_srvsvc_NetSrvInfo1547(ndr, "info1547", r->info1547);
11291 ndr->depth--;
11292 break;
11294 case 1548:
11295 ndr_print_ptr(ndr, "info1548", r->info1548);
11296 ndr->depth++;
11297 if (r->info1548) {
11298 ndr_print_srvsvc_NetSrvInfo1548(ndr, "info1548", r->info1548);
11300 ndr->depth--;
11301 break;
11303 case 1549:
11304 ndr_print_ptr(ndr, "info1549", r->info1549);
11305 ndr->depth++;
11306 if (r->info1549) {
11307 ndr_print_srvsvc_NetSrvInfo1549(ndr, "info1549", r->info1549);
11309 ndr->depth--;
11310 break;
11312 case 1550:
11313 ndr_print_ptr(ndr, "info1550", r->info1550);
11314 ndr->depth++;
11315 if (r->info1550) {
11316 ndr_print_srvsvc_NetSrvInfo1550(ndr, "info1550", r->info1550);
11318 ndr->depth--;
11319 break;
11321 case 1552:
11322 ndr_print_ptr(ndr, "info1552", r->info1552);
11323 ndr->depth++;
11324 if (r->info1552) {
11325 ndr_print_srvsvc_NetSrvInfo1552(ndr, "info1552", r->info1552);
11327 ndr->depth--;
11328 break;
11330 case 1553:
11331 ndr_print_ptr(ndr, "info1553", r->info1553);
11332 ndr->depth++;
11333 if (r->info1553) {
11334 ndr_print_srvsvc_NetSrvInfo1553(ndr, "info1553", r->info1553);
11336 ndr->depth--;
11337 break;
11339 case 1554:
11340 ndr_print_ptr(ndr, "info1554", r->info1554);
11341 ndr->depth++;
11342 if (r->info1554) {
11343 ndr_print_srvsvc_NetSrvInfo1554(ndr, "info1554", r->info1554);
11345 ndr->depth--;
11346 break;
11348 case 1555:
11349 ndr_print_ptr(ndr, "info1555", r->info1555);
11350 ndr->depth++;
11351 if (r->info1555) {
11352 ndr_print_srvsvc_NetSrvInfo1555(ndr, "info1555", r->info1555);
11354 ndr->depth--;
11355 break;
11357 case 1556:
11358 ndr_print_ptr(ndr, "info1556", r->info1556);
11359 ndr->depth++;
11360 if (r->info1556) {
11361 ndr_print_srvsvc_NetSrvInfo1556(ndr, "info1556", r->info1556);
11363 ndr->depth--;
11364 break;
11366 default:
11367 break;
11372 NTSTATUS ndr_push_srvsvc_NetDiskInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetDiskInfo0 *r)
11374 if (ndr_flags & NDR_SCALARS) {
11375 NDR_CHECK(ndr_push_align(ndr, 4));
11377 uint32_t _flags_save_string = ndr->flags;
11378 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_LEN4);
11379 NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->disk));
11380 ndr->flags = _flags_save_string;
11383 if (ndr_flags & NDR_BUFFERS) {
11385 return NT_STATUS_OK;
11388 NTSTATUS ndr_pull_srvsvc_NetDiskInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetDiskInfo0 *r)
11390 if (ndr_flags & NDR_SCALARS) {
11391 NDR_CHECK(ndr_pull_align(ndr, 4));
11393 uint32_t _flags_save_string = ndr->flags;
11394 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_LEN4);
11395 NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->disk));
11396 ndr->flags = _flags_save_string;
11399 if (ndr_flags & NDR_BUFFERS) {
11401 return NT_STATUS_OK;
11404 _PUBLIC_ void ndr_print_srvsvc_NetDiskInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetDiskInfo0 *r)
11406 ndr_print_struct(ndr, name, "srvsvc_NetDiskInfo0");
11407 ndr->depth++;
11408 ndr_print_string(ndr, "disk", r->disk);
11409 ndr->depth--;
11412 NTSTATUS ndr_push_srvsvc_NetDiskInfo(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetDiskInfo *r)
11414 uint32_t cntr_disks_1;
11415 if (ndr_flags & NDR_SCALARS) {
11416 NDR_CHECK(ndr_push_align(ndr, 4));
11417 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
11418 NDR_CHECK(ndr_push_unique_ptr(ndr, r->disks));
11420 if (ndr_flags & NDR_BUFFERS) {
11421 if (r->disks) {
11422 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
11423 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
11424 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
11425 for (cntr_disks_1 = 0; cntr_disks_1 < r->count; cntr_disks_1++) {
11426 NDR_CHECK(ndr_push_srvsvc_NetDiskInfo0(ndr, NDR_SCALARS, &r->disks[cntr_disks_1]));
11430 return NT_STATUS_OK;
11433 NTSTATUS ndr_pull_srvsvc_NetDiskInfo(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetDiskInfo *r)
11435 uint32_t _ptr_disks;
11436 uint32_t cntr_disks_1;
11437 TALLOC_CTX *_mem_save_disks_0;
11438 TALLOC_CTX *_mem_save_disks_1;
11439 if (ndr_flags & NDR_SCALARS) {
11440 NDR_CHECK(ndr_pull_align(ndr, 4));
11441 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
11442 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_disks));
11443 if (_ptr_disks) {
11444 NDR_PULL_ALLOC(ndr, r->disks);
11445 } else {
11446 r->disks = NULL;
11449 if (ndr_flags & NDR_BUFFERS) {
11450 if (r->disks) {
11451 _mem_save_disks_0 = NDR_PULL_GET_MEM_CTX(ndr);
11452 NDR_PULL_SET_MEM_CTX(ndr, r->disks, 0);
11453 NDR_CHECK(ndr_pull_array_size(ndr, &r->disks));
11454 NDR_CHECK(ndr_pull_array_length(ndr, &r->disks));
11455 if (ndr_get_array_length(ndr, &r->disks) > ndr_get_array_size(ndr, &r->disks)) {
11456 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));
11458 NDR_PULL_ALLOC_N(ndr, r->disks, ndr_get_array_size(ndr, &r->disks));
11459 _mem_save_disks_1 = NDR_PULL_GET_MEM_CTX(ndr);
11460 NDR_PULL_SET_MEM_CTX(ndr, r->disks, 0);
11461 for (cntr_disks_1 = 0; cntr_disks_1 < r->count; cntr_disks_1++) {
11462 NDR_CHECK(ndr_pull_srvsvc_NetDiskInfo0(ndr, NDR_SCALARS, &r->disks[cntr_disks_1]));
11464 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_disks_1, 0);
11465 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_disks_0, 0);
11467 if (r->disks) {
11468 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->disks, r->count));
11470 if (r->disks) {
11471 NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->disks, r->count));
11474 return NT_STATUS_OK;
11477 _PUBLIC_ void ndr_print_srvsvc_NetDiskInfo(struct ndr_print *ndr, const char *name, const struct srvsvc_NetDiskInfo *r)
11479 uint32_t cntr_disks_1;
11480 ndr_print_struct(ndr, name, "srvsvc_NetDiskInfo");
11481 ndr->depth++;
11482 ndr_print_uint32(ndr, "count", r->count);
11483 ndr_print_ptr(ndr, "disks", r->disks);
11484 ndr->depth++;
11485 if (r->disks) {
11486 ndr->print(ndr, "%s: ARRAY(%d)", "disks", r->count);
11487 ndr->depth++;
11488 for (cntr_disks_1=0;cntr_disks_1<r->count;cntr_disks_1++) {
11489 char *idx_1=NULL;
11490 asprintf(&idx_1, "[%d]", cntr_disks_1);
11491 if (idx_1) {
11492 ndr_print_srvsvc_NetDiskInfo0(ndr, "disks", &r->disks[cntr_disks_1]);
11493 free(idx_1);
11496 ndr->depth--;
11498 ndr->depth--;
11499 ndr->depth--;
11502 NTSTATUS ndr_push_srvsvc_Statistics(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_Statistics *r)
11504 if (ndr_flags & NDR_SCALARS) {
11505 NDR_CHECK(ndr_push_align(ndr, 4));
11506 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->start));
11507 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fopens));
11508 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->devopens));
11509 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->jobsqueued));
11510 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sopens));
11511 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->stimeouts));
11512 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->serrorout));
11513 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pwerrors));
11514 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->permerrors));
11515 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->syserrors));
11516 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bytessent_low));
11517 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bytessent_high));
11518 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bytesrcvd_low));
11519 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bytesrcvd_high));
11520 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->avresponse));
11521 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reqbufneed));
11522 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bigbufneed));
11524 if (ndr_flags & NDR_BUFFERS) {
11526 return NT_STATUS_OK;
11529 NTSTATUS ndr_pull_srvsvc_Statistics(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_Statistics *r)
11531 if (ndr_flags & NDR_SCALARS) {
11532 NDR_CHECK(ndr_pull_align(ndr, 4));
11533 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->start));
11534 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fopens));
11535 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->devopens));
11536 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->jobsqueued));
11537 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sopens));
11538 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->stimeouts));
11539 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->serrorout));
11540 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pwerrors));
11541 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->permerrors));
11542 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->syserrors));
11543 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bytessent_low));
11544 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bytessent_high));
11545 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bytesrcvd_low));
11546 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bytesrcvd_high));
11547 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->avresponse));
11548 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reqbufneed));
11549 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bigbufneed));
11551 if (ndr_flags & NDR_BUFFERS) {
11553 return NT_STATUS_OK;
11556 _PUBLIC_ void ndr_print_srvsvc_Statistics(struct ndr_print *ndr, const char *name, const struct srvsvc_Statistics *r)
11558 ndr_print_struct(ndr, name, "srvsvc_Statistics");
11559 ndr->depth++;
11560 ndr_print_uint32(ndr, "start", r->start);
11561 ndr_print_uint32(ndr, "fopens", r->fopens);
11562 ndr_print_uint32(ndr, "devopens", r->devopens);
11563 ndr_print_uint32(ndr, "jobsqueued", r->jobsqueued);
11564 ndr_print_uint32(ndr, "sopens", r->sopens);
11565 ndr_print_uint32(ndr, "stimeouts", r->stimeouts);
11566 ndr_print_uint32(ndr, "serrorout", r->serrorout);
11567 ndr_print_uint32(ndr, "pwerrors", r->pwerrors);
11568 ndr_print_uint32(ndr, "permerrors", r->permerrors);
11569 ndr_print_uint32(ndr, "syserrors", r->syserrors);
11570 ndr_print_uint32(ndr, "bytessent_low", r->bytessent_low);
11571 ndr_print_uint32(ndr, "bytessent_high", r->bytessent_high);
11572 ndr_print_uint32(ndr, "bytesrcvd_low", r->bytesrcvd_low);
11573 ndr_print_uint32(ndr, "bytesrcvd_high", r->bytesrcvd_high);
11574 ndr_print_uint32(ndr, "avresponse", r->avresponse);
11575 ndr_print_uint32(ndr, "reqbufneed", r->reqbufneed);
11576 ndr_print_uint32(ndr, "bigbufneed", r->bigbufneed);
11577 ndr->depth--;
11580 NTSTATUS ndr_push_srvsvc_NetTransportInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportInfo0 *r)
11582 if (ndr_flags & NDR_SCALARS) {
11583 NDR_CHECK(ndr_push_align(ndr, 4));
11584 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->vcs));
11585 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
11586 NDR_CHECK(ndr_push_unique_ptr(ndr, r->addr));
11587 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->addr_len));
11588 NDR_CHECK(ndr_push_unique_ptr(ndr, r->net_addr));
11590 if (ndr_flags & NDR_BUFFERS) {
11591 if (r->name) {
11592 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
11593 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
11594 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
11595 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11597 if (r->addr) {
11598 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->addr_len));
11599 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->addr, r->addr_len));
11601 if (r->net_addr) {
11602 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
11603 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
11604 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
11605 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->net_addr, ndr_charset_length(r->net_addr, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11608 return NT_STATUS_OK;
11611 NTSTATUS ndr_pull_srvsvc_NetTransportInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportInfo0 *r)
11613 uint32_t _ptr_name;
11614 TALLOC_CTX *_mem_save_name_0;
11615 uint32_t _ptr_addr;
11616 TALLOC_CTX *_mem_save_addr_0;
11617 uint32_t _ptr_net_addr;
11618 TALLOC_CTX *_mem_save_net_addr_0;
11619 if (ndr_flags & NDR_SCALARS) {
11620 NDR_CHECK(ndr_pull_align(ndr, 4));
11621 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->vcs));
11622 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
11623 if (_ptr_name) {
11624 NDR_PULL_ALLOC(ndr, r->name);
11625 } else {
11626 r->name = NULL;
11628 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_addr));
11629 if (_ptr_addr) {
11630 NDR_PULL_ALLOC(ndr, r->addr);
11631 } else {
11632 r->addr = NULL;
11634 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->addr_len));
11635 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_net_addr));
11636 if (_ptr_net_addr) {
11637 NDR_PULL_ALLOC(ndr, r->net_addr);
11638 } else {
11639 r->net_addr = NULL;
11642 if (ndr_flags & NDR_BUFFERS) {
11643 if (r->name) {
11644 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
11645 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
11646 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
11647 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
11648 if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->name)) {
11649 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));
11651 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t)));
11652 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t), CH_UTF16));
11653 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
11655 if (r->addr) {
11656 _mem_save_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
11657 NDR_PULL_SET_MEM_CTX(ndr, r->addr, 0);
11658 NDR_CHECK(ndr_pull_array_size(ndr, &r->addr));
11659 NDR_PULL_ALLOC_N(ndr, r->addr, ndr_get_array_size(ndr, &r->addr));
11660 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->addr, ndr_get_array_size(ndr, &r->addr)));
11661 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_addr_0, 0);
11663 if (r->net_addr) {
11664 _mem_save_net_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
11665 NDR_PULL_SET_MEM_CTX(ndr, r->net_addr, 0);
11666 NDR_CHECK(ndr_pull_array_size(ndr, &r->net_addr));
11667 NDR_CHECK(ndr_pull_array_length(ndr, &r->net_addr));
11668 if (ndr_get_array_length(ndr, &r->net_addr) > ndr_get_array_size(ndr, &r->net_addr)) {
11669 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));
11671 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->net_addr), sizeof(uint16_t)));
11672 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->net_addr, ndr_get_array_length(ndr, &r->net_addr), sizeof(uint16_t), CH_UTF16));
11673 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_net_addr_0, 0);
11675 if (r->addr) {
11676 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->addr, r->addr_len));
11679 return NT_STATUS_OK;
11682 _PUBLIC_ void ndr_print_srvsvc_NetTransportInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportInfo0 *r)
11684 ndr_print_struct(ndr, name, "srvsvc_NetTransportInfo0");
11685 ndr->depth++;
11686 ndr_print_uint32(ndr, "vcs", r->vcs);
11687 ndr_print_ptr(ndr, "name", r->name);
11688 ndr->depth++;
11689 if (r->name) {
11690 ndr_print_string(ndr, "name", r->name);
11692 ndr->depth--;
11693 ndr_print_ptr(ndr, "addr", r->addr);
11694 ndr->depth++;
11695 if (r->addr) {
11696 ndr_print_array_uint8(ndr, "addr", r->addr, r->addr_len);
11698 ndr->depth--;
11699 ndr_print_uint32(ndr, "addr_len", r->addr_len);
11700 ndr_print_ptr(ndr, "net_addr", r->net_addr);
11701 ndr->depth++;
11702 if (r->net_addr) {
11703 ndr_print_string(ndr, "net_addr", r->net_addr);
11705 ndr->depth--;
11706 ndr->depth--;
11709 NTSTATUS ndr_push_srvsvc_NetTransportCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportCtr0 *r)
11711 uint32_t cntr_array_1;
11712 if (ndr_flags & NDR_SCALARS) {
11713 NDR_CHECK(ndr_push_align(ndr, 4));
11714 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
11715 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
11717 if (ndr_flags & NDR_BUFFERS) {
11718 if (r->array) {
11719 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
11720 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
11721 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
11723 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
11724 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
11728 return NT_STATUS_OK;
11731 NTSTATUS ndr_pull_srvsvc_NetTransportCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportCtr0 *r)
11733 uint32_t _ptr_array;
11734 uint32_t cntr_array_1;
11735 TALLOC_CTX *_mem_save_array_0;
11736 TALLOC_CTX *_mem_save_array_1;
11737 if (ndr_flags & NDR_SCALARS) {
11738 NDR_CHECK(ndr_pull_align(ndr, 4));
11739 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
11740 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
11741 if (_ptr_array) {
11742 NDR_PULL_ALLOC(ndr, r->array);
11743 } else {
11744 r->array = NULL;
11747 if (ndr_flags & NDR_BUFFERS) {
11748 if (r->array) {
11749 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
11750 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
11751 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
11752 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
11753 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
11754 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
11755 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
11756 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
11758 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
11759 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
11761 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
11762 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
11764 if (r->array) {
11765 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
11768 return NT_STATUS_OK;
11771 _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportCtr0 *r)
11773 uint32_t cntr_array_1;
11774 ndr_print_struct(ndr, name, "srvsvc_NetTransportCtr0");
11775 ndr->depth++;
11776 ndr_print_uint32(ndr, "count", r->count);
11777 ndr_print_ptr(ndr, "array", r->array);
11778 ndr->depth++;
11779 if (r->array) {
11780 ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
11781 ndr->depth++;
11782 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
11783 char *idx_1=NULL;
11784 asprintf(&idx_1, "[%d]", cntr_array_1);
11785 if (idx_1) {
11786 ndr_print_srvsvc_NetTransportInfo0(ndr, "array", &r->array[cntr_array_1]);
11787 free(idx_1);
11790 ndr->depth--;
11792 ndr->depth--;
11793 ndr->depth--;
11796 NTSTATUS ndr_push_srvsvc_NetTransportInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportInfo1 *r)
11798 if (ndr_flags & NDR_SCALARS) {
11799 NDR_CHECK(ndr_push_align(ndr, 4));
11800 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->vcs));
11801 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
11802 NDR_CHECK(ndr_push_unique_ptr(ndr, r->addr));
11803 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->addr_len));
11804 NDR_CHECK(ndr_push_unique_ptr(ndr, r->net_addr));
11805 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
11807 if (ndr_flags & NDR_BUFFERS) {
11808 if (r->name) {
11809 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
11810 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
11811 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
11812 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11814 if (r->addr) {
11815 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->addr_len));
11816 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->addr, r->addr_len));
11818 if (r->net_addr) {
11819 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
11820 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
11821 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
11822 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->net_addr, ndr_charset_length(r->net_addr, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11824 if (r->domain) {
11825 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
11826 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
11827 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
11828 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
11831 return NT_STATUS_OK;
11834 NTSTATUS ndr_pull_srvsvc_NetTransportInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportInfo1 *r)
11836 uint32_t _ptr_name;
11837 TALLOC_CTX *_mem_save_name_0;
11838 uint32_t _ptr_addr;
11839 TALLOC_CTX *_mem_save_addr_0;
11840 uint32_t _ptr_net_addr;
11841 TALLOC_CTX *_mem_save_net_addr_0;
11842 uint32_t _ptr_domain;
11843 TALLOC_CTX *_mem_save_domain_0;
11844 if (ndr_flags & NDR_SCALARS) {
11845 NDR_CHECK(ndr_pull_align(ndr, 4));
11846 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->vcs));
11847 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
11848 if (_ptr_name) {
11849 NDR_PULL_ALLOC(ndr, r->name);
11850 } else {
11851 r->name = NULL;
11853 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_addr));
11854 if (_ptr_addr) {
11855 NDR_PULL_ALLOC(ndr, r->addr);
11856 } else {
11857 r->addr = NULL;
11859 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->addr_len));
11860 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_net_addr));
11861 if (_ptr_net_addr) {
11862 NDR_PULL_ALLOC(ndr, r->net_addr);
11863 } else {
11864 r->net_addr = NULL;
11866 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
11867 if (_ptr_domain) {
11868 NDR_PULL_ALLOC(ndr, r->domain);
11869 } else {
11870 r->domain = NULL;
11873 if (ndr_flags & NDR_BUFFERS) {
11874 if (r->name) {
11875 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
11876 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
11877 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
11878 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
11879 if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->name)) {
11880 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));
11882 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t)));
11883 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t), CH_UTF16));
11884 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
11886 if (r->addr) {
11887 _mem_save_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
11888 NDR_PULL_SET_MEM_CTX(ndr, r->addr, 0);
11889 NDR_CHECK(ndr_pull_array_size(ndr, &r->addr));
11890 NDR_PULL_ALLOC_N(ndr, r->addr, ndr_get_array_size(ndr, &r->addr));
11891 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->addr, ndr_get_array_size(ndr, &r->addr)));
11892 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_addr_0, 0);
11894 if (r->net_addr) {
11895 _mem_save_net_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
11896 NDR_PULL_SET_MEM_CTX(ndr, r->net_addr, 0);
11897 NDR_CHECK(ndr_pull_array_size(ndr, &r->net_addr));
11898 NDR_CHECK(ndr_pull_array_length(ndr, &r->net_addr));
11899 if (ndr_get_array_length(ndr, &r->net_addr) > ndr_get_array_size(ndr, &r->net_addr)) {
11900 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));
11902 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->net_addr), sizeof(uint16_t)));
11903 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->net_addr, ndr_get_array_length(ndr, &r->net_addr), sizeof(uint16_t), CH_UTF16));
11904 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_net_addr_0, 0);
11906 if (r->domain) {
11907 _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
11908 NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
11909 NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
11910 NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
11911 if (ndr_get_array_length(ndr, &r->domain) > ndr_get_array_size(ndr, &r->domain)) {
11912 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));
11914 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t)));
11915 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t), CH_UTF16));
11916 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
11918 if (r->addr) {
11919 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->addr, r->addr_len));
11922 return NT_STATUS_OK;
11925 _PUBLIC_ void ndr_print_srvsvc_NetTransportInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportInfo1 *r)
11927 ndr_print_struct(ndr, name, "srvsvc_NetTransportInfo1");
11928 ndr->depth++;
11929 ndr_print_uint32(ndr, "vcs", r->vcs);
11930 ndr_print_ptr(ndr, "name", r->name);
11931 ndr->depth++;
11932 if (r->name) {
11933 ndr_print_string(ndr, "name", r->name);
11935 ndr->depth--;
11936 ndr_print_ptr(ndr, "addr", r->addr);
11937 ndr->depth++;
11938 if (r->addr) {
11939 ndr_print_array_uint8(ndr, "addr", r->addr, r->addr_len);
11941 ndr->depth--;
11942 ndr_print_uint32(ndr, "addr_len", r->addr_len);
11943 ndr_print_ptr(ndr, "net_addr", r->net_addr);
11944 ndr->depth++;
11945 if (r->net_addr) {
11946 ndr_print_string(ndr, "net_addr", r->net_addr);
11948 ndr->depth--;
11949 ndr_print_ptr(ndr, "domain", r->domain);
11950 ndr->depth++;
11951 if (r->domain) {
11952 ndr_print_string(ndr, "domain", r->domain);
11954 ndr->depth--;
11955 ndr->depth--;
11958 NTSTATUS ndr_push_srvsvc_NetTransportCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportCtr1 *r)
11960 uint32_t cntr_array_1;
11961 if (ndr_flags & NDR_SCALARS) {
11962 NDR_CHECK(ndr_push_align(ndr, 4));
11963 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
11964 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
11966 if (ndr_flags & NDR_BUFFERS) {
11967 if (r->array) {
11968 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
11969 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
11970 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
11972 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
11973 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
11977 return NT_STATUS_OK;
11980 NTSTATUS ndr_pull_srvsvc_NetTransportCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportCtr1 *r)
11982 uint32_t _ptr_array;
11983 uint32_t cntr_array_1;
11984 TALLOC_CTX *_mem_save_array_0;
11985 TALLOC_CTX *_mem_save_array_1;
11986 if (ndr_flags & NDR_SCALARS) {
11987 NDR_CHECK(ndr_pull_align(ndr, 4));
11988 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
11989 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
11990 if (_ptr_array) {
11991 NDR_PULL_ALLOC(ndr, r->array);
11992 } else {
11993 r->array = NULL;
11996 if (ndr_flags & NDR_BUFFERS) {
11997 if (r->array) {
11998 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
11999 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
12000 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
12001 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
12002 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
12003 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
12004 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12005 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
12007 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12008 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
12010 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
12011 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
12013 if (r->array) {
12014 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
12017 return NT_STATUS_OK;
12020 _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportCtr1 *r)
12022 uint32_t cntr_array_1;
12023 ndr_print_struct(ndr, name, "srvsvc_NetTransportCtr1");
12024 ndr->depth++;
12025 ndr_print_uint32(ndr, "count", r->count);
12026 ndr_print_ptr(ndr, "array", r->array);
12027 ndr->depth++;
12028 if (r->array) {
12029 ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
12030 ndr->depth++;
12031 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
12032 char *idx_1=NULL;
12033 asprintf(&idx_1, "[%d]", cntr_array_1);
12034 if (idx_1) {
12035 ndr_print_srvsvc_NetTransportInfo1(ndr, "array", &r->array[cntr_array_1]);
12036 free(idx_1);
12039 ndr->depth--;
12041 ndr->depth--;
12042 ndr->depth--;
12045 NTSTATUS ndr_push_srvsvc_NetTransportInfo2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportInfo2 *r)
12047 if (ndr_flags & NDR_SCALARS) {
12048 NDR_CHECK(ndr_push_align(ndr, 4));
12049 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->vcs));
12050 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
12051 NDR_CHECK(ndr_push_unique_ptr(ndr, r->addr));
12052 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->addr_len));
12053 NDR_CHECK(ndr_push_unique_ptr(ndr, r->net_addr));
12054 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
12055 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown));
12057 if (ndr_flags & NDR_BUFFERS) {
12058 if (r->name) {
12059 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
12060 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
12061 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
12062 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12064 if (r->addr) {
12065 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->addr_len));
12066 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->addr, r->addr_len));
12068 if (r->net_addr) {
12069 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
12070 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
12071 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
12072 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->net_addr, ndr_charset_length(r->net_addr, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12074 if (r->domain) {
12075 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
12076 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
12077 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
12078 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12081 return NT_STATUS_OK;
12084 NTSTATUS ndr_pull_srvsvc_NetTransportInfo2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportInfo2 *r)
12086 uint32_t _ptr_name;
12087 TALLOC_CTX *_mem_save_name_0;
12088 uint32_t _ptr_addr;
12089 TALLOC_CTX *_mem_save_addr_0;
12090 uint32_t _ptr_net_addr;
12091 TALLOC_CTX *_mem_save_net_addr_0;
12092 uint32_t _ptr_domain;
12093 TALLOC_CTX *_mem_save_domain_0;
12094 if (ndr_flags & NDR_SCALARS) {
12095 NDR_CHECK(ndr_pull_align(ndr, 4));
12096 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->vcs));
12097 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
12098 if (_ptr_name) {
12099 NDR_PULL_ALLOC(ndr, r->name);
12100 } else {
12101 r->name = NULL;
12103 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_addr));
12104 if (_ptr_addr) {
12105 NDR_PULL_ALLOC(ndr, r->addr);
12106 } else {
12107 r->addr = NULL;
12109 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->addr_len));
12110 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_net_addr));
12111 if (_ptr_net_addr) {
12112 NDR_PULL_ALLOC(ndr, r->net_addr);
12113 } else {
12114 r->net_addr = NULL;
12116 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
12117 if (_ptr_domain) {
12118 NDR_PULL_ALLOC(ndr, r->domain);
12119 } else {
12120 r->domain = NULL;
12122 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown));
12124 if (ndr_flags & NDR_BUFFERS) {
12125 if (r->name) {
12126 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
12127 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
12128 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
12129 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
12130 if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->name)) {
12131 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));
12133 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t)));
12134 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t), CH_UTF16));
12135 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
12137 if (r->addr) {
12138 _mem_save_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
12139 NDR_PULL_SET_MEM_CTX(ndr, r->addr, 0);
12140 NDR_CHECK(ndr_pull_array_size(ndr, &r->addr));
12141 NDR_PULL_ALLOC_N(ndr, r->addr, ndr_get_array_size(ndr, &r->addr));
12142 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->addr, ndr_get_array_size(ndr, &r->addr)));
12143 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_addr_0, 0);
12145 if (r->net_addr) {
12146 _mem_save_net_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
12147 NDR_PULL_SET_MEM_CTX(ndr, r->net_addr, 0);
12148 NDR_CHECK(ndr_pull_array_size(ndr, &r->net_addr));
12149 NDR_CHECK(ndr_pull_array_length(ndr, &r->net_addr));
12150 if (ndr_get_array_length(ndr, &r->net_addr) > ndr_get_array_size(ndr, &r->net_addr)) {
12151 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));
12153 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->net_addr), sizeof(uint16_t)));
12154 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->net_addr, ndr_get_array_length(ndr, &r->net_addr), sizeof(uint16_t), CH_UTF16));
12155 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_net_addr_0, 0);
12157 if (r->domain) {
12158 _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
12159 NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
12160 NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
12161 NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
12162 if (ndr_get_array_length(ndr, &r->domain) > ndr_get_array_size(ndr, &r->domain)) {
12163 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));
12165 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t)));
12166 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t), CH_UTF16));
12167 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
12169 if (r->addr) {
12170 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->addr, r->addr_len));
12173 return NT_STATUS_OK;
12176 _PUBLIC_ void ndr_print_srvsvc_NetTransportInfo2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportInfo2 *r)
12178 ndr_print_struct(ndr, name, "srvsvc_NetTransportInfo2");
12179 ndr->depth++;
12180 ndr_print_uint32(ndr, "vcs", r->vcs);
12181 ndr_print_ptr(ndr, "name", r->name);
12182 ndr->depth++;
12183 if (r->name) {
12184 ndr_print_string(ndr, "name", r->name);
12186 ndr->depth--;
12187 ndr_print_ptr(ndr, "addr", r->addr);
12188 ndr->depth++;
12189 if (r->addr) {
12190 ndr_print_array_uint8(ndr, "addr", r->addr, r->addr_len);
12192 ndr->depth--;
12193 ndr_print_uint32(ndr, "addr_len", r->addr_len);
12194 ndr_print_ptr(ndr, "net_addr", r->net_addr);
12195 ndr->depth++;
12196 if (r->net_addr) {
12197 ndr_print_string(ndr, "net_addr", r->net_addr);
12199 ndr->depth--;
12200 ndr_print_ptr(ndr, "domain", r->domain);
12201 ndr->depth++;
12202 if (r->domain) {
12203 ndr_print_string(ndr, "domain", r->domain);
12205 ndr->depth--;
12206 ndr_print_uint32(ndr, "unknown", r->unknown);
12207 ndr->depth--;
12210 NTSTATUS ndr_push_srvsvc_NetTransportCtr2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportCtr2 *r)
12212 uint32_t cntr_array_1;
12213 if (ndr_flags & NDR_SCALARS) {
12214 NDR_CHECK(ndr_push_align(ndr, 4));
12215 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
12216 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
12218 if (ndr_flags & NDR_BUFFERS) {
12219 if (r->array) {
12220 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
12221 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12222 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
12224 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12225 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo2(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
12229 return NT_STATUS_OK;
12232 NTSTATUS ndr_pull_srvsvc_NetTransportCtr2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportCtr2 *r)
12234 uint32_t _ptr_array;
12235 uint32_t cntr_array_1;
12236 TALLOC_CTX *_mem_save_array_0;
12237 TALLOC_CTX *_mem_save_array_1;
12238 if (ndr_flags & NDR_SCALARS) {
12239 NDR_CHECK(ndr_pull_align(ndr, 4));
12240 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
12241 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
12242 if (_ptr_array) {
12243 NDR_PULL_ALLOC(ndr, r->array);
12244 } else {
12245 r->array = NULL;
12248 if (ndr_flags & NDR_BUFFERS) {
12249 if (r->array) {
12250 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
12251 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
12252 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
12253 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
12254 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
12255 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
12256 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12257 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
12259 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12260 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo2(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
12262 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
12263 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
12265 if (r->array) {
12266 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
12269 return NT_STATUS_OK;
12272 _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportCtr2 *r)
12274 uint32_t cntr_array_1;
12275 ndr_print_struct(ndr, name, "srvsvc_NetTransportCtr2");
12276 ndr->depth++;
12277 ndr_print_uint32(ndr, "count", r->count);
12278 ndr_print_ptr(ndr, "array", r->array);
12279 ndr->depth++;
12280 if (r->array) {
12281 ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
12282 ndr->depth++;
12283 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
12284 char *idx_1=NULL;
12285 asprintf(&idx_1, "[%d]", cntr_array_1);
12286 if (idx_1) {
12287 ndr_print_srvsvc_NetTransportInfo2(ndr, "array", &r->array[cntr_array_1]);
12288 free(idx_1);
12291 ndr->depth--;
12293 ndr->depth--;
12294 ndr->depth--;
12297 NTSTATUS ndr_push_srvsvc_NetTransportInfo3(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportInfo3 *r)
12299 if (ndr_flags & NDR_SCALARS) {
12300 NDR_CHECK(ndr_push_align(ndr, 4));
12301 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->vcs));
12302 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
12303 NDR_CHECK(ndr_push_unique_ptr(ndr, r->addr));
12304 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->addr_len));
12305 NDR_CHECK(ndr_push_unique_ptr(ndr, r->net_addr));
12306 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
12307 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
12308 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2));
12309 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->unknown3, 256));
12311 if (ndr_flags & NDR_BUFFERS) {
12312 if (r->name) {
12313 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
12314 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
12315 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
12316 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12318 if (r->addr) {
12319 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->addr_len));
12320 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->addr, r->addr_len));
12322 if (r->net_addr) {
12323 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
12324 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
12325 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
12326 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->net_addr, ndr_charset_length(r->net_addr, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12328 if (r->domain) {
12329 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
12330 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
12331 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
12332 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12335 return NT_STATUS_OK;
12338 NTSTATUS ndr_pull_srvsvc_NetTransportInfo3(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportInfo3 *r)
12340 uint32_t _ptr_name;
12341 TALLOC_CTX *_mem_save_name_0;
12342 uint32_t _ptr_addr;
12343 TALLOC_CTX *_mem_save_addr_0;
12344 uint32_t _ptr_net_addr;
12345 TALLOC_CTX *_mem_save_net_addr_0;
12346 uint32_t _ptr_domain;
12347 TALLOC_CTX *_mem_save_domain_0;
12348 if (ndr_flags & NDR_SCALARS) {
12349 NDR_CHECK(ndr_pull_align(ndr, 4));
12350 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->vcs));
12351 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
12352 if (_ptr_name) {
12353 NDR_PULL_ALLOC(ndr, r->name);
12354 } else {
12355 r->name = NULL;
12357 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_addr));
12358 if (_ptr_addr) {
12359 NDR_PULL_ALLOC(ndr, r->addr);
12360 } else {
12361 r->addr = NULL;
12363 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->addr_len));
12364 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_net_addr));
12365 if (_ptr_net_addr) {
12366 NDR_PULL_ALLOC(ndr, r->net_addr);
12367 } else {
12368 r->net_addr = NULL;
12370 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
12371 if (_ptr_domain) {
12372 NDR_PULL_ALLOC(ndr, r->domain);
12373 } else {
12374 r->domain = NULL;
12376 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
12377 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
12378 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->unknown3, 256));
12380 if (ndr_flags & NDR_BUFFERS) {
12381 if (r->name) {
12382 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
12383 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
12384 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
12385 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
12386 if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->name)) {
12387 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));
12389 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t)));
12390 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t), CH_UTF16));
12391 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
12393 if (r->addr) {
12394 _mem_save_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
12395 NDR_PULL_SET_MEM_CTX(ndr, r->addr, 0);
12396 NDR_CHECK(ndr_pull_array_size(ndr, &r->addr));
12397 NDR_PULL_ALLOC_N(ndr, r->addr, ndr_get_array_size(ndr, &r->addr));
12398 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->addr, ndr_get_array_size(ndr, &r->addr)));
12399 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_addr_0, 0);
12401 if (r->net_addr) {
12402 _mem_save_net_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
12403 NDR_PULL_SET_MEM_CTX(ndr, r->net_addr, 0);
12404 NDR_CHECK(ndr_pull_array_size(ndr, &r->net_addr));
12405 NDR_CHECK(ndr_pull_array_length(ndr, &r->net_addr));
12406 if (ndr_get_array_length(ndr, &r->net_addr) > ndr_get_array_size(ndr, &r->net_addr)) {
12407 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));
12409 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->net_addr), sizeof(uint16_t)));
12410 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->net_addr, ndr_get_array_length(ndr, &r->net_addr), sizeof(uint16_t), CH_UTF16));
12411 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_net_addr_0, 0);
12413 if (r->domain) {
12414 _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
12415 NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
12416 NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
12417 NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
12418 if (ndr_get_array_length(ndr, &r->domain) > ndr_get_array_size(ndr, &r->domain)) {
12419 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));
12421 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t)));
12422 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t), CH_UTF16));
12423 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
12425 if (r->addr) {
12426 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->addr, r->addr_len));
12429 return NT_STATUS_OK;
12432 _PUBLIC_ void ndr_print_srvsvc_NetTransportInfo3(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportInfo3 *r)
12434 ndr_print_struct(ndr, name, "srvsvc_NetTransportInfo3");
12435 ndr->depth++;
12436 ndr_print_uint32(ndr, "vcs", r->vcs);
12437 ndr_print_ptr(ndr, "name", r->name);
12438 ndr->depth++;
12439 if (r->name) {
12440 ndr_print_string(ndr, "name", r->name);
12442 ndr->depth--;
12443 ndr_print_ptr(ndr, "addr", r->addr);
12444 ndr->depth++;
12445 if (r->addr) {
12446 ndr_print_array_uint8(ndr, "addr", r->addr, r->addr_len);
12448 ndr->depth--;
12449 ndr_print_uint32(ndr, "addr_len", r->addr_len);
12450 ndr_print_ptr(ndr, "net_addr", r->net_addr);
12451 ndr->depth++;
12452 if (r->net_addr) {
12453 ndr_print_string(ndr, "net_addr", r->net_addr);
12455 ndr->depth--;
12456 ndr_print_ptr(ndr, "domain", r->domain);
12457 ndr->depth++;
12458 if (r->domain) {
12459 ndr_print_string(ndr, "domain", r->domain);
12461 ndr->depth--;
12462 ndr_print_uint32(ndr, "unknown1", r->unknown1);
12463 ndr_print_uint32(ndr, "unknown2", r->unknown2);
12464 ndr_print_array_uint8(ndr, "unknown3", r->unknown3, 256);
12465 ndr->depth--;
12468 NTSTATUS ndr_push_srvsvc_NetTransportCtr3(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportCtr3 *r)
12470 uint32_t cntr_array_1;
12471 if (ndr_flags & NDR_SCALARS) {
12472 NDR_CHECK(ndr_push_align(ndr, 4));
12473 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
12474 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
12476 if (ndr_flags & NDR_BUFFERS) {
12477 if (r->array) {
12478 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
12479 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12480 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo3(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
12482 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12483 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo3(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
12487 return NT_STATUS_OK;
12490 NTSTATUS ndr_pull_srvsvc_NetTransportCtr3(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportCtr3 *r)
12492 uint32_t _ptr_array;
12493 uint32_t cntr_array_1;
12494 TALLOC_CTX *_mem_save_array_0;
12495 TALLOC_CTX *_mem_save_array_1;
12496 if (ndr_flags & NDR_SCALARS) {
12497 NDR_CHECK(ndr_pull_align(ndr, 4));
12498 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
12499 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
12500 if (_ptr_array) {
12501 NDR_PULL_ALLOC(ndr, r->array);
12502 } else {
12503 r->array = NULL;
12506 if (ndr_flags & NDR_BUFFERS) {
12507 if (r->array) {
12508 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
12509 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
12510 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
12511 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
12512 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
12513 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
12514 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12515 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo3(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
12517 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12518 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo3(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
12520 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
12521 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
12523 if (r->array) {
12524 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
12527 return NT_STATUS_OK;
12530 _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr3(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportCtr3 *r)
12532 uint32_t cntr_array_1;
12533 ndr_print_struct(ndr, name, "srvsvc_NetTransportCtr3");
12534 ndr->depth++;
12535 ndr_print_uint32(ndr, "count", r->count);
12536 ndr_print_ptr(ndr, "array", r->array);
12537 ndr->depth++;
12538 if (r->array) {
12539 ndr->print(ndr, "%s: ARRAY(%d)", "array", r->count);
12540 ndr->depth++;
12541 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
12542 char *idx_1=NULL;
12543 asprintf(&idx_1, "[%d]", cntr_array_1);
12544 if (idx_1) {
12545 ndr_print_srvsvc_NetTransportInfo3(ndr, "array", &r->array[cntr_array_1]);
12546 free(idx_1);
12549 ndr->depth--;
12551 ndr->depth--;
12552 ndr->depth--;
12555 NTSTATUS ndr_push_srvsvc_NetTransportCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetTransportCtr *r)
12557 if (ndr_flags & NDR_SCALARS) {
12558 int level = ndr_push_get_switch_value(ndr, r);
12559 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
12560 switch (level) {
12561 case 0:
12562 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0));
12563 break;
12565 case 1:
12566 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
12567 break;
12569 case 2:
12570 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr2));
12571 break;
12573 case 3:
12574 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr3));
12575 break;
12577 default:
12578 break;
12582 if (ndr_flags & NDR_BUFFERS) {
12583 int level = ndr_push_get_switch_value(ndr, r);
12584 switch (level) {
12585 case 0:
12586 if (r->ctr0) {
12587 NDR_CHECK(ndr_push_srvsvc_NetTransportCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
12589 break;
12591 case 1:
12592 if (r->ctr1) {
12593 NDR_CHECK(ndr_push_srvsvc_NetTransportCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
12595 break;
12597 case 2:
12598 if (r->ctr2) {
12599 NDR_CHECK(ndr_push_srvsvc_NetTransportCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
12601 break;
12603 case 3:
12604 if (r->ctr3) {
12605 NDR_CHECK(ndr_push_srvsvc_NetTransportCtr3(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr3));
12607 break;
12609 default:
12610 break;
12614 return NT_STATUS_OK;
12617 NTSTATUS ndr_pull_srvsvc_NetTransportCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetTransportCtr *r)
12619 int level;
12620 uint32_t _level;
12621 TALLOC_CTX *_mem_save_ctr0_0;
12622 TALLOC_CTX *_mem_save_ctr1_0;
12623 TALLOC_CTX *_mem_save_ctr2_0;
12624 TALLOC_CTX *_mem_save_ctr3_0;
12625 level = ndr_pull_get_switch_value(ndr, r);
12626 if (ndr_flags & NDR_SCALARS) {
12627 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
12628 if (_level != level) {
12629 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
12631 switch (level) {
12632 case 0: {
12633 uint32_t _ptr_ctr0;
12634 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr0));
12635 if (_ptr_ctr0) {
12636 NDR_PULL_ALLOC(ndr, r->ctr0);
12637 } else {
12638 r->ctr0 = NULL;
12640 break; }
12642 case 1: {
12643 uint32_t _ptr_ctr1;
12644 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
12645 if (_ptr_ctr1) {
12646 NDR_PULL_ALLOC(ndr, r->ctr1);
12647 } else {
12648 r->ctr1 = NULL;
12650 break; }
12652 case 2: {
12653 uint32_t _ptr_ctr2;
12654 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr2));
12655 if (_ptr_ctr2) {
12656 NDR_PULL_ALLOC(ndr, r->ctr2);
12657 } else {
12658 r->ctr2 = NULL;
12660 break; }
12662 case 3: {
12663 uint32_t _ptr_ctr3;
12664 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr3));
12665 if (_ptr_ctr3) {
12666 NDR_PULL_ALLOC(ndr, r->ctr3);
12667 } else {
12668 r->ctr3 = NULL;
12670 break; }
12672 default: {
12673 break; }
12677 if (ndr_flags & NDR_BUFFERS) {
12678 switch (level) {
12679 case 0:
12680 if (r->ctr0) {
12681 _mem_save_ctr0_0 = NDR_PULL_GET_MEM_CTX(ndr);
12682 NDR_PULL_SET_MEM_CTX(ndr, r->ctr0, 0);
12683 NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
12684 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr0_0, 0);
12686 break;
12688 case 1:
12689 if (r->ctr1) {
12690 _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
12691 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
12692 NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
12693 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
12695 break;
12697 case 2:
12698 if (r->ctr2) {
12699 _mem_save_ctr2_0 = NDR_PULL_GET_MEM_CTX(ndr);
12700 NDR_PULL_SET_MEM_CTX(ndr, r->ctr2, 0);
12701 NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
12702 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr2_0, 0);
12704 break;
12706 case 3:
12707 if (r->ctr3) {
12708 _mem_save_ctr3_0 = NDR_PULL_GET_MEM_CTX(ndr);
12709 NDR_PULL_SET_MEM_CTX(ndr, r->ctr3, 0);
12710 NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr3(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr3));
12711 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr3_0, 0);
12713 break;
12715 default:
12716 break;
12720 return NT_STATUS_OK;
12723 _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetTransportCtr *r)
12725 int level;
12726 level = ndr_print_get_switch_value(ndr, r);
12727 ndr_print_union(ndr, name, level, "srvsvc_NetTransportCtr");
12728 switch (level) {
12729 case 0:
12730 ndr_print_ptr(ndr, "ctr0", r->ctr0);
12731 ndr->depth++;
12732 if (r->ctr0) {
12733 ndr_print_srvsvc_NetTransportCtr0(ndr, "ctr0", r->ctr0);
12735 ndr->depth--;
12736 break;
12738 case 1:
12739 ndr_print_ptr(ndr, "ctr1", r->ctr1);
12740 ndr->depth++;
12741 if (r->ctr1) {
12742 ndr_print_srvsvc_NetTransportCtr1(ndr, "ctr1", r->ctr1);
12744 ndr->depth--;
12745 break;
12747 case 2:
12748 ndr_print_ptr(ndr, "ctr2", r->ctr2);
12749 ndr->depth++;
12750 if (r->ctr2) {
12751 ndr_print_srvsvc_NetTransportCtr2(ndr, "ctr2", r->ctr2);
12753 ndr->depth--;
12754 break;
12756 case 3:
12757 ndr_print_ptr(ndr, "ctr3", r->ctr3);
12758 ndr->depth++;
12759 if (r->ctr3) {
12760 ndr_print_srvsvc_NetTransportCtr3(ndr, "ctr3", r->ctr3);
12762 ndr->depth--;
12763 break;
12765 default:
12766 break;
12771 NTSTATUS ndr_push_srvsvc_NetRemoteTODInfo(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetRemoteTODInfo *r)
12773 if (ndr_flags & NDR_SCALARS) {
12774 NDR_CHECK(ndr_push_align(ndr, 4));
12775 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->elapsed));
12776 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->msecs));
12777 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->hours));
12778 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->mins));
12779 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->secs));
12780 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->hunds));
12781 NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, r->timezone));
12782 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->tinterval));
12783 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->day));
12784 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->month));
12785 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->year));
12786 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->weekday));
12788 if (ndr_flags & NDR_BUFFERS) {
12790 return NT_STATUS_OK;
12793 NTSTATUS ndr_pull_srvsvc_NetRemoteTODInfo(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetRemoteTODInfo *r)
12795 if (ndr_flags & NDR_SCALARS) {
12796 NDR_CHECK(ndr_pull_align(ndr, 4));
12797 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->elapsed));
12798 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->msecs));
12799 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->hours));
12800 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->mins));
12801 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->secs));
12802 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->hunds));
12803 NDR_CHECK(ndr_pull_int32(ndr, NDR_SCALARS, &r->timezone));
12804 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->tinterval));
12805 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->day));
12806 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->month));
12807 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->year));
12808 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->weekday));
12810 if (ndr_flags & NDR_BUFFERS) {
12812 return NT_STATUS_OK;
12815 _PUBLIC_ void ndr_print_srvsvc_NetRemoteTODInfo(struct ndr_print *ndr, const char *name, const struct srvsvc_NetRemoteTODInfo *r)
12817 ndr_print_struct(ndr, name, "srvsvc_NetRemoteTODInfo");
12818 ndr->depth++;
12819 ndr_print_uint32(ndr, "elapsed", r->elapsed);
12820 ndr_print_uint32(ndr, "msecs", r->msecs);
12821 ndr_print_uint32(ndr, "hours", r->hours);
12822 ndr_print_uint32(ndr, "mins", r->mins);
12823 ndr_print_uint32(ndr, "secs", r->secs);
12824 ndr_print_uint32(ndr, "hunds", r->hunds);
12825 ndr_print_int32(ndr, "timezone", r->timezone);
12826 ndr_print_uint32(ndr, "tinterval", r->tinterval);
12827 ndr_print_uint32(ndr, "day", r->day);
12828 ndr_print_uint32(ndr, "month", r->month);
12829 ndr_print_uint32(ndr, "year", r->year);
12830 ndr_print_uint32(ndr, "weekday", r->weekday);
12831 ndr->depth--;
12834 NTSTATUS ndr_push_srvsvc_NetTransportInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetTransportInfo *r)
12836 if (ndr_flags & NDR_SCALARS) {
12837 int level = ndr_push_get_switch_value(ndr, r);
12838 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
12839 switch (level) {
12840 case 0:
12841 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo0(ndr, NDR_SCALARS, &r->info0));
12842 break;
12844 case 1:
12845 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo1(ndr, NDR_SCALARS, &r->info1));
12846 break;
12848 case 2:
12849 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo2(ndr, NDR_SCALARS, &r->info2));
12850 break;
12852 case 3:
12853 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo3(ndr, NDR_SCALARS, &r->info3));
12854 break;
12856 default:
12857 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
12860 if (ndr_flags & NDR_BUFFERS) {
12861 int level = ndr_push_get_switch_value(ndr, r);
12862 switch (level) {
12863 case 0:
12864 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo0(ndr, NDR_BUFFERS, &r->info0));
12865 break;
12867 case 1:
12868 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo1(ndr, NDR_BUFFERS, &r->info1));
12869 break;
12871 case 2:
12872 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo2(ndr, NDR_BUFFERS, &r->info2));
12873 break;
12875 case 3:
12876 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo3(ndr, NDR_BUFFERS, &r->info3));
12877 break;
12879 default:
12880 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
12883 return NT_STATUS_OK;
12886 NTSTATUS ndr_pull_srvsvc_NetTransportInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetTransportInfo *r)
12888 int level;
12889 uint32_t _level;
12890 level = ndr_pull_get_switch_value(ndr, r);
12891 if (ndr_flags & NDR_SCALARS) {
12892 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
12893 if (_level != level) {
12894 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
12896 switch (level) {
12897 case 0: {
12898 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo0(ndr, NDR_SCALARS, &r->info0));
12899 break; }
12901 case 1: {
12902 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo1(ndr, NDR_SCALARS, &r->info1));
12903 break; }
12905 case 2: {
12906 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo2(ndr, NDR_SCALARS, &r->info2));
12907 break; }
12909 case 3: {
12910 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo3(ndr, NDR_SCALARS, &r->info3));
12911 break; }
12913 default:
12914 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
12917 if (ndr_flags & NDR_BUFFERS) {
12918 switch (level) {
12919 case 0:
12920 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo0(ndr, NDR_BUFFERS, &r->info0));
12921 break;
12923 case 1:
12924 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo1(ndr, NDR_BUFFERS, &r->info1));
12925 break;
12927 case 2:
12928 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo2(ndr, NDR_BUFFERS, &r->info2));
12929 break;
12931 case 3:
12932 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo3(ndr, NDR_BUFFERS, &r->info3));
12933 break;
12935 default:
12936 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
12939 return NT_STATUS_OK;
12942 _PUBLIC_ void ndr_print_srvsvc_NetTransportInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetTransportInfo *r)
12944 int level;
12945 level = ndr_print_get_switch_value(ndr, r);
12946 ndr_print_union(ndr, name, level, "srvsvc_NetTransportInfo");
12947 switch (level) {
12948 case 0:
12949 ndr_print_srvsvc_NetTransportInfo0(ndr, "info0", &r->info0);
12950 break;
12952 case 1:
12953 ndr_print_srvsvc_NetTransportInfo1(ndr, "info1", &r->info1);
12954 break;
12956 case 2:
12957 ndr_print_srvsvc_NetTransportInfo2(ndr, "info2", &r->info2);
12958 break;
12960 case 3:
12961 ndr_print_srvsvc_NetTransportInfo3(ndr, "info3", &r->info3);
12962 break;
12964 default:
12965 ndr_print_bad_level(ndr, name, level);
12969 NTSTATUS ndr_push_srvsvc_NetCharDevEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevEnum *r)
12971 if (flags & NDR_IN) {
12972 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
12973 if (r->in.server_unc) {
12974 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
12975 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
12976 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
12977 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));
12979 if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
12980 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.level));
12981 if (r->in.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
12982 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.ctr, *r->in.level));
12983 NDR_CHECK(ndr_push_srvsvc_NetCharDevCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
12984 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
12985 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
12986 if (r->in.resume_handle) {
12987 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
12990 if (flags & NDR_OUT) {
12991 if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
12992 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level));
12993 if (r->out.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
12994 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ctr, *r->out.level));
12995 NDR_CHECK(ndr_push_srvsvc_NetCharDevCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
12996 if (r->out.totalentries == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
12997 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
12998 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
12999 if (r->out.resume_handle) {
13000 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
13002 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
13004 return NT_STATUS_OK;
13007 NTSTATUS ndr_pull_srvsvc_NetCharDevEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevEnum *r)
13009 uint32_t _ptr_server_unc;
13010 uint32_t _ptr_resume_handle;
13011 TALLOC_CTX *_mem_save_server_unc_0;
13012 TALLOC_CTX *_mem_save_level_0;
13013 TALLOC_CTX *_mem_save_ctr_0;
13014 TALLOC_CTX *_mem_save_totalentries_0;
13015 TALLOC_CTX *_mem_save_resume_handle_0;
13016 if (flags & NDR_IN) {
13017 ZERO_STRUCT(r->out);
13019 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
13020 if (_ptr_server_unc) {
13021 NDR_PULL_ALLOC(ndr, r->in.server_unc);
13022 } else {
13023 r->in.server_unc = NULL;
13025 if (r->in.server_unc) {
13026 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
13027 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
13028 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
13029 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
13030 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
13031 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));
13033 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
13034 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));
13035 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
13037 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13038 NDR_PULL_ALLOC(ndr, r->in.level);
13040 _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr);
13041 NDR_PULL_SET_MEM_CTX(ndr, r->in.level, LIBNDR_FLAG_REF_ALLOC);
13042 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.level));
13043 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC);
13044 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13045 NDR_PULL_ALLOC(ndr, r->in.ctr);
13047 _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
13048 NDR_PULL_SET_MEM_CTX(ndr, r->in.ctr, LIBNDR_FLAG_REF_ALLOC);
13049 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.ctr, *r->in.level));
13050 NDR_CHECK(ndr_pull_srvsvc_NetCharDevCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
13051 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
13052 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
13053 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
13054 if (_ptr_resume_handle) {
13055 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
13056 } else {
13057 r->in.resume_handle = NULL;
13059 if (r->in.resume_handle) {
13060 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
13061 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
13062 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
13063 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
13065 NDR_PULL_ALLOC(ndr, r->out.level);
13066 *r->out.level = *r->in.level;
13067 NDR_PULL_ALLOC(ndr, r->out.ctr);
13068 *r->out.ctr = *r->in.ctr;
13069 NDR_PULL_ALLOC(ndr, r->out.totalentries);
13070 ZERO_STRUCTP(r->out.totalentries);
13072 if (flags & NDR_OUT) {
13073 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13074 NDR_PULL_ALLOC(ndr, r->out.level);
13076 _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr);
13077 NDR_PULL_SET_MEM_CTX(ndr, r->out.level, LIBNDR_FLAG_REF_ALLOC);
13078 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.level));
13079 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC);
13080 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13081 NDR_PULL_ALLOC(ndr, r->out.ctr);
13083 _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
13084 NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
13085 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ctr, *r->out.level));
13086 NDR_CHECK(ndr_pull_srvsvc_NetCharDevCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
13087 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
13088 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13089 NDR_PULL_ALLOC(ndr, r->out.totalentries);
13091 _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
13092 NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
13093 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
13094 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
13095 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
13096 if (_ptr_resume_handle) {
13097 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
13098 } else {
13099 r->out.resume_handle = NULL;
13101 if (r->out.resume_handle) {
13102 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
13103 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
13104 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
13105 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
13107 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
13109 return NT_STATUS_OK;
13112 _PUBLIC_ void ndr_print_srvsvc_NetCharDevEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevEnum *r)
13114 ndr_print_struct(ndr, name, "srvsvc_NetCharDevEnum");
13115 ndr->depth++;
13116 if (flags & NDR_SET_VALUES) {
13117 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
13119 if (flags & NDR_IN) {
13120 ndr_print_struct(ndr, "in", "srvsvc_NetCharDevEnum");
13121 ndr->depth++;
13122 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
13123 ndr->depth++;
13124 if (r->in.server_unc) {
13125 ndr_print_string(ndr, "server_unc", r->in.server_unc);
13127 ndr->depth--;
13128 ndr_print_ptr(ndr, "level", r->in.level);
13129 ndr->depth++;
13130 ndr_print_uint32(ndr, "level", *r->in.level);
13131 ndr->depth--;
13132 ndr_print_ptr(ndr, "ctr", r->in.ctr);
13133 ndr->depth++;
13134 ndr_print_set_switch_value(ndr, r->in.ctr, *r->in.level);
13135 ndr_print_srvsvc_NetCharDevCtr(ndr, "ctr", r->in.ctr);
13136 ndr->depth--;
13137 ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
13138 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
13139 ndr->depth++;
13140 if (r->in.resume_handle) {
13141 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
13143 ndr->depth--;
13144 ndr->depth--;
13146 if (flags & NDR_OUT) {
13147 ndr_print_struct(ndr, "out", "srvsvc_NetCharDevEnum");
13148 ndr->depth++;
13149 ndr_print_ptr(ndr, "level", r->out.level);
13150 ndr->depth++;
13151 ndr_print_uint32(ndr, "level", *r->out.level);
13152 ndr->depth--;
13153 ndr_print_ptr(ndr, "ctr", r->out.ctr);
13154 ndr->depth++;
13155 ndr_print_set_switch_value(ndr, r->out.ctr, *r->out.level);
13156 ndr_print_srvsvc_NetCharDevCtr(ndr, "ctr", r->out.ctr);
13157 ndr->depth--;
13158 ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
13159 ndr->depth++;
13160 ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
13161 ndr->depth--;
13162 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
13163 ndr->depth++;
13164 if (r->out.resume_handle) {
13165 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
13167 ndr->depth--;
13168 ndr_print_WERROR(ndr, "result", r->out.result);
13169 ndr->depth--;
13171 ndr->depth--;
13174 NTSTATUS ndr_push_srvsvc_NetCharDevGetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevGetInfo *r)
13176 if (flags & NDR_IN) {
13177 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
13178 if (r->in.server_unc) {
13179 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13180 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
13181 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13182 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));
13184 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.device_name, CH_UTF16)));
13185 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
13186 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.device_name, CH_UTF16)));
13187 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));
13188 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
13190 if (flags & NDR_OUT) {
13191 if (r->out.info == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
13192 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
13193 NDR_CHECK(ndr_push_srvsvc_NetCharDevInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
13194 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
13196 return NT_STATUS_OK;
13199 NTSTATUS ndr_pull_srvsvc_NetCharDevGetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevGetInfo *r)
13201 uint32_t _ptr_server_unc;
13202 TALLOC_CTX *_mem_save_server_unc_0;
13203 TALLOC_CTX *_mem_save_info_0;
13204 if (flags & NDR_IN) {
13205 ZERO_STRUCT(r->out);
13207 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
13208 if (_ptr_server_unc) {
13209 NDR_PULL_ALLOC(ndr, r->in.server_unc);
13210 } else {
13211 r->in.server_unc = NULL;
13213 if (r->in.server_unc) {
13214 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
13215 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
13216 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
13217 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
13218 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
13219 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));
13221 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
13222 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));
13223 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
13225 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.device_name));
13226 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.device_name));
13227 if (ndr_get_array_length(ndr, &r->in.device_name) > ndr_get_array_size(ndr, &r->in.device_name)) {
13228 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));
13230 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.device_name), sizeof(uint16_t)));
13231 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));
13232 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
13233 NDR_PULL_ALLOC(ndr, r->out.info);
13234 ZERO_STRUCTP(r->out.info);
13236 if (flags & NDR_OUT) {
13237 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13238 NDR_PULL_ALLOC(ndr, r->out.info);
13240 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
13241 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
13242 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
13243 NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
13244 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
13245 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
13247 return NT_STATUS_OK;
13250 _PUBLIC_ void ndr_print_srvsvc_NetCharDevGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevGetInfo *r)
13252 ndr_print_struct(ndr, name, "srvsvc_NetCharDevGetInfo");
13253 ndr->depth++;
13254 if (flags & NDR_SET_VALUES) {
13255 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
13257 if (flags & NDR_IN) {
13258 ndr_print_struct(ndr, "in", "srvsvc_NetCharDevGetInfo");
13259 ndr->depth++;
13260 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
13261 ndr->depth++;
13262 if (r->in.server_unc) {
13263 ndr_print_string(ndr, "server_unc", r->in.server_unc);
13265 ndr->depth--;
13266 ndr_print_string(ndr, "device_name", r->in.device_name);
13267 ndr_print_uint32(ndr, "level", r->in.level);
13268 ndr->depth--;
13270 if (flags & NDR_OUT) {
13271 ndr_print_struct(ndr, "out", "srvsvc_NetCharDevGetInfo");
13272 ndr->depth++;
13273 ndr_print_ptr(ndr, "info", r->out.info);
13274 ndr->depth++;
13275 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
13276 ndr_print_srvsvc_NetCharDevInfo(ndr, "info", r->out.info);
13277 ndr->depth--;
13278 ndr_print_WERROR(ndr, "result", r->out.result);
13279 ndr->depth--;
13281 ndr->depth--;
13284 NTSTATUS ndr_push_srvsvc_NetCharDevControl(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevControl *r)
13286 if (flags & NDR_IN) {
13287 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
13288 if (r->in.server_unc) {
13289 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13290 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
13291 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13292 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));
13294 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.device_name, CH_UTF16)));
13295 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
13296 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.device_name, CH_UTF16)));
13297 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));
13298 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.opcode));
13300 if (flags & NDR_OUT) {
13301 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
13303 return NT_STATUS_OK;
13306 NTSTATUS ndr_pull_srvsvc_NetCharDevControl(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevControl *r)
13308 uint32_t _ptr_server_unc;
13309 TALLOC_CTX *_mem_save_server_unc_0;
13310 if (flags & NDR_IN) {
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.opcode));
13338 if (flags & NDR_OUT) {
13339 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
13341 return NT_STATUS_OK;
13344 _PUBLIC_ void ndr_print_srvsvc_NetCharDevControl(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevControl *r)
13346 ndr_print_struct(ndr, name, "srvsvc_NetCharDevControl");
13347 ndr->depth++;
13348 if (flags & NDR_SET_VALUES) {
13349 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
13351 if (flags & NDR_IN) {
13352 ndr_print_struct(ndr, "in", "srvsvc_NetCharDevControl");
13353 ndr->depth++;
13354 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
13355 ndr->depth++;
13356 if (r->in.server_unc) {
13357 ndr_print_string(ndr, "server_unc", r->in.server_unc);
13359 ndr->depth--;
13360 ndr_print_string(ndr, "device_name", r->in.device_name);
13361 ndr_print_uint32(ndr, "opcode", r->in.opcode);
13362 ndr->depth--;
13364 if (flags & NDR_OUT) {
13365 ndr_print_struct(ndr, "out", "srvsvc_NetCharDevControl");
13366 ndr->depth++;
13367 ndr_print_WERROR(ndr, "result", r->out.result);
13368 ndr->depth--;
13370 ndr->depth--;
13373 NTSTATUS ndr_push_srvsvc_NetCharDevQEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevQEnum *r)
13375 if (flags & NDR_IN) {
13376 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
13377 if (r->in.server_unc) {
13378 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13379 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
13380 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13381 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));
13383 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.user));
13384 if (r->in.user) {
13385 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
13386 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
13387 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
13388 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.user, ndr_charset_length(r->in.user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
13390 if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
13391 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.level));
13392 if (r->in.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
13393 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.ctr, *r->in.level));
13394 NDR_CHECK(ndr_push_srvsvc_NetCharDevQCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
13395 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
13396 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
13397 if (r->in.resume_handle) {
13398 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
13401 if (flags & NDR_OUT) {
13402 if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
13403 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level));
13404 if (r->out.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
13405 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ctr, *r->out.level));
13406 NDR_CHECK(ndr_push_srvsvc_NetCharDevQCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
13407 if (r->out.totalentries == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
13408 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
13409 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
13410 if (r->out.resume_handle) {
13411 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
13413 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
13415 return NT_STATUS_OK;
13418 NTSTATUS ndr_pull_srvsvc_NetCharDevQEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevQEnum *r)
13420 uint32_t _ptr_server_unc;
13421 uint32_t _ptr_user;
13422 uint32_t _ptr_resume_handle;
13423 TALLOC_CTX *_mem_save_server_unc_0;
13424 TALLOC_CTX *_mem_save_user_0;
13425 TALLOC_CTX *_mem_save_level_0;
13426 TALLOC_CTX *_mem_save_ctr_0;
13427 TALLOC_CTX *_mem_save_totalentries_0;
13428 TALLOC_CTX *_mem_save_resume_handle_0;
13429 if (flags & NDR_IN) {
13430 ZERO_STRUCT(r->out);
13432 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
13433 if (_ptr_server_unc) {
13434 NDR_PULL_ALLOC(ndr, r->in.server_unc);
13435 } else {
13436 r->in.server_unc = NULL;
13438 if (r->in.server_unc) {
13439 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
13440 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
13441 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
13442 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
13443 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
13444 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));
13446 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
13447 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));
13448 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
13450 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
13451 if (_ptr_user) {
13452 NDR_PULL_ALLOC(ndr, r->in.user);
13453 } else {
13454 r->in.user = NULL;
13456 if (r->in.user) {
13457 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
13458 NDR_PULL_SET_MEM_CTX(ndr, r->in.user, 0);
13459 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.user));
13460 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.user));
13461 if (ndr_get_array_length(ndr, &r->in.user) > ndr_get_array_size(ndr, &r->in.user)) {
13462 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));
13464 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.user), sizeof(uint16_t)));
13465 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.user, ndr_get_array_length(ndr, &r->in.user), sizeof(uint16_t), CH_UTF16));
13466 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
13468 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13469 NDR_PULL_ALLOC(ndr, r->in.level);
13471 _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr);
13472 NDR_PULL_SET_MEM_CTX(ndr, r->in.level, LIBNDR_FLAG_REF_ALLOC);
13473 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.level));
13474 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC);
13475 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13476 NDR_PULL_ALLOC(ndr, r->in.ctr);
13478 _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
13479 NDR_PULL_SET_MEM_CTX(ndr, r->in.ctr, LIBNDR_FLAG_REF_ALLOC);
13480 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.ctr, *r->in.level));
13481 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
13482 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
13483 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
13484 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
13485 if (_ptr_resume_handle) {
13486 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
13487 } else {
13488 r->in.resume_handle = NULL;
13490 if (r->in.resume_handle) {
13491 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
13492 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
13493 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
13494 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
13496 NDR_PULL_ALLOC(ndr, r->out.level);
13497 *r->out.level = *r->in.level;
13498 NDR_PULL_ALLOC(ndr, r->out.ctr);
13499 *r->out.ctr = *r->in.ctr;
13500 NDR_PULL_ALLOC(ndr, r->out.totalentries);
13501 ZERO_STRUCTP(r->out.totalentries);
13503 if (flags & NDR_OUT) {
13504 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13505 NDR_PULL_ALLOC(ndr, r->out.level);
13507 _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr);
13508 NDR_PULL_SET_MEM_CTX(ndr, r->out.level, LIBNDR_FLAG_REF_ALLOC);
13509 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.level));
13510 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC);
13511 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13512 NDR_PULL_ALLOC(ndr, r->out.ctr);
13514 _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
13515 NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
13516 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ctr, *r->out.level));
13517 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
13518 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
13519 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13520 NDR_PULL_ALLOC(ndr, r->out.totalentries);
13522 _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
13523 NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
13524 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
13525 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
13526 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
13527 if (_ptr_resume_handle) {
13528 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
13529 } else {
13530 r->out.resume_handle = NULL;
13532 if (r->out.resume_handle) {
13533 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
13534 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
13535 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
13536 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
13538 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
13540 return NT_STATUS_OK;
13543 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQEnum *r)
13545 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQEnum");
13546 ndr->depth++;
13547 if (flags & NDR_SET_VALUES) {
13548 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
13550 if (flags & NDR_IN) {
13551 ndr_print_struct(ndr, "in", "srvsvc_NetCharDevQEnum");
13552 ndr->depth++;
13553 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
13554 ndr->depth++;
13555 if (r->in.server_unc) {
13556 ndr_print_string(ndr, "server_unc", r->in.server_unc);
13558 ndr->depth--;
13559 ndr_print_ptr(ndr, "user", r->in.user);
13560 ndr->depth++;
13561 if (r->in.user) {
13562 ndr_print_string(ndr, "user", r->in.user);
13564 ndr->depth--;
13565 ndr_print_ptr(ndr, "level", r->in.level);
13566 ndr->depth++;
13567 ndr_print_uint32(ndr, "level", *r->in.level);
13568 ndr->depth--;
13569 ndr_print_ptr(ndr, "ctr", r->in.ctr);
13570 ndr->depth++;
13571 ndr_print_set_switch_value(ndr, r->in.ctr, *r->in.level);
13572 ndr_print_srvsvc_NetCharDevQCtr(ndr, "ctr", r->in.ctr);
13573 ndr->depth--;
13574 ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
13575 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
13576 ndr->depth++;
13577 if (r->in.resume_handle) {
13578 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
13580 ndr->depth--;
13581 ndr->depth--;
13583 if (flags & NDR_OUT) {
13584 ndr_print_struct(ndr, "out", "srvsvc_NetCharDevQEnum");
13585 ndr->depth++;
13586 ndr_print_ptr(ndr, "level", r->out.level);
13587 ndr->depth++;
13588 ndr_print_uint32(ndr, "level", *r->out.level);
13589 ndr->depth--;
13590 ndr_print_ptr(ndr, "ctr", r->out.ctr);
13591 ndr->depth++;
13592 ndr_print_set_switch_value(ndr, r->out.ctr, *r->out.level);
13593 ndr_print_srvsvc_NetCharDevQCtr(ndr, "ctr", r->out.ctr);
13594 ndr->depth--;
13595 ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
13596 ndr->depth++;
13597 ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
13598 ndr->depth--;
13599 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
13600 ndr->depth++;
13601 if (r->out.resume_handle) {
13602 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
13604 ndr->depth--;
13605 ndr_print_WERROR(ndr, "result", r->out.result);
13606 ndr->depth--;
13608 ndr->depth--;
13611 NTSTATUS ndr_push_srvsvc_NetCharDevQGetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevQGetInfo *r)
13613 if (flags & NDR_IN) {
13614 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
13615 if (r->in.server_unc) {
13616 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13617 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
13618 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13619 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));
13621 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
13622 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
13623 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
13624 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));
13625 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
13626 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
13627 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
13628 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.user, ndr_charset_length(r->in.user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
13629 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
13631 if (flags & NDR_OUT) {
13632 if (r->out.info == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
13633 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
13634 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
13635 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
13637 return NT_STATUS_OK;
13640 NTSTATUS ndr_pull_srvsvc_NetCharDevQGetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevQGetInfo *r)
13642 uint32_t _ptr_server_unc;
13643 TALLOC_CTX *_mem_save_server_unc_0;
13644 TALLOC_CTX *_mem_save_info_0;
13645 if (flags & NDR_IN) {
13646 ZERO_STRUCT(r->out);
13648 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
13649 if (_ptr_server_unc) {
13650 NDR_PULL_ALLOC(ndr, r->in.server_unc);
13651 } else {
13652 r->in.server_unc = NULL;
13654 if (r->in.server_unc) {
13655 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
13656 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
13657 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
13658 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
13659 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
13660 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));
13662 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
13663 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));
13664 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
13666 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.queue_name));
13667 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.queue_name));
13668 if (ndr_get_array_length(ndr, &r->in.queue_name) > ndr_get_array_size(ndr, &r->in.queue_name)) {
13669 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));
13671 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.queue_name), sizeof(uint16_t)));
13672 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));
13673 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.user));
13674 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.user));
13675 if (ndr_get_array_length(ndr, &r->in.user) > ndr_get_array_size(ndr, &r->in.user)) {
13676 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));
13678 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.user), sizeof(uint16_t)));
13679 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.user, ndr_get_array_length(ndr, &r->in.user), sizeof(uint16_t), CH_UTF16));
13680 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
13681 NDR_PULL_ALLOC(ndr, r->out.info);
13682 ZERO_STRUCTP(r->out.info);
13684 if (flags & NDR_OUT) {
13685 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13686 NDR_PULL_ALLOC(ndr, r->out.info);
13688 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
13689 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
13690 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
13691 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
13692 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
13693 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
13695 return NT_STATUS_OK;
13698 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQGetInfo *r)
13700 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQGetInfo");
13701 ndr->depth++;
13702 if (flags & NDR_SET_VALUES) {
13703 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
13705 if (flags & NDR_IN) {
13706 ndr_print_struct(ndr, "in", "srvsvc_NetCharDevQGetInfo");
13707 ndr->depth++;
13708 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
13709 ndr->depth++;
13710 if (r->in.server_unc) {
13711 ndr_print_string(ndr, "server_unc", r->in.server_unc);
13713 ndr->depth--;
13714 ndr_print_string(ndr, "queue_name", r->in.queue_name);
13715 ndr_print_string(ndr, "user", r->in.user);
13716 ndr_print_uint32(ndr, "level", r->in.level);
13717 ndr->depth--;
13719 if (flags & NDR_OUT) {
13720 ndr_print_struct(ndr, "out", "srvsvc_NetCharDevQGetInfo");
13721 ndr->depth++;
13722 ndr_print_ptr(ndr, "info", r->out.info);
13723 ndr->depth++;
13724 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
13725 ndr_print_srvsvc_NetCharDevQInfo(ndr, "info", r->out.info);
13726 ndr->depth--;
13727 ndr_print_WERROR(ndr, "result", r->out.result);
13728 ndr->depth--;
13730 ndr->depth--;
13733 NTSTATUS ndr_push_srvsvc_NetCharDevQSetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevQSetInfo *r)
13735 if (flags & NDR_IN) {
13736 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
13737 if (r->in.server_unc) {
13738 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13739 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
13740 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13741 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));
13743 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
13744 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
13745 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
13746 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));
13747 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
13748 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.info, r->in.level));
13749 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
13750 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.parm_error));
13751 if (r->in.parm_error) {
13752 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.parm_error));
13755 if (flags & NDR_OUT) {
13756 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.parm_error));
13757 if (r->out.parm_error) {
13758 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.parm_error));
13760 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
13762 return NT_STATUS_OK;
13765 NTSTATUS ndr_pull_srvsvc_NetCharDevQSetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevQSetInfo *r)
13767 uint32_t _ptr_server_unc;
13768 uint32_t _ptr_parm_error;
13769 TALLOC_CTX *_mem_save_server_unc_0;
13770 TALLOC_CTX *_mem_save_parm_error_0;
13771 if (flags & NDR_IN) {
13772 ZERO_STRUCT(r->out);
13774 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
13775 if (_ptr_server_unc) {
13776 NDR_PULL_ALLOC(ndr, r->in.server_unc);
13777 } else {
13778 r->in.server_unc = NULL;
13780 if (r->in.server_unc) {
13781 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
13782 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
13783 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
13784 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
13785 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
13786 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));
13788 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
13789 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));
13790 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
13792 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.queue_name));
13793 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.queue_name));
13794 if (ndr_get_array_length(ndr, &r->in.queue_name) > ndr_get_array_size(ndr, &r->in.queue_name)) {
13795 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));
13797 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.queue_name), sizeof(uint16_t)));
13798 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));
13799 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
13800 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.info, r->in.level));
13801 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
13802 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
13803 if (_ptr_parm_error) {
13804 NDR_PULL_ALLOC(ndr, r->in.parm_error);
13805 } else {
13806 r->in.parm_error = NULL;
13808 if (r->in.parm_error) {
13809 _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
13810 NDR_PULL_SET_MEM_CTX(ndr, r->in.parm_error, 0);
13811 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.parm_error));
13812 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
13815 if (flags & NDR_OUT) {
13816 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
13817 if (_ptr_parm_error) {
13818 NDR_PULL_ALLOC(ndr, r->out.parm_error);
13819 } else {
13820 r->out.parm_error = NULL;
13822 if (r->out.parm_error) {
13823 _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
13824 NDR_PULL_SET_MEM_CTX(ndr, r->out.parm_error, 0);
13825 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.parm_error));
13826 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
13828 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
13830 return NT_STATUS_OK;
13833 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQSetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQSetInfo *r)
13835 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQSetInfo");
13836 ndr->depth++;
13837 if (flags & NDR_SET_VALUES) {
13838 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
13840 if (flags & NDR_IN) {
13841 ndr_print_struct(ndr, "in", "srvsvc_NetCharDevQSetInfo");
13842 ndr->depth++;
13843 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
13844 ndr->depth++;
13845 if (r->in.server_unc) {
13846 ndr_print_string(ndr, "server_unc", r->in.server_unc);
13848 ndr->depth--;
13849 ndr_print_string(ndr, "queue_name", r->in.queue_name);
13850 ndr_print_uint32(ndr, "level", r->in.level);
13851 ndr_print_set_switch_value(ndr, &r->in.info, r->in.level);
13852 ndr_print_srvsvc_NetCharDevQInfo(ndr, "info", &r->in.info);
13853 ndr_print_ptr(ndr, "parm_error", r->in.parm_error);
13854 ndr->depth++;
13855 if (r->in.parm_error) {
13856 ndr_print_uint32(ndr, "parm_error", *r->in.parm_error);
13858 ndr->depth--;
13859 ndr->depth--;
13861 if (flags & NDR_OUT) {
13862 ndr_print_struct(ndr, "out", "srvsvc_NetCharDevQSetInfo");
13863 ndr->depth++;
13864 ndr_print_ptr(ndr, "parm_error", r->out.parm_error);
13865 ndr->depth++;
13866 if (r->out.parm_error) {
13867 ndr_print_uint32(ndr, "parm_error", *r->out.parm_error);
13869 ndr->depth--;
13870 ndr_print_WERROR(ndr, "result", r->out.result);
13871 ndr->depth--;
13873 ndr->depth--;
13876 NTSTATUS ndr_push_srvsvc_NetCharDevQPurge(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevQPurge *r)
13878 if (flags & NDR_IN) {
13879 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
13880 if (r->in.server_unc) {
13881 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13882 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
13883 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13884 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));
13886 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
13887 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
13888 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
13889 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));
13891 if (flags & NDR_OUT) {
13892 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
13894 return NT_STATUS_OK;
13897 NTSTATUS ndr_pull_srvsvc_NetCharDevQPurge(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevQPurge *r)
13899 uint32_t _ptr_server_unc;
13900 TALLOC_CTX *_mem_save_server_unc_0;
13901 if (flags & NDR_IN) {
13902 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
13903 if (_ptr_server_unc) {
13904 NDR_PULL_ALLOC(ndr, r->in.server_unc);
13905 } else {
13906 r->in.server_unc = NULL;
13908 if (r->in.server_unc) {
13909 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
13910 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
13911 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
13912 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
13913 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
13914 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));
13916 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
13917 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));
13918 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
13920 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.queue_name));
13921 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.queue_name));
13922 if (ndr_get_array_length(ndr, &r->in.queue_name) > ndr_get_array_size(ndr, &r->in.queue_name)) {
13923 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));
13925 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.queue_name), sizeof(uint16_t)));
13926 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));
13928 if (flags & NDR_OUT) {
13929 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
13931 return NT_STATUS_OK;
13934 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQPurge(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQPurge *r)
13936 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQPurge");
13937 ndr->depth++;
13938 if (flags & NDR_SET_VALUES) {
13939 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
13941 if (flags & NDR_IN) {
13942 ndr_print_struct(ndr, "in", "srvsvc_NetCharDevQPurge");
13943 ndr->depth++;
13944 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
13945 ndr->depth++;
13946 if (r->in.server_unc) {
13947 ndr_print_string(ndr, "server_unc", r->in.server_unc);
13949 ndr->depth--;
13950 ndr_print_string(ndr, "queue_name", r->in.queue_name);
13951 ndr->depth--;
13953 if (flags & NDR_OUT) {
13954 ndr_print_struct(ndr, "out", "srvsvc_NetCharDevQPurge");
13955 ndr->depth++;
13956 ndr_print_WERROR(ndr, "result", r->out.result);
13957 ndr->depth--;
13959 ndr->depth--;
13962 NTSTATUS ndr_push_srvsvc_NetCharDevQPurgeSelf(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevQPurgeSelf *r)
13964 if (flags & NDR_IN) {
13965 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
13966 if (r->in.server_unc) {
13967 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13968 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
13969 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13970 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));
13972 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
13973 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
13974 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
13975 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));
13976 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
13977 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
13978 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
13979 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));
13981 if (flags & NDR_OUT) {
13982 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
13984 return NT_STATUS_OK;
13987 NTSTATUS ndr_pull_srvsvc_NetCharDevQPurgeSelf(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevQPurgeSelf *r)
13989 uint32_t _ptr_server_unc;
13990 TALLOC_CTX *_mem_save_server_unc_0;
13991 if (flags & NDR_IN) {
13992 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
13993 if (_ptr_server_unc) {
13994 NDR_PULL_ALLOC(ndr, r->in.server_unc);
13995 } else {
13996 r->in.server_unc = NULL;
13998 if (r->in.server_unc) {
13999 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
14000 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
14001 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
14002 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
14003 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
14004 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));
14006 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
14007 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));
14008 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
14010 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.queue_name));
14011 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.queue_name));
14012 if (ndr_get_array_length(ndr, &r->in.queue_name) > ndr_get_array_size(ndr, &r->in.queue_name)) {
14013 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));
14015 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.queue_name), sizeof(uint16_t)));
14016 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));
14017 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
14018 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
14019 if (ndr_get_array_length(ndr, &r->in.computer_name) > ndr_get_array_size(ndr, &r->in.computer_name)) {
14020 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));
14022 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.computer_name), sizeof(uint16_t)));
14023 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));
14025 if (flags & NDR_OUT) {
14026 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
14028 return NT_STATUS_OK;
14031 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQPurgeSelf(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQPurgeSelf *r)
14033 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQPurgeSelf");
14034 ndr->depth++;
14035 if (flags & NDR_SET_VALUES) {
14036 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14038 if (flags & NDR_IN) {
14039 ndr_print_struct(ndr, "in", "srvsvc_NetCharDevQPurgeSelf");
14040 ndr->depth++;
14041 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
14042 ndr->depth++;
14043 if (r->in.server_unc) {
14044 ndr_print_string(ndr, "server_unc", r->in.server_unc);
14046 ndr->depth--;
14047 ndr_print_string(ndr, "queue_name", r->in.queue_name);
14048 ndr_print_string(ndr, "computer_name", r->in.computer_name);
14049 ndr->depth--;
14051 if (flags & NDR_OUT) {
14052 ndr_print_struct(ndr, "out", "srvsvc_NetCharDevQPurgeSelf");
14053 ndr->depth++;
14054 ndr_print_WERROR(ndr, "result", r->out.result);
14055 ndr->depth--;
14057 ndr->depth--;
14060 NTSTATUS ndr_push_srvsvc_NetConnEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetConnEnum *r)
14062 if (flags & NDR_IN) {
14063 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
14064 if (r->in.server_unc) {
14065 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14066 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
14067 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14068 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));
14070 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.path));
14071 if (r->in.path) {
14072 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
14073 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
14074 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
14075 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path, ndr_charset_length(r->in.path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
14077 if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
14078 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.level));
14079 if (r->in.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
14080 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.ctr, *r->in.level));
14081 NDR_CHECK(ndr_push_srvsvc_NetConnCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
14082 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
14083 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
14084 if (r->in.resume_handle) {
14085 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
14088 if (flags & NDR_OUT) {
14089 if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
14090 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level));
14091 if (r->out.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
14092 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ctr, *r->out.level));
14093 NDR_CHECK(ndr_push_srvsvc_NetConnCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
14094 if (r->out.totalentries == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
14095 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
14096 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
14097 if (r->out.resume_handle) {
14098 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
14100 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
14102 return NT_STATUS_OK;
14105 NTSTATUS ndr_pull_srvsvc_NetConnEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetConnEnum *r)
14107 uint32_t _ptr_server_unc;
14108 uint32_t _ptr_path;
14109 uint32_t _ptr_resume_handle;
14110 TALLOC_CTX *_mem_save_server_unc_0;
14111 TALLOC_CTX *_mem_save_path_0;
14112 TALLOC_CTX *_mem_save_level_0;
14113 TALLOC_CTX *_mem_save_ctr_0;
14114 TALLOC_CTX *_mem_save_totalentries_0;
14115 TALLOC_CTX *_mem_save_resume_handle_0;
14116 if (flags & NDR_IN) {
14117 ZERO_STRUCT(r->out);
14119 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
14120 if (_ptr_server_unc) {
14121 NDR_PULL_ALLOC(ndr, r->in.server_unc);
14122 } else {
14123 r->in.server_unc = NULL;
14125 if (r->in.server_unc) {
14126 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
14127 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
14128 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
14129 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
14130 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
14131 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));
14133 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
14134 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));
14135 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
14137 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
14138 if (_ptr_path) {
14139 NDR_PULL_ALLOC(ndr, r->in.path);
14140 } else {
14141 r->in.path = NULL;
14143 if (r->in.path) {
14144 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
14145 NDR_PULL_SET_MEM_CTX(ndr, r->in.path, 0);
14146 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path));
14147 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path));
14148 if (ndr_get_array_length(ndr, &r->in.path) > ndr_get_array_size(ndr, &r->in.path)) {
14149 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));
14151 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t)));
14152 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t), CH_UTF16));
14153 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
14155 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14156 NDR_PULL_ALLOC(ndr, r->in.level);
14158 _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr);
14159 NDR_PULL_SET_MEM_CTX(ndr, r->in.level, LIBNDR_FLAG_REF_ALLOC);
14160 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.level));
14161 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC);
14162 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14163 NDR_PULL_ALLOC(ndr, r->in.ctr);
14165 _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
14166 NDR_PULL_SET_MEM_CTX(ndr, r->in.ctr, LIBNDR_FLAG_REF_ALLOC);
14167 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.ctr, *r->in.level));
14168 NDR_CHECK(ndr_pull_srvsvc_NetConnCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
14169 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
14170 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
14171 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
14172 if (_ptr_resume_handle) {
14173 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
14174 } else {
14175 r->in.resume_handle = NULL;
14177 if (r->in.resume_handle) {
14178 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
14179 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
14180 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
14181 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
14183 NDR_PULL_ALLOC(ndr, r->out.level);
14184 *r->out.level = *r->in.level;
14185 NDR_PULL_ALLOC(ndr, r->out.ctr);
14186 *r->out.ctr = *r->in.ctr;
14187 NDR_PULL_ALLOC(ndr, r->out.totalentries);
14188 ZERO_STRUCTP(r->out.totalentries);
14190 if (flags & NDR_OUT) {
14191 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14192 NDR_PULL_ALLOC(ndr, r->out.level);
14194 _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr);
14195 NDR_PULL_SET_MEM_CTX(ndr, r->out.level, LIBNDR_FLAG_REF_ALLOC);
14196 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.level));
14197 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC);
14198 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14199 NDR_PULL_ALLOC(ndr, r->out.ctr);
14201 _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
14202 NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
14203 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ctr, *r->out.level));
14204 NDR_CHECK(ndr_pull_srvsvc_NetConnCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
14205 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
14206 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14207 NDR_PULL_ALLOC(ndr, r->out.totalentries);
14209 _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
14210 NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
14211 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
14212 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
14213 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
14214 if (_ptr_resume_handle) {
14215 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
14216 } else {
14217 r->out.resume_handle = NULL;
14219 if (r->out.resume_handle) {
14220 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
14221 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
14222 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
14223 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
14225 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
14227 return NT_STATUS_OK;
14230 _PUBLIC_ void ndr_print_srvsvc_NetConnEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetConnEnum *r)
14232 ndr_print_struct(ndr, name, "srvsvc_NetConnEnum");
14233 ndr->depth++;
14234 if (flags & NDR_SET_VALUES) {
14235 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14237 if (flags & NDR_IN) {
14238 ndr_print_struct(ndr, "in", "srvsvc_NetConnEnum");
14239 ndr->depth++;
14240 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
14241 ndr->depth++;
14242 if (r->in.server_unc) {
14243 ndr_print_string(ndr, "server_unc", r->in.server_unc);
14245 ndr->depth--;
14246 ndr_print_ptr(ndr, "path", r->in.path);
14247 ndr->depth++;
14248 if (r->in.path) {
14249 ndr_print_string(ndr, "path", r->in.path);
14251 ndr->depth--;
14252 ndr_print_ptr(ndr, "level", r->in.level);
14253 ndr->depth++;
14254 ndr_print_uint32(ndr, "level", *r->in.level);
14255 ndr->depth--;
14256 ndr_print_ptr(ndr, "ctr", r->in.ctr);
14257 ndr->depth++;
14258 ndr_print_set_switch_value(ndr, r->in.ctr, *r->in.level);
14259 ndr_print_srvsvc_NetConnCtr(ndr, "ctr", r->in.ctr);
14260 ndr->depth--;
14261 ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
14262 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
14263 ndr->depth++;
14264 if (r->in.resume_handle) {
14265 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
14267 ndr->depth--;
14268 ndr->depth--;
14270 if (flags & NDR_OUT) {
14271 ndr_print_struct(ndr, "out", "srvsvc_NetConnEnum");
14272 ndr->depth++;
14273 ndr_print_ptr(ndr, "level", r->out.level);
14274 ndr->depth++;
14275 ndr_print_uint32(ndr, "level", *r->out.level);
14276 ndr->depth--;
14277 ndr_print_ptr(ndr, "ctr", r->out.ctr);
14278 ndr->depth++;
14279 ndr_print_set_switch_value(ndr, r->out.ctr, *r->out.level);
14280 ndr_print_srvsvc_NetConnCtr(ndr, "ctr", r->out.ctr);
14281 ndr->depth--;
14282 ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
14283 ndr->depth++;
14284 ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
14285 ndr->depth--;
14286 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
14287 ndr->depth++;
14288 if (r->out.resume_handle) {
14289 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
14291 ndr->depth--;
14292 ndr_print_WERROR(ndr, "result", r->out.result);
14293 ndr->depth--;
14295 ndr->depth--;
14298 NTSTATUS ndr_push_srvsvc_NetFileEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetFileEnum *r)
14300 if (flags & NDR_IN) {
14301 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
14302 if (r->in.server_unc) {
14303 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14304 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
14305 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14306 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));
14308 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.path));
14309 if (r->in.path) {
14310 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
14311 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
14312 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
14313 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path, ndr_charset_length(r->in.path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
14315 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.user));
14316 if (r->in.user) {
14317 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
14318 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
14319 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
14320 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.user, ndr_charset_length(r->in.user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
14322 if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
14323 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.level));
14324 if (r->in.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
14325 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.ctr, *r->in.level));
14326 NDR_CHECK(ndr_push_srvsvc_NetFileCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
14327 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
14328 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
14329 if (r->in.resume_handle) {
14330 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
14333 if (flags & NDR_OUT) {
14334 if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
14335 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level));
14336 if (r->out.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
14337 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ctr, *r->out.level));
14338 NDR_CHECK(ndr_push_srvsvc_NetFileCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
14339 if (r->out.totalentries == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
14340 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
14341 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
14342 if (r->out.resume_handle) {
14343 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
14345 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
14347 return NT_STATUS_OK;
14350 NTSTATUS ndr_pull_srvsvc_NetFileEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetFileEnum *r)
14352 uint32_t _ptr_server_unc;
14353 uint32_t _ptr_path;
14354 uint32_t _ptr_user;
14355 uint32_t _ptr_resume_handle;
14356 TALLOC_CTX *_mem_save_server_unc_0;
14357 TALLOC_CTX *_mem_save_path_0;
14358 TALLOC_CTX *_mem_save_user_0;
14359 TALLOC_CTX *_mem_save_level_0;
14360 TALLOC_CTX *_mem_save_ctr_0;
14361 TALLOC_CTX *_mem_save_totalentries_0;
14362 TALLOC_CTX *_mem_save_resume_handle_0;
14363 if (flags & NDR_IN) {
14364 ZERO_STRUCT(r->out);
14366 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
14367 if (_ptr_server_unc) {
14368 NDR_PULL_ALLOC(ndr, r->in.server_unc);
14369 } else {
14370 r->in.server_unc = NULL;
14372 if (r->in.server_unc) {
14373 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
14374 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
14375 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
14376 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
14377 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
14378 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));
14380 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
14381 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));
14382 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
14384 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
14385 if (_ptr_path) {
14386 NDR_PULL_ALLOC(ndr, r->in.path);
14387 } else {
14388 r->in.path = NULL;
14390 if (r->in.path) {
14391 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
14392 NDR_PULL_SET_MEM_CTX(ndr, r->in.path, 0);
14393 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path));
14394 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path));
14395 if (ndr_get_array_length(ndr, &r->in.path) > ndr_get_array_size(ndr, &r->in.path)) {
14396 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));
14398 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t)));
14399 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t), CH_UTF16));
14400 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
14402 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
14403 if (_ptr_user) {
14404 NDR_PULL_ALLOC(ndr, r->in.user);
14405 } else {
14406 r->in.user = NULL;
14408 if (r->in.user) {
14409 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
14410 NDR_PULL_SET_MEM_CTX(ndr, r->in.user, 0);
14411 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.user));
14412 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.user));
14413 if (ndr_get_array_length(ndr, &r->in.user) > ndr_get_array_size(ndr, &r->in.user)) {
14414 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));
14416 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.user), sizeof(uint16_t)));
14417 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.user, ndr_get_array_length(ndr, &r->in.user), sizeof(uint16_t), CH_UTF16));
14418 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
14420 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14421 NDR_PULL_ALLOC(ndr, r->in.level);
14423 _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr);
14424 NDR_PULL_SET_MEM_CTX(ndr, r->in.level, LIBNDR_FLAG_REF_ALLOC);
14425 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.level));
14426 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC);
14427 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14428 NDR_PULL_ALLOC(ndr, r->in.ctr);
14430 _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
14431 NDR_PULL_SET_MEM_CTX(ndr, r->in.ctr, LIBNDR_FLAG_REF_ALLOC);
14432 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.ctr, *r->in.level));
14433 NDR_CHECK(ndr_pull_srvsvc_NetFileCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
14434 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
14435 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
14436 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
14437 if (_ptr_resume_handle) {
14438 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
14439 } else {
14440 r->in.resume_handle = NULL;
14442 if (r->in.resume_handle) {
14443 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
14444 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
14445 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
14446 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
14448 NDR_PULL_ALLOC(ndr, r->out.level);
14449 *r->out.level = *r->in.level;
14450 NDR_PULL_ALLOC(ndr, r->out.ctr);
14451 *r->out.ctr = *r->in.ctr;
14452 NDR_PULL_ALLOC(ndr, r->out.totalentries);
14453 ZERO_STRUCTP(r->out.totalentries);
14455 if (flags & NDR_OUT) {
14456 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14457 NDR_PULL_ALLOC(ndr, r->out.level);
14459 _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr);
14460 NDR_PULL_SET_MEM_CTX(ndr, r->out.level, LIBNDR_FLAG_REF_ALLOC);
14461 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.level));
14462 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC);
14463 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14464 NDR_PULL_ALLOC(ndr, r->out.ctr);
14466 _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
14467 NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
14468 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ctr, *r->out.level));
14469 NDR_CHECK(ndr_pull_srvsvc_NetFileCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
14470 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
14471 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14472 NDR_PULL_ALLOC(ndr, r->out.totalentries);
14474 _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
14475 NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
14476 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
14477 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
14478 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
14479 if (_ptr_resume_handle) {
14480 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
14481 } else {
14482 r->out.resume_handle = NULL;
14484 if (r->out.resume_handle) {
14485 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
14486 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
14487 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
14488 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
14490 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
14492 return NT_STATUS_OK;
14495 _PUBLIC_ void ndr_print_srvsvc_NetFileEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetFileEnum *r)
14497 ndr_print_struct(ndr, name, "srvsvc_NetFileEnum");
14498 ndr->depth++;
14499 if (flags & NDR_SET_VALUES) {
14500 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14502 if (flags & NDR_IN) {
14503 ndr_print_struct(ndr, "in", "srvsvc_NetFileEnum");
14504 ndr->depth++;
14505 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
14506 ndr->depth++;
14507 if (r->in.server_unc) {
14508 ndr_print_string(ndr, "server_unc", r->in.server_unc);
14510 ndr->depth--;
14511 ndr_print_ptr(ndr, "path", r->in.path);
14512 ndr->depth++;
14513 if (r->in.path) {
14514 ndr_print_string(ndr, "path", r->in.path);
14516 ndr->depth--;
14517 ndr_print_ptr(ndr, "user", r->in.user);
14518 ndr->depth++;
14519 if (r->in.user) {
14520 ndr_print_string(ndr, "user", r->in.user);
14522 ndr->depth--;
14523 ndr_print_ptr(ndr, "level", r->in.level);
14524 ndr->depth++;
14525 ndr_print_uint32(ndr, "level", *r->in.level);
14526 ndr->depth--;
14527 ndr_print_ptr(ndr, "ctr", r->in.ctr);
14528 ndr->depth++;
14529 ndr_print_set_switch_value(ndr, r->in.ctr, *r->in.level);
14530 ndr_print_srvsvc_NetFileCtr(ndr, "ctr", r->in.ctr);
14531 ndr->depth--;
14532 ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
14533 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
14534 ndr->depth++;
14535 if (r->in.resume_handle) {
14536 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
14538 ndr->depth--;
14539 ndr->depth--;
14541 if (flags & NDR_OUT) {
14542 ndr_print_struct(ndr, "out", "srvsvc_NetFileEnum");
14543 ndr->depth++;
14544 ndr_print_ptr(ndr, "level", r->out.level);
14545 ndr->depth++;
14546 ndr_print_uint32(ndr, "level", *r->out.level);
14547 ndr->depth--;
14548 ndr_print_ptr(ndr, "ctr", r->out.ctr);
14549 ndr->depth++;
14550 ndr_print_set_switch_value(ndr, r->out.ctr, *r->out.level);
14551 ndr_print_srvsvc_NetFileCtr(ndr, "ctr", r->out.ctr);
14552 ndr->depth--;
14553 ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
14554 ndr->depth++;
14555 ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
14556 ndr->depth--;
14557 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
14558 ndr->depth++;
14559 if (r->out.resume_handle) {
14560 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
14562 ndr->depth--;
14563 ndr_print_WERROR(ndr, "result", r->out.result);
14564 ndr->depth--;
14566 ndr->depth--;
14569 NTSTATUS ndr_push_srvsvc_NetFileGetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetFileGetInfo *r)
14571 if (flags & NDR_IN) {
14572 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
14573 if (r->in.server_unc) {
14574 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14575 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
14576 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14577 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));
14579 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.fid));
14580 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
14582 if (flags & NDR_OUT) {
14583 if (r->out.info == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
14584 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
14585 NDR_CHECK(ndr_push_srvsvc_NetFileInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
14586 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
14588 return NT_STATUS_OK;
14591 NTSTATUS ndr_pull_srvsvc_NetFileGetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetFileGetInfo *r)
14593 uint32_t _ptr_server_unc;
14594 TALLOC_CTX *_mem_save_server_unc_0;
14595 TALLOC_CTX *_mem_save_info_0;
14596 if (flags & NDR_IN) {
14597 ZERO_STRUCT(r->out);
14599 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
14600 if (_ptr_server_unc) {
14601 NDR_PULL_ALLOC(ndr, r->in.server_unc);
14602 } else {
14603 r->in.server_unc = NULL;
14605 if (r->in.server_unc) {
14606 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
14607 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
14608 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
14609 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
14610 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
14611 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));
14613 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
14614 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));
14615 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
14617 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.fid));
14618 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
14619 NDR_PULL_ALLOC(ndr, r->out.info);
14620 ZERO_STRUCTP(r->out.info);
14622 if (flags & NDR_OUT) {
14623 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14624 NDR_PULL_ALLOC(ndr, r->out.info);
14626 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
14627 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
14628 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
14629 NDR_CHECK(ndr_pull_srvsvc_NetFileInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
14630 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
14631 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
14633 return NT_STATUS_OK;
14636 _PUBLIC_ void ndr_print_srvsvc_NetFileGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetFileGetInfo *r)
14638 ndr_print_struct(ndr, name, "srvsvc_NetFileGetInfo");
14639 ndr->depth++;
14640 if (flags & NDR_SET_VALUES) {
14641 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14643 if (flags & NDR_IN) {
14644 ndr_print_struct(ndr, "in", "srvsvc_NetFileGetInfo");
14645 ndr->depth++;
14646 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
14647 ndr->depth++;
14648 if (r->in.server_unc) {
14649 ndr_print_string(ndr, "server_unc", r->in.server_unc);
14651 ndr->depth--;
14652 ndr_print_uint32(ndr, "fid", r->in.fid);
14653 ndr_print_uint32(ndr, "level", r->in.level);
14654 ndr->depth--;
14656 if (flags & NDR_OUT) {
14657 ndr_print_struct(ndr, "out", "srvsvc_NetFileGetInfo");
14658 ndr->depth++;
14659 ndr_print_ptr(ndr, "info", r->out.info);
14660 ndr->depth++;
14661 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
14662 ndr_print_srvsvc_NetFileInfo(ndr, "info", r->out.info);
14663 ndr->depth--;
14664 ndr_print_WERROR(ndr, "result", r->out.result);
14665 ndr->depth--;
14667 ndr->depth--;
14670 NTSTATUS ndr_push_srvsvc_NetFileClose(struct ndr_push *ndr, int flags, const struct srvsvc_NetFileClose *r)
14672 if (flags & NDR_IN) {
14673 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
14674 if (r->in.server_unc) {
14675 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14676 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
14677 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14678 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));
14680 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.fid));
14682 if (flags & NDR_OUT) {
14683 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
14685 return NT_STATUS_OK;
14688 NTSTATUS ndr_pull_srvsvc_NetFileClose(struct ndr_pull *ndr, int flags, struct srvsvc_NetFileClose *r)
14690 uint32_t _ptr_server_unc;
14691 TALLOC_CTX *_mem_save_server_unc_0;
14692 if (flags & NDR_IN) {
14693 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
14694 if (_ptr_server_unc) {
14695 NDR_PULL_ALLOC(ndr, r->in.server_unc);
14696 } else {
14697 r->in.server_unc = NULL;
14699 if (r->in.server_unc) {
14700 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
14701 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
14702 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
14703 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
14704 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
14705 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));
14707 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
14708 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));
14709 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
14711 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.fid));
14713 if (flags & NDR_OUT) {
14714 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
14716 return NT_STATUS_OK;
14719 _PUBLIC_ void ndr_print_srvsvc_NetFileClose(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetFileClose *r)
14721 ndr_print_struct(ndr, name, "srvsvc_NetFileClose");
14722 ndr->depth++;
14723 if (flags & NDR_SET_VALUES) {
14724 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14726 if (flags & NDR_IN) {
14727 ndr_print_struct(ndr, "in", "srvsvc_NetFileClose");
14728 ndr->depth++;
14729 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
14730 ndr->depth++;
14731 if (r->in.server_unc) {
14732 ndr_print_string(ndr, "server_unc", r->in.server_unc);
14734 ndr->depth--;
14735 ndr_print_uint32(ndr, "fid", r->in.fid);
14736 ndr->depth--;
14738 if (flags & NDR_OUT) {
14739 ndr_print_struct(ndr, "out", "srvsvc_NetFileClose");
14740 ndr->depth++;
14741 ndr_print_WERROR(ndr, "result", r->out.result);
14742 ndr->depth--;
14744 ndr->depth--;
14747 NTSTATUS ndr_push_srvsvc_NetSessEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetSessEnum *r)
14749 if (flags & NDR_IN) {
14750 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
14751 if (r->in.server_unc) {
14752 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14753 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
14754 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14755 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));
14757 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.client));
14758 if (r->in.client) {
14759 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.client, CH_UTF16)));
14760 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
14761 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.client, CH_UTF16)));
14762 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.client, ndr_charset_length(r->in.client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
14764 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.user));
14765 if (r->in.user) {
14766 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
14767 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
14768 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
14769 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.user, ndr_charset_length(r->in.user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
14771 if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
14772 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.level));
14773 if (r->in.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
14774 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.ctr, *r->in.level));
14775 NDR_CHECK(ndr_push_srvsvc_NetSessCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
14776 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
14777 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
14778 if (r->in.resume_handle) {
14779 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
14782 if (flags & NDR_OUT) {
14783 if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
14784 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level));
14785 if (r->out.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
14786 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ctr, *r->out.level));
14787 NDR_CHECK(ndr_push_srvsvc_NetSessCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
14788 if (r->out.totalentries == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
14789 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
14790 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
14791 if (r->out.resume_handle) {
14792 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
14794 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
14796 return NT_STATUS_OK;
14799 NTSTATUS ndr_pull_srvsvc_NetSessEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetSessEnum *r)
14801 uint32_t _ptr_server_unc;
14802 uint32_t _ptr_client;
14803 uint32_t _ptr_user;
14804 uint32_t _ptr_resume_handle;
14805 TALLOC_CTX *_mem_save_server_unc_0;
14806 TALLOC_CTX *_mem_save_client_0;
14807 TALLOC_CTX *_mem_save_user_0;
14808 TALLOC_CTX *_mem_save_level_0;
14809 TALLOC_CTX *_mem_save_ctr_0;
14810 TALLOC_CTX *_mem_save_totalentries_0;
14811 TALLOC_CTX *_mem_save_resume_handle_0;
14812 if (flags & NDR_IN) {
14813 ZERO_STRUCT(r->out);
14815 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
14816 if (_ptr_server_unc) {
14817 NDR_PULL_ALLOC(ndr, r->in.server_unc);
14818 } else {
14819 r->in.server_unc = NULL;
14821 if (r->in.server_unc) {
14822 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
14823 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
14824 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
14825 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
14826 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
14827 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));
14829 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
14830 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));
14831 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
14833 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
14834 if (_ptr_client) {
14835 NDR_PULL_ALLOC(ndr, r->in.client);
14836 } else {
14837 r->in.client = NULL;
14839 if (r->in.client) {
14840 _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
14841 NDR_PULL_SET_MEM_CTX(ndr, r->in.client, 0);
14842 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.client));
14843 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.client));
14844 if (ndr_get_array_length(ndr, &r->in.client) > ndr_get_array_size(ndr, &r->in.client)) {
14845 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));
14847 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.client), sizeof(uint16_t)));
14848 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.client, ndr_get_array_length(ndr, &r->in.client), sizeof(uint16_t), CH_UTF16));
14849 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
14851 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
14852 if (_ptr_user) {
14853 NDR_PULL_ALLOC(ndr, r->in.user);
14854 } else {
14855 r->in.user = NULL;
14857 if (r->in.user) {
14858 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
14859 NDR_PULL_SET_MEM_CTX(ndr, r->in.user, 0);
14860 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.user));
14861 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.user));
14862 if (ndr_get_array_length(ndr, &r->in.user) > ndr_get_array_size(ndr, &r->in.user)) {
14863 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));
14865 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.user), sizeof(uint16_t)));
14866 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.user, ndr_get_array_length(ndr, &r->in.user), sizeof(uint16_t), CH_UTF16));
14867 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
14869 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14870 NDR_PULL_ALLOC(ndr, r->in.level);
14872 _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr);
14873 NDR_PULL_SET_MEM_CTX(ndr, r->in.level, LIBNDR_FLAG_REF_ALLOC);
14874 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.level));
14875 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC);
14876 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14877 NDR_PULL_ALLOC(ndr, r->in.ctr);
14879 _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
14880 NDR_PULL_SET_MEM_CTX(ndr, r->in.ctr, LIBNDR_FLAG_REF_ALLOC);
14881 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.ctr, *r->in.level));
14882 NDR_CHECK(ndr_pull_srvsvc_NetSessCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
14883 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
14884 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
14885 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
14886 if (_ptr_resume_handle) {
14887 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
14888 } else {
14889 r->in.resume_handle = NULL;
14891 if (r->in.resume_handle) {
14892 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
14893 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
14894 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
14895 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
14897 NDR_PULL_ALLOC(ndr, r->out.level);
14898 *r->out.level = *r->in.level;
14899 NDR_PULL_ALLOC(ndr, r->out.ctr);
14900 *r->out.ctr = *r->in.ctr;
14901 NDR_PULL_ALLOC(ndr, r->out.totalentries);
14902 ZERO_STRUCTP(r->out.totalentries);
14904 if (flags & NDR_OUT) {
14905 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14906 NDR_PULL_ALLOC(ndr, r->out.level);
14908 _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr);
14909 NDR_PULL_SET_MEM_CTX(ndr, r->out.level, LIBNDR_FLAG_REF_ALLOC);
14910 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.level));
14911 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC);
14912 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14913 NDR_PULL_ALLOC(ndr, r->out.ctr);
14915 _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
14916 NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
14917 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ctr, *r->out.level));
14918 NDR_CHECK(ndr_pull_srvsvc_NetSessCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
14919 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
14920 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14921 NDR_PULL_ALLOC(ndr, r->out.totalentries);
14923 _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
14924 NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
14925 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
14926 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
14927 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
14928 if (_ptr_resume_handle) {
14929 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
14930 } else {
14931 r->out.resume_handle = NULL;
14933 if (r->out.resume_handle) {
14934 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
14935 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
14936 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
14937 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
14939 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
14941 return NT_STATUS_OK;
14944 _PUBLIC_ void ndr_print_srvsvc_NetSessEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSessEnum *r)
14946 ndr_print_struct(ndr, name, "srvsvc_NetSessEnum");
14947 ndr->depth++;
14948 if (flags & NDR_SET_VALUES) {
14949 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14951 if (flags & NDR_IN) {
14952 ndr_print_struct(ndr, "in", "srvsvc_NetSessEnum");
14953 ndr->depth++;
14954 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
14955 ndr->depth++;
14956 if (r->in.server_unc) {
14957 ndr_print_string(ndr, "server_unc", r->in.server_unc);
14959 ndr->depth--;
14960 ndr_print_ptr(ndr, "client", r->in.client);
14961 ndr->depth++;
14962 if (r->in.client) {
14963 ndr_print_string(ndr, "client", r->in.client);
14965 ndr->depth--;
14966 ndr_print_ptr(ndr, "user", r->in.user);
14967 ndr->depth++;
14968 if (r->in.user) {
14969 ndr_print_string(ndr, "user", r->in.user);
14971 ndr->depth--;
14972 ndr_print_ptr(ndr, "level", r->in.level);
14973 ndr->depth++;
14974 ndr_print_uint32(ndr, "level", *r->in.level);
14975 ndr->depth--;
14976 ndr_print_ptr(ndr, "ctr", r->in.ctr);
14977 ndr->depth++;
14978 ndr_print_set_switch_value(ndr, r->in.ctr, *r->in.level);
14979 ndr_print_srvsvc_NetSessCtr(ndr, "ctr", r->in.ctr);
14980 ndr->depth--;
14981 ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
14982 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
14983 ndr->depth++;
14984 if (r->in.resume_handle) {
14985 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
14987 ndr->depth--;
14988 ndr->depth--;
14990 if (flags & NDR_OUT) {
14991 ndr_print_struct(ndr, "out", "srvsvc_NetSessEnum");
14992 ndr->depth++;
14993 ndr_print_ptr(ndr, "level", r->out.level);
14994 ndr->depth++;
14995 ndr_print_uint32(ndr, "level", *r->out.level);
14996 ndr->depth--;
14997 ndr_print_ptr(ndr, "ctr", r->out.ctr);
14998 ndr->depth++;
14999 ndr_print_set_switch_value(ndr, r->out.ctr, *r->out.level);
15000 ndr_print_srvsvc_NetSessCtr(ndr, "ctr", r->out.ctr);
15001 ndr->depth--;
15002 ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
15003 ndr->depth++;
15004 ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
15005 ndr->depth--;
15006 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
15007 ndr->depth++;
15008 if (r->out.resume_handle) {
15009 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
15011 ndr->depth--;
15012 ndr_print_WERROR(ndr, "result", r->out.result);
15013 ndr->depth--;
15015 ndr->depth--;
15018 NTSTATUS ndr_push_srvsvc_NetSessDel(struct ndr_push *ndr, int flags, const struct srvsvc_NetSessDel *r)
15020 if (flags & NDR_IN) {
15021 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
15022 if (r->in.server_unc) {
15023 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15024 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
15025 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15026 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));
15028 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.client));
15029 if (r->in.client) {
15030 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.client, CH_UTF16)));
15031 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
15032 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.client, CH_UTF16)));
15033 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.client, ndr_charset_length(r->in.client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
15035 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.user));
15036 if (r->in.user) {
15037 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
15038 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
15039 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
15040 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.user, ndr_charset_length(r->in.user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
15043 if (flags & NDR_OUT) {
15044 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15046 return NT_STATUS_OK;
15049 NTSTATUS ndr_pull_srvsvc_NetSessDel(struct ndr_pull *ndr, int flags, struct srvsvc_NetSessDel *r)
15051 uint32_t _ptr_server_unc;
15052 uint32_t _ptr_client;
15053 uint32_t _ptr_user;
15054 TALLOC_CTX *_mem_save_server_unc_0;
15055 TALLOC_CTX *_mem_save_client_0;
15056 TALLOC_CTX *_mem_save_user_0;
15057 if (flags & NDR_IN) {
15058 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
15059 if (_ptr_server_unc) {
15060 NDR_PULL_ALLOC(ndr, r->in.server_unc);
15061 } else {
15062 r->in.server_unc = NULL;
15064 if (r->in.server_unc) {
15065 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
15066 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
15067 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
15068 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
15069 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
15070 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));
15072 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
15073 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));
15074 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
15076 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
15077 if (_ptr_client) {
15078 NDR_PULL_ALLOC(ndr, r->in.client);
15079 } else {
15080 r->in.client = NULL;
15082 if (r->in.client) {
15083 _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
15084 NDR_PULL_SET_MEM_CTX(ndr, r->in.client, 0);
15085 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.client));
15086 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.client));
15087 if (ndr_get_array_length(ndr, &r->in.client) > ndr_get_array_size(ndr, &r->in.client)) {
15088 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));
15090 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.client), sizeof(uint16_t)));
15091 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.client, ndr_get_array_length(ndr, &r->in.client), sizeof(uint16_t), CH_UTF16));
15092 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
15094 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
15095 if (_ptr_user) {
15096 NDR_PULL_ALLOC(ndr, r->in.user);
15097 } else {
15098 r->in.user = NULL;
15100 if (r->in.user) {
15101 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
15102 NDR_PULL_SET_MEM_CTX(ndr, r->in.user, 0);
15103 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.user));
15104 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.user));
15105 if (ndr_get_array_length(ndr, &r->in.user) > ndr_get_array_size(ndr, &r->in.user)) {
15106 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));
15108 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.user), sizeof(uint16_t)));
15109 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.user, ndr_get_array_length(ndr, &r->in.user), sizeof(uint16_t), CH_UTF16));
15110 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
15113 if (flags & NDR_OUT) {
15114 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15116 return NT_STATUS_OK;
15119 _PUBLIC_ void ndr_print_srvsvc_NetSessDel(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSessDel *r)
15121 ndr_print_struct(ndr, name, "srvsvc_NetSessDel");
15122 ndr->depth++;
15123 if (flags & NDR_SET_VALUES) {
15124 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15126 if (flags & NDR_IN) {
15127 ndr_print_struct(ndr, "in", "srvsvc_NetSessDel");
15128 ndr->depth++;
15129 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
15130 ndr->depth++;
15131 if (r->in.server_unc) {
15132 ndr_print_string(ndr, "server_unc", r->in.server_unc);
15134 ndr->depth--;
15135 ndr_print_ptr(ndr, "client", r->in.client);
15136 ndr->depth++;
15137 if (r->in.client) {
15138 ndr_print_string(ndr, "client", r->in.client);
15140 ndr->depth--;
15141 ndr_print_ptr(ndr, "user", r->in.user);
15142 ndr->depth++;
15143 if (r->in.user) {
15144 ndr_print_string(ndr, "user", r->in.user);
15146 ndr->depth--;
15147 ndr->depth--;
15149 if (flags & NDR_OUT) {
15150 ndr_print_struct(ndr, "out", "srvsvc_NetSessDel");
15151 ndr->depth++;
15152 ndr_print_WERROR(ndr, "result", r->out.result);
15153 ndr->depth--;
15155 ndr->depth--;
15158 NTSTATUS ndr_push_srvsvc_NetShareAdd(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareAdd *r)
15160 if (flags & NDR_IN) {
15161 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
15162 if (r->in.server_unc) {
15163 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15164 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
15165 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15166 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));
15168 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
15169 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.info, r->in.level));
15170 NDR_CHECK(ndr_push_srvsvc_NetShareInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
15171 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.parm_error));
15172 if (r->in.parm_error) {
15173 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.parm_error));
15176 if (flags & NDR_OUT) {
15177 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.parm_error));
15178 if (r->out.parm_error) {
15179 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.parm_error));
15181 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15183 return NT_STATUS_OK;
15186 NTSTATUS ndr_pull_srvsvc_NetShareAdd(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareAdd *r)
15188 uint32_t _ptr_server_unc;
15189 uint32_t _ptr_parm_error;
15190 TALLOC_CTX *_mem_save_server_unc_0;
15191 TALLOC_CTX *_mem_save_parm_error_0;
15192 if (flags & NDR_IN) {
15193 ZERO_STRUCT(r->out);
15195 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
15196 if (_ptr_server_unc) {
15197 NDR_PULL_ALLOC(ndr, r->in.server_unc);
15198 } else {
15199 r->in.server_unc = NULL;
15201 if (r->in.server_unc) {
15202 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
15203 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
15204 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
15205 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
15206 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
15207 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));
15209 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
15210 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));
15211 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
15213 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
15214 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.info, r->in.level));
15215 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
15216 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
15217 if (_ptr_parm_error) {
15218 NDR_PULL_ALLOC(ndr, r->in.parm_error);
15219 } else {
15220 r->in.parm_error = NULL;
15222 if (r->in.parm_error) {
15223 _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
15224 NDR_PULL_SET_MEM_CTX(ndr, r->in.parm_error, 0);
15225 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.parm_error));
15226 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
15229 if (flags & NDR_OUT) {
15230 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
15231 if (_ptr_parm_error) {
15232 NDR_PULL_ALLOC(ndr, r->out.parm_error);
15233 } else {
15234 r->out.parm_error = NULL;
15236 if (r->out.parm_error) {
15237 _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
15238 NDR_PULL_SET_MEM_CTX(ndr, r->out.parm_error, 0);
15239 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.parm_error));
15240 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
15242 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15244 return NT_STATUS_OK;
15247 _PUBLIC_ void ndr_print_srvsvc_NetShareAdd(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareAdd *r)
15249 ndr_print_struct(ndr, name, "srvsvc_NetShareAdd");
15250 ndr->depth++;
15251 if (flags & NDR_SET_VALUES) {
15252 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15254 if (flags & NDR_IN) {
15255 ndr_print_struct(ndr, "in", "srvsvc_NetShareAdd");
15256 ndr->depth++;
15257 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
15258 ndr->depth++;
15259 if (r->in.server_unc) {
15260 ndr_print_string(ndr, "server_unc", r->in.server_unc);
15262 ndr->depth--;
15263 ndr_print_uint32(ndr, "level", r->in.level);
15264 ndr_print_set_switch_value(ndr, &r->in.info, r->in.level);
15265 ndr_print_srvsvc_NetShareInfo(ndr, "info", &r->in.info);
15266 ndr_print_ptr(ndr, "parm_error", r->in.parm_error);
15267 ndr->depth++;
15268 if (r->in.parm_error) {
15269 ndr_print_uint32(ndr, "parm_error", *r->in.parm_error);
15271 ndr->depth--;
15272 ndr->depth--;
15274 if (flags & NDR_OUT) {
15275 ndr_print_struct(ndr, "out", "srvsvc_NetShareAdd");
15276 ndr->depth++;
15277 ndr_print_ptr(ndr, "parm_error", r->out.parm_error);
15278 ndr->depth++;
15279 if (r->out.parm_error) {
15280 ndr_print_uint32(ndr, "parm_error", *r->out.parm_error);
15282 ndr->depth--;
15283 ndr_print_WERROR(ndr, "result", r->out.result);
15284 ndr->depth--;
15286 ndr->depth--;
15289 NTSTATUS ndr_push_srvsvc_NetShareEnumAll(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareEnumAll *r)
15291 if (flags & NDR_IN) {
15292 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
15293 if (r->in.server_unc) {
15294 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15295 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
15296 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15297 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));
15299 if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
15300 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.level));
15301 if (r->in.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
15302 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.ctr, *r->in.level));
15303 NDR_CHECK(ndr_push_srvsvc_NetShareCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
15304 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
15305 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
15306 if (r->in.resume_handle) {
15307 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
15310 if (flags & NDR_OUT) {
15311 if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
15312 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level));
15313 if (r->out.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
15314 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ctr, *r->out.level));
15315 NDR_CHECK(ndr_push_srvsvc_NetShareCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
15316 if (r->out.totalentries == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
15317 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
15318 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
15319 if (r->out.resume_handle) {
15320 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
15322 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15324 return NT_STATUS_OK;
15327 NTSTATUS ndr_pull_srvsvc_NetShareEnumAll(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareEnumAll *r)
15329 uint32_t _ptr_server_unc;
15330 uint32_t _ptr_resume_handle;
15331 TALLOC_CTX *_mem_save_server_unc_0;
15332 TALLOC_CTX *_mem_save_level_0;
15333 TALLOC_CTX *_mem_save_ctr_0;
15334 TALLOC_CTX *_mem_save_totalentries_0;
15335 TALLOC_CTX *_mem_save_resume_handle_0;
15336 if (flags & NDR_IN) {
15337 ZERO_STRUCT(r->out);
15339 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
15340 if (_ptr_server_unc) {
15341 NDR_PULL_ALLOC(ndr, r->in.server_unc);
15342 } else {
15343 r->in.server_unc = NULL;
15345 if (r->in.server_unc) {
15346 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
15347 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
15348 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
15349 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
15350 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
15351 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));
15353 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
15354 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));
15355 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
15357 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15358 NDR_PULL_ALLOC(ndr, r->in.level);
15360 _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr);
15361 NDR_PULL_SET_MEM_CTX(ndr, r->in.level, LIBNDR_FLAG_REF_ALLOC);
15362 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.level));
15363 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC);
15364 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15365 NDR_PULL_ALLOC(ndr, r->in.ctr);
15367 _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
15368 NDR_PULL_SET_MEM_CTX(ndr, r->in.ctr, LIBNDR_FLAG_REF_ALLOC);
15369 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.ctr, *r->in.level));
15370 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
15371 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
15372 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
15373 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
15374 if (_ptr_resume_handle) {
15375 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
15376 } else {
15377 r->in.resume_handle = NULL;
15379 if (r->in.resume_handle) {
15380 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
15381 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
15382 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
15383 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
15385 NDR_PULL_ALLOC(ndr, r->out.level);
15386 *r->out.level = *r->in.level;
15387 NDR_PULL_ALLOC(ndr, r->out.ctr);
15388 *r->out.ctr = *r->in.ctr;
15389 NDR_PULL_ALLOC(ndr, r->out.totalentries);
15390 ZERO_STRUCTP(r->out.totalentries);
15392 if (flags & NDR_OUT) {
15393 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15394 NDR_PULL_ALLOC(ndr, r->out.level);
15396 _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr);
15397 NDR_PULL_SET_MEM_CTX(ndr, r->out.level, LIBNDR_FLAG_REF_ALLOC);
15398 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.level));
15399 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC);
15400 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15401 NDR_PULL_ALLOC(ndr, r->out.ctr);
15403 _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
15404 NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
15405 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ctr, *r->out.level));
15406 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
15407 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
15408 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15409 NDR_PULL_ALLOC(ndr, r->out.totalentries);
15411 _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
15412 NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
15413 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
15414 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
15415 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
15416 if (_ptr_resume_handle) {
15417 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
15418 } else {
15419 r->out.resume_handle = NULL;
15421 if (r->out.resume_handle) {
15422 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
15423 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
15424 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
15425 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
15427 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15429 return NT_STATUS_OK;
15432 _PUBLIC_ void ndr_print_srvsvc_NetShareEnumAll(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareEnumAll *r)
15434 ndr_print_struct(ndr, name, "srvsvc_NetShareEnumAll");
15435 ndr->depth++;
15436 if (flags & NDR_SET_VALUES) {
15437 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15439 if (flags & NDR_IN) {
15440 ndr_print_struct(ndr, "in", "srvsvc_NetShareEnumAll");
15441 ndr->depth++;
15442 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
15443 ndr->depth++;
15444 if (r->in.server_unc) {
15445 ndr_print_string(ndr, "server_unc", r->in.server_unc);
15447 ndr->depth--;
15448 ndr_print_ptr(ndr, "level", r->in.level);
15449 ndr->depth++;
15450 ndr_print_uint32(ndr, "level", *r->in.level);
15451 ndr->depth--;
15452 ndr_print_ptr(ndr, "ctr", r->in.ctr);
15453 ndr->depth++;
15454 ndr_print_set_switch_value(ndr, r->in.ctr, *r->in.level);
15455 ndr_print_srvsvc_NetShareCtr(ndr, "ctr", r->in.ctr);
15456 ndr->depth--;
15457 ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
15458 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
15459 ndr->depth++;
15460 if (r->in.resume_handle) {
15461 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
15463 ndr->depth--;
15464 ndr->depth--;
15466 if (flags & NDR_OUT) {
15467 ndr_print_struct(ndr, "out", "srvsvc_NetShareEnumAll");
15468 ndr->depth++;
15469 ndr_print_ptr(ndr, "level", r->out.level);
15470 ndr->depth++;
15471 ndr_print_uint32(ndr, "level", *r->out.level);
15472 ndr->depth--;
15473 ndr_print_ptr(ndr, "ctr", r->out.ctr);
15474 ndr->depth++;
15475 ndr_print_set_switch_value(ndr, r->out.ctr, *r->out.level);
15476 ndr_print_srvsvc_NetShareCtr(ndr, "ctr", r->out.ctr);
15477 ndr->depth--;
15478 ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
15479 ndr->depth++;
15480 ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
15481 ndr->depth--;
15482 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
15483 ndr->depth++;
15484 if (r->out.resume_handle) {
15485 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
15487 ndr->depth--;
15488 ndr_print_WERROR(ndr, "result", r->out.result);
15489 ndr->depth--;
15491 ndr->depth--;
15494 NTSTATUS ndr_push_srvsvc_NetShareGetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareGetInfo *r)
15496 if (flags & NDR_IN) {
15497 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
15498 if (r->in.server_unc) {
15499 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15500 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
15501 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15502 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));
15504 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
15505 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
15506 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
15507 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));
15508 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
15510 if (flags & NDR_OUT) {
15511 if (r->out.info == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
15512 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
15513 NDR_CHECK(ndr_push_srvsvc_NetShareInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
15514 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15516 return NT_STATUS_OK;
15519 NTSTATUS ndr_pull_srvsvc_NetShareGetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareGetInfo *r)
15521 uint32_t _ptr_server_unc;
15522 TALLOC_CTX *_mem_save_server_unc_0;
15523 TALLOC_CTX *_mem_save_info_0;
15524 if (flags & NDR_IN) {
15525 ZERO_STRUCT(r->out);
15527 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
15528 if (_ptr_server_unc) {
15529 NDR_PULL_ALLOC(ndr, r->in.server_unc);
15530 } else {
15531 r->in.server_unc = NULL;
15533 if (r->in.server_unc) {
15534 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
15535 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
15536 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
15537 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
15538 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
15539 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));
15541 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
15542 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));
15543 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
15545 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share_name));
15546 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share_name));
15547 if (ndr_get_array_length(ndr, &r->in.share_name) > ndr_get_array_size(ndr, &r->in.share_name)) {
15548 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));
15550 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.share_name), sizeof(uint16_t)));
15551 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));
15552 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
15553 NDR_PULL_ALLOC(ndr, r->out.info);
15554 ZERO_STRUCTP(r->out.info);
15556 if (flags & NDR_OUT) {
15557 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15558 NDR_PULL_ALLOC(ndr, r->out.info);
15560 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
15561 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
15562 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
15563 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
15564 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
15565 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15567 return NT_STATUS_OK;
15570 _PUBLIC_ void ndr_print_srvsvc_NetShareGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareGetInfo *r)
15572 ndr_print_struct(ndr, name, "srvsvc_NetShareGetInfo");
15573 ndr->depth++;
15574 if (flags & NDR_SET_VALUES) {
15575 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15577 if (flags & NDR_IN) {
15578 ndr_print_struct(ndr, "in", "srvsvc_NetShareGetInfo");
15579 ndr->depth++;
15580 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
15581 ndr->depth++;
15582 if (r->in.server_unc) {
15583 ndr_print_string(ndr, "server_unc", r->in.server_unc);
15585 ndr->depth--;
15586 ndr_print_string(ndr, "share_name", r->in.share_name);
15587 ndr_print_uint32(ndr, "level", r->in.level);
15588 ndr->depth--;
15590 if (flags & NDR_OUT) {
15591 ndr_print_struct(ndr, "out", "srvsvc_NetShareGetInfo");
15592 ndr->depth++;
15593 ndr_print_ptr(ndr, "info", r->out.info);
15594 ndr->depth++;
15595 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
15596 ndr_print_srvsvc_NetShareInfo(ndr, "info", r->out.info);
15597 ndr->depth--;
15598 ndr_print_WERROR(ndr, "result", r->out.result);
15599 ndr->depth--;
15601 ndr->depth--;
15604 NTSTATUS ndr_push_srvsvc_NetShareSetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareSetInfo *r)
15606 if (flags & NDR_IN) {
15607 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
15608 if (r->in.server_unc) {
15609 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15610 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
15611 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15612 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));
15614 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
15615 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
15616 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
15617 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));
15618 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
15619 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.info, r->in.level));
15620 NDR_CHECK(ndr_push_srvsvc_NetShareInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
15621 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.parm_error));
15622 if (r->in.parm_error) {
15623 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.parm_error));
15626 if (flags & NDR_OUT) {
15627 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.parm_error));
15628 if (r->out.parm_error) {
15629 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.parm_error));
15631 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15633 return NT_STATUS_OK;
15636 NTSTATUS ndr_pull_srvsvc_NetShareSetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareSetInfo *r)
15638 uint32_t _ptr_server_unc;
15639 uint32_t _ptr_parm_error;
15640 TALLOC_CTX *_mem_save_server_unc_0;
15641 TALLOC_CTX *_mem_save_parm_error_0;
15642 if (flags & NDR_IN) {
15643 ZERO_STRUCT(r->out);
15645 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
15646 if (_ptr_server_unc) {
15647 NDR_PULL_ALLOC(ndr, r->in.server_unc);
15648 } else {
15649 r->in.server_unc = NULL;
15651 if (r->in.server_unc) {
15652 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
15653 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
15654 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
15655 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
15656 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
15657 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));
15659 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
15660 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));
15661 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
15663 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share_name));
15664 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share_name));
15665 if (ndr_get_array_length(ndr, &r->in.share_name) > ndr_get_array_size(ndr, &r->in.share_name)) {
15666 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));
15668 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.share_name), sizeof(uint16_t)));
15669 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));
15670 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
15671 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.info, r->in.level));
15672 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
15673 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
15674 if (_ptr_parm_error) {
15675 NDR_PULL_ALLOC(ndr, r->in.parm_error);
15676 } else {
15677 r->in.parm_error = NULL;
15679 if (r->in.parm_error) {
15680 _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
15681 NDR_PULL_SET_MEM_CTX(ndr, r->in.parm_error, 0);
15682 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.parm_error));
15683 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
15686 if (flags & NDR_OUT) {
15687 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
15688 if (_ptr_parm_error) {
15689 NDR_PULL_ALLOC(ndr, r->out.parm_error);
15690 } else {
15691 r->out.parm_error = NULL;
15693 if (r->out.parm_error) {
15694 _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
15695 NDR_PULL_SET_MEM_CTX(ndr, r->out.parm_error, 0);
15696 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.parm_error));
15697 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
15699 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15701 return NT_STATUS_OK;
15704 _PUBLIC_ void ndr_print_srvsvc_NetShareSetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareSetInfo *r)
15706 ndr_print_struct(ndr, name, "srvsvc_NetShareSetInfo");
15707 ndr->depth++;
15708 if (flags & NDR_SET_VALUES) {
15709 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15711 if (flags & NDR_IN) {
15712 ndr_print_struct(ndr, "in", "srvsvc_NetShareSetInfo");
15713 ndr->depth++;
15714 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
15715 ndr->depth++;
15716 if (r->in.server_unc) {
15717 ndr_print_string(ndr, "server_unc", r->in.server_unc);
15719 ndr->depth--;
15720 ndr_print_string(ndr, "share_name", r->in.share_name);
15721 ndr_print_uint32(ndr, "level", r->in.level);
15722 ndr_print_set_switch_value(ndr, &r->in.info, r->in.level);
15723 ndr_print_srvsvc_NetShareInfo(ndr, "info", &r->in.info);
15724 ndr_print_ptr(ndr, "parm_error", r->in.parm_error);
15725 ndr->depth++;
15726 if (r->in.parm_error) {
15727 ndr_print_uint32(ndr, "parm_error", *r->in.parm_error);
15729 ndr->depth--;
15730 ndr->depth--;
15732 if (flags & NDR_OUT) {
15733 ndr_print_struct(ndr, "out", "srvsvc_NetShareSetInfo");
15734 ndr->depth++;
15735 ndr_print_ptr(ndr, "parm_error", r->out.parm_error);
15736 ndr->depth++;
15737 if (r->out.parm_error) {
15738 ndr_print_uint32(ndr, "parm_error", *r->out.parm_error);
15740 ndr->depth--;
15741 ndr_print_WERROR(ndr, "result", r->out.result);
15742 ndr->depth--;
15744 ndr->depth--;
15747 NTSTATUS ndr_push_srvsvc_NetShareDel(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareDel *r)
15749 if (flags & NDR_IN) {
15750 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
15751 if (r->in.server_unc) {
15752 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15753 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
15754 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15755 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));
15757 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
15758 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
15759 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
15760 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));
15761 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.reserved));
15763 if (flags & NDR_OUT) {
15764 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15766 return NT_STATUS_OK;
15769 NTSTATUS ndr_pull_srvsvc_NetShareDel(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareDel *r)
15771 uint32_t _ptr_server_unc;
15772 TALLOC_CTX *_mem_save_server_unc_0;
15773 if (flags & NDR_IN) {
15774 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
15775 if (_ptr_server_unc) {
15776 NDR_PULL_ALLOC(ndr, r->in.server_unc);
15777 } else {
15778 r->in.server_unc = NULL;
15780 if (r->in.server_unc) {
15781 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
15782 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
15783 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
15784 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
15785 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
15786 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));
15788 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
15789 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));
15790 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
15792 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share_name));
15793 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share_name));
15794 if (ndr_get_array_length(ndr, &r->in.share_name) > ndr_get_array_size(ndr, &r->in.share_name)) {
15795 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));
15797 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.share_name), sizeof(uint16_t)));
15798 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));
15799 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.reserved));
15801 if (flags & NDR_OUT) {
15802 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15804 return NT_STATUS_OK;
15807 _PUBLIC_ void ndr_print_srvsvc_NetShareDel(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareDel *r)
15809 ndr_print_struct(ndr, name, "srvsvc_NetShareDel");
15810 ndr->depth++;
15811 if (flags & NDR_SET_VALUES) {
15812 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15814 if (flags & NDR_IN) {
15815 ndr_print_struct(ndr, "in", "srvsvc_NetShareDel");
15816 ndr->depth++;
15817 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
15818 ndr->depth++;
15819 if (r->in.server_unc) {
15820 ndr_print_string(ndr, "server_unc", r->in.server_unc);
15822 ndr->depth--;
15823 ndr_print_string(ndr, "share_name", r->in.share_name);
15824 ndr_print_uint32(ndr, "reserved", r->in.reserved);
15825 ndr->depth--;
15827 if (flags & NDR_OUT) {
15828 ndr_print_struct(ndr, "out", "srvsvc_NetShareDel");
15829 ndr->depth++;
15830 ndr_print_WERROR(ndr, "result", r->out.result);
15831 ndr->depth--;
15833 ndr->depth--;
15836 NTSTATUS ndr_push_srvsvc_NetShareDelSticky(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareDelSticky *r)
15838 if (flags & NDR_IN) {
15839 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
15840 if (r->in.server_unc) {
15841 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15842 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
15843 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15844 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));
15846 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
15847 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
15848 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
15849 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));
15850 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.reserved));
15852 if (flags & NDR_OUT) {
15853 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15855 return NT_STATUS_OK;
15858 NTSTATUS ndr_pull_srvsvc_NetShareDelSticky(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareDelSticky *r)
15860 uint32_t _ptr_server_unc;
15861 TALLOC_CTX *_mem_save_server_unc_0;
15862 if (flags & NDR_IN) {
15863 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
15864 if (_ptr_server_unc) {
15865 NDR_PULL_ALLOC(ndr, r->in.server_unc);
15866 } else {
15867 r->in.server_unc = NULL;
15869 if (r->in.server_unc) {
15870 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
15871 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
15872 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
15873 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
15874 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
15875 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));
15877 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
15878 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));
15879 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
15881 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share_name));
15882 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share_name));
15883 if (ndr_get_array_length(ndr, &r->in.share_name) > ndr_get_array_size(ndr, &r->in.share_name)) {
15884 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));
15886 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.share_name), sizeof(uint16_t)));
15887 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));
15888 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.reserved));
15890 if (flags & NDR_OUT) {
15891 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15893 return NT_STATUS_OK;
15896 _PUBLIC_ void ndr_print_srvsvc_NetShareDelSticky(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareDelSticky *r)
15898 ndr_print_struct(ndr, name, "srvsvc_NetShareDelSticky");
15899 ndr->depth++;
15900 if (flags & NDR_SET_VALUES) {
15901 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15903 if (flags & NDR_IN) {
15904 ndr_print_struct(ndr, "in", "srvsvc_NetShareDelSticky");
15905 ndr->depth++;
15906 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
15907 ndr->depth++;
15908 if (r->in.server_unc) {
15909 ndr_print_string(ndr, "server_unc", r->in.server_unc);
15911 ndr->depth--;
15912 ndr_print_string(ndr, "share_name", r->in.share_name);
15913 ndr_print_uint32(ndr, "reserved", r->in.reserved);
15914 ndr->depth--;
15916 if (flags & NDR_OUT) {
15917 ndr_print_struct(ndr, "out", "srvsvc_NetShareDelSticky");
15918 ndr->depth++;
15919 ndr_print_WERROR(ndr, "result", r->out.result);
15920 ndr->depth--;
15922 ndr->depth--;
15925 NTSTATUS ndr_push_srvsvc_NetShareCheck(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareCheck *r)
15927 if (flags & NDR_IN) {
15928 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
15929 if (r->in.server_unc) {
15930 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15931 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
15932 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15933 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));
15935 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.device_name, CH_UTF16)));
15936 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
15937 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.device_name, CH_UTF16)));
15938 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));
15940 if (flags & NDR_OUT) {
15941 if (r->out.type == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
15942 NDR_CHECK(ndr_push_srvsvc_ShareType(ndr, NDR_SCALARS, *r->out.type));
15943 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15945 return NT_STATUS_OK;
15948 NTSTATUS ndr_pull_srvsvc_NetShareCheck(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareCheck *r)
15950 uint32_t _ptr_server_unc;
15951 TALLOC_CTX *_mem_save_server_unc_0;
15952 TALLOC_CTX *_mem_save_type_0;
15953 if (flags & NDR_IN) {
15954 ZERO_STRUCT(r->out);
15956 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
15957 if (_ptr_server_unc) {
15958 NDR_PULL_ALLOC(ndr, r->in.server_unc);
15959 } else {
15960 r->in.server_unc = NULL;
15962 if (r->in.server_unc) {
15963 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
15964 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
15965 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
15966 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
15967 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
15968 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));
15970 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
15971 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));
15972 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
15974 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.device_name));
15975 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.device_name));
15976 if (ndr_get_array_length(ndr, &r->in.device_name) > ndr_get_array_size(ndr, &r->in.device_name)) {
15977 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));
15979 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.device_name), sizeof(uint16_t)));
15980 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));
15981 NDR_PULL_ALLOC(ndr, r->out.type);
15982 ZERO_STRUCTP(r->out.type);
15984 if (flags & NDR_OUT) {
15985 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15986 NDR_PULL_ALLOC(ndr, r->out.type);
15988 _mem_save_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
15989 NDR_PULL_SET_MEM_CTX(ndr, r->out.type, LIBNDR_FLAG_REF_ALLOC);
15990 NDR_CHECK(ndr_pull_srvsvc_ShareType(ndr, NDR_SCALARS, r->out.type));
15991 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_type_0, LIBNDR_FLAG_REF_ALLOC);
15992 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15994 return NT_STATUS_OK;
15997 _PUBLIC_ void ndr_print_srvsvc_NetShareCheck(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareCheck *r)
15999 ndr_print_struct(ndr, name, "srvsvc_NetShareCheck");
16000 ndr->depth++;
16001 if (flags & NDR_SET_VALUES) {
16002 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16004 if (flags & NDR_IN) {
16005 ndr_print_struct(ndr, "in", "srvsvc_NetShareCheck");
16006 ndr->depth++;
16007 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
16008 ndr->depth++;
16009 if (r->in.server_unc) {
16010 ndr_print_string(ndr, "server_unc", r->in.server_unc);
16012 ndr->depth--;
16013 ndr_print_string(ndr, "device_name", r->in.device_name);
16014 ndr->depth--;
16016 if (flags & NDR_OUT) {
16017 ndr_print_struct(ndr, "out", "srvsvc_NetShareCheck");
16018 ndr->depth++;
16019 ndr_print_ptr(ndr, "type", r->out.type);
16020 ndr->depth++;
16021 ndr_print_srvsvc_ShareType(ndr, "type", *r->out.type);
16022 ndr->depth--;
16023 ndr_print_WERROR(ndr, "result", r->out.result);
16024 ndr->depth--;
16026 ndr->depth--;
16029 NTSTATUS ndr_push_srvsvc_NetSrvGetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetSrvGetInfo *r)
16031 if (flags & NDR_IN) {
16032 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
16033 if (r->in.server_unc) {
16034 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16035 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
16036 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16037 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));
16039 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
16041 if (flags & NDR_OUT) {
16042 if (r->out.info == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
16043 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
16044 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
16045 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16047 return NT_STATUS_OK;
16050 NTSTATUS ndr_pull_srvsvc_NetSrvGetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetSrvGetInfo *r)
16052 uint32_t _ptr_server_unc;
16053 TALLOC_CTX *_mem_save_server_unc_0;
16054 TALLOC_CTX *_mem_save_info_0;
16055 if (flags & NDR_IN) {
16056 ZERO_STRUCT(r->out);
16058 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
16059 if (_ptr_server_unc) {
16060 NDR_PULL_ALLOC(ndr, r->in.server_unc);
16061 } else {
16062 r->in.server_unc = NULL;
16064 if (r->in.server_unc) {
16065 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
16066 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
16067 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
16068 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
16069 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
16070 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));
16072 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
16073 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));
16074 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
16076 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
16077 NDR_PULL_ALLOC(ndr, r->out.info);
16078 ZERO_STRUCTP(r->out.info);
16080 if (flags & NDR_OUT) {
16081 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16082 NDR_PULL_ALLOC(ndr, r->out.info);
16084 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
16085 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
16086 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
16087 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
16088 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
16089 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16091 return NT_STATUS_OK;
16094 _PUBLIC_ void ndr_print_srvsvc_NetSrvGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSrvGetInfo *r)
16096 ndr_print_struct(ndr, name, "srvsvc_NetSrvGetInfo");
16097 ndr->depth++;
16098 if (flags & NDR_SET_VALUES) {
16099 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16101 if (flags & NDR_IN) {
16102 ndr_print_struct(ndr, "in", "srvsvc_NetSrvGetInfo");
16103 ndr->depth++;
16104 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
16105 ndr->depth++;
16106 if (r->in.server_unc) {
16107 ndr_print_string(ndr, "server_unc", r->in.server_unc);
16109 ndr->depth--;
16110 ndr_print_uint32(ndr, "level", r->in.level);
16111 ndr->depth--;
16113 if (flags & NDR_OUT) {
16114 ndr_print_struct(ndr, "out", "srvsvc_NetSrvGetInfo");
16115 ndr->depth++;
16116 ndr_print_ptr(ndr, "info", r->out.info);
16117 ndr->depth++;
16118 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
16119 ndr_print_srvsvc_NetSrvInfo(ndr, "info", r->out.info);
16120 ndr->depth--;
16121 ndr_print_WERROR(ndr, "result", r->out.result);
16122 ndr->depth--;
16124 ndr->depth--;
16127 NTSTATUS ndr_push_srvsvc_NetSrvSetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetSrvSetInfo *r)
16129 if (flags & NDR_IN) {
16130 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
16131 if (r->in.server_unc) {
16132 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16133 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
16134 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16135 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));
16137 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
16138 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.info, r->in.level));
16139 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
16140 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.parm_error));
16141 if (r->in.parm_error) {
16142 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.parm_error));
16145 if (flags & NDR_OUT) {
16146 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.parm_error));
16147 if (r->out.parm_error) {
16148 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.parm_error));
16150 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16152 return NT_STATUS_OK;
16155 NTSTATUS ndr_pull_srvsvc_NetSrvSetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetSrvSetInfo *r)
16157 uint32_t _ptr_server_unc;
16158 uint32_t _ptr_parm_error;
16159 TALLOC_CTX *_mem_save_server_unc_0;
16160 TALLOC_CTX *_mem_save_parm_error_0;
16161 if (flags & NDR_IN) {
16162 ZERO_STRUCT(r->out);
16164 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
16165 if (_ptr_server_unc) {
16166 NDR_PULL_ALLOC(ndr, r->in.server_unc);
16167 } else {
16168 r->in.server_unc = NULL;
16170 if (r->in.server_unc) {
16171 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
16172 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
16173 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
16174 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
16175 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
16176 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));
16178 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
16179 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));
16180 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
16182 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
16183 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.info, r->in.level));
16184 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
16185 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
16186 if (_ptr_parm_error) {
16187 NDR_PULL_ALLOC(ndr, r->in.parm_error);
16188 } else {
16189 r->in.parm_error = NULL;
16191 if (r->in.parm_error) {
16192 _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
16193 NDR_PULL_SET_MEM_CTX(ndr, r->in.parm_error, 0);
16194 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.parm_error));
16195 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
16198 if (flags & NDR_OUT) {
16199 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
16200 if (_ptr_parm_error) {
16201 NDR_PULL_ALLOC(ndr, r->out.parm_error);
16202 } else {
16203 r->out.parm_error = NULL;
16205 if (r->out.parm_error) {
16206 _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
16207 NDR_PULL_SET_MEM_CTX(ndr, r->out.parm_error, 0);
16208 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.parm_error));
16209 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
16211 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16213 return NT_STATUS_OK;
16216 _PUBLIC_ void ndr_print_srvsvc_NetSrvSetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSrvSetInfo *r)
16218 ndr_print_struct(ndr, name, "srvsvc_NetSrvSetInfo");
16219 ndr->depth++;
16220 if (flags & NDR_SET_VALUES) {
16221 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16223 if (flags & NDR_IN) {
16224 ndr_print_struct(ndr, "in", "srvsvc_NetSrvSetInfo");
16225 ndr->depth++;
16226 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
16227 ndr->depth++;
16228 if (r->in.server_unc) {
16229 ndr_print_string(ndr, "server_unc", r->in.server_unc);
16231 ndr->depth--;
16232 ndr_print_uint32(ndr, "level", r->in.level);
16233 ndr_print_set_switch_value(ndr, &r->in.info, r->in.level);
16234 ndr_print_srvsvc_NetSrvInfo(ndr, "info", &r->in.info);
16235 ndr_print_ptr(ndr, "parm_error", r->in.parm_error);
16236 ndr->depth++;
16237 if (r->in.parm_error) {
16238 ndr_print_uint32(ndr, "parm_error", *r->in.parm_error);
16240 ndr->depth--;
16241 ndr->depth--;
16243 if (flags & NDR_OUT) {
16244 ndr_print_struct(ndr, "out", "srvsvc_NetSrvSetInfo");
16245 ndr->depth++;
16246 ndr_print_ptr(ndr, "parm_error", r->out.parm_error);
16247 ndr->depth++;
16248 if (r->out.parm_error) {
16249 ndr_print_uint32(ndr, "parm_error", *r->out.parm_error);
16251 ndr->depth--;
16252 ndr_print_WERROR(ndr, "result", r->out.result);
16253 ndr->depth--;
16255 ndr->depth--;
16258 NTSTATUS ndr_push_srvsvc_NetDiskEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetDiskEnum *r)
16260 if (flags & NDR_IN) {
16261 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
16262 if (r->in.server_unc) {
16263 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16264 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
16265 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16266 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));
16268 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
16269 if (r->in.info == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
16270 NDR_CHECK(ndr_push_srvsvc_NetDiskInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
16271 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.maxlen));
16272 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
16273 if (r->in.resume_handle) {
16274 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
16277 if (flags & NDR_OUT) {
16278 if (r->out.info == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
16279 NDR_CHECK(ndr_push_srvsvc_NetDiskInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
16280 if (r->out.totalentries == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
16281 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
16282 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
16283 if (r->out.resume_handle) {
16284 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
16286 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16288 return NT_STATUS_OK;
16291 NTSTATUS ndr_pull_srvsvc_NetDiskEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetDiskEnum *r)
16293 uint32_t _ptr_server_unc;
16294 uint32_t _ptr_resume_handle;
16295 TALLOC_CTX *_mem_save_server_unc_0;
16296 TALLOC_CTX *_mem_save_info_0;
16297 TALLOC_CTX *_mem_save_totalentries_0;
16298 TALLOC_CTX *_mem_save_resume_handle_0;
16299 if (flags & NDR_IN) {
16300 ZERO_STRUCT(r->out);
16302 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
16303 if (_ptr_server_unc) {
16304 NDR_PULL_ALLOC(ndr, r->in.server_unc);
16305 } else {
16306 r->in.server_unc = NULL;
16308 if (r->in.server_unc) {
16309 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
16310 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
16311 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
16312 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
16313 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
16314 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));
16316 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
16317 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));
16318 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
16320 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
16321 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16322 NDR_PULL_ALLOC(ndr, r->in.info);
16324 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
16325 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
16326 NDR_CHECK(ndr_pull_srvsvc_NetDiskInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
16327 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
16328 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.maxlen));
16329 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
16330 if (_ptr_resume_handle) {
16331 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
16332 } else {
16333 r->in.resume_handle = NULL;
16335 if (r->in.resume_handle) {
16336 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
16337 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
16338 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
16339 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
16341 NDR_PULL_ALLOC(ndr, r->out.info);
16342 *r->out.info = *r->in.info;
16343 NDR_PULL_ALLOC(ndr, r->out.totalentries);
16344 ZERO_STRUCTP(r->out.totalentries);
16346 if (flags & NDR_OUT) {
16347 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16348 NDR_PULL_ALLOC(ndr, r->out.info);
16350 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
16351 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
16352 NDR_CHECK(ndr_pull_srvsvc_NetDiskInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
16353 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
16354 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16355 NDR_PULL_ALLOC(ndr, r->out.totalentries);
16357 _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
16358 NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
16359 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
16360 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
16361 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
16362 if (_ptr_resume_handle) {
16363 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
16364 } else {
16365 r->out.resume_handle = NULL;
16367 if (r->out.resume_handle) {
16368 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
16369 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
16370 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
16371 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
16373 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16375 return NT_STATUS_OK;
16378 _PUBLIC_ void ndr_print_srvsvc_NetDiskEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetDiskEnum *r)
16380 ndr_print_struct(ndr, name, "srvsvc_NetDiskEnum");
16381 ndr->depth++;
16382 if (flags & NDR_SET_VALUES) {
16383 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16385 if (flags & NDR_IN) {
16386 ndr_print_struct(ndr, "in", "srvsvc_NetDiskEnum");
16387 ndr->depth++;
16388 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
16389 ndr->depth++;
16390 if (r->in.server_unc) {
16391 ndr_print_string(ndr, "server_unc", r->in.server_unc);
16393 ndr->depth--;
16394 ndr_print_uint32(ndr, "level", r->in.level);
16395 ndr_print_ptr(ndr, "info", r->in.info);
16396 ndr->depth++;
16397 ndr_print_srvsvc_NetDiskInfo(ndr, "info", r->in.info);
16398 ndr->depth--;
16399 ndr_print_uint32(ndr, "maxlen", r->in.maxlen);
16400 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
16401 ndr->depth++;
16402 if (r->in.resume_handle) {
16403 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
16405 ndr->depth--;
16406 ndr->depth--;
16408 if (flags & NDR_OUT) {
16409 ndr_print_struct(ndr, "out", "srvsvc_NetDiskEnum");
16410 ndr->depth++;
16411 ndr_print_ptr(ndr, "info", r->out.info);
16412 ndr->depth++;
16413 ndr_print_srvsvc_NetDiskInfo(ndr, "info", r->out.info);
16414 ndr->depth--;
16415 ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
16416 ndr->depth++;
16417 ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
16418 ndr->depth--;
16419 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
16420 ndr->depth++;
16421 if (r->out.resume_handle) {
16422 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
16424 ndr->depth--;
16425 ndr_print_WERROR(ndr, "result", r->out.result);
16426 ndr->depth--;
16428 ndr->depth--;
16431 NTSTATUS ndr_push_srvsvc_NetServerStatisticsGet(struct ndr_push *ndr, int flags, const struct srvsvc_NetServerStatisticsGet *r)
16433 if (flags & NDR_IN) {
16434 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
16435 if (r->in.server_unc) {
16436 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16437 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
16438 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16439 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));
16441 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service));
16442 if (r->in.service) {
16443 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.service, CH_UTF16)));
16444 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
16445 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.service, CH_UTF16)));
16446 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.service, ndr_charset_length(r->in.service, CH_UTF16), sizeof(uint16_t), CH_UTF16));
16448 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
16449 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.options));
16451 if (flags & NDR_OUT) {
16452 if (r->out.stats == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
16453 NDR_CHECK(ndr_push_srvsvc_Statistics(ndr, NDR_SCALARS, r->out.stats));
16454 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16456 return NT_STATUS_OK;
16459 NTSTATUS ndr_pull_srvsvc_NetServerStatisticsGet(struct ndr_pull *ndr, int flags, struct srvsvc_NetServerStatisticsGet *r)
16461 uint32_t _ptr_server_unc;
16462 uint32_t _ptr_service;
16463 TALLOC_CTX *_mem_save_server_unc_0;
16464 TALLOC_CTX *_mem_save_service_0;
16465 TALLOC_CTX *_mem_save_stats_0;
16466 if (flags & NDR_IN) {
16467 ZERO_STRUCT(r->out);
16469 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
16470 if (_ptr_server_unc) {
16471 NDR_PULL_ALLOC(ndr, r->in.server_unc);
16472 } else {
16473 r->in.server_unc = NULL;
16475 if (r->in.server_unc) {
16476 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
16477 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
16478 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
16479 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
16480 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
16481 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));
16483 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
16484 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));
16485 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
16487 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service));
16488 if (_ptr_service) {
16489 NDR_PULL_ALLOC(ndr, r->in.service);
16490 } else {
16491 r->in.service = NULL;
16493 if (r->in.service) {
16494 _mem_save_service_0 = NDR_PULL_GET_MEM_CTX(ndr);
16495 NDR_PULL_SET_MEM_CTX(ndr, r->in.service, 0);
16496 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service));
16497 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service));
16498 if (ndr_get_array_length(ndr, &r->in.service) > ndr_get_array_size(ndr, &r->in.service)) {
16499 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));
16501 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.service), sizeof(uint16_t)));
16502 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.service, ndr_get_array_length(ndr, &r->in.service), sizeof(uint16_t), CH_UTF16));
16503 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_0, 0);
16505 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
16506 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.options));
16507 NDR_PULL_ALLOC(ndr, r->out.stats);
16508 ZERO_STRUCTP(r->out.stats);
16510 if (flags & NDR_OUT) {
16511 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16512 NDR_PULL_ALLOC(ndr, r->out.stats);
16514 _mem_save_stats_0 = NDR_PULL_GET_MEM_CTX(ndr);
16515 NDR_PULL_SET_MEM_CTX(ndr, r->out.stats, LIBNDR_FLAG_REF_ALLOC);
16516 NDR_CHECK(ndr_pull_srvsvc_Statistics(ndr, NDR_SCALARS, r->out.stats));
16517 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stats_0, LIBNDR_FLAG_REF_ALLOC);
16518 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16520 return NT_STATUS_OK;
16523 _PUBLIC_ void ndr_print_srvsvc_NetServerStatisticsGet(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetServerStatisticsGet *r)
16525 ndr_print_struct(ndr, name, "srvsvc_NetServerStatisticsGet");
16526 ndr->depth++;
16527 if (flags & NDR_SET_VALUES) {
16528 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16530 if (flags & NDR_IN) {
16531 ndr_print_struct(ndr, "in", "srvsvc_NetServerStatisticsGet");
16532 ndr->depth++;
16533 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
16534 ndr->depth++;
16535 if (r->in.server_unc) {
16536 ndr_print_string(ndr, "server_unc", r->in.server_unc);
16538 ndr->depth--;
16539 ndr_print_ptr(ndr, "service", r->in.service);
16540 ndr->depth++;
16541 if (r->in.service) {
16542 ndr_print_string(ndr, "service", r->in.service);
16544 ndr->depth--;
16545 ndr_print_uint32(ndr, "level", r->in.level);
16546 ndr_print_uint32(ndr, "options", r->in.options);
16547 ndr->depth--;
16549 if (flags & NDR_OUT) {
16550 ndr_print_struct(ndr, "out", "srvsvc_NetServerStatisticsGet");
16551 ndr->depth++;
16552 ndr_print_ptr(ndr, "stats", r->out.stats);
16553 ndr->depth++;
16554 ndr_print_srvsvc_Statistics(ndr, "stats", r->out.stats);
16555 ndr->depth--;
16556 ndr_print_WERROR(ndr, "result", r->out.result);
16557 ndr->depth--;
16559 ndr->depth--;
16562 NTSTATUS ndr_push_srvsvc_NetTransportAdd(struct ndr_push *ndr, int flags, const struct srvsvc_NetTransportAdd *r)
16564 if (flags & NDR_IN) {
16565 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
16566 if (r->in.server_unc) {
16567 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16568 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
16569 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16570 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));
16572 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
16573 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.info, r->in.level));
16574 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
16576 if (flags & NDR_OUT) {
16577 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16579 return NT_STATUS_OK;
16582 NTSTATUS ndr_pull_srvsvc_NetTransportAdd(struct ndr_pull *ndr, int flags, struct srvsvc_NetTransportAdd *r)
16584 uint32_t _ptr_server_unc;
16585 TALLOC_CTX *_mem_save_server_unc_0;
16586 if (flags & NDR_IN) {
16587 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
16588 if (_ptr_server_unc) {
16589 NDR_PULL_ALLOC(ndr, r->in.server_unc);
16590 } else {
16591 r->in.server_unc = NULL;
16593 if (r->in.server_unc) {
16594 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
16595 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
16596 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
16597 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
16598 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
16599 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));
16601 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
16602 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));
16603 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
16605 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
16606 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.info, r->in.level));
16607 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
16609 if (flags & NDR_OUT) {
16610 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16612 return NT_STATUS_OK;
16615 _PUBLIC_ void ndr_print_srvsvc_NetTransportAdd(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetTransportAdd *r)
16617 ndr_print_struct(ndr, name, "srvsvc_NetTransportAdd");
16618 ndr->depth++;
16619 if (flags & NDR_SET_VALUES) {
16620 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16622 if (flags & NDR_IN) {
16623 ndr_print_struct(ndr, "in", "srvsvc_NetTransportAdd");
16624 ndr->depth++;
16625 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
16626 ndr->depth++;
16627 if (r->in.server_unc) {
16628 ndr_print_string(ndr, "server_unc", r->in.server_unc);
16630 ndr->depth--;
16631 ndr_print_uint32(ndr, "level", r->in.level);
16632 ndr_print_set_switch_value(ndr, &r->in.info, r->in.level);
16633 ndr_print_srvsvc_NetTransportInfo(ndr, "info", &r->in.info);
16634 ndr->depth--;
16636 if (flags & NDR_OUT) {
16637 ndr_print_struct(ndr, "out", "srvsvc_NetTransportAdd");
16638 ndr->depth++;
16639 ndr_print_WERROR(ndr, "result", r->out.result);
16640 ndr->depth--;
16642 ndr->depth--;
16645 NTSTATUS ndr_push_srvsvc_NetTransportEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetTransportEnum *r)
16647 if (flags & NDR_IN) {
16648 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
16649 if (r->in.server_unc) {
16650 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16651 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
16652 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16653 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));
16655 if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
16656 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.level));
16657 if (r->in.transports == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
16658 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.transports, *r->in.level));
16659 NDR_CHECK(ndr_push_srvsvc_NetTransportCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.transports));
16660 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
16661 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
16662 if (r->in.resume_handle) {
16663 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
16666 if (flags & NDR_OUT) {
16667 if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
16668 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level));
16669 if (r->out.transports == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
16670 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.transports, *r->out.level));
16671 NDR_CHECK(ndr_push_srvsvc_NetTransportCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.transports));
16672 if (r->out.totalentries == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
16673 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
16674 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
16675 if (r->out.resume_handle) {
16676 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
16678 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16680 return NT_STATUS_OK;
16683 NTSTATUS ndr_pull_srvsvc_NetTransportEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetTransportEnum *r)
16685 uint32_t _ptr_server_unc;
16686 uint32_t _ptr_resume_handle;
16687 TALLOC_CTX *_mem_save_server_unc_0;
16688 TALLOC_CTX *_mem_save_level_0;
16689 TALLOC_CTX *_mem_save_transports_0;
16690 TALLOC_CTX *_mem_save_totalentries_0;
16691 TALLOC_CTX *_mem_save_resume_handle_0;
16692 if (flags & NDR_IN) {
16693 ZERO_STRUCT(r->out);
16695 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
16696 if (_ptr_server_unc) {
16697 NDR_PULL_ALLOC(ndr, r->in.server_unc);
16698 } else {
16699 r->in.server_unc = NULL;
16701 if (r->in.server_unc) {
16702 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
16703 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
16704 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
16705 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
16706 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
16707 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));
16709 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
16710 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));
16711 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
16713 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16714 NDR_PULL_ALLOC(ndr, r->in.level);
16716 _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr);
16717 NDR_PULL_SET_MEM_CTX(ndr, r->in.level, LIBNDR_FLAG_REF_ALLOC);
16718 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.level));
16719 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC);
16720 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16721 NDR_PULL_ALLOC(ndr, r->in.transports);
16723 _mem_save_transports_0 = NDR_PULL_GET_MEM_CTX(ndr);
16724 NDR_PULL_SET_MEM_CTX(ndr, r->in.transports, LIBNDR_FLAG_REF_ALLOC);
16725 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.transports, *r->in.level));
16726 NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.transports));
16727 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_transports_0, LIBNDR_FLAG_REF_ALLOC);
16728 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
16729 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
16730 if (_ptr_resume_handle) {
16731 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
16732 } else {
16733 r->in.resume_handle = NULL;
16735 if (r->in.resume_handle) {
16736 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
16737 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
16738 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
16739 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
16741 NDR_PULL_ALLOC(ndr, r->out.level);
16742 *r->out.level = *r->in.level;
16743 NDR_PULL_ALLOC(ndr, r->out.transports);
16744 *r->out.transports = *r->in.transports;
16745 NDR_PULL_ALLOC(ndr, r->out.totalentries);
16746 ZERO_STRUCTP(r->out.totalentries);
16748 if (flags & NDR_OUT) {
16749 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16750 NDR_PULL_ALLOC(ndr, r->out.level);
16752 _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr);
16753 NDR_PULL_SET_MEM_CTX(ndr, r->out.level, LIBNDR_FLAG_REF_ALLOC);
16754 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.level));
16755 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC);
16756 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16757 NDR_PULL_ALLOC(ndr, r->out.transports);
16759 _mem_save_transports_0 = NDR_PULL_GET_MEM_CTX(ndr);
16760 NDR_PULL_SET_MEM_CTX(ndr, r->out.transports, LIBNDR_FLAG_REF_ALLOC);
16761 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.transports, *r->out.level));
16762 NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.transports));
16763 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_transports_0, LIBNDR_FLAG_REF_ALLOC);
16764 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16765 NDR_PULL_ALLOC(ndr, r->out.totalentries);
16767 _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
16768 NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
16769 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
16770 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
16771 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
16772 if (_ptr_resume_handle) {
16773 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
16774 } else {
16775 r->out.resume_handle = NULL;
16777 if (r->out.resume_handle) {
16778 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
16779 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
16780 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
16781 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
16783 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16785 return NT_STATUS_OK;
16788 _PUBLIC_ void ndr_print_srvsvc_NetTransportEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetTransportEnum *r)
16790 ndr_print_struct(ndr, name, "srvsvc_NetTransportEnum");
16791 ndr->depth++;
16792 if (flags & NDR_SET_VALUES) {
16793 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16795 if (flags & NDR_IN) {
16796 ndr_print_struct(ndr, "in", "srvsvc_NetTransportEnum");
16797 ndr->depth++;
16798 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
16799 ndr->depth++;
16800 if (r->in.server_unc) {
16801 ndr_print_string(ndr, "server_unc", r->in.server_unc);
16803 ndr->depth--;
16804 ndr_print_ptr(ndr, "level", r->in.level);
16805 ndr->depth++;
16806 ndr_print_uint32(ndr, "level", *r->in.level);
16807 ndr->depth--;
16808 ndr_print_ptr(ndr, "transports", r->in.transports);
16809 ndr->depth++;
16810 ndr_print_set_switch_value(ndr, r->in.transports, *r->in.level);
16811 ndr_print_srvsvc_NetTransportCtr(ndr, "transports", r->in.transports);
16812 ndr->depth--;
16813 ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
16814 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
16815 ndr->depth++;
16816 if (r->in.resume_handle) {
16817 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
16819 ndr->depth--;
16820 ndr->depth--;
16822 if (flags & NDR_OUT) {
16823 ndr_print_struct(ndr, "out", "srvsvc_NetTransportEnum");
16824 ndr->depth++;
16825 ndr_print_ptr(ndr, "level", r->out.level);
16826 ndr->depth++;
16827 ndr_print_uint32(ndr, "level", *r->out.level);
16828 ndr->depth--;
16829 ndr_print_ptr(ndr, "transports", r->out.transports);
16830 ndr->depth++;
16831 ndr_print_set_switch_value(ndr, r->out.transports, *r->out.level);
16832 ndr_print_srvsvc_NetTransportCtr(ndr, "transports", r->out.transports);
16833 ndr->depth--;
16834 ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
16835 ndr->depth++;
16836 ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
16837 ndr->depth--;
16838 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
16839 ndr->depth++;
16840 if (r->out.resume_handle) {
16841 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
16843 ndr->depth--;
16844 ndr_print_WERROR(ndr, "result", r->out.result);
16845 ndr->depth--;
16847 ndr->depth--;
16850 NTSTATUS ndr_push_srvsvc_NetTransportDel(struct ndr_push *ndr, int flags, const struct srvsvc_NetTransportDel *r)
16852 if (flags & NDR_IN) {
16853 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
16854 if (r->in.server_unc) {
16855 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16856 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
16857 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16858 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));
16860 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.unknown));
16861 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.transport));
16863 if (flags & NDR_OUT) {
16864 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16866 return NT_STATUS_OK;
16869 NTSTATUS ndr_pull_srvsvc_NetTransportDel(struct ndr_pull *ndr, int flags, struct srvsvc_NetTransportDel *r)
16871 uint32_t _ptr_server_unc;
16872 TALLOC_CTX *_mem_save_server_unc_0;
16873 if (flags & NDR_IN) {
16874 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
16875 if (_ptr_server_unc) {
16876 NDR_PULL_ALLOC(ndr, r->in.server_unc);
16877 } else {
16878 r->in.server_unc = NULL;
16880 if (r->in.server_unc) {
16881 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
16882 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
16883 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
16884 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
16885 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
16886 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));
16888 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
16889 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));
16890 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
16892 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.unknown));
16893 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.transport));
16895 if (flags & NDR_OUT) {
16896 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16898 return NT_STATUS_OK;
16901 _PUBLIC_ void ndr_print_srvsvc_NetTransportDel(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetTransportDel *r)
16903 ndr_print_struct(ndr, name, "srvsvc_NetTransportDel");
16904 ndr->depth++;
16905 if (flags & NDR_SET_VALUES) {
16906 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16908 if (flags & NDR_IN) {
16909 ndr_print_struct(ndr, "in", "srvsvc_NetTransportDel");
16910 ndr->depth++;
16911 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
16912 ndr->depth++;
16913 if (r->in.server_unc) {
16914 ndr_print_string(ndr, "server_unc", r->in.server_unc);
16916 ndr->depth--;
16917 ndr_print_uint32(ndr, "unknown", r->in.unknown);
16918 ndr_print_srvsvc_NetTransportInfo0(ndr, "transport", &r->in.transport);
16919 ndr->depth--;
16921 if (flags & NDR_OUT) {
16922 ndr_print_struct(ndr, "out", "srvsvc_NetTransportDel");
16923 ndr->depth++;
16924 ndr_print_WERROR(ndr, "result", r->out.result);
16925 ndr->depth--;
16927 ndr->depth--;
16930 NTSTATUS ndr_push_srvsvc_NetRemoteTOD(struct ndr_push *ndr, int flags, const struct srvsvc_NetRemoteTOD *r)
16932 if (flags & NDR_IN) {
16933 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
16934 if (r->in.server_unc) {
16935 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16936 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
16937 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16938 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));
16941 if (flags & NDR_OUT) {
16942 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
16943 if (r->out.info) {
16944 NDR_CHECK(ndr_push_srvsvc_NetRemoteTODInfo(ndr, NDR_SCALARS, r->out.info));
16946 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16948 return NT_STATUS_OK;
16951 NTSTATUS ndr_pull_srvsvc_NetRemoteTOD(struct ndr_pull *ndr, int flags, struct srvsvc_NetRemoteTOD *r)
16953 uint32_t _ptr_server_unc;
16954 uint32_t _ptr_info;
16955 TALLOC_CTX *_mem_save_server_unc_0;
16956 TALLOC_CTX *_mem_save_info_0;
16957 if (flags & NDR_IN) {
16958 ZERO_STRUCT(r->out);
16960 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
16961 if (_ptr_server_unc) {
16962 NDR_PULL_ALLOC(ndr, r->in.server_unc);
16963 } else {
16964 r->in.server_unc = NULL;
16966 if (r->in.server_unc) {
16967 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
16968 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
16969 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
16970 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
16971 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
16972 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));
16974 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
16975 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));
16976 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
16979 if (flags & NDR_OUT) {
16980 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
16981 if (_ptr_info) {
16982 NDR_PULL_ALLOC(ndr, r->out.info);
16983 } else {
16984 r->out.info = NULL;
16986 if (r->out.info) {
16987 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
16988 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
16989 NDR_CHECK(ndr_pull_srvsvc_NetRemoteTODInfo(ndr, NDR_SCALARS, r->out.info));
16990 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
16992 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16994 return NT_STATUS_OK;
16997 _PUBLIC_ void ndr_print_srvsvc_NetRemoteTOD(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetRemoteTOD *r)
16999 ndr_print_struct(ndr, name, "srvsvc_NetRemoteTOD");
17000 ndr->depth++;
17001 if (flags & NDR_SET_VALUES) {
17002 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17004 if (flags & NDR_IN) {
17005 ndr_print_struct(ndr, "in", "srvsvc_NetRemoteTOD");
17006 ndr->depth++;
17007 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
17008 ndr->depth++;
17009 if (r->in.server_unc) {
17010 ndr_print_string(ndr, "server_unc", r->in.server_unc);
17012 ndr->depth--;
17013 ndr->depth--;
17015 if (flags & NDR_OUT) {
17016 ndr_print_struct(ndr, "out", "srvsvc_NetRemoteTOD");
17017 ndr->depth++;
17018 ndr_print_ptr(ndr, "info", r->out.info);
17019 ndr->depth++;
17020 if (r->out.info) {
17021 ndr_print_srvsvc_NetRemoteTODInfo(ndr, "info", r->out.info);
17023 ndr->depth--;
17024 ndr_print_WERROR(ndr, "result", r->out.result);
17025 ndr->depth--;
17027 ndr->depth--;
17030 NTSTATUS ndr_push_srvsvc_NetSetServiceBits(struct ndr_push *ndr, int flags, const struct srvsvc_NetSetServiceBits *r)
17032 if (flags & NDR_IN) {
17033 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
17034 if (r->in.server_unc) {
17035 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17036 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17037 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17038 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));
17040 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.transport));
17041 if (r->in.transport) {
17042 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.transport, CH_UTF16)));
17043 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17044 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.transport, CH_UTF16)));
17045 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.transport, ndr_charset_length(r->in.transport, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17047 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.servicebits));
17048 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.updateimmediately));
17050 if (flags & NDR_OUT) {
17051 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17053 return NT_STATUS_OK;
17056 NTSTATUS ndr_pull_srvsvc_NetSetServiceBits(struct ndr_pull *ndr, int flags, struct srvsvc_NetSetServiceBits *r)
17058 uint32_t _ptr_server_unc;
17059 uint32_t _ptr_transport;
17060 TALLOC_CTX *_mem_save_server_unc_0;
17061 TALLOC_CTX *_mem_save_transport_0;
17062 if (flags & NDR_IN) {
17063 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
17064 if (_ptr_server_unc) {
17065 NDR_PULL_ALLOC(ndr, r->in.server_unc);
17066 } else {
17067 r->in.server_unc = NULL;
17069 if (r->in.server_unc) {
17070 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
17071 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
17072 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
17073 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
17074 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
17075 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));
17077 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
17078 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));
17079 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
17081 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_transport));
17082 if (_ptr_transport) {
17083 NDR_PULL_ALLOC(ndr, r->in.transport);
17084 } else {
17085 r->in.transport = NULL;
17087 if (r->in.transport) {
17088 _mem_save_transport_0 = NDR_PULL_GET_MEM_CTX(ndr);
17089 NDR_PULL_SET_MEM_CTX(ndr, r->in.transport, 0);
17090 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.transport));
17091 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.transport));
17092 if (ndr_get_array_length(ndr, &r->in.transport) > ndr_get_array_size(ndr, &r->in.transport)) {
17093 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));
17095 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.transport), sizeof(uint16_t)));
17096 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.transport, ndr_get_array_length(ndr, &r->in.transport), sizeof(uint16_t), CH_UTF16));
17097 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_transport_0, 0);
17099 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.servicebits));
17100 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.updateimmediately));
17102 if (flags & NDR_OUT) {
17103 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17105 return NT_STATUS_OK;
17108 _PUBLIC_ void ndr_print_srvsvc_NetSetServiceBits(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSetServiceBits *r)
17110 ndr_print_struct(ndr, name, "srvsvc_NetSetServiceBits");
17111 ndr->depth++;
17112 if (flags & NDR_SET_VALUES) {
17113 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17115 if (flags & NDR_IN) {
17116 ndr_print_struct(ndr, "in", "srvsvc_NetSetServiceBits");
17117 ndr->depth++;
17118 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
17119 ndr->depth++;
17120 if (r->in.server_unc) {
17121 ndr_print_string(ndr, "server_unc", r->in.server_unc);
17123 ndr->depth--;
17124 ndr_print_ptr(ndr, "transport", r->in.transport);
17125 ndr->depth++;
17126 if (r->in.transport) {
17127 ndr_print_string(ndr, "transport", r->in.transport);
17129 ndr->depth--;
17130 ndr_print_uint32(ndr, "servicebits", r->in.servicebits);
17131 ndr_print_uint32(ndr, "updateimmediately", r->in.updateimmediately);
17132 ndr->depth--;
17134 if (flags & NDR_OUT) {
17135 ndr_print_struct(ndr, "out", "srvsvc_NetSetServiceBits");
17136 ndr->depth++;
17137 ndr_print_WERROR(ndr, "result", r->out.result);
17138 ndr->depth--;
17140 ndr->depth--;
17143 NTSTATUS ndr_push_srvsvc_NetPathType(struct ndr_push *ndr, int flags, const struct srvsvc_NetPathType *r)
17145 if (flags & NDR_IN) {
17146 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
17147 if (r->in.server_unc) {
17148 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17149 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17150 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17151 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));
17153 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
17154 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17155 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
17156 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path, ndr_charset_length(r->in.path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17157 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.pathflags));
17159 if (flags & NDR_OUT) {
17160 if (r->out.pathtype == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
17161 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pathtype));
17162 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17164 return NT_STATUS_OK;
17167 NTSTATUS ndr_pull_srvsvc_NetPathType(struct ndr_pull *ndr, int flags, struct srvsvc_NetPathType *r)
17169 uint32_t _ptr_server_unc;
17170 TALLOC_CTX *_mem_save_server_unc_0;
17171 TALLOC_CTX *_mem_save_pathtype_0;
17172 if (flags & NDR_IN) {
17173 ZERO_STRUCT(r->out);
17175 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
17176 if (_ptr_server_unc) {
17177 NDR_PULL_ALLOC(ndr, r->in.server_unc);
17178 } else {
17179 r->in.server_unc = NULL;
17181 if (r->in.server_unc) {
17182 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
17183 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
17184 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
17185 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
17186 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
17187 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));
17189 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
17190 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));
17191 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
17193 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path));
17194 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path));
17195 if (ndr_get_array_length(ndr, &r->in.path) > ndr_get_array_size(ndr, &r->in.path)) {
17196 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));
17198 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t)));
17199 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t), CH_UTF16));
17200 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.pathflags));
17201 NDR_PULL_ALLOC(ndr, r->out.pathtype);
17202 ZERO_STRUCTP(r->out.pathtype);
17204 if (flags & NDR_OUT) {
17205 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17206 NDR_PULL_ALLOC(ndr, r->out.pathtype);
17208 _mem_save_pathtype_0 = NDR_PULL_GET_MEM_CTX(ndr);
17209 NDR_PULL_SET_MEM_CTX(ndr, r->out.pathtype, LIBNDR_FLAG_REF_ALLOC);
17210 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pathtype));
17211 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pathtype_0, LIBNDR_FLAG_REF_ALLOC);
17212 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17214 return NT_STATUS_OK;
17217 _PUBLIC_ void ndr_print_srvsvc_NetPathType(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetPathType *r)
17219 ndr_print_struct(ndr, name, "srvsvc_NetPathType");
17220 ndr->depth++;
17221 if (flags & NDR_SET_VALUES) {
17222 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17224 if (flags & NDR_IN) {
17225 ndr_print_struct(ndr, "in", "srvsvc_NetPathType");
17226 ndr->depth++;
17227 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
17228 ndr->depth++;
17229 if (r->in.server_unc) {
17230 ndr_print_string(ndr, "server_unc", r->in.server_unc);
17232 ndr->depth--;
17233 ndr_print_string(ndr, "path", r->in.path);
17234 ndr_print_uint32(ndr, "pathflags", r->in.pathflags);
17235 ndr->depth--;
17237 if (flags & NDR_OUT) {
17238 ndr_print_struct(ndr, "out", "srvsvc_NetPathType");
17239 ndr->depth++;
17240 ndr_print_ptr(ndr, "pathtype", r->out.pathtype);
17241 ndr->depth++;
17242 ndr_print_uint32(ndr, "pathtype", *r->out.pathtype);
17243 ndr->depth--;
17244 ndr_print_WERROR(ndr, "result", r->out.result);
17245 ndr->depth--;
17247 ndr->depth--;
17250 NTSTATUS ndr_push_srvsvc_NetPathCanonicalize(struct ndr_push *ndr, int flags, const struct srvsvc_NetPathCanonicalize *r)
17252 if (flags & NDR_IN) {
17253 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
17254 if (r->in.server_unc) {
17255 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17256 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17257 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17258 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));
17260 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
17261 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17262 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
17263 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path, ndr_charset_length(r->in.path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17264 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.maxbuf));
17265 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.prefix, CH_UTF16)));
17266 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17267 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.prefix, CH_UTF16)));
17268 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.prefix, ndr_charset_length(r->in.prefix, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17269 if (r->in.pathtype == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
17270 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.pathtype));
17271 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.pathflags));
17273 if (flags & NDR_OUT) {
17274 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.maxbuf));
17275 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.can_path, r->in.maxbuf));
17276 if (r->out.pathtype == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
17277 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pathtype));
17278 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17280 return NT_STATUS_OK;
17283 NTSTATUS ndr_pull_srvsvc_NetPathCanonicalize(struct ndr_pull *ndr, int flags, struct srvsvc_NetPathCanonicalize *r)
17285 uint32_t _ptr_server_unc;
17286 TALLOC_CTX *_mem_save_server_unc_0;
17287 TALLOC_CTX *_mem_save_pathtype_0;
17288 if (flags & NDR_IN) {
17289 ZERO_STRUCT(r->out);
17291 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
17292 if (_ptr_server_unc) {
17293 NDR_PULL_ALLOC(ndr, r->in.server_unc);
17294 } else {
17295 r->in.server_unc = NULL;
17297 if (r->in.server_unc) {
17298 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
17299 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
17300 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
17301 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
17302 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
17303 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));
17305 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
17306 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));
17307 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
17309 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path));
17310 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path));
17311 if (ndr_get_array_length(ndr, &r->in.path) > ndr_get_array_size(ndr, &r->in.path)) {
17312 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));
17314 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t)));
17315 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t), CH_UTF16));
17316 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.maxbuf));
17317 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.prefix));
17318 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.prefix));
17319 if (ndr_get_array_length(ndr, &r->in.prefix) > ndr_get_array_size(ndr, &r->in.prefix)) {
17320 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));
17322 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.prefix), sizeof(uint16_t)));
17323 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.prefix, ndr_get_array_length(ndr, &r->in.prefix), sizeof(uint16_t), CH_UTF16));
17324 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17325 NDR_PULL_ALLOC(ndr, r->in.pathtype);
17327 _mem_save_pathtype_0 = NDR_PULL_GET_MEM_CTX(ndr);
17328 NDR_PULL_SET_MEM_CTX(ndr, r->in.pathtype, LIBNDR_FLAG_REF_ALLOC);
17329 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.pathtype));
17330 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pathtype_0, LIBNDR_FLAG_REF_ALLOC);
17331 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.pathflags));
17332 NDR_PULL_ALLOC(ndr, r->out.pathtype);
17333 *r->out.pathtype = *r->in.pathtype;
17335 if (flags & NDR_OUT) {
17336 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.can_path));
17337 NDR_PULL_ALLOC_N(ndr, r->out.can_path, ndr_get_array_size(ndr, &r->out.can_path));
17338 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.can_path, ndr_get_array_size(ndr, &r->out.can_path)));
17339 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17340 NDR_PULL_ALLOC(ndr, r->out.pathtype);
17342 _mem_save_pathtype_0 = NDR_PULL_GET_MEM_CTX(ndr);
17343 NDR_PULL_SET_MEM_CTX(ndr, r->out.pathtype, LIBNDR_FLAG_REF_ALLOC);
17344 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pathtype));
17345 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pathtype_0, LIBNDR_FLAG_REF_ALLOC);
17346 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17347 if (r->out.can_path) {
17348 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.can_path, r->in.maxbuf));
17351 return NT_STATUS_OK;
17354 _PUBLIC_ void ndr_print_srvsvc_NetPathCanonicalize(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetPathCanonicalize *r)
17356 ndr_print_struct(ndr, name, "srvsvc_NetPathCanonicalize");
17357 ndr->depth++;
17358 if (flags & NDR_SET_VALUES) {
17359 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17361 if (flags & NDR_IN) {
17362 ndr_print_struct(ndr, "in", "srvsvc_NetPathCanonicalize");
17363 ndr->depth++;
17364 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
17365 ndr->depth++;
17366 if (r->in.server_unc) {
17367 ndr_print_string(ndr, "server_unc", r->in.server_unc);
17369 ndr->depth--;
17370 ndr_print_string(ndr, "path", r->in.path);
17371 ndr_print_uint32(ndr, "maxbuf", r->in.maxbuf);
17372 ndr_print_string(ndr, "prefix", r->in.prefix);
17373 ndr_print_ptr(ndr, "pathtype", r->in.pathtype);
17374 ndr->depth++;
17375 ndr_print_uint32(ndr, "pathtype", *r->in.pathtype);
17376 ndr->depth--;
17377 ndr_print_uint32(ndr, "pathflags", r->in.pathflags);
17378 ndr->depth--;
17380 if (flags & NDR_OUT) {
17381 ndr_print_struct(ndr, "out", "srvsvc_NetPathCanonicalize");
17382 ndr->depth++;
17383 ndr_print_array_uint8(ndr, "can_path", r->out.can_path, r->in.maxbuf);
17384 ndr_print_ptr(ndr, "pathtype", r->out.pathtype);
17385 ndr->depth++;
17386 ndr_print_uint32(ndr, "pathtype", *r->out.pathtype);
17387 ndr->depth--;
17388 ndr_print_WERROR(ndr, "result", r->out.result);
17389 ndr->depth--;
17391 ndr->depth--;
17394 NTSTATUS ndr_push_srvsvc_NetPathCompare(struct ndr_push *ndr, int flags, const struct srvsvc_NetPathCompare *r)
17396 if (flags & NDR_IN) {
17397 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
17398 if (r->in.server_unc) {
17399 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17400 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17401 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17402 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));
17404 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path1, CH_UTF16)));
17405 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17406 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path1, CH_UTF16)));
17407 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path1, ndr_charset_length(r->in.path1, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17408 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path2, CH_UTF16)));
17409 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17410 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path2, CH_UTF16)));
17411 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path2, ndr_charset_length(r->in.path2, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17412 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.pathtype));
17413 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.pathflags));
17415 if (flags & NDR_OUT) {
17416 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17418 return NT_STATUS_OK;
17421 NTSTATUS ndr_pull_srvsvc_NetPathCompare(struct ndr_pull *ndr, int flags, struct srvsvc_NetPathCompare *r)
17423 uint32_t _ptr_server_unc;
17424 TALLOC_CTX *_mem_save_server_unc_0;
17425 if (flags & NDR_IN) {
17426 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
17427 if (_ptr_server_unc) {
17428 NDR_PULL_ALLOC(ndr, r->in.server_unc);
17429 } else {
17430 r->in.server_unc = NULL;
17432 if (r->in.server_unc) {
17433 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
17434 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
17435 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
17436 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
17437 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
17438 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));
17440 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
17441 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));
17442 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
17444 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path1));
17445 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path1));
17446 if (ndr_get_array_length(ndr, &r->in.path1) > ndr_get_array_size(ndr, &r->in.path1)) {
17447 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));
17449 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.path1), sizeof(uint16_t)));
17450 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path1, ndr_get_array_length(ndr, &r->in.path1), sizeof(uint16_t), CH_UTF16));
17451 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path2));
17452 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path2));
17453 if (ndr_get_array_length(ndr, &r->in.path2) > ndr_get_array_size(ndr, &r->in.path2)) {
17454 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));
17456 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.path2), sizeof(uint16_t)));
17457 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path2, ndr_get_array_length(ndr, &r->in.path2), sizeof(uint16_t), CH_UTF16));
17458 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.pathtype));
17459 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.pathflags));
17461 if (flags & NDR_OUT) {
17462 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17464 return NT_STATUS_OK;
17467 _PUBLIC_ void ndr_print_srvsvc_NetPathCompare(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetPathCompare *r)
17469 ndr_print_struct(ndr, name, "srvsvc_NetPathCompare");
17470 ndr->depth++;
17471 if (flags & NDR_SET_VALUES) {
17472 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17474 if (flags & NDR_IN) {
17475 ndr_print_struct(ndr, "in", "srvsvc_NetPathCompare");
17476 ndr->depth++;
17477 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
17478 ndr->depth++;
17479 if (r->in.server_unc) {
17480 ndr_print_string(ndr, "server_unc", r->in.server_unc);
17482 ndr->depth--;
17483 ndr_print_string(ndr, "path1", r->in.path1);
17484 ndr_print_string(ndr, "path2", r->in.path2);
17485 ndr_print_uint32(ndr, "pathtype", r->in.pathtype);
17486 ndr_print_uint32(ndr, "pathflags", r->in.pathflags);
17487 ndr->depth--;
17489 if (flags & NDR_OUT) {
17490 ndr_print_struct(ndr, "out", "srvsvc_NetPathCompare");
17491 ndr->depth++;
17492 ndr_print_WERROR(ndr, "result", r->out.result);
17493 ndr->depth--;
17495 ndr->depth--;
17498 NTSTATUS ndr_push_srvsvc_NetNameValidate(struct ndr_push *ndr, int flags, const struct srvsvc_NetNameValidate *r)
17500 if (flags & NDR_IN) {
17501 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
17502 if (r->in.server_unc) {
17503 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17504 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17505 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17506 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));
17508 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.name, CH_UTF16)));
17509 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17510 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.name, CH_UTF16)));
17511 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.name, ndr_charset_length(r->in.name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17512 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.name_type));
17513 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
17515 if (flags & NDR_OUT) {
17516 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17518 return NT_STATUS_OK;
17521 NTSTATUS ndr_pull_srvsvc_NetNameValidate(struct ndr_pull *ndr, int flags, struct srvsvc_NetNameValidate *r)
17523 uint32_t _ptr_server_unc;
17524 TALLOC_CTX *_mem_save_server_unc_0;
17525 if (flags & NDR_IN) {
17526 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
17527 if (_ptr_server_unc) {
17528 NDR_PULL_ALLOC(ndr, r->in.server_unc);
17529 } else {
17530 r->in.server_unc = NULL;
17532 if (r->in.server_unc) {
17533 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
17534 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
17535 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
17536 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
17537 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
17538 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));
17540 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
17541 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));
17542 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
17544 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.name));
17545 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.name));
17546 if (ndr_get_array_length(ndr, &r->in.name) > ndr_get_array_size(ndr, &r->in.name)) {
17547 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));
17549 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.name), sizeof(uint16_t)));
17550 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.name, ndr_get_array_length(ndr, &r->in.name), sizeof(uint16_t), CH_UTF16));
17551 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.name_type));
17552 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
17554 if (flags & NDR_OUT) {
17555 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17557 return NT_STATUS_OK;
17560 _PUBLIC_ void ndr_print_srvsvc_NetNameValidate(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetNameValidate *r)
17562 ndr_print_struct(ndr, name, "srvsvc_NetNameValidate");
17563 ndr->depth++;
17564 if (flags & NDR_SET_VALUES) {
17565 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17567 if (flags & NDR_IN) {
17568 ndr_print_struct(ndr, "in", "srvsvc_NetNameValidate");
17569 ndr->depth++;
17570 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
17571 ndr->depth++;
17572 if (r->in.server_unc) {
17573 ndr_print_string(ndr, "server_unc", r->in.server_unc);
17575 ndr->depth--;
17576 ndr_print_string(ndr, "name", r->in.name);
17577 ndr_print_uint32(ndr, "name_type", r->in.name_type);
17578 ndr_print_uint32(ndr, "flags", r->in.flags);
17579 ndr->depth--;
17581 if (flags & NDR_OUT) {
17582 ndr_print_struct(ndr, "out", "srvsvc_NetNameValidate");
17583 ndr->depth++;
17584 ndr_print_WERROR(ndr, "result", r->out.result);
17585 ndr->depth--;
17587 ndr->depth--;
17590 NTSTATUS ndr_push_srvsvc_NETRPRNAMECANONICALIZE(struct ndr_push *ndr, int flags, const struct srvsvc_NETRPRNAMECANONICALIZE *r)
17592 if (flags & NDR_IN) {
17594 if (flags & NDR_OUT) {
17595 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17597 return NT_STATUS_OK;
17600 NTSTATUS ndr_pull_srvsvc_NETRPRNAMECANONICALIZE(struct ndr_pull *ndr, int flags, struct srvsvc_NETRPRNAMECANONICALIZE *r)
17602 if (flags & NDR_IN) {
17604 if (flags & NDR_OUT) {
17605 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17607 return NT_STATUS_OK;
17610 _PUBLIC_ void ndr_print_srvsvc_NETRPRNAMECANONICALIZE(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRPRNAMECANONICALIZE *r)
17612 ndr_print_struct(ndr, name, "srvsvc_NETRPRNAMECANONICALIZE");
17613 ndr->depth++;
17614 if (flags & NDR_SET_VALUES) {
17615 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17617 if (flags & NDR_IN) {
17618 ndr_print_struct(ndr, "in", "srvsvc_NETRPRNAMECANONICALIZE");
17619 ndr->depth++;
17620 ndr->depth--;
17622 if (flags & NDR_OUT) {
17623 ndr_print_struct(ndr, "out", "srvsvc_NETRPRNAMECANONICALIZE");
17624 ndr->depth++;
17625 ndr_print_WERROR(ndr, "result", r->out.result);
17626 ndr->depth--;
17628 ndr->depth--;
17631 NTSTATUS ndr_push_srvsvc_NetPRNameCompare(struct ndr_push *ndr, int flags, const struct srvsvc_NetPRNameCompare *r)
17633 if (flags & NDR_IN) {
17634 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
17635 if (r->in.server_unc) {
17636 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17637 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17638 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17639 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));
17641 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.name1, CH_UTF16)));
17642 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17643 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.name1, CH_UTF16)));
17644 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.name1, ndr_charset_length(r->in.name1, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17645 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.name2, CH_UTF16)));
17646 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17647 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.name2, CH_UTF16)));
17648 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.name2, ndr_charset_length(r->in.name2, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17649 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.name_type));
17650 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
17652 if (flags & NDR_OUT) {
17653 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17655 return NT_STATUS_OK;
17658 NTSTATUS ndr_pull_srvsvc_NetPRNameCompare(struct ndr_pull *ndr, int flags, struct srvsvc_NetPRNameCompare *r)
17660 uint32_t _ptr_server_unc;
17661 TALLOC_CTX *_mem_save_server_unc_0;
17662 if (flags & NDR_IN) {
17663 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
17664 if (_ptr_server_unc) {
17665 NDR_PULL_ALLOC(ndr, r->in.server_unc);
17666 } else {
17667 r->in.server_unc = NULL;
17669 if (r->in.server_unc) {
17670 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
17671 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
17672 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
17673 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
17674 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
17675 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));
17677 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
17678 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));
17679 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
17681 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.name1));
17682 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.name1));
17683 if (ndr_get_array_length(ndr, &r->in.name1) > ndr_get_array_size(ndr, &r->in.name1)) {
17684 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));
17686 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.name1), sizeof(uint16_t)));
17687 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.name1, ndr_get_array_length(ndr, &r->in.name1), sizeof(uint16_t), CH_UTF16));
17688 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.name2));
17689 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.name2));
17690 if (ndr_get_array_length(ndr, &r->in.name2) > ndr_get_array_size(ndr, &r->in.name2)) {
17691 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));
17693 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.name2), sizeof(uint16_t)));
17694 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.name2, ndr_get_array_length(ndr, &r->in.name2), sizeof(uint16_t), CH_UTF16));
17695 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.name_type));
17696 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
17698 if (flags & NDR_OUT) {
17699 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17701 return NT_STATUS_OK;
17704 _PUBLIC_ void ndr_print_srvsvc_NetPRNameCompare(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetPRNameCompare *r)
17706 ndr_print_struct(ndr, name, "srvsvc_NetPRNameCompare");
17707 ndr->depth++;
17708 if (flags & NDR_SET_VALUES) {
17709 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17711 if (flags & NDR_IN) {
17712 ndr_print_struct(ndr, "in", "srvsvc_NetPRNameCompare");
17713 ndr->depth++;
17714 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
17715 ndr->depth++;
17716 if (r->in.server_unc) {
17717 ndr_print_string(ndr, "server_unc", r->in.server_unc);
17719 ndr->depth--;
17720 ndr_print_string(ndr, "name1", r->in.name1);
17721 ndr_print_string(ndr, "name2", r->in.name2);
17722 ndr_print_uint32(ndr, "name_type", r->in.name_type);
17723 ndr_print_uint32(ndr, "flags", r->in.flags);
17724 ndr->depth--;
17726 if (flags & NDR_OUT) {
17727 ndr_print_struct(ndr, "out", "srvsvc_NetPRNameCompare");
17728 ndr->depth++;
17729 ndr_print_WERROR(ndr, "result", r->out.result);
17730 ndr->depth--;
17732 ndr->depth--;
17735 NTSTATUS ndr_push_srvsvc_NetShareEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareEnum *r)
17737 if (flags & NDR_IN) {
17738 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
17739 if (r->in.server_unc) {
17740 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17741 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17742 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17743 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));
17745 if (r->in.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
17746 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.level));
17747 if (r->in.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
17748 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.ctr, *r->in.level));
17749 NDR_CHECK(ndr_push_srvsvc_NetShareCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
17750 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
17751 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
17752 if (r->in.resume_handle) {
17753 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
17756 if (flags & NDR_OUT) {
17757 if (r->out.level == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
17758 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.level));
17759 if (r->out.ctr == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
17760 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.ctr, *r->out.level));
17761 NDR_CHECK(ndr_push_srvsvc_NetShareCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
17762 if (r->out.totalentries == NULL) return NT_STATUS_INVALID_PARAMETER_MIX;
17763 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
17764 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
17765 if (r->out.resume_handle) {
17766 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
17768 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17770 return NT_STATUS_OK;
17773 NTSTATUS ndr_pull_srvsvc_NetShareEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareEnum *r)
17775 uint32_t _ptr_server_unc;
17776 uint32_t _ptr_resume_handle;
17777 TALLOC_CTX *_mem_save_server_unc_0;
17778 TALLOC_CTX *_mem_save_level_0;
17779 TALLOC_CTX *_mem_save_ctr_0;
17780 TALLOC_CTX *_mem_save_totalentries_0;
17781 TALLOC_CTX *_mem_save_resume_handle_0;
17782 if (flags & NDR_IN) {
17783 ZERO_STRUCT(r->out);
17785 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
17786 if (_ptr_server_unc) {
17787 NDR_PULL_ALLOC(ndr, r->in.server_unc);
17788 } else {
17789 r->in.server_unc = NULL;
17791 if (r->in.server_unc) {
17792 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
17793 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
17794 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
17795 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
17796 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
17797 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));
17799 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
17800 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));
17801 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
17803 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17804 NDR_PULL_ALLOC(ndr, r->in.level);
17806 _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr);
17807 NDR_PULL_SET_MEM_CTX(ndr, r->in.level, LIBNDR_FLAG_REF_ALLOC);
17808 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.level));
17809 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC);
17810 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17811 NDR_PULL_ALLOC(ndr, r->in.ctr);
17813 _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
17814 NDR_PULL_SET_MEM_CTX(ndr, r->in.ctr, LIBNDR_FLAG_REF_ALLOC);
17815 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.ctr, *r->in.level));
17816 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.ctr));
17817 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
17818 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
17819 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
17820 if (_ptr_resume_handle) {
17821 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
17822 } else {
17823 r->in.resume_handle = NULL;
17825 if (r->in.resume_handle) {
17826 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
17827 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
17828 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
17829 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
17831 NDR_PULL_ALLOC(ndr, r->out.level);
17832 *r->out.level = *r->in.level;
17833 NDR_PULL_ALLOC(ndr, r->out.ctr);
17834 *r->out.ctr = *r->in.ctr;
17835 NDR_PULL_ALLOC(ndr, r->out.totalentries);
17836 ZERO_STRUCTP(r->out.totalentries);
17838 if (flags & NDR_OUT) {
17839 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17840 NDR_PULL_ALLOC(ndr, r->out.level);
17842 _mem_save_level_0 = NDR_PULL_GET_MEM_CTX(ndr);
17843 NDR_PULL_SET_MEM_CTX(ndr, r->out.level, LIBNDR_FLAG_REF_ALLOC);
17844 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.level));
17845 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_level_0, LIBNDR_FLAG_REF_ALLOC);
17846 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17847 NDR_PULL_ALLOC(ndr, r->out.ctr);
17849 _mem_save_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
17850 NDR_PULL_SET_MEM_CTX(ndr, r->out.ctr, LIBNDR_FLAG_REF_ALLOC);
17851 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.ctr, *r->out.level));
17852 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.ctr));
17853 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr_0, LIBNDR_FLAG_REF_ALLOC);
17854 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17855 NDR_PULL_ALLOC(ndr, r->out.totalentries);
17857 _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
17858 NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
17859 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
17860 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
17861 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
17862 if (_ptr_resume_handle) {
17863 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
17864 } else {
17865 r->out.resume_handle = NULL;
17867 if (r->out.resume_handle) {
17868 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
17869 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
17870 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
17871 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
17873 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17875 return NT_STATUS_OK;
17878 _PUBLIC_ void ndr_print_srvsvc_NetShareEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareEnum *r)
17880 ndr_print_struct(ndr, name, "srvsvc_NetShareEnum");
17881 ndr->depth++;
17882 if (flags & NDR_SET_VALUES) {
17883 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17885 if (flags & NDR_IN) {
17886 ndr_print_struct(ndr, "in", "srvsvc_NetShareEnum");
17887 ndr->depth++;
17888 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
17889 ndr->depth++;
17890 if (r->in.server_unc) {
17891 ndr_print_string(ndr, "server_unc", r->in.server_unc);
17893 ndr->depth--;
17894 ndr_print_ptr(ndr, "level", r->in.level);
17895 ndr->depth++;
17896 ndr_print_uint32(ndr, "level", *r->in.level);
17897 ndr->depth--;
17898 ndr_print_ptr(ndr, "ctr", r->in.ctr);
17899 ndr->depth++;
17900 ndr_print_set_switch_value(ndr, r->in.ctr, *r->in.level);
17901 ndr_print_srvsvc_NetShareCtr(ndr, "ctr", r->in.ctr);
17902 ndr->depth--;
17903 ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
17904 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
17905 ndr->depth++;
17906 if (r->in.resume_handle) {
17907 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
17909 ndr->depth--;
17910 ndr->depth--;
17912 if (flags & NDR_OUT) {
17913 ndr_print_struct(ndr, "out", "srvsvc_NetShareEnum");
17914 ndr->depth++;
17915 ndr_print_ptr(ndr, "level", r->out.level);
17916 ndr->depth++;
17917 ndr_print_uint32(ndr, "level", *r->out.level);
17918 ndr->depth--;
17919 ndr_print_ptr(ndr, "ctr", r->out.ctr);
17920 ndr->depth++;
17921 ndr_print_set_switch_value(ndr, r->out.ctr, *r->out.level);
17922 ndr_print_srvsvc_NetShareCtr(ndr, "ctr", r->out.ctr);
17923 ndr->depth--;
17924 ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
17925 ndr->depth++;
17926 ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
17927 ndr->depth--;
17928 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
17929 ndr->depth++;
17930 if (r->out.resume_handle) {
17931 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
17933 ndr->depth--;
17934 ndr_print_WERROR(ndr, "result", r->out.result);
17935 ndr->depth--;
17937 ndr->depth--;
17940 NTSTATUS ndr_push_srvsvc_NetShareDelStart(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareDelStart *r)
17942 if (flags & NDR_IN) {
17943 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
17944 if (r->in.server_unc) {
17945 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17946 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17947 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17948 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));
17950 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
17951 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
17952 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
17953 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share, ndr_charset_length(r->in.share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17954 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.reserved));
17956 if (flags & NDR_OUT) {
17957 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.hnd));
17958 if (r->out.hnd) {
17959 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.hnd));
17961 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17963 return NT_STATUS_OK;
17966 NTSTATUS ndr_pull_srvsvc_NetShareDelStart(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareDelStart *r)
17968 uint32_t _ptr_server_unc;
17969 uint32_t _ptr_hnd;
17970 TALLOC_CTX *_mem_save_server_unc_0;
17971 TALLOC_CTX *_mem_save_hnd_0;
17972 if (flags & NDR_IN) {
17973 ZERO_STRUCT(r->out);
17975 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
17976 if (_ptr_server_unc) {
17977 NDR_PULL_ALLOC(ndr, r->in.server_unc);
17978 } else {
17979 r->in.server_unc = NULL;
17981 if (r->in.server_unc) {
17982 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
17983 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
17984 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
17985 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
17986 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
17987 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));
17989 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
17990 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));
17991 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
17993 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share));
17994 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share));
17995 if (ndr_get_array_length(ndr, &r->in.share) > ndr_get_array_size(ndr, &r->in.share)) {
17996 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));
17998 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t)));
17999 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t), CH_UTF16));
18000 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.reserved));
18002 if (flags & NDR_OUT) {
18003 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_hnd));
18004 if (_ptr_hnd) {
18005 NDR_PULL_ALLOC(ndr, r->out.hnd);
18006 } else {
18007 r->out.hnd = NULL;
18009 if (r->out.hnd) {
18010 _mem_save_hnd_0 = NDR_PULL_GET_MEM_CTX(ndr);
18011 NDR_PULL_SET_MEM_CTX(ndr, r->out.hnd, 0);
18012 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.hnd));
18013 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hnd_0, 0);
18015 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18017 return NT_STATUS_OK;
18020 _PUBLIC_ void ndr_print_srvsvc_NetShareDelStart(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareDelStart *r)
18022 ndr_print_struct(ndr, name, "srvsvc_NetShareDelStart");
18023 ndr->depth++;
18024 if (flags & NDR_SET_VALUES) {
18025 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18027 if (flags & NDR_IN) {
18028 ndr_print_struct(ndr, "in", "srvsvc_NetShareDelStart");
18029 ndr->depth++;
18030 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
18031 ndr->depth++;
18032 if (r->in.server_unc) {
18033 ndr_print_string(ndr, "server_unc", r->in.server_unc);
18035 ndr->depth--;
18036 ndr_print_string(ndr, "share", r->in.share);
18037 ndr_print_uint32(ndr, "reserved", r->in.reserved);
18038 ndr->depth--;
18040 if (flags & NDR_OUT) {
18041 ndr_print_struct(ndr, "out", "srvsvc_NetShareDelStart");
18042 ndr->depth++;
18043 ndr_print_ptr(ndr, "hnd", r->out.hnd);
18044 ndr->depth++;
18045 if (r->out.hnd) {
18046 ndr_print_policy_handle(ndr, "hnd", r->out.hnd);
18048 ndr->depth--;
18049 ndr_print_WERROR(ndr, "result", r->out.result);
18050 ndr->depth--;
18052 ndr->depth--;
18055 NTSTATUS ndr_push_srvsvc_NetShareDelCommit(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareDelCommit *r)
18057 if (flags & NDR_IN) {
18058 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.hnd));
18059 if (r->in.hnd) {
18060 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.hnd));
18063 if (flags & NDR_OUT) {
18064 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.hnd));
18065 if (r->out.hnd) {
18066 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.hnd));
18068 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18070 return NT_STATUS_OK;
18073 NTSTATUS ndr_pull_srvsvc_NetShareDelCommit(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareDelCommit *r)
18075 uint32_t _ptr_hnd;
18076 TALLOC_CTX *_mem_save_hnd_0;
18077 if (flags & NDR_IN) {
18078 ZERO_STRUCT(r->out);
18080 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_hnd));
18081 if (_ptr_hnd) {
18082 NDR_PULL_ALLOC(ndr, r->in.hnd);
18083 } else {
18084 r->in.hnd = NULL;
18086 if (r->in.hnd) {
18087 _mem_save_hnd_0 = NDR_PULL_GET_MEM_CTX(ndr);
18088 NDR_PULL_SET_MEM_CTX(ndr, r->in.hnd, 0);
18089 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.hnd));
18090 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hnd_0, 0);
18093 if (flags & NDR_OUT) {
18094 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_hnd));
18095 if (_ptr_hnd) {
18096 NDR_PULL_ALLOC(ndr, r->out.hnd);
18097 } else {
18098 r->out.hnd = NULL;
18100 if (r->out.hnd) {
18101 _mem_save_hnd_0 = NDR_PULL_GET_MEM_CTX(ndr);
18102 NDR_PULL_SET_MEM_CTX(ndr, r->out.hnd, 0);
18103 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.hnd));
18104 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hnd_0, 0);
18106 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18108 return NT_STATUS_OK;
18111 _PUBLIC_ void ndr_print_srvsvc_NetShareDelCommit(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareDelCommit *r)
18113 ndr_print_struct(ndr, name, "srvsvc_NetShareDelCommit");
18114 ndr->depth++;
18115 if (flags & NDR_SET_VALUES) {
18116 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18118 if (flags & NDR_IN) {
18119 ndr_print_struct(ndr, "in", "srvsvc_NetShareDelCommit");
18120 ndr->depth++;
18121 ndr_print_ptr(ndr, "hnd", r->in.hnd);
18122 ndr->depth++;
18123 if (r->in.hnd) {
18124 ndr_print_policy_handle(ndr, "hnd", r->in.hnd);
18126 ndr->depth--;
18127 ndr->depth--;
18129 if (flags & NDR_OUT) {
18130 ndr_print_struct(ndr, "out", "srvsvc_NetShareDelCommit");
18131 ndr->depth++;
18132 ndr_print_ptr(ndr, "hnd", r->out.hnd);
18133 ndr->depth++;
18134 if (r->out.hnd) {
18135 ndr_print_policy_handle(ndr, "hnd", r->out.hnd);
18137 ndr->depth--;
18138 ndr_print_WERROR(ndr, "result", r->out.result);
18139 ndr->depth--;
18141 ndr->depth--;
18144 NTSTATUS ndr_push_srvsvc_NetGetFileSecurity(struct ndr_push *ndr, int flags, const struct srvsvc_NetGetFileSecurity *r)
18146 if (flags & NDR_IN) {
18147 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
18148 if (r->in.server_unc) {
18149 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18150 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
18151 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18152 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));
18154 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.share));
18155 if (r->in.share) {
18156 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
18157 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
18158 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
18159 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share, ndr_charset_length(r->in.share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18161 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.file, CH_UTF16)));
18162 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
18163 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.file, CH_UTF16)));
18164 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.file, ndr_charset_length(r->in.file, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18165 NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.securityinformation));
18167 if (flags & NDR_OUT) {
18168 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.sd_buf));
18169 if (r->out.sd_buf) {
18170 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sd_buf));
18172 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18174 return NT_STATUS_OK;
18177 NTSTATUS ndr_pull_srvsvc_NetGetFileSecurity(struct ndr_pull *ndr, int flags, struct srvsvc_NetGetFileSecurity *r)
18179 uint32_t _ptr_server_unc;
18180 uint32_t _ptr_share;
18181 uint32_t _ptr_sd_buf;
18182 TALLOC_CTX *_mem_save_server_unc_0;
18183 TALLOC_CTX *_mem_save_share_0;
18184 TALLOC_CTX *_mem_save_sd_buf_0;
18185 if (flags & NDR_IN) {
18186 ZERO_STRUCT(r->out);
18188 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
18189 if (_ptr_server_unc) {
18190 NDR_PULL_ALLOC(ndr, r->in.server_unc);
18191 } else {
18192 r->in.server_unc = NULL;
18194 if (r->in.server_unc) {
18195 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
18196 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
18197 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
18198 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
18199 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
18200 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));
18202 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
18203 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));
18204 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
18206 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share));
18207 if (_ptr_share) {
18208 NDR_PULL_ALLOC(ndr, r->in.share);
18209 } else {
18210 r->in.share = NULL;
18212 if (r->in.share) {
18213 _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr);
18214 NDR_PULL_SET_MEM_CTX(ndr, r->in.share, 0);
18215 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share));
18216 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share));
18217 if (ndr_get_array_length(ndr, &r->in.share) > ndr_get_array_size(ndr, &r->in.share)) {
18218 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));
18220 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t)));
18221 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t), CH_UTF16));
18222 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0);
18224 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.file));
18225 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.file));
18226 if (ndr_get_array_length(ndr, &r->in.file) > ndr_get_array_size(ndr, &r->in.file)) {
18227 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));
18229 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.file), sizeof(uint16_t)));
18230 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.file, ndr_get_array_length(ndr, &r->in.file), sizeof(uint16_t), CH_UTF16));
18231 NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.securityinformation));
18233 if (flags & NDR_OUT) {
18234 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sd_buf));
18235 if (_ptr_sd_buf) {
18236 NDR_PULL_ALLOC(ndr, r->out.sd_buf);
18237 } else {
18238 r->out.sd_buf = NULL;
18240 if (r->out.sd_buf) {
18241 _mem_save_sd_buf_0 = NDR_PULL_GET_MEM_CTX(ndr);
18242 NDR_PULL_SET_MEM_CTX(ndr, r->out.sd_buf, 0);
18243 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.sd_buf));
18244 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sd_buf_0, 0);
18246 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18248 return NT_STATUS_OK;
18251 _PUBLIC_ void ndr_print_srvsvc_NetGetFileSecurity(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetGetFileSecurity *r)
18253 ndr_print_struct(ndr, name, "srvsvc_NetGetFileSecurity");
18254 ndr->depth++;
18255 if (flags & NDR_SET_VALUES) {
18256 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18258 if (flags & NDR_IN) {
18259 ndr_print_struct(ndr, "in", "srvsvc_NetGetFileSecurity");
18260 ndr->depth++;
18261 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
18262 ndr->depth++;
18263 if (r->in.server_unc) {
18264 ndr_print_string(ndr, "server_unc", r->in.server_unc);
18266 ndr->depth--;
18267 ndr_print_ptr(ndr, "share", r->in.share);
18268 ndr->depth++;
18269 if (r->in.share) {
18270 ndr_print_string(ndr, "share", r->in.share);
18272 ndr->depth--;
18273 ndr_print_string(ndr, "file", r->in.file);
18274 ndr_print_security_secinfo(ndr, "securityinformation", r->in.securityinformation);
18275 ndr->depth--;
18277 if (flags & NDR_OUT) {
18278 ndr_print_struct(ndr, "out", "srvsvc_NetGetFileSecurity");
18279 ndr->depth++;
18280 ndr_print_ptr(ndr, "sd_buf", r->out.sd_buf);
18281 ndr->depth++;
18282 if (r->out.sd_buf) {
18283 ndr_print_sec_desc_buf(ndr, "sd_buf", r->out.sd_buf);
18285 ndr->depth--;
18286 ndr_print_WERROR(ndr, "result", r->out.result);
18287 ndr->depth--;
18289 ndr->depth--;
18292 NTSTATUS ndr_push_srvsvc_NetSetFileSecurity(struct ndr_push *ndr, int flags, const struct srvsvc_NetSetFileSecurity *r)
18294 if (flags & NDR_IN) {
18295 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
18296 if (r->in.server_unc) {
18297 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18298 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
18299 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18300 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));
18302 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.share));
18303 if (r->in.share) {
18304 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
18305 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
18306 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
18307 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share, ndr_charset_length(r->in.share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18309 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.file, CH_UTF16)));
18310 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
18311 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.file, CH_UTF16)));
18312 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.file, ndr_charset_length(r->in.file, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18313 NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.securityinformation));
18314 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.sd_buf));
18316 if (flags & NDR_OUT) {
18317 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18319 return NT_STATUS_OK;
18322 NTSTATUS ndr_pull_srvsvc_NetSetFileSecurity(struct ndr_pull *ndr, int flags, struct srvsvc_NetSetFileSecurity *r)
18324 uint32_t _ptr_server_unc;
18325 uint32_t _ptr_share;
18326 TALLOC_CTX *_mem_save_server_unc_0;
18327 TALLOC_CTX *_mem_save_share_0;
18328 if (flags & NDR_IN) {
18329 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
18330 if (_ptr_server_unc) {
18331 NDR_PULL_ALLOC(ndr, r->in.server_unc);
18332 } else {
18333 r->in.server_unc = NULL;
18335 if (r->in.server_unc) {
18336 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
18337 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
18338 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
18339 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
18340 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
18341 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));
18343 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
18344 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));
18345 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
18347 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share));
18348 if (_ptr_share) {
18349 NDR_PULL_ALLOC(ndr, r->in.share);
18350 } else {
18351 r->in.share = NULL;
18353 if (r->in.share) {
18354 _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr);
18355 NDR_PULL_SET_MEM_CTX(ndr, r->in.share, 0);
18356 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share));
18357 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share));
18358 if (ndr_get_array_length(ndr, &r->in.share) > ndr_get_array_size(ndr, &r->in.share)) {
18359 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));
18361 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t)));
18362 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t), CH_UTF16));
18363 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0);
18365 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.file));
18366 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.file));
18367 if (ndr_get_array_length(ndr, &r->in.file) > ndr_get_array_size(ndr, &r->in.file)) {
18368 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));
18370 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.file), sizeof(uint16_t)));
18371 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.file, ndr_get_array_length(ndr, &r->in.file), sizeof(uint16_t), CH_UTF16));
18372 NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.securityinformation));
18373 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.sd_buf));
18375 if (flags & NDR_OUT) {
18376 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18378 return NT_STATUS_OK;
18381 _PUBLIC_ void ndr_print_srvsvc_NetSetFileSecurity(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSetFileSecurity *r)
18383 ndr_print_struct(ndr, name, "srvsvc_NetSetFileSecurity");
18384 ndr->depth++;
18385 if (flags & NDR_SET_VALUES) {
18386 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18388 if (flags & NDR_IN) {
18389 ndr_print_struct(ndr, "in", "srvsvc_NetSetFileSecurity");
18390 ndr->depth++;
18391 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
18392 ndr->depth++;
18393 if (r->in.server_unc) {
18394 ndr_print_string(ndr, "server_unc", r->in.server_unc);
18396 ndr->depth--;
18397 ndr_print_ptr(ndr, "share", r->in.share);
18398 ndr->depth++;
18399 if (r->in.share) {
18400 ndr_print_string(ndr, "share", r->in.share);
18402 ndr->depth--;
18403 ndr_print_string(ndr, "file", r->in.file);
18404 ndr_print_security_secinfo(ndr, "securityinformation", r->in.securityinformation);
18405 ndr_print_sec_desc_buf(ndr, "sd_buf", &r->in.sd_buf);
18406 ndr->depth--;
18408 if (flags & NDR_OUT) {
18409 ndr_print_struct(ndr, "out", "srvsvc_NetSetFileSecurity");
18410 ndr->depth++;
18411 ndr_print_WERROR(ndr, "result", r->out.result);
18412 ndr->depth--;
18414 ndr->depth--;
18417 NTSTATUS ndr_push_srvsvc_NetServerTransportAddEx(struct ndr_push *ndr, int flags, const struct srvsvc_NetServerTransportAddEx *r)
18419 if (flags & NDR_IN) {
18420 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
18421 if (r->in.server_unc) {
18422 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18423 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
18424 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18425 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));
18427 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
18428 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.info, r->in.level));
18429 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
18431 if (flags & NDR_OUT) {
18432 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18434 return NT_STATUS_OK;
18437 NTSTATUS ndr_pull_srvsvc_NetServerTransportAddEx(struct ndr_pull *ndr, int flags, struct srvsvc_NetServerTransportAddEx *r)
18439 uint32_t _ptr_server_unc;
18440 TALLOC_CTX *_mem_save_server_unc_0;
18441 if (flags & NDR_IN) {
18442 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
18443 if (_ptr_server_unc) {
18444 NDR_PULL_ALLOC(ndr, r->in.server_unc);
18445 } else {
18446 r->in.server_unc = NULL;
18448 if (r->in.server_unc) {
18449 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
18450 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
18451 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
18452 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
18453 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
18454 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));
18456 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
18457 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));
18458 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
18460 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
18461 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.info, r->in.level));
18462 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
18464 if (flags & NDR_OUT) {
18465 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18467 return NT_STATUS_OK;
18470 _PUBLIC_ void ndr_print_srvsvc_NetServerTransportAddEx(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetServerTransportAddEx *r)
18472 ndr_print_struct(ndr, name, "srvsvc_NetServerTransportAddEx");
18473 ndr->depth++;
18474 if (flags & NDR_SET_VALUES) {
18475 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18477 if (flags & NDR_IN) {
18478 ndr_print_struct(ndr, "in", "srvsvc_NetServerTransportAddEx");
18479 ndr->depth++;
18480 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
18481 ndr->depth++;
18482 if (r->in.server_unc) {
18483 ndr_print_string(ndr, "server_unc", r->in.server_unc);
18485 ndr->depth--;
18486 ndr_print_uint32(ndr, "level", r->in.level);
18487 ndr_print_set_switch_value(ndr, &r->in.info, r->in.level);
18488 ndr_print_srvsvc_NetTransportInfo(ndr, "info", &r->in.info);
18489 ndr->depth--;
18491 if (flags & NDR_OUT) {
18492 ndr_print_struct(ndr, "out", "srvsvc_NetServerTransportAddEx");
18493 ndr->depth++;
18494 ndr_print_WERROR(ndr, "result", r->out.result);
18495 ndr->depth--;
18497 ndr->depth--;
18500 NTSTATUS ndr_push_srvsvc_NetServerSetServiceBitsEx(struct ndr_push *ndr, int flags, const struct srvsvc_NetServerSetServiceBitsEx *r)
18502 if (flags & NDR_IN) {
18503 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
18504 if (r->in.server_unc) {
18505 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18506 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
18507 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18508 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));
18510 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.emulated_server_unc));
18511 if (r->in.emulated_server_unc) {
18512 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.emulated_server_unc, CH_UTF16)));
18513 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
18514 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.emulated_server_unc, CH_UTF16)));
18515 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));
18517 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.transport));
18518 if (r->in.transport) {
18519 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.transport, CH_UTF16)));
18520 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
18521 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.transport, CH_UTF16)));
18522 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.transport, ndr_charset_length(r->in.transport, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18524 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.servicebitsofinterest));
18525 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.servicebits));
18526 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.updateimmediately));
18528 if (flags & NDR_OUT) {
18529 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18531 return NT_STATUS_OK;
18534 NTSTATUS ndr_pull_srvsvc_NetServerSetServiceBitsEx(struct ndr_pull *ndr, int flags, struct srvsvc_NetServerSetServiceBitsEx *r)
18536 uint32_t _ptr_server_unc;
18537 uint32_t _ptr_emulated_server_unc;
18538 uint32_t _ptr_transport;
18539 TALLOC_CTX *_mem_save_server_unc_0;
18540 TALLOC_CTX *_mem_save_emulated_server_unc_0;
18541 TALLOC_CTX *_mem_save_transport_0;
18542 if (flags & NDR_IN) {
18543 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
18544 if (_ptr_server_unc) {
18545 NDR_PULL_ALLOC(ndr, r->in.server_unc);
18546 } else {
18547 r->in.server_unc = NULL;
18549 if (r->in.server_unc) {
18550 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
18551 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
18552 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
18553 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
18554 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
18555 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));
18557 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
18558 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));
18559 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
18561 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_emulated_server_unc));
18562 if (_ptr_emulated_server_unc) {
18563 NDR_PULL_ALLOC(ndr, r->in.emulated_server_unc);
18564 } else {
18565 r->in.emulated_server_unc = NULL;
18567 if (r->in.emulated_server_unc) {
18568 _mem_save_emulated_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
18569 NDR_PULL_SET_MEM_CTX(ndr, r->in.emulated_server_unc, 0);
18570 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.emulated_server_unc));
18571 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.emulated_server_unc));
18572 if (ndr_get_array_length(ndr, &r->in.emulated_server_unc) > ndr_get_array_size(ndr, &r->in.emulated_server_unc)) {
18573 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));
18575 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.emulated_server_unc), sizeof(uint16_t)));
18576 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));
18577 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_emulated_server_unc_0, 0);
18579 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_transport));
18580 if (_ptr_transport) {
18581 NDR_PULL_ALLOC(ndr, r->in.transport);
18582 } else {
18583 r->in.transport = NULL;
18585 if (r->in.transport) {
18586 _mem_save_transport_0 = NDR_PULL_GET_MEM_CTX(ndr);
18587 NDR_PULL_SET_MEM_CTX(ndr, r->in.transport, 0);
18588 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.transport));
18589 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.transport));
18590 if (ndr_get_array_length(ndr, &r->in.transport) > ndr_get_array_size(ndr, &r->in.transport)) {
18591 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));
18593 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.transport), sizeof(uint16_t)));
18594 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.transport, ndr_get_array_length(ndr, &r->in.transport), sizeof(uint16_t), CH_UTF16));
18595 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_transport_0, 0);
18597 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.servicebitsofinterest));
18598 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.servicebits));
18599 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.updateimmediately));
18601 if (flags & NDR_OUT) {
18602 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18604 return NT_STATUS_OK;
18607 _PUBLIC_ void ndr_print_srvsvc_NetServerSetServiceBitsEx(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetServerSetServiceBitsEx *r)
18609 ndr_print_struct(ndr, name, "srvsvc_NetServerSetServiceBitsEx");
18610 ndr->depth++;
18611 if (flags & NDR_SET_VALUES) {
18612 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18614 if (flags & NDR_IN) {
18615 ndr_print_struct(ndr, "in", "srvsvc_NetServerSetServiceBitsEx");
18616 ndr->depth++;
18617 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
18618 ndr->depth++;
18619 if (r->in.server_unc) {
18620 ndr_print_string(ndr, "server_unc", r->in.server_unc);
18622 ndr->depth--;
18623 ndr_print_ptr(ndr, "emulated_server_unc", r->in.emulated_server_unc);
18624 ndr->depth++;
18625 if (r->in.emulated_server_unc) {
18626 ndr_print_string(ndr, "emulated_server_unc", r->in.emulated_server_unc);
18628 ndr->depth--;
18629 ndr_print_ptr(ndr, "transport", r->in.transport);
18630 ndr->depth++;
18631 if (r->in.transport) {
18632 ndr_print_string(ndr, "transport", r->in.transport);
18634 ndr->depth--;
18635 ndr_print_uint32(ndr, "servicebitsofinterest", r->in.servicebitsofinterest);
18636 ndr_print_uint32(ndr, "servicebits", r->in.servicebits);
18637 ndr_print_uint32(ndr, "updateimmediately", r->in.updateimmediately);
18638 ndr->depth--;
18640 if (flags & NDR_OUT) {
18641 ndr_print_struct(ndr, "out", "srvsvc_NetServerSetServiceBitsEx");
18642 ndr->depth++;
18643 ndr_print_WERROR(ndr, "result", r->out.result);
18644 ndr->depth--;
18646 ndr->depth--;
18649 NTSTATUS ndr_push_srvsvc_NETRDFSGETVERSION(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSGETVERSION *r)
18651 if (flags & NDR_IN) {
18653 if (flags & NDR_OUT) {
18654 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18656 return NT_STATUS_OK;
18659 NTSTATUS ndr_pull_srvsvc_NETRDFSGETVERSION(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSGETVERSION *r)
18661 if (flags & NDR_IN) {
18663 if (flags & NDR_OUT) {
18664 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18666 return NT_STATUS_OK;
18669 _PUBLIC_ void ndr_print_srvsvc_NETRDFSGETVERSION(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSGETVERSION *r)
18671 ndr_print_struct(ndr, name, "srvsvc_NETRDFSGETVERSION");
18672 ndr->depth++;
18673 if (flags & NDR_SET_VALUES) {
18674 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18676 if (flags & NDR_IN) {
18677 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSGETVERSION");
18678 ndr->depth++;
18679 ndr->depth--;
18681 if (flags & NDR_OUT) {
18682 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSGETVERSION");
18683 ndr->depth++;
18684 ndr_print_WERROR(ndr, "result", r->out.result);
18685 ndr->depth--;
18687 ndr->depth--;
18690 NTSTATUS ndr_push_srvsvc_NETRDFSCREATELOCALPARTITION(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSCREATELOCALPARTITION *r)
18692 if (flags & NDR_IN) {
18694 if (flags & NDR_OUT) {
18695 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18697 return NT_STATUS_OK;
18700 NTSTATUS ndr_pull_srvsvc_NETRDFSCREATELOCALPARTITION(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSCREATELOCALPARTITION *r)
18702 if (flags & NDR_IN) {
18704 if (flags & NDR_OUT) {
18705 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18707 return NT_STATUS_OK;
18710 _PUBLIC_ void ndr_print_srvsvc_NETRDFSCREATELOCALPARTITION(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSCREATELOCALPARTITION *r)
18712 ndr_print_struct(ndr, name, "srvsvc_NETRDFSCREATELOCALPARTITION");
18713 ndr->depth++;
18714 if (flags & NDR_SET_VALUES) {
18715 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18717 if (flags & NDR_IN) {
18718 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSCREATELOCALPARTITION");
18719 ndr->depth++;
18720 ndr->depth--;
18722 if (flags & NDR_OUT) {
18723 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSCREATELOCALPARTITION");
18724 ndr->depth++;
18725 ndr_print_WERROR(ndr, "result", r->out.result);
18726 ndr->depth--;
18728 ndr->depth--;
18731 NTSTATUS ndr_push_srvsvc_NETRDFSDELETELOCALPARTITION(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSDELETELOCALPARTITION *r)
18733 if (flags & NDR_IN) {
18735 if (flags & NDR_OUT) {
18736 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18738 return NT_STATUS_OK;
18741 NTSTATUS ndr_pull_srvsvc_NETRDFSDELETELOCALPARTITION(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSDELETELOCALPARTITION *r)
18743 if (flags & NDR_IN) {
18745 if (flags & NDR_OUT) {
18746 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18748 return NT_STATUS_OK;
18751 _PUBLIC_ void ndr_print_srvsvc_NETRDFSDELETELOCALPARTITION(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSDELETELOCALPARTITION *r)
18753 ndr_print_struct(ndr, name, "srvsvc_NETRDFSDELETELOCALPARTITION");
18754 ndr->depth++;
18755 if (flags & NDR_SET_VALUES) {
18756 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18758 if (flags & NDR_IN) {
18759 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSDELETELOCALPARTITION");
18760 ndr->depth++;
18761 ndr->depth--;
18763 if (flags & NDR_OUT) {
18764 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSDELETELOCALPARTITION");
18765 ndr->depth++;
18766 ndr_print_WERROR(ndr, "result", r->out.result);
18767 ndr->depth--;
18769 ndr->depth--;
18772 NTSTATUS ndr_push_srvsvc_NETRDFSSETLOCALVOLUMESTATE(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSSETLOCALVOLUMESTATE *r)
18774 if (flags & NDR_IN) {
18776 if (flags & NDR_OUT) {
18777 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18779 return NT_STATUS_OK;
18782 NTSTATUS ndr_pull_srvsvc_NETRDFSSETLOCALVOLUMESTATE(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSSETLOCALVOLUMESTATE *r)
18784 if (flags & NDR_IN) {
18786 if (flags & NDR_OUT) {
18787 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18789 return NT_STATUS_OK;
18792 _PUBLIC_ void ndr_print_srvsvc_NETRDFSSETLOCALVOLUMESTATE(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSSETLOCALVOLUMESTATE *r)
18794 ndr_print_struct(ndr, name, "srvsvc_NETRDFSSETLOCALVOLUMESTATE");
18795 ndr->depth++;
18796 if (flags & NDR_SET_VALUES) {
18797 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18799 if (flags & NDR_IN) {
18800 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSSETLOCALVOLUMESTATE");
18801 ndr->depth++;
18802 ndr->depth--;
18804 if (flags & NDR_OUT) {
18805 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSSETLOCALVOLUMESTATE");
18806 ndr->depth++;
18807 ndr_print_WERROR(ndr, "result", r->out.result);
18808 ndr->depth--;
18810 ndr->depth--;
18813 NTSTATUS ndr_push_srvsvc_NETRDFSSETSERVERINFO(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSSETSERVERINFO *r)
18815 if (flags & NDR_IN) {
18817 if (flags & NDR_OUT) {
18818 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18820 return NT_STATUS_OK;
18823 NTSTATUS ndr_pull_srvsvc_NETRDFSSETSERVERINFO(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSSETSERVERINFO *r)
18825 if (flags & NDR_IN) {
18827 if (flags & NDR_OUT) {
18828 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18830 return NT_STATUS_OK;
18833 _PUBLIC_ void ndr_print_srvsvc_NETRDFSSETSERVERINFO(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSSETSERVERINFO *r)
18835 ndr_print_struct(ndr, name, "srvsvc_NETRDFSSETSERVERINFO");
18836 ndr->depth++;
18837 if (flags & NDR_SET_VALUES) {
18838 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18840 if (flags & NDR_IN) {
18841 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSSETSERVERINFO");
18842 ndr->depth++;
18843 ndr->depth--;
18845 if (flags & NDR_OUT) {
18846 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSSETSERVERINFO");
18847 ndr->depth++;
18848 ndr_print_WERROR(ndr, "result", r->out.result);
18849 ndr->depth--;
18851 ndr->depth--;
18854 NTSTATUS ndr_push_srvsvc_NETRDFSCREATEEXITPOINT(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSCREATEEXITPOINT *r)
18856 if (flags & NDR_IN) {
18858 if (flags & NDR_OUT) {
18859 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18861 return NT_STATUS_OK;
18864 NTSTATUS ndr_pull_srvsvc_NETRDFSCREATEEXITPOINT(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSCREATEEXITPOINT *r)
18866 if (flags & NDR_IN) {
18868 if (flags & NDR_OUT) {
18869 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18871 return NT_STATUS_OK;
18874 _PUBLIC_ void ndr_print_srvsvc_NETRDFSCREATEEXITPOINT(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSCREATEEXITPOINT *r)
18876 ndr_print_struct(ndr, name, "srvsvc_NETRDFSCREATEEXITPOINT");
18877 ndr->depth++;
18878 if (flags & NDR_SET_VALUES) {
18879 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18881 if (flags & NDR_IN) {
18882 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSCREATEEXITPOINT");
18883 ndr->depth++;
18884 ndr->depth--;
18886 if (flags & NDR_OUT) {
18887 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSCREATEEXITPOINT");
18888 ndr->depth++;
18889 ndr_print_WERROR(ndr, "result", r->out.result);
18890 ndr->depth--;
18892 ndr->depth--;
18895 NTSTATUS ndr_push_srvsvc_NETRDFSDELETEEXITPOINT(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSDELETEEXITPOINT *r)
18897 if (flags & NDR_IN) {
18899 if (flags & NDR_OUT) {
18900 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18902 return NT_STATUS_OK;
18905 NTSTATUS ndr_pull_srvsvc_NETRDFSDELETEEXITPOINT(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSDELETEEXITPOINT *r)
18907 if (flags & NDR_IN) {
18909 if (flags & NDR_OUT) {
18910 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18912 return NT_STATUS_OK;
18915 _PUBLIC_ void ndr_print_srvsvc_NETRDFSDELETEEXITPOINT(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSDELETEEXITPOINT *r)
18917 ndr_print_struct(ndr, name, "srvsvc_NETRDFSDELETEEXITPOINT");
18918 ndr->depth++;
18919 if (flags & NDR_SET_VALUES) {
18920 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18922 if (flags & NDR_IN) {
18923 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSDELETEEXITPOINT");
18924 ndr->depth++;
18925 ndr->depth--;
18927 if (flags & NDR_OUT) {
18928 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSDELETEEXITPOINT");
18929 ndr->depth++;
18930 ndr_print_WERROR(ndr, "result", r->out.result);
18931 ndr->depth--;
18933 ndr->depth--;
18936 NTSTATUS ndr_push_srvsvc_NETRDFSMODIFYPREFIX(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSMODIFYPREFIX *r)
18938 if (flags & NDR_IN) {
18940 if (flags & NDR_OUT) {
18941 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18943 return NT_STATUS_OK;
18946 NTSTATUS ndr_pull_srvsvc_NETRDFSMODIFYPREFIX(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSMODIFYPREFIX *r)
18948 if (flags & NDR_IN) {
18950 if (flags & NDR_OUT) {
18951 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18953 return NT_STATUS_OK;
18956 _PUBLIC_ void ndr_print_srvsvc_NETRDFSMODIFYPREFIX(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSMODIFYPREFIX *r)
18958 ndr_print_struct(ndr, name, "srvsvc_NETRDFSMODIFYPREFIX");
18959 ndr->depth++;
18960 if (flags & NDR_SET_VALUES) {
18961 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18963 if (flags & NDR_IN) {
18964 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSMODIFYPREFIX");
18965 ndr->depth++;
18966 ndr->depth--;
18968 if (flags & NDR_OUT) {
18969 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSMODIFYPREFIX");
18970 ndr->depth++;
18971 ndr_print_WERROR(ndr, "result", r->out.result);
18972 ndr->depth--;
18974 ndr->depth--;
18977 NTSTATUS ndr_push_srvsvc_NETRDFSFIXLOCALVOLUME(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSFIXLOCALVOLUME *r)
18979 if (flags & NDR_IN) {
18981 if (flags & NDR_OUT) {
18982 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18984 return NT_STATUS_OK;
18987 NTSTATUS ndr_pull_srvsvc_NETRDFSFIXLOCALVOLUME(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSFIXLOCALVOLUME *r)
18989 if (flags & NDR_IN) {
18991 if (flags & NDR_OUT) {
18992 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18994 return NT_STATUS_OK;
18997 _PUBLIC_ void ndr_print_srvsvc_NETRDFSFIXLOCALVOLUME(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSFIXLOCALVOLUME *r)
18999 ndr_print_struct(ndr, name, "srvsvc_NETRDFSFIXLOCALVOLUME");
19000 ndr->depth++;
19001 if (flags & NDR_SET_VALUES) {
19002 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19004 if (flags & NDR_IN) {
19005 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSFIXLOCALVOLUME");
19006 ndr->depth++;
19007 ndr->depth--;
19009 if (flags & NDR_OUT) {
19010 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSFIXLOCALVOLUME");
19011 ndr->depth++;
19012 ndr_print_WERROR(ndr, "result", r->out.result);
19013 ndr->depth--;
19015 ndr->depth--;
19018 NTSTATUS ndr_push_srvsvc_NETRDFSMANAGERREPORTSITEINFO(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSMANAGERREPORTSITEINFO *r)
19020 if (flags & NDR_IN) {
19022 if (flags & NDR_OUT) {
19023 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19025 return NT_STATUS_OK;
19028 NTSTATUS ndr_pull_srvsvc_NETRDFSMANAGERREPORTSITEINFO(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSMANAGERREPORTSITEINFO *r)
19030 if (flags & NDR_IN) {
19032 if (flags & NDR_OUT) {
19033 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19035 return NT_STATUS_OK;
19038 _PUBLIC_ void ndr_print_srvsvc_NETRDFSMANAGERREPORTSITEINFO(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSMANAGERREPORTSITEINFO *r)
19040 ndr_print_struct(ndr, name, "srvsvc_NETRDFSMANAGERREPORTSITEINFO");
19041 ndr->depth++;
19042 if (flags & NDR_SET_VALUES) {
19043 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19045 if (flags & NDR_IN) {
19046 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSMANAGERREPORTSITEINFO");
19047 ndr->depth++;
19048 ndr->depth--;
19050 if (flags & NDR_OUT) {
19051 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSMANAGERREPORTSITEINFO");
19052 ndr->depth++;
19053 ndr_print_WERROR(ndr, "result", r->out.result);
19054 ndr->depth--;
19056 ndr->depth--;
19059 NTSTATUS ndr_push_srvsvc_NETRSERVERTRANSPORTDELEX(struct ndr_push *ndr, int flags, const struct srvsvc_NETRSERVERTRANSPORTDELEX *r)
19061 if (flags & NDR_IN) {
19063 if (flags & NDR_OUT) {
19064 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19066 return NT_STATUS_OK;
19069 NTSTATUS ndr_pull_srvsvc_NETRSERVERTRANSPORTDELEX(struct ndr_pull *ndr, int flags, struct srvsvc_NETRSERVERTRANSPORTDELEX *r)
19071 if (flags & NDR_IN) {
19073 if (flags & NDR_OUT) {
19074 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19076 return NT_STATUS_OK;
19079 _PUBLIC_ void ndr_print_srvsvc_NETRSERVERTRANSPORTDELEX(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRSERVERTRANSPORTDELEX *r)
19081 ndr_print_struct(ndr, name, "srvsvc_NETRSERVERTRANSPORTDELEX");
19082 ndr->depth++;
19083 if (flags & NDR_SET_VALUES) {
19084 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19086 if (flags & NDR_IN) {
19087 ndr_print_struct(ndr, "in", "srvsvc_NETRSERVERTRANSPORTDELEX");
19088 ndr->depth++;
19089 ndr->depth--;
19091 if (flags & NDR_OUT) {
19092 ndr_print_struct(ndr, "out", "srvsvc_NETRSERVERTRANSPORTDELEX");
19093 ndr->depth++;
19094 ndr_print_WERROR(ndr, "result", r->out.result);
19095 ndr->depth--;
19097 ndr->depth--;
19100 const struct ndr_interface_call srvsvc_calls[] = {
19102 "srvsvc_NetCharDevEnum",
19103 sizeof(struct srvsvc_NetCharDevEnum),
19104 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevEnum,
19105 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevEnum,
19106 (ndr_print_function_t) ndr_print_srvsvc_NetCharDevEnum,
19107 False,
19110 "srvsvc_NetCharDevGetInfo",
19111 sizeof(struct srvsvc_NetCharDevGetInfo),
19112 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevGetInfo,
19113 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevGetInfo,
19114 (ndr_print_function_t) ndr_print_srvsvc_NetCharDevGetInfo,
19115 False,
19118 "srvsvc_NetCharDevControl",
19119 sizeof(struct srvsvc_NetCharDevControl),
19120 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevControl,
19121 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevControl,
19122 (ndr_print_function_t) ndr_print_srvsvc_NetCharDevControl,
19123 False,
19126 "srvsvc_NetCharDevQEnum",
19127 sizeof(struct srvsvc_NetCharDevQEnum),
19128 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevQEnum,
19129 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevQEnum,
19130 (ndr_print_function_t) ndr_print_srvsvc_NetCharDevQEnum,
19131 False,
19134 "srvsvc_NetCharDevQGetInfo",
19135 sizeof(struct srvsvc_NetCharDevQGetInfo),
19136 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevQGetInfo,
19137 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevQGetInfo,
19138 (ndr_print_function_t) ndr_print_srvsvc_NetCharDevQGetInfo,
19139 False,
19142 "srvsvc_NetCharDevQSetInfo",
19143 sizeof(struct srvsvc_NetCharDevQSetInfo),
19144 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevQSetInfo,
19145 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevQSetInfo,
19146 (ndr_print_function_t) ndr_print_srvsvc_NetCharDevQSetInfo,
19147 False,
19150 "srvsvc_NetCharDevQPurge",
19151 sizeof(struct srvsvc_NetCharDevQPurge),
19152 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevQPurge,
19153 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevQPurge,
19154 (ndr_print_function_t) ndr_print_srvsvc_NetCharDevQPurge,
19155 False,
19158 "srvsvc_NetCharDevQPurgeSelf",
19159 sizeof(struct srvsvc_NetCharDevQPurgeSelf),
19160 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevQPurgeSelf,
19161 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevQPurgeSelf,
19162 (ndr_print_function_t) ndr_print_srvsvc_NetCharDevQPurgeSelf,
19163 False,
19166 "srvsvc_NetConnEnum",
19167 sizeof(struct srvsvc_NetConnEnum),
19168 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetConnEnum,
19169 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetConnEnum,
19170 (ndr_print_function_t) ndr_print_srvsvc_NetConnEnum,
19171 False,
19174 "srvsvc_NetFileEnum",
19175 sizeof(struct srvsvc_NetFileEnum),
19176 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetFileEnum,
19177 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetFileEnum,
19178 (ndr_print_function_t) ndr_print_srvsvc_NetFileEnum,
19179 False,
19182 "srvsvc_NetFileGetInfo",
19183 sizeof(struct srvsvc_NetFileGetInfo),
19184 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetFileGetInfo,
19185 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetFileGetInfo,
19186 (ndr_print_function_t) ndr_print_srvsvc_NetFileGetInfo,
19187 False,
19190 "srvsvc_NetFileClose",
19191 sizeof(struct srvsvc_NetFileClose),
19192 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetFileClose,
19193 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetFileClose,
19194 (ndr_print_function_t) ndr_print_srvsvc_NetFileClose,
19195 False,
19198 "srvsvc_NetSessEnum",
19199 sizeof(struct srvsvc_NetSessEnum),
19200 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetSessEnum,
19201 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetSessEnum,
19202 (ndr_print_function_t) ndr_print_srvsvc_NetSessEnum,
19203 False,
19206 "srvsvc_NetSessDel",
19207 sizeof(struct srvsvc_NetSessDel),
19208 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetSessDel,
19209 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetSessDel,
19210 (ndr_print_function_t) ndr_print_srvsvc_NetSessDel,
19211 False,
19214 "srvsvc_NetShareAdd",
19215 sizeof(struct srvsvc_NetShareAdd),
19216 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareAdd,
19217 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareAdd,
19218 (ndr_print_function_t) ndr_print_srvsvc_NetShareAdd,
19219 False,
19222 "srvsvc_NetShareEnumAll",
19223 sizeof(struct srvsvc_NetShareEnumAll),
19224 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareEnumAll,
19225 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareEnumAll,
19226 (ndr_print_function_t) ndr_print_srvsvc_NetShareEnumAll,
19227 False,
19230 "srvsvc_NetShareGetInfo",
19231 sizeof(struct srvsvc_NetShareGetInfo),
19232 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareGetInfo,
19233 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareGetInfo,
19234 (ndr_print_function_t) ndr_print_srvsvc_NetShareGetInfo,
19235 False,
19238 "srvsvc_NetShareSetInfo",
19239 sizeof(struct srvsvc_NetShareSetInfo),
19240 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareSetInfo,
19241 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareSetInfo,
19242 (ndr_print_function_t) ndr_print_srvsvc_NetShareSetInfo,
19243 False,
19246 "srvsvc_NetShareDel",
19247 sizeof(struct srvsvc_NetShareDel),
19248 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareDel,
19249 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareDel,
19250 (ndr_print_function_t) ndr_print_srvsvc_NetShareDel,
19251 False,
19254 "srvsvc_NetShareDelSticky",
19255 sizeof(struct srvsvc_NetShareDelSticky),
19256 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareDelSticky,
19257 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareDelSticky,
19258 (ndr_print_function_t) ndr_print_srvsvc_NetShareDelSticky,
19259 False,
19262 "srvsvc_NetShareCheck",
19263 sizeof(struct srvsvc_NetShareCheck),
19264 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareCheck,
19265 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareCheck,
19266 (ndr_print_function_t) ndr_print_srvsvc_NetShareCheck,
19267 False,
19270 "srvsvc_NetSrvGetInfo",
19271 sizeof(struct srvsvc_NetSrvGetInfo),
19272 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetSrvGetInfo,
19273 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetSrvGetInfo,
19274 (ndr_print_function_t) ndr_print_srvsvc_NetSrvGetInfo,
19275 False,
19278 "srvsvc_NetSrvSetInfo",
19279 sizeof(struct srvsvc_NetSrvSetInfo),
19280 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetSrvSetInfo,
19281 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetSrvSetInfo,
19282 (ndr_print_function_t) ndr_print_srvsvc_NetSrvSetInfo,
19283 False,
19286 "srvsvc_NetDiskEnum",
19287 sizeof(struct srvsvc_NetDiskEnum),
19288 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetDiskEnum,
19289 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetDiskEnum,
19290 (ndr_print_function_t) ndr_print_srvsvc_NetDiskEnum,
19291 False,
19294 "srvsvc_NetServerStatisticsGet",
19295 sizeof(struct srvsvc_NetServerStatisticsGet),
19296 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetServerStatisticsGet,
19297 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetServerStatisticsGet,
19298 (ndr_print_function_t) ndr_print_srvsvc_NetServerStatisticsGet,
19299 False,
19302 "srvsvc_NetTransportAdd",
19303 sizeof(struct srvsvc_NetTransportAdd),
19304 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetTransportAdd,
19305 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetTransportAdd,
19306 (ndr_print_function_t) ndr_print_srvsvc_NetTransportAdd,
19307 False,
19310 "srvsvc_NetTransportEnum",
19311 sizeof(struct srvsvc_NetTransportEnum),
19312 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetTransportEnum,
19313 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetTransportEnum,
19314 (ndr_print_function_t) ndr_print_srvsvc_NetTransportEnum,
19315 False,
19318 "srvsvc_NetTransportDel",
19319 sizeof(struct srvsvc_NetTransportDel),
19320 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetTransportDel,
19321 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetTransportDel,
19322 (ndr_print_function_t) ndr_print_srvsvc_NetTransportDel,
19323 False,
19326 "srvsvc_NetRemoteTOD",
19327 sizeof(struct srvsvc_NetRemoteTOD),
19328 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetRemoteTOD,
19329 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetRemoteTOD,
19330 (ndr_print_function_t) ndr_print_srvsvc_NetRemoteTOD,
19331 False,
19334 "srvsvc_NetSetServiceBits",
19335 sizeof(struct srvsvc_NetSetServiceBits),
19336 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetSetServiceBits,
19337 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetSetServiceBits,
19338 (ndr_print_function_t) ndr_print_srvsvc_NetSetServiceBits,
19339 False,
19342 "srvsvc_NetPathType",
19343 sizeof(struct srvsvc_NetPathType),
19344 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetPathType,
19345 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetPathType,
19346 (ndr_print_function_t) ndr_print_srvsvc_NetPathType,
19347 False,
19350 "srvsvc_NetPathCanonicalize",
19351 sizeof(struct srvsvc_NetPathCanonicalize),
19352 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetPathCanonicalize,
19353 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetPathCanonicalize,
19354 (ndr_print_function_t) ndr_print_srvsvc_NetPathCanonicalize,
19355 False,
19358 "srvsvc_NetPathCompare",
19359 sizeof(struct srvsvc_NetPathCompare),
19360 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetPathCompare,
19361 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetPathCompare,
19362 (ndr_print_function_t) ndr_print_srvsvc_NetPathCompare,
19363 False,
19366 "srvsvc_NetNameValidate",
19367 sizeof(struct srvsvc_NetNameValidate),
19368 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetNameValidate,
19369 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetNameValidate,
19370 (ndr_print_function_t) ndr_print_srvsvc_NetNameValidate,
19371 False,
19374 "srvsvc_NETRPRNAMECANONICALIZE",
19375 sizeof(struct srvsvc_NETRPRNAMECANONICALIZE),
19376 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRPRNAMECANONICALIZE,
19377 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRPRNAMECANONICALIZE,
19378 (ndr_print_function_t) ndr_print_srvsvc_NETRPRNAMECANONICALIZE,
19379 False,
19382 "srvsvc_NetPRNameCompare",
19383 sizeof(struct srvsvc_NetPRNameCompare),
19384 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetPRNameCompare,
19385 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetPRNameCompare,
19386 (ndr_print_function_t) ndr_print_srvsvc_NetPRNameCompare,
19387 False,
19390 "srvsvc_NetShareEnum",
19391 sizeof(struct srvsvc_NetShareEnum),
19392 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareEnum,
19393 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareEnum,
19394 (ndr_print_function_t) ndr_print_srvsvc_NetShareEnum,
19395 False,
19398 "srvsvc_NetShareDelStart",
19399 sizeof(struct srvsvc_NetShareDelStart),
19400 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareDelStart,
19401 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareDelStart,
19402 (ndr_print_function_t) ndr_print_srvsvc_NetShareDelStart,
19403 False,
19406 "srvsvc_NetShareDelCommit",
19407 sizeof(struct srvsvc_NetShareDelCommit),
19408 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareDelCommit,
19409 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareDelCommit,
19410 (ndr_print_function_t) ndr_print_srvsvc_NetShareDelCommit,
19411 False,
19414 "srvsvc_NetGetFileSecurity",
19415 sizeof(struct srvsvc_NetGetFileSecurity),
19416 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetGetFileSecurity,
19417 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetGetFileSecurity,
19418 (ndr_print_function_t) ndr_print_srvsvc_NetGetFileSecurity,
19419 False,
19422 "srvsvc_NetSetFileSecurity",
19423 sizeof(struct srvsvc_NetSetFileSecurity),
19424 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetSetFileSecurity,
19425 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetSetFileSecurity,
19426 (ndr_print_function_t) ndr_print_srvsvc_NetSetFileSecurity,
19427 False,
19430 "srvsvc_NetServerTransportAddEx",
19431 sizeof(struct srvsvc_NetServerTransportAddEx),
19432 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetServerTransportAddEx,
19433 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetServerTransportAddEx,
19434 (ndr_print_function_t) ndr_print_srvsvc_NetServerTransportAddEx,
19435 False,
19438 "srvsvc_NetServerSetServiceBitsEx",
19439 sizeof(struct srvsvc_NetServerSetServiceBitsEx),
19440 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetServerSetServiceBitsEx,
19441 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetServerSetServiceBitsEx,
19442 (ndr_print_function_t) ndr_print_srvsvc_NetServerSetServiceBitsEx,
19443 False,
19446 "srvsvc_NETRDFSGETVERSION",
19447 sizeof(struct srvsvc_NETRDFSGETVERSION),
19448 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSGETVERSION,
19449 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSGETVERSION,
19450 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSGETVERSION,
19451 False,
19454 "srvsvc_NETRDFSCREATELOCALPARTITION",
19455 sizeof(struct srvsvc_NETRDFSCREATELOCALPARTITION),
19456 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSCREATELOCALPARTITION,
19457 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSCREATELOCALPARTITION,
19458 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSCREATELOCALPARTITION,
19459 False,
19462 "srvsvc_NETRDFSDELETELOCALPARTITION",
19463 sizeof(struct srvsvc_NETRDFSDELETELOCALPARTITION),
19464 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSDELETELOCALPARTITION,
19465 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSDELETELOCALPARTITION,
19466 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSDELETELOCALPARTITION,
19467 False,
19470 "srvsvc_NETRDFSSETLOCALVOLUMESTATE",
19471 sizeof(struct srvsvc_NETRDFSSETLOCALVOLUMESTATE),
19472 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSSETLOCALVOLUMESTATE,
19473 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSSETLOCALVOLUMESTATE,
19474 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSSETLOCALVOLUMESTATE,
19475 False,
19478 "srvsvc_NETRDFSSETSERVERINFO",
19479 sizeof(struct srvsvc_NETRDFSSETSERVERINFO),
19480 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSSETSERVERINFO,
19481 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSSETSERVERINFO,
19482 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSSETSERVERINFO,
19483 False,
19486 "srvsvc_NETRDFSCREATEEXITPOINT",
19487 sizeof(struct srvsvc_NETRDFSCREATEEXITPOINT),
19488 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSCREATEEXITPOINT,
19489 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSCREATEEXITPOINT,
19490 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSCREATEEXITPOINT,
19491 False,
19494 "srvsvc_NETRDFSDELETEEXITPOINT",
19495 sizeof(struct srvsvc_NETRDFSDELETEEXITPOINT),
19496 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSDELETEEXITPOINT,
19497 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSDELETEEXITPOINT,
19498 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSDELETEEXITPOINT,
19499 False,
19502 "srvsvc_NETRDFSMODIFYPREFIX",
19503 sizeof(struct srvsvc_NETRDFSMODIFYPREFIX),
19504 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSMODIFYPREFIX,
19505 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSMODIFYPREFIX,
19506 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSMODIFYPREFIX,
19507 False,
19510 "srvsvc_NETRDFSFIXLOCALVOLUME",
19511 sizeof(struct srvsvc_NETRDFSFIXLOCALVOLUME),
19512 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSFIXLOCALVOLUME,
19513 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSFIXLOCALVOLUME,
19514 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSFIXLOCALVOLUME,
19515 False,
19518 "srvsvc_NETRDFSMANAGERREPORTSITEINFO",
19519 sizeof(struct srvsvc_NETRDFSMANAGERREPORTSITEINFO),
19520 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSMANAGERREPORTSITEINFO,
19521 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSMANAGERREPORTSITEINFO,
19522 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSMANAGERREPORTSITEINFO,
19523 False,
19526 "srvsvc_NETRSERVERTRANSPORTDELEX",
19527 sizeof(struct srvsvc_NETRSERVERTRANSPORTDELEX),
19528 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRSERVERTRANSPORTDELEX,
19529 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRSERVERTRANSPORTDELEX,
19530 (ndr_print_function_t) ndr_print_srvsvc_NETRSERVERTRANSPORTDELEX,
19531 False,
19533 { NULL, 0, NULL, NULL, NULL, False }
19536 const char * const srvsvc_endpoint_strings[] = {
19537 "ncacn_np:[\\pipe\\srvsvc]",
19538 "ncacn_ip_tcp:",
19539 "ncalrpc:",
19542 const struct ndr_interface_string_array srvsvc_endpoints = {
19543 .count = 3,
19544 .names = srvsvc_endpoint_strings
19547 const char * const srvsvc_authservice_strings[] = {
19548 "host",
19551 const struct ndr_interface_string_array srvsvc_authservices = {
19552 .count = 3,
19553 .names = srvsvc_authservice_strings
19557 const struct dcerpc_interface_table dcerpc_table_srvsvc = {
19558 .name = "srvsvc",
19559 .syntax_id = {
19560 {0x4b324fc8,0x1670,0x01d3,{0x12,0x78},{0x5a,0x47,0xbf,0x6e,0xe1,0x88}},
19561 DCERPC_SRVSVC_VERSION
19563 .helpstring = DCERPC_SRVSVC_HELPSTRING,
19564 .num_calls = 54,
19565 .calls = srvsvc_calls,
19566 .endpoints = &srvsvc_endpoints,
19567 .authservices = &srvsvc_authservices