WHATSNEW: Start release notes for Samba 3.5.21.
[Samba.git] / librpc / gen_ndr / ndr_srvsvc.c
blob5a87197ed2cad6e09f8b9b937a7d18ef138576e2
1 /* parser auto-generated by pidl */
3 #include "includes.h"
4 #include "../librpc/gen_ndr/ndr_srvsvc.h"
6 #include "librpc/gen_ndr/ndr_security.h"
7 #include "librpc/gen_ndr/ndr_svcctl.h"
8 static enum ndr_err_code ndr_push_srvsvc_NetCharDevInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevInfo0 *r)
10 if (ndr_flags & NDR_SCALARS) {
11 NDR_CHECK(ndr_push_align(ndr, 5));
12 NDR_CHECK(ndr_push_unique_ptr(ndr, r->device));
13 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
15 if (ndr_flags & NDR_BUFFERS) {
16 if (r->device) {
17 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
18 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
19 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
20 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->device, ndr_charset_length(r->device, CH_UTF16), sizeof(uint16_t), CH_UTF16));
23 return NDR_ERR_SUCCESS;
26 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevInfo0 *r)
28 uint32_t _ptr_device;
29 uint32_t size_device_1 = 0;
30 uint32_t length_device_1 = 0;
31 TALLOC_CTX *_mem_save_device_0;
32 if (ndr_flags & NDR_SCALARS) {
33 NDR_CHECK(ndr_pull_align(ndr, 5));
34 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_device));
35 if (_ptr_device) {
36 NDR_PULL_ALLOC(ndr, r->device);
37 } else {
38 r->device = NULL;
40 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
42 if (ndr_flags & NDR_BUFFERS) {
43 if (r->device) {
44 _mem_save_device_0 = NDR_PULL_GET_MEM_CTX(ndr);
45 NDR_PULL_SET_MEM_CTX(ndr, r->device, 0);
46 NDR_CHECK(ndr_pull_array_size(ndr, &r->device));
47 NDR_CHECK(ndr_pull_array_length(ndr, &r->device));
48 size_device_1 = ndr_get_array_size(ndr, &r->device);
49 length_device_1 = ndr_get_array_length(ndr, &r->device);
50 if (length_device_1 > size_device_1) {
51 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_device_1, length_device_1);
53 NDR_CHECK(ndr_check_string_terminator(ndr, length_device_1, sizeof(uint16_t)));
54 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->device, length_device_1, sizeof(uint16_t), CH_UTF16));
55 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_device_0, 0);
58 return NDR_ERR_SUCCESS;
61 _PUBLIC_ void ndr_print_srvsvc_NetCharDevInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevInfo0 *r)
63 ndr_print_struct(ndr, name, "srvsvc_NetCharDevInfo0");
64 ndr->depth++;
65 ndr_print_ptr(ndr, "device", r->device);
66 ndr->depth++;
67 if (r->device) {
68 ndr_print_string(ndr, "device", r->device);
70 ndr->depth--;
71 ndr->depth--;
74 static enum ndr_err_code ndr_push_srvsvc_NetCharDevCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevCtr0 *r)
76 uint32_t cntr_array_1;
77 if (ndr_flags & NDR_SCALARS) {
78 NDR_CHECK(ndr_push_align(ndr, 5));
79 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
80 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
81 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
83 if (ndr_flags & NDR_BUFFERS) {
84 if (r->array) {
85 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
86 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
87 NDR_CHECK(ndr_push_srvsvc_NetCharDevInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
89 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
90 NDR_CHECK(ndr_push_srvsvc_NetCharDevInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
94 return NDR_ERR_SUCCESS;
97 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevCtr0 *r)
99 uint32_t _ptr_array;
100 uint32_t size_array_1 = 0;
101 uint32_t cntr_array_1;
102 TALLOC_CTX *_mem_save_array_0;
103 TALLOC_CTX *_mem_save_array_1;
104 if (ndr_flags & NDR_SCALARS) {
105 NDR_CHECK(ndr_pull_align(ndr, 5));
106 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
107 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
108 if (_ptr_array) {
109 NDR_PULL_ALLOC(ndr, r->array);
110 } else {
111 r->array = NULL;
113 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
115 if (ndr_flags & NDR_BUFFERS) {
116 if (r->array) {
117 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
118 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
119 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
120 size_array_1 = ndr_get_array_size(ndr, &r->array);
121 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
122 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
123 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
124 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
125 NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
127 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
128 NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
130 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
131 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
133 if (r->array) {
134 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
137 return NDR_ERR_SUCCESS;
140 _PUBLIC_ void ndr_print_srvsvc_NetCharDevCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevCtr0 *r)
142 uint32_t cntr_array_1;
143 ndr_print_struct(ndr, name, "srvsvc_NetCharDevCtr0");
144 ndr->depth++;
145 ndr_print_uint32(ndr, "count", r->count);
146 ndr_print_ptr(ndr, "array", r->array);
147 ndr->depth++;
148 if (r->array) {
149 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
150 ndr->depth++;
151 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
152 char *idx_1=NULL;
153 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
154 ndr_print_srvsvc_NetCharDevInfo0(ndr, "array", &r->array[cntr_array_1]);
155 free(idx_1);
158 ndr->depth--;
160 ndr->depth--;
161 ndr->depth--;
164 static enum ndr_err_code ndr_push_srvsvc_NetCharDevInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevInfo1 *r)
166 if (ndr_flags & NDR_SCALARS) {
167 NDR_CHECK(ndr_push_align(ndr, 5));
168 NDR_CHECK(ndr_push_unique_ptr(ndr, r->device));
169 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->status));
170 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
171 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
172 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
174 if (ndr_flags & NDR_BUFFERS) {
175 if (r->device) {
176 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
177 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
178 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
179 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->device, ndr_charset_length(r->device, CH_UTF16), sizeof(uint16_t), CH_UTF16));
181 if (r->user) {
182 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
183 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
184 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
185 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
188 return NDR_ERR_SUCCESS;
191 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevInfo1 *r)
193 uint32_t _ptr_device;
194 uint32_t size_device_1 = 0;
195 uint32_t length_device_1 = 0;
196 TALLOC_CTX *_mem_save_device_0;
197 uint32_t _ptr_user;
198 uint32_t size_user_1 = 0;
199 uint32_t length_user_1 = 0;
200 TALLOC_CTX *_mem_save_user_0;
201 if (ndr_flags & NDR_SCALARS) {
202 NDR_CHECK(ndr_pull_align(ndr, 5));
203 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_device));
204 if (_ptr_device) {
205 NDR_PULL_ALLOC(ndr, r->device);
206 } else {
207 r->device = NULL;
209 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->status));
210 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
211 if (_ptr_user) {
212 NDR_PULL_ALLOC(ndr, r->user);
213 } else {
214 r->user = NULL;
216 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
217 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
219 if (ndr_flags & NDR_BUFFERS) {
220 if (r->device) {
221 _mem_save_device_0 = NDR_PULL_GET_MEM_CTX(ndr);
222 NDR_PULL_SET_MEM_CTX(ndr, r->device, 0);
223 NDR_CHECK(ndr_pull_array_size(ndr, &r->device));
224 NDR_CHECK(ndr_pull_array_length(ndr, &r->device));
225 size_device_1 = ndr_get_array_size(ndr, &r->device);
226 length_device_1 = ndr_get_array_length(ndr, &r->device);
227 if (length_device_1 > size_device_1) {
228 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_device_1, length_device_1);
230 NDR_CHECK(ndr_check_string_terminator(ndr, length_device_1, sizeof(uint16_t)));
231 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->device, length_device_1, sizeof(uint16_t), CH_UTF16));
232 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_device_0, 0);
234 if (r->user) {
235 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
236 NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
237 NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
238 NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
239 size_user_1 = ndr_get_array_size(ndr, &r->user);
240 length_user_1 = ndr_get_array_length(ndr, &r->user);
241 if (length_user_1 > size_user_1) {
242 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_user_1, length_user_1);
244 NDR_CHECK(ndr_check_string_terminator(ndr, length_user_1, sizeof(uint16_t)));
245 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, length_user_1, sizeof(uint16_t), CH_UTF16));
246 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
249 return NDR_ERR_SUCCESS;
252 _PUBLIC_ void ndr_print_srvsvc_NetCharDevInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevInfo1 *r)
254 ndr_print_struct(ndr, name, "srvsvc_NetCharDevInfo1");
255 ndr->depth++;
256 ndr_print_ptr(ndr, "device", r->device);
257 ndr->depth++;
258 if (r->device) {
259 ndr_print_string(ndr, "device", r->device);
261 ndr->depth--;
262 ndr_print_uint32(ndr, "status", r->status);
263 ndr_print_ptr(ndr, "user", r->user);
264 ndr->depth++;
265 if (r->user) {
266 ndr_print_string(ndr, "user", r->user);
268 ndr->depth--;
269 ndr_print_uint32(ndr, "time", r->time);
270 ndr->depth--;
273 static enum ndr_err_code ndr_push_srvsvc_NetCharDevCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevCtr1 *r)
275 uint32_t cntr_array_1;
276 if (ndr_flags & NDR_SCALARS) {
277 NDR_CHECK(ndr_push_align(ndr, 5));
278 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
279 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
280 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
282 if (ndr_flags & NDR_BUFFERS) {
283 if (r->array) {
284 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
285 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
286 NDR_CHECK(ndr_push_srvsvc_NetCharDevInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
288 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
289 NDR_CHECK(ndr_push_srvsvc_NetCharDevInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
293 return NDR_ERR_SUCCESS;
296 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevCtr1 *r)
298 uint32_t _ptr_array;
299 uint32_t size_array_1 = 0;
300 uint32_t cntr_array_1;
301 TALLOC_CTX *_mem_save_array_0;
302 TALLOC_CTX *_mem_save_array_1;
303 if (ndr_flags & NDR_SCALARS) {
304 NDR_CHECK(ndr_pull_align(ndr, 5));
305 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
306 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
307 if (_ptr_array) {
308 NDR_PULL_ALLOC(ndr, r->array);
309 } else {
310 r->array = NULL;
312 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
314 if (ndr_flags & NDR_BUFFERS) {
315 if (r->array) {
316 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
317 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
318 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
319 size_array_1 = ndr_get_array_size(ndr, &r->array);
320 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
321 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
322 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
323 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
324 NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
326 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
327 NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
329 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
330 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
332 if (r->array) {
333 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
336 return NDR_ERR_SUCCESS;
339 _PUBLIC_ void ndr_print_srvsvc_NetCharDevCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevCtr1 *r)
341 uint32_t cntr_array_1;
342 ndr_print_struct(ndr, name, "srvsvc_NetCharDevCtr1");
343 ndr->depth++;
344 ndr_print_uint32(ndr, "count", r->count);
345 ndr_print_ptr(ndr, "array", r->array);
346 ndr->depth++;
347 if (r->array) {
348 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
349 ndr->depth++;
350 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
351 char *idx_1=NULL;
352 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
353 ndr_print_srvsvc_NetCharDevInfo1(ndr, "array", &r->array[cntr_array_1]);
354 free(idx_1);
357 ndr->depth--;
359 ndr->depth--;
360 ndr->depth--;
363 static enum ndr_err_code ndr_push_srvsvc_NetCharDevInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetCharDevInfo *r)
365 if (ndr_flags & NDR_SCALARS) {
366 int level = ndr_push_get_switch_value(ndr, r);
367 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
368 NDR_CHECK(ndr_push_union_align(ndr, 5));
369 switch (level) {
370 case 0: {
371 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
372 break; }
374 case 1: {
375 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
376 break; }
378 default: {
379 break; }
383 if (ndr_flags & NDR_BUFFERS) {
384 int level = ndr_push_get_switch_value(ndr, r);
385 switch (level) {
386 case 0:
387 if (r->info0) {
388 NDR_CHECK(ndr_push_srvsvc_NetCharDevInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
390 break;
392 case 1:
393 if (r->info1) {
394 NDR_CHECK(ndr_push_srvsvc_NetCharDevInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
396 break;
398 default:
399 break;
403 return NDR_ERR_SUCCESS;
406 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetCharDevInfo *r)
408 int level;
409 uint32_t _level;
410 TALLOC_CTX *_mem_save_info0_0;
411 uint32_t _ptr_info0;
412 TALLOC_CTX *_mem_save_info1_0;
413 uint32_t _ptr_info1;
414 level = ndr_pull_get_switch_value(ndr, r);
415 if (ndr_flags & NDR_SCALARS) {
416 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
417 if (_level != level) {
418 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
420 NDR_CHECK(ndr_pull_union_align(ndr, 5));
421 switch (level) {
422 case 0: {
423 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
424 if (_ptr_info0) {
425 NDR_PULL_ALLOC(ndr, r->info0);
426 } else {
427 r->info0 = NULL;
429 break; }
431 case 1: {
432 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
433 if (_ptr_info1) {
434 NDR_PULL_ALLOC(ndr, r->info1);
435 } else {
436 r->info1 = NULL;
438 break; }
440 default: {
441 break; }
445 if (ndr_flags & NDR_BUFFERS) {
446 switch (level) {
447 case 0:
448 if (r->info0) {
449 _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
450 NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
451 NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
452 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
454 break;
456 case 1:
457 if (r->info1) {
458 _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
459 NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
460 NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
461 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
463 break;
465 default:
466 break;
470 return NDR_ERR_SUCCESS;
473 _PUBLIC_ void ndr_print_srvsvc_NetCharDevInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetCharDevInfo *r)
475 int level;
476 level = ndr_print_get_switch_value(ndr, r);
477 ndr_print_union(ndr, name, level, "srvsvc_NetCharDevInfo");
478 switch (level) {
479 case 0:
480 ndr_print_ptr(ndr, "info0", r->info0);
481 ndr->depth++;
482 if (r->info0) {
483 ndr_print_srvsvc_NetCharDevInfo0(ndr, "info0", r->info0);
485 ndr->depth--;
486 break;
488 case 1:
489 ndr_print_ptr(ndr, "info1", r->info1);
490 ndr->depth++;
491 if (r->info1) {
492 ndr_print_srvsvc_NetCharDevInfo1(ndr, "info1", r->info1);
494 ndr->depth--;
495 break;
497 default:
498 break;
503 static enum ndr_err_code ndr_push_srvsvc_NetCharDevCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetCharDevCtr *r)
505 if (ndr_flags & NDR_SCALARS) {
506 int level = ndr_push_get_switch_value(ndr, r);
507 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
508 NDR_CHECK(ndr_push_union_align(ndr, 5));
509 switch (level) {
510 case 0: {
511 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0));
512 break; }
514 case 1: {
515 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
516 break; }
518 default: {
519 break; }
523 if (ndr_flags & NDR_BUFFERS) {
524 int level = ndr_push_get_switch_value(ndr, r);
525 switch (level) {
526 case 0:
527 if (r->ctr0) {
528 NDR_CHECK(ndr_push_srvsvc_NetCharDevCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
530 break;
532 case 1:
533 if (r->ctr1) {
534 NDR_CHECK(ndr_push_srvsvc_NetCharDevCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
536 break;
538 default:
539 break;
543 return NDR_ERR_SUCCESS;
546 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetCharDevCtr *r)
548 int level;
549 uint32_t _level;
550 TALLOC_CTX *_mem_save_ctr0_0;
551 uint32_t _ptr_ctr0;
552 TALLOC_CTX *_mem_save_ctr1_0;
553 uint32_t _ptr_ctr1;
554 level = ndr_pull_get_switch_value(ndr, r);
555 if (ndr_flags & NDR_SCALARS) {
556 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
557 if (_level != level) {
558 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
560 NDR_CHECK(ndr_pull_union_align(ndr, 5));
561 switch (level) {
562 case 0: {
563 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr0));
564 if (_ptr_ctr0) {
565 NDR_PULL_ALLOC(ndr, r->ctr0);
566 } else {
567 r->ctr0 = NULL;
569 break; }
571 case 1: {
572 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
573 if (_ptr_ctr1) {
574 NDR_PULL_ALLOC(ndr, r->ctr1);
575 } else {
576 r->ctr1 = NULL;
578 break; }
580 default: {
581 break; }
585 if (ndr_flags & NDR_BUFFERS) {
586 switch (level) {
587 case 0:
588 if (r->ctr0) {
589 _mem_save_ctr0_0 = NDR_PULL_GET_MEM_CTX(ndr);
590 NDR_PULL_SET_MEM_CTX(ndr, r->ctr0, 0);
591 NDR_CHECK(ndr_pull_srvsvc_NetCharDevCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
592 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr0_0, 0);
594 break;
596 case 1:
597 if (r->ctr1) {
598 _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
599 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
600 NDR_CHECK(ndr_pull_srvsvc_NetCharDevCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
601 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
603 break;
605 default:
606 break;
610 return NDR_ERR_SUCCESS;
613 _PUBLIC_ void ndr_print_srvsvc_NetCharDevCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetCharDevCtr *r)
615 int level;
616 level = ndr_print_get_switch_value(ndr, r);
617 ndr_print_union(ndr, name, level, "srvsvc_NetCharDevCtr");
618 switch (level) {
619 case 0:
620 ndr_print_ptr(ndr, "ctr0", r->ctr0);
621 ndr->depth++;
622 if (r->ctr0) {
623 ndr_print_srvsvc_NetCharDevCtr0(ndr, "ctr0", r->ctr0);
625 ndr->depth--;
626 break;
628 case 1:
629 ndr_print_ptr(ndr, "ctr1", r->ctr1);
630 ndr->depth++;
631 if (r->ctr1) {
632 ndr_print_srvsvc_NetCharDevCtr1(ndr, "ctr1", r->ctr1);
634 ndr->depth--;
635 break;
637 default:
638 break;
643 static enum ndr_err_code ndr_push_srvsvc_NetCharDevInfoCtr(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevInfoCtr *r)
645 if (ndr_flags & NDR_SCALARS) {
646 NDR_CHECK(ndr_push_align(ndr, 5));
647 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
648 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level));
649 NDR_CHECK(ndr_push_srvsvc_NetCharDevCtr(ndr, NDR_SCALARS, &r->ctr));
650 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
652 if (ndr_flags & NDR_BUFFERS) {
653 NDR_CHECK(ndr_push_srvsvc_NetCharDevCtr(ndr, NDR_BUFFERS, &r->ctr));
655 return NDR_ERR_SUCCESS;
658 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevInfoCtr(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevInfoCtr *r)
660 if (ndr_flags & NDR_SCALARS) {
661 NDR_CHECK(ndr_pull_align(ndr, 5));
662 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
663 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level));
664 NDR_CHECK(ndr_pull_srvsvc_NetCharDevCtr(ndr, NDR_SCALARS, &r->ctr));
665 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
667 if (ndr_flags & NDR_BUFFERS) {
668 NDR_CHECK(ndr_pull_srvsvc_NetCharDevCtr(ndr, NDR_BUFFERS, &r->ctr));
670 return NDR_ERR_SUCCESS;
673 _PUBLIC_ void ndr_print_srvsvc_NetCharDevInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevInfoCtr *r)
675 ndr_print_struct(ndr, name, "srvsvc_NetCharDevInfoCtr");
676 ndr->depth++;
677 ndr_print_uint32(ndr, "level", r->level);
678 ndr_print_set_switch_value(ndr, &r->ctr, r->level);
679 ndr_print_srvsvc_NetCharDevCtr(ndr, "ctr", &r->ctr);
680 ndr->depth--;
683 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevQInfo0 *r)
685 if (ndr_flags & NDR_SCALARS) {
686 NDR_CHECK(ndr_push_align(ndr, 5));
687 NDR_CHECK(ndr_push_unique_ptr(ndr, r->device));
688 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
690 if (ndr_flags & NDR_BUFFERS) {
691 if (r->device) {
692 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
693 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
694 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
695 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->device, ndr_charset_length(r->device, CH_UTF16), sizeof(uint16_t), CH_UTF16));
698 return NDR_ERR_SUCCESS;
701 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevQInfo0 *r)
703 uint32_t _ptr_device;
704 uint32_t size_device_1 = 0;
705 uint32_t length_device_1 = 0;
706 TALLOC_CTX *_mem_save_device_0;
707 if (ndr_flags & NDR_SCALARS) {
708 NDR_CHECK(ndr_pull_align(ndr, 5));
709 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_device));
710 if (_ptr_device) {
711 NDR_PULL_ALLOC(ndr, r->device);
712 } else {
713 r->device = NULL;
715 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
717 if (ndr_flags & NDR_BUFFERS) {
718 if (r->device) {
719 _mem_save_device_0 = NDR_PULL_GET_MEM_CTX(ndr);
720 NDR_PULL_SET_MEM_CTX(ndr, r->device, 0);
721 NDR_CHECK(ndr_pull_array_size(ndr, &r->device));
722 NDR_CHECK(ndr_pull_array_length(ndr, &r->device));
723 size_device_1 = ndr_get_array_size(ndr, &r->device);
724 length_device_1 = ndr_get_array_length(ndr, &r->device);
725 if (length_device_1 > size_device_1) {
726 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_device_1, length_device_1);
728 NDR_CHECK(ndr_check_string_terminator(ndr, length_device_1, sizeof(uint16_t)));
729 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->device, length_device_1, sizeof(uint16_t), CH_UTF16));
730 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_device_0, 0);
733 return NDR_ERR_SUCCESS;
736 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQInfo0 *r)
738 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQInfo0");
739 ndr->depth++;
740 ndr_print_ptr(ndr, "device", r->device);
741 ndr->depth++;
742 if (r->device) {
743 ndr_print_string(ndr, "device", r->device);
745 ndr->depth--;
746 ndr->depth--;
749 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevQCtr0 *r)
751 uint32_t cntr_array_1;
752 if (ndr_flags & NDR_SCALARS) {
753 NDR_CHECK(ndr_push_align(ndr, 5));
754 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
755 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
756 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
758 if (ndr_flags & NDR_BUFFERS) {
759 if (r->array) {
760 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
761 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
762 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
764 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
765 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
769 return NDR_ERR_SUCCESS;
772 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevQCtr0 *r)
774 uint32_t _ptr_array;
775 uint32_t size_array_1 = 0;
776 uint32_t cntr_array_1;
777 TALLOC_CTX *_mem_save_array_0;
778 TALLOC_CTX *_mem_save_array_1;
779 if (ndr_flags & NDR_SCALARS) {
780 NDR_CHECK(ndr_pull_align(ndr, 5));
781 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
782 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
783 if (_ptr_array) {
784 NDR_PULL_ALLOC(ndr, r->array);
785 } else {
786 r->array = NULL;
788 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
790 if (ndr_flags & NDR_BUFFERS) {
791 if (r->array) {
792 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
793 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
794 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
795 size_array_1 = ndr_get_array_size(ndr, &r->array);
796 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
797 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
798 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
799 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
800 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
802 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
803 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
805 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
806 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
808 if (r->array) {
809 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
812 return NDR_ERR_SUCCESS;
815 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQCtr0 *r)
817 uint32_t cntr_array_1;
818 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQCtr0");
819 ndr->depth++;
820 ndr_print_uint32(ndr, "count", r->count);
821 ndr_print_ptr(ndr, "array", r->array);
822 ndr->depth++;
823 if (r->array) {
824 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
825 ndr->depth++;
826 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
827 char *idx_1=NULL;
828 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
829 ndr_print_srvsvc_NetCharDevQInfo0(ndr, "array", &r->array[cntr_array_1]);
830 free(idx_1);
833 ndr->depth--;
835 ndr->depth--;
836 ndr->depth--;
839 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevQInfo1 *r)
841 if (ndr_flags & NDR_SCALARS) {
842 NDR_CHECK(ndr_push_align(ndr, 5));
843 NDR_CHECK(ndr_push_unique_ptr(ndr, r->device));
844 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->priority));
845 NDR_CHECK(ndr_push_unique_ptr(ndr, r->devices));
846 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->users));
847 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_ahead));
848 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
850 if (ndr_flags & NDR_BUFFERS) {
851 if (r->device) {
852 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
853 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
854 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
855 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->device, ndr_charset_length(r->device, CH_UTF16), sizeof(uint16_t), CH_UTF16));
857 if (r->devices) {
858 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->devices, CH_UTF16)));
859 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
860 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->devices, CH_UTF16)));
861 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->devices, ndr_charset_length(r->devices, CH_UTF16), sizeof(uint16_t), CH_UTF16));
864 return NDR_ERR_SUCCESS;
867 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevQInfo1 *r)
869 uint32_t _ptr_device;
870 uint32_t size_device_1 = 0;
871 uint32_t length_device_1 = 0;
872 TALLOC_CTX *_mem_save_device_0;
873 uint32_t _ptr_devices;
874 uint32_t size_devices_1 = 0;
875 uint32_t length_devices_1 = 0;
876 TALLOC_CTX *_mem_save_devices_0;
877 if (ndr_flags & NDR_SCALARS) {
878 NDR_CHECK(ndr_pull_align(ndr, 5));
879 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_device));
880 if (_ptr_device) {
881 NDR_PULL_ALLOC(ndr, r->device);
882 } else {
883 r->device = NULL;
885 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->priority));
886 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_devices));
887 if (_ptr_devices) {
888 NDR_PULL_ALLOC(ndr, r->devices);
889 } else {
890 r->devices = NULL;
892 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->users));
893 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_ahead));
894 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
896 if (ndr_flags & NDR_BUFFERS) {
897 if (r->device) {
898 _mem_save_device_0 = NDR_PULL_GET_MEM_CTX(ndr);
899 NDR_PULL_SET_MEM_CTX(ndr, r->device, 0);
900 NDR_CHECK(ndr_pull_array_size(ndr, &r->device));
901 NDR_CHECK(ndr_pull_array_length(ndr, &r->device));
902 size_device_1 = ndr_get_array_size(ndr, &r->device);
903 length_device_1 = ndr_get_array_length(ndr, &r->device);
904 if (length_device_1 > size_device_1) {
905 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_device_1, length_device_1);
907 NDR_CHECK(ndr_check_string_terminator(ndr, length_device_1, sizeof(uint16_t)));
908 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->device, length_device_1, sizeof(uint16_t), CH_UTF16));
909 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_device_0, 0);
911 if (r->devices) {
912 _mem_save_devices_0 = NDR_PULL_GET_MEM_CTX(ndr);
913 NDR_PULL_SET_MEM_CTX(ndr, r->devices, 0);
914 NDR_CHECK(ndr_pull_array_size(ndr, &r->devices));
915 NDR_CHECK(ndr_pull_array_length(ndr, &r->devices));
916 size_devices_1 = ndr_get_array_size(ndr, &r->devices);
917 length_devices_1 = ndr_get_array_length(ndr, &r->devices);
918 if (length_devices_1 > size_devices_1) {
919 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_devices_1, length_devices_1);
921 NDR_CHECK(ndr_check_string_terminator(ndr, length_devices_1, sizeof(uint16_t)));
922 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->devices, length_devices_1, sizeof(uint16_t), CH_UTF16));
923 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_devices_0, 0);
926 return NDR_ERR_SUCCESS;
929 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQInfo1 *r)
931 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQInfo1");
932 ndr->depth++;
933 ndr_print_ptr(ndr, "device", r->device);
934 ndr->depth++;
935 if (r->device) {
936 ndr_print_string(ndr, "device", r->device);
938 ndr->depth--;
939 ndr_print_uint32(ndr, "priority", r->priority);
940 ndr_print_ptr(ndr, "devices", r->devices);
941 ndr->depth++;
942 if (r->devices) {
943 ndr_print_string(ndr, "devices", r->devices);
945 ndr->depth--;
946 ndr_print_uint32(ndr, "users", r->users);
947 ndr_print_uint32(ndr, "num_ahead", r->num_ahead);
948 ndr->depth--;
951 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevQCtr1 *r)
953 uint32_t cntr_array_1;
954 if (ndr_flags & NDR_SCALARS) {
955 NDR_CHECK(ndr_push_align(ndr, 5));
956 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
957 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
958 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
960 if (ndr_flags & NDR_BUFFERS) {
961 if (r->array) {
962 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
963 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
964 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
966 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
967 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
971 return NDR_ERR_SUCCESS;
974 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevQCtr1 *r)
976 uint32_t _ptr_array;
977 uint32_t size_array_1 = 0;
978 uint32_t cntr_array_1;
979 TALLOC_CTX *_mem_save_array_0;
980 TALLOC_CTX *_mem_save_array_1;
981 if (ndr_flags & NDR_SCALARS) {
982 NDR_CHECK(ndr_pull_align(ndr, 5));
983 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
984 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
985 if (_ptr_array) {
986 NDR_PULL_ALLOC(ndr, r->array);
987 } else {
988 r->array = NULL;
990 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
992 if (ndr_flags & NDR_BUFFERS) {
993 if (r->array) {
994 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
995 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
996 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
997 size_array_1 = ndr_get_array_size(ndr, &r->array);
998 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
999 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
1000 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
1001 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
1002 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
1004 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
1005 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
1007 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
1008 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
1010 if (r->array) {
1011 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
1014 return NDR_ERR_SUCCESS;
1017 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQCtr1 *r)
1019 uint32_t cntr_array_1;
1020 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQCtr1");
1021 ndr->depth++;
1022 ndr_print_uint32(ndr, "count", r->count);
1023 ndr_print_ptr(ndr, "array", r->array);
1024 ndr->depth++;
1025 if (r->array) {
1026 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
1027 ndr->depth++;
1028 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
1029 char *idx_1=NULL;
1030 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
1031 ndr_print_srvsvc_NetCharDevQInfo1(ndr, "array", &r->array[cntr_array_1]);
1032 free(idx_1);
1035 ndr->depth--;
1037 ndr->depth--;
1038 ndr->depth--;
1041 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetCharDevQInfo *r)
1043 if (ndr_flags & NDR_SCALARS) {
1044 int level = ndr_push_get_switch_value(ndr, r);
1045 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
1046 NDR_CHECK(ndr_push_union_align(ndr, 5));
1047 switch (level) {
1048 case 0: {
1049 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
1050 break; }
1052 case 1: {
1053 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
1054 break; }
1056 default: {
1057 break; }
1061 if (ndr_flags & NDR_BUFFERS) {
1062 int level = ndr_push_get_switch_value(ndr, r);
1063 switch (level) {
1064 case 0:
1065 if (r->info0) {
1066 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
1068 break;
1070 case 1:
1071 if (r->info1) {
1072 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
1074 break;
1076 default:
1077 break;
1081 return NDR_ERR_SUCCESS;
1084 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetCharDevQInfo *r)
1086 int level;
1087 uint32_t _level;
1088 TALLOC_CTX *_mem_save_info0_0;
1089 uint32_t _ptr_info0;
1090 TALLOC_CTX *_mem_save_info1_0;
1091 uint32_t _ptr_info1;
1092 level = ndr_pull_get_switch_value(ndr, r);
1093 if (ndr_flags & NDR_SCALARS) {
1094 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
1095 if (_level != level) {
1096 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
1098 NDR_CHECK(ndr_pull_union_align(ndr, 5));
1099 switch (level) {
1100 case 0: {
1101 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
1102 if (_ptr_info0) {
1103 NDR_PULL_ALLOC(ndr, r->info0);
1104 } else {
1105 r->info0 = NULL;
1107 break; }
1109 case 1: {
1110 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
1111 if (_ptr_info1) {
1112 NDR_PULL_ALLOC(ndr, r->info1);
1113 } else {
1114 r->info1 = NULL;
1116 break; }
1118 default: {
1119 break; }
1123 if (ndr_flags & NDR_BUFFERS) {
1124 switch (level) {
1125 case 0:
1126 if (r->info0) {
1127 _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
1128 NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
1129 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
1130 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
1132 break;
1134 case 1:
1135 if (r->info1) {
1136 _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
1137 NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
1138 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
1139 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
1141 break;
1143 default:
1144 break;
1148 return NDR_ERR_SUCCESS;
1151 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetCharDevQInfo *r)
1153 int level;
1154 level = ndr_print_get_switch_value(ndr, r);
1155 ndr_print_union(ndr, name, level, "srvsvc_NetCharDevQInfo");
1156 switch (level) {
1157 case 0:
1158 ndr_print_ptr(ndr, "info0", r->info0);
1159 ndr->depth++;
1160 if (r->info0) {
1161 ndr_print_srvsvc_NetCharDevQInfo0(ndr, "info0", r->info0);
1163 ndr->depth--;
1164 break;
1166 case 1:
1167 ndr_print_ptr(ndr, "info1", r->info1);
1168 ndr->depth++;
1169 if (r->info1) {
1170 ndr_print_srvsvc_NetCharDevQInfo1(ndr, "info1", r->info1);
1172 ndr->depth--;
1173 break;
1175 default:
1176 break;
1181 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetCharDevQCtr *r)
1183 if (ndr_flags & NDR_SCALARS) {
1184 int level = ndr_push_get_switch_value(ndr, r);
1185 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
1186 NDR_CHECK(ndr_push_union_align(ndr, 5));
1187 switch (level) {
1188 case 0: {
1189 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0));
1190 break; }
1192 case 1: {
1193 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
1194 break; }
1196 default: {
1197 break; }
1201 if (ndr_flags & NDR_BUFFERS) {
1202 int level = ndr_push_get_switch_value(ndr, r);
1203 switch (level) {
1204 case 0:
1205 if (r->ctr0) {
1206 NDR_CHECK(ndr_push_srvsvc_NetCharDevQCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
1208 break;
1210 case 1:
1211 if (r->ctr1) {
1212 NDR_CHECK(ndr_push_srvsvc_NetCharDevQCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
1214 break;
1216 default:
1217 break;
1221 return NDR_ERR_SUCCESS;
1224 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetCharDevQCtr *r)
1226 int level;
1227 uint32_t _level;
1228 TALLOC_CTX *_mem_save_ctr0_0;
1229 uint32_t _ptr_ctr0;
1230 TALLOC_CTX *_mem_save_ctr1_0;
1231 uint32_t _ptr_ctr1;
1232 level = ndr_pull_get_switch_value(ndr, r);
1233 if (ndr_flags & NDR_SCALARS) {
1234 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
1235 if (_level != level) {
1236 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
1238 NDR_CHECK(ndr_pull_union_align(ndr, 5));
1239 switch (level) {
1240 case 0: {
1241 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr0));
1242 if (_ptr_ctr0) {
1243 NDR_PULL_ALLOC(ndr, r->ctr0);
1244 } else {
1245 r->ctr0 = NULL;
1247 break; }
1249 case 1: {
1250 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
1251 if (_ptr_ctr1) {
1252 NDR_PULL_ALLOC(ndr, r->ctr1);
1253 } else {
1254 r->ctr1 = NULL;
1256 break; }
1258 default: {
1259 break; }
1263 if (ndr_flags & NDR_BUFFERS) {
1264 switch (level) {
1265 case 0:
1266 if (r->ctr0) {
1267 _mem_save_ctr0_0 = NDR_PULL_GET_MEM_CTX(ndr);
1268 NDR_PULL_SET_MEM_CTX(ndr, r->ctr0, 0);
1269 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
1270 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr0_0, 0);
1272 break;
1274 case 1:
1275 if (r->ctr1) {
1276 _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
1277 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
1278 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
1279 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
1281 break;
1283 default:
1284 break;
1288 return NDR_ERR_SUCCESS;
1291 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetCharDevQCtr *r)
1293 int level;
1294 level = ndr_print_get_switch_value(ndr, r);
1295 ndr_print_union(ndr, name, level, "srvsvc_NetCharDevQCtr");
1296 switch (level) {
1297 case 0:
1298 ndr_print_ptr(ndr, "ctr0", r->ctr0);
1299 ndr->depth++;
1300 if (r->ctr0) {
1301 ndr_print_srvsvc_NetCharDevQCtr0(ndr, "ctr0", r->ctr0);
1303 ndr->depth--;
1304 break;
1306 case 1:
1307 ndr_print_ptr(ndr, "ctr1", r->ctr1);
1308 ndr->depth++;
1309 if (r->ctr1) {
1310 ndr_print_srvsvc_NetCharDevQCtr1(ndr, "ctr1", r->ctr1);
1312 ndr->depth--;
1313 break;
1315 default:
1316 break;
1321 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQInfoCtr(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevQInfoCtr *r)
1323 if (ndr_flags & NDR_SCALARS) {
1324 NDR_CHECK(ndr_push_align(ndr, 5));
1325 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
1326 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level));
1327 NDR_CHECK(ndr_push_srvsvc_NetCharDevQCtr(ndr, NDR_SCALARS, &r->ctr));
1328 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1330 if (ndr_flags & NDR_BUFFERS) {
1331 NDR_CHECK(ndr_push_srvsvc_NetCharDevQCtr(ndr, NDR_BUFFERS, &r->ctr));
1333 return NDR_ERR_SUCCESS;
1336 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQInfoCtr(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevQInfoCtr *r)
1338 if (ndr_flags & NDR_SCALARS) {
1339 NDR_CHECK(ndr_pull_align(ndr, 5));
1340 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
1341 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level));
1342 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQCtr(ndr, NDR_SCALARS, &r->ctr));
1343 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1345 if (ndr_flags & NDR_BUFFERS) {
1346 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQCtr(ndr, NDR_BUFFERS, &r->ctr));
1348 return NDR_ERR_SUCCESS;
1351 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQInfoCtr *r)
1353 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQInfoCtr");
1354 ndr->depth++;
1355 ndr_print_uint32(ndr, "level", r->level);
1356 ndr_print_set_switch_value(ndr, &r->ctr, r->level);
1357 ndr_print_srvsvc_NetCharDevQCtr(ndr, "ctr", &r->ctr);
1358 ndr->depth--;
1361 static enum ndr_err_code ndr_push_srvsvc_NetConnInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetConnInfo0 *r)
1363 if (ndr_flags & NDR_SCALARS) {
1364 NDR_CHECK(ndr_push_align(ndr, 4));
1365 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->conn_id));
1366 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1368 if (ndr_flags & NDR_BUFFERS) {
1370 return NDR_ERR_SUCCESS;
1373 static enum ndr_err_code ndr_pull_srvsvc_NetConnInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnInfo0 *r)
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_trailer_align(ndr, 4));
1380 if (ndr_flags & NDR_BUFFERS) {
1382 return NDR_ERR_SUCCESS;
1385 _PUBLIC_ void ndr_print_srvsvc_NetConnInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnInfo0 *r)
1387 ndr_print_struct(ndr, name, "srvsvc_NetConnInfo0");
1388 ndr->depth++;
1389 ndr_print_uint32(ndr, "conn_id", r->conn_id);
1390 ndr->depth--;
1393 static enum ndr_err_code ndr_push_srvsvc_NetConnCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetConnCtr0 *r)
1395 uint32_t cntr_array_1;
1396 if (ndr_flags & NDR_SCALARS) {
1397 NDR_CHECK(ndr_push_align(ndr, 5));
1398 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1399 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
1400 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1402 if (ndr_flags & NDR_BUFFERS) {
1403 if (r->array) {
1404 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
1405 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
1406 NDR_CHECK(ndr_push_srvsvc_NetConnInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
1410 return NDR_ERR_SUCCESS;
1413 static enum ndr_err_code ndr_pull_srvsvc_NetConnCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnCtr0 *r)
1415 uint32_t _ptr_array;
1416 uint32_t size_array_1 = 0;
1417 uint32_t cntr_array_1;
1418 TALLOC_CTX *_mem_save_array_0;
1419 TALLOC_CTX *_mem_save_array_1;
1420 if (ndr_flags & NDR_SCALARS) {
1421 NDR_CHECK(ndr_pull_align(ndr, 5));
1422 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
1423 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
1424 if (_ptr_array) {
1425 NDR_PULL_ALLOC(ndr, r->array);
1426 } else {
1427 r->array = NULL;
1429 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1431 if (ndr_flags & NDR_BUFFERS) {
1432 if (r->array) {
1433 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
1434 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
1435 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
1436 size_array_1 = ndr_get_array_size(ndr, &r->array);
1437 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
1438 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
1439 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
1440 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
1441 NDR_CHECK(ndr_pull_srvsvc_NetConnInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
1443 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
1444 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
1446 if (r->array) {
1447 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
1450 return NDR_ERR_SUCCESS;
1453 _PUBLIC_ void ndr_print_srvsvc_NetConnCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnCtr0 *r)
1455 uint32_t cntr_array_1;
1456 ndr_print_struct(ndr, name, "srvsvc_NetConnCtr0");
1457 ndr->depth++;
1458 ndr_print_uint32(ndr, "count", r->count);
1459 ndr_print_ptr(ndr, "array", r->array);
1460 ndr->depth++;
1461 if (r->array) {
1462 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
1463 ndr->depth++;
1464 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
1465 char *idx_1=NULL;
1466 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
1467 ndr_print_srvsvc_NetConnInfo0(ndr, "array", &r->array[cntr_array_1]);
1468 free(idx_1);
1471 ndr->depth--;
1473 ndr->depth--;
1474 ndr->depth--;
1477 static enum ndr_err_code ndr_push_srvsvc_NetConnInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetConnInfo1 *r)
1479 if (ndr_flags & NDR_SCALARS) {
1480 NDR_CHECK(ndr_push_align(ndr, 5));
1481 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->conn_id));
1482 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->conn_type));
1483 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_open));
1484 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_users));
1485 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->conn_time));
1486 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
1487 NDR_CHECK(ndr_push_unique_ptr(ndr, r->share));
1488 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1490 if (ndr_flags & NDR_BUFFERS) {
1491 if (r->user) {
1492 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
1493 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1494 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
1495 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1497 if (r->share) {
1498 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->share, CH_UTF16)));
1499 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1500 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->share, CH_UTF16)));
1501 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->share, ndr_charset_length(r->share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1504 return NDR_ERR_SUCCESS;
1507 static enum ndr_err_code ndr_pull_srvsvc_NetConnInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnInfo1 *r)
1509 uint32_t _ptr_user;
1510 uint32_t size_user_1 = 0;
1511 uint32_t length_user_1 = 0;
1512 TALLOC_CTX *_mem_save_user_0;
1513 uint32_t _ptr_share;
1514 uint32_t size_share_1 = 0;
1515 uint32_t length_share_1 = 0;
1516 TALLOC_CTX *_mem_save_share_0;
1517 if (ndr_flags & NDR_SCALARS) {
1518 NDR_CHECK(ndr_pull_align(ndr, 5));
1519 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->conn_id));
1520 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->conn_type));
1521 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_open));
1522 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_users));
1523 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->conn_time));
1524 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
1525 if (_ptr_user) {
1526 NDR_PULL_ALLOC(ndr, r->user);
1527 } else {
1528 r->user = NULL;
1530 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share));
1531 if (_ptr_share) {
1532 NDR_PULL_ALLOC(ndr, r->share);
1533 } else {
1534 r->share = NULL;
1536 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1538 if (ndr_flags & NDR_BUFFERS) {
1539 if (r->user) {
1540 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
1541 NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
1542 NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
1543 NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
1544 size_user_1 = ndr_get_array_size(ndr, &r->user);
1545 length_user_1 = ndr_get_array_length(ndr, &r->user);
1546 if (length_user_1 > size_user_1) {
1547 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_user_1, length_user_1);
1549 NDR_CHECK(ndr_check_string_terminator(ndr, length_user_1, sizeof(uint16_t)));
1550 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, length_user_1, sizeof(uint16_t), CH_UTF16));
1551 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
1553 if (r->share) {
1554 _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr);
1555 NDR_PULL_SET_MEM_CTX(ndr, r->share, 0);
1556 NDR_CHECK(ndr_pull_array_size(ndr, &r->share));
1557 NDR_CHECK(ndr_pull_array_length(ndr, &r->share));
1558 size_share_1 = ndr_get_array_size(ndr, &r->share);
1559 length_share_1 = ndr_get_array_length(ndr, &r->share);
1560 if (length_share_1 > size_share_1) {
1561 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_share_1, length_share_1);
1563 NDR_CHECK(ndr_check_string_terminator(ndr, length_share_1, sizeof(uint16_t)));
1564 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->share, length_share_1, sizeof(uint16_t), CH_UTF16));
1565 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0);
1568 return NDR_ERR_SUCCESS;
1571 _PUBLIC_ void ndr_print_srvsvc_NetConnInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnInfo1 *r)
1573 ndr_print_struct(ndr, name, "srvsvc_NetConnInfo1");
1574 ndr->depth++;
1575 ndr_print_uint32(ndr, "conn_id", r->conn_id);
1576 ndr_print_uint32(ndr, "conn_type", r->conn_type);
1577 ndr_print_uint32(ndr, "num_open", r->num_open);
1578 ndr_print_uint32(ndr, "num_users", r->num_users);
1579 ndr_print_uint32(ndr, "conn_time", r->conn_time);
1580 ndr_print_ptr(ndr, "user", r->user);
1581 ndr->depth++;
1582 if (r->user) {
1583 ndr_print_string(ndr, "user", r->user);
1585 ndr->depth--;
1586 ndr_print_ptr(ndr, "share", r->share);
1587 ndr->depth++;
1588 if (r->share) {
1589 ndr_print_string(ndr, "share", r->share);
1591 ndr->depth--;
1592 ndr->depth--;
1595 static enum ndr_err_code ndr_push_srvsvc_NetConnCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetConnCtr1 *r)
1597 uint32_t cntr_array_1;
1598 if (ndr_flags & NDR_SCALARS) {
1599 NDR_CHECK(ndr_push_align(ndr, 5));
1600 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1601 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
1602 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1604 if (ndr_flags & NDR_BUFFERS) {
1605 if (r->array) {
1606 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
1607 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
1608 NDR_CHECK(ndr_push_srvsvc_NetConnInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
1610 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
1611 NDR_CHECK(ndr_push_srvsvc_NetConnInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
1615 return NDR_ERR_SUCCESS;
1618 static enum ndr_err_code ndr_pull_srvsvc_NetConnCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnCtr1 *r)
1620 uint32_t _ptr_array;
1621 uint32_t size_array_1 = 0;
1622 uint32_t cntr_array_1;
1623 TALLOC_CTX *_mem_save_array_0;
1624 TALLOC_CTX *_mem_save_array_1;
1625 if (ndr_flags & NDR_SCALARS) {
1626 NDR_CHECK(ndr_pull_align(ndr, 5));
1627 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
1628 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
1629 if (_ptr_array) {
1630 NDR_PULL_ALLOC(ndr, r->array);
1631 } else {
1632 r->array = NULL;
1634 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1636 if (ndr_flags & NDR_BUFFERS) {
1637 if (r->array) {
1638 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
1639 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
1640 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
1641 size_array_1 = ndr_get_array_size(ndr, &r->array);
1642 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
1643 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
1644 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
1645 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
1646 NDR_CHECK(ndr_pull_srvsvc_NetConnInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
1648 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
1649 NDR_CHECK(ndr_pull_srvsvc_NetConnInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
1651 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
1652 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
1654 if (r->array) {
1655 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
1658 return NDR_ERR_SUCCESS;
1661 _PUBLIC_ void ndr_print_srvsvc_NetConnCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnCtr1 *r)
1663 uint32_t cntr_array_1;
1664 ndr_print_struct(ndr, name, "srvsvc_NetConnCtr1");
1665 ndr->depth++;
1666 ndr_print_uint32(ndr, "count", r->count);
1667 ndr_print_ptr(ndr, "array", r->array);
1668 ndr->depth++;
1669 if (r->array) {
1670 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
1671 ndr->depth++;
1672 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
1673 char *idx_1=NULL;
1674 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
1675 ndr_print_srvsvc_NetConnInfo1(ndr, "array", &r->array[cntr_array_1]);
1676 free(idx_1);
1679 ndr->depth--;
1681 ndr->depth--;
1682 ndr->depth--;
1685 static enum ndr_err_code ndr_push_srvsvc_NetConnCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetConnCtr *r)
1687 if (ndr_flags & NDR_SCALARS) {
1688 int level = ndr_push_get_switch_value(ndr, r);
1689 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
1690 NDR_CHECK(ndr_push_union_align(ndr, 5));
1691 switch (level) {
1692 case 0: {
1693 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0));
1694 break; }
1696 case 1: {
1697 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
1698 break; }
1700 default: {
1701 break; }
1705 if (ndr_flags & NDR_BUFFERS) {
1706 int level = ndr_push_get_switch_value(ndr, r);
1707 switch (level) {
1708 case 0:
1709 if (r->ctr0) {
1710 NDR_CHECK(ndr_push_srvsvc_NetConnCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
1712 break;
1714 case 1:
1715 if (r->ctr1) {
1716 NDR_CHECK(ndr_push_srvsvc_NetConnCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
1718 break;
1720 default:
1721 break;
1725 return NDR_ERR_SUCCESS;
1728 static enum ndr_err_code ndr_pull_srvsvc_NetConnCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetConnCtr *r)
1730 int level;
1731 uint32_t _level;
1732 TALLOC_CTX *_mem_save_ctr0_0;
1733 uint32_t _ptr_ctr0;
1734 TALLOC_CTX *_mem_save_ctr1_0;
1735 uint32_t _ptr_ctr1;
1736 level = ndr_pull_get_switch_value(ndr, r);
1737 if (ndr_flags & NDR_SCALARS) {
1738 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
1739 if (_level != level) {
1740 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
1742 NDR_CHECK(ndr_pull_union_align(ndr, 5));
1743 switch (level) {
1744 case 0: {
1745 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr0));
1746 if (_ptr_ctr0) {
1747 NDR_PULL_ALLOC(ndr, r->ctr0);
1748 } else {
1749 r->ctr0 = NULL;
1751 break; }
1753 case 1: {
1754 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
1755 if (_ptr_ctr1) {
1756 NDR_PULL_ALLOC(ndr, r->ctr1);
1757 } else {
1758 r->ctr1 = NULL;
1760 break; }
1762 default: {
1763 break; }
1767 if (ndr_flags & NDR_BUFFERS) {
1768 switch (level) {
1769 case 0:
1770 if (r->ctr0) {
1771 _mem_save_ctr0_0 = NDR_PULL_GET_MEM_CTX(ndr);
1772 NDR_PULL_SET_MEM_CTX(ndr, r->ctr0, 0);
1773 NDR_CHECK(ndr_pull_srvsvc_NetConnCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
1774 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr0_0, 0);
1776 break;
1778 case 1:
1779 if (r->ctr1) {
1780 _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
1781 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
1782 NDR_CHECK(ndr_pull_srvsvc_NetConnCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
1783 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
1785 break;
1787 default:
1788 break;
1792 return NDR_ERR_SUCCESS;
1795 _PUBLIC_ void ndr_print_srvsvc_NetConnCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetConnCtr *r)
1797 int level;
1798 level = ndr_print_get_switch_value(ndr, r);
1799 ndr_print_union(ndr, name, level, "srvsvc_NetConnCtr");
1800 switch (level) {
1801 case 0:
1802 ndr_print_ptr(ndr, "ctr0", r->ctr0);
1803 ndr->depth++;
1804 if (r->ctr0) {
1805 ndr_print_srvsvc_NetConnCtr0(ndr, "ctr0", r->ctr0);
1807 ndr->depth--;
1808 break;
1810 case 1:
1811 ndr_print_ptr(ndr, "ctr1", r->ctr1);
1812 ndr->depth++;
1813 if (r->ctr1) {
1814 ndr_print_srvsvc_NetConnCtr1(ndr, "ctr1", r->ctr1);
1816 ndr->depth--;
1817 break;
1819 default:
1820 break;
1825 static enum ndr_err_code ndr_push_srvsvc_NetConnInfoCtr(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetConnInfoCtr *r)
1827 if (ndr_flags & NDR_SCALARS) {
1828 NDR_CHECK(ndr_push_align(ndr, 5));
1829 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
1830 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level));
1831 NDR_CHECK(ndr_push_srvsvc_NetConnCtr(ndr, NDR_SCALARS, &r->ctr));
1832 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1834 if (ndr_flags & NDR_BUFFERS) {
1835 NDR_CHECK(ndr_push_srvsvc_NetConnCtr(ndr, NDR_BUFFERS, &r->ctr));
1837 return NDR_ERR_SUCCESS;
1840 static enum ndr_err_code ndr_pull_srvsvc_NetConnInfoCtr(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnInfoCtr *r)
1842 if (ndr_flags & NDR_SCALARS) {
1843 NDR_CHECK(ndr_pull_align(ndr, 5));
1844 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
1845 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level));
1846 NDR_CHECK(ndr_pull_srvsvc_NetConnCtr(ndr, NDR_SCALARS, &r->ctr));
1847 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1849 if (ndr_flags & NDR_BUFFERS) {
1850 NDR_CHECK(ndr_pull_srvsvc_NetConnCtr(ndr, NDR_BUFFERS, &r->ctr));
1852 return NDR_ERR_SUCCESS;
1855 _PUBLIC_ void ndr_print_srvsvc_NetConnInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnInfoCtr *r)
1857 ndr_print_struct(ndr, name, "srvsvc_NetConnInfoCtr");
1858 ndr->depth++;
1859 ndr_print_uint32(ndr, "level", r->level);
1860 ndr_print_set_switch_value(ndr, &r->ctr, r->level);
1861 ndr_print_srvsvc_NetConnCtr(ndr, "ctr", &r->ctr);
1862 ndr->depth--;
1865 static enum ndr_err_code ndr_push_srvsvc_NetFileInfo2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetFileInfo2 *r)
1867 if (ndr_flags & NDR_SCALARS) {
1868 NDR_CHECK(ndr_push_align(ndr, 4));
1869 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fid));
1870 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1872 if (ndr_flags & NDR_BUFFERS) {
1874 return NDR_ERR_SUCCESS;
1877 static enum ndr_err_code ndr_pull_srvsvc_NetFileInfo2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileInfo2 *r)
1879 if (ndr_flags & NDR_SCALARS) {
1880 NDR_CHECK(ndr_pull_align(ndr, 4));
1881 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fid));
1882 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1884 if (ndr_flags & NDR_BUFFERS) {
1886 return NDR_ERR_SUCCESS;
1889 _PUBLIC_ void ndr_print_srvsvc_NetFileInfo2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileInfo2 *r)
1891 ndr_print_struct(ndr, name, "srvsvc_NetFileInfo2");
1892 ndr->depth++;
1893 ndr_print_uint32(ndr, "fid", r->fid);
1894 ndr->depth--;
1897 static enum ndr_err_code ndr_push_srvsvc_NetFileCtr2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetFileCtr2 *r)
1899 uint32_t cntr_array_1;
1900 if (ndr_flags & NDR_SCALARS) {
1901 NDR_CHECK(ndr_push_align(ndr, 5));
1902 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1903 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
1904 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1906 if (ndr_flags & NDR_BUFFERS) {
1907 if (r->array) {
1908 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
1909 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
1910 NDR_CHECK(ndr_push_srvsvc_NetFileInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
1914 return NDR_ERR_SUCCESS;
1917 static enum ndr_err_code ndr_pull_srvsvc_NetFileCtr2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileCtr2 *r)
1919 uint32_t _ptr_array;
1920 uint32_t size_array_1 = 0;
1921 uint32_t cntr_array_1;
1922 TALLOC_CTX *_mem_save_array_0;
1923 TALLOC_CTX *_mem_save_array_1;
1924 if (ndr_flags & NDR_SCALARS) {
1925 NDR_CHECK(ndr_pull_align(ndr, 5));
1926 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
1927 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
1928 if (_ptr_array) {
1929 NDR_PULL_ALLOC(ndr, r->array);
1930 } else {
1931 r->array = NULL;
1933 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1935 if (ndr_flags & NDR_BUFFERS) {
1936 if (r->array) {
1937 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
1938 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
1939 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
1940 size_array_1 = ndr_get_array_size(ndr, &r->array);
1941 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
1942 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
1943 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
1944 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
1945 NDR_CHECK(ndr_pull_srvsvc_NetFileInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
1947 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
1948 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
1950 if (r->array) {
1951 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
1954 return NDR_ERR_SUCCESS;
1957 _PUBLIC_ void ndr_print_srvsvc_NetFileCtr2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileCtr2 *r)
1959 uint32_t cntr_array_1;
1960 ndr_print_struct(ndr, name, "srvsvc_NetFileCtr2");
1961 ndr->depth++;
1962 ndr_print_uint32(ndr, "count", r->count);
1963 ndr_print_ptr(ndr, "array", r->array);
1964 ndr->depth++;
1965 if (r->array) {
1966 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
1967 ndr->depth++;
1968 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
1969 char *idx_1=NULL;
1970 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
1971 ndr_print_srvsvc_NetFileInfo2(ndr, "array", &r->array[cntr_array_1]);
1972 free(idx_1);
1975 ndr->depth--;
1977 ndr->depth--;
1978 ndr->depth--;
1981 static enum ndr_err_code ndr_push_srvsvc_NetFileInfo3(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetFileInfo3 *r)
1983 if (ndr_flags & NDR_SCALARS) {
1984 NDR_CHECK(ndr_push_align(ndr, 5));
1985 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fid));
1986 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->permissions));
1987 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_locks));
1988 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
1989 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
1990 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1992 if (ndr_flags & NDR_BUFFERS) {
1993 if (r->path) {
1994 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
1995 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1996 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
1997 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1999 if (r->user) {
2000 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
2001 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2002 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
2003 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2006 return NDR_ERR_SUCCESS;
2009 static enum ndr_err_code ndr_pull_srvsvc_NetFileInfo3(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileInfo3 *r)
2011 uint32_t _ptr_path;
2012 uint32_t size_path_1 = 0;
2013 uint32_t length_path_1 = 0;
2014 TALLOC_CTX *_mem_save_path_0;
2015 uint32_t _ptr_user;
2016 uint32_t size_user_1 = 0;
2017 uint32_t length_user_1 = 0;
2018 TALLOC_CTX *_mem_save_user_0;
2019 if (ndr_flags & NDR_SCALARS) {
2020 NDR_CHECK(ndr_pull_align(ndr, 5));
2021 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fid));
2022 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->permissions));
2023 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_locks));
2024 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
2025 if (_ptr_path) {
2026 NDR_PULL_ALLOC(ndr, r->path);
2027 } else {
2028 r->path = NULL;
2030 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
2031 if (_ptr_user) {
2032 NDR_PULL_ALLOC(ndr, r->user);
2033 } else {
2034 r->user = NULL;
2036 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2038 if (ndr_flags & NDR_BUFFERS) {
2039 if (r->path) {
2040 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
2041 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
2042 NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
2043 NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
2044 size_path_1 = ndr_get_array_size(ndr, &r->path);
2045 length_path_1 = ndr_get_array_length(ndr, &r->path);
2046 if (length_path_1 > size_path_1) {
2047 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_path_1, length_path_1);
2049 NDR_CHECK(ndr_check_string_terminator(ndr, length_path_1, sizeof(uint16_t)));
2050 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, length_path_1, sizeof(uint16_t), CH_UTF16));
2051 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
2053 if (r->user) {
2054 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
2055 NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
2056 NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
2057 NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
2058 size_user_1 = ndr_get_array_size(ndr, &r->user);
2059 length_user_1 = ndr_get_array_length(ndr, &r->user);
2060 if (length_user_1 > size_user_1) {
2061 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_user_1, length_user_1);
2063 NDR_CHECK(ndr_check_string_terminator(ndr, length_user_1, sizeof(uint16_t)));
2064 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, length_user_1, sizeof(uint16_t), CH_UTF16));
2065 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
2068 return NDR_ERR_SUCCESS;
2071 _PUBLIC_ void ndr_print_srvsvc_NetFileInfo3(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileInfo3 *r)
2073 ndr_print_struct(ndr, name, "srvsvc_NetFileInfo3");
2074 ndr->depth++;
2075 ndr_print_uint32(ndr, "fid", r->fid);
2076 ndr_print_uint32(ndr, "permissions", r->permissions);
2077 ndr_print_uint32(ndr, "num_locks", r->num_locks);
2078 ndr_print_ptr(ndr, "path", r->path);
2079 ndr->depth++;
2080 if (r->path) {
2081 ndr_print_string(ndr, "path", r->path);
2083 ndr->depth--;
2084 ndr_print_ptr(ndr, "user", r->user);
2085 ndr->depth++;
2086 if (r->user) {
2087 ndr_print_string(ndr, "user", r->user);
2089 ndr->depth--;
2090 ndr->depth--;
2093 static enum ndr_err_code ndr_push_srvsvc_NetFileCtr3(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetFileCtr3 *r)
2095 uint32_t cntr_array_1;
2096 if (ndr_flags & NDR_SCALARS) {
2097 NDR_CHECK(ndr_push_align(ndr, 5));
2098 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2099 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
2100 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2102 if (ndr_flags & NDR_BUFFERS) {
2103 if (r->array) {
2104 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
2105 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2106 NDR_CHECK(ndr_push_srvsvc_NetFileInfo3(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
2108 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2109 NDR_CHECK(ndr_push_srvsvc_NetFileInfo3(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
2113 return NDR_ERR_SUCCESS;
2116 static enum ndr_err_code ndr_pull_srvsvc_NetFileCtr3(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileCtr3 *r)
2118 uint32_t _ptr_array;
2119 uint32_t size_array_1 = 0;
2120 uint32_t cntr_array_1;
2121 TALLOC_CTX *_mem_save_array_0;
2122 TALLOC_CTX *_mem_save_array_1;
2123 if (ndr_flags & NDR_SCALARS) {
2124 NDR_CHECK(ndr_pull_align(ndr, 5));
2125 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2126 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
2127 if (_ptr_array) {
2128 NDR_PULL_ALLOC(ndr, r->array);
2129 } else {
2130 r->array = NULL;
2132 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2134 if (ndr_flags & NDR_BUFFERS) {
2135 if (r->array) {
2136 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
2137 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
2138 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
2139 size_array_1 = ndr_get_array_size(ndr, &r->array);
2140 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
2141 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
2142 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
2143 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
2144 NDR_CHECK(ndr_pull_srvsvc_NetFileInfo3(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
2146 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
2147 NDR_CHECK(ndr_pull_srvsvc_NetFileInfo3(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
2149 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
2150 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
2152 if (r->array) {
2153 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
2156 return NDR_ERR_SUCCESS;
2159 _PUBLIC_ void ndr_print_srvsvc_NetFileCtr3(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileCtr3 *r)
2161 uint32_t cntr_array_1;
2162 ndr_print_struct(ndr, name, "srvsvc_NetFileCtr3");
2163 ndr->depth++;
2164 ndr_print_uint32(ndr, "count", r->count);
2165 ndr_print_ptr(ndr, "array", r->array);
2166 ndr->depth++;
2167 if (r->array) {
2168 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
2169 ndr->depth++;
2170 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
2171 char *idx_1=NULL;
2172 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
2173 ndr_print_srvsvc_NetFileInfo3(ndr, "array", &r->array[cntr_array_1]);
2174 free(idx_1);
2177 ndr->depth--;
2179 ndr->depth--;
2180 ndr->depth--;
2183 static enum ndr_err_code ndr_push_srvsvc_NetFileInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetFileInfo *r)
2185 if (ndr_flags & NDR_SCALARS) {
2186 int level = ndr_push_get_switch_value(ndr, r);
2187 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
2188 NDR_CHECK(ndr_push_union_align(ndr, 5));
2189 switch (level) {
2190 case 2: {
2191 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
2192 break; }
2194 case 3: {
2195 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3));
2196 break; }
2198 default: {
2199 break; }
2203 if (ndr_flags & NDR_BUFFERS) {
2204 int level = ndr_push_get_switch_value(ndr, r);
2205 switch (level) {
2206 case 2:
2207 if (r->info2) {
2208 NDR_CHECK(ndr_push_srvsvc_NetFileInfo2(ndr, NDR_SCALARS, r->info2));
2210 break;
2212 case 3:
2213 if (r->info3) {
2214 NDR_CHECK(ndr_push_srvsvc_NetFileInfo3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
2216 break;
2218 default:
2219 break;
2223 return NDR_ERR_SUCCESS;
2226 static enum ndr_err_code ndr_pull_srvsvc_NetFileInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetFileInfo *r)
2228 int level;
2229 uint32_t _level;
2230 TALLOC_CTX *_mem_save_info2_0;
2231 uint32_t _ptr_info2;
2232 TALLOC_CTX *_mem_save_info3_0;
2233 uint32_t _ptr_info3;
2234 level = ndr_pull_get_switch_value(ndr, r);
2235 if (ndr_flags & NDR_SCALARS) {
2236 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
2237 if (_level != level) {
2238 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
2240 NDR_CHECK(ndr_pull_union_align(ndr, 5));
2241 switch (level) {
2242 case 2: {
2243 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
2244 if (_ptr_info2) {
2245 NDR_PULL_ALLOC(ndr, r->info2);
2246 } else {
2247 r->info2 = NULL;
2249 break; }
2251 case 3: {
2252 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info3));
2253 if (_ptr_info3) {
2254 NDR_PULL_ALLOC(ndr, r->info3);
2255 } else {
2256 r->info3 = NULL;
2258 break; }
2260 default: {
2261 break; }
2265 if (ndr_flags & NDR_BUFFERS) {
2266 switch (level) {
2267 case 2:
2268 if (r->info2) {
2269 _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
2270 NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
2271 NDR_CHECK(ndr_pull_srvsvc_NetFileInfo2(ndr, NDR_SCALARS, r->info2));
2272 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
2274 break;
2276 case 3:
2277 if (r->info3) {
2278 _mem_save_info3_0 = NDR_PULL_GET_MEM_CTX(ndr);
2279 NDR_PULL_SET_MEM_CTX(ndr, r->info3, 0);
2280 NDR_CHECK(ndr_pull_srvsvc_NetFileInfo3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
2281 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info3_0, 0);
2283 break;
2285 default:
2286 break;
2290 return NDR_ERR_SUCCESS;
2293 _PUBLIC_ void ndr_print_srvsvc_NetFileInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetFileInfo *r)
2295 int level;
2296 level = ndr_print_get_switch_value(ndr, r);
2297 ndr_print_union(ndr, name, level, "srvsvc_NetFileInfo");
2298 switch (level) {
2299 case 2:
2300 ndr_print_ptr(ndr, "info2", r->info2);
2301 ndr->depth++;
2302 if (r->info2) {
2303 ndr_print_srvsvc_NetFileInfo2(ndr, "info2", r->info2);
2305 ndr->depth--;
2306 break;
2308 case 3:
2309 ndr_print_ptr(ndr, "info3", r->info3);
2310 ndr->depth++;
2311 if (r->info3) {
2312 ndr_print_srvsvc_NetFileInfo3(ndr, "info3", r->info3);
2314 ndr->depth--;
2315 break;
2317 default:
2318 break;
2323 static enum ndr_err_code ndr_push_srvsvc_NetFileCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetFileCtr *r)
2325 if (ndr_flags & NDR_SCALARS) {
2326 int level = ndr_push_get_switch_value(ndr, r);
2327 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
2328 NDR_CHECK(ndr_push_union_align(ndr, 5));
2329 switch (level) {
2330 case 2: {
2331 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr2));
2332 break; }
2334 case 3: {
2335 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr3));
2336 break; }
2338 default: {
2339 break; }
2343 if (ndr_flags & NDR_BUFFERS) {
2344 int level = ndr_push_get_switch_value(ndr, r);
2345 switch (level) {
2346 case 2:
2347 if (r->ctr2) {
2348 NDR_CHECK(ndr_push_srvsvc_NetFileCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
2350 break;
2352 case 3:
2353 if (r->ctr3) {
2354 NDR_CHECK(ndr_push_srvsvc_NetFileCtr3(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr3));
2356 break;
2358 default:
2359 break;
2363 return NDR_ERR_SUCCESS;
2366 static enum ndr_err_code ndr_pull_srvsvc_NetFileCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetFileCtr *r)
2368 int level;
2369 uint32_t _level;
2370 TALLOC_CTX *_mem_save_ctr2_0;
2371 uint32_t _ptr_ctr2;
2372 TALLOC_CTX *_mem_save_ctr3_0;
2373 uint32_t _ptr_ctr3;
2374 level = ndr_pull_get_switch_value(ndr, r);
2375 if (ndr_flags & NDR_SCALARS) {
2376 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
2377 if (_level != level) {
2378 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
2380 NDR_CHECK(ndr_pull_union_align(ndr, 5));
2381 switch (level) {
2382 case 2: {
2383 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr2));
2384 if (_ptr_ctr2) {
2385 NDR_PULL_ALLOC(ndr, r->ctr2);
2386 } else {
2387 r->ctr2 = NULL;
2389 break; }
2391 case 3: {
2392 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr3));
2393 if (_ptr_ctr3) {
2394 NDR_PULL_ALLOC(ndr, r->ctr3);
2395 } else {
2396 r->ctr3 = NULL;
2398 break; }
2400 default: {
2401 break; }
2405 if (ndr_flags & NDR_BUFFERS) {
2406 switch (level) {
2407 case 2:
2408 if (r->ctr2) {
2409 _mem_save_ctr2_0 = NDR_PULL_GET_MEM_CTX(ndr);
2410 NDR_PULL_SET_MEM_CTX(ndr, r->ctr2, 0);
2411 NDR_CHECK(ndr_pull_srvsvc_NetFileCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
2412 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr2_0, 0);
2414 break;
2416 case 3:
2417 if (r->ctr3) {
2418 _mem_save_ctr3_0 = NDR_PULL_GET_MEM_CTX(ndr);
2419 NDR_PULL_SET_MEM_CTX(ndr, r->ctr3, 0);
2420 NDR_CHECK(ndr_pull_srvsvc_NetFileCtr3(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr3));
2421 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr3_0, 0);
2423 break;
2425 default:
2426 break;
2430 return NDR_ERR_SUCCESS;
2433 _PUBLIC_ void ndr_print_srvsvc_NetFileCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetFileCtr *r)
2435 int level;
2436 level = ndr_print_get_switch_value(ndr, r);
2437 ndr_print_union(ndr, name, level, "srvsvc_NetFileCtr");
2438 switch (level) {
2439 case 2:
2440 ndr_print_ptr(ndr, "ctr2", r->ctr2);
2441 ndr->depth++;
2442 if (r->ctr2) {
2443 ndr_print_srvsvc_NetFileCtr2(ndr, "ctr2", r->ctr2);
2445 ndr->depth--;
2446 break;
2448 case 3:
2449 ndr_print_ptr(ndr, "ctr3", r->ctr3);
2450 ndr->depth++;
2451 if (r->ctr3) {
2452 ndr_print_srvsvc_NetFileCtr3(ndr, "ctr3", r->ctr3);
2454 ndr->depth--;
2455 break;
2457 default:
2458 break;
2463 static enum ndr_err_code ndr_push_srvsvc_NetFileInfoCtr(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetFileInfoCtr *r)
2465 if (ndr_flags & NDR_SCALARS) {
2466 NDR_CHECK(ndr_push_align(ndr, 5));
2467 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
2468 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level));
2469 NDR_CHECK(ndr_push_srvsvc_NetFileCtr(ndr, NDR_SCALARS, &r->ctr));
2470 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2472 if (ndr_flags & NDR_BUFFERS) {
2473 NDR_CHECK(ndr_push_srvsvc_NetFileCtr(ndr, NDR_BUFFERS, &r->ctr));
2475 return NDR_ERR_SUCCESS;
2478 static enum ndr_err_code ndr_pull_srvsvc_NetFileInfoCtr(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileInfoCtr *r)
2480 if (ndr_flags & NDR_SCALARS) {
2481 NDR_CHECK(ndr_pull_align(ndr, 5));
2482 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
2483 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level));
2484 NDR_CHECK(ndr_pull_srvsvc_NetFileCtr(ndr, NDR_SCALARS, &r->ctr));
2485 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2487 if (ndr_flags & NDR_BUFFERS) {
2488 NDR_CHECK(ndr_pull_srvsvc_NetFileCtr(ndr, NDR_BUFFERS, &r->ctr));
2490 return NDR_ERR_SUCCESS;
2493 _PUBLIC_ void ndr_print_srvsvc_NetFileInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileInfoCtr *r)
2495 ndr_print_struct(ndr, name, "srvsvc_NetFileInfoCtr");
2496 ndr->depth++;
2497 ndr_print_uint32(ndr, "level", r->level);
2498 ndr_print_set_switch_value(ndr, &r->ctr, r->level);
2499 ndr_print_srvsvc_NetFileCtr(ndr, "ctr", &r->ctr);
2500 ndr->depth--;
2503 static enum ndr_err_code ndr_push_srvsvc_NetSessInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfo0 *r)
2505 if (ndr_flags & NDR_SCALARS) {
2506 NDR_CHECK(ndr_push_align(ndr, 5));
2507 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client));
2508 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2510 if (ndr_flags & NDR_BUFFERS) {
2511 if (r->client) {
2512 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
2513 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2514 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
2515 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client, ndr_charset_length(r->client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2518 return NDR_ERR_SUCCESS;
2521 static enum ndr_err_code ndr_pull_srvsvc_NetSessInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfo0 *r)
2523 uint32_t _ptr_client;
2524 uint32_t size_client_1 = 0;
2525 uint32_t length_client_1 = 0;
2526 TALLOC_CTX *_mem_save_client_0;
2527 if (ndr_flags & NDR_SCALARS) {
2528 NDR_CHECK(ndr_pull_align(ndr, 5));
2529 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
2530 if (_ptr_client) {
2531 NDR_PULL_ALLOC(ndr, r->client);
2532 } else {
2533 r->client = NULL;
2535 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2537 if (ndr_flags & NDR_BUFFERS) {
2538 if (r->client) {
2539 _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
2540 NDR_PULL_SET_MEM_CTX(ndr, r->client, 0);
2541 NDR_CHECK(ndr_pull_array_size(ndr, &r->client));
2542 NDR_CHECK(ndr_pull_array_length(ndr, &r->client));
2543 size_client_1 = ndr_get_array_size(ndr, &r->client);
2544 length_client_1 = ndr_get_array_length(ndr, &r->client);
2545 if (length_client_1 > size_client_1) {
2546 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_client_1, length_client_1);
2548 NDR_CHECK(ndr_check_string_terminator(ndr, length_client_1, sizeof(uint16_t)));
2549 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client, length_client_1, sizeof(uint16_t), CH_UTF16));
2550 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
2553 return NDR_ERR_SUCCESS;
2556 _PUBLIC_ void ndr_print_srvsvc_NetSessInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo0 *r)
2558 ndr_print_struct(ndr, name, "srvsvc_NetSessInfo0");
2559 ndr->depth++;
2560 ndr_print_ptr(ndr, "client", r->client);
2561 ndr->depth++;
2562 if (r->client) {
2563 ndr_print_string(ndr, "client", r->client);
2565 ndr->depth--;
2566 ndr->depth--;
2569 static enum ndr_err_code ndr_push_srvsvc_NetSessCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessCtr0 *r)
2571 uint32_t cntr_array_1;
2572 if (ndr_flags & NDR_SCALARS) {
2573 NDR_CHECK(ndr_push_align(ndr, 5));
2574 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2575 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
2576 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2578 if (ndr_flags & NDR_BUFFERS) {
2579 if (r->array) {
2580 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
2581 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2582 NDR_CHECK(ndr_push_srvsvc_NetSessInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
2584 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2585 NDR_CHECK(ndr_push_srvsvc_NetSessInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
2589 return NDR_ERR_SUCCESS;
2592 static enum ndr_err_code ndr_pull_srvsvc_NetSessCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr0 *r)
2594 uint32_t _ptr_array;
2595 uint32_t size_array_1 = 0;
2596 uint32_t cntr_array_1;
2597 TALLOC_CTX *_mem_save_array_0;
2598 TALLOC_CTX *_mem_save_array_1;
2599 if (ndr_flags & NDR_SCALARS) {
2600 NDR_CHECK(ndr_pull_align(ndr, 5));
2601 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2602 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
2603 if (_ptr_array) {
2604 NDR_PULL_ALLOC(ndr, r->array);
2605 } else {
2606 r->array = NULL;
2608 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2610 if (ndr_flags & NDR_BUFFERS) {
2611 if (r->array) {
2612 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
2613 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
2614 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
2615 size_array_1 = ndr_get_array_size(ndr, &r->array);
2616 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
2617 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
2618 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
2619 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
2620 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
2622 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
2623 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
2625 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
2626 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
2628 if (r->array) {
2629 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
2632 return NDR_ERR_SUCCESS;
2635 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr0 *r)
2637 uint32_t cntr_array_1;
2638 ndr_print_struct(ndr, name, "srvsvc_NetSessCtr0");
2639 ndr->depth++;
2640 ndr_print_uint32(ndr, "count", r->count);
2641 ndr_print_ptr(ndr, "array", r->array);
2642 ndr->depth++;
2643 if (r->array) {
2644 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
2645 ndr->depth++;
2646 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
2647 char *idx_1=NULL;
2648 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
2649 ndr_print_srvsvc_NetSessInfo0(ndr, "array", &r->array[cntr_array_1]);
2650 free(idx_1);
2653 ndr->depth--;
2655 ndr->depth--;
2656 ndr->depth--;
2659 static enum ndr_err_code ndr_push_srvsvc_NetSessInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfo1 *r)
2661 if (ndr_flags & NDR_SCALARS) {
2662 NDR_CHECK(ndr_push_align(ndr, 5));
2663 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client));
2664 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
2665 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_open));
2666 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
2667 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idle_time));
2668 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->user_flags));
2669 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2671 if (ndr_flags & NDR_BUFFERS) {
2672 if (r->client) {
2673 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
2674 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2675 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
2676 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client, ndr_charset_length(r->client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2678 if (r->user) {
2679 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
2680 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2681 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
2682 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2685 return NDR_ERR_SUCCESS;
2688 static enum ndr_err_code ndr_pull_srvsvc_NetSessInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfo1 *r)
2690 uint32_t _ptr_client;
2691 uint32_t size_client_1 = 0;
2692 uint32_t length_client_1 = 0;
2693 TALLOC_CTX *_mem_save_client_0;
2694 uint32_t _ptr_user;
2695 uint32_t size_user_1 = 0;
2696 uint32_t length_user_1 = 0;
2697 TALLOC_CTX *_mem_save_user_0;
2698 if (ndr_flags & NDR_SCALARS) {
2699 NDR_CHECK(ndr_pull_align(ndr, 5));
2700 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
2701 if (_ptr_client) {
2702 NDR_PULL_ALLOC(ndr, r->client);
2703 } else {
2704 r->client = NULL;
2706 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
2707 if (_ptr_user) {
2708 NDR_PULL_ALLOC(ndr, r->user);
2709 } else {
2710 r->user = NULL;
2712 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_open));
2713 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
2714 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idle_time));
2715 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->user_flags));
2716 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2718 if (ndr_flags & NDR_BUFFERS) {
2719 if (r->client) {
2720 _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
2721 NDR_PULL_SET_MEM_CTX(ndr, r->client, 0);
2722 NDR_CHECK(ndr_pull_array_size(ndr, &r->client));
2723 NDR_CHECK(ndr_pull_array_length(ndr, &r->client));
2724 size_client_1 = ndr_get_array_size(ndr, &r->client);
2725 length_client_1 = ndr_get_array_length(ndr, &r->client);
2726 if (length_client_1 > size_client_1) {
2727 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_client_1, length_client_1);
2729 NDR_CHECK(ndr_check_string_terminator(ndr, length_client_1, sizeof(uint16_t)));
2730 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client, length_client_1, sizeof(uint16_t), CH_UTF16));
2731 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
2733 if (r->user) {
2734 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
2735 NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
2736 NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
2737 NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
2738 size_user_1 = ndr_get_array_size(ndr, &r->user);
2739 length_user_1 = ndr_get_array_length(ndr, &r->user);
2740 if (length_user_1 > size_user_1) {
2741 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_user_1, length_user_1);
2743 NDR_CHECK(ndr_check_string_terminator(ndr, length_user_1, sizeof(uint16_t)));
2744 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, length_user_1, sizeof(uint16_t), CH_UTF16));
2745 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
2748 return NDR_ERR_SUCCESS;
2751 _PUBLIC_ void ndr_print_srvsvc_NetSessInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo1 *r)
2753 ndr_print_struct(ndr, name, "srvsvc_NetSessInfo1");
2754 ndr->depth++;
2755 ndr_print_ptr(ndr, "client", r->client);
2756 ndr->depth++;
2757 if (r->client) {
2758 ndr_print_string(ndr, "client", r->client);
2760 ndr->depth--;
2761 ndr_print_ptr(ndr, "user", r->user);
2762 ndr->depth++;
2763 if (r->user) {
2764 ndr_print_string(ndr, "user", r->user);
2766 ndr->depth--;
2767 ndr_print_uint32(ndr, "num_open", r->num_open);
2768 ndr_print_uint32(ndr, "time", r->time);
2769 ndr_print_uint32(ndr, "idle_time", r->idle_time);
2770 ndr_print_uint32(ndr, "user_flags", r->user_flags);
2771 ndr->depth--;
2774 static enum ndr_err_code ndr_push_srvsvc_NetSessCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessCtr1 *r)
2776 uint32_t cntr_array_1;
2777 if (ndr_flags & NDR_SCALARS) {
2778 NDR_CHECK(ndr_push_align(ndr, 5));
2779 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2780 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
2781 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2783 if (ndr_flags & NDR_BUFFERS) {
2784 if (r->array) {
2785 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
2786 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2787 NDR_CHECK(ndr_push_srvsvc_NetSessInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
2789 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2790 NDR_CHECK(ndr_push_srvsvc_NetSessInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
2794 return NDR_ERR_SUCCESS;
2797 static enum ndr_err_code ndr_pull_srvsvc_NetSessCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr1 *r)
2799 uint32_t _ptr_array;
2800 uint32_t size_array_1 = 0;
2801 uint32_t cntr_array_1;
2802 TALLOC_CTX *_mem_save_array_0;
2803 TALLOC_CTX *_mem_save_array_1;
2804 if (ndr_flags & NDR_SCALARS) {
2805 NDR_CHECK(ndr_pull_align(ndr, 5));
2806 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2807 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
2808 if (_ptr_array) {
2809 NDR_PULL_ALLOC(ndr, r->array);
2810 } else {
2811 r->array = NULL;
2813 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2815 if (ndr_flags & NDR_BUFFERS) {
2816 if (r->array) {
2817 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
2818 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
2819 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
2820 size_array_1 = ndr_get_array_size(ndr, &r->array);
2821 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
2822 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
2823 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
2824 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
2825 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
2827 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
2828 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
2830 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
2831 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
2833 if (r->array) {
2834 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
2837 return NDR_ERR_SUCCESS;
2840 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr1 *r)
2842 uint32_t cntr_array_1;
2843 ndr_print_struct(ndr, name, "srvsvc_NetSessCtr1");
2844 ndr->depth++;
2845 ndr_print_uint32(ndr, "count", r->count);
2846 ndr_print_ptr(ndr, "array", r->array);
2847 ndr->depth++;
2848 if (r->array) {
2849 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
2850 ndr->depth++;
2851 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
2852 char *idx_1=NULL;
2853 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
2854 ndr_print_srvsvc_NetSessInfo1(ndr, "array", &r->array[cntr_array_1]);
2855 free(idx_1);
2858 ndr->depth--;
2860 ndr->depth--;
2861 ndr->depth--;
2864 static enum ndr_err_code ndr_push_srvsvc_NetSessInfo2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfo2 *r)
2866 if (ndr_flags & NDR_SCALARS) {
2867 NDR_CHECK(ndr_push_align(ndr, 5));
2868 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client));
2869 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
2870 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_open));
2871 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
2872 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idle_time));
2873 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->user_flags));
2874 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client_type));
2875 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2877 if (ndr_flags & NDR_BUFFERS) {
2878 if (r->client) {
2879 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
2880 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2881 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
2882 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client, ndr_charset_length(r->client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2884 if (r->user) {
2885 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
2886 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2887 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
2888 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2890 if (r->client_type) {
2891 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client_type, CH_UTF16)));
2892 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2893 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client_type, CH_UTF16)));
2894 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client_type, ndr_charset_length(r->client_type, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2897 return NDR_ERR_SUCCESS;
2900 static enum ndr_err_code ndr_pull_srvsvc_NetSessInfo2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfo2 *r)
2902 uint32_t _ptr_client;
2903 uint32_t size_client_1 = 0;
2904 uint32_t length_client_1 = 0;
2905 TALLOC_CTX *_mem_save_client_0;
2906 uint32_t _ptr_user;
2907 uint32_t size_user_1 = 0;
2908 uint32_t length_user_1 = 0;
2909 TALLOC_CTX *_mem_save_user_0;
2910 uint32_t _ptr_client_type;
2911 uint32_t size_client_type_1 = 0;
2912 uint32_t length_client_type_1 = 0;
2913 TALLOC_CTX *_mem_save_client_type_0;
2914 if (ndr_flags & NDR_SCALARS) {
2915 NDR_CHECK(ndr_pull_align(ndr, 5));
2916 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
2917 if (_ptr_client) {
2918 NDR_PULL_ALLOC(ndr, r->client);
2919 } else {
2920 r->client = NULL;
2922 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
2923 if (_ptr_user) {
2924 NDR_PULL_ALLOC(ndr, r->user);
2925 } else {
2926 r->user = NULL;
2928 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_open));
2929 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
2930 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idle_time));
2931 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->user_flags));
2932 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client_type));
2933 if (_ptr_client_type) {
2934 NDR_PULL_ALLOC(ndr, r->client_type);
2935 } else {
2936 r->client_type = NULL;
2938 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2940 if (ndr_flags & NDR_BUFFERS) {
2941 if (r->client) {
2942 _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
2943 NDR_PULL_SET_MEM_CTX(ndr, r->client, 0);
2944 NDR_CHECK(ndr_pull_array_size(ndr, &r->client));
2945 NDR_CHECK(ndr_pull_array_length(ndr, &r->client));
2946 size_client_1 = ndr_get_array_size(ndr, &r->client);
2947 length_client_1 = ndr_get_array_length(ndr, &r->client);
2948 if (length_client_1 > size_client_1) {
2949 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_client_1, length_client_1);
2951 NDR_CHECK(ndr_check_string_terminator(ndr, length_client_1, sizeof(uint16_t)));
2952 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client, length_client_1, sizeof(uint16_t), CH_UTF16));
2953 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
2955 if (r->user) {
2956 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
2957 NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
2958 NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
2959 NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
2960 size_user_1 = ndr_get_array_size(ndr, &r->user);
2961 length_user_1 = ndr_get_array_length(ndr, &r->user);
2962 if (length_user_1 > size_user_1) {
2963 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_user_1, length_user_1);
2965 NDR_CHECK(ndr_check_string_terminator(ndr, length_user_1, sizeof(uint16_t)));
2966 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, length_user_1, sizeof(uint16_t), CH_UTF16));
2967 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
2969 if (r->client_type) {
2970 _mem_save_client_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
2971 NDR_PULL_SET_MEM_CTX(ndr, r->client_type, 0);
2972 NDR_CHECK(ndr_pull_array_size(ndr, &r->client_type));
2973 NDR_CHECK(ndr_pull_array_length(ndr, &r->client_type));
2974 size_client_type_1 = ndr_get_array_size(ndr, &r->client_type);
2975 length_client_type_1 = ndr_get_array_length(ndr, &r->client_type);
2976 if (length_client_type_1 > size_client_type_1) {
2977 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_client_type_1, length_client_type_1);
2979 NDR_CHECK(ndr_check_string_terminator(ndr, length_client_type_1, sizeof(uint16_t)));
2980 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client_type, length_client_type_1, sizeof(uint16_t), CH_UTF16));
2981 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_type_0, 0);
2984 return NDR_ERR_SUCCESS;
2987 _PUBLIC_ void ndr_print_srvsvc_NetSessInfo2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo2 *r)
2989 ndr_print_struct(ndr, name, "srvsvc_NetSessInfo2");
2990 ndr->depth++;
2991 ndr_print_ptr(ndr, "client", r->client);
2992 ndr->depth++;
2993 if (r->client) {
2994 ndr_print_string(ndr, "client", r->client);
2996 ndr->depth--;
2997 ndr_print_ptr(ndr, "user", r->user);
2998 ndr->depth++;
2999 if (r->user) {
3000 ndr_print_string(ndr, "user", r->user);
3002 ndr->depth--;
3003 ndr_print_uint32(ndr, "num_open", r->num_open);
3004 ndr_print_uint32(ndr, "time", r->time);
3005 ndr_print_uint32(ndr, "idle_time", r->idle_time);
3006 ndr_print_uint32(ndr, "user_flags", r->user_flags);
3007 ndr_print_ptr(ndr, "client_type", r->client_type);
3008 ndr->depth++;
3009 if (r->client_type) {
3010 ndr_print_string(ndr, "client_type", r->client_type);
3012 ndr->depth--;
3013 ndr->depth--;
3016 static enum ndr_err_code ndr_push_srvsvc_NetSessCtr2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessCtr2 *r)
3018 uint32_t cntr_array_1;
3019 if (ndr_flags & NDR_SCALARS) {
3020 NDR_CHECK(ndr_push_align(ndr, 5));
3021 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
3022 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
3023 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3025 if (ndr_flags & NDR_BUFFERS) {
3026 if (r->array) {
3027 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
3028 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3029 NDR_CHECK(ndr_push_srvsvc_NetSessInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
3031 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3032 NDR_CHECK(ndr_push_srvsvc_NetSessInfo2(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
3036 return NDR_ERR_SUCCESS;
3039 static enum ndr_err_code ndr_pull_srvsvc_NetSessCtr2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr2 *r)
3041 uint32_t _ptr_array;
3042 uint32_t size_array_1 = 0;
3043 uint32_t cntr_array_1;
3044 TALLOC_CTX *_mem_save_array_0;
3045 TALLOC_CTX *_mem_save_array_1;
3046 if (ndr_flags & NDR_SCALARS) {
3047 NDR_CHECK(ndr_pull_align(ndr, 5));
3048 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
3049 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
3050 if (_ptr_array) {
3051 NDR_PULL_ALLOC(ndr, r->array);
3052 } else {
3053 r->array = NULL;
3055 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3057 if (ndr_flags & NDR_BUFFERS) {
3058 if (r->array) {
3059 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
3060 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
3061 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
3062 size_array_1 = ndr_get_array_size(ndr, &r->array);
3063 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
3064 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
3065 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
3066 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
3067 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
3069 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
3070 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo2(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
3072 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
3073 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
3075 if (r->array) {
3076 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
3079 return NDR_ERR_SUCCESS;
3082 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr2 *r)
3084 uint32_t cntr_array_1;
3085 ndr_print_struct(ndr, name, "srvsvc_NetSessCtr2");
3086 ndr->depth++;
3087 ndr_print_uint32(ndr, "count", r->count);
3088 ndr_print_ptr(ndr, "array", r->array);
3089 ndr->depth++;
3090 if (r->array) {
3091 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
3092 ndr->depth++;
3093 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
3094 char *idx_1=NULL;
3095 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
3096 ndr_print_srvsvc_NetSessInfo2(ndr, "array", &r->array[cntr_array_1]);
3097 free(idx_1);
3100 ndr->depth--;
3102 ndr->depth--;
3103 ndr->depth--;
3106 static enum ndr_err_code ndr_push_srvsvc_NetSessInfo10(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfo10 *r)
3108 if (ndr_flags & NDR_SCALARS) {
3109 NDR_CHECK(ndr_push_align(ndr, 5));
3110 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client));
3111 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
3112 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
3113 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idle_time));
3114 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3116 if (ndr_flags & NDR_BUFFERS) {
3117 if (r->client) {
3118 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
3119 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3120 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
3121 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client, ndr_charset_length(r->client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3123 if (r->user) {
3124 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
3125 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3126 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
3127 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3130 return NDR_ERR_SUCCESS;
3133 static enum ndr_err_code ndr_pull_srvsvc_NetSessInfo10(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfo10 *r)
3135 uint32_t _ptr_client;
3136 uint32_t size_client_1 = 0;
3137 uint32_t length_client_1 = 0;
3138 TALLOC_CTX *_mem_save_client_0;
3139 uint32_t _ptr_user;
3140 uint32_t size_user_1 = 0;
3141 uint32_t length_user_1 = 0;
3142 TALLOC_CTX *_mem_save_user_0;
3143 if (ndr_flags & NDR_SCALARS) {
3144 NDR_CHECK(ndr_pull_align(ndr, 5));
3145 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
3146 if (_ptr_client) {
3147 NDR_PULL_ALLOC(ndr, r->client);
3148 } else {
3149 r->client = NULL;
3151 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
3152 if (_ptr_user) {
3153 NDR_PULL_ALLOC(ndr, r->user);
3154 } else {
3155 r->user = NULL;
3157 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
3158 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idle_time));
3159 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3161 if (ndr_flags & NDR_BUFFERS) {
3162 if (r->client) {
3163 _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
3164 NDR_PULL_SET_MEM_CTX(ndr, r->client, 0);
3165 NDR_CHECK(ndr_pull_array_size(ndr, &r->client));
3166 NDR_CHECK(ndr_pull_array_length(ndr, &r->client));
3167 size_client_1 = ndr_get_array_size(ndr, &r->client);
3168 length_client_1 = ndr_get_array_length(ndr, &r->client);
3169 if (length_client_1 > size_client_1) {
3170 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_client_1, length_client_1);
3172 NDR_CHECK(ndr_check_string_terminator(ndr, length_client_1, sizeof(uint16_t)));
3173 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client, length_client_1, sizeof(uint16_t), CH_UTF16));
3174 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
3176 if (r->user) {
3177 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
3178 NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
3179 NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
3180 NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
3181 size_user_1 = ndr_get_array_size(ndr, &r->user);
3182 length_user_1 = ndr_get_array_length(ndr, &r->user);
3183 if (length_user_1 > size_user_1) {
3184 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_user_1, length_user_1);
3186 NDR_CHECK(ndr_check_string_terminator(ndr, length_user_1, sizeof(uint16_t)));
3187 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, length_user_1, sizeof(uint16_t), CH_UTF16));
3188 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
3191 return NDR_ERR_SUCCESS;
3194 _PUBLIC_ void ndr_print_srvsvc_NetSessInfo10(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo10 *r)
3196 ndr_print_struct(ndr, name, "srvsvc_NetSessInfo10");
3197 ndr->depth++;
3198 ndr_print_ptr(ndr, "client", r->client);
3199 ndr->depth++;
3200 if (r->client) {
3201 ndr_print_string(ndr, "client", r->client);
3203 ndr->depth--;
3204 ndr_print_ptr(ndr, "user", r->user);
3205 ndr->depth++;
3206 if (r->user) {
3207 ndr_print_string(ndr, "user", r->user);
3209 ndr->depth--;
3210 ndr_print_uint32(ndr, "time", r->time);
3211 ndr_print_uint32(ndr, "idle_time", r->idle_time);
3212 ndr->depth--;
3215 static enum ndr_err_code ndr_push_srvsvc_NetSessCtr10(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessCtr10 *r)
3217 uint32_t cntr_array_1;
3218 if (ndr_flags & NDR_SCALARS) {
3219 NDR_CHECK(ndr_push_align(ndr, 5));
3220 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
3221 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
3222 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3224 if (ndr_flags & NDR_BUFFERS) {
3225 if (r->array) {
3226 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
3227 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3228 NDR_CHECK(ndr_push_srvsvc_NetSessInfo10(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
3230 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3231 NDR_CHECK(ndr_push_srvsvc_NetSessInfo10(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
3235 return NDR_ERR_SUCCESS;
3238 static enum ndr_err_code ndr_pull_srvsvc_NetSessCtr10(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr10 *r)
3240 uint32_t _ptr_array;
3241 uint32_t size_array_1 = 0;
3242 uint32_t cntr_array_1;
3243 TALLOC_CTX *_mem_save_array_0;
3244 TALLOC_CTX *_mem_save_array_1;
3245 if (ndr_flags & NDR_SCALARS) {
3246 NDR_CHECK(ndr_pull_align(ndr, 5));
3247 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
3248 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
3249 if (_ptr_array) {
3250 NDR_PULL_ALLOC(ndr, r->array);
3251 } else {
3252 r->array = NULL;
3254 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3256 if (ndr_flags & NDR_BUFFERS) {
3257 if (r->array) {
3258 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
3259 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
3260 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
3261 size_array_1 = ndr_get_array_size(ndr, &r->array);
3262 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
3263 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
3264 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
3265 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
3266 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo10(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
3268 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
3269 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo10(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
3271 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
3272 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
3274 if (r->array) {
3275 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
3278 return NDR_ERR_SUCCESS;
3281 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr10(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr10 *r)
3283 uint32_t cntr_array_1;
3284 ndr_print_struct(ndr, name, "srvsvc_NetSessCtr10");
3285 ndr->depth++;
3286 ndr_print_uint32(ndr, "count", r->count);
3287 ndr_print_ptr(ndr, "array", r->array);
3288 ndr->depth++;
3289 if (r->array) {
3290 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
3291 ndr->depth++;
3292 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
3293 char *idx_1=NULL;
3294 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
3295 ndr_print_srvsvc_NetSessInfo10(ndr, "array", &r->array[cntr_array_1]);
3296 free(idx_1);
3299 ndr->depth--;
3301 ndr->depth--;
3302 ndr->depth--;
3305 static enum ndr_err_code ndr_push_srvsvc_NetSessInfo502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfo502 *r)
3307 if (ndr_flags & NDR_SCALARS) {
3308 NDR_CHECK(ndr_push_align(ndr, 5));
3309 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client));
3310 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
3311 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_open));
3312 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
3313 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idle_time));
3314 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->user_flags));
3315 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client_type));
3316 NDR_CHECK(ndr_push_unique_ptr(ndr, r->transport));
3317 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3319 if (ndr_flags & NDR_BUFFERS) {
3320 if (r->client) {
3321 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
3322 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3323 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
3324 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client, ndr_charset_length(r->client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3326 if (r->user) {
3327 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
3328 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3329 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
3330 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3332 if (r->client_type) {
3333 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client_type, CH_UTF16)));
3334 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3335 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client_type, CH_UTF16)));
3336 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client_type, ndr_charset_length(r->client_type, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3338 if (r->transport) {
3339 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->transport, CH_UTF16)));
3340 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3341 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->transport, CH_UTF16)));
3342 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->transport, ndr_charset_length(r->transport, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3345 return NDR_ERR_SUCCESS;
3348 static enum ndr_err_code ndr_pull_srvsvc_NetSessInfo502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfo502 *r)
3350 uint32_t _ptr_client;
3351 uint32_t size_client_1 = 0;
3352 uint32_t length_client_1 = 0;
3353 TALLOC_CTX *_mem_save_client_0;
3354 uint32_t _ptr_user;
3355 uint32_t size_user_1 = 0;
3356 uint32_t length_user_1 = 0;
3357 TALLOC_CTX *_mem_save_user_0;
3358 uint32_t _ptr_client_type;
3359 uint32_t size_client_type_1 = 0;
3360 uint32_t length_client_type_1 = 0;
3361 TALLOC_CTX *_mem_save_client_type_0;
3362 uint32_t _ptr_transport;
3363 uint32_t size_transport_1 = 0;
3364 uint32_t length_transport_1 = 0;
3365 TALLOC_CTX *_mem_save_transport_0;
3366 if (ndr_flags & NDR_SCALARS) {
3367 NDR_CHECK(ndr_pull_align(ndr, 5));
3368 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
3369 if (_ptr_client) {
3370 NDR_PULL_ALLOC(ndr, r->client);
3371 } else {
3372 r->client = NULL;
3374 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
3375 if (_ptr_user) {
3376 NDR_PULL_ALLOC(ndr, r->user);
3377 } else {
3378 r->user = NULL;
3380 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_open));
3381 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
3382 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idle_time));
3383 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->user_flags));
3384 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client_type));
3385 if (_ptr_client_type) {
3386 NDR_PULL_ALLOC(ndr, r->client_type);
3387 } else {
3388 r->client_type = NULL;
3390 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_transport));
3391 if (_ptr_transport) {
3392 NDR_PULL_ALLOC(ndr, r->transport);
3393 } else {
3394 r->transport = NULL;
3396 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3398 if (ndr_flags & NDR_BUFFERS) {
3399 if (r->client) {
3400 _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
3401 NDR_PULL_SET_MEM_CTX(ndr, r->client, 0);
3402 NDR_CHECK(ndr_pull_array_size(ndr, &r->client));
3403 NDR_CHECK(ndr_pull_array_length(ndr, &r->client));
3404 size_client_1 = ndr_get_array_size(ndr, &r->client);
3405 length_client_1 = ndr_get_array_length(ndr, &r->client);
3406 if (length_client_1 > size_client_1) {
3407 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_client_1, length_client_1);
3409 NDR_CHECK(ndr_check_string_terminator(ndr, length_client_1, sizeof(uint16_t)));
3410 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client, length_client_1, sizeof(uint16_t), CH_UTF16));
3411 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
3413 if (r->user) {
3414 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
3415 NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
3416 NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
3417 NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
3418 size_user_1 = ndr_get_array_size(ndr, &r->user);
3419 length_user_1 = ndr_get_array_length(ndr, &r->user);
3420 if (length_user_1 > size_user_1) {
3421 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_user_1, length_user_1);
3423 NDR_CHECK(ndr_check_string_terminator(ndr, length_user_1, sizeof(uint16_t)));
3424 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, length_user_1, sizeof(uint16_t), CH_UTF16));
3425 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
3427 if (r->client_type) {
3428 _mem_save_client_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
3429 NDR_PULL_SET_MEM_CTX(ndr, r->client_type, 0);
3430 NDR_CHECK(ndr_pull_array_size(ndr, &r->client_type));
3431 NDR_CHECK(ndr_pull_array_length(ndr, &r->client_type));
3432 size_client_type_1 = ndr_get_array_size(ndr, &r->client_type);
3433 length_client_type_1 = ndr_get_array_length(ndr, &r->client_type);
3434 if (length_client_type_1 > size_client_type_1) {
3435 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_client_type_1, length_client_type_1);
3437 NDR_CHECK(ndr_check_string_terminator(ndr, length_client_type_1, sizeof(uint16_t)));
3438 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client_type, length_client_type_1, sizeof(uint16_t), CH_UTF16));
3439 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_type_0, 0);
3441 if (r->transport) {
3442 _mem_save_transport_0 = NDR_PULL_GET_MEM_CTX(ndr);
3443 NDR_PULL_SET_MEM_CTX(ndr, r->transport, 0);
3444 NDR_CHECK(ndr_pull_array_size(ndr, &r->transport));
3445 NDR_CHECK(ndr_pull_array_length(ndr, &r->transport));
3446 size_transport_1 = ndr_get_array_size(ndr, &r->transport);
3447 length_transport_1 = ndr_get_array_length(ndr, &r->transport);
3448 if (length_transport_1 > size_transport_1) {
3449 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_transport_1, length_transport_1);
3451 NDR_CHECK(ndr_check_string_terminator(ndr, length_transport_1, sizeof(uint16_t)));
3452 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->transport, length_transport_1, sizeof(uint16_t), CH_UTF16));
3453 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_transport_0, 0);
3456 return NDR_ERR_SUCCESS;
3459 _PUBLIC_ void ndr_print_srvsvc_NetSessInfo502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo502 *r)
3461 ndr_print_struct(ndr, name, "srvsvc_NetSessInfo502");
3462 ndr->depth++;
3463 ndr_print_ptr(ndr, "client", r->client);
3464 ndr->depth++;
3465 if (r->client) {
3466 ndr_print_string(ndr, "client", r->client);
3468 ndr->depth--;
3469 ndr_print_ptr(ndr, "user", r->user);
3470 ndr->depth++;
3471 if (r->user) {
3472 ndr_print_string(ndr, "user", r->user);
3474 ndr->depth--;
3475 ndr_print_uint32(ndr, "num_open", r->num_open);
3476 ndr_print_uint32(ndr, "time", r->time);
3477 ndr_print_uint32(ndr, "idle_time", r->idle_time);
3478 ndr_print_uint32(ndr, "user_flags", r->user_flags);
3479 ndr_print_ptr(ndr, "client_type", r->client_type);
3480 ndr->depth++;
3481 if (r->client_type) {
3482 ndr_print_string(ndr, "client_type", r->client_type);
3484 ndr->depth--;
3485 ndr_print_ptr(ndr, "transport", r->transport);
3486 ndr->depth++;
3487 if (r->transport) {
3488 ndr_print_string(ndr, "transport", r->transport);
3490 ndr->depth--;
3491 ndr->depth--;
3494 static enum ndr_err_code ndr_push_srvsvc_NetSessCtr502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessCtr502 *r)
3496 uint32_t cntr_array_1;
3497 if (ndr_flags & NDR_SCALARS) {
3498 NDR_CHECK(ndr_push_align(ndr, 5));
3499 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
3500 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
3501 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3503 if (ndr_flags & NDR_BUFFERS) {
3504 if (r->array) {
3505 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
3506 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3507 NDR_CHECK(ndr_push_srvsvc_NetSessInfo502(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
3509 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3510 NDR_CHECK(ndr_push_srvsvc_NetSessInfo502(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
3514 return NDR_ERR_SUCCESS;
3517 static enum ndr_err_code ndr_pull_srvsvc_NetSessCtr502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr502 *r)
3519 uint32_t _ptr_array;
3520 uint32_t size_array_1 = 0;
3521 uint32_t cntr_array_1;
3522 TALLOC_CTX *_mem_save_array_0;
3523 TALLOC_CTX *_mem_save_array_1;
3524 if (ndr_flags & NDR_SCALARS) {
3525 NDR_CHECK(ndr_pull_align(ndr, 5));
3526 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
3527 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
3528 if (_ptr_array) {
3529 NDR_PULL_ALLOC(ndr, r->array);
3530 } else {
3531 r->array = NULL;
3533 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3535 if (ndr_flags & NDR_BUFFERS) {
3536 if (r->array) {
3537 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
3538 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
3539 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
3540 size_array_1 = ndr_get_array_size(ndr, &r->array);
3541 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
3542 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
3543 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
3544 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
3545 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo502(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
3547 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
3548 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo502(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
3550 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
3551 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
3553 if (r->array) {
3554 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
3557 return NDR_ERR_SUCCESS;
3560 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr502 *r)
3562 uint32_t cntr_array_1;
3563 ndr_print_struct(ndr, name, "srvsvc_NetSessCtr502");
3564 ndr->depth++;
3565 ndr_print_uint32(ndr, "count", r->count);
3566 ndr_print_ptr(ndr, "array", r->array);
3567 ndr->depth++;
3568 if (r->array) {
3569 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
3570 ndr->depth++;
3571 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
3572 char *idx_1=NULL;
3573 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
3574 ndr_print_srvsvc_NetSessInfo502(ndr, "array", &r->array[cntr_array_1]);
3575 free(idx_1);
3578 ndr->depth--;
3580 ndr->depth--;
3581 ndr->depth--;
3584 static enum ndr_err_code ndr_push_srvsvc_NetSessCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetSessCtr *r)
3586 if (ndr_flags & NDR_SCALARS) {
3587 int level = ndr_push_get_switch_value(ndr, r);
3588 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
3589 NDR_CHECK(ndr_push_union_align(ndr, 5));
3590 switch (level) {
3591 case 0: {
3592 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0));
3593 break; }
3595 case 1: {
3596 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
3597 break; }
3599 case 2: {
3600 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr2));
3601 break; }
3603 case 10: {
3604 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr10));
3605 break; }
3607 case 502: {
3608 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr502));
3609 break; }
3611 default: {
3612 break; }
3616 if (ndr_flags & NDR_BUFFERS) {
3617 int level = ndr_push_get_switch_value(ndr, r);
3618 switch (level) {
3619 case 0:
3620 if (r->ctr0) {
3621 NDR_CHECK(ndr_push_srvsvc_NetSessCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
3623 break;
3625 case 1:
3626 if (r->ctr1) {
3627 NDR_CHECK(ndr_push_srvsvc_NetSessCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
3629 break;
3631 case 2:
3632 if (r->ctr2) {
3633 NDR_CHECK(ndr_push_srvsvc_NetSessCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
3635 break;
3637 case 10:
3638 if (r->ctr10) {
3639 NDR_CHECK(ndr_push_srvsvc_NetSessCtr10(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr10));
3641 break;
3643 case 502:
3644 if (r->ctr502) {
3645 NDR_CHECK(ndr_push_srvsvc_NetSessCtr502(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr502));
3647 break;
3649 default:
3650 break;
3654 return NDR_ERR_SUCCESS;
3657 static enum ndr_err_code ndr_pull_srvsvc_NetSessCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetSessCtr *r)
3659 int level;
3660 uint32_t _level;
3661 TALLOC_CTX *_mem_save_ctr0_0;
3662 uint32_t _ptr_ctr0;
3663 TALLOC_CTX *_mem_save_ctr1_0;
3664 uint32_t _ptr_ctr1;
3665 TALLOC_CTX *_mem_save_ctr2_0;
3666 uint32_t _ptr_ctr2;
3667 TALLOC_CTX *_mem_save_ctr10_0;
3668 uint32_t _ptr_ctr10;
3669 TALLOC_CTX *_mem_save_ctr502_0;
3670 uint32_t _ptr_ctr502;
3671 level = ndr_pull_get_switch_value(ndr, r);
3672 if (ndr_flags & NDR_SCALARS) {
3673 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
3674 if (_level != level) {
3675 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
3677 NDR_CHECK(ndr_pull_union_align(ndr, 5));
3678 switch (level) {
3679 case 0: {
3680 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr0));
3681 if (_ptr_ctr0) {
3682 NDR_PULL_ALLOC(ndr, r->ctr0);
3683 } else {
3684 r->ctr0 = NULL;
3686 break; }
3688 case 1: {
3689 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
3690 if (_ptr_ctr1) {
3691 NDR_PULL_ALLOC(ndr, r->ctr1);
3692 } else {
3693 r->ctr1 = NULL;
3695 break; }
3697 case 2: {
3698 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr2));
3699 if (_ptr_ctr2) {
3700 NDR_PULL_ALLOC(ndr, r->ctr2);
3701 } else {
3702 r->ctr2 = NULL;
3704 break; }
3706 case 10: {
3707 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr10));
3708 if (_ptr_ctr10) {
3709 NDR_PULL_ALLOC(ndr, r->ctr10);
3710 } else {
3711 r->ctr10 = NULL;
3713 break; }
3715 case 502: {
3716 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr502));
3717 if (_ptr_ctr502) {
3718 NDR_PULL_ALLOC(ndr, r->ctr502);
3719 } else {
3720 r->ctr502 = NULL;
3722 break; }
3724 default: {
3725 break; }
3729 if (ndr_flags & NDR_BUFFERS) {
3730 switch (level) {
3731 case 0:
3732 if (r->ctr0) {
3733 _mem_save_ctr0_0 = NDR_PULL_GET_MEM_CTX(ndr);
3734 NDR_PULL_SET_MEM_CTX(ndr, r->ctr0, 0);
3735 NDR_CHECK(ndr_pull_srvsvc_NetSessCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
3736 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr0_0, 0);
3738 break;
3740 case 1:
3741 if (r->ctr1) {
3742 _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
3743 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
3744 NDR_CHECK(ndr_pull_srvsvc_NetSessCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
3745 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
3747 break;
3749 case 2:
3750 if (r->ctr2) {
3751 _mem_save_ctr2_0 = NDR_PULL_GET_MEM_CTX(ndr);
3752 NDR_PULL_SET_MEM_CTX(ndr, r->ctr2, 0);
3753 NDR_CHECK(ndr_pull_srvsvc_NetSessCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
3754 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr2_0, 0);
3756 break;
3758 case 10:
3759 if (r->ctr10) {
3760 _mem_save_ctr10_0 = NDR_PULL_GET_MEM_CTX(ndr);
3761 NDR_PULL_SET_MEM_CTX(ndr, r->ctr10, 0);
3762 NDR_CHECK(ndr_pull_srvsvc_NetSessCtr10(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr10));
3763 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr10_0, 0);
3765 break;
3767 case 502:
3768 if (r->ctr502) {
3769 _mem_save_ctr502_0 = NDR_PULL_GET_MEM_CTX(ndr);
3770 NDR_PULL_SET_MEM_CTX(ndr, r->ctr502, 0);
3771 NDR_CHECK(ndr_pull_srvsvc_NetSessCtr502(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr502));
3772 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr502_0, 0);
3774 break;
3776 default:
3777 break;
3781 return NDR_ERR_SUCCESS;
3784 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetSessCtr *r)
3786 int level;
3787 level = ndr_print_get_switch_value(ndr, r);
3788 ndr_print_union(ndr, name, level, "srvsvc_NetSessCtr");
3789 switch (level) {
3790 case 0:
3791 ndr_print_ptr(ndr, "ctr0", r->ctr0);
3792 ndr->depth++;
3793 if (r->ctr0) {
3794 ndr_print_srvsvc_NetSessCtr0(ndr, "ctr0", r->ctr0);
3796 ndr->depth--;
3797 break;
3799 case 1:
3800 ndr_print_ptr(ndr, "ctr1", r->ctr1);
3801 ndr->depth++;
3802 if (r->ctr1) {
3803 ndr_print_srvsvc_NetSessCtr1(ndr, "ctr1", r->ctr1);
3805 ndr->depth--;
3806 break;
3808 case 2:
3809 ndr_print_ptr(ndr, "ctr2", r->ctr2);
3810 ndr->depth++;
3811 if (r->ctr2) {
3812 ndr_print_srvsvc_NetSessCtr2(ndr, "ctr2", r->ctr2);
3814 ndr->depth--;
3815 break;
3817 case 10:
3818 ndr_print_ptr(ndr, "ctr10", r->ctr10);
3819 ndr->depth++;
3820 if (r->ctr10) {
3821 ndr_print_srvsvc_NetSessCtr10(ndr, "ctr10", r->ctr10);
3823 ndr->depth--;
3824 break;
3826 case 502:
3827 ndr_print_ptr(ndr, "ctr502", r->ctr502);
3828 ndr->depth++;
3829 if (r->ctr502) {
3830 ndr_print_srvsvc_NetSessCtr502(ndr, "ctr502", r->ctr502);
3832 ndr->depth--;
3833 break;
3835 default:
3836 break;
3841 static enum ndr_err_code ndr_push_srvsvc_NetSessInfoCtr(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfoCtr *r)
3843 if (ndr_flags & NDR_SCALARS) {
3844 NDR_CHECK(ndr_push_align(ndr, 5));
3845 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
3846 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level));
3847 NDR_CHECK(ndr_push_srvsvc_NetSessCtr(ndr, NDR_SCALARS, &r->ctr));
3848 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3850 if (ndr_flags & NDR_BUFFERS) {
3851 NDR_CHECK(ndr_push_srvsvc_NetSessCtr(ndr, NDR_BUFFERS, &r->ctr));
3853 return NDR_ERR_SUCCESS;
3856 static enum ndr_err_code ndr_pull_srvsvc_NetSessInfoCtr(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfoCtr *r)
3858 if (ndr_flags & NDR_SCALARS) {
3859 NDR_CHECK(ndr_pull_align(ndr, 5));
3860 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
3861 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level));
3862 NDR_CHECK(ndr_pull_srvsvc_NetSessCtr(ndr, NDR_SCALARS, &r->ctr));
3863 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3865 if (ndr_flags & NDR_BUFFERS) {
3866 NDR_CHECK(ndr_pull_srvsvc_NetSessCtr(ndr, NDR_BUFFERS, &r->ctr));
3868 return NDR_ERR_SUCCESS;
3871 _PUBLIC_ void ndr_print_srvsvc_NetSessInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfoCtr *r)
3873 ndr_print_struct(ndr, name, "srvsvc_NetSessInfoCtr");
3874 ndr->depth++;
3875 ndr_print_uint32(ndr, "level", r->level);
3876 ndr_print_set_switch_value(ndr, &r->ctr, r->level);
3877 ndr_print_srvsvc_NetSessCtr(ndr, "ctr", &r->ctr);
3878 ndr->depth--;
3881 static enum ndr_err_code ndr_push_srvsvc_ShareType(struct ndr_push *ndr, int ndr_flags, enum srvsvc_ShareType r)
3884 uint32_t _flags_save_ENUM = ndr->flags;
3885 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
3886 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
3887 ndr->flags = _flags_save_ENUM;
3889 return NDR_ERR_SUCCESS;
3892 static enum ndr_err_code ndr_pull_srvsvc_ShareType(struct ndr_pull *ndr, int ndr_flags, enum srvsvc_ShareType *r)
3894 uint32_t v;
3896 uint32_t _flags_save_ENUM = ndr->flags;
3897 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
3898 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
3899 *r = v;
3900 ndr->flags = _flags_save_ENUM;
3902 return NDR_ERR_SUCCESS;
3905 _PUBLIC_ void ndr_print_srvsvc_ShareType(struct ndr_print *ndr, const char *name, enum srvsvc_ShareType r)
3907 const char *val = NULL;
3910 uint32_t _flags_save_ENUM = ndr->flags;
3911 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
3912 switch (r) {
3913 case STYPE_DISKTREE: val = "STYPE_DISKTREE"; break;
3914 case STYPE_DISKTREE_TEMPORARY: val = "STYPE_DISKTREE_TEMPORARY"; break;
3915 case STYPE_DISKTREE_HIDDEN: val = "STYPE_DISKTREE_HIDDEN"; break;
3916 case STYPE_PRINTQ: val = "STYPE_PRINTQ"; break;
3917 case STYPE_PRINTQ_TEMPORARY: val = "STYPE_PRINTQ_TEMPORARY"; break;
3918 case STYPE_PRINTQ_HIDDEN: val = "STYPE_PRINTQ_HIDDEN"; break;
3919 case STYPE_DEVICE: val = "STYPE_DEVICE"; break;
3920 case STYPE_DEVICE_TEMPORARY: val = "STYPE_DEVICE_TEMPORARY"; break;
3921 case STYPE_DEVICE_HIDDEN: val = "STYPE_DEVICE_HIDDEN"; break;
3922 case STYPE_IPC: val = "STYPE_IPC"; break;
3923 case STYPE_IPC_TEMPORARY: val = "STYPE_IPC_TEMPORARY"; break;
3924 case STYPE_IPC_HIDDEN: val = "STYPE_IPC_HIDDEN"; break;
3926 ndr_print_enum(ndr, name, "ENUM", val, r);
3927 ndr->flags = _flags_save_ENUM;
3931 static enum ndr_err_code ndr_push_srvsvc_NetShareInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo0 *r)
3933 if (ndr_flags & NDR_SCALARS) {
3934 NDR_CHECK(ndr_push_align(ndr, 5));
3935 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
3936 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3938 if (ndr_flags & NDR_BUFFERS) {
3939 if (r->name) {
3940 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
3941 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3942 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
3943 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3946 return NDR_ERR_SUCCESS;
3949 static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo0 *r)
3951 uint32_t _ptr_name;
3952 uint32_t size_name_1 = 0;
3953 uint32_t length_name_1 = 0;
3954 TALLOC_CTX *_mem_save_name_0;
3955 if (ndr_flags & NDR_SCALARS) {
3956 NDR_CHECK(ndr_pull_align(ndr, 5));
3957 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
3958 if (_ptr_name) {
3959 NDR_PULL_ALLOC(ndr, r->name);
3960 } else {
3961 r->name = NULL;
3963 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3965 if (ndr_flags & NDR_BUFFERS) {
3966 if (r->name) {
3967 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
3968 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
3969 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
3970 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
3971 size_name_1 = ndr_get_array_size(ndr, &r->name);
3972 length_name_1 = ndr_get_array_length(ndr, &r->name);
3973 if (length_name_1 > size_name_1) {
3974 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_name_1, length_name_1);
3976 NDR_CHECK(ndr_check_string_terminator(ndr, length_name_1, sizeof(uint16_t)));
3977 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, length_name_1, sizeof(uint16_t), CH_UTF16));
3978 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
3981 return NDR_ERR_SUCCESS;
3984 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo0 *r)
3986 ndr_print_struct(ndr, name, "srvsvc_NetShareInfo0");
3987 ndr->depth++;
3988 ndr_print_ptr(ndr, "name", r->name);
3989 ndr->depth++;
3990 if (r->name) {
3991 ndr_print_string(ndr, "name", r->name);
3993 ndr->depth--;
3994 ndr->depth--;
3997 static enum ndr_err_code ndr_push_srvsvc_NetShareCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr0 *r)
3999 uint32_t cntr_array_1;
4000 if (ndr_flags & NDR_SCALARS) {
4001 NDR_CHECK(ndr_push_align(ndr, 5));
4002 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4003 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
4004 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4006 if (ndr_flags & NDR_BUFFERS) {
4007 if (r->array) {
4008 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
4009 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4010 NDR_CHECK(ndr_push_srvsvc_NetShareInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4012 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4013 NDR_CHECK(ndr_push_srvsvc_NetShareInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
4017 return NDR_ERR_SUCCESS;
4020 static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr0 *r)
4022 uint32_t _ptr_array;
4023 uint32_t size_array_1 = 0;
4024 uint32_t cntr_array_1;
4025 TALLOC_CTX *_mem_save_array_0;
4026 TALLOC_CTX *_mem_save_array_1;
4027 if (ndr_flags & NDR_SCALARS) {
4028 NDR_CHECK(ndr_pull_align(ndr, 5));
4029 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4030 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
4031 if (_ptr_array) {
4032 NDR_PULL_ALLOC(ndr, r->array);
4033 } else {
4034 r->array = NULL;
4036 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4038 if (ndr_flags & NDR_BUFFERS) {
4039 if (r->array) {
4040 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
4041 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4042 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
4043 size_array_1 = ndr_get_array_size(ndr, &r->array);
4044 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
4045 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
4046 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4047 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
4048 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4050 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
4051 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
4053 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
4054 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
4056 if (r->array) {
4057 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
4060 return NDR_ERR_SUCCESS;
4063 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr0 *r)
4065 uint32_t cntr_array_1;
4066 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr0");
4067 ndr->depth++;
4068 ndr_print_uint32(ndr, "count", r->count);
4069 ndr_print_ptr(ndr, "array", r->array);
4070 ndr->depth++;
4071 if (r->array) {
4072 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
4073 ndr->depth++;
4074 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
4075 char *idx_1=NULL;
4076 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
4077 ndr_print_srvsvc_NetShareInfo0(ndr, "array", &r->array[cntr_array_1]);
4078 free(idx_1);
4081 ndr->depth--;
4083 ndr->depth--;
4084 ndr->depth--;
4087 static enum ndr_err_code ndr_push_srvsvc_NetShareInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo1 *r)
4089 if (ndr_flags & NDR_SCALARS) {
4090 NDR_CHECK(ndr_push_align(ndr, 5));
4091 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
4092 NDR_CHECK(ndr_push_srvsvc_ShareType(ndr, NDR_SCALARS, r->type));
4093 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
4094 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4096 if (ndr_flags & NDR_BUFFERS) {
4097 if (r->name) {
4098 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
4099 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4100 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
4101 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4103 if (r->comment) {
4104 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
4105 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4106 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
4107 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4110 return NDR_ERR_SUCCESS;
4113 static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo1 *r)
4115 uint32_t _ptr_name;
4116 uint32_t size_name_1 = 0;
4117 uint32_t length_name_1 = 0;
4118 TALLOC_CTX *_mem_save_name_0;
4119 uint32_t _ptr_comment;
4120 uint32_t size_comment_1 = 0;
4121 uint32_t length_comment_1 = 0;
4122 TALLOC_CTX *_mem_save_comment_0;
4123 if (ndr_flags & NDR_SCALARS) {
4124 NDR_CHECK(ndr_pull_align(ndr, 5));
4125 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
4126 if (_ptr_name) {
4127 NDR_PULL_ALLOC(ndr, r->name);
4128 } else {
4129 r->name = NULL;
4131 NDR_CHECK(ndr_pull_srvsvc_ShareType(ndr, NDR_SCALARS, &r->type));
4132 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
4133 if (_ptr_comment) {
4134 NDR_PULL_ALLOC(ndr, r->comment);
4135 } else {
4136 r->comment = NULL;
4138 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4140 if (ndr_flags & NDR_BUFFERS) {
4141 if (r->name) {
4142 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4143 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
4144 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
4145 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
4146 size_name_1 = ndr_get_array_size(ndr, &r->name);
4147 length_name_1 = ndr_get_array_length(ndr, &r->name);
4148 if (length_name_1 > size_name_1) {
4149 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_name_1, length_name_1);
4151 NDR_CHECK(ndr_check_string_terminator(ndr, length_name_1, sizeof(uint16_t)));
4152 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, length_name_1, sizeof(uint16_t), CH_UTF16));
4153 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
4155 if (r->comment) {
4156 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
4157 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
4158 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
4159 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
4160 size_comment_1 = ndr_get_array_size(ndr, &r->comment);
4161 length_comment_1 = ndr_get_array_length(ndr, &r->comment);
4162 if (length_comment_1 > size_comment_1) {
4163 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_comment_1, length_comment_1);
4165 NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_1, sizeof(uint16_t)));
4166 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, length_comment_1, sizeof(uint16_t), CH_UTF16));
4167 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
4170 return NDR_ERR_SUCCESS;
4173 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1 *r)
4175 ndr_print_struct(ndr, name, "srvsvc_NetShareInfo1");
4176 ndr->depth++;
4177 ndr_print_ptr(ndr, "name", r->name);
4178 ndr->depth++;
4179 if (r->name) {
4180 ndr_print_string(ndr, "name", r->name);
4182 ndr->depth--;
4183 ndr_print_srvsvc_ShareType(ndr, "type", r->type);
4184 ndr_print_ptr(ndr, "comment", r->comment);
4185 ndr->depth++;
4186 if (r->comment) {
4187 ndr_print_string(ndr, "comment", r->comment);
4189 ndr->depth--;
4190 ndr->depth--;
4193 static enum ndr_err_code ndr_push_srvsvc_NetShareCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1 *r)
4195 uint32_t cntr_array_1;
4196 if (ndr_flags & NDR_SCALARS) {
4197 NDR_CHECK(ndr_push_align(ndr, 5));
4198 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4199 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
4200 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4202 if (ndr_flags & NDR_BUFFERS) {
4203 if (r->array) {
4204 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
4205 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4206 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4208 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4209 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
4213 return NDR_ERR_SUCCESS;
4216 static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1 *r)
4218 uint32_t _ptr_array;
4219 uint32_t size_array_1 = 0;
4220 uint32_t cntr_array_1;
4221 TALLOC_CTX *_mem_save_array_0;
4222 TALLOC_CTX *_mem_save_array_1;
4223 if (ndr_flags & NDR_SCALARS) {
4224 NDR_CHECK(ndr_pull_align(ndr, 5));
4225 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4226 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
4227 if (_ptr_array) {
4228 NDR_PULL_ALLOC(ndr, r->array);
4229 } else {
4230 r->array = NULL;
4232 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4234 if (ndr_flags & NDR_BUFFERS) {
4235 if (r->array) {
4236 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
4237 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4238 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
4239 size_array_1 = ndr_get_array_size(ndr, &r->array);
4240 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
4241 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
4242 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4243 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
4244 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4246 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
4247 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
4249 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
4250 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
4252 if (r->array) {
4253 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
4256 return NDR_ERR_SUCCESS;
4259 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1 *r)
4261 uint32_t cntr_array_1;
4262 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr1");
4263 ndr->depth++;
4264 ndr_print_uint32(ndr, "count", r->count);
4265 ndr_print_ptr(ndr, "array", r->array);
4266 ndr->depth++;
4267 if (r->array) {
4268 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
4269 ndr->depth++;
4270 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
4271 char *idx_1=NULL;
4272 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
4273 ndr_print_srvsvc_NetShareInfo1(ndr, "array", &r->array[cntr_array_1]);
4274 free(idx_1);
4277 ndr->depth--;
4279 ndr->depth--;
4280 ndr->depth--;
4283 static enum ndr_err_code ndr_push_srvsvc_NetShareInfo2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo2 *r)
4285 if (ndr_flags & NDR_SCALARS) {
4286 NDR_CHECK(ndr_push_align(ndr, 5));
4287 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
4288 NDR_CHECK(ndr_push_srvsvc_ShareType(ndr, NDR_SCALARS, r->type));
4289 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
4290 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->permissions));
4291 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_users));
4292 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->current_users));
4293 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
4294 NDR_CHECK(ndr_push_unique_ptr(ndr, r->password));
4295 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4297 if (ndr_flags & NDR_BUFFERS) {
4298 if (r->name) {
4299 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
4300 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4301 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
4302 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4304 if (r->comment) {
4305 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
4306 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4307 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
4308 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4310 if (r->path) {
4311 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
4312 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4313 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
4314 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4316 if (r->password) {
4317 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->password, CH_UTF16)));
4318 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4319 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->password, CH_UTF16)));
4320 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->password, ndr_charset_length(r->password, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4323 return NDR_ERR_SUCCESS;
4326 static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo2 *r)
4328 uint32_t _ptr_name;
4329 uint32_t size_name_1 = 0;
4330 uint32_t length_name_1 = 0;
4331 TALLOC_CTX *_mem_save_name_0;
4332 uint32_t _ptr_comment;
4333 uint32_t size_comment_1 = 0;
4334 uint32_t length_comment_1 = 0;
4335 TALLOC_CTX *_mem_save_comment_0;
4336 uint32_t _ptr_path;
4337 uint32_t size_path_1 = 0;
4338 uint32_t length_path_1 = 0;
4339 TALLOC_CTX *_mem_save_path_0;
4340 uint32_t _ptr_password;
4341 uint32_t size_password_1 = 0;
4342 uint32_t length_password_1 = 0;
4343 TALLOC_CTX *_mem_save_password_0;
4344 if (ndr_flags & NDR_SCALARS) {
4345 NDR_CHECK(ndr_pull_align(ndr, 5));
4346 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
4347 if (_ptr_name) {
4348 NDR_PULL_ALLOC(ndr, r->name);
4349 } else {
4350 r->name = NULL;
4352 NDR_CHECK(ndr_pull_srvsvc_ShareType(ndr, NDR_SCALARS, &r->type));
4353 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
4354 if (_ptr_comment) {
4355 NDR_PULL_ALLOC(ndr, r->comment);
4356 } else {
4357 r->comment = NULL;
4359 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->permissions));
4360 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_users));
4361 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->current_users));
4362 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
4363 if (_ptr_path) {
4364 NDR_PULL_ALLOC(ndr, r->path);
4365 } else {
4366 r->path = NULL;
4368 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
4369 if (_ptr_password) {
4370 NDR_PULL_ALLOC(ndr, r->password);
4371 } else {
4372 r->password = NULL;
4374 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4376 if (ndr_flags & NDR_BUFFERS) {
4377 if (r->name) {
4378 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4379 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
4380 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
4381 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
4382 size_name_1 = ndr_get_array_size(ndr, &r->name);
4383 length_name_1 = ndr_get_array_length(ndr, &r->name);
4384 if (length_name_1 > size_name_1) {
4385 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_name_1, length_name_1);
4387 NDR_CHECK(ndr_check_string_terminator(ndr, length_name_1, sizeof(uint16_t)));
4388 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, length_name_1, sizeof(uint16_t), CH_UTF16));
4389 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
4391 if (r->comment) {
4392 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
4393 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
4394 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
4395 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
4396 size_comment_1 = ndr_get_array_size(ndr, &r->comment);
4397 length_comment_1 = ndr_get_array_length(ndr, &r->comment);
4398 if (length_comment_1 > size_comment_1) {
4399 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_comment_1, length_comment_1);
4401 NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_1, sizeof(uint16_t)));
4402 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, length_comment_1, sizeof(uint16_t), CH_UTF16));
4403 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
4405 if (r->path) {
4406 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
4407 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
4408 NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
4409 NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
4410 size_path_1 = ndr_get_array_size(ndr, &r->path);
4411 length_path_1 = ndr_get_array_length(ndr, &r->path);
4412 if (length_path_1 > size_path_1) {
4413 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_path_1, length_path_1);
4415 NDR_CHECK(ndr_check_string_terminator(ndr, length_path_1, sizeof(uint16_t)));
4416 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, length_path_1, sizeof(uint16_t), CH_UTF16));
4417 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
4419 if (r->password) {
4420 _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
4421 NDR_PULL_SET_MEM_CTX(ndr, r->password, 0);
4422 NDR_CHECK(ndr_pull_array_size(ndr, &r->password));
4423 NDR_CHECK(ndr_pull_array_length(ndr, &r->password));
4424 size_password_1 = ndr_get_array_size(ndr, &r->password);
4425 length_password_1 = ndr_get_array_length(ndr, &r->password);
4426 if (length_password_1 > size_password_1) {
4427 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_password_1, length_password_1);
4429 NDR_CHECK(ndr_check_string_terminator(ndr, length_password_1, sizeof(uint16_t)));
4430 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->password, length_password_1, sizeof(uint16_t), CH_UTF16));
4431 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
4434 return NDR_ERR_SUCCESS;
4437 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo2 *r)
4439 ndr_print_struct(ndr, name, "srvsvc_NetShareInfo2");
4440 ndr->depth++;
4441 ndr_print_ptr(ndr, "name", r->name);
4442 ndr->depth++;
4443 if (r->name) {
4444 ndr_print_string(ndr, "name", r->name);
4446 ndr->depth--;
4447 ndr_print_srvsvc_ShareType(ndr, "type", r->type);
4448 ndr_print_ptr(ndr, "comment", r->comment);
4449 ndr->depth++;
4450 if (r->comment) {
4451 ndr_print_string(ndr, "comment", r->comment);
4453 ndr->depth--;
4454 ndr_print_uint32(ndr, "permissions", r->permissions);
4455 ndr_print_uint32(ndr, "max_users", r->max_users);
4456 ndr_print_uint32(ndr, "current_users", r->current_users);
4457 ndr_print_ptr(ndr, "path", r->path);
4458 ndr->depth++;
4459 if (r->path) {
4460 ndr_print_string(ndr, "path", r->path);
4462 ndr->depth--;
4463 ndr_print_ptr(ndr, "password", r->password);
4464 ndr->depth++;
4465 if (r->password) {
4466 ndr_print_string(ndr, "password", r->password);
4468 ndr->depth--;
4469 ndr->depth--;
4472 static enum ndr_err_code ndr_push_srvsvc_NetShareCtr2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr2 *r)
4474 uint32_t cntr_array_1;
4475 if (ndr_flags & NDR_SCALARS) {
4476 NDR_CHECK(ndr_push_align(ndr, 5));
4477 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4478 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
4479 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4481 if (ndr_flags & NDR_BUFFERS) {
4482 if (r->array) {
4483 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
4484 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4485 NDR_CHECK(ndr_push_srvsvc_NetShareInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4487 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4488 NDR_CHECK(ndr_push_srvsvc_NetShareInfo2(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
4492 return NDR_ERR_SUCCESS;
4495 static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr2 *r)
4497 uint32_t _ptr_array;
4498 uint32_t size_array_1 = 0;
4499 uint32_t cntr_array_1;
4500 TALLOC_CTX *_mem_save_array_0;
4501 TALLOC_CTX *_mem_save_array_1;
4502 if (ndr_flags & NDR_SCALARS) {
4503 NDR_CHECK(ndr_pull_align(ndr, 5));
4504 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4505 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
4506 if (_ptr_array) {
4507 NDR_PULL_ALLOC(ndr, r->array);
4508 } else {
4509 r->array = NULL;
4511 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4513 if (ndr_flags & NDR_BUFFERS) {
4514 if (r->array) {
4515 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
4516 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4517 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
4518 size_array_1 = ndr_get_array_size(ndr, &r->array);
4519 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
4520 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
4521 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4522 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
4523 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4525 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
4526 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo2(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
4528 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
4529 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
4531 if (r->array) {
4532 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
4535 return NDR_ERR_SUCCESS;
4538 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr2 *r)
4540 uint32_t cntr_array_1;
4541 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr2");
4542 ndr->depth++;
4543 ndr_print_uint32(ndr, "count", r->count);
4544 ndr_print_ptr(ndr, "array", r->array);
4545 ndr->depth++;
4546 if (r->array) {
4547 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
4548 ndr->depth++;
4549 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
4550 char *idx_1=NULL;
4551 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
4552 ndr_print_srvsvc_NetShareInfo2(ndr, "array", &r->array[cntr_array_1]);
4553 free(idx_1);
4556 ndr->depth--;
4558 ndr->depth--;
4559 ndr->depth--;
4562 static enum ndr_err_code ndr_push_srvsvc_NetShareInfo501(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo501 *r)
4564 if (ndr_flags & NDR_SCALARS) {
4565 NDR_CHECK(ndr_push_align(ndr, 5));
4566 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
4567 NDR_CHECK(ndr_push_srvsvc_ShareType(ndr, NDR_SCALARS, r->type));
4568 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
4569 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->csc_policy));
4570 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4572 if (ndr_flags & NDR_BUFFERS) {
4573 if (r->name) {
4574 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
4575 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4576 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
4577 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4579 if (r->comment) {
4580 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
4581 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4582 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
4583 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4586 return NDR_ERR_SUCCESS;
4589 static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo501(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo501 *r)
4591 uint32_t _ptr_name;
4592 uint32_t size_name_1 = 0;
4593 uint32_t length_name_1 = 0;
4594 TALLOC_CTX *_mem_save_name_0;
4595 uint32_t _ptr_comment;
4596 uint32_t size_comment_1 = 0;
4597 uint32_t length_comment_1 = 0;
4598 TALLOC_CTX *_mem_save_comment_0;
4599 if (ndr_flags & NDR_SCALARS) {
4600 NDR_CHECK(ndr_pull_align(ndr, 5));
4601 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
4602 if (_ptr_name) {
4603 NDR_PULL_ALLOC(ndr, r->name);
4604 } else {
4605 r->name = NULL;
4607 NDR_CHECK(ndr_pull_srvsvc_ShareType(ndr, NDR_SCALARS, &r->type));
4608 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
4609 if (_ptr_comment) {
4610 NDR_PULL_ALLOC(ndr, r->comment);
4611 } else {
4612 r->comment = NULL;
4614 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->csc_policy));
4615 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4617 if (ndr_flags & NDR_BUFFERS) {
4618 if (r->name) {
4619 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4620 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
4621 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
4622 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
4623 size_name_1 = ndr_get_array_size(ndr, &r->name);
4624 length_name_1 = ndr_get_array_length(ndr, &r->name);
4625 if (length_name_1 > size_name_1) {
4626 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_name_1, length_name_1);
4628 NDR_CHECK(ndr_check_string_terminator(ndr, length_name_1, sizeof(uint16_t)));
4629 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, length_name_1, sizeof(uint16_t), CH_UTF16));
4630 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
4632 if (r->comment) {
4633 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
4634 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
4635 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
4636 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
4637 size_comment_1 = ndr_get_array_size(ndr, &r->comment);
4638 length_comment_1 = ndr_get_array_length(ndr, &r->comment);
4639 if (length_comment_1 > size_comment_1) {
4640 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_comment_1, length_comment_1);
4642 NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_1, sizeof(uint16_t)));
4643 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, length_comment_1, sizeof(uint16_t), CH_UTF16));
4644 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
4647 return NDR_ERR_SUCCESS;
4650 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo501(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo501 *r)
4652 ndr_print_struct(ndr, name, "srvsvc_NetShareInfo501");
4653 ndr->depth++;
4654 ndr_print_ptr(ndr, "name", r->name);
4655 ndr->depth++;
4656 if (r->name) {
4657 ndr_print_string(ndr, "name", r->name);
4659 ndr->depth--;
4660 ndr_print_srvsvc_ShareType(ndr, "type", r->type);
4661 ndr_print_ptr(ndr, "comment", r->comment);
4662 ndr->depth++;
4663 if (r->comment) {
4664 ndr_print_string(ndr, "comment", r->comment);
4666 ndr->depth--;
4667 ndr_print_uint32(ndr, "csc_policy", r->csc_policy);
4668 ndr->depth--;
4671 static enum ndr_err_code ndr_push_srvsvc_NetShareCtr501(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr501 *r)
4673 uint32_t cntr_array_1;
4674 if (ndr_flags & NDR_SCALARS) {
4675 NDR_CHECK(ndr_push_align(ndr, 5));
4676 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4677 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
4678 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4680 if (ndr_flags & NDR_BUFFERS) {
4681 if (r->array) {
4682 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
4683 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4684 NDR_CHECK(ndr_push_srvsvc_NetShareInfo501(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4686 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4687 NDR_CHECK(ndr_push_srvsvc_NetShareInfo501(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
4691 return NDR_ERR_SUCCESS;
4694 static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr501(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr501 *r)
4696 uint32_t _ptr_array;
4697 uint32_t size_array_1 = 0;
4698 uint32_t cntr_array_1;
4699 TALLOC_CTX *_mem_save_array_0;
4700 TALLOC_CTX *_mem_save_array_1;
4701 if (ndr_flags & NDR_SCALARS) {
4702 NDR_CHECK(ndr_pull_align(ndr, 5));
4703 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4704 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
4705 if (_ptr_array) {
4706 NDR_PULL_ALLOC(ndr, r->array);
4707 } else {
4708 r->array = NULL;
4710 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4712 if (ndr_flags & NDR_BUFFERS) {
4713 if (r->array) {
4714 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
4715 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4716 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
4717 size_array_1 = ndr_get_array_size(ndr, &r->array);
4718 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
4719 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
4720 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4721 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
4722 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo501(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4724 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
4725 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo501(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
4727 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
4728 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
4730 if (r->array) {
4731 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
4734 return NDR_ERR_SUCCESS;
4737 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr501(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr501 *r)
4739 uint32_t cntr_array_1;
4740 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr501");
4741 ndr->depth++;
4742 ndr_print_uint32(ndr, "count", r->count);
4743 ndr_print_ptr(ndr, "array", r->array);
4744 ndr->depth++;
4745 if (r->array) {
4746 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
4747 ndr->depth++;
4748 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
4749 char *idx_1=NULL;
4750 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
4751 ndr_print_srvsvc_NetShareInfo501(ndr, "array", &r->array[cntr_array_1]);
4752 free(idx_1);
4755 ndr->depth--;
4757 ndr->depth--;
4758 ndr->depth--;
4761 static enum ndr_err_code ndr_push_srvsvc_NetShareInfo502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo502 *r)
4763 if (ndr_flags & NDR_SCALARS) {
4764 NDR_CHECK(ndr_push_align(ndr, 5));
4765 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
4766 NDR_CHECK(ndr_push_srvsvc_ShareType(ndr, NDR_SCALARS, r->type));
4767 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
4768 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->permissions));
4769 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_users));
4770 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->current_users));
4771 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
4772 NDR_CHECK(ndr_push_unique_ptr(ndr, r->password));
4773 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sd_buf));
4774 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4776 if (ndr_flags & NDR_BUFFERS) {
4777 if (r->name) {
4778 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
4779 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4780 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
4781 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4783 if (r->comment) {
4784 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
4785 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4786 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
4787 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4789 if (r->path) {
4790 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
4791 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4792 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
4793 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4795 if (r->password) {
4796 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->password, CH_UTF16)));
4797 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4798 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->password, CH_UTF16)));
4799 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->password, ndr_charset_length(r->password, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4801 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sd_buf));
4803 return NDR_ERR_SUCCESS;
4806 static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo502 *r)
4808 uint32_t _ptr_name;
4809 uint32_t size_name_1 = 0;
4810 uint32_t length_name_1 = 0;
4811 TALLOC_CTX *_mem_save_name_0;
4812 uint32_t _ptr_comment;
4813 uint32_t size_comment_1 = 0;
4814 uint32_t length_comment_1 = 0;
4815 TALLOC_CTX *_mem_save_comment_0;
4816 uint32_t _ptr_path;
4817 uint32_t size_path_1 = 0;
4818 uint32_t length_path_1 = 0;
4819 TALLOC_CTX *_mem_save_path_0;
4820 uint32_t _ptr_password;
4821 uint32_t size_password_1 = 0;
4822 uint32_t length_password_1 = 0;
4823 TALLOC_CTX *_mem_save_password_0;
4824 if (ndr_flags & NDR_SCALARS) {
4825 NDR_CHECK(ndr_pull_align(ndr, 5));
4826 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
4827 if (_ptr_name) {
4828 NDR_PULL_ALLOC(ndr, r->name);
4829 } else {
4830 r->name = NULL;
4832 NDR_CHECK(ndr_pull_srvsvc_ShareType(ndr, NDR_SCALARS, &r->type));
4833 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
4834 if (_ptr_comment) {
4835 NDR_PULL_ALLOC(ndr, r->comment);
4836 } else {
4837 r->comment = NULL;
4839 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->permissions));
4840 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_users));
4841 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->current_users));
4842 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
4843 if (_ptr_path) {
4844 NDR_PULL_ALLOC(ndr, r->path);
4845 } else {
4846 r->path = NULL;
4848 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
4849 if (_ptr_password) {
4850 NDR_PULL_ALLOC(ndr, r->password);
4851 } else {
4852 r->password = NULL;
4854 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sd_buf));
4855 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4857 if (ndr_flags & NDR_BUFFERS) {
4858 if (r->name) {
4859 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4860 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
4861 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
4862 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
4863 size_name_1 = ndr_get_array_size(ndr, &r->name);
4864 length_name_1 = ndr_get_array_length(ndr, &r->name);
4865 if (length_name_1 > size_name_1) {
4866 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_name_1, length_name_1);
4868 NDR_CHECK(ndr_check_string_terminator(ndr, length_name_1, sizeof(uint16_t)));
4869 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, length_name_1, sizeof(uint16_t), CH_UTF16));
4870 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
4872 if (r->comment) {
4873 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
4874 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
4875 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
4876 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
4877 size_comment_1 = ndr_get_array_size(ndr, &r->comment);
4878 length_comment_1 = ndr_get_array_length(ndr, &r->comment);
4879 if (length_comment_1 > size_comment_1) {
4880 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_comment_1, length_comment_1);
4882 NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_1, sizeof(uint16_t)));
4883 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, length_comment_1, sizeof(uint16_t), CH_UTF16));
4884 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
4886 if (r->path) {
4887 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
4888 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
4889 NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
4890 NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
4891 size_path_1 = ndr_get_array_size(ndr, &r->path);
4892 length_path_1 = ndr_get_array_length(ndr, &r->path);
4893 if (length_path_1 > size_path_1) {
4894 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_path_1, length_path_1);
4896 NDR_CHECK(ndr_check_string_terminator(ndr, length_path_1, sizeof(uint16_t)));
4897 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, length_path_1, sizeof(uint16_t), CH_UTF16));
4898 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
4900 if (r->password) {
4901 _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
4902 NDR_PULL_SET_MEM_CTX(ndr, r->password, 0);
4903 NDR_CHECK(ndr_pull_array_size(ndr, &r->password));
4904 NDR_CHECK(ndr_pull_array_length(ndr, &r->password));
4905 size_password_1 = ndr_get_array_size(ndr, &r->password);
4906 length_password_1 = ndr_get_array_length(ndr, &r->password);
4907 if (length_password_1 > size_password_1) {
4908 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_password_1, length_password_1);
4910 NDR_CHECK(ndr_check_string_terminator(ndr, length_password_1, sizeof(uint16_t)));
4911 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->password, length_password_1, sizeof(uint16_t), CH_UTF16));
4912 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
4914 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sd_buf));
4916 return NDR_ERR_SUCCESS;
4919 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo502 *r)
4921 ndr_print_struct(ndr, name, "srvsvc_NetShareInfo502");
4922 ndr->depth++;
4923 ndr_print_ptr(ndr, "name", r->name);
4924 ndr->depth++;
4925 if (r->name) {
4926 ndr_print_string(ndr, "name", r->name);
4928 ndr->depth--;
4929 ndr_print_srvsvc_ShareType(ndr, "type", r->type);
4930 ndr_print_ptr(ndr, "comment", r->comment);
4931 ndr->depth++;
4932 if (r->comment) {
4933 ndr_print_string(ndr, "comment", r->comment);
4935 ndr->depth--;
4936 ndr_print_uint32(ndr, "permissions", r->permissions);
4937 ndr_print_uint32(ndr, "max_users", r->max_users);
4938 ndr_print_uint32(ndr, "current_users", r->current_users);
4939 ndr_print_ptr(ndr, "path", r->path);
4940 ndr->depth++;
4941 if (r->path) {
4942 ndr_print_string(ndr, "path", r->path);
4944 ndr->depth--;
4945 ndr_print_ptr(ndr, "password", r->password);
4946 ndr->depth++;
4947 if (r->password) {
4948 ndr_print_string(ndr, "password", r->password);
4950 ndr->depth--;
4951 ndr_print_sec_desc_buf(ndr, "sd_buf", &r->sd_buf);
4952 ndr->depth--;
4955 static enum ndr_err_code ndr_push_srvsvc_NetShareCtr502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr502 *r)
4957 uint32_t cntr_array_1;
4958 if (ndr_flags & NDR_SCALARS) {
4959 NDR_CHECK(ndr_push_align(ndr, 5));
4960 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4961 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
4962 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4964 if (ndr_flags & NDR_BUFFERS) {
4965 if (r->array) {
4966 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
4967 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4968 NDR_CHECK(ndr_push_srvsvc_NetShareInfo502(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4970 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4971 NDR_CHECK(ndr_push_srvsvc_NetShareInfo502(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
4975 return NDR_ERR_SUCCESS;
4978 static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr502 *r)
4980 uint32_t _ptr_array;
4981 uint32_t size_array_1 = 0;
4982 uint32_t cntr_array_1;
4983 TALLOC_CTX *_mem_save_array_0;
4984 TALLOC_CTX *_mem_save_array_1;
4985 if (ndr_flags & NDR_SCALARS) {
4986 NDR_CHECK(ndr_pull_align(ndr, 5));
4987 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4988 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
4989 if (_ptr_array) {
4990 NDR_PULL_ALLOC(ndr, r->array);
4991 } else {
4992 r->array = NULL;
4994 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4996 if (ndr_flags & NDR_BUFFERS) {
4997 if (r->array) {
4998 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
4999 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
5000 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
5001 size_array_1 = ndr_get_array_size(ndr, &r->array);
5002 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
5003 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
5004 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
5005 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
5006 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo502(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
5008 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
5009 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo502(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
5011 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
5012 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
5014 if (r->array) {
5015 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
5018 return NDR_ERR_SUCCESS;
5021 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr502 *r)
5023 uint32_t cntr_array_1;
5024 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr502");
5025 ndr->depth++;
5026 ndr_print_uint32(ndr, "count", r->count);
5027 ndr_print_ptr(ndr, "array", r->array);
5028 ndr->depth++;
5029 if (r->array) {
5030 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
5031 ndr->depth++;
5032 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
5033 char *idx_1=NULL;
5034 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
5035 ndr_print_srvsvc_NetShareInfo502(ndr, "array", &r->array[cntr_array_1]);
5036 free(idx_1);
5039 ndr->depth--;
5041 ndr->depth--;
5042 ndr->depth--;
5045 static enum ndr_err_code ndr_push_srvsvc_NetShareInfo1004(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo1004 *r)
5047 if (ndr_flags & NDR_SCALARS) {
5048 NDR_CHECK(ndr_push_align(ndr, 5));
5049 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
5050 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
5052 if (ndr_flags & NDR_BUFFERS) {
5053 if (r->comment) {
5054 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
5055 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5056 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
5057 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5060 return NDR_ERR_SUCCESS;
5063 static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo1004(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo1004 *r)
5065 uint32_t _ptr_comment;
5066 uint32_t size_comment_1 = 0;
5067 uint32_t length_comment_1 = 0;
5068 TALLOC_CTX *_mem_save_comment_0;
5069 if (ndr_flags & NDR_SCALARS) {
5070 NDR_CHECK(ndr_pull_align(ndr, 5));
5071 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
5072 if (_ptr_comment) {
5073 NDR_PULL_ALLOC(ndr, r->comment);
5074 } else {
5075 r->comment = NULL;
5077 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
5079 if (ndr_flags & NDR_BUFFERS) {
5080 if (r->comment) {
5081 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
5082 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
5083 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
5084 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
5085 size_comment_1 = ndr_get_array_size(ndr, &r->comment);
5086 length_comment_1 = ndr_get_array_length(ndr, &r->comment);
5087 if (length_comment_1 > size_comment_1) {
5088 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_comment_1, length_comment_1);
5090 NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_1, sizeof(uint16_t)));
5091 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, length_comment_1, sizeof(uint16_t), CH_UTF16));
5092 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
5095 return NDR_ERR_SUCCESS;
5098 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1004(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1004 *r)
5100 ndr_print_struct(ndr, name, "srvsvc_NetShareInfo1004");
5101 ndr->depth++;
5102 ndr_print_ptr(ndr, "comment", r->comment);
5103 ndr->depth++;
5104 if (r->comment) {
5105 ndr_print_string(ndr, "comment", r->comment);
5107 ndr->depth--;
5108 ndr->depth--;
5111 static enum ndr_err_code ndr_push_srvsvc_NetShareCtr1004(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1004 *r)
5113 uint32_t cntr_array_1;
5114 if (ndr_flags & NDR_SCALARS) {
5115 NDR_CHECK(ndr_push_align(ndr, 5));
5116 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
5117 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
5118 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
5120 if (ndr_flags & NDR_BUFFERS) {
5121 if (r->array) {
5122 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
5123 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
5124 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1004(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
5126 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
5127 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1004(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
5131 return NDR_ERR_SUCCESS;
5134 static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr1004(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1004 *r)
5136 uint32_t _ptr_array;
5137 uint32_t size_array_1 = 0;
5138 uint32_t cntr_array_1;
5139 TALLOC_CTX *_mem_save_array_0;
5140 TALLOC_CTX *_mem_save_array_1;
5141 if (ndr_flags & NDR_SCALARS) {
5142 NDR_CHECK(ndr_pull_align(ndr, 5));
5143 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
5144 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
5145 if (_ptr_array) {
5146 NDR_PULL_ALLOC(ndr, r->array);
5147 } else {
5148 r->array = NULL;
5150 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
5152 if (ndr_flags & NDR_BUFFERS) {
5153 if (r->array) {
5154 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
5155 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
5156 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
5157 size_array_1 = ndr_get_array_size(ndr, &r->array);
5158 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
5159 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
5160 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
5161 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
5162 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1004(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
5164 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
5165 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1004(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
5167 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
5168 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
5170 if (r->array) {
5171 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
5174 return NDR_ERR_SUCCESS;
5177 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1004(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1004 *r)
5179 uint32_t cntr_array_1;
5180 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr1004");
5181 ndr->depth++;
5182 ndr_print_uint32(ndr, "count", r->count);
5183 ndr_print_ptr(ndr, "array", r->array);
5184 ndr->depth++;
5185 if (r->array) {
5186 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
5187 ndr->depth++;
5188 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
5189 char *idx_1=NULL;
5190 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
5191 ndr_print_srvsvc_NetShareInfo1004(ndr, "array", &r->array[cntr_array_1]);
5192 free(idx_1);
5195 ndr->depth--;
5197 ndr->depth--;
5198 ndr->depth--;
5201 static enum ndr_err_code ndr_push_NetShareInfo1005Flags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
5203 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
5204 return NDR_ERR_SUCCESS;
5207 static enum ndr_err_code ndr_pull_NetShareInfo1005Flags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
5209 uint32_t v;
5210 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
5211 *r = v;
5212 return NDR_ERR_SUCCESS;
5215 _PUBLIC_ void ndr_print_NetShareInfo1005Flags(struct ndr_print *ndr, const char *name, uint32_t r)
5217 ndr_print_uint32(ndr, name, r);
5218 ndr->depth++;
5219 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SHARE_1005_IN_DFS", SHARE_1005_IN_DFS, r);
5220 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SHARE_1005_DFS_ROOT", SHARE_1005_DFS_ROOT, r);
5221 ndr->depth--;
5224 static enum ndr_err_code ndr_push_srvsvc_NetShareInfo1005(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo1005 *r)
5226 if (ndr_flags & NDR_SCALARS) {
5227 NDR_CHECK(ndr_push_align(ndr, 4));
5228 NDR_CHECK(ndr_push_NetShareInfo1005Flags(ndr, NDR_SCALARS, r->dfs_flags));
5229 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
5231 if (ndr_flags & NDR_BUFFERS) {
5233 return NDR_ERR_SUCCESS;
5236 static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo1005(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo1005 *r)
5238 if (ndr_flags & NDR_SCALARS) {
5239 NDR_CHECK(ndr_pull_align(ndr, 4));
5240 NDR_CHECK(ndr_pull_NetShareInfo1005Flags(ndr, NDR_SCALARS, &r->dfs_flags));
5241 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
5243 if (ndr_flags & NDR_BUFFERS) {
5245 return NDR_ERR_SUCCESS;
5248 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1005(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1005 *r)
5250 ndr_print_struct(ndr, name, "srvsvc_NetShareInfo1005");
5251 ndr->depth++;
5252 ndr_print_NetShareInfo1005Flags(ndr, "dfs_flags", r->dfs_flags);
5253 ndr->depth--;
5256 static enum ndr_err_code ndr_push_srvsvc_NetShareCtr1005(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1005 *r)
5258 uint32_t cntr_array_1;
5259 if (ndr_flags & NDR_SCALARS) {
5260 NDR_CHECK(ndr_push_align(ndr, 5));
5261 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
5262 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
5263 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
5265 if (ndr_flags & NDR_BUFFERS) {
5266 if (r->array) {
5267 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
5268 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
5269 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1005(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
5273 return NDR_ERR_SUCCESS;
5276 static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr1005(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1005 *r)
5278 uint32_t _ptr_array;
5279 uint32_t size_array_1 = 0;
5280 uint32_t cntr_array_1;
5281 TALLOC_CTX *_mem_save_array_0;
5282 TALLOC_CTX *_mem_save_array_1;
5283 if (ndr_flags & NDR_SCALARS) {
5284 NDR_CHECK(ndr_pull_align(ndr, 5));
5285 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
5286 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
5287 if (_ptr_array) {
5288 NDR_PULL_ALLOC(ndr, r->array);
5289 } else {
5290 r->array = NULL;
5292 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
5294 if (ndr_flags & NDR_BUFFERS) {
5295 if (r->array) {
5296 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
5297 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
5298 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
5299 size_array_1 = ndr_get_array_size(ndr, &r->array);
5300 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
5301 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
5302 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
5303 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
5304 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1005(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
5306 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
5307 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
5309 if (r->array) {
5310 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
5313 return NDR_ERR_SUCCESS;
5316 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1005(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1005 *r)
5318 uint32_t cntr_array_1;
5319 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr1005");
5320 ndr->depth++;
5321 ndr_print_uint32(ndr, "count", r->count);
5322 ndr_print_ptr(ndr, "array", r->array);
5323 ndr->depth++;
5324 if (r->array) {
5325 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
5326 ndr->depth++;
5327 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
5328 char *idx_1=NULL;
5329 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
5330 ndr_print_srvsvc_NetShareInfo1005(ndr, "array", &r->array[cntr_array_1]);
5331 free(idx_1);
5334 ndr->depth--;
5336 ndr->depth--;
5337 ndr->depth--;
5340 static enum ndr_err_code ndr_push_srvsvc_NetShareInfo1006(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo1006 *r)
5342 if (ndr_flags & NDR_SCALARS) {
5343 NDR_CHECK(ndr_push_align(ndr, 4));
5344 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_users));
5345 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
5347 if (ndr_flags & NDR_BUFFERS) {
5349 return NDR_ERR_SUCCESS;
5352 static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo1006(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo1006 *r)
5354 if (ndr_flags & NDR_SCALARS) {
5355 NDR_CHECK(ndr_pull_align(ndr, 4));
5356 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_users));
5357 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
5359 if (ndr_flags & NDR_BUFFERS) {
5361 return NDR_ERR_SUCCESS;
5364 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1006(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1006 *r)
5366 ndr_print_struct(ndr, name, "srvsvc_NetShareInfo1006");
5367 ndr->depth++;
5368 ndr_print_uint32(ndr, "max_users", r->max_users);
5369 ndr->depth--;
5372 static enum ndr_err_code ndr_push_srvsvc_NetShareCtr1006(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1006 *r)
5374 uint32_t cntr_array_1;
5375 if (ndr_flags & NDR_SCALARS) {
5376 NDR_CHECK(ndr_push_align(ndr, 5));
5377 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
5378 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
5379 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
5381 if (ndr_flags & NDR_BUFFERS) {
5382 if (r->array) {
5383 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
5384 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
5385 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1006(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
5389 return NDR_ERR_SUCCESS;
5392 static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr1006(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1006 *r)
5394 uint32_t _ptr_array;
5395 uint32_t size_array_1 = 0;
5396 uint32_t cntr_array_1;
5397 TALLOC_CTX *_mem_save_array_0;
5398 TALLOC_CTX *_mem_save_array_1;
5399 if (ndr_flags & NDR_SCALARS) {
5400 NDR_CHECK(ndr_pull_align(ndr, 5));
5401 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
5402 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
5403 if (_ptr_array) {
5404 NDR_PULL_ALLOC(ndr, r->array);
5405 } else {
5406 r->array = NULL;
5408 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
5410 if (ndr_flags & NDR_BUFFERS) {
5411 if (r->array) {
5412 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
5413 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
5414 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
5415 size_array_1 = ndr_get_array_size(ndr, &r->array);
5416 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
5417 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
5418 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
5419 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
5420 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1006(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
5422 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
5423 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
5425 if (r->array) {
5426 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
5429 return NDR_ERR_SUCCESS;
5432 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1006(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1006 *r)
5434 uint32_t cntr_array_1;
5435 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr1006");
5436 ndr->depth++;
5437 ndr_print_uint32(ndr, "count", r->count);
5438 ndr_print_ptr(ndr, "array", r->array);
5439 ndr->depth++;
5440 if (r->array) {
5441 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
5442 ndr->depth++;
5443 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
5444 char *idx_1=NULL;
5445 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
5446 ndr_print_srvsvc_NetShareInfo1006(ndr, "array", &r->array[cntr_array_1]);
5447 free(idx_1);
5450 ndr->depth--;
5452 ndr->depth--;
5453 ndr->depth--;
5456 static enum ndr_err_code ndr_push_srvsvc_NetShareInfo1007(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo1007 *r)
5458 if (ndr_flags & NDR_SCALARS) {
5459 NDR_CHECK(ndr_push_align(ndr, 5));
5460 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags));
5461 NDR_CHECK(ndr_push_unique_ptr(ndr, r->alternate_directory_name));
5462 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
5464 if (ndr_flags & NDR_BUFFERS) {
5465 if (r->alternate_directory_name) {
5466 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->alternate_directory_name, CH_UTF16)));
5467 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5468 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->alternate_directory_name, CH_UTF16)));
5469 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));
5472 return NDR_ERR_SUCCESS;
5475 static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo1007(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo1007 *r)
5477 uint32_t _ptr_alternate_directory_name;
5478 uint32_t size_alternate_directory_name_1 = 0;
5479 uint32_t length_alternate_directory_name_1 = 0;
5480 TALLOC_CTX *_mem_save_alternate_directory_name_0;
5481 if (ndr_flags & NDR_SCALARS) {
5482 NDR_CHECK(ndr_pull_align(ndr, 5));
5483 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
5484 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_alternate_directory_name));
5485 if (_ptr_alternate_directory_name) {
5486 NDR_PULL_ALLOC(ndr, r->alternate_directory_name);
5487 } else {
5488 r->alternate_directory_name = NULL;
5490 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
5492 if (ndr_flags & NDR_BUFFERS) {
5493 if (r->alternate_directory_name) {
5494 _mem_save_alternate_directory_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5495 NDR_PULL_SET_MEM_CTX(ndr, r->alternate_directory_name, 0);
5496 NDR_CHECK(ndr_pull_array_size(ndr, &r->alternate_directory_name));
5497 NDR_CHECK(ndr_pull_array_length(ndr, &r->alternate_directory_name));
5498 size_alternate_directory_name_1 = ndr_get_array_size(ndr, &r->alternate_directory_name);
5499 length_alternate_directory_name_1 = ndr_get_array_length(ndr, &r->alternate_directory_name);
5500 if (length_alternate_directory_name_1 > size_alternate_directory_name_1) {
5501 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_alternate_directory_name_1, length_alternate_directory_name_1);
5503 NDR_CHECK(ndr_check_string_terminator(ndr, length_alternate_directory_name_1, sizeof(uint16_t)));
5504 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->alternate_directory_name, length_alternate_directory_name_1, sizeof(uint16_t), CH_UTF16));
5505 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alternate_directory_name_0, 0);
5508 return NDR_ERR_SUCCESS;
5511 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1007(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1007 *r)
5513 ndr_print_struct(ndr, name, "srvsvc_NetShareInfo1007");
5514 ndr->depth++;
5515 ndr_print_uint32(ndr, "flags", r->flags);
5516 ndr_print_ptr(ndr, "alternate_directory_name", r->alternate_directory_name);
5517 ndr->depth++;
5518 if (r->alternate_directory_name) {
5519 ndr_print_string(ndr, "alternate_directory_name", r->alternate_directory_name);
5521 ndr->depth--;
5522 ndr->depth--;
5525 static enum ndr_err_code ndr_push_srvsvc_NetShareCtr1007(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1007 *r)
5527 uint32_t cntr_array_1;
5528 if (ndr_flags & NDR_SCALARS) {
5529 NDR_CHECK(ndr_push_align(ndr, 5));
5530 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
5531 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
5532 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
5534 if (ndr_flags & NDR_BUFFERS) {
5535 if (r->array) {
5536 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
5537 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
5538 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1007(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
5540 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
5541 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1007(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
5545 return NDR_ERR_SUCCESS;
5548 static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr1007(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1007 *r)
5550 uint32_t _ptr_array;
5551 uint32_t size_array_1 = 0;
5552 uint32_t cntr_array_1;
5553 TALLOC_CTX *_mem_save_array_0;
5554 TALLOC_CTX *_mem_save_array_1;
5555 if (ndr_flags & NDR_SCALARS) {
5556 NDR_CHECK(ndr_pull_align(ndr, 5));
5557 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
5558 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
5559 if (_ptr_array) {
5560 NDR_PULL_ALLOC(ndr, r->array);
5561 } else {
5562 r->array = NULL;
5564 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
5566 if (ndr_flags & NDR_BUFFERS) {
5567 if (r->array) {
5568 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
5569 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
5570 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
5571 size_array_1 = ndr_get_array_size(ndr, &r->array);
5572 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
5573 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
5574 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
5575 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
5576 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1007(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
5578 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
5579 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1007(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
5581 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
5582 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
5584 if (r->array) {
5585 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
5588 return NDR_ERR_SUCCESS;
5591 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1007(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1007 *r)
5593 uint32_t cntr_array_1;
5594 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr1007");
5595 ndr->depth++;
5596 ndr_print_uint32(ndr, "count", r->count);
5597 ndr_print_ptr(ndr, "array", r->array);
5598 ndr->depth++;
5599 if (r->array) {
5600 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
5601 ndr->depth++;
5602 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
5603 char *idx_1=NULL;
5604 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
5605 ndr_print_srvsvc_NetShareInfo1007(ndr, "array", &r->array[cntr_array_1]);
5606 free(idx_1);
5609 ndr->depth--;
5611 ndr->depth--;
5612 ndr->depth--;
5615 static enum ndr_err_code ndr_push_srvsvc_NetShareCtr1501(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1501 *r)
5617 uint32_t cntr_array_1;
5618 if (ndr_flags & NDR_SCALARS) {
5619 NDR_CHECK(ndr_push_align(ndr, 5));
5620 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
5621 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
5622 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
5624 if (ndr_flags & NDR_BUFFERS) {
5625 if (r->array) {
5626 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
5627 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
5628 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
5630 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
5631 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
5635 return NDR_ERR_SUCCESS;
5638 static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr1501(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1501 *r)
5640 uint32_t _ptr_array;
5641 uint32_t size_array_1 = 0;
5642 uint32_t cntr_array_1;
5643 TALLOC_CTX *_mem_save_array_0;
5644 TALLOC_CTX *_mem_save_array_1;
5645 if (ndr_flags & NDR_SCALARS) {
5646 NDR_CHECK(ndr_pull_align(ndr, 5));
5647 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
5648 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
5649 if (_ptr_array) {
5650 NDR_PULL_ALLOC(ndr, r->array);
5651 } else {
5652 r->array = NULL;
5654 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
5656 if (ndr_flags & NDR_BUFFERS) {
5657 if (r->array) {
5658 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
5659 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
5660 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
5661 size_array_1 = ndr_get_array_size(ndr, &r->array);
5662 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
5663 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
5664 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
5665 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
5666 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
5668 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
5669 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
5671 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
5672 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
5674 if (r->array) {
5675 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
5678 return NDR_ERR_SUCCESS;
5681 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1501(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1501 *r)
5683 uint32_t cntr_array_1;
5684 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr1501");
5685 ndr->depth++;
5686 ndr_print_uint32(ndr, "count", r->count);
5687 ndr_print_ptr(ndr, "array", r->array);
5688 ndr->depth++;
5689 if (r->array) {
5690 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
5691 ndr->depth++;
5692 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
5693 char *idx_1=NULL;
5694 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
5695 ndr_print_sec_desc_buf(ndr, "array", &r->array[cntr_array_1]);
5696 free(idx_1);
5699 ndr->depth--;
5701 ndr->depth--;
5702 ndr->depth--;
5705 static enum ndr_err_code ndr_push_srvsvc_NetShareInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetShareInfo *r)
5707 if (ndr_flags & NDR_SCALARS) {
5708 int level = ndr_push_get_switch_value(ndr, r);
5709 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
5710 NDR_CHECK(ndr_push_union_align(ndr, 5));
5711 switch (level) {
5712 case 0: {
5713 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
5714 break; }
5716 case 1: {
5717 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
5718 break; }
5720 case 2: {
5721 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
5722 break; }
5724 case 501: {
5725 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info501));
5726 break; }
5728 case 502: {
5729 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info502));
5730 break; }
5732 case 1004: {
5733 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1004));
5734 break; }
5736 case 1005: {
5737 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1005));
5738 break; }
5740 case 1006: {
5741 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1006));
5742 break; }
5744 case 1007: {
5745 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1007));
5746 break; }
5748 case 1501: {
5749 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1501));
5750 break; }
5752 default: {
5753 break; }
5757 if (ndr_flags & NDR_BUFFERS) {
5758 int level = ndr_push_get_switch_value(ndr, r);
5759 switch (level) {
5760 case 0:
5761 if (r->info0) {
5762 NDR_CHECK(ndr_push_srvsvc_NetShareInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
5764 break;
5766 case 1:
5767 if (r->info1) {
5768 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
5770 break;
5772 case 2:
5773 if (r->info2) {
5774 NDR_CHECK(ndr_push_srvsvc_NetShareInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
5776 break;
5778 case 501:
5779 if (r->info501) {
5780 NDR_CHECK(ndr_push_srvsvc_NetShareInfo501(ndr, NDR_SCALARS|NDR_BUFFERS, r->info501));
5782 break;
5784 case 502:
5785 if (r->info502) {
5786 NDR_CHECK(ndr_push_srvsvc_NetShareInfo502(ndr, NDR_SCALARS|NDR_BUFFERS, r->info502));
5788 break;
5790 case 1004:
5791 if (r->info1004) {
5792 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1004(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1004));
5794 break;
5796 case 1005:
5797 if (r->info1005) {
5798 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1005(ndr, NDR_SCALARS, r->info1005));
5800 break;
5802 case 1006:
5803 if (r->info1006) {
5804 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1006(ndr, NDR_SCALARS, r->info1006));
5806 break;
5808 case 1007:
5809 if (r->info1007) {
5810 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1007(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1007));
5812 break;
5814 case 1501:
5815 if (r->info1501) {
5816 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1501));
5818 break;
5820 default:
5821 break;
5825 return NDR_ERR_SUCCESS;
5828 static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetShareInfo *r)
5830 int level;
5831 uint32_t _level;
5832 TALLOC_CTX *_mem_save_info0_0;
5833 uint32_t _ptr_info0;
5834 TALLOC_CTX *_mem_save_info1_0;
5835 uint32_t _ptr_info1;
5836 TALLOC_CTX *_mem_save_info2_0;
5837 uint32_t _ptr_info2;
5838 TALLOC_CTX *_mem_save_info501_0;
5839 uint32_t _ptr_info501;
5840 TALLOC_CTX *_mem_save_info502_0;
5841 uint32_t _ptr_info502;
5842 TALLOC_CTX *_mem_save_info1004_0;
5843 uint32_t _ptr_info1004;
5844 TALLOC_CTX *_mem_save_info1005_0;
5845 uint32_t _ptr_info1005;
5846 TALLOC_CTX *_mem_save_info1006_0;
5847 uint32_t _ptr_info1006;
5848 TALLOC_CTX *_mem_save_info1007_0;
5849 uint32_t _ptr_info1007;
5850 TALLOC_CTX *_mem_save_info1501_0;
5851 uint32_t _ptr_info1501;
5852 level = ndr_pull_get_switch_value(ndr, r);
5853 if (ndr_flags & NDR_SCALARS) {
5854 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
5855 if (_level != level) {
5856 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
5858 NDR_CHECK(ndr_pull_union_align(ndr, 5));
5859 switch (level) {
5860 case 0: {
5861 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
5862 if (_ptr_info0) {
5863 NDR_PULL_ALLOC(ndr, r->info0);
5864 } else {
5865 r->info0 = NULL;
5867 break; }
5869 case 1: {
5870 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
5871 if (_ptr_info1) {
5872 NDR_PULL_ALLOC(ndr, r->info1);
5873 } else {
5874 r->info1 = NULL;
5876 break; }
5878 case 2: {
5879 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
5880 if (_ptr_info2) {
5881 NDR_PULL_ALLOC(ndr, r->info2);
5882 } else {
5883 r->info2 = NULL;
5885 break; }
5887 case 501: {
5888 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info501));
5889 if (_ptr_info501) {
5890 NDR_PULL_ALLOC(ndr, r->info501);
5891 } else {
5892 r->info501 = NULL;
5894 break; }
5896 case 502: {
5897 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info502));
5898 if (_ptr_info502) {
5899 NDR_PULL_ALLOC(ndr, r->info502);
5900 } else {
5901 r->info502 = NULL;
5903 break; }
5905 case 1004: {
5906 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1004));
5907 if (_ptr_info1004) {
5908 NDR_PULL_ALLOC(ndr, r->info1004);
5909 } else {
5910 r->info1004 = NULL;
5912 break; }
5914 case 1005: {
5915 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1005));
5916 if (_ptr_info1005) {
5917 NDR_PULL_ALLOC(ndr, r->info1005);
5918 } else {
5919 r->info1005 = NULL;
5921 break; }
5923 case 1006: {
5924 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1006));
5925 if (_ptr_info1006) {
5926 NDR_PULL_ALLOC(ndr, r->info1006);
5927 } else {
5928 r->info1006 = NULL;
5930 break; }
5932 case 1007: {
5933 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1007));
5934 if (_ptr_info1007) {
5935 NDR_PULL_ALLOC(ndr, r->info1007);
5936 } else {
5937 r->info1007 = NULL;
5939 break; }
5941 case 1501: {
5942 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1501));
5943 if (_ptr_info1501) {
5944 NDR_PULL_ALLOC(ndr, r->info1501);
5945 } else {
5946 r->info1501 = NULL;
5948 break; }
5950 default: {
5951 break; }
5955 if (ndr_flags & NDR_BUFFERS) {
5956 switch (level) {
5957 case 0:
5958 if (r->info0) {
5959 _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
5960 NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
5961 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
5962 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
5964 break;
5966 case 1:
5967 if (r->info1) {
5968 _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
5969 NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
5970 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
5971 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
5973 break;
5975 case 2:
5976 if (r->info2) {
5977 _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
5978 NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
5979 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
5980 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
5982 break;
5984 case 501:
5985 if (r->info501) {
5986 _mem_save_info501_0 = NDR_PULL_GET_MEM_CTX(ndr);
5987 NDR_PULL_SET_MEM_CTX(ndr, r->info501, 0);
5988 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo501(ndr, NDR_SCALARS|NDR_BUFFERS, r->info501));
5989 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info501_0, 0);
5991 break;
5993 case 502:
5994 if (r->info502) {
5995 _mem_save_info502_0 = NDR_PULL_GET_MEM_CTX(ndr);
5996 NDR_PULL_SET_MEM_CTX(ndr, r->info502, 0);
5997 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo502(ndr, NDR_SCALARS|NDR_BUFFERS, r->info502));
5998 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info502_0, 0);
6000 break;
6002 case 1004:
6003 if (r->info1004) {
6004 _mem_save_info1004_0 = NDR_PULL_GET_MEM_CTX(ndr);
6005 NDR_PULL_SET_MEM_CTX(ndr, r->info1004, 0);
6006 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1004(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1004));
6007 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1004_0, 0);
6009 break;
6011 case 1005:
6012 if (r->info1005) {
6013 _mem_save_info1005_0 = NDR_PULL_GET_MEM_CTX(ndr);
6014 NDR_PULL_SET_MEM_CTX(ndr, r->info1005, 0);
6015 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1005(ndr, NDR_SCALARS, r->info1005));
6016 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1005_0, 0);
6018 break;
6020 case 1006:
6021 if (r->info1006) {
6022 _mem_save_info1006_0 = NDR_PULL_GET_MEM_CTX(ndr);
6023 NDR_PULL_SET_MEM_CTX(ndr, r->info1006, 0);
6024 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1006(ndr, NDR_SCALARS, r->info1006));
6025 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1006_0, 0);
6027 break;
6029 case 1007:
6030 if (r->info1007) {
6031 _mem_save_info1007_0 = NDR_PULL_GET_MEM_CTX(ndr);
6032 NDR_PULL_SET_MEM_CTX(ndr, r->info1007, 0);
6033 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1007(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1007));
6034 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1007_0, 0);
6036 break;
6038 case 1501:
6039 if (r->info1501) {
6040 _mem_save_info1501_0 = NDR_PULL_GET_MEM_CTX(ndr);
6041 NDR_PULL_SET_MEM_CTX(ndr, r->info1501, 0);
6042 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1501));
6043 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1501_0, 0);
6045 break;
6047 default:
6048 break;
6052 return NDR_ERR_SUCCESS;
6055 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetShareInfo *r)
6057 int level;
6058 level = ndr_print_get_switch_value(ndr, r);
6059 ndr_print_union(ndr, name, level, "srvsvc_NetShareInfo");
6060 switch (level) {
6061 case 0:
6062 ndr_print_ptr(ndr, "info0", r->info0);
6063 ndr->depth++;
6064 if (r->info0) {
6065 ndr_print_srvsvc_NetShareInfo0(ndr, "info0", r->info0);
6067 ndr->depth--;
6068 break;
6070 case 1:
6071 ndr_print_ptr(ndr, "info1", r->info1);
6072 ndr->depth++;
6073 if (r->info1) {
6074 ndr_print_srvsvc_NetShareInfo1(ndr, "info1", r->info1);
6076 ndr->depth--;
6077 break;
6079 case 2:
6080 ndr_print_ptr(ndr, "info2", r->info2);
6081 ndr->depth++;
6082 if (r->info2) {
6083 ndr_print_srvsvc_NetShareInfo2(ndr, "info2", r->info2);
6085 ndr->depth--;
6086 break;
6088 case 501:
6089 ndr_print_ptr(ndr, "info501", r->info501);
6090 ndr->depth++;
6091 if (r->info501) {
6092 ndr_print_srvsvc_NetShareInfo501(ndr, "info501", r->info501);
6094 ndr->depth--;
6095 break;
6097 case 502:
6098 ndr_print_ptr(ndr, "info502", r->info502);
6099 ndr->depth++;
6100 if (r->info502) {
6101 ndr_print_srvsvc_NetShareInfo502(ndr, "info502", r->info502);
6103 ndr->depth--;
6104 break;
6106 case 1004:
6107 ndr_print_ptr(ndr, "info1004", r->info1004);
6108 ndr->depth++;
6109 if (r->info1004) {
6110 ndr_print_srvsvc_NetShareInfo1004(ndr, "info1004", r->info1004);
6112 ndr->depth--;
6113 break;
6115 case 1005:
6116 ndr_print_ptr(ndr, "info1005", r->info1005);
6117 ndr->depth++;
6118 if (r->info1005) {
6119 ndr_print_srvsvc_NetShareInfo1005(ndr, "info1005", r->info1005);
6121 ndr->depth--;
6122 break;
6124 case 1006:
6125 ndr_print_ptr(ndr, "info1006", r->info1006);
6126 ndr->depth++;
6127 if (r->info1006) {
6128 ndr_print_srvsvc_NetShareInfo1006(ndr, "info1006", r->info1006);
6130 ndr->depth--;
6131 break;
6133 case 1007:
6134 ndr_print_ptr(ndr, "info1007", r->info1007);
6135 ndr->depth++;
6136 if (r->info1007) {
6137 ndr_print_srvsvc_NetShareInfo1007(ndr, "info1007", r->info1007);
6139 ndr->depth--;
6140 break;
6142 case 1501:
6143 ndr_print_ptr(ndr, "info1501", r->info1501);
6144 ndr->depth++;
6145 if (r->info1501) {
6146 ndr_print_sec_desc_buf(ndr, "info1501", r->info1501);
6148 ndr->depth--;
6149 break;
6151 default:
6152 break;
6157 static enum ndr_err_code ndr_push_srvsvc_NetShareCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetShareCtr *r)
6159 if (ndr_flags & NDR_SCALARS) {
6160 int level = ndr_push_get_switch_value(ndr, r);
6161 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
6162 NDR_CHECK(ndr_push_union_align(ndr, 5));
6163 switch (level) {
6164 case 0: {
6165 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0));
6166 break; }
6168 case 1: {
6169 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
6170 break; }
6172 case 2: {
6173 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr2));
6174 break; }
6176 case 501: {
6177 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr501));
6178 break; }
6180 case 502: {
6181 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr502));
6182 break; }
6184 case 1004: {
6185 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1004));
6186 break; }
6188 case 1005: {
6189 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1005));
6190 break; }
6192 case 1006: {
6193 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1006));
6194 break; }
6196 case 1007: {
6197 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1007));
6198 break; }
6200 case 1501: {
6201 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1501));
6202 break; }
6204 default: {
6205 break; }
6209 if (ndr_flags & NDR_BUFFERS) {
6210 int level = ndr_push_get_switch_value(ndr, r);
6211 switch (level) {
6212 case 0:
6213 if (r->ctr0) {
6214 NDR_CHECK(ndr_push_srvsvc_NetShareCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
6216 break;
6218 case 1:
6219 if (r->ctr1) {
6220 NDR_CHECK(ndr_push_srvsvc_NetShareCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
6222 break;
6224 case 2:
6225 if (r->ctr2) {
6226 NDR_CHECK(ndr_push_srvsvc_NetShareCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
6228 break;
6230 case 501:
6231 if (r->ctr501) {
6232 NDR_CHECK(ndr_push_srvsvc_NetShareCtr501(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr501));
6234 break;
6236 case 502:
6237 if (r->ctr502) {
6238 NDR_CHECK(ndr_push_srvsvc_NetShareCtr502(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr502));
6240 break;
6242 case 1004:
6243 if (r->ctr1004) {
6244 NDR_CHECK(ndr_push_srvsvc_NetShareCtr1004(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1004));
6246 break;
6248 case 1005:
6249 if (r->ctr1005) {
6250 NDR_CHECK(ndr_push_srvsvc_NetShareCtr1005(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1005));
6252 break;
6254 case 1006:
6255 if (r->ctr1006) {
6256 NDR_CHECK(ndr_push_srvsvc_NetShareCtr1006(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1006));
6258 break;
6260 case 1007:
6261 if (r->ctr1007) {
6262 NDR_CHECK(ndr_push_srvsvc_NetShareCtr1007(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1007));
6264 break;
6266 case 1501:
6267 if (r->ctr1501) {
6268 NDR_CHECK(ndr_push_srvsvc_NetShareCtr1501(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1501));
6270 break;
6272 default:
6273 break;
6277 return NDR_ERR_SUCCESS;
6280 static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetShareCtr *r)
6282 int level;
6283 uint32_t _level;
6284 TALLOC_CTX *_mem_save_ctr0_0;
6285 uint32_t _ptr_ctr0;
6286 TALLOC_CTX *_mem_save_ctr1_0;
6287 uint32_t _ptr_ctr1;
6288 TALLOC_CTX *_mem_save_ctr2_0;
6289 uint32_t _ptr_ctr2;
6290 TALLOC_CTX *_mem_save_ctr501_0;
6291 uint32_t _ptr_ctr501;
6292 TALLOC_CTX *_mem_save_ctr502_0;
6293 uint32_t _ptr_ctr502;
6294 TALLOC_CTX *_mem_save_ctr1004_0;
6295 uint32_t _ptr_ctr1004;
6296 TALLOC_CTX *_mem_save_ctr1005_0;
6297 uint32_t _ptr_ctr1005;
6298 TALLOC_CTX *_mem_save_ctr1006_0;
6299 uint32_t _ptr_ctr1006;
6300 TALLOC_CTX *_mem_save_ctr1007_0;
6301 uint32_t _ptr_ctr1007;
6302 TALLOC_CTX *_mem_save_ctr1501_0;
6303 uint32_t _ptr_ctr1501;
6304 level = ndr_pull_get_switch_value(ndr, r);
6305 if (ndr_flags & NDR_SCALARS) {
6306 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
6307 if (_level != level) {
6308 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
6310 NDR_CHECK(ndr_pull_union_align(ndr, 5));
6311 switch (level) {
6312 case 0: {
6313 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr0));
6314 if (_ptr_ctr0) {
6315 NDR_PULL_ALLOC(ndr, r->ctr0);
6316 } else {
6317 r->ctr0 = NULL;
6319 break; }
6321 case 1: {
6322 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
6323 if (_ptr_ctr1) {
6324 NDR_PULL_ALLOC(ndr, r->ctr1);
6325 } else {
6326 r->ctr1 = NULL;
6328 break; }
6330 case 2: {
6331 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr2));
6332 if (_ptr_ctr2) {
6333 NDR_PULL_ALLOC(ndr, r->ctr2);
6334 } else {
6335 r->ctr2 = NULL;
6337 break; }
6339 case 501: {
6340 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr501));
6341 if (_ptr_ctr501) {
6342 NDR_PULL_ALLOC(ndr, r->ctr501);
6343 } else {
6344 r->ctr501 = NULL;
6346 break; }
6348 case 502: {
6349 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr502));
6350 if (_ptr_ctr502) {
6351 NDR_PULL_ALLOC(ndr, r->ctr502);
6352 } else {
6353 r->ctr502 = NULL;
6355 break; }
6357 case 1004: {
6358 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1004));
6359 if (_ptr_ctr1004) {
6360 NDR_PULL_ALLOC(ndr, r->ctr1004);
6361 } else {
6362 r->ctr1004 = NULL;
6364 break; }
6366 case 1005: {
6367 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1005));
6368 if (_ptr_ctr1005) {
6369 NDR_PULL_ALLOC(ndr, r->ctr1005);
6370 } else {
6371 r->ctr1005 = NULL;
6373 break; }
6375 case 1006: {
6376 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1006));
6377 if (_ptr_ctr1006) {
6378 NDR_PULL_ALLOC(ndr, r->ctr1006);
6379 } else {
6380 r->ctr1006 = NULL;
6382 break; }
6384 case 1007: {
6385 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1007));
6386 if (_ptr_ctr1007) {
6387 NDR_PULL_ALLOC(ndr, r->ctr1007);
6388 } else {
6389 r->ctr1007 = NULL;
6391 break; }
6393 case 1501: {
6394 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1501));
6395 if (_ptr_ctr1501) {
6396 NDR_PULL_ALLOC(ndr, r->ctr1501);
6397 } else {
6398 r->ctr1501 = NULL;
6400 break; }
6402 default: {
6403 break; }
6407 if (ndr_flags & NDR_BUFFERS) {
6408 switch (level) {
6409 case 0:
6410 if (r->ctr0) {
6411 _mem_save_ctr0_0 = NDR_PULL_GET_MEM_CTX(ndr);
6412 NDR_PULL_SET_MEM_CTX(ndr, r->ctr0, 0);
6413 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
6414 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr0_0, 0);
6416 break;
6418 case 1:
6419 if (r->ctr1) {
6420 _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
6421 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
6422 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
6423 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
6425 break;
6427 case 2:
6428 if (r->ctr2) {
6429 _mem_save_ctr2_0 = NDR_PULL_GET_MEM_CTX(ndr);
6430 NDR_PULL_SET_MEM_CTX(ndr, r->ctr2, 0);
6431 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
6432 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr2_0, 0);
6434 break;
6436 case 501:
6437 if (r->ctr501) {
6438 _mem_save_ctr501_0 = NDR_PULL_GET_MEM_CTX(ndr);
6439 NDR_PULL_SET_MEM_CTX(ndr, r->ctr501, 0);
6440 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr501(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr501));
6441 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr501_0, 0);
6443 break;
6445 case 502:
6446 if (r->ctr502) {
6447 _mem_save_ctr502_0 = NDR_PULL_GET_MEM_CTX(ndr);
6448 NDR_PULL_SET_MEM_CTX(ndr, r->ctr502, 0);
6449 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr502(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr502));
6450 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr502_0, 0);
6452 break;
6454 case 1004:
6455 if (r->ctr1004) {
6456 _mem_save_ctr1004_0 = NDR_PULL_GET_MEM_CTX(ndr);
6457 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1004, 0);
6458 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr1004(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1004));
6459 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1004_0, 0);
6461 break;
6463 case 1005:
6464 if (r->ctr1005) {
6465 _mem_save_ctr1005_0 = NDR_PULL_GET_MEM_CTX(ndr);
6466 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1005, 0);
6467 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr1005(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1005));
6468 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1005_0, 0);
6470 break;
6472 case 1006:
6473 if (r->ctr1006) {
6474 _mem_save_ctr1006_0 = NDR_PULL_GET_MEM_CTX(ndr);
6475 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1006, 0);
6476 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr1006(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1006));
6477 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1006_0, 0);
6479 break;
6481 case 1007:
6482 if (r->ctr1007) {
6483 _mem_save_ctr1007_0 = NDR_PULL_GET_MEM_CTX(ndr);
6484 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1007, 0);
6485 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr1007(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1007));
6486 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1007_0, 0);
6488 break;
6490 case 1501:
6491 if (r->ctr1501) {
6492 _mem_save_ctr1501_0 = NDR_PULL_GET_MEM_CTX(ndr);
6493 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1501, 0);
6494 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr1501(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1501));
6495 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1501_0, 0);
6497 break;
6499 default:
6500 break;
6504 return NDR_ERR_SUCCESS;
6507 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetShareCtr *r)
6509 int level;
6510 level = ndr_print_get_switch_value(ndr, r);
6511 ndr_print_union(ndr, name, level, "srvsvc_NetShareCtr");
6512 switch (level) {
6513 case 0:
6514 ndr_print_ptr(ndr, "ctr0", r->ctr0);
6515 ndr->depth++;
6516 if (r->ctr0) {
6517 ndr_print_srvsvc_NetShareCtr0(ndr, "ctr0", r->ctr0);
6519 ndr->depth--;
6520 break;
6522 case 1:
6523 ndr_print_ptr(ndr, "ctr1", r->ctr1);
6524 ndr->depth++;
6525 if (r->ctr1) {
6526 ndr_print_srvsvc_NetShareCtr1(ndr, "ctr1", r->ctr1);
6528 ndr->depth--;
6529 break;
6531 case 2:
6532 ndr_print_ptr(ndr, "ctr2", r->ctr2);
6533 ndr->depth++;
6534 if (r->ctr2) {
6535 ndr_print_srvsvc_NetShareCtr2(ndr, "ctr2", r->ctr2);
6537 ndr->depth--;
6538 break;
6540 case 501:
6541 ndr_print_ptr(ndr, "ctr501", r->ctr501);
6542 ndr->depth++;
6543 if (r->ctr501) {
6544 ndr_print_srvsvc_NetShareCtr501(ndr, "ctr501", r->ctr501);
6546 ndr->depth--;
6547 break;
6549 case 502:
6550 ndr_print_ptr(ndr, "ctr502", r->ctr502);
6551 ndr->depth++;
6552 if (r->ctr502) {
6553 ndr_print_srvsvc_NetShareCtr502(ndr, "ctr502", r->ctr502);
6555 ndr->depth--;
6556 break;
6558 case 1004:
6559 ndr_print_ptr(ndr, "ctr1004", r->ctr1004);
6560 ndr->depth++;
6561 if (r->ctr1004) {
6562 ndr_print_srvsvc_NetShareCtr1004(ndr, "ctr1004", r->ctr1004);
6564 ndr->depth--;
6565 break;
6567 case 1005:
6568 ndr_print_ptr(ndr, "ctr1005", r->ctr1005);
6569 ndr->depth++;
6570 if (r->ctr1005) {
6571 ndr_print_srvsvc_NetShareCtr1005(ndr, "ctr1005", r->ctr1005);
6573 ndr->depth--;
6574 break;
6576 case 1006:
6577 ndr_print_ptr(ndr, "ctr1006", r->ctr1006);
6578 ndr->depth++;
6579 if (r->ctr1006) {
6580 ndr_print_srvsvc_NetShareCtr1006(ndr, "ctr1006", r->ctr1006);
6582 ndr->depth--;
6583 break;
6585 case 1007:
6586 ndr_print_ptr(ndr, "ctr1007", r->ctr1007);
6587 ndr->depth++;
6588 if (r->ctr1007) {
6589 ndr_print_srvsvc_NetShareCtr1007(ndr, "ctr1007", r->ctr1007);
6591 ndr->depth--;
6592 break;
6594 case 1501:
6595 ndr_print_ptr(ndr, "ctr1501", r->ctr1501);
6596 ndr->depth++;
6597 if (r->ctr1501) {
6598 ndr_print_srvsvc_NetShareCtr1501(ndr, "ctr1501", r->ctr1501);
6600 ndr->depth--;
6601 break;
6603 default:
6604 break;
6609 static enum ndr_err_code ndr_push_srvsvc_NetShareInfoCtr(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfoCtr *r)
6611 if (ndr_flags & NDR_SCALARS) {
6612 NDR_CHECK(ndr_push_align(ndr, 5));
6613 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
6614 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level));
6615 NDR_CHECK(ndr_push_srvsvc_NetShareCtr(ndr, NDR_SCALARS, &r->ctr));
6616 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
6618 if (ndr_flags & NDR_BUFFERS) {
6619 NDR_CHECK(ndr_push_srvsvc_NetShareCtr(ndr, NDR_BUFFERS, &r->ctr));
6621 return NDR_ERR_SUCCESS;
6624 static enum ndr_err_code ndr_pull_srvsvc_NetShareInfoCtr(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfoCtr *r)
6626 if (ndr_flags & NDR_SCALARS) {
6627 NDR_CHECK(ndr_pull_align(ndr, 5));
6628 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
6629 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level));
6630 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr(ndr, NDR_SCALARS, &r->ctr));
6631 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
6633 if (ndr_flags & NDR_BUFFERS) {
6634 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr(ndr, NDR_BUFFERS, &r->ctr));
6636 return NDR_ERR_SUCCESS;
6639 _PUBLIC_ void ndr_print_srvsvc_NetShareInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfoCtr *r)
6641 ndr_print_struct(ndr, name, "srvsvc_NetShareInfoCtr");
6642 ndr->depth++;
6643 ndr_print_uint32(ndr, "level", r->level);
6644 ndr_print_set_switch_value(ndr, &r->ctr, r->level);
6645 ndr_print_srvsvc_NetShareCtr(ndr, "ctr", &r->ctr);
6646 ndr->depth--;
6649 _PUBLIC_ enum ndr_err_code ndr_push_srvsvc_PlatformId(struct ndr_push *ndr, int ndr_flags, enum srvsvc_PlatformId r)
6651 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
6652 return NDR_ERR_SUCCESS;
6655 _PUBLIC_ enum ndr_err_code ndr_pull_srvsvc_PlatformId(struct ndr_pull *ndr, int ndr_flags, enum srvsvc_PlatformId *r)
6657 uint32_t v;
6658 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
6659 *r = v;
6660 return NDR_ERR_SUCCESS;
6663 _PUBLIC_ void ndr_print_srvsvc_PlatformId(struct ndr_print *ndr, const char *name, enum srvsvc_PlatformId r)
6665 const char *val = NULL;
6667 switch (r) {
6668 case PLATFORM_ID_DOS: val = "PLATFORM_ID_DOS"; break;
6669 case PLATFORM_ID_OS2: val = "PLATFORM_ID_OS2"; break;
6670 case PLATFORM_ID_NT: val = "PLATFORM_ID_NT"; break;
6671 case PLATFORM_ID_OSF: val = "PLATFORM_ID_OSF"; break;
6672 case PLATFORM_ID_VMS: val = "PLATFORM_ID_VMS"; break;
6674 ndr_print_enum(ndr, name, "ENUM", val, r);
6677 _PUBLIC_ enum ndr_err_code ndr_push_srvsvc_NetSrvInfo100(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo100 *r)
6679 if (ndr_flags & NDR_SCALARS) {
6680 NDR_CHECK(ndr_push_align(ndr, 5));
6681 NDR_CHECK(ndr_push_srvsvc_PlatformId(ndr, NDR_SCALARS, r->platform_id));
6682 NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_name));
6683 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
6685 if (ndr_flags & NDR_BUFFERS) {
6686 if (r->server_name) {
6687 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
6688 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6689 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
6690 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server_name, ndr_charset_length(r->server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6693 return NDR_ERR_SUCCESS;
6696 _PUBLIC_ enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo100(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo100 *r)
6698 uint32_t _ptr_server_name;
6699 uint32_t size_server_name_1 = 0;
6700 uint32_t length_server_name_1 = 0;
6701 TALLOC_CTX *_mem_save_server_name_0;
6702 if (ndr_flags & NDR_SCALARS) {
6703 NDR_CHECK(ndr_pull_align(ndr, 5));
6704 NDR_CHECK(ndr_pull_srvsvc_PlatformId(ndr, NDR_SCALARS, &r->platform_id));
6705 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
6706 if (_ptr_server_name) {
6707 NDR_PULL_ALLOC(ndr, r->server_name);
6708 } else {
6709 r->server_name = NULL;
6711 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
6713 if (ndr_flags & NDR_BUFFERS) {
6714 if (r->server_name) {
6715 _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6716 NDR_PULL_SET_MEM_CTX(ndr, r->server_name, 0);
6717 NDR_CHECK(ndr_pull_array_size(ndr, &r->server_name));
6718 NDR_CHECK(ndr_pull_array_length(ndr, &r->server_name));
6719 size_server_name_1 = ndr_get_array_size(ndr, &r->server_name);
6720 length_server_name_1 = ndr_get_array_length(ndr, &r->server_name);
6721 if (length_server_name_1 > size_server_name_1) {
6722 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_name_1, length_server_name_1);
6724 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
6725 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
6726 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
6729 return NDR_ERR_SUCCESS;
6732 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo100(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo100 *r)
6734 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo100");
6735 ndr->depth++;
6736 ndr_print_srvsvc_PlatformId(ndr, "platform_id", r->platform_id);
6737 ndr_print_ptr(ndr, "server_name", r->server_name);
6738 ndr->depth++;
6739 if (r->server_name) {
6740 ndr_print_string(ndr, "server_name", r->server_name);
6742 ndr->depth--;
6743 ndr->depth--;
6746 _PUBLIC_ enum ndr_err_code ndr_push_srvsvc_NetSrvInfo101(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo101 *r)
6748 if (ndr_flags & NDR_SCALARS) {
6749 NDR_CHECK(ndr_push_align(ndr, 5));
6750 NDR_CHECK(ndr_push_srvsvc_PlatformId(ndr, NDR_SCALARS, r->platform_id));
6751 NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_name));
6752 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version_major));
6753 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version_minor));
6754 NDR_CHECK(ndr_push_svcctl_ServerType(ndr, NDR_SCALARS, r->server_type));
6755 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
6756 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
6758 if (ndr_flags & NDR_BUFFERS) {
6759 if (r->server_name) {
6760 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
6761 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6762 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
6763 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server_name, ndr_charset_length(r->server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6765 if (r->comment) {
6766 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
6767 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6768 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
6769 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6772 return NDR_ERR_SUCCESS;
6775 _PUBLIC_ enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo101(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo101 *r)
6777 uint32_t _ptr_server_name;
6778 uint32_t size_server_name_1 = 0;
6779 uint32_t length_server_name_1 = 0;
6780 TALLOC_CTX *_mem_save_server_name_0;
6781 uint32_t _ptr_comment;
6782 uint32_t size_comment_1 = 0;
6783 uint32_t length_comment_1 = 0;
6784 TALLOC_CTX *_mem_save_comment_0;
6785 if (ndr_flags & NDR_SCALARS) {
6786 NDR_CHECK(ndr_pull_align(ndr, 5));
6787 NDR_CHECK(ndr_pull_srvsvc_PlatformId(ndr, NDR_SCALARS, &r->platform_id));
6788 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
6789 if (_ptr_server_name) {
6790 NDR_PULL_ALLOC(ndr, r->server_name);
6791 } else {
6792 r->server_name = NULL;
6794 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version_major));
6795 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version_minor));
6796 NDR_CHECK(ndr_pull_svcctl_ServerType(ndr, NDR_SCALARS, &r->server_type));
6797 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
6798 if (_ptr_comment) {
6799 NDR_PULL_ALLOC(ndr, r->comment);
6800 } else {
6801 r->comment = NULL;
6803 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
6805 if (ndr_flags & NDR_BUFFERS) {
6806 if (r->server_name) {
6807 _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6808 NDR_PULL_SET_MEM_CTX(ndr, r->server_name, 0);
6809 NDR_CHECK(ndr_pull_array_size(ndr, &r->server_name));
6810 NDR_CHECK(ndr_pull_array_length(ndr, &r->server_name));
6811 size_server_name_1 = ndr_get_array_size(ndr, &r->server_name);
6812 length_server_name_1 = ndr_get_array_length(ndr, &r->server_name);
6813 if (length_server_name_1 > size_server_name_1) {
6814 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_name_1, length_server_name_1);
6816 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
6817 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
6818 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
6820 if (r->comment) {
6821 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
6822 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
6823 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
6824 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
6825 size_comment_1 = ndr_get_array_size(ndr, &r->comment);
6826 length_comment_1 = ndr_get_array_length(ndr, &r->comment);
6827 if (length_comment_1 > size_comment_1) {
6828 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_comment_1, length_comment_1);
6830 NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_1, sizeof(uint16_t)));
6831 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, length_comment_1, sizeof(uint16_t), CH_UTF16));
6832 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
6835 return NDR_ERR_SUCCESS;
6838 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo101(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo101 *r)
6840 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo101");
6841 ndr->depth++;
6842 ndr_print_srvsvc_PlatformId(ndr, "platform_id", r->platform_id);
6843 ndr_print_ptr(ndr, "server_name", r->server_name);
6844 ndr->depth++;
6845 if (r->server_name) {
6846 ndr_print_string(ndr, "server_name", r->server_name);
6848 ndr->depth--;
6849 ndr_print_uint32(ndr, "version_major", r->version_major);
6850 ndr_print_uint32(ndr, "version_minor", r->version_minor);
6851 ndr_print_svcctl_ServerType(ndr, "server_type", r->server_type);
6852 ndr_print_ptr(ndr, "comment", r->comment);
6853 ndr->depth++;
6854 if (r->comment) {
6855 ndr_print_string(ndr, "comment", r->comment);
6857 ndr->depth--;
6858 ndr->depth--;
6861 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo102(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo102 *r)
6863 if (ndr_flags & NDR_SCALARS) {
6864 NDR_CHECK(ndr_push_align(ndr, 5));
6865 NDR_CHECK(ndr_push_srvsvc_PlatformId(ndr, NDR_SCALARS, r->platform_id));
6866 NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_name));
6867 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version_major));
6868 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version_minor));
6869 NDR_CHECK(ndr_push_svcctl_ServerType(ndr, NDR_SCALARS, r->server_type));
6870 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
6871 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->users));
6872 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->disc));
6873 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->hidden));
6874 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->announce));
6875 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->anndelta));
6876 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->licenses));
6877 NDR_CHECK(ndr_push_unique_ptr(ndr, r->userpath));
6878 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
6880 if (ndr_flags & NDR_BUFFERS) {
6881 if (r->server_name) {
6882 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
6883 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6884 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
6885 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server_name, ndr_charset_length(r->server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6887 if (r->comment) {
6888 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
6889 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6890 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
6891 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6893 if (r->userpath) {
6894 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->userpath, CH_UTF16)));
6895 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6896 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->userpath, CH_UTF16)));
6897 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->userpath, ndr_charset_length(r->userpath, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6900 return NDR_ERR_SUCCESS;
6903 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo102(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo102 *r)
6905 uint32_t _ptr_server_name;
6906 uint32_t size_server_name_1 = 0;
6907 uint32_t length_server_name_1 = 0;
6908 TALLOC_CTX *_mem_save_server_name_0;
6909 uint32_t _ptr_comment;
6910 uint32_t size_comment_1 = 0;
6911 uint32_t length_comment_1 = 0;
6912 TALLOC_CTX *_mem_save_comment_0;
6913 uint32_t _ptr_userpath;
6914 uint32_t size_userpath_1 = 0;
6915 uint32_t length_userpath_1 = 0;
6916 TALLOC_CTX *_mem_save_userpath_0;
6917 if (ndr_flags & NDR_SCALARS) {
6918 NDR_CHECK(ndr_pull_align(ndr, 5));
6919 NDR_CHECK(ndr_pull_srvsvc_PlatformId(ndr, NDR_SCALARS, &r->platform_id));
6920 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
6921 if (_ptr_server_name) {
6922 NDR_PULL_ALLOC(ndr, r->server_name);
6923 } else {
6924 r->server_name = NULL;
6926 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version_major));
6927 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version_minor));
6928 NDR_CHECK(ndr_pull_svcctl_ServerType(ndr, NDR_SCALARS, &r->server_type));
6929 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
6930 if (_ptr_comment) {
6931 NDR_PULL_ALLOC(ndr, r->comment);
6932 } else {
6933 r->comment = NULL;
6935 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->users));
6936 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->disc));
6937 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->hidden));
6938 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->announce));
6939 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->anndelta));
6940 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->licenses));
6941 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_userpath));
6942 if (_ptr_userpath) {
6943 NDR_PULL_ALLOC(ndr, r->userpath);
6944 } else {
6945 r->userpath = NULL;
6947 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
6949 if (ndr_flags & NDR_BUFFERS) {
6950 if (r->server_name) {
6951 _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6952 NDR_PULL_SET_MEM_CTX(ndr, r->server_name, 0);
6953 NDR_CHECK(ndr_pull_array_size(ndr, &r->server_name));
6954 NDR_CHECK(ndr_pull_array_length(ndr, &r->server_name));
6955 size_server_name_1 = ndr_get_array_size(ndr, &r->server_name);
6956 length_server_name_1 = ndr_get_array_length(ndr, &r->server_name);
6957 if (length_server_name_1 > size_server_name_1) {
6958 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_name_1, length_server_name_1);
6960 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_name_1, sizeof(uint16_t)));
6961 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server_name, length_server_name_1, sizeof(uint16_t), CH_UTF16));
6962 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
6964 if (r->comment) {
6965 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
6966 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
6967 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
6968 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
6969 size_comment_1 = ndr_get_array_size(ndr, &r->comment);
6970 length_comment_1 = ndr_get_array_length(ndr, &r->comment);
6971 if (length_comment_1 > size_comment_1) {
6972 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_comment_1, length_comment_1);
6974 NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_1, sizeof(uint16_t)));
6975 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, length_comment_1, sizeof(uint16_t), CH_UTF16));
6976 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
6978 if (r->userpath) {
6979 _mem_save_userpath_0 = NDR_PULL_GET_MEM_CTX(ndr);
6980 NDR_PULL_SET_MEM_CTX(ndr, r->userpath, 0);
6981 NDR_CHECK(ndr_pull_array_size(ndr, &r->userpath));
6982 NDR_CHECK(ndr_pull_array_length(ndr, &r->userpath));
6983 size_userpath_1 = ndr_get_array_size(ndr, &r->userpath);
6984 length_userpath_1 = ndr_get_array_length(ndr, &r->userpath);
6985 if (length_userpath_1 > size_userpath_1) {
6986 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_userpath_1, length_userpath_1);
6988 NDR_CHECK(ndr_check_string_terminator(ndr, length_userpath_1, sizeof(uint16_t)));
6989 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->userpath, length_userpath_1, sizeof(uint16_t), CH_UTF16));
6990 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_userpath_0, 0);
6993 return NDR_ERR_SUCCESS;
6996 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo102(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo102 *r)
6998 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo102");
6999 ndr->depth++;
7000 ndr_print_srvsvc_PlatformId(ndr, "platform_id", r->platform_id);
7001 ndr_print_ptr(ndr, "server_name", r->server_name);
7002 ndr->depth++;
7003 if (r->server_name) {
7004 ndr_print_string(ndr, "server_name", r->server_name);
7006 ndr->depth--;
7007 ndr_print_uint32(ndr, "version_major", r->version_major);
7008 ndr_print_uint32(ndr, "version_minor", r->version_minor);
7009 ndr_print_svcctl_ServerType(ndr, "server_type", r->server_type);
7010 ndr_print_ptr(ndr, "comment", r->comment);
7011 ndr->depth++;
7012 if (r->comment) {
7013 ndr_print_string(ndr, "comment", r->comment);
7015 ndr->depth--;
7016 ndr_print_uint32(ndr, "users", r->users);
7017 ndr_print_uint32(ndr, "disc", r->disc);
7018 ndr_print_uint32(ndr, "hidden", r->hidden);
7019 ndr_print_uint32(ndr, "announce", r->announce);
7020 ndr_print_uint32(ndr, "anndelta", r->anndelta);
7021 ndr_print_uint32(ndr, "licenses", r->licenses);
7022 ndr_print_ptr(ndr, "userpath", r->userpath);
7023 ndr->depth++;
7024 if (r->userpath) {
7025 ndr_print_string(ndr, "userpath", r->userpath);
7027 ndr->depth--;
7028 ndr->depth--;
7031 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo402(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo402 *r)
7033 if (ndr_flags & NDR_SCALARS) {
7034 NDR_CHECK(ndr_push_align(ndr, 5));
7035 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ulist_mtime));
7036 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->glist_mtime));
7037 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->alist_mtime));
7038 NDR_CHECK(ndr_push_unique_ptr(ndr, r->alerts));
7039 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->security));
7040 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numadmin));
7041 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lanmask));
7042 NDR_CHECK(ndr_push_unique_ptr(ndr, r->guestaccount));
7043 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->chdevs));
7044 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->chdevqs));
7045 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->chdevjobs));
7046 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->connections));
7047 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->shares));
7048 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->openfiles));
7049 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessopen));
7050 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sesssvc));
7051 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessreqs));
7052 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->opensearch));
7053 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->activelocks));
7054 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numreqbufs));
7055 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sizereqbufs));
7056 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numbigbufs));
7057 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numfiletasks));
7058 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->alertsched));
7059 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->erroralert));
7060 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->logonalert));
7061 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->accessalert));
7062 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->diskalert));
7063 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->netioalert));
7064 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxaudits));
7065 NDR_CHECK(ndr_push_unique_ptr(ndr, r->srvheuristics));
7066 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
7068 if (ndr_flags & NDR_BUFFERS) {
7069 if (r->alerts) {
7070 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->alerts, CH_UTF16)));
7071 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7072 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->alerts, CH_UTF16)));
7073 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->alerts, ndr_charset_length(r->alerts, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7075 if (r->guestaccount) {
7076 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->guestaccount, CH_UTF16)));
7077 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7078 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->guestaccount, CH_UTF16)));
7079 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->guestaccount, ndr_charset_length(r->guestaccount, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7081 if (r->srvheuristics) {
7082 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->srvheuristics, CH_UTF16)));
7083 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7084 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->srvheuristics, CH_UTF16)));
7085 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->srvheuristics, ndr_charset_length(r->srvheuristics, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7088 return NDR_ERR_SUCCESS;
7091 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo402(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo402 *r)
7093 uint32_t _ptr_alerts;
7094 uint32_t size_alerts_1 = 0;
7095 uint32_t length_alerts_1 = 0;
7096 TALLOC_CTX *_mem_save_alerts_0;
7097 uint32_t _ptr_guestaccount;
7098 uint32_t size_guestaccount_1 = 0;
7099 uint32_t length_guestaccount_1 = 0;
7100 TALLOC_CTX *_mem_save_guestaccount_0;
7101 uint32_t _ptr_srvheuristics;
7102 uint32_t size_srvheuristics_1 = 0;
7103 uint32_t length_srvheuristics_1 = 0;
7104 TALLOC_CTX *_mem_save_srvheuristics_0;
7105 if (ndr_flags & NDR_SCALARS) {
7106 NDR_CHECK(ndr_pull_align(ndr, 5));
7107 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ulist_mtime));
7108 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->glist_mtime));
7109 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->alist_mtime));
7110 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_alerts));
7111 if (_ptr_alerts) {
7112 NDR_PULL_ALLOC(ndr, r->alerts);
7113 } else {
7114 r->alerts = NULL;
7116 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->security));
7117 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numadmin));
7118 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lanmask));
7119 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_guestaccount));
7120 if (_ptr_guestaccount) {
7121 NDR_PULL_ALLOC(ndr, r->guestaccount);
7122 } else {
7123 r->guestaccount = NULL;
7125 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->chdevs));
7126 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->chdevqs));
7127 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->chdevjobs));
7128 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->connections));
7129 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->shares));
7130 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->openfiles));
7131 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessopen));
7132 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sesssvc));
7133 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessreqs));
7134 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->opensearch));
7135 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->activelocks));
7136 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numreqbufs));
7137 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sizereqbufs));
7138 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numbigbufs));
7139 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numfiletasks));
7140 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->alertsched));
7141 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->erroralert));
7142 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->logonalert));
7143 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->accessalert));
7144 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->diskalert));
7145 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->netioalert));
7146 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxaudits));
7147 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_srvheuristics));
7148 if (_ptr_srvheuristics) {
7149 NDR_PULL_ALLOC(ndr, r->srvheuristics);
7150 } else {
7151 r->srvheuristics = NULL;
7153 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
7155 if (ndr_flags & NDR_BUFFERS) {
7156 if (r->alerts) {
7157 _mem_save_alerts_0 = NDR_PULL_GET_MEM_CTX(ndr);
7158 NDR_PULL_SET_MEM_CTX(ndr, r->alerts, 0);
7159 NDR_CHECK(ndr_pull_array_size(ndr, &r->alerts));
7160 NDR_CHECK(ndr_pull_array_length(ndr, &r->alerts));
7161 size_alerts_1 = ndr_get_array_size(ndr, &r->alerts);
7162 length_alerts_1 = ndr_get_array_length(ndr, &r->alerts);
7163 if (length_alerts_1 > size_alerts_1) {
7164 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_alerts_1, length_alerts_1);
7166 NDR_CHECK(ndr_check_string_terminator(ndr, length_alerts_1, sizeof(uint16_t)));
7167 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->alerts, length_alerts_1, sizeof(uint16_t), CH_UTF16));
7168 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alerts_0, 0);
7170 if (r->guestaccount) {
7171 _mem_save_guestaccount_0 = NDR_PULL_GET_MEM_CTX(ndr);
7172 NDR_PULL_SET_MEM_CTX(ndr, r->guestaccount, 0);
7173 NDR_CHECK(ndr_pull_array_size(ndr, &r->guestaccount));
7174 NDR_CHECK(ndr_pull_array_length(ndr, &r->guestaccount));
7175 size_guestaccount_1 = ndr_get_array_size(ndr, &r->guestaccount);
7176 length_guestaccount_1 = ndr_get_array_length(ndr, &r->guestaccount);
7177 if (length_guestaccount_1 > size_guestaccount_1) {
7178 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_guestaccount_1, length_guestaccount_1);
7180 NDR_CHECK(ndr_check_string_terminator(ndr, length_guestaccount_1, sizeof(uint16_t)));
7181 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->guestaccount, length_guestaccount_1, sizeof(uint16_t), CH_UTF16));
7182 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_guestaccount_0, 0);
7184 if (r->srvheuristics) {
7185 _mem_save_srvheuristics_0 = NDR_PULL_GET_MEM_CTX(ndr);
7186 NDR_PULL_SET_MEM_CTX(ndr, r->srvheuristics, 0);
7187 NDR_CHECK(ndr_pull_array_size(ndr, &r->srvheuristics));
7188 NDR_CHECK(ndr_pull_array_length(ndr, &r->srvheuristics));
7189 size_srvheuristics_1 = ndr_get_array_size(ndr, &r->srvheuristics);
7190 length_srvheuristics_1 = ndr_get_array_length(ndr, &r->srvheuristics);
7191 if (length_srvheuristics_1 > size_srvheuristics_1) {
7192 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_srvheuristics_1, length_srvheuristics_1);
7194 NDR_CHECK(ndr_check_string_terminator(ndr, length_srvheuristics_1, sizeof(uint16_t)));
7195 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->srvheuristics, length_srvheuristics_1, sizeof(uint16_t), CH_UTF16));
7196 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_srvheuristics_0, 0);
7199 return NDR_ERR_SUCCESS;
7202 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo402(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo402 *r)
7204 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo402");
7205 ndr->depth++;
7206 ndr_print_uint32(ndr, "ulist_mtime", r->ulist_mtime);
7207 ndr_print_uint32(ndr, "glist_mtime", r->glist_mtime);
7208 ndr_print_uint32(ndr, "alist_mtime", r->alist_mtime);
7209 ndr_print_ptr(ndr, "alerts", r->alerts);
7210 ndr->depth++;
7211 if (r->alerts) {
7212 ndr_print_string(ndr, "alerts", r->alerts);
7214 ndr->depth--;
7215 ndr_print_uint32(ndr, "security", r->security);
7216 ndr_print_uint32(ndr, "numadmin", r->numadmin);
7217 ndr_print_uint32(ndr, "lanmask", r->lanmask);
7218 ndr_print_ptr(ndr, "guestaccount", r->guestaccount);
7219 ndr->depth++;
7220 if (r->guestaccount) {
7221 ndr_print_string(ndr, "guestaccount", r->guestaccount);
7223 ndr->depth--;
7224 ndr_print_uint32(ndr, "chdevs", r->chdevs);
7225 ndr_print_uint32(ndr, "chdevqs", r->chdevqs);
7226 ndr_print_uint32(ndr, "chdevjobs", r->chdevjobs);
7227 ndr_print_uint32(ndr, "connections", r->connections);
7228 ndr_print_uint32(ndr, "shares", r->shares);
7229 ndr_print_uint32(ndr, "openfiles", r->openfiles);
7230 ndr_print_uint32(ndr, "sessopen", r->sessopen);
7231 ndr_print_uint32(ndr, "sesssvc", r->sesssvc);
7232 ndr_print_uint32(ndr, "sessreqs", r->sessreqs);
7233 ndr_print_uint32(ndr, "opensearch", r->opensearch);
7234 ndr_print_uint32(ndr, "activelocks", r->activelocks);
7235 ndr_print_uint32(ndr, "numreqbufs", r->numreqbufs);
7236 ndr_print_uint32(ndr, "sizereqbufs", r->sizereqbufs);
7237 ndr_print_uint32(ndr, "numbigbufs", r->numbigbufs);
7238 ndr_print_uint32(ndr, "numfiletasks", r->numfiletasks);
7239 ndr_print_uint32(ndr, "alertsched", r->alertsched);
7240 ndr_print_uint32(ndr, "erroralert", r->erroralert);
7241 ndr_print_uint32(ndr, "logonalert", r->logonalert);
7242 ndr_print_uint32(ndr, "accessalert", r->accessalert);
7243 ndr_print_uint32(ndr, "diskalert", r->diskalert);
7244 ndr_print_uint32(ndr, "netioalert", r->netioalert);
7245 ndr_print_uint32(ndr, "maxaudits", r->maxaudits);
7246 ndr_print_ptr(ndr, "srvheuristics", r->srvheuristics);
7247 ndr->depth++;
7248 if (r->srvheuristics) {
7249 ndr_print_string(ndr, "srvheuristics", r->srvheuristics);
7251 ndr->depth--;
7252 ndr->depth--;
7255 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo403(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo403 *r)
7257 if (ndr_flags & NDR_SCALARS) {
7258 NDR_CHECK(ndr_push_align(ndr, 5));
7259 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ulist_mtime));
7260 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->glist_mtime));
7261 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->alist_mtime));
7262 NDR_CHECK(ndr_push_unique_ptr(ndr, r->alerts));
7263 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->security));
7264 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numadmin));
7265 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lanmask));
7266 NDR_CHECK(ndr_push_unique_ptr(ndr, r->guestaccount));
7267 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->chdevs));
7268 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->chdevqs));
7269 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->chdevjobs));
7270 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->connections));
7271 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->shares));
7272 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->openfiles));
7273 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessopen));
7274 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sesssvc));
7275 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessreqs));
7276 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->opensearch));
7277 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->activelocks));
7278 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numreqbufs));
7279 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sizereqbufs));
7280 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numbigbufs));
7281 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numfiletasks));
7282 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->alertsched));
7283 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->erroralert));
7284 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->logonalert));
7285 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->accessalert));
7286 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->diskalert));
7287 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->netioalert));
7288 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxaudits));
7289 NDR_CHECK(ndr_push_unique_ptr(ndr, r->srvheuristics));
7290 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->auditedevents));
7291 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->auditprofile));
7292 NDR_CHECK(ndr_push_unique_ptr(ndr, r->autopath));
7293 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
7295 if (ndr_flags & NDR_BUFFERS) {
7296 if (r->alerts) {
7297 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->alerts, CH_UTF16)));
7298 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7299 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->alerts, CH_UTF16)));
7300 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->alerts, ndr_charset_length(r->alerts, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7302 if (r->guestaccount) {
7303 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->guestaccount, CH_UTF16)));
7304 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7305 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->guestaccount, CH_UTF16)));
7306 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->guestaccount, ndr_charset_length(r->guestaccount, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7308 if (r->srvheuristics) {
7309 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->srvheuristics, CH_UTF16)));
7310 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7311 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->srvheuristics, CH_UTF16)));
7312 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->srvheuristics, ndr_charset_length(r->srvheuristics, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7314 if (r->autopath) {
7315 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->autopath, CH_UTF16)));
7316 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7317 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->autopath, CH_UTF16)));
7318 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->autopath, ndr_charset_length(r->autopath, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7321 return NDR_ERR_SUCCESS;
7324 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo403(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo403 *r)
7326 uint32_t _ptr_alerts;
7327 uint32_t size_alerts_1 = 0;
7328 uint32_t length_alerts_1 = 0;
7329 TALLOC_CTX *_mem_save_alerts_0;
7330 uint32_t _ptr_guestaccount;
7331 uint32_t size_guestaccount_1 = 0;
7332 uint32_t length_guestaccount_1 = 0;
7333 TALLOC_CTX *_mem_save_guestaccount_0;
7334 uint32_t _ptr_srvheuristics;
7335 uint32_t size_srvheuristics_1 = 0;
7336 uint32_t length_srvheuristics_1 = 0;
7337 TALLOC_CTX *_mem_save_srvheuristics_0;
7338 uint32_t _ptr_autopath;
7339 uint32_t size_autopath_1 = 0;
7340 uint32_t length_autopath_1 = 0;
7341 TALLOC_CTX *_mem_save_autopath_0;
7342 if (ndr_flags & NDR_SCALARS) {
7343 NDR_CHECK(ndr_pull_align(ndr, 5));
7344 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ulist_mtime));
7345 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->glist_mtime));
7346 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->alist_mtime));
7347 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_alerts));
7348 if (_ptr_alerts) {
7349 NDR_PULL_ALLOC(ndr, r->alerts);
7350 } else {
7351 r->alerts = NULL;
7353 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->security));
7354 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numadmin));
7355 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lanmask));
7356 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_guestaccount));
7357 if (_ptr_guestaccount) {
7358 NDR_PULL_ALLOC(ndr, r->guestaccount);
7359 } else {
7360 r->guestaccount = NULL;
7362 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->chdevs));
7363 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->chdevqs));
7364 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->chdevjobs));
7365 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->connections));
7366 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->shares));
7367 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->openfiles));
7368 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessopen));
7369 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sesssvc));
7370 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessreqs));
7371 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->opensearch));
7372 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->activelocks));
7373 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numreqbufs));
7374 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sizereqbufs));
7375 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numbigbufs));
7376 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numfiletasks));
7377 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->alertsched));
7378 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->erroralert));
7379 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->logonalert));
7380 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->accessalert));
7381 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->diskalert));
7382 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->netioalert));
7383 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxaudits));
7384 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_srvheuristics));
7385 if (_ptr_srvheuristics) {
7386 NDR_PULL_ALLOC(ndr, r->srvheuristics);
7387 } else {
7388 r->srvheuristics = NULL;
7390 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->auditedevents));
7391 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->auditprofile));
7392 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_autopath));
7393 if (_ptr_autopath) {
7394 NDR_PULL_ALLOC(ndr, r->autopath);
7395 } else {
7396 r->autopath = NULL;
7398 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
7400 if (ndr_flags & NDR_BUFFERS) {
7401 if (r->alerts) {
7402 _mem_save_alerts_0 = NDR_PULL_GET_MEM_CTX(ndr);
7403 NDR_PULL_SET_MEM_CTX(ndr, r->alerts, 0);
7404 NDR_CHECK(ndr_pull_array_size(ndr, &r->alerts));
7405 NDR_CHECK(ndr_pull_array_length(ndr, &r->alerts));
7406 size_alerts_1 = ndr_get_array_size(ndr, &r->alerts);
7407 length_alerts_1 = ndr_get_array_length(ndr, &r->alerts);
7408 if (length_alerts_1 > size_alerts_1) {
7409 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_alerts_1, length_alerts_1);
7411 NDR_CHECK(ndr_check_string_terminator(ndr, length_alerts_1, sizeof(uint16_t)));
7412 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->alerts, length_alerts_1, sizeof(uint16_t), CH_UTF16));
7413 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alerts_0, 0);
7415 if (r->guestaccount) {
7416 _mem_save_guestaccount_0 = NDR_PULL_GET_MEM_CTX(ndr);
7417 NDR_PULL_SET_MEM_CTX(ndr, r->guestaccount, 0);
7418 NDR_CHECK(ndr_pull_array_size(ndr, &r->guestaccount));
7419 NDR_CHECK(ndr_pull_array_length(ndr, &r->guestaccount));
7420 size_guestaccount_1 = ndr_get_array_size(ndr, &r->guestaccount);
7421 length_guestaccount_1 = ndr_get_array_length(ndr, &r->guestaccount);
7422 if (length_guestaccount_1 > size_guestaccount_1) {
7423 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_guestaccount_1, length_guestaccount_1);
7425 NDR_CHECK(ndr_check_string_terminator(ndr, length_guestaccount_1, sizeof(uint16_t)));
7426 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->guestaccount, length_guestaccount_1, sizeof(uint16_t), CH_UTF16));
7427 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_guestaccount_0, 0);
7429 if (r->srvheuristics) {
7430 _mem_save_srvheuristics_0 = NDR_PULL_GET_MEM_CTX(ndr);
7431 NDR_PULL_SET_MEM_CTX(ndr, r->srvheuristics, 0);
7432 NDR_CHECK(ndr_pull_array_size(ndr, &r->srvheuristics));
7433 NDR_CHECK(ndr_pull_array_length(ndr, &r->srvheuristics));
7434 size_srvheuristics_1 = ndr_get_array_size(ndr, &r->srvheuristics);
7435 length_srvheuristics_1 = ndr_get_array_length(ndr, &r->srvheuristics);
7436 if (length_srvheuristics_1 > size_srvheuristics_1) {
7437 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_srvheuristics_1, length_srvheuristics_1);
7439 NDR_CHECK(ndr_check_string_terminator(ndr, length_srvheuristics_1, sizeof(uint16_t)));
7440 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->srvheuristics, length_srvheuristics_1, sizeof(uint16_t), CH_UTF16));
7441 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_srvheuristics_0, 0);
7443 if (r->autopath) {
7444 _mem_save_autopath_0 = NDR_PULL_GET_MEM_CTX(ndr);
7445 NDR_PULL_SET_MEM_CTX(ndr, r->autopath, 0);
7446 NDR_CHECK(ndr_pull_array_size(ndr, &r->autopath));
7447 NDR_CHECK(ndr_pull_array_length(ndr, &r->autopath));
7448 size_autopath_1 = ndr_get_array_size(ndr, &r->autopath);
7449 length_autopath_1 = ndr_get_array_length(ndr, &r->autopath);
7450 if (length_autopath_1 > size_autopath_1) {
7451 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_autopath_1, length_autopath_1);
7453 NDR_CHECK(ndr_check_string_terminator(ndr, length_autopath_1, sizeof(uint16_t)));
7454 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->autopath, length_autopath_1, sizeof(uint16_t), CH_UTF16));
7455 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_autopath_0, 0);
7458 return NDR_ERR_SUCCESS;
7461 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo403(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo403 *r)
7463 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo403");
7464 ndr->depth++;
7465 ndr_print_uint32(ndr, "ulist_mtime", r->ulist_mtime);
7466 ndr_print_uint32(ndr, "glist_mtime", r->glist_mtime);
7467 ndr_print_uint32(ndr, "alist_mtime", r->alist_mtime);
7468 ndr_print_ptr(ndr, "alerts", r->alerts);
7469 ndr->depth++;
7470 if (r->alerts) {
7471 ndr_print_string(ndr, "alerts", r->alerts);
7473 ndr->depth--;
7474 ndr_print_uint32(ndr, "security", r->security);
7475 ndr_print_uint32(ndr, "numadmin", r->numadmin);
7476 ndr_print_uint32(ndr, "lanmask", r->lanmask);
7477 ndr_print_ptr(ndr, "guestaccount", r->guestaccount);
7478 ndr->depth++;
7479 if (r->guestaccount) {
7480 ndr_print_string(ndr, "guestaccount", r->guestaccount);
7482 ndr->depth--;
7483 ndr_print_uint32(ndr, "chdevs", r->chdevs);
7484 ndr_print_uint32(ndr, "chdevqs", r->chdevqs);
7485 ndr_print_uint32(ndr, "chdevjobs", r->chdevjobs);
7486 ndr_print_uint32(ndr, "connections", r->connections);
7487 ndr_print_uint32(ndr, "shares", r->shares);
7488 ndr_print_uint32(ndr, "openfiles", r->openfiles);
7489 ndr_print_uint32(ndr, "sessopen", r->sessopen);
7490 ndr_print_uint32(ndr, "sesssvc", r->sesssvc);
7491 ndr_print_uint32(ndr, "sessreqs", r->sessreqs);
7492 ndr_print_uint32(ndr, "opensearch", r->opensearch);
7493 ndr_print_uint32(ndr, "activelocks", r->activelocks);
7494 ndr_print_uint32(ndr, "numreqbufs", r->numreqbufs);
7495 ndr_print_uint32(ndr, "sizereqbufs", r->sizereqbufs);
7496 ndr_print_uint32(ndr, "numbigbufs", r->numbigbufs);
7497 ndr_print_uint32(ndr, "numfiletasks", r->numfiletasks);
7498 ndr_print_uint32(ndr, "alertsched", r->alertsched);
7499 ndr_print_uint32(ndr, "erroralert", r->erroralert);
7500 ndr_print_uint32(ndr, "logonalert", r->logonalert);
7501 ndr_print_uint32(ndr, "accessalert", r->accessalert);
7502 ndr_print_uint32(ndr, "diskalert", r->diskalert);
7503 ndr_print_uint32(ndr, "netioalert", r->netioalert);
7504 ndr_print_uint32(ndr, "maxaudits", r->maxaudits);
7505 ndr_print_ptr(ndr, "srvheuristics", r->srvheuristics);
7506 ndr->depth++;
7507 if (r->srvheuristics) {
7508 ndr_print_string(ndr, "srvheuristics", r->srvheuristics);
7510 ndr->depth--;
7511 ndr_print_uint32(ndr, "auditedevents", r->auditedevents);
7512 ndr_print_uint32(ndr, "auditprofile", r->auditprofile);
7513 ndr_print_ptr(ndr, "autopath", r->autopath);
7514 ndr->depth++;
7515 if (r->autopath) {
7516 ndr_print_string(ndr, "autopath", r->autopath);
7518 ndr->depth--;
7519 ndr->depth--;
7522 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo502 *r)
7524 if (ndr_flags & NDR_SCALARS) {
7525 NDR_CHECK(ndr_push_align(ndr, 4));
7526 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessopen));
7527 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sesssvc));
7528 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->opensearch));
7529 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sizereqbufs));
7530 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initworkitems));
7531 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxworkitems));
7532 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rawworkitems));
7533 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->irpstacksize));
7534 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxrawbuflen));
7535 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessusers));
7536 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessconns));
7537 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxpagedmemoryusage));
7538 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxnonpagedmemoryusage));
7539 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesoftcompat));
7540 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableforcedlogoff));
7541 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timesource));
7542 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->acceptdownlevelapis));
7543 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lmannounce));
7544 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
7546 if (ndr_flags & NDR_BUFFERS) {
7548 return NDR_ERR_SUCCESS;
7551 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo502 *r)
7553 if (ndr_flags & NDR_SCALARS) {
7554 NDR_CHECK(ndr_pull_align(ndr, 4));
7555 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessopen));
7556 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sesssvc));
7557 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->opensearch));
7558 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sizereqbufs));
7559 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initworkitems));
7560 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxworkitems));
7561 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rawworkitems));
7562 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->irpstacksize));
7563 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxrawbuflen));
7564 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessusers));
7565 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessconns));
7566 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxpagedmemoryusage));
7567 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxnonpagedmemoryusage));
7568 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesoftcompat));
7569 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableforcedlogoff));
7570 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timesource));
7571 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->acceptdownlevelapis));
7572 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lmannounce));
7573 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
7575 if (ndr_flags & NDR_BUFFERS) {
7577 return NDR_ERR_SUCCESS;
7580 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo502 *r)
7582 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo502");
7583 ndr->depth++;
7584 ndr_print_uint32(ndr, "sessopen", r->sessopen);
7585 ndr_print_uint32(ndr, "sesssvc", r->sesssvc);
7586 ndr_print_uint32(ndr, "opensearch", r->opensearch);
7587 ndr_print_uint32(ndr, "sizereqbufs", r->sizereqbufs);
7588 ndr_print_uint32(ndr, "initworkitems", r->initworkitems);
7589 ndr_print_uint32(ndr, "maxworkitems", r->maxworkitems);
7590 ndr_print_uint32(ndr, "rawworkitems", r->rawworkitems);
7591 ndr_print_uint32(ndr, "irpstacksize", r->irpstacksize);
7592 ndr_print_uint32(ndr, "maxrawbuflen", r->maxrawbuflen);
7593 ndr_print_uint32(ndr, "sessusers", r->sessusers);
7594 ndr_print_uint32(ndr, "sessconns", r->sessconns);
7595 ndr_print_uint32(ndr, "maxpagedmemoryusage", r->maxpagedmemoryusage);
7596 ndr_print_uint32(ndr, "maxnonpagedmemoryusage", r->maxnonpagedmemoryusage);
7597 ndr_print_uint32(ndr, "enablesoftcompat", r->enablesoftcompat);
7598 ndr_print_uint32(ndr, "enableforcedlogoff", r->enableforcedlogoff);
7599 ndr_print_uint32(ndr, "timesource", r->timesource);
7600 ndr_print_uint32(ndr, "acceptdownlevelapis", r->acceptdownlevelapis);
7601 ndr_print_uint32(ndr, "lmannounce", r->lmannounce);
7602 ndr->depth--;
7605 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo503(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo503 *r)
7607 if (ndr_flags & NDR_SCALARS) {
7608 NDR_CHECK(ndr_push_align(ndr, 5));
7609 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessopen));
7610 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sesssvc));
7611 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->opensearch));
7612 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sizereqbufs));
7613 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initworkitems));
7614 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxworkitems));
7615 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rawworkitems));
7616 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->irpstacksize));
7617 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxrawbuflen));
7618 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessusers));
7619 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessconns));
7620 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxpagedmemoryusage));
7621 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxnonpagedmemoryusage));
7622 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesoftcompat));
7623 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableforcedlogoff));
7624 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timesource));
7625 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->acceptdownlevelapis));
7626 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lmannounce));
7627 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
7628 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxcopyreadlen));
7629 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxcopywritelen));
7630 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minkeepsearch));
7631 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxkeepsearch));
7632 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minkeepcomplsearch));
7633 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxkeepcomplsearch));
7634 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->threadcountadd));
7635 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numlockthreads));
7636 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->scavtimeout));
7637 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minrcvqueue));
7638 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minfreeworkitems));
7639 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->xactmemsize));
7640 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->threadpriority));
7641 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxmpxct));
7642 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->oplockbreakwait));
7643 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->oplockbreakresponsewait));
7644 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableoplocks));
7645 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableoplockforceclose));
7646 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablefcbopens));
7647 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableraw));
7648 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesharednetdrives));
7649 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minfreeconnections));
7650 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxfreeconnections));
7651 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
7653 if (ndr_flags & NDR_BUFFERS) {
7654 if (r->domain) {
7655 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
7656 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7657 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
7658 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7661 return NDR_ERR_SUCCESS;
7664 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo503(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo503 *r)
7666 uint32_t _ptr_domain;
7667 uint32_t size_domain_1 = 0;
7668 uint32_t length_domain_1 = 0;
7669 TALLOC_CTX *_mem_save_domain_0;
7670 if (ndr_flags & NDR_SCALARS) {
7671 NDR_CHECK(ndr_pull_align(ndr, 5));
7672 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessopen));
7673 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sesssvc));
7674 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->opensearch));
7675 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sizereqbufs));
7676 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initworkitems));
7677 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxworkitems));
7678 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rawworkitems));
7679 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->irpstacksize));
7680 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxrawbuflen));
7681 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessusers));
7682 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessconns));
7683 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxpagedmemoryusage));
7684 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxnonpagedmemoryusage));
7685 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesoftcompat));
7686 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableforcedlogoff));
7687 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timesource));
7688 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->acceptdownlevelapis));
7689 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lmannounce));
7690 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
7691 if (_ptr_domain) {
7692 NDR_PULL_ALLOC(ndr, r->domain);
7693 } else {
7694 r->domain = NULL;
7696 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxcopyreadlen));
7697 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxcopywritelen));
7698 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minkeepsearch));
7699 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxkeepsearch));
7700 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minkeepcomplsearch));
7701 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxkeepcomplsearch));
7702 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->threadcountadd));
7703 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numlockthreads));
7704 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->scavtimeout));
7705 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minrcvqueue));
7706 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minfreeworkitems));
7707 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->xactmemsize));
7708 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->threadpriority));
7709 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxmpxct));
7710 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->oplockbreakwait));
7711 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->oplockbreakresponsewait));
7712 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableoplocks));
7713 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableoplockforceclose));
7714 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablefcbopens));
7715 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableraw));
7716 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesharednetdrives));
7717 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minfreeconnections));
7718 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxfreeconnections));
7719 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
7721 if (ndr_flags & NDR_BUFFERS) {
7722 if (r->domain) {
7723 _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
7724 NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
7725 NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
7726 NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
7727 size_domain_1 = ndr_get_array_size(ndr, &r->domain);
7728 length_domain_1 = ndr_get_array_length(ndr, &r->domain);
7729 if (length_domain_1 > size_domain_1) {
7730 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_domain_1, length_domain_1);
7732 NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_1, sizeof(uint16_t)));
7733 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, length_domain_1, sizeof(uint16_t), CH_UTF16));
7734 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
7737 return NDR_ERR_SUCCESS;
7740 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo503(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo503 *r)
7742 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo503");
7743 ndr->depth++;
7744 ndr_print_uint32(ndr, "sessopen", r->sessopen);
7745 ndr_print_uint32(ndr, "sesssvc", r->sesssvc);
7746 ndr_print_uint32(ndr, "opensearch", r->opensearch);
7747 ndr_print_uint32(ndr, "sizereqbufs", r->sizereqbufs);
7748 ndr_print_uint32(ndr, "initworkitems", r->initworkitems);
7749 ndr_print_uint32(ndr, "maxworkitems", r->maxworkitems);
7750 ndr_print_uint32(ndr, "rawworkitems", r->rawworkitems);
7751 ndr_print_uint32(ndr, "irpstacksize", r->irpstacksize);
7752 ndr_print_uint32(ndr, "maxrawbuflen", r->maxrawbuflen);
7753 ndr_print_uint32(ndr, "sessusers", r->sessusers);
7754 ndr_print_uint32(ndr, "sessconns", r->sessconns);
7755 ndr_print_uint32(ndr, "maxpagedmemoryusage", r->maxpagedmemoryusage);
7756 ndr_print_uint32(ndr, "maxnonpagedmemoryusage", r->maxnonpagedmemoryusage);
7757 ndr_print_uint32(ndr, "enablesoftcompat", r->enablesoftcompat);
7758 ndr_print_uint32(ndr, "enableforcedlogoff", r->enableforcedlogoff);
7759 ndr_print_uint32(ndr, "timesource", r->timesource);
7760 ndr_print_uint32(ndr, "acceptdownlevelapis", r->acceptdownlevelapis);
7761 ndr_print_uint32(ndr, "lmannounce", r->lmannounce);
7762 ndr_print_ptr(ndr, "domain", r->domain);
7763 ndr->depth++;
7764 if (r->domain) {
7765 ndr_print_string(ndr, "domain", r->domain);
7767 ndr->depth--;
7768 ndr_print_uint32(ndr, "maxcopyreadlen", r->maxcopyreadlen);
7769 ndr_print_uint32(ndr, "maxcopywritelen", r->maxcopywritelen);
7770 ndr_print_uint32(ndr, "minkeepsearch", r->minkeepsearch);
7771 ndr_print_uint32(ndr, "maxkeepsearch", r->maxkeepsearch);
7772 ndr_print_uint32(ndr, "minkeepcomplsearch", r->minkeepcomplsearch);
7773 ndr_print_uint32(ndr, "maxkeepcomplsearch", r->maxkeepcomplsearch);
7774 ndr_print_uint32(ndr, "threadcountadd", r->threadcountadd);
7775 ndr_print_uint32(ndr, "numlockthreads", r->numlockthreads);
7776 ndr_print_uint32(ndr, "scavtimeout", r->scavtimeout);
7777 ndr_print_uint32(ndr, "minrcvqueue", r->minrcvqueue);
7778 ndr_print_uint32(ndr, "minfreeworkitems", r->minfreeworkitems);
7779 ndr_print_uint32(ndr, "xactmemsize", r->xactmemsize);
7780 ndr_print_uint32(ndr, "threadpriority", r->threadpriority);
7781 ndr_print_uint32(ndr, "maxmpxct", r->maxmpxct);
7782 ndr_print_uint32(ndr, "oplockbreakwait", r->oplockbreakwait);
7783 ndr_print_uint32(ndr, "oplockbreakresponsewait", r->oplockbreakresponsewait);
7784 ndr_print_uint32(ndr, "enableoplocks", r->enableoplocks);
7785 ndr_print_uint32(ndr, "enableoplockforceclose", r->enableoplockforceclose);
7786 ndr_print_uint32(ndr, "enablefcbopens", r->enablefcbopens);
7787 ndr_print_uint32(ndr, "enableraw", r->enableraw);
7788 ndr_print_uint32(ndr, "enablesharednetdrives", r->enablesharednetdrives);
7789 ndr_print_uint32(ndr, "minfreeconnections", r->minfreeconnections);
7790 ndr_print_uint32(ndr, "maxfreeconnections", r->maxfreeconnections);
7791 ndr->depth--;
7794 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo599(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo599 *r)
7796 if (ndr_flags & NDR_SCALARS) {
7797 NDR_CHECK(ndr_push_align(ndr, 5));
7798 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessopen));
7799 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sesssvc));
7800 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->opensearch));
7801 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sizereqbufs));
7802 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initworkitems));
7803 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxworkitems));
7804 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rawworkitems));
7805 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->irpstacksize));
7806 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxrawbuflen));
7807 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessusers));
7808 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessconns));
7809 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxpagedmemoryusage));
7810 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxnonpagedmemoryusage));
7811 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesoftcompat));
7812 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableforcedlogoff));
7813 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timesource));
7814 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->acceptdownlevelapis));
7815 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lmannounce));
7816 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
7817 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxcopyreadlen));
7818 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxcopywritelen));
7819 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minkeepsearch));
7820 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minkeepcomplsearch));
7821 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxkeepcomplsearch));
7822 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->threadcountadd));
7823 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numlockthreads));
7824 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->scavtimeout));
7825 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minrcvqueue));
7826 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minfreeworkitems));
7827 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->xactmemsize));
7828 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->threadpriority));
7829 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxmpxct));
7830 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->oplockbreakwait));
7831 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->oplockbreakresponsewait));
7832 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableoplocks));
7833 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableoplockforceclose));
7834 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablefcbopens));
7835 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableraw));
7836 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesharednetdrives));
7837 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minfreeconnections));
7838 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxfreeconnections));
7839 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initsesstable));
7840 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initconntable));
7841 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initfiletable));
7842 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initsearchtable));
7843 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->alertsched));
7844 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->errortreshold));
7845 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->networkerrortreshold));
7846 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->diskspacetreshold));
7847 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
7848 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxlinkdelay));
7849 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minlinkthroughput));
7850 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->linkinfovalidtime));
7851 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->scavqosinfoupdatetime));
7852 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxworkitemidletime));
7853 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
7855 if (ndr_flags & NDR_BUFFERS) {
7856 if (r->domain) {
7857 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
7858 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7859 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
7860 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7863 return NDR_ERR_SUCCESS;
7866 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo599(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo599 *r)
7868 uint32_t _ptr_domain;
7869 uint32_t size_domain_1 = 0;
7870 uint32_t length_domain_1 = 0;
7871 TALLOC_CTX *_mem_save_domain_0;
7872 if (ndr_flags & NDR_SCALARS) {
7873 NDR_CHECK(ndr_pull_align(ndr, 5));
7874 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessopen));
7875 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sesssvc));
7876 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->opensearch));
7877 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sizereqbufs));
7878 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initworkitems));
7879 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxworkitems));
7880 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rawworkitems));
7881 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->irpstacksize));
7882 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxrawbuflen));
7883 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessusers));
7884 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessconns));
7885 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxpagedmemoryusage));
7886 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxnonpagedmemoryusage));
7887 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesoftcompat));
7888 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableforcedlogoff));
7889 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timesource));
7890 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->acceptdownlevelapis));
7891 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lmannounce));
7892 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
7893 if (_ptr_domain) {
7894 NDR_PULL_ALLOC(ndr, r->domain);
7895 } else {
7896 r->domain = NULL;
7898 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxcopyreadlen));
7899 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxcopywritelen));
7900 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minkeepsearch));
7901 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minkeepcomplsearch));
7902 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxkeepcomplsearch));
7903 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->threadcountadd));
7904 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numlockthreads));
7905 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->scavtimeout));
7906 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minrcvqueue));
7907 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minfreeworkitems));
7908 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->xactmemsize));
7909 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->threadpriority));
7910 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxmpxct));
7911 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->oplockbreakwait));
7912 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->oplockbreakresponsewait));
7913 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableoplocks));
7914 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableoplockforceclose));
7915 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablefcbopens));
7916 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableraw));
7917 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesharednetdrives));
7918 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minfreeconnections));
7919 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxfreeconnections));
7920 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initsesstable));
7921 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initconntable));
7922 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initfiletable));
7923 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initsearchtable));
7924 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->alertsched));
7925 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->errortreshold));
7926 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->networkerrortreshold));
7927 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->diskspacetreshold));
7928 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
7929 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxlinkdelay));
7930 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minlinkthroughput));
7931 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->linkinfovalidtime));
7932 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->scavqosinfoupdatetime));
7933 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxworkitemidletime));
7934 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
7936 if (ndr_flags & NDR_BUFFERS) {
7937 if (r->domain) {
7938 _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
7939 NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
7940 NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
7941 NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
7942 size_domain_1 = ndr_get_array_size(ndr, &r->domain);
7943 length_domain_1 = ndr_get_array_length(ndr, &r->domain);
7944 if (length_domain_1 > size_domain_1) {
7945 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_domain_1, length_domain_1);
7947 NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_1, sizeof(uint16_t)));
7948 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, length_domain_1, sizeof(uint16_t), CH_UTF16));
7949 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
7952 return NDR_ERR_SUCCESS;
7955 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo599(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo599 *r)
7957 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo599");
7958 ndr->depth++;
7959 ndr_print_uint32(ndr, "sessopen", r->sessopen);
7960 ndr_print_uint32(ndr, "sesssvc", r->sesssvc);
7961 ndr_print_uint32(ndr, "opensearch", r->opensearch);
7962 ndr_print_uint32(ndr, "sizereqbufs", r->sizereqbufs);
7963 ndr_print_uint32(ndr, "initworkitems", r->initworkitems);
7964 ndr_print_uint32(ndr, "maxworkitems", r->maxworkitems);
7965 ndr_print_uint32(ndr, "rawworkitems", r->rawworkitems);
7966 ndr_print_uint32(ndr, "irpstacksize", r->irpstacksize);
7967 ndr_print_uint32(ndr, "maxrawbuflen", r->maxrawbuflen);
7968 ndr_print_uint32(ndr, "sessusers", r->sessusers);
7969 ndr_print_uint32(ndr, "sessconns", r->sessconns);
7970 ndr_print_uint32(ndr, "maxpagedmemoryusage", r->maxpagedmemoryusage);
7971 ndr_print_uint32(ndr, "maxnonpagedmemoryusage", r->maxnonpagedmemoryusage);
7972 ndr_print_uint32(ndr, "enablesoftcompat", r->enablesoftcompat);
7973 ndr_print_uint32(ndr, "enableforcedlogoff", r->enableforcedlogoff);
7974 ndr_print_uint32(ndr, "timesource", r->timesource);
7975 ndr_print_uint32(ndr, "acceptdownlevelapis", r->acceptdownlevelapis);
7976 ndr_print_uint32(ndr, "lmannounce", r->lmannounce);
7977 ndr_print_ptr(ndr, "domain", r->domain);
7978 ndr->depth++;
7979 if (r->domain) {
7980 ndr_print_string(ndr, "domain", r->domain);
7982 ndr->depth--;
7983 ndr_print_uint32(ndr, "maxcopyreadlen", r->maxcopyreadlen);
7984 ndr_print_uint32(ndr, "maxcopywritelen", r->maxcopywritelen);
7985 ndr_print_uint32(ndr, "minkeepsearch", r->minkeepsearch);
7986 ndr_print_uint32(ndr, "minkeepcomplsearch", r->minkeepcomplsearch);
7987 ndr_print_uint32(ndr, "maxkeepcomplsearch", r->maxkeepcomplsearch);
7988 ndr_print_uint32(ndr, "threadcountadd", r->threadcountadd);
7989 ndr_print_uint32(ndr, "numlockthreads", r->numlockthreads);
7990 ndr_print_uint32(ndr, "scavtimeout", r->scavtimeout);
7991 ndr_print_uint32(ndr, "minrcvqueue", r->minrcvqueue);
7992 ndr_print_uint32(ndr, "minfreeworkitems", r->minfreeworkitems);
7993 ndr_print_uint32(ndr, "xactmemsize", r->xactmemsize);
7994 ndr_print_uint32(ndr, "threadpriority", r->threadpriority);
7995 ndr_print_uint32(ndr, "maxmpxct", r->maxmpxct);
7996 ndr_print_uint32(ndr, "oplockbreakwait", r->oplockbreakwait);
7997 ndr_print_uint32(ndr, "oplockbreakresponsewait", r->oplockbreakresponsewait);
7998 ndr_print_uint32(ndr, "enableoplocks", r->enableoplocks);
7999 ndr_print_uint32(ndr, "enableoplockforceclose", r->enableoplockforceclose);
8000 ndr_print_uint32(ndr, "enablefcbopens", r->enablefcbopens);
8001 ndr_print_uint32(ndr, "enableraw", r->enableraw);
8002 ndr_print_uint32(ndr, "enablesharednetdrives", r->enablesharednetdrives);
8003 ndr_print_uint32(ndr, "minfreeconnections", r->minfreeconnections);
8004 ndr_print_uint32(ndr, "maxfreeconnections", r->maxfreeconnections);
8005 ndr_print_uint32(ndr, "initsesstable", r->initsesstable);
8006 ndr_print_uint32(ndr, "initconntable", r->initconntable);
8007 ndr_print_uint32(ndr, "initfiletable", r->initfiletable);
8008 ndr_print_uint32(ndr, "initsearchtable", r->initsearchtable);
8009 ndr_print_uint32(ndr, "alertsched", r->alertsched);
8010 ndr_print_uint32(ndr, "errortreshold", r->errortreshold);
8011 ndr_print_uint32(ndr, "networkerrortreshold", r->networkerrortreshold);
8012 ndr_print_uint32(ndr, "diskspacetreshold", r->diskspacetreshold);
8013 ndr_print_uint32(ndr, "reserved", r->reserved);
8014 ndr_print_uint32(ndr, "maxlinkdelay", r->maxlinkdelay);
8015 ndr_print_uint32(ndr, "minlinkthroughput", r->minlinkthroughput);
8016 ndr_print_uint32(ndr, "linkinfovalidtime", r->linkinfovalidtime);
8017 ndr_print_uint32(ndr, "scavqosinfoupdatetime", r->scavqosinfoupdatetime);
8018 ndr_print_uint32(ndr, "maxworkitemidletime", r->maxworkitemidletime);
8019 ndr->depth--;
8022 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1005(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1005 *r)
8024 if (ndr_flags & NDR_SCALARS) {
8025 NDR_CHECK(ndr_push_align(ndr, 5));
8026 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
8027 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
8029 if (ndr_flags & NDR_BUFFERS) {
8030 if (r->comment) {
8031 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
8032 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
8033 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
8034 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
8037 return NDR_ERR_SUCCESS;
8040 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1005(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1005 *r)
8042 uint32_t _ptr_comment;
8043 uint32_t size_comment_1 = 0;
8044 uint32_t length_comment_1 = 0;
8045 TALLOC_CTX *_mem_save_comment_0;
8046 if (ndr_flags & NDR_SCALARS) {
8047 NDR_CHECK(ndr_pull_align(ndr, 5));
8048 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
8049 if (_ptr_comment) {
8050 NDR_PULL_ALLOC(ndr, r->comment);
8051 } else {
8052 r->comment = NULL;
8054 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
8056 if (ndr_flags & NDR_BUFFERS) {
8057 if (r->comment) {
8058 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
8059 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
8060 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
8061 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
8062 size_comment_1 = ndr_get_array_size(ndr, &r->comment);
8063 length_comment_1 = ndr_get_array_length(ndr, &r->comment);
8064 if (length_comment_1 > size_comment_1) {
8065 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_comment_1, length_comment_1);
8067 NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_1, sizeof(uint16_t)));
8068 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, length_comment_1, sizeof(uint16_t), CH_UTF16));
8069 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
8072 return NDR_ERR_SUCCESS;
8075 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1005(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1005 *r)
8077 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1005");
8078 ndr->depth++;
8079 ndr_print_ptr(ndr, "comment", r->comment);
8080 ndr->depth++;
8081 if (r->comment) {
8082 ndr_print_string(ndr, "comment", r->comment);
8084 ndr->depth--;
8085 ndr->depth--;
8088 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1010(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1010 *r)
8090 if (ndr_flags & NDR_SCALARS) {
8091 NDR_CHECK(ndr_push_align(ndr, 4));
8092 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->disc));
8093 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8095 if (ndr_flags & NDR_BUFFERS) {
8097 return NDR_ERR_SUCCESS;
8100 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1010(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1010 *r)
8102 if (ndr_flags & NDR_SCALARS) {
8103 NDR_CHECK(ndr_pull_align(ndr, 4));
8104 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->disc));
8105 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8107 if (ndr_flags & NDR_BUFFERS) {
8109 return NDR_ERR_SUCCESS;
8112 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1010(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1010 *r)
8114 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1010");
8115 ndr->depth++;
8116 ndr_print_uint32(ndr, "disc", r->disc);
8117 ndr->depth--;
8120 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1016(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1016 *r)
8122 if (ndr_flags & NDR_SCALARS) {
8123 NDR_CHECK(ndr_push_align(ndr, 4));
8124 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->hidden));
8125 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8127 if (ndr_flags & NDR_BUFFERS) {
8129 return NDR_ERR_SUCCESS;
8132 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1016(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1016 *r)
8134 if (ndr_flags & NDR_SCALARS) {
8135 NDR_CHECK(ndr_pull_align(ndr, 4));
8136 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->hidden));
8137 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8139 if (ndr_flags & NDR_BUFFERS) {
8141 return NDR_ERR_SUCCESS;
8144 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1016(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1016 *r)
8146 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1016");
8147 ndr->depth++;
8148 ndr_print_uint32(ndr, "hidden", r->hidden);
8149 ndr->depth--;
8152 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1017(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1017 *r)
8154 if (ndr_flags & NDR_SCALARS) {
8155 NDR_CHECK(ndr_push_align(ndr, 4));
8156 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->announce));
8157 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8159 if (ndr_flags & NDR_BUFFERS) {
8161 return NDR_ERR_SUCCESS;
8164 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1017(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1017 *r)
8166 if (ndr_flags & NDR_SCALARS) {
8167 NDR_CHECK(ndr_pull_align(ndr, 4));
8168 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->announce));
8169 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8171 if (ndr_flags & NDR_BUFFERS) {
8173 return NDR_ERR_SUCCESS;
8176 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1017(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1017 *r)
8178 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1017");
8179 ndr->depth++;
8180 ndr_print_uint32(ndr, "announce", r->announce);
8181 ndr->depth--;
8184 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1018(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1018 *r)
8186 if (ndr_flags & NDR_SCALARS) {
8187 NDR_CHECK(ndr_push_align(ndr, 4));
8188 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->anndelta));
8189 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8191 if (ndr_flags & NDR_BUFFERS) {
8193 return NDR_ERR_SUCCESS;
8196 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1018(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1018 *r)
8198 if (ndr_flags & NDR_SCALARS) {
8199 NDR_CHECK(ndr_pull_align(ndr, 4));
8200 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->anndelta));
8201 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8203 if (ndr_flags & NDR_BUFFERS) {
8205 return NDR_ERR_SUCCESS;
8208 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1018(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1018 *r)
8210 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1018");
8211 ndr->depth++;
8212 ndr_print_uint32(ndr, "anndelta", r->anndelta);
8213 ndr->depth--;
8216 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1107(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1107 *r)
8218 if (ndr_flags & NDR_SCALARS) {
8219 NDR_CHECK(ndr_push_align(ndr, 4));
8220 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->users));
8221 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8223 if (ndr_flags & NDR_BUFFERS) {
8225 return NDR_ERR_SUCCESS;
8228 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1107(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1107 *r)
8230 if (ndr_flags & NDR_SCALARS) {
8231 NDR_CHECK(ndr_pull_align(ndr, 4));
8232 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->users));
8233 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8235 if (ndr_flags & NDR_BUFFERS) {
8237 return NDR_ERR_SUCCESS;
8240 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1107(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1107 *r)
8242 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1107");
8243 ndr->depth++;
8244 ndr_print_uint32(ndr, "users", r->users);
8245 ndr->depth--;
8248 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1501(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1501 *r)
8250 if (ndr_flags & NDR_SCALARS) {
8251 NDR_CHECK(ndr_push_align(ndr, 4));
8252 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessopens));
8253 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8255 if (ndr_flags & NDR_BUFFERS) {
8257 return NDR_ERR_SUCCESS;
8260 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1501(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1501 *r)
8262 if (ndr_flags & NDR_SCALARS) {
8263 NDR_CHECK(ndr_pull_align(ndr, 4));
8264 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessopens));
8265 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8267 if (ndr_flags & NDR_BUFFERS) {
8269 return NDR_ERR_SUCCESS;
8272 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1501(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1501 *r)
8274 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1501");
8275 ndr->depth++;
8276 ndr_print_uint32(ndr, "sessopens", r->sessopens);
8277 ndr->depth--;
8280 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1502 *r)
8282 if (ndr_flags & NDR_SCALARS) {
8283 NDR_CHECK(ndr_push_align(ndr, 4));
8284 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessvcs));
8285 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8287 if (ndr_flags & NDR_BUFFERS) {
8289 return NDR_ERR_SUCCESS;
8292 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1502 *r)
8294 if (ndr_flags & NDR_SCALARS) {
8295 NDR_CHECK(ndr_pull_align(ndr, 4));
8296 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessvcs));
8297 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8299 if (ndr_flags & NDR_BUFFERS) {
8301 return NDR_ERR_SUCCESS;
8304 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1502 *r)
8306 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1502");
8307 ndr->depth++;
8308 ndr_print_uint32(ndr, "sessvcs", r->sessvcs);
8309 ndr->depth--;
8312 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1503(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1503 *r)
8314 if (ndr_flags & NDR_SCALARS) {
8315 NDR_CHECK(ndr_push_align(ndr, 4));
8316 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->opensearch));
8317 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8319 if (ndr_flags & NDR_BUFFERS) {
8321 return NDR_ERR_SUCCESS;
8324 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1503(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1503 *r)
8326 if (ndr_flags & NDR_SCALARS) {
8327 NDR_CHECK(ndr_pull_align(ndr, 4));
8328 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->opensearch));
8329 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8331 if (ndr_flags & NDR_BUFFERS) {
8333 return NDR_ERR_SUCCESS;
8336 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1503(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1503 *r)
8338 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1503");
8339 ndr->depth++;
8340 ndr_print_uint32(ndr, "opensearch", r->opensearch);
8341 ndr->depth--;
8344 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1506(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1506 *r)
8346 if (ndr_flags & NDR_SCALARS) {
8347 NDR_CHECK(ndr_push_align(ndr, 4));
8348 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxworkitems));
8349 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8351 if (ndr_flags & NDR_BUFFERS) {
8353 return NDR_ERR_SUCCESS;
8356 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1506(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1506 *r)
8358 if (ndr_flags & NDR_SCALARS) {
8359 NDR_CHECK(ndr_pull_align(ndr, 4));
8360 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxworkitems));
8361 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8363 if (ndr_flags & NDR_BUFFERS) {
8365 return NDR_ERR_SUCCESS;
8368 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1506(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1506 *r)
8370 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1506");
8371 ndr->depth++;
8372 ndr_print_uint32(ndr, "maxworkitems", r->maxworkitems);
8373 ndr->depth--;
8376 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1509(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1509 *r)
8378 if (ndr_flags & NDR_SCALARS) {
8379 NDR_CHECK(ndr_push_align(ndr, 4));
8380 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxrawbuflen));
8381 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8383 if (ndr_flags & NDR_BUFFERS) {
8385 return NDR_ERR_SUCCESS;
8388 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1509(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1509 *r)
8390 if (ndr_flags & NDR_SCALARS) {
8391 NDR_CHECK(ndr_pull_align(ndr, 4));
8392 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxrawbuflen));
8393 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8395 if (ndr_flags & NDR_BUFFERS) {
8397 return NDR_ERR_SUCCESS;
8400 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1509(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1509 *r)
8402 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1509");
8403 ndr->depth++;
8404 ndr_print_uint32(ndr, "maxrawbuflen", r->maxrawbuflen);
8405 ndr->depth--;
8408 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1510(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1510 *r)
8410 if (ndr_flags & NDR_SCALARS) {
8411 NDR_CHECK(ndr_push_align(ndr, 4));
8412 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessusers));
8413 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8415 if (ndr_flags & NDR_BUFFERS) {
8417 return NDR_ERR_SUCCESS;
8420 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1510(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1510 *r)
8422 if (ndr_flags & NDR_SCALARS) {
8423 NDR_CHECK(ndr_pull_align(ndr, 4));
8424 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessusers));
8425 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8427 if (ndr_flags & NDR_BUFFERS) {
8429 return NDR_ERR_SUCCESS;
8432 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1510(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1510 *r)
8434 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1510");
8435 ndr->depth++;
8436 ndr_print_uint32(ndr, "sessusers", r->sessusers);
8437 ndr->depth--;
8440 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1511(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1511 *r)
8442 if (ndr_flags & NDR_SCALARS) {
8443 NDR_CHECK(ndr_push_align(ndr, 4));
8444 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sesscons));
8445 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8447 if (ndr_flags & NDR_BUFFERS) {
8449 return NDR_ERR_SUCCESS;
8452 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1511(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1511 *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->sesscons));
8457 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8459 if (ndr_flags & NDR_BUFFERS) {
8461 return NDR_ERR_SUCCESS;
8464 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1511(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1511 *r)
8466 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1511");
8467 ndr->depth++;
8468 ndr_print_uint32(ndr, "sesscons", r->sesscons);
8469 ndr->depth--;
8472 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1512(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1512 *r)
8474 if (ndr_flags & NDR_SCALARS) {
8475 NDR_CHECK(ndr_push_align(ndr, 4));
8476 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxnonpagedmemoryusage));
8477 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8479 if (ndr_flags & NDR_BUFFERS) {
8481 return NDR_ERR_SUCCESS;
8484 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1512(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1512 *r)
8486 if (ndr_flags & NDR_SCALARS) {
8487 NDR_CHECK(ndr_pull_align(ndr, 4));
8488 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxnonpagedmemoryusage));
8489 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8491 if (ndr_flags & NDR_BUFFERS) {
8493 return NDR_ERR_SUCCESS;
8496 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1512(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1512 *r)
8498 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1512");
8499 ndr->depth++;
8500 ndr_print_uint32(ndr, "maxnonpagedmemoryusage", r->maxnonpagedmemoryusage);
8501 ndr->depth--;
8504 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1513(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1513 *r)
8506 if (ndr_flags & NDR_SCALARS) {
8507 NDR_CHECK(ndr_push_align(ndr, 4));
8508 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxpagedmemoryusage));
8509 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8511 if (ndr_flags & NDR_BUFFERS) {
8513 return NDR_ERR_SUCCESS;
8516 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1513(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1513 *r)
8518 if (ndr_flags & NDR_SCALARS) {
8519 NDR_CHECK(ndr_pull_align(ndr, 4));
8520 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxpagedmemoryusage));
8521 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8523 if (ndr_flags & NDR_BUFFERS) {
8525 return NDR_ERR_SUCCESS;
8528 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1513(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1513 *r)
8530 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1513");
8531 ndr->depth++;
8532 ndr_print_uint32(ndr, "maxpagedmemoryusage", r->maxpagedmemoryusage);
8533 ndr->depth--;
8536 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1514(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1514 *r)
8538 if (ndr_flags & NDR_SCALARS) {
8539 NDR_CHECK(ndr_push_align(ndr, 4));
8540 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesoftcompat));
8541 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8543 if (ndr_flags & NDR_BUFFERS) {
8545 return NDR_ERR_SUCCESS;
8548 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1514(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1514 *r)
8550 if (ndr_flags & NDR_SCALARS) {
8551 NDR_CHECK(ndr_pull_align(ndr, 4));
8552 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesoftcompat));
8553 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8555 if (ndr_flags & NDR_BUFFERS) {
8557 return NDR_ERR_SUCCESS;
8560 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1514(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1514 *r)
8562 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1514");
8563 ndr->depth++;
8564 ndr_print_uint32(ndr, "enablesoftcompat", r->enablesoftcompat);
8565 ndr->depth--;
8568 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1515(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1515 *r)
8570 if (ndr_flags & NDR_SCALARS) {
8571 NDR_CHECK(ndr_push_align(ndr, 4));
8572 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableforcedlogoff));
8573 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8575 if (ndr_flags & NDR_BUFFERS) {
8577 return NDR_ERR_SUCCESS;
8580 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1515(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1515 *r)
8582 if (ndr_flags & NDR_SCALARS) {
8583 NDR_CHECK(ndr_pull_align(ndr, 4));
8584 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableforcedlogoff));
8585 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8587 if (ndr_flags & NDR_BUFFERS) {
8589 return NDR_ERR_SUCCESS;
8592 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1515(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1515 *r)
8594 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1515");
8595 ndr->depth++;
8596 ndr_print_uint32(ndr, "enableforcedlogoff", r->enableforcedlogoff);
8597 ndr->depth--;
8600 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1516(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1516 *r)
8602 if (ndr_flags & NDR_SCALARS) {
8603 NDR_CHECK(ndr_push_align(ndr, 4));
8604 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timesource));
8605 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8607 if (ndr_flags & NDR_BUFFERS) {
8609 return NDR_ERR_SUCCESS;
8612 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1516(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1516 *r)
8614 if (ndr_flags & NDR_SCALARS) {
8615 NDR_CHECK(ndr_pull_align(ndr, 4));
8616 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timesource));
8617 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8619 if (ndr_flags & NDR_BUFFERS) {
8621 return NDR_ERR_SUCCESS;
8624 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1516(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1516 *r)
8626 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1516");
8627 ndr->depth++;
8628 ndr_print_uint32(ndr, "timesource", r->timesource);
8629 ndr->depth--;
8632 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1518(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1518 *r)
8634 if (ndr_flags & NDR_SCALARS) {
8635 NDR_CHECK(ndr_push_align(ndr, 4));
8636 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lmannounce));
8637 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8639 if (ndr_flags & NDR_BUFFERS) {
8641 return NDR_ERR_SUCCESS;
8644 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1518(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1518 *r)
8646 if (ndr_flags & NDR_SCALARS) {
8647 NDR_CHECK(ndr_pull_align(ndr, 4));
8648 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lmannounce));
8649 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8651 if (ndr_flags & NDR_BUFFERS) {
8653 return NDR_ERR_SUCCESS;
8656 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1518(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1518 *r)
8658 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1518");
8659 ndr->depth++;
8660 ndr_print_uint32(ndr, "lmannounce", r->lmannounce);
8661 ndr->depth--;
8664 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1520(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1520 *r)
8666 if (ndr_flags & NDR_SCALARS) {
8667 NDR_CHECK(ndr_push_align(ndr, 4));
8668 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxcopyreadlen));
8669 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8671 if (ndr_flags & NDR_BUFFERS) {
8673 return NDR_ERR_SUCCESS;
8676 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1520(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1520 *r)
8678 if (ndr_flags & NDR_SCALARS) {
8679 NDR_CHECK(ndr_pull_align(ndr, 4));
8680 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxcopyreadlen));
8681 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8683 if (ndr_flags & NDR_BUFFERS) {
8685 return NDR_ERR_SUCCESS;
8688 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1520(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1520 *r)
8690 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1520");
8691 ndr->depth++;
8692 ndr_print_uint32(ndr, "maxcopyreadlen", r->maxcopyreadlen);
8693 ndr->depth--;
8696 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1521(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1521 *r)
8698 if (ndr_flags & NDR_SCALARS) {
8699 NDR_CHECK(ndr_push_align(ndr, 4));
8700 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxcopywritelen));
8701 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8703 if (ndr_flags & NDR_BUFFERS) {
8705 return NDR_ERR_SUCCESS;
8708 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1521(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1521 *r)
8710 if (ndr_flags & NDR_SCALARS) {
8711 NDR_CHECK(ndr_pull_align(ndr, 4));
8712 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxcopywritelen));
8713 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8715 if (ndr_flags & NDR_BUFFERS) {
8717 return NDR_ERR_SUCCESS;
8720 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1521(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1521 *r)
8722 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1521");
8723 ndr->depth++;
8724 ndr_print_uint32(ndr, "maxcopywritelen", r->maxcopywritelen);
8725 ndr->depth--;
8728 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1522(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1522 *r)
8730 if (ndr_flags & NDR_SCALARS) {
8731 NDR_CHECK(ndr_push_align(ndr, 4));
8732 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minkeepsearch));
8733 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8735 if (ndr_flags & NDR_BUFFERS) {
8737 return NDR_ERR_SUCCESS;
8740 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1522(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1522 *r)
8742 if (ndr_flags & NDR_SCALARS) {
8743 NDR_CHECK(ndr_pull_align(ndr, 4));
8744 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minkeepsearch));
8745 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8747 if (ndr_flags & NDR_BUFFERS) {
8749 return NDR_ERR_SUCCESS;
8752 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1522(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1522 *r)
8754 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1522");
8755 ndr->depth++;
8756 ndr_print_uint32(ndr, "minkeepsearch", r->minkeepsearch);
8757 ndr->depth--;
8760 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1523(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1523 *r)
8762 if (ndr_flags & NDR_SCALARS) {
8763 NDR_CHECK(ndr_push_align(ndr, 4));
8764 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxkeepsearch));
8765 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8767 if (ndr_flags & NDR_BUFFERS) {
8769 return NDR_ERR_SUCCESS;
8772 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1523(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1523 *r)
8774 if (ndr_flags & NDR_SCALARS) {
8775 NDR_CHECK(ndr_pull_align(ndr, 4));
8776 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxkeepsearch));
8777 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8779 if (ndr_flags & NDR_BUFFERS) {
8781 return NDR_ERR_SUCCESS;
8784 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1523(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1523 *r)
8786 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1523");
8787 ndr->depth++;
8788 ndr_print_uint32(ndr, "maxkeepsearch", r->maxkeepsearch);
8789 ndr->depth--;
8792 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1524(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1524 *r)
8794 if (ndr_flags & NDR_SCALARS) {
8795 NDR_CHECK(ndr_push_align(ndr, 4));
8796 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minkeepcomplsearch));
8797 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8799 if (ndr_flags & NDR_BUFFERS) {
8801 return NDR_ERR_SUCCESS;
8804 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1524(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1524 *r)
8806 if (ndr_flags & NDR_SCALARS) {
8807 NDR_CHECK(ndr_pull_align(ndr, 4));
8808 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minkeepcomplsearch));
8809 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8811 if (ndr_flags & NDR_BUFFERS) {
8813 return NDR_ERR_SUCCESS;
8816 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1524(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1524 *r)
8818 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1524");
8819 ndr->depth++;
8820 ndr_print_uint32(ndr, "minkeepcomplsearch", r->minkeepcomplsearch);
8821 ndr->depth--;
8824 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1525(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1525 *r)
8826 if (ndr_flags & NDR_SCALARS) {
8827 NDR_CHECK(ndr_push_align(ndr, 4));
8828 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxkeepcomplsearch));
8829 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8831 if (ndr_flags & NDR_BUFFERS) {
8833 return NDR_ERR_SUCCESS;
8836 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1525(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1525 *r)
8838 if (ndr_flags & NDR_SCALARS) {
8839 NDR_CHECK(ndr_pull_align(ndr, 4));
8840 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxkeepcomplsearch));
8841 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8843 if (ndr_flags & NDR_BUFFERS) {
8845 return NDR_ERR_SUCCESS;
8848 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1525(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1525 *r)
8850 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1525");
8851 ndr->depth++;
8852 ndr_print_uint32(ndr, "maxkeepcomplsearch", r->maxkeepcomplsearch);
8853 ndr->depth--;
8856 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1528(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1528 *r)
8858 if (ndr_flags & NDR_SCALARS) {
8859 NDR_CHECK(ndr_push_align(ndr, 4));
8860 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->scavtimeout));
8861 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8863 if (ndr_flags & NDR_BUFFERS) {
8865 return NDR_ERR_SUCCESS;
8868 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1528(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1528 *r)
8870 if (ndr_flags & NDR_SCALARS) {
8871 NDR_CHECK(ndr_pull_align(ndr, 4));
8872 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->scavtimeout));
8873 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8875 if (ndr_flags & NDR_BUFFERS) {
8877 return NDR_ERR_SUCCESS;
8880 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1528(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1528 *r)
8882 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1528");
8883 ndr->depth++;
8884 ndr_print_uint32(ndr, "scavtimeout", r->scavtimeout);
8885 ndr->depth--;
8888 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1529(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1529 *r)
8890 if (ndr_flags & NDR_SCALARS) {
8891 NDR_CHECK(ndr_push_align(ndr, 4));
8892 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minrcvqueue));
8893 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8895 if (ndr_flags & NDR_BUFFERS) {
8897 return NDR_ERR_SUCCESS;
8900 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1529(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1529 *r)
8902 if (ndr_flags & NDR_SCALARS) {
8903 NDR_CHECK(ndr_pull_align(ndr, 4));
8904 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minrcvqueue));
8905 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8907 if (ndr_flags & NDR_BUFFERS) {
8909 return NDR_ERR_SUCCESS;
8912 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1529(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1529 *r)
8914 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1529");
8915 ndr->depth++;
8916 ndr_print_uint32(ndr, "minrcvqueue", r->minrcvqueue);
8917 ndr->depth--;
8920 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1530(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1530 *r)
8922 if (ndr_flags & NDR_SCALARS) {
8923 NDR_CHECK(ndr_push_align(ndr, 4));
8924 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minfreeworkitems));
8925 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8927 if (ndr_flags & NDR_BUFFERS) {
8929 return NDR_ERR_SUCCESS;
8932 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1530(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1530 *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->minfreeworkitems));
8937 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8939 if (ndr_flags & NDR_BUFFERS) {
8941 return NDR_ERR_SUCCESS;
8944 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1530(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1530 *r)
8946 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1530");
8947 ndr->depth++;
8948 ndr_print_uint32(ndr, "minfreeworkitems", r->minfreeworkitems);
8949 ndr->depth--;
8952 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1533(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1533 *r)
8954 if (ndr_flags & NDR_SCALARS) {
8955 NDR_CHECK(ndr_push_align(ndr, 4));
8956 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxmpxct));
8957 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8959 if (ndr_flags & NDR_BUFFERS) {
8961 return NDR_ERR_SUCCESS;
8964 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1533(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1533 *r)
8966 if (ndr_flags & NDR_SCALARS) {
8967 NDR_CHECK(ndr_pull_align(ndr, 4));
8968 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxmpxct));
8969 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8971 if (ndr_flags & NDR_BUFFERS) {
8973 return NDR_ERR_SUCCESS;
8976 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1533(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1533 *r)
8978 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1533");
8979 ndr->depth++;
8980 ndr_print_uint32(ndr, "maxmpxct", r->maxmpxct);
8981 ndr->depth--;
8984 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1534(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1534 *r)
8986 if (ndr_flags & NDR_SCALARS) {
8987 NDR_CHECK(ndr_push_align(ndr, 4));
8988 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->oplockbreakwait));
8989 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8991 if (ndr_flags & NDR_BUFFERS) {
8993 return NDR_ERR_SUCCESS;
8996 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1534(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1534 *r)
8998 if (ndr_flags & NDR_SCALARS) {
8999 NDR_CHECK(ndr_pull_align(ndr, 4));
9000 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->oplockbreakwait));
9001 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
9003 if (ndr_flags & NDR_BUFFERS) {
9005 return NDR_ERR_SUCCESS;
9008 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1534(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1534 *r)
9010 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1534");
9011 ndr->depth++;
9012 ndr_print_uint32(ndr, "oplockbreakwait", r->oplockbreakwait);
9013 ndr->depth--;
9016 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1535(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1535 *r)
9018 if (ndr_flags & NDR_SCALARS) {
9019 NDR_CHECK(ndr_push_align(ndr, 4));
9020 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->oplockbreakresponsewait));
9021 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
9023 if (ndr_flags & NDR_BUFFERS) {
9025 return NDR_ERR_SUCCESS;
9028 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1535(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1535 *r)
9030 if (ndr_flags & NDR_SCALARS) {
9031 NDR_CHECK(ndr_pull_align(ndr, 4));
9032 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->oplockbreakresponsewait));
9033 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
9035 if (ndr_flags & NDR_BUFFERS) {
9037 return NDR_ERR_SUCCESS;
9040 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1535(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1535 *r)
9042 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1535");
9043 ndr->depth++;
9044 ndr_print_uint32(ndr, "oplockbreakresponsewait", r->oplockbreakresponsewait);
9045 ndr->depth--;
9048 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1536(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1536 *r)
9050 if (ndr_flags & NDR_SCALARS) {
9051 NDR_CHECK(ndr_push_align(ndr, 4));
9052 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableoplocks));
9053 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
9055 if (ndr_flags & NDR_BUFFERS) {
9057 return NDR_ERR_SUCCESS;
9060 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1536(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1536 *r)
9062 if (ndr_flags & NDR_SCALARS) {
9063 NDR_CHECK(ndr_pull_align(ndr, 4));
9064 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableoplocks));
9065 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
9067 if (ndr_flags & NDR_BUFFERS) {
9069 return NDR_ERR_SUCCESS;
9072 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1536(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1536 *r)
9074 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1536");
9075 ndr->depth++;
9076 ndr_print_uint32(ndr, "enableoplocks", r->enableoplocks);
9077 ndr->depth--;
9080 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1537(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1537 *r)
9082 if (ndr_flags & NDR_SCALARS) {
9083 NDR_CHECK(ndr_push_align(ndr, 4));
9084 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableoplockforceclose));
9085 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
9087 if (ndr_flags & NDR_BUFFERS) {
9089 return NDR_ERR_SUCCESS;
9092 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1537(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1537 *r)
9094 if (ndr_flags & NDR_SCALARS) {
9095 NDR_CHECK(ndr_pull_align(ndr, 4));
9096 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableoplockforceclose));
9097 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
9099 if (ndr_flags & NDR_BUFFERS) {
9101 return NDR_ERR_SUCCESS;
9104 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1537(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1537 *r)
9106 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1537");
9107 ndr->depth++;
9108 ndr_print_uint32(ndr, "enableoplockforceclose", r->enableoplockforceclose);
9109 ndr->depth--;
9112 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1538(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1538 *r)
9114 if (ndr_flags & NDR_SCALARS) {
9115 NDR_CHECK(ndr_push_align(ndr, 4));
9116 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablefcbopens));
9117 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
9119 if (ndr_flags & NDR_BUFFERS) {
9121 return NDR_ERR_SUCCESS;
9124 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1538(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1538 *r)
9126 if (ndr_flags & NDR_SCALARS) {
9127 NDR_CHECK(ndr_pull_align(ndr, 4));
9128 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablefcbopens));
9129 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
9131 if (ndr_flags & NDR_BUFFERS) {
9133 return NDR_ERR_SUCCESS;
9136 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1538(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1538 *r)
9138 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1538");
9139 ndr->depth++;
9140 ndr_print_uint32(ndr, "enablefcbopens", r->enablefcbopens);
9141 ndr->depth--;
9144 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1539(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1539 *r)
9146 if (ndr_flags & NDR_SCALARS) {
9147 NDR_CHECK(ndr_push_align(ndr, 4));
9148 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableraw));
9149 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
9151 if (ndr_flags & NDR_BUFFERS) {
9153 return NDR_ERR_SUCCESS;
9156 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1539(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1539 *r)
9158 if (ndr_flags & NDR_SCALARS) {
9159 NDR_CHECK(ndr_pull_align(ndr, 4));
9160 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableraw));
9161 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
9163 if (ndr_flags & NDR_BUFFERS) {
9165 return NDR_ERR_SUCCESS;
9168 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1539(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1539 *r)
9170 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1539");
9171 ndr->depth++;
9172 ndr_print_uint32(ndr, "enableraw", r->enableraw);
9173 ndr->depth--;
9176 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1540(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1540 *r)
9178 if (ndr_flags & NDR_SCALARS) {
9179 NDR_CHECK(ndr_push_align(ndr, 4));
9180 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesharednetdrives));
9181 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
9183 if (ndr_flags & NDR_BUFFERS) {
9185 return NDR_ERR_SUCCESS;
9188 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1540(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1540 *r)
9190 if (ndr_flags & NDR_SCALARS) {
9191 NDR_CHECK(ndr_pull_align(ndr, 4));
9192 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesharednetdrives));
9193 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
9195 if (ndr_flags & NDR_BUFFERS) {
9197 return NDR_ERR_SUCCESS;
9200 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1540(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1540 *r)
9202 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1540");
9203 ndr->depth++;
9204 ndr_print_uint32(ndr, "enablesharednetdrives", r->enablesharednetdrives);
9205 ndr->depth--;
9208 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1541(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1541 *r)
9210 if (ndr_flags & NDR_SCALARS) {
9211 NDR_CHECK(ndr_push_align(ndr, 4));
9212 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minfreeconnections));
9213 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
9215 if (ndr_flags & NDR_BUFFERS) {
9217 return NDR_ERR_SUCCESS;
9220 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1541(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1541 *r)
9222 if (ndr_flags & NDR_SCALARS) {
9223 NDR_CHECK(ndr_pull_align(ndr, 4));
9224 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minfreeconnections));
9225 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
9227 if (ndr_flags & NDR_BUFFERS) {
9229 return NDR_ERR_SUCCESS;
9232 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1541(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1541 *r)
9234 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1541");
9235 ndr->depth++;
9236 ndr_print_uint32(ndr, "minfreeconnections", r->minfreeconnections);
9237 ndr->depth--;
9240 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1542(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1542 *r)
9242 if (ndr_flags & NDR_SCALARS) {
9243 NDR_CHECK(ndr_push_align(ndr, 4));
9244 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxfreeconnections));
9245 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
9247 if (ndr_flags & NDR_BUFFERS) {
9249 return NDR_ERR_SUCCESS;
9252 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1542(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1542 *r)
9254 if (ndr_flags & NDR_SCALARS) {
9255 NDR_CHECK(ndr_pull_align(ndr, 4));
9256 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxfreeconnections));
9257 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
9259 if (ndr_flags & NDR_BUFFERS) {
9261 return NDR_ERR_SUCCESS;
9264 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1542(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1542 *r)
9266 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1542");
9267 ndr->depth++;
9268 ndr_print_uint32(ndr, "maxfreeconnections", r->maxfreeconnections);
9269 ndr->depth--;
9272 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1543(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1543 *r)
9274 if (ndr_flags & NDR_SCALARS) {
9275 NDR_CHECK(ndr_push_align(ndr, 4));
9276 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initsesstable));
9277 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
9279 if (ndr_flags & NDR_BUFFERS) {
9281 return NDR_ERR_SUCCESS;
9284 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1543(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1543 *r)
9286 if (ndr_flags & NDR_SCALARS) {
9287 NDR_CHECK(ndr_pull_align(ndr, 4));
9288 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initsesstable));
9289 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
9291 if (ndr_flags & NDR_BUFFERS) {
9293 return NDR_ERR_SUCCESS;
9296 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1543(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1543 *r)
9298 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1543");
9299 ndr->depth++;
9300 ndr_print_uint32(ndr, "initsesstable", r->initsesstable);
9301 ndr->depth--;
9304 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1544(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1544 *r)
9306 if (ndr_flags & NDR_SCALARS) {
9307 NDR_CHECK(ndr_push_align(ndr, 4));
9308 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initconntable));
9309 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
9311 if (ndr_flags & NDR_BUFFERS) {
9313 return NDR_ERR_SUCCESS;
9316 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1544(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1544 *r)
9318 if (ndr_flags & NDR_SCALARS) {
9319 NDR_CHECK(ndr_pull_align(ndr, 4));
9320 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initconntable));
9321 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
9323 if (ndr_flags & NDR_BUFFERS) {
9325 return NDR_ERR_SUCCESS;
9328 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1544(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1544 *r)
9330 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1544");
9331 ndr->depth++;
9332 ndr_print_uint32(ndr, "initconntable", r->initconntable);
9333 ndr->depth--;
9336 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1545(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1545 *r)
9338 if (ndr_flags & NDR_SCALARS) {
9339 NDR_CHECK(ndr_push_align(ndr, 4));
9340 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initfiletable));
9341 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
9343 if (ndr_flags & NDR_BUFFERS) {
9345 return NDR_ERR_SUCCESS;
9348 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1545(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1545 *r)
9350 if (ndr_flags & NDR_SCALARS) {
9351 NDR_CHECK(ndr_pull_align(ndr, 4));
9352 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initfiletable));
9353 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
9355 if (ndr_flags & NDR_BUFFERS) {
9357 return NDR_ERR_SUCCESS;
9360 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1545(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1545 *r)
9362 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1545");
9363 ndr->depth++;
9364 ndr_print_uint32(ndr, "initfiletable", r->initfiletable);
9365 ndr->depth--;
9368 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1546(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1546 *r)
9370 if (ndr_flags & NDR_SCALARS) {
9371 NDR_CHECK(ndr_push_align(ndr, 4));
9372 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initsearchtable));
9373 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
9375 if (ndr_flags & NDR_BUFFERS) {
9377 return NDR_ERR_SUCCESS;
9380 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1546(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1546 *r)
9382 if (ndr_flags & NDR_SCALARS) {
9383 NDR_CHECK(ndr_pull_align(ndr, 4));
9384 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initsearchtable));
9385 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
9387 if (ndr_flags & NDR_BUFFERS) {
9389 return NDR_ERR_SUCCESS;
9392 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1546(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1546 *r)
9394 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1546");
9395 ndr->depth++;
9396 ndr_print_uint32(ndr, "initsearchtable", r->initsearchtable);
9397 ndr->depth--;
9400 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1547(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1547 *r)
9402 if (ndr_flags & NDR_SCALARS) {
9403 NDR_CHECK(ndr_push_align(ndr, 4));
9404 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->alertsched));
9405 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
9407 if (ndr_flags & NDR_BUFFERS) {
9409 return NDR_ERR_SUCCESS;
9412 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1547(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1547 *r)
9414 if (ndr_flags & NDR_SCALARS) {
9415 NDR_CHECK(ndr_pull_align(ndr, 4));
9416 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->alertsched));
9417 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
9419 if (ndr_flags & NDR_BUFFERS) {
9421 return NDR_ERR_SUCCESS;
9424 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1547(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1547 *r)
9426 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1547");
9427 ndr->depth++;
9428 ndr_print_uint32(ndr, "alertsched", r->alertsched);
9429 ndr->depth--;
9432 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1548(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1548 *r)
9434 if (ndr_flags & NDR_SCALARS) {
9435 NDR_CHECK(ndr_push_align(ndr, 4));
9436 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->errortreshold));
9437 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
9439 if (ndr_flags & NDR_BUFFERS) {
9441 return NDR_ERR_SUCCESS;
9444 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1548(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1548 *r)
9446 if (ndr_flags & NDR_SCALARS) {
9447 NDR_CHECK(ndr_pull_align(ndr, 4));
9448 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->errortreshold));
9449 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
9451 if (ndr_flags & NDR_BUFFERS) {
9453 return NDR_ERR_SUCCESS;
9456 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1548(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1548 *r)
9458 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1548");
9459 ndr->depth++;
9460 ndr_print_uint32(ndr, "errortreshold", r->errortreshold);
9461 ndr->depth--;
9464 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1549(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1549 *r)
9466 if (ndr_flags & NDR_SCALARS) {
9467 NDR_CHECK(ndr_push_align(ndr, 4));
9468 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->networkerrortreshold));
9469 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
9471 if (ndr_flags & NDR_BUFFERS) {
9473 return NDR_ERR_SUCCESS;
9476 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1549(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1549 *r)
9478 if (ndr_flags & NDR_SCALARS) {
9479 NDR_CHECK(ndr_pull_align(ndr, 4));
9480 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->networkerrortreshold));
9481 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
9483 if (ndr_flags & NDR_BUFFERS) {
9485 return NDR_ERR_SUCCESS;
9488 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1549(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1549 *r)
9490 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1549");
9491 ndr->depth++;
9492 ndr_print_uint32(ndr, "networkerrortreshold", r->networkerrortreshold);
9493 ndr->depth--;
9496 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1550(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1550 *r)
9498 if (ndr_flags & NDR_SCALARS) {
9499 NDR_CHECK(ndr_push_align(ndr, 4));
9500 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->diskspacetreshold));
9501 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
9503 if (ndr_flags & NDR_BUFFERS) {
9505 return NDR_ERR_SUCCESS;
9508 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1550(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1550 *r)
9510 if (ndr_flags & NDR_SCALARS) {
9511 NDR_CHECK(ndr_pull_align(ndr, 4));
9512 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->diskspacetreshold));
9513 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
9515 if (ndr_flags & NDR_BUFFERS) {
9517 return NDR_ERR_SUCCESS;
9520 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1550(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1550 *r)
9522 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1550");
9523 ndr->depth++;
9524 ndr_print_uint32(ndr, "diskspacetreshold", r->diskspacetreshold);
9525 ndr->depth--;
9528 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1552(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1552 *r)
9530 if (ndr_flags & NDR_SCALARS) {
9531 NDR_CHECK(ndr_push_align(ndr, 4));
9532 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxlinkdelay));
9533 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
9535 if (ndr_flags & NDR_BUFFERS) {
9537 return NDR_ERR_SUCCESS;
9540 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1552(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1552 *r)
9542 if (ndr_flags & NDR_SCALARS) {
9543 NDR_CHECK(ndr_pull_align(ndr, 4));
9544 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxlinkdelay));
9545 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
9547 if (ndr_flags & NDR_BUFFERS) {
9549 return NDR_ERR_SUCCESS;
9552 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1552(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1552 *r)
9554 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1552");
9555 ndr->depth++;
9556 ndr_print_uint32(ndr, "maxlinkdelay", r->maxlinkdelay);
9557 ndr->depth--;
9560 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1553(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1553 *r)
9562 if (ndr_flags & NDR_SCALARS) {
9563 NDR_CHECK(ndr_push_align(ndr, 4));
9564 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minlinkthroughput));
9565 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
9567 if (ndr_flags & NDR_BUFFERS) {
9569 return NDR_ERR_SUCCESS;
9572 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1553(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1553 *r)
9574 if (ndr_flags & NDR_SCALARS) {
9575 NDR_CHECK(ndr_pull_align(ndr, 4));
9576 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minlinkthroughput));
9577 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
9579 if (ndr_flags & NDR_BUFFERS) {
9581 return NDR_ERR_SUCCESS;
9584 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1553(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1553 *r)
9586 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1553");
9587 ndr->depth++;
9588 ndr_print_uint32(ndr, "minlinkthroughput", r->minlinkthroughput);
9589 ndr->depth--;
9592 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1554(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1554 *r)
9594 if (ndr_flags & NDR_SCALARS) {
9595 NDR_CHECK(ndr_push_align(ndr, 4));
9596 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->linkinfovalidtime));
9597 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
9599 if (ndr_flags & NDR_BUFFERS) {
9601 return NDR_ERR_SUCCESS;
9604 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1554(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1554 *r)
9606 if (ndr_flags & NDR_SCALARS) {
9607 NDR_CHECK(ndr_pull_align(ndr, 4));
9608 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->linkinfovalidtime));
9609 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
9611 if (ndr_flags & NDR_BUFFERS) {
9613 return NDR_ERR_SUCCESS;
9616 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1554(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1554 *r)
9618 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1554");
9619 ndr->depth++;
9620 ndr_print_uint32(ndr, "linkinfovalidtime", r->linkinfovalidtime);
9621 ndr->depth--;
9624 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1555(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1555 *r)
9626 if (ndr_flags & NDR_SCALARS) {
9627 NDR_CHECK(ndr_push_align(ndr, 4));
9628 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->scavqosinfoupdatetime));
9629 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
9631 if (ndr_flags & NDR_BUFFERS) {
9633 return NDR_ERR_SUCCESS;
9636 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1555(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1555 *r)
9638 if (ndr_flags & NDR_SCALARS) {
9639 NDR_CHECK(ndr_pull_align(ndr, 4));
9640 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->scavqosinfoupdatetime));
9641 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
9643 if (ndr_flags & NDR_BUFFERS) {
9645 return NDR_ERR_SUCCESS;
9648 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1555(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1555 *r)
9650 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1555");
9651 ndr->depth++;
9652 ndr_print_uint32(ndr, "scavqosinfoupdatetime", r->scavqosinfoupdatetime);
9653 ndr->depth--;
9656 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1556(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1556 *r)
9658 if (ndr_flags & NDR_SCALARS) {
9659 NDR_CHECK(ndr_push_align(ndr, 4));
9660 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxworkitemidletime));
9661 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
9663 if (ndr_flags & NDR_BUFFERS) {
9665 return NDR_ERR_SUCCESS;
9668 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1556(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1556 *r)
9670 if (ndr_flags & NDR_SCALARS) {
9671 NDR_CHECK(ndr_pull_align(ndr, 4));
9672 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxworkitemidletime));
9673 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
9675 if (ndr_flags & NDR_BUFFERS) {
9677 return NDR_ERR_SUCCESS;
9680 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1556(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1556 *r)
9682 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1556");
9683 ndr->depth++;
9684 ndr_print_uint32(ndr, "maxworkitemidletime", r->maxworkitemidletime);
9685 ndr->depth--;
9688 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetSrvInfo *r)
9690 if (ndr_flags & NDR_SCALARS) {
9691 int level = ndr_push_get_switch_value(ndr, r);
9692 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
9693 NDR_CHECK(ndr_push_union_align(ndr, 5));
9694 switch (level) {
9695 case 100: {
9696 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info100));
9697 break; }
9699 case 101: {
9700 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info101));
9701 break; }
9703 case 102: {
9704 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info102));
9705 break; }
9707 case 402: {
9708 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info402));
9709 break; }
9711 case 403: {
9712 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info403));
9713 break; }
9715 case 502: {
9716 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info502));
9717 break; }
9719 case 503: {
9720 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info503));
9721 break; }
9723 case 599: {
9724 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info599));
9725 break; }
9727 case 1005: {
9728 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1005));
9729 break; }
9731 case 1010: {
9732 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1010));
9733 break; }
9735 case 1016: {
9736 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1016));
9737 break; }
9739 case 1017: {
9740 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1017));
9741 break; }
9743 case 1018: {
9744 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1018));
9745 break; }
9747 case 1107: {
9748 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1107));
9749 break; }
9751 case 1501: {
9752 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1501));
9753 break; }
9755 case 1502: {
9756 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1502));
9757 break; }
9759 case 1503: {
9760 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1503));
9761 break; }
9763 case 1506: {
9764 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1506));
9765 break; }
9767 case 1509: {
9768 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1509));
9769 break; }
9771 case 1510: {
9772 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1510));
9773 break; }
9775 case 1511: {
9776 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1511));
9777 break; }
9779 case 1512: {
9780 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1512));
9781 break; }
9783 case 1513: {
9784 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1513));
9785 break; }
9787 case 1514: {
9788 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1514));
9789 break; }
9791 case 1515: {
9792 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1515));
9793 break; }
9795 case 1516: {
9796 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1516));
9797 break; }
9799 case 1518: {
9800 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1518));
9801 break; }
9803 case 1520: {
9804 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1520));
9805 break; }
9807 case 1521: {
9808 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1521));
9809 break; }
9811 case 1522: {
9812 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1522));
9813 break; }
9815 case 1523: {
9816 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1523));
9817 break; }
9819 case 1524: {
9820 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1524));
9821 break; }
9823 case 1525: {
9824 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1525));
9825 break; }
9827 case 1528: {
9828 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1528));
9829 break; }
9831 case 1529: {
9832 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1529));
9833 break; }
9835 case 1530: {
9836 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1530));
9837 break; }
9839 case 1533: {
9840 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1533));
9841 break; }
9843 case 1534: {
9844 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1534));
9845 break; }
9847 case 1535: {
9848 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1535));
9849 break; }
9851 case 1536: {
9852 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1536));
9853 break; }
9855 case 1537: {
9856 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1537));
9857 break; }
9859 case 1538: {
9860 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1538));
9861 break; }
9863 case 1539: {
9864 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1539));
9865 break; }
9867 case 1540: {
9868 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1540));
9869 break; }
9871 case 1541: {
9872 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1541));
9873 break; }
9875 case 1542: {
9876 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1542));
9877 break; }
9879 case 1543: {
9880 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1543));
9881 break; }
9883 case 1544: {
9884 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1544));
9885 break; }
9887 case 1545: {
9888 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1545));
9889 break; }
9891 case 1546: {
9892 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1546));
9893 break; }
9895 case 1547: {
9896 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1547));
9897 break; }
9899 case 1548: {
9900 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1548));
9901 break; }
9903 case 1549: {
9904 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1549));
9905 break; }
9907 case 1550: {
9908 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1550));
9909 break; }
9911 case 1552: {
9912 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1552));
9913 break; }
9915 case 1553: {
9916 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1553));
9917 break; }
9919 case 1554: {
9920 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1554));
9921 break; }
9923 case 1555: {
9924 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1555));
9925 break; }
9927 case 1556: {
9928 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1556));
9929 break; }
9931 default: {
9932 break; }
9936 if (ndr_flags & NDR_BUFFERS) {
9937 int level = ndr_push_get_switch_value(ndr, r);
9938 switch (level) {
9939 case 100:
9940 if (r->info100) {
9941 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo100(ndr, NDR_SCALARS|NDR_BUFFERS, r->info100));
9943 break;
9945 case 101:
9946 if (r->info101) {
9947 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo101(ndr, NDR_SCALARS|NDR_BUFFERS, r->info101));
9949 break;
9951 case 102:
9952 if (r->info102) {
9953 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo102(ndr, NDR_SCALARS|NDR_BUFFERS, r->info102));
9955 break;
9957 case 402:
9958 if (r->info402) {
9959 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo402(ndr, NDR_SCALARS|NDR_BUFFERS, r->info402));
9961 break;
9963 case 403:
9964 if (r->info403) {
9965 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo403(ndr, NDR_SCALARS|NDR_BUFFERS, r->info403));
9967 break;
9969 case 502:
9970 if (r->info502) {
9971 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo502(ndr, NDR_SCALARS, r->info502));
9973 break;
9975 case 503:
9976 if (r->info503) {
9977 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo503(ndr, NDR_SCALARS|NDR_BUFFERS, r->info503));
9979 break;
9981 case 599:
9982 if (r->info599) {
9983 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo599(ndr, NDR_SCALARS|NDR_BUFFERS, r->info599));
9985 break;
9987 case 1005:
9988 if (r->info1005) {
9989 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1005(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1005));
9991 break;
9993 case 1010:
9994 if (r->info1010) {
9995 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1010(ndr, NDR_SCALARS, r->info1010));
9997 break;
9999 case 1016:
10000 if (r->info1016) {
10001 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1016(ndr, NDR_SCALARS, r->info1016));
10003 break;
10005 case 1017:
10006 if (r->info1017) {
10007 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1017(ndr, NDR_SCALARS, r->info1017));
10009 break;
10011 case 1018:
10012 if (r->info1018) {
10013 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1018(ndr, NDR_SCALARS, r->info1018));
10015 break;
10017 case 1107:
10018 if (r->info1107) {
10019 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1107(ndr, NDR_SCALARS, r->info1107));
10021 break;
10023 case 1501:
10024 if (r->info1501) {
10025 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1501(ndr, NDR_SCALARS, r->info1501));
10027 break;
10029 case 1502:
10030 if (r->info1502) {
10031 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1502(ndr, NDR_SCALARS, r->info1502));
10033 break;
10035 case 1503:
10036 if (r->info1503) {
10037 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1503(ndr, NDR_SCALARS, r->info1503));
10039 break;
10041 case 1506:
10042 if (r->info1506) {
10043 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1506(ndr, NDR_SCALARS, r->info1506));
10045 break;
10047 case 1509:
10048 if (r->info1509) {
10049 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1509(ndr, NDR_SCALARS, r->info1509));
10051 break;
10053 case 1510:
10054 if (r->info1510) {
10055 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1510(ndr, NDR_SCALARS, r->info1510));
10057 break;
10059 case 1511:
10060 if (r->info1511) {
10061 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1511(ndr, NDR_SCALARS, r->info1511));
10063 break;
10065 case 1512:
10066 if (r->info1512) {
10067 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1512(ndr, NDR_SCALARS, r->info1512));
10069 break;
10071 case 1513:
10072 if (r->info1513) {
10073 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1513(ndr, NDR_SCALARS, r->info1513));
10075 break;
10077 case 1514:
10078 if (r->info1514) {
10079 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1514(ndr, NDR_SCALARS, r->info1514));
10081 break;
10083 case 1515:
10084 if (r->info1515) {
10085 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1515(ndr, NDR_SCALARS, r->info1515));
10087 break;
10089 case 1516:
10090 if (r->info1516) {
10091 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1516(ndr, NDR_SCALARS, r->info1516));
10093 break;
10095 case 1518:
10096 if (r->info1518) {
10097 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1518(ndr, NDR_SCALARS, r->info1518));
10099 break;
10101 case 1520:
10102 if (r->info1520) {
10103 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1520(ndr, NDR_SCALARS, r->info1520));
10105 break;
10107 case 1521:
10108 if (r->info1521) {
10109 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1521(ndr, NDR_SCALARS, r->info1521));
10111 break;
10113 case 1522:
10114 if (r->info1522) {
10115 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1522(ndr, NDR_SCALARS, r->info1522));
10117 break;
10119 case 1523:
10120 if (r->info1523) {
10121 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1523(ndr, NDR_SCALARS, r->info1523));
10123 break;
10125 case 1524:
10126 if (r->info1524) {
10127 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1524(ndr, NDR_SCALARS, r->info1524));
10129 break;
10131 case 1525:
10132 if (r->info1525) {
10133 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1525(ndr, NDR_SCALARS, r->info1525));
10135 break;
10137 case 1528:
10138 if (r->info1528) {
10139 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1528(ndr, NDR_SCALARS, r->info1528));
10141 break;
10143 case 1529:
10144 if (r->info1529) {
10145 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1529(ndr, NDR_SCALARS, r->info1529));
10147 break;
10149 case 1530:
10150 if (r->info1530) {
10151 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1530(ndr, NDR_SCALARS, r->info1530));
10153 break;
10155 case 1533:
10156 if (r->info1533) {
10157 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1533(ndr, NDR_SCALARS, r->info1533));
10159 break;
10161 case 1534:
10162 if (r->info1534) {
10163 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1534(ndr, NDR_SCALARS, r->info1534));
10165 break;
10167 case 1535:
10168 if (r->info1535) {
10169 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1535(ndr, NDR_SCALARS, r->info1535));
10171 break;
10173 case 1536:
10174 if (r->info1536) {
10175 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1536(ndr, NDR_SCALARS, r->info1536));
10177 break;
10179 case 1537:
10180 if (r->info1537) {
10181 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1537(ndr, NDR_SCALARS, r->info1537));
10183 break;
10185 case 1538:
10186 if (r->info1538) {
10187 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1538(ndr, NDR_SCALARS, r->info1538));
10189 break;
10191 case 1539:
10192 if (r->info1539) {
10193 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1539(ndr, NDR_SCALARS, r->info1539));
10195 break;
10197 case 1540:
10198 if (r->info1540) {
10199 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1540(ndr, NDR_SCALARS, r->info1540));
10201 break;
10203 case 1541:
10204 if (r->info1541) {
10205 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1541(ndr, NDR_SCALARS, r->info1541));
10207 break;
10209 case 1542:
10210 if (r->info1542) {
10211 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1542(ndr, NDR_SCALARS, r->info1542));
10213 break;
10215 case 1543:
10216 if (r->info1543) {
10217 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1543(ndr, NDR_SCALARS, r->info1543));
10219 break;
10221 case 1544:
10222 if (r->info1544) {
10223 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1544(ndr, NDR_SCALARS, r->info1544));
10225 break;
10227 case 1545:
10228 if (r->info1545) {
10229 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1545(ndr, NDR_SCALARS, r->info1545));
10231 break;
10233 case 1546:
10234 if (r->info1546) {
10235 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1546(ndr, NDR_SCALARS, r->info1546));
10237 break;
10239 case 1547:
10240 if (r->info1547) {
10241 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1547(ndr, NDR_SCALARS, r->info1547));
10243 break;
10245 case 1548:
10246 if (r->info1548) {
10247 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1548(ndr, NDR_SCALARS, r->info1548));
10249 break;
10251 case 1549:
10252 if (r->info1549) {
10253 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1549(ndr, NDR_SCALARS, r->info1549));
10255 break;
10257 case 1550:
10258 if (r->info1550) {
10259 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1550(ndr, NDR_SCALARS, r->info1550));
10261 break;
10263 case 1552:
10264 if (r->info1552) {
10265 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1552(ndr, NDR_SCALARS, r->info1552));
10267 break;
10269 case 1553:
10270 if (r->info1553) {
10271 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1553(ndr, NDR_SCALARS, r->info1553));
10273 break;
10275 case 1554:
10276 if (r->info1554) {
10277 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1554(ndr, NDR_SCALARS, r->info1554));
10279 break;
10281 case 1555:
10282 if (r->info1555) {
10283 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1555(ndr, NDR_SCALARS, r->info1555));
10285 break;
10287 case 1556:
10288 if (r->info1556) {
10289 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1556(ndr, NDR_SCALARS, r->info1556));
10291 break;
10293 default:
10294 break;
10298 return NDR_ERR_SUCCESS;
10301 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetSrvInfo *r)
10303 int level;
10304 uint32_t _level;
10305 TALLOC_CTX *_mem_save_info100_0;
10306 uint32_t _ptr_info100;
10307 TALLOC_CTX *_mem_save_info101_0;
10308 uint32_t _ptr_info101;
10309 TALLOC_CTX *_mem_save_info102_0;
10310 uint32_t _ptr_info102;
10311 TALLOC_CTX *_mem_save_info402_0;
10312 uint32_t _ptr_info402;
10313 TALLOC_CTX *_mem_save_info403_0;
10314 uint32_t _ptr_info403;
10315 TALLOC_CTX *_mem_save_info502_0;
10316 uint32_t _ptr_info502;
10317 TALLOC_CTX *_mem_save_info503_0;
10318 uint32_t _ptr_info503;
10319 TALLOC_CTX *_mem_save_info599_0;
10320 uint32_t _ptr_info599;
10321 TALLOC_CTX *_mem_save_info1005_0;
10322 uint32_t _ptr_info1005;
10323 TALLOC_CTX *_mem_save_info1010_0;
10324 uint32_t _ptr_info1010;
10325 TALLOC_CTX *_mem_save_info1016_0;
10326 uint32_t _ptr_info1016;
10327 TALLOC_CTX *_mem_save_info1017_0;
10328 uint32_t _ptr_info1017;
10329 TALLOC_CTX *_mem_save_info1018_0;
10330 uint32_t _ptr_info1018;
10331 TALLOC_CTX *_mem_save_info1107_0;
10332 uint32_t _ptr_info1107;
10333 TALLOC_CTX *_mem_save_info1501_0;
10334 uint32_t _ptr_info1501;
10335 TALLOC_CTX *_mem_save_info1502_0;
10336 uint32_t _ptr_info1502;
10337 TALLOC_CTX *_mem_save_info1503_0;
10338 uint32_t _ptr_info1503;
10339 TALLOC_CTX *_mem_save_info1506_0;
10340 uint32_t _ptr_info1506;
10341 TALLOC_CTX *_mem_save_info1509_0;
10342 uint32_t _ptr_info1509;
10343 TALLOC_CTX *_mem_save_info1510_0;
10344 uint32_t _ptr_info1510;
10345 TALLOC_CTX *_mem_save_info1511_0;
10346 uint32_t _ptr_info1511;
10347 TALLOC_CTX *_mem_save_info1512_0;
10348 uint32_t _ptr_info1512;
10349 TALLOC_CTX *_mem_save_info1513_0;
10350 uint32_t _ptr_info1513;
10351 TALLOC_CTX *_mem_save_info1514_0;
10352 uint32_t _ptr_info1514;
10353 TALLOC_CTX *_mem_save_info1515_0;
10354 uint32_t _ptr_info1515;
10355 TALLOC_CTX *_mem_save_info1516_0;
10356 uint32_t _ptr_info1516;
10357 TALLOC_CTX *_mem_save_info1518_0;
10358 uint32_t _ptr_info1518;
10359 TALLOC_CTX *_mem_save_info1520_0;
10360 uint32_t _ptr_info1520;
10361 TALLOC_CTX *_mem_save_info1521_0;
10362 uint32_t _ptr_info1521;
10363 TALLOC_CTX *_mem_save_info1522_0;
10364 uint32_t _ptr_info1522;
10365 TALLOC_CTX *_mem_save_info1523_0;
10366 uint32_t _ptr_info1523;
10367 TALLOC_CTX *_mem_save_info1524_0;
10368 uint32_t _ptr_info1524;
10369 TALLOC_CTX *_mem_save_info1525_0;
10370 uint32_t _ptr_info1525;
10371 TALLOC_CTX *_mem_save_info1528_0;
10372 uint32_t _ptr_info1528;
10373 TALLOC_CTX *_mem_save_info1529_0;
10374 uint32_t _ptr_info1529;
10375 TALLOC_CTX *_mem_save_info1530_0;
10376 uint32_t _ptr_info1530;
10377 TALLOC_CTX *_mem_save_info1533_0;
10378 uint32_t _ptr_info1533;
10379 TALLOC_CTX *_mem_save_info1534_0;
10380 uint32_t _ptr_info1534;
10381 TALLOC_CTX *_mem_save_info1535_0;
10382 uint32_t _ptr_info1535;
10383 TALLOC_CTX *_mem_save_info1536_0;
10384 uint32_t _ptr_info1536;
10385 TALLOC_CTX *_mem_save_info1537_0;
10386 uint32_t _ptr_info1537;
10387 TALLOC_CTX *_mem_save_info1538_0;
10388 uint32_t _ptr_info1538;
10389 TALLOC_CTX *_mem_save_info1539_0;
10390 uint32_t _ptr_info1539;
10391 TALLOC_CTX *_mem_save_info1540_0;
10392 uint32_t _ptr_info1540;
10393 TALLOC_CTX *_mem_save_info1541_0;
10394 uint32_t _ptr_info1541;
10395 TALLOC_CTX *_mem_save_info1542_0;
10396 uint32_t _ptr_info1542;
10397 TALLOC_CTX *_mem_save_info1543_0;
10398 uint32_t _ptr_info1543;
10399 TALLOC_CTX *_mem_save_info1544_0;
10400 uint32_t _ptr_info1544;
10401 TALLOC_CTX *_mem_save_info1545_0;
10402 uint32_t _ptr_info1545;
10403 TALLOC_CTX *_mem_save_info1546_0;
10404 uint32_t _ptr_info1546;
10405 TALLOC_CTX *_mem_save_info1547_0;
10406 uint32_t _ptr_info1547;
10407 TALLOC_CTX *_mem_save_info1548_0;
10408 uint32_t _ptr_info1548;
10409 TALLOC_CTX *_mem_save_info1549_0;
10410 uint32_t _ptr_info1549;
10411 TALLOC_CTX *_mem_save_info1550_0;
10412 uint32_t _ptr_info1550;
10413 TALLOC_CTX *_mem_save_info1552_0;
10414 uint32_t _ptr_info1552;
10415 TALLOC_CTX *_mem_save_info1553_0;
10416 uint32_t _ptr_info1553;
10417 TALLOC_CTX *_mem_save_info1554_0;
10418 uint32_t _ptr_info1554;
10419 TALLOC_CTX *_mem_save_info1555_0;
10420 uint32_t _ptr_info1555;
10421 TALLOC_CTX *_mem_save_info1556_0;
10422 uint32_t _ptr_info1556;
10423 level = ndr_pull_get_switch_value(ndr, r);
10424 if (ndr_flags & NDR_SCALARS) {
10425 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
10426 if (_level != level) {
10427 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
10429 NDR_CHECK(ndr_pull_union_align(ndr, 5));
10430 switch (level) {
10431 case 100: {
10432 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info100));
10433 if (_ptr_info100) {
10434 NDR_PULL_ALLOC(ndr, r->info100);
10435 } else {
10436 r->info100 = NULL;
10438 break; }
10440 case 101: {
10441 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info101));
10442 if (_ptr_info101) {
10443 NDR_PULL_ALLOC(ndr, r->info101);
10444 } else {
10445 r->info101 = NULL;
10447 break; }
10449 case 102: {
10450 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info102));
10451 if (_ptr_info102) {
10452 NDR_PULL_ALLOC(ndr, r->info102);
10453 } else {
10454 r->info102 = NULL;
10456 break; }
10458 case 402: {
10459 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info402));
10460 if (_ptr_info402) {
10461 NDR_PULL_ALLOC(ndr, r->info402);
10462 } else {
10463 r->info402 = NULL;
10465 break; }
10467 case 403: {
10468 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info403));
10469 if (_ptr_info403) {
10470 NDR_PULL_ALLOC(ndr, r->info403);
10471 } else {
10472 r->info403 = NULL;
10474 break; }
10476 case 502: {
10477 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info502));
10478 if (_ptr_info502) {
10479 NDR_PULL_ALLOC(ndr, r->info502);
10480 } else {
10481 r->info502 = NULL;
10483 break; }
10485 case 503: {
10486 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info503));
10487 if (_ptr_info503) {
10488 NDR_PULL_ALLOC(ndr, r->info503);
10489 } else {
10490 r->info503 = NULL;
10492 break; }
10494 case 599: {
10495 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info599));
10496 if (_ptr_info599) {
10497 NDR_PULL_ALLOC(ndr, r->info599);
10498 } else {
10499 r->info599 = NULL;
10501 break; }
10503 case 1005: {
10504 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1005));
10505 if (_ptr_info1005) {
10506 NDR_PULL_ALLOC(ndr, r->info1005);
10507 } else {
10508 r->info1005 = NULL;
10510 break; }
10512 case 1010: {
10513 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1010));
10514 if (_ptr_info1010) {
10515 NDR_PULL_ALLOC(ndr, r->info1010);
10516 } else {
10517 r->info1010 = NULL;
10519 break; }
10521 case 1016: {
10522 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1016));
10523 if (_ptr_info1016) {
10524 NDR_PULL_ALLOC(ndr, r->info1016);
10525 } else {
10526 r->info1016 = NULL;
10528 break; }
10530 case 1017: {
10531 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1017));
10532 if (_ptr_info1017) {
10533 NDR_PULL_ALLOC(ndr, r->info1017);
10534 } else {
10535 r->info1017 = NULL;
10537 break; }
10539 case 1018: {
10540 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1018));
10541 if (_ptr_info1018) {
10542 NDR_PULL_ALLOC(ndr, r->info1018);
10543 } else {
10544 r->info1018 = NULL;
10546 break; }
10548 case 1107: {
10549 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1107));
10550 if (_ptr_info1107) {
10551 NDR_PULL_ALLOC(ndr, r->info1107);
10552 } else {
10553 r->info1107 = NULL;
10555 break; }
10557 case 1501: {
10558 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1501));
10559 if (_ptr_info1501) {
10560 NDR_PULL_ALLOC(ndr, r->info1501);
10561 } else {
10562 r->info1501 = NULL;
10564 break; }
10566 case 1502: {
10567 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1502));
10568 if (_ptr_info1502) {
10569 NDR_PULL_ALLOC(ndr, r->info1502);
10570 } else {
10571 r->info1502 = NULL;
10573 break; }
10575 case 1503: {
10576 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1503));
10577 if (_ptr_info1503) {
10578 NDR_PULL_ALLOC(ndr, r->info1503);
10579 } else {
10580 r->info1503 = NULL;
10582 break; }
10584 case 1506: {
10585 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1506));
10586 if (_ptr_info1506) {
10587 NDR_PULL_ALLOC(ndr, r->info1506);
10588 } else {
10589 r->info1506 = NULL;
10591 break; }
10593 case 1509: {
10594 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1509));
10595 if (_ptr_info1509) {
10596 NDR_PULL_ALLOC(ndr, r->info1509);
10597 } else {
10598 r->info1509 = NULL;
10600 break; }
10602 case 1510: {
10603 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1510));
10604 if (_ptr_info1510) {
10605 NDR_PULL_ALLOC(ndr, r->info1510);
10606 } else {
10607 r->info1510 = NULL;
10609 break; }
10611 case 1511: {
10612 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1511));
10613 if (_ptr_info1511) {
10614 NDR_PULL_ALLOC(ndr, r->info1511);
10615 } else {
10616 r->info1511 = NULL;
10618 break; }
10620 case 1512: {
10621 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1512));
10622 if (_ptr_info1512) {
10623 NDR_PULL_ALLOC(ndr, r->info1512);
10624 } else {
10625 r->info1512 = NULL;
10627 break; }
10629 case 1513: {
10630 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1513));
10631 if (_ptr_info1513) {
10632 NDR_PULL_ALLOC(ndr, r->info1513);
10633 } else {
10634 r->info1513 = NULL;
10636 break; }
10638 case 1514: {
10639 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1514));
10640 if (_ptr_info1514) {
10641 NDR_PULL_ALLOC(ndr, r->info1514);
10642 } else {
10643 r->info1514 = NULL;
10645 break; }
10647 case 1515: {
10648 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1515));
10649 if (_ptr_info1515) {
10650 NDR_PULL_ALLOC(ndr, r->info1515);
10651 } else {
10652 r->info1515 = NULL;
10654 break; }
10656 case 1516: {
10657 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1516));
10658 if (_ptr_info1516) {
10659 NDR_PULL_ALLOC(ndr, r->info1516);
10660 } else {
10661 r->info1516 = NULL;
10663 break; }
10665 case 1518: {
10666 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1518));
10667 if (_ptr_info1518) {
10668 NDR_PULL_ALLOC(ndr, r->info1518);
10669 } else {
10670 r->info1518 = NULL;
10672 break; }
10674 case 1520: {
10675 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1520));
10676 if (_ptr_info1520) {
10677 NDR_PULL_ALLOC(ndr, r->info1520);
10678 } else {
10679 r->info1520 = NULL;
10681 break; }
10683 case 1521: {
10684 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1521));
10685 if (_ptr_info1521) {
10686 NDR_PULL_ALLOC(ndr, r->info1521);
10687 } else {
10688 r->info1521 = NULL;
10690 break; }
10692 case 1522: {
10693 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1522));
10694 if (_ptr_info1522) {
10695 NDR_PULL_ALLOC(ndr, r->info1522);
10696 } else {
10697 r->info1522 = NULL;
10699 break; }
10701 case 1523: {
10702 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1523));
10703 if (_ptr_info1523) {
10704 NDR_PULL_ALLOC(ndr, r->info1523);
10705 } else {
10706 r->info1523 = NULL;
10708 break; }
10710 case 1524: {
10711 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1524));
10712 if (_ptr_info1524) {
10713 NDR_PULL_ALLOC(ndr, r->info1524);
10714 } else {
10715 r->info1524 = NULL;
10717 break; }
10719 case 1525: {
10720 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1525));
10721 if (_ptr_info1525) {
10722 NDR_PULL_ALLOC(ndr, r->info1525);
10723 } else {
10724 r->info1525 = NULL;
10726 break; }
10728 case 1528: {
10729 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1528));
10730 if (_ptr_info1528) {
10731 NDR_PULL_ALLOC(ndr, r->info1528);
10732 } else {
10733 r->info1528 = NULL;
10735 break; }
10737 case 1529: {
10738 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1529));
10739 if (_ptr_info1529) {
10740 NDR_PULL_ALLOC(ndr, r->info1529);
10741 } else {
10742 r->info1529 = NULL;
10744 break; }
10746 case 1530: {
10747 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1530));
10748 if (_ptr_info1530) {
10749 NDR_PULL_ALLOC(ndr, r->info1530);
10750 } else {
10751 r->info1530 = NULL;
10753 break; }
10755 case 1533: {
10756 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1533));
10757 if (_ptr_info1533) {
10758 NDR_PULL_ALLOC(ndr, r->info1533);
10759 } else {
10760 r->info1533 = NULL;
10762 break; }
10764 case 1534: {
10765 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1534));
10766 if (_ptr_info1534) {
10767 NDR_PULL_ALLOC(ndr, r->info1534);
10768 } else {
10769 r->info1534 = NULL;
10771 break; }
10773 case 1535: {
10774 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1535));
10775 if (_ptr_info1535) {
10776 NDR_PULL_ALLOC(ndr, r->info1535);
10777 } else {
10778 r->info1535 = NULL;
10780 break; }
10782 case 1536: {
10783 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1536));
10784 if (_ptr_info1536) {
10785 NDR_PULL_ALLOC(ndr, r->info1536);
10786 } else {
10787 r->info1536 = NULL;
10789 break; }
10791 case 1537: {
10792 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1537));
10793 if (_ptr_info1537) {
10794 NDR_PULL_ALLOC(ndr, r->info1537);
10795 } else {
10796 r->info1537 = NULL;
10798 break; }
10800 case 1538: {
10801 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1538));
10802 if (_ptr_info1538) {
10803 NDR_PULL_ALLOC(ndr, r->info1538);
10804 } else {
10805 r->info1538 = NULL;
10807 break; }
10809 case 1539: {
10810 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1539));
10811 if (_ptr_info1539) {
10812 NDR_PULL_ALLOC(ndr, r->info1539);
10813 } else {
10814 r->info1539 = NULL;
10816 break; }
10818 case 1540: {
10819 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1540));
10820 if (_ptr_info1540) {
10821 NDR_PULL_ALLOC(ndr, r->info1540);
10822 } else {
10823 r->info1540 = NULL;
10825 break; }
10827 case 1541: {
10828 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1541));
10829 if (_ptr_info1541) {
10830 NDR_PULL_ALLOC(ndr, r->info1541);
10831 } else {
10832 r->info1541 = NULL;
10834 break; }
10836 case 1542: {
10837 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1542));
10838 if (_ptr_info1542) {
10839 NDR_PULL_ALLOC(ndr, r->info1542);
10840 } else {
10841 r->info1542 = NULL;
10843 break; }
10845 case 1543: {
10846 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1543));
10847 if (_ptr_info1543) {
10848 NDR_PULL_ALLOC(ndr, r->info1543);
10849 } else {
10850 r->info1543 = NULL;
10852 break; }
10854 case 1544: {
10855 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1544));
10856 if (_ptr_info1544) {
10857 NDR_PULL_ALLOC(ndr, r->info1544);
10858 } else {
10859 r->info1544 = NULL;
10861 break; }
10863 case 1545: {
10864 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1545));
10865 if (_ptr_info1545) {
10866 NDR_PULL_ALLOC(ndr, r->info1545);
10867 } else {
10868 r->info1545 = NULL;
10870 break; }
10872 case 1546: {
10873 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1546));
10874 if (_ptr_info1546) {
10875 NDR_PULL_ALLOC(ndr, r->info1546);
10876 } else {
10877 r->info1546 = NULL;
10879 break; }
10881 case 1547: {
10882 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1547));
10883 if (_ptr_info1547) {
10884 NDR_PULL_ALLOC(ndr, r->info1547);
10885 } else {
10886 r->info1547 = NULL;
10888 break; }
10890 case 1548: {
10891 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1548));
10892 if (_ptr_info1548) {
10893 NDR_PULL_ALLOC(ndr, r->info1548);
10894 } else {
10895 r->info1548 = NULL;
10897 break; }
10899 case 1549: {
10900 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1549));
10901 if (_ptr_info1549) {
10902 NDR_PULL_ALLOC(ndr, r->info1549);
10903 } else {
10904 r->info1549 = NULL;
10906 break; }
10908 case 1550: {
10909 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1550));
10910 if (_ptr_info1550) {
10911 NDR_PULL_ALLOC(ndr, r->info1550);
10912 } else {
10913 r->info1550 = NULL;
10915 break; }
10917 case 1552: {
10918 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1552));
10919 if (_ptr_info1552) {
10920 NDR_PULL_ALLOC(ndr, r->info1552);
10921 } else {
10922 r->info1552 = NULL;
10924 break; }
10926 case 1553: {
10927 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1553));
10928 if (_ptr_info1553) {
10929 NDR_PULL_ALLOC(ndr, r->info1553);
10930 } else {
10931 r->info1553 = NULL;
10933 break; }
10935 case 1554: {
10936 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1554));
10937 if (_ptr_info1554) {
10938 NDR_PULL_ALLOC(ndr, r->info1554);
10939 } else {
10940 r->info1554 = NULL;
10942 break; }
10944 case 1555: {
10945 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1555));
10946 if (_ptr_info1555) {
10947 NDR_PULL_ALLOC(ndr, r->info1555);
10948 } else {
10949 r->info1555 = NULL;
10951 break; }
10953 case 1556: {
10954 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1556));
10955 if (_ptr_info1556) {
10956 NDR_PULL_ALLOC(ndr, r->info1556);
10957 } else {
10958 r->info1556 = NULL;
10960 break; }
10962 default: {
10963 break; }
10967 if (ndr_flags & NDR_BUFFERS) {
10968 switch (level) {
10969 case 100:
10970 if (r->info100) {
10971 _mem_save_info100_0 = NDR_PULL_GET_MEM_CTX(ndr);
10972 NDR_PULL_SET_MEM_CTX(ndr, r->info100, 0);
10973 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo100(ndr, NDR_SCALARS|NDR_BUFFERS, r->info100));
10974 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info100_0, 0);
10976 break;
10978 case 101:
10979 if (r->info101) {
10980 _mem_save_info101_0 = NDR_PULL_GET_MEM_CTX(ndr);
10981 NDR_PULL_SET_MEM_CTX(ndr, r->info101, 0);
10982 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo101(ndr, NDR_SCALARS|NDR_BUFFERS, r->info101));
10983 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info101_0, 0);
10985 break;
10987 case 102:
10988 if (r->info102) {
10989 _mem_save_info102_0 = NDR_PULL_GET_MEM_CTX(ndr);
10990 NDR_PULL_SET_MEM_CTX(ndr, r->info102, 0);
10991 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo102(ndr, NDR_SCALARS|NDR_BUFFERS, r->info102));
10992 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info102_0, 0);
10994 break;
10996 case 402:
10997 if (r->info402) {
10998 _mem_save_info402_0 = NDR_PULL_GET_MEM_CTX(ndr);
10999 NDR_PULL_SET_MEM_CTX(ndr, r->info402, 0);
11000 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo402(ndr, NDR_SCALARS|NDR_BUFFERS, r->info402));
11001 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info402_0, 0);
11003 break;
11005 case 403:
11006 if (r->info403) {
11007 _mem_save_info403_0 = NDR_PULL_GET_MEM_CTX(ndr);
11008 NDR_PULL_SET_MEM_CTX(ndr, r->info403, 0);
11009 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo403(ndr, NDR_SCALARS|NDR_BUFFERS, r->info403));
11010 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info403_0, 0);
11012 break;
11014 case 502:
11015 if (r->info502) {
11016 _mem_save_info502_0 = NDR_PULL_GET_MEM_CTX(ndr);
11017 NDR_PULL_SET_MEM_CTX(ndr, r->info502, 0);
11018 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo502(ndr, NDR_SCALARS, r->info502));
11019 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info502_0, 0);
11021 break;
11023 case 503:
11024 if (r->info503) {
11025 _mem_save_info503_0 = NDR_PULL_GET_MEM_CTX(ndr);
11026 NDR_PULL_SET_MEM_CTX(ndr, r->info503, 0);
11027 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo503(ndr, NDR_SCALARS|NDR_BUFFERS, r->info503));
11028 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info503_0, 0);
11030 break;
11032 case 599:
11033 if (r->info599) {
11034 _mem_save_info599_0 = NDR_PULL_GET_MEM_CTX(ndr);
11035 NDR_PULL_SET_MEM_CTX(ndr, r->info599, 0);
11036 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo599(ndr, NDR_SCALARS|NDR_BUFFERS, r->info599));
11037 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info599_0, 0);
11039 break;
11041 case 1005:
11042 if (r->info1005) {
11043 _mem_save_info1005_0 = NDR_PULL_GET_MEM_CTX(ndr);
11044 NDR_PULL_SET_MEM_CTX(ndr, r->info1005, 0);
11045 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1005(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1005));
11046 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1005_0, 0);
11048 break;
11050 case 1010:
11051 if (r->info1010) {
11052 _mem_save_info1010_0 = NDR_PULL_GET_MEM_CTX(ndr);
11053 NDR_PULL_SET_MEM_CTX(ndr, r->info1010, 0);
11054 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1010(ndr, NDR_SCALARS, r->info1010));
11055 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1010_0, 0);
11057 break;
11059 case 1016:
11060 if (r->info1016) {
11061 _mem_save_info1016_0 = NDR_PULL_GET_MEM_CTX(ndr);
11062 NDR_PULL_SET_MEM_CTX(ndr, r->info1016, 0);
11063 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1016(ndr, NDR_SCALARS, r->info1016));
11064 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1016_0, 0);
11066 break;
11068 case 1017:
11069 if (r->info1017) {
11070 _mem_save_info1017_0 = NDR_PULL_GET_MEM_CTX(ndr);
11071 NDR_PULL_SET_MEM_CTX(ndr, r->info1017, 0);
11072 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1017(ndr, NDR_SCALARS, r->info1017));
11073 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1017_0, 0);
11075 break;
11077 case 1018:
11078 if (r->info1018) {
11079 _mem_save_info1018_0 = NDR_PULL_GET_MEM_CTX(ndr);
11080 NDR_PULL_SET_MEM_CTX(ndr, r->info1018, 0);
11081 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1018(ndr, NDR_SCALARS, r->info1018));
11082 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1018_0, 0);
11084 break;
11086 case 1107:
11087 if (r->info1107) {
11088 _mem_save_info1107_0 = NDR_PULL_GET_MEM_CTX(ndr);
11089 NDR_PULL_SET_MEM_CTX(ndr, r->info1107, 0);
11090 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1107(ndr, NDR_SCALARS, r->info1107));
11091 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1107_0, 0);
11093 break;
11095 case 1501:
11096 if (r->info1501) {
11097 _mem_save_info1501_0 = NDR_PULL_GET_MEM_CTX(ndr);
11098 NDR_PULL_SET_MEM_CTX(ndr, r->info1501, 0);
11099 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1501(ndr, NDR_SCALARS, r->info1501));
11100 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1501_0, 0);
11102 break;
11104 case 1502:
11105 if (r->info1502) {
11106 _mem_save_info1502_0 = NDR_PULL_GET_MEM_CTX(ndr);
11107 NDR_PULL_SET_MEM_CTX(ndr, r->info1502, 0);
11108 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1502(ndr, NDR_SCALARS, r->info1502));
11109 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1502_0, 0);
11111 break;
11113 case 1503:
11114 if (r->info1503) {
11115 _mem_save_info1503_0 = NDR_PULL_GET_MEM_CTX(ndr);
11116 NDR_PULL_SET_MEM_CTX(ndr, r->info1503, 0);
11117 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1503(ndr, NDR_SCALARS, r->info1503));
11118 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1503_0, 0);
11120 break;
11122 case 1506:
11123 if (r->info1506) {
11124 _mem_save_info1506_0 = NDR_PULL_GET_MEM_CTX(ndr);
11125 NDR_PULL_SET_MEM_CTX(ndr, r->info1506, 0);
11126 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1506(ndr, NDR_SCALARS, r->info1506));
11127 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1506_0, 0);
11129 break;
11131 case 1509:
11132 if (r->info1509) {
11133 _mem_save_info1509_0 = NDR_PULL_GET_MEM_CTX(ndr);
11134 NDR_PULL_SET_MEM_CTX(ndr, r->info1509, 0);
11135 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1509(ndr, NDR_SCALARS, r->info1509));
11136 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1509_0, 0);
11138 break;
11140 case 1510:
11141 if (r->info1510) {
11142 _mem_save_info1510_0 = NDR_PULL_GET_MEM_CTX(ndr);
11143 NDR_PULL_SET_MEM_CTX(ndr, r->info1510, 0);
11144 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1510(ndr, NDR_SCALARS, r->info1510));
11145 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1510_0, 0);
11147 break;
11149 case 1511:
11150 if (r->info1511) {
11151 _mem_save_info1511_0 = NDR_PULL_GET_MEM_CTX(ndr);
11152 NDR_PULL_SET_MEM_CTX(ndr, r->info1511, 0);
11153 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1511(ndr, NDR_SCALARS, r->info1511));
11154 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1511_0, 0);
11156 break;
11158 case 1512:
11159 if (r->info1512) {
11160 _mem_save_info1512_0 = NDR_PULL_GET_MEM_CTX(ndr);
11161 NDR_PULL_SET_MEM_CTX(ndr, r->info1512, 0);
11162 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1512(ndr, NDR_SCALARS, r->info1512));
11163 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1512_0, 0);
11165 break;
11167 case 1513:
11168 if (r->info1513) {
11169 _mem_save_info1513_0 = NDR_PULL_GET_MEM_CTX(ndr);
11170 NDR_PULL_SET_MEM_CTX(ndr, r->info1513, 0);
11171 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1513(ndr, NDR_SCALARS, r->info1513));
11172 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1513_0, 0);
11174 break;
11176 case 1514:
11177 if (r->info1514) {
11178 _mem_save_info1514_0 = NDR_PULL_GET_MEM_CTX(ndr);
11179 NDR_PULL_SET_MEM_CTX(ndr, r->info1514, 0);
11180 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1514(ndr, NDR_SCALARS, r->info1514));
11181 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1514_0, 0);
11183 break;
11185 case 1515:
11186 if (r->info1515) {
11187 _mem_save_info1515_0 = NDR_PULL_GET_MEM_CTX(ndr);
11188 NDR_PULL_SET_MEM_CTX(ndr, r->info1515, 0);
11189 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1515(ndr, NDR_SCALARS, r->info1515));
11190 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1515_0, 0);
11192 break;
11194 case 1516:
11195 if (r->info1516) {
11196 _mem_save_info1516_0 = NDR_PULL_GET_MEM_CTX(ndr);
11197 NDR_PULL_SET_MEM_CTX(ndr, r->info1516, 0);
11198 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1516(ndr, NDR_SCALARS, r->info1516));
11199 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1516_0, 0);
11201 break;
11203 case 1518:
11204 if (r->info1518) {
11205 _mem_save_info1518_0 = NDR_PULL_GET_MEM_CTX(ndr);
11206 NDR_PULL_SET_MEM_CTX(ndr, r->info1518, 0);
11207 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1518(ndr, NDR_SCALARS, r->info1518));
11208 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1518_0, 0);
11210 break;
11212 case 1520:
11213 if (r->info1520) {
11214 _mem_save_info1520_0 = NDR_PULL_GET_MEM_CTX(ndr);
11215 NDR_PULL_SET_MEM_CTX(ndr, r->info1520, 0);
11216 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1520(ndr, NDR_SCALARS, r->info1520));
11217 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1520_0, 0);
11219 break;
11221 case 1521:
11222 if (r->info1521) {
11223 _mem_save_info1521_0 = NDR_PULL_GET_MEM_CTX(ndr);
11224 NDR_PULL_SET_MEM_CTX(ndr, r->info1521, 0);
11225 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1521(ndr, NDR_SCALARS, r->info1521));
11226 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1521_0, 0);
11228 break;
11230 case 1522:
11231 if (r->info1522) {
11232 _mem_save_info1522_0 = NDR_PULL_GET_MEM_CTX(ndr);
11233 NDR_PULL_SET_MEM_CTX(ndr, r->info1522, 0);
11234 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1522(ndr, NDR_SCALARS, r->info1522));
11235 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1522_0, 0);
11237 break;
11239 case 1523:
11240 if (r->info1523) {
11241 _mem_save_info1523_0 = NDR_PULL_GET_MEM_CTX(ndr);
11242 NDR_PULL_SET_MEM_CTX(ndr, r->info1523, 0);
11243 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1523(ndr, NDR_SCALARS, r->info1523));
11244 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1523_0, 0);
11246 break;
11248 case 1524:
11249 if (r->info1524) {
11250 _mem_save_info1524_0 = NDR_PULL_GET_MEM_CTX(ndr);
11251 NDR_PULL_SET_MEM_CTX(ndr, r->info1524, 0);
11252 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1524(ndr, NDR_SCALARS, r->info1524));
11253 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1524_0, 0);
11255 break;
11257 case 1525:
11258 if (r->info1525) {
11259 _mem_save_info1525_0 = NDR_PULL_GET_MEM_CTX(ndr);
11260 NDR_PULL_SET_MEM_CTX(ndr, r->info1525, 0);
11261 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1525(ndr, NDR_SCALARS, r->info1525));
11262 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1525_0, 0);
11264 break;
11266 case 1528:
11267 if (r->info1528) {
11268 _mem_save_info1528_0 = NDR_PULL_GET_MEM_CTX(ndr);
11269 NDR_PULL_SET_MEM_CTX(ndr, r->info1528, 0);
11270 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1528(ndr, NDR_SCALARS, r->info1528));
11271 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1528_0, 0);
11273 break;
11275 case 1529:
11276 if (r->info1529) {
11277 _mem_save_info1529_0 = NDR_PULL_GET_MEM_CTX(ndr);
11278 NDR_PULL_SET_MEM_CTX(ndr, r->info1529, 0);
11279 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1529(ndr, NDR_SCALARS, r->info1529));
11280 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1529_0, 0);
11282 break;
11284 case 1530:
11285 if (r->info1530) {
11286 _mem_save_info1530_0 = NDR_PULL_GET_MEM_CTX(ndr);
11287 NDR_PULL_SET_MEM_CTX(ndr, r->info1530, 0);
11288 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1530(ndr, NDR_SCALARS, r->info1530));
11289 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1530_0, 0);
11291 break;
11293 case 1533:
11294 if (r->info1533) {
11295 _mem_save_info1533_0 = NDR_PULL_GET_MEM_CTX(ndr);
11296 NDR_PULL_SET_MEM_CTX(ndr, r->info1533, 0);
11297 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1533(ndr, NDR_SCALARS, r->info1533));
11298 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1533_0, 0);
11300 break;
11302 case 1534:
11303 if (r->info1534) {
11304 _mem_save_info1534_0 = NDR_PULL_GET_MEM_CTX(ndr);
11305 NDR_PULL_SET_MEM_CTX(ndr, r->info1534, 0);
11306 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1534(ndr, NDR_SCALARS, r->info1534));
11307 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1534_0, 0);
11309 break;
11311 case 1535:
11312 if (r->info1535) {
11313 _mem_save_info1535_0 = NDR_PULL_GET_MEM_CTX(ndr);
11314 NDR_PULL_SET_MEM_CTX(ndr, r->info1535, 0);
11315 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1535(ndr, NDR_SCALARS, r->info1535));
11316 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1535_0, 0);
11318 break;
11320 case 1536:
11321 if (r->info1536) {
11322 _mem_save_info1536_0 = NDR_PULL_GET_MEM_CTX(ndr);
11323 NDR_PULL_SET_MEM_CTX(ndr, r->info1536, 0);
11324 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1536(ndr, NDR_SCALARS, r->info1536));
11325 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1536_0, 0);
11327 break;
11329 case 1537:
11330 if (r->info1537) {
11331 _mem_save_info1537_0 = NDR_PULL_GET_MEM_CTX(ndr);
11332 NDR_PULL_SET_MEM_CTX(ndr, r->info1537, 0);
11333 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1537(ndr, NDR_SCALARS, r->info1537));
11334 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1537_0, 0);
11336 break;
11338 case 1538:
11339 if (r->info1538) {
11340 _mem_save_info1538_0 = NDR_PULL_GET_MEM_CTX(ndr);
11341 NDR_PULL_SET_MEM_CTX(ndr, r->info1538, 0);
11342 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1538(ndr, NDR_SCALARS, r->info1538));
11343 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1538_0, 0);
11345 break;
11347 case 1539:
11348 if (r->info1539) {
11349 _mem_save_info1539_0 = NDR_PULL_GET_MEM_CTX(ndr);
11350 NDR_PULL_SET_MEM_CTX(ndr, r->info1539, 0);
11351 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1539(ndr, NDR_SCALARS, r->info1539));
11352 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1539_0, 0);
11354 break;
11356 case 1540:
11357 if (r->info1540) {
11358 _mem_save_info1540_0 = NDR_PULL_GET_MEM_CTX(ndr);
11359 NDR_PULL_SET_MEM_CTX(ndr, r->info1540, 0);
11360 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1540(ndr, NDR_SCALARS, r->info1540));
11361 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1540_0, 0);
11363 break;
11365 case 1541:
11366 if (r->info1541) {
11367 _mem_save_info1541_0 = NDR_PULL_GET_MEM_CTX(ndr);
11368 NDR_PULL_SET_MEM_CTX(ndr, r->info1541, 0);
11369 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1541(ndr, NDR_SCALARS, r->info1541));
11370 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1541_0, 0);
11372 break;
11374 case 1542:
11375 if (r->info1542) {
11376 _mem_save_info1542_0 = NDR_PULL_GET_MEM_CTX(ndr);
11377 NDR_PULL_SET_MEM_CTX(ndr, r->info1542, 0);
11378 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1542(ndr, NDR_SCALARS, r->info1542));
11379 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1542_0, 0);
11381 break;
11383 case 1543:
11384 if (r->info1543) {
11385 _mem_save_info1543_0 = NDR_PULL_GET_MEM_CTX(ndr);
11386 NDR_PULL_SET_MEM_CTX(ndr, r->info1543, 0);
11387 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1543(ndr, NDR_SCALARS, r->info1543));
11388 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1543_0, 0);
11390 break;
11392 case 1544:
11393 if (r->info1544) {
11394 _mem_save_info1544_0 = NDR_PULL_GET_MEM_CTX(ndr);
11395 NDR_PULL_SET_MEM_CTX(ndr, r->info1544, 0);
11396 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1544(ndr, NDR_SCALARS, r->info1544));
11397 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1544_0, 0);
11399 break;
11401 case 1545:
11402 if (r->info1545) {
11403 _mem_save_info1545_0 = NDR_PULL_GET_MEM_CTX(ndr);
11404 NDR_PULL_SET_MEM_CTX(ndr, r->info1545, 0);
11405 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1545(ndr, NDR_SCALARS, r->info1545));
11406 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1545_0, 0);
11408 break;
11410 case 1546:
11411 if (r->info1546) {
11412 _mem_save_info1546_0 = NDR_PULL_GET_MEM_CTX(ndr);
11413 NDR_PULL_SET_MEM_CTX(ndr, r->info1546, 0);
11414 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1546(ndr, NDR_SCALARS, r->info1546));
11415 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1546_0, 0);
11417 break;
11419 case 1547:
11420 if (r->info1547) {
11421 _mem_save_info1547_0 = NDR_PULL_GET_MEM_CTX(ndr);
11422 NDR_PULL_SET_MEM_CTX(ndr, r->info1547, 0);
11423 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1547(ndr, NDR_SCALARS, r->info1547));
11424 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1547_0, 0);
11426 break;
11428 case 1548:
11429 if (r->info1548) {
11430 _mem_save_info1548_0 = NDR_PULL_GET_MEM_CTX(ndr);
11431 NDR_PULL_SET_MEM_CTX(ndr, r->info1548, 0);
11432 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1548(ndr, NDR_SCALARS, r->info1548));
11433 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1548_0, 0);
11435 break;
11437 case 1549:
11438 if (r->info1549) {
11439 _mem_save_info1549_0 = NDR_PULL_GET_MEM_CTX(ndr);
11440 NDR_PULL_SET_MEM_CTX(ndr, r->info1549, 0);
11441 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1549(ndr, NDR_SCALARS, r->info1549));
11442 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1549_0, 0);
11444 break;
11446 case 1550:
11447 if (r->info1550) {
11448 _mem_save_info1550_0 = NDR_PULL_GET_MEM_CTX(ndr);
11449 NDR_PULL_SET_MEM_CTX(ndr, r->info1550, 0);
11450 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1550(ndr, NDR_SCALARS, r->info1550));
11451 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1550_0, 0);
11453 break;
11455 case 1552:
11456 if (r->info1552) {
11457 _mem_save_info1552_0 = NDR_PULL_GET_MEM_CTX(ndr);
11458 NDR_PULL_SET_MEM_CTX(ndr, r->info1552, 0);
11459 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1552(ndr, NDR_SCALARS, r->info1552));
11460 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1552_0, 0);
11462 break;
11464 case 1553:
11465 if (r->info1553) {
11466 _mem_save_info1553_0 = NDR_PULL_GET_MEM_CTX(ndr);
11467 NDR_PULL_SET_MEM_CTX(ndr, r->info1553, 0);
11468 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1553(ndr, NDR_SCALARS, r->info1553));
11469 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1553_0, 0);
11471 break;
11473 case 1554:
11474 if (r->info1554) {
11475 _mem_save_info1554_0 = NDR_PULL_GET_MEM_CTX(ndr);
11476 NDR_PULL_SET_MEM_CTX(ndr, r->info1554, 0);
11477 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1554(ndr, NDR_SCALARS, r->info1554));
11478 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1554_0, 0);
11480 break;
11482 case 1555:
11483 if (r->info1555) {
11484 _mem_save_info1555_0 = NDR_PULL_GET_MEM_CTX(ndr);
11485 NDR_PULL_SET_MEM_CTX(ndr, r->info1555, 0);
11486 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1555(ndr, NDR_SCALARS, r->info1555));
11487 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1555_0, 0);
11489 break;
11491 case 1556:
11492 if (r->info1556) {
11493 _mem_save_info1556_0 = NDR_PULL_GET_MEM_CTX(ndr);
11494 NDR_PULL_SET_MEM_CTX(ndr, r->info1556, 0);
11495 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1556(ndr, NDR_SCALARS, r->info1556));
11496 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1556_0, 0);
11498 break;
11500 default:
11501 break;
11505 return NDR_ERR_SUCCESS;
11508 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetSrvInfo *r)
11510 int level;
11511 level = ndr_print_get_switch_value(ndr, r);
11512 ndr_print_union(ndr, name, level, "srvsvc_NetSrvInfo");
11513 switch (level) {
11514 case 100:
11515 ndr_print_ptr(ndr, "info100", r->info100);
11516 ndr->depth++;
11517 if (r->info100) {
11518 ndr_print_srvsvc_NetSrvInfo100(ndr, "info100", r->info100);
11520 ndr->depth--;
11521 break;
11523 case 101:
11524 ndr_print_ptr(ndr, "info101", r->info101);
11525 ndr->depth++;
11526 if (r->info101) {
11527 ndr_print_srvsvc_NetSrvInfo101(ndr, "info101", r->info101);
11529 ndr->depth--;
11530 break;
11532 case 102:
11533 ndr_print_ptr(ndr, "info102", r->info102);
11534 ndr->depth++;
11535 if (r->info102) {
11536 ndr_print_srvsvc_NetSrvInfo102(ndr, "info102", r->info102);
11538 ndr->depth--;
11539 break;
11541 case 402:
11542 ndr_print_ptr(ndr, "info402", r->info402);
11543 ndr->depth++;
11544 if (r->info402) {
11545 ndr_print_srvsvc_NetSrvInfo402(ndr, "info402", r->info402);
11547 ndr->depth--;
11548 break;
11550 case 403:
11551 ndr_print_ptr(ndr, "info403", r->info403);
11552 ndr->depth++;
11553 if (r->info403) {
11554 ndr_print_srvsvc_NetSrvInfo403(ndr, "info403", r->info403);
11556 ndr->depth--;
11557 break;
11559 case 502:
11560 ndr_print_ptr(ndr, "info502", r->info502);
11561 ndr->depth++;
11562 if (r->info502) {
11563 ndr_print_srvsvc_NetSrvInfo502(ndr, "info502", r->info502);
11565 ndr->depth--;
11566 break;
11568 case 503:
11569 ndr_print_ptr(ndr, "info503", r->info503);
11570 ndr->depth++;
11571 if (r->info503) {
11572 ndr_print_srvsvc_NetSrvInfo503(ndr, "info503", r->info503);
11574 ndr->depth--;
11575 break;
11577 case 599:
11578 ndr_print_ptr(ndr, "info599", r->info599);
11579 ndr->depth++;
11580 if (r->info599) {
11581 ndr_print_srvsvc_NetSrvInfo599(ndr, "info599", r->info599);
11583 ndr->depth--;
11584 break;
11586 case 1005:
11587 ndr_print_ptr(ndr, "info1005", r->info1005);
11588 ndr->depth++;
11589 if (r->info1005) {
11590 ndr_print_srvsvc_NetSrvInfo1005(ndr, "info1005", r->info1005);
11592 ndr->depth--;
11593 break;
11595 case 1010:
11596 ndr_print_ptr(ndr, "info1010", r->info1010);
11597 ndr->depth++;
11598 if (r->info1010) {
11599 ndr_print_srvsvc_NetSrvInfo1010(ndr, "info1010", r->info1010);
11601 ndr->depth--;
11602 break;
11604 case 1016:
11605 ndr_print_ptr(ndr, "info1016", r->info1016);
11606 ndr->depth++;
11607 if (r->info1016) {
11608 ndr_print_srvsvc_NetSrvInfo1016(ndr, "info1016", r->info1016);
11610 ndr->depth--;
11611 break;
11613 case 1017:
11614 ndr_print_ptr(ndr, "info1017", r->info1017);
11615 ndr->depth++;
11616 if (r->info1017) {
11617 ndr_print_srvsvc_NetSrvInfo1017(ndr, "info1017", r->info1017);
11619 ndr->depth--;
11620 break;
11622 case 1018:
11623 ndr_print_ptr(ndr, "info1018", r->info1018);
11624 ndr->depth++;
11625 if (r->info1018) {
11626 ndr_print_srvsvc_NetSrvInfo1018(ndr, "info1018", r->info1018);
11628 ndr->depth--;
11629 break;
11631 case 1107:
11632 ndr_print_ptr(ndr, "info1107", r->info1107);
11633 ndr->depth++;
11634 if (r->info1107) {
11635 ndr_print_srvsvc_NetSrvInfo1107(ndr, "info1107", r->info1107);
11637 ndr->depth--;
11638 break;
11640 case 1501:
11641 ndr_print_ptr(ndr, "info1501", r->info1501);
11642 ndr->depth++;
11643 if (r->info1501) {
11644 ndr_print_srvsvc_NetSrvInfo1501(ndr, "info1501", r->info1501);
11646 ndr->depth--;
11647 break;
11649 case 1502:
11650 ndr_print_ptr(ndr, "info1502", r->info1502);
11651 ndr->depth++;
11652 if (r->info1502) {
11653 ndr_print_srvsvc_NetSrvInfo1502(ndr, "info1502", r->info1502);
11655 ndr->depth--;
11656 break;
11658 case 1503:
11659 ndr_print_ptr(ndr, "info1503", r->info1503);
11660 ndr->depth++;
11661 if (r->info1503) {
11662 ndr_print_srvsvc_NetSrvInfo1503(ndr, "info1503", r->info1503);
11664 ndr->depth--;
11665 break;
11667 case 1506:
11668 ndr_print_ptr(ndr, "info1506", r->info1506);
11669 ndr->depth++;
11670 if (r->info1506) {
11671 ndr_print_srvsvc_NetSrvInfo1506(ndr, "info1506", r->info1506);
11673 ndr->depth--;
11674 break;
11676 case 1509:
11677 ndr_print_ptr(ndr, "info1509", r->info1509);
11678 ndr->depth++;
11679 if (r->info1509) {
11680 ndr_print_srvsvc_NetSrvInfo1509(ndr, "info1509", r->info1509);
11682 ndr->depth--;
11683 break;
11685 case 1510:
11686 ndr_print_ptr(ndr, "info1510", r->info1510);
11687 ndr->depth++;
11688 if (r->info1510) {
11689 ndr_print_srvsvc_NetSrvInfo1510(ndr, "info1510", r->info1510);
11691 ndr->depth--;
11692 break;
11694 case 1511:
11695 ndr_print_ptr(ndr, "info1511", r->info1511);
11696 ndr->depth++;
11697 if (r->info1511) {
11698 ndr_print_srvsvc_NetSrvInfo1511(ndr, "info1511", r->info1511);
11700 ndr->depth--;
11701 break;
11703 case 1512:
11704 ndr_print_ptr(ndr, "info1512", r->info1512);
11705 ndr->depth++;
11706 if (r->info1512) {
11707 ndr_print_srvsvc_NetSrvInfo1512(ndr, "info1512", r->info1512);
11709 ndr->depth--;
11710 break;
11712 case 1513:
11713 ndr_print_ptr(ndr, "info1513", r->info1513);
11714 ndr->depth++;
11715 if (r->info1513) {
11716 ndr_print_srvsvc_NetSrvInfo1513(ndr, "info1513", r->info1513);
11718 ndr->depth--;
11719 break;
11721 case 1514:
11722 ndr_print_ptr(ndr, "info1514", r->info1514);
11723 ndr->depth++;
11724 if (r->info1514) {
11725 ndr_print_srvsvc_NetSrvInfo1514(ndr, "info1514", r->info1514);
11727 ndr->depth--;
11728 break;
11730 case 1515:
11731 ndr_print_ptr(ndr, "info1515", r->info1515);
11732 ndr->depth++;
11733 if (r->info1515) {
11734 ndr_print_srvsvc_NetSrvInfo1515(ndr, "info1515", r->info1515);
11736 ndr->depth--;
11737 break;
11739 case 1516:
11740 ndr_print_ptr(ndr, "info1516", r->info1516);
11741 ndr->depth++;
11742 if (r->info1516) {
11743 ndr_print_srvsvc_NetSrvInfo1516(ndr, "info1516", r->info1516);
11745 ndr->depth--;
11746 break;
11748 case 1518:
11749 ndr_print_ptr(ndr, "info1518", r->info1518);
11750 ndr->depth++;
11751 if (r->info1518) {
11752 ndr_print_srvsvc_NetSrvInfo1518(ndr, "info1518", r->info1518);
11754 ndr->depth--;
11755 break;
11757 case 1520:
11758 ndr_print_ptr(ndr, "info1520", r->info1520);
11759 ndr->depth++;
11760 if (r->info1520) {
11761 ndr_print_srvsvc_NetSrvInfo1520(ndr, "info1520", r->info1520);
11763 ndr->depth--;
11764 break;
11766 case 1521:
11767 ndr_print_ptr(ndr, "info1521", r->info1521);
11768 ndr->depth++;
11769 if (r->info1521) {
11770 ndr_print_srvsvc_NetSrvInfo1521(ndr, "info1521", r->info1521);
11772 ndr->depth--;
11773 break;
11775 case 1522:
11776 ndr_print_ptr(ndr, "info1522", r->info1522);
11777 ndr->depth++;
11778 if (r->info1522) {
11779 ndr_print_srvsvc_NetSrvInfo1522(ndr, "info1522", r->info1522);
11781 ndr->depth--;
11782 break;
11784 case 1523:
11785 ndr_print_ptr(ndr, "info1523", r->info1523);
11786 ndr->depth++;
11787 if (r->info1523) {
11788 ndr_print_srvsvc_NetSrvInfo1523(ndr, "info1523", r->info1523);
11790 ndr->depth--;
11791 break;
11793 case 1524:
11794 ndr_print_ptr(ndr, "info1524", r->info1524);
11795 ndr->depth++;
11796 if (r->info1524) {
11797 ndr_print_srvsvc_NetSrvInfo1524(ndr, "info1524", r->info1524);
11799 ndr->depth--;
11800 break;
11802 case 1525:
11803 ndr_print_ptr(ndr, "info1525", r->info1525);
11804 ndr->depth++;
11805 if (r->info1525) {
11806 ndr_print_srvsvc_NetSrvInfo1525(ndr, "info1525", r->info1525);
11808 ndr->depth--;
11809 break;
11811 case 1528:
11812 ndr_print_ptr(ndr, "info1528", r->info1528);
11813 ndr->depth++;
11814 if (r->info1528) {
11815 ndr_print_srvsvc_NetSrvInfo1528(ndr, "info1528", r->info1528);
11817 ndr->depth--;
11818 break;
11820 case 1529:
11821 ndr_print_ptr(ndr, "info1529", r->info1529);
11822 ndr->depth++;
11823 if (r->info1529) {
11824 ndr_print_srvsvc_NetSrvInfo1529(ndr, "info1529", r->info1529);
11826 ndr->depth--;
11827 break;
11829 case 1530:
11830 ndr_print_ptr(ndr, "info1530", r->info1530);
11831 ndr->depth++;
11832 if (r->info1530) {
11833 ndr_print_srvsvc_NetSrvInfo1530(ndr, "info1530", r->info1530);
11835 ndr->depth--;
11836 break;
11838 case 1533:
11839 ndr_print_ptr(ndr, "info1533", r->info1533);
11840 ndr->depth++;
11841 if (r->info1533) {
11842 ndr_print_srvsvc_NetSrvInfo1533(ndr, "info1533", r->info1533);
11844 ndr->depth--;
11845 break;
11847 case 1534:
11848 ndr_print_ptr(ndr, "info1534", r->info1534);
11849 ndr->depth++;
11850 if (r->info1534) {
11851 ndr_print_srvsvc_NetSrvInfo1534(ndr, "info1534", r->info1534);
11853 ndr->depth--;
11854 break;
11856 case 1535:
11857 ndr_print_ptr(ndr, "info1535", r->info1535);
11858 ndr->depth++;
11859 if (r->info1535) {
11860 ndr_print_srvsvc_NetSrvInfo1535(ndr, "info1535", r->info1535);
11862 ndr->depth--;
11863 break;
11865 case 1536:
11866 ndr_print_ptr(ndr, "info1536", r->info1536);
11867 ndr->depth++;
11868 if (r->info1536) {
11869 ndr_print_srvsvc_NetSrvInfo1536(ndr, "info1536", r->info1536);
11871 ndr->depth--;
11872 break;
11874 case 1537:
11875 ndr_print_ptr(ndr, "info1537", r->info1537);
11876 ndr->depth++;
11877 if (r->info1537) {
11878 ndr_print_srvsvc_NetSrvInfo1537(ndr, "info1537", r->info1537);
11880 ndr->depth--;
11881 break;
11883 case 1538:
11884 ndr_print_ptr(ndr, "info1538", r->info1538);
11885 ndr->depth++;
11886 if (r->info1538) {
11887 ndr_print_srvsvc_NetSrvInfo1538(ndr, "info1538", r->info1538);
11889 ndr->depth--;
11890 break;
11892 case 1539:
11893 ndr_print_ptr(ndr, "info1539", r->info1539);
11894 ndr->depth++;
11895 if (r->info1539) {
11896 ndr_print_srvsvc_NetSrvInfo1539(ndr, "info1539", r->info1539);
11898 ndr->depth--;
11899 break;
11901 case 1540:
11902 ndr_print_ptr(ndr, "info1540", r->info1540);
11903 ndr->depth++;
11904 if (r->info1540) {
11905 ndr_print_srvsvc_NetSrvInfo1540(ndr, "info1540", r->info1540);
11907 ndr->depth--;
11908 break;
11910 case 1541:
11911 ndr_print_ptr(ndr, "info1541", r->info1541);
11912 ndr->depth++;
11913 if (r->info1541) {
11914 ndr_print_srvsvc_NetSrvInfo1541(ndr, "info1541", r->info1541);
11916 ndr->depth--;
11917 break;
11919 case 1542:
11920 ndr_print_ptr(ndr, "info1542", r->info1542);
11921 ndr->depth++;
11922 if (r->info1542) {
11923 ndr_print_srvsvc_NetSrvInfo1542(ndr, "info1542", r->info1542);
11925 ndr->depth--;
11926 break;
11928 case 1543:
11929 ndr_print_ptr(ndr, "info1543", r->info1543);
11930 ndr->depth++;
11931 if (r->info1543) {
11932 ndr_print_srvsvc_NetSrvInfo1543(ndr, "info1543", r->info1543);
11934 ndr->depth--;
11935 break;
11937 case 1544:
11938 ndr_print_ptr(ndr, "info1544", r->info1544);
11939 ndr->depth++;
11940 if (r->info1544) {
11941 ndr_print_srvsvc_NetSrvInfo1544(ndr, "info1544", r->info1544);
11943 ndr->depth--;
11944 break;
11946 case 1545:
11947 ndr_print_ptr(ndr, "info1545", r->info1545);
11948 ndr->depth++;
11949 if (r->info1545) {
11950 ndr_print_srvsvc_NetSrvInfo1545(ndr, "info1545", r->info1545);
11952 ndr->depth--;
11953 break;
11955 case 1546:
11956 ndr_print_ptr(ndr, "info1546", r->info1546);
11957 ndr->depth++;
11958 if (r->info1546) {
11959 ndr_print_srvsvc_NetSrvInfo1546(ndr, "info1546", r->info1546);
11961 ndr->depth--;
11962 break;
11964 case 1547:
11965 ndr_print_ptr(ndr, "info1547", r->info1547);
11966 ndr->depth++;
11967 if (r->info1547) {
11968 ndr_print_srvsvc_NetSrvInfo1547(ndr, "info1547", r->info1547);
11970 ndr->depth--;
11971 break;
11973 case 1548:
11974 ndr_print_ptr(ndr, "info1548", r->info1548);
11975 ndr->depth++;
11976 if (r->info1548) {
11977 ndr_print_srvsvc_NetSrvInfo1548(ndr, "info1548", r->info1548);
11979 ndr->depth--;
11980 break;
11982 case 1549:
11983 ndr_print_ptr(ndr, "info1549", r->info1549);
11984 ndr->depth++;
11985 if (r->info1549) {
11986 ndr_print_srvsvc_NetSrvInfo1549(ndr, "info1549", r->info1549);
11988 ndr->depth--;
11989 break;
11991 case 1550:
11992 ndr_print_ptr(ndr, "info1550", r->info1550);
11993 ndr->depth++;
11994 if (r->info1550) {
11995 ndr_print_srvsvc_NetSrvInfo1550(ndr, "info1550", r->info1550);
11997 ndr->depth--;
11998 break;
12000 case 1552:
12001 ndr_print_ptr(ndr, "info1552", r->info1552);
12002 ndr->depth++;
12003 if (r->info1552) {
12004 ndr_print_srvsvc_NetSrvInfo1552(ndr, "info1552", r->info1552);
12006 ndr->depth--;
12007 break;
12009 case 1553:
12010 ndr_print_ptr(ndr, "info1553", r->info1553);
12011 ndr->depth++;
12012 if (r->info1553) {
12013 ndr_print_srvsvc_NetSrvInfo1553(ndr, "info1553", r->info1553);
12015 ndr->depth--;
12016 break;
12018 case 1554:
12019 ndr_print_ptr(ndr, "info1554", r->info1554);
12020 ndr->depth++;
12021 if (r->info1554) {
12022 ndr_print_srvsvc_NetSrvInfo1554(ndr, "info1554", r->info1554);
12024 ndr->depth--;
12025 break;
12027 case 1555:
12028 ndr_print_ptr(ndr, "info1555", r->info1555);
12029 ndr->depth++;
12030 if (r->info1555) {
12031 ndr_print_srvsvc_NetSrvInfo1555(ndr, "info1555", r->info1555);
12033 ndr->depth--;
12034 break;
12036 case 1556:
12037 ndr_print_ptr(ndr, "info1556", r->info1556);
12038 ndr->depth++;
12039 if (r->info1556) {
12040 ndr_print_srvsvc_NetSrvInfo1556(ndr, "info1556", r->info1556);
12042 ndr->depth--;
12043 break;
12045 default:
12046 break;
12051 static enum ndr_err_code ndr_push_srvsvc_NetDiskInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetDiskInfo0 *r)
12053 if (ndr_flags & NDR_SCALARS) {
12054 NDR_CHECK(ndr_push_align(ndr, 4));
12055 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
12056 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen(r->disk) + 1));
12057 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->disk, strlen(r->disk) + 1, sizeof(uint16_t), CH_UTF16));
12058 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
12060 if (ndr_flags & NDR_BUFFERS) {
12062 return NDR_ERR_SUCCESS;
12065 static enum ndr_err_code ndr_pull_srvsvc_NetDiskInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetDiskInfo0 *r)
12067 uint32_t size_disk_0 = 0;
12068 if (ndr_flags & NDR_SCALARS) {
12069 NDR_CHECK(ndr_pull_align(ndr, 4));
12070 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__disk_offset));
12071 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__disk_length));
12072 size_disk_0 = r->__disk_length;
12073 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->disk, size_disk_0, sizeof(uint16_t), CH_UTF16));
12074 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
12076 if (ndr_flags & NDR_BUFFERS) {
12078 return NDR_ERR_SUCCESS;
12081 _PUBLIC_ void ndr_print_srvsvc_NetDiskInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetDiskInfo0 *r)
12083 ndr_print_struct(ndr, name, "srvsvc_NetDiskInfo0");
12084 ndr->depth++;
12085 ndr_print_uint32(ndr, "__disk_offset", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->__disk_offset);
12086 ndr_print_uint32(ndr, "__disk_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen(r->disk) + 1:r->__disk_length);
12087 ndr_print_string(ndr, "disk", r->disk);
12088 ndr->depth--;
12091 static enum ndr_err_code ndr_push_srvsvc_NetDiskInfo(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetDiskInfo *r)
12093 uint32_t cntr_disks_1;
12094 if (ndr_flags & NDR_SCALARS) {
12095 NDR_CHECK(ndr_push_align(ndr, 5));
12096 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
12097 NDR_CHECK(ndr_push_unique_ptr(ndr, r->disks));
12098 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
12100 if (ndr_flags & NDR_BUFFERS) {
12101 if (r->disks) {
12102 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
12103 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12104 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
12105 for (cntr_disks_1 = 0; cntr_disks_1 < r->count; cntr_disks_1++) {
12106 NDR_CHECK(ndr_push_srvsvc_NetDiskInfo0(ndr, NDR_SCALARS, &r->disks[cntr_disks_1]));
12110 return NDR_ERR_SUCCESS;
12113 static enum ndr_err_code ndr_pull_srvsvc_NetDiskInfo(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetDiskInfo *r)
12115 uint32_t _ptr_disks;
12116 uint32_t size_disks_1 = 0;
12117 uint32_t length_disks_1 = 0;
12118 uint32_t cntr_disks_1;
12119 TALLOC_CTX *_mem_save_disks_0;
12120 TALLOC_CTX *_mem_save_disks_1;
12121 if (ndr_flags & NDR_SCALARS) {
12122 NDR_CHECK(ndr_pull_align(ndr, 5));
12123 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
12124 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_disks));
12125 if (_ptr_disks) {
12126 NDR_PULL_ALLOC(ndr, r->disks);
12127 } else {
12128 r->disks = NULL;
12130 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
12132 if (ndr_flags & NDR_BUFFERS) {
12133 if (r->disks) {
12134 _mem_save_disks_0 = NDR_PULL_GET_MEM_CTX(ndr);
12135 NDR_PULL_SET_MEM_CTX(ndr, r->disks, 0);
12136 NDR_CHECK(ndr_pull_array_size(ndr, &r->disks));
12137 NDR_CHECK(ndr_pull_array_length(ndr, &r->disks));
12138 size_disks_1 = ndr_get_array_size(ndr, &r->disks);
12139 length_disks_1 = ndr_get_array_length(ndr, &r->disks);
12140 if (length_disks_1 > size_disks_1) {
12141 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_disks_1, length_disks_1);
12143 NDR_PULL_ALLOC_N(ndr, r->disks, size_disks_1);
12144 _mem_save_disks_1 = NDR_PULL_GET_MEM_CTX(ndr);
12145 NDR_PULL_SET_MEM_CTX(ndr, r->disks, 0);
12146 for (cntr_disks_1 = 0; cntr_disks_1 < length_disks_1; cntr_disks_1++) {
12147 NDR_CHECK(ndr_pull_srvsvc_NetDiskInfo0(ndr, NDR_SCALARS, &r->disks[cntr_disks_1]));
12149 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_disks_1, 0);
12150 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_disks_0, 0);
12152 if (r->disks) {
12153 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->disks, r->count));
12155 if (r->disks) {
12156 NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->disks, r->count));
12159 return NDR_ERR_SUCCESS;
12162 _PUBLIC_ void ndr_print_srvsvc_NetDiskInfo(struct ndr_print *ndr, const char *name, const struct srvsvc_NetDiskInfo *r)
12164 uint32_t cntr_disks_1;
12165 ndr_print_struct(ndr, name, "srvsvc_NetDiskInfo");
12166 ndr->depth++;
12167 ndr_print_uint32(ndr, "count", r->count);
12168 ndr_print_ptr(ndr, "disks", r->disks);
12169 ndr->depth++;
12170 if (r->disks) {
12171 ndr->print(ndr, "%s: ARRAY(%d)", "disks", (int)r->count);
12172 ndr->depth++;
12173 for (cntr_disks_1=0;cntr_disks_1<r->count;cntr_disks_1++) {
12174 char *idx_1=NULL;
12175 if (asprintf(&idx_1, "[%d]", cntr_disks_1) != -1) {
12176 ndr_print_srvsvc_NetDiskInfo0(ndr, "disks", &r->disks[cntr_disks_1]);
12177 free(idx_1);
12180 ndr->depth--;
12182 ndr->depth--;
12183 ndr->depth--;
12186 static enum ndr_err_code ndr_push_srvsvc_Statistics(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_Statistics *r)
12188 if (ndr_flags & NDR_SCALARS) {
12189 NDR_CHECK(ndr_push_align(ndr, 4));
12190 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->start));
12191 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fopens));
12192 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->devopens));
12193 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->jobsqueued));
12194 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sopens));
12195 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->stimeouts));
12196 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->serrorout));
12197 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pwerrors));
12198 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->permerrors));
12199 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->syserrors));
12200 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bytessent_low));
12201 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bytessent_high));
12202 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bytesrcvd_low));
12203 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bytesrcvd_high));
12204 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->avresponse));
12205 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reqbufneed));
12206 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bigbufneed));
12207 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
12209 if (ndr_flags & NDR_BUFFERS) {
12211 return NDR_ERR_SUCCESS;
12214 static enum ndr_err_code ndr_pull_srvsvc_Statistics(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_Statistics *r)
12216 if (ndr_flags & NDR_SCALARS) {
12217 NDR_CHECK(ndr_pull_align(ndr, 4));
12218 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->start));
12219 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fopens));
12220 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->devopens));
12221 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->jobsqueued));
12222 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sopens));
12223 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->stimeouts));
12224 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->serrorout));
12225 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pwerrors));
12226 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->permerrors));
12227 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->syserrors));
12228 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bytessent_low));
12229 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bytessent_high));
12230 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bytesrcvd_low));
12231 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bytesrcvd_high));
12232 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->avresponse));
12233 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reqbufneed));
12234 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bigbufneed));
12235 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
12237 if (ndr_flags & NDR_BUFFERS) {
12239 return NDR_ERR_SUCCESS;
12242 _PUBLIC_ void ndr_print_srvsvc_Statistics(struct ndr_print *ndr, const char *name, const struct srvsvc_Statistics *r)
12244 ndr_print_struct(ndr, name, "srvsvc_Statistics");
12245 ndr->depth++;
12246 ndr_print_uint32(ndr, "start", r->start);
12247 ndr_print_uint32(ndr, "fopens", r->fopens);
12248 ndr_print_uint32(ndr, "devopens", r->devopens);
12249 ndr_print_uint32(ndr, "jobsqueued", r->jobsqueued);
12250 ndr_print_uint32(ndr, "sopens", r->sopens);
12251 ndr_print_uint32(ndr, "stimeouts", r->stimeouts);
12252 ndr_print_uint32(ndr, "serrorout", r->serrorout);
12253 ndr_print_uint32(ndr, "pwerrors", r->pwerrors);
12254 ndr_print_uint32(ndr, "permerrors", r->permerrors);
12255 ndr_print_uint32(ndr, "syserrors", r->syserrors);
12256 ndr_print_uint32(ndr, "bytessent_low", r->bytessent_low);
12257 ndr_print_uint32(ndr, "bytessent_high", r->bytessent_high);
12258 ndr_print_uint32(ndr, "bytesrcvd_low", r->bytesrcvd_low);
12259 ndr_print_uint32(ndr, "bytesrcvd_high", r->bytesrcvd_high);
12260 ndr_print_uint32(ndr, "avresponse", r->avresponse);
12261 ndr_print_uint32(ndr, "reqbufneed", r->reqbufneed);
12262 ndr_print_uint32(ndr, "bigbufneed", r->bigbufneed);
12263 ndr->depth--;
12266 static enum ndr_err_code ndr_push_srvsvc_NetTransportInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportInfo0 *r)
12268 if (ndr_flags & NDR_SCALARS) {
12269 NDR_CHECK(ndr_push_align(ndr, 5));
12270 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->vcs));
12271 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
12272 NDR_CHECK(ndr_push_unique_ptr(ndr, r->addr));
12273 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->addr_len));
12274 NDR_CHECK(ndr_push_unique_ptr(ndr, r->net_addr));
12275 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
12277 if (ndr_flags & NDR_BUFFERS) {
12278 if (r->name) {
12279 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
12280 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12281 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
12282 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12284 if (r->addr) {
12285 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->addr_len));
12286 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->addr, r->addr_len));
12288 if (r->net_addr) {
12289 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
12290 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12291 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
12292 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->net_addr, ndr_charset_length(r->net_addr, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12295 return NDR_ERR_SUCCESS;
12298 static enum ndr_err_code ndr_pull_srvsvc_NetTransportInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportInfo0 *r)
12300 uint32_t _ptr_name;
12301 uint32_t size_name_1 = 0;
12302 uint32_t length_name_1 = 0;
12303 TALLOC_CTX *_mem_save_name_0;
12304 uint32_t _ptr_addr;
12305 uint32_t size_addr_1 = 0;
12306 TALLOC_CTX *_mem_save_addr_0;
12307 uint32_t _ptr_net_addr;
12308 uint32_t size_net_addr_1 = 0;
12309 uint32_t length_net_addr_1 = 0;
12310 TALLOC_CTX *_mem_save_net_addr_0;
12311 if (ndr_flags & NDR_SCALARS) {
12312 NDR_CHECK(ndr_pull_align(ndr, 5));
12313 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->vcs));
12314 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
12315 if (_ptr_name) {
12316 NDR_PULL_ALLOC(ndr, r->name);
12317 } else {
12318 r->name = NULL;
12320 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_addr));
12321 if (_ptr_addr) {
12322 NDR_PULL_ALLOC(ndr, r->addr);
12323 } else {
12324 r->addr = NULL;
12326 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->addr_len));
12327 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_net_addr));
12328 if (_ptr_net_addr) {
12329 NDR_PULL_ALLOC(ndr, r->net_addr);
12330 } else {
12331 r->net_addr = NULL;
12333 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
12335 if (ndr_flags & NDR_BUFFERS) {
12336 if (r->name) {
12337 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
12338 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
12339 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
12340 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
12341 size_name_1 = ndr_get_array_size(ndr, &r->name);
12342 length_name_1 = ndr_get_array_length(ndr, &r->name);
12343 if (length_name_1 > size_name_1) {
12344 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_name_1, length_name_1);
12346 NDR_CHECK(ndr_check_string_terminator(ndr, length_name_1, sizeof(uint16_t)));
12347 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, length_name_1, sizeof(uint16_t), CH_UTF16));
12348 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
12350 if (r->addr) {
12351 _mem_save_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
12352 NDR_PULL_SET_MEM_CTX(ndr, r->addr, 0);
12353 NDR_CHECK(ndr_pull_array_size(ndr, &r->addr));
12354 size_addr_1 = ndr_get_array_size(ndr, &r->addr);
12355 NDR_PULL_ALLOC_N(ndr, r->addr, size_addr_1);
12356 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->addr, size_addr_1));
12357 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_addr_0, 0);
12359 if (r->net_addr) {
12360 _mem_save_net_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
12361 NDR_PULL_SET_MEM_CTX(ndr, r->net_addr, 0);
12362 NDR_CHECK(ndr_pull_array_size(ndr, &r->net_addr));
12363 NDR_CHECK(ndr_pull_array_length(ndr, &r->net_addr));
12364 size_net_addr_1 = ndr_get_array_size(ndr, &r->net_addr);
12365 length_net_addr_1 = ndr_get_array_length(ndr, &r->net_addr);
12366 if (length_net_addr_1 > size_net_addr_1) {
12367 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_net_addr_1, length_net_addr_1);
12369 NDR_CHECK(ndr_check_string_terminator(ndr, length_net_addr_1, sizeof(uint16_t)));
12370 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->net_addr, length_net_addr_1, sizeof(uint16_t), CH_UTF16));
12371 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_net_addr_0, 0);
12373 if (r->addr) {
12374 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->addr, r->addr_len));
12377 return NDR_ERR_SUCCESS;
12380 _PUBLIC_ void ndr_print_srvsvc_NetTransportInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportInfo0 *r)
12382 ndr_print_struct(ndr, name, "srvsvc_NetTransportInfo0");
12383 ndr->depth++;
12384 ndr_print_uint32(ndr, "vcs", r->vcs);
12385 ndr_print_ptr(ndr, "name", r->name);
12386 ndr->depth++;
12387 if (r->name) {
12388 ndr_print_string(ndr, "name", r->name);
12390 ndr->depth--;
12391 ndr_print_ptr(ndr, "addr", r->addr);
12392 ndr->depth++;
12393 if (r->addr) {
12394 ndr_print_array_uint8(ndr, "addr", r->addr, r->addr_len);
12396 ndr->depth--;
12397 ndr_print_uint32(ndr, "addr_len", r->addr_len);
12398 ndr_print_ptr(ndr, "net_addr", r->net_addr);
12399 ndr->depth++;
12400 if (r->net_addr) {
12401 ndr_print_string(ndr, "net_addr", r->net_addr);
12403 ndr->depth--;
12404 ndr->depth--;
12407 static enum ndr_err_code ndr_push_srvsvc_NetTransportCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportCtr0 *r)
12409 uint32_t cntr_array_1;
12410 if (ndr_flags & NDR_SCALARS) {
12411 NDR_CHECK(ndr_push_align(ndr, 5));
12412 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
12413 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
12414 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
12416 if (ndr_flags & NDR_BUFFERS) {
12417 if (r->array) {
12418 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
12419 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12420 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
12422 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12423 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
12427 return NDR_ERR_SUCCESS;
12430 static enum ndr_err_code ndr_pull_srvsvc_NetTransportCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportCtr0 *r)
12432 uint32_t _ptr_array;
12433 uint32_t size_array_1 = 0;
12434 uint32_t cntr_array_1;
12435 TALLOC_CTX *_mem_save_array_0;
12436 TALLOC_CTX *_mem_save_array_1;
12437 if (ndr_flags & NDR_SCALARS) {
12438 NDR_CHECK(ndr_pull_align(ndr, 5));
12439 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
12440 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
12441 if (_ptr_array) {
12442 NDR_PULL_ALLOC(ndr, r->array);
12443 } else {
12444 r->array = NULL;
12446 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
12448 if (ndr_flags & NDR_BUFFERS) {
12449 if (r->array) {
12450 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
12451 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
12452 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
12453 size_array_1 = ndr_get_array_size(ndr, &r->array);
12454 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
12455 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
12456 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
12457 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
12458 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
12460 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
12461 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
12463 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
12464 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
12466 if (r->array) {
12467 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
12470 return NDR_ERR_SUCCESS;
12473 _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportCtr0 *r)
12475 uint32_t cntr_array_1;
12476 ndr_print_struct(ndr, name, "srvsvc_NetTransportCtr0");
12477 ndr->depth++;
12478 ndr_print_uint32(ndr, "count", r->count);
12479 ndr_print_ptr(ndr, "array", r->array);
12480 ndr->depth++;
12481 if (r->array) {
12482 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
12483 ndr->depth++;
12484 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
12485 char *idx_1=NULL;
12486 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
12487 ndr_print_srvsvc_NetTransportInfo0(ndr, "array", &r->array[cntr_array_1]);
12488 free(idx_1);
12491 ndr->depth--;
12493 ndr->depth--;
12494 ndr->depth--;
12497 static enum ndr_err_code ndr_push_srvsvc_NetTransportInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportInfo1 *r)
12499 if (ndr_flags & NDR_SCALARS) {
12500 NDR_CHECK(ndr_push_align(ndr, 5));
12501 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->vcs));
12502 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
12503 NDR_CHECK(ndr_push_unique_ptr(ndr, r->addr));
12504 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->addr_len));
12505 NDR_CHECK(ndr_push_unique_ptr(ndr, r->net_addr));
12506 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
12507 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
12509 if (ndr_flags & NDR_BUFFERS) {
12510 if (r->name) {
12511 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
12512 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12513 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
12514 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12516 if (r->addr) {
12517 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->addr_len));
12518 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->addr, r->addr_len));
12520 if (r->net_addr) {
12521 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
12522 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12523 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
12524 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->net_addr, ndr_charset_length(r->net_addr, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12526 if (r->domain) {
12527 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
12528 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12529 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
12530 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12533 return NDR_ERR_SUCCESS;
12536 static enum ndr_err_code ndr_pull_srvsvc_NetTransportInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportInfo1 *r)
12538 uint32_t _ptr_name;
12539 uint32_t size_name_1 = 0;
12540 uint32_t length_name_1 = 0;
12541 TALLOC_CTX *_mem_save_name_0;
12542 uint32_t _ptr_addr;
12543 uint32_t size_addr_1 = 0;
12544 TALLOC_CTX *_mem_save_addr_0;
12545 uint32_t _ptr_net_addr;
12546 uint32_t size_net_addr_1 = 0;
12547 uint32_t length_net_addr_1 = 0;
12548 TALLOC_CTX *_mem_save_net_addr_0;
12549 uint32_t _ptr_domain;
12550 uint32_t size_domain_1 = 0;
12551 uint32_t length_domain_1 = 0;
12552 TALLOC_CTX *_mem_save_domain_0;
12553 if (ndr_flags & NDR_SCALARS) {
12554 NDR_CHECK(ndr_pull_align(ndr, 5));
12555 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->vcs));
12556 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
12557 if (_ptr_name) {
12558 NDR_PULL_ALLOC(ndr, r->name);
12559 } else {
12560 r->name = NULL;
12562 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_addr));
12563 if (_ptr_addr) {
12564 NDR_PULL_ALLOC(ndr, r->addr);
12565 } else {
12566 r->addr = NULL;
12568 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->addr_len));
12569 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_net_addr));
12570 if (_ptr_net_addr) {
12571 NDR_PULL_ALLOC(ndr, r->net_addr);
12572 } else {
12573 r->net_addr = NULL;
12575 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
12576 if (_ptr_domain) {
12577 NDR_PULL_ALLOC(ndr, r->domain);
12578 } else {
12579 r->domain = NULL;
12581 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
12583 if (ndr_flags & NDR_BUFFERS) {
12584 if (r->name) {
12585 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
12586 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
12587 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
12588 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
12589 size_name_1 = ndr_get_array_size(ndr, &r->name);
12590 length_name_1 = ndr_get_array_length(ndr, &r->name);
12591 if (length_name_1 > size_name_1) {
12592 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_name_1, length_name_1);
12594 NDR_CHECK(ndr_check_string_terminator(ndr, length_name_1, sizeof(uint16_t)));
12595 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, length_name_1, sizeof(uint16_t), CH_UTF16));
12596 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
12598 if (r->addr) {
12599 _mem_save_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
12600 NDR_PULL_SET_MEM_CTX(ndr, r->addr, 0);
12601 NDR_CHECK(ndr_pull_array_size(ndr, &r->addr));
12602 size_addr_1 = ndr_get_array_size(ndr, &r->addr);
12603 NDR_PULL_ALLOC_N(ndr, r->addr, size_addr_1);
12604 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->addr, size_addr_1));
12605 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_addr_0, 0);
12607 if (r->net_addr) {
12608 _mem_save_net_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
12609 NDR_PULL_SET_MEM_CTX(ndr, r->net_addr, 0);
12610 NDR_CHECK(ndr_pull_array_size(ndr, &r->net_addr));
12611 NDR_CHECK(ndr_pull_array_length(ndr, &r->net_addr));
12612 size_net_addr_1 = ndr_get_array_size(ndr, &r->net_addr);
12613 length_net_addr_1 = ndr_get_array_length(ndr, &r->net_addr);
12614 if (length_net_addr_1 > size_net_addr_1) {
12615 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_net_addr_1, length_net_addr_1);
12617 NDR_CHECK(ndr_check_string_terminator(ndr, length_net_addr_1, sizeof(uint16_t)));
12618 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->net_addr, length_net_addr_1, sizeof(uint16_t), CH_UTF16));
12619 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_net_addr_0, 0);
12621 if (r->domain) {
12622 _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
12623 NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
12624 NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
12625 NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
12626 size_domain_1 = ndr_get_array_size(ndr, &r->domain);
12627 length_domain_1 = ndr_get_array_length(ndr, &r->domain);
12628 if (length_domain_1 > size_domain_1) {
12629 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_domain_1, length_domain_1);
12631 NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_1, sizeof(uint16_t)));
12632 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, length_domain_1, sizeof(uint16_t), CH_UTF16));
12633 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
12635 if (r->addr) {
12636 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->addr, r->addr_len));
12639 return NDR_ERR_SUCCESS;
12642 _PUBLIC_ void ndr_print_srvsvc_NetTransportInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportInfo1 *r)
12644 ndr_print_struct(ndr, name, "srvsvc_NetTransportInfo1");
12645 ndr->depth++;
12646 ndr_print_uint32(ndr, "vcs", r->vcs);
12647 ndr_print_ptr(ndr, "name", r->name);
12648 ndr->depth++;
12649 if (r->name) {
12650 ndr_print_string(ndr, "name", r->name);
12652 ndr->depth--;
12653 ndr_print_ptr(ndr, "addr", r->addr);
12654 ndr->depth++;
12655 if (r->addr) {
12656 ndr_print_array_uint8(ndr, "addr", r->addr, r->addr_len);
12658 ndr->depth--;
12659 ndr_print_uint32(ndr, "addr_len", r->addr_len);
12660 ndr_print_ptr(ndr, "net_addr", r->net_addr);
12661 ndr->depth++;
12662 if (r->net_addr) {
12663 ndr_print_string(ndr, "net_addr", r->net_addr);
12665 ndr->depth--;
12666 ndr_print_ptr(ndr, "domain", r->domain);
12667 ndr->depth++;
12668 if (r->domain) {
12669 ndr_print_string(ndr, "domain", r->domain);
12671 ndr->depth--;
12672 ndr->depth--;
12675 static enum ndr_err_code ndr_push_srvsvc_NetTransportCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportCtr1 *r)
12677 uint32_t cntr_array_1;
12678 if (ndr_flags & NDR_SCALARS) {
12679 NDR_CHECK(ndr_push_align(ndr, 5));
12680 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
12681 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
12682 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
12684 if (ndr_flags & NDR_BUFFERS) {
12685 if (r->array) {
12686 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
12687 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12688 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
12690 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12691 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
12695 return NDR_ERR_SUCCESS;
12698 static enum ndr_err_code ndr_pull_srvsvc_NetTransportCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportCtr1 *r)
12700 uint32_t _ptr_array;
12701 uint32_t size_array_1 = 0;
12702 uint32_t cntr_array_1;
12703 TALLOC_CTX *_mem_save_array_0;
12704 TALLOC_CTX *_mem_save_array_1;
12705 if (ndr_flags & NDR_SCALARS) {
12706 NDR_CHECK(ndr_pull_align(ndr, 5));
12707 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
12708 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
12709 if (_ptr_array) {
12710 NDR_PULL_ALLOC(ndr, r->array);
12711 } else {
12712 r->array = NULL;
12714 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
12716 if (ndr_flags & NDR_BUFFERS) {
12717 if (r->array) {
12718 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
12719 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
12720 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
12721 size_array_1 = ndr_get_array_size(ndr, &r->array);
12722 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
12723 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
12724 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
12725 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
12726 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
12728 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
12729 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
12731 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
12732 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
12734 if (r->array) {
12735 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
12738 return NDR_ERR_SUCCESS;
12741 _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportCtr1 *r)
12743 uint32_t cntr_array_1;
12744 ndr_print_struct(ndr, name, "srvsvc_NetTransportCtr1");
12745 ndr->depth++;
12746 ndr_print_uint32(ndr, "count", r->count);
12747 ndr_print_ptr(ndr, "array", r->array);
12748 ndr->depth++;
12749 if (r->array) {
12750 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
12751 ndr->depth++;
12752 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
12753 char *idx_1=NULL;
12754 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
12755 ndr_print_srvsvc_NetTransportInfo1(ndr, "array", &r->array[cntr_array_1]);
12756 free(idx_1);
12759 ndr->depth--;
12761 ndr->depth--;
12762 ndr->depth--;
12765 static enum ndr_err_code ndr_push_srvsvc_NetTransportInfo2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportInfo2 *r)
12767 if (ndr_flags & NDR_SCALARS) {
12768 NDR_CHECK(ndr_push_align(ndr, 5));
12769 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->vcs));
12770 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
12771 NDR_CHECK(ndr_push_unique_ptr(ndr, r->addr));
12772 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->addr_len));
12773 NDR_CHECK(ndr_push_unique_ptr(ndr, r->net_addr));
12774 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
12775 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown));
12776 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
12778 if (ndr_flags & NDR_BUFFERS) {
12779 if (r->name) {
12780 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
12781 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12782 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
12783 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12785 if (r->addr) {
12786 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->addr_len));
12787 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->addr, r->addr_len));
12789 if (r->net_addr) {
12790 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
12791 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12792 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
12793 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->net_addr, ndr_charset_length(r->net_addr, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12795 if (r->domain) {
12796 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
12797 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12798 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
12799 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12802 return NDR_ERR_SUCCESS;
12805 static enum ndr_err_code ndr_pull_srvsvc_NetTransportInfo2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportInfo2 *r)
12807 uint32_t _ptr_name;
12808 uint32_t size_name_1 = 0;
12809 uint32_t length_name_1 = 0;
12810 TALLOC_CTX *_mem_save_name_0;
12811 uint32_t _ptr_addr;
12812 uint32_t size_addr_1 = 0;
12813 TALLOC_CTX *_mem_save_addr_0;
12814 uint32_t _ptr_net_addr;
12815 uint32_t size_net_addr_1 = 0;
12816 uint32_t length_net_addr_1 = 0;
12817 TALLOC_CTX *_mem_save_net_addr_0;
12818 uint32_t _ptr_domain;
12819 uint32_t size_domain_1 = 0;
12820 uint32_t length_domain_1 = 0;
12821 TALLOC_CTX *_mem_save_domain_0;
12822 if (ndr_flags & NDR_SCALARS) {
12823 NDR_CHECK(ndr_pull_align(ndr, 5));
12824 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->vcs));
12825 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
12826 if (_ptr_name) {
12827 NDR_PULL_ALLOC(ndr, r->name);
12828 } else {
12829 r->name = NULL;
12831 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_addr));
12832 if (_ptr_addr) {
12833 NDR_PULL_ALLOC(ndr, r->addr);
12834 } else {
12835 r->addr = NULL;
12837 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->addr_len));
12838 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_net_addr));
12839 if (_ptr_net_addr) {
12840 NDR_PULL_ALLOC(ndr, r->net_addr);
12841 } else {
12842 r->net_addr = NULL;
12844 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
12845 if (_ptr_domain) {
12846 NDR_PULL_ALLOC(ndr, r->domain);
12847 } else {
12848 r->domain = NULL;
12850 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown));
12851 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
12853 if (ndr_flags & NDR_BUFFERS) {
12854 if (r->name) {
12855 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
12856 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
12857 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
12858 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
12859 size_name_1 = ndr_get_array_size(ndr, &r->name);
12860 length_name_1 = ndr_get_array_length(ndr, &r->name);
12861 if (length_name_1 > size_name_1) {
12862 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_name_1, length_name_1);
12864 NDR_CHECK(ndr_check_string_terminator(ndr, length_name_1, sizeof(uint16_t)));
12865 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, length_name_1, sizeof(uint16_t), CH_UTF16));
12866 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
12868 if (r->addr) {
12869 _mem_save_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
12870 NDR_PULL_SET_MEM_CTX(ndr, r->addr, 0);
12871 NDR_CHECK(ndr_pull_array_size(ndr, &r->addr));
12872 size_addr_1 = ndr_get_array_size(ndr, &r->addr);
12873 NDR_PULL_ALLOC_N(ndr, r->addr, size_addr_1);
12874 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->addr, size_addr_1));
12875 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_addr_0, 0);
12877 if (r->net_addr) {
12878 _mem_save_net_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
12879 NDR_PULL_SET_MEM_CTX(ndr, r->net_addr, 0);
12880 NDR_CHECK(ndr_pull_array_size(ndr, &r->net_addr));
12881 NDR_CHECK(ndr_pull_array_length(ndr, &r->net_addr));
12882 size_net_addr_1 = ndr_get_array_size(ndr, &r->net_addr);
12883 length_net_addr_1 = ndr_get_array_length(ndr, &r->net_addr);
12884 if (length_net_addr_1 > size_net_addr_1) {
12885 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_net_addr_1, length_net_addr_1);
12887 NDR_CHECK(ndr_check_string_terminator(ndr, length_net_addr_1, sizeof(uint16_t)));
12888 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->net_addr, length_net_addr_1, sizeof(uint16_t), CH_UTF16));
12889 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_net_addr_0, 0);
12891 if (r->domain) {
12892 _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
12893 NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
12894 NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
12895 NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
12896 size_domain_1 = ndr_get_array_size(ndr, &r->domain);
12897 length_domain_1 = ndr_get_array_length(ndr, &r->domain);
12898 if (length_domain_1 > size_domain_1) {
12899 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_domain_1, length_domain_1);
12901 NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_1, sizeof(uint16_t)));
12902 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, length_domain_1, sizeof(uint16_t), CH_UTF16));
12903 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
12905 if (r->addr) {
12906 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->addr, r->addr_len));
12909 return NDR_ERR_SUCCESS;
12912 _PUBLIC_ void ndr_print_srvsvc_NetTransportInfo2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportInfo2 *r)
12914 ndr_print_struct(ndr, name, "srvsvc_NetTransportInfo2");
12915 ndr->depth++;
12916 ndr_print_uint32(ndr, "vcs", r->vcs);
12917 ndr_print_ptr(ndr, "name", r->name);
12918 ndr->depth++;
12919 if (r->name) {
12920 ndr_print_string(ndr, "name", r->name);
12922 ndr->depth--;
12923 ndr_print_ptr(ndr, "addr", r->addr);
12924 ndr->depth++;
12925 if (r->addr) {
12926 ndr_print_array_uint8(ndr, "addr", r->addr, r->addr_len);
12928 ndr->depth--;
12929 ndr_print_uint32(ndr, "addr_len", r->addr_len);
12930 ndr_print_ptr(ndr, "net_addr", r->net_addr);
12931 ndr->depth++;
12932 if (r->net_addr) {
12933 ndr_print_string(ndr, "net_addr", r->net_addr);
12935 ndr->depth--;
12936 ndr_print_ptr(ndr, "domain", r->domain);
12937 ndr->depth++;
12938 if (r->domain) {
12939 ndr_print_string(ndr, "domain", r->domain);
12941 ndr->depth--;
12942 ndr_print_uint32(ndr, "unknown", r->unknown);
12943 ndr->depth--;
12946 static enum ndr_err_code ndr_push_srvsvc_NetTransportCtr2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportCtr2 *r)
12948 uint32_t cntr_array_1;
12949 if (ndr_flags & NDR_SCALARS) {
12950 NDR_CHECK(ndr_push_align(ndr, 5));
12951 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
12952 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
12953 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
12955 if (ndr_flags & NDR_BUFFERS) {
12956 if (r->array) {
12957 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
12958 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12959 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
12961 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12962 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo2(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
12966 return NDR_ERR_SUCCESS;
12969 static enum ndr_err_code ndr_pull_srvsvc_NetTransportCtr2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportCtr2 *r)
12971 uint32_t _ptr_array;
12972 uint32_t size_array_1 = 0;
12973 uint32_t cntr_array_1;
12974 TALLOC_CTX *_mem_save_array_0;
12975 TALLOC_CTX *_mem_save_array_1;
12976 if (ndr_flags & NDR_SCALARS) {
12977 NDR_CHECK(ndr_pull_align(ndr, 5));
12978 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
12979 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
12980 if (_ptr_array) {
12981 NDR_PULL_ALLOC(ndr, r->array);
12982 } else {
12983 r->array = NULL;
12985 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
12987 if (ndr_flags & NDR_BUFFERS) {
12988 if (r->array) {
12989 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
12990 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
12991 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
12992 size_array_1 = ndr_get_array_size(ndr, &r->array);
12993 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
12994 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
12995 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
12996 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
12997 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
12999 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
13000 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo2(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
13002 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
13003 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
13005 if (r->array) {
13006 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
13009 return NDR_ERR_SUCCESS;
13012 _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportCtr2 *r)
13014 uint32_t cntr_array_1;
13015 ndr_print_struct(ndr, name, "srvsvc_NetTransportCtr2");
13016 ndr->depth++;
13017 ndr_print_uint32(ndr, "count", r->count);
13018 ndr_print_ptr(ndr, "array", r->array);
13019 ndr->depth++;
13020 if (r->array) {
13021 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
13022 ndr->depth++;
13023 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
13024 char *idx_1=NULL;
13025 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
13026 ndr_print_srvsvc_NetTransportInfo2(ndr, "array", &r->array[cntr_array_1]);
13027 free(idx_1);
13030 ndr->depth--;
13032 ndr->depth--;
13033 ndr->depth--;
13036 static enum ndr_err_code ndr_push_srvsvc_NetTransportInfo3(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportInfo3 *r)
13038 if (ndr_flags & NDR_SCALARS) {
13039 NDR_CHECK(ndr_push_align(ndr, 5));
13040 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->vcs));
13041 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
13042 NDR_CHECK(ndr_push_unique_ptr(ndr, r->addr));
13043 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->addr_len));
13044 NDR_CHECK(ndr_push_unique_ptr(ndr, r->net_addr));
13045 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
13046 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
13047 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2));
13048 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->unknown3, 256));
13049 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
13051 if (ndr_flags & NDR_BUFFERS) {
13052 if (r->name) {
13053 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
13054 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
13055 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
13056 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
13058 if (r->addr) {
13059 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->addr_len));
13060 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->addr, r->addr_len));
13062 if (r->net_addr) {
13063 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
13064 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
13065 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
13066 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->net_addr, ndr_charset_length(r->net_addr, CH_UTF16), sizeof(uint16_t), CH_UTF16));
13068 if (r->domain) {
13069 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
13070 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
13071 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
13072 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
13075 return NDR_ERR_SUCCESS;
13078 static enum ndr_err_code ndr_pull_srvsvc_NetTransportInfo3(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportInfo3 *r)
13080 uint32_t _ptr_name;
13081 uint32_t size_name_1 = 0;
13082 uint32_t length_name_1 = 0;
13083 TALLOC_CTX *_mem_save_name_0;
13084 uint32_t _ptr_addr;
13085 uint32_t size_addr_1 = 0;
13086 TALLOC_CTX *_mem_save_addr_0;
13087 uint32_t _ptr_net_addr;
13088 uint32_t size_net_addr_1 = 0;
13089 uint32_t length_net_addr_1 = 0;
13090 TALLOC_CTX *_mem_save_net_addr_0;
13091 uint32_t _ptr_domain;
13092 uint32_t size_domain_1 = 0;
13093 uint32_t length_domain_1 = 0;
13094 TALLOC_CTX *_mem_save_domain_0;
13095 uint32_t size_unknown3_0 = 0;
13096 if (ndr_flags & NDR_SCALARS) {
13097 NDR_CHECK(ndr_pull_align(ndr, 5));
13098 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->vcs));
13099 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
13100 if (_ptr_name) {
13101 NDR_PULL_ALLOC(ndr, r->name);
13102 } else {
13103 r->name = NULL;
13105 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_addr));
13106 if (_ptr_addr) {
13107 NDR_PULL_ALLOC(ndr, r->addr);
13108 } else {
13109 r->addr = NULL;
13111 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->addr_len));
13112 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_net_addr));
13113 if (_ptr_net_addr) {
13114 NDR_PULL_ALLOC(ndr, r->net_addr);
13115 } else {
13116 r->net_addr = NULL;
13118 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
13119 if (_ptr_domain) {
13120 NDR_PULL_ALLOC(ndr, r->domain);
13121 } else {
13122 r->domain = NULL;
13124 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
13125 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
13126 size_unknown3_0 = 256;
13127 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->unknown3, size_unknown3_0));
13128 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
13130 if (ndr_flags & NDR_BUFFERS) {
13131 if (r->name) {
13132 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
13133 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
13134 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
13135 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
13136 size_name_1 = ndr_get_array_size(ndr, &r->name);
13137 length_name_1 = ndr_get_array_length(ndr, &r->name);
13138 if (length_name_1 > size_name_1) {
13139 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_name_1, length_name_1);
13141 NDR_CHECK(ndr_check_string_terminator(ndr, length_name_1, sizeof(uint16_t)));
13142 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, length_name_1, sizeof(uint16_t), CH_UTF16));
13143 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
13145 if (r->addr) {
13146 _mem_save_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
13147 NDR_PULL_SET_MEM_CTX(ndr, r->addr, 0);
13148 NDR_CHECK(ndr_pull_array_size(ndr, &r->addr));
13149 size_addr_1 = ndr_get_array_size(ndr, &r->addr);
13150 NDR_PULL_ALLOC_N(ndr, r->addr, size_addr_1);
13151 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->addr, size_addr_1));
13152 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_addr_0, 0);
13154 if (r->net_addr) {
13155 _mem_save_net_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
13156 NDR_PULL_SET_MEM_CTX(ndr, r->net_addr, 0);
13157 NDR_CHECK(ndr_pull_array_size(ndr, &r->net_addr));
13158 NDR_CHECK(ndr_pull_array_length(ndr, &r->net_addr));
13159 size_net_addr_1 = ndr_get_array_size(ndr, &r->net_addr);
13160 length_net_addr_1 = ndr_get_array_length(ndr, &r->net_addr);
13161 if (length_net_addr_1 > size_net_addr_1) {
13162 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_net_addr_1, length_net_addr_1);
13164 NDR_CHECK(ndr_check_string_terminator(ndr, length_net_addr_1, sizeof(uint16_t)));
13165 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->net_addr, length_net_addr_1, sizeof(uint16_t), CH_UTF16));
13166 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_net_addr_0, 0);
13168 if (r->domain) {
13169 _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
13170 NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
13171 NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
13172 NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
13173 size_domain_1 = ndr_get_array_size(ndr, &r->domain);
13174 length_domain_1 = ndr_get_array_length(ndr, &r->domain);
13175 if (length_domain_1 > size_domain_1) {
13176 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_domain_1, length_domain_1);
13178 NDR_CHECK(ndr_check_string_terminator(ndr, length_domain_1, sizeof(uint16_t)));
13179 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, length_domain_1, sizeof(uint16_t), CH_UTF16));
13180 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
13182 if (r->addr) {
13183 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->addr, r->addr_len));
13186 return NDR_ERR_SUCCESS;
13189 _PUBLIC_ void ndr_print_srvsvc_NetTransportInfo3(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportInfo3 *r)
13191 ndr_print_struct(ndr, name, "srvsvc_NetTransportInfo3");
13192 ndr->depth++;
13193 ndr_print_uint32(ndr, "vcs", r->vcs);
13194 ndr_print_ptr(ndr, "name", r->name);
13195 ndr->depth++;
13196 if (r->name) {
13197 ndr_print_string(ndr, "name", r->name);
13199 ndr->depth--;
13200 ndr_print_ptr(ndr, "addr", r->addr);
13201 ndr->depth++;
13202 if (r->addr) {
13203 ndr_print_array_uint8(ndr, "addr", r->addr, r->addr_len);
13205 ndr->depth--;
13206 ndr_print_uint32(ndr, "addr_len", r->addr_len);
13207 ndr_print_ptr(ndr, "net_addr", r->net_addr);
13208 ndr->depth++;
13209 if (r->net_addr) {
13210 ndr_print_string(ndr, "net_addr", r->net_addr);
13212 ndr->depth--;
13213 ndr_print_ptr(ndr, "domain", r->domain);
13214 ndr->depth++;
13215 if (r->domain) {
13216 ndr_print_string(ndr, "domain", r->domain);
13218 ndr->depth--;
13219 ndr_print_uint32(ndr, "unknown1", r->unknown1);
13220 ndr_print_uint32(ndr, "unknown2", r->unknown2);
13221 ndr_print_array_uint8(ndr, "unknown3", r->unknown3, 256);
13222 ndr->depth--;
13225 static enum ndr_err_code ndr_push_srvsvc_NetTransportCtr3(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportCtr3 *r)
13227 uint32_t cntr_array_1;
13228 if (ndr_flags & NDR_SCALARS) {
13229 NDR_CHECK(ndr_push_align(ndr, 5));
13230 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
13231 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
13232 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
13234 if (ndr_flags & NDR_BUFFERS) {
13235 if (r->array) {
13236 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
13237 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
13238 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo3(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
13240 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
13241 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo3(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
13245 return NDR_ERR_SUCCESS;
13248 static enum ndr_err_code ndr_pull_srvsvc_NetTransportCtr3(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportCtr3 *r)
13250 uint32_t _ptr_array;
13251 uint32_t size_array_1 = 0;
13252 uint32_t cntr_array_1;
13253 TALLOC_CTX *_mem_save_array_0;
13254 TALLOC_CTX *_mem_save_array_1;
13255 if (ndr_flags & NDR_SCALARS) {
13256 NDR_CHECK(ndr_pull_align(ndr, 5));
13257 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
13258 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
13259 if (_ptr_array) {
13260 NDR_PULL_ALLOC(ndr, r->array);
13261 } else {
13262 r->array = NULL;
13264 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
13266 if (ndr_flags & NDR_BUFFERS) {
13267 if (r->array) {
13268 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
13269 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
13270 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
13271 size_array_1 = ndr_get_array_size(ndr, &r->array);
13272 NDR_PULL_ALLOC_N(ndr, r->array, size_array_1);
13273 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
13274 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
13275 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
13276 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo3(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
13278 for (cntr_array_1 = 0; cntr_array_1 < size_array_1; cntr_array_1++) {
13279 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo3(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
13281 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
13282 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
13284 if (r->array) {
13285 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
13288 return NDR_ERR_SUCCESS;
13291 _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr3(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportCtr3 *r)
13293 uint32_t cntr_array_1;
13294 ndr_print_struct(ndr, name, "srvsvc_NetTransportCtr3");
13295 ndr->depth++;
13296 ndr_print_uint32(ndr, "count", r->count);
13297 ndr_print_ptr(ndr, "array", r->array);
13298 ndr->depth++;
13299 if (r->array) {
13300 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
13301 ndr->depth++;
13302 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
13303 char *idx_1=NULL;
13304 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
13305 ndr_print_srvsvc_NetTransportInfo3(ndr, "array", &r->array[cntr_array_1]);
13306 free(idx_1);
13309 ndr->depth--;
13311 ndr->depth--;
13312 ndr->depth--;
13315 static enum ndr_err_code ndr_push_srvsvc_NetTransportCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetTransportCtr *r)
13317 if (ndr_flags & NDR_SCALARS) {
13318 int level = ndr_push_get_switch_value(ndr, r);
13319 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
13320 NDR_CHECK(ndr_push_union_align(ndr, 5));
13321 switch (level) {
13322 case 0: {
13323 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0));
13324 break; }
13326 case 1: {
13327 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
13328 break; }
13330 case 2: {
13331 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr2));
13332 break; }
13334 case 3: {
13335 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr3));
13336 break; }
13338 default: {
13339 break; }
13343 if (ndr_flags & NDR_BUFFERS) {
13344 int level = ndr_push_get_switch_value(ndr, r);
13345 switch (level) {
13346 case 0:
13347 if (r->ctr0) {
13348 NDR_CHECK(ndr_push_srvsvc_NetTransportCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
13350 break;
13352 case 1:
13353 if (r->ctr1) {
13354 NDR_CHECK(ndr_push_srvsvc_NetTransportCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
13356 break;
13358 case 2:
13359 if (r->ctr2) {
13360 NDR_CHECK(ndr_push_srvsvc_NetTransportCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
13362 break;
13364 case 3:
13365 if (r->ctr3) {
13366 NDR_CHECK(ndr_push_srvsvc_NetTransportCtr3(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr3));
13368 break;
13370 default:
13371 break;
13375 return NDR_ERR_SUCCESS;
13378 static enum ndr_err_code ndr_pull_srvsvc_NetTransportCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetTransportCtr *r)
13380 int level;
13381 uint32_t _level;
13382 TALLOC_CTX *_mem_save_ctr0_0;
13383 uint32_t _ptr_ctr0;
13384 TALLOC_CTX *_mem_save_ctr1_0;
13385 uint32_t _ptr_ctr1;
13386 TALLOC_CTX *_mem_save_ctr2_0;
13387 uint32_t _ptr_ctr2;
13388 TALLOC_CTX *_mem_save_ctr3_0;
13389 uint32_t _ptr_ctr3;
13390 level = ndr_pull_get_switch_value(ndr, r);
13391 if (ndr_flags & NDR_SCALARS) {
13392 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
13393 if (_level != level) {
13394 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
13396 NDR_CHECK(ndr_pull_union_align(ndr, 5));
13397 switch (level) {
13398 case 0: {
13399 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr0));
13400 if (_ptr_ctr0) {
13401 NDR_PULL_ALLOC(ndr, r->ctr0);
13402 } else {
13403 r->ctr0 = NULL;
13405 break; }
13407 case 1: {
13408 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
13409 if (_ptr_ctr1) {
13410 NDR_PULL_ALLOC(ndr, r->ctr1);
13411 } else {
13412 r->ctr1 = NULL;
13414 break; }
13416 case 2: {
13417 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr2));
13418 if (_ptr_ctr2) {
13419 NDR_PULL_ALLOC(ndr, r->ctr2);
13420 } else {
13421 r->ctr2 = NULL;
13423 break; }
13425 case 3: {
13426 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr3));
13427 if (_ptr_ctr3) {
13428 NDR_PULL_ALLOC(ndr, r->ctr3);
13429 } else {
13430 r->ctr3 = NULL;
13432 break; }
13434 default: {
13435 break; }
13439 if (ndr_flags & NDR_BUFFERS) {
13440 switch (level) {
13441 case 0:
13442 if (r->ctr0) {
13443 _mem_save_ctr0_0 = NDR_PULL_GET_MEM_CTX(ndr);
13444 NDR_PULL_SET_MEM_CTX(ndr, r->ctr0, 0);
13445 NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
13446 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr0_0, 0);
13448 break;
13450 case 1:
13451 if (r->ctr1) {
13452 _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
13453 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
13454 NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
13455 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
13457 break;
13459 case 2:
13460 if (r->ctr2) {
13461 _mem_save_ctr2_0 = NDR_PULL_GET_MEM_CTX(ndr);
13462 NDR_PULL_SET_MEM_CTX(ndr, r->ctr2, 0);
13463 NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
13464 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr2_0, 0);
13466 break;
13468 case 3:
13469 if (r->ctr3) {
13470 _mem_save_ctr3_0 = NDR_PULL_GET_MEM_CTX(ndr);
13471 NDR_PULL_SET_MEM_CTX(ndr, r->ctr3, 0);
13472 NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr3(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr3));
13473 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr3_0, 0);
13475 break;
13477 default:
13478 break;
13482 return NDR_ERR_SUCCESS;
13485 _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetTransportCtr *r)
13487 int level;
13488 level = ndr_print_get_switch_value(ndr, r);
13489 ndr_print_union(ndr, name, level, "srvsvc_NetTransportCtr");
13490 switch (level) {
13491 case 0:
13492 ndr_print_ptr(ndr, "ctr0", r->ctr0);
13493 ndr->depth++;
13494 if (r->ctr0) {
13495 ndr_print_srvsvc_NetTransportCtr0(ndr, "ctr0", r->ctr0);
13497 ndr->depth--;
13498 break;
13500 case 1:
13501 ndr_print_ptr(ndr, "ctr1", r->ctr1);
13502 ndr->depth++;
13503 if (r->ctr1) {
13504 ndr_print_srvsvc_NetTransportCtr1(ndr, "ctr1", r->ctr1);
13506 ndr->depth--;
13507 break;
13509 case 2:
13510 ndr_print_ptr(ndr, "ctr2", r->ctr2);
13511 ndr->depth++;
13512 if (r->ctr2) {
13513 ndr_print_srvsvc_NetTransportCtr2(ndr, "ctr2", r->ctr2);
13515 ndr->depth--;
13516 break;
13518 case 3:
13519 ndr_print_ptr(ndr, "ctr3", r->ctr3);
13520 ndr->depth++;
13521 if (r->ctr3) {
13522 ndr_print_srvsvc_NetTransportCtr3(ndr, "ctr3", r->ctr3);
13524 ndr->depth--;
13525 break;
13527 default:
13528 break;
13533 static enum ndr_err_code ndr_push_srvsvc_NetTransportInfoCtr(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportInfoCtr *r)
13535 if (ndr_flags & NDR_SCALARS) {
13536 NDR_CHECK(ndr_push_align(ndr, 5));
13537 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
13538 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level));
13539 NDR_CHECK(ndr_push_srvsvc_NetTransportCtr(ndr, NDR_SCALARS, &r->ctr));
13540 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
13542 if (ndr_flags & NDR_BUFFERS) {
13543 NDR_CHECK(ndr_push_srvsvc_NetTransportCtr(ndr, NDR_BUFFERS, &r->ctr));
13545 return NDR_ERR_SUCCESS;
13548 static enum ndr_err_code ndr_pull_srvsvc_NetTransportInfoCtr(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportInfoCtr *r)
13550 if (ndr_flags & NDR_SCALARS) {
13551 NDR_CHECK(ndr_pull_align(ndr, 5));
13552 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
13553 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level));
13554 NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr(ndr, NDR_SCALARS, &r->ctr));
13555 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
13557 if (ndr_flags & NDR_BUFFERS) {
13558 NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr(ndr, NDR_BUFFERS, &r->ctr));
13560 return NDR_ERR_SUCCESS;
13563 _PUBLIC_ void ndr_print_srvsvc_NetTransportInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportInfoCtr *r)
13565 ndr_print_struct(ndr, name, "srvsvc_NetTransportInfoCtr");
13566 ndr->depth++;
13567 ndr_print_uint32(ndr, "level", r->level);
13568 ndr_print_set_switch_value(ndr, &r->ctr, r->level);
13569 ndr_print_srvsvc_NetTransportCtr(ndr, "ctr", &r->ctr);
13570 ndr->depth--;
13573 static enum ndr_err_code ndr_push_srvsvc_NetRemoteTODInfo(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetRemoteTODInfo *r)
13575 if (ndr_flags & NDR_SCALARS) {
13576 NDR_CHECK(ndr_push_align(ndr, 4));
13577 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->elapsed));
13578 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->msecs));
13579 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->hours));
13580 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->mins));
13581 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->secs));
13582 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->hunds));
13583 NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, r->timezone));
13584 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->tinterval));
13585 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->day));
13586 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->month));
13587 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->year));
13588 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->weekday));
13589 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
13591 if (ndr_flags & NDR_BUFFERS) {
13593 return NDR_ERR_SUCCESS;
13596 static enum ndr_err_code ndr_pull_srvsvc_NetRemoteTODInfo(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetRemoteTODInfo *r)
13598 if (ndr_flags & NDR_SCALARS) {
13599 NDR_CHECK(ndr_pull_align(ndr, 4));
13600 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->elapsed));
13601 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->msecs));
13602 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->hours));
13603 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->mins));
13604 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->secs));
13605 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->hunds));
13606 NDR_CHECK(ndr_pull_int32(ndr, NDR_SCALARS, &r->timezone));
13607 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->tinterval));
13608 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->day));
13609 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->month));
13610 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->year));
13611 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->weekday));
13612 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
13614 if (ndr_flags & NDR_BUFFERS) {
13616 return NDR_ERR_SUCCESS;
13619 _PUBLIC_ void ndr_print_srvsvc_NetRemoteTODInfo(struct ndr_print *ndr, const char *name, const struct srvsvc_NetRemoteTODInfo *r)
13621 ndr_print_struct(ndr, name, "srvsvc_NetRemoteTODInfo");
13622 ndr->depth++;
13623 ndr_print_uint32(ndr, "elapsed", r->elapsed);
13624 ndr_print_uint32(ndr, "msecs", r->msecs);
13625 ndr_print_uint32(ndr, "hours", r->hours);
13626 ndr_print_uint32(ndr, "mins", r->mins);
13627 ndr_print_uint32(ndr, "secs", r->secs);
13628 ndr_print_uint32(ndr, "hunds", r->hunds);
13629 ndr_print_int32(ndr, "timezone", r->timezone);
13630 ndr_print_uint32(ndr, "tinterval", r->tinterval);
13631 ndr_print_uint32(ndr, "day", r->day);
13632 ndr_print_uint32(ndr, "month", r->month);
13633 ndr_print_uint32(ndr, "year", r->year);
13634 ndr_print_uint32(ndr, "weekday", r->weekday);
13635 ndr->depth--;
13638 static enum ndr_err_code ndr_push_srvsvc_NetTransportInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetTransportInfo *r)
13640 if (ndr_flags & NDR_SCALARS) {
13641 int level = ndr_push_get_switch_value(ndr, r);
13642 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
13643 NDR_CHECK(ndr_push_union_align(ndr, 5));
13644 switch (level) {
13645 case 0: {
13646 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo0(ndr, NDR_SCALARS, &r->info0));
13647 break; }
13649 case 1: {
13650 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo1(ndr, NDR_SCALARS, &r->info1));
13651 break; }
13653 case 2: {
13654 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo2(ndr, NDR_SCALARS, &r->info2));
13655 break; }
13657 case 3: {
13658 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo3(ndr, NDR_SCALARS, &r->info3));
13659 break; }
13661 default:
13662 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
13665 if (ndr_flags & NDR_BUFFERS) {
13666 int level = ndr_push_get_switch_value(ndr, r);
13667 switch (level) {
13668 case 0:
13669 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo0(ndr, NDR_BUFFERS, &r->info0));
13670 break;
13672 case 1:
13673 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo1(ndr, NDR_BUFFERS, &r->info1));
13674 break;
13676 case 2:
13677 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo2(ndr, NDR_BUFFERS, &r->info2));
13678 break;
13680 case 3:
13681 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo3(ndr, NDR_BUFFERS, &r->info3));
13682 break;
13684 default:
13685 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
13688 return NDR_ERR_SUCCESS;
13691 static enum ndr_err_code ndr_pull_srvsvc_NetTransportInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetTransportInfo *r)
13693 int level;
13694 uint32_t _level;
13695 level = ndr_pull_get_switch_value(ndr, r);
13696 if (ndr_flags & NDR_SCALARS) {
13697 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
13698 if (_level != level) {
13699 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
13701 NDR_CHECK(ndr_pull_union_align(ndr, 5));
13702 switch (level) {
13703 case 0: {
13704 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo0(ndr, NDR_SCALARS, &r->info0));
13705 break; }
13707 case 1: {
13708 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo1(ndr, NDR_SCALARS, &r->info1));
13709 break; }
13711 case 2: {
13712 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo2(ndr, NDR_SCALARS, &r->info2));
13713 break; }
13715 case 3: {
13716 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo3(ndr, NDR_SCALARS, &r->info3));
13717 break; }
13719 default:
13720 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
13723 if (ndr_flags & NDR_BUFFERS) {
13724 switch (level) {
13725 case 0:
13726 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo0(ndr, NDR_BUFFERS, &r->info0));
13727 break;
13729 case 1:
13730 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo1(ndr, NDR_BUFFERS, &r->info1));
13731 break;
13733 case 2:
13734 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo2(ndr, NDR_BUFFERS, &r->info2));
13735 break;
13737 case 3:
13738 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo3(ndr, NDR_BUFFERS, &r->info3));
13739 break;
13741 default:
13742 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
13745 return NDR_ERR_SUCCESS;
13748 _PUBLIC_ void ndr_print_srvsvc_NetTransportInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetTransportInfo *r)
13750 int level;
13751 level = ndr_print_get_switch_value(ndr, r);
13752 ndr_print_union(ndr, name, level, "srvsvc_NetTransportInfo");
13753 switch (level) {
13754 case 0:
13755 ndr_print_srvsvc_NetTransportInfo0(ndr, "info0", &r->info0);
13756 break;
13758 case 1:
13759 ndr_print_srvsvc_NetTransportInfo1(ndr, "info1", &r->info1);
13760 break;
13762 case 2:
13763 ndr_print_srvsvc_NetTransportInfo2(ndr, "info2", &r->info2);
13764 break;
13766 case 3:
13767 ndr_print_srvsvc_NetTransportInfo3(ndr, "info3", &r->info3);
13768 break;
13770 default:
13771 ndr_print_bad_level(ndr, name, level);
13775 static enum ndr_err_code ndr_push_srvsvc_NetCharDevEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevEnum *r)
13777 if (flags & NDR_IN) {
13778 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
13779 if (r->in.server_unc) {
13780 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13781 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
13782 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13783 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));
13785 if (r->in.info_ctr == NULL) {
13786 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13788 NDR_CHECK(ndr_push_srvsvc_NetCharDevInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
13789 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
13790 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
13791 if (r->in.resume_handle) {
13792 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
13795 if (flags & NDR_OUT) {
13796 if (r->out.info_ctr == NULL) {
13797 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13799 NDR_CHECK(ndr_push_srvsvc_NetCharDevInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
13800 if (r->out.totalentries == NULL) {
13801 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13803 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
13804 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
13805 if (r->out.resume_handle) {
13806 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
13808 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
13810 return NDR_ERR_SUCCESS;
13813 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevEnum *r)
13815 uint32_t _ptr_server_unc;
13816 uint32_t size_server_unc_1 = 0;
13817 uint32_t length_server_unc_1 = 0;
13818 uint32_t _ptr_resume_handle;
13819 TALLOC_CTX *_mem_save_server_unc_0;
13820 TALLOC_CTX *_mem_save_info_ctr_0;
13821 TALLOC_CTX *_mem_save_totalentries_0;
13822 TALLOC_CTX *_mem_save_resume_handle_0;
13823 if (flags & NDR_IN) {
13824 ZERO_STRUCT(r->out);
13826 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
13827 if (_ptr_server_unc) {
13828 NDR_PULL_ALLOC(ndr, r->in.server_unc);
13829 } else {
13830 r->in.server_unc = NULL;
13832 if (r->in.server_unc) {
13833 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
13834 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
13835 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
13836 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
13837 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
13838 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
13839 if (length_server_unc_1 > size_server_unc_1) {
13840 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
13842 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
13843 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
13844 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
13846 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13847 NDR_PULL_ALLOC(ndr, r->in.info_ctr);
13849 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
13850 NDR_PULL_SET_MEM_CTX(ndr, r->in.info_ctr, LIBNDR_FLAG_REF_ALLOC);
13851 NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
13852 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
13853 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
13854 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
13855 if (_ptr_resume_handle) {
13856 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
13857 } else {
13858 r->in.resume_handle = NULL;
13860 if (r->in.resume_handle) {
13861 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
13862 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
13863 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
13864 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
13866 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
13867 *r->out.info_ctr = *r->in.info_ctr;
13868 NDR_PULL_ALLOC(ndr, r->out.totalentries);
13869 ZERO_STRUCTP(r->out.totalentries);
13871 if (flags & NDR_OUT) {
13872 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13873 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
13875 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
13876 NDR_PULL_SET_MEM_CTX(ndr, r->out.info_ctr, LIBNDR_FLAG_REF_ALLOC);
13877 NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
13878 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
13879 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13880 NDR_PULL_ALLOC(ndr, r->out.totalentries);
13882 _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
13883 NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
13884 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
13885 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
13886 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
13887 if (_ptr_resume_handle) {
13888 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
13889 } else {
13890 r->out.resume_handle = NULL;
13892 if (r->out.resume_handle) {
13893 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
13894 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
13895 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
13896 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
13898 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
13900 return NDR_ERR_SUCCESS;
13903 _PUBLIC_ void ndr_print_srvsvc_NetCharDevEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevEnum *r)
13905 ndr_print_struct(ndr, name, "srvsvc_NetCharDevEnum");
13906 ndr->depth++;
13907 if (flags & NDR_SET_VALUES) {
13908 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
13910 if (flags & NDR_IN) {
13911 ndr_print_struct(ndr, "in", "srvsvc_NetCharDevEnum");
13912 ndr->depth++;
13913 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
13914 ndr->depth++;
13915 if (r->in.server_unc) {
13916 ndr_print_string(ndr, "server_unc", r->in.server_unc);
13918 ndr->depth--;
13919 ndr_print_ptr(ndr, "info_ctr", r->in.info_ctr);
13920 ndr->depth++;
13921 ndr_print_srvsvc_NetCharDevInfoCtr(ndr, "info_ctr", r->in.info_ctr);
13922 ndr->depth--;
13923 ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
13924 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
13925 ndr->depth++;
13926 if (r->in.resume_handle) {
13927 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
13929 ndr->depth--;
13930 ndr->depth--;
13932 if (flags & NDR_OUT) {
13933 ndr_print_struct(ndr, "out", "srvsvc_NetCharDevEnum");
13934 ndr->depth++;
13935 ndr_print_ptr(ndr, "info_ctr", r->out.info_ctr);
13936 ndr->depth++;
13937 ndr_print_srvsvc_NetCharDevInfoCtr(ndr, "info_ctr", r->out.info_ctr);
13938 ndr->depth--;
13939 ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
13940 ndr->depth++;
13941 ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
13942 ndr->depth--;
13943 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
13944 ndr->depth++;
13945 if (r->out.resume_handle) {
13946 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
13948 ndr->depth--;
13949 ndr_print_WERROR(ndr, "result", r->out.result);
13950 ndr->depth--;
13952 ndr->depth--;
13955 static enum ndr_err_code ndr_push_srvsvc_NetCharDevGetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevGetInfo *r)
13957 if (flags & NDR_IN) {
13958 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
13959 if (r->in.server_unc) {
13960 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13961 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
13962 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13963 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));
13965 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.device_name, CH_UTF16)));
13966 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
13967 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.device_name, CH_UTF16)));
13968 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));
13969 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
13971 if (flags & NDR_OUT) {
13972 if (r->out.info == NULL) {
13973 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13975 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
13976 NDR_CHECK(ndr_push_srvsvc_NetCharDevInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
13977 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
13979 return NDR_ERR_SUCCESS;
13982 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevGetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevGetInfo *r)
13984 uint32_t _ptr_server_unc;
13985 uint32_t size_server_unc_1 = 0;
13986 uint32_t length_server_unc_1 = 0;
13987 uint32_t size_device_name_0 = 0;
13988 uint32_t length_device_name_0 = 0;
13989 TALLOC_CTX *_mem_save_server_unc_0;
13990 TALLOC_CTX *_mem_save_info_0;
13991 if (flags & NDR_IN) {
13992 ZERO_STRUCT(r->out);
13994 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
13995 if (_ptr_server_unc) {
13996 NDR_PULL_ALLOC(ndr, r->in.server_unc);
13997 } else {
13998 r->in.server_unc = NULL;
14000 if (r->in.server_unc) {
14001 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
14002 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
14003 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
14004 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
14005 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
14006 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
14007 if (length_server_unc_1 > size_server_unc_1) {
14008 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
14010 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
14011 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
14012 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
14014 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.device_name));
14015 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.device_name));
14016 size_device_name_0 = ndr_get_array_size(ndr, &r->in.device_name);
14017 length_device_name_0 = ndr_get_array_length(ndr, &r->in.device_name);
14018 if (length_device_name_0 > size_device_name_0) {
14019 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_device_name_0, length_device_name_0);
14021 NDR_CHECK(ndr_check_string_terminator(ndr, length_device_name_0, sizeof(uint16_t)));
14022 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.device_name, length_device_name_0, sizeof(uint16_t), CH_UTF16));
14023 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
14024 NDR_PULL_ALLOC(ndr, r->out.info);
14025 ZERO_STRUCTP(r->out.info);
14027 if (flags & NDR_OUT) {
14028 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14029 NDR_PULL_ALLOC(ndr, r->out.info);
14031 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
14032 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
14033 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
14034 NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
14035 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
14036 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
14038 return NDR_ERR_SUCCESS;
14041 _PUBLIC_ void ndr_print_srvsvc_NetCharDevGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevGetInfo *r)
14043 ndr_print_struct(ndr, name, "srvsvc_NetCharDevGetInfo");
14044 ndr->depth++;
14045 if (flags & NDR_SET_VALUES) {
14046 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14048 if (flags & NDR_IN) {
14049 ndr_print_struct(ndr, "in", "srvsvc_NetCharDevGetInfo");
14050 ndr->depth++;
14051 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
14052 ndr->depth++;
14053 if (r->in.server_unc) {
14054 ndr_print_string(ndr, "server_unc", r->in.server_unc);
14056 ndr->depth--;
14057 ndr_print_string(ndr, "device_name", r->in.device_name);
14058 ndr_print_uint32(ndr, "level", r->in.level);
14059 ndr->depth--;
14061 if (flags & NDR_OUT) {
14062 ndr_print_struct(ndr, "out", "srvsvc_NetCharDevGetInfo");
14063 ndr->depth++;
14064 ndr_print_ptr(ndr, "info", r->out.info);
14065 ndr->depth++;
14066 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
14067 ndr_print_srvsvc_NetCharDevInfo(ndr, "info", r->out.info);
14068 ndr->depth--;
14069 ndr_print_WERROR(ndr, "result", r->out.result);
14070 ndr->depth--;
14072 ndr->depth--;
14075 static enum ndr_err_code ndr_push_srvsvc_NetCharDevControl(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevControl *r)
14077 if (flags & NDR_IN) {
14078 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
14079 if (r->in.server_unc) {
14080 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14081 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14082 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14083 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));
14085 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.device_name, CH_UTF16)));
14086 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14087 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.device_name, CH_UTF16)));
14088 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));
14089 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.opcode));
14091 if (flags & NDR_OUT) {
14092 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
14094 return NDR_ERR_SUCCESS;
14097 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevControl(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevControl *r)
14099 uint32_t _ptr_server_unc;
14100 uint32_t size_server_unc_1 = 0;
14101 uint32_t length_server_unc_1 = 0;
14102 uint32_t size_device_name_0 = 0;
14103 uint32_t length_device_name_0 = 0;
14104 TALLOC_CTX *_mem_save_server_unc_0;
14105 if (flags & NDR_IN) {
14106 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
14107 if (_ptr_server_unc) {
14108 NDR_PULL_ALLOC(ndr, r->in.server_unc);
14109 } else {
14110 r->in.server_unc = NULL;
14112 if (r->in.server_unc) {
14113 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
14114 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
14115 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
14116 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
14117 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
14118 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
14119 if (length_server_unc_1 > size_server_unc_1) {
14120 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
14122 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
14123 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
14124 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
14126 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.device_name));
14127 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.device_name));
14128 size_device_name_0 = ndr_get_array_size(ndr, &r->in.device_name);
14129 length_device_name_0 = ndr_get_array_length(ndr, &r->in.device_name);
14130 if (length_device_name_0 > size_device_name_0) {
14131 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_device_name_0, length_device_name_0);
14133 NDR_CHECK(ndr_check_string_terminator(ndr, length_device_name_0, sizeof(uint16_t)));
14134 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.device_name, length_device_name_0, sizeof(uint16_t), CH_UTF16));
14135 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.opcode));
14137 if (flags & NDR_OUT) {
14138 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
14140 return NDR_ERR_SUCCESS;
14143 _PUBLIC_ void ndr_print_srvsvc_NetCharDevControl(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevControl *r)
14145 ndr_print_struct(ndr, name, "srvsvc_NetCharDevControl");
14146 ndr->depth++;
14147 if (flags & NDR_SET_VALUES) {
14148 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14150 if (flags & NDR_IN) {
14151 ndr_print_struct(ndr, "in", "srvsvc_NetCharDevControl");
14152 ndr->depth++;
14153 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
14154 ndr->depth++;
14155 if (r->in.server_unc) {
14156 ndr_print_string(ndr, "server_unc", r->in.server_unc);
14158 ndr->depth--;
14159 ndr_print_string(ndr, "device_name", r->in.device_name);
14160 ndr_print_uint32(ndr, "opcode", r->in.opcode);
14161 ndr->depth--;
14163 if (flags & NDR_OUT) {
14164 ndr_print_struct(ndr, "out", "srvsvc_NetCharDevControl");
14165 ndr->depth++;
14166 ndr_print_WERROR(ndr, "result", r->out.result);
14167 ndr->depth--;
14169 ndr->depth--;
14172 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevQEnum *r)
14174 if (flags & NDR_IN) {
14175 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
14176 if (r->in.server_unc) {
14177 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14178 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14179 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14180 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));
14182 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.user));
14183 if (r->in.user) {
14184 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
14185 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14186 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
14187 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.user, ndr_charset_length(r->in.user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
14189 if (r->in.info_ctr == NULL) {
14190 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14192 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
14193 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
14194 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
14195 if (r->in.resume_handle) {
14196 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
14199 if (flags & NDR_OUT) {
14200 if (r->out.info_ctr == NULL) {
14201 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14203 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
14204 if (r->out.totalentries == NULL) {
14205 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14207 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
14208 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
14209 if (r->out.resume_handle) {
14210 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
14212 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
14214 return NDR_ERR_SUCCESS;
14217 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevQEnum *r)
14219 uint32_t _ptr_server_unc;
14220 uint32_t size_server_unc_1 = 0;
14221 uint32_t length_server_unc_1 = 0;
14222 uint32_t _ptr_user;
14223 uint32_t size_user_1 = 0;
14224 uint32_t length_user_1 = 0;
14225 uint32_t _ptr_resume_handle;
14226 TALLOC_CTX *_mem_save_server_unc_0;
14227 TALLOC_CTX *_mem_save_user_0;
14228 TALLOC_CTX *_mem_save_info_ctr_0;
14229 TALLOC_CTX *_mem_save_totalentries_0;
14230 TALLOC_CTX *_mem_save_resume_handle_0;
14231 if (flags & NDR_IN) {
14232 ZERO_STRUCT(r->out);
14234 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
14235 if (_ptr_server_unc) {
14236 NDR_PULL_ALLOC(ndr, r->in.server_unc);
14237 } else {
14238 r->in.server_unc = NULL;
14240 if (r->in.server_unc) {
14241 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
14242 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
14243 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
14244 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
14245 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
14246 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
14247 if (length_server_unc_1 > size_server_unc_1) {
14248 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
14250 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
14251 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
14252 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
14254 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
14255 if (_ptr_user) {
14256 NDR_PULL_ALLOC(ndr, r->in.user);
14257 } else {
14258 r->in.user = NULL;
14260 if (r->in.user) {
14261 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
14262 NDR_PULL_SET_MEM_CTX(ndr, r->in.user, 0);
14263 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.user));
14264 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.user));
14265 size_user_1 = ndr_get_array_size(ndr, &r->in.user);
14266 length_user_1 = ndr_get_array_length(ndr, &r->in.user);
14267 if (length_user_1 > size_user_1) {
14268 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_user_1, length_user_1);
14270 NDR_CHECK(ndr_check_string_terminator(ndr, length_user_1, sizeof(uint16_t)));
14271 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.user, length_user_1, sizeof(uint16_t), CH_UTF16));
14272 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
14274 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14275 NDR_PULL_ALLOC(ndr, r->in.info_ctr);
14277 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
14278 NDR_PULL_SET_MEM_CTX(ndr, r->in.info_ctr, LIBNDR_FLAG_REF_ALLOC);
14279 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
14280 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
14281 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
14282 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
14283 if (_ptr_resume_handle) {
14284 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
14285 } else {
14286 r->in.resume_handle = NULL;
14288 if (r->in.resume_handle) {
14289 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
14290 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
14291 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
14292 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
14294 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
14295 *r->out.info_ctr = *r->in.info_ctr;
14296 NDR_PULL_ALLOC(ndr, r->out.totalentries);
14297 ZERO_STRUCTP(r->out.totalentries);
14299 if (flags & NDR_OUT) {
14300 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14301 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
14303 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
14304 NDR_PULL_SET_MEM_CTX(ndr, r->out.info_ctr, LIBNDR_FLAG_REF_ALLOC);
14305 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
14306 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
14307 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14308 NDR_PULL_ALLOC(ndr, r->out.totalentries);
14310 _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
14311 NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
14312 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
14313 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
14314 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
14315 if (_ptr_resume_handle) {
14316 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
14317 } else {
14318 r->out.resume_handle = NULL;
14320 if (r->out.resume_handle) {
14321 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
14322 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
14323 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
14324 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
14326 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
14328 return NDR_ERR_SUCCESS;
14331 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQEnum *r)
14333 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQEnum");
14334 ndr->depth++;
14335 if (flags & NDR_SET_VALUES) {
14336 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14338 if (flags & NDR_IN) {
14339 ndr_print_struct(ndr, "in", "srvsvc_NetCharDevQEnum");
14340 ndr->depth++;
14341 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
14342 ndr->depth++;
14343 if (r->in.server_unc) {
14344 ndr_print_string(ndr, "server_unc", r->in.server_unc);
14346 ndr->depth--;
14347 ndr_print_ptr(ndr, "user", r->in.user);
14348 ndr->depth++;
14349 if (r->in.user) {
14350 ndr_print_string(ndr, "user", r->in.user);
14352 ndr->depth--;
14353 ndr_print_ptr(ndr, "info_ctr", r->in.info_ctr);
14354 ndr->depth++;
14355 ndr_print_srvsvc_NetCharDevQInfoCtr(ndr, "info_ctr", r->in.info_ctr);
14356 ndr->depth--;
14357 ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
14358 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
14359 ndr->depth++;
14360 if (r->in.resume_handle) {
14361 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
14363 ndr->depth--;
14364 ndr->depth--;
14366 if (flags & NDR_OUT) {
14367 ndr_print_struct(ndr, "out", "srvsvc_NetCharDevQEnum");
14368 ndr->depth++;
14369 ndr_print_ptr(ndr, "info_ctr", r->out.info_ctr);
14370 ndr->depth++;
14371 ndr_print_srvsvc_NetCharDevQInfoCtr(ndr, "info_ctr", r->out.info_ctr);
14372 ndr->depth--;
14373 ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
14374 ndr->depth++;
14375 ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
14376 ndr->depth--;
14377 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
14378 ndr->depth++;
14379 if (r->out.resume_handle) {
14380 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
14382 ndr->depth--;
14383 ndr_print_WERROR(ndr, "result", r->out.result);
14384 ndr->depth--;
14386 ndr->depth--;
14389 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQGetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevQGetInfo *r)
14391 if (flags & NDR_IN) {
14392 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
14393 if (r->in.server_unc) {
14394 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14395 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14396 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14397 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));
14399 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
14400 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14401 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
14402 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));
14403 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
14404 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14405 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
14406 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.user, ndr_charset_length(r->in.user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
14407 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
14409 if (flags & NDR_OUT) {
14410 if (r->out.info == NULL) {
14411 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14413 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
14414 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
14415 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
14417 return NDR_ERR_SUCCESS;
14420 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQGetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevQGetInfo *r)
14422 uint32_t _ptr_server_unc;
14423 uint32_t size_server_unc_1 = 0;
14424 uint32_t length_server_unc_1 = 0;
14425 uint32_t size_queue_name_0 = 0;
14426 uint32_t length_queue_name_0 = 0;
14427 uint32_t size_user_0 = 0;
14428 uint32_t length_user_0 = 0;
14429 TALLOC_CTX *_mem_save_server_unc_0;
14430 TALLOC_CTX *_mem_save_info_0;
14431 if (flags & NDR_IN) {
14432 ZERO_STRUCT(r->out);
14434 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
14435 if (_ptr_server_unc) {
14436 NDR_PULL_ALLOC(ndr, r->in.server_unc);
14437 } else {
14438 r->in.server_unc = NULL;
14440 if (r->in.server_unc) {
14441 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
14442 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
14443 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
14444 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
14445 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
14446 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
14447 if (length_server_unc_1 > size_server_unc_1) {
14448 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
14450 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
14451 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
14452 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
14454 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.queue_name));
14455 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.queue_name));
14456 size_queue_name_0 = ndr_get_array_size(ndr, &r->in.queue_name);
14457 length_queue_name_0 = ndr_get_array_length(ndr, &r->in.queue_name);
14458 if (length_queue_name_0 > size_queue_name_0) {
14459 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_queue_name_0, length_queue_name_0);
14461 NDR_CHECK(ndr_check_string_terminator(ndr, length_queue_name_0, sizeof(uint16_t)));
14462 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.queue_name, length_queue_name_0, sizeof(uint16_t), CH_UTF16));
14463 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.user));
14464 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.user));
14465 size_user_0 = ndr_get_array_size(ndr, &r->in.user);
14466 length_user_0 = ndr_get_array_length(ndr, &r->in.user);
14467 if (length_user_0 > size_user_0) {
14468 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_user_0, length_user_0);
14470 NDR_CHECK(ndr_check_string_terminator(ndr, length_user_0, sizeof(uint16_t)));
14471 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.user, length_user_0, sizeof(uint16_t), CH_UTF16));
14472 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
14473 NDR_PULL_ALLOC(ndr, r->out.info);
14474 ZERO_STRUCTP(r->out.info);
14476 if (flags & NDR_OUT) {
14477 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14478 NDR_PULL_ALLOC(ndr, r->out.info);
14480 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
14481 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
14482 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
14483 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
14484 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
14485 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
14487 return NDR_ERR_SUCCESS;
14490 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQGetInfo *r)
14492 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQGetInfo");
14493 ndr->depth++;
14494 if (flags & NDR_SET_VALUES) {
14495 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14497 if (flags & NDR_IN) {
14498 ndr_print_struct(ndr, "in", "srvsvc_NetCharDevQGetInfo");
14499 ndr->depth++;
14500 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
14501 ndr->depth++;
14502 if (r->in.server_unc) {
14503 ndr_print_string(ndr, "server_unc", r->in.server_unc);
14505 ndr->depth--;
14506 ndr_print_string(ndr, "queue_name", r->in.queue_name);
14507 ndr_print_string(ndr, "user", r->in.user);
14508 ndr_print_uint32(ndr, "level", r->in.level);
14509 ndr->depth--;
14511 if (flags & NDR_OUT) {
14512 ndr_print_struct(ndr, "out", "srvsvc_NetCharDevQGetInfo");
14513 ndr->depth++;
14514 ndr_print_ptr(ndr, "info", r->out.info);
14515 ndr->depth++;
14516 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
14517 ndr_print_srvsvc_NetCharDevQInfo(ndr, "info", r->out.info);
14518 ndr->depth--;
14519 ndr_print_WERROR(ndr, "result", r->out.result);
14520 ndr->depth--;
14522 ndr->depth--;
14525 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQSetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevQSetInfo *r)
14527 if (flags & NDR_IN) {
14528 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
14529 if (r->in.server_unc) {
14530 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14531 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14532 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14533 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));
14535 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
14536 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14537 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
14538 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));
14539 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
14540 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.info, r->in.level));
14541 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
14542 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.parm_error));
14543 if (r->in.parm_error) {
14544 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.parm_error));
14547 if (flags & NDR_OUT) {
14548 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.parm_error));
14549 if (r->out.parm_error) {
14550 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.parm_error));
14552 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
14554 return NDR_ERR_SUCCESS;
14557 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQSetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevQSetInfo *r)
14559 uint32_t _ptr_server_unc;
14560 uint32_t size_server_unc_1 = 0;
14561 uint32_t length_server_unc_1 = 0;
14562 uint32_t size_queue_name_0 = 0;
14563 uint32_t length_queue_name_0 = 0;
14564 uint32_t _ptr_parm_error;
14565 TALLOC_CTX *_mem_save_server_unc_0;
14566 TALLOC_CTX *_mem_save_parm_error_0;
14567 if (flags & NDR_IN) {
14568 ZERO_STRUCT(r->out);
14570 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
14571 if (_ptr_server_unc) {
14572 NDR_PULL_ALLOC(ndr, r->in.server_unc);
14573 } else {
14574 r->in.server_unc = NULL;
14576 if (r->in.server_unc) {
14577 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
14578 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
14579 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
14580 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
14581 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
14582 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
14583 if (length_server_unc_1 > size_server_unc_1) {
14584 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
14586 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
14587 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
14588 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
14590 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.queue_name));
14591 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.queue_name));
14592 size_queue_name_0 = ndr_get_array_size(ndr, &r->in.queue_name);
14593 length_queue_name_0 = ndr_get_array_length(ndr, &r->in.queue_name);
14594 if (length_queue_name_0 > size_queue_name_0) {
14595 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_queue_name_0, length_queue_name_0);
14597 NDR_CHECK(ndr_check_string_terminator(ndr, length_queue_name_0, sizeof(uint16_t)));
14598 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.queue_name, length_queue_name_0, sizeof(uint16_t), CH_UTF16));
14599 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
14600 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.info, r->in.level));
14601 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
14602 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
14603 if (_ptr_parm_error) {
14604 NDR_PULL_ALLOC(ndr, r->in.parm_error);
14605 } else {
14606 r->in.parm_error = NULL;
14608 if (r->in.parm_error) {
14609 _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
14610 NDR_PULL_SET_MEM_CTX(ndr, r->in.parm_error, 0);
14611 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.parm_error));
14612 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
14615 if (flags & NDR_OUT) {
14616 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
14617 if (_ptr_parm_error) {
14618 NDR_PULL_ALLOC(ndr, r->out.parm_error);
14619 } else {
14620 r->out.parm_error = NULL;
14622 if (r->out.parm_error) {
14623 _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
14624 NDR_PULL_SET_MEM_CTX(ndr, r->out.parm_error, 0);
14625 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.parm_error));
14626 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
14628 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
14630 return NDR_ERR_SUCCESS;
14633 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQSetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQSetInfo *r)
14635 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQSetInfo");
14636 ndr->depth++;
14637 if (flags & NDR_SET_VALUES) {
14638 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14640 if (flags & NDR_IN) {
14641 ndr_print_struct(ndr, "in", "srvsvc_NetCharDevQSetInfo");
14642 ndr->depth++;
14643 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
14644 ndr->depth++;
14645 if (r->in.server_unc) {
14646 ndr_print_string(ndr, "server_unc", r->in.server_unc);
14648 ndr->depth--;
14649 ndr_print_string(ndr, "queue_name", r->in.queue_name);
14650 ndr_print_uint32(ndr, "level", r->in.level);
14651 ndr_print_set_switch_value(ndr, &r->in.info, r->in.level);
14652 ndr_print_srvsvc_NetCharDevQInfo(ndr, "info", &r->in.info);
14653 ndr_print_ptr(ndr, "parm_error", r->in.parm_error);
14654 ndr->depth++;
14655 if (r->in.parm_error) {
14656 ndr_print_uint32(ndr, "parm_error", *r->in.parm_error);
14658 ndr->depth--;
14659 ndr->depth--;
14661 if (flags & NDR_OUT) {
14662 ndr_print_struct(ndr, "out", "srvsvc_NetCharDevQSetInfo");
14663 ndr->depth++;
14664 ndr_print_ptr(ndr, "parm_error", r->out.parm_error);
14665 ndr->depth++;
14666 if (r->out.parm_error) {
14667 ndr_print_uint32(ndr, "parm_error", *r->out.parm_error);
14669 ndr->depth--;
14670 ndr_print_WERROR(ndr, "result", r->out.result);
14671 ndr->depth--;
14673 ndr->depth--;
14676 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQPurge(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevQPurge *r)
14678 if (flags & NDR_IN) {
14679 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
14680 if (r->in.server_unc) {
14681 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14682 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14683 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14684 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));
14686 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
14687 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14688 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
14689 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));
14691 if (flags & NDR_OUT) {
14692 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
14694 return NDR_ERR_SUCCESS;
14697 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQPurge(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevQPurge *r)
14699 uint32_t _ptr_server_unc;
14700 uint32_t size_server_unc_1 = 0;
14701 uint32_t length_server_unc_1 = 0;
14702 uint32_t size_queue_name_0 = 0;
14703 uint32_t length_queue_name_0 = 0;
14704 TALLOC_CTX *_mem_save_server_unc_0;
14705 if (flags & NDR_IN) {
14706 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
14707 if (_ptr_server_unc) {
14708 NDR_PULL_ALLOC(ndr, r->in.server_unc);
14709 } else {
14710 r->in.server_unc = NULL;
14712 if (r->in.server_unc) {
14713 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
14714 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
14715 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
14716 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
14717 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
14718 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
14719 if (length_server_unc_1 > size_server_unc_1) {
14720 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
14722 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
14723 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
14724 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
14726 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.queue_name));
14727 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.queue_name));
14728 size_queue_name_0 = ndr_get_array_size(ndr, &r->in.queue_name);
14729 length_queue_name_0 = ndr_get_array_length(ndr, &r->in.queue_name);
14730 if (length_queue_name_0 > size_queue_name_0) {
14731 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_queue_name_0, length_queue_name_0);
14733 NDR_CHECK(ndr_check_string_terminator(ndr, length_queue_name_0, sizeof(uint16_t)));
14734 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.queue_name, length_queue_name_0, sizeof(uint16_t), CH_UTF16));
14736 if (flags & NDR_OUT) {
14737 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
14739 return NDR_ERR_SUCCESS;
14742 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQPurge(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQPurge *r)
14744 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQPurge");
14745 ndr->depth++;
14746 if (flags & NDR_SET_VALUES) {
14747 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14749 if (flags & NDR_IN) {
14750 ndr_print_struct(ndr, "in", "srvsvc_NetCharDevQPurge");
14751 ndr->depth++;
14752 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
14753 ndr->depth++;
14754 if (r->in.server_unc) {
14755 ndr_print_string(ndr, "server_unc", r->in.server_unc);
14757 ndr->depth--;
14758 ndr_print_string(ndr, "queue_name", r->in.queue_name);
14759 ndr->depth--;
14761 if (flags & NDR_OUT) {
14762 ndr_print_struct(ndr, "out", "srvsvc_NetCharDevQPurge");
14763 ndr->depth++;
14764 ndr_print_WERROR(ndr, "result", r->out.result);
14765 ndr->depth--;
14767 ndr->depth--;
14770 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQPurgeSelf(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevQPurgeSelf *r)
14772 if (flags & NDR_IN) {
14773 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
14774 if (r->in.server_unc) {
14775 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14776 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14777 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14778 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));
14780 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
14781 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14782 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
14783 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));
14784 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
14785 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14786 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
14787 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));
14789 if (flags & NDR_OUT) {
14790 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
14792 return NDR_ERR_SUCCESS;
14795 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQPurgeSelf(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevQPurgeSelf *r)
14797 uint32_t _ptr_server_unc;
14798 uint32_t size_server_unc_1 = 0;
14799 uint32_t length_server_unc_1 = 0;
14800 uint32_t size_queue_name_0 = 0;
14801 uint32_t length_queue_name_0 = 0;
14802 uint32_t size_computer_name_0 = 0;
14803 uint32_t length_computer_name_0 = 0;
14804 TALLOC_CTX *_mem_save_server_unc_0;
14805 if (flags & NDR_IN) {
14806 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
14807 if (_ptr_server_unc) {
14808 NDR_PULL_ALLOC(ndr, r->in.server_unc);
14809 } else {
14810 r->in.server_unc = NULL;
14812 if (r->in.server_unc) {
14813 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
14814 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
14815 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
14816 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
14817 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
14818 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
14819 if (length_server_unc_1 > size_server_unc_1) {
14820 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
14822 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
14823 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
14824 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
14826 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.queue_name));
14827 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.queue_name));
14828 size_queue_name_0 = ndr_get_array_size(ndr, &r->in.queue_name);
14829 length_queue_name_0 = ndr_get_array_length(ndr, &r->in.queue_name);
14830 if (length_queue_name_0 > size_queue_name_0) {
14831 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_queue_name_0, length_queue_name_0);
14833 NDR_CHECK(ndr_check_string_terminator(ndr, length_queue_name_0, sizeof(uint16_t)));
14834 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.queue_name, length_queue_name_0, sizeof(uint16_t), CH_UTF16));
14835 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
14836 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
14837 size_computer_name_0 = ndr_get_array_size(ndr, &r->in.computer_name);
14838 length_computer_name_0 = ndr_get_array_length(ndr, &r->in.computer_name);
14839 if (length_computer_name_0 > size_computer_name_0) {
14840 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_computer_name_0, length_computer_name_0);
14842 NDR_CHECK(ndr_check_string_terminator(ndr, length_computer_name_0, sizeof(uint16_t)));
14843 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, length_computer_name_0, sizeof(uint16_t), CH_UTF16));
14845 if (flags & NDR_OUT) {
14846 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
14848 return NDR_ERR_SUCCESS;
14851 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQPurgeSelf(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQPurgeSelf *r)
14853 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQPurgeSelf");
14854 ndr->depth++;
14855 if (flags & NDR_SET_VALUES) {
14856 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14858 if (flags & NDR_IN) {
14859 ndr_print_struct(ndr, "in", "srvsvc_NetCharDevQPurgeSelf");
14860 ndr->depth++;
14861 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
14862 ndr->depth++;
14863 if (r->in.server_unc) {
14864 ndr_print_string(ndr, "server_unc", r->in.server_unc);
14866 ndr->depth--;
14867 ndr_print_string(ndr, "queue_name", r->in.queue_name);
14868 ndr_print_string(ndr, "computer_name", r->in.computer_name);
14869 ndr->depth--;
14871 if (flags & NDR_OUT) {
14872 ndr_print_struct(ndr, "out", "srvsvc_NetCharDevQPurgeSelf");
14873 ndr->depth++;
14874 ndr_print_WERROR(ndr, "result", r->out.result);
14875 ndr->depth--;
14877 ndr->depth--;
14880 static enum ndr_err_code ndr_push_srvsvc_NetConnEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetConnEnum *r)
14882 if (flags & NDR_IN) {
14883 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
14884 if (r->in.server_unc) {
14885 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14886 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14887 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14888 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));
14890 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.path));
14891 if (r->in.path) {
14892 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
14893 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14894 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
14895 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path, ndr_charset_length(r->in.path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
14897 if (r->in.info_ctr == NULL) {
14898 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14900 NDR_CHECK(ndr_push_srvsvc_NetConnInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
14901 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
14902 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
14903 if (r->in.resume_handle) {
14904 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
14907 if (flags & NDR_OUT) {
14908 if (r->out.info_ctr == NULL) {
14909 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14911 NDR_CHECK(ndr_push_srvsvc_NetConnInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
14912 if (r->out.totalentries == NULL) {
14913 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14915 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
14916 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
14917 if (r->out.resume_handle) {
14918 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
14920 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
14922 return NDR_ERR_SUCCESS;
14925 static enum ndr_err_code ndr_pull_srvsvc_NetConnEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetConnEnum *r)
14927 uint32_t _ptr_server_unc;
14928 uint32_t size_server_unc_1 = 0;
14929 uint32_t length_server_unc_1 = 0;
14930 uint32_t _ptr_path;
14931 uint32_t size_path_1 = 0;
14932 uint32_t length_path_1 = 0;
14933 uint32_t _ptr_resume_handle;
14934 TALLOC_CTX *_mem_save_server_unc_0;
14935 TALLOC_CTX *_mem_save_path_0;
14936 TALLOC_CTX *_mem_save_info_ctr_0;
14937 TALLOC_CTX *_mem_save_totalentries_0;
14938 TALLOC_CTX *_mem_save_resume_handle_0;
14939 if (flags & NDR_IN) {
14940 ZERO_STRUCT(r->out);
14942 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
14943 if (_ptr_server_unc) {
14944 NDR_PULL_ALLOC(ndr, r->in.server_unc);
14945 } else {
14946 r->in.server_unc = NULL;
14948 if (r->in.server_unc) {
14949 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
14950 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
14951 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
14952 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
14953 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
14954 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
14955 if (length_server_unc_1 > size_server_unc_1) {
14956 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
14958 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
14959 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
14960 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
14962 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
14963 if (_ptr_path) {
14964 NDR_PULL_ALLOC(ndr, r->in.path);
14965 } else {
14966 r->in.path = NULL;
14968 if (r->in.path) {
14969 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
14970 NDR_PULL_SET_MEM_CTX(ndr, r->in.path, 0);
14971 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path));
14972 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path));
14973 size_path_1 = ndr_get_array_size(ndr, &r->in.path);
14974 length_path_1 = ndr_get_array_length(ndr, &r->in.path);
14975 if (length_path_1 > size_path_1) {
14976 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_path_1, length_path_1);
14978 NDR_CHECK(ndr_check_string_terminator(ndr, length_path_1, sizeof(uint16_t)));
14979 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path, length_path_1, sizeof(uint16_t), CH_UTF16));
14980 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
14982 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14983 NDR_PULL_ALLOC(ndr, r->in.info_ctr);
14985 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
14986 NDR_PULL_SET_MEM_CTX(ndr, r->in.info_ctr, LIBNDR_FLAG_REF_ALLOC);
14987 NDR_CHECK(ndr_pull_srvsvc_NetConnInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
14988 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
14989 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
14990 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
14991 if (_ptr_resume_handle) {
14992 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
14993 } else {
14994 r->in.resume_handle = NULL;
14996 if (r->in.resume_handle) {
14997 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
14998 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
14999 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
15000 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
15002 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
15003 *r->out.info_ctr = *r->in.info_ctr;
15004 NDR_PULL_ALLOC(ndr, r->out.totalentries);
15005 ZERO_STRUCTP(r->out.totalentries);
15007 if (flags & NDR_OUT) {
15008 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15009 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
15011 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
15012 NDR_PULL_SET_MEM_CTX(ndr, r->out.info_ctr, LIBNDR_FLAG_REF_ALLOC);
15013 NDR_CHECK(ndr_pull_srvsvc_NetConnInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
15014 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
15015 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15016 NDR_PULL_ALLOC(ndr, r->out.totalentries);
15018 _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
15019 NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
15020 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
15021 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
15022 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
15023 if (_ptr_resume_handle) {
15024 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
15025 } else {
15026 r->out.resume_handle = NULL;
15028 if (r->out.resume_handle) {
15029 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
15030 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
15031 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
15032 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
15034 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15036 return NDR_ERR_SUCCESS;
15039 _PUBLIC_ void ndr_print_srvsvc_NetConnEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetConnEnum *r)
15041 ndr_print_struct(ndr, name, "srvsvc_NetConnEnum");
15042 ndr->depth++;
15043 if (flags & NDR_SET_VALUES) {
15044 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15046 if (flags & NDR_IN) {
15047 ndr_print_struct(ndr, "in", "srvsvc_NetConnEnum");
15048 ndr->depth++;
15049 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
15050 ndr->depth++;
15051 if (r->in.server_unc) {
15052 ndr_print_string(ndr, "server_unc", r->in.server_unc);
15054 ndr->depth--;
15055 ndr_print_ptr(ndr, "path", r->in.path);
15056 ndr->depth++;
15057 if (r->in.path) {
15058 ndr_print_string(ndr, "path", r->in.path);
15060 ndr->depth--;
15061 ndr_print_ptr(ndr, "info_ctr", r->in.info_ctr);
15062 ndr->depth++;
15063 ndr_print_srvsvc_NetConnInfoCtr(ndr, "info_ctr", r->in.info_ctr);
15064 ndr->depth--;
15065 ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
15066 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
15067 ndr->depth++;
15068 if (r->in.resume_handle) {
15069 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
15071 ndr->depth--;
15072 ndr->depth--;
15074 if (flags & NDR_OUT) {
15075 ndr_print_struct(ndr, "out", "srvsvc_NetConnEnum");
15076 ndr->depth++;
15077 ndr_print_ptr(ndr, "info_ctr", r->out.info_ctr);
15078 ndr->depth++;
15079 ndr_print_srvsvc_NetConnInfoCtr(ndr, "info_ctr", r->out.info_ctr);
15080 ndr->depth--;
15081 ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
15082 ndr->depth++;
15083 ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
15084 ndr->depth--;
15085 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
15086 ndr->depth++;
15087 if (r->out.resume_handle) {
15088 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
15090 ndr->depth--;
15091 ndr_print_WERROR(ndr, "result", r->out.result);
15092 ndr->depth--;
15094 ndr->depth--;
15097 static enum ndr_err_code ndr_push_srvsvc_NetFileEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetFileEnum *r)
15099 if (flags & NDR_IN) {
15100 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
15101 if (r->in.server_unc) {
15102 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15103 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15104 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15105 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));
15107 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.path));
15108 if (r->in.path) {
15109 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
15110 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15111 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
15112 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path, ndr_charset_length(r->in.path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
15114 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.user));
15115 if (r->in.user) {
15116 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
15117 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15118 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
15119 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.user, ndr_charset_length(r->in.user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
15121 if (r->in.info_ctr == NULL) {
15122 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15124 NDR_CHECK(ndr_push_srvsvc_NetFileInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
15125 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
15126 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
15127 if (r->in.resume_handle) {
15128 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
15131 if (flags & NDR_OUT) {
15132 if (r->out.info_ctr == NULL) {
15133 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15135 NDR_CHECK(ndr_push_srvsvc_NetFileInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
15136 if (r->out.totalentries == NULL) {
15137 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15139 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
15140 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
15141 if (r->out.resume_handle) {
15142 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
15144 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15146 return NDR_ERR_SUCCESS;
15149 static enum ndr_err_code ndr_pull_srvsvc_NetFileEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetFileEnum *r)
15151 uint32_t _ptr_server_unc;
15152 uint32_t size_server_unc_1 = 0;
15153 uint32_t length_server_unc_1 = 0;
15154 uint32_t _ptr_path;
15155 uint32_t size_path_1 = 0;
15156 uint32_t length_path_1 = 0;
15157 uint32_t _ptr_user;
15158 uint32_t size_user_1 = 0;
15159 uint32_t length_user_1 = 0;
15160 uint32_t _ptr_resume_handle;
15161 TALLOC_CTX *_mem_save_server_unc_0;
15162 TALLOC_CTX *_mem_save_path_0;
15163 TALLOC_CTX *_mem_save_user_0;
15164 TALLOC_CTX *_mem_save_info_ctr_0;
15165 TALLOC_CTX *_mem_save_totalentries_0;
15166 TALLOC_CTX *_mem_save_resume_handle_0;
15167 if (flags & NDR_IN) {
15168 ZERO_STRUCT(r->out);
15170 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
15171 if (_ptr_server_unc) {
15172 NDR_PULL_ALLOC(ndr, r->in.server_unc);
15173 } else {
15174 r->in.server_unc = NULL;
15176 if (r->in.server_unc) {
15177 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
15178 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
15179 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
15180 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
15181 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
15182 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
15183 if (length_server_unc_1 > size_server_unc_1) {
15184 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
15186 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
15187 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
15188 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
15190 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
15191 if (_ptr_path) {
15192 NDR_PULL_ALLOC(ndr, r->in.path);
15193 } else {
15194 r->in.path = NULL;
15196 if (r->in.path) {
15197 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
15198 NDR_PULL_SET_MEM_CTX(ndr, r->in.path, 0);
15199 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path));
15200 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path));
15201 size_path_1 = ndr_get_array_size(ndr, &r->in.path);
15202 length_path_1 = ndr_get_array_length(ndr, &r->in.path);
15203 if (length_path_1 > size_path_1) {
15204 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_path_1, length_path_1);
15206 NDR_CHECK(ndr_check_string_terminator(ndr, length_path_1, sizeof(uint16_t)));
15207 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path, length_path_1, sizeof(uint16_t), CH_UTF16));
15208 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
15210 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
15211 if (_ptr_user) {
15212 NDR_PULL_ALLOC(ndr, r->in.user);
15213 } else {
15214 r->in.user = NULL;
15216 if (r->in.user) {
15217 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
15218 NDR_PULL_SET_MEM_CTX(ndr, r->in.user, 0);
15219 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.user));
15220 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.user));
15221 size_user_1 = ndr_get_array_size(ndr, &r->in.user);
15222 length_user_1 = ndr_get_array_length(ndr, &r->in.user);
15223 if (length_user_1 > size_user_1) {
15224 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_user_1, length_user_1);
15226 NDR_CHECK(ndr_check_string_terminator(ndr, length_user_1, sizeof(uint16_t)));
15227 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.user, length_user_1, sizeof(uint16_t), CH_UTF16));
15228 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
15230 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15231 NDR_PULL_ALLOC(ndr, r->in.info_ctr);
15233 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
15234 NDR_PULL_SET_MEM_CTX(ndr, r->in.info_ctr, LIBNDR_FLAG_REF_ALLOC);
15235 NDR_CHECK(ndr_pull_srvsvc_NetFileInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
15236 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
15237 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
15238 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
15239 if (_ptr_resume_handle) {
15240 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
15241 } else {
15242 r->in.resume_handle = NULL;
15244 if (r->in.resume_handle) {
15245 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
15246 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
15247 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
15248 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
15250 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
15251 *r->out.info_ctr = *r->in.info_ctr;
15252 NDR_PULL_ALLOC(ndr, r->out.totalentries);
15253 ZERO_STRUCTP(r->out.totalentries);
15255 if (flags & NDR_OUT) {
15256 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15257 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
15259 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
15260 NDR_PULL_SET_MEM_CTX(ndr, r->out.info_ctr, LIBNDR_FLAG_REF_ALLOC);
15261 NDR_CHECK(ndr_pull_srvsvc_NetFileInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
15262 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
15263 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15264 NDR_PULL_ALLOC(ndr, r->out.totalentries);
15266 _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
15267 NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
15268 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
15269 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
15270 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
15271 if (_ptr_resume_handle) {
15272 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
15273 } else {
15274 r->out.resume_handle = NULL;
15276 if (r->out.resume_handle) {
15277 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
15278 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
15279 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
15280 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
15282 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15284 return NDR_ERR_SUCCESS;
15287 _PUBLIC_ void ndr_print_srvsvc_NetFileEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetFileEnum *r)
15289 ndr_print_struct(ndr, name, "srvsvc_NetFileEnum");
15290 ndr->depth++;
15291 if (flags & NDR_SET_VALUES) {
15292 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15294 if (flags & NDR_IN) {
15295 ndr_print_struct(ndr, "in", "srvsvc_NetFileEnum");
15296 ndr->depth++;
15297 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
15298 ndr->depth++;
15299 if (r->in.server_unc) {
15300 ndr_print_string(ndr, "server_unc", r->in.server_unc);
15302 ndr->depth--;
15303 ndr_print_ptr(ndr, "path", r->in.path);
15304 ndr->depth++;
15305 if (r->in.path) {
15306 ndr_print_string(ndr, "path", r->in.path);
15308 ndr->depth--;
15309 ndr_print_ptr(ndr, "user", r->in.user);
15310 ndr->depth++;
15311 if (r->in.user) {
15312 ndr_print_string(ndr, "user", r->in.user);
15314 ndr->depth--;
15315 ndr_print_ptr(ndr, "info_ctr", r->in.info_ctr);
15316 ndr->depth++;
15317 ndr_print_srvsvc_NetFileInfoCtr(ndr, "info_ctr", r->in.info_ctr);
15318 ndr->depth--;
15319 ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
15320 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
15321 ndr->depth++;
15322 if (r->in.resume_handle) {
15323 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
15325 ndr->depth--;
15326 ndr->depth--;
15328 if (flags & NDR_OUT) {
15329 ndr_print_struct(ndr, "out", "srvsvc_NetFileEnum");
15330 ndr->depth++;
15331 ndr_print_ptr(ndr, "info_ctr", r->out.info_ctr);
15332 ndr->depth++;
15333 ndr_print_srvsvc_NetFileInfoCtr(ndr, "info_ctr", r->out.info_ctr);
15334 ndr->depth--;
15335 ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
15336 ndr->depth++;
15337 ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
15338 ndr->depth--;
15339 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
15340 ndr->depth++;
15341 if (r->out.resume_handle) {
15342 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
15344 ndr->depth--;
15345 ndr_print_WERROR(ndr, "result", r->out.result);
15346 ndr->depth--;
15348 ndr->depth--;
15351 static enum ndr_err_code ndr_push_srvsvc_NetFileGetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetFileGetInfo *r)
15353 if (flags & NDR_IN) {
15354 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
15355 if (r->in.server_unc) {
15356 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15357 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15358 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15359 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));
15361 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.fid));
15362 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
15364 if (flags & NDR_OUT) {
15365 if (r->out.info == NULL) {
15366 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15368 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
15369 NDR_CHECK(ndr_push_srvsvc_NetFileInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
15370 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15372 return NDR_ERR_SUCCESS;
15375 static enum ndr_err_code ndr_pull_srvsvc_NetFileGetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetFileGetInfo *r)
15377 uint32_t _ptr_server_unc;
15378 uint32_t size_server_unc_1 = 0;
15379 uint32_t length_server_unc_1 = 0;
15380 TALLOC_CTX *_mem_save_server_unc_0;
15381 TALLOC_CTX *_mem_save_info_0;
15382 if (flags & NDR_IN) {
15383 ZERO_STRUCT(r->out);
15385 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
15386 if (_ptr_server_unc) {
15387 NDR_PULL_ALLOC(ndr, r->in.server_unc);
15388 } else {
15389 r->in.server_unc = NULL;
15391 if (r->in.server_unc) {
15392 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
15393 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
15394 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
15395 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
15396 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
15397 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
15398 if (length_server_unc_1 > size_server_unc_1) {
15399 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
15401 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
15402 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
15403 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
15405 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.fid));
15406 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
15407 NDR_PULL_ALLOC(ndr, r->out.info);
15408 ZERO_STRUCTP(r->out.info);
15410 if (flags & NDR_OUT) {
15411 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15412 NDR_PULL_ALLOC(ndr, r->out.info);
15414 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
15415 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
15416 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
15417 NDR_CHECK(ndr_pull_srvsvc_NetFileInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
15418 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
15419 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15421 return NDR_ERR_SUCCESS;
15424 _PUBLIC_ void ndr_print_srvsvc_NetFileGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetFileGetInfo *r)
15426 ndr_print_struct(ndr, name, "srvsvc_NetFileGetInfo");
15427 ndr->depth++;
15428 if (flags & NDR_SET_VALUES) {
15429 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15431 if (flags & NDR_IN) {
15432 ndr_print_struct(ndr, "in", "srvsvc_NetFileGetInfo");
15433 ndr->depth++;
15434 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
15435 ndr->depth++;
15436 if (r->in.server_unc) {
15437 ndr_print_string(ndr, "server_unc", r->in.server_unc);
15439 ndr->depth--;
15440 ndr_print_uint32(ndr, "fid", r->in.fid);
15441 ndr_print_uint32(ndr, "level", r->in.level);
15442 ndr->depth--;
15444 if (flags & NDR_OUT) {
15445 ndr_print_struct(ndr, "out", "srvsvc_NetFileGetInfo");
15446 ndr->depth++;
15447 ndr_print_ptr(ndr, "info", r->out.info);
15448 ndr->depth++;
15449 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
15450 ndr_print_srvsvc_NetFileInfo(ndr, "info", r->out.info);
15451 ndr->depth--;
15452 ndr_print_WERROR(ndr, "result", r->out.result);
15453 ndr->depth--;
15455 ndr->depth--;
15458 static enum ndr_err_code ndr_push_srvsvc_NetFileClose(struct ndr_push *ndr, int flags, const struct srvsvc_NetFileClose *r)
15460 if (flags & NDR_IN) {
15461 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
15462 if (r->in.server_unc) {
15463 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15464 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15465 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15466 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));
15468 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.fid));
15470 if (flags & NDR_OUT) {
15471 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15473 return NDR_ERR_SUCCESS;
15476 static enum ndr_err_code ndr_pull_srvsvc_NetFileClose(struct ndr_pull *ndr, int flags, struct srvsvc_NetFileClose *r)
15478 uint32_t _ptr_server_unc;
15479 uint32_t size_server_unc_1 = 0;
15480 uint32_t length_server_unc_1 = 0;
15481 TALLOC_CTX *_mem_save_server_unc_0;
15482 if (flags & NDR_IN) {
15483 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
15484 if (_ptr_server_unc) {
15485 NDR_PULL_ALLOC(ndr, r->in.server_unc);
15486 } else {
15487 r->in.server_unc = NULL;
15489 if (r->in.server_unc) {
15490 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
15491 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
15492 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
15493 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
15494 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
15495 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
15496 if (length_server_unc_1 > size_server_unc_1) {
15497 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
15499 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
15500 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
15501 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
15503 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.fid));
15505 if (flags & NDR_OUT) {
15506 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15508 return NDR_ERR_SUCCESS;
15511 _PUBLIC_ void ndr_print_srvsvc_NetFileClose(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetFileClose *r)
15513 ndr_print_struct(ndr, name, "srvsvc_NetFileClose");
15514 ndr->depth++;
15515 if (flags & NDR_SET_VALUES) {
15516 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15518 if (flags & NDR_IN) {
15519 ndr_print_struct(ndr, "in", "srvsvc_NetFileClose");
15520 ndr->depth++;
15521 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
15522 ndr->depth++;
15523 if (r->in.server_unc) {
15524 ndr_print_string(ndr, "server_unc", r->in.server_unc);
15526 ndr->depth--;
15527 ndr_print_uint32(ndr, "fid", r->in.fid);
15528 ndr->depth--;
15530 if (flags & NDR_OUT) {
15531 ndr_print_struct(ndr, "out", "srvsvc_NetFileClose");
15532 ndr->depth++;
15533 ndr_print_WERROR(ndr, "result", r->out.result);
15534 ndr->depth--;
15536 ndr->depth--;
15539 static enum ndr_err_code ndr_push_srvsvc_NetSessEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetSessEnum *r)
15541 if (flags & NDR_IN) {
15542 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
15543 if (r->in.server_unc) {
15544 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15545 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15546 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15547 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));
15549 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.client));
15550 if (r->in.client) {
15551 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.client, CH_UTF16)));
15552 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15553 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.client, CH_UTF16)));
15554 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.client, ndr_charset_length(r->in.client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
15556 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.user));
15557 if (r->in.user) {
15558 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
15559 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15560 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
15561 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.user, ndr_charset_length(r->in.user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
15563 if (r->in.info_ctr == NULL) {
15564 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15566 NDR_CHECK(ndr_push_srvsvc_NetSessInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
15567 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
15568 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
15569 if (r->in.resume_handle) {
15570 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
15573 if (flags & NDR_OUT) {
15574 if (r->out.info_ctr == NULL) {
15575 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15577 NDR_CHECK(ndr_push_srvsvc_NetSessInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
15578 if (r->out.totalentries == NULL) {
15579 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15581 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
15582 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
15583 if (r->out.resume_handle) {
15584 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
15586 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15588 return NDR_ERR_SUCCESS;
15591 static enum ndr_err_code ndr_pull_srvsvc_NetSessEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetSessEnum *r)
15593 uint32_t _ptr_server_unc;
15594 uint32_t size_server_unc_1 = 0;
15595 uint32_t length_server_unc_1 = 0;
15596 uint32_t _ptr_client;
15597 uint32_t size_client_1 = 0;
15598 uint32_t length_client_1 = 0;
15599 uint32_t _ptr_user;
15600 uint32_t size_user_1 = 0;
15601 uint32_t length_user_1 = 0;
15602 uint32_t _ptr_resume_handle;
15603 TALLOC_CTX *_mem_save_server_unc_0;
15604 TALLOC_CTX *_mem_save_client_0;
15605 TALLOC_CTX *_mem_save_user_0;
15606 TALLOC_CTX *_mem_save_info_ctr_0;
15607 TALLOC_CTX *_mem_save_totalentries_0;
15608 TALLOC_CTX *_mem_save_resume_handle_0;
15609 if (flags & NDR_IN) {
15610 ZERO_STRUCT(r->out);
15612 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
15613 if (_ptr_server_unc) {
15614 NDR_PULL_ALLOC(ndr, r->in.server_unc);
15615 } else {
15616 r->in.server_unc = NULL;
15618 if (r->in.server_unc) {
15619 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
15620 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
15621 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
15622 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
15623 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
15624 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
15625 if (length_server_unc_1 > size_server_unc_1) {
15626 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
15628 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
15629 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
15630 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
15632 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
15633 if (_ptr_client) {
15634 NDR_PULL_ALLOC(ndr, r->in.client);
15635 } else {
15636 r->in.client = NULL;
15638 if (r->in.client) {
15639 _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
15640 NDR_PULL_SET_MEM_CTX(ndr, r->in.client, 0);
15641 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.client));
15642 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.client));
15643 size_client_1 = ndr_get_array_size(ndr, &r->in.client);
15644 length_client_1 = ndr_get_array_length(ndr, &r->in.client);
15645 if (length_client_1 > size_client_1) {
15646 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_client_1, length_client_1);
15648 NDR_CHECK(ndr_check_string_terminator(ndr, length_client_1, sizeof(uint16_t)));
15649 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.client, length_client_1, sizeof(uint16_t), CH_UTF16));
15650 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
15652 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
15653 if (_ptr_user) {
15654 NDR_PULL_ALLOC(ndr, r->in.user);
15655 } else {
15656 r->in.user = NULL;
15658 if (r->in.user) {
15659 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
15660 NDR_PULL_SET_MEM_CTX(ndr, r->in.user, 0);
15661 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.user));
15662 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.user));
15663 size_user_1 = ndr_get_array_size(ndr, &r->in.user);
15664 length_user_1 = ndr_get_array_length(ndr, &r->in.user);
15665 if (length_user_1 > size_user_1) {
15666 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_user_1, length_user_1);
15668 NDR_CHECK(ndr_check_string_terminator(ndr, length_user_1, sizeof(uint16_t)));
15669 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.user, length_user_1, sizeof(uint16_t), CH_UTF16));
15670 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
15672 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15673 NDR_PULL_ALLOC(ndr, r->in.info_ctr);
15675 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
15676 NDR_PULL_SET_MEM_CTX(ndr, r->in.info_ctr, LIBNDR_FLAG_REF_ALLOC);
15677 NDR_CHECK(ndr_pull_srvsvc_NetSessInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
15678 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
15679 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
15680 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
15681 if (_ptr_resume_handle) {
15682 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
15683 } else {
15684 r->in.resume_handle = NULL;
15686 if (r->in.resume_handle) {
15687 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
15688 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
15689 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
15690 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
15692 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
15693 *r->out.info_ctr = *r->in.info_ctr;
15694 NDR_PULL_ALLOC(ndr, r->out.totalentries);
15695 ZERO_STRUCTP(r->out.totalentries);
15697 if (flags & NDR_OUT) {
15698 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15699 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
15701 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
15702 NDR_PULL_SET_MEM_CTX(ndr, r->out.info_ctr, LIBNDR_FLAG_REF_ALLOC);
15703 NDR_CHECK(ndr_pull_srvsvc_NetSessInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
15704 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
15705 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15706 NDR_PULL_ALLOC(ndr, r->out.totalentries);
15708 _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
15709 NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
15710 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
15711 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
15712 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
15713 if (_ptr_resume_handle) {
15714 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
15715 } else {
15716 r->out.resume_handle = NULL;
15718 if (r->out.resume_handle) {
15719 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
15720 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
15721 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
15722 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
15724 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15726 return NDR_ERR_SUCCESS;
15729 _PUBLIC_ void ndr_print_srvsvc_NetSessEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSessEnum *r)
15731 ndr_print_struct(ndr, name, "srvsvc_NetSessEnum");
15732 ndr->depth++;
15733 if (flags & NDR_SET_VALUES) {
15734 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15736 if (flags & NDR_IN) {
15737 ndr_print_struct(ndr, "in", "srvsvc_NetSessEnum");
15738 ndr->depth++;
15739 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
15740 ndr->depth++;
15741 if (r->in.server_unc) {
15742 ndr_print_string(ndr, "server_unc", r->in.server_unc);
15744 ndr->depth--;
15745 ndr_print_ptr(ndr, "client", r->in.client);
15746 ndr->depth++;
15747 if (r->in.client) {
15748 ndr_print_string(ndr, "client", r->in.client);
15750 ndr->depth--;
15751 ndr_print_ptr(ndr, "user", r->in.user);
15752 ndr->depth++;
15753 if (r->in.user) {
15754 ndr_print_string(ndr, "user", r->in.user);
15756 ndr->depth--;
15757 ndr_print_ptr(ndr, "info_ctr", r->in.info_ctr);
15758 ndr->depth++;
15759 ndr_print_srvsvc_NetSessInfoCtr(ndr, "info_ctr", r->in.info_ctr);
15760 ndr->depth--;
15761 ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
15762 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
15763 ndr->depth++;
15764 if (r->in.resume_handle) {
15765 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
15767 ndr->depth--;
15768 ndr->depth--;
15770 if (flags & NDR_OUT) {
15771 ndr_print_struct(ndr, "out", "srvsvc_NetSessEnum");
15772 ndr->depth++;
15773 ndr_print_ptr(ndr, "info_ctr", r->out.info_ctr);
15774 ndr->depth++;
15775 ndr_print_srvsvc_NetSessInfoCtr(ndr, "info_ctr", r->out.info_ctr);
15776 ndr->depth--;
15777 ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
15778 ndr->depth++;
15779 ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
15780 ndr->depth--;
15781 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
15782 ndr->depth++;
15783 if (r->out.resume_handle) {
15784 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
15786 ndr->depth--;
15787 ndr_print_WERROR(ndr, "result", r->out.result);
15788 ndr->depth--;
15790 ndr->depth--;
15793 static enum ndr_err_code ndr_push_srvsvc_NetSessDel(struct ndr_push *ndr, int flags, const struct srvsvc_NetSessDel *r)
15795 if (flags & NDR_IN) {
15796 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
15797 if (r->in.server_unc) {
15798 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15799 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15800 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15801 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));
15803 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.client));
15804 if (r->in.client) {
15805 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.client, CH_UTF16)));
15806 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15807 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.client, CH_UTF16)));
15808 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.client, ndr_charset_length(r->in.client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
15810 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.user));
15811 if (r->in.user) {
15812 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
15813 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15814 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
15815 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.user, ndr_charset_length(r->in.user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
15818 if (flags & NDR_OUT) {
15819 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15821 return NDR_ERR_SUCCESS;
15824 static enum ndr_err_code ndr_pull_srvsvc_NetSessDel(struct ndr_pull *ndr, int flags, struct srvsvc_NetSessDel *r)
15826 uint32_t _ptr_server_unc;
15827 uint32_t size_server_unc_1 = 0;
15828 uint32_t length_server_unc_1 = 0;
15829 uint32_t _ptr_client;
15830 uint32_t size_client_1 = 0;
15831 uint32_t length_client_1 = 0;
15832 uint32_t _ptr_user;
15833 uint32_t size_user_1 = 0;
15834 uint32_t length_user_1 = 0;
15835 TALLOC_CTX *_mem_save_server_unc_0;
15836 TALLOC_CTX *_mem_save_client_0;
15837 TALLOC_CTX *_mem_save_user_0;
15838 if (flags & NDR_IN) {
15839 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
15840 if (_ptr_server_unc) {
15841 NDR_PULL_ALLOC(ndr, r->in.server_unc);
15842 } else {
15843 r->in.server_unc = NULL;
15845 if (r->in.server_unc) {
15846 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
15847 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
15848 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
15849 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
15850 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
15851 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
15852 if (length_server_unc_1 > size_server_unc_1) {
15853 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
15855 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
15856 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
15857 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
15859 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
15860 if (_ptr_client) {
15861 NDR_PULL_ALLOC(ndr, r->in.client);
15862 } else {
15863 r->in.client = NULL;
15865 if (r->in.client) {
15866 _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
15867 NDR_PULL_SET_MEM_CTX(ndr, r->in.client, 0);
15868 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.client));
15869 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.client));
15870 size_client_1 = ndr_get_array_size(ndr, &r->in.client);
15871 length_client_1 = ndr_get_array_length(ndr, &r->in.client);
15872 if (length_client_1 > size_client_1) {
15873 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_client_1, length_client_1);
15875 NDR_CHECK(ndr_check_string_terminator(ndr, length_client_1, sizeof(uint16_t)));
15876 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.client, length_client_1, sizeof(uint16_t), CH_UTF16));
15877 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
15879 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
15880 if (_ptr_user) {
15881 NDR_PULL_ALLOC(ndr, r->in.user);
15882 } else {
15883 r->in.user = NULL;
15885 if (r->in.user) {
15886 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
15887 NDR_PULL_SET_MEM_CTX(ndr, r->in.user, 0);
15888 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.user));
15889 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.user));
15890 size_user_1 = ndr_get_array_size(ndr, &r->in.user);
15891 length_user_1 = ndr_get_array_length(ndr, &r->in.user);
15892 if (length_user_1 > size_user_1) {
15893 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_user_1, length_user_1);
15895 NDR_CHECK(ndr_check_string_terminator(ndr, length_user_1, sizeof(uint16_t)));
15896 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.user, length_user_1, sizeof(uint16_t), CH_UTF16));
15897 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
15900 if (flags & NDR_OUT) {
15901 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15903 return NDR_ERR_SUCCESS;
15906 _PUBLIC_ void ndr_print_srvsvc_NetSessDel(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSessDel *r)
15908 ndr_print_struct(ndr, name, "srvsvc_NetSessDel");
15909 ndr->depth++;
15910 if (flags & NDR_SET_VALUES) {
15911 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15913 if (flags & NDR_IN) {
15914 ndr_print_struct(ndr, "in", "srvsvc_NetSessDel");
15915 ndr->depth++;
15916 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
15917 ndr->depth++;
15918 if (r->in.server_unc) {
15919 ndr_print_string(ndr, "server_unc", r->in.server_unc);
15921 ndr->depth--;
15922 ndr_print_ptr(ndr, "client", r->in.client);
15923 ndr->depth++;
15924 if (r->in.client) {
15925 ndr_print_string(ndr, "client", r->in.client);
15927 ndr->depth--;
15928 ndr_print_ptr(ndr, "user", r->in.user);
15929 ndr->depth++;
15930 if (r->in.user) {
15931 ndr_print_string(ndr, "user", r->in.user);
15933 ndr->depth--;
15934 ndr->depth--;
15936 if (flags & NDR_OUT) {
15937 ndr_print_struct(ndr, "out", "srvsvc_NetSessDel");
15938 ndr->depth++;
15939 ndr_print_WERROR(ndr, "result", r->out.result);
15940 ndr->depth--;
15942 ndr->depth--;
15945 static enum ndr_err_code ndr_push_srvsvc_NetShareAdd(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareAdd *r)
15947 if (flags & NDR_IN) {
15948 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
15949 if (r->in.server_unc) {
15950 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15951 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15952 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15953 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));
15955 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
15956 if (r->in.info == NULL) {
15957 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15959 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
15960 NDR_CHECK(ndr_push_srvsvc_NetShareInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
15961 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.parm_error));
15962 if (r->in.parm_error) {
15963 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.parm_error));
15966 if (flags & NDR_OUT) {
15967 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.parm_error));
15968 if (r->out.parm_error) {
15969 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.parm_error));
15971 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15973 return NDR_ERR_SUCCESS;
15976 static enum ndr_err_code ndr_pull_srvsvc_NetShareAdd(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareAdd *r)
15978 uint32_t _ptr_server_unc;
15979 uint32_t size_server_unc_1 = 0;
15980 uint32_t length_server_unc_1 = 0;
15981 uint32_t _ptr_parm_error;
15982 TALLOC_CTX *_mem_save_server_unc_0;
15983 TALLOC_CTX *_mem_save_info_0;
15984 TALLOC_CTX *_mem_save_parm_error_0;
15985 if (flags & NDR_IN) {
15986 ZERO_STRUCT(r->out);
15988 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
15989 if (_ptr_server_unc) {
15990 NDR_PULL_ALLOC(ndr, r->in.server_unc);
15991 } else {
15992 r->in.server_unc = NULL;
15994 if (r->in.server_unc) {
15995 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
15996 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
15997 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
15998 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
15999 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
16000 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
16001 if (length_server_unc_1 > size_server_unc_1) {
16002 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
16004 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
16005 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
16006 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
16008 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
16009 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16010 NDR_PULL_ALLOC(ndr, r->in.info);
16012 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
16013 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
16014 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
16015 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
16016 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
16017 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
16018 if (_ptr_parm_error) {
16019 NDR_PULL_ALLOC(ndr, r->in.parm_error);
16020 } else {
16021 r->in.parm_error = NULL;
16023 if (r->in.parm_error) {
16024 _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
16025 NDR_PULL_SET_MEM_CTX(ndr, r->in.parm_error, 0);
16026 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.parm_error));
16027 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
16030 if (flags & NDR_OUT) {
16031 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
16032 if (_ptr_parm_error) {
16033 NDR_PULL_ALLOC(ndr, r->out.parm_error);
16034 } else {
16035 r->out.parm_error = NULL;
16037 if (r->out.parm_error) {
16038 _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
16039 NDR_PULL_SET_MEM_CTX(ndr, r->out.parm_error, 0);
16040 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.parm_error));
16041 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
16043 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16045 return NDR_ERR_SUCCESS;
16048 _PUBLIC_ void ndr_print_srvsvc_NetShareAdd(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareAdd *r)
16050 ndr_print_struct(ndr, name, "srvsvc_NetShareAdd");
16051 ndr->depth++;
16052 if (flags & NDR_SET_VALUES) {
16053 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16055 if (flags & NDR_IN) {
16056 ndr_print_struct(ndr, "in", "srvsvc_NetShareAdd");
16057 ndr->depth++;
16058 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
16059 ndr->depth++;
16060 if (r->in.server_unc) {
16061 ndr_print_string(ndr, "server_unc", r->in.server_unc);
16063 ndr->depth--;
16064 ndr_print_uint32(ndr, "level", r->in.level);
16065 ndr_print_ptr(ndr, "info", r->in.info);
16066 ndr->depth++;
16067 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
16068 ndr_print_srvsvc_NetShareInfo(ndr, "info", r->in.info);
16069 ndr->depth--;
16070 ndr_print_ptr(ndr, "parm_error", r->in.parm_error);
16071 ndr->depth++;
16072 if (r->in.parm_error) {
16073 ndr_print_uint32(ndr, "parm_error", *r->in.parm_error);
16075 ndr->depth--;
16076 ndr->depth--;
16078 if (flags & NDR_OUT) {
16079 ndr_print_struct(ndr, "out", "srvsvc_NetShareAdd");
16080 ndr->depth++;
16081 ndr_print_ptr(ndr, "parm_error", r->out.parm_error);
16082 ndr->depth++;
16083 if (r->out.parm_error) {
16084 ndr_print_uint32(ndr, "parm_error", *r->out.parm_error);
16086 ndr->depth--;
16087 ndr_print_WERROR(ndr, "result", r->out.result);
16088 ndr->depth--;
16090 ndr->depth--;
16093 static enum ndr_err_code ndr_push_srvsvc_NetShareEnumAll(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareEnumAll *r)
16095 if (flags & NDR_IN) {
16096 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
16097 if (r->in.server_unc) {
16098 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16099 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
16100 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16101 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));
16103 if (r->in.info_ctr == NULL) {
16104 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16106 NDR_CHECK(ndr_push_srvsvc_NetShareInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
16107 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
16108 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
16109 if (r->in.resume_handle) {
16110 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
16113 if (flags & NDR_OUT) {
16114 if (r->out.info_ctr == NULL) {
16115 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16117 NDR_CHECK(ndr_push_srvsvc_NetShareInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
16118 if (r->out.totalentries == NULL) {
16119 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16121 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
16122 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
16123 if (r->out.resume_handle) {
16124 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
16126 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16128 return NDR_ERR_SUCCESS;
16131 static enum ndr_err_code ndr_pull_srvsvc_NetShareEnumAll(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareEnumAll *r)
16133 uint32_t _ptr_server_unc;
16134 uint32_t size_server_unc_1 = 0;
16135 uint32_t length_server_unc_1 = 0;
16136 uint32_t _ptr_resume_handle;
16137 TALLOC_CTX *_mem_save_server_unc_0;
16138 TALLOC_CTX *_mem_save_info_ctr_0;
16139 TALLOC_CTX *_mem_save_totalentries_0;
16140 TALLOC_CTX *_mem_save_resume_handle_0;
16141 if (flags & NDR_IN) {
16142 ZERO_STRUCT(r->out);
16144 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
16145 if (_ptr_server_unc) {
16146 NDR_PULL_ALLOC(ndr, r->in.server_unc);
16147 } else {
16148 r->in.server_unc = NULL;
16150 if (r->in.server_unc) {
16151 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
16152 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
16153 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
16154 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
16155 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
16156 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
16157 if (length_server_unc_1 > size_server_unc_1) {
16158 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
16160 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
16161 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
16162 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
16164 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16165 NDR_PULL_ALLOC(ndr, r->in.info_ctr);
16167 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
16168 NDR_PULL_SET_MEM_CTX(ndr, r->in.info_ctr, LIBNDR_FLAG_REF_ALLOC);
16169 NDR_CHECK(ndr_pull_srvsvc_NetShareInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
16170 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
16171 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
16172 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
16173 if (_ptr_resume_handle) {
16174 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
16175 } else {
16176 r->in.resume_handle = NULL;
16178 if (r->in.resume_handle) {
16179 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
16180 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
16181 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
16182 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
16184 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
16185 *r->out.info_ctr = *r->in.info_ctr;
16186 NDR_PULL_ALLOC(ndr, r->out.totalentries);
16187 ZERO_STRUCTP(r->out.totalentries);
16189 if (flags & NDR_OUT) {
16190 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16191 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
16193 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
16194 NDR_PULL_SET_MEM_CTX(ndr, r->out.info_ctr, LIBNDR_FLAG_REF_ALLOC);
16195 NDR_CHECK(ndr_pull_srvsvc_NetShareInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
16196 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
16197 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16198 NDR_PULL_ALLOC(ndr, r->out.totalentries);
16200 _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
16201 NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
16202 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
16203 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
16204 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
16205 if (_ptr_resume_handle) {
16206 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
16207 } else {
16208 r->out.resume_handle = NULL;
16210 if (r->out.resume_handle) {
16211 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
16212 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
16213 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
16214 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
16216 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16218 return NDR_ERR_SUCCESS;
16221 _PUBLIC_ void ndr_print_srvsvc_NetShareEnumAll(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareEnumAll *r)
16223 ndr_print_struct(ndr, name, "srvsvc_NetShareEnumAll");
16224 ndr->depth++;
16225 if (flags & NDR_SET_VALUES) {
16226 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16228 if (flags & NDR_IN) {
16229 ndr_print_struct(ndr, "in", "srvsvc_NetShareEnumAll");
16230 ndr->depth++;
16231 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
16232 ndr->depth++;
16233 if (r->in.server_unc) {
16234 ndr_print_string(ndr, "server_unc", r->in.server_unc);
16236 ndr->depth--;
16237 ndr_print_ptr(ndr, "info_ctr", r->in.info_ctr);
16238 ndr->depth++;
16239 ndr_print_srvsvc_NetShareInfoCtr(ndr, "info_ctr", r->in.info_ctr);
16240 ndr->depth--;
16241 ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
16242 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
16243 ndr->depth++;
16244 if (r->in.resume_handle) {
16245 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
16247 ndr->depth--;
16248 ndr->depth--;
16250 if (flags & NDR_OUT) {
16251 ndr_print_struct(ndr, "out", "srvsvc_NetShareEnumAll");
16252 ndr->depth++;
16253 ndr_print_ptr(ndr, "info_ctr", r->out.info_ctr);
16254 ndr->depth++;
16255 ndr_print_srvsvc_NetShareInfoCtr(ndr, "info_ctr", r->out.info_ctr);
16256 ndr->depth--;
16257 ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
16258 ndr->depth++;
16259 ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
16260 ndr->depth--;
16261 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
16262 ndr->depth++;
16263 if (r->out.resume_handle) {
16264 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
16266 ndr->depth--;
16267 ndr_print_WERROR(ndr, "result", r->out.result);
16268 ndr->depth--;
16270 ndr->depth--;
16273 static enum ndr_err_code ndr_push_srvsvc_NetShareGetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareGetInfo *r)
16275 if (flags & NDR_IN) {
16276 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
16277 if (r->in.server_unc) {
16278 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16279 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
16280 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16281 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));
16283 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
16284 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
16285 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
16286 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));
16287 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
16289 if (flags & NDR_OUT) {
16290 if (r->out.info == NULL) {
16291 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16293 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
16294 NDR_CHECK(ndr_push_srvsvc_NetShareInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
16295 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16297 return NDR_ERR_SUCCESS;
16300 static enum ndr_err_code ndr_pull_srvsvc_NetShareGetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareGetInfo *r)
16302 uint32_t _ptr_server_unc;
16303 uint32_t size_server_unc_1 = 0;
16304 uint32_t length_server_unc_1 = 0;
16305 uint32_t size_share_name_0 = 0;
16306 uint32_t length_share_name_0 = 0;
16307 TALLOC_CTX *_mem_save_server_unc_0;
16308 TALLOC_CTX *_mem_save_info_0;
16309 if (flags & NDR_IN) {
16310 ZERO_STRUCT(r->out);
16312 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
16313 if (_ptr_server_unc) {
16314 NDR_PULL_ALLOC(ndr, r->in.server_unc);
16315 } else {
16316 r->in.server_unc = NULL;
16318 if (r->in.server_unc) {
16319 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
16320 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
16321 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
16322 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
16323 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
16324 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
16325 if (length_server_unc_1 > size_server_unc_1) {
16326 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
16328 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
16329 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
16330 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
16332 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share_name));
16333 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share_name));
16334 size_share_name_0 = ndr_get_array_size(ndr, &r->in.share_name);
16335 length_share_name_0 = ndr_get_array_length(ndr, &r->in.share_name);
16336 if (length_share_name_0 > size_share_name_0) {
16337 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_share_name_0, length_share_name_0);
16339 NDR_CHECK(ndr_check_string_terminator(ndr, length_share_name_0, sizeof(uint16_t)));
16340 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share_name, length_share_name_0, sizeof(uint16_t), CH_UTF16));
16341 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
16342 NDR_PULL_ALLOC(ndr, r->out.info);
16343 ZERO_STRUCTP(r->out.info);
16345 if (flags & NDR_OUT) {
16346 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16347 NDR_PULL_ALLOC(ndr, r->out.info);
16349 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
16350 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
16351 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
16352 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
16353 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
16354 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16356 return NDR_ERR_SUCCESS;
16359 _PUBLIC_ void ndr_print_srvsvc_NetShareGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareGetInfo *r)
16361 ndr_print_struct(ndr, name, "srvsvc_NetShareGetInfo");
16362 ndr->depth++;
16363 if (flags & NDR_SET_VALUES) {
16364 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16366 if (flags & NDR_IN) {
16367 ndr_print_struct(ndr, "in", "srvsvc_NetShareGetInfo");
16368 ndr->depth++;
16369 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
16370 ndr->depth++;
16371 if (r->in.server_unc) {
16372 ndr_print_string(ndr, "server_unc", r->in.server_unc);
16374 ndr->depth--;
16375 ndr_print_string(ndr, "share_name", r->in.share_name);
16376 ndr_print_uint32(ndr, "level", r->in.level);
16377 ndr->depth--;
16379 if (flags & NDR_OUT) {
16380 ndr_print_struct(ndr, "out", "srvsvc_NetShareGetInfo");
16381 ndr->depth++;
16382 ndr_print_ptr(ndr, "info", r->out.info);
16383 ndr->depth++;
16384 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
16385 ndr_print_srvsvc_NetShareInfo(ndr, "info", r->out.info);
16386 ndr->depth--;
16387 ndr_print_WERROR(ndr, "result", r->out.result);
16388 ndr->depth--;
16390 ndr->depth--;
16393 static enum ndr_err_code ndr_push_srvsvc_NetShareSetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareSetInfo *r)
16395 if (flags & NDR_IN) {
16396 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
16397 if (r->in.server_unc) {
16398 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16399 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
16400 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16401 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));
16403 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
16404 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
16405 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
16406 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));
16407 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
16408 if (r->in.info == NULL) {
16409 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16411 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
16412 NDR_CHECK(ndr_push_srvsvc_NetShareInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
16413 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.parm_error));
16414 if (r->in.parm_error) {
16415 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.parm_error));
16418 if (flags & NDR_OUT) {
16419 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.parm_error));
16420 if (r->out.parm_error) {
16421 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.parm_error));
16423 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16425 return NDR_ERR_SUCCESS;
16428 static enum ndr_err_code ndr_pull_srvsvc_NetShareSetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareSetInfo *r)
16430 uint32_t _ptr_server_unc;
16431 uint32_t size_server_unc_1 = 0;
16432 uint32_t length_server_unc_1 = 0;
16433 uint32_t size_share_name_0 = 0;
16434 uint32_t length_share_name_0 = 0;
16435 uint32_t _ptr_parm_error;
16436 TALLOC_CTX *_mem_save_server_unc_0;
16437 TALLOC_CTX *_mem_save_info_0;
16438 TALLOC_CTX *_mem_save_parm_error_0;
16439 if (flags & NDR_IN) {
16440 ZERO_STRUCT(r->out);
16442 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
16443 if (_ptr_server_unc) {
16444 NDR_PULL_ALLOC(ndr, r->in.server_unc);
16445 } else {
16446 r->in.server_unc = NULL;
16448 if (r->in.server_unc) {
16449 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
16450 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
16451 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
16452 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
16453 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
16454 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
16455 if (length_server_unc_1 > size_server_unc_1) {
16456 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
16458 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
16459 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
16460 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
16462 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share_name));
16463 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share_name));
16464 size_share_name_0 = ndr_get_array_size(ndr, &r->in.share_name);
16465 length_share_name_0 = ndr_get_array_length(ndr, &r->in.share_name);
16466 if (length_share_name_0 > size_share_name_0) {
16467 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_share_name_0, length_share_name_0);
16469 NDR_CHECK(ndr_check_string_terminator(ndr, length_share_name_0, sizeof(uint16_t)));
16470 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share_name, length_share_name_0, sizeof(uint16_t), CH_UTF16));
16471 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
16472 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16473 NDR_PULL_ALLOC(ndr, r->in.info);
16475 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
16476 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
16477 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
16478 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
16479 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
16480 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
16481 if (_ptr_parm_error) {
16482 NDR_PULL_ALLOC(ndr, r->in.parm_error);
16483 } else {
16484 r->in.parm_error = NULL;
16486 if (r->in.parm_error) {
16487 _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
16488 NDR_PULL_SET_MEM_CTX(ndr, r->in.parm_error, 0);
16489 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.parm_error));
16490 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
16493 if (flags & NDR_OUT) {
16494 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
16495 if (_ptr_parm_error) {
16496 NDR_PULL_ALLOC(ndr, r->out.parm_error);
16497 } else {
16498 r->out.parm_error = NULL;
16500 if (r->out.parm_error) {
16501 _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
16502 NDR_PULL_SET_MEM_CTX(ndr, r->out.parm_error, 0);
16503 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.parm_error));
16504 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
16506 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16508 return NDR_ERR_SUCCESS;
16511 _PUBLIC_ void ndr_print_srvsvc_NetShareSetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareSetInfo *r)
16513 ndr_print_struct(ndr, name, "srvsvc_NetShareSetInfo");
16514 ndr->depth++;
16515 if (flags & NDR_SET_VALUES) {
16516 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16518 if (flags & NDR_IN) {
16519 ndr_print_struct(ndr, "in", "srvsvc_NetShareSetInfo");
16520 ndr->depth++;
16521 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
16522 ndr->depth++;
16523 if (r->in.server_unc) {
16524 ndr_print_string(ndr, "server_unc", r->in.server_unc);
16526 ndr->depth--;
16527 ndr_print_string(ndr, "share_name", r->in.share_name);
16528 ndr_print_uint32(ndr, "level", r->in.level);
16529 ndr_print_ptr(ndr, "info", r->in.info);
16530 ndr->depth++;
16531 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
16532 ndr_print_srvsvc_NetShareInfo(ndr, "info", r->in.info);
16533 ndr->depth--;
16534 ndr_print_ptr(ndr, "parm_error", r->in.parm_error);
16535 ndr->depth++;
16536 if (r->in.parm_error) {
16537 ndr_print_uint32(ndr, "parm_error", *r->in.parm_error);
16539 ndr->depth--;
16540 ndr->depth--;
16542 if (flags & NDR_OUT) {
16543 ndr_print_struct(ndr, "out", "srvsvc_NetShareSetInfo");
16544 ndr->depth++;
16545 ndr_print_ptr(ndr, "parm_error", r->out.parm_error);
16546 ndr->depth++;
16547 if (r->out.parm_error) {
16548 ndr_print_uint32(ndr, "parm_error", *r->out.parm_error);
16550 ndr->depth--;
16551 ndr_print_WERROR(ndr, "result", r->out.result);
16552 ndr->depth--;
16554 ndr->depth--;
16557 static enum ndr_err_code ndr_push_srvsvc_NetShareDel(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareDel *r)
16559 if (flags & NDR_IN) {
16560 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
16561 if (r->in.server_unc) {
16562 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16563 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
16564 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16565 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));
16567 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
16568 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
16569 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
16570 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));
16571 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.reserved));
16573 if (flags & NDR_OUT) {
16574 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16576 return NDR_ERR_SUCCESS;
16579 static enum ndr_err_code ndr_pull_srvsvc_NetShareDel(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareDel *r)
16581 uint32_t _ptr_server_unc;
16582 uint32_t size_server_unc_1 = 0;
16583 uint32_t length_server_unc_1 = 0;
16584 uint32_t size_share_name_0 = 0;
16585 uint32_t length_share_name_0 = 0;
16586 TALLOC_CTX *_mem_save_server_unc_0;
16587 if (flags & NDR_IN) {
16588 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
16589 if (_ptr_server_unc) {
16590 NDR_PULL_ALLOC(ndr, r->in.server_unc);
16591 } else {
16592 r->in.server_unc = NULL;
16594 if (r->in.server_unc) {
16595 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
16596 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
16597 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
16598 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
16599 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
16600 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
16601 if (length_server_unc_1 > size_server_unc_1) {
16602 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
16604 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
16605 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
16606 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
16608 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share_name));
16609 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share_name));
16610 size_share_name_0 = ndr_get_array_size(ndr, &r->in.share_name);
16611 length_share_name_0 = ndr_get_array_length(ndr, &r->in.share_name);
16612 if (length_share_name_0 > size_share_name_0) {
16613 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_share_name_0, length_share_name_0);
16615 NDR_CHECK(ndr_check_string_terminator(ndr, length_share_name_0, sizeof(uint16_t)));
16616 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share_name, length_share_name_0, sizeof(uint16_t), CH_UTF16));
16617 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.reserved));
16619 if (flags & NDR_OUT) {
16620 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16622 return NDR_ERR_SUCCESS;
16625 _PUBLIC_ void ndr_print_srvsvc_NetShareDel(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareDel *r)
16627 ndr_print_struct(ndr, name, "srvsvc_NetShareDel");
16628 ndr->depth++;
16629 if (flags & NDR_SET_VALUES) {
16630 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16632 if (flags & NDR_IN) {
16633 ndr_print_struct(ndr, "in", "srvsvc_NetShareDel");
16634 ndr->depth++;
16635 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
16636 ndr->depth++;
16637 if (r->in.server_unc) {
16638 ndr_print_string(ndr, "server_unc", r->in.server_unc);
16640 ndr->depth--;
16641 ndr_print_string(ndr, "share_name", r->in.share_name);
16642 ndr_print_uint32(ndr, "reserved", r->in.reserved);
16643 ndr->depth--;
16645 if (flags & NDR_OUT) {
16646 ndr_print_struct(ndr, "out", "srvsvc_NetShareDel");
16647 ndr->depth++;
16648 ndr_print_WERROR(ndr, "result", r->out.result);
16649 ndr->depth--;
16651 ndr->depth--;
16654 static enum ndr_err_code ndr_push_srvsvc_NetShareDelSticky(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareDelSticky *r)
16656 if (flags & NDR_IN) {
16657 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
16658 if (r->in.server_unc) {
16659 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16660 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
16661 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16662 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));
16664 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
16665 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
16666 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
16667 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));
16668 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.reserved));
16670 if (flags & NDR_OUT) {
16671 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16673 return NDR_ERR_SUCCESS;
16676 static enum ndr_err_code ndr_pull_srvsvc_NetShareDelSticky(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareDelSticky *r)
16678 uint32_t _ptr_server_unc;
16679 uint32_t size_server_unc_1 = 0;
16680 uint32_t length_server_unc_1 = 0;
16681 uint32_t size_share_name_0 = 0;
16682 uint32_t length_share_name_0 = 0;
16683 TALLOC_CTX *_mem_save_server_unc_0;
16684 if (flags & NDR_IN) {
16685 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
16686 if (_ptr_server_unc) {
16687 NDR_PULL_ALLOC(ndr, r->in.server_unc);
16688 } else {
16689 r->in.server_unc = NULL;
16691 if (r->in.server_unc) {
16692 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
16693 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
16694 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
16695 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
16696 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
16697 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
16698 if (length_server_unc_1 > size_server_unc_1) {
16699 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
16701 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
16702 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
16703 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
16705 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share_name));
16706 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share_name));
16707 size_share_name_0 = ndr_get_array_size(ndr, &r->in.share_name);
16708 length_share_name_0 = ndr_get_array_length(ndr, &r->in.share_name);
16709 if (length_share_name_0 > size_share_name_0) {
16710 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_share_name_0, length_share_name_0);
16712 NDR_CHECK(ndr_check_string_terminator(ndr, length_share_name_0, sizeof(uint16_t)));
16713 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share_name, length_share_name_0, sizeof(uint16_t), CH_UTF16));
16714 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.reserved));
16716 if (flags & NDR_OUT) {
16717 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16719 return NDR_ERR_SUCCESS;
16722 _PUBLIC_ void ndr_print_srvsvc_NetShareDelSticky(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareDelSticky *r)
16724 ndr_print_struct(ndr, name, "srvsvc_NetShareDelSticky");
16725 ndr->depth++;
16726 if (flags & NDR_SET_VALUES) {
16727 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16729 if (flags & NDR_IN) {
16730 ndr_print_struct(ndr, "in", "srvsvc_NetShareDelSticky");
16731 ndr->depth++;
16732 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
16733 ndr->depth++;
16734 if (r->in.server_unc) {
16735 ndr_print_string(ndr, "server_unc", r->in.server_unc);
16737 ndr->depth--;
16738 ndr_print_string(ndr, "share_name", r->in.share_name);
16739 ndr_print_uint32(ndr, "reserved", r->in.reserved);
16740 ndr->depth--;
16742 if (flags & NDR_OUT) {
16743 ndr_print_struct(ndr, "out", "srvsvc_NetShareDelSticky");
16744 ndr->depth++;
16745 ndr_print_WERROR(ndr, "result", r->out.result);
16746 ndr->depth--;
16748 ndr->depth--;
16751 static enum ndr_err_code ndr_push_srvsvc_NetShareCheck(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareCheck *r)
16753 if (flags & NDR_IN) {
16754 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
16755 if (r->in.server_unc) {
16756 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16757 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
16758 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16759 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));
16761 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.device_name, CH_UTF16)));
16762 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
16763 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.device_name, CH_UTF16)));
16764 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));
16766 if (flags & NDR_OUT) {
16767 if (r->out.type == NULL) {
16768 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16770 NDR_CHECK(ndr_push_srvsvc_ShareType(ndr, NDR_SCALARS, *r->out.type));
16771 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16773 return NDR_ERR_SUCCESS;
16776 static enum ndr_err_code ndr_pull_srvsvc_NetShareCheck(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareCheck *r)
16778 uint32_t _ptr_server_unc;
16779 uint32_t size_server_unc_1 = 0;
16780 uint32_t length_server_unc_1 = 0;
16781 uint32_t size_device_name_0 = 0;
16782 uint32_t length_device_name_0 = 0;
16783 TALLOC_CTX *_mem_save_server_unc_0;
16784 TALLOC_CTX *_mem_save_type_0;
16785 if (flags & NDR_IN) {
16786 ZERO_STRUCT(r->out);
16788 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
16789 if (_ptr_server_unc) {
16790 NDR_PULL_ALLOC(ndr, r->in.server_unc);
16791 } else {
16792 r->in.server_unc = NULL;
16794 if (r->in.server_unc) {
16795 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
16796 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
16797 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
16798 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
16799 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
16800 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
16801 if (length_server_unc_1 > size_server_unc_1) {
16802 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
16804 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
16805 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
16806 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
16808 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.device_name));
16809 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.device_name));
16810 size_device_name_0 = ndr_get_array_size(ndr, &r->in.device_name);
16811 length_device_name_0 = ndr_get_array_length(ndr, &r->in.device_name);
16812 if (length_device_name_0 > size_device_name_0) {
16813 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_device_name_0, length_device_name_0);
16815 NDR_CHECK(ndr_check_string_terminator(ndr, length_device_name_0, sizeof(uint16_t)));
16816 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.device_name, length_device_name_0, sizeof(uint16_t), CH_UTF16));
16817 NDR_PULL_ALLOC(ndr, r->out.type);
16818 ZERO_STRUCTP(r->out.type);
16820 if (flags & NDR_OUT) {
16821 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16822 NDR_PULL_ALLOC(ndr, r->out.type);
16824 _mem_save_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
16825 NDR_PULL_SET_MEM_CTX(ndr, r->out.type, LIBNDR_FLAG_REF_ALLOC);
16826 NDR_CHECK(ndr_pull_srvsvc_ShareType(ndr, NDR_SCALARS, r->out.type));
16827 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_type_0, LIBNDR_FLAG_REF_ALLOC);
16828 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16830 return NDR_ERR_SUCCESS;
16833 _PUBLIC_ void ndr_print_srvsvc_NetShareCheck(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareCheck *r)
16835 ndr_print_struct(ndr, name, "srvsvc_NetShareCheck");
16836 ndr->depth++;
16837 if (flags & NDR_SET_VALUES) {
16838 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16840 if (flags & NDR_IN) {
16841 ndr_print_struct(ndr, "in", "srvsvc_NetShareCheck");
16842 ndr->depth++;
16843 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
16844 ndr->depth++;
16845 if (r->in.server_unc) {
16846 ndr_print_string(ndr, "server_unc", r->in.server_unc);
16848 ndr->depth--;
16849 ndr_print_string(ndr, "device_name", r->in.device_name);
16850 ndr->depth--;
16852 if (flags & NDR_OUT) {
16853 ndr_print_struct(ndr, "out", "srvsvc_NetShareCheck");
16854 ndr->depth++;
16855 ndr_print_ptr(ndr, "type", r->out.type);
16856 ndr->depth++;
16857 ndr_print_srvsvc_ShareType(ndr, "type", *r->out.type);
16858 ndr->depth--;
16859 ndr_print_WERROR(ndr, "result", r->out.result);
16860 ndr->depth--;
16862 ndr->depth--;
16865 static enum ndr_err_code ndr_push_srvsvc_NetSrvGetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetSrvGetInfo *r)
16867 if (flags & NDR_IN) {
16868 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
16869 if (r->in.server_unc) {
16870 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16871 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
16872 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16873 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));
16875 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
16877 if (flags & NDR_OUT) {
16878 if (r->out.info == NULL) {
16879 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16881 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
16882 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
16883 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16885 return NDR_ERR_SUCCESS;
16888 static enum ndr_err_code ndr_pull_srvsvc_NetSrvGetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetSrvGetInfo *r)
16890 uint32_t _ptr_server_unc;
16891 uint32_t size_server_unc_1 = 0;
16892 uint32_t length_server_unc_1 = 0;
16893 TALLOC_CTX *_mem_save_server_unc_0;
16894 TALLOC_CTX *_mem_save_info_0;
16895 if (flags & NDR_IN) {
16896 ZERO_STRUCT(r->out);
16898 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
16899 if (_ptr_server_unc) {
16900 NDR_PULL_ALLOC(ndr, r->in.server_unc);
16901 } else {
16902 r->in.server_unc = NULL;
16904 if (r->in.server_unc) {
16905 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
16906 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
16907 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
16908 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
16909 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
16910 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
16911 if (length_server_unc_1 > size_server_unc_1) {
16912 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
16914 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
16915 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
16916 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
16918 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
16919 NDR_PULL_ALLOC(ndr, r->out.info);
16920 ZERO_STRUCTP(r->out.info);
16922 if (flags & NDR_OUT) {
16923 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16924 NDR_PULL_ALLOC(ndr, r->out.info);
16926 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
16927 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
16928 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
16929 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
16930 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
16931 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16933 return NDR_ERR_SUCCESS;
16936 _PUBLIC_ void ndr_print_srvsvc_NetSrvGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSrvGetInfo *r)
16938 ndr_print_struct(ndr, name, "srvsvc_NetSrvGetInfo");
16939 ndr->depth++;
16940 if (flags & NDR_SET_VALUES) {
16941 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16943 if (flags & NDR_IN) {
16944 ndr_print_struct(ndr, "in", "srvsvc_NetSrvGetInfo");
16945 ndr->depth++;
16946 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
16947 ndr->depth++;
16948 if (r->in.server_unc) {
16949 ndr_print_string(ndr, "server_unc", r->in.server_unc);
16951 ndr->depth--;
16952 ndr_print_uint32(ndr, "level", r->in.level);
16953 ndr->depth--;
16955 if (flags & NDR_OUT) {
16956 ndr_print_struct(ndr, "out", "srvsvc_NetSrvGetInfo");
16957 ndr->depth++;
16958 ndr_print_ptr(ndr, "info", r->out.info);
16959 ndr->depth++;
16960 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
16961 ndr_print_srvsvc_NetSrvInfo(ndr, "info", r->out.info);
16962 ndr->depth--;
16963 ndr_print_WERROR(ndr, "result", r->out.result);
16964 ndr->depth--;
16966 ndr->depth--;
16969 static enum ndr_err_code ndr_push_srvsvc_NetSrvSetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetSrvSetInfo *r)
16971 if (flags & NDR_IN) {
16972 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
16973 if (r->in.server_unc) {
16974 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16975 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
16976 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16977 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));
16979 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
16980 if (r->in.info == NULL) {
16981 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16983 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
16984 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
16985 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.parm_error));
16986 if (r->in.parm_error) {
16987 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.parm_error));
16990 if (flags & NDR_OUT) {
16991 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.parm_error));
16992 if (r->out.parm_error) {
16993 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.parm_error));
16995 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16997 return NDR_ERR_SUCCESS;
17000 static enum ndr_err_code ndr_pull_srvsvc_NetSrvSetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetSrvSetInfo *r)
17002 uint32_t _ptr_server_unc;
17003 uint32_t size_server_unc_1 = 0;
17004 uint32_t length_server_unc_1 = 0;
17005 uint32_t _ptr_parm_error;
17006 TALLOC_CTX *_mem_save_server_unc_0;
17007 TALLOC_CTX *_mem_save_info_0;
17008 TALLOC_CTX *_mem_save_parm_error_0;
17009 if (flags & NDR_IN) {
17010 ZERO_STRUCT(r->out);
17012 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
17013 if (_ptr_server_unc) {
17014 NDR_PULL_ALLOC(ndr, r->in.server_unc);
17015 } else {
17016 r->in.server_unc = NULL;
17018 if (r->in.server_unc) {
17019 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
17020 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
17021 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
17022 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
17023 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
17024 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
17025 if (length_server_unc_1 > size_server_unc_1) {
17026 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
17028 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
17029 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
17030 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
17032 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
17033 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17034 NDR_PULL_ALLOC(ndr, r->in.info);
17036 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
17037 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
17038 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
17039 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
17040 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
17041 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
17042 if (_ptr_parm_error) {
17043 NDR_PULL_ALLOC(ndr, r->in.parm_error);
17044 } else {
17045 r->in.parm_error = NULL;
17047 if (r->in.parm_error) {
17048 _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
17049 NDR_PULL_SET_MEM_CTX(ndr, r->in.parm_error, 0);
17050 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.parm_error));
17051 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
17054 if (flags & NDR_OUT) {
17055 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
17056 if (_ptr_parm_error) {
17057 NDR_PULL_ALLOC(ndr, r->out.parm_error);
17058 } else {
17059 r->out.parm_error = NULL;
17061 if (r->out.parm_error) {
17062 _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
17063 NDR_PULL_SET_MEM_CTX(ndr, r->out.parm_error, 0);
17064 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.parm_error));
17065 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
17067 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17069 return NDR_ERR_SUCCESS;
17072 _PUBLIC_ void ndr_print_srvsvc_NetSrvSetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSrvSetInfo *r)
17074 ndr_print_struct(ndr, name, "srvsvc_NetSrvSetInfo");
17075 ndr->depth++;
17076 if (flags & NDR_SET_VALUES) {
17077 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17079 if (flags & NDR_IN) {
17080 ndr_print_struct(ndr, "in", "srvsvc_NetSrvSetInfo");
17081 ndr->depth++;
17082 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
17083 ndr->depth++;
17084 if (r->in.server_unc) {
17085 ndr_print_string(ndr, "server_unc", r->in.server_unc);
17087 ndr->depth--;
17088 ndr_print_uint32(ndr, "level", r->in.level);
17089 ndr_print_ptr(ndr, "info", r->in.info);
17090 ndr->depth++;
17091 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
17092 ndr_print_srvsvc_NetSrvInfo(ndr, "info", r->in.info);
17093 ndr->depth--;
17094 ndr_print_ptr(ndr, "parm_error", r->in.parm_error);
17095 ndr->depth++;
17096 if (r->in.parm_error) {
17097 ndr_print_uint32(ndr, "parm_error", *r->in.parm_error);
17099 ndr->depth--;
17100 ndr->depth--;
17102 if (flags & NDR_OUT) {
17103 ndr_print_struct(ndr, "out", "srvsvc_NetSrvSetInfo");
17104 ndr->depth++;
17105 ndr_print_ptr(ndr, "parm_error", r->out.parm_error);
17106 ndr->depth++;
17107 if (r->out.parm_error) {
17108 ndr_print_uint32(ndr, "parm_error", *r->out.parm_error);
17110 ndr->depth--;
17111 ndr_print_WERROR(ndr, "result", r->out.result);
17112 ndr->depth--;
17114 ndr->depth--;
17117 static enum ndr_err_code ndr_push_srvsvc_NetDiskEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetDiskEnum *r)
17119 if (flags & NDR_IN) {
17120 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
17121 if (r->in.server_unc) {
17122 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17123 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17124 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17125 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));
17127 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
17128 if (r->in.info == NULL) {
17129 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17131 NDR_CHECK(ndr_push_srvsvc_NetDiskInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
17132 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.maxlen));
17133 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
17134 if (r->in.resume_handle) {
17135 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
17138 if (flags & NDR_OUT) {
17139 if (r->out.info == NULL) {
17140 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17142 NDR_CHECK(ndr_push_srvsvc_NetDiskInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
17143 if (r->out.totalentries == NULL) {
17144 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17146 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
17147 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
17148 if (r->out.resume_handle) {
17149 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
17151 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17153 return NDR_ERR_SUCCESS;
17156 static enum ndr_err_code ndr_pull_srvsvc_NetDiskEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetDiskEnum *r)
17158 uint32_t _ptr_server_unc;
17159 uint32_t size_server_unc_1 = 0;
17160 uint32_t length_server_unc_1 = 0;
17161 uint32_t _ptr_resume_handle;
17162 TALLOC_CTX *_mem_save_server_unc_0;
17163 TALLOC_CTX *_mem_save_info_0;
17164 TALLOC_CTX *_mem_save_totalentries_0;
17165 TALLOC_CTX *_mem_save_resume_handle_0;
17166 if (flags & NDR_IN) {
17167 ZERO_STRUCT(r->out);
17169 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
17170 if (_ptr_server_unc) {
17171 NDR_PULL_ALLOC(ndr, r->in.server_unc);
17172 } else {
17173 r->in.server_unc = NULL;
17175 if (r->in.server_unc) {
17176 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
17177 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
17178 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
17179 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
17180 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
17181 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
17182 if (length_server_unc_1 > size_server_unc_1) {
17183 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
17185 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
17186 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
17187 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
17189 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
17190 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17191 NDR_PULL_ALLOC(ndr, r->in.info);
17193 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
17194 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
17195 NDR_CHECK(ndr_pull_srvsvc_NetDiskInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
17196 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
17197 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.maxlen));
17198 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
17199 if (_ptr_resume_handle) {
17200 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
17201 } else {
17202 r->in.resume_handle = NULL;
17204 if (r->in.resume_handle) {
17205 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
17206 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
17207 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
17208 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
17210 NDR_PULL_ALLOC(ndr, r->out.info);
17211 *r->out.info = *r->in.info;
17212 NDR_PULL_ALLOC(ndr, r->out.totalentries);
17213 ZERO_STRUCTP(r->out.totalentries);
17215 if (flags & NDR_OUT) {
17216 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17217 NDR_PULL_ALLOC(ndr, r->out.info);
17219 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
17220 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
17221 NDR_CHECK(ndr_pull_srvsvc_NetDiskInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
17222 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
17223 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17224 NDR_PULL_ALLOC(ndr, r->out.totalentries);
17226 _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
17227 NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
17228 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
17229 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
17230 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
17231 if (_ptr_resume_handle) {
17232 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
17233 } else {
17234 r->out.resume_handle = NULL;
17236 if (r->out.resume_handle) {
17237 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
17238 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
17239 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
17240 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
17242 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17244 return NDR_ERR_SUCCESS;
17247 _PUBLIC_ void ndr_print_srvsvc_NetDiskEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetDiskEnum *r)
17249 ndr_print_struct(ndr, name, "srvsvc_NetDiskEnum");
17250 ndr->depth++;
17251 if (flags & NDR_SET_VALUES) {
17252 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17254 if (flags & NDR_IN) {
17255 ndr_print_struct(ndr, "in", "srvsvc_NetDiskEnum");
17256 ndr->depth++;
17257 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
17258 ndr->depth++;
17259 if (r->in.server_unc) {
17260 ndr_print_string(ndr, "server_unc", r->in.server_unc);
17262 ndr->depth--;
17263 ndr_print_uint32(ndr, "level", r->in.level);
17264 ndr_print_ptr(ndr, "info", r->in.info);
17265 ndr->depth++;
17266 ndr_print_srvsvc_NetDiskInfo(ndr, "info", r->in.info);
17267 ndr->depth--;
17268 ndr_print_uint32(ndr, "maxlen", r->in.maxlen);
17269 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
17270 ndr->depth++;
17271 if (r->in.resume_handle) {
17272 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
17274 ndr->depth--;
17275 ndr->depth--;
17277 if (flags & NDR_OUT) {
17278 ndr_print_struct(ndr, "out", "srvsvc_NetDiskEnum");
17279 ndr->depth++;
17280 ndr_print_ptr(ndr, "info", r->out.info);
17281 ndr->depth++;
17282 ndr_print_srvsvc_NetDiskInfo(ndr, "info", r->out.info);
17283 ndr->depth--;
17284 ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
17285 ndr->depth++;
17286 ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
17287 ndr->depth--;
17288 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
17289 ndr->depth++;
17290 if (r->out.resume_handle) {
17291 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
17293 ndr->depth--;
17294 ndr_print_WERROR(ndr, "result", r->out.result);
17295 ndr->depth--;
17297 ndr->depth--;
17300 static enum ndr_err_code ndr_push_srvsvc_NetServerStatisticsGet(struct ndr_push *ndr, int flags, const struct srvsvc_NetServerStatisticsGet *r)
17302 if (flags & NDR_IN) {
17303 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
17304 if (r->in.server_unc) {
17305 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17306 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17307 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17308 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));
17310 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service));
17311 if (r->in.service) {
17312 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service, CH_UTF16)));
17313 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17314 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service, CH_UTF16)));
17315 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.service, ndr_charset_length(r->in.service, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17317 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
17318 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.options));
17320 if (flags & NDR_OUT) {
17321 if (r->out.stats == NULL) {
17322 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17324 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.stats));
17325 if (*r->out.stats) {
17326 NDR_CHECK(ndr_push_srvsvc_Statistics(ndr, NDR_SCALARS, *r->out.stats));
17328 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17330 return NDR_ERR_SUCCESS;
17333 static enum ndr_err_code ndr_pull_srvsvc_NetServerStatisticsGet(struct ndr_pull *ndr, int flags, struct srvsvc_NetServerStatisticsGet *r)
17335 uint32_t _ptr_server_unc;
17336 uint32_t size_server_unc_1 = 0;
17337 uint32_t length_server_unc_1 = 0;
17338 uint32_t _ptr_service;
17339 uint32_t size_service_1 = 0;
17340 uint32_t length_service_1 = 0;
17341 uint32_t _ptr_stats;
17342 TALLOC_CTX *_mem_save_server_unc_0;
17343 TALLOC_CTX *_mem_save_service_0;
17344 TALLOC_CTX *_mem_save_stats_0;
17345 TALLOC_CTX *_mem_save_stats_1;
17346 if (flags & NDR_IN) {
17347 ZERO_STRUCT(r->out);
17349 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
17350 if (_ptr_server_unc) {
17351 NDR_PULL_ALLOC(ndr, r->in.server_unc);
17352 } else {
17353 r->in.server_unc = NULL;
17355 if (r->in.server_unc) {
17356 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
17357 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
17358 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
17359 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
17360 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
17361 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
17362 if (length_server_unc_1 > size_server_unc_1) {
17363 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
17365 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
17366 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
17367 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
17369 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service));
17370 if (_ptr_service) {
17371 NDR_PULL_ALLOC(ndr, r->in.service);
17372 } else {
17373 r->in.service = NULL;
17375 if (r->in.service) {
17376 _mem_save_service_0 = NDR_PULL_GET_MEM_CTX(ndr);
17377 NDR_PULL_SET_MEM_CTX(ndr, r->in.service, 0);
17378 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service));
17379 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service));
17380 size_service_1 = ndr_get_array_size(ndr, &r->in.service);
17381 length_service_1 = ndr_get_array_length(ndr, &r->in.service);
17382 if (length_service_1 > size_service_1) {
17383 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_service_1, length_service_1);
17385 NDR_CHECK(ndr_check_string_terminator(ndr, length_service_1, sizeof(uint16_t)));
17386 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.service, length_service_1, sizeof(uint16_t), CH_UTF16));
17387 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_0, 0);
17389 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
17390 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.options));
17391 NDR_PULL_ALLOC(ndr, r->out.stats);
17392 ZERO_STRUCTP(r->out.stats);
17394 if (flags & NDR_OUT) {
17395 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17396 NDR_PULL_ALLOC(ndr, r->out.stats);
17398 _mem_save_stats_0 = NDR_PULL_GET_MEM_CTX(ndr);
17399 NDR_PULL_SET_MEM_CTX(ndr, r->out.stats, LIBNDR_FLAG_REF_ALLOC);
17400 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_stats));
17401 if (_ptr_stats) {
17402 NDR_PULL_ALLOC(ndr, *r->out.stats);
17403 } else {
17404 *r->out.stats = NULL;
17406 if (*r->out.stats) {
17407 _mem_save_stats_1 = NDR_PULL_GET_MEM_CTX(ndr);
17408 NDR_PULL_SET_MEM_CTX(ndr, *r->out.stats, 0);
17409 NDR_CHECK(ndr_pull_srvsvc_Statistics(ndr, NDR_SCALARS, *r->out.stats));
17410 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stats_1, 0);
17412 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stats_0, LIBNDR_FLAG_REF_ALLOC);
17413 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17415 return NDR_ERR_SUCCESS;
17418 _PUBLIC_ void ndr_print_srvsvc_NetServerStatisticsGet(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetServerStatisticsGet *r)
17420 ndr_print_struct(ndr, name, "srvsvc_NetServerStatisticsGet");
17421 ndr->depth++;
17422 if (flags & NDR_SET_VALUES) {
17423 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17425 if (flags & NDR_IN) {
17426 ndr_print_struct(ndr, "in", "srvsvc_NetServerStatisticsGet");
17427 ndr->depth++;
17428 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
17429 ndr->depth++;
17430 if (r->in.server_unc) {
17431 ndr_print_string(ndr, "server_unc", r->in.server_unc);
17433 ndr->depth--;
17434 ndr_print_ptr(ndr, "service", r->in.service);
17435 ndr->depth++;
17436 if (r->in.service) {
17437 ndr_print_string(ndr, "service", r->in.service);
17439 ndr->depth--;
17440 ndr_print_uint32(ndr, "level", r->in.level);
17441 ndr_print_uint32(ndr, "options", r->in.options);
17442 ndr->depth--;
17444 if (flags & NDR_OUT) {
17445 ndr_print_struct(ndr, "out", "srvsvc_NetServerStatisticsGet");
17446 ndr->depth++;
17447 ndr_print_ptr(ndr, "stats", r->out.stats);
17448 ndr->depth++;
17449 ndr_print_ptr(ndr, "stats", *r->out.stats);
17450 ndr->depth++;
17451 if (*r->out.stats) {
17452 ndr_print_srvsvc_Statistics(ndr, "stats", *r->out.stats);
17454 ndr->depth--;
17455 ndr->depth--;
17456 ndr_print_WERROR(ndr, "result", r->out.result);
17457 ndr->depth--;
17459 ndr->depth--;
17462 static enum ndr_err_code ndr_push_srvsvc_NetTransportAdd(struct ndr_push *ndr, int flags, const struct srvsvc_NetTransportAdd *r)
17464 if (flags & NDR_IN) {
17465 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
17466 if (r->in.server_unc) {
17467 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17468 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17469 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17470 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));
17472 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
17473 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.info, r->in.level));
17474 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
17476 if (flags & NDR_OUT) {
17477 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17479 return NDR_ERR_SUCCESS;
17482 static enum ndr_err_code ndr_pull_srvsvc_NetTransportAdd(struct ndr_pull *ndr, int flags, struct srvsvc_NetTransportAdd *r)
17484 uint32_t _ptr_server_unc;
17485 uint32_t size_server_unc_1 = 0;
17486 uint32_t length_server_unc_1 = 0;
17487 TALLOC_CTX *_mem_save_server_unc_0;
17488 if (flags & NDR_IN) {
17489 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
17490 if (_ptr_server_unc) {
17491 NDR_PULL_ALLOC(ndr, r->in.server_unc);
17492 } else {
17493 r->in.server_unc = NULL;
17495 if (r->in.server_unc) {
17496 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
17497 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
17498 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
17499 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
17500 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
17501 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
17502 if (length_server_unc_1 > size_server_unc_1) {
17503 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
17505 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
17506 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
17507 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
17509 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
17510 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.info, r->in.level));
17511 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
17513 if (flags & NDR_OUT) {
17514 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17516 return NDR_ERR_SUCCESS;
17519 _PUBLIC_ void ndr_print_srvsvc_NetTransportAdd(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetTransportAdd *r)
17521 ndr_print_struct(ndr, name, "srvsvc_NetTransportAdd");
17522 ndr->depth++;
17523 if (flags & NDR_SET_VALUES) {
17524 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17526 if (flags & NDR_IN) {
17527 ndr_print_struct(ndr, "in", "srvsvc_NetTransportAdd");
17528 ndr->depth++;
17529 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
17530 ndr->depth++;
17531 if (r->in.server_unc) {
17532 ndr_print_string(ndr, "server_unc", r->in.server_unc);
17534 ndr->depth--;
17535 ndr_print_uint32(ndr, "level", r->in.level);
17536 ndr_print_set_switch_value(ndr, &r->in.info, r->in.level);
17537 ndr_print_srvsvc_NetTransportInfo(ndr, "info", &r->in.info);
17538 ndr->depth--;
17540 if (flags & NDR_OUT) {
17541 ndr_print_struct(ndr, "out", "srvsvc_NetTransportAdd");
17542 ndr->depth++;
17543 ndr_print_WERROR(ndr, "result", r->out.result);
17544 ndr->depth--;
17546 ndr->depth--;
17549 static enum ndr_err_code ndr_push_srvsvc_NetTransportEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetTransportEnum *r)
17551 if (flags & NDR_IN) {
17552 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
17553 if (r->in.server_unc) {
17554 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17555 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17556 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17557 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));
17559 if (r->in.transports == NULL) {
17560 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17562 NDR_CHECK(ndr_push_srvsvc_NetTransportInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.transports));
17563 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
17564 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
17565 if (r->in.resume_handle) {
17566 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
17569 if (flags & NDR_OUT) {
17570 if (r->out.transports == NULL) {
17571 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17573 NDR_CHECK(ndr_push_srvsvc_NetTransportInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.transports));
17574 if (r->out.totalentries == NULL) {
17575 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17577 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
17578 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
17579 if (r->out.resume_handle) {
17580 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
17582 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17584 return NDR_ERR_SUCCESS;
17587 static enum ndr_err_code ndr_pull_srvsvc_NetTransportEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetTransportEnum *r)
17589 uint32_t _ptr_server_unc;
17590 uint32_t size_server_unc_1 = 0;
17591 uint32_t length_server_unc_1 = 0;
17592 uint32_t _ptr_resume_handle;
17593 TALLOC_CTX *_mem_save_server_unc_0;
17594 TALLOC_CTX *_mem_save_transports_0;
17595 TALLOC_CTX *_mem_save_totalentries_0;
17596 TALLOC_CTX *_mem_save_resume_handle_0;
17597 if (flags & NDR_IN) {
17598 ZERO_STRUCT(r->out);
17600 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
17601 if (_ptr_server_unc) {
17602 NDR_PULL_ALLOC(ndr, r->in.server_unc);
17603 } else {
17604 r->in.server_unc = NULL;
17606 if (r->in.server_unc) {
17607 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
17608 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
17609 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
17610 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
17611 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
17612 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
17613 if (length_server_unc_1 > size_server_unc_1) {
17614 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
17616 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
17617 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
17618 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
17620 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17621 NDR_PULL_ALLOC(ndr, r->in.transports);
17623 _mem_save_transports_0 = NDR_PULL_GET_MEM_CTX(ndr);
17624 NDR_PULL_SET_MEM_CTX(ndr, r->in.transports, LIBNDR_FLAG_REF_ALLOC);
17625 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.transports));
17626 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_transports_0, LIBNDR_FLAG_REF_ALLOC);
17627 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
17628 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
17629 if (_ptr_resume_handle) {
17630 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
17631 } else {
17632 r->in.resume_handle = NULL;
17634 if (r->in.resume_handle) {
17635 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
17636 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
17637 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
17638 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
17640 NDR_PULL_ALLOC(ndr, r->out.transports);
17641 *r->out.transports = *r->in.transports;
17642 NDR_PULL_ALLOC(ndr, r->out.totalentries);
17643 ZERO_STRUCTP(r->out.totalentries);
17645 if (flags & NDR_OUT) {
17646 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17647 NDR_PULL_ALLOC(ndr, r->out.transports);
17649 _mem_save_transports_0 = NDR_PULL_GET_MEM_CTX(ndr);
17650 NDR_PULL_SET_MEM_CTX(ndr, r->out.transports, LIBNDR_FLAG_REF_ALLOC);
17651 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.transports));
17652 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_transports_0, LIBNDR_FLAG_REF_ALLOC);
17653 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17654 NDR_PULL_ALLOC(ndr, r->out.totalentries);
17656 _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
17657 NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
17658 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
17659 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
17660 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
17661 if (_ptr_resume_handle) {
17662 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
17663 } else {
17664 r->out.resume_handle = NULL;
17666 if (r->out.resume_handle) {
17667 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
17668 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
17669 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
17670 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
17672 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17674 return NDR_ERR_SUCCESS;
17677 _PUBLIC_ void ndr_print_srvsvc_NetTransportEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetTransportEnum *r)
17679 ndr_print_struct(ndr, name, "srvsvc_NetTransportEnum");
17680 ndr->depth++;
17681 if (flags & NDR_SET_VALUES) {
17682 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17684 if (flags & NDR_IN) {
17685 ndr_print_struct(ndr, "in", "srvsvc_NetTransportEnum");
17686 ndr->depth++;
17687 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
17688 ndr->depth++;
17689 if (r->in.server_unc) {
17690 ndr_print_string(ndr, "server_unc", r->in.server_unc);
17692 ndr->depth--;
17693 ndr_print_ptr(ndr, "transports", r->in.transports);
17694 ndr->depth++;
17695 ndr_print_srvsvc_NetTransportInfoCtr(ndr, "transports", r->in.transports);
17696 ndr->depth--;
17697 ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
17698 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
17699 ndr->depth++;
17700 if (r->in.resume_handle) {
17701 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
17703 ndr->depth--;
17704 ndr->depth--;
17706 if (flags & NDR_OUT) {
17707 ndr_print_struct(ndr, "out", "srvsvc_NetTransportEnum");
17708 ndr->depth++;
17709 ndr_print_ptr(ndr, "transports", r->out.transports);
17710 ndr->depth++;
17711 ndr_print_srvsvc_NetTransportInfoCtr(ndr, "transports", r->out.transports);
17712 ndr->depth--;
17713 ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
17714 ndr->depth++;
17715 ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
17716 ndr->depth--;
17717 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
17718 ndr->depth++;
17719 if (r->out.resume_handle) {
17720 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
17722 ndr->depth--;
17723 ndr_print_WERROR(ndr, "result", r->out.result);
17724 ndr->depth--;
17726 ndr->depth--;
17729 static enum ndr_err_code ndr_push_srvsvc_NetTransportDel(struct ndr_push *ndr, int flags, const struct srvsvc_NetTransportDel *r)
17731 if (flags & NDR_IN) {
17732 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
17733 if (r->in.server_unc) {
17734 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17735 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17736 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17737 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));
17739 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
17740 if (r->in.info0 == NULL) {
17741 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17743 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info0));
17745 if (flags & NDR_OUT) {
17746 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17748 return NDR_ERR_SUCCESS;
17751 static enum ndr_err_code ndr_pull_srvsvc_NetTransportDel(struct ndr_pull *ndr, int flags, struct srvsvc_NetTransportDel *r)
17753 uint32_t _ptr_server_unc;
17754 uint32_t size_server_unc_1 = 0;
17755 uint32_t length_server_unc_1 = 0;
17756 TALLOC_CTX *_mem_save_server_unc_0;
17757 TALLOC_CTX *_mem_save_info0_0;
17758 if (flags & NDR_IN) {
17759 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
17760 if (_ptr_server_unc) {
17761 NDR_PULL_ALLOC(ndr, r->in.server_unc);
17762 } else {
17763 r->in.server_unc = NULL;
17765 if (r->in.server_unc) {
17766 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
17767 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
17768 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
17769 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
17770 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
17771 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
17772 if (length_server_unc_1 > size_server_unc_1) {
17773 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
17775 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
17776 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
17777 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
17779 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
17780 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17781 NDR_PULL_ALLOC(ndr, r->in.info0);
17783 _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
17784 NDR_PULL_SET_MEM_CTX(ndr, r->in.info0, LIBNDR_FLAG_REF_ALLOC);
17785 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info0));
17786 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, LIBNDR_FLAG_REF_ALLOC);
17788 if (flags & NDR_OUT) {
17789 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17791 return NDR_ERR_SUCCESS;
17794 _PUBLIC_ void ndr_print_srvsvc_NetTransportDel(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetTransportDel *r)
17796 ndr_print_struct(ndr, name, "srvsvc_NetTransportDel");
17797 ndr->depth++;
17798 if (flags & NDR_SET_VALUES) {
17799 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17801 if (flags & NDR_IN) {
17802 ndr_print_struct(ndr, "in", "srvsvc_NetTransportDel");
17803 ndr->depth++;
17804 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
17805 ndr->depth++;
17806 if (r->in.server_unc) {
17807 ndr_print_string(ndr, "server_unc", r->in.server_unc);
17809 ndr->depth--;
17810 ndr_print_uint32(ndr, "level", r->in.level);
17811 ndr_print_ptr(ndr, "info0", r->in.info0);
17812 ndr->depth++;
17813 ndr_print_srvsvc_NetTransportInfo0(ndr, "info0", r->in.info0);
17814 ndr->depth--;
17815 ndr->depth--;
17817 if (flags & NDR_OUT) {
17818 ndr_print_struct(ndr, "out", "srvsvc_NetTransportDel");
17819 ndr->depth++;
17820 ndr_print_WERROR(ndr, "result", r->out.result);
17821 ndr->depth--;
17823 ndr->depth--;
17826 static enum ndr_err_code ndr_push_srvsvc_NetRemoteTOD(struct ndr_push *ndr, int flags, const struct srvsvc_NetRemoteTOD *r)
17828 if (flags & NDR_IN) {
17829 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
17830 if (r->in.server_unc) {
17831 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17832 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17833 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17834 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));
17837 if (flags & NDR_OUT) {
17838 if (r->out.info == NULL) {
17839 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17841 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
17842 if (*r->out.info) {
17843 NDR_CHECK(ndr_push_srvsvc_NetRemoteTODInfo(ndr, NDR_SCALARS, *r->out.info));
17845 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17847 return NDR_ERR_SUCCESS;
17850 static enum ndr_err_code ndr_pull_srvsvc_NetRemoteTOD(struct ndr_pull *ndr, int flags, struct srvsvc_NetRemoteTOD *r)
17852 uint32_t _ptr_server_unc;
17853 uint32_t size_server_unc_1 = 0;
17854 uint32_t length_server_unc_1 = 0;
17855 uint32_t _ptr_info;
17856 TALLOC_CTX *_mem_save_server_unc_0;
17857 TALLOC_CTX *_mem_save_info_0;
17858 TALLOC_CTX *_mem_save_info_1;
17859 if (flags & NDR_IN) {
17860 ZERO_STRUCT(r->out);
17862 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
17863 if (_ptr_server_unc) {
17864 NDR_PULL_ALLOC(ndr, r->in.server_unc);
17865 } else {
17866 r->in.server_unc = NULL;
17868 if (r->in.server_unc) {
17869 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
17870 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
17871 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
17872 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
17873 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
17874 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
17875 if (length_server_unc_1 > size_server_unc_1) {
17876 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
17878 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
17879 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
17880 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
17882 NDR_PULL_ALLOC(ndr, r->out.info);
17883 ZERO_STRUCTP(r->out.info);
17885 if (flags & NDR_OUT) {
17886 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17887 NDR_PULL_ALLOC(ndr, r->out.info);
17889 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
17890 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
17891 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
17892 if (_ptr_info) {
17893 NDR_PULL_ALLOC(ndr, *r->out.info);
17894 } else {
17895 *r->out.info = NULL;
17897 if (*r->out.info) {
17898 _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
17899 NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
17900 NDR_CHECK(ndr_pull_srvsvc_NetRemoteTODInfo(ndr, NDR_SCALARS, *r->out.info));
17901 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
17903 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
17904 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17906 return NDR_ERR_SUCCESS;
17909 _PUBLIC_ void ndr_print_srvsvc_NetRemoteTOD(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetRemoteTOD *r)
17911 ndr_print_struct(ndr, name, "srvsvc_NetRemoteTOD");
17912 ndr->depth++;
17913 if (flags & NDR_SET_VALUES) {
17914 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17916 if (flags & NDR_IN) {
17917 ndr_print_struct(ndr, "in", "srvsvc_NetRemoteTOD");
17918 ndr->depth++;
17919 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
17920 ndr->depth++;
17921 if (r->in.server_unc) {
17922 ndr_print_string(ndr, "server_unc", r->in.server_unc);
17924 ndr->depth--;
17925 ndr->depth--;
17927 if (flags & NDR_OUT) {
17928 ndr_print_struct(ndr, "out", "srvsvc_NetRemoteTOD");
17929 ndr->depth++;
17930 ndr_print_ptr(ndr, "info", r->out.info);
17931 ndr->depth++;
17932 ndr_print_ptr(ndr, "info", *r->out.info);
17933 ndr->depth++;
17934 if (*r->out.info) {
17935 ndr_print_srvsvc_NetRemoteTODInfo(ndr, "info", *r->out.info);
17937 ndr->depth--;
17938 ndr->depth--;
17939 ndr_print_WERROR(ndr, "result", r->out.result);
17940 ndr->depth--;
17942 ndr->depth--;
17945 static enum ndr_err_code ndr_push_srvsvc_NetSetServiceBits(struct ndr_push *ndr, int flags, const struct srvsvc_NetSetServiceBits *r)
17947 if (flags & NDR_IN) {
17948 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
17949 if (r->in.server_unc) {
17950 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17951 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17952 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17953 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));
17955 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.transport));
17956 if (r->in.transport) {
17957 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.transport, CH_UTF16)));
17958 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17959 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.transport, CH_UTF16)));
17960 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.transport, ndr_charset_length(r->in.transport, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17962 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.servicebits));
17963 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.updateimmediately));
17965 if (flags & NDR_OUT) {
17966 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17968 return NDR_ERR_SUCCESS;
17971 static enum ndr_err_code ndr_pull_srvsvc_NetSetServiceBits(struct ndr_pull *ndr, int flags, struct srvsvc_NetSetServiceBits *r)
17973 uint32_t _ptr_server_unc;
17974 uint32_t size_server_unc_1 = 0;
17975 uint32_t length_server_unc_1 = 0;
17976 uint32_t _ptr_transport;
17977 uint32_t size_transport_1 = 0;
17978 uint32_t length_transport_1 = 0;
17979 TALLOC_CTX *_mem_save_server_unc_0;
17980 TALLOC_CTX *_mem_save_transport_0;
17981 if (flags & NDR_IN) {
17982 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
17983 if (_ptr_server_unc) {
17984 NDR_PULL_ALLOC(ndr, r->in.server_unc);
17985 } else {
17986 r->in.server_unc = NULL;
17988 if (r->in.server_unc) {
17989 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
17990 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
17991 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
17992 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
17993 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
17994 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
17995 if (length_server_unc_1 > size_server_unc_1) {
17996 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
17998 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
17999 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
18000 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
18002 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_transport));
18003 if (_ptr_transport) {
18004 NDR_PULL_ALLOC(ndr, r->in.transport);
18005 } else {
18006 r->in.transport = NULL;
18008 if (r->in.transport) {
18009 _mem_save_transport_0 = NDR_PULL_GET_MEM_CTX(ndr);
18010 NDR_PULL_SET_MEM_CTX(ndr, r->in.transport, 0);
18011 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.transport));
18012 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.transport));
18013 size_transport_1 = ndr_get_array_size(ndr, &r->in.transport);
18014 length_transport_1 = ndr_get_array_length(ndr, &r->in.transport);
18015 if (length_transport_1 > size_transport_1) {
18016 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_transport_1, length_transport_1);
18018 NDR_CHECK(ndr_check_string_terminator(ndr, length_transport_1, sizeof(uint16_t)));
18019 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.transport, length_transport_1, sizeof(uint16_t), CH_UTF16));
18020 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_transport_0, 0);
18022 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.servicebits));
18023 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.updateimmediately));
18025 if (flags & NDR_OUT) {
18026 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18028 return NDR_ERR_SUCCESS;
18031 _PUBLIC_ void ndr_print_srvsvc_NetSetServiceBits(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSetServiceBits *r)
18033 ndr_print_struct(ndr, name, "srvsvc_NetSetServiceBits");
18034 ndr->depth++;
18035 if (flags & NDR_SET_VALUES) {
18036 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18038 if (flags & NDR_IN) {
18039 ndr_print_struct(ndr, "in", "srvsvc_NetSetServiceBits");
18040 ndr->depth++;
18041 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
18042 ndr->depth++;
18043 if (r->in.server_unc) {
18044 ndr_print_string(ndr, "server_unc", r->in.server_unc);
18046 ndr->depth--;
18047 ndr_print_ptr(ndr, "transport", r->in.transport);
18048 ndr->depth++;
18049 if (r->in.transport) {
18050 ndr_print_string(ndr, "transport", r->in.transport);
18052 ndr->depth--;
18053 ndr_print_uint32(ndr, "servicebits", r->in.servicebits);
18054 ndr_print_uint32(ndr, "updateimmediately", r->in.updateimmediately);
18055 ndr->depth--;
18057 if (flags & NDR_OUT) {
18058 ndr_print_struct(ndr, "out", "srvsvc_NetSetServiceBits");
18059 ndr->depth++;
18060 ndr_print_WERROR(ndr, "result", r->out.result);
18061 ndr->depth--;
18063 ndr->depth--;
18066 static enum ndr_err_code ndr_push_srvsvc_NetPathType(struct ndr_push *ndr, int flags, const struct srvsvc_NetPathType *r)
18068 if (flags & NDR_IN) {
18069 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
18070 if (r->in.server_unc) {
18071 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18072 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18073 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18074 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));
18076 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
18077 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18078 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
18079 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path, ndr_charset_length(r->in.path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18080 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.pathflags));
18082 if (flags & NDR_OUT) {
18083 if (r->out.pathtype == NULL) {
18084 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18086 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pathtype));
18087 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18089 return NDR_ERR_SUCCESS;
18092 static enum ndr_err_code ndr_pull_srvsvc_NetPathType(struct ndr_pull *ndr, int flags, struct srvsvc_NetPathType *r)
18094 uint32_t _ptr_server_unc;
18095 uint32_t size_server_unc_1 = 0;
18096 uint32_t length_server_unc_1 = 0;
18097 uint32_t size_path_0 = 0;
18098 uint32_t length_path_0 = 0;
18099 TALLOC_CTX *_mem_save_server_unc_0;
18100 TALLOC_CTX *_mem_save_pathtype_0;
18101 if (flags & NDR_IN) {
18102 ZERO_STRUCT(r->out);
18104 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
18105 if (_ptr_server_unc) {
18106 NDR_PULL_ALLOC(ndr, r->in.server_unc);
18107 } else {
18108 r->in.server_unc = NULL;
18110 if (r->in.server_unc) {
18111 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
18112 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
18113 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
18114 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
18115 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
18116 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
18117 if (length_server_unc_1 > size_server_unc_1) {
18118 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
18120 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
18121 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
18122 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
18124 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path));
18125 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path));
18126 size_path_0 = ndr_get_array_size(ndr, &r->in.path);
18127 length_path_0 = ndr_get_array_length(ndr, &r->in.path);
18128 if (length_path_0 > size_path_0) {
18129 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_path_0, length_path_0);
18131 NDR_CHECK(ndr_check_string_terminator(ndr, length_path_0, sizeof(uint16_t)));
18132 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path, length_path_0, sizeof(uint16_t), CH_UTF16));
18133 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.pathflags));
18134 NDR_PULL_ALLOC(ndr, r->out.pathtype);
18135 ZERO_STRUCTP(r->out.pathtype);
18137 if (flags & NDR_OUT) {
18138 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18139 NDR_PULL_ALLOC(ndr, r->out.pathtype);
18141 _mem_save_pathtype_0 = NDR_PULL_GET_MEM_CTX(ndr);
18142 NDR_PULL_SET_MEM_CTX(ndr, r->out.pathtype, LIBNDR_FLAG_REF_ALLOC);
18143 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pathtype));
18144 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pathtype_0, LIBNDR_FLAG_REF_ALLOC);
18145 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18147 return NDR_ERR_SUCCESS;
18150 _PUBLIC_ void ndr_print_srvsvc_NetPathType(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetPathType *r)
18152 ndr_print_struct(ndr, name, "srvsvc_NetPathType");
18153 ndr->depth++;
18154 if (flags & NDR_SET_VALUES) {
18155 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18157 if (flags & NDR_IN) {
18158 ndr_print_struct(ndr, "in", "srvsvc_NetPathType");
18159 ndr->depth++;
18160 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
18161 ndr->depth++;
18162 if (r->in.server_unc) {
18163 ndr_print_string(ndr, "server_unc", r->in.server_unc);
18165 ndr->depth--;
18166 ndr_print_string(ndr, "path", r->in.path);
18167 ndr_print_uint32(ndr, "pathflags", r->in.pathflags);
18168 ndr->depth--;
18170 if (flags & NDR_OUT) {
18171 ndr_print_struct(ndr, "out", "srvsvc_NetPathType");
18172 ndr->depth++;
18173 ndr_print_ptr(ndr, "pathtype", r->out.pathtype);
18174 ndr->depth++;
18175 ndr_print_uint32(ndr, "pathtype", *r->out.pathtype);
18176 ndr->depth--;
18177 ndr_print_WERROR(ndr, "result", r->out.result);
18178 ndr->depth--;
18180 ndr->depth--;
18183 static enum ndr_err_code ndr_push_srvsvc_NetPathCanonicalize(struct ndr_push *ndr, int flags, const struct srvsvc_NetPathCanonicalize *r)
18185 if (flags & NDR_IN) {
18186 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
18187 if (r->in.server_unc) {
18188 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18189 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18190 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18191 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));
18193 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
18194 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18195 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
18196 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path, ndr_charset_length(r->in.path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18197 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.maxbuf));
18198 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.prefix, CH_UTF16)));
18199 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18200 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.prefix, CH_UTF16)));
18201 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.prefix, ndr_charset_length(r->in.prefix, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18202 if (r->in.pathtype == NULL) {
18203 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18205 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.pathtype));
18206 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.pathflags));
18208 if (flags & NDR_OUT) {
18209 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.maxbuf));
18210 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.can_path, r->in.maxbuf));
18211 if (r->out.pathtype == NULL) {
18212 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18214 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pathtype));
18215 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18217 return NDR_ERR_SUCCESS;
18220 static enum ndr_err_code ndr_pull_srvsvc_NetPathCanonicalize(struct ndr_pull *ndr, int flags, struct srvsvc_NetPathCanonicalize *r)
18222 uint32_t _ptr_server_unc;
18223 uint32_t size_server_unc_1 = 0;
18224 uint32_t length_server_unc_1 = 0;
18225 uint32_t size_path_0 = 0;
18226 uint32_t length_path_0 = 0;
18227 uint32_t size_can_path_0 = 0;
18228 uint32_t size_prefix_0 = 0;
18229 uint32_t length_prefix_0 = 0;
18230 TALLOC_CTX *_mem_save_server_unc_0;
18231 TALLOC_CTX *_mem_save_pathtype_0;
18232 if (flags & NDR_IN) {
18233 ZERO_STRUCT(r->out);
18235 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
18236 if (_ptr_server_unc) {
18237 NDR_PULL_ALLOC(ndr, r->in.server_unc);
18238 } else {
18239 r->in.server_unc = NULL;
18241 if (r->in.server_unc) {
18242 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
18243 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
18244 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
18245 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
18246 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
18247 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
18248 if (length_server_unc_1 > size_server_unc_1) {
18249 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
18251 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
18252 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
18253 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
18255 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path));
18256 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path));
18257 size_path_0 = ndr_get_array_size(ndr, &r->in.path);
18258 length_path_0 = ndr_get_array_length(ndr, &r->in.path);
18259 if (length_path_0 > size_path_0) {
18260 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_path_0, length_path_0);
18262 NDR_CHECK(ndr_check_string_terminator(ndr, length_path_0, sizeof(uint16_t)));
18263 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path, length_path_0, sizeof(uint16_t), CH_UTF16));
18264 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.maxbuf));
18265 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.prefix));
18266 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.prefix));
18267 size_prefix_0 = ndr_get_array_size(ndr, &r->in.prefix);
18268 length_prefix_0 = ndr_get_array_length(ndr, &r->in.prefix);
18269 if (length_prefix_0 > size_prefix_0) {
18270 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_prefix_0, length_prefix_0);
18272 NDR_CHECK(ndr_check_string_terminator(ndr, length_prefix_0, sizeof(uint16_t)));
18273 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.prefix, length_prefix_0, sizeof(uint16_t), CH_UTF16));
18274 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18275 NDR_PULL_ALLOC(ndr, r->in.pathtype);
18277 _mem_save_pathtype_0 = NDR_PULL_GET_MEM_CTX(ndr);
18278 NDR_PULL_SET_MEM_CTX(ndr, r->in.pathtype, LIBNDR_FLAG_REF_ALLOC);
18279 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.pathtype));
18280 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pathtype_0, LIBNDR_FLAG_REF_ALLOC);
18281 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.pathflags));
18282 NDR_PULL_ALLOC(ndr, r->out.pathtype);
18283 *r->out.pathtype = *r->in.pathtype;
18285 if (flags & NDR_OUT) {
18286 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.can_path));
18287 size_can_path_0 = ndr_get_array_size(ndr, &r->out.can_path);
18288 NDR_PULL_ALLOC_N(ndr, r->out.can_path, size_can_path_0);
18289 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.can_path, size_can_path_0));
18290 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18291 NDR_PULL_ALLOC(ndr, r->out.pathtype);
18293 _mem_save_pathtype_0 = NDR_PULL_GET_MEM_CTX(ndr);
18294 NDR_PULL_SET_MEM_CTX(ndr, r->out.pathtype, LIBNDR_FLAG_REF_ALLOC);
18295 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pathtype));
18296 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pathtype_0, LIBNDR_FLAG_REF_ALLOC);
18297 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18298 if (r->out.can_path) {
18299 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.can_path, r->in.maxbuf));
18302 return NDR_ERR_SUCCESS;
18305 _PUBLIC_ void ndr_print_srvsvc_NetPathCanonicalize(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetPathCanonicalize *r)
18307 ndr_print_struct(ndr, name, "srvsvc_NetPathCanonicalize");
18308 ndr->depth++;
18309 if (flags & NDR_SET_VALUES) {
18310 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18312 if (flags & NDR_IN) {
18313 ndr_print_struct(ndr, "in", "srvsvc_NetPathCanonicalize");
18314 ndr->depth++;
18315 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
18316 ndr->depth++;
18317 if (r->in.server_unc) {
18318 ndr_print_string(ndr, "server_unc", r->in.server_unc);
18320 ndr->depth--;
18321 ndr_print_string(ndr, "path", r->in.path);
18322 ndr_print_uint32(ndr, "maxbuf", r->in.maxbuf);
18323 ndr_print_string(ndr, "prefix", r->in.prefix);
18324 ndr_print_ptr(ndr, "pathtype", r->in.pathtype);
18325 ndr->depth++;
18326 ndr_print_uint32(ndr, "pathtype", *r->in.pathtype);
18327 ndr->depth--;
18328 ndr_print_uint32(ndr, "pathflags", r->in.pathflags);
18329 ndr->depth--;
18331 if (flags & NDR_OUT) {
18332 ndr_print_struct(ndr, "out", "srvsvc_NetPathCanonicalize");
18333 ndr->depth++;
18334 ndr_print_array_uint8(ndr, "can_path", r->out.can_path, r->in.maxbuf);
18335 ndr_print_ptr(ndr, "pathtype", r->out.pathtype);
18336 ndr->depth++;
18337 ndr_print_uint32(ndr, "pathtype", *r->out.pathtype);
18338 ndr->depth--;
18339 ndr_print_WERROR(ndr, "result", r->out.result);
18340 ndr->depth--;
18342 ndr->depth--;
18345 static enum ndr_err_code ndr_push_srvsvc_NetPathCompare(struct ndr_push *ndr, int flags, const struct srvsvc_NetPathCompare *r)
18347 if (flags & NDR_IN) {
18348 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
18349 if (r->in.server_unc) {
18350 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18351 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18352 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18353 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));
18355 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.path1, CH_UTF16)));
18356 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18357 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.path1, CH_UTF16)));
18358 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path1, ndr_charset_length(r->in.path1, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18359 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.path2, CH_UTF16)));
18360 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18361 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.path2, CH_UTF16)));
18362 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path2, ndr_charset_length(r->in.path2, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18363 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.pathtype));
18364 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.pathflags));
18366 if (flags & NDR_OUT) {
18367 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18369 return NDR_ERR_SUCCESS;
18372 static enum ndr_err_code ndr_pull_srvsvc_NetPathCompare(struct ndr_pull *ndr, int flags, struct srvsvc_NetPathCompare *r)
18374 uint32_t _ptr_server_unc;
18375 uint32_t size_server_unc_1 = 0;
18376 uint32_t length_server_unc_1 = 0;
18377 uint32_t size_path1_0 = 0;
18378 uint32_t length_path1_0 = 0;
18379 uint32_t size_path2_0 = 0;
18380 uint32_t length_path2_0 = 0;
18381 TALLOC_CTX *_mem_save_server_unc_0;
18382 if (flags & NDR_IN) {
18383 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
18384 if (_ptr_server_unc) {
18385 NDR_PULL_ALLOC(ndr, r->in.server_unc);
18386 } else {
18387 r->in.server_unc = NULL;
18389 if (r->in.server_unc) {
18390 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
18391 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
18392 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
18393 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
18394 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
18395 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
18396 if (length_server_unc_1 > size_server_unc_1) {
18397 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
18399 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
18400 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
18401 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
18403 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path1));
18404 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path1));
18405 size_path1_0 = ndr_get_array_size(ndr, &r->in.path1);
18406 length_path1_0 = ndr_get_array_length(ndr, &r->in.path1);
18407 if (length_path1_0 > size_path1_0) {
18408 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_path1_0, length_path1_0);
18410 NDR_CHECK(ndr_check_string_terminator(ndr, length_path1_0, sizeof(uint16_t)));
18411 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path1, length_path1_0, sizeof(uint16_t), CH_UTF16));
18412 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path2));
18413 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path2));
18414 size_path2_0 = ndr_get_array_size(ndr, &r->in.path2);
18415 length_path2_0 = ndr_get_array_length(ndr, &r->in.path2);
18416 if (length_path2_0 > size_path2_0) {
18417 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_path2_0, length_path2_0);
18419 NDR_CHECK(ndr_check_string_terminator(ndr, length_path2_0, sizeof(uint16_t)));
18420 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path2, length_path2_0, sizeof(uint16_t), CH_UTF16));
18421 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.pathtype));
18422 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.pathflags));
18424 if (flags & NDR_OUT) {
18425 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18427 return NDR_ERR_SUCCESS;
18430 _PUBLIC_ void ndr_print_srvsvc_NetPathCompare(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetPathCompare *r)
18432 ndr_print_struct(ndr, name, "srvsvc_NetPathCompare");
18433 ndr->depth++;
18434 if (flags & NDR_SET_VALUES) {
18435 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18437 if (flags & NDR_IN) {
18438 ndr_print_struct(ndr, "in", "srvsvc_NetPathCompare");
18439 ndr->depth++;
18440 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
18441 ndr->depth++;
18442 if (r->in.server_unc) {
18443 ndr_print_string(ndr, "server_unc", r->in.server_unc);
18445 ndr->depth--;
18446 ndr_print_string(ndr, "path1", r->in.path1);
18447 ndr_print_string(ndr, "path2", r->in.path2);
18448 ndr_print_uint32(ndr, "pathtype", r->in.pathtype);
18449 ndr_print_uint32(ndr, "pathflags", r->in.pathflags);
18450 ndr->depth--;
18452 if (flags & NDR_OUT) {
18453 ndr_print_struct(ndr, "out", "srvsvc_NetPathCompare");
18454 ndr->depth++;
18455 ndr_print_WERROR(ndr, "result", r->out.result);
18456 ndr->depth--;
18458 ndr->depth--;
18461 static enum ndr_err_code ndr_push_srvsvc_NetNameValidate(struct ndr_push *ndr, int flags, const struct srvsvc_NetNameValidate *r)
18463 if (flags & NDR_IN) {
18464 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
18465 if (r->in.server_unc) {
18466 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18467 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18468 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18469 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));
18471 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.name, CH_UTF16)));
18472 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18473 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.name, CH_UTF16)));
18474 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.name, ndr_charset_length(r->in.name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18475 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.name_type));
18476 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
18478 if (flags & NDR_OUT) {
18479 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18481 return NDR_ERR_SUCCESS;
18484 static enum ndr_err_code ndr_pull_srvsvc_NetNameValidate(struct ndr_pull *ndr, int flags, struct srvsvc_NetNameValidate *r)
18486 uint32_t _ptr_server_unc;
18487 uint32_t size_server_unc_1 = 0;
18488 uint32_t length_server_unc_1 = 0;
18489 uint32_t size_name_0 = 0;
18490 uint32_t length_name_0 = 0;
18491 TALLOC_CTX *_mem_save_server_unc_0;
18492 if (flags & NDR_IN) {
18493 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
18494 if (_ptr_server_unc) {
18495 NDR_PULL_ALLOC(ndr, r->in.server_unc);
18496 } else {
18497 r->in.server_unc = NULL;
18499 if (r->in.server_unc) {
18500 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
18501 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
18502 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
18503 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
18504 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
18505 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
18506 if (length_server_unc_1 > size_server_unc_1) {
18507 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
18509 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
18510 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
18511 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
18513 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.name));
18514 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.name));
18515 size_name_0 = ndr_get_array_size(ndr, &r->in.name);
18516 length_name_0 = ndr_get_array_length(ndr, &r->in.name);
18517 if (length_name_0 > size_name_0) {
18518 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_name_0, length_name_0);
18520 NDR_CHECK(ndr_check_string_terminator(ndr, length_name_0, sizeof(uint16_t)));
18521 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.name, length_name_0, sizeof(uint16_t), CH_UTF16));
18522 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.name_type));
18523 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
18525 if (flags & NDR_OUT) {
18526 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18528 return NDR_ERR_SUCCESS;
18531 _PUBLIC_ void ndr_print_srvsvc_NetNameValidate(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetNameValidate *r)
18533 ndr_print_struct(ndr, name, "srvsvc_NetNameValidate");
18534 ndr->depth++;
18535 if (flags & NDR_SET_VALUES) {
18536 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18538 if (flags & NDR_IN) {
18539 ndr_print_struct(ndr, "in", "srvsvc_NetNameValidate");
18540 ndr->depth++;
18541 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
18542 ndr->depth++;
18543 if (r->in.server_unc) {
18544 ndr_print_string(ndr, "server_unc", r->in.server_unc);
18546 ndr->depth--;
18547 ndr_print_string(ndr, "name", r->in.name);
18548 ndr_print_uint32(ndr, "name_type", r->in.name_type);
18549 ndr_print_uint32(ndr, "flags", r->in.flags);
18550 ndr->depth--;
18552 if (flags & NDR_OUT) {
18553 ndr_print_struct(ndr, "out", "srvsvc_NetNameValidate");
18554 ndr->depth++;
18555 ndr_print_WERROR(ndr, "result", r->out.result);
18556 ndr->depth--;
18558 ndr->depth--;
18561 static enum ndr_err_code ndr_push_srvsvc_NETRPRNAMECANONICALIZE(struct ndr_push *ndr, int flags, const struct srvsvc_NETRPRNAMECANONICALIZE *r)
18563 if (flags & NDR_IN) {
18565 if (flags & NDR_OUT) {
18566 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18568 return NDR_ERR_SUCCESS;
18571 static enum ndr_err_code ndr_pull_srvsvc_NETRPRNAMECANONICALIZE(struct ndr_pull *ndr, int flags, struct srvsvc_NETRPRNAMECANONICALIZE *r)
18573 if (flags & NDR_IN) {
18575 if (flags & NDR_OUT) {
18576 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18578 return NDR_ERR_SUCCESS;
18581 _PUBLIC_ void ndr_print_srvsvc_NETRPRNAMECANONICALIZE(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRPRNAMECANONICALIZE *r)
18583 ndr_print_struct(ndr, name, "srvsvc_NETRPRNAMECANONICALIZE");
18584 ndr->depth++;
18585 if (flags & NDR_SET_VALUES) {
18586 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18588 if (flags & NDR_IN) {
18589 ndr_print_struct(ndr, "in", "srvsvc_NETRPRNAMECANONICALIZE");
18590 ndr->depth++;
18591 ndr->depth--;
18593 if (flags & NDR_OUT) {
18594 ndr_print_struct(ndr, "out", "srvsvc_NETRPRNAMECANONICALIZE");
18595 ndr->depth++;
18596 ndr_print_WERROR(ndr, "result", r->out.result);
18597 ndr->depth--;
18599 ndr->depth--;
18602 static enum ndr_err_code ndr_push_srvsvc_NetPRNameCompare(struct ndr_push *ndr, int flags, const struct srvsvc_NetPRNameCompare *r)
18604 if (flags & NDR_IN) {
18605 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
18606 if (r->in.server_unc) {
18607 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18608 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18609 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18610 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));
18612 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.name1, CH_UTF16)));
18613 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18614 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.name1, CH_UTF16)));
18615 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.name1, ndr_charset_length(r->in.name1, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18616 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.name2, CH_UTF16)));
18617 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18618 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.name2, CH_UTF16)));
18619 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.name2, ndr_charset_length(r->in.name2, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18620 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.name_type));
18621 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
18623 if (flags & NDR_OUT) {
18624 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18626 return NDR_ERR_SUCCESS;
18629 static enum ndr_err_code ndr_pull_srvsvc_NetPRNameCompare(struct ndr_pull *ndr, int flags, struct srvsvc_NetPRNameCompare *r)
18631 uint32_t _ptr_server_unc;
18632 uint32_t size_server_unc_1 = 0;
18633 uint32_t length_server_unc_1 = 0;
18634 uint32_t size_name1_0 = 0;
18635 uint32_t length_name1_0 = 0;
18636 uint32_t size_name2_0 = 0;
18637 uint32_t length_name2_0 = 0;
18638 TALLOC_CTX *_mem_save_server_unc_0;
18639 if (flags & NDR_IN) {
18640 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
18641 if (_ptr_server_unc) {
18642 NDR_PULL_ALLOC(ndr, r->in.server_unc);
18643 } else {
18644 r->in.server_unc = NULL;
18646 if (r->in.server_unc) {
18647 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
18648 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
18649 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
18650 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
18651 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
18652 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
18653 if (length_server_unc_1 > size_server_unc_1) {
18654 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
18656 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
18657 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
18658 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
18660 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.name1));
18661 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.name1));
18662 size_name1_0 = ndr_get_array_size(ndr, &r->in.name1);
18663 length_name1_0 = ndr_get_array_length(ndr, &r->in.name1);
18664 if (length_name1_0 > size_name1_0) {
18665 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_name1_0, length_name1_0);
18667 NDR_CHECK(ndr_check_string_terminator(ndr, length_name1_0, sizeof(uint16_t)));
18668 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.name1, length_name1_0, sizeof(uint16_t), CH_UTF16));
18669 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.name2));
18670 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.name2));
18671 size_name2_0 = ndr_get_array_size(ndr, &r->in.name2);
18672 length_name2_0 = ndr_get_array_length(ndr, &r->in.name2);
18673 if (length_name2_0 > size_name2_0) {
18674 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_name2_0, length_name2_0);
18676 NDR_CHECK(ndr_check_string_terminator(ndr, length_name2_0, sizeof(uint16_t)));
18677 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.name2, length_name2_0, sizeof(uint16_t), CH_UTF16));
18678 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.name_type));
18679 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
18681 if (flags & NDR_OUT) {
18682 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18684 return NDR_ERR_SUCCESS;
18687 _PUBLIC_ void ndr_print_srvsvc_NetPRNameCompare(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetPRNameCompare *r)
18689 ndr_print_struct(ndr, name, "srvsvc_NetPRNameCompare");
18690 ndr->depth++;
18691 if (flags & NDR_SET_VALUES) {
18692 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18694 if (flags & NDR_IN) {
18695 ndr_print_struct(ndr, "in", "srvsvc_NetPRNameCompare");
18696 ndr->depth++;
18697 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
18698 ndr->depth++;
18699 if (r->in.server_unc) {
18700 ndr_print_string(ndr, "server_unc", r->in.server_unc);
18702 ndr->depth--;
18703 ndr_print_string(ndr, "name1", r->in.name1);
18704 ndr_print_string(ndr, "name2", r->in.name2);
18705 ndr_print_uint32(ndr, "name_type", r->in.name_type);
18706 ndr_print_uint32(ndr, "flags", r->in.flags);
18707 ndr->depth--;
18709 if (flags & NDR_OUT) {
18710 ndr_print_struct(ndr, "out", "srvsvc_NetPRNameCompare");
18711 ndr->depth++;
18712 ndr_print_WERROR(ndr, "result", r->out.result);
18713 ndr->depth--;
18715 ndr->depth--;
18718 static enum ndr_err_code ndr_push_srvsvc_NetShareEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareEnum *r)
18720 if (flags & NDR_IN) {
18721 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
18722 if (r->in.server_unc) {
18723 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18724 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18725 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18726 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));
18728 if (r->in.info_ctr == NULL) {
18729 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18731 NDR_CHECK(ndr_push_srvsvc_NetShareInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
18732 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
18733 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
18734 if (r->in.resume_handle) {
18735 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
18738 if (flags & NDR_OUT) {
18739 if (r->out.info_ctr == NULL) {
18740 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18742 NDR_CHECK(ndr_push_srvsvc_NetShareInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
18743 if (r->out.totalentries == NULL) {
18744 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18746 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
18747 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
18748 if (r->out.resume_handle) {
18749 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
18751 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18753 return NDR_ERR_SUCCESS;
18756 static enum ndr_err_code ndr_pull_srvsvc_NetShareEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareEnum *r)
18758 uint32_t _ptr_server_unc;
18759 uint32_t size_server_unc_1 = 0;
18760 uint32_t length_server_unc_1 = 0;
18761 uint32_t _ptr_resume_handle;
18762 TALLOC_CTX *_mem_save_server_unc_0;
18763 TALLOC_CTX *_mem_save_info_ctr_0;
18764 TALLOC_CTX *_mem_save_totalentries_0;
18765 TALLOC_CTX *_mem_save_resume_handle_0;
18766 if (flags & NDR_IN) {
18767 ZERO_STRUCT(r->out);
18769 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
18770 if (_ptr_server_unc) {
18771 NDR_PULL_ALLOC(ndr, r->in.server_unc);
18772 } else {
18773 r->in.server_unc = NULL;
18775 if (r->in.server_unc) {
18776 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
18777 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
18778 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
18779 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
18780 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
18781 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
18782 if (length_server_unc_1 > size_server_unc_1) {
18783 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
18785 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
18786 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
18787 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
18789 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18790 NDR_PULL_ALLOC(ndr, r->in.info_ctr);
18792 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
18793 NDR_PULL_SET_MEM_CTX(ndr, r->in.info_ctr, LIBNDR_FLAG_REF_ALLOC);
18794 NDR_CHECK(ndr_pull_srvsvc_NetShareInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
18795 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
18796 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
18797 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
18798 if (_ptr_resume_handle) {
18799 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
18800 } else {
18801 r->in.resume_handle = NULL;
18803 if (r->in.resume_handle) {
18804 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
18805 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
18806 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
18807 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
18809 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
18810 *r->out.info_ctr = *r->in.info_ctr;
18811 NDR_PULL_ALLOC(ndr, r->out.totalentries);
18812 ZERO_STRUCTP(r->out.totalentries);
18814 if (flags & NDR_OUT) {
18815 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18816 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
18818 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
18819 NDR_PULL_SET_MEM_CTX(ndr, r->out.info_ctr, LIBNDR_FLAG_REF_ALLOC);
18820 NDR_CHECK(ndr_pull_srvsvc_NetShareInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
18821 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
18822 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18823 NDR_PULL_ALLOC(ndr, r->out.totalentries);
18825 _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
18826 NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
18827 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
18828 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
18829 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
18830 if (_ptr_resume_handle) {
18831 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
18832 } else {
18833 r->out.resume_handle = NULL;
18835 if (r->out.resume_handle) {
18836 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
18837 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
18838 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
18839 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
18841 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18843 return NDR_ERR_SUCCESS;
18846 _PUBLIC_ void ndr_print_srvsvc_NetShareEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareEnum *r)
18848 ndr_print_struct(ndr, name, "srvsvc_NetShareEnum");
18849 ndr->depth++;
18850 if (flags & NDR_SET_VALUES) {
18851 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18853 if (flags & NDR_IN) {
18854 ndr_print_struct(ndr, "in", "srvsvc_NetShareEnum");
18855 ndr->depth++;
18856 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
18857 ndr->depth++;
18858 if (r->in.server_unc) {
18859 ndr_print_string(ndr, "server_unc", r->in.server_unc);
18861 ndr->depth--;
18862 ndr_print_ptr(ndr, "info_ctr", r->in.info_ctr);
18863 ndr->depth++;
18864 ndr_print_srvsvc_NetShareInfoCtr(ndr, "info_ctr", r->in.info_ctr);
18865 ndr->depth--;
18866 ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
18867 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
18868 ndr->depth++;
18869 if (r->in.resume_handle) {
18870 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
18872 ndr->depth--;
18873 ndr->depth--;
18875 if (flags & NDR_OUT) {
18876 ndr_print_struct(ndr, "out", "srvsvc_NetShareEnum");
18877 ndr->depth++;
18878 ndr_print_ptr(ndr, "info_ctr", r->out.info_ctr);
18879 ndr->depth++;
18880 ndr_print_srvsvc_NetShareInfoCtr(ndr, "info_ctr", r->out.info_ctr);
18881 ndr->depth--;
18882 ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
18883 ndr->depth++;
18884 ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
18885 ndr->depth--;
18886 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
18887 ndr->depth++;
18888 if (r->out.resume_handle) {
18889 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
18891 ndr->depth--;
18892 ndr_print_WERROR(ndr, "result", r->out.result);
18893 ndr->depth--;
18895 ndr->depth--;
18898 static enum ndr_err_code ndr_push_srvsvc_NetShareDelStart(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareDelStart *r)
18900 if (flags & NDR_IN) {
18901 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
18902 if (r->in.server_unc) {
18903 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18904 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18905 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18906 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));
18908 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
18909 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18910 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
18911 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share, ndr_charset_length(r->in.share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18912 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.reserved));
18914 if (flags & NDR_OUT) {
18915 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.hnd));
18916 if (r->out.hnd) {
18917 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.hnd));
18919 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18921 return NDR_ERR_SUCCESS;
18924 static enum ndr_err_code ndr_pull_srvsvc_NetShareDelStart(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareDelStart *r)
18926 uint32_t _ptr_server_unc;
18927 uint32_t size_server_unc_1 = 0;
18928 uint32_t length_server_unc_1 = 0;
18929 uint32_t size_share_0 = 0;
18930 uint32_t length_share_0 = 0;
18931 uint32_t _ptr_hnd;
18932 TALLOC_CTX *_mem_save_server_unc_0;
18933 TALLOC_CTX *_mem_save_hnd_0;
18934 if (flags & NDR_IN) {
18935 ZERO_STRUCT(r->out);
18937 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
18938 if (_ptr_server_unc) {
18939 NDR_PULL_ALLOC(ndr, r->in.server_unc);
18940 } else {
18941 r->in.server_unc = NULL;
18943 if (r->in.server_unc) {
18944 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
18945 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
18946 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
18947 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
18948 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
18949 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
18950 if (length_server_unc_1 > size_server_unc_1) {
18951 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
18953 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
18954 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
18955 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
18957 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share));
18958 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share));
18959 size_share_0 = ndr_get_array_size(ndr, &r->in.share);
18960 length_share_0 = ndr_get_array_length(ndr, &r->in.share);
18961 if (length_share_0 > size_share_0) {
18962 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_share_0, length_share_0);
18964 NDR_CHECK(ndr_check_string_terminator(ndr, length_share_0, sizeof(uint16_t)));
18965 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share, length_share_0, sizeof(uint16_t), CH_UTF16));
18966 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.reserved));
18968 if (flags & NDR_OUT) {
18969 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_hnd));
18970 if (_ptr_hnd) {
18971 NDR_PULL_ALLOC(ndr, r->out.hnd);
18972 } else {
18973 r->out.hnd = NULL;
18975 if (r->out.hnd) {
18976 _mem_save_hnd_0 = NDR_PULL_GET_MEM_CTX(ndr);
18977 NDR_PULL_SET_MEM_CTX(ndr, r->out.hnd, 0);
18978 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.hnd));
18979 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hnd_0, 0);
18981 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18983 return NDR_ERR_SUCCESS;
18986 _PUBLIC_ void ndr_print_srvsvc_NetShareDelStart(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareDelStart *r)
18988 ndr_print_struct(ndr, name, "srvsvc_NetShareDelStart");
18989 ndr->depth++;
18990 if (flags & NDR_SET_VALUES) {
18991 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18993 if (flags & NDR_IN) {
18994 ndr_print_struct(ndr, "in", "srvsvc_NetShareDelStart");
18995 ndr->depth++;
18996 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
18997 ndr->depth++;
18998 if (r->in.server_unc) {
18999 ndr_print_string(ndr, "server_unc", r->in.server_unc);
19001 ndr->depth--;
19002 ndr_print_string(ndr, "share", r->in.share);
19003 ndr_print_uint32(ndr, "reserved", r->in.reserved);
19004 ndr->depth--;
19006 if (flags & NDR_OUT) {
19007 ndr_print_struct(ndr, "out", "srvsvc_NetShareDelStart");
19008 ndr->depth++;
19009 ndr_print_ptr(ndr, "hnd", r->out.hnd);
19010 ndr->depth++;
19011 if (r->out.hnd) {
19012 ndr_print_policy_handle(ndr, "hnd", r->out.hnd);
19014 ndr->depth--;
19015 ndr_print_WERROR(ndr, "result", r->out.result);
19016 ndr->depth--;
19018 ndr->depth--;
19021 static enum ndr_err_code ndr_push_srvsvc_NetShareDelCommit(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareDelCommit *r)
19023 if (flags & NDR_IN) {
19024 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.hnd));
19025 if (r->in.hnd) {
19026 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.hnd));
19029 if (flags & NDR_OUT) {
19030 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.hnd));
19031 if (r->out.hnd) {
19032 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.hnd));
19034 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19036 return NDR_ERR_SUCCESS;
19039 static enum ndr_err_code ndr_pull_srvsvc_NetShareDelCommit(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareDelCommit *r)
19041 uint32_t _ptr_hnd;
19042 TALLOC_CTX *_mem_save_hnd_0;
19043 if (flags & NDR_IN) {
19044 ZERO_STRUCT(r->out);
19046 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_hnd));
19047 if (_ptr_hnd) {
19048 NDR_PULL_ALLOC(ndr, r->in.hnd);
19049 } else {
19050 r->in.hnd = NULL;
19052 if (r->in.hnd) {
19053 _mem_save_hnd_0 = NDR_PULL_GET_MEM_CTX(ndr);
19054 NDR_PULL_SET_MEM_CTX(ndr, r->in.hnd, 0);
19055 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.hnd));
19056 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hnd_0, 0);
19059 if (flags & NDR_OUT) {
19060 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_hnd));
19061 if (_ptr_hnd) {
19062 NDR_PULL_ALLOC(ndr, r->out.hnd);
19063 } else {
19064 r->out.hnd = NULL;
19066 if (r->out.hnd) {
19067 _mem_save_hnd_0 = NDR_PULL_GET_MEM_CTX(ndr);
19068 NDR_PULL_SET_MEM_CTX(ndr, r->out.hnd, 0);
19069 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.hnd));
19070 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hnd_0, 0);
19072 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19074 return NDR_ERR_SUCCESS;
19077 _PUBLIC_ void ndr_print_srvsvc_NetShareDelCommit(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareDelCommit *r)
19079 ndr_print_struct(ndr, name, "srvsvc_NetShareDelCommit");
19080 ndr->depth++;
19081 if (flags & NDR_SET_VALUES) {
19082 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19084 if (flags & NDR_IN) {
19085 ndr_print_struct(ndr, "in", "srvsvc_NetShareDelCommit");
19086 ndr->depth++;
19087 ndr_print_ptr(ndr, "hnd", r->in.hnd);
19088 ndr->depth++;
19089 if (r->in.hnd) {
19090 ndr_print_policy_handle(ndr, "hnd", r->in.hnd);
19092 ndr->depth--;
19093 ndr->depth--;
19095 if (flags & NDR_OUT) {
19096 ndr_print_struct(ndr, "out", "srvsvc_NetShareDelCommit");
19097 ndr->depth++;
19098 ndr_print_ptr(ndr, "hnd", r->out.hnd);
19099 ndr->depth++;
19100 if (r->out.hnd) {
19101 ndr_print_policy_handle(ndr, "hnd", r->out.hnd);
19103 ndr->depth--;
19104 ndr_print_WERROR(ndr, "result", r->out.result);
19105 ndr->depth--;
19107 ndr->depth--;
19110 static enum ndr_err_code ndr_push_srvsvc_NetGetFileSecurity(struct ndr_push *ndr, int flags, const struct srvsvc_NetGetFileSecurity *r)
19112 if (flags & NDR_IN) {
19113 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
19114 if (r->in.server_unc) {
19115 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
19116 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
19117 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
19118 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));
19120 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.share));
19121 if (r->in.share) {
19122 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
19123 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
19124 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
19125 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share, ndr_charset_length(r->in.share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
19127 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.file, CH_UTF16)));
19128 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
19129 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.file, CH_UTF16)));
19130 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.file, ndr_charset_length(r->in.file, CH_UTF16), sizeof(uint16_t), CH_UTF16));
19131 NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.securityinformation));
19133 if (flags & NDR_OUT) {
19134 if (r->out.sd_buf == NULL) {
19135 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
19137 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.sd_buf));
19138 if (*r->out.sd_buf) {
19139 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sd_buf));
19141 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19143 return NDR_ERR_SUCCESS;
19146 static enum ndr_err_code ndr_pull_srvsvc_NetGetFileSecurity(struct ndr_pull *ndr, int flags, struct srvsvc_NetGetFileSecurity *r)
19148 uint32_t _ptr_server_unc;
19149 uint32_t size_server_unc_1 = 0;
19150 uint32_t length_server_unc_1 = 0;
19151 uint32_t _ptr_share;
19152 uint32_t size_share_1 = 0;
19153 uint32_t length_share_1 = 0;
19154 uint32_t size_file_0 = 0;
19155 uint32_t length_file_0 = 0;
19156 uint32_t _ptr_sd_buf;
19157 TALLOC_CTX *_mem_save_server_unc_0;
19158 TALLOC_CTX *_mem_save_share_0;
19159 TALLOC_CTX *_mem_save_sd_buf_0;
19160 TALLOC_CTX *_mem_save_sd_buf_1;
19161 if (flags & NDR_IN) {
19162 ZERO_STRUCT(r->out);
19164 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
19165 if (_ptr_server_unc) {
19166 NDR_PULL_ALLOC(ndr, r->in.server_unc);
19167 } else {
19168 r->in.server_unc = NULL;
19170 if (r->in.server_unc) {
19171 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
19172 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
19173 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
19174 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
19175 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
19176 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
19177 if (length_server_unc_1 > size_server_unc_1) {
19178 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
19180 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
19181 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
19182 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
19184 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share));
19185 if (_ptr_share) {
19186 NDR_PULL_ALLOC(ndr, r->in.share);
19187 } else {
19188 r->in.share = NULL;
19190 if (r->in.share) {
19191 _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr);
19192 NDR_PULL_SET_MEM_CTX(ndr, r->in.share, 0);
19193 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share));
19194 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share));
19195 size_share_1 = ndr_get_array_size(ndr, &r->in.share);
19196 length_share_1 = ndr_get_array_length(ndr, &r->in.share);
19197 if (length_share_1 > size_share_1) {
19198 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_share_1, length_share_1);
19200 NDR_CHECK(ndr_check_string_terminator(ndr, length_share_1, sizeof(uint16_t)));
19201 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share, length_share_1, sizeof(uint16_t), CH_UTF16));
19202 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0);
19204 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.file));
19205 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.file));
19206 size_file_0 = ndr_get_array_size(ndr, &r->in.file);
19207 length_file_0 = ndr_get_array_length(ndr, &r->in.file);
19208 if (length_file_0 > size_file_0) {
19209 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_file_0, length_file_0);
19211 NDR_CHECK(ndr_check_string_terminator(ndr, length_file_0, sizeof(uint16_t)));
19212 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.file, length_file_0, sizeof(uint16_t), CH_UTF16));
19213 NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.securityinformation));
19214 NDR_PULL_ALLOC(ndr, r->out.sd_buf);
19215 ZERO_STRUCTP(r->out.sd_buf);
19217 if (flags & NDR_OUT) {
19218 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
19219 NDR_PULL_ALLOC(ndr, r->out.sd_buf);
19221 _mem_save_sd_buf_0 = NDR_PULL_GET_MEM_CTX(ndr);
19222 NDR_PULL_SET_MEM_CTX(ndr, r->out.sd_buf, LIBNDR_FLAG_REF_ALLOC);
19223 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sd_buf));
19224 if (_ptr_sd_buf) {
19225 NDR_PULL_ALLOC(ndr, *r->out.sd_buf);
19226 } else {
19227 *r->out.sd_buf = NULL;
19229 if (*r->out.sd_buf) {
19230 _mem_save_sd_buf_1 = NDR_PULL_GET_MEM_CTX(ndr);
19231 NDR_PULL_SET_MEM_CTX(ndr, *r->out.sd_buf, 0);
19232 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sd_buf));
19233 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sd_buf_1, 0);
19235 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sd_buf_0, LIBNDR_FLAG_REF_ALLOC);
19236 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19238 return NDR_ERR_SUCCESS;
19241 _PUBLIC_ void ndr_print_srvsvc_NetGetFileSecurity(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetGetFileSecurity *r)
19243 ndr_print_struct(ndr, name, "srvsvc_NetGetFileSecurity");
19244 ndr->depth++;
19245 if (flags & NDR_SET_VALUES) {
19246 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19248 if (flags & NDR_IN) {
19249 ndr_print_struct(ndr, "in", "srvsvc_NetGetFileSecurity");
19250 ndr->depth++;
19251 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
19252 ndr->depth++;
19253 if (r->in.server_unc) {
19254 ndr_print_string(ndr, "server_unc", r->in.server_unc);
19256 ndr->depth--;
19257 ndr_print_ptr(ndr, "share", r->in.share);
19258 ndr->depth++;
19259 if (r->in.share) {
19260 ndr_print_string(ndr, "share", r->in.share);
19262 ndr->depth--;
19263 ndr_print_string(ndr, "file", r->in.file);
19264 ndr_print_security_secinfo(ndr, "securityinformation", r->in.securityinformation);
19265 ndr->depth--;
19267 if (flags & NDR_OUT) {
19268 ndr_print_struct(ndr, "out", "srvsvc_NetGetFileSecurity");
19269 ndr->depth++;
19270 ndr_print_ptr(ndr, "sd_buf", r->out.sd_buf);
19271 ndr->depth++;
19272 ndr_print_ptr(ndr, "sd_buf", *r->out.sd_buf);
19273 ndr->depth++;
19274 if (*r->out.sd_buf) {
19275 ndr_print_sec_desc_buf(ndr, "sd_buf", *r->out.sd_buf);
19277 ndr->depth--;
19278 ndr->depth--;
19279 ndr_print_WERROR(ndr, "result", r->out.result);
19280 ndr->depth--;
19282 ndr->depth--;
19285 static enum ndr_err_code ndr_push_srvsvc_NetSetFileSecurity(struct ndr_push *ndr, int flags, const struct srvsvc_NetSetFileSecurity *r)
19287 if (flags & NDR_IN) {
19288 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
19289 if (r->in.server_unc) {
19290 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
19291 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
19292 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
19293 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));
19295 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.share));
19296 if (r->in.share) {
19297 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
19298 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
19299 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
19300 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share, ndr_charset_length(r->in.share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
19302 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.file, CH_UTF16)));
19303 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
19304 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.file, CH_UTF16)));
19305 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.file, ndr_charset_length(r->in.file, CH_UTF16), sizeof(uint16_t), CH_UTF16));
19306 NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.securityinformation));
19307 if (r->in.sd_buf == NULL) {
19308 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
19310 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sd_buf));
19312 if (flags & NDR_OUT) {
19313 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19315 return NDR_ERR_SUCCESS;
19318 static enum ndr_err_code ndr_pull_srvsvc_NetSetFileSecurity(struct ndr_pull *ndr, int flags, struct srvsvc_NetSetFileSecurity *r)
19320 uint32_t _ptr_server_unc;
19321 uint32_t size_server_unc_1 = 0;
19322 uint32_t length_server_unc_1 = 0;
19323 uint32_t _ptr_share;
19324 uint32_t size_share_1 = 0;
19325 uint32_t length_share_1 = 0;
19326 uint32_t size_file_0 = 0;
19327 uint32_t length_file_0 = 0;
19328 TALLOC_CTX *_mem_save_server_unc_0;
19329 TALLOC_CTX *_mem_save_share_0;
19330 TALLOC_CTX *_mem_save_sd_buf_0;
19331 if (flags & NDR_IN) {
19332 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
19333 if (_ptr_server_unc) {
19334 NDR_PULL_ALLOC(ndr, r->in.server_unc);
19335 } else {
19336 r->in.server_unc = NULL;
19338 if (r->in.server_unc) {
19339 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
19340 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
19341 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
19342 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
19343 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
19344 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
19345 if (length_server_unc_1 > size_server_unc_1) {
19346 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
19348 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
19349 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
19350 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
19352 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share));
19353 if (_ptr_share) {
19354 NDR_PULL_ALLOC(ndr, r->in.share);
19355 } else {
19356 r->in.share = NULL;
19358 if (r->in.share) {
19359 _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr);
19360 NDR_PULL_SET_MEM_CTX(ndr, r->in.share, 0);
19361 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share));
19362 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share));
19363 size_share_1 = ndr_get_array_size(ndr, &r->in.share);
19364 length_share_1 = ndr_get_array_length(ndr, &r->in.share);
19365 if (length_share_1 > size_share_1) {
19366 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_share_1, length_share_1);
19368 NDR_CHECK(ndr_check_string_terminator(ndr, length_share_1, sizeof(uint16_t)));
19369 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share, length_share_1, sizeof(uint16_t), CH_UTF16));
19370 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0);
19372 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.file));
19373 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.file));
19374 size_file_0 = ndr_get_array_size(ndr, &r->in.file);
19375 length_file_0 = ndr_get_array_length(ndr, &r->in.file);
19376 if (length_file_0 > size_file_0) {
19377 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_file_0, length_file_0);
19379 NDR_CHECK(ndr_check_string_terminator(ndr, length_file_0, sizeof(uint16_t)));
19380 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.file, length_file_0, sizeof(uint16_t), CH_UTF16));
19381 NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.securityinformation));
19382 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
19383 NDR_PULL_ALLOC(ndr, r->in.sd_buf);
19385 _mem_save_sd_buf_0 = NDR_PULL_GET_MEM_CTX(ndr);
19386 NDR_PULL_SET_MEM_CTX(ndr, r->in.sd_buf, LIBNDR_FLAG_REF_ALLOC);
19387 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sd_buf));
19388 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sd_buf_0, LIBNDR_FLAG_REF_ALLOC);
19390 if (flags & NDR_OUT) {
19391 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19393 return NDR_ERR_SUCCESS;
19396 _PUBLIC_ void ndr_print_srvsvc_NetSetFileSecurity(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSetFileSecurity *r)
19398 ndr_print_struct(ndr, name, "srvsvc_NetSetFileSecurity");
19399 ndr->depth++;
19400 if (flags & NDR_SET_VALUES) {
19401 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19403 if (flags & NDR_IN) {
19404 ndr_print_struct(ndr, "in", "srvsvc_NetSetFileSecurity");
19405 ndr->depth++;
19406 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
19407 ndr->depth++;
19408 if (r->in.server_unc) {
19409 ndr_print_string(ndr, "server_unc", r->in.server_unc);
19411 ndr->depth--;
19412 ndr_print_ptr(ndr, "share", r->in.share);
19413 ndr->depth++;
19414 if (r->in.share) {
19415 ndr_print_string(ndr, "share", r->in.share);
19417 ndr->depth--;
19418 ndr_print_string(ndr, "file", r->in.file);
19419 ndr_print_security_secinfo(ndr, "securityinformation", r->in.securityinformation);
19420 ndr_print_ptr(ndr, "sd_buf", r->in.sd_buf);
19421 ndr->depth++;
19422 ndr_print_sec_desc_buf(ndr, "sd_buf", r->in.sd_buf);
19423 ndr->depth--;
19424 ndr->depth--;
19426 if (flags & NDR_OUT) {
19427 ndr_print_struct(ndr, "out", "srvsvc_NetSetFileSecurity");
19428 ndr->depth++;
19429 ndr_print_WERROR(ndr, "result", r->out.result);
19430 ndr->depth--;
19432 ndr->depth--;
19435 static enum ndr_err_code ndr_push_srvsvc_NetServerTransportAddEx(struct ndr_push *ndr, int flags, const struct srvsvc_NetServerTransportAddEx *r)
19437 if (flags & NDR_IN) {
19438 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
19439 if (r->in.server_unc) {
19440 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
19441 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
19442 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
19443 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));
19445 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
19446 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.info, r->in.level));
19447 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
19449 if (flags & NDR_OUT) {
19450 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19452 return NDR_ERR_SUCCESS;
19455 static enum ndr_err_code ndr_pull_srvsvc_NetServerTransportAddEx(struct ndr_pull *ndr, int flags, struct srvsvc_NetServerTransportAddEx *r)
19457 uint32_t _ptr_server_unc;
19458 uint32_t size_server_unc_1 = 0;
19459 uint32_t length_server_unc_1 = 0;
19460 TALLOC_CTX *_mem_save_server_unc_0;
19461 if (flags & NDR_IN) {
19462 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
19463 if (_ptr_server_unc) {
19464 NDR_PULL_ALLOC(ndr, r->in.server_unc);
19465 } else {
19466 r->in.server_unc = NULL;
19468 if (r->in.server_unc) {
19469 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
19470 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
19471 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
19472 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
19473 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
19474 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
19475 if (length_server_unc_1 > size_server_unc_1) {
19476 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
19478 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
19479 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
19480 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
19482 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
19483 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.info, r->in.level));
19484 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
19486 if (flags & NDR_OUT) {
19487 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19489 return NDR_ERR_SUCCESS;
19492 _PUBLIC_ void ndr_print_srvsvc_NetServerTransportAddEx(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetServerTransportAddEx *r)
19494 ndr_print_struct(ndr, name, "srvsvc_NetServerTransportAddEx");
19495 ndr->depth++;
19496 if (flags & NDR_SET_VALUES) {
19497 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19499 if (flags & NDR_IN) {
19500 ndr_print_struct(ndr, "in", "srvsvc_NetServerTransportAddEx");
19501 ndr->depth++;
19502 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
19503 ndr->depth++;
19504 if (r->in.server_unc) {
19505 ndr_print_string(ndr, "server_unc", r->in.server_unc);
19507 ndr->depth--;
19508 ndr_print_uint32(ndr, "level", r->in.level);
19509 ndr_print_set_switch_value(ndr, &r->in.info, r->in.level);
19510 ndr_print_srvsvc_NetTransportInfo(ndr, "info", &r->in.info);
19511 ndr->depth--;
19513 if (flags & NDR_OUT) {
19514 ndr_print_struct(ndr, "out", "srvsvc_NetServerTransportAddEx");
19515 ndr->depth++;
19516 ndr_print_WERROR(ndr, "result", r->out.result);
19517 ndr->depth--;
19519 ndr->depth--;
19522 static enum ndr_err_code ndr_push_srvsvc_NetServerSetServiceBitsEx(struct ndr_push *ndr, int flags, const struct srvsvc_NetServerSetServiceBitsEx *r)
19524 if (flags & NDR_IN) {
19525 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
19526 if (r->in.server_unc) {
19527 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
19528 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
19529 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
19530 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));
19532 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.emulated_server_unc));
19533 if (r->in.emulated_server_unc) {
19534 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.emulated_server_unc, CH_UTF16)));
19535 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
19536 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.emulated_server_unc, CH_UTF16)));
19537 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));
19539 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.transport));
19540 if (r->in.transport) {
19541 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.transport, CH_UTF16)));
19542 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
19543 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.transport, CH_UTF16)));
19544 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.transport, ndr_charset_length(r->in.transport, CH_UTF16), sizeof(uint16_t), CH_UTF16));
19546 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.servicebitsofinterest));
19547 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.servicebits));
19548 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.updateimmediately));
19550 if (flags & NDR_OUT) {
19551 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19553 return NDR_ERR_SUCCESS;
19556 static enum ndr_err_code ndr_pull_srvsvc_NetServerSetServiceBitsEx(struct ndr_pull *ndr, int flags, struct srvsvc_NetServerSetServiceBitsEx *r)
19558 uint32_t _ptr_server_unc;
19559 uint32_t size_server_unc_1 = 0;
19560 uint32_t length_server_unc_1 = 0;
19561 uint32_t _ptr_emulated_server_unc;
19562 uint32_t size_emulated_server_unc_1 = 0;
19563 uint32_t length_emulated_server_unc_1 = 0;
19564 uint32_t _ptr_transport;
19565 uint32_t size_transport_1 = 0;
19566 uint32_t length_transport_1 = 0;
19567 TALLOC_CTX *_mem_save_server_unc_0;
19568 TALLOC_CTX *_mem_save_emulated_server_unc_0;
19569 TALLOC_CTX *_mem_save_transport_0;
19570 if (flags & NDR_IN) {
19571 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
19572 if (_ptr_server_unc) {
19573 NDR_PULL_ALLOC(ndr, r->in.server_unc);
19574 } else {
19575 r->in.server_unc = NULL;
19577 if (r->in.server_unc) {
19578 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
19579 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
19580 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
19581 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
19582 size_server_unc_1 = ndr_get_array_size(ndr, &r->in.server_unc);
19583 length_server_unc_1 = ndr_get_array_length(ndr, &r->in.server_unc);
19584 if (length_server_unc_1 > size_server_unc_1) {
19585 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_unc_1, length_server_unc_1);
19587 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_unc_1, sizeof(uint16_t)));
19588 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, length_server_unc_1, sizeof(uint16_t), CH_UTF16));
19589 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
19591 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_emulated_server_unc));
19592 if (_ptr_emulated_server_unc) {
19593 NDR_PULL_ALLOC(ndr, r->in.emulated_server_unc);
19594 } else {
19595 r->in.emulated_server_unc = NULL;
19597 if (r->in.emulated_server_unc) {
19598 _mem_save_emulated_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
19599 NDR_PULL_SET_MEM_CTX(ndr, r->in.emulated_server_unc, 0);
19600 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.emulated_server_unc));
19601 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.emulated_server_unc));
19602 size_emulated_server_unc_1 = ndr_get_array_size(ndr, &r->in.emulated_server_unc);
19603 length_emulated_server_unc_1 = ndr_get_array_length(ndr, &r->in.emulated_server_unc);
19604 if (length_emulated_server_unc_1 > size_emulated_server_unc_1) {
19605 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_emulated_server_unc_1, length_emulated_server_unc_1);
19607 NDR_CHECK(ndr_check_string_terminator(ndr, length_emulated_server_unc_1, sizeof(uint16_t)));
19608 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.emulated_server_unc, length_emulated_server_unc_1, sizeof(uint16_t), CH_UTF16));
19609 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_emulated_server_unc_0, 0);
19611 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_transport));
19612 if (_ptr_transport) {
19613 NDR_PULL_ALLOC(ndr, r->in.transport);
19614 } else {
19615 r->in.transport = NULL;
19617 if (r->in.transport) {
19618 _mem_save_transport_0 = NDR_PULL_GET_MEM_CTX(ndr);
19619 NDR_PULL_SET_MEM_CTX(ndr, r->in.transport, 0);
19620 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.transport));
19621 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.transport));
19622 size_transport_1 = ndr_get_array_size(ndr, &r->in.transport);
19623 length_transport_1 = ndr_get_array_length(ndr, &r->in.transport);
19624 if (length_transport_1 > size_transport_1) {
19625 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_transport_1, length_transport_1);
19627 NDR_CHECK(ndr_check_string_terminator(ndr, length_transport_1, sizeof(uint16_t)));
19628 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.transport, length_transport_1, sizeof(uint16_t), CH_UTF16));
19629 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_transport_0, 0);
19631 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.servicebitsofinterest));
19632 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.servicebits));
19633 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.updateimmediately));
19635 if (flags & NDR_OUT) {
19636 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19638 return NDR_ERR_SUCCESS;
19641 _PUBLIC_ void ndr_print_srvsvc_NetServerSetServiceBitsEx(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetServerSetServiceBitsEx *r)
19643 ndr_print_struct(ndr, name, "srvsvc_NetServerSetServiceBitsEx");
19644 ndr->depth++;
19645 if (flags & NDR_SET_VALUES) {
19646 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19648 if (flags & NDR_IN) {
19649 ndr_print_struct(ndr, "in", "srvsvc_NetServerSetServiceBitsEx");
19650 ndr->depth++;
19651 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
19652 ndr->depth++;
19653 if (r->in.server_unc) {
19654 ndr_print_string(ndr, "server_unc", r->in.server_unc);
19656 ndr->depth--;
19657 ndr_print_ptr(ndr, "emulated_server_unc", r->in.emulated_server_unc);
19658 ndr->depth++;
19659 if (r->in.emulated_server_unc) {
19660 ndr_print_string(ndr, "emulated_server_unc", r->in.emulated_server_unc);
19662 ndr->depth--;
19663 ndr_print_ptr(ndr, "transport", r->in.transport);
19664 ndr->depth++;
19665 if (r->in.transport) {
19666 ndr_print_string(ndr, "transport", r->in.transport);
19668 ndr->depth--;
19669 ndr_print_uint32(ndr, "servicebitsofinterest", r->in.servicebitsofinterest);
19670 ndr_print_uint32(ndr, "servicebits", r->in.servicebits);
19671 ndr_print_uint32(ndr, "updateimmediately", r->in.updateimmediately);
19672 ndr->depth--;
19674 if (flags & NDR_OUT) {
19675 ndr_print_struct(ndr, "out", "srvsvc_NetServerSetServiceBitsEx");
19676 ndr->depth++;
19677 ndr_print_WERROR(ndr, "result", r->out.result);
19678 ndr->depth--;
19680 ndr->depth--;
19683 static enum ndr_err_code ndr_push_srvsvc_NETRDFSGETVERSION(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSGETVERSION *r)
19685 if (flags & NDR_IN) {
19687 if (flags & NDR_OUT) {
19688 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19690 return NDR_ERR_SUCCESS;
19693 static enum ndr_err_code ndr_pull_srvsvc_NETRDFSGETVERSION(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSGETVERSION *r)
19695 if (flags & NDR_IN) {
19697 if (flags & NDR_OUT) {
19698 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19700 return NDR_ERR_SUCCESS;
19703 _PUBLIC_ void ndr_print_srvsvc_NETRDFSGETVERSION(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSGETVERSION *r)
19705 ndr_print_struct(ndr, name, "srvsvc_NETRDFSGETVERSION");
19706 ndr->depth++;
19707 if (flags & NDR_SET_VALUES) {
19708 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19710 if (flags & NDR_IN) {
19711 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSGETVERSION");
19712 ndr->depth++;
19713 ndr->depth--;
19715 if (flags & NDR_OUT) {
19716 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSGETVERSION");
19717 ndr->depth++;
19718 ndr_print_WERROR(ndr, "result", r->out.result);
19719 ndr->depth--;
19721 ndr->depth--;
19724 static enum ndr_err_code ndr_push_srvsvc_NETRDFSCREATELOCALPARTITION(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSCREATELOCALPARTITION *r)
19726 if (flags & NDR_IN) {
19728 if (flags & NDR_OUT) {
19729 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19731 return NDR_ERR_SUCCESS;
19734 static enum ndr_err_code ndr_pull_srvsvc_NETRDFSCREATELOCALPARTITION(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSCREATELOCALPARTITION *r)
19736 if (flags & NDR_IN) {
19738 if (flags & NDR_OUT) {
19739 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19741 return NDR_ERR_SUCCESS;
19744 _PUBLIC_ void ndr_print_srvsvc_NETRDFSCREATELOCALPARTITION(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSCREATELOCALPARTITION *r)
19746 ndr_print_struct(ndr, name, "srvsvc_NETRDFSCREATELOCALPARTITION");
19747 ndr->depth++;
19748 if (flags & NDR_SET_VALUES) {
19749 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19751 if (flags & NDR_IN) {
19752 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSCREATELOCALPARTITION");
19753 ndr->depth++;
19754 ndr->depth--;
19756 if (flags & NDR_OUT) {
19757 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSCREATELOCALPARTITION");
19758 ndr->depth++;
19759 ndr_print_WERROR(ndr, "result", r->out.result);
19760 ndr->depth--;
19762 ndr->depth--;
19765 static enum ndr_err_code ndr_push_srvsvc_NETRDFSDELETELOCALPARTITION(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSDELETELOCALPARTITION *r)
19767 if (flags & NDR_IN) {
19769 if (flags & NDR_OUT) {
19770 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19772 return NDR_ERR_SUCCESS;
19775 static enum ndr_err_code ndr_pull_srvsvc_NETRDFSDELETELOCALPARTITION(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSDELETELOCALPARTITION *r)
19777 if (flags & NDR_IN) {
19779 if (flags & NDR_OUT) {
19780 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19782 return NDR_ERR_SUCCESS;
19785 _PUBLIC_ void ndr_print_srvsvc_NETRDFSDELETELOCALPARTITION(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSDELETELOCALPARTITION *r)
19787 ndr_print_struct(ndr, name, "srvsvc_NETRDFSDELETELOCALPARTITION");
19788 ndr->depth++;
19789 if (flags & NDR_SET_VALUES) {
19790 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19792 if (flags & NDR_IN) {
19793 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSDELETELOCALPARTITION");
19794 ndr->depth++;
19795 ndr->depth--;
19797 if (flags & NDR_OUT) {
19798 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSDELETELOCALPARTITION");
19799 ndr->depth++;
19800 ndr_print_WERROR(ndr, "result", r->out.result);
19801 ndr->depth--;
19803 ndr->depth--;
19806 static enum ndr_err_code ndr_push_srvsvc_NETRDFSSETLOCALVOLUMESTATE(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSSETLOCALVOLUMESTATE *r)
19808 if (flags & NDR_IN) {
19810 if (flags & NDR_OUT) {
19811 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19813 return NDR_ERR_SUCCESS;
19816 static enum ndr_err_code ndr_pull_srvsvc_NETRDFSSETLOCALVOLUMESTATE(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSSETLOCALVOLUMESTATE *r)
19818 if (flags & NDR_IN) {
19820 if (flags & NDR_OUT) {
19821 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19823 return NDR_ERR_SUCCESS;
19826 _PUBLIC_ void ndr_print_srvsvc_NETRDFSSETLOCALVOLUMESTATE(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSSETLOCALVOLUMESTATE *r)
19828 ndr_print_struct(ndr, name, "srvsvc_NETRDFSSETLOCALVOLUMESTATE");
19829 ndr->depth++;
19830 if (flags & NDR_SET_VALUES) {
19831 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19833 if (flags & NDR_IN) {
19834 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSSETLOCALVOLUMESTATE");
19835 ndr->depth++;
19836 ndr->depth--;
19838 if (flags & NDR_OUT) {
19839 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSSETLOCALVOLUMESTATE");
19840 ndr->depth++;
19841 ndr_print_WERROR(ndr, "result", r->out.result);
19842 ndr->depth--;
19844 ndr->depth--;
19847 static enum ndr_err_code ndr_push_srvsvc_NETRDFSSETSERVERINFO(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSSETSERVERINFO *r)
19849 if (flags & NDR_IN) {
19851 if (flags & NDR_OUT) {
19852 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19854 return NDR_ERR_SUCCESS;
19857 static enum ndr_err_code ndr_pull_srvsvc_NETRDFSSETSERVERINFO(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSSETSERVERINFO *r)
19859 if (flags & NDR_IN) {
19861 if (flags & NDR_OUT) {
19862 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19864 return NDR_ERR_SUCCESS;
19867 _PUBLIC_ void ndr_print_srvsvc_NETRDFSSETSERVERINFO(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSSETSERVERINFO *r)
19869 ndr_print_struct(ndr, name, "srvsvc_NETRDFSSETSERVERINFO");
19870 ndr->depth++;
19871 if (flags & NDR_SET_VALUES) {
19872 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19874 if (flags & NDR_IN) {
19875 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSSETSERVERINFO");
19876 ndr->depth++;
19877 ndr->depth--;
19879 if (flags & NDR_OUT) {
19880 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSSETSERVERINFO");
19881 ndr->depth++;
19882 ndr_print_WERROR(ndr, "result", r->out.result);
19883 ndr->depth--;
19885 ndr->depth--;
19888 static enum ndr_err_code ndr_push_srvsvc_NETRDFSCREATEEXITPOINT(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSCREATEEXITPOINT *r)
19890 if (flags & NDR_IN) {
19892 if (flags & NDR_OUT) {
19893 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19895 return NDR_ERR_SUCCESS;
19898 static enum ndr_err_code ndr_pull_srvsvc_NETRDFSCREATEEXITPOINT(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSCREATEEXITPOINT *r)
19900 if (flags & NDR_IN) {
19902 if (flags & NDR_OUT) {
19903 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19905 return NDR_ERR_SUCCESS;
19908 _PUBLIC_ void ndr_print_srvsvc_NETRDFSCREATEEXITPOINT(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSCREATEEXITPOINT *r)
19910 ndr_print_struct(ndr, name, "srvsvc_NETRDFSCREATEEXITPOINT");
19911 ndr->depth++;
19912 if (flags & NDR_SET_VALUES) {
19913 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19915 if (flags & NDR_IN) {
19916 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSCREATEEXITPOINT");
19917 ndr->depth++;
19918 ndr->depth--;
19920 if (flags & NDR_OUT) {
19921 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSCREATEEXITPOINT");
19922 ndr->depth++;
19923 ndr_print_WERROR(ndr, "result", r->out.result);
19924 ndr->depth--;
19926 ndr->depth--;
19929 static enum ndr_err_code ndr_push_srvsvc_NETRDFSDELETEEXITPOINT(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSDELETEEXITPOINT *r)
19931 if (flags & NDR_IN) {
19933 if (flags & NDR_OUT) {
19934 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19936 return NDR_ERR_SUCCESS;
19939 static enum ndr_err_code ndr_pull_srvsvc_NETRDFSDELETEEXITPOINT(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSDELETEEXITPOINT *r)
19941 if (flags & NDR_IN) {
19943 if (flags & NDR_OUT) {
19944 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19946 return NDR_ERR_SUCCESS;
19949 _PUBLIC_ void ndr_print_srvsvc_NETRDFSDELETEEXITPOINT(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSDELETEEXITPOINT *r)
19951 ndr_print_struct(ndr, name, "srvsvc_NETRDFSDELETEEXITPOINT");
19952 ndr->depth++;
19953 if (flags & NDR_SET_VALUES) {
19954 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19956 if (flags & NDR_IN) {
19957 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSDELETEEXITPOINT");
19958 ndr->depth++;
19959 ndr->depth--;
19961 if (flags & NDR_OUT) {
19962 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSDELETEEXITPOINT");
19963 ndr->depth++;
19964 ndr_print_WERROR(ndr, "result", r->out.result);
19965 ndr->depth--;
19967 ndr->depth--;
19970 static enum ndr_err_code ndr_push_srvsvc_NETRDFSMODIFYPREFIX(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSMODIFYPREFIX *r)
19972 if (flags & NDR_IN) {
19974 if (flags & NDR_OUT) {
19975 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19977 return NDR_ERR_SUCCESS;
19980 static enum ndr_err_code ndr_pull_srvsvc_NETRDFSMODIFYPREFIX(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSMODIFYPREFIX *r)
19982 if (flags & NDR_IN) {
19984 if (flags & NDR_OUT) {
19985 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19987 return NDR_ERR_SUCCESS;
19990 _PUBLIC_ void ndr_print_srvsvc_NETRDFSMODIFYPREFIX(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSMODIFYPREFIX *r)
19992 ndr_print_struct(ndr, name, "srvsvc_NETRDFSMODIFYPREFIX");
19993 ndr->depth++;
19994 if (flags & NDR_SET_VALUES) {
19995 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19997 if (flags & NDR_IN) {
19998 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSMODIFYPREFIX");
19999 ndr->depth++;
20000 ndr->depth--;
20002 if (flags & NDR_OUT) {
20003 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSMODIFYPREFIX");
20004 ndr->depth++;
20005 ndr_print_WERROR(ndr, "result", r->out.result);
20006 ndr->depth--;
20008 ndr->depth--;
20011 static enum ndr_err_code ndr_push_srvsvc_NETRDFSFIXLOCALVOLUME(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSFIXLOCALVOLUME *r)
20013 if (flags & NDR_IN) {
20015 if (flags & NDR_OUT) {
20016 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
20018 return NDR_ERR_SUCCESS;
20021 static enum ndr_err_code ndr_pull_srvsvc_NETRDFSFIXLOCALVOLUME(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSFIXLOCALVOLUME *r)
20023 if (flags & NDR_IN) {
20025 if (flags & NDR_OUT) {
20026 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
20028 return NDR_ERR_SUCCESS;
20031 _PUBLIC_ void ndr_print_srvsvc_NETRDFSFIXLOCALVOLUME(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSFIXLOCALVOLUME *r)
20033 ndr_print_struct(ndr, name, "srvsvc_NETRDFSFIXLOCALVOLUME");
20034 ndr->depth++;
20035 if (flags & NDR_SET_VALUES) {
20036 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
20038 if (flags & NDR_IN) {
20039 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSFIXLOCALVOLUME");
20040 ndr->depth++;
20041 ndr->depth--;
20043 if (flags & NDR_OUT) {
20044 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSFIXLOCALVOLUME");
20045 ndr->depth++;
20046 ndr_print_WERROR(ndr, "result", r->out.result);
20047 ndr->depth--;
20049 ndr->depth--;
20052 static enum ndr_err_code ndr_push_srvsvc_NETRDFSMANAGERREPORTSITEINFO(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSMANAGERREPORTSITEINFO *r)
20054 if (flags & NDR_IN) {
20056 if (flags & NDR_OUT) {
20057 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
20059 return NDR_ERR_SUCCESS;
20062 static enum ndr_err_code ndr_pull_srvsvc_NETRDFSMANAGERREPORTSITEINFO(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSMANAGERREPORTSITEINFO *r)
20064 if (flags & NDR_IN) {
20066 if (flags & NDR_OUT) {
20067 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
20069 return NDR_ERR_SUCCESS;
20072 _PUBLIC_ void ndr_print_srvsvc_NETRDFSMANAGERREPORTSITEINFO(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSMANAGERREPORTSITEINFO *r)
20074 ndr_print_struct(ndr, name, "srvsvc_NETRDFSMANAGERREPORTSITEINFO");
20075 ndr->depth++;
20076 if (flags & NDR_SET_VALUES) {
20077 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
20079 if (flags & NDR_IN) {
20080 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSMANAGERREPORTSITEINFO");
20081 ndr->depth++;
20082 ndr->depth--;
20084 if (flags & NDR_OUT) {
20085 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSMANAGERREPORTSITEINFO");
20086 ndr->depth++;
20087 ndr_print_WERROR(ndr, "result", r->out.result);
20088 ndr->depth--;
20090 ndr->depth--;
20093 static enum ndr_err_code ndr_push_srvsvc_NETRSERVERTRANSPORTDELEX(struct ndr_push *ndr, int flags, const struct srvsvc_NETRSERVERTRANSPORTDELEX *r)
20095 if (flags & NDR_IN) {
20097 if (flags & NDR_OUT) {
20098 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
20100 return NDR_ERR_SUCCESS;
20103 static enum ndr_err_code ndr_pull_srvsvc_NETRSERVERTRANSPORTDELEX(struct ndr_pull *ndr, int flags, struct srvsvc_NETRSERVERTRANSPORTDELEX *r)
20105 if (flags & NDR_IN) {
20107 if (flags & NDR_OUT) {
20108 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
20110 return NDR_ERR_SUCCESS;
20113 _PUBLIC_ void ndr_print_srvsvc_NETRSERVERTRANSPORTDELEX(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRSERVERTRANSPORTDELEX *r)
20115 ndr_print_struct(ndr, name, "srvsvc_NETRSERVERTRANSPORTDELEX");
20116 ndr->depth++;
20117 if (flags & NDR_SET_VALUES) {
20118 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
20120 if (flags & NDR_IN) {
20121 ndr_print_struct(ndr, "in", "srvsvc_NETRSERVERTRANSPORTDELEX");
20122 ndr->depth++;
20123 ndr->depth--;
20125 if (flags & NDR_OUT) {
20126 ndr_print_struct(ndr, "out", "srvsvc_NETRSERVERTRANSPORTDELEX");
20127 ndr->depth++;
20128 ndr_print_WERROR(ndr, "result", r->out.result);
20129 ndr->depth--;
20131 ndr->depth--;
20134 static const struct ndr_interface_call srvsvc_calls[] = {
20136 "srvsvc_NetCharDevEnum",
20137 sizeof(struct srvsvc_NetCharDevEnum),
20138 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevEnum,
20139 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevEnum,
20140 (ndr_print_function_t) ndr_print_srvsvc_NetCharDevEnum,
20141 false,
20144 "srvsvc_NetCharDevGetInfo",
20145 sizeof(struct srvsvc_NetCharDevGetInfo),
20146 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevGetInfo,
20147 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevGetInfo,
20148 (ndr_print_function_t) ndr_print_srvsvc_NetCharDevGetInfo,
20149 false,
20152 "srvsvc_NetCharDevControl",
20153 sizeof(struct srvsvc_NetCharDevControl),
20154 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevControl,
20155 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevControl,
20156 (ndr_print_function_t) ndr_print_srvsvc_NetCharDevControl,
20157 false,
20160 "srvsvc_NetCharDevQEnum",
20161 sizeof(struct srvsvc_NetCharDevQEnum),
20162 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevQEnum,
20163 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevQEnum,
20164 (ndr_print_function_t) ndr_print_srvsvc_NetCharDevQEnum,
20165 false,
20168 "srvsvc_NetCharDevQGetInfo",
20169 sizeof(struct srvsvc_NetCharDevQGetInfo),
20170 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevQGetInfo,
20171 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevQGetInfo,
20172 (ndr_print_function_t) ndr_print_srvsvc_NetCharDevQGetInfo,
20173 false,
20176 "srvsvc_NetCharDevQSetInfo",
20177 sizeof(struct srvsvc_NetCharDevQSetInfo),
20178 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevQSetInfo,
20179 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevQSetInfo,
20180 (ndr_print_function_t) ndr_print_srvsvc_NetCharDevQSetInfo,
20181 false,
20184 "srvsvc_NetCharDevQPurge",
20185 sizeof(struct srvsvc_NetCharDevQPurge),
20186 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevQPurge,
20187 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevQPurge,
20188 (ndr_print_function_t) ndr_print_srvsvc_NetCharDevQPurge,
20189 false,
20192 "srvsvc_NetCharDevQPurgeSelf",
20193 sizeof(struct srvsvc_NetCharDevQPurgeSelf),
20194 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevQPurgeSelf,
20195 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevQPurgeSelf,
20196 (ndr_print_function_t) ndr_print_srvsvc_NetCharDevQPurgeSelf,
20197 false,
20200 "srvsvc_NetConnEnum",
20201 sizeof(struct srvsvc_NetConnEnum),
20202 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetConnEnum,
20203 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetConnEnum,
20204 (ndr_print_function_t) ndr_print_srvsvc_NetConnEnum,
20205 false,
20208 "srvsvc_NetFileEnum",
20209 sizeof(struct srvsvc_NetFileEnum),
20210 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetFileEnum,
20211 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetFileEnum,
20212 (ndr_print_function_t) ndr_print_srvsvc_NetFileEnum,
20213 false,
20216 "srvsvc_NetFileGetInfo",
20217 sizeof(struct srvsvc_NetFileGetInfo),
20218 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetFileGetInfo,
20219 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetFileGetInfo,
20220 (ndr_print_function_t) ndr_print_srvsvc_NetFileGetInfo,
20221 false,
20224 "srvsvc_NetFileClose",
20225 sizeof(struct srvsvc_NetFileClose),
20226 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetFileClose,
20227 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetFileClose,
20228 (ndr_print_function_t) ndr_print_srvsvc_NetFileClose,
20229 false,
20232 "srvsvc_NetSessEnum",
20233 sizeof(struct srvsvc_NetSessEnum),
20234 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetSessEnum,
20235 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetSessEnum,
20236 (ndr_print_function_t) ndr_print_srvsvc_NetSessEnum,
20237 false,
20240 "srvsvc_NetSessDel",
20241 sizeof(struct srvsvc_NetSessDel),
20242 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetSessDel,
20243 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetSessDel,
20244 (ndr_print_function_t) ndr_print_srvsvc_NetSessDel,
20245 false,
20248 "srvsvc_NetShareAdd",
20249 sizeof(struct srvsvc_NetShareAdd),
20250 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareAdd,
20251 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareAdd,
20252 (ndr_print_function_t) ndr_print_srvsvc_NetShareAdd,
20253 false,
20256 "srvsvc_NetShareEnumAll",
20257 sizeof(struct srvsvc_NetShareEnumAll),
20258 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareEnumAll,
20259 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareEnumAll,
20260 (ndr_print_function_t) ndr_print_srvsvc_NetShareEnumAll,
20261 false,
20264 "srvsvc_NetShareGetInfo",
20265 sizeof(struct srvsvc_NetShareGetInfo),
20266 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareGetInfo,
20267 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareGetInfo,
20268 (ndr_print_function_t) ndr_print_srvsvc_NetShareGetInfo,
20269 false,
20272 "srvsvc_NetShareSetInfo",
20273 sizeof(struct srvsvc_NetShareSetInfo),
20274 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareSetInfo,
20275 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareSetInfo,
20276 (ndr_print_function_t) ndr_print_srvsvc_NetShareSetInfo,
20277 false,
20280 "srvsvc_NetShareDel",
20281 sizeof(struct srvsvc_NetShareDel),
20282 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareDel,
20283 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareDel,
20284 (ndr_print_function_t) ndr_print_srvsvc_NetShareDel,
20285 false,
20288 "srvsvc_NetShareDelSticky",
20289 sizeof(struct srvsvc_NetShareDelSticky),
20290 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareDelSticky,
20291 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareDelSticky,
20292 (ndr_print_function_t) ndr_print_srvsvc_NetShareDelSticky,
20293 false,
20296 "srvsvc_NetShareCheck",
20297 sizeof(struct srvsvc_NetShareCheck),
20298 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareCheck,
20299 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareCheck,
20300 (ndr_print_function_t) ndr_print_srvsvc_NetShareCheck,
20301 false,
20304 "srvsvc_NetSrvGetInfo",
20305 sizeof(struct srvsvc_NetSrvGetInfo),
20306 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetSrvGetInfo,
20307 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetSrvGetInfo,
20308 (ndr_print_function_t) ndr_print_srvsvc_NetSrvGetInfo,
20309 false,
20312 "srvsvc_NetSrvSetInfo",
20313 sizeof(struct srvsvc_NetSrvSetInfo),
20314 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetSrvSetInfo,
20315 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetSrvSetInfo,
20316 (ndr_print_function_t) ndr_print_srvsvc_NetSrvSetInfo,
20317 false,
20320 "srvsvc_NetDiskEnum",
20321 sizeof(struct srvsvc_NetDiskEnum),
20322 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetDiskEnum,
20323 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetDiskEnum,
20324 (ndr_print_function_t) ndr_print_srvsvc_NetDiskEnum,
20325 false,
20328 "srvsvc_NetServerStatisticsGet",
20329 sizeof(struct srvsvc_NetServerStatisticsGet),
20330 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetServerStatisticsGet,
20331 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetServerStatisticsGet,
20332 (ndr_print_function_t) ndr_print_srvsvc_NetServerStatisticsGet,
20333 false,
20336 "srvsvc_NetTransportAdd",
20337 sizeof(struct srvsvc_NetTransportAdd),
20338 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetTransportAdd,
20339 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetTransportAdd,
20340 (ndr_print_function_t) ndr_print_srvsvc_NetTransportAdd,
20341 false,
20344 "srvsvc_NetTransportEnum",
20345 sizeof(struct srvsvc_NetTransportEnum),
20346 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetTransportEnum,
20347 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetTransportEnum,
20348 (ndr_print_function_t) ndr_print_srvsvc_NetTransportEnum,
20349 false,
20352 "srvsvc_NetTransportDel",
20353 sizeof(struct srvsvc_NetTransportDel),
20354 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetTransportDel,
20355 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetTransportDel,
20356 (ndr_print_function_t) ndr_print_srvsvc_NetTransportDel,
20357 false,
20360 "srvsvc_NetRemoteTOD",
20361 sizeof(struct srvsvc_NetRemoteTOD),
20362 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetRemoteTOD,
20363 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetRemoteTOD,
20364 (ndr_print_function_t) ndr_print_srvsvc_NetRemoteTOD,
20365 false,
20368 "srvsvc_NetSetServiceBits",
20369 sizeof(struct srvsvc_NetSetServiceBits),
20370 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetSetServiceBits,
20371 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetSetServiceBits,
20372 (ndr_print_function_t) ndr_print_srvsvc_NetSetServiceBits,
20373 false,
20376 "srvsvc_NetPathType",
20377 sizeof(struct srvsvc_NetPathType),
20378 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetPathType,
20379 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetPathType,
20380 (ndr_print_function_t) ndr_print_srvsvc_NetPathType,
20381 false,
20384 "srvsvc_NetPathCanonicalize",
20385 sizeof(struct srvsvc_NetPathCanonicalize),
20386 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetPathCanonicalize,
20387 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetPathCanonicalize,
20388 (ndr_print_function_t) ndr_print_srvsvc_NetPathCanonicalize,
20389 false,
20392 "srvsvc_NetPathCompare",
20393 sizeof(struct srvsvc_NetPathCompare),
20394 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetPathCompare,
20395 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetPathCompare,
20396 (ndr_print_function_t) ndr_print_srvsvc_NetPathCompare,
20397 false,
20400 "srvsvc_NetNameValidate",
20401 sizeof(struct srvsvc_NetNameValidate),
20402 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetNameValidate,
20403 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetNameValidate,
20404 (ndr_print_function_t) ndr_print_srvsvc_NetNameValidate,
20405 false,
20408 "srvsvc_NETRPRNAMECANONICALIZE",
20409 sizeof(struct srvsvc_NETRPRNAMECANONICALIZE),
20410 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRPRNAMECANONICALIZE,
20411 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRPRNAMECANONICALIZE,
20412 (ndr_print_function_t) ndr_print_srvsvc_NETRPRNAMECANONICALIZE,
20413 false,
20416 "srvsvc_NetPRNameCompare",
20417 sizeof(struct srvsvc_NetPRNameCompare),
20418 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetPRNameCompare,
20419 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetPRNameCompare,
20420 (ndr_print_function_t) ndr_print_srvsvc_NetPRNameCompare,
20421 false,
20424 "srvsvc_NetShareEnum",
20425 sizeof(struct srvsvc_NetShareEnum),
20426 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareEnum,
20427 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareEnum,
20428 (ndr_print_function_t) ndr_print_srvsvc_NetShareEnum,
20429 false,
20432 "srvsvc_NetShareDelStart",
20433 sizeof(struct srvsvc_NetShareDelStart),
20434 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareDelStart,
20435 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareDelStart,
20436 (ndr_print_function_t) ndr_print_srvsvc_NetShareDelStart,
20437 false,
20440 "srvsvc_NetShareDelCommit",
20441 sizeof(struct srvsvc_NetShareDelCommit),
20442 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareDelCommit,
20443 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareDelCommit,
20444 (ndr_print_function_t) ndr_print_srvsvc_NetShareDelCommit,
20445 false,
20448 "srvsvc_NetGetFileSecurity",
20449 sizeof(struct srvsvc_NetGetFileSecurity),
20450 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetGetFileSecurity,
20451 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetGetFileSecurity,
20452 (ndr_print_function_t) ndr_print_srvsvc_NetGetFileSecurity,
20453 false,
20456 "srvsvc_NetSetFileSecurity",
20457 sizeof(struct srvsvc_NetSetFileSecurity),
20458 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetSetFileSecurity,
20459 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetSetFileSecurity,
20460 (ndr_print_function_t) ndr_print_srvsvc_NetSetFileSecurity,
20461 false,
20464 "srvsvc_NetServerTransportAddEx",
20465 sizeof(struct srvsvc_NetServerTransportAddEx),
20466 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetServerTransportAddEx,
20467 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetServerTransportAddEx,
20468 (ndr_print_function_t) ndr_print_srvsvc_NetServerTransportAddEx,
20469 false,
20472 "srvsvc_NetServerSetServiceBitsEx",
20473 sizeof(struct srvsvc_NetServerSetServiceBitsEx),
20474 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetServerSetServiceBitsEx,
20475 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetServerSetServiceBitsEx,
20476 (ndr_print_function_t) ndr_print_srvsvc_NetServerSetServiceBitsEx,
20477 false,
20480 "srvsvc_NETRDFSGETVERSION",
20481 sizeof(struct srvsvc_NETRDFSGETVERSION),
20482 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSGETVERSION,
20483 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSGETVERSION,
20484 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSGETVERSION,
20485 false,
20488 "srvsvc_NETRDFSCREATELOCALPARTITION",
20489 sizeof(struct srvsvc_NETRDFSCREATELOCALPARTITION),
20490 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSCREATELOCALPARTITION,
20491 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSCREATELOCALPARTITION,
20492 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSCREATELOCALPARTITION,
20493 false,
20496 "srvsvc_NETRDFSDELETELOCALPARTITION",
20497 sizeof(struct srvsvc_NETRDFSDELETELOCALPARTITION),
20498 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSDELETELOCALPARTITION,
20499 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSDELETELOCALPARTITION,
20500 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSDELETELOCALPARTITION,
20501 false,
20504 "srvsvc_NETRDFSSETLOCALVOLUMESTATE",
20505 sizeof(struct srvsvc_NETRDFSSETLOCALVOLUMESTATE),
20506 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSSETLOCALVOLUMESTATE,
20507 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSSETLOCALVOLUMESTATE,
20508 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSSETLOCALVOLUMESTATE,
20509 false,
20512 "srvsvc_NETRDFSSETSERVERINFO",
20513 sizeof(struct srvsvc_NETRDFSSETSERVERINFO),
20514 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSSETSERVERINFO,
20515 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSSETSERVERINFO,
20516 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSSETSERVERINFO,
20517 false,
20520 "srvsvc_NETRDFSCREATEEXITPOINT",
20521 sizeof(struct srvsvc_NETRDFSCREATEEXITPOINT),
20522 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSCREATEEXITPOINT,
20523 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSCREATEEXITPOINT,
20524 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSCREATEEXITPOINT,
20525 false,
20528 "srvsvc_NETRDFSDELETEEXITPOINT",
20529 sizeof(struct srvsvc_NETRDFSDELETEEXITPOINT),
20530 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSDELETEEXITPOINT,
20531 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSDELETEEXITPOINT,
20532 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSDELETEEXITPOINT,
20533 false,
20536 "srvsvc_NETRDFSMODIFYPREFIX",
20537 sizeof(struct srvsvc_NETRDFSMODIFYPREFIX),
20538 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSMODIFYPREFIX,
20539 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSMODIFYPREFIX,
20540 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSMODIFYPREFIX,
20541 false,
20544 "srvsvc_NETRDFSFIXLOCALVOLUME",
20545 sizeof(struct srvsvc_NETRDFSFIXLOCALVOLUME),
20546 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSFIXLOCALVOLUME,
20547 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSFIXLOCALVOLUME,
20548 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSFIXLOCALVOLUME,
20549 false,
20552 "srvsvc_NETRDFSMANAGERREPORTSITEINFO",
20553 sizeof(struct srvsvc_NETRDFSMANAGERREPORTSITEINFO),
20554 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSMANAGERREPORTSITEINFO,
20555 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSMANAGERREPORTSITEINFO,
20556 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSMANAGERREPORTSITEINFO,
20557 false,
20560 "srvsvc_NETRSERVERTRANSPORTDELEX",
20561 sizeof(struct srvsvc_NETRSERVERTRANSPORTDELEX),
20562 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRSERVERTRANSPORTDELEX,
20563 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRSERVERTRANSPORTDELEX,
20564 (ndr_print_function_t) ndr_print_srvsvc_NETRSERVERTRANSPORTDELEX,
20565 false,
20567 { NULL, 0, NULL, NULL, NULL, false }
20570 static const char * const srvsvc_endpoint_strings[] = {
20571 "ncacn_np:[\\pipe\\srvsvc]",
20572 "ncacn_ip_tcp:",
20573 "ncalrpc:",
20576 static const struct ndr_interface_string_array srvsvc_endpoints = {
20577 .count = 3,
20578 .names = srvsvc_endpoint_strings
20581 static const char * const srvsvc_authservice_strings[] = {
20582 "host",
20585 static const struct ndr_interface_string_array srvsvc_authservices = {
20586 .count = 1,
20587 .names = srvsvc_authservice_strings
20591 const struct ndr_interface_table ndr_table_srvsvc = {
20592 .name = "srvsvc",
20593 .syntax_id = {
20594 {0x4b324fc8,0x1670,0x01d3,{0x12,0x78},{0x5a,0x47,0xbf,0x6e,0xe1,0x88}},
20595 NDR_SRVSVC_VERSION
20597 .helpstring = NDR_SRVSVC_HELPSTRING,
20598 .num_calls = 54,
20599 .calls = srvsvc_calls,
20600 .endpoints = &srvsvc_endpoints,
20601 .authservices = &srvsvc_authservices