s3: Remove the typedef for "auth_serversupplied_info"
[Samba/nascimento.git] / librpc / gen_ndr / ndr_srvsvc.c
blob740f61082193c2d71ade58aaa4b3aa7a5a34166f
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 TALLOC_CTX *_mem_save_device_0;
30 if (ndr_flags & NDR_SCALARS) {
31 NDR_CHECK(ndr_pull_align(ndr, 5));
32 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_device));
33 if (_ptr_device) {
34 NDR_PULL_ALLOC(ndr, r->device);
35 } else {
36 r->device = NULL;
38 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
40 if (ndr_flags & NDR_BUFFERS) {
41 if (r->device) {
42 _mem_save_device_0 = NDR_PULL_GET_MEM_CTX(ndr);
43 NDR_PULL_SET_MEM_CTX(ndr, r->device, 0);
44 NDR_CHECK(ndr_pull_array_size(ndr, &r->device));
45 NDR_CHECK(ndr_pull_array_length(ndr, &r->device));
46 if (ndr_get_array_length(ndr, &r->device) > ndr_get_array_size(ndr, &r->device)) {
47 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->device), ndr_get_array_length(ndr, &r->device));
49 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->device), sizeof(uint16_t)));
50 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->device, ndr_get_array_length(ndr, &r->device), sizeof(uint16_t), CH_UTF16));
51 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_device_0, 0);
54 return NDR_ERR_SUCCESS;
57 _PUBLIC_ void ndr_print_srvsvc_NetCharDevInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevInfo0 *r)
59 ndr_print_struct(ndr, name, "srvsvc_NetCharDevInfo0");
60 ndr->depth++;
61 ndr_print_ptr(ndr, "device", r->device);
62 ndr->depth++;
63 if (r->device) {
64 ndr_print_string(ndr, "device", r->device);
66 ndr->depth--;
67 ndr->depth--;
70 static enum ndr_err_code ndr_push_srvsvc_NetCharDevCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevCtr0 *r)
72 uint32_t cntr_array_1;
73 if (ndr_flags & NDR_SCALARS) {
74 NDR_CHECK(ndr_push_align(ndr, 5));
75 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
76 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
77 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
79 if (ndr_flags & NDR_BUFFERS) {
80 if (r->array) {
81 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
82 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
83 NDR_CHECK(ndr_push_srvsvc_NetCharDevInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
85 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
86 NDR_CHECK(ndr_push_srvsvc_NetCharDevInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
90 return NDR_ERR_SUCCESS;
93 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevCtr0 *r)
95 uint32_t _ptr_array;
96 uint32_t cntr_array_1;
97 TALLOC_CTX *_mem_save_array_0;
98 TALLOC_CTX *_mem_save_array_1;
99 if (ndr_flags & NDR_SCALARS) {
100 NDR_CHECK(ndr_pull_align(ndr, 5));
101 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
102 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
103 if (_ptr_array) {
104 NDR_PULL_ALLOC(ndr, r->array);
105 } else {
106 r->array = NULL;
108 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
110 if (ndr_flags & NDR_BUFFERS) {
111 if (r->array) {
112 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
113 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
114 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
115 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
116 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
117 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
118 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
119 NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
121 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
122 NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
124 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
125 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
127 if (r->array) {
128 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
131 return NDR_ERR_SUCCESS;
134 _PUBLIC_ void ndr_print_srvsvc_NetCharDevCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevCtr0 *r)
136 uint32_t cntr_array_1;
137 ndr_print_struct(ndr, name, "srvsvc_NetCharDevCtr0");
138 ndr->depth++;
139 ndr_print_uint32(ndr, "count", r->count);
140 ndr_print_ptr(ndr, "array", r->array);
141 ndr->depth++;
142 if (r->array) {
143 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
144 ndr->depth++;
145 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
146 char *idx_1=NULL;
147 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
148 ndr_print_srvsvc_NetCharDevInfo0(ndr, "array", &r->array[cntr_array_1]);
149 free(idx_1);
152 ndr->depth--;
154 ndr->depth--;
155 ndr->depth--;
158 static enum ndr_err_code ndr_push_srvsvc_NetCharDevInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevInfo1 *r)
160 if (ndr_flags & NDR_SCALARS) {
161 NDR_CHECK(ndr_push_align(ndr, 5));
162 NDR_CHECK(ndr_push_unique_ptr(ndr, r->device));
163 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->status));
164 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
165 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
166 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
168 if (ndr_flags & NDR_BUFFERS) {
169 if (r->device) {
170 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
171 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
172 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
173 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->device, ndr_charset_length(r->device, CH_UTF16), sizeof(uint16_t), CH_UTF16));
175 if (r->user) {
176 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, 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->user, CH_UTF16)));
179 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
182 return NDR_ERR_SUCCESS;
185 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevInfo1 *r)
187 uint32_t _ptr_device;
188 TALLOC_CTX *_mem_save_device_0;
189 uint32_t _ptr_user;
190 TALLOC_CTX *_mem_save_user_0;
191 if (ndr_flags & NDR_SCALARS) {
192 NDR_CHECK(ndr_pull_align(ndr, 5));
193 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_device));
194 if (_ptr_device) {
195 NDR_PULL_ALLOC(ndr, r->device);
196 } else {
197 r->device = NULL;
199 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->status));
200 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
201 if (_ptr_user) {
202 NDR_PULL_ALLOC(ndr, r->user);
203 } else {
204 r->user = NULL;
206 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
207 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
209 if (ndr_flags & NDR_BUFFERS) {
210 if (r->device) {
211 _mem_save_device_0 = NDR_PULL_GET_MEM_CTX(ndr);
212 NDR_PULL_SET_MEM_CTX(ndr, r->device, 0);
213 NDR_CHECK(ndr_pull_array_size(ndr, &r->device));
214 NDR_CHECK(ndr_pull_array_length(ndr, &r->device));
215 if (ndr_get_array_length(ndr, &r->device) > ndr_get_array_size(ndr, &r->device)) {
216 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->device), ndr_get_array_length(ndr, &r->device));
218 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->device), sizeof(uint16_t)));
219 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->device, ndr_get_array_length(ndr, &r->device), sizeof(uint16_t), CH_UTF16));
220 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_device_0, 0);
222 if (r->user) {
223 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
224 NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
225 NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
226 NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
227 if (ndr_get_array_length(ndr, &r->user) > ndr_get_array_size(ndr, &r->user)) {
228 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->user), ndr_get_array_length(ndr, &r->user));
230 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t)));
231 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t), CH_UTF16));
232 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
235 return NDR_ERR_SUCCESS;
238 _PUBLIC_ void ndr_print_srvsvc_NetCharDevInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevInfo1 *r)
240 ndr_print_struct(ndr, name, "srvsvc_NetCharDevInfo1");
241 ndr->depth++;
242 ndr_print_ptr(ndr, "device", r->device);
243 ndr->depth++;
244 if (r->device) {
245 ndr_print_string(ndr, "device", r->device);
247 ndr->depth--;
248 ndr_print_uint32(ndr, "status", r->status);
249 ndr_print_ptr(ndr, "user", r->user);
250 ndr->depth++;
251 if (r->user) {
252 ndr_print_string(ndr, "user", r->user);
254 ndr->depth--;
255 ndr_print_uint32(ndr, "time", r->time);
256 ndr->depth--;
259 static enum ndr_err_code ndr_push_srvsvc_NetCharDevCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevCtr1 *r)
261 uint32_t cntr_array_1;
262 if (ndr_flags & NDR_SCALARS) {
263 NDR_CHECK(ndr_push_align(ndr, 5));
264 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
265 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
266 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
268 if (ndr_flags & NDR_BUFFERS) {
269 if (r->array) {
270 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
271 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
272 NDR_CHECK(ndr_push_srvsvc_NetCharDevInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
274 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
275 NDR_CHECK(ndr_push_srvsvc_NetCharDevInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
279 return NDR_ERR_SUCCESS;
282 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevCtr1 *r)
284 uint32_t _ptr_array;
285 uint32_t cntr_array_1;
286 TALLOC_CTX *_mem_save_array_0;
287 TALLOC_CTX *_mem_save_array_1;
288 if (ndr_flags & NDR_SCALARS) {
289 NDR_CHECK(ndr_pull_align(ndr, 5));
290 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
291 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
292 if (_ptr_array) {
293 NDR_PULL_ALLOC(ndr, r->array);
294 } else {
295 r->array = NULL;
297 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
299 if (ndr_flags & NDR_BUFFERS) {
300 if (r->array) {
301 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
302 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
303 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
304 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
305 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
306 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
307 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
308 NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
310 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
311 NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
313 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
314 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
316 if (r->array) {
317 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
320 return NDR_ERR_SUCCESS;
323 _PUBLIC_ void ndr_print_srvsvc_NetCharDevCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevCtr1 *r)
325 uint32_t cntr_array_1;
326 ndr_print_struct(ndr, name, "srvsvc_NetCharDevCtr1");
327 ndr->depth++;
328 ndr_print_uint32(ndr, "count", r->count);
329 ndr_print_ptr(ndr, "array", r->array);
330 ndr->depth++;
331 if (r->array) {
332 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
333 ndr->depth++;
334 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
335 char *idx_1=NULL;
336 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
337 ndr_print_srvsvc_NetCharDevInfo1(ndr, "array", &r->array[cntr_array_1]);
338 free(idx_1);
341 ndr->depth--;
343 ndr->depth--;
344 ndr->depth--;
347 static enum ndr_err_code ndr_push_srvsvc_NetCharDevInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetCharDevInfo *r)
349 if (ndr_flags & NDR_SCALARS) {
350 int level = ndr_push_get_switch_value(ndr, r);
351 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
352 NDR_CHECK(ndr_push_union_align(ndr, 5));
353 switch (level) {
354 case 0: {
355 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
356 break; }
358 case 1: {
359 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
360 break; }
362 default: {
363 break; }
367 if (ndr_flags & NDR_BUFFERS) {
368 int level = ndr_push_get_switch_value(ndr, r);
369 switch (level) {
370 case 0:
371 if (r->info0) {
372 NDR_CHECK(ndr_push_srvsvc_NetCharDevInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
374 break;
376 case 1:
377 if (r->info1) {
378 NDR_CHECK(ndr_push_srvsvc_NetCharDevInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
380 break;
382 default:
383 break;
387 return NDR_ERR_SUCCESS;
390 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetCharDevInfo *r)
392 int level;
393 uint32_t _level;
394 TALLOC_CTX *_mem_save_info0_0;
395 TALLOC_CTX *_mem_save_info1_0;
396 level = ndr_pull_get_switch_value(ndr, r);
397 if (ndr_flags & NDR_SCALARS) {
398 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
399 if (_level != level) {
400 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
402 NDR_CHECK(ndr_pull_union_align(ndr, 5));
403 switch (level) {
404 case 0: {
405 uint32_t _ptr_info0;
406 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
407 if (_ptr_info0) {
408 NDR_PULL_ALLOC(ndr, r->info0);
409 } else {
410 r->info0 = NULL;
412 break; }
414 case 1: {
415 uint32_t _ptr_info1;
416 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
417 if (_ptr_info1) {
418 NDR_PULL_ALLOC(ndr, r->info1);
419 } else {
420 r->info1 = NULL;
422 break; }
424 default: {
425 break; }
429 if (ndr_flags & NDR_BUFFERS) {
430 switch (level) {
431 case 0:
432 if (r->info0) {
433 _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
434 NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
435 NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
436 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
438 break;
440 case 1:
441 if (r->info1) {
442 _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
443 NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
444 NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
445 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
447 break;
449 default:
450 break;
454 return NDR_ERR_SUCCESS;
457 _PUBLIC_ void ndr_print_srvsvc_NetCharDevInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetCharDevInfo *r)
459 int level;
460 level = ndr_print_get_switch_value(ndr, r);
461 ndr_print_union(ndr, name, level, "srvsvc_NetCharDevInfo");
462 switch (level) {
463 case 0:
464 ndr_print_ptr(ndr, "info0", r->info0);
465 ndr->depth++;
466 if (r->info0) {
467 ndr_print_srvsvc_NetCharDevInfo0(ndr, "info0", r->info0);
469 ndr->depth--;
470 break;
472 case 1:
473 ndr_print_ptr(ndr, "info1", r->info1);
474 ndr->depth++;
475 if (r->info1) {
476 ndr_print_srvsvc_NetCharDevInfo1(ndr, "info1", r->info1);
478 ndr->depth--;
479 break;
481 default:
482 break;
487 static enum ndr_err_code ndr_push_srvsvc_NetCharDevCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetCharDevCtr *r)
489 if (ndr_flags & NDR_SCALARS) {
490 int level = ndr_push_get_switch_value(ndr, r);
491 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
492 NDR_CHECK(ndr_push_union_align(ndr, 5));
493 switch (level) {
494 case 0: {
495 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0));
496 break; }
498 case 1: {
499 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
500 break; }
502 default: {
503 break; }
507 if (ndr_flags & NDR_BUFFERS) {
508 int level = ndr_push_get_switch_value(ndr, r);
509 switch (level) {
510 case 0:
511 if (r->ctr0) {
512 NDR_CHECK(ndr_push_srvsvc_NetCharDevCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
514 break;
516 case 1:
517 if (r->ctr1) {
518 NDR_CHECK(ndr_push_srvsvc_NetCharDevCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
520 break;
522 default:
523 break;
527 return NDR_ERR_SUCCESS;
530 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetCharDevCtr *r)
532 int level;
533 uint32_t _level;
534 TALLOC_CTX *_mem_save_ctr0_0;
535 TALLOC_CTX *_mem_save_ctr1_0;
536 level = ndr_pull_get_switch_value(ndr, r);
537 if (ndr_flags & NDR_SCALARS) {
538 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
539 if (_level != level) {
540 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
542 NDR_CHECK(ndr_pull_union_align(ndr, 5));
543 switch (level) {
544 case 0: {
545 uint32_t _ptr_ctr0;
546 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr0));
547 if (_ptr_ctr0) {
548 NDR_PULL_ALLOC(ndr, r->ctr0);
549 } else {
550 r->ctr0 = NULL;
552 break; }
554 case 1: {
555 uint32_t _ptr_ctr1;
556 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
557 if (_ptr_ctr1) {
558 NDR_PULL_ALLOC(ndr, r->ctr1);
559 } else {
560 r->ctr1 = NULL;
562 break; }
564 default: {
565 break; }
569 if (ndr_flags & NDR_BUFFERS) {
570 switch (level) {
571 case 0:
572 if (r->ctr0) {
573 _mem_save_ctr0_0 = NDR_PULL_GET_MEM_CTX(ndr);
574 NDR_PULL_SET_MEM_CTX(ndr, r->ctr0, 0);
575 NDR_CHECK(ndr_pull_srvsvc_NetCharDevCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
576 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr0_0, 0);
578 break;
580 case 1:
581 if (r->ctr1) {
582 _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
583 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
584 NDR_CHECK(ndr_pull_srvsvc_NetCharDevCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
585 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
587 break;
589 default:
590 break;
594 return NDR_ERR_SUCCESS;
597 _PUBLIC_ void ndr_print_srvsvc_NetCharDevCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetCharDevCtr *r)
599 int level;
600 level = ndr_print_get_switch_value(ndr, r);
601 ndr_print_union(ndr, name, level, "srvsvc_NetCharDevCtr");
602 switch (level) {
603 case 0:
604 ndr_print_ptr(ndr, "ctr0", r->ctr0);
605 ndr->depth++;
606 if (r->ctr0) {
607 ndr_print_srvsvc_NetCharDevCtr0(ndr, "ctr0", r->ctr0);
609 ndr->depth--;
610 break;
612 case 1:
613 ndr_print_ptr(ndr, "ctr1", r->ctr1);
614 ndr->depth++;
615 if (r->ctr1) {
616 ndr_print_srvsvc_NetCharDevCtr1(ndr, "ctr1", r->ctr1);
618 ndr->depth--;
619 break;
621 default:
622 break;
627 static enum ndr_err_code ndr_push_srvsvc_NetCharDevInfoCtr(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevInfoCtr *r)
629 if (ndr_flags & NDR_SCALARS) {
630 NDR_CHECK(ndr_push_align(ndr, 5));
631 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
632 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level));
633 NDR_CHECK(ndr_push_srvsvc_NetCharDevCtr(ndr, NDR_SCALARS, &r->ctr));
634 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
636 if (ndr_flags & NDR_BUFFERS) {
637 NDR_CHECK(ndr_push_srvsvc_NetCharDevCtr(ndr, NDR_BUFFERS, &r->ctr));
639 return NDR_ERR_SUCCESS;
642 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevInfoCtr(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevInfoCtr *r)
644 if (ndr_flags & NDR_SCALARS) {
645 NDR_CHECK(ndr_pull_align(ndr, 5));
646 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
647 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level));
648 NDR_CHECK(ndr_pull_srvsvc_NetCharDevCtr(ndr, NDR_SCALARS, &r->ctr));
649 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
651 if (ndr_flags & NDR_BUFFERS) {
652 NDR_CHECK(ndr_pull_srvsvc_NetCharDevCtr(ndr, NDR_BUFFERS, &r->ctr));
654 return NDR_ERR_SUCCESS;
657 _PUBLIC_ void ndr_print_srvsvc_NetCharDevInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevInfoCtr *r)
659 ndr_print_struct(ndr, name, "srvsvc_NetCharDevInfoCtr");
660 ndr->depth++;
661 ndr_print_uint32(ndr, "level", r->level);
662 ndr_print_set_switch_value(ndr, &r->ctr, r->level);
663 ndr_print_srvsvc_NetCharDevCtr(ndr, "ctr", &r->ctr);
664 ndr->depth--;
667 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevQInfo0 *r)
669 if (ndr_flags & NDR_SCALARS) {
670 NDR_CHECK(ndr_push_align(ndr, 5));
671 NDR_CHECK(ndr_push_unique_ptr(ndr, r->device));
672 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
674 if (ndr_flags & NDR_BUFFERS) {
675 if (r->device) {
676 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
677 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
678 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
679 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->device, ndr_charset_length(r->device, CH_UTF16), sizeof(uint16_t), CH_UTF16));
682 return NDR_ERR_SUCCESS;
685 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevQInfo0 *r)
687 uint32_t _ptr_device;
688 TALLOC_CTX *_mem_save_device_0;
689 if (ndr_flags & NDR_SCALARS) {
690 NDR_CHECK(ndr_pull_align(ndr, 5));
691 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_device));
692 if (_ptr_device) {
693 NDR_PULL_ALLOC(ndr, r->device);
694 } else {
695 r->device = NULL;
697 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
699 if (ndr_flags & NDR_BUFFERS) {
700 if (r->device) {
701 _mem_save_device_0 = NDR_PULL_GET_MEM_CTX(ndr);
702 NDR_PULL_SET_MEM_CTX(ndr, r->device, 0);
703 NDR_CHECK(ndr_pull_array_size(ndr, &r->device));
704 NDR_CHECK(ndr_pull_array_length(ndr, &r->device));
705 if (ndr_get_array_length(ndr, &r->device) > ndr_get_array_size(ndr, &r->device)) {
706 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->device), ndr_get_array_length(ndr, &r->device));
708 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->device), sizeof(uint16_t)));
709 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->device, ndr_get_array_length(ndr, &r->device), sizeof(uint16_t), CH_UTF16));
710 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_device_0, 0);
713 return NDR_ERR_SUCCESS;
716 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQInfo0 *r)
718 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQInfo0");
719 ndr->depth++;
720 ndr_print_ptr(ndr, "device", r->device);
721 ndr->depth++;
722 if (r->device) {
723 ndr_print_string(ndr, "device", r->device);
725 ndr->depth--;
726 ndr->depth--;
729 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevQCtr0 *r)
731 uint32_t cntr_array_1;
732 if (ndr_flags & NDR_SCALARS) {
733 NDR_CHECK(ndr_push_align(ndr, 5));
734 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
735 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
736 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
738 if (ndr_flags & NDR_BUFFERS) {
739 if (r->array) {
740 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
741 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
742 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
744 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
745 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
749 return NDR_ERR_SUCCESS;
752 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevQCtr0 *r)
754 uint32_t _ptr_array;
755 uint32_t cntr_array_1;
756 TALLOC_CTX *_mem_save_array_0;
757 TALLOC_CTX *_mem_save_array_1;
758 if (ndr_flags & NDR_SCALARS) {
759 NDR_CHECK(ndr_pull_align(ndr, 5));
760 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
761 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
762 if (_ptr_array) {
763 NDR_PULL_ALLOC(ndr, r->array);
764 } else {
765 r->array = NULL;
767 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
769 if (ndr_flags & NDR_BUFFERS) {
770 if (r->array) {
771 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
772 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
773 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
774 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
775 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
776 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
777 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
778 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
780 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
781 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
783 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
784 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
786 if (r->array) {
787 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
790 return NDR_ERR_SUCCESS;
793 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQCtr0 *r)
795 uint32_t cntr_array_1;
796 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQCtr0");
797 ndr->depth++;
798 ndr_print_uint32(ndr, "count", r->count);
799 ndr_print_ptr(ndr, "array", r->array);
800 ndr->depth++;
801 if (r->array) {
802 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
803 ndr->depth++;
804 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
805 char *idx_1=NULL;
806 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
807 ndr_print_srvsvc_NetCharDevQInfo0(ndr, "array", &r->array[cntr_array_1]);
808 free(idx_1);
811 ndr->depth--;
813 ndr->depth--;
814 ndr->depth--;
817 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevQInfo1 *r)
819 if (ndr_flags & NDR_SCALARS) {
820 NDR_CHECK(ndr_push_align(ndr, 5));
821 NDR_CHECK(ndr_push_unique_ptr(ndr, r->device));
822 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->priority));
823 NDR_CHECK(ndr_push_unique_ptr(ndr, r->devices));
824 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->users));
825 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_ahead));
826 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
828 if (ndr_flags & NDR_BUFFERS) {
829 if (r->device) {
830 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
831 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
832 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->device, CH_UTF16)));
833 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->device, ndr_charset_length(r->device, CH_UTF16), sizeof(uint16_t), CH_UTF16));
835 if (r->devices) {
836 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->devices, CH_UTF16)));
837 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
838 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->devices, CH_UTF16)));
839 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->devices, ndr_charset_length(r->devices, CH_UTF16), sizeof(uint16_t), CH_UTF16));
842 return NDR_ERR_SUCCESS;
845 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevQInfo1 *r)
847 uint32_t _ptr_device;
848 TALLOC_CTX *_mem_save_device_0;
849 uint32_t _ptr_devices;
850 TALLOC_CTX *_mem_save_devices_0;
851 if (ndr_flags & NDR_SCALARS) {
852 NDR_CHECK(ndr_pull_align(ndr, 5));
853 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_device));
854 if (_ptr_device) {
855 NDR_PULL_ALLOC(ndr, r->device);
856 } else {
857 r->device = NULL;
859 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->priority));
860 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_devices));
861 if (_ptr_devices) {
862 NDR_PULL_ALLOC(ndr, r->devices);
863 } else {
864 r->devices = NULL;
866 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->users));
867 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_ahead));
868 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
870 if (ndr_flags & NDR_BUFFERS) {
871 if (r->device) {
872 _mem_save_device_0 = NDR_PULL_GET_MEM_CTX(ndr);
873 NDR_PULL_SET_MEM_CTX(ndr, r->device, 0);
874 NDR_CHECK(ndr_pull_array_size(ndr, &r->device));
875 NDR_CHECK(ndr_pull_array_length(ndr, &r->device));
876 if (ndr_get_array_length(ndr, &r->device) > ndr_get_array_size(ndr, &r->device)) {
877 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->device), ndr_get_array_length(ndr, &r->device));
879 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->device), sizeof(uint16_t)));
880 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->device, ndr_get_array_length(ndr, &r->device), sizeof(uint16_t), CH_UTF16));
881 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_device_0, 0);
883 if (r->devices) {
884 _mem_save_devices_0 = NDR_PULL_GET_MEM_CTX(ndr);
885 NDR_PULL_SET_MEM_CTX(ndr, r->devices, 0);
886 NDR_CHECK(ndr_pull_array_size(ndr, &r->devices));
887 NDR_CHECK(ndr_pull_array_length(ndr, &r->devices));
888 if (ndr_get_array_length(ndr, &r->devices) > ndr_get_array_size(ndr, &r->devices)) {
889 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->devices), ndr_get_array_length(ndr, &r->devices));
891 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->devices), sizeof(uint16_t)));
892 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->devices, ndr_get_array_length(ndr, &r->devices), sizeof(uint16_t), CH_UTF16));
893 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_devices_0, 0);
896 return NDR_ERR_SUCCESS;
899 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQInfo1 *r)
901 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQInfo1");
902 ndr->depth++;
903 ndr_print_ptr(ndr, "device", r->device);
904 ndr->depth++;
905 if (r->device) {
906 ndr_print_string(ndr, "device", r->device);
908 ndr->depth--;
909 ndr_print_uint32(ndr, "priority", r->priority);
910 ndr_print_ptr(ndr, "devices", r->devices);
911 ndr->depth++;
912 if (r->devices) {
913 ndr_print_string(ndr, "devices", r->devices);
915 ndr->depth--;
916 ndr_print_uint32(ndr, "users", r->users);
917 ndr_print_uint32(ndr, "num_ahead", r->num_ahead);
918 ndr->depth--;
921 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevQCtr1 *r)
923 uint32_t cntr_array_1;
924 if (ndr_flags & NDR_SCALARS) {
925 NDR_CHECK(ndr_push_align(ndr, 5));
926 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
927 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
928 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
930 if (ndr_flags & NDR_BUFFERS) {
931 if (r->array) {
932 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
933 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
934 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
936 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
937 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
941 return NDR_ERR_SUCCESS;
944 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevQCtr1 *r)
946 uint32_t _ptr_array;
947 uint32_t cntr_array_1;
948 TALLOC_CTX *_mem_save_array_0;
949 TALLOC_CTX *_mem_save_array_1;
950 if (ndr_flags & NDR_SCALARS) {
951 NDR_CHECK(ndr_pull_align(ndr, 5));
952 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
953 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
954 if (_ptr_array) {
955 NDR_PULL_ALLOC(ndr, r->array);
956 } else {
957 r->array = NULL;
959 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
961 if (ndr_flags & NDR_BUFFERS) {
962 if (r->array) {
963 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
964 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
965 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
966 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
967 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
968 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
969 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
970 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
972 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
973 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
975 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
976 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
978 if (r->array) {
979 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
982 return NDR_ERR_SUCCESS;
985 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQCtr1 *r)
987 uint32_t cntr_array_1;
988 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQCtr1");
989 ndr->depth++;
990 ndr_print_uint32(ndr, "count", r->count);
991 ndr_print_ptr(ndr, "array", r->array);
992 ndr->depth++;
993 if (r->array) {
994 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
995 ndr->depth++;
996 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
997 char *idx_1=NULL;
998 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
999 ndr_print_srvsvc_NetCharDevQInfo1(ndr, "array", &r->array[cntr_array_1]);
1000 free(idx_1);
1003 ndr->depth--;
1005 ndr->depth--;
1006 ndr->depth--;
1009 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetCharDevQInfo *r)
1011 if (ndr_flags & NDR_SCALARS) {
1012 int level = ndr_push_get_switch_value(ndr, r);
1013 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
1014 NDR_CHECK(ndr_push_union_align(ndr, 5));
1015 switch (level) {
1016 case 0: {
1017 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
1018 break; }
1020 case 1: {
1021 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
1022 break; }
1024 default: {
1025 break; }
1029 if (ndr_flags & NDR_BUFFERS) {
1030 int level = ndr_push_get_switch_value(ndr, r);
1031 switch (level) {
1032 case 0:
1033 if (r->info0) {
1034 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
1036 break;
1038 case 1:
1039 if (r->info1) {
1040 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
1042 break;
1044 default:
1045 break;
1049 return NDR_ERR_SUCCESS;
1052 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetCharDevQInfo *r)
1054 int level;
1055 uint32_t _level;
1056 TALLOC_CTX *_mem_save_info0_0;
1057 TALLOC_CTX *_mem_save_info1_0;
1058 level = ndr_pull_get_switch_value(ndr, r);
1059 if (ndr_flags & NDR_SCALARS) {
1060 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
1061 if (_level != level) {
1062 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
1064 NDR_CHECK(ndr_pull_union_align(ndr, 5));
1065 switch (level) {
1066 case 0: {
1067 uint32_t _ptr_info0;
1068 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
1069 if (_ptr_info0) {
1070 NDR_PULL_ALLOC(ndr, r->info0);
1071 } else {
1072 r->info0 = NULL;
1074 break; }
1076 case 1: {
1077 uint32_t _ptr_info1;
1078 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
1079 if (_ptr_info1) {
1080 NDR_PULL_ALLOC(ndr, r->info1);
1081 } else {
1082 r->info1 = NULL;
1084 break; }
1086 default: {
1087 break; }
1091 if (ndr_flags & NDR_BUFFERS) {
1092 switch (level) {
1093 case 0:
1094 if (r->info0) {
1095 _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
1096 NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
1097 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
1098 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
1100 break;
1102 case 1:
1103 if (r->info1) {
1104 _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
1105 NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
1106 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
1107 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
1109 break;
1111 default:
1112 break;
1116 return NDR_ERR_SUCCESS;
1119 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetCharDevQInfo *r)
1121 int level;
1122 level = ndr_print_get_switch_value(ndr, r);
1123 ndr_print_union(ndr, name, level, "srvsvc_NetCharDevQInfo");
1124 switch (level) {
1125 case 0:
1126 ndr_print_ptr(ndr, "info0", r->info0);
1127 ndr->depth++;
1128 if (r->info0) {
1129 ndr_print_srvsvc_NetCharDevQInfo0(ndr, "info0", r->info0);
1131 ndr->depth--;
1132 break;
1134 case 1:
1135 ndr_print_ptr(ndr, "info1", r->info1);
1136 ndr->depth++;
1137 if (r->info1) {
1138 ndr_print_srvsvc_NetCharDevQInfo1(ndr, "info1", r->info1);
1140 ndr->depth--;
1141 break;
1143 default:
1144 break;
1149 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetCharDevQCtr *r)
1151 if (ndr_flags & NDR_SCALARS) {
1152 int level = ndr_push_get_switch_value(ndr, r);
1153 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
1154 NDR_CHECK(ndr_push_union_align(ndr, 5));
1155 switch (level) {
1156 case 0: {
1157 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0));
1158 break; }
1160 case 1: {
1161 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
1162 break; }
1164 default: {
1165 break; }
1169 if (ndr_flags & NDR_BUFFERS) {
1170 int level = ndr_push_get_switch_value(ndr, r);
1171 switch (level) {
1172 case 0:
1173 if (r->ctr0) {
1174 NDR_CHECK(ndr_push_srvsvc_NetCharDevQCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
1176 break;
1178 case 1:
1179 if (r->ctr1) {
1180 NDR_CHECK(ndr_push_srvsvc_NetCharDevQCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
1182 break;
1184 default:
1185 break;
1189 return NDR_ERR_SUCCESS;
1192 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetCharDevQCtr *r)
1194 int level;
1195 uint32_t _level;
1196 TALLOC_CTX *_mem_save_ctr0_0;
1197 TALLOC_CTX *_mem_save_ctr1_0;
1198 level = ndr_pull_get_switch_value(ndr, r);
1199 if (ndr_flags & NDR_SCALARS) {
1200 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
1201 if (_level != level) {
1202 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
1204 NDR_CHECK(ndr_pull_union_align(ndr, 5));
1205 switch (level) {
1206 case 0: {
1207 uint32_t _ptr_ctr0;
1208 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr0));
1209 if (_ptr_ctr0) {
1210 NDR_PULL_ALLOC(ndr, r->ctr0);
1211 } else {
1212 r->ctr0 = NULL;
1214 break; }
1216 case 1: {
1217 uint32_t _ptr_ctr1;
1218 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
1219 if (_ptr_ctr1) {
1220 NDR_PULL_ALLOC(ndr, r->ctr1);
1221 } else {
1222 r->ctr1 = NULL;
1224 break; }
1226 default: {
1227 break; }
1231 if (ndr_flags & NDR_BUFFERS) {
1232 switch (level) {
1233 case 0:
1234 if (r->ctr0) {
1235 _mem_save_ctr0_0 = NDR_PULL_GET_MEM_CTX(ndr);
1236 NDR_PULL_SET_MEM_CTX(ndr, r->ctr0, 0);
1237 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
1238 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr0_0, 0);
1240 break;
1242 case 1:
1243 if (r->ctr1) {
1244 _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
1245 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
1246 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
1247 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
1249 break;
1251 default:
1252 break;
1256 return NDR_ERR_SUCCESS;
1259 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetCharDevQCtr *r)
1261 int level;
1262 level = ndr_print_get_switch_value(ndr, r);
1263 ndr_print_union(ndr, name, level, "srvsvc_NetCharDevQCtr");
1264 switch (level) {
1265 case 0:
1266 ndr_print_ptr(ndr, "ctr0", r->ctr0);
1267 ndr->depth++;
1268 if (r->ctr0) {
1269 ndr_print_srvsvc_NetCharDevQCtr0(ndr, "ctr0", r->ctr0);
1271 ndr->depth--;
1272 break;
1274 case 1:
1275 ndr_print_ptr(ndr, "ctr1", r->ctr1);
1276 ndr->depth++;
1277 if (r->ctr1) {
1278 ndr_print_srvsvc_NetCharDevQCtr1(ndr, "ctr1", r->ctr1);
1280 ndr->depth--;
1281 break;
1283 default:
1284 break;
1289 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQInfoCtr(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetCharDevQInfoCtr *r)
1291 if (ndr_flags & NDR_SCALARS) {
1292 NDR_CHECK(ndr_push_align(ndr, 5));
1293 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
1294 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level));
1295 NDR_CHECK(ndr_push_srvsvc_NetCharDevQCtr(ndr, NDR_SCALARS, &r->ctr));
1296 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1298 if (ndr_flags & NDR_BUFFERS) {
1299 NDR_CHECK(ndr_push_srvsvc_NetCharDevQCtr(ndr, NDR_BUFFERS, &r->ctr));
1301 return NDR_ERR_SUCCESS;
1304 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQInfoCtr(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetCharDevQInfoCtr *r)
1306 if (ndr_flags & NDR_SCALARS) {
1307 NDR_CHECK(ndr_pull_align(ndr, 5));
1308 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
1309 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level));
1310 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQCtr(ndr, NDR_SCALARS, &r->ctr));
1311 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1313 if (ndr_flags & NDR_BUFFERS) {
1314 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQCtr(ndr, NDR_BUFFERS, &r->ctr));
1316 return NDR_ERR_SUCCESS;
1319 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetCharDevQInfoCtr *r)
1321 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQInfoCtr");
1322 ndr->depth++;
1323 ndr_print_uint32(ndr, "level", r->level);
1324 ndr_print_set_switch_value(ndr, &r->ctr, r->level);
1325 ndr_print_srvsvc_NetCharDevQCtr(ndr, "ctr", &r->ctr);
1326 ndr->depth--;
1329 static enum ndr_err_code ndr_push_srvsvc_NetConnInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetConnInfo0 *r)
1331 if (ndr_flags & NDR_SCALARS) {
1332 NDR_CHECK(ndr_push_align(ndr, 4));
1333 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->conn_id));
1334 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1336 if (ndr_flags & NDR_BUFFERS) {
1338 return NDR_ERR_SUCCESS;
1341 static enum ndr_err_code ndr_pull_srvsvc_NetConnInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnInfo0 *r)
1343 if (ndr_flags & NDR_SCALARS) {
1344 NDR_CHECK(ndr_pull_align(ndr, 4));
1345 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->conn_id));
1346 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1348 if (ndr_flags & NDR_BUFFERS) {
1350 return NDR_ERR_SUCCESS;
1353 _PUBLIC_ void ndr_print_srvsvc_NetConnInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnInfo0 *r)
1355 ndr_print_struct(ndr, name, "srvsvc_NetConnInfo0");
1356 ndr->depth++;
1357 ndr_print_uint32(ndr, "conn_id", r->conn_id);
1358 ndr->depth--;
1361 static enum ndr_err_code ndr_push_srvsvc_NetConnCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetConnCtr0 *r)
1363 uint32_t cntr_array_1;
1364 if (ndr_flags & NDR_SCALARS) {
1365 NDR_CHECK(ndr_push_align(ndr, 5));
1366 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1367 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
1368 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1370 if (ndr_flags & NDR_BUFFERS) {
1371 if (r->array) {
1372 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
1373 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
1374 NDR_CHECK(ndr_push_srvsvc_NetConnInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
1378 return NDR_ERR_SUCCESS;
1381 static enum ndr_err_code ndr_pull_srvsvc_NetConnCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnCtr0 *r)
1383 uint32_t _ptr_array;
1384 uint32_t cntr_array_1;
1385 TALLOC_CTX *_mem_save_array_0;
1386 TALLOC_CTX *_mem_save_array_1;
1387 if (ndr_flags & NDR_SCALARS) {
1388 NDR_CHECK(ndr_pull_align(ndr, 5));
1389 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
1390 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
1391 if (_ptr_array) {
1392 NDR_PULL_ALLOC(ndr, r->array);
1393 } else {
1394 r->array = NULL;
1396 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1398 if (ndr_flags & NDR_BUFFERS) {
1399 if (r->array) {
1400 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
1401 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
1402 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
1403 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
1404 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
1405 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
1406 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
1407 NDR_CHECK(ndr_pull_srvsvc_NetConnInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
1409 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
1410 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
1412 if (r->array) {
1413 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
1416 return NDR_ERR_SUCCESS;
1419 _PUBLIC_ void ndr_print_srvsvc_NetConnCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnCtr0 *r)
1421 uint32_t cntr_array_1;
1422 ndr_print_struct(ndr, name, "srvsvc_NetConnCtr0");
1423 ndr->depth++;
1424 ndr_print_uint32(ndr, "count", r->count);
1425 ndr_print_ptr(ndr, "array", r->array);
1426 ndr->depth++;
1427 if (r->array) {
1428 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
1429 ndr->depth++;
1430 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
1431 char *idx_1=NULL;
1432 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
1433 ndr_print_srvsvc_NetConnInfo0(ndr, "array", &r->array[cntr_array_1]);
1434 free(idx_1);
1437 ndr->depth--;
1439 ndr->depth--;
1440 ndr->depth--;
1443 static enum ndr_err_code ndr_push_srvsvc_NetConnInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetConnInfo1 *r)
1445 if (ndr_flags & NDR_SCALARS) {
1446 NDR_CHECK(ndr_push_align(ndr, 5));
1447 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->conn_id));
1448 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->conn_type));
1449 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_open));
1450 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_users));
1451 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->conn_time));
1452 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
1453 NDR_CHECK(ndr_push_unique_ptr(ndr, r->share));
1454 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1456 if (ndr_flags & NDR_BUFFERS) {
1457 if (r->user) {
1458 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
1459 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1460 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
1461 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1463 if (r->share) {
1464 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->share, CH_UTF16)));
1465 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1466 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->share, CH_UTF16)));
1467 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->share, ndr_charset_length(r->share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1470 return NDR_ERR_SUCCESS;
1473 static enum ndr_err_code ndr_pull_srvsvc_NetConnInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnInfo1 *r)
1475 uint32_t _ptr_user;
1476 TALLOC_CTX *_mem_save_user_0;
1477 uint32_t _ptr_share;
1478 TALLOC_CTX *_mem_save_share_0;
1479 if (ndr_flags & NDR_SCALARS) {
1480 NDR_CHECK(ndr_pull_align(ndr, 5));
1481 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->conn_id));
1482 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->conn_type));
1483 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_open));
1484 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_users));
1485 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->conn_time));
1486 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
1487 if (_ptr_user) {
1488 NDR_PULL_ALLOC(ndr, r->user);
1489 } else {
1490 r->user = NULL;
1492 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share));
1493 if (_ptr_share) {
1494 NDR_PULL_ALLOC(ndr, r->share);
1495 } else {
1496 r->share = NULL;
1498 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1500 if (ndr_flags & NDR_BUFFERS) {
1501 if (r->user) {
1502 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
1503 NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
1504 NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
1505 NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
1506 if (ndr_get_array_length(ndr, &r->user) > ndr_get_array_size(ndr, &r->user)) {
1507 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->user), ndr_get_array_length(ndr, &r->user));
1509 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t)));
1510 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t), CH_UTF16));
1511 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
1513 if (r->share) {
1514 _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr);
1515 NDR_PULL_SET_MEM_CTX(ndr, r->share, 0);
1516 NDR_CHECK(ndr_pull_array_size(ndr, &r->share));
1517 NDR_CHECK(ndr_pull_array_length(ndr, &r->share));
1518 if (ndr_get_array_length(ndr, &r->share) > ndr_get_array_size(ndr, &r->share)) {
1519 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->share), ndr_get_array_length(ndr, &r->share));
1521 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->share), sizeof(uint16_t)));
1522 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->share, ndr_get_array_length(ndr, &r->share), sizeof(uint16_t), CH_UTF16));
1523 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0);
1526 return NDR_ERR_SUCCESS;
1529 _PUBLIC_ void ndr_print_srvsvc_NetConnInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnInfo1 *r)
1531 ndr_print_struct(ndr, name, "srvsvc_NetConnInfo1");
1532 ndr->depth++;
1533 ndr_print_uint32(ndr, "conn_id", r->conn_id);
1534 ndr_print_uint32(ndr, "conn_type", r->conn_type);
1535 ndr_print_uint32(ndr, "num_open", r->num_open);
1536 ndr_print_uint32(ndr, "num_users", r->num_users);
1537 ndr_print_uint32(ndr, "conn_time", r->conn_time);
1538 ndr_print_ptr(ndr, "user", r->user);
1539 ndr->depth++;
1540 if (r->user) {
1541 ndr_print_string(ndr, "user", r->user);
1543 ndr->depth--;
1544 ndr_print_ptr(ndr, "share", r->share);
1545 ndr->depth++;
1546 if (r->share) {
1547 ndr_print_string(ndr, "share", r->share);
1549 ndr->depth--;
1550 ndr->depth--;
1553 static enum ndr_err_code ndr_push_srvsvc_NetConnCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetConnCtr1 *r)
1555 uint32_t cntr_array_1;
1556 if (ndr_flags & NDR_SCALARS) {
1557 NDR_CHECK(ndr_push_align(ndr, 5));
1558 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1559 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
1560 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1562 if (ndr_flags & NDR_BUFFERS) {
1563 if (r->array) {
1564 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
1565 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
1566 NDR_CHECK(ndr_push_srvsvc_NetConnInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
1568 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
1569 NDR_CHECK(ndr_push_srvsvc_NetConnInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
1573 return NDR_ERR_SUCCESS;
1576 static enum ndr_err_code ndr_pull_srvsvc_NetConnCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnCtr1 *r)
1578 uint32_t _ptr_array;
1579 uint32_t cntr_array_1;
1580 TALLOC_CTX *_mem_save_array_0;
1581 TALLOC_CTX *_mem_save_array_1;
1582 if (ndr_flags & NDR_SCALARS) {
1583 NDR_CHECK(ndr_pull_align(ndr, 5));
1584 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
1585 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
1586 if (_ptr_array) {
1587 NDR_PULL_ALLOC(ndr, r->array);
1588 } else {
1589 r->array = NULL;
1591 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1593 if (ndr_flags & NDR_BUFFERS) {
1594 if (r->array) {
1595 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
1596 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
1597 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
1598 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
1599 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
1600 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
1601 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
1602 NDR_CHECK(ndr_pull_srvsvc_NetConnInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
1604 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
1605 NDR_CHECK(ndr_pull_srvsvc_NetConnInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
1607 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
1608 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
1610 if (r->array) {
1611 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
1614 return NDR_ERR_SUCCESS;
1617 _PUBLIC_ void ndr_print_srvsvc_NetConnCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnCtr1 *r)
1619 uint32_t cntr_array_1;
1620 ndr_print_struct(ndr, name, "srvsvc_NetConnCtr1");
1621 ndr->depth++;
1622 ndr_print_uint32(ndr, "count", r->count);
1623 ndr_print_ptr(ndr, "array", r->array);
1624 ndr->depth++;
1625 if (r->array) {
1626 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
1627 ndr->depth++;
1628 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
1629 char *idx_1=NULL;
1630 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
1631 ndr_print_srvsvc_NetConnInfo1(ndr, "array", &r->array[cntr_array_1]);
1632 free(idx_1);
1635 ndr->depth--;
1637 ndr->depth--;
1638 ndr->depth--;
1641 static enum ndr_err_code ndr_push_srvsvc_NetConnCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetConnCtr *r)
1643 if (ndr_flags & NDR_SCALARS) {
1644 int level = ndr_push_get_switch_value(ndr, r);
1645 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
1646 NDR_CHECK(ndr_push_union_align(ndr, 5));
1647 switch (level) {
1648 case 0: {
1649 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0));
1650 break; }
1652 case 1: {
1653 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
1654 break; }
1656 default: {
1657 break; }
1661 if (ndr_flags & NDR_BUFFERS) {
1662 int level = ndr_push_get_switch_value(ndr, r);
1663 switch (level) {
1664 case 0:
1665 if (r->ctr0) {
1666 NDR_CHECK(ndr_push_srvsvc_NetConnCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
1668 break;
1670 case 1:
1671 if (r->ctr1) {
1672 NDR_CHECK(ndr_push_srvsvc_NetConnCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
1674 break;
1676 default:
1677 break;
1681 return NDR_ERR_SUCCESS;
1684 static enum ndr_err_code ndr_pull_srvsvc_NetConnCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetConnCtr *r)
1686 int level;
1687 uint32_t _level;
1688 TALLOC_CTX *_mem_save_ctr0_0;
1689 TALLOC_CTX *_mem_save_ctr1_0;
1690 level = ndr_pull_get_switch_value(ndr, r);
1691 if (ndr_flags & NDR_SCALARS) {
1692 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
1693 if (_level != level) {
1694 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
1696 NDR_CHECK(ndr_pull_union_align(ndr, 5));
1697 switch (level) {
1698 case 0: {
1699 uint32_t _ptr_ctr0;
1700 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr0));
1701 if (_ptr_ctr0) {
1702 NDR_PULL_ALLOC(ndr, r->ctr0);
1703 } else {
1704 r->ctr0 = NULL;
1706 break; }
1708 case 1: {
1709 uint32_t _ptr_ctr1;
1710 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
1711 if (_ptr_ctr1) {
1712 NDR_PULL_ALLOC(ndr, r->ctr1);
1713 } else {
1714 r->ctr1 = NULL;
1716 break; }
1718 default: {
1719 break; }
1723 if (ndr_flags & NDR_BUFFERS) {
1724 switch (level) {
1725 case 0:
1726 if (r->ctr0) {
1727 _mem_save_ctr0_0 = NDR_PULL_GET_MEM_CTX(ndr);
1728 NDR_PULL_SET_MEM_CTX(ndr, r->ctr0, 0);
1729 NDR_CHECK(ndr_pull_srvsvc_NetConnCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
1730 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr0_0, 0);
1732 break;
1734 case 1:
1735 if (r->ctr1) {
1736 _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
1737 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
1738 NDR_CHECK(ndr_pull_srvsvc_NetConnCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
1739 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
1741 break;
1743 default:
1744 break;
1748 return NDR_ERR_SUCCESS;
1751 _PUBLIC_ void ndr_print_srvsvc_NetConnCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetConnCtr *r)
1753 int level;
1754 level = ndr_print_get_switch_value(ndr, r);
1755 ndr_print_union(ndr, name, level, "srvsvc_NetConnCtr");
1756 switch (level) {
1757 case 0:
1758 ndr_print_ptr(ndr, "ctr0", r->ctr0);
1759 ndr->depth++;
1760 if (r->ctr0) {
1761 ndr_print_srvsvc_NetConnCtr0(ndr, "ctr0", r->ctr0);
1763 ndr->depth--;
1764 break;
1766 case 1:
1767 ndr_print_ptr(ndr, "ctr1", r->ctr1);
1768 ndr->depth++;
1769 if (r->ctr1) {
1770 ndr_print_srvsvc_NetConnCtr1(ndr, "ctr1", r->ctr1);
1772 ndr->depth--;
1773 break;
1775 default:
1776 break;
1781 static enum ndr_err_code ndr_push_srvsvc_NetConnInfoCtr(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetConnInfoCtr *r)
1783 if (ndr_flags & NDR_SCALARS) {
1784 NDR_CHECK(ndr_push_align(ndr, 5));
1785 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
1786 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level));
1787 NDR_CHECK(ndr_push_srvsvc_NetConnCtr(ndr, NDR_SCALARS, &r->ctr));
1788 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1790 if (ndr_flags & NDR_BUFFERS) {
1791 NDR_CHECK(ndr_push_srvsvc_NetConnCtr(ndr, NDR_BUFFERS, &r->ctr));
1793 return NDR_ERR_SUCCESS;
1796 static enum ndr_err_code ndr_pull_srvsvc_NetConnInfoCtr(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetConnInfoCtr *r)
1798 if (ndr_flags & NDR_SCALARS) {
1799 NDR_CHECK(ndr_pull_align(ndr, 5));
1800 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
1801 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level));
1802 NDR_CHECK(ndr_pull_srvsvc_NetConnCtr(ndr, NDR_SCALARS, &r->ctr));
1803 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1805 if (ndr_flags & NDR_BUFFERS) {
1806 NDR_CHECK(ndr_pull_srvsvc_NetConnCtr(ndr, NDR_BUFFERS, &r->ctr));
1808 return NDR_ERR_SUCCESS;
1811 _PUBLIC_ void ndr_print_srvsvc_NetConnInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetConnInfoCtr *r)
1813 ndr_print_struct(ndr, name, "srvsvc_NetConnInfoCtr");
1814 ndr->depth++;
1815 ndr_print_uint32(ndr, "level", r->level);
1816 ndr_print_set_switch_value(ndr, &r->ctr, r->level);
1817 ndr_print_srvsvc_NetConnCtr(ndr, "ctr", &r->ctr);
1818 ndr->depth--;
1821 static enum ndr_err_code ndr_push_srvsvc_NetFileInfo2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetFileInfo2 *r)
1823 if (ndr_flags & NDR_SCALARS) {
1824 NDR_CHECK(ndr_push_align(ndr, 4));
1825 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fid));
1826 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1828 if (ndr_flags & NDR_BUFFERS) {
1830 return NDR_ERR_SUCCESS;
1833 static enum ndr_err_code ndr_pull_srvsvc_NetFileInfo2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileInfo2 *r)
1835 if (ndr_flags & NDR_SCALARS) {
1836 NDR_CHECK(ndr_pull_align(ndr, 4));
1837 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fid));
1838 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1840 if (ndr_flags & NDR_BUFFERS) {
1842 return NDR_ERR_SUCCESS;
1845 _PUBLIC_ void ndr_print_srvsvc_NetFileInfo2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileInfo2 *r)
1847 ndr_print_struct(ndr, name, "srvsvc_NetFileInfo2");
1848 ndr->depth++;
1849 ndr_print_uint32(ndr, "fid", r->fid);
1850 ndr->depth--;
1853 static enum ndr_err_code ndr_push_srvsvc_NetFileCtr2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetFileCtr2 *r)
1855 uint32_t cntr_array_1;
1856 if (ndr_flags & NDR_SCALARS) {
1857 NDR_CHECK(ndr_push_align(ndr, 5));
1858 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
1859 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
1860 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1862 if (ndr_flags & NDR_BUFFERS) {
1863 if (r->array) {
1864 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
1865 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
1866 NDR_CHECK(ndr_push_srvsvc_NetFileInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
1870 return NDR_ERR_SUCCESS;
1873 static enum ndr_err_code ndr_pull_srvsvc_NetFileCtr2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileCtr2 *r)
1875 uint32_t _ptr_array;
1876 uint32_t cntr_array_1;
1877 TALLOC_CTX *_mem_save_array_0;
1878 TALLOC_CTX *_mem_save_array_1;
1879 if (ndr_flags & NDR_SCALARS) {
1880 NDR_CHECK(ndr_pull_align(ndr, 5));
1881 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
1882 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
1883 if (_ptr_array) {
1884 NDR_PULL_ALLOC(ndr, r->array);
1885 } else {
1886 r->array = NULL;
1888 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1890 if (ndr_flags & NDR_BUFFERS) {
1891 if (r->array) {
1892 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
1893 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
1894 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
1895 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
1896 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
1897 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
1898 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
1899 NDR_CHECK(ndr_pull_srvsvc_NetFileInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
1901 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
1902 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
1904 if (r->array) {
1905 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
1908 return NDR_ERR_SUCCESS;
1911 _PUBLIC_ void ndr_print_srvsvc_NetFileCtr2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileCtr2 *r)
1913 uint32_t cntr_array_1;
1914 ndr_print_struct(ndr, name, "srvsvc_NetFileCtr2");
1915 ndr->depth++;
1916 ndr_print_uint32(ndr, "count", r->count);
1917 ndr_print_ptr(ndr, "array", r->array);
1918 ndr->depth++;
1919 if (r->array) {
1920 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
1921 ndr->depth++;
1922 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
1923 char *idx_1=NULL;
1924 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
1925 ndr_print_srvsvc_NetFileInfo2(ndr, "array", &r->array[cntr_array_1]);
1926 free(idx_1);
1929 ndr->depth--;
1931 ndr->depth--;
1932 ndr->depth--;
1935 static enum ndr_err_code ndr_push_srvsvc_NetFileInfo3(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetFileInfo3 *r)
1937 if (ndr_flags & NDR_SCALARS) {
1938 NDR_CHECK(ndr_push_align(ndr, 5));
1939 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fid));
1940 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->permissions));
1941 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_locks));
1942 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
1943 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
1944 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1946 if (ndr_flags & NDR_BUFFERS) {
1947 if (r->path) {
1948 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
1949 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1950 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
1951 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1953 if (r->user) {
1954 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
1955 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1956 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
1957 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1960 return NDR_ERR_SUCCESS;
1963 static enum ndr_err_code ndr_pull_srvsvc_NetFileInfo3(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileInfo3 *r)
1965 uint32_t _ptr_path;
1966 TALLOC_CTX *_mem_save_path_0;
1967 uint32_t _ptr_user;
1968 TALLOC_CTX *_mem_save_user_0;
1969 if (ndr_flags & NDR_SCALARS) {
1970 NDR_CHECK(ndr_pull_align(ndr, 5));
1971 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fid));
1972 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->permissions));
1973 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_locks));
1974 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
1975 if (_ptr_path) {
1976 NDR_PULL_ALLOC(ndr, r->path);
1977 } else {
1978 r->path = NULL;
1980 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
1981 if (_ptr_user) {
1982 NDR_PULL_ALLOC(ndr, r->user);
1983 } else {
1984 r->user = NULL;
1986 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1988 if (ndr_flags & NDR_BUFFERS) {
1989 if (r->path) {
1990 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
1991 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
1992 NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
1993 NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
1994 if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) {
1995 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->path), ndr_get_array_length(ndr, &r->path));
1997 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t)));
1998 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16));
1999 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
2001 if (r->user) {
2002 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
2003 NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
2004 NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
2005 NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
2006 if (ndr_get_array_length(ndr, &r->user) > ndr_get_array_size(ndr, &r->user)) {
2007 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->user), ndr_get_array_length(ndr, &r->user));
2009 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t)));
2010 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t), CH_UTF16));
2011 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
2014 return NDR_ERR_SUCCESS;
2017 _PUBLIC_ void ndr_print_srvsvc_NetFileInfo3(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileInfo3 *r)
2019 ndr_print_struct(ndr, name, "srvsvc_NetFileInfo3");
2020 ndr->depth++;
2021 ndr_print_uint32(ndr, "fid", r->fid);
2022 ndr_print_uint32(ndr, "permissions", r->permissions);
2023 ndr_print_uint32(ndr, "num_locks", r->num_locks);
2024 ndr_print_ptr(ndr, "path", r->path);
2025 ndr->depth++;
2026 if (r->path) {
2027 ndr_print_string(ndr, "path", r->path);
2029 ndr->depth--;
2030 ndr_print_ptr(ndr, "user", r->user);
2031 ndr->depth++;
2032 if (r->user) {
2033 ndr_print_string(ndr, "user", r->user);
2035 ndr->depth--;
2036 ndr->depth--;
2039 static enum ndr_err_code ndr_push_srvsvc_NetFileCtr3(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetFileCtr3 *r)
2041 uint32_t cntr_array_1;
2042 if (ndr_flags & NDR_SCALARS) {
2043 NDR_CHECK(ndr_push_align(ndr, 5));
2044 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2045 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
2046 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2048 if (ndr_flags & NDR_BUFFERS) {
2049 if (r->array) {
2050 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
2051 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2052 NDR_CHECK(ndr_push_srvsvc_NetFileInfo3(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
2054 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2055 NDR_CHECK(ndr_push_srvsvc_NetFileInfo3(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
2059 return NDR_ERR_SUCCESS;
2062 static enum ndr_err_code ndr_pull_srvsvc_NetFileCtr3(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileCtr3 *r)
2064 uint32_t _ptr_array;
2065 uint32_t cntr_array_1;
2066 TALLOC_CTX *_mem_save_array_0;
2067 TALLOC_CTX *_mem_save_array_1;
2068 if (ndr_flags & NDR_SCALARS) {
2069 NDR_CHECK(ndr_pull_align(ndr, 5));
2070 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2071 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
2072 if (_ptr_array) {
2073 NDR_PULL_ALLOC(ndr, r->array);
2074 } else {
2075 r->array = NULL;
2077 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2079 if (ndr_flags & NDR_BUFFERS) {
2080 if (r->array) {
2081 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
2082 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
2083 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
2084 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
2085 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
2086 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
2087 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2088 NDR_CHECK(ndr_pull_srvsvc_NetFileInfo3(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
2090 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2091 NDR_CHECK(ndr_pull_srvsvc_NetFileInfo3(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
2093 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
2094 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
2096 if (r->array) {
2097 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
2100 return NDR_ERR_SUCCESS;
2103 _PUBLIC_ void ndr_print_srvsvc_NetFileCtr3(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileCtr3 *r)
2105 uint32_t cntr_array_1;
2106 ndr_print_struct(ndr, name, "srvsvc_NetFileCtr3");
2107 ndr->depth++;
2108 ndr_print_uint32(ndr, "count", r->count);
2109 ndr_print_ptr(ndr, "array", r->array);
2110 ndr->depth++;
2111 if (r->array) {
2112 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
2113 ndr->depth++;
2114 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
2115 char *idx_1=NULL;
2116 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
2117 ndr_print_srvsvc_NetFileInfo3(ndr, "array", &r->array[cntr_array_1]);
2118 free(idx_1);
2121 ndr->depth--;
2123 ndr->depth--;
2124 ndr->depth--;
2127 static enum ndr_err_code ndr_push_srvsvc_NetFileInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetFileInfo *r)
2129 if (ndr_flags & NDR_SCALARS) {
2130 int level = ndr_push_get_switch_value(ndr, r);
2131 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
2132 NDR_CHECK(ndr_push_union_align(ndr, 5));
2133 switch (level) {
2134 case 2: {
2135 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
2136 break; }
2138 case 3: {
2139 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3));
2140 break; }
2142 default: {
2143 break; }
2147 if (ndr_flags & NDR_BUFFERS) {
2148 int level = ndr_push_get_switch_value(ndr, r);
2149 switch (level) {
2150 case 2:
2151 if (r->info2) {
2152 NDR_CHECK(ndr_push_srvsvc_NetFileInfo2(ndr, NDR_SCALARS, r->info2));
2154 break;
2156 case 3:
2157 if (r->info3) {
2158 NDR_CHECK(ndr_push_srvsvc_NetFileInfo3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
2160 break;
2162 default:
2163 break;
2167 return NDR_ERR_SUCCESS;
2170 static enum ndr_err_code ndr_pull_srvsvc_NetFileInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetFileInfo *r)
2172 int level;
2173 uint32_t _level;
2174 TALLOC_CTX *_mem_save_info2_0;
2175 TALLOC_CTX *_mem_save_info3_0;
2176 level = ndr_pull_get_switch_value(ndr, r);
2177 if (ndr_flags & NDR_SCALARS) {
2178 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
2179 if (_level != level) {
2180 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
2182 NDR_CHECK(ndr_pull_union_align(ndr, 5));
2183 switch (level) {
2184 case 2: {
2185 uint32_t _ptr_info2;
2186 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
2187 if (_ptr_info2) {
2188 NDR_PULL_ALLOC(ndr, r->info2);
2189 } else {
2190 r->info2 = NULL;
2192 break; }
2194 case 3: {
2195 uint32_t _ptr_info3;
2196 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info3));
2197 if (_ptr_info3) {
2198 NDR_PULL_ALLOC(ndr, r->info3);
2199 } else {
2200 r->info3 = NULL;
2202 break; }
2204 default: {
2205 break; }
2209 if (ndr_flags & NDR_BUFFERS) {
2210 switch (level) {
2211 case 2:
2212 if (r->info2) {
2213 _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
2214 NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
2215 NDR_CHECK(ndr_pull_srvsvc_NetFileInfo2(ndr, NDR_SCALARS, r->info2));
2216 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
2218 break;
2220 case 3:
2221 if (r->info3) {
2222 _mem_save_info3_0 = NDR_PULL_GET_MEM_CTX(ndr);
2223 NDR_PULL_SET_MEM_CTX(ndr, r->info3, 0);
2224 NDR_CHECK(ndr_pull_srvsvc_NetFileInfo3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
2225 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info3_0, 0);
2227 break;
2229 default:
2230 break;
2234 return NDR_ERR_SUCCESS;
2237 _PUBLIC_ void ndr_print_srvsvc_NetFileInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetFileInfo *r)
2239 int level;
2240 level = ndr_print_get_switch_value(ndr, r);
2241 ndr_print_union(ndr, name, level, "srvsvc_NetFileInfo");
2242 switch (level) {
2243 case 2:
2244 ndr_print_ptr(ndr, "info2", r->info2);
2245 ndr->depth++;
2246 if (r->info2) {
2247 ndr_print_srvsvc_NetFileInfo2(ndr, "info2", r->info2);
2249 ndr->depth--;
2250 break;
2252 case 3:
2253 ndr_print_ptr(ndr, "info3", r->info3);
2254 ndr->depth++;
2255 if (r->info3) {
2256 ndr_print_srvsvc_NetFileInfo3(ndr, "info3", r->info3);
2258 ndr->depth--;
2259 break;
2261 default:
2262 break;
2267 static enum ndr_err_code ndr_push_srvsvc_NetFileCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetFileCtr *r)
2269 if (ndr_flags & NDR_SCALARS) {
2270 int level = ndr_push_get_switch_value(ndr, r);
2271 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
2272 NDR_CHECK(ndr_push_union_align(ndr, 5));
2273 switch (level) {
2274 case 2: {
2275 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr2));
2276 break; }
2278 case 3: {
2279 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr3));
2280 break; }
2282 default: {
2283 break; }
2287 if (ndr_flags & NDR_BUFFERS) {
2288 int level = ndr_push_get_switch_value(ndr, r);
2289 switch (level) {
2290 case 2:
2291 if (r->ctr2) {
2292 NDR_CHECK(ndr_push_srvsvc_NetFileCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
2294 break;
2296 case 3:
2297 if (r->ctr3) {
2298 NDR_CHECK(ndr_push_srvsvc_NetFileCtr3(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr3));
2300 break;
2302 default:
2303 break;
2307 return NDR_ERR_SUCCESS;
2310 static enum ndr_err_code ndr_pull_srvsvc_NetFileCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetFileCtr *r)
2312 int level;
2313 uint32_t _level;
2314 TALLOC_CTX *_mem_save_ctr2_0;
2315 TALLOC_CTX *_mem_save_ctr3_0;
2316 level = ndr_pull_get_switch_value(ndr, r);
2317 if (ndr_flags & NDR_SCALARS) {
2318 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
2319 if (_level != level) {
2320 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
2322 NDR_CHECK(ndr_pull_union_align(ndr, 5));
2323 switch (level) {
2324 case 2: {
2325 uint32_t _ptr_ctr2;
2326 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr2));
2327 if (_ptr_ctr2) {
2328 NDR_PULL_ALLOC(ndr, r->ctr2);
2329 } else {
2330 r->ctr2 = NULL;
2332 break; }
2334 case 3: {
2335 uint32_t _ptr_ctr3;
2336 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr3));
2337 if (_ptr_ctr3) {
2338 NDR_PULL_ALLOC(ndr, r->ctr3);
2339 } else {
2340 r->ctr3 = NULL;
2342 break; }
2344 default: {
2345 break; }
2349 if (ndr_flags & NDR_BUFFERS) {
2350 switch (level) {
2351 case 2:
2352 if (r->ctr2) {
2353 _mem_save_ctr2_0 = NDR_PULL_GET_MEM_CTX(ndr);
2354 NDR_PULL_SET_MEM_CTX(ndr, r->ctr2, 0);
2355 NDR_CHECK(ndr_pull_srvsvc_NetFileCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
2356 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr2_0, 0);
2358 break;
2360 case 3:
2361 if (r->ctr3) {
2362 _mem_save_ctr3_0 = NDR_PULL_GET_MEM_CTX(ndr);
2363 NDR_PULL_SET_MEM_CTX(ndr, r->ctr3, 0);
2364 NDR_CHECK(ndr_pull_srvsvc_NetFileCtr3(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr3));
2365 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr3_0, 0);
2367 break;
2369 default:
2370 break;
2374 return NDR_ERR_SUCCESS;
2377 _PUBLIC_ void ndr_print_srvsvc_NetFileCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetFileCtr *r)
2379 int level;
2380 level = ndr_print_get_switch_value(ndr, r);
2381 ndr_print_union(ndr, name, level, "srvsvc_NetFileCtr");
2382 switch (level) {
2383 case 2:
2384 ndr_print_ptr(ndr, "ctr2", r->ctr2);
2385 ndr->depth++;
2386 if (r->ctr2) {
2387 ndr_print_srvsvc_NetFileCtr2(ndr, "ctr2", r->ctr2);
2389 ndr->depth--;
2390 break;
2392 case 3:
2393 ndr_print_ptr(ndr, "ctr3", r->ctr3);
2394 ndr->depth++;
2395 if (r->ctr3) {
2396 ndr_print_srvsvc_NetFileCtr3(ndr, "ctr3", r->ctr3);
2398 ndr->depth--;
2399 break;
2401 default:
2402 break;
2407 static enum ndr_err_code ndr_push_srvsvc_NetFileInfoCtr(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetFileInfoCtr *r)
2409 if (ndr_flags & NDR_SCALARS) {
2410 NDR_CHECK(ndr_push_align(ndr, 5));
2411 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
2412 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level));
2413 NDR_CHECK(ndr_push_srvsvc_NetFileCtr(ndr, NDR_SCALARS, &r->ctr));
2414 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2416 if (ndr_flags & NDR_BUFFERS) {
2417 NDR_CHECK(ndr_push_srvsvc_NetFileCtr(ndr, NDR_BUFFERS, &r->ctr));
2419 return NDR_ERR_SUCCESS;
2422 static enum ndr_err_code ndr_pull_srvsvc_NetFileInfoCtr(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetFileInfoCtr *r)
2424 if (ndr_flags & NDR_SCALARS) {
2425 NDR_CHECK(ndr_pull_align(ndr, 5));
2426 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
2427 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level));
2428 NDR_CHECK(ndr_pull_srvsvc_NetFileCtr(ndr, NDR_SCALARS, &r->ctr));
2429 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2431 if (ndr_flags & NDR_BUFFERS) {
2432 NDR_CHECK(ndr_pull_srvsvc_NetFileCtr(ndr, NDR_BUFFERS, &r->ctr));
2434 return NDR_ERR_SUCCESS;
2437 _PUBLIC_ void ndr_print_srvsvc_NetFileInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetFileInfoCtr *r)
2439 ndr_print_struct(ndr, name, "srvsvc_NetFileInfoCtr");
2440 ndr->depth++;
2441 ndr_print_uint32(ndr, "level", r->level);
2442 ndr_print_set_switch_value(ndr, &r->ctr, r->level);
2443 ndr_print_srvsvc_NetFileCtr(ndr, "ctr", &r->ctr);
2444 ndr->depth--;
2447 static enum ndr_err_code ndr_push_srvsvc_NetSessInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfo0 *r)
2449 if (ndr_flags & NDR_SCALARS) {
2450 NDR_CHECK(ndr_push_align(ndr, 5));
2451 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client));
2452 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2454 if (ndr_flags & NDR_BUFFERS) {
2455 if (r->client) {
2456 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
2457 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2458 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
2459 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client, ndr_charset_length(r->client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2462 return NDR_ERR_SUCCESS;
2465 static enum ndr_err_code ndr_pull_srvsvc_NetSessInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfo0 *r)
2467 uint32_t _ptr_client;
2468 TALLOC_CTX *_mem_save_client_0;
2469 if (ndr_flags & NDR_SCALARS) {
2470 NDR_CHECK(ndr_pull_align(ndr, 5));
2471 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
2472 if (_ptr_client) {
2473 NDR_PULL_ALLOC(ndr, r->client);
2474 } else {
2475 r->client = NULL;
2477 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2479 if (ndr_flags & NDR_BUFFERS) {
2480 if (r->client) {
2481 _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
2482 NDR_PULL_SET_MEM_CTX(ndr, r->client, 0);
2483 NDR_CHECK(ndr_pull_array_size(ndr, &r->client));
2484 NDR_CHECK(ndr_pull_array_length(ndr, &r->client));
2485 if (ndr_get_array_length(ndr, &r->client) > ndr_get_array_size(ndr, &r->client)) {
2486 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->client), ndr_get_array_length(ndr, &r->client));
2488 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->client), sizeof(uint16_t)));
2489 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client, ndr_get_array_length(ndr, &r->client), sizeof(uint16_t), CH_UTF16));
2490 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
2493 return NDR_ERR_SUCCESS;
2496 _PUBLIC_ void ndr_print_srvsvc_NetSessInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo0 *r)
2498 ndr_print_struct(ndr, name, "srvsvc_NetSessInfo0");
2499 ndr->depth++;
2500 ndr_print_ptr(ndr, "client", r->client);
2501 ndr->depth++;
2502 if (r->client) {
2503 ndr_print_string(ndr, "client", r->client);
2505 ndr->depth--;
2506 ndr->depth--;
2509 static enum ndr_err_code ndr_push_srvsvc_NetSessCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessCtr0 *r)
2511 uint32_t cntr_array_1;
2512 if (ndr_flags & NDR_SCALARS) {
2513 NDR_CHECK(ndr_push_align(ndr, 5));
2514 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2515 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
2516 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2518 if (ndr_flags & NDR_BUFFERS) {
2519 if (r->array) {
2520 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
2521 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2522 NDR_CHECK(ndr_push_srvsvc_NetSessInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
2524 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2525 NDR_CHECK(ndr_push_srvsvc_NetSessInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
2529 return NDR_ERR_SUCCESS;
2532 static enum ndr_err_code ndr_pull_srvsvc_NetSessCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr0 *r)
2534 uint32_t _ptr_array;
2535 uint32_t cntr_array_1;
2536 TALLOC_CTX *_mem_save_array_0;
2537 TALLOC_CTX *_mem_save_array_1;
2538 if (ndr_flags & NDR_SCALARS) {
2539 NDR_CHECK(ndr_pull_align(ndr, 5));
2540 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2541 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
2542 if (_ptr_array) {
2543 NDR_PULL_ALLOC(ndr, r->array);
2544 } else {
2545 r->array = NULL;
2547 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2549 if (ndr_flags & NDR_BUFFERS) {
2550 if (r->array) {
2551 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
2552 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
2553 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
2554 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
2555 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
2556 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
2557 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2558 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
2560 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2561 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
2563 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
2564 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
2566 if (r->array) {
2567 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
2570 return NDR_ERR_SUCCESS;
2573 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr0 *r)
2575 uint32_t cntr_array_1;
2576 ndr_print_struct(ndr, name, "srvsvc_NetSessCtr0");
2577 ndr->depth++;
2578 ndr_print_uint32(ndr, "count", r->count);
2579 ndr_print_ptr(ndr, "array", r->array);
2580 ndr->depth++;
2581 if (r->array) {
2582 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
2583 ndr->depth++;
2584 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
2585 char *idx_1=NULL;
2586 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
2587 ndr_print_srvsvc_NetSessInfo0(ndr, "array", &r->array[cntr_array_1]);
2588 free(idx_1);
2591 ndr->depth--;
2593 ndr->depth--;
2594 ndr->depth--;
2597 static enum ndr_err_code ndr_push_srvsvc_NetSessInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfo1 *r)
2599 if (ndr_flags & NDR_SCALARS) {
2600 NDR_CHECK(ndr_push_align(ndr, 5));
2601 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client));
2602 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
2603 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_open));
2604 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
2605 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idle_time));
2606 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->user_flags));
2607 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2609 if (ndr_flags & NDR_BUFFERS) {
2610 if (r->client) {
2611 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
2612 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2613 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
2614 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client, ndr_charset_length(r->client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2616 if (r->user) {
2617 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
2618 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2619 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
2620 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2623 return NDR_ERR_SUCCESS;
2626 static enum ndr_err_code ndr_pull_srvsvc_NetSessInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfo1 *r)
2628 uint32_t _ptr_client;
2629 TALLOC_CTX *_mem_save_client_0;
2630 uint32_t _ptr_user;
2631 TALLOC_CTX *_mem_save_user_0;
2632 if (ndr_flags & NDR_SCALARS) {
2633 NDR_CHECK(ndr_pull_align(ndr, 5));
2634 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
2635 if (_ptr_client) {
2636 NDR_PULL_ALLOC(ndr, r->client);
2637 } else {
2638 r->client = NULL;
2640 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
2641 if (_ptr_user) {
2642 NDR_PULL_ALLOC(ndr, r->user);
2643 } else {
2644 r->user = NULL;
2646 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_open));
2647 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
2648 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idle_time));
2649 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->user_flags));
2650 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2652 if (ndr_flags & NDR_BUFFERS) {
2653 if (r->client) {
2654 _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
2655 NDR_PULL_SET_MEM_CTX(ndr, r->client, 0);
2656 NDR_CHECK(ndr_pull_array_size(ndr, &r->client));
2657 NDR_CHECK(ndr_pull_array_length(ndr, &r->client));
2658 if (ndr_get_array_length(ndr, &r->client) > ndr_get_array_size(ndr, &r->client)) {
2659 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->client), ndr_get_array_length(ndr, &r->client));
2661 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->client), sizeof(uint16_t)));
2662 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client, ndr_get_array_length(ndr, &r->client), sizeof(uint16_t), CH_UTF16));
2663 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
2665 if (r->user) {
2666 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
2667 NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
2668 NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
2669 NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
2670 if (ndr_get_array_length(ndr, &r->user) > ndr_get_array_size(ndr, &r->user)) {
2671 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->user), ndr_get_array_length(ndr, &r->user));
2673 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t)));
2674 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t), CH_UTF16));
2675 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
2678 return NDR_ERR_SUCCESS;
2681 _PUBLIC_ void ndr_print_srvsvc_NetSessInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo1 *r)
2683 ndr_print_struct(ndr, name, "srvsvc_NetSessInfo1");
2684 ndr->depth++;
2685 ndr_print_ptr(ndr, "client", r->client);
2686 ndr->depth++;
2687 if (r->client) {
2688 ndr_print_string(ndr, "client", r->client);
2690 ndr->depth--;
2691 ndr_print_ptr(ndr, "user", r->user);
2692 ndr->depth++;
2693 if (r->user) {
2694 ndr_print_string(ndr, "user", r->user);
2696 ndr->depth--;
2697 ndr_print_uint32(ndr, "num_open", r->num_open);
2698 ndr_print_uint32(ndr, "time", r->time);
2699 ndr_print_uint32(ndr, "idle_time", r->idle_time);
2700 ndr_print_uint32(ndr, "user_flags", r->user_flags);
2701 ndr->depth--;
2704 static enum ndr_err_code ndr_push_srvsvc_NetSessCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessCtr1 *r)
2706 uint32_t cntr_array_1;
2707 if (ndr_flags & NDR_SCALARS) {
2708 NDR_CHECK(ndr_push_align(ndr, 5));
2709 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2710 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
2711 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2713 if (ndr_flags & NDR_BUFFERS) {
2714 if (r->array) {
2715 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
2716 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2717 NDR_CHECK(ndr_push_srvsvc_NetSessInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
2719 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2720 NDR_CHECK(ndr_push_srvsvc_NetSessInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
2724 return NDR_ERR_SUCCESS;
2727 static enum ndr_err_code ndr_pull_srvsvc_NetSessCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr1 *r)
2729 uint32_t _ptr_array;
2730 uint32_t cntr_array_1;
2731 TALLOC_CTX *_mem_save_array_0;
2732 TALLOC_CTX *_mem_save_array_1;
2733 if (ndr_flags & NDR_SCALARS) {
2734 NDR_CHECK(ndr_pull_align(ndr, 5));
2735 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2736 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
2737 if (_ptr_array) {
2738 NDR_PULL_ALLOC(ndr, r->array);
2739 } else {
2740 r->array = NULL;
2742 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2744 if (ndr_flags & NDR_BUFFERS) {
2745 if (r->array) {
2746 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
2747 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
2748 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
2749 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
2750 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
2751 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
2752 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2753 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
2755 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2756 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
2758 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
2759 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
2761 if (r->array) {
2762 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
2765 return NDR_ERR_SUCCESS;
2768 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr1 *r)
2770 uint32_t cntr_array_1;
2771 ndr_print_struct(ndr, name, "srvsvc_NetSessCtr1");
2772 ndr->depth++;
2773 ndr_print_uint32(ndr, "count", r->count);
2774 ndr_print_ptr(ndr, "array", r->array);
2775 ndr->depth++;
2776 if (r->array) {
2777 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
2778 ndr->depth++;
2779 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
2780 char *idx_1=NULL;
2781 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
2782 ndr_print_srvsvc_NetSessInfo1(ndr, "array", &r->array[cntr_array_1]);
2783 free(idx_1);
2786 ndr->depth--;
2788 ndr->depth--;
2789 ndr->depth--;
2792 static enum ndr_err_code ndr_push_srvsvc_NetSessInfo2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfo2 *r)
2794 if (ndr_flags & NDR_SCALARS) {
2795 NDR_CHECK(ndr_push_align(ndr, 5));
2796 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client));
2797 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
2798 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_open));
2799 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
2800 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idle_time));
2801 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->user_flags));
2802 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client_type));
2803 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2805 if (ndr_flags & NDR_BUFFERS) {
2806 if (r->client) {
2807 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
2808 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2809 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
2810 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client, ndr_charset_length(r->client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2812 if (r->user) {
2813 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
2814 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2815 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
2816 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2818 if (r->client_type) {
2819 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client_type, CH_UTF16)));
2820 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
2821 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client_type, CH_UTF16)));
2822 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client_type, ndr_charset_length(r->client_type, CH_UTF16), sizeof(uint16_t), CH_UTF16));
2825 return NDR_ERR_SUCCESS;
2828 static enum ndr_err_code ndr_pull_srvsvc_NetSessInfo2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfo2 *r)
2830 uint32_t _ptr_client;
2831 TALLOC_CTX *_mem_save_client_0;
2832 uint32_t _ptr_user;
2833 TALLOC_CTX *_mem_save_user_0;
2834 uint32_t _ptr_client_type;
2835 TALLOC_CTX *_mem_save_client_type_0;
2836 if (ndr_flags & NDR_SCALARS) {
2837 NDR_CHECK(ndr_pull_align(ndr, 5));
2838 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
2839 if (_ptr_client) {
2840 NDR_PULL_ALLOC(ndr, r->client);
2841 } else {
2842 r->client = NULL;
2844 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
2845 if (_ptr_user) {
2846 NDR_PULL_ALLOC(ndr, r->user);
2847 } else {
2848 r->user = NULL;
2850 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_open));
2851 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
2852 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idle_time));
2853 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->user_flags));
2854 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client_type));
2855 if (_ptr_client_type) {
2856 NDR_PULL_ALLOC(ndr, r->client_type);
2857 } else {
2858 r->client_type = NULL;
2860 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2862 if (ndr_flags & NDR_BUFFERS) {
2863 if (r->client) {
2864 _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
2865 NDR_PULL_SET_MEM_CTX(ndr, r->client, 0);
2866 NDR_CHECK(ndr_pull_array_size(ndr, &r->client));
2867 NDR_CHECK(ndr_pull_array_length(ndr, &r->client));
2868 if (ndr_get_array_length(ndr, &r->client) > ndr_get_array_size(ndr, &r->client)) {
2869 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->client), ndr_get_array_length(ndr, &r->client));
2871 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->client), sizeof(uint16_t)));
2872 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client, ndr_get_array_length(ndr, &r->client), sizeof(uint16_t), CH_UTF16));
2873 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
2875 if (r->user) {
2876 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
2877 NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
2878 NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
2879 NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
2880 if (ndr_get_array_length(ndr, &r->user) > ndr_get_array_size(ndr, &r->user)) {
2881 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->user), ndr_get_array_length(ndr, &r->user));
2883 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t)));
2884 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t), CH_UTF16));
2885 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
2887 if (r->client_type) {
2888 _mem_save_client_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
2889 NDR_PULL_SET_MEM_CTX(ndr, r->client_type, 0);
2890 NDR_CHECK(ndr_pull_array_size(ndr, &r->client_type));
2891 NDR_CHECK(ndr_pull_array_length(ndr, &r->client_type));
2892 if (ndr_get_array_length(ndr, &r->client_type) > ndr_get_array_size(ndr, &r->client_type)) {
2893 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->client_type), ndr_get_array_length(ndr, &r->client_type));
2895 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->client_type), sizeof(uint16_t)));
2896 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client_type, ndr_get_array_length(ndr, &r->client_type), sizeof(uint16_t), CH_UTF16));
2897 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_type_0, 0);
2900 return NDR_ERR_SUCCESS;
2903 _PUBLIC_ void ndr_print_srvsvc_NetSessInfo2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo2 *r)
2905 ndr_print_struct(ndr, name, "srvsvc_NetSessInfo2");
2906 ndr->depth++;
2907 ndr_print_ptr(ndr, "client", r->client);
2908 ndr->depth++;
2909 if (r->client) {
2910 ndr_print_string(ndr, "client", r->client);
2912 ndr->depth--;
2913 ndr_print_ptr(ndr, "user", r->user);
2914 ndr->depth++;
2915 if (r->user) {
2916 ndr_print_string(ndr, "user", r->user);
2918 ndr->depth--;
2919 ndr_print_uint32(ndr, "num_open", r->num_open);
2920 ndr_print_uint32(ndr, "time", r->time);
2921 ndr_print_uint32(ndr, "idle_time", r->idle_time);
2922 ndr_print_uint32(ndr, "user_flags", r->user_flags);
2923 ndr_print_ptr(ndr, "client_type", r->client_type);
2924 ndr->depth++;
2925 if (r->client_type) {
2926 ndr_print_string(ndr, "client_type", r->client_type);
2928 ndr->depth--;
2929 ndr->depth--;
2932 static enum ndr_err_code ndr_push_srvsvc_NetSessCtr2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessCtr2 *r)
2934 uint32_t cntr_array_1;
2935 if (ndr_flags & NDR_SCALARS) {
2936 NDR_CHECK(ndr_push_align(ndr, 5));
2937 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2938 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
2939 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2941 if (ndr_flags & NDR_BUFFERS) {
2942 if (r->array) {
2943 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
2944 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2945 NDR_CHECK(ndr_push_srvsvc_NetSessInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
2947 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2948 NDR_CHECK(ndr_push_srvsvc_NetSessInfo2(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
2952 return NDR_ERR_SUCCESS;
2955 static enum ndr_err_code ndr_pull_srvsvc_NetSessCtr2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr2 *r)
2957 uint32_t _ptr_array;
2958 uint32_t cntr_array_1;
2959 TALLOC_CTX *_mem_save_array_0;
2960 TALLOC_CTX *_mem_save_array_1;
2961 if (ndr_flags & NDR_SCALARS) {
2962 NDR_CHECK(ndr_pull_align(ndr, 5));
2963 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2964 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
2965 if (_ptr_array) {
2966 NDR_PULL_ALLOC(ndr, r->array);
2967 } else {
2968 r->array = NULL;
2970 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2972 if (ndr_flags & NDR_BUFFERS) {
2973 if (r->array) {
2974 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
2975 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
2976 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
2977 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
2978 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
2979 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
2980 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2981 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
2983 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
2984 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo2(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
2986 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
2987 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
2989 if (r->array) {
2990 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
2993 return NDR_ERR_SUCCESS;
2996 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr2 *r)
2998 uint32_t cntr_array_1;
2999 ndr_print_struct(ndr, name, "srvsvc_NetSessCtr2");
3000 ndr->depth++;
3001 ndr_print_uint32(ndr, "count", r->count);
3002 ndr_print_ptr(ndr, "array", r->array);
3003 ndr->depth++;
3004 if (r->array) {
3005 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
3006 ndr->depth++;
3007 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
3008 char *idx_1=NULL;
3009 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
3010 ndr_print_srvsvc_NetSessInfo2(ndr, "array", &r->array[cntr_array_1]);
3011 free(idx_1);
3014 ndr->depth--;
3016 ndr->depth--;
3017 ndr->depth--;
3020 static enum ndr_err_code ndr_push_srvsvc_NetSessInfo10(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfo10 *r)
3022 if (ndr_flags & NDR_SCALARS) {
3023 NDR_CHECK(ndr_push_align(ndr, 5));
3024 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client));
3025 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
3026 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
3027 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idle_time));
3028 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3030 if (ndr_flags & NDR_BUFFERS) {
3031 if (r->client) {
3032 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
3033 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3034 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
3035 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client, ndr_charset_length(r->client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3037 if (r->user) {
3038 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
3039 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3040 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
3041 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3044 return NDR_ERR_SUCCESS;
3047 static enum ndr_err_code ndr_pull_srvsvc_NetSessInfo10(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfo10 *r)
3049 uint32_t _ptr_client;
3050 TALLOC_CTX *_mem_save_client_0;
3051 uint32_t _ptr_user;
3052 TALLOC_CTX *_mem_save_user_0;
3053 if (ndr_flags & NDR_SCALARS) {
3054 NDR_CHECK(ndr_pull_align(ndr, 5));
3055 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
3056 if (_ptr_client) {
3057 NDR_PULL_ALLOC(ndr, r->client);
3058 } else {
3059 r->client = NULL;
3061 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
3062 if (_ptr_user) {
3063 NDR_PULL_ALLOC(ndr, r->user);
3064 } else {
3065 r->user = NULL;
3067 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
3068 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idle_time));
3069 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3071 if (ndr_flags & NDR_BUFFERS) {
3072 if (r->client) {
3073 _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
3074 NDR_PULL_SET_MEM_CTX(ndr, r->client, 0);
3075 NDR_CHECK(ndr_pull_array_size(ndr, &r->client));
3076 NDR_CHECK(ndr_pull_array_length(ndr, &r->client));
3077 if (ndr_get_array_length(ndr, &r->client) > ndr_get_array_size(ndr, &r->client)) {
3078 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->client), ndr_get_array_length(ndr, &r->client));
3080 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->client), sizeof(uint16_t)));
3081 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client, ndr_get_array_length(ndr, &r->client), sizeof(uint16_t), CH_UTF16));
3082 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
3084 if (r->user) {
3085 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
3086 NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
3087 NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
3088 NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
3089 if (ndr_get_array_length(ndr, &r->user) > ndr_get_array_size(ndr, &r->user)) {
3090 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->user), ndr_get_array_length(ndr, &r->user));
3092 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t)));
3093 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t), CH_UTF16));
3094 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
3097 return NDR_ERR_SUCCESS;
3100 _PUBLIC_ void ndr_print_srvsvc_NetSessInfo10(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo10 *r)
3102 ndr_print_struct(ndr, name, "srvsvc_NetSessInfo10");
3103 ndr->depth++;
3104 ndr_print_ptr(ndr, "client", r->client);
3105 ndr->depth++;
3106 if (r->client) {
3107 ndr_print_string(ndr, "client", r->client);
3109 ndr->depth--;
3110 ndr_print_ptr(ndr, "user", r->user);
3111 ndr->depth++;
3112 if (r->user) {
3113 ndr_print_string(ndr, "user", r->user);
3115 ndr->depth--;
3116 ndr_print_uint32(ndr, "time", r->time);
3117 ndr_print_uint32(ndr, "idle_time", r->idle_time);
3118 ndr->depth--;
3121 static enum ndr_err_code ndr_push_srvsvc_NetSessCtr10(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessCtr10 *r)
3123 uint32_t cntr_array_1;
3124 if (ndr_flags & NDR_SCALARS) {
3125 NDR_CHECK(ndr_push_align(ndr, 5));
3126 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
3127 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
3128 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3130 if (ndr_flags & NDR_BUFFERS) {
3131 if (r->array) {
3132 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
3133 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3134 NDR_CHECK(ndr_push_srvsvc_NetSessInfo10(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
3136 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3137 NDR_CHECK(ndr_push_srvsvc_NetSessInfo10(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
3141 return NDR_ERR_SUCCESS;
3144 static enum ndr_err_code ndr_pull_srvsvc_NetSessCtr10(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr10 *r)
3146 uint32_t _ptr_array;
3147 uint32_t cntr_array_1;
3148 TALLOC_CTX *_mem_save_array_0;
3149 TALLOC_CTX *_mem_save_array_1;
3150 if (ndr_flags & NDR_SCALARS) {
3151 NDR_CHECK(ndr_pull_align(ndr, 5));
3152 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
3153 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
3154 if (_ptr_array) {
3155 NDR_PULL_ALLOC(ndr, r->array);
3156 } else {
3157 r->array = NULL;
3159 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3161 if (ndr_flags & NDR_BUFFERS) {
3162 if (r->array) {
3163 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
3164 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
3165 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
3166 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
3167 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
3168 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
3169 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3170 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo10(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
3172 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3173 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo10(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
3175 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
3176 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
3178 if (r->array) {
3179 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
3182 return NDR_ERR_SUCCESS;
3185 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr10(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr10 *r)
3187 uint32_t cntr_array_1;
3188 ndr_print_struct(ndr, name, "srvsvc_NetSessCtr10");
3189 ndr->depth++;
3190 ndr_print_uint32(ndr, "count", r->count);
3191 ndr_print_ptr(ndr, "array", r->array);
3192 ndr->depth++;
3193 if (r->array) {
3194 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
3195 ndr->depth++;
3196 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
3197 char *idx_1=NULL;
3198 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
3199 ndr_print_srvsvc_NetSessInfo10(ndr, "array", &r->array[cntr_array_1]);
3200 free(idx_1);
3203 ndr->depth--;
3205 ndr->depth--;
3206 ndr->depth--;
3209 static enum ndr_err_code ndr_push_srvsvc_NetSessInfo502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfo502 *r)
3211 if (ndr_flags & NDR_SCALARS) {
3212 NDR_CHECK(ndr_push_align(ndr, 5));
3213 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client));
3214 NDR_CHECK(ndr_push_unique_ptr(ndr, r->user));
3215 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_open));
3216 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->time));
3217 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->idle_time));
3218 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->user_flags));
3219 NDR_CHECK(ndr_push_unique_ptr(ndr, r->client_type));
3220 NDR_CHECK(ndr_push_unique_ptr(ndr, r->transport));
3221 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3223 if (ndr_flags & NDR_BUFFERS) {
3224 if (r->client) {
3225 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
3226 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3227 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client, CH_UTF16)));
3228 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client, ndr_charset_length(r->client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3230 if (r->user) {
3231 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
3232 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3233 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->user, CH_UTF16)));
3234 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->user, ndr_charset_length(r->user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3236 if (r->client_type) {
3237 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client_type, CH_UTF16)));
3238 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3239 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->client_type, CH_UTF16)));
3240 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->client_type, ndr_charset_length(r->client_type, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3242 if (r->transport) {
3243 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->transport, CH_UTF16)));
3244 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3245 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->transport, CH_UTF16)));
3246 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->transport, ndr_charset_length(r->transport, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3249 return NDR_ERR_SUCCESS;
3252 static enum ndr_err_code ndr_pull_srvsvc_NetSessInfo502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfo502 *r)
3254 uint32_t _ptr_client;
3255 TALLOC_CTX *_mem_save_client_0;
3256 uint32_t _ptr_user;
3257 TALLOC_CTX *_mem_save_user_0;
3258 uint32_t _ptr_client_type;
3259 TALLOC_CTX *_mem_save_client_type_0;
3260 uint32_t _ptr_transport;
3261 TALLOC_CTX *_mem_save_transport_0;
3262 if (ndr_flags & NDR_SCALARS) {
3263 NDR_CHECK(ndr_pull_align(ndr, 5));
3264 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
3265 if (_ptr_client) {
3266 NDR_PULL_ALLOC(ndr, r->client);
3267 } else {
3268 r->client = NULL;
3270 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
3271 if (_ptr_user) {
3272 NDR_PULL_ALLOC(ndr, r->user);
3273 } else {
3274 r->user = NULL;
3276 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_open));
3277 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->time));
3278 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->idle_time));
3279 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->user_flags));
3280 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client_type));
3281 if (_ptr_client_type) {
3282 NDR_PULL_ALLOC(ndr, r->client_type);
3283 } else {
3284 r->client_type = NULL;
3286 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_transport));
3287 if (_ptr_transport) {
3288 NDR_PULL_ALLOC(ndr, r->transport);
3289 } else {
3290 r->transport = NULL;
3292 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3294 if (ndr_flags & NDR_BUFFERS) {
3295 if (r->client) {
3296 _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
3297 NDR_PULL_SET_MEM_CTX(ndr, r->client, 0);
3298 NDR_CHECK(ndr_pull_array_size(ndr, &r->client));
3299 NDR_CHECK(ndr_pull_array_length(ndr, &r->client));
3300 if (ndr_get_array_length(ndr, &r->client) > ndr_get_array_size(ndr, &r->client)) {
3301 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->client), ndr_get_array_length(ndr, &r->client));
3303 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->client), sizeof(uint16_t)));
3304 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client, ndr_get_array_length(ndr, &r->client), sizeof(uint16_t), CH_UTF16));
3305 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
3307 if (r->user) {
3308 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
3309 NDR_PULL_SET_MEM_CTX(ndr, r->user, 0);
3310 NDR_CHECK(ndr_pull_array_size(ndr, &r->user));
3311 NDR_CHECK(ndr_pull_array_length(ndr, &r->user));
3312 if (ndr_get_array_length(ndr, &r->user) > ndr_get_array_size(ndr, &r->user)) {
3313 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->user), ndr_get_array_length(ndr, &r->user));
3315 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t)));
3316 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->user, ndr_get_array_length(ndr, &r->user), sizeof(uint16_t), CH_UTF16));
3317 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
3319 if (r->client_type) {
3320 _mem_save_client_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
3321 NDR_PULL_SET_MEM_CTX(ndr, r->client_type, 0);
3322 NDR_CHECK(ndr_pull_array_size(ndr, &r->client_type));
3323 NDR_CHECK(ndr_pull_array_length(ndr, &r->client_type));
3324 if (ndr_get_array_length(ndr, &r->client_type) > ndr_get_array_size(ndr, &r->client_type)) {
3325 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->client_type), ndr_get_array_length(ndr, &r->client_type));
3327 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->client_type), sizeof(uint16_t)));
3328 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->client_type, ndr_get_array_length(ndr, &r->client_type), sizeof(uint16_t), CH_UTF16));
3329 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_type_0, 0);
3331 if (r->transport) {
3332 _mem_save_transport_0 = NDR_PULL_GET_MEM_CTX(ndr);
3333 NDR_PULL_SET_MEM_CTX(ndr, r->transport, 0);
3334 NDR_CHECK(ndr_pull_array_size(ndr, &r->transport));
3335 NDR_CHECK(ndr_pull_array_length(ndr, &r->transport));
3336 if (ndr_get_array_length(ndr, &r->transport) > ndr_get_array_size(ndr, &r->transport)) {
3337 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->transport), ndr_get_array_length(ndr, &r->transport));
3339 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->transport), sizeof(uint16_t)));
3340 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->transport, ndr_get_array_length(ndr, &r->transport), sizeof(uint16_t), CH_UTF16));
3341 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_transport_0, 0);
3344 return NDR_ERR_SUCCESS;
3347 _PUBLIC_ void ndr_print_srvsvc_NetSessInfo502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfo502 *r)
3349 ndr_print_struct(ndr, name, "srvsvc_NetSessInfo502");
3350 ndr->depth++;
3351 ndr_print_ptr(ndr, "client", r->client);
3352 ndr->depth++;
3353 if (r->client) {
3354 ndr_print_string(ndr, "client", r->client);
3356 ndr->depth--;
3357 ndr_print_ptr(ndr, "user", r->user);
3358 ndr->depth++;
3359 if (r->user) {
3360 ndr_print_string(ndr, "user", r->user);
3362 ndr->depth--;
3363 ndr_print_uint32(ndr, "num_open", r->num_open);
3364 ndr_print_uint32(ndr, "time", r->time);
3365 ndr_print_uint32(ndr, "idle_time", r->idle_time);
3366 ndr_print_uint32(ndr, "user_flags", r->user_flags);
3367 ndr_print_ptr(ndr, "client_type", r->client_type);
3368 ndr->depth++;
3369 if (r->client_type) {
3370 ndr_print_string(ndr, "client_type", r->client_type);
3372 ndr->depth--;
3373 ndr_print_ptr(ndr, "transport", r->transport);
3374 ndr->depth++;
3375 if (r->transport) {
3376 ndr_print_string(ndr, "transport", r->transport);
3378 ndr->depth--;
3379 ndr->depth--;
3382 static enum ndr_err_code ndr_push_srvsvc_NetSessCtr502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessCtr502 *r)
3384 uint32_t cntr_array_1;
3385 if (ndr_flags & NDR_SCALARS) {
3386 NDR_CHECK(ndr_push_align(ndr, 5));
3387 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
3388 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
3389 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3391 if (ndr_flags & NDR_BUFFERS) {
3392 if (r->array) {
3393 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
3394 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3395 NDR_CHECK(ndr_push_srvsvc_NetSessInfo502(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
3397 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3398 NDR_CHECK(ndr_push_srvsvc_NetSessInfo502(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
3402 return NDR_ERR_SUCCESS;
3405 static enum ndr_err_code ndr_pull_srvsvc_NetSessCtr502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessCtr502 *r)
3407 uint32_t _ptr_array;
3408 uint32_t cntr_array_1;
3409 TALLOC_CTX *_mem_save_array_0;
3410 TALLOC_CTX *_mem_save_array_1;
3411 if (ndr_flags & NDR_SCALARS) {
3412 NDR_CHECK(ndr_pull_align(ndr, 5));
3413 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
3414 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
3415 if (_ptr_array) {
3416 NDR_PULL_ALLOC(ndr, r->array);
3417 } else {
3418 r->array = NULL;
3420 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3422 if (ndr_flags & NDR_BUFFERS) {
3423 if (r->array) {
3424 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
3425 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
3426 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
3427 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
3428 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
3429 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
3430 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3431 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo502(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
3433 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3434 NDR_CHECK(ndr_pull_srvsvc_NetSessInfo502(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
3436 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
3437 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
3439 if (r->array) {
3440 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
3443 return NDR_ERR_SUCCESS;
3446 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessCtr502 *r)
3448 uint32_t cntr_array_1;
3449 ndr_print_struct(ndr, name, "srvsvc_NetSessCtr502");
3450 ndr->depth++;
3451 ndr_print_uint32(ndr, "count", r->count);
3452 ndr_print_ptr(ndr, "array", r->array);
3453 ndr->depth++;
3454 if (r->array) {
3455 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
3456 ndr->depth++;
3457 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
3458 char *idx_1=NULL;
3459 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
3460 ndr_print_srvsvc_NetSessInfo502(ndr, "array", &r->array[cntr_array_1]);
3461 free(idx_1);
3464 ndr->depth--;
3466 ndr->depth--;
3467 ndr->depth--;
3470 static enum ndr_err_code ndr_push_srvsvc_NetSessCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetSessCtr *r)
3472 if (ndr_flags & NDR_SCALARS) {
3473 int level = ndr_push_get_switch_value(ndr, r);
3474 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
3475 NDR_CHECK(ndr_push_union_align(ndr, 5));
3476 switch (level) {
3477 case 0: {
3478 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0));
3479 break; }
3481 case 1: {
3482 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
3483 break; }
3485 case 2: {
3486 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr2));
3487 break; }
3489 case 10: {
3490 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr10));
3491 break; }
3493 case 502: {
3494 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr502));
3495 break; }
3497 default: {
3498 break; }
3502 if (ndr_flags & NDR_BUFFERS) {
3503 int level = ndr_push_get_switch_value(ndr, r);
3504 switch (level) {
3505 case 0:
3506 if (r->ctr0) {
3507 NDR_CHECK(ndr_push_srvsvc_NetSessCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
3509 break;
3511 case 1:
3512 if (r->ctr1) {
3513 NDR_CHECK(ndr_push_srvsvc_NetSessCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
3515 break;
3517 case 2:
3518 if (r->ctr2) {
3519 NDR_CHECK(ndr_push_srvsvc_NetSessCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
3521 break;
3523 case 10:
3524 if (r->ctr10) {
3525 NDR_CHECK(ndr_push_srvsvc_NetSessCtr10(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr10));
3527 break;
3529 case 502:
3530 if (r->ctr502) {
3531 NDR_CHECK(ndr_push_srvsvc_NetSessCtr502(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr502));
3533 break;
3535 default:
3536 break;
3540 return NDR_ERR_SUCCESS;
3543 static enum ndr_err_code ndr_pull_srvsvc_NetSessCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetSessCtr *r)
3545 int level;
3546 uint32_t _level;
3547 TALLOC_CTX *_mem_save_ctr0_0;
3548 TALLOC_CTX *_mem_save_ctr1_0;
3549 TALLOC_CTX *_mem_save_ctr2_0;
3550 TALLOC_CTX *_mem_save_ctr10_0;
3551 TALLOC_CTX *_mem_save_ctr502_0;
3552 level = ndr_pull_get_switch_value(ndr, r);
3553 if (ndr_flags & NDR_SCALARS) {
3554 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
3555 if (_level != level) {
3556 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
3558 NDR_CHECK(ndr_pull_union_align(ndr, 5));
3559 switch (level) {
3560 case 0: {
3561 uint32_t _ptr_ctr0;
3562 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr0));
3563 if (_ptr_ctr0) {
3564 NDR_PULL_ALLOC(ndr, r->ctr0);
3565 } else {
3566 r->ctr0 = NULL;
3568 break; }
3570 case 1: {
3571 uint32_t _ptr_ctr1;
3572 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
3573 if (_ptr_ctr1) {
3574 NDR_PULL_ALLOC(ndr, r->ctr1);
3575 } else {
3576 r->ctr1 = NULL;
3578 break; }
3580 case 2: {
3581 uint32_t _ptr_ctr2;
3582 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr2));
3583 if (_ptr_ctr2) {
3584 NDR_PULL_ALLOC(ndr, r->ctr2);
3585 } else {
3586 r->ctr2 = NULL;
3588 break; }
3590 case 10: {
3591 uint32_t _ptr_ctr10;
3592 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr10));
3593 if (_ptr_ctr10) {
3594 NDR_PULL_ALLOC(ndr, r->ctr10);
3595 } else {
3596 r->ctr10 = NULL;
3598 break; }
3600 case 502: {
3601 uint32_t _ptr_ctr502;
3602 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr502));
3603 if (_ptr_ctr502) {
3604 NDR_PULL_ALLOC(ndr, r->ctr502);
3605 } else {
3606 r->ctr502 = NULL;
3608 break; }
3610 default: {
3611 break; }
3615 if (ndr_flags & NDR_BUFFERS) {
3616 switch (level) {
3617 case 0:
3618 if (r->ctr0) {
3619 _mem_save_ctr0_0 = NDR_PULL_GET_MEM_CTX(ndr);
3620 NDR_PULL_SET_MEM_CTX(ndr, r->ctr0, 0);
3621 NDR_CHECK(ndr_pull_srvsvc_NetSessCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
3622 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr0_0, 0);
3624 break;
3626 case 1:
3627 if (r->ctr1) {
3628 _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
3629 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
3630 NDR_CHECK(ndr_pull_srvsvc_NetSessCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
3631 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
3633 break;
3635 case 2:
3636 if (r->ctr2) {
3637 _mem_save_ctr2_0 = NDR_PULL_GET_MEM_CTX(ndr);
3638 NDR_PULL_SET_MEM_CTX(ndr, r->ctr2, 0);
3639 NDR_CHECK(ndr_pull_srvsvc_NetSessCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
3640 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr2_0, 0);
3642 break;
3644 case 10:
3645 if (r->ctr10) {
3646 _mem_save_ctr10_0 = NDR_PULL_GET_MEM_CTX(ndr);
3647 NDR_PULL_SET_MEM_CTX(ndr, r->ctr10, 0);
3648 NDR_CHECK(ndr_pull_srvsvc_NetSessCtr10(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr10));
3649 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr10_0, 0);
3651 break;
3653 case 502:
3654 if (r->ctr502) {
3655 _mem_save_ctr502_0 = NDR_PULL_GET_MEM_CTX(ndr);
3656 NDR_PULL_SET_MEM_CTX(ndr, r->ctr502, 0);
3657 NDR_CHECK(ndr_pull_srvsvc_NetSessCtr502(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr502));
3658 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr502_0, 0);
3660 break;
3662 default:
3663 break;
3667 return NDR_ERR_SUCCESS;
3670 _PUBLIC_ void ndr_print_srvsvc_NetSessCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetSessCtr *r)
3672 int level;
3673 level = ndr_print_get_switch_value(ndr, r);
3674 ndr_print_union(ndr, name, level, "srvsvc_NetSessCtr");
3675 switch (level) {
3676 case 0:
3677 ndr_print_ptr(ndr, "ctr0", r->ctr0);
3678 ndr->depth++;
3679 if (r->ctr0) {
3680 ndr_print_srvsvc_NetSessCtr0(ndr, "ctr0", r->ctr0);
3682 ndr->depth--;
3683 break;
3685 case 1:
3686 ndr_print_ptr(ndr, "ctr1", r->ctr1);
3687 ndr->depth++;
3688 if (r->ctr1) {
3689 ndr_print_srvsvc_NetSessCtr1(ndr, "ctr1", r->ctr1);
3691 ndr->depth--;
3692 break;
3694 case 2:
3695 ndr_print_ptr(ndr, "ctr2", r->ctr2);
3696 ndr->depth++;
3697 if (r->ctr2) {
3698 ndr_print_srvsvc_NetSessCtr2(ndr, "ctr2", r->ctr2);
3700 ndr->depth--;
3701 break;
3703 case 10:
3704 ndr_print_ptr(ndr, "ctr10", r->ctr10);
3705 ndr->depth++;
3706 if (r->ctr10) {
3707 ndr_print_srvsvc_NetSessCtr10(ndr, "ctr10", r->ctr10);
3709 ndr->depth--;
3710 break;
3712 case 502:
3713 ndr_print_ptr(ndr, "ctr502", r->ctr502);
3714 ndr->depth++;
3715 if (r->ctr502) {
3716 ndr_print_srvsvc_NetSessCtr502(ndr, "ctr502", r->ctr502);
3718 ndr->depth--;
3719 break;
3721 default:
3722 break;
3727 static enum ndr_err_code ndr_push_srvsvc_NetSessInfoCtr(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSessInfoCtr *r)
3729 if (ndr_flags & NDR_SCALARS) {
3730 NDR_CHECK(ndr_push_align(ndr, 5));
3731 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
3732 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level));
3733 NDR_CHECK(ndr_push_srvsvc_NetSessCtr(ndr, NDR_SCALARS, &r->ctr));
3734 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3736 if (ndr_flags & NDR_BUFFERS) {
3737 NDR_CHECK(ndr_push_srvsvc_NetSessCtr(ndr, NDR_BUFFERS, &r->ctr));
3739 return NDR_ERR_SUCCESS;
3742 static enum ndr_err_code ndr_pull_srvsvc_NetSessInfoCtr(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSessInfoCtr *r)
3744 if (ndr_flags & NDR_SCALARS) {
3745 NDR_CHECK(ndr_pull_align(ndr, 5));
3746 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
3747 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level));
3748 NDR_CHECK(ndr_pull_srvsvc_NetSessCtr(ndr, NDR_SCALARS, &r->ctr));
3749 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3751 if (ndr_flags & NDR_BUFFERS) {
3752 NDR_CHECK(ndr_pull_srvsvc_NetSessCtr(ndr, NDR_BUFFERS, &r->ctr));
3754 return NDR_ERR_SUCCESS;
3757 _PUBLIC_ void ndr_print_srvsvc_NetSessInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSessInfoCtr *r)
3759 ndr_print_struct(ndr, name, "srvsvc_NetSessInfoCtr");
3760 ndr->depth++;
3761 ndr_print_uint32(ndr, "level", r->level);
3762 ndr_print_set_switch_value(ndr, &r->ctr, r->level);
3763 ndr_print_srvsvc_NetSessCtr(ndr, "ctr", &r->ctr);
3764 ndr->depth--;
3767 static enum ndr_err_code ndr_push_srvsvc_ShareType(struct ndr_push *ndr, int ndr_flags, enum srvsvc_ShareType r)
3770 uint32_t _flags_save_ENUM = ndr->flags;
3771 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
3772 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
3773 ndr->flags = _flags_save_ENUM;
3775 return NDR_ERR_SUCCESS;
3778 static enum ndr_err_code ndr_pull_srvsvc_ShareType(struct ndr_pull *ndr, int ndr_flags, enum srvsvc_ShareType *r)
3780 uint32_t v;
3782 uint32_t _flags_save_ENUM = ndr->flags;
3783 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
3784 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
3785 *r = v;
3786 ndr->flags = _flags_save_ENUM;
3788 return NDR_ERR_SUCCESS;
3791 _PUBLIC_ void ndr_print_srvsvc_ShareType(struct ndr_print *ndr, const char *name, enum srvsvc_ShareType r)
3793 const char *val = NULL;
3796 uint32_t _flags_save_ENUM = ndr->flags;
3797 ndr_set_flags(&ndr->flags, LIBNDR_PRINT_ARRAY_HEX);
3798 switch (r) {
3799 case STYPE_DISKTREE: val = "STYPE_DISKTREE"; break;
3800 case STYPE_DISKTREE_TEMPORARY: val = "STYPE_DISKTREE_TEMPORARY"; break;
3801 case STYPE_DISKTREE_HIDDEN: val = "STYPE_DISKTREE_HIDDEN"; break;
3802 case STYPE_PRINTQ: val = "STYPE_PRINTQ"; break;
3803 case STYPE_PRINTQ_TEMPORARY: val = "STYPE_PRINTQ_TEMPORARY"; break;
3804 case STYPE_PRINTQ_HIDDEN: val = "STYPE_PRINTQ_HIDDEN"; break;
3805 case STYPE_DEVICE: val = "STYPE_DEVICE"; break;
3806 case STYPE_DEVICE_TEMPORARY: val = "STYPE_DEVICE_TEMPORARY"; break;
3807 case STYPE_DEVICE_HIDDEN: val = "STYPE_DEVICE_HIDDEN"; break;
3808 case STYPE_IPC: val = "STYPE_IPC"; break;
3809 case STYPE_IPC_TEMPORARY: val = "STYPE_IPC_TEMPORARY"; break;
3810 case STYPE_IPC_HIDDEN: val = "STYPE_IPC_HIDDEN"; break;
3812 ndr_print_enum(ndr, name, "ENUM", val, r);
3813 ndr->flags = _flags_save_ENUM;
3817 static enum ndr_err_code ndr_push_srvsvc_NetShareInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo0 *r)
3819 if (ndr_flags & NDR_SCALARS) {
3820 NDR_CHECK(ndr_push_align(ndr, 5));
3821 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
3822 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3824 if (ndr_flags & NDR_BUFFERS) {
3825 if (r->name) {
3826 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
3827 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3828 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
3829 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3832 return NDR_ERR_SUCCESS;
3835 static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo0 *r)
3837 uint32_t _ptr_name;
3838 TALLOC_CTX *_mem_save_name_0;
3839 if (ndr_flags & NDR_SCALARS) {
3840 NDR_CHECK(ndr_pull_align(ndr, 5));
3841 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
3842 if (_ptr_name) {
3843 NDR_PULL_ALLOC(ndr, r->name);
3844 } else {
3845 r->name = NULL;
3847 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3849 if (ndr_flags & NDR_BUFFERS) {
3850 if (r->name) {
3851 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
3852 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
3853 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
3854 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
3855 if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->name)) {
3856 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->name), ndr_get_array_length(ndr, &r->name));
3858 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t)));
3859 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t), CH_UTF16));
3860 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
3863 return NDR_ERR_SUCCESS;
3866 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo0 *r)
3868 ndr_print_struct(ndr, name, "srvsvc_NetShareInfo0");
3869 ndr->depth++;
3870 ndr_print_ptr(ndr, "name", r->name);
3871 ndr->depth++;
3872 if (r->name) {
3873 ndr_print_string(ndr, "name", r->name);
3875 ndr->depth--;
3876 ndr->depth--;
3879 static enum ndr_err_code ndr_push_srvsvc_NetShareCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr0 *r)
3881 uint32_t cntr_array_1;
3882 if (ndr_flags & NDR_SCALARS) {
3883 NDR_CHECK(ndr_push_align(ndr, 5));
3884 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
3885 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
3886 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3888 if (ndr_flags & NDR_BUFFERS) {
3889 if (r->array) {
3890 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
3891 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3892 NDR_CHECK(ndr_push_srvsvc_NetShareInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
3894 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3895 NDR_CHECK(ndr_push_srvsvc_NetShareInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
3899 return NDR_ERR_SUCCESS;
3902 static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr0 *r)
3904 uint32_t _ptr_array;
3905 uint32_t cntr_array_1;
3906 TALLOC_CTX *_mem_save_array_0;
3907 TALLOC_CTX *_mem_save_array_1;
3908 if (ndr_flags & NDR_SCALARS) {
3909 NDR_CHECK(ndr_pull_align(ndr, 5));
3910 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
3911 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
3912 if (_ptr_array) {
3913 NDR_PULL_ALLOC(ndr, r->array);
3914 } else {
3915 r->array = NULL;
3917 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3919 if (ndr_flags & NDR_BUFFERS) {
3920 if (r->array) {
3921 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
3922 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
3923 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
3924 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
3925 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
3926 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
3927 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3928 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
3930 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
3931 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
3933 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
3934 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
3936 if (r->array) {
3937 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
3940 return NDR_ERR_SUCCESS;
3943 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr0 *r)
3945 uint32_t cntr_array_1;
3946 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr0");
3947 ndr->depth++;
3948 ndr_print_uint32(ndr, "count", r->count);
3949 ndr_print_ptr(ndr, "array", r->array);
3950 ndr->depth++;
3951 if (r->array) {
3952 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
3953 ndr->depth++;
3954 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
3955 char *idx_1=NULL;
3956 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
3957 ndr_print_srvsvc_NetShareInfo0(ndr, "array", &r->array[cntr_array_1]);
3958 free(idx_1);
3961 ndr->depth--;
3963 ndr->depth--;
3964 ndr->depth--;
3967 static enum ndr_err_code ndr_push_srvsvc_NetShareInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo1 *r)
3969 if (ndr_flags & NDR_SCALARS) {
3970 NDR_CHECK(ndr_push_align(ndr, 5));
3971 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
3972 NDR_CHECK(ndr_push_srvsvc_ShareType(ndr, NDR_SCALARS, r->type));
3973 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
3974 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3976 if (ndr_flags & NDR_BUFFERS) {
3977 if (r->name) {
3978 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
3979 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3980 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
3981 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3983 if (r->comment) {
3984 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
3985 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3986 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
3987 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3990 return NDR_ERR_SUCCESS;
3993 static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo1 *r)
3995 uint32_t _ptr_name;
3996 TALLOC_CTX *_mem_save_name_0;
3997 uint32_t _ptr_comment;
3998 TALLOC_CTX *_mem_save_comment_0;
3999 if (ndr_flags & NDR_SCALARS) {
4000 NDR_CHECK(ndr_pull_align(ndr, 5));
4001 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
4002 if (_ptr_name) {
4003 NDR_PULL_ALLOC(ndr, r->name);
4004 } else {
4005 r->name = NULL;
4007 NDR_CHECK(ndr_pull_srvsvc_ShareType(ndr, NDR_SCALARS, &r->type));
4008 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
4009 if (_ptr_comment) {
4010 NDR_PULL_ALLOC(ndr, r->comment);
4011 } else {
4012 r->comment = NULL;
4014 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4016 if (ndr_flags & NDR_BUFFERS) {
4017 if (r->name) {
4018 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4019 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
4020 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
4021 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
4022 if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->name)) {
4023 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->name), ndr_get_array_length(ndr, &r->name));
4025 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t)));
4026 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t), CH_UTF16));
4027 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
4029 if (r->comment) {
4030 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
4031 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
4032 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
4033 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
4034 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
4035 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
4037 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
4038 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
4039 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
4042 return NDR_ERR_SUCCESS;
4045 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1 *r)
4047 ndr_print_struct(ndr, name, "srvsvc_NetShareInfo1");
4048 ndr->depth++;
4049 ndr_print_ptr(ndr, "name", r->name);
4050 ndr->depth++;
4051 if (r->name) {
4052 ndr_print_string(ndr, "name", r->name);
4054 ndr->depth--;
4055 ndr_print_srvsvc_ShareType(ndr, "type", r->type);
4056 ndr_print_ptr(ndr, "comment", r->comment);
4057 ndr->depth++;
4058 if (r->comment) {
4059 ndr_print_string(ndr, "comment", r->comment);
4061 ndr->depth--;
4062 ndr->depth--;
4065 static enum ndr_err_code ndr_push_srvsvc_NetShareCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1 *r)
4067 uint32_t cntr_array_1;
4068 if (ndr_flags & NDR_SCALARS) {
4069 NDR_CHECK(ndr_push_align(ndr, 5));
4070 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4071 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
4072 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4074 if (ndr_flags & NDR_BUFFERS) {
4075 if (r->array) {
4076 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
4077 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4078 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4080 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4081 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
4085 return NDR_ERR_SUCCESS;
4088 static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1 *r)
4090 uint32_t _ptr_array;
4091 uint32_t cntr_array_1;
4092 TALLOC_CTX *_mem_save_array_0;
4093 TALLOC_CTX *_mem_save_array_1;
4094 if (ndr_flags & NDR_SCALARS) {
4095 NDR_CHECK(ndr_pull_align(ndr, 5));
4096 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4097 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
4098 if (_ptr_array) {
4099 NDR_PULL_ALLOC(ndr, r->array);
4100 } else {
4101 r->array = NULL;
4103 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4105 if (ndr_flags & NDR_BUFFERS) {
4106 if (r->array) {
4107 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
4108 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4109 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
4110 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
4111 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
4112 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4113 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4114 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4116 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4117 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
4119 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
4120 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
4122 if (r->array) {
4123 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
4126 return NDR_ERR_SUCCESS;
4129 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1 *r)
4131 uint32_t cntr_array_1;
4132 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr1");
4133 ndr->depth++;
4134 ndr_print_uint32(ndr, "count", r->count);
4135 ndr_print_ptr(ndr, "array", r->array);
4136 ndr->depth++;
4137 if (r->array) {
4138 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
4139 ndr->depth++;
4140 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
4141 char *idx_1=NULL;
4142 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
4143 ndr_print_srvsvc_NetShareInfo1(ndr, "array", &r->array[cntr_array_1]);
4144 free(idx_1);
4147 ndr->depth--;
4149 ndr->depth--;
4150 ndr->depth--;
4153 static enum ndr_err_code ndr_push_srvsvc_NetShareInfo2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo2 *r)
4155 if (ndr_flags & NDR_SCALARS) {
4156 NDR_CHECK(ndr_push_align(ndr, 5));
4157 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
4158 NDR_CHECK(ndr_push_srvsvc_ShareType(ndr, NDR_SCALARS, r->type));
4159 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
4160 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->permissions));
4161 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_users));
4162 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->current_users));
4163 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
4164 NDR_CHECK(ndr_push_unique_ptr(ndr, r->password));
4165 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4167 if (ndr_flags & NDR_BUFFERS) {
4168 if (r->name) {
4169 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
4170 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4171 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
4172 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4174 if (r->comment) {
4175 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
4176 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4177 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
4178 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4180 if (r->path) {
4181 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
4182 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4183 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
4184 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4186 if (r->password) {
4187 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->password, CH_UTF16)));
4188 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4189 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->password, CH_UTF16)));
4190 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->password, ndr_charset_length(r->password, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4193 return NDR_ERR_SUCCESS;
4196 static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo2 *r)
4198 uint32_t _ptr_name;
4199 TALLOC_CTX *_mem_save_name_0;
4200 uint32_t _ptr_comment;
4201 TALLOC_CTX *_mem_save_comment_0;
4202 uint32_t _ptr_path;
4203 TALLOC_CTX *_mem_save_path_0;
4204 uint32_t _ptr_password;
4205 TALLOC_CTX *_mem_save_password_0;
4206 if (ndr_flags & NDR_SCALARS) {
4207 NDR_CHECK(ndr_pull_align(ndr, 5));
4208 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
4209 if (_ptr_name) {
4210 NDR_PULL_ALLOC(ndr, r->name);
4211 } else {
4212 r->name = NULL;
4214 NDR_CHECK(ndr_pull_srvsvc_ShareType(ndr, NDR_SCALARS, &r->type));
4215 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
4216 if (_ptr_comment) {
4217 NDR_PULL_ALLOC(ndr, r->comment);
4218 } else {
4219 r->comment = NULL;
4221 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->permissions));
4222 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_users));
4223 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->current_users));
4224 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
4225 if (_ptr_path) {
4226 NDR_PULL_ALLOC(ndr, r->path);
4227 } else {
4228 r->path = NULL;
4230 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
4231 if (_ptr_password) {
4232 NDR_PULL_ALLOC(ndr, r->password);
4233 } else {
4234 r->password = NULL;
4236 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4238 if (ndr_flags & NDR_BUFFERS) {
4239 if (r->name) {
4240 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4241 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
4242 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
4243 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
4244 if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->name)) {
4245 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->name), ndr_get_array_length(ndr, &r->name));
4247 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t)));
4248 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t), CH_UTF16));
4249 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
4251 if (r->comment) {
4252 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
4253 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
4254 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
4255 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
4256 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
4257 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
4259 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
4260 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
4261 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
4263 if (r->path) {
4264 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
4265 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
4266 NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
4267 NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
4268 if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) {
4269 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->path), ndr_get_array_length(ndr, &r->path));
4271 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t)));
4272 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16));
4273 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
4275 if (r->password) {
4276 _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
4277 NDR_PULL_SET_MEM_CTX(ndr, r->password, 0);
4278 NDR_CHECK(ndr_pull_array_size(ndr, &r->password));
4279 NDR_CHECK(ndr_pull_array_length(ndr, &r->password));
4280 if (ndr_get_array_length(ndr, &r->password) > ndr_get_array_size(ndr, &r->password)) {
4281 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->password), ndr_get_array_length(ndr, &r->password));
4283 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->password), sizeof(uint16_t)));
4284 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->password, ndr_get_array_length(ndr, &r->password), sizeof(uint16_t), CH_UTF16));
4285 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
4288 return NDR_ERR_SUCCESS;
4291 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo2 *r)
4293 ndr_print_struct(ndr, name, "srvsvc_NetShareInfo2");
4294 ndr->depth++;
4295 ndr_print_ptr(ndr, "name", r->name);
4296 ndr->depth++;
4297 if (r->name) {
4298 ndr_print_string(ndr, "name", r->name);
4300 ndr->depth--;
4301 ndr_print_srvsvc_ShareType(ndr, "type", r->type);
4302 ndr_print_ptr(ndr, "comment", r->comment);
4303 ndr->depth++;
4304 if (r->comment) {
4305 ndr_print_string(ndr, "comment", r->comment);
4307 ndr->depth--;
4308 ndr_print_uint32(ndr, "permissions", r->permissions);
4309 ndr_print_uint32(ndr, "max_users", r->max_users);
4310 ndr_print_uint32(ndr, "current_users", r->current_users);
4311 ndr_print_ptr(ndr, "path", r->path);
4312 ndr->depth++;
4313 if (r->path) {
4314 ndr_print_string(ndr, "path", r->path);
4316 ndr->depth--;
4317 ndr_print_ptr(ndr, "password", r->password);
4318 ndr->depth++;
4319 if (r->password) {
4320 ndr_print_string(ndr, "password", r->password);
4322 ndr->depth--;
4323 ndr->depth--;
4326 static enum ndr_err_code ndr_push_srvsvc_NetShareCtr2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr2 *r)
4328 uint32_t cntr_array_1;
4329 if (ndr_flags & NDR_SCALARS) {
4330 NDR_CHECK(ndr_push_align(ndr, 5));
4331 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4332 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
4333 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4335 if (ndr_flags & NDR_BUFFERS) {
4336 if (r->array) {
4337 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
4338 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4339 NDR_CHECK(ndr_push_srvsvc_NetShareInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4341 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4342 NDR_CHECK(ndr_push_srvsvc_NetShareInfo2(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
4346 return NDR_ERR_SUCCESS;
4349 static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr2 *r)
4351 uint32_t _ptr_array;
4352 uint32_t cntr_array_1;
4353 TALLOC_CTX *_mem_save_array_0;
4354 TALLOC_CTX *_mem_save_array_1;
4355 if (ndr_flags & NDR_SCALARS) {
4356 NDR_CHECK(ndr_pull_align(ndr, 5));
4357 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4358 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
4359 if (_ptr_array) {
4360 NDR_PULL_ALLOC(ndr, r->array);
4361 } else {
4362 r->array = NULL;
4364 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4366 if (ndr_flags & NDR_BUFFERS) {
4367 if (r->array) {
4368 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
4369 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4370 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
4371 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
4372 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
4373 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4374 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4375 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4377 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4378 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo2(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
4380 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
4381 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
4383 if (r->array) {
4384 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
4387 return NDR_ERR_SUCCESS;
4390 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr2 *r)
4392 uint32_t cntr_array_1;
4393 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr2");
4394 ndr->depth++;
4395 ndr_print_uint32(ndr, "count", r->count);
4396 ndr_print_ptr(ndr, "array", r->array);
4397 ndr->depth++;
4398 if (r->array) {
4399 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
4400 ndr->depth++;
4401 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
4402 char *idx_1=NULL;
4403 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
4404 ndr_print_srvsvc_NetShareInfo2(ndr, "array", &r->array[cntr_array_1]);
4405 free(idx_1);
4408 ndr->depth--;
4410 ndr->depth--;
4411 ndr->depth--;
4414 static enum ndr_err_code ndr_push_srvsvc_NetShareInfo501(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo501 *r)
4416 if (ndr_flags & NDR_SCALARS) {
4417 NDR_CHECK(ndr_push_align(ndr, 5));
4418 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
4419 NDR_CHECK(ndr_push_srvsvc_ShareType(ndr, NDR_SCALARS, r->type));
4420 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
4421 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->csc_policy));
4422 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4424 if (ndr_flags & NDR_BUFFERS) {
4425 if (r->name) {
4426 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
4427 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4428 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
4429 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4431 if (r->comment) {
4432 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
4433 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4434 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
4435 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4438 return NDR_ERR_SUCCESS;
4441 static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo501(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo501 *r)
4443 uint32_t _ptr_name;
4444 TALLOC_CTX *_mem_save_name_0;
4445 uint32_t _ptr_comment;
4446 TALLOC_CTX *_mem_save_comment_0;
4447 if (ndr_flags & NDR_SCALARS) {
4448 NDR_CHECK(ndr_pull_align(ndr, 5));
4449 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
4450 if (_ptr_name) {
4451 NDR_PULL_ALLOC(ndr, r->name);
4452 } else {
4453 r->name = NULL;
4455 NDR_CHECK(ndr_pull_srvsvc_ShareType(ndr, NDR_SCALARS, &r->type));
4456 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
4457 if (_ptr_comment) {
4458 NDR_PULL_ALLOC(ndr, r->comment);
4459 } else {
4460 r->comment = NULL;
4462 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->csc_policy));
4463 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4465 if (ndr_flags & NDR_BUFFERS) {
4466 if (r->name) {
4467 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4468 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
4469 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
4470 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
4471 if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->name)) {
4472 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->name), ndr_get_array_length(ndr, &r->name));
4474 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t)));
4475 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t), CH_UTF16));
4476 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
4478 if (r->comment) {
4479 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
4480 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
4481 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
4482 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
4483 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
4484 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
4486 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
4487 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
4488 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
4491 return NDR_ERR_SUCCESS;
4494 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo501(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo501 *r)
4496 ndr_print_struct(ndr, name, "srvsvc_NetShareInfo501");
4497 ndr->depth++;
4498 ndr_print_ptr(ndr, "name", r->name);
4499 ndr->depth++;
4500 if (r->name) {
4501 ndr_print_string(ndr, "name", r->name);
4503 ndr->depth--;
4504 ndr_print_srvsvc_ShareType(ndr, "type", r->type);
4505 ndr_print_ptr(ndr, "comment", r->comment);
4506 ndr->depth++;
4507 if (r->comment) {
4508 ndr_print_string(ndr, "comment", r->comment);
4510 ndr->depth--;
4511 ndr_print_uint32(ndr, "csc_policy", r->csc_policy);
4512 ndr->depth--;
4515 static enum ndr_err_code ndr_push_srvsvc_NetShareCtr501(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr501 *r)
4517 uint32_t cntr_array_1;
4518 if (ndr_flags & NDR_SCALARS) {
4519 NDR_CHECK(ndr_push_align(ndr, 5));
4520 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4521 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
4522 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4524 if (ndr_flags & NDR_BUFFERS) {
4525 if (r->array) {
4526 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
4527 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4528 NDR_CHECK(ndr_push_srvsvc_NetShareInfo501(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4530 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4531 NDR_CHECK(ndr_push_srvsvc_NetShareInfo501(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
4535 return NDR_ERR_SUCCESS;
4538 static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr501(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr501 *r)
4540 uint32_t _ptr_array;
4541 uint32_t cntr_array_1;
4542 TALLOC_CTX *_mem_save_array_0;
4543 TALLOC_CTX *_mem_save_array_1;
4544 if (ndr_flags & NDR_SCALARS) {
4545 NDR_CHECK(ndr_pull_align(ndr, 5));
4546 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4547 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
4548 if (_ptr_array) {
4549 NDR_PULL_ALLOC(ndr, r->array);
4550 } else {
4551 r->array = NULL;
4553 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4555 if (ndr_flags & NDR_BUFFERS) {
4556 if (r->array) {
4557 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
4558 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4559 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
4560 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
4561 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
4562 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4563 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4564 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo501(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4566 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4567 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo501(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
4569 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
4570 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
4572 if (r->array) {
4573 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
4576 return NDR_ERR_SUCCESS;
4579 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr501(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr501 *r)
4581 uint32_t cntr_array_1;
4582 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr501");
4583 ndr->depth++;
4584 ndr_print_uint32(ndr, "count", r->count);
4585 ndr_print_ptr(ndr, "array", r->array);
4586 ndr->depth++;
4587 if (r->array) {
4588 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
4589 ndr->depth++;
4590 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
4591 char *idx_1=NULL;
4592 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
4593 ndr_print_srvsvc_NetShareInfo501(ndr, "array", &r->array[cntr_array_1]);
4594 free(idx_1);
4597 ndr->depth--;
4599 ndr->depth--;
4600 ndr->depth--;
4603 static enum ndr_err_code ndr_push_srvsvc_NetShareInfo502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo502 *r)
4605 if (ndr_flags & NDR_SCALARS) {
4606 NDR_CHECK(ndr_push_align(ndr, 5));
4607 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
4608 NDR_CHECK(ndr_push_srvsvc_ShareType(ndr, NDR_SCALARS, r->type));
4609 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
4610 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->permissions));
4611 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_users));
4612 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->current_users));
4613 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
4614 NDR_CHECK(ndr_push_unique_ptr(ndr, r->password));
4615 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->sd_buf));
4616 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4618 if (ndr_flags & NDR_BUFFERS) {
4619 if (r->name) {
4620 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
4621 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4622 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
4623 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4625 if (r->comment) {
4626 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
4627 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4628 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
4629 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4631 if (r->path) {
4632 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
4633 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4634 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
4635 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4637 if (r->password) {
4638 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->password, CH_UTF16)));
4639 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4640 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->password, CH_UTF16)));
4641 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->password, ndr_charset_length(r->password, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4643 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->sd_buf));
4645 return NDR_ERR_SUCCESS;
4648 static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo502 *r)
4650 uint32_t _ptr_name;
4651 TALLOC_CTX *_mem_save_name_0;
4652 uint32_t _ptr_comment;
4653 TALLOC_CTX *_mem_save_comment_0;
4654 uint32_t _ptr_path;
4655 TALLOC_CTX *_mem_save_path_0;
4656 uint32_t _ptr_password;
4657 TALLOC_CTX *_mem_save_password_0;
4658 if (ndr_flags & NDR_SCALARS) {
4659 NDR_CHECK(ndr_pull_align(ndr, 5));
4660 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
4661 if (_ptr_name) {
4662 NDR_PULL_ALLOC(ndr, r->name);
4663 } else {
4664 r->name = NULL;
4666 NDR_CHECK(ndr_pull_srvsvc_ShareType(ndr, NDR_SCALARS, &r->type));
4667 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
4668 if (_ptr_comment) {
4669 NDR_PULL_ALLOC(ndr, r->comment);
4670 } else {
4671 r->comment = NULL;
4673 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->permissions));
4674 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_users));
4675 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->current_users));
4676 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
4677 if (_ptr_path) {
4678 NDR_PULL_ALLOC(ndr, r->path);
4679 } else {
4680 r->path = NULL;
4682 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_password));
4683 if (_ptr_password) {
4684 NDR_PULL_ALLOC(ndr, r->password);
4685 } else {
4686 r->password = NULL;
4688 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->sd_buf));
4689 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4691 if (ndr_flags & NDR_BUFFERS) {
4692 if (r->name) {
4693 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
4694 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
4695 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
4696 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
4697 if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->name)) {
4698 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->name), ndr_get_array_length(ndr, &r->name));
4700 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t)));
4701 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t), CH_UTF16));
4702 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
4704 if (r->comment) {
4705 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
4706 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
4707 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
4708 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
4709 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
4710 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
4712 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
4713 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
4714 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
4716 if (r->path) {
4717 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
4718 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
4719 NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
4720 NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
4721 if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) {
4722 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->path), ndr_get_array_length(ndr, &r->path));
4724 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t)));
4725 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16));
4726 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
4728 if (r->password) {
4729 _mem_save_password_0 = NDR_PULL_GET_MEM_CTX(ndr);
4730 NDR_PULL_SET_MEM_CTX(ndr, r->password, 0);
4731 NDR_CHECK(ndr_pull_array_size(ndr, &r->password));
4732 NDR_CHECK(ndr_pull_array_length(ndr, &r->password));
4733 if (ndr_get_array_length(ndr, &r->password) > ndr_get_array_size(ndr, &r->password)) {
4734 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->password), ndr_get_array_length(ndr, &r->password));
4736 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->password), sizeof(uint16_t)));
4737 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->password, ndr_get_array_length(ndr, &r->password), sizeof(uint16_t), CH_UTF16));
4738 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_password_0, 0);
4740 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->sd_buf));
4742 return NDR_ERR_SUCCESS;
4745 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo502 *r)
4747 ndr_print_struct(ndr, name, "srvsvc_NetShareInfo502");
4748 ndr->depth++;
4749 ndr_print_ptr(ndr, "name", r->name);
4750 ndr->depth++;
4751 if (r->name) {
4752 ndr_print_string(ndr, "name", r->name);
4754 ndr->depth--;
4755 ndr_print_srvsvc_ShareType(ndr, "type", r->type);
4756 ndr_print_ptr(ndr, "comment", r->comment);
4757 ndr->depth++;
4758 if (r->comment) {
4759 ndr_print_string(ndr, "comment", r->comment);
4761 ndr->depth--;
4762 ndr_print_uint32(ndr, "permissions", r->permissions);
4763 ndr_print_uint32(ndr, "max_users", r->max_users);
4764 ndr_print_uint32(ndr, "current_users", r->current_users);
4765 ndr_print_ptr(ndr, "path", r->path);
4766 ndr->depth++;
4767 if (r->path) {
4768 ndr_print_string(ndr, "path", r->path);
4770 ndr->depth--;
4771 ndr_print_ptr(ndr, "password", r->password);
4772 ndr->depth++;
4773 if (r->password) {
4774 ndr_print_string(ndr, "password", r->password);
4776 ndr->depth--;
4777 ndr_print_sec_desc_buf(ndr, "sd_buf", &r->sd_buf);
4778 ndr->depth--;
4781 static enum ndr_err_code ndr_push_srvsvc_NetShareCtr502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr502 *r)
4783 uint32_t cntr_array_1;
4784 if (ndr_flags & NDR_SCALARS) {
4785 NDR_CHECK(ndr_push_align(ndr, 5));
4786 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4787 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
4788 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4790 if (ndr_flags & NDR_BUFFERS) {
4791 if (r->array) {
4792 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
4793 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4794 NDR_CHECK(ndr_push_srvsvc_NetShareInfo502(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4796 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4797 NDR_CHECK(ndr_push_srvsvc_NetShareInfo502(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
4801 return NDR_ERR_SUCCESS;
4804 static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr502 *r)
4806 uint32_t _ptr_array;
4807 uint32_t cntr_array_1;
4808 TALLOC_CTX *_mem_save_array_0;
4809 TALLOC_CTX *_mem_save_array_1;
4810 if (ndr_flags & NDR_SCALARS) {
4811 NDR_CHECK(ndr_pull_align(ndr, 5));
4812 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4813 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
4814 if (_ptr_array) {
4815 NDR_PULL_ALLOC(ndr, r->array);
4816 } else {
4817 r->array = NULL;
4819 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4821 if (ndr_flags & NDR_BUFFERS) {
4822 if (r->array) {
4823 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
4824 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4825 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
4826 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
4827 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
4828 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4829 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4830 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo502(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4832 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4833 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo502(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
4835 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
4836 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
4838 if (r->array) {
4839 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
4842 return NDR_ERR_SUCCESS;
4845 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr502 *r)
4847 uint32_t cntr_array_1;
4848 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr502");
4849 ndr->depth++;
4850 ndr_print_uint32(ndr, "count", r->count);
4851 ndr_print_ptr(ndr, "array", r->array);
4852 ndr->depth++;
4853 if (r->array) {
4854 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
4855 ndr->depth++;
4856 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
4857 char *idx_1=NULL;
4858 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
4859 ndr_print_srvsvc_NetShareInfo502(ndr, "array", &r->array[cntr_array_1]);
4860 free(idx_1);
4863 ndr->depth--;
4865 ndr->depth--;
4866 ndr->depth--;
4869 static enum ndr_err_code ndr_push_srvsvc_NetShareInfo1004(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo1004 *r)
4871 if (ndr_flags & NDR_SCALARS) {
4872 NDR_CHECK(ndr_push_align(ndr, 5));
4873 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
4874 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4876 if (ndr_flags & NDR_BUFFERS) {
4877 if (r->comment) {
4878 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
4879 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4880 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
4881 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4884 return NDR_ERR_SUCCESS;
4887 static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo1004(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo1004 *r)
4889 uint32_t _ptr_comment;
4890 TALLOC_CTX *_mem_save_comment_0;
4891 if (ndr_flags & NDR_SCALARS) {
4892 NDR_CHECK(ndr_pull_align(ndr, 5));
4893 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
4894 if (_ptr_comment) {
4895 NDR_PULL_ALLOC(ndr, r->comment);
4896 } else {
4897 r->comment = NULL;
4899 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4901 if (ndr_flags & NDR_BUFFERS) {
4902 if (r->comment) {
4903 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
4904 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
4905 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
4906 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
4907 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
4908 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
4910 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
4911 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
4912 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
4915 return NDR_ERR_SUCCESS;
4918 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1004(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1004 *r)
4920 ndr_print_struct(ndr, name, "srvsvc_NetShareInfo1004");
4921 ndr->depth++;
4922 ndr_print_ptr(ndr, "comment", r->comment);
4923 ndr->depth++;
4924 if (r->comment) {
4925 ndr_print_string(ndr, "comment", r->comment);
4927 ndr->depth--;
4928 ndr->depth--;
4931 static enum ndr_err_code ndr_push_srvsvc_NetShareCtr1004(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1004 *r)
4933 uint32_t cntr_array_1;
4934 if (ndr_flags & NDR_SCALARS) {
4935 NDR_CHECK(ndr_push_align(ndr, 5));
4936 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
4937 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
4938 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
4940 if (ndr_flags & NDR_BUFFERS) {
4941 if (r->array) {
4942 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
4943 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4944 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1004(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4946 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4947 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1004(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
4951 return NDR_ERR_SUCCESS;
4954 static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr1004(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1004 *r)
4956 uint32_t _ptr_array;
4957 uint32_t cntr_array_1;
4958 TALLOC_CTX *_mem_save_array_0;
4959 TALLOC_CTX *_mem_save_array_1;
4960 if (ndr_flags & NDR_SCALARS) {
4961 NDR_CHECK(ndr_pull_align(ndr, 5));
4962 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
4963 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
4964 if (_ptr_array) {
4965 NDR_PULL_ALLOC(ndr, r->array);
4966 } else {
4967 r->array = NULL;
4969 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
4971 if (ndr_flags & NDR_BUFFERS) {
4972 if (r->array) {
4973 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
4974 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4975 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
4976 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
4977 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
4978 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
4979 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4980 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1004(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
4982 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
4983 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1004(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
4985 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
4986 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
4988 if (r->array) {
4989 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
4992 return NDR_ERR_SUCCESS;
4995 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1004(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1004 *r)
4997 uint32_t cntr_array_1;
4998 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr1004");
4999 ndr->depth++;
5000 ndr_print_uint32(ndr, "count", r->count);
5001 ndr_print_ptr(ndr, "array", r->array);
5002 ndr->depth++;
5003 if (r->array) {
5004 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
5005 ndr->depth++;
5006 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
5007 char *idx_1=NULL;
5008 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
5009 ndr_print_srvsvc_NetShareInfo1004(ndr, "array", &r->array[cntr_array_1]);
5010 free(idx_1);
5013 ndr->depth--;
5015 ndr->depth--;
5016 ndr->depth--;
5019 static enum ndr_err_code ndr_push_NetShareInfo1005Flags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
5021 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
5022 return NDR_ERR_SUCCESS;
5025 static enum ndr_err_code ndr_pull_NetShareInfo1005Flags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
5027 uint32_t v;
5028 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
5029 *r = v;
5030 return NDR_ERR_SUCCESS;
5033 _PUBLIC_ void ndr_print_NetShareInfo1005Flags(struct ndr_print *ndr, const char *name, uint32_t r)
5035 ndr_print_uint32(ndr, name, r);
5036 ndr->depth++;
5037 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SHARE_1005_IN_DFS", SHARE_1005_IN_DFS, r);
5038 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "SHARE_1005_DFS_ROOT", SHARE_1005_DFS_ROOT, r);
5039 ndr->depth--;
5042 static enum ndr_err_code ndr_push_srvsvc_NetShareInfo1005(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo1005 *r)
5044 if (ndr_flags & NDR_SCALARS) {
5045 NDR_CHECK(ndr_push_align(ndr, 4));
5046 NDR_CHECK(ndr_push_NetShareInfo1005Flags(ndr, NDR_SCALARS, r->dfs_flags));
5047 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
5049 if (ndr_flags & NDR_BUFFERS) {
5051 return NDR_ERR_SUCCESS;
5054 static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo1005(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo1005 *r)
5056 if (ndr_flags & NDR_SCALARS) {
5057 NDR_CHECK(ndr_pull_align(ndr, 4));
5058 NDR_CHECK(ndr_pull_NetShareInfo1005Flags(ndr, NDR_SCALARS, &r->dfs_flags));
5059 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
5061 if (ndr_flags & NDR_BUFFERS) {
5063 return NDR_ERR_SUCCESS;
5066 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1005(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1005 *r)
5068 ndr_print_struct(ndr, name, "srvsvc_NetShareInfo1005");
5069 ndr->depth++;
5070 ndr_print_NetShareInfo1005Flags(ndr, "dfs_flags", r->dfs_flags);
5071 ndr->depth--;
5074 static enum ndr_err_code ndr_push_srvsvc_NetShareCtr1005(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1005 *r)
5076 uint32_t cntr_array_1;
5077 if (ndr_flags & NDR_SCALARS) {
5078 NDR_CHECK(ndr_push_align(ndr, 5));
5079 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
5080 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
5081 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
5083 if (ndr_flags & NDR_BUFFERS) {
5084 if (r->array) {
5085 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
5086 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
5087 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1005(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
5091 return NDR_ERR_SUCCESS;
5094 static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr1005(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1005 *r)
5096 uint32_t _ptr_array;
5097 uint32_t cntr_array_1;
5098 TALLOC_CTX *_mem_save_array_0;
5099 TALLOC_CTX *_mem_save_array_1;
5100 if (ndr_flags & NDR_SCALARS) {
5101 NDR_CHECK(ndr_pull_align(ndr, 5));
5102 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
5103 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
5104 if (_ptr_array) {
5105 NDR_PULL_ALLOC(ndr, r->array);
5106 } else {
5107 r->array = NULL;
5109 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
5111 if (ndr_flags & NDR_BUFFERS) {
5112 if (r->array) {
5113 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
5114 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
5115 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
5116 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
5117 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
5118 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
5119 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
5120 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1005(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
5122 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
5123 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
5125 if (r->array) {
5126 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
5129 return NDR_ERR_SUCCESS;
5132 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1005(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1005 *r)
5134 uint32_t cntr_array_1;
5135 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr1005");
5136 ndr->depth++;
5137 ndr_print_uint32(ndr, "count", r->count);
5138 ndr_print_ptr(ndr, "array", r->array);
5139 ndr->depth++;
5140 if (r->array) {
5141 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
5142 ndr->depth++;
5143 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
5144 char *idx_1=NULL;
5145 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
5146 ndr_print_srvsvc_NetShareInfo1005(ndr, "array", &r->array[cntr_array_1]);
5147 free(idx_1);
5150 ndr->depth--;
5152 ndr->depth--;
5153 ndr->depth--;
5156 static enum ndr_err_code ndr_push_srvsvc_NetShareInfo1006(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo1006 *r)
5158 if (ndr_flags & NDR_SCALARS) {
5159 NDR_CHECK(ndr_push_align(ndr, 4));
5160 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->max_users));
5161 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
5163 if (ndr_flags & NDR_BUFFERS) {
5165 return NDR_ERR_SUCCESS;
5168 static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo1006(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo1006 *r)
5170 if (ndr_flags & NDR_SCALARS) {
5171 NDR_CHECK(ndr_pull_align(ndr, 4));
5172 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->max_users));
5173 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
5175 if (ndr_flags & NDR_BUFFERS) {
5177 return NDR_ERR_SUCCESS;
5180 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1006(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1006 *r)
5182 ndr_print_struct(ndr, name, "srvsvc_NetShareInfo1006");
5183 ndr->depth++;
5184 ndr_print_uint32(ndr, "max_users", r->max_users);
5185 ndr->depth--;
5188 static enum ndr_err_code ndr_push_srvsvc_NetShareCtr1006(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1006 *r)
5190 uint32_t cntr_array_1;
5191 if (ndr_flags & NDR_SCALARS) {
5192 NDR_CHECK(ndr_push_align(ndr, 5));
5193 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
5194 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
5195 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
5197 if (ndr_flags & NDR_BUFFERS) {
5198 if (r->array) {
5199 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
5200 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
5201 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1006(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
5205 return NDR_ERR_SUCCESS;
5208 static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr1006(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1006 *r)
5210 uint32_t _ptr_array;
5211 uint32_t cntr_array_1;
5212 TALLOC_CTX *_mem_save_array_0;
5213 TALLOC_CTX *_mem_save_array_1;
5214 if (ndr_flags & NDR_SCALARS) {
5215 NDR_CHECK(ndr_pull_align(ndr, 5));
5216 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
5217 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
5218 if (_ptr_array) {
5219 NDR_PULL_ALLOC(ndr, r->array);
5220 } else {
5221 r->array = NULL;
5223 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
5225 if (ndr_flags & NDR_BUFFERS) {
5226 if (r->array) {
5227 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
5228 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
5229 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
5230 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
5231 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
5232 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
5233 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
5234 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1006(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
5236 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
5237 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
5239 if (r->array) {
5240 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
5243 return NDR_ERR_SUCCESS;
5246 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1006(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1006 *r)
5248 uint32_t cntr_array_1;
5249 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr1006");
5250 ndr->depth++;
5251 ndr_print_uint32(ndr, "count", r->count);
5252 ndr_print_ptr(ndr, "array", r->array);
5253 ndr->depth++;
5254 if (r->array) {
5255 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
5256 ndr->depth++;
5257 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
5258 char *idx_1=NULL;
5259 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
5260 ndr_print_srvsvc_NetShareInfo1006(ndr, "array", &r->array[cntr_array_1]);
5261 free(idx_1);
5264 ndr->depth--;
5266 ndr->depth--;
5267 ndr->depth--;
5270 static enum ndr_err_code ndr_push_srvsvc_NetShareInfo1007(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfo1007 *r)
5272 if (ndr_flags & NDR_SCALARS) {
5273 NDR_CHECK(ndr_push_align(ndr, 5));
5274 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->flags));
5275 NDR_CHECK(ndr_push_unique_ptr(ndr, r->alternate_directory_name));
5276 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
5278 if (ndr_flags & NDR_BUFFERS) {
5279 if (r->alternate_directory_name) {
5280 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->alternate_directory_name, CH_UTF16)));
5281 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5282 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->alternate_directory_name, CH_UTF16)));
5283 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));
5286 return NDR_ERR_SUCCESS;
5289 static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo1007(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfo1007 *r)
5291 uint32_t _ptr_alternate_directory_name;
5292 TALLOC_CTX *_mem_save_alternate_directory_name_0;
5293 if (ndr_flags & NDR_SCALARS) {
5294 NDR_CHECK(ndr_pull_align(ndr, 5));
5295 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->flags));
5296 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_alternate_directory_name));
5297 if (_ptr_alternate_directory_name) {
5298 NDR_PULL_ALLOC(ndr, r->alternate_directory_name);
5299 } else {
5300 r->alternate_directory_name = NULL;
5302 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
5304 if (ndr_flags & NDR_BUFFERS) {
5305 if (r->alternate_directory_name) {
5306 _mem_save_alternate_directory_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
5307 NDR_PULL_SET_MEM_CTX(ndr, r->alternate_directory_name, 0);
5308 NDR_CHECK(ndr_pull_array_size(ndr, &r->alternate_directory_name));
5309 NDR_CHECK(ndr_pull_array_length(ndr, &r->alternate_directory_name));
5310 if (ndr_get_array_length(ndr, &r->alternate_directory_name) > ndr_get_array_size(ndr, &r->alternate_directory_name)) {
5311 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->alternate_directory_name), ndr_get_array_length(ndr, &r->alternate_directory_name));
5313 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->alternate_directory_name), sizeof(uint16_t)));
5314 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->alternate_directory_name, ndr_get_array_length(ndr, &r->alternate_directory_name), sizeof(uint16_t), CH_UTF16));
5315 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alternate_directory_name_0, 0);
5318 return NDR_ERR_SUCCESS;
5321 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo1007(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfo1007 *r)
5323 ndr_print_struct(ndr, name, "srvsvc_NetShareInfo1007");
5324 ndr->depth++;
5325 ndr_print_uint32(ndr, "flags", r->flags);
5326 ndr_print_ptr(ndr, "alternate_directory_name", r->alternate_directory_name);
5327 ndr->depth++;
5328 if (r->alternate_directory_name) {
5329 ndr_print_string(ndr, "alternate_directory_name", r->alternate_directory_name);
5331 ndr->depth--;
5332 ndr->depth--;
5335 static enum ndr_err_code ndr_push_srvsvc_NetShareCtr1007(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1007 *r)
5337 uint32_t cntr_array_1;
5338 if (ndr_flags & NDR_SCALARS) {
5339 NDR_CHECK(ndr_push_align(ndr, 5));
5340 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
5341 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
5342 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
5344 if (ndr_flags & NDR_BUFFERS) {
5345 if (r->array) {
5346 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
5347 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
5348 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1007(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
5350 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
5351 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1007(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
5355 return NDR_ERR_SUCCESS;
5358 static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr1007(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1007 *r)
5360 uint32_t _ptr_array;
5361 uint32_t cntr_array_1;
5362 TALLOC_CTX *_mem_save_array_0;
5363 TALLOC_CTX *_mem_save_array_1;
5364 if (ndr_flags & NDR_SCALARS) {
5365 NDR_CHECK(ndr_pull_align(ndr, 5));
5366 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
5367 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
5368 if (_ptr_array) {
5369 NDR_PULL_ALLOC(ndr, r->array);
5370 } else {
5371 r->array = NULL;
5373 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
5375 if (ndr_flags & NDR_BUFFERS) {
5376 if (r->array) {
5377 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
5378 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
5379 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
5380 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
5381 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
5382 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
5383 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
5384 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1007(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
5386 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
5387 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1007(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
5389 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
5390 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
5392 if (r->array) {
5393 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
5396 return NDR_ERR_SUCCESS;
5399 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1007(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1007 *r)
5401 uint32_t cntr_array_1;
5402 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr1007");
5403 ndr->depth++;
5404 ndr_print_uint32(ndr, "count", r->count);
5405 ndr_print_ptr(ndr, "array", r->array);
5406 ndr->depth++;
5407 if (r->array) {
5408 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
5409 ndr->depth++;
5410 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
5411 char *idx_1=NULL;
5412 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
5413 ndr_print_srvsvc_NetShareInfo1007(ndr, "array", &r->array[cntr_array_1]);
5414 free(idx_1);
5417 ndr->depth--;
5419 ndr->depth--;
5420 ndr->depth--;
5423 static enum ndr_err_code ndr_push_srvsvc_NetShareCtr1501(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareCtr1501 *r)
5425 uint32_t cntr_array_1;
5426 if (ndr_flags & NDR_SCALARS) {
5427 NDR_CHECK(ndr_push_align(ndr, 5));
5428 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
5429 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
5430 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
5432 if (ndr_flags & NDR_BUFFERS) {
5433 if (r->array) {
5434 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
5435 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
5436 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
5438 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
5439 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
5443 return NDR_ERR_SUCCESS;
5446 static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr1501(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareCtr1501 *r)
5448 uint32_t _ptr_array;
5449 uint32_t cntr_array_1;
5450 TALLOC_CTX *_mem_save_array_0;
5451 TALLOC_CTX *_mem_save_array_1;
5452 if (ndr_flags & NDR_SCALARS) {
5453 NDR_CHECK(ndr_pull_align(ndr, 5));
5454 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
5455 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
5456 if (_ptr_array) {
5457 NDR_PULL_ALLOC(ndr, r->array);
5458 } else {
5459 r->array = NULL;
5461 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
5463 if (ndr_flags & NDR_BUFFERS) {
5464 if (r->array) {
5465 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
5466 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
5467 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
5468 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
5469 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
5470 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
5471 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
5472 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
5474 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
5475 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
5477 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
5478 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
5480 if (r->array) {
5481 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
5484 return NDR_ERR_SUCCESS;
5487 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr1501(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareCtr1501 *r)
5489 uint32_t cntr_array_1;
5490 ndr_print_struct(ndr, name, "srvsvc_NetShareCtr1501");
5491 ndr->depth++;
5492 ndr_print_uint32(ndr, "count", r->count);
5493 ndr_print_ptr(ndr, "array", r->array);
5494 ndr->depth++;
5495 if (r->array) {
5496 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
5497 ndr->depth++;
5498 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
5499 char *idx_1=NULL;
5500 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
5501 ndr_print_sec_desc_buf(ndr, "array", &r->array[cntr_array_1]);
5502 free(idx_1);
5505 ndr->depth--;
5507 ndr->depth--;
5508 ndr->depth--;
5511 static enum ndr_err_code ndr_push_srvsvc_NetShareInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetShareInfo *r)
5513 if (ndr_flags & NDR_SCALARS) {
5514 int level = ndr_push_get_switch_value(ndr, r);
5515 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
5516 NDR_CHECK(ndr_push_union_align(ndr, 5));
5517 switch (level) {
5518 case 0: {
5519 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
5520 break; }
5522 case 1: {
5523 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
5524 break; }
5526 case 2: {
5527 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
5528 break; }
5530 case 501: {
5531 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info501));
5532 break; }
5534 case 502: {
5535 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info502));
5536 break; }
5538 case 1004: {
5539 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1004));
5540 break; }
5542 case 1005: {
5543 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1005));
5544 break; }
5546 case 1006: {
5547 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1006));
5548 break; }
5550 case 1007: {
5551 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1007));
5552 break; }
5554 case 1501: {
5555 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1501));
5556 break; }
5558 default: {
5559 break; }
5563 if (ndr_flags & NDR_BUFFERS) {
5564 int level = ndr_push_get_switch_value(ndr, r);
5565 switch (level) {
5566 case 0:
5567 if (r->info0) {
5568 NDR_CHECK(ndr_push_srvsvc_NetShareInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
5570 break;
5572 case 1:
5573 if (r->info1) {
5574 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
5576 break;
5578 case 2:
5579 if (r->info2) {
5580 NDR_CHECK(ndr_push_srvsvc_NetShareInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
5582 break;
5584 case 501:
5585 if (r->info501) {
5586 NDR_CHECK(ndr_push_srvsvc_NetShareInfo501(ndr, NDR_SCALARS|NDR_BUFFERS, r->info501));
5588 break;
5590 case 502:
5591 if (r->info502) {
5592 NDR_CHECK(ndr_push_srvsvc_NetShareInfo502(ndr, NDR_SCALARS|NDR_BUFFERS, r->info502));
5594 break;
5596 case 1004:
5597 if (r->info1004) {
5598 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1004(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1004));
5600 break;
5602 case 1005:
5603 if (r->info1005) {
5604 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1005(ndr, NDR_SCALARS, r->info1005));
5606 break;
5608 case 1006:
5609 if (r->info1006) {
5610 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1006(ndr, NDR_SCALARS, r->info1006));
5612 break;
5614 case 1007:
5615 if (r->info1007) {
5616 NDR_CHECK(ndr_push_srvsvc_NetShareInfo1007(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1007));
5618 break;
5620 case 1501:
5621 if (r->info1501) {
5622 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1501));
5624 break;
5626 default:
5627 break;
5631 return NDR_ERR_SUCCESS;
5634 static enum ndr_err_code ndr_pull_srvsvc_NetShareInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetShareInfo *r)
5636 int level;
5637 uint32_t _level;
5638 TALLOC_CTX *_mem_save_info0_0;
5639 TALLOC_CTX *_mem_save_info1_0;
5640 TALLOC_CTX *_mem_save_info2_0;
5641 TALLOC_CTX *_mem_save_info501_0;
5642 TALLOC_CTX *_mem_save_info502_0;
5643 TALLOC_CTX *_mem_save_info1004_0;
5644 TALLOC_CTX *_mem_save_info1005_0;
5645 TALLOC_CTX *_mem_save_info1006_0;
5646 TALLOC_CTX *_mem_save_info1007_0;
5647 TALLOC_CTX *_mem_save_info1501_0;
5648 level = ndr_pull_get_switch_value(ndr, r);
5649 if (ndr_flags & NDR_SCALARS) {
5650 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
5651 if (_level != level) {
5652 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
5654 NDR_CHECK(ndr_pull_union_align(ndr, 5));
5655 switch (level) {
5656 case 0: {
5657 uint32_t _ptr_info0;
5658 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
5659 if (_ptr_info0) {
5660 NDR_PULL_ALLOC(ndr, r->info0);
5661 } else {
5662 r->info0 = NULL;
5664 break; }
5666 case 1: {
5667 uint32_t _ptr_info1;
5668 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
5669 if (_ptr_info1) {
5670 NDR_PULL_ALLOC(ndr, r->info1);
5671 } else {
5672 r->info1 = NULL;
5674 break; }
5676 case 2: {
5677 uint32_t _ptr_info2;
5678 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
5679 if (_ptr_info2) {
5680 NDR_PULL_ALLOC(ndr, r->info2);
5681 } else {
5682 r->info2 = NULL;
5684 break; }
5686 case 501: {
5687 uint32_t _ptr_info501;
5688 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info501));
5689 if (_ptr_info501) {
5690 NDR_PULL_ALLOC(ndr, r->info501);
5691 } else {
5692 r->info501 = NULL;
5694 break; }
5696 case 502: {
5697 uint32_t _ptr_info502;
5698 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info502));
5699 if (_ptr_info502) {
5700 NDR_PULL_ALLOC(ndr, r->info502);
5701 } else {
5702 r->info502 = NULL;
5704 break; }
5706 case 1004: {
5707 uint32_t _ptr_info1004;
5708 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1004));
5709 if (_ptr_info1004) {
5710 NDR_PULL_ALLOC(ndr, r->info1004);
5711 } else {
5712 r->info1004 = NULL;
5714 break; }
5716 case 1005: {
5717 uint32_t _ptr_info1005;
5718 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1005));
5719 if (_ptr_info1005) {
5720 NDR_PULL_ALLOC(ndr, r->info1005);
5721 } else {
5722 r->info1005 = NULL;
5724 break; }
5726 case 1006: {
5727 uint32_t _ptr_info1006;
5728 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1006));
5729 if (_ptr_info1006) {
5730 NDR_PULL_ALLOC(ndr, r->info1006);
5731 } else {
5732 r->info1006 = NULL;
5734 break; }
5736 case 1007: {
5737 uint32_t _ptr_info1007;
5738 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1007));
5739 if (_ptr_info1007) {
5740 NDR_PULL_ALLOC(ndr, r->info1007);
5741 } else {
5742 r->info1007 = NULL;
5744 break; }
5746 case 1501: {
5747 uint32_t _ptr_info1501;
5748 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1501));
5749 if (_ptr_info1501) {
5750 NDR_PULL_ALLOC(ndr, r->info1501);
5751 } else {
5752 r->info1501 = NULL;
5754 break; }
5756 default: {
5757 break; }
5761 if (ndr_flags & NDR_BUFFERS) {
5762 switch (level) {
5763 case 0:
5764 if (r->info0) {
5765 _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
5766 NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
5767 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->info0));
5768 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
5770 break;
5772 case 1:
5773 if (r->info1) {
5774 _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
5775 NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
5776 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
5777 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
5779 break;
5781 case 2:
5782 if (r->info2) {
5783 _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
5784 NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
5785 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
5786 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
5788 break;
5790 case 501:
5791 if (r->info501) {
5792 _mem_save_info501_0 = NDR_PULL_GET_MEM_CTX(ndr);
5793 NDR_PULL_SET_MEM_CTX(ndr, r->info501, 0);
5794 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo501(ndr, NDR_SCALARS|NDR_BUFFERS, r->info501));
5795 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info501_0, 0);
5797 break;
5799 case 502:
5800 if (r->info502) {
5801 _mem_save_info502_0 = NDR_PULL_GET_MEM_CTX(ndr);
5802 NDR_PULL_SET_MEM_CTX(ndr, r->info502, 0);
5803 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo502(ndr, NDR_SCALARS|NDR_BUFFERS, r->info502));
5804 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info502_0, 0);
5806 break;
5808 case 1004:
5809 if (r->info1004) {
5810 _mem_save_info1004_0 = NDR_PULL_GET_MEM_CTX(ndr);
5811 NDR_PULL_SET_MEM_CTX(ndr, r->info1004, 0);
5812 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1004(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1004));
5813 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1004_0, 0);
5815 break;
5817 case 1005:
5818 if (r->info1005) {
5819 _mem_save_info1005_0 = NDR_PULL_GET_MEM_CTX(ndr);
5820 NDR_PULL_SET_MEM_CTX(ndr, r->info1005, 0);
5821 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1005(ndr, NDR_SCALARS, r->info1005));
5822 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1005_0, 0);
5824 break;
5826 case 1006:
5827 if (r->info1006) {
5828 _mem_save_info1006_0 = NDR_PULL_GET_MEM_CTX(ndr);
5829 NDR_PULL_SET_MEM_CTX(ndr, r->info1006, 0);
5830 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1006(ndr, NDR_SCALARS, r->info1006));
5831 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1006_0, 0);
5833 break;
5835 case 1007:
5836 if (r->info1007) {
5837 _mem_save_info1007_0 = NDR_PULL_GET_MEM_CTX(ndr);
5838 NDR_PULL_SET_MEM_CTX(ndr, r->info1007, 0);
5839 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo1007(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1007));
5840 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1007_0, 0);
5842 break;
5844 case 1501:
5845 if (r->info1501) {
5846 _mem_save_info1501_0 = NDR_PULL_GET_MEM_CTX(ndr);
5847 NDR_PULL_SET_MEM_CTX(ndr, r->info1501, 0);
5848 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1501));
5849 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1501_0, 0);
5851 break;
5853 default:
5854 break;
5858 return NDR_ERR_SUCCESS;
5861 _PUBLIC_ void ndr_print_srvsvc_NetShareInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetShareInfo *r)
5863 int level;
5864 level = ndr_print_get_switch_value(ndr, r);
5865 ndr_print_union(ndr, name, level, "srvsvc_NetShareInfo");
5866 switch (level) {
5867 case 0:
5868 ndr_print_ptr(ndr, "info0", r->info0);
5869 ndr->depth++;
5870 if (r->info0) {
5871 ndr_print_srvsvc_NetShareInfo0(ndr, "info0", r->info0);
5873 ndr->depth--;
5874 break;
5876 case 1:
5877 ndr_print_ptr(ndr, "info1", r->info1);
5878 ndr->depth++;
5879 if (r->info1) {
5880 ndr_print_srvsvc_NetShareInfo1(ndr, "info1", r->info1);
5882 ndr->depth--;
5883 break;
5885 case 2:
5886 ndr_print_ptr(ndr, "info2", r->info2);
5887 ndr->depth++;
5888 if (r->info2) {
5889 ndr_print_srvsvc_NetShareInfo2(ndr, "info2", r->info2);
5891 ndr->depth--;
5892 break;
5894 case 501:
5895 ndr_print_ptr(ndr, "info501", r->info501);
5896 ndr->depth++;
5897 if (r->info501) {
5898 ndr_print_srvsvc_NetShareInfo501(ndr, "info501", r->info501);
5900 ndr->depth--;
5901 break;
5903 case 502:
5904 ndr_print_ptr(ndr, "info502", r->info502);
5905 ndr->depth++;
5906 if (r->info502) {
5907 ndr_print_srvsvc_NetShareInfo502(ndr, "info502", r->info502);
5909 ndr->depth--;
5910 break;
5912 case 1004:
5913 ndr_print_ptr(ndr, "info1004", r->info1004);
5914 ndr->depth++;
5915 if (r->info1004) {
5916 ndr_print_srvsvc_NetShareInfo1004(ndr, "info1004", r->info1004);
5918 ndr->depth--;
5919 break;
5921 case 1005:
5922 ndr_print_ptr(ndr, "info1005", r->info1005);
5923 ndr->depth++;
5924 if (r->info1005) {
5925 ndr_print_srvsvc_NetShareInfo1005(ndr, "info1005", r->info1005);
5927 ndr->depth--;
5928 break;
5930 case 1006:
5931 ndr_print_ptr(ndr, "info1006", r->info1006);
5932 ndr->depth++;
5933 if (r->info1006) {
5934 ndr_print_srvsvc_NetShareInfo1006(ndr, "info1006", r->info1006);
5936 ndr->depth--;
5937 break;
5939 case 1007:
5940 ndr_print_ptr(ndr, "info1007", r->info1007);
5941 ndr->depth++;
5942 if (r->info1007) {
5943 ndr_print_srvsvc_NetShareInfo1007(ndr, "info1007", r->info1007);
5945 ndr->depth--;
5946 break;
5948 case 1501:
5949 ndr_print_ptr(ndr, "info1501", r->info1501);
5950 ndr->depth++;
5951 if (r->info1501) {
5952 ndr_print_sec_desc_buf(ndr, "info1501", r->info1501);
5954 ndr->depth--;
5955 break;
5957 default:
5958 break;
5963 static enum ndr_err_code ndr_push_srvsvc_NetShareCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetShareCtr *r)
5965 if (ndr_flags & NDR_SCALARS) {
5966 int level = ndr_push_get_switch_value(ndr, r);
5967 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
5968 NDR_CHECK(ndr_push_union_align(ndr, 5));
5969 switch (level) {
5970 case 0: {
5971 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0));
5972 break; }
5974 case 1: {
5975 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
5976 break; }
5978 case 2: {
5979 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr2));
5980 break; }
5982 case 501: {
5983 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr501));
5984 break; }
5986 case 502: {
5987 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr502));
5988 break; }
5990 case 1004: {
5991 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1004));
5992 break; }
5994 case 1005: {
5995 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1005));
5996 break; }
5998 case 1006: {
5999 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1006));
6000 break; }
6002 case 1007: {
6003 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1007));
6004 break; }
6006 case 1501: {
6007 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1501));
6008 break; }
6010 default: {
6011 break; }
6015 if (ndr_flags & NDR_BUFFERS) {
6016 int level = ndr_push_get_switch_value(ndr, r);
6017 switch (level) {
6018 case 0:
6019 if (r->ctr0) {
6020 NDR_CHECK(ndr_push_srvsvc_NetShareCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
6022 break;
6024 case 1:
6025 if (r->ctr1) {
6026 NDR_CHECK(ndr_push_srvsvc_NetShareCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
6028 break;
6030 case 2:
6031 if (r->ctr2) {
6032 NDR_CHECK(ndr_push_srvsvc_NetShareCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
6034 break;
6036 case 501:
6037 if (r->ctr501) {
6038 NDR_CHECK(ndr_push_srvsvc_NetShareCtr501(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr501));
6040 break;
6042 case 502:
6043 if (r->ctr502) {
6044 NDR_CHECK(ndr_push_srvsvc_NetShareCtr502(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr502));
6046 break;
6048 case 1004:
6049 if (r->ctr1004) {
6050 NDR_CHECK(ndr_push_srvsvc_NetShareCtr1004(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1004));
6052 break;
6054 case 1005:
6055 if (r->ctr1005) {
6056 NDR_CHECK(ndr_push_srvsvc_NetShareCtr1005(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1005));
6058 break;
6060 case 1006:
6061 if (r->ctr1006) {
6062 NDR_CHECK(ndr_push_srvsvc_NetShareCtr1006(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1006));
6064 break;
6066 case 1007:
6067 if (r->ctr1007) {
6068 NDR_CHECK(ndr_push_srvsvc_NetShareCtr1007(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1007));
6070 break;
6072 case 1501:
6073 if (r->ctr1501) {
6074 NDR_CHECK(ndr_push_srvsvc_NetShareCtr1501(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1501));
6076 break;
6078 default:
6079 break;
6083 return NDR_ERR_SUCCESS;
6086 static enum ndr_err_code ndr_pull_srvsvc_NetShareCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetShareCtr *r)
6088 int level;
6089 uint32_t _level;
6090 TALLOC_CTX *_mem_save_ctr0_0;
6091 TALLOC_CTX *_mem_save_ctr1_0;
6092 TALLOC_CTX *_mem_save_ctr2_0;
6093 TALLOC_CTX *_mem_save_ctr501_0;
6094 TALLOC_CTX *_mem_save_ctr502_0;
6095 TALLOC_CTX *_mem_save_ctr1004_0;
6096 TALLOC_CTX *_mem_save_ctr1005_0;
6097 TALLOC_CTX *_mem_save_ctr1006_0;
6098 TALLOC_CTX *_mem_save_ctr1007_0;
6099 TALLOC_CTX *_mem_save_ctr1501_0;
6100 level = ndr_pull_get_switch_value(ndr, r);
6101 if (ndr_flags & NDR_SCALARS) {
6102 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
6103 if (_level != level) {
6104 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
6106 NDR_CHECK(ndr_pull_union_align(ndr, 5));
6107 switch (level) {
6108 case 0: {
6109 uint32_t _ptr_ctr0;
6110 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr0));
6111 if (_ptr_ctr0) {
6112 NDR_PULL_ALLOC(ndr, r->ctr0);
6113 } else {
6114 r->ctr0 = NULL;
6116 break; }
6118 case 1: {
6119 uint32_t _ptr_ctr1;
6120 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
6121 if (_ptr_ctr1) {
6122 NDR_PULL_ALLOC(ndr, r->ctr1);
6123 } else {
6124 r->ctr1 = NULL;
6126 break; }
6128 case 2: {
6129 uint32_t _ptr_ctr2;
6130 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr2));
6131 if (_ptr_ctr2) {
6132 NDR_PULL_ALLOC(ndr, r->ctr2);
6133 } else {
6134 r->ctr2 = NULL;
6136 break; }
6138 case 501: {
6139 uint32_t _ptr_ctr501;
6140 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr501));
6141 if (_ptr_ctr501) {
6142 NDR_PULL_ALLOC(ndr, r->ctr501);
6143 } else {
6144 r->ctr501 = NULL;
6146 break; }
6148 case 502: {
6149 uint32_t _ptr_ctr502;
6150 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr502));
6151 if (_ptr_ctr502) {
6152 NDR_PULL_ALLOC(ndr, r->ctr502);
6153 } else {
6154 r->ctr502 = NULL;
6156 break; }
6158 case 1004: {
6159 uint32_t _ptr_ctr1004;
6160 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1004));
6161 if (_ptr_ctr1004) {
6162 NDR_PULL_ALLOC(ndr, r->ctr1004);
6163 } else {
6164 r->ctr1004 = NULL;
6166 break; }
6168 case 1005: {
6169 uint32_t _ptr_ctr1005;
6170 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1005));
6171 if (_ptr_ctr1005) {
6172 NDR_PULL_ALLOC(ndr, r->ctr1005);
6173 } else {
6174 r->ctr1005 = NULL;
6176 break; }
6178 case 1006: {
6179 uint32_t _ptr_ctr1006;
6180 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1006));
6181 if (_ptr_ctr1006) {
6182 NDR_PULL_ALLOC(ndr, r->ctr1006);
6183 } else {
6184 r->ctr1006 = NULL;
6186 break; }
6188 case 1007: {
6189 uint32_t _ptr_ctr1007;
6190 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1007));
6191 if (_ptr_ctr1007) {
6192 NDR_PULL_ALLOC(ndr, r->ctr1007);
6193 } else {
6194 r->ctr1007 = NULL;
6196 break; }
6198 case 1501: {
6199 uint32_t _ptr_ctr1501;
6200 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1501));
6201 if (_ptr_ctr1501) {
6202 NDR_PULL_ALLOC(ndr, r->ctr1501);
6203 } else {
6204 r->ctr1501 = NULL;
6206 break; }
6208 default: {
6209 break; }
6213 if (ndr_flags & NDR_BUFFERS) {
6214 switch (level) {
6215 case 0:
6216 if (r->ctr0) {
6217 _mem_save_ctr0_0 = NDR_PULL_GET_MEM_CTX(ndr);
6218 NDR_PULL_SET_MEM_CTX(ndr, r->ctr0, 0);
6219 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
6220 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr0_0, 0);
6222 break;
6224 case 1:
6225 if (r->ctr1) {
6226 _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
6227 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
6228 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
6229 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
6231 break;
6233 case 2:
6234 if (r->ctr2) {
6235 _mem_save_ctr2_0 = NDR_PULL_GET_MEM_CTX(ndr);
6236 NDR_PULL_SET_MEM_CTX(ndr, r->ctr2, 0);
6237 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
6238 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr2_0, 0);
6240 break;
6242 case 501:
6243 if (r->ctr501) {
6244 _mem_save_ctr501_0 = NDR_PULL_GET_MEM_CTX(ndr);
6245 NDR_PULL_SET_MEM_CTX(ndr, r->ctr501, 0);
6246 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr501(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr501));
6247 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr501_0, 0);
6249 break;
6251 case 502:
6252 if (r->ctr502) {
6253 _mem_save_ctr502_0 = NDR_PULL_GET_MEM_CTX(ndr);
6254 NDR_PULL_SET_MEM_CTX(ndr, r->ctr502, 0);
6255 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr502(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr502));
6256 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr502_0, 0);
6258 break;
6260 case 1004:
6261 if (r->ctr1004) {
6262 _mem_save_ctr1004_0 = NDR_PULL_GET_MEM_CTX(ndr);
6263 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1004, 0);
6264 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr1004(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1004));
6265 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1004_0, 0);
6267 break;
6269 case 1005:
6270 if (r->ctr1005) {
6271 _mem_save_ctr1005_0 = NDR_PULL_GET_MEM_CTX(ndr);
6272 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1005, 0);
6273 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr1005(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1005));
6274 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1005_0, 0);
6276 break;
6278 case 1006:
6279 if (r->ctr1006) {
6280 _mem_save_ctr1006_0 = NDR_PULL_GET_MEM_CTX(ndr);
6281 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1006, 0);
6282 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr1006(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1006));
6283 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1006_0, 0);
6285 break;
6287 case 1007:
6288 if (r->ctr1007) {
6289 _mem_save_ctr1007_0 = NDR_PULL_GET_MEM_CTX(ndr);
6290 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1007, 0);
6291 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr1007(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1007));
6292 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1007_0, 0);
6294 break;
6296 case 1501:
6297 if (r->ctr1501) {
6298 _mem_save_ctr1501_0 = NDR_PULL_GET_MEM_CTX(ndr);
6299 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1501, 0);
6300 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr1501(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1501));
6301 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1501_0, 0);
6303 break;
6305 default:
6306 break;
6310 return NDR_ERR_SUCCESS;
6313 _PUBLIC_ void ndr_print_srvsvc_NetShareCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetShareCtr *r)
6315 int level;
6316 level = ndr_print_get_switch_value(ndr, r);
6317 ndr_print_union(ndr, name, level, "srvsvc_NetShareCtr");
6318 switch (level) {
6319 case 0:
6320 ndr_print_ptr(ndr, "ctr0", r->ctr0);
6321 ndr->depth++;
6322 if (r->ctr0) {
6323 ndr_print_srvsvc_NetShareCtr0(ndr, "ctr0", r->ctr0);
6325 ndr->depth--;
6326 break;
6328 case 1:
6329 ndr_print_ptr(ndr, "ctr1", r->ctr1);
6330 ndr->depth++;
6331 if (r->ctr1) {
6332 ndr_print_srvsvc_NetShareCtr1(ndr, "ctr1", r->ctr1);
6334 ndr->depth--;
6335 break;
6337 case 2:
6338 ndr_print_ptr(ndr, "ctr2", r->ctr2);
6339 ndr->depth++;
6340 if (r->ctr2) {
6341 ndr_print_srvsvc_NetShareCtr2(ndr, "ctr2", r->ctr2);
6343 ndr->depth--;
6344 break;
6346 case 501:
6347 ndr_print_ptr(ndr, "ctr501", r->ctr501);
6348 ndr->depth++;
6349 if (r->ctr501) {
6350 ndr_print_srvsvc_NetShareCtr501(ndr, "ctr501", r->ctr501);
6352 ndr->depth--;
6353 break;
6355 case 502:
6356 ndr_print_ptr(ndr, "ctr502", r->ctr502);
6357 ndr->depth++;
6358 if (r->ctr502) {
6359 ndr_print_srvsvc_NetShareCtr502(ndr, "ctr502", r->ctr502);
6361 ndr->depth--;
6362 break;
6364 case 1004:
6365 ndr_print_ptr(ndr, "ctr1004", r->ctr1004);
6366 ndr->depth++;
6367 if (r->ctr1004) {
6368 ndr_print_srvsvc_NetShareCtr1004(ndr, "ctr1004", r->ctr1004);
6370 ndr->depth--;
6371 break;
6373 case 1005:
6374 ndr_print_ptr(ndr, "ctr1005", r->ctr1005);
6375 ndr->depth++;
6376 if (r->ctr1005) {
6377 ndr_print_srvsvc_NetShareCtr1005(ndr, "ctr1005", r->ctr1005);
6379 ndr->depth--;
6380 break;
6382 case 1006:
6383 ndr_print_ptr(ndr, "ctr1006", r->ctr1006);
6384 ndr->depth++;
6385 if (r->ctr1006) {
6386 ndr_print_srvsvc_NetShareCtr1006(ndr, "ctr1006", r->ctr1006);
6388 ndr->depth--;
6389 break;
6391 case 1007:
6392 ndr_print_ptr(ndr, "ctr1007", r->ctr1007);
6393 ndr->depth++;
6394 if (r->ctr1007) {
6395 ndr_print_srvsvc_NetShareCtr1007(ndr, "ctr1007", r->ctr1007);
6397 ndr->depth--;
6398 break;
6400 case 1501:
6401 ndr_print_ptr(ndr, "ctr1501", r->ctr1501);
6402 ndr->depth++;
6403 if (r->ctr1501) {
6404 ndr_print_srvsvc_NetShareCtr1501(ndr, "ctr1501", r->ctr1501);
6406 ndr->depth--;
6407 break;
6409 default:
6410 break;
6415 static enum ndr_err_code ndr_push_srvsvc_NetShareInfoCtr(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetShareInfoCtr *r)
6417 if (ndr_flags & NDR_SCALARS) {
6418 NDR_CHECK(ndr_push_align(ndr, 5));
6419 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
6420 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level));
6421 NDR_CHECK(ndr_push_srvsvc_NetShareCtr(ndr, NDR_SCALARS, &r->ctr));
6422 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
6424 if (ndr_flags & NDR_BUFFERS) {
6425 NDR_CHECK(ndr_push_srvsvc_NetShareCtr(ndr, NDR_BUFFERS, &r->ctr));
6427 return NDR_ERR_SUCCESS;
6430 static enum ndr_err_code ndr_pull_srvsvc_NetShareInfoCtr(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetShareInfoCtr *r)
6432 if (ndr_flags & NDR_SCALARS) {
6433 NDR_CHECK(ndr_pull_align(ndr, 5));
6434 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
6435 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level));
6436 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr(ndr, NDR_SCALARS, &r->ctr));
6437 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
6439 if (ndr_flags & NDR_BUFFERS) {
6440 NDR_CHECK(ndr_pull_srvsvc_NetShareCtr(ndr, NDR_BUFFERS, &r->ctr));
6442 return NDR_ERR_SUCCESS;
6445 _PUBLIC_ void ndr_print_srvsvc_NetShareInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetShareInfoCtr *r)
6447 ndr_print_struct(ndr, name, "srvsvc_NetShareInfoCtr");
6448 ndr->depth++;
6449 ndr_print_uint32(ndr, "level", r->level);
6450 ndr_print_set_switch_value(ndr, &r->ctr, r->level);
6451 ndr_print_srvsvc_NetShareCtr(ndr, "ctr", &r->ctr);
6452 ndr->depth--;
6455 _PUBLIC_ enum ndr_err_code ndr_push_srvsvc_PlatformId(struct ndr_push *ndr, int ndr_flags, enum srvsvc_PlatformId r)
6457 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
6458 return NDR_ERR_SUCCESS;
6461 _PUBLIC_ enum ndr_err_code ndr_pull_srvsvc_PlatformId(struct ndr_pull *ndr, int ndr_flags, enum srvsvc_PlatformId *r)
6463 uint32_t v;
6464 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
6465 *r = v;
6466 return NDR_ERR_SUCCESS;
6469 _PUBLIC_ void ndr_print_srvsvc_PlatformId(struct ndr_print *ndr, const char *name, enum srvsvc_PlatformId r)
6471 const char *val = NULL;
6473 switch (r) {
6474 case PLATFORM_ID_DOS: val = "PLATFORM_ID_DOS"; break;
6475 case PLATFORM_ID_OS2: val = "PLATFORM_ID_OS2"; break;
6476 case PLATFORM_ID_NT: val = "PLATFORM_ID_NT"; break;
6477 case PLATFORM_ID_OSF: val = "PLATFORM_ID_OSF"; break;
6478 case PLATFORM_ID_VMS: val = "PLATFORM_ID_VMS"; break;
6480 ndr_print_enum(ndr, name, "ENUM", val, r);
6483 _PUBLIC_ enum ndr_err_code ndr_push_srvsvc_NetSrvInfo100(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo100 *r)
6485 if (ndr_flags & NDR_SCALARS) {
6486 NDR_CHECK(ndr_push_align(ndr, 5));
6487 NDR_CHECK(ndr_push_srvsvc_PlatformId(ndr, NDR_SCALARS, r->platform_id));
6488 NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_name));
6489 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
6491 if (ndr_flags & NDR_BUFFERS) {
6492 if (r->server_name) {
6493 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
6494 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6495 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
6496 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server_name, ndr_charset_length(r->server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6499 return NDR_ERR_SUCCESS;
6502 _PUBLIC_ enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo100(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo100 *r)
6504 uint32_t _ptr_server_name;
6505 TALLOC_CTX *_mem_save_server_name_0;
6506 if (ndr_flags & NDR_SCALARS) {
6507 NDR_CHECK(ndr_pull_align(ndr, 5));
6508 NDR_CHECK(ndr_pull_srvsvc_PlatformId(ndr, NDR_SCALARS, &r->platform_id));
6509 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
6510 if (_ptr_server_name) {
6511 NDR_PULL_ALLOC(ndr, r->server_name);
6512 } else {
6513 r->server_name = NULL;
6515 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
6517 if (ndr_flags & NDR_BUFFERS) {
6518 if (r->server_name) {
6519 _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6520 NDR_PULL_SET_MEM_CTX(ndr, r->server_name, 0);
6521 NDR_CHECK(ndr_pull_array_size(ndr, &r->server_name));
6522 NDR_CHECK(ndr_pull_array_length(ndr, &r->server_name));
6523 if (ndr_get_array_length(ndr, &r->server_name) > ndr_get_array_size(ndr, &r->server_name)) {
6524 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->server_name), ndr_get_array_length(ndr, &r->server_name));
6526 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->server_name), sizeof(uint16_t)));
6527 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server_name, ndr_get_array_length(ndr, &r->server_name), sizeof(uint16_t), CH_UTF16));
6528 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
6531 return NDR_ERR_SUCCESS;
6534 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo100(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo100 *r)
6536 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo100");
6537 ndr->depth++;
6538 ndr_print_srvsvc_PlatformId(ndr, "platform_id", r->platform_id);
6539 ndr_print_ptr(ndr, "server_name", r->server_name);
6540 ndr->depth++;
6541 if (r->server_name) {
6542 ndr_print_string(ndr, "server_name", r->server_name);
6544 ndr->depth--;
6545 ndr->depth--;
6548 _PUBLIC_ enum ndr_err_code ndr_push_srvsvc_NetSrvInfo101(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo101 *r)
6550 if (ndr_flags & NDR_SCALARS) {
6551 NDR_CHECK(ndr_push_align(ndr, 5));
6552 NDR_CHECK(ndr_push_srvsvc_PlatformId(ndr, NDR_SCALARS, r->platform_id));
6553 NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_name));
6554 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version_major));
6555 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version_minor));
6556 NDR_CHECK(ndr_push_svcctl_ServerType(ndr, NDR_SCALARS, r->server_type));
6557 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
6558 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
6560 if (ndr_flags & NDR_BUFFERS) {
6561 if (r->server_name) {
6562 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
6563 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6564 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
6565 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server_name, ndr_charset_length(r->server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6567 if (r->comment) {
6568 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
6569 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6570 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
6571 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6574 return NDR_ERR_SUCCESS;
6577 _PUBLIC_ enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo101(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo101 *r)
6579 uint32_t _ptr_server_name;
6580 TALLOC_CTX *_mem_save_server_name_0;
6581 uint32_t _ptr_comment;
6582 TALLOC_CTX *_mem_save_comment_0;
6583 if (ndr_flags & NDR_SCALARS) {
6584 NDR_CHECK(ndr_pull_align(ndr, 5));
6585 NDR_CHECK(ndr_pull_srvsvc_PlatformId(ndr, NDR_SCALARS, &r->platform_id));
6586 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
6587 if (_ptr_server_name) {
6588 NDR_PULL_ALLOC(ndr, r->server_name);
6589 } else {
6590 r->server_name = NULL;
6592 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version_major));
6593 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version_minor));
6594 NDR_CHECK(ndr_pull_svcctl_ServerType(ndr, NDR_SCALARS, &r->server_type));
6595 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
6596 if (_ptr_comment) {
6597 NDR_PULL_ALLOC(ndr, r->comment);
6598 } else {
6599 r->comment = NULL;
6601 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
6603 if (ndr_flags & NDR_BUFFERS) {
6604 if (r->server_name) {
6605 _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6606 NDR_PULL_SET_MEM_CTX(ndr, r->server_name, 0);
6607 NDR_CHECK(ndr_pull_array_size(ndr, &r->server_name));
6608 NDR_CHECK(ndr_pull_array_length(ndr, &r->server_name));
6609 if (ndr_get_array_length(ndr, &r->server_name) > ndr_get_array_size(ndr, &r->server_name)) {
6610 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->server_name), ndr_get_array_length(ndr, &r->server_name));
6612 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->server_name), sizeof(uint16_t)));
6613 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server_name, ndr_get_array_length(ndr, &r->server_name), sizeof(uint16_t), CH_UTF16));
6614 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
6616 if (r->comment) {
6617 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
6618 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
6619 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
6620 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
6621 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
6622 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
6624 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
6625 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
6626 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
6629 return NDR_ERR_SUCCESS;
6632 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo101(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo101 *r)
6634 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo101");
6635 ndr->depth++;
6636 ndr_print_srvsvc_PlatformId(ndr, "platform_id", r->platform_id);
6637 ndr_print_ptr(ndr, "server_name", r->server_name);
6638 ndr->depth++;
6639 if (r->server_name) {
6640 ndr_print_string(ndr, "server_name", r->server_name);
6642 ndr->depth--;
6643 ndr_print_uint32(ndr, "version_major", r->version_major);
6644 ndr_print_uint32(ndr, "version_minor", r->version_minor);
6645 ndr_print_svcctl_ServerType(ndr, "server_type", r->server_type);
6646 ndr_print_ptr(ndr, "comment", r->comment);
6647 ndr->depth++;
6648 if (r->comment) {
6649 ndr_print_string(ndr, "comment", r->comment);
6651 ndr->depth--;
6652 ndr->depth--;
6655 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo102(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo102 *r)
6657 if (ndr_flags & NDR_SCALARS) {
6658 NDR_CHECK(ndr_push_align(ndr, 5));
6659 NDR_CHECK(ndr_push_srvsvc_PlatformId(ndr, NDR_SCALARS, r->platform_id));
6660 NDR_CHECK(ndr_push_unique_ptr(ndr, r->server_name));
6661 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version_major));
6662 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version_minor));
6663 NDR_CHECK(ndr_push_svcctl_ServerType(ndr, NDR_SCALARS, r->server_type));
6664 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
6665 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->users));
6666 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->disc));
6667 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->hidden));
6668 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->announce));
6669 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->anndelta));
6670 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->licenses));
6671 NDR_CHECK(ndr_push_unique_ptr(ndr, r->userpath));
6672 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
6674 if (ndr_flags & NDR_BUFFERS) {
6675 if (r->server_name) {
6676 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
6677 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6678 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server_name, CH_UTF16)));
6679 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server_name, ndr_charset_length(r->server_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6681 if (r->comment) {
6682 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
6683 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6684 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
6685 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6687 if (r->userpath) {
6688 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->userpath, CH_UTF16)));
6689 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6690 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->userpath, CH_UTF16)));
6691 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->userpath, ndr_charset_length(r->userpath, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6694 return NDR_ERR_SUCCESS;
6697 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo102(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo102 *r)
6699 uint32_t _ptr_server_name;
6700 TALLOC_CTX *_mem_save_server_name_0;
6701 uint32_t _ptr_comment;
6702 TALLOC_CTX *_mem_save_comment_0;
6703 uint32_t _ptr_userpath;
6704 TALLOC_CTX *_mem_save_userpath_0;
6705 if (ndr_flags & NDR_SCALARS) {
6706 NDR_CHECK(ndr_pull_align(ndr, 5));
6707 NDR_CHECK(ndr_pull_srvsvc_PlatformId(ndr, NDR_SCALARS, &r->platform_id));
6708 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_name));
6709 if (_ptr_server_name) {
6710 NDR_PULL_ALLOC(ndr, r->server_name);
6711 } else {
6712 r->server_name = NULL;
6714 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version_major));
6715 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version_minor));
6716 NDR_CHECK(ndr_pull_svcctl_ServerType(ndr, NDR_SCALARS, &r->server_type));
6717 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
6718 if (_ptr_comment) {
6719 NDR_PULL_ALLOC(ndr, r->comment);
6720 } else {
6721 r->comment = NULL;
6723 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->users));
6724 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->disc));
6725 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->hidden));
6726 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->announce));
6727 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->anndelta));
6728 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->licenses));
6729 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_userpath));
6730 if (_ptr_userpath) {
6731 NDR_PULL_ALLOC(ndr, r->userpath);
6732 } else {
6733 r->userpath = NULL;
6735 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
6737 if (ndr_flags & NDR_BUFFERS) {
6738 if (r->server_name) {
6739 _mem_save_server_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
6740 NDR_PULL_SET_MEM_CTX(ndr, r->server_name, 0);
6741 NDR_CHECK(ndr_pull_array_size(ndr, &r->server_name));
6742 NDR_CHECK(ndr_pull_array_length(ndr, &r->server_name));
6743 if (ndr_get_array_length(ndr, &r->server_name) > ndr_get_array_size(ndr, &r->server_name)) {
6744 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->server_name), ndr_get_array_length(ndr, &r->server_name));
6746 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->server_name), sizeof(uint16_t)));
6747 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server_name, ndr_get_array_length(ndr, &r->server_name), sizeof(uint16_t), CH_UTF16));
6748 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_name_0, 0);
6750 if (r->comment) {
6751 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
6752 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
6753 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
6754 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
6755 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
6756 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
6758 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
6759 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
6760 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
6762 if (r->userpath) {
6763 _mem_save_userpath_0 = NDR_PULL_GET_MEM_CTX(ndr);
6764 NDR_PULL_SET_MEM_CTX(ndr, r->userpath, 0);
6765 NDR_CHECK(ndr_pull_array_size(ndr, &r->userpath));
6766 NDR_CHECK(ndr_pull_array_length(ndr, &r->userpath));
6767 if (ndr_get_array_length(ndr, &r->userpath) > ndr_get_array_size(ndr, &r->userpath)) {
6768 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->userpath), ndr_get_array_length(ndr, &r->userpath));
6770 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->userpath), sizeof(uint16_t)));
6771 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->userpath, ndr_get_array_length(ndr, &r->userpath), sizeof(uint16_t), CH_UTF16));
6772 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_userpath_0, 0);
6775 return NDR_ERR_SUCCESS;
6778 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo102(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo102 *r)
6780 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo102");
6781 ndr->depth++;
6782 ndr_print_srvsvc_PlatformId(ndr, "platform_id", r->platform_id);
6783 ndr_print_ptr(ndr, "server_name", r->server_name);
6784 ndr->depth++;
6785 if (r->server_name) {
6786 ndr_print_string(ndr, "server_name", r->server_name);
6788 ndr->depth--;
6789 ndr_print_uint32(ndr, "version_major", r->version_major);
6790 ndr_print_uint32(ndr, "version_minor", r->version_minor);
6791 ndr_print_svcctl_ServerType(ndr, "server_type", r->server_type);
6792 ndr_print_ptr(ndr, "comment", r->comment);
6793 ndr->depth++;
6794 if (r->comment) {
6795 ndr_print_string(ndr, "comment", r->comment);
6797 ndr->depth--;
6798 ndr_print_uint32(ndr, "users", r->users);
6799 ndr_print_uint32(ndr, "disc", r->disc);
6800 ndr_print_uint32(ndr, "hidden", r->hidden);
6801 ndr_print_uint32(ndr, "announce", r->announce);
6802 ndr_print_uint32(ndr, "anndelta", r->anndelta);
6803 ndr_print_uint32(ndr, "licenses", r->licenses);
6804 ndr_print_ptr(ndr, "userpath", r->userpath);
6805 ndr->depth++;
6806 if (r->userpath) {
6807 ndr_print_string(ndr, "userpath", r->userpath);
6809 ndr->depth--;
6810 ndr->depth--;
6813 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo402(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo402 *r)
6815 if (ndr_flags & NDR_SCALARS) {
6816 NDR_CHECK(ndr_push_align(ndr, 5));
6817 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ulist_mtime));
6818 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->glist_mtime));
6819 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->alist_mtime));
6820 NDR_CHECK(ndr_push_unique_ptr(ndr, r->alerts));
6821 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->security));
6822 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numadmin));
6823 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lanmask));
6824 NDR_CHECK(ndr_push_unique_ptr(ndr, r->guestaccount));
6825 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->chdevs));
6826 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->chdevqs));
6827 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->chdevjobs));
6828 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->connections));
6829 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->shares));
6830 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->openfiles));
6831 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessopen));
6832 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sesssvc));
6833 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessreqs));
6834 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->opensearch));
6835 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->activelocks));
6836 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numreqbufs));
6837 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sizereqbufs));
6838 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numbigbufs));
6839 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numfiletasks));
6840 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->alertsched));
6841 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->erroralert));
6842 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->logonalert));
6843 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->accessalert));
6844 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->diskalert));
6845 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->netioalert));
6846 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxaudits));
6847 NDR_CHECK(ndr_push_unique_ptr(ndr, r->srvheuristics));
6848 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
6850 if (ndr_flags & NDR_BUFFERS) {
6851 if (r->alerts) {
6852 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->alerts, CH_UTF16)));
6853 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6854 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->alerts, CH_UTF16)));
6855 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->alerts, ndr_charset_length(r->alerts, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6857 if (r->guestaccount) {
6858 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->guestaccount, CH_UTF16)));
6859 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6860 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->guestaccount, CH_UTF16)));
6861 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->guestaccount, ndr_charset_length(r->guestaccount, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6863 if (r->srvheuristics) {
6864 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->srvheuristics, CH_UTF16)));
6865 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
6866 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->srvheuristics, CH_UTF16)));
6867 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->srvheuristics, ndr_charset_length(r->srvheuristics, CH_UTF16), sizeof(uint16_t), CH_UTF16));
6870 return NDR_ERR_SUCCESS;
6873 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo402(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo402 *r)
6875 uint32_t _ptr_alerts;
6876 TALLOC_CTX *_mem_save_alerts_0;
6877 uint32_t _ptr_guestaccount;
6878 TALLOC_CTX *_mem_save_guestaccount_0;
6879 uint32_t _ptr_srvheuristics;
6880 TALLOC_CTX *_mem_save_srvheuristics_0;
6881 if (ndr_flags & NDR_SCALARS) {
6882 NDR_CHECK(ndr_pull_align(ndr, 5));
6883 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ulist_mtime));
6884 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->glist_mtime));
6885 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->alist_mtime));
6886 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_alerts));
6887 if (_ptr_alerts) {
6888 NDR_PULL_ALLOC(ndr, r->alerts);
6889 } else {
6890 r->alerts = NULL;
6892 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->security));
6893 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numadmin));
6894 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lanmask));
6895 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_guestaccount));
6896 if (_ptr_guestaccount) {
6897 NDR_PULL_ALLOC(ndr, r->guestaccount);
6898 } else {
6899 r->guestaccount = NULL;
6901 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->chdevs));
6902 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->chdevqs));
6903 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->chdevjobs));
6904 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->connections));
6905 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->shares));
6906 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->openfiles));
6907 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessopen));
6908 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sesssvc));
6909 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessreqs));
6910 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->opensearch));
6911 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->activelocks));
6912 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numreqbufs));
6913 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sizereqbufs));
6914 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numbigbufs));
6915 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numfiletasks));
6916 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->alertsched));
6917 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->erroralert));
6918 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->logonalert));
6919 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->accessalert));
6920 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->diskalert));
6921 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->netioalert));
6922 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxaudits));
6923 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_srvheuristics));
6924 if (_ptr_srvheuristics) {
6925 NDR_PULL_ALLOC(ndr, r->srvheuristics);
6926 } else {
6927 r->srvheuristics = NULL;
6929 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
6931 if (ndr_flags & NDR_BUFFERS) {
6932 if (r->alerts) {
6933 _mem_save_alerts_0 = NDR_PULL_GET_MEM_CTX(ndr);
6934 NDR_PULL_SET_MEM_CTX(ndr, r->alerts, 0);
6935 NDR_CHECK(ndr_pull_array_size(ndr, &r->alerts));
6936 NDR_CHECK(ndr_pull_array_length(ndr, &r->alerts));
6937 if (ndr_get_array_length(ndr, &r->alerts) > ndr_get_array_size(ndr, &r->alerts)) {
6938 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->alerts), ndr_get_array_length(ndr, &r->alerts));
6940 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->alerts), sizeof(uint16_t)));
6941 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->alerts, ndr_get_array_length(ndr, &r->alerts), sizeof(uint16_t), CH_UTF16));
6942 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alerts_0, 0);
6944 if (r->guestaccount) {
6945 _mem_save_guestaccount_0 = NDR_PULL_GET_MEM_CTX(ndr);
6946 NDR_PULL_SET_MEM_CTX(ndr, r->guestaccount, 0);
6947 NDR_CHECK(ndr_pull_array_size(ndr, &r->guestaccount));
6948 NDR_CHECK(ndr_pull_array_length(ndr, &r->guestaccount));
6949 if (ndr_get_array_length(ndr, &r->guestaccount) > ndr_get_array_size(ndr, &r->guestaccount)) {
6950 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->guestaccount), ndr_get_array_length(ndr, &r->guestaccount));
6952 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->guestaccount), sizeof(uint16_t)));
6953 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->guestaccount, ndr_get_array_length(ndr, &r->guestaccount), sizeof(uint16_t), CH_UTF16));
6954 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_guestaccount_0, 0);
6956 if (r->srvheuristics) {
6957 _mem_save_srvheuristics_0 = NDR_PULL_GET_MEM_CTX(ndr);
6958 NDR_PULL_SET_MEM_CTX(ndr, r->srvheuristics, 0);
6959 NDR_CHECK(ndr_pull_array_size(ndr, &r->srvheuristics));
6960 NDR_CHECK(ndr_pull_array_length(ndr, &r->srvheuristics));
6961 if (ndr_get_array_length(ndr, &r->srvheuristics) > ndr_get_array_size(ndr, &r->srvheuristics)) {
6962 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->srvheuristics), ndr_get_array_length(ndr, &r->srvheuristics));
6964 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->srvheuristics), sizeof(uint16_t)));
6965 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->srvheuristics, ndr_get_array_length(ndr, &r->srvheuristics), sizeof(uint16_t), CH_UTF16));
6966 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_srvheuristics_0, 0);
6969 return NDR_ERR_SUCCESS;
6972 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo402(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo402 *r)
6974 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo402");
6975 ndr->depth++;
6976 ndr_print_uint32(ndr, "ulist_mtime", r->ulist_mtime);
6977 ndr_print_uint32(ndr, "glist_mtime", r->glist_mtime);
6978 ndr_print_uint32(ndr, "alist_mtime", r->alist_mtime);
6979 ndr_print_ptr(ndr, "alerts", r->alerts);
6980 ndr->depth++;
6981 if (r->alerts) {
6982 ndr_print_string(ndr, "alerts", r->alerts);
6984 ndr->depth--;
6985 ndr_print_uint32(ndr, "security", r->security);
6986 ndr_print_uint32(ndr, "numadmin", r->numadmin);
6987 ndr_print_uint32(ndr, "lanmask", r->lanmask);
6988 ndr_print_ptr(ndr, "guestaccount", r->guestaccount);
6989 ndr->depth++;
6990 if (r->guestaccount) {
6991 ndr_print_string(ndr, "guestaccount", r->guestaccount);
6993 ndr->depth--;
6994 ndr_print_uint32(ndr, "chdevs", r->chdevs);
6995 ndr_print_uint32(ndr, "chdevqs", r->chdevqs);
6996 ndr_print_uint32(ndr, "chdevjobs", r->chdevjobs);
6997 ndr_print_uint32(ndr, "connections", r->connections);
6998 ndr_print_uint32(ndr, "shares", r->shares);
6999 ndr_print_uint32(ndr, "openfiles", r->openfiles);
7000 ndr_print_uint32(ndr, "sessopen", r->sessopen);
7001 ndr_print_uint32(ndr, "sesssvc", r->sesssvc);
7002 ndr_print_uint32(ndr, "sessreqs", r->sessreqs);
7003 ndr_print_uint32(ndr, "opensearch", r->opensearch);
7004 ndr_print_uint32(ndr, "activelocks", r->activelocks);
7005 ndr_print_uint32(ndr, "numreqbufs", r->numreqbufs);
7006 ndr_print_uint32(ndr, "sizereqbufs", r->sizereqbufs);
7007 ndr_print_uint32(ndr, "numbigbufs", r->numbigbufs);
7008 ndr_print_uint32(ndr, "numfiletasks", r->numfiletasks);
7009 ndr_print_uint32(ndr, "alertsched", r->alertsched);
7010 ndr_print_uint32(ndr, "erroralert", r->erroralert);
7011 ndr_print_uint32(ndr, "logonalert", r->logonalert);
7012 ndr_print_uint32(ndr, "accessalert", r->accessalert);
7013 ndr_print_uint32(ndr, "diskalert", r->diskalert);
7014 ndr_print_uint32(ndr, "netioalert", r->netioalert);
7015 ndr_print_uint32(ndr, "maxaudits", r->maxaudits);
7016 ndr_print_ptr(ndr, "srvheuristics", r->srvheuristics);
7017 ndr->depth++;
7018 if (r->srvheuristics) {
7019 ndr_print_string(ndr, "srvheuristics", r->srvheuristics);
7021 ndr->depth--;
7022 ndr->depth--;
7025 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo403(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo403 *r)
7027 if (ndr_flags & NDR_SCALARS) {
7028 NDR_CHECK(ndr_push_align(ndr, 5));
7029 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ulist_mtime));
7030 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->glist_mtime));
7031 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->alist_mtime));
7032 NDR_CHECK(ndr_push_unique_ptr(ndr, r->alerts));
7033 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->security));
7034 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numadmin));
7035 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lanmask));
7036 NDR_CHECK(ndr_push_unique_ptr(ndr, r->guestaccount));
7037 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->chdevs));
7038 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->chdevqs));
7039 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->chdevjobs));
7040 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->connections));
7041 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->shares));
7042 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->openfiles));
7043 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessopen));
7044 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sesssvc));
7045 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessreqs));
7046 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->opensearch));
7047 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->activelocks));
7048 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numreqbufs));
7049 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sizereqbufs));
7050 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numbigbufs));
7051 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numfiletasks));
7052 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->alertsched));
7053 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->erroralert));
7054 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->logonalert));
7055 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->accessalert));
7056 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->diskalert));
7057 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->netioalert));
7058 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxaudits));
7059 NDR_CHECK(ndr_push_unique_ptr(ndr, r->srvheuristics));
7060 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->auditedevents));
7061 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->auditprofile));
7062 NDR_CHECK(ndr_push_unique_ptr(ndr, r->autopath));
7063 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
7065 if (ndr_flags & NDR_BUFFERS) {
7066 if (r->alerts) {
7067 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->alerts, CH_UTF16)));
7068 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7069 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->alerts, CH_UTF16)));
7070 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->alerts, ndr_charset_length(r->alerts, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7072 if (r->guestaccount) {
7073 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->guestaccount, CH_UTF16)));
7074 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7075 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->guestaccount, CH_UTF16)));
7076 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->guestaccount, ndr_charset_length(r->guestaccount, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7078 if (r->srvheuristics) {
7079 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->srvheuristics, CH_UTF16)));
7080 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7081 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->srvheuristics, CH_UTF16)));
7082 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->srvheuristics, ndr_charset_length(r->srvheuristics, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7084 if (r->autopath) {
7085 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->autopath, CH_UTF16)));
7086 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7087 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->autopath, CH_UTF16)));
7088 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->autopath, ndr_charset_length(r->autopath, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7091 return NDR_ERR_SUCCESS;
7094 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo403(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo403 *r)
7096 uint32_t _ptr_alerts;
7097 TALLOC_CTX *_mem_save_alerts_0;
7098 uint32_t _ptr_guestaccount;
7099 TALLOC_CTX *_mem_save_guestaccount_0;
7100 uint32_t _ptr_srvheuristics;
7101 TALLOC_CTX *_mem_save_srvheuristics_0;
7102 uint32_t _ptr_autopath;
7103 TALLOC_CTX *_mem_save_autopath_0;
7104 if (ndr_flags & NDR_SCALARS) {
7105 NDR_CHECK(ndr_pull_align(ndr, 5));
7106 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ulist_mtime));
7107 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->glist_mtime));
7108 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->alist_mtime));
7109 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_alerts));
7110 if (_ptr_alerts) {
7111 NDR_PULL_ALLOC(ndr, r->alerts);
7112 } else {
7113 r->alerts = NULL;
7115 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->security));
7116 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numadmin));
7117 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lanmask));
7118 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_guestaccount));
7119 if (_ptr_guestaccount) {
7120 NDR_PULL_ALLOC(ndr, r->guestaccount);
7121 } else {
7122 r->guestaccount = NULL;
7124 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->chdevs));
7125 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->chdevqs));
7126 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->chdevjobs));
7127 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->connections));
7128 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->shares));
7129 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->openfiles));
7130 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessopen));
7131 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sesssvc));
7132 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessreqs));
7133 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->opensearch));
7134 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->activelocks));
7135 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numreqbufs));
7136 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sizereqbufs));
7137 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numbigbufs));
7138 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numfiletasks));
7139 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->alertsched));
7140 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->erroralert));
7141 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->logonalert));
7142 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->accessalert));
7143 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->diskalert));
7144 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->netioalert));
7145 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxaudits));
7146 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_srvheuristics));
7147 if (_ptr_srvheuristics) {
7148 NDR_PULL_ALLOC(ndr, r->srvheuristics);
7149 } else {
7150 r->srvheuristics = NULL;
7152 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->auditedevents));
7153 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->auditprofile));
7154 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_autopath));
7155 if (_ptr_autopath) {
7156 NDR_PULL_ALLOC(ndr, r->autopath);
7157 } else {
7158 r->autopath = NULL;
7160 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
7162 if (ndr_flags & NDR_BUFFERS) {
7163 if (r->alerts) {
7164 _mem_save_alerts_0 = NDR_PULL_GET_MEM_CTX(ndr);
7165 NDR_PULL_SET_MEM_CTX(ndr, r->alerts, 0);
7166 NDR_CHECK(ndr_pull_array_size(ndr, &r->alerts));
7167 NDR_CHECK(ndr_pull_array_length(ndr, &r->alerts));
7168 if (ndr_get_array_length(ndr, &r->alerts) > ndr_get_array_size(ndr, &r->alerts)) {
7169 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->alerts), ndr_get_array_length(ndr, &r->alerts));
7171 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->alerts), sizeof(uint16_t)));
7172 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->alerts, ndr_get_array_length(ndr, &r->alerts), sizeof(uint16_t), CH_UTF16));
7173 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_alerts_0, 0);
7175 if (r->guestaccount) {
7176 _mem_save_guestaccount_0 = NDR_PULL_GET_MEM_CTX(ndr);
7177 NDR_PULL_SET_MEM_CTX(ndr, r->guestaccount, 0);
7178 NDR_CHECK(ndr_pull_array_size(ndr, &r->guestaccount));
7179 NDR_CHECK(ndr_pull_array_length(ndr, &r->guestaccount));
7180 if (ndr_get_array_length(ndr, &r->guestaccount) > ndr_get_array_size(ndr, &r->guestaccount)) {
7181 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->guestaccount), ndr_get_array_length(ndr, &r->guestaccount));
7183 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->guestaccount), sizeof(uint16_t)));
7184 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->guestaccount, ndr_get_array_length(ndr, &r->guestaccount), sizeof(uint16_t), CH_UTF16));
7185 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_guestaccount_0, 0);
7187 if (r->srvheuristics) {
7188 _mem_save_srvheuristics_0 = NDR_PULL_GET_MEM_CTX(ndr);
7189 NDR_PULL_SET_MEM_CTX(ndr, r->srvheuristics, 0);
7190 NDR_CHECK(ndr_pull_array_size(ndr, &r->srvheuristics));
7191 NDR_CHECK(ndr_pull_array_length(ndr, &r->srvheuristics));
7192 if (ndr_get_array_length(ndr, &r->srvheuristics) > ndr_get_array_size(ndr, &r->srvheuristics)) {
7193 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->srvheuristics), ndr_get_array_length(ndr, &r->srvheuristics));
7195 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->srvheuristics), sizeof(uint16_t)));
7196 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->srvheuristics, ndr_get_array_length(ndr, &r->srvheuristics), sizeof(uint16_t), CH_UTF16));
7197 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_srvheuristics_0, 0);
7199 if (r->autopath) {
7200 _mem_save_autopath_0 = NDR_PULL_GET_MEM_CTX(ndr);
7201 NDR_PULL_SET_MEM_CTX(ndr, r->autopath, 0);
7202 NDR_CHECK(ndr_pull_array_size(ndr, &r->autopath));
7203 NDR_CHECK(ndr_pull_array_length(ndr, &r->autopath));
7204 if (ndr_get_array_length(ndr, &r->autopath) > ndr_get_array_size(ndr, &r->autopath)) {
7205 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->autopath), ndr_get_array_length(ndr, &r->autopath));
7207 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->autopath), sizeof(uint16_t)));
7208 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->autopath, ndr_get_array_length(ndr, &r->autopath), sizeof(uint16_t), CH_UTF16));
7209 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_autopath_0, 0);
7212 return NDR_ERR_SUCCESS;
7215 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo403(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo403 *r)
7217 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo403");
7218 ndr->depth++;
7219 ndr_print_uint32(ndr, "ulist_mtime", r->ulist_mtime);
7220 ndr_print_uint32(ndr, "glist_mtime", r->glist_mtime);
7221 ndr_print_uint32(ndr, "alist_mtime", r->alist_mtime);
7222 ndr_print_ptr(ndr, "alerts", r->alerts);
7223 ndr->depth++;
7224 if (r->alerts) {
7225 ndr_print_string(ndr, "alerts", r->alerts);
7227 ndr->depth--;
7228 ndr_print_uint32(ndr, "security", r->security);
7229 ndr_print_uint32(ndr, "numadmin", r->numadmin);
7230 ndr_print_uint32(ndr, "lanmask", r->lanmask);
7231 ndr_print_ptr(ndr, "guestaccount", r->guestaccount);
7232 ndr->depth++;
7233 if (r->guestaccount) {
7234 ndr_print_string(ndr, "guestaccount", r->guestaccount);
7236 ndr->depth--;
7237 ndr_print_uint32(ndr, "chdevs", r->chdevs);
7238 ndr_print_uint32(ndr, "chdevqs", r->chdevqs);
7239 ndr_print_uint32(ndr, "chdevjobs", r->chdevjobs);
7240 ndr_print_uint32(ndr, "connections", r->connections);
7241 ndr_print_uint32(ndr, "shares", r->shares);
7242 ndr_print_uint32(ndr, "openfiles", r->openfiles);
7243 ndr_print_uint32(ndr, "sessopen", r->sessopen);
7244 ndr_print_uint32(ndr, "sesssvc", r->sesssvc);
7245 ndr_print_uint32(ndr, "sessreqs", r->sessreqs);
7246 ndr_print_uint32(ndr, "opensearch", r->opensearch);
7247 ndr_print_uint32(ndr, "activelocks", r->activelocks);
7248 ndr_print_uint32(ndr, "numreqbufs", r->numreqbufs);
7249 ndr_print_uint32(ndr, "sizereqbufs", r->sizereqbufs);
7250 ndr_print_uint32(ndr, "numbigbufs", r->numbigbufs);
7251 ndr_print_uint32(ndr, "numfiletasks", r->numfiletasks);
7252 ndr_print_uint32(ndr, "alertsched", r->alertsched);
7253 ndr_print_uint32(ndr, "erroralert", r->erroralert);
7254 ndr_print_uint32(ndr, "logonalert", r->logonalert);
7255 ndr_print_uint32(ndr, "accessalert", r->accessalert);
7256 ndr_print_uint32(ndr, "diskalert", r->diskalert);
7257 ndr_print_uint32(ndr, "netioalert", r->netioalert);
7258 ndr_print_uint32(ndr, "maxaudits", r->maxaudits);
7259 ndr_print_ptr(ndr, "srvheuristics", r->srvheuristics);
7260 ndr->depth++;
7261 if (r->srvheuristics) {
7262 ndr_print_string(ndr, "srvheuristics", r->srvheuristics);
7264 ndr->depth--;
7265 ndr_print_uint32(ndr, "auditedevents", r->auditedevents);
7266 ndr_print_uint32(ndr, "auditprofile", r->auditprofile);
7267 ndr_print_ptr(ndr, "autopath", r->autopath);
7268 ndr->depth++;
7269 if (r->autopath) {
7270 ndr_print_string(ndr, "autopath", r->autopath);
7272 ndr->depth--;
7273 ndr->depth--;
7276 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo502 *r)
7278 if (ndr_flags & NDR_SCALARS) {
7279 NDR_CHECK(ndr_push_align(ndr, 4));
7280 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessopen));
7281 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sesssvc));
7282 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->opensearch));
7283 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sizereqbufs));
7284 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initworkitems));
7285 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxworkitems));
7286 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rawworkitems));
7287 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->irpstacksize));
7288 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxrawbuflen));
7289 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessusers));
7290 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessconns));
7291 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxpagedmemoryusage));
7292 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxnonpagedmemoryusage));
7293 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesoftcompat));
7294 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableforcedlogoff));
7295 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timesource));
7296 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->acceptdownlevelapis));
7297 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lmannounce));
7298 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
7300 if (ndr_flags & NDR_BUFFERS) {
7302 return NDR_ERR_SUCCESS;
7305 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo502 *r)
7307 if (ndr_flags & NDR_SCALARS) {
7308 NDR_CHECK(ndr_pull_align(ndr, 4));
7309 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessopen));
7310 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sesssvc));
7311 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->opensearch));
7312 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sizereqbufs));
7313 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initworkitems));
7314 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxworkitems));
7315 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rawworkitems));
7316 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->irpstacksize));
7317 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxrawbuflen));
7318 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessusers));
7319 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessconns));
7320 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxpagedmemoryusage));
7321 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxnonpagedmemoryusage));
7322 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesoftcompat));
7323 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableforcedlogoff));
7324 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timesource));
7325 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->acceptdownlevelapis));
7326 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lmannounce));
7327 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
7329 if (ndr_flags & NDR_BUFFERS) {
7331 return NDR_ERR_SUCCESS;
7334 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo502 *r)
7336 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo502");
7337 ndr->depth++;
7338 ndr_print_uint32(ndr, "sessopen", r->sessopen);
7339 ndr_print_uint32(ndr, "sesssvc", r->sesssvc);
7340 ndr_print_uint32(ndr, "opensearch", r->opensearch);
7341 ndr_print_uint32(ndr, "sizereqbufs", r->sizereqbufs);
7342 ndr_print_uint32(ndr, "initworkitems", r->initworkitems);
7343 ndr_print_uint32(ndr, "maxworkitems", r->maxworkitems);
7344 ndr_print_uint32(ndr, "rawworkitems", r->rawworkitems);
7345 ndr_print_uint32(ndr, "irpstacksize", r->irpstacksize);
7346 ndr_print_uint32(ndr, "maxrawbuflen", r->maxrawbuflen);
7347 ndr_print_uint32(ndr, "sessusers", r->sessusers);
7348 ndr_print_uint32(ndr, "sessconns", r->sessconns);
7349 ndr_print_uint32(ndr, "maxpagedmemoryusage", r->maxpagedmemoryusage);
7350 ndr_print_uint32(ndr, "maxnonpagedmemoryusage", r->maxnonpagedmemoryusage);
7351 ndr_print_uint32(ndr, "enablesoftcompat", r->enablesoftcompat);
7352 ndr_print_uint32(ndr, "enableforcedlogoff", r->enableforcedlogoff);
7353 ndr_print_uint32(ndr, "timesource", r->timesource);
7354 ndr_print_uint32(ndr, "acceptdownlevelapis", r->acceptdownlevelapis);
7355 ndr_print_uint32(ndr, "lmannounce", r->lmannounce);
7356 ndr->depth--;
7359 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo503(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo503 *r)
7361 if (ndr_flags & NDR_SCALARS) {
7362 NDR_CHECK(ndr_push_align(ndr, 5));
7363 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessopen));
7364 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sesssvc));
7365 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->opensearch));
7366 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sizereqbufs));
7367 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initworkitems));
7368 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxworkitems));
7369 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rawworkitems));
7370 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->irpstacksize));
7371 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxrawbuflen));
7372 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessusers));
7373 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessconns));
7374 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxpagedmemoryusage));
7375 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxnonpagedmemoryusage));
7376 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesoftcompat));
7377 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableforcedlogoff));
7378 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timesource));
7379 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->acceptdownlevelapis));
7380 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lmannounce));
7381 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
7382 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxcopyreadlen));
7383 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxcopywritelen));
7384 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minkeepsearch));
7385 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxkeepsearch));
7386 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minkeepcomplsearch));
7387 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxkeepcomplsearch));
7388 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->threadcountadd));
7389 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numlockthreads));
7390 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->scavtimeout));
7391 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minrcvqueue));
7392 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minfreeworkitems));
7393 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->xactmemsize));
7394 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->threadpriority));
7395 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxmpxct));
7396 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->oplockbreakwait));
7397 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->oplockbreakresponsewait));
7398 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableoplocks));
7399 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableoplockforceclose));
7400 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablefcbopens));
7401 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableraw));
7402 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesharednetdrives));
7403 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minfreeconnections));
7404 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxfreeconnections));
7405 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
7407 if (ndr_flags & NDR_BUFFERS) {
7408 if (r->domain) {
7409 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
7410 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7411 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
7412 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7415 return NDR_ERR_SUCCESS;
7418 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo503(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo503 *r)
7420 uint32_t _ptr_domain;
7421 TALLOC_CTX *_mem_save_domain_0;
7422 if (ndr_flags & NDR_SCALARS) {
7423 NDR_CHECK(ndr_pull_align(ndr, 5));
7424 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessopen));
7425 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sesssvc));
7426 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->opensearch));
7427 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sizereqbufs));
7428 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initworkitems));
7429 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxworkitems));
7430 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rawworkitems));
7431 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->irpstacksize));
7432 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxrawbuflen));
7433 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessusers));
7434 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessconns));
7435 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxpagedmemoryusage));
7436 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxnonpagedmemoryusage));
7437 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesoftcompat));
7438 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableforcedlogoff));
7439 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timesource));
7440 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->acceptdownlevelapis));
7441 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lmannounce));
7442 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
7443 if (_ptr_domain) {
7444 NDR_PULL_ALLOC(ndr, r->domain);
7445 } else {
7446 r->domain = NULL;
7448 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxcopyreadlen));
7449 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxcopywritelen));
7450 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minkeepsearch));
7451 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxkeepsearch));
7452 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minkeepcomplsearch));
7453 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxkeepcomplsearch));
7454 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->threadcountadd));
7455 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numlockthreads));
7456 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->scavtimeout));
7457 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minrcvqueue));
7458 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minfreeworkitems));
7459 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->xactmemsize));
7460 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->threadpriority));
7461 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxmpxct));
7462 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->oplockbreakwait));
7463 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->oplockbreakresponsewait));
7464 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableoplocks));
7465 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableoplockforceclose));
7466 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablefcbopens));
7467 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableraw));
7468 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesharednetdrives));
7469 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minfreeconnections));
7470 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxfreeconnections));
7471 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
7473 if (ndr_flags & NDR_BUFFERS) {
7474 if (r->domain) {
7475 _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
7476 NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
7477 NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
7478 NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
7479 if (ndr_get_array_length(ndr, &r->domain) > ndr_get_array_size(ndr, &r->domain)) {
7480 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->domain), ndr_get_array_length(ndr, &r->domain));
7482 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t)));
7483 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t), CH_UTF16));
7484 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
7487 return NDR_ERR_SUCCESS;
7490 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo503(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo503 *r)
7492 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo503");
7493 ndr->depth++;
7494 ndr_print_uint32(ndr, "sessopen", r->sessopen);
7495 ndr_print_uint32(ndr, "sesssvc", r->sesssvc);
7496 ndr_print_uint32(ndr, "opensearch", r->opensearch);
7497 ndr_print_uint32(ndr, "sizereqbufs", r->sizereqbufs);
7498 ndr_print_uint32(ndr, "initworkitems", r->initworkitems);
7499 ndr_print_uint32(ndr, "maxworkitems", r->maxworkitems);
7500 ndr_print_uint32(ndr, "rawworkitems", r->rawworkitems);
7501 ndr_print_uint32(ndr, "irpstacksize", r->irpstacksize);
7502 ndr_print_uint32(ndr, "maxrawbuflen", r->maxrawbuflen);
7503 ndr_print_uint32(ndr, "sessusers", r->sessusers);
7504 ndr_print_uint32(ndr, "sessconns", r->sessconns);
7505 ndr_print_uint32(ndr, "maxpagedmemoryusage", r->maxpagedmemoryusage);
7506 ndr_print_uint32(ndr, "maxnonpagedmemoryusage", r->maxnonpagedmemoryusage);
7507 ndr_print_uint32(ndr, "enablesoftcompat", r->enablesoftcompat);
7508 ndr_print_uint32(ndr, "enableforcedlogoff", r->enableforcedlogoff);
7509 ndr_print_uint32(ndr, "timesource", r->timesource);
7510 ndr_print_uint32(ndr, "acceptdownlevelapis", r->acceptdownlevelapis);
7511 ndr_print_uint32(ndr, "lmannounce", r->lmannounce);
7512 ndr_print_ptr(ndr, "domain", r->domain);
7513 ndr->depth++;
7514 if (r->domain) {
7515 ndr_print_string(ndr, "domain", r->domain);
7517 ndr->depth--;
7518 ndr_print_uint32(ndr, "maxcopyreadlen", r->maxcopyreadlen);
7519 ndr_print_uint32(ndr, "maxcopywritelen", r->maxcopywritelen);
7520 ndr_print_uint32(ndr, "minkeepsearch", r->minkeepsearch);
7521 ndr_print_uint32(ndr, "maxkeepsearch", r->maxkeepsearch);
7522 ndr_print_uint32(ndr, "minkeepcomplsearch", r->minkeepcomplsearch);
7523 ndr_print_uint32(ndr, "maxkeepcomplsearch", r->maxkeepcomplsearch);
7524 ndr_print_uint32(ndr, "threadcountadd", r->threadcountadd);
7525 ndr_print_uint32(ndr, "numlockthreads", r->numlockthreads);
7526 ndr_print_uint32(ndr, "scavtimeout", r->scavtimeout);
7527 ndr_print_uint32(ndr, "minrcvqueue", r->minrcvqueue);
7528 ndr_print_uint32(ndr, "minfreeworkitems", r->minfreeworkitems);
7529 ndr_print_uint32(ndr, "xactmemsize", r->xactmemsize);
7530 ndr_print_uint32(ndr, "threadpriority", r->threadpriority);
7531 ndr_print_uint32(ndr, "maxmpxct", r->maxmpxct);
7532 ndr_print_uint32(ndr, "oplockbreakwait", r->oplockbreakwait);
7533 ndr_print_uint32(ndr, "oplockbreakresponsewait", r->oplockbreakresponsewait);
7534 ndr_print_uint32(ndr, "enableoplocks", r->enableoplocks);
7535 ndr_print_uint32(ndr, "enableoplockforceclose", r->enableoplockforceclose);
7536 ndr_print_uint32(ndr, "enablefcbopens", r->enablefcbopens);
7537 ndr_print_uint32(ndr, "enableraw", r->enableraw);
7538 ndr_print_uint32(ndr, "enablesharednetdrives", r->enablesharednetdrives);
7539 ndr_print_uint32(ndr, "minfreeconnections", r->minfreeconnections);
7540 ndr_print_uint32(ndr, "maxfreeconnections", r->maxfreeconnections);
7541 ndr->depth--;
7544 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo599(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo599 *r)
7546 if (ndr_flags & NDR_SCALARS) {
7547 NDR_CHECK(ndr_push_align(ndr, 5));
7548 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessopen));
7549 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sesssvc));
7550 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->opensearch));
7551 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sizereqbufs));
7552 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initworkitems));
7553 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxworkitems));
7554 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->rawworkitems));
7555 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->irpstacksize));
7556 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxrawbuflen));
7557 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessusers));
7558 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessconns));
7559 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxpagedmemoryusage));
7560 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxnonpagedmemoryusage));
7561 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesoftcompat));
7562 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableforcedlogoff));
7563 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timesource));
7564 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->acceptdownlevelapis));
7565 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lmannounce));
7566 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
7567 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxcopyreadlen));
7568 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxcopywritelen));
7569 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minkeepsearch));
7570 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minkeepcomplsearch));
7571 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxkeepcomplsearch));
7572 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->threadcountadd));
7573 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->numlockthreads));
7574 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->scavtimeout));
7575 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minrcvqueue));
7576 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minfreeworkitems));
7577 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->xactmemsize));
7578 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->threadpriority));
7579 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxmpxct));
7580 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->oplockbreakwait));
7581 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->oplockbreakresponsewait));
7582 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableoplocks));
7583 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableoplockforceclose));
7584 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablefcbopens));
7585 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableraw));
7586 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesharednetdrives));
7587 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minfreeconnections));
7588 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxfreeconnections));
7589 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initsesstable));
7590 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initconntable));
7591 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initfiletable));
7592 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initsearchtable));
7593 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->alertsched));
7594 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->errortreshold));
7595 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->networkerrortreshold));
7596 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->diskspacetreshold));
7597 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reserved));
7598 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxlinkdelay));
7599 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minlinkthroughput));
7600 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->linkinfovalidtime));
7601 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->scavqosinfoupdatetime));
7602 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxworkitemidletime));
7603 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
7605 if (ndr_flags & NDR_BUFFERS) {
7606 if (r->domain) {
7607 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
7608 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7609 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
7610 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7613 return NDR_ERR_SUCCESS;
7616 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo599(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo599 *r)
7618 uint32_t _ptr_domain;
7619 TALLOC_CTX *_mem_save_domain_0;
7620 if (ndr_flags & NDR_SCALARS) {
7621 NDR_CHECK(ndr_pull_align(ndr, 5));
7622 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessopen));
7623 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sesssvc));
7624 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->opensearch));
7625 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sizereqbufs));
7626 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initworkitems));
7627 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxworkitems));
7628 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->rawworkitems));
7629 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->irpstacksize));
7630 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxrawbuflen));
7631 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessusers));
7632 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessconns));
7633 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxpagedmemoryusage));
7634 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxnonpagedmemoryusage));
7635 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesoftcompat));
7636 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableforcedlogoff));
7637 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timesource));
7638 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->acceptdownlevelapis));
7639 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lmannounce));
7640 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
7641 if (_ptr_domain) {
7642 NDR_PULL_ALLOC(ndr, r->domain);
7643 } else {
7644 r->domain = NULL;
7646 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxcopyreadlen));
7647 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxcopywritelen));
7648 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minkeepsearch));
7649 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minkeepcomplsearch));
7650 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxkeepcomplsearch));
7651 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->threadcountadd));
7652 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->numlockthreads));
7653 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->scavtimeout));
7654 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minrcvqueue));
7655 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minfreeworkitems));
7656 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->xactmemsize));
7657 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->threadpriority));
7658 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxmpxct));
7659 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->oplockbreakwait));
7660 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->oplockbreakresponsewait));
7661 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableoplocks));
7662 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableoplockforceclose));
7663 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablefcbopens));
7664 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableraw));
7665 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesharednetdrives));
7666 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minfreeconnections));
7667 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxfreeconnections));
7668 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initsesstable));
7669 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initconntable));
7670 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initfiletable));
7671 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initsearchtable));
7672 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->alertsched));
7673 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->errortreshold));
7674 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->networkerrortreshold));
7675 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->diskspacetreshold));
7676 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reserved));
7677 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxlinkdelay));
7678 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minlinkthroughput));
7679 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->linkinfovalidtime));
7680 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->scavqosinfoupdatetime));
7681 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxworkitemidletime));
7682 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
7684 if (ndr_flags & NDR_BUFFERS) {
7685 if (r->domain) {
7686 _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
7687 NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
7688 NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
7689 NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
7690 if (ndr_get_array_length(ndr, &r->domain) > ndr_get_array_size(ndr, &r->domain)) {
7691 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->domain), ndr_get_array_length(ndr, &r->domain));
7693 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t)));
7694 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t), CH_UTF16));
7695 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
7698 return NDR_ERR_SUCCESS;
7701 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo599(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo599 *r)
7703 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo599");
7704 ndr->depth++;
7705 ndr_print_uint32(ndr, "sessopen", r->sessopen);
7706 ndr_print_uint32(ndr, "sesssvc", r->sesssvc);
7707 ndr_print_uint32(ndr, "opensearch", r->opensearch);
7708 ndr_print_uint32(ndr, "sizereqbufs", r->sizereqbufs);
7709 ndr_print_uint32(ndr, "initworkitems", r->initworkitems);
7710 ndr_print_uint32(ndr, "maxworkitems", r->maxworkitems);
7711 ndr_print_uint32(ndr, "rawworkitems", r->rawworkitems);
7712 ndr_print_uint32(ndr, "irpstacksize", r->irpstacksize);
7713 ndr_print_uint32(ndr, "maxrawbuflen", r->maxrawbuflen);
7714 ndr_print_uint32(ndr, "sessusers", r->sessusers);
7715 ndr_print_uint32(ndr, "sessconns", r->sessconns);
7716 ndr_print_uint32(ndr, "maxpagedmemoryusage", r->maxpagedmemoryusage);
7717 ndr_print_uint32(ndr, "maxnonpagedmemoryusage", r->maxnonpagedmemoryusage);
7718 ndr_print_uint32(ndr, "enablesoftcompat", r->enablesoftcompat);
7719 ndr_print_uint32(ndr, "enableforcedlogoff", r->enableforcedlogoff);
7720 ndr_print_uint32(ndr, "timesource", r->timesource);
7721 ndr_print_uint32(ndr, "acceptdownlevelapis", r->acceptdownlevelapis);
7722 ndr_print_uint32(ndr, "lmannounce", r->lmannounce);
7723 ndr_print_ptr(ndr, "domain", r->domain);
7724 ndr->depth++;
7725 if (r->domain) {
7726 ndr_print_string(ndr, "domain", r->domain);
7728 ndr->depth--;
7729 ndr_print_uint32(ndr, "maxcopyreadlen", r->maxcopyreadlen);
7730 ndr_print_uint32(ndr, "maxcopywritelen", r->maxcopywritelen);
7731 ndr_print_uint32(ndr, "minkeepsearch", r->minkeepsearch);
7732 ndr_print_uint32(ndr, "minkeepcomplsearch", r->minkeepcomplsearch);
7733 ndr_print_uint32(ndr, "maxkeepcomplsearch", r->maxkeepcomplsearch);
7734 ndr_print_uint32(ndr, "threadcountadd", r->threadcountadd);
7735 ndr_print_uint32(ndr, "numlockthreads", r->numlockthreads);
7736 ndr_print_uint32(ndr, "scavtimeout", r->scavtimeout);
7737 ndr_print_uint32(ndr, "minrcvqueue", r->minrcvqueue);
7738 ndr_print_uint32(ndr, "minfreeworkitems", r->minfreeworkitems);
7739 ndr_print_uint32(ndr, "xactmemsize", r->xactmemsize);
7740 ndr_print_uint32(ndr, "threadpriority", r->threadpriority);
7741 ndr_print_uint32(ndr, "maxmpxct", r->maxmpxct);
7742 ndr_print_uint32(ndr, "oplockbreakwait", r->oplockbreakwait);
7743 ndr_print_uint32(ndr, "oplockbreakresponsewait", r->oplockbreakresponsewait);
7744 ndr_print_uint32(ndr, "enableoplocks", r->enableoplocks);
7745 ndr_print_uint32(ndr, "enableoplockforceclose", r->enableoplockforceclose);
7746 ndr_print_uint32(ndr, "enablefcbopens", r->enablefcbopens);
7747 ndr_print_uint32(ndr, "enableraw", r->enableraw);
7748 ndr_print_uint32(ndr, "enablesharednetdrives", r->enablesharednetdrives);
7749 ndr_print_uint32(ndr, "minfreeconnections", r->minfreeconnections);
7750 ndr_print_uint32(ndr, "maxfreeconnections", r->maxfreeconnections);
7751 ndr_print_uint32(ndr, "initsesstable", r->initsesstable);
7752 ndr_print_uint32(ndr, "initconntable", r->initconntable);
7753 ndr_print_uint32(ndr, "initfiletable", r->initfiletable);
7754 ndr_print_uint32(ndr, "initsearchtable", r->initsearchtable);
7755 ndr_print_uint32(ndr, "alertsched", r->alertsched);
7756 ndr_print_uint32(ndr, "errortreshold", r->errortreshold);
7757 ndr_print_uint32(ndr, "networkerrortreshold", r->networkerrortreshold);
7758 ndr_print_uint32(ndr, "diskspacetreshold", r->diskspacetreshold);
7759 ndr_print_uint32(ndr, "reserved", r->reserved);
7760 ndr_print_uint32(ndr, "maxlinkdelay", r->maxlinkdelay);
7761 ndr_print_uint32(ndr, "minlinkthroughput", r->minlinkthroughput);
7762 ndr_print_uint32(ndr, "linkinfovalidtime", r->linkinfovalidtime);
7763 ndr_print_uint32(ndr, "scavqosinfoupdatetime", r->scavqosinfoupdatetime);
7764 ndr_print_uint32(ndr, "maxworkitemidletime", r->maxworkitemidletime);
7765 ndr->depth--;
7768 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1005(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1005 *r)
7770 if (ndr_flags & NDR_SCALARS) {
7771 NDR_CHECK(ndr_push_align(ndr, 5));
7772 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
7773 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
7775 if (ndr_flags & NDR_BUFFERS) {
7776 if (r->comment) {
7777 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
7778 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
7779 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
7780 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
7783 return NDR_ERR_SUCCESS;
7786 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1005(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1005 *r)
7788 uint32_t _ptr_comment;
7789 TALLOC_CTX *_mem_save_comment_0;
7790 if (ndr_flags & NDR_SCALARS) {
7791 NDR_CHECK(ndr_pull_align(ndr, 5));
7792 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
7793 if (_ptr_comment) {
7794 NDR_PULL_ALLOC(ndr, r->comment);
7795 } else {
7796 r->comment = NULL;
7798 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
7800 if (ndr_flags & NDR_BUFFERS) {
7801 if (r->comment) {
7802 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
7803 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
7804 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
7805 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
7806 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
7807 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
7809 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
7810 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
7811 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
7814 return NDR_ERR_SUCCESS;
7817 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1005(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1005 *r)
7819 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1005");
7820 ndr->depth++;
7821 ndr_print_ptr(ndr, "comment", r->comment);
7822 ndr->depth++;
7823 if (r->comment) {
7824 ndr_print_string(ndr, "comment", r->comment);
7826 ndr->depth--;
7827 ndr->depth--;
7830 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1010(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1010 *r)
7832 if (ndr_flags & NDR_SCALARS) {
7833 NDR_CHECK(ndr_push_align(ndr, 4));
7834 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->disc));
7835 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
7837 if (ndr_flags & NDR_BUFFERS) {
7839 return NDR_ERR_SUCCESS;
7842 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1010(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1010 *r)
7844 if (ndr_flags & NDR_SCALARS) {
7845 NDR_CHECK(ndr_pull_align(ndr, 4));
7846 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->disc));
7847 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
7849 if (ndr_flags & NDR_BUFFERS) {
7851 return NDR_ERR_SUCCESS;
7854 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1010(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1010 *r)
7856 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1010");
7857 ndr->depth++;
7858 ndr_print_uint32(ndr, "disc", r->disc);
7859 ndr->depth--;
7862 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1016(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1016 *r)
7864 if (ndr_flags & NDR_SCALARS) {
7865 NDR_CHECK(ndr_push_align(ndr, 4));
7866 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->hidden));
7867 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
7869 if (ndr_flags & NDR_BUFFERS) {
7871 return NDR_ERR_SUCCESS;
7874 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1016(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1016 *r)
7876 if (ndr_flags & NDR_SCALARS) {
7877 NDR_CHECK(ndr_pull_align(ndr, 4));
7878 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->hidden));
7879 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
7881 if (ndr_flags & NDR_BUFFERS) {
7883 return NDR_ERR_SUCCESS;
7886 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1016(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1016 *r)
7888 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1016");
7889 ndr->depth++;
7890 ndr_print_uint32(ndr, "hidden", r->hidden);
7891 ndr->depth--;
7894 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1017(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1017 *r)
7896 if (ndr_flags & NDR_SCALARS) {
7897 NDR_CHECK(ndr_push_align(ndr, 4));
7898 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->announce));
7899 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
7901 if (ndr_flags & NDR_BUFFERS) {
7903 return NDR_ERR_SUCCESS;
7906 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1017(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1017 *r)
7908 if (ndr_flags & NDR_SCALARS) {
7909 NDR_CHECK(ndr_pull_align(ndr, 4));
7910 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->announce));
7911 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
7913 if (ndr_flags & NDR_BUFFERS) {
7915 return NDR_ERR_SUCCESS;
7918 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1017(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1017 *r)
7920 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1017");
7921 ndr->depth++;
7922 ndr_print_uint32(ndr, "announce", r->announce);
7923 ndr->depth--;
7926 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1018(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1018 *r)
7928 if (ndr_flags & NDR_SCALARS) {
7929 NDR_CHECK(ndr_push_align(ndr, 4));
7930 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->anndelta));
7931 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
7933 if (ndr_flags & NDR_BUFFERS) {
7935 return NDR_ERR_SUCCESS;
7938 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1018(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1018 *r)
7940 if (ndr_flags & NDR_SCALARS) {
7941 NDR_CHECK(ndr_pull_align(ndr, 4));
7942 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->anndelta));
7943 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
7945 if (ndr_flags & NDR_BUFFERS) {
7947 return NDR_ERR_SUCCESS;
7950 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1018(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1018 *r)
7952 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1018");
7953 ndr->depth++;
7954 ndr_print_uint32(ndr, "anndelta", r->anndelta);
7955 ndr->depth--;
7958 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1107(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1107 *r)
7960 if (ndr_flags & NDR_SCALARS) {
7961 NDR_CHECK(ndr_push_align(ndr, 4));
7962 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->users));
7963 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
7965 if (ndr_flags & NDR_BUFFERS) {
7967 return NDR_ERR_SUCCESS;
7970 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1107(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1107 *r)
7972 if (ndr_flags & NDR_SCALARS) {
7973 NDR_CHECK(ndr_pull_align(ndr, 4));
7974 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->users));
7975 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
7977 if (ndr_flags & NDR_BUFFERS) {
7979 return NDR_ERR_SUCCESS;
7982 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1107(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1107 *r)
7984 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1107");
7985 ndr->depth++;
7986 ndr_print_uint32(ndr, "users", r->users);
7987 ndr->depth--;
7990 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1501(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1501 *r)
7992 if (ndr_flags & NDR_SCALARS) {
7993 NDR_CHECK(ndr_push_align(ndr, 4));
7994 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessopens));
7995 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
7997 if (ndr_flags & NDR_BUFFERS) {
7999 return NDR_ERR_SUCCESS;
8002 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1501(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1501 *r)
8004 if (ndr_flags & NDR_SCALARS) {
8005 NDR_CHECK(ndr_pull_align(ndr, 4));
8006 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessopens));
8007 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8009 if (ndr_flags & NDR_BUFFERS) {
8011 return NDR_ERR_SUCCESS;
8014 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1501(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1501 *r)
8016 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1501");
8017 ndr->depth++;
8018 ndr_print_uint32(ndr, "sessopens", r->sessopens);
8019 ndr->depth--;
8022 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1502(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1502 *r)
8024 if (ndr_flags & NDR_SCALARS) {
8025 NDR_CHECK(ndr_push_align(ndr, 4));
8026 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessvcs));
8027 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8029 if (ndr_flags & NDR_BUFFERS) {
8031 return NDR_ERR_SUCCESS;
8034 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1502(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1502 *r)
8036 if (ndr_flags & NDR_SCALARS) {
8037 NDR_CHECK(ndr_pull_align(ndr, 4));
8038 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessvcs));
8039 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8041 if (ndr_flags & NDR_BUFFERS) {
8043 return NDR_ERR_SUCCESS;
8046 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1502(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1502 *r)
8048 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1502");
8049 ndr->depth++;
8050 ndr_print_uint32(ndr, "sessvcs", r->sessvcs);
8051 ndr->depth--;
8054 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1503(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1503 *r)
8056 if (ndr_flags & NDR_SCALARS) {
8057 NDR_CHECK(ndr_push_align(ndr, 4));
8058 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->opensearch));
8059 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8061 if (ndr_flags & NDR_BUFFERS) {
8063 return NDR_ERR_SUCCESS;
8066 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1503(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1503 *r)
8068 if (ndr_flags & NDR_SCALARS) {
8069 NDR_CHECK(ndr_pull_align(ndr, 4));
8070 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->opensearch));
8071 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8073 if (ndr_flags & NDR_BUFFERS) {
8075 return NDR_ERR_SUCCESS;
8078 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1503(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1503 *r)
8080 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1503");
8081 ndr->depth++;
8082 ndr_print_uint32(ndr, "opensearch", r->opensearch);
8083 ndr->depth--;
8086 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1506(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1506 *r)
8088 if (ndr_flags & NDR_SCALARS) {
8089 NDR_CHECK(ndr_push_align(ndr, 4));
8090 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxworkitems));
8091 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8093 if (ndr_flags & NDR_BUFFERS) {
8095 return NDR_ERR_SUCCESS;
8098 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1506(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1506 *r)
8100 if (ndr_flags & NDR_SCALARS) {
8101 NDR_CHECK(ndr_pull_align(ndr, 4));
8102 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxworkitems));
8103 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8105 if (ndr_flags & NDR_BUFFERS) {
8107 return NDR_ERR_SUCCESS;
8110 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1506(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1506 *r)
8112 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1506");
8113 ndr->depth++;
8114 ndr_print_uint32(ndr, "maxworkitems", r->maxworkitems);
8115 ndr->depth--;
8118 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1509(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1509 *r)
8120 if (ndr_flags & NDR_SCALARS) {
8121 NDR_CHECK(ndr_push_align(ndr, 4));
8122 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxrawbuflen));
8123 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8125 if (ndr_flags & NDR_BUFFERS) {
8127 return NDR_ERR_SUCCESS;
8130 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1509(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1509 *r)
8132 if (ndr_flags & NDR_SCALARS) {
8133 NDR_CHECK(ndr_pull_align(ndr, 4));
8134 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxrawbuflen));
8135 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8137 if (ndr_flags & NDR_BUFFERS) {
8139 return NDR_ERR_SUCCESS;
8142 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1509(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1509 *r)
8144 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1509");
8145 ndr->depth++;
8146 ndr_print_uint32(ndr, "maxrawbuflen", r->maxrawbuflen);
8147 ndr->depth--;
8150 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1510(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1510 *r)
8152 if (ndr_flags & NDR_SCALARS) {
8153 NDR_CHECK(ndr_push_align(ndr, 4));
8154 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sessusers));
8155 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8157 if (ndr_flags & NDR_BUFFERS) {
8159 return NDR_ERR_SUCCESS;
8162 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1510(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1510 *r)
8164 if (ndr_flags & NDR_SCALARS) {
8165 NDR_CHECK(ndr_pull_align(ndr, 4));
8166 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sessusers));
8167 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8169 if (ndr_flags & NDR_BUFFERS) {
8171 return NDR_ERR_SUCCESS;
8174 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1510(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1510 *r)
8176 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1510");
8177 ndr->depth++;
8178 ndr_print_uint32(ndr, "sessusers", r->sessusers);
8179 ndr->depth--;
8182 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1511(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1511 *r)
8184 if (ndr_flags & NDR_SCALARS) {
8185 NDR_CHECK(ndr_push_align(ndr, 4));
8186 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sesscons));
8187 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8189 if (ndr_flags & NDR_BUFFERS) {
8191 return NDR_ERR_SUCCESS;
8194 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1511(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1511 *r)
8196 if (ndr_flags & NDR_SCALARS) {
8197 NDR_CHECK(ndr_pull_align(ndr, 4));
8198 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sesscons));
8199 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8201 if (ndr_flags & NDR_BUFFERS) {
8203 return NDR_ERR_SUCCESS;
8206 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1511(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1511 *r)
8208 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1511");
8209 ndr->depth++;
8210 ndr_print_uint32(ndr, "sesscons", r->sesscons);
8211 ndr->depth--;
8214 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1512(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1512 *r)
8216 if (ndr_flags & NDR_SCALARS) {
8217 NDR_CHECK(ndr_push_align(ndr, 4));
8218 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxnonpagedmemoryusage));
8219 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8221 if (ndr_flags & NDR_BUFFERS) {
8223 return NDR_ERR_SUCCESS;
8226 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1512(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1512 *r)
8228 if (ndr_flags & NDR_SCALARS) {
8229 NDR_CHECK(ndr_pull_align(ndr, 4));
8230 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxnonpagedmemoryusage));
8231 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8233 if (ndr_flags & NDR_BUFFERS) {
8235 return NDR_ERR_SUCCESS;
8238 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1512(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1512 *r)
8240 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1512");
8241 ndr->depth++;
8242 ndr_print_uint32(ndr, "maxnonpagedmemoryusage", r->maxnonpagedmemoryusage);
8243 ndr->depth--;
8246 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1513(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1513 *r)
8248 if (ndr_flags & NDR_SCALARS) {
8249 NDR_CHECK(ndr_push_align(ndr, 4));
8250 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxpagedmemoryusage));
8251 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8253 if (ndr_flags & NDR_BUFFERS) {
8255 return NDR_ERR_SUCCESS;
8258 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1513(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1513 *r)
8260 if (ndr_flags & NDR_SCALARS) {
8261 NDR_CHECK(ndr_pull_align(ndr, 4));
8262 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxpagedmemoryusage));
8263 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8265 if (ndr_flags & NDR_BUFFERS) {
8267 return NDR_ERR_SUCCESS;
8270 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1513(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1513 *r)
8272 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1513");
8273 ndr->depth++;
8274 ndr_print_uint32(ndr, "maxpagedmemoryusage", r->maxpagedmemoryusage);
8275 ndr->depth--;
8278 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1514(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1514 *r)
8280 if (ndr_flags & NDR_SCALARS) {
8281 NDR_CHECK(ndr_push_align(ndr, 4));
8282 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesoftcompat));
8283 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8285 if (ndr_flags & NDR_BUFFERS) {
8287 return NDR_ERR_SUCCESS;
8290 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1514(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1514 *r)
8292 if (ndr_flags & NDR_SCALARS) {
8293 NDR_CHECK(ndr_pull_align(ndr, 4));
8294 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesoftcompat));
8295 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8297 if (ndr_flags & NDR_BUFFERS) {
8299 return NDR_ERR_SUCCESS;
8302 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1514(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1514 *r)
8304 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1514");
8305 ndr->depth++;
8306 ndr_print_uint32(ndr, "enablesoftcompat", r->enablesoftcompat);
8307 ndr->depth--;
8310 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1515(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1515 *r)
8312 if (ndr_flags & NDR_SCALARS) {
8313 NDR_CHECK(ndr_push_align(ndr, 4));
8314 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableforcedlogoff));
8315 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8317 if (ndr_flags & NDR_BUFFERS) {
8319 return NDR_ERR_SUCCESS;
8322 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1515(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1515 *r)
8324 if (ndr_flags & NDR_SCALARS) {
8325 NDR_CHECK(ndr_pull_align(ndr, 4));
8326 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableforcedlogoff));
8327 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8329 if (ndr_flags & NDR_BUFFERS) {
8331 return NDR_ERR_SUCCESS;
8334 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1515(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1515 *r)
8336 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1515");
8337 ndr->depth++;
8338 ndr_print_uint32(ndr, "enableforcedlogoff", r->enableforcedlogoff);
8339 ndr->depth--;
8342 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1516(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1516 *r)
8344 if (ndr_flags & NDR_SCALARS) {
8345 NDR_CHECK(ndr_push_align(ndr, 4));
8346 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timesource));
8347 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8349 if (ndr_flags & NDR_BUFFERS) {
8351 return NDR_ERR_SUCCESS;
8354 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1516(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1516 *r)
8356 if (ndr_flags & NDR_SCALARS) {
8357 NDR_CHECK(ndr_pull_align(ndr, 4));
8358 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timesource));
8359 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8361 if (ndr_flags & NDR_BUFFERS) {
8363 return NDR_ERR_SUCCESS;
8366 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1516(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1516 *r)
8368 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1516");
8369 ndr->depth++;
8370 ndr_print_uint32(ndr, "timesource", r->timesource);
8371 ndr->depth--;
8374 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1518(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1518 *r)
8376 if (ndr_flags & NDR_SCALARS) {
8377 NDR_CHECK(ndr_push_align(ndr, 4));
8378 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->lmannounce));
8379 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8381 if (ndr_flags & NDR_BUFFERS) {
8383 return NDR_ERR_SUCCESS;
8386 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1518(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1518 *r)
8388 if (ndr_flags & NDR_SCALARS) {
8389 NDR_CHECK(ndr_pull_align(ndr, 4));
8390 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->lmannounce));
8391 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8393 if (ndr_flags & NDR_BUFFERS) {
8395 return NDR_ERR_SUCCESS;
8398 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1518(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1518 *r)
8400 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1518");
8401 ndr->depth++;
8402 ndr_print_uint32(ndr, "lmannounce", r->lmannounce);
8403 ndr->depth--;
8406 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1520(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1520 *r)
8408 if (ndr_flags & NDR_SCALARS) {
8409 NDR_CHECK(ndr_push_align(ndr, 4));
8410 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxcopyreadlen));
8411 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8413 if (ndr_flags & NDR_BUFFERS) {
8415 return NDR_ERR_SUCCESS;
8418 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1520(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1520 *r)
8420 if (ndr_flags & NDR_SCALARS) {
8421 NDR_CHECK(ndr_pull_align(ndr, 4));
8422 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxcopyreadlen));
8423 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8425 if (ndr_flags & NDR_BUFFERS) {
8427 return NDR_ERR_SUCCESS;
8430 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1520(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1520 *r)
8432 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1520");
8433 ndr->depth++;
8434 ndr_print_uint32(ndr, "maxcopyreadlen", r->maxcopyreadlen);
8435 ndr->depth--;
8438 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1521(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1521 *r)
8440 if (ndr_flags & NDR_SCALARS) {
8441 NDR_CHECK(ndr_push_align(ndr, 4));
8442 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxcopywritelen));
8443 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8445 if (ndr_flags & NDR_BUFFERS) {
8447 return NDR_ERR_SUCCESS;
8450 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1521(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1521 *r)
8452 if (ndr_flags & NDR_SCALARS) {
8453 NDR_CHECK(ndr_pull_align(ndr, 4));
8454 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxcopywritelen));
8455 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8457 if (ndr_flags & NDR_BUFFERS) {
8459 return NDR_ERR_SUCCESS;
8462 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1521(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1521 *r)
8464 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1521");
8465 ndr->depth++;
8466 ndr_print_uint32(ndr, "maxcopywritelen", r->maxcopywritelen);
8467 ndr->depth--;
8470 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1522(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1522 *r)
8472 if (ndr_flags & NDR_SCALARS) {
8473 NDR_CHECK(ndr_push_align(ndr, 4));
8474 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minkeepsearch));
8475 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8477 if (ndr_flags & NDR_BUFFERS) {
8479 return NDR_ERR_SUCCESS;
8482 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1522(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1522 *r)
8484 if (ndr_flags & NDR_SCALARS) {
8485 NDR_CHECK(ndr_pull_align(ndr, 4));
8486 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minkeepsearch));
8487 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8489 if (ndr_flags & NDR_BUFFERS) {
8491 return NDR_ERR_SUCCESS;
8494 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1522(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1522 *r)
8496 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1522");
8497 ndr->depth++;
8498 ndr_print_uint32(ndr, "minkeepsearch", r->minkeepsearch);
8499 ndr->depth--;
8502 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1523(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1523 *r)
8504 if (ndr_flags & NDR_SCALARS) {
8505 NDR_CHECK(ndr_push_align(ndr, 4));
8506 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxkeepsearch));
8507 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8509 if (ndr_flags & NDR_BUFFERS) {
8511 return NDR_ERR_SUCCESS;
8514 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1523(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1523 *r)
8516 if (ndr_flags & NDR_SCALARS) {
8517 NDR_CHECK(ndr_pull_align(ndr, 4));
8518 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxkeepsearch));
8519 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8521 if (ndr_flags & NDR_BUFFERS) {
8523 return NDR_ERR_SUCCESS;
8526 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1523(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1523 *r)
8528 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1523");
8529 ndr->depth++;
8530 ndr_print_uint32(ndr, "maxkeepsearch", r->maxkeepsearch);
8531 ndr->depth--;
8534 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1524(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1524 *r)
8536 if (ndr_flags & NDR_SCALARS) {
8537 NDR_CHECK(ndr_push_align(ndr, 4));
8538 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minkeepcomplsearch));
8539 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8541 if (ndr_flags & NDR_BUFFERS) {
8543 return NDR_ERR_SUCCESS;
8546 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1524(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1524 *r)
8548 if (ndr_flags & NDR_SCALARS) {
8549 NDR_CHECK(ndr_pull_align(ndr, 4));
8550 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minkeepcomplsearch));
8551 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8553 if (ndr_flags & NDR_BUFFERS) {
8555 return NDR_ERR_SUCCESS;
8558 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1524(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1524 *r)
8560 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1524");
8561 ndr->depth++;
8562 ndr_print_uint32(ndr, "minkeepcomplsearch", r->minkeepcomplsearch);
8563 ndr->depth--;
8566 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1525(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1525 *r)
8568 if (ndr_flags & NDR_SCALARS) {
8569 NDR_CHECK(ndr_push_align(ndr, 4));
8570 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxkeepcomplsearch));
8571 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8573 if (ndr_flags & NDR_BUFFERS) {
8575 return NDR_ERR_SUCCESS;
8578 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1525(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1525 *r)
8580 if (ndr_flags & NDR_SCALARS) {
8581 NDR_CHECK(ndr_pull_align(ndr, 4));
8582 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxkeepcomplsearch));
8583 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8585 if (ndr_flags & NDR_BUFFERS) {
8587 return NDR_ERR_SUCCESS;
8590 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1525(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1525 *r)
8592 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1525");
8593 ndr->depth++;
8594 ndr_print_uint32(ndr, "maxkeepcomplsearch", r->maxkeepcomplsearch);
8595 ndr->depth--;
8598 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1528(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1528 *r)
8600 if (ndr_flags & NDR_SCALARS) {
8601 NDR_CHECK(ndr_push_align(ndr, 4));
8602 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->scavtimeout));
8603 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8605 if (ndr_flags & NDR_BUFFERS) {
8607 return NDR_ERR_SUCCESS;
8610 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1528(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1528 *r)
8612 if (ndr_flags & NDR_SCALARS) {
8613 NDR_CHECK(ndr_pull_align(ndr, 4));
8614 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->scavtimeout));
8615 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8617 if (ndr_flags & NDR_BUFFERS) {
8619 return NDR_ERR_SUCCESS;
8622 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1528(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1528 *r)
8624 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1528");
8625 ndr->depth++;
8626 ndr_print_uint32(ndr, "scavtimeout", r->scavtimeout);
8627 ndr->depth--;
8630 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1529(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1529 *r)
8632 if (ndr_flags & NDR_SCALARS) {
8633 NDR_CHECK(ndr_push_align(ndr, 4));
8634 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minrcvqueue));
8635 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8637 if (ndr_flags & NDR_BUFFERS) {
8639 return NDR_ERR_SUCCESS;
8642 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1529(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1529 *r)
8644 if (ndr_flags & NDR_SCALARS) {
8645 NDR_CHECK(ndr_pull_align(ndr, 4));
8646 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minrcvqueue));
8647 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8649 if (ndr_flags & NDR_BUFFERS) {
8651 return NDR_ERR_SUCCESS;
8654 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1529(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1529 *r)
8656 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1529");
8657 ndr->depth++;
8658 ndr_print_uint32(ndr, "minrcvqueue", r->minrcvqueue);
8659 ndr->depth--;
8662 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1530(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1530 *r)
8664 if (ndr_flags & NDR_SCALARS) {
8665 NDR_CHECK(ndr_push_align(ndr, 4));
8666 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minfreeworkitems));
8667 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8669 if (ndr_flags & NDR_BUFFERS) {
8671 return NDR_ERR_SUCCESS;
8674 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1530(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1530 *r)
8676 if (ndr_flags & NDR_SCALARS) {
8677 NDR_CHECK(ndr_pull_align(ndr, 4));
8678 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minfreeworkitems));
8679 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8681 if (ndr_flags & NDR_BUFFERS) {
8683 return NDR_ERR_SUCCESS;
8686 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1530(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1530 *r)
8688 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1530");
8689 ndr->depth++;
8690 ndr_print_uint32(ndr, "minfreeworkitems", r->minfreeworkitems);
8691 ndr->depth--;
8694 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1533(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1533 *r)
8696 if (ndr_flags & NDR_SCALARS) {
8697 NDR_CHECK(ndr_push_align(ndr, 4));
8698 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxmpxct));
8699 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8701 if (ndr_flags & NDR_BUFFERS) {
8703 return NDR_ERR_SUCCESS;
8706 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1533(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1533 *r)
8708 if (ndr_flags & NDR_SCALARS) {
8709 NDR_CHECK(ndr_pull_align(ndr, 4));
8710 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxmpxct));
8711 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8713 if (ndr_flags & NDR_BUFFERS) {
8715 return NDR_ERR_SUCCESS;
8718 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1533(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1533 *r)
8720 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1533");
8721 ndr->depth++;
8722 ndr_print_uint32(ndr, "maxmpxct", r->maxmpxct);
8723 ndr->depth--;
8726 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1534(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1534 *r)
8728 if (ndr_flags & NDR_SCALARS) {
8729 NDR_CHECK(ndr_push_align(ndr, 4));
8730 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->oplockbreakwait));
8731 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8733 if (ndr_flags & NDR_BUFFERS) {
8735 return NDR_ERR_SUCCESS;
8738 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1534(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1534 *r)
8740 if (ndr_flags & NDR_SCALARS) {
8741 NDR_CHECK(ndr_pull_align(ndr, 4));
8742 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->oplockbreakwait));
8743 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8745 if (ndr_flags & NDR_BUFFERS) {
8747 return NDR_ERR_SUCCESS;
8750 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1534(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1534 *r)
8752 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1534");
8753 ndr->depth++;
8754 ndr_print_uint32(ndr, "oplockbreakwait", r->oplockbreakwait);
8755 ndr->depth--;
8758 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1535(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1535 *r)
8760 if (ndr_flags & NDR_SCALARS) {
8761 NDR_CHECK(ndr_push_align(ndr, 4));
8762 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->oplockbreakresponsewait));
8763 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8765 if (ndr_flags & NDR_BUFFERS) {
8767 return NDR_ERR_SUCCESS;
8770 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1535(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1535 *r)
8772 if (ndr_flags & NDR_SCALARS) {
8773 NDR_CHECK(ndr_pull_align(ndr, 4));
8774 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->oplockbreakresponsewait));
8775 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8777 if (ndr_flags & NDR_BUFFERS) {
8779 return NDR_ERR_SUCCESS;
8782 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1535(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1535 *r)
8784 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1535");
8785 ndr->depth++;
8786 ndr_print_uint32(ndr, "oplockbreakresponsewait", r->oplockbreakresponsewait);
8787 ndr->depth--;
8790 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1536(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1536 *r)
8792 if (ndr_flags & NDR_SCALARS) {
8793 NDR_CHECK(ndr_push_align(ndr, 4));
8794 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableoplocks));
8795 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8797 if (ndr_flags & NDR_BUFFERS) {
8799 return NDR_ERR_SUCCESS;
8802 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1536(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1536 *r)
8804 if (ndr_flags & NDR_SCALARS) {
8805 NDR_CHECK(ndr_pull_align(ndr, 4));
8806 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableoplocks));
8807 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8809 if (ndr_flags & NDR_BUFFERS) {
8811 return NDR_ERR_SUCCESS;
8814 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1536(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1536 *r)
8816 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1536");
8817 ndr->depth++;
8818 ndr_print_uint32(ndr, "enableoplocks", r->enableoplocks);
8819 ndr->depth--;
8822 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1537(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1537 *r)
8824 if (ndr_flags & NDR_SCALARS) {
8825 NDR_CHECK(ndr_push_align(ndr, 4));
8826 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableoplockforceclose));
8827 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8829 if (ndr_flags & NDR_BUFFERS) {
8831 return NDR_ERR_SUCCESS;
8834 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1537(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1537 *r)
8836 if (ndr_flags & NDR_SCALARS) {
8837 NDR_CHECK(ndr_pull_align(ndr, 4));
8838 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableoplockforceclose));
8839 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8841 if (ndr_flags & NDR_BUFFERS) {
8843 return NDR_ERR_SUCCESS;
8846 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1537(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1537 *r)
8848 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1537");
8849 ndr->depth++;
8850 ndr_print_uint32(ndr, "enableoplockforceclose", r->enableoplockforceclose);
8851 ndr->depth--;
8854 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1538(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1538 *r)
8856 if (ndr_flags & NDR_SCALARS) {
8857 NDR_CHECK(ndr_push_align(ndr, 4));
8858 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablefcbopens));
8859 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8861 if (ndr_flags & NDR_BUFFERS) {
8863 return NDR_ERR_SUCCESS;
8866 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1538(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1538 *r)
8868 if (ndr_flags & NDR_SCALARS) {
8869 NDR_CHECK(ndr_pull_align(ndr, 4));
8870 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablefcbopens));
8871 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8873 if (ndr_flags & NDR_BUFFERS) {
8875 return NDR_ERR_SUCCESS;
8878 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1538(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1538 *r)
8880 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1538");
8881 ndr->depth++;
8882 ndr_print_uint32(ndr, "enablefcbopens", r->enablefcbopens);
8883 ndr->depth--;
8886 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1539(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1539 *r)
8888 if (ndr_flags & NDR_SCALARS) {
8889 NDR_CHECK(ndr_push_align(ndr, 4));
8890 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enableraw));
8891 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8893 if (ndr_flags & NDR_BUFFERS) {
8895 return NDR_ERR_SUCCESS;
8898 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1539(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1539 *r)
8900 if (ndr_flags & NDR_SCALARS) {
8901 NDR_CHECK(ndr_pull_align(ndr, 4));
8902 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enableraw));
8903 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8905 if (ndr_flags & NDR_BUFFERS) {
8907 return NDR_ERR_SUCCESS;
8910 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1539(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1539 *r)
8912 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1539");
8913 ndr->depth++;
8914 ndr_print_uint32(ndr, "enableraw", r->enableraw);
8915 ndr->depth--;
8918 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1540(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1540 *r)
8920 if (ndr_flags & NDR_SCALARS) {
8921 NDR_CHECK(ndr_push_align(ndr, 4));
8922 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->enablesharednetdrives));
8923 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8925 if (ndr_flags & NDR_BUFFERS) {
8927 return NDR_ERR_SUCCESS;
8930 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1540(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1540 *r)
8932 if (ndr_flags & NDR_SCALARS) {
8933 NDR_CHECK(ndr_pull_align(ndr, 4));
8934 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->enablesharednetdrives));
8935 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8937 if (ndr_flags & NDR_BUFFERS) {
8939 return NDR_ERR_SUCCESS;
8942 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1540(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1540 *r)
8944 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1540");
8945 ndr->depth++;
8946 ndr_print_uint32(ndr, "enablesharednetdrives", r->enablesharednetdrives);
8947 ndr->depth--;
8950 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1541(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1541 *r)
8952 if (ndr_flags & NDR_SCALARS) {
8953 NDR_CHECK(ndr_push_align(ndr, 4));
8954 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minfreeconnections));
8955 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8957 if (ndr_flags & NDR_BUFFERS) {
8959 return NDR_ERR_SUCCESS;
8962 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1541(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1541 *r)
8964 if (ndr_flags & NDR_SCALARS) {
8965 NDR_CHECK(ndr_pull_align(ndr, 4));
8966 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minfreeconnections));
8967 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
8969 if (ndr_flags & NDR_BUFFERS) {
8971 return NDR_ERR_SUCCESS;
8974 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1541(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1541 *r)
8976 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1541");
8977 ndr->depth++;
8978 ndr_print_uint32(ndr, "minfreeconnections", r->minfreeconnections);
8979 ndr->depth--;
8982 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1542(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1542 *r)
8984 if (ndr_flags & NDR_SCALARS) {
8985 NDR_CHECK(ndr_push_align(ndr, 4));
8986 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxfreeconnections));
8987 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
8989 if (ndr_flags & NDR_BUFFERS) {
8991 return NDR_ERR_SUCCESS;
8994 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1542(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1542 *r)
8996 if (ndr_flags & NDR_SCALARS) {
8997 NDR_CHECK(ndr_pull_align(ndr, 4));
8998 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxfreeconnections));
8999 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
9001 if (ndr_flags & NDR_BUFFERS) {
9003 return NDR_ERR_SUCCESS;
9006 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1542(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1542 *r)
9008 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1542");
9009 ndr->depth++;
9010 ndr_print_uint32(ndr, "maxfreeconnections", r->maxfreeconnections);
9011 ndr->depth--;
9014 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1543(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1543 *r)
9016 if (ndr_flags & NDR_SCALARS) {
9017 NDR_CHECK(ndr_push_align(ndr, 4));
9018 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initsesstable));
9019 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
9021 if (ndr_flags & NDR_BUFFERS) {
9023 return NDR_ERR_SUCCESS;
9026 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1543(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1543 *r)
9028 if (ndr_flags & NDR_SCALARS) {
9029 NDR_CHECK(ndr_pull_align(ndr, 4));
9030 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initsesstable));
9031 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
9033 if (ndr_flags & NDR_BUFFERS) {
9035 return NDR_ERR_SUCCESS;
9038 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1543(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1543 *r)
9040 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1543");
9041 ndr->depth++;
9042 ndr_print_uint32(ndr, "initsesstable", r->initsesstable);
9043 ndr->depth--;
9046 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1544(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1544 *r)
9048 if (ndr_flags & NDR_SCALARS) {
9049 NDR_CHECK(ndr_push_align(ndr, 4));
9050 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initconntable));
9051 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
9053 if (ndr_flags & NDR_BUFFERS) {
9055 return NDR_ERR_SUCCESS;
9058 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1544(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1544 *r)
9060 if (ndr_flags & NDR_SCALARS) {
9061 NDR_CHECK(ndr_pull_align(ndr, 4));
9062 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initconntable));
9063 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
9065 if (ndr_flags & NDR_BUFFERS) {
9067 return NDR_ERR_SUCCESS;
9070 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1544(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1544 *r)
9072 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1544");
9073 ndr->depth++;
9074 ndr_print_uint32(ndr, "initconntable", r->initconntable);
9075 ndr->depth--;
9078 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1545(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1545 *r)
9080 if (ndr_flags & NDR_SCALARS) {
9081 NDR_CHECK(ndr_push_align(ndr, 4));
9082 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initfiletable));
9083 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
9085 if (ndr_flags & NDR_BUFFERS) {
9087 return NDR_ERR_SUCCESS;
9090 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1545(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1545 *r)
9092 if (ndr_flags & NDR_SCALARS) {
9093 NDR_CHECK(ndr_pull_align(ndr, 4));
9094 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initfiletable));
9095 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
9097 if (ndr_flags & NDR_BUFFERS) {
9099 return NDR_ERR_SUCCESS;
9102 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1545(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1545 *r)
9104 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1545");
9105 ndr->depth++;
9106 ndr_print_uint32(ndr, "initfiletable", r->initfiletable);
9107 ndr->depth--;
9110 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1546(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1546 *r)
9112 if (ndr_flags & NDR_SCALARS) {
9113 NDR_CHECK(ndr_push_align(ndr, 4));
9114 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->initsearchtable));
9115 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
9117 if (ndr_flags & NDR_BUFFERS) {
9119 return NDR_ERR_SUCCESS;
9122 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1546(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1546 *r)
9124 if (ndr_flags & NDR_SCALARS) {
9125 NDR_CHECK(ndr_pull_align(ndr, 4));
9126 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->initsearchtable));
9127 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
9129 if (ndr_flags & NDR_BUFFERS) {
9131 return NDR_ERR_SUCCESS;
9134 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1546(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1546 *r)
9136 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1546");
9137 ndr->depth++;
9138 ndr_print_uint32(ndr, "initsearchtable", r->initsearchtable);
9139 ndr->depth--;
9142 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1547(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1547 *r)
9144 if (ndr_flags & NDR_SCALARS) {
9145 NDR_CHECK(ndr_push_align(ndr, 4));
9146 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->alertsched));
9147 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
9149 if (ndr_flags & NDR_BUFFERS) {
9151 return NDR_ERR_SUCCESS;
9154 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1547(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1547 *r)
9156 if (ndr_flags & NDR_SCALARS) {
9157 NDR_CHECK(ndr_pull_align(ndr, 4));
9158 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->alertsched));
9159 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
9161 if (ndr_flags & NDR_BUFFERS) {
9163 return NDR_ERR_SUCCESS;
9166 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1547(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1547 *r)
9168 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1547");
9169 ndr->depth++;
9170 ndr_print_uint32(ndr, "alertsched", r->alertsched);
9171 ndr->depth--;
9174 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1548(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1548 *r)
9176 if (ndr_flags & NDR_SCALARS) {
9177 NDR_CHECK(ndr_push_align(ndr, 4));
9178 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->errortreshold));
9179 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
9181 if (ndr_flags & NDR_BUFFERS) {
9183 return NDR_ERR_SUCCESS;
9186 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1548(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1548 *r)
9188 if (ndr_flags & NDR_SCALARS) {
9189 NDR_CHECK(ndr_pull_align(ndr, 4));
9190 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->errortreshold));
9191 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
9193 if (ndr_flags & NDR_BUFFERS) {
9195 return NDR_ERR_SUCCESS;
9198 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1548(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1548 *r)
9200 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1548");
9201 ndr->depth++;
9202 ndr_print_uint32(ndr, "errortreshold", r->errortreshold);
9203 ndr->depth--;
9206 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1549(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1549 *r)
9208 if (ndr_flags & NDR_SCALARS) {
9209 NDR_CHECK(ndr_push_align(ndr, 4));
9210 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->networkerrortreshold));
9211 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
9213 if (ndr_flags & NDR_BUFFERS) {
9215 return NDR_ERR_SUCCESS;
9218 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1549(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1549 *r)
9220 if (ndr_flags & NDR_SCALARS) {
9221 NDR_CHECK(ndr_pull_align(ndr, 4));
9222 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->networkerrortreshold));
9223 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
9225 if (ndr_flags & NDR_BUFFERS) {
9227 return NDR_ERR_SUCCESS;
9230 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1549(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1549 *r)
9232 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1549");
9233 ndr->depth++;
9234 ndr_print_uint32(ndr, "networkerrortreshold", r->networkerrortreshold);
9235 ndr->depth--;
9238 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1550(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1550 *r)
9240 if (ndr_flags & NDR_SCALARS) {
9241 NDR_CHECK(ndr_push_align(ndr, 4));
9242 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->diskspacetreshold));
9243 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
9245 if (ndr_flags & NDR_BUFFERS) {
9247 return NDR_ERR_SUCCESS;
9250 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1550(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1550 *r)
9252 if (ndr_flags & NDR_SCALARS) {
9253 NDR_CHECK(ndr_pull_align(ndr, 4));
9254 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->diskspacetreshold));
9255 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
9257 if (ndr_flags & NDR_BUFFERS) {
9259 return NDR_ERR_SUCCESS;
9262 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1550(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1550 *r)
9264 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1550");
9265 ndr->depth++;
9266 ndr_print_uint32(ndr, "diskspacetreshold", r->diskspacetreshold);
9267 ndr->depth--;
9270 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1552(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1552 *r)
9272 if (ndr_flags & NDR_SCALARS) {
9273 NDR_CHECK(ndr_push_align(ndr, 4));
9274 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxlinkdelay));
9275 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
9277 if (ndr_flags & NDR_BUFFERS) {
9279 return NDR_ERR_SUCCESS;
9282 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1552(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1552 *r)
9284 if (ndr_flags & NDR_SCALARS) {
9285 NDR_CHECK(ndr_pull_align(ndr, 4));
9286 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxlinkdelay));
9287 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
9289 if (ndr_flags & NDR_BUFFERS) {
9291 return NDR_ERR_SUCCESS;
9294 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1552(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1552 *r)
9296 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1552");
9297 ndr->depth++;
9298 ndr_print_uint32(ndr, "maxlinkdelay", r->maxlinkdelay);
9299 ndr->depth--;
9302 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1553(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1553 *r)
9304 if (ndr_flags & NDR_SCALARS) {
9305 NDR_CHECK(ndr_push_align(ndr, 4));
9306 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->minlinkthroughput));
9307 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
9309 if (ndr_flags & NDR_BUFFERS) {
9311 return NDR_ERR_SUCCESS;
9314 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1553(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1553 *r)
9316 if (ndr_flags & NDR_SCALARS) {
9317 NDR_CHECK(ndr_pull_align(ndr, 4));
9318 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->minlinkthroughput));
9319 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
9321 if (ndr_flags & NDR_BUFFERS) {
9323 return NDR_ERR_SUCCESS;
9326 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1553(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1553 *r)
9328 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1553");
9329 ndr->depth++;
9330 ndr_print_uint32(ndr, "minlinkthroughput", r->minlinkthroughput);
9331 ndr->depth--;
9334 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1554(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1554 *r)
9336 if (ndr_flags & NDR_SCALARS) {
9337 NDR_CHECK(ndr_push_align(ndr, 4));
9338 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->linkinfovalidtime));
9339 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
9341 if (ndr_flags & NDR_BUFFERS) {
9343 return NDR_ERR_SUCCESS;
9346 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1554(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1554 *r)
9348 if (ndr_flags & NDR_SCALARS) {
9349 NDR_CHECK(ndr_pull_align(ndr, 4));
9350 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->linkinfovalidtime));
9351 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
9353 if (ndr_flags & NDR_BUFFERS) {
9355 return NDR_ERR_SUCCESS;
9358 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1554(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1554 *r)
9360 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1554");
9361 ndr->depth++;
9362 ndr_print_uint32(ndr, "linkinfovalidtime", r->linkinfovalidtime);
9363 ndr->depth--;
9366 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1555(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1555 *r)
9368 if (ndr_flags & NDR_SCALARS) {
9369 NDR_CHECK(ndr_push_align(ndr, 4));
9370 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->scavqosinfoupdatetime));
9371 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
9373 if (ndr_flags & NDR_BUFFERS) {
9375 return NDR_ERR_SUCCESS;
9378 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1555(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1555 *r)
9380 if (ndr_flags & NDR_SCALARS) {
9381 NDR_CHECK(ndr_pull_align(ndr, 4));
9382 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->scavqosinfoupdatetime));
9383 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
9385 if (ndr_flags & NDR_BUFFERS) {
9387 return NDR_ERR_SUCCESS;
9390 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1555(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1555 *r)
9392 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1555");
9393 ndr->depth++;
9394 ndr_print_uint32(ndr, "scavqosinfoupdatetime", r->scavqosinfoupdatetime);
9395 ndr->depth--;
9398 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo1556(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetSrvInfo1556 *r)
9400 if (ndr_flags & NDR_SCALARS) {
9401 NDR_CHECK(ndr_push_align(ndr, 4));
9402 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->maxworkitemidletime));
9403 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
9405 if (ndr_flags & NDR_BUFFERS) {
9407 return NDR_ERR_SUCCESS;
9410 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo1556(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetSrvInfo1556 *r)
9412 if (ndr_flags & NDR_SCALARS) {
9413 NDR_CHECK(ndr_pull_align(ndr, 4));
9414 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->maxworkitemidletime));
9415 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
9417 if (ndr_flags & NDR_BUFFERS) {
9419 return NDR_ERR_SUCCESS;
9422 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo1556(struct ndr_print *ndr, const char *name, const struct srvsvc_NetSrvInfo1556 *r)
9424 ndr_print_struct(ndr, name, "srvsvc_NetSrvInfo1556");
9425 ndr->depth++;
9426 ndr_print_uint32(ndr, "maxworkitemidletime", r->maxworkitemidletime);
9427 ndr->depth--;
9430 static enum ndr_err_code ndr_push_srvsvc_NetSrvInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetSrvInfo *r)
9432 if (ndr_flags & NDR_SCALARS) {
9433 int level = ndr_push_get_switch_value(ndr, r);
9434 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
9435 NDR_CHECK(ndr_push_union_align(ndr, 5));
9436 switch (level) {
9437 case 100: {
9438 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info100));
9439 break; }
9441 case 101: {
9442 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info101));
9443 break; }
9445 case 102: {
9446 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info102));
9447 break; }
9449 case 402: {
9450 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info402));
9451 break; }
9453 case 403: {
9454 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info403));
9455 break; }
9457 case 502: {
9458 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info502));
9459 break; }
9461 case 503: {
9462 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info503));
9463 break; }
9465 case 599: {
9466 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info599));
9467 break; }
9469 case 1005: {
9470 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1005));
9471 break; }
9473 case 1010: {
9474 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1010));
9475 break; }
9477 case 1016: {
9478 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1016));
9479 break; }
9481 case 1017: {
9482 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1017));
9483 break; }
9485 case 1018: {
9486 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1018));
9487 break; }
9489 case 1107: {
9490 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1107));
9491 break; }
9493 case 1501: {
9494 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1501));
9495 break; }
9497 case 1502: {
9498 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1502));
9499 break; }
9501 case 1503: {
9502 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1503));
9503 break; }
9505 case 1506: {
9506 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1506));
9507 break; }
9509 case 1509: {
9510 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1509));
9511 break; }
9513 case 1510: {
9514 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1510));
9515 break; }
9517 case 1511: {
9518 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1511));
9519 break; }
9521 case 1512: {
9522 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1512));
9523 break; }
9525 case 1513: {
9526 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1513));
9527 break; }
9529 case 1514: {
9530 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1514));
9531 break; }
9533 case 1515: {
9534 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1515));
9535 break; }
9537 case 1516: {
9538 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1516));
9539 break; }
9541 case 1518: {
9542 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1518));
9543 break; }
9545 case 1520: {
9546 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1520));
9547 break; }
9549 case 1521: {
9550 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1521));
9551 break; }
9553 case 1522: {
9554 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1522));
9555 break; }
9557 case 1523: {
9558 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1523));
9559 break; }
9561 case 1524: {
9562 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1524));
9563 break; }
9565 case 1525: {
9566 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1525));
9567 break; }
9569 case 1528: {
9570 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1528));
9571 break; }
9573 case 1529: {
9574 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1529));
9575 break; }
9577 case 1530: {
9578 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1530));
9579 break; }
9581 case 1533: {
9582 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1533));
9583 break; }
9585 case 1534: {
9586 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1534));
9587 break; }
9589 case 1535: {
9590 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1535));
9591 break; }
9593 case 1536: {
9594 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1536));
9595 break; }
9597 case 1537: {
9598 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1537));
9599 break; }
9601 case 1538: {
9602 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1538));
9603 break; }
9605 case 1539: {
9606 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1539));
9607 break; }
9609 case 1540: {
9610 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1540));
9611 break; }
9613 case 1541: {
9614 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1541));
9615 break; }
9617 case 1542: {
9618 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1542));
9619 break; }
9621 case 1543: {
9622 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1543));
9623 break; }
9625 case 1544: {
9626 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1544));
9627 break; }
9629 case 1545: {
9630 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1545));
9631 break; }
9633 case 1546: {
9634 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1546));
9635 break; }
9637 case 1547: {
9638 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1547));
9639 break; }
9641 case 1548: {
9642 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1548));
9643 break; }
9645 case 1549: {
9646 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1549));
9647 break; }
9649 case 1550: {
9650 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1550));
9651 break; }
9653 case 1552: {
9654 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1552));
9655 break; }
9657 case 1553: {
9658 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1553));
9659 break; }
9661 case 1554: {
9662 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1554));
9663 break; }
9665 case 1555: {
9666 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1555));
9667 break; }
9669 case 1556: {
9670 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1556));
9671 break; }
9673 default: {
9674 break; }
9678 if (ndr_flags & NDR_BUFFERS) {
9679 int level = ndr_push_get_switch_value(ndr, r);
9680 switch (level) {
9681 case 100:
9682 if (r->info100) {
9683 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo100(ndr, NDR_SCALARS|NDR_BUFFERS, r->info100));
9685 break;
9687 case 101:
9688 if (r->info101) {
9689 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo101(ndr, NDR_SCALARS|NDR_BUFFERS, r->info101));
9691 break;
9693 case 102:
9694 if (r->info102) {
9695 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo102(ndr, NDR_SCALARS|NDR_BUFFERS, r->info102));
9697 break;
9699 case 402:
9700 if (r->info402) {
9701 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo402(ndr, NDR_SCALARS|NDR_BUFFERS, r->info402));
9703 break;
9705 case 403:
9706 if (r->info403) {
9707 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo403(ndr, NDR_SCALARS|NDR_BUFFERS, r->info403));
9709 break;
9711 case 502:
9712 if (r->info502) {
9713 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo502(ndr, NDR_SCALARS, r->info502));
9715 break;
9717 case 503:
9718 if (r->info503) {
9719 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo503(ndr, NDR_SCALARS|NDR_BUFFERS, r->info503));
9721 break;
9723 case 599:
9724 if (r->info599) {
9725 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo599(ndr, NDR_SCALARS|NDR_BUFFERS, r->info599));
9727 break;
9729 case 1005:
9730 if (r->info1005) {
9731 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1005(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1005));
9733 break;
9735 case 1010:
9736 if (r->info1010) {
9737 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1010(ndr, NDR_SCALARS, r->info1010));
9739 break;
9741 case 1016:
9742 if (r->info1016) {
9743 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1016(ndr, NDR_SCALARS, r->info1016));
9745 break;
9747 case 1017:
9748 if (r->info1017) {
9749 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1017(ndr, NDR_SCALARS, r->info1017));
9751 break;
9753 case 1018:
9754 if (r->info1018) {
9755 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1018(ndr, NDR_SCALARS, r->info1018));
9757 break;
9759 case 1107:
9760 if (r->info1107) {
9761 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1107(ndr, NDR_SCALARS, r->info1107));
9763 break;
9765 case 1501:
9766 if (r->info1501) {
9767 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1501(ndr, NDR_SCALARS, r->info1501));
9769 break;
9771 case 1502:
9772 if (r->info1502) {
9773 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1502(ndr, NDR_SCALARS, r->info1502));
9775 break;
9777 case 1503:
9778 if (r->info1503) {
9779 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1503(ndr, NDR_SCALARS, r->info1503));
9781 break;
9783 case 1506:
9784 if (r->info1506) {
9785 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1506(ndr, NDR_SCALARS, r->info1506));
9787 break;
9789 case 1509:
9790 if (r->info1509) {
9791 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1509(ndr, NDR_SCALARS, r->info1509));
9793 break;
9795 case 1510:
9796 if (r->info1510) {
9797 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1510(ndr, NDR_SCALARS, r->info1510));
9799 break;
9801 case 1511:
9802 if (r->info1511) {
9803 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1511(ndr, NDR_SCALARS, r->info1511));
9805 break;
9807 case 1512:
9808 if (r->info1512) {
9809 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1512(ndr, NDR_SCALARS, r->info1512));
9811 break;
9813 case 1513:
9814 if (r->info1513) {
9815 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1513(ndr, NDR_SCALARS, r->info1513));
9817 break;
9819 case 1514:
9820 if (r->info1514) {
9821 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1514(ndr, NDR_SCALARS, r->info1514));
9823 break;
9825 case 1515:
9826 if (r->info1515) {
9827 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1515(ndr, NDR_SCALARS, r->info1515));
9829 break;
9831 case 1516:
9832 if (r->info1516) {
9833 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1516(ndr, NDR_SCALARS, r->info1516));
9835 break;
9837 case 1518:
9838 if (r->info1518) {
9839 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1518(ndr, NDR_SCALARS, r->info1518));
9841 break;
9843 case 1520:
9844 if (r->info1520) {
9845 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1520(ndr, NDR_SCALARS, r->info1520));
9847 break;
9849 case 1521:
9850 if (r->info1521) {
9851 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1521(ndr, NDR_SCALARS, r->info1521));
9853 break;
9855 case 1522:
9856 if (r->info1522) {
9857 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1522(ndr, NDR_SCALARS, r->info1522));
9859 break;
9861 case 1523:
9862 if (r->info1523) {
9863 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1523(ndr, NDR_SCALARS, r->info1523));
9865 break;
9867 case 1524:
9868 if (r->info1524) {
9869 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1524(ndr, NDR_SCALARS, r->info1524));
9871 break;
9873 case 1525:
9874 if (r->info1525) {
9875 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1525(ndr, NDR_SCALARS, r->info1525));
9877 break;
9879 case 1528:
9880 if (r->info1528) {
9881 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1528(ndr, NDR_SCALARS, r->info1528));
9883 break;
9885 case 1529:
9886 if (r->info1529) {
9887 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1529(ndr, NDR_SCALARS, r->info1529));
9889 break;
9891 case 1530:
9892 if (r->info1530) {
9893 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1530(ndr, NDR_SCALARS, r->info1530));
9895 break;
9897 case 1533:
9898 if (r->info1533) {
9899 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1533(ndr, NDR_SCALARS, r->info1533));
9901 break;
9903 case 1534:
9904 if (r->info1534) {
9905 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1534(ndr, NDR_SCALARS, r->info1534));
9907 break;
9909 case 1535:
9910 if (r->info1535) {
9911 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1535(ndr, NDR_SCALARS, r->info1535));
9913 break;
9915 case 1536:
9916 if (r->info1536) {
9917 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1536(ndr, NDR_SCALARS, r->info1536));
9919 break;
9921 case 1537:
9922 if (r->info1537) {
9923 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1537(ndr, NDR_SCALARS, r->info1537));
9925 break;
9927 case 1538:
9928 if (r->info1538) {
9929 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1538(ndr, NDR_SCALARS, r->info1538));
9931 break;
9933 case 1539:
9934 if (r->info1539) {
9935 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1539(ndr, NDR_SCALARS, r->info1539));
9937 break;
9939 case 1540:
9940 if (r->info1540) {
9941 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1540(ndr, NDR_SCALARS, r->info1540));
9943 break;
9945 case 1541:
9946 if (r->info1541) {
9947 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1541(ndr, NDR_SCALARS, r->info1541));
9949 break;
9951 case 1542:
9952 if (r->info1542) {
9953 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1542(ndr, NDR_SCALARS, r->info1542));
9955 break;
9957 case 1543:
9958 if (r->info1543) {
9959 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1543(ndr, NDR_SCALARS, r->info1543));
9961 break;
9963 case 1544:
9964 if (r->info1544) {
9965 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1544(ndr, NDR_SCALARS, r->info1544));
9967 break;
9969 case 1545:
9970 if (r->info1545) {
9971 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1545(ndr, NDR_SCALARS, r->info1545));
9973 break;
9975 case 1546:
9976 if (r->info1546) {
9977 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1546(ndr, NDR_SCALARS, r->info1546));
9979 break;
9981 case 1547:
9982 if (r->info1547) {
9983 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1547(ndr, NDR_SCALARS, r->info1547));
9985 break;
9987 case 1548:
9988 if (r->info1548) {
9989 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1548(ndr, NDR_SCALARS, r->info1548));
9991 break;
9993 case 1549:
9994 if (r->info1549) {
9995 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1549(ndr, NDR_SCALARS, r->info1549));
9997 break;
9999 case 1550:
10000 if (r->info1550) {
10001 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1550(ndr, NDR_SCALARS, r->info1550));
10003 break;
10005 case 1552:
10006 if (r->info1552) {
10007 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1552(ndr, NDR_SCALARS, r->info1552));
10009 break;
10011 case 1553:
10012 if (r->info1553) {
10013 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1553(ndr, NDR_SCALARS, r->info1553));
10015 break;
10017 case 1554:
10018 if (r->info1554) {
10019 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1554(ndr, NDR_SCALARS, r->info1554));
10021 break;
10023 case 1555:
10024 if (r->info1555) {
10025 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1555(ndr, NDR_SCALARS, r->info1555));
10027 break;
10029 case 1556:
10030 if (r->info1556) {
10031 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo1556(ndr, NDR_SCALARS, r->info1556));
10033 break;
10035 default:
10036 break;
10040 return NDR_ERR_SUCCESS;
10043 static enum ndr_err_code ndr_pull_srvsvc_NetSrvInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetSrvInfo *r)
10045 int level;
10046 uint32_t _level;
10047 TALLOC_CTX *_mem_save_info100_0;
10048 TALLOC_CTX *_mem_save_info101_0;
10049 TALLOC_CTX *_mem_save_info102_0;
10050 TALLOC_CTX *_mem_save_info402_0;
10051 TALLOC_CTX *_mem_save_info403_0;
10052 TALLOC_CTX *_mem_save_info502_0;
10053 TALLOC_CTX *_mem_save_info503_0;
10054 TALLOC_CTX *_mem_save_info599_0;
10055 TALLOC_CTX *_mem_save_info1005_0;
10056 TALLOC_CTX *_mem_save_info1010_0;
10057 TALLOC_CTX *_mem_save_info1016_0;
10058 TALLOC_CTX *_mem_save_info1017_0;
10059 TALLOC_CTX *_mem_save_info1018_0;
10060 TALLOC_CTX *_mem_save_info1107_0;
10061 TALLOC_CTX *_mem_save_info1501_0;
10062 TALLOC_CTX *_mem_save_info1502_0;
10063 TALLOC_CTX *_mem_save_info1503_0;
10064 TALLOC_CTX *_mem_save_info1506_0;
10065 TALLOC_CTX *_mem_save_info1509_0;
10066 TALLOC_CTX *_mem_save_info1510_0;
10067 TALLOC_CTX *_mem_save_info1511_0;
10068 TALLOC_CTX *_mem_save_info1512_0;
10069 TALLOC_CTX *_mem_save_info1513_0;
10070 TALLOC_CTX *_mem_save_info1514_0;
10071 TALLOC_CTX *_mem_save_info1515_0;
10072 TALLOC_CTX *_mem_save_info1516_0;
10073 TALLOC_CTX *_mem_save_info1518_0;
10074 TALLOC_CTX *_mem_save_info1520_0;
10075 TALLOC_CTX *_mem_save_info1521_0;
10076 TALLOC_CTX *_mem_save_info1522_0;
10077 TALLOC_CTX *_mem_save_info1523_0;
10078 TALLOC_CTX *_mem_save_info1524_0;
10079 TALLOC_CTX *_mem_save_info1525_0;
10080 TALLOC_CTX *_mem_save_info1528_0;
10081 TALLOC_CTX *_mem_save_info1529_0;
10082 TALLOC_CTX *_mem_save_info1530_0;
10083 TALLOC_CTX *_mem_save_info1533_0;
10084 TALLOC_CTX *_mem_save_info1534_0;
10085 TALLOC_CTX *_mem_save_info1535_0;
10086 TALLOC_CTX *_mem_save_info1536_0;
10087 TALLOC_CTX *_mem_save_info1537_0;
10088 TALLOC_CTX *_mem_save_info1538_0;
10089 TALLOC_CTX *_mem_save_info1539_0;
10090 TALLOC_CTX *_mem_save_info1540_0;
10091 TALLOC_CTX *_mem_save_info1541_0;
10092 TALLOC_CTX *_mem_save_info1542_0;
10093 TALLOC_CTX *_mem_save_info1543_0;
10094 TALLOC_CTX *_mem_save_info1544_0;
10095 TALLOC_CTX *_mem_save_info1545_0;
10096 TALLOC_CTX *_mem_save_info1546_0;
10097 TALLOC_CTX *_mem_save_info1547_0;
10098 TALLOC_CTX *_mem_save_info1548_0;
10099 TALLOC_CTX *_mem_save_info1549_0;
10100 TALLOC_CTX *_mem_save_info1550_0;
10101 TALLOC_CTX *_mem_save_info1552_0;
10102 TALLOC_CTX *_mem_save_info1553_0;
10103 TALLOC_CTX *_mem_save_info1554_0;
10104 TALLOC_CTX *_mem_save_info1555_0;
10105 TALLOC_CTX *_mem_save_info1556_0;
10106 level = ndr_pull_get_switch_value(ndr, r);
10107 if (ndr_flags & NDR_SCALARS) {
10108 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
10109 if (_level != level) {
10110 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
10112 NDR_CHECK(ndr_pull_union_align(ndr, 5));
10113 switch (level) {
10114 case 100: {
10115 uint32_t _ptr_info100;
10116 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info100));
10117 if (_ptr_info100) {
10118 NDR_PULL_ALLOC(ndr, r->info100);
10119 } else {
10120 r->info100 = NULL;
10122 break; }
10124 case 101: {
10125 uint32_t _ptr_info101;
10126 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info101));
10127 if (_ptr_info101) {
10128 NDR_PULL_ALLOC(ndr, r->info101);
10129 } else {
10130 r->info101 = NULL;
10132 break; }
10134 case 102: {
10135 uint32_t _ptr_info102;
10136 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info102));
10137 if (_ptr_info102) {
10138 NDR_PULL_ALLOC(ndr, r->info102);
10139 } else {
10140 r->info102 = NULL;
10142 break; }
10144 case 402: {
10145 uint32_t _ptr_info402;
10146 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info402));
10147 if (_ptr_info402) {
10148 NDR_PULL_ALLOC(ndr, r->info402);
10149 } else {
10150 r->info402 = NULL;
10152 break; }
10154 case 403: {
10155 uint32_t _ptr_info403;
10156 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info403));
10157 if (_ptr_info403) {
10158 NDR_PULL_ALLOC(ndr, r->info403);
10159 } else {
10160 r->info403 = NULL;
10162 break; }
10164 case 502: {
10165 uint32_t _ptr_info502;
10166 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info502));
10167 if (_ptr_info502) {
10168 NDR_PULL_ALLOC(ndr, r->info502);
10169 } else {
10170 r->info502 = NULL;
10172 break; }
10174 case 503: {
10175 uint32_t _ptr_info503;
10176 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info503));
10177 if (_ptr_info503) {
10178 NDR_PULL_ALLOC(ndr, r->info503);
10179 } else {
10180 r->info503 = NULL;
10182 break; }
10184 case 599: {
10185 uint32_t _ptr_info599;
10186 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info599));
10187 if (_ptr_info599) {
10188 NDR_PULL_ALLOC(ndr, r->info599);
10189 } else {
10190 r->info599 = NULL;
10192 break; }
10194 case 1005: {
10195 uint32_t _ptr_info1005;
10196 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1005));
10197 if (_ptr_info1005) {
10198 NDR_PULL_ALLOC(ndr, r->info1005);
10199 } else {
10200 r->info1005 = NULL;
10202 break; }
10204 case 1010: {
10205 uint32_t _ptr_info1010;
10206 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1010));
10207 if (_ptr_info1010) {
10208 NDR_PULL_ALLOC(ndr, r->info1010);
10209 } else {
10210 r->info1010 = NULL;
10212 break; }
10214 case 1016: {
10215 uint32_t _ptr_info1016;
10216 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1016));
10217 if (_ptr_info1016) {
10218 NDR_PULL_ALLOC(ndr, r->info1016);
10219 } else {
10220 r->info1016 = NULL;
10222 break; }
10224 case 1017: {
10225 uint32_t _ptr_info1017;
10226 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1017));
10227 if (_ptr_info1017) {
10228 NDR_PULL_ALLOC(ndr, r->info1017);
10229 } else {
10230 r->info1017 = NULL;
10232 break; }
10234 case 1018: {
10235 uint32_t _ptr_info1018;
10236 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1018));
10237 if (_ptr_info1018) {
10238 NDR_PULL_ALLOC(ndr, r->info1018);
10239 } else {
10240 r->info1018 = NULL;
10242 break; }
10244 case 1107: {
10245 uint32_t _ptr_info1107;
10246 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1107));
10247 if (_ptr_info1107) {
10248 NDR_PULL_ALLOC(ndr, r->info1107);
10249 } else {
10250 r->info1107 = NULL;
10252 break; }
10254 case 1501: {
10255 uint32_t _ptr_info1501;
10256 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1501));
10257 if (_ptr_info1501) {
10258 NDR_PULL_ALLOC(ndr, r->info1501);
10259 } else {
10260 r->info1501 = NULL;
10262 break; }
10264 case 1502: {
10265 uint32_t _ptr_info1502;
10266 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1502));
10267 if (_ptr_info1502) {
10268 NDR_PULL_ALLOC(ndr, r->info1502);
10269 } else {
10270 r->info1502 = NULL;
10272 break; }
10274 case 1503: {
10275 uint32_t _ptr_info1503;
10276 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1503));
10277 if (_ptr_info1503) {
10278 NDR_PULL_ALLOC(ndr, r->info1503);
10279 } else {
10280 r->info1503 = NULL;
10282 break; }
10284 case 1506: {
10285 uint32_t _ptr_info1506;
10286 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1506));
10287 if (_ptr_info1506) {
10288 NDR_PULL_ALLOC(ndr, r->info1506);
10289 } else {
10290 r->info1506 = NULL;
10292 break; }
10294 case 1509: {
10295 uint32_t _ptr_info1509;
10296 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1509));
10297 if (_ptr_info1509) {
10298 NDR_PULL_ALLOC(ndr, r->info1509);
10299 } else {
10300 r->info1509 = NULL;
10302 break; }
10304 case 1510: {
10305 uint32_t _ptr_info1510;
10306 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1510));
10307 if (_ptr_info1510) {
10308 NDR_PULL_ALLOC(ndr, r->info1510);
10309 } else {
10310 r->info1510 = NULL;
10312 break; }
10314 case 1511: {
10315 uint32_t _ptr_info1511;
10316 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1511));
10317 if (_ptr_info1511) {
10318 NDR_PULL_ALLOC(ndr, r->info1511);
10319 } else {
10320 r->info1511 = NULL;
10322 break; }
10324 case 1512: {
10325 uint32_t _ptr_info1512;
10326 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1512));
10327 if (_ptr_info1512) {
10328 NDR_PULL_ALLOC(ndr, r->info1512);
10329 } else {
10330 r->info1512 = NULL;
10332 break; }
10334 case 1513: {
10335 uint32_t _ptr_info1513;
10336 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1513));
10337 if (_ptr_info1513) {
10338 NDR_PULL_ALLOC(ndr, r->info1513);
10339 } else {
10340 r->info1513 = NULL;
10342 break; }
10344 case 1514: {
10345 uint32_t _ptr_info1514;
10346 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1514));
10347 if (_ptr_info1514) {
10348 NDR_PULL_ALLOC(ndr, r->info1514);
10349 } else {
10350 r->info1514 = NULL;
10352 break; }
10354 case 1515: {
10355 uint32_t _ptr_info1515;
10356 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1515));
10357 if (_ptr_info1515) {
10358 NDR_PULL_ALLOC(ndr, r->info1515);
10359 } else {
10360 r->info1515 = NULL;
10362 break; }
10364 case 1516: {
10365 uint32_t _ptr_info1516;
10366 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1516));
10367 if (_ptr_info1516) {
10368 NDR_PULL_ALLOC(ndr, r->info1516);
10369 } else {
10370 r->info1516 = NULL;
10372 break; }
10374 case 1518: {
10375 uint32_t _ptr_info1518;
10376 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1518));
10377 if (_ptr_info1518) {
10378 NDR_PULL_ALLOC(ndr, r->info1518);
10379 } else {
10380 r->info1518 = NULL;
10382 break; }
10384 case 1520: {
10385 uint32_t _ptr_info1520;
10386 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1520));
10387 if (_ptr_info1520) {
10388 NDR_PULL_ALLOC(ndr, r->info1520);
10389 } else {
10390 r->info1520 = NULL;
10392 break; }
10394 case 1521: {
10395 uint32_t _ptr_info1521;
10396 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1521));
10397 if (_ptr_info1521) {
10398 NDR_PULL_ALLOC(ndr, r->info1521);
10399 } else {
10400 r->info1521 = NULL;
10402 break; }
10404 case 1522: {
10405 uint32_t _ptr_info1522;
10406 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1522));
10407 if (_ptr_info1522) {
10408 NDR_PULL_ALLOC(ndr, r->info1522);
10409 } else {
10410 r->info1522 = NULL;
10412 break; }
10414 case 1523: {
10415 uint32_t _ptr_info1523;
10416 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1523));
10417 if (_ptr_info1523) {
10418 NDR_PULL_ALLOC(ndr, r->info1523);
10419 } else {
10420 r->info1523 = NULL;
10422 break; }
10424 case 1524: {
10425 uint32_t _ptr_info1524;
10426 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1524));
10427 if (_ptr_info1524) {
10428 NDR_PULL_ALLOC(ndr, r->info1524);
10429 } else {
10430 r->info1524 = NULL;
10432 break; }
10434 case 1525: {
10435 uint32_t _ptr_info1525;
10436 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1525));
10437 if (_ptr_info1525) {
10438 NDR_PULL_ALLOC(ndr, r->info1525);
10439 } else {
10440 r->info1525 = NULL;
10442 break; }
10444 case 1528: {
10445 uint32_t _ptr_info1528;
10446 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1528));
10447 if (_ptr_info1528) {
10448 NDR_PULL_ALLOC(ndr, r->info1528);
10449 } else {
10450 r->info1528 = NULL;
10452 break; }
10454 case 1529: {
10455 uint32_t _ptr_info1529;
10456 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1529));
10457 if (_ptr_info1529) {
10458 NDR_PULL_ALLOC(ndr, r->info1529);
10459 } else {
10460 r->info1529 = NULL;
10462 break; }
10464 case 1530: {
10465 uint32_t _ptr_info1530;
10466 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1530));
10467 if (_ptr_info1530) {
10468 NDR_PULL_ALLOC(ndr, r->info1530);
10469 } else {
10470 r->info1530 = NULL;
10472 break; }
10474 case 1533: {
10475 uint32_t _ptr_info1533;
10476 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1533));
10477 if (_ptr_info1533) {
10478 NDR_PULL_ALLOC(ndr, r->info1533);
10479 } else {
10480 r->info1533 = NULL;
10482 break; }
10484 case 1534: {
10485 uint32_t _ptr_info1534;
10486 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1534));
10487 if (_ptr_info1534) {
10488 NDR_PULL_ALLOC(ndr, r->info1534);
10489 } else {
10490 r->info1534 = NULL;
10492 break; }
10494 case 1535: {
10495 uint32_t _ptr_info1535;
10496 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1535));
10497 if (_ptr_info1535) {
10498 NDR_PULL_ALLOC(ndr, r->info1535);
10499 } else {
10500 r->info1535 = NULL;
10502 break; }
10504 case 1536: {
10505 uint32_t _ptr_info1536;
10506 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1536));
10507 if (_ptr_info1536) {
10508 NDR_PULL_ALLOC(ndr, r->info1536);
10509 } else {
10510 r->info1536 = NULL;
10512 break; }
10514 case 1537: {
10515 uint32_t _ptr_info1537;
10516 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1537));
10517 if (_ptr_info1537) {
10518 NDR_PULL_ALLOC(ndr, r->info1537);
10519 } else {
10520 r->info1537 = NULL;
10522 break; }
10524 case 1538: {
10525 uint32_t _ptr_info1538;
10526 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1538));
10527 if (_ptr_info1538) {
10528 NDR_PULL_ALLOC(ndr, r->info1538);
10529 } else {
10530 r->info1538 = NULL;
10532 break; }
10534 case 1539: {
10535 uint32_t _ptr_info1539;
10536 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1539));
10537 if (_ptr_info1539) {
10538 NDR_PULL_ALLOC(ndr, r->info1539);
10539 } else {
10540 r->info1539 = NULL;
10542 break; }
10544 case 1540: {
10545 uint32_t _ptr_info1540;
10546 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1540));
10547 if (_ptr_info1540) {
10548 NDR_PULL_ALLOC(ndr, r->info1540);
10549 } else {
10550 r->info1540 = NULL;
10552 break; }
10554 case 1541: {
10555 uint32_t _ptr_info1541;
10556 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1541));
10557 if (_ptr_info1541) {
10558 NDR_PULL_ALLOC(ndr, r->info1541);
10559 } else {
10560 r->info1541 = NULL;
10562 break; }
10564 case 1542: {
10565 uint32_t _ptr_info1542;
10566 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1542));
10567 if (_ptr_info1542) {
10568 NDR_PULL_ALLOC(ndr, r->info1542);
10569 } else {
10570 r->info1542 = NULL;
10572 break; }
10574 case 1543: {
10575 uint32_t _ptr_info1543;
10576 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1543));
10577 if (_ptr_info1543) {
10578 NDR_PULL_ALLOC(ndr, r->info1543);
10579 } else {
10580 r->info1543 = NULL;
10582 break; }
10584 case 1544: {
10585 uint32_t _ptr_info1544;
10586 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1544));
10587 if (_ptr_info1544) {
10588 NDR_PULL_ALLOC(ndr, r->info1544);
10589 } else {
10590 r->info1544 = NULL;
10592 break; }
10594 case 1545: {
10595 uint32_t _ptr_info1545;
10596 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1545));
10597 if (_ptr_info1545) {
10598 NDR_PULL_ALLOC(ndr, r->info1545);
10599 } else {
10600 r->info1545 = NULL;
10602 break; }
10604 case 1546: {
10605 uint32_t _ptr_info1546;
10606 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1546));
10607 if (_ptr_info1546) {
10608 NDR_PULL_ALLOC(ndr, r->info1546);
10609 } else {
10610 r->info1546 = NULL;
10612 break; }
10614 case 1547: {
10615 uint32_t _ptr_info1547;
10616 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1547));
10617 if (_ptr_info1547) {
10618 NDR_PULL_ALLOC(ndr, r->info1547);
10619 } else {
10620 r->info1547 = NULL;
10622 break; }
10624 case 1548: {
10625 uint32_t _ptr_info1548;
10626 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1548));
10627 if (_ptr_info1548) {
10628 NDR_PULL_ALLOC(ndr, r->info1548);
10629 } else {
10630 r->info1548 = NULL;
10632 break; }
10634 case 1549: {
10635 uint32_t _ptr_info1549;
10636 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1549));
10637 if (_ptr_info1549) {
10638 NDR_PULL_ALLOC(ndr, r->info1549);
10639 } else {
10640 r->info1549 = NULL;
10642 break; }
10644 case 1550: {
10645 uint32_t _ptr_info1550;
10646 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1550));
10647 if (_ptr_info1550) {
10648 NDR_PULL_ALLOC(ndr, r->info1550);
10649 } else {
10650 r->info1550 = NULL;
10652 break; }
10654 case 1552: {
10655 uint32_t _ptr_info1552;
10656 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1552));
10657 if (_ptr_info1552) {
10658 NDR_PULL_ALLOC(ndr, r->info1552);
10659 } else {
10660 r->info1552 = NULL;
10662 break; }
10664 case 1553: {
10665 uint32_t _ptr_info1553;
10666 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1553));
10667 if (_ptr_info1553) {
10668 NDR_PULL_ALLOC(ndr, r->info1553);
10669 } else {
10670 r->info1553 = NULL;
10672 break; }
10674 case 1554: {
10675 uint32_t _ptr_info1554;
10676 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1554));
10677 if (_ptr_info1554) {
10678 NDR_PULL_ALLOC(ndr, r->info1554);
10679 } else {
10680 r->info1554 = NULL;
10682 break; }
10684 case 1555: {
10685 uint32_t _ptr_info1555;
10686 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1555));
10687 if (_ptr_info1555) {
10688 NDR_PULL_ALLOC(ndr, r->info1555);
10689 } else {
10690 r->info1555 = NULL;
10692 break; }
10694 case 1556: {
10695 uint32_t _ptr_info1556;
10696 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1556));
10697 if (_ptr_info1556) {
10698 NDR_PULL_ALLOC(ndr, r->info1556);
10699 } else {
10700 r->info1556 = NULL;
10702 break; }
10704 default: {
10705 break; }
10709 if (ndr_flags & NDR_BUFFERS) {
10710 switch (level) {
10711 case 100:
10712 if (r->info100) {
10713 _mem_save_info100_0 = NDR_PULL_GET_MEM_CTX(ndr);
10714 NDR_PULL_SET_MEM_CTX(ndr, r->info100, 0);
10715 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo100(ndr, NDR_SCALARS|NDR_BUFFERS, r->info100));
10716 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info100_0, 0);
10718 break;
10720 case 101:
10721 if (r->info101) {
10722 _mem_save_info101_0 = NDR_PULL_GET_MEM_CTX(ndr);
10723 NDR_PULL_SET_MEM_CTX(ndr, r->info101, 0);
10724 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo101(ndr, NDR_SCALARS|NDR_BUFFERS, r->info101));
10725 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info101_0, 0);
10727 break;
10729 case 102:
10730 if (r->info102) {
10731 _mem_save_info102_0 = NDR_PULL_GET_MEM_CTX(ndr);
10732 NDR_PULL_SET_MEM_CTX(ndr, r->info102, 0);
10733 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo102(ndr, NDR_SCALARS|NDR_BUFFERS, r->info102));
10734 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info102_0, 0);
10736 break;
10738 case 402:
10739 if (r->info402) {
10740 _mem_save_info402_0 = NDR_PULL_GET_MEM_CTX(ndr);
10741 NDR_PULL_SET_MEM_CTX(ndr, r->info402, 0);
10742 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo402(ndr, NDR_SCALARS|NDR_BUFFERS, r->info402));
10743 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info402_0, 0);
10745 break;
10747 case 403:
10748 if (r->info403) {
10749 _mem_save_info403_0 = NDR_PULL_GET_MEM_CTX(ndr);
10750 NDR_PULL_SET_MEM_CTX(ndr, r->info403, 0);
10751 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo403(ndr, NDR_SCALARS|NDR_BUFFERS, r->info403));
10752 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info403_0, 0);
10754 break;
10756 case 502:
10757 if (r->info502) {
10758 _mem_save_info502_0 = NDR_PULL_GET_MEM_CTX(ndr);
10759 NDR_PULL_SET_MEM_CTX(ndr, r->info502, 0);
10760 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo502(ndr, NDR_SCALARS, r->info502));
10761 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info502_0, 0);
10763 break;
10765 case 503:
10766 if (r->info503) {
10767 _mem_save_info503_0 = NDR_PULL_GET_MEM_CTX(ndr);
10768 NDR_PULL_SET_MEM_CTX(ndr, r->info503, 0);
10769 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo503(ndr, NDR_SCALARS|NDR_BUFFERS, r->info503));
10770 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info503_0, 0);
10772 break;
10774 case 599:
10775 if (r->info599) {
10776 _mem_save_info599_0 = NDR_PULL_GET_MEM_CTX(ndr);
10777 NDR_PULL_SET_MEM_CTX(ndr, r->info599, 0);
10778 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo599(ndr, NDR_SCALARS|NDR_BUFFERS, r->info599));
10779 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info599_0, 0);
10781 break;
10783 case 1005:
10784 if (r->info1005) {
10785 _mem_save_info1005_0 = NDR_PULL_GET_MEM_CTX(ndr);
10786 NDR_PULL_SET_MEM_CTX(ndr, r->info1005, 0);
10787 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1005(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1005));
10788 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1005_0, 0);
10790 break;
10792 case 1010:
10793 if (r->info1010) {
10794 _mem_save_info1010_0 = NDR_PULL_GET_MEM_CTX(ndr);
10795 NDR_PULL_SET_MEM_CTX(ndr, r->info1010, 0);
10796 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1010(ndr, NDR_SCALARS, r->info1010));
10797 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1010_0, 0);
10799 break;
10801 case 1016:
10802 if (r->info1016) {
10803 _mem_save_info1016_0 = NDR_PULL_GET_MEM_CTX(ndr);
10804 NDR_PULL_SET_MEM_CTX(ndr, r->info1016, 0);
10805 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1016(ndr, NDR_SCALARS, r->info1016));
10806 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1016_0, 0);
10808 break;
10810 case 1017:
10811 if (r->info1017) {
10812 _mem_save_info1017_0 = NDR_PULL_GET_MEM_CTX(ndr);
10813 NDR_PULL_SET_MEM_CTX(ndr, r->info1017, 0);
10814 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1017(ndr, NDR_SCALARS, r->info1017));
10815 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1017_0, 0);
10817 break;
10819 case 1018:
10820 if (r->info1018) {
10821 _mem_save_info1018_0 = NDR_PULL_GET_MEM_CTX(ndr);
10822 NDR_PULL_SET_MEM_CTX(ndr, r->info1018, 0);
10823 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1018(ndr, NDR_SCALARS, r->info1018));
10824 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1018_0, 0);
10826 break;
10828 case 1107:
10829 if (r->info1107) {
10830 _mem_save_info1107_0 = NDR_PULL_GET_MEM_CTX(ndr);
10831 NDR_PULL_SET_MEM_CTX(ndr, r->info1107, 0);
10832 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1107(ndr, NDR_SCALARS, r->info1107));
10833 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1107_0, 0);
10835 break;
10837 case 1501:
10838 if (r->info1501) {
10839 _mem_save_info1501_0 = NDR_PULL_GET_MEM_CTX(ndr);
10840 NDR_PULL_SET_MEM_CTX(ndr, r->info1501, 0);
10841 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1501(ndr, NDR_SCALARS, r->info1501));
10842 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1501_0, 0);
10844 break;
10846 case 1502:
10847 if (r->info1502) {
10848 _mem_save_info1502_0 = NDR_PULL_GET_MEM_CTX(ndr);
10849 NDR_PULL_SET_MEM_CTX(ndr, r->info1502, 0);
10850 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1502(ndr, NDR_SCALARS, r->info1502));
10851 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1502_0, 0);
10853 break;
10855 case 1503:
10856 if (r->info1503) {
10857 _mem_save_info1503_0 = NDR_PULL_GET_MEM_CTX(ndr);
10858 NDR_PULL_SET_MEM_CTX(ndr, r->info1503, 0);
10859 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1503(ndr, NDR_SCALARS, r->info1503));
10860 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1503_0, 0);
10862 break;
10864 case 1506:
10865 if (r->info1506) {
10866 _mem_save_info1506_0 = NDR_PULL_GET_MEM_CTX(ndr);
10867 NDR_PULL_SET_MEM_CTX(ndr, r->info1506, 0);
10868 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1506(ndr, NDR_SCALARS, r->info1506));
10869 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1506_0, 0);
10871 break;
10873 case 1509:
10874 if (r->info1509) {
10875 _mem_save_info1509_0 = NDR_PULL_GET_MEM_CTX(ndr);
10876 NDR_PULL_SET_MEM_CTX(ndr, r->info1509, 0);
10877 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1509(ndr, NDR_SCALARS, r->info1509));
10878 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1509_0, 0);
10880 break;
10882 case 1510:
10883 if (r->info1510) {
10884 _mem_save_info1510_0 = NDR_PULL_GET_MEM_CTX(ndr);
10885 NDR_PULL_SET_MEM_CTX(ndr, r->info1510, 0);
10886 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1510(ndr, NDR_SCALARS, r->info1510));
10887 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1510_0, 0);
10889 break;
10891 case 1511:
10892 if (r->info1511) {
10893 _mem_save_info1511_0 = NDR_PULL_GET_MEM_CTX(ndr);
10894 NDR_PULL_SET_MEM_CTX(ndr, r->info1511, 0);
10895 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1511(ndr, NDR_SCALARS, r->info1511));
10896 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1511_0, 0);
10898 break;
10900 case 1512:
10901 if (r->info1512) {
10902 _mem_save_info1512_0 = NDR_PULL_GET_MEM_CTX(ndr);
10903 NDR_PULL_SET_MEM_CTX(ndr, r->info1512, 0);
10904 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1512(ndr, NDR_SCALARS, r->info1512));
10905 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1512_0, 0);
10907 break;
10909 case 1513:
10910 if (r->info1513) {
10911 _mem_save_info1513_0 = NDR_PULL_GET_MEM_CTX(ndr);
10912 NDR_PULL_SET_MEM_CTX(ndr, r->info1513, 0);
10913 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1513(ndr, NDR_SCALARS, r->info1513));
10914 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1513_0, 0);
10916 break;
10918 case 1514:
10919 if (r->info1514) {
10920 _mem_save_info1514_0 = NDR_PULL_GET_MEM_CTX(ndr);
10921 NDR_PULL_SET_MEM_CTX(ndr, r->info1514, 0);
10922 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1514(ndr, NDR_SCALARS, r->info1514));
10923 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1514_0, 0);
10925 break;
10927 case 1515:
10928 if (r->info1515) {
10929 _mem_save_info1515_0 = NDR_PULL_GET_MEM_CTX(ndr);
10930 NDR_PULL_SET_MEM_CTX(ndr, r->info1515, 0);
10931 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1515(ndr, NDR_SCALARS, r->info1515));
10932 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1515_0, 0);
10934 break;
10936 case 1516:
10937 if (r->info1516) {
10938 _mem_save_info1516_0 = NDR_PULL_GET_MEM_CTX(ndr);
10939 NDR_PULL_SET_MEM_CTX(ndr, r->info1516, 0);
10940 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1516(ndr, NDR_SCALARS, r->info1516));
10941 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1516_0, 0);
10943 break;
10945 case 1518:
10946 if (r->info1518) {
10947 _mem_save_info1518_0 = NDR_PULL_GET_MEM_CTX(ndr);
10948 NDR_PULL_SET_MEM_CTX(ndr, r->info1518, 0);
10949 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1518(ndr, NDR_SCALARS, r->info1518));
10950 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1518_0, 0);
10952 break;
10954 case 1520:
10955 if (r->info1520) {
10956 _mem_save_info1520_0 = NDR_PULL_GET_MEM_CTX(ndr);
10957 NDR_PULL_SET_MEM_CTX(ndr, r->info1520, 0);
10958 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1520(ndr, NDR_SCALARS, r->info1520));
10959 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1520_0, 0);
10961 break;
10963 case 1521:
10964 if (r->info1521) {
10965 _mem_save_info1521_0 = NDR_PULL_GET_MEM_CTX(ndr);
10966 NDR_PULL_SET_MEM_CTX(ndr, r->info1521, 0);
10967 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1521(ndr, NDR_SCALARS, r->info1521));
10968 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1521_0, 0);
10970 break;
10972 case 1522:
10973 if (r->info1522) {
10974 _mem_save_info1522_0 = NDR_PULL_GET_MEM_CTX(ndr);
10975 NDR_PULL_SET_MEM_CTX(ndr, r->info1522, 0);
10976 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1522(ndr, NDR_SCALARS, r->info1522));
10977 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1522_0, 0);
10979 break;
10981 case 1523:
10982 if (r->info1523) {
10983 _mem_save_info1523_0 = NDR_PULL_GET_MEM_CTX(ndr);
10984 NDR_PULL_SET_MEM_CTX(ndr, r->info1523, 0);
10985 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1523(ndr, NDR_SCALARS, r->info1523));
10986 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1523_0, 0);
10988 break;
10990 case 1524:
10991 if (r->info1524) {
10992 _mem_save_info1524_0 = NDR_PULL_GET_MEM_CTX(ndr);
10993 NDR_PULL_SET_MEM_CTX(ndr, r->info1524, 0);
10994 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1524(ndr, NDR_SCALARS, r->info1524));
10995 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1524_0, 0);
10997 break;
10999 case 1525:
11000 if (r->info1525) {
11001 _mem_save_info1525_0 = NDR_PULL_GET_MEM_CTX(ndr);
11002 NDR_PULL_SET_MEM_CTX(ndr, r->info1525, 0);
11003 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1525(ndr, NDR_SCALARS, r->info1525));
11004 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1525_0, 0);
11006 break;
11008 case 1528:
11009 if (r->info1528) {
11010 _mem_save_info1528_0 = NDR_PULL_GET_MEM_CTX(ndr);
11011 NDR_PULL_SET_MEM_CTX(ndr, r->info1528, 0);
11012 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1528(ndr, NDR_SCALARS, r->info1528));
11013 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1528_0, 0);
11015 break;
11017 case 1529:
11018 if (r->info1529) {
11019 _mem_save_info1529_0 = NDR_PULL_GET_MEM_CTX(ndr);
11020 NDR_PULL_SET_MEM_CTX(ndr, r->info1529, 0);
11021 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1529(ndr, NDR_SCALARS, r->info1529));
11022 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1529_0, 0);
11024 break;
11026 case 1530:
11027 if (r->info1530) {
11028 _mem_save_info1530_0 = NDR_PULL_GET_MEM_CTX(ndr);
11029 NDR_PULL_SET_MEM_CTX(ndr, r->info1530, 0);
11030 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1530(ndr, NDR_SCALARS, r->info1530));
11031 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1530_0, 0);
11033 break;
11035 case 1533:
11036 if (r->info1533) {
11037 _mem_save_info1533_0 = NDR_PULL_GET_MEM_CTX(ndr);
11038 NDR_PULL_SET_MEM_CTX(ndr, r->info1533, 0);
11039 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1533(ndr, NDR_SCALARS, r->info1533));
11040 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1533_0, 0);
11042 break;
11044 case 1534:
11045 if (r->info1534) {
11046 _mem_save_info1534_0 = NDR_PULL_GET_MEM_CTX(ndr);
11047 NDR_PULL_SET_MEM_CTX(ndr, r->info1534, 0);
11048 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1534(ndr, NDR_SCALARS, r->info1534));
11049 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1534_0, 0);
11051 break;
11053 case 1535:
11054 if (r->info1535) {
11055 _mem_save_info1535_0 = NDR_PULL_GET_MEM_CTX(ndr);
11056 NDR_PULL_SET_MEM_CTX(ndr, r->info1535, 0);
11057 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1535(ndr, NDR_SCALARS, r->info1535));
11058 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1535_0, 0);
11060 break;
11062 case 1536:
11063 if (r->info1536) {
11064 _mem_save_info1536_0 = NDR_PULL_GET_MEM_CTX(ndr);
11065 NDR_PULL_SET_MEM_CTX(ndr, r->info1536, 0);
11066 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1536(ndr, NDR_SCALARS, r->info1536));
11067 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1536_0, 0);
11069 break;
11071 case 1537:
11072 if (r->info1537) {
11073 _mem_save_info1537_0 = NDR_PULL_GET_MEM_CTX(ndr);
11074 NDR_PULL_SET_MEM_CTX(ndr, r->info1537, 0);
11075 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1537(ndr, NDR_SCALARS, r->info1537));
11076 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1537_0, 0);
11078 break;
11080 case 1538:
11081 if (r->info1538) {
11082 _mem_save_info1538_0 = NDR_PULL_GET_MEM_CTX(ndr);
11083 NDR_PULL_SET_MEM_CTX(ndr, r->info1538, 0);
11084 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1538(ndr, NDR_SCALARS, r->info1538));
11085 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1538_0, 0);
11087 break;
11089 case 1539:
11090 if (r->info1539) {
11091 _mem_save_info1539_0 = NDR_PULL_GET_MEM_CTX(ndr);
11092 NDR_PULL_SET_MEM_CTX(ndr, r->info1539, 0);
11093 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1539(ndr, NDR_SCALARS, r->info1539));
11094 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1539_0, 0);
11096 break;
11098 case 1540:
11099 if (r->info1540) {
11100 _mem_save_info1540_0 = NDR_PULL_GET_MEM_CTX(ndr);
11101 NDR_PULL_SET_MEM_CTX(ndr, r->info1540, 0);
11102 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1540(ndr, NDR_SCALARS, r->info1540));
11103 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1540_0, 0);
11105 break;
11107 case 1541:
11108 if (r->info1541) {
11109 _mem_save_info1541_0 = NDR_PULL_GET_MEM_CTX(ndr);
11110 NDR_PULL_SET_MEM_CTX(ndr, r->info1541, 0);
11111 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1541(ndr, NDR_SCALARS, r->info1541));
11112 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1541_0, 0);
11114 break;
11116 case 1542:
11117 if (r->info1542) {
11118 _mem_save_info1542_0 = NDR_PULL_GET_MEM_CTX(ndr);
11119 NDR_PULL_SET_MEM_CTX(ndr, r->info1542, 0);
11120 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1542(ndr, NDR_SCALARS, r->info1542));
11121 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1542_0, 0);
11123 break;
11125 case 1543:
11126 if (r->info1543) {
11127 _mem_save_info1543_0 = NDR_PULL_GET_MEM_CTX(ndr);
11128 NDR_PULL_SET_MEM_CTX(ndr, r->info1543, 0);
11129 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1543(ndr, NDR_SCALARS, r->info1543));
11130 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1543_0, 0);
11132 break;
11134 case 1544:
11135 if (r->info1544) {
11136 _mem_save_info1544_0 = NDR_PULL_GET_MEM_CTX(ndr);
11137 NDR_PULL_SET_MEM_CTX(ndr, r->info1544, 0);
11138 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1544(ndr, NDR_SCALARS, r->info1544));
11139 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1544_0, 0);
11141 break;
11143 case 1545:
11144 if (r->info1545) {
11145 _mem_save_info1545_0 = NDR_PULL_GET_MEM_CTX(ndr);
11146 NDR_PULL_SET_MEM_CTX(ndr, r->info1545, 0);
11147 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1545(ndr, NDR_SCALARS, r->info1545));
11148 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1545_0, 0);
11150 break;
11152 case 1546:
11153 if (r->info1546) {
11154 _mem_save_info1546_0 = NDR_PULL_GET_MEM_CTX(ndr);
11155 NDR_PULL_SET_MEM_CTX(ndr, r->info1546, 0);
11156 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1546(ndr, NDR_SCALARS, r->info1546));
11157 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1546_0, 0);
11159 break;
11161 case 1547:
11162 if (r->info1547) {
11163 _mem_save_info1547_0 = NDR_PULL_GET_MEM_CTX(ndr);
11164 NDR_PULL_SET_MEM_CTX(ndr, r->info1547, 0);
11165 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1547(ndr, NDR_SCALARS, r->info1547));
11166 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1547_0, 0);
11168 break;
11170 case 1548:
11171 if (r->info1548) {
11172 _mem_save_info1548_0 = NDR_PULL_GET_MEM_CTX(ndr);
11173 NDR_PULL_SET_MEM_CTX(ndr, r->info1548, 0);
11174 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1548(ndr, NDR_SCALARS, r->info1548));
11175 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1548_0, 0);
11177 break;
11179 case 1549:
11180 if (r->info1549) {
11181 _mem_save_info1549_0 = NDR_PULL_GET_MEM_CTX(ndr);
11182 NDR_PULL_SET_MEM_CTX(ndr, r->info1549, 0);
11183 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1549(ndr, NDR_SCALARS, r->info1549));
11184 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1549_0, 0);
11186 break;
11188 case 1550:
11189 if (r->info1550) {
11190 _mem_save_info1550_0 = NDR_PULL_GET_MEM_CTX(ndr);
11191 NDR_PULL_SET_MEM_CTX(ndr, r->info1550, 0);
11192 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1550(ndr, NDR_SCALARS, r->info1550));
11193 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1550_0, 0);
11195 break;
11197 case 1552:
11198 if (r->info1552) {
11199 _mem_save_info1552_0 = NDR_PULL_GET_MEM_CTX(ndr);
11200 NDR_PULL_SET_MEM_CTX(ndr, r->info1552, 0);
11201 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1552(ndr, NDR_SCALARS, r->info1552));
11202 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1552_0, 0);
11204 break;
11206 case 1553:
11207 if (r->info1553) {
11208 _mem_save_info1553_0 = NDR_PULL_GET_MEM_CTX(ndr);
11209 NDR_PULL_SET_MEM_CTX(ndr, r->info1553, 0);
11210 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1553(ndr, NDR_SCALARS, r->info1553));
11211 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1553_0, 0);
11213 break;
11215 case 1554:
11216 if (r->info1554) {
11217 _mem_save_info1554_0 = NDR_PULL_GET_MEM_CTX(ndr);
11218 NDR_PULL_SET_MEM_CTX(ndr, r->info1554, 0);
11219 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1554(ndr, NDR_SCALARS, r->info1554));
11220 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1554_0, 0);
11222 break;
11224 case 1555:
11225 if (r->info1555) {
11226 _mem_save_info1555_0 = NDR_PULL_GET_MEM_CTX(ndr);
11227 NDR_PULL_SET_MEM_CTX(ndr, r->info1555, 0);
11228 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1555(ndr, NDR_SCALARS, r->info1555));
11229 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1555_0, 0);
11231 break;
11233 case 1556:
11234 if (r->info1556) {
11235 _mem_save_info1556_0 = NDR_PULL_GET_MEM_CTX(ndr);
11236 NDR_PULL_SET_MEM_CTX(ndr, r->info1556, 0);
11237 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo1556(ndr, NDR_SCALARS, r->info1556));
11238 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1556_0, 0);
11240 break;
11242 default:
11243 break;
11247 return NDR_ERR_SUCCESS;
11250 _PUBLIC_ void ndr_print_srvsvc_NetSrvInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetSrvInfo *r)
11252 int level;
11253 level = ndr_print_get_switch_value(ndr, r);
11254 ndr_print_union(ndr, name, level, "srvsvc_NetSrvInfo");
11255 switch (level) {
11256 case 100:
11257 ndr_print_ptr(ndr, "info100", r->info100);
11258 ndr->depth++;
11259 if (r->info100) {
11260 ndr_print_srvsvc_NetSrvInfo100(ndr, "info100", r->info100);
11262 ndr->depth--;
11263 break;
11265 case 101:
11266 ndr_print_ptr(ndr, "info101", r->info101);
11267 ndr->depth++;
11268 if (r->info101) {
11269 ndr_print_srvsvc_NetSrvInfo101(ndr, "info101", r->info101);
11271 ndr->depth--;
11272 break;
11274 case 102:
11275 ndr_print_ptr(ndr, "info102", r->info102);
11276 ndr->depth++;
11277 if (r->info102) {
11278 ndr_print_srvsvc_NetSrvInfo102(ndr, "info102", r->info102);
11280 ndr->depth--;
11281 break;
11283 case 402:
11284 ndr_print_ptr(ndr, "info402", r->info402);
11285 ndr->depth++;
11286 if (r->info402) {
11287 ndr_print_srvsvc_NetSrvInfo402(ndr, "info402", r->info402);
11289 ndr->depth--;
11290 break;
11292 case 403:
11293 ndr_print_ptr(ndr, "info403", r->info403);
11294 ndr->depth++;
11295 if (r->info403) {
11296 ndr_print_srvsvc_NetSrvInfo403(ndr, "info403", r->info403);
11298 ndr->depth--;
11299 break;
11301 case 502:
11302 ndr_print_ptr(ndr, "info502", r->info502);
11303 ndr->depth++;
11304 if (r->info502) {
11305 ndr_print_srvsvc_NetSrvInfo502(ndr, "info502", r->info502);
11307 ndr->depth--;
11308 break;
11310 case 503:
11311 ndr_print_ptr(ndr, "info503", r->info503);
11312 ndr->depth++;
11313 if (r->info503) {
11314 ndr_print_srvsvc_NetSrvInfo503(ndr, "info503", r->info503);
11316 ndr->depth--;
11317 break;
11319 case 599:
11320 ndr_print_ptr(ndr, "info599", r->info599);
11321 ndr->depth++;
11322 if (r->info599) {
11323 ndr_print_srvsvc_NetSrvInfo599(ndr, "info599", r->info599);
11325 ndr->depth--;
11326 break;
11328 case 1005:
11329 ndr_print_ptr(ndr, "info1005", r->info1005);
11330 ndr->depth++;
11331 if (r->info1005) {
11332 ndr_print_srvsvc_NetSrvInfo1005(ndr, "info1005", r->info1005);
11334 ndr->depth--;
11335 break;
11337 case 1010:
11338 ndr_print_ptr(ndr, "info1010", r->info1010);
11339 ndr->depth++;
11340 if (r->info1010) {
11341 ndr_print_srvsvc_NetSrvInfo1010(ndr, "info1010", r->info1010);
11343 ndr->depth--;
11344 break;
11346 case 1016:
11347 ndr_print_ptr(ndr, "info1016", r->info1016);
11348 ndr->depth++;
11349 if (r->info1016) {
11350 ndr_print_srvsvc_NetSrvInfo1016(ndr, "info1016", r->info1016);
11352 ndr->depth--;
11353 break;
11355 case 1017:
11356 ndr_print_ptr(ndr, "info1017", r->info1017);
11357 ndr->depth++;
11358 if (r->info1017) {
11359 ndr_print_srvsvc_NetSrvInfo1017(ndr, "info1017", r->info1017);
11361 ndr->depth--;
11362 break;
11364 case 1018:
11365 ndr_print_ptr(ndr, "info1018", r->info1018);
11366 ndr->depth++;
11367 if (r->info1018) {
11368 ndr_print_srvsvc_NetSrvInfo1018(ndr, "info1018", r->info1018);
11370 ndr->depth--;
11371 break;
11373 case 1107:
11374 ndr_print_ptr(ndr, "info1107", r->info1107);
11375 ndr->depth++;
11376 if (r->info1107) {
11377 ndr_print_srvsvc_NetSrvInfo1107(ndr, "info1107", r->info1107);
11379 ndr->depth--;
11380 break;
11382 case 1501:
11383 ndr_print_ptr(ndr, "info1501", r->info1501);
11384 ndr->depth++;
11385 if (r->info1501) {
11386 ndr_print_srvsvc_NetSrvInfo1501(ndr, "info1501", r->info1501);
11388 ndr->depth--;
11389 break;
11391 case 1502:
11392 ndr_print_ptr(ndr, "info1502", r->info1502);
11393 ndr->depth++;
11394 if (r->info1502) {
11395 ndr_print_srvsvc_NetSrvInfo1502(ndr, "info1502", r->info1502);
11397 ndr->depth--;
11398 break;
11400 case 1503:
11401 ndr_print_ptr(ndr, "info1503", r->info1503);
11402 ndr->depth++;
11403 if (r->info1503) {
11404 ndr_print_srvsvc_NetSrvInfo1503(ndr, "info1503", r->info1503);
11406 ndr->depth--;
11407 break;
11409 case 1506:
11410 ndr_print_ptr(ndr, "info1506", r->info1506);
11411 ndr->depth++;
11412 if (r->info1506) {
11413 ndr_print_srvsvc_NetSrvInfo1506(ndr, "info1506", r->info1506);
11415 ndr->depth--;
11416 break;
11418 case 1509:
11419 ndr_print_ptr(ndr, "info1509", r->info1509);
11420 ndr->depth++;
11421 if (r->info1509) {
11422 ndr_print_srvsvc_NetSrvInfo1509(ndr, "info1509", r->info1509);
11424 ndr->depth--;
11425 break;
11427 case 1510:
11428 ndr_print_ptr(ndr, "info1510", r->info1510);
11429 ndr->depth++;
11430 if (r->info1510) {
11431 ndr_print_srvsvc_NetSrvInfo1510(ndr, "info1510", r->info1510);
11433 ndr->depth--;
11434 break;
11436 case 1511:
11437 ndr_print_ptr(ndr, "info1511", r->info1511);
11438 ndr->depth++;
11439 if (r->info1511) {
11440 ndr_print_srvsvc_NetSrvInfo1511(ndr, "info1511", r->info1511);
11442 ndr->depth--;
11443 break;
11445 case 1512:
11446 ndr_print_ptr(ndr, "info1512", r->info1512);
11447 ndr->depth++;
11448 if (r->info1512) {
11449 ndr_print_srvsvc_NetSrvInfo1512(ndr, "info1512", r->info1512);
11451 ndr->depth--;
11452 break;
11454 case 1513:
11455 ndr_print_ptr(ndr, "info1513", r->info1513);
11456 ndr->depth++;
11457 if (r->info1513) {
11458 ndr_print_srvsvc_NetSrvInfo1513(ndr, "info1513", r->info1513);
11460 ndr->depth--;
11461 break;
11463 case 1514:
11464 ndr_print_ptr(ndr, "info1514", r->info1514);
11465 ndr->depth++;
11466 if (r->info1514) {
11467 ndr_print_srvsvc_NetSrvInfo1514(ndr, "info1514", r->info1514);
11469 ndr->depth--;
11470 break;
11472 case 1515:
11473 ndr_print_ptr(ndr, "info1515", r->info1515);
11474 ndr->depth++;
11475 if (r->info1515) {
11476 ndr_print_srvsvc_NetSrvInfo1515(ndr, "info1515", r->info1515);
11478 ndr->depth--;
11479 break;
11481 case 1516:
11482 ndr_print_ptr(ndr, "info1516", r->info1516);
11483 ndr->depth++;
11484 if (r->info1516) {
11485 ndr_print_srvsvc_NetSrvInfo1516(ndr, "info1516", r->info1516);
11487 ndr->depth--;
11488 break;
11490 case 1518:
11491 ndr_print_ptr(ndr, "info1518", r->info1518);
11492 ndr->depth++;
11493 if (r->info1518) {
11494 ndr_print_srvsvc_NetSrvInfo1518(ndr, "info1518", r->info1518);
11496 ndr->depth--;
11497 break;
11499 case 1520:
11500 ndr_print_ptr(ndr, "info1520", r->info1520);
11501 ndr->depth++;
11502 if (r->info1520) {
11503 ndr_print_srvsvc_NetSrvInfo1520(ndr, "info1520", r->info1520);
11505 ndr->depth--;
11506 break;
11508 case 1521:
11509 ndr_print_ptr(ndr, "info1521", r->info1521);
11510 ndr->depth++;
11511 if (r->info1521) {
11512 ndr_print_srvsvc_NetSrvInfo1521(ndr, "info1521", r->info1521);
11514 ndr->depth--;
11515 break;
11517 case 1522:
11518 ndr_print_ptr(ndr, "info1522", r->info1522);
11519 ndr->depth++;
11520 if (r->info1522) {
11521 ndr_print_srvsvc_NetSrvInfo1522(ndr, "info1522", r->info1522);
11523 ndr->depth--;
11524 break;
11526 case 1523:
11527 ndr_print_ptr(ndr, "info1523", r->info1523);
11528 ndr->depth++;
11529 if (r->info1523) {
11530 ndr_print_srvsvc_NetSrvInfo1523(ndr, "info1523", r->info1523);
11532 ndr->depth--;
11533 break;
11535 case 1524:
11536 ndr_print_ptr(ndr, "info1524", r->info1524);
11537 ndr->depth++;
11538 if (r->info1524) {
11539 ndr_print_srvsvc_NetSrvInfo1524(ndr, "info1524", r->info1524);
11541 ndr->depth--;
11542 break;
11544 case 1525:
11545 ndr_print_ptr(ndr, "info1525", r->info1525);
11546 ndr->depth++;
11547 if (r->info1525) {
11548 ndr_print_srvsvc_NetSrvInfo1525(ndr, "info1525", r->info1525);
11550 ndr->depth--;
11551 break;
11553 case 1528:
11554 ndr_print_ptr(ndr, "info1528", r->info1528);
11555 ndr->depth++;
11556 if (r->info1528) {
11557 ndr_print_srvsvc_NetSrvInfo1528(ndr, "info1528", r->info1528);
11559 ndr->depth--;
11560 break;
11562 case 1529:
11563 ndr_print_ptr(ndr, "info1529", r->info1529);
11564 ndr->depth++;
11565 if (r->info1529) {
11566 ndr_print_srvsvc_NetSrvInfo1529(ndr, "info1529", r->info1529);
11568 ndr->depth--;
11569 break;
11571 case 1530:
11572 ndr_print_ptr(ndr, "info1530", r->info1530);
11573 ndr->depth++;
11574 if (r->info1530) {
11575 ndr_print_srvsvc_NetSrvInfo1530(ndr, "info1530", r->info1530);
11577 ndr->depth--;
11578 break;
11580 case 1533:
11581 ndr_print_ptr(ndr, "info1533", r->info1533);
11582 ndr->depth++;
11583 if (r->info1533) {
11584 ndr_print_srvsvc_NetSrvInfo1533(ndr, "info1533", r->info1533);
11586 ndr->depth--;
11587 break;
11589 case 1534:
11590 ndr_print_ptr(ndr, "info1534", r->info1534);
11591 ndr->depth++;
11592 if (r->info1534) {
11593 ndr_print_srvsvc_NetSrvInfo1534(ndr, "info1534", r->info1534);
11595 ndr->depth--;
11596 break;
11598 case 1535:
11599 ndr_print_ptr(ndr, "info1535", r->info1535);
11600 ndr->depth++;
11601 if (r->info1535) {
11602 ndr_print_srvsvc_NetSrvInfo1535(ndr, "info1535", r->info1535);
11604 ndr->depth--;
11605 break;
11607 case 1536:
11608 ndr_print_ptr(ndr, "info1536", r->info1536);
11609 ndr->depth++;
11610 if (r->info1536) {
11611 ndr_print_srvsvc_NetSrvInfo1536(ndr, "info1536", r->info1536);
11613 ndr->depth--;
11614 break;
11616 case 1537:
11617 ndr_print_ptr(ndr, "info1537", r->info1537);
11618 ndr->depth++;
11619 if (r->info1537) {
11620 ndr_print_srvsvc_NetSrvInfo1537(ndr, "info1537", r->info1537);
11622 ndr->depth--;
11623 break;
11625 case 1538:
11626 ndr_print_ptr(ndr, "info1538", r->info1538);
11627 ndr->depth++;
11628 if (r->info1538) {
11629 ndr_print_srvsvc_NetSrvInfo1538(ndr, "info1538", r->info1538);
11631 ndr->depth--;
11632 break;
11634 case 1539:
11635 ndr_print_ptr(ndr, "info1539", r->info1539);
11636 ndr->depth++;
11637 if (r->info1539) {
11638 ndr_print_srvsvc_NetSrvInfo1539(ndr, "info1539", r->info1539);
11640 ndr->depth--;
11641 break;
11643 case 1540:
11644 ndr_print_ptr(ndr, "info1540", r->info1540);
11645 ndr->depth++;
11646 if (r->info1540) {
11647 ndr_print_srvsvc_NetSrvInfo1540(ndr, "info1540", r->info1540);
11649 ndr->depth--;
11650 break;
11652 case 1541:
11653 ndr_print_ptr(ndr, "info1541", r->info1541);
11654 ndr->depth++;
11655 if (r->info1541) {
11656 ndr_print_srvsvc_NetSrvInfo1541(ndr, "info1541", r->info1541);
11658 ndr->depth--;
11659 break;
11661 case 1542:
11662 ndr_print_ptr(ndr, "info1542", r->info1542);
11663 ndr->depth++;
11664 if (r->info1542) {
11665 ndr_print_srvsvc_NetSrvInfo1542(ndr, "info1542", r->info1542);
11667 ndr->depth--;
11668 break;
11670 case 1543:
11671 ndr_print_ptr(ndr, "info1543", r->info1543);
11672 ndr->depth++;
11673 if (r->info1543) {
11674 ndr_print_srvsvc_NetSrvInfo1543(ndr, "info1543", r->info1543);
11676 ndr->depth--;
11677 break;
11679 case 1544:
11680 ndr_print_ptr(ndr, "info1544", r->info1544);
11681 ndr->depth++;
11682 if (r->info1544) {
11683 ndr_print_srvsvc_NetSrvInfo1544(ndr, "info1544", r->info1544);
11685 ndr->depth--;
11686 break;
11688 case 1545:
11689 ndr_print_ptr(ndr, "info1545", r->info1545);
11690 ndr->depth++;
11691 if (r->info1545) {
11692 ndr_print_srvsvc_NetSrvInfo1545(ndr, "info1545", r->info1545);
11694 ndr->depth--;
11695 break;
11697 case 1546:
11698 ndr_print_ptr(ndr, "info1546", r->info1546);
11699 ndr->depth++;
11700 if (r->info1546) {
11701 ndr_print_srvsvc_NetSrvInfo1546(ndr, "info1546", r->info1546);
11703 ndr->depth--;
11704 break;
11706 case 1547:
11707 ndr_print_ptr(ndr, "info1547", r->info1547);
11708 ndr->depth++;
11709 if (r->info1547) {
11710 ndr_print_srvsvc_NetSrvInfo1547(ndr, "info1547", r->info1547);
11712 ndr->depth--;
11713 break;
11715 case 1548:
11716 ndr_print_ptr(ndr, "info1548", r->info1548);
11717 ndr->depth++;
11718 if (r->info1548) {
11719 ndr_print_srvsvc_NetSrvInfo1548(ndr, "info1548", r->info1548);
11721 ndr->depth--;
11722 break;
11724 case 1549:
11725 ndr_print_ptr(ndr, "info1549", r->info1549);
11726 ndr->depth++;
11727 if (r->info1549) {
11728 ndr_print_srvsvc_NetSrvInfo1549(ndr, "info1549", r->info1549);
11730 ndr->depth--;
11731 break;
11733 case 1550:
11734 ndr_print_ptr(ndr, "info1550", r->info1550);
11735 ndr->depth++;
11736 if (r->info1550) {
11737 ndr_print_srvsvc_NetSrvInfo1550(ndr, "info1550", r->info1550);
11739 ndr->depth--;
11740 break;
11742 case 1552:
11743 ndr_print_ptr(ndr, "info1552", r->info1552);
11744 ndr->depth++;
11745 if (r->info1552) {
11746 ndr_print_srvsvc_NetSrvInfo1552(ndr, "info1552", r->info1552);
11748 ndr->depth--;
11749 break;
11751 case 1553:
11752 ndr_print_ptr(ndr, "info1553", r->info1553);
11753 ndr->depth++;
11754 if (r->info1553) {
11755 ndr_print_srvsvc_NetSrvInfo1553(ndr, "info1553", r->info1553);
11757 ndr->depth--;
11758 break;
11760 case 1554:
11761 ndr_print_ptr(ndr, "info1554", r->info1554);
11762 ndr->depth++;
11763 if (r->info1554) {
11764 ndr_print_srvsvc_NetSrvInfo1554(ndr, "info1554", r->info1554);
11766 ndr->depth--;
11767 break;
11769 case 1555:
11770 ndr_print_ptr(ndr, "info1555", r->info1555);
11771 ndr->depth++;
11772 if (r->info1555) {
11773 ndr_print_srvsvc_NetSrvInfo1555(ndr, "info1555", r->info1555);
11775 ndr->depth--;
11776 break;
11778 case 1556:
11779 ndr_print_ptr(ndr, "info1556", r->info1556);
11780 ndr->depth++;
11781 if (r->info1556) {
11782 ndr_print_srvsvc_NetSrvInfo1556(ndr, "info1556", r->info1556);
11784 ndr->depth--;
11785 break;
11787 default:
11788 break;
11793 static enum ndr_err_code ndr_push_srvsvc_NetDiskInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetDiskInfo0 *r)
11795 if (ndr_flags & NDR_SCALARS) {
11796 NDR_CHECK(ndr_push_align(ndr, 4));
11797 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
11798 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, strlen(r->disk) + 1));
11799 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->disk, strlen(r->disk) + 1, sizeof(uint16_t), CH_UTF16));
11800 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
11802 if (ndr_flags & NDR_BUFFERS) {
11804 return NDR_ERR_SUCCESS;
11807 static enum ndr_err_code ndr_pull_srvsvc_NetDiskInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetDiskInfo0 *r)
11809 if (ndr_flags & NDR_SCALARS) {
11810 NDR_CHECK(ndr_pull_align(ndr, 4));
11811 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__disk_offset));
11812 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->__disk_length));
11813 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->disk, r->__disk_length, sizeof(uint16_t), CH_UTF16));
11814 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
11816 if (ndr_flags & NDR_BUFFERS) {
11818 return NDR_ERR_SUCCESS;
11821 _PUBLIC_ void ndr_print_srvsvc_NetDiskInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetDiskInfo0 *r)
11823 ndr_print_struct(ndr, name, "srvsvc_NetDiskInfo0");
11824 ndr->depth++;
11825 ndr_print_uint32(ndr, "__disk_offset", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->__disk_offset);
11826 ndr_print_uint32(ndr, "__disk_length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?strlen(r->disk) + 1:r->__disk_length);
11827 ndr_print_string(ndr, "disk", r->disk);
11828 ndr->depth--;
11831 static enum ndr_err_code ndr_push_srvsvc_NetDiskInfo(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetDiskInfo *r)
11833 uint32_t cntr_disks_1;
11834 if (ndr_flags & NDR_SCALARS) {
11835 NDR_CHECK(ndr_push_align(ndr, 5));
11836 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
11837 NDR_CHECK(ndr_push_unique_ptr(ndr, r->disks));
11838 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
11840 if (ndr_flags & NDR_BUFFERS) {
11841 if (r->disks) {
11842 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
11843 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
11844 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
11845 for (cntr_disks_1 = 0; cntr_disks_1 < r->count; cntr_disks_1++) {
11846 NDR_CHECK(ndr_push_srvsvc_NetDiskInfo0(ndr, NDR_SCALARS, &r->disks[cntr_disks_1]));
11850 return NDR_ERR_SUCCESS;
11853 static enum ndr_err_code ndr_pull_srvsvc_NetDiskInfo(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetDiskInfo *r)
11855 uint32_t _ptr_disks;
11856 uint32_t cntr_disks_1;
11857 TALLOC_CTX *_mem_save_disks_0;
11858 TALLOC_CTX *_mem_save_disks_1;
11859 if (ndr_flags & NDR_SCALARS) {
11860 NDR_CHECK(ndr_pull_align(ndr, 5));
11861 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
11862 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_disks));
11863 if (_ptr_disks) {
11864 NDR_PULL_ALLOC(ndr, r->disks);
11865 } else {
11866 r->disks = NULL;
11868 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
11870 if (ndr_flags & NDR_BUFFERS) {
11871 if (r->disks) {
11872 _mem_save_disks_0 = NDR_PULL_GET_MEM_CTX(ndr);
11873 NDR_PULL_SET_MEM_CTX(ndr, r->disks, 0);
11874 NDR_CHECK(ndr_pull_array_size(ndr, &r->disks));
11875 NDR_CHECK(ndr_pull_array_length(ndr, &r->disks));
11876 if (ndr_get_array_length(ndr, &r->disks) > ndr_get_array_size(ndr, &r->disks)) {
11877 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->disks), ndr_get_array_length(ndr, &r->disks));
11879 NDR_PULL_ALLOC_N(ndr, r->disks, ndr_get_array_size(ndr, &r->disks));
11880 _mem_save_disks_1 = NDR_PULL_GET_MEM_CTX(ndr);
11881 NDR_PULL_SET_MEM_CTX(ndr, r->disks, 0);
11882 for (cntr_disks_1 = 0; cntr_disks_1 < ndr_get_array_length(ndr, &r->disks); cntr_disks_1++) {
11883 NDR_CHECK(ndr_pull_srvsvc_NetDiskInfo0(ndr, NDR_SCALARS, &r->disks[cntr_disks_1]));
11885 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_disks_1, 0);
11886 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_disks_0, 0);
11888 if (r->disks) {
11889 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->disks, r->count));
11891 if (r->disks) {
11892 NDR_CHECK(ndr_check_array_length(ndr, (void*)&r->disks, r->count));
11895 return NDR_ERR_SUCCESS;
11898 _PUBLIC_ void ndr_print_srvsvc_NetDiskInfo(struct ndr_print *ndr, const char *name, const struct srvsvc_NetDiskInfo *r)
11900 uint32_t cntr_disks_1;
11901 ndr_print_struct(ndr, name, "srvsvc_NetDiskInfo");
11902 ndr->depth++;
11903 ndr_print_uint32(ndr, "count", r->count);
11904 ndr_print_ptr(ndr, "disks", r->disks);
11905 ndr->depth++;
11906 if (r->disks) {
11907 ndr->print(ndr, "%s: ARRAY(%d)", "disks", (int)r->count);
11908 ndr->depth++;
11909 for (cntr_disks_1=0;cntr_disks_1<r->count;cntr_disks_1++) {
11910 char *idx_1=NULL;
11911 if (asprintf(&idx_1, "[%d]", cntr_disks_1) != -1) {
11912 ndr_print_srvsvc_NetDiskInfo0(ndr, "disks", &r->disks[cntr_disks_1]);
11913 free(idx_1);
11916 ndr->depth--;
11918 ndr->depth--;
11919 ndr->depth--;
11922 static enum ndr_err_code ndr_push_srvsvc_Statistics(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_Statistics *r)
11924 if (ndr_flags & NDR_SCALARS) {
11925 NDR_CHECK(ndr_push_align(ndr, 4));
11926 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->start));
11927 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->fopens));
11928 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->devopens));
11929 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->jobsqueued));
11930 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->sopens));
11931 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->stimeouts));
11932 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->serrorout));
11933 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pwerrors));
11934 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->permerrors));
11935 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->syserrors));
11936 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bytessent_low));
11937 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bytessent_high));
11938 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bytesrcvd_low));
11939 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bytesrcvd_high));
11940 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->avresponse));
11941 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->reqbufneed));
11942 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->bigbufneed));
11943 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
11945 if (ndr_flags & NDR_BUFFERS) {
11947 return NDR_ERR_SUCCESS;
11950 static enum ndr_err_code ndr_pull_srvsvc_Statistics(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_Statistics *r)
11952 if (ndr_flags & NDR_SCALARS) {
11953 NDR_CHECK(ndr_pull_align(ndr, 4));
11954 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->start));
11955 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->fopens));
11956 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->devopens));
11957 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->jobsqueued));
11958 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->sopens));
11959 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->stimeouts));
11960 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->serrorout));
11961 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pwerrors));
11962 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->permerrors));
11963 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->syserrors));
11964 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bytessent_low));
11965 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bytessent_high));
11966 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bytesrcvd_low));
11967 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bytesrcvd_high));
11968 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->avresponse));
11969 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->reqbufneed));
11970 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->bigbufneed));
11971 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
11973 if (ndr_flags & NDR_BUFFERS) {
11975 return NDR_ERR_SUCCESS;
11978 _PUBLIC_ void ndr_print_srvsvc_Statistics(struct ndr_print *ndr, const char *name, const struct srvsvc_Statistics *r)
11980 ndr_print_struct(ndr, name, "srvsvc_Statistics");
11981 ndr->depth++;
11982 ndr_print_uint32(ndr, "start", r->start);
11983 ndr_print_uint32(ndr, "fopens", r->fopens);
11984 ndr_print_uint32(ndr, "devopens", r->devopens);
11985 ndr_print_uint32(ndr, "jobsqueued", r->jobsqueued);
11986 ndr_print_uint32(ndr, "sopens", r->sopens);
11987 ndr_print_uint32(ndr, "stimeouts", r->stimeouts);
11988 ndr_print_uint32(ndr, "serrorout", r->serrorout);
11989 ndr_print_uint32(ndr, "pwerrors", r->pwerrors);
11990 ndr_print_uint32(ndr, "permerrors", r->permerrors);
11991 ndr_print_uint32(ndr, "syserrors", r->syserrors);
11992 ndr_print_uint32(ndr, "bytessent_low", r->bytessent_low);
11993 ndr_print_uint32(ndr, "bytessent_high", r->bytessent_high);
11994 ndr_print_uint32(ndr, "bytesrcvd_low", r->bytesrcvd_low);
11995 ndr_print_uint32(ndr, "bytesrcvd_high", r->bytesrcvd_high);
11996 ndr_print_uint32(ndr, "avresponse", r->avresponse);
11997 ndr_print_uint32(ndr, "reqbufneed", r->reqbufneed);
11998 ndr_print_uint32(ndr, "bigbufneed", r->bigbufneed);
11999 ndr->depth--;
12002 static enum ndr_err_code ndr_push_srvsvc_NetTransportInfo0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportInfo0 *r)
12004 if (ndr_flags & NDR_SCALARS) {
12005 NDR_CHECK(ndr_push_align(ndr, 5));
12006 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->vcs));
12007 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
12008 NDR_CHECK(ndr_push_unique_ptr(ndr, r->addr));
12009 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->addr_len));
12010 NDR_CHECK(ndr_push_unique_ptr(ndr, r->net_addr));
12011 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
12013 if (ndr_flags & NDR_BUFFERS) {
12014 if (r->name) {
12015 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
12016 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12017 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
12018 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12020 if (r->addr) {
12021 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->addr_len));
12022 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->addr, r->addr_len));
12024 if (r->net_addr) {
12025 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
12026 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12027 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
12028 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->net_addr, ndr_charset_length(r->net_addr, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12031 return NDR_ERR_SUCCESS;
12034 static enum ndr_err_code ndr_pull_srvsvc_NetTransportInfo0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportInfo0 *r)
12036 uint32_t _ptr_name;
12037 TALLOC_CTX *_mem_save_name_0;
12038 uint32_t _ptr_addr;
12039 TALLOC_CTX *_mem_save_addr_0;
12040 uint32_t _ptr_net_addr;
12041 TALLOC_CTX *_mem_save_net_addr_0;
12042 if (ndr_flags & NDR_SCALARS) {
12043 NDR_CHECK(ndr_pull_align(ndr, 5));
12044 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->vcs));
12045 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
12046 if (_ptr_name) {
12047 NDR_PULL_ALLOC(ndr, r->name);
12048 } else {
12049 r->name = NULL;
12051 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_addr));
12052 if (_ptr_addr) {
12053 NDR_PULL_ALLOC(ndr, r->addr);
12054 } else {
12055 r->addr = NULL;
12057 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->addr_len));
12058 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_net_addr));
12059 if (_ptr_net_addr) {
12060 NDR_PULL_ALLOC(ndr, r->net_addr);
12061 } else {
12062 r->net_addr = NULL;
12064 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
12066 if (ndr_flags & NDR_BUFFERS) {
12067 if (r->name) {
12068 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
12069 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
12070 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
12071 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
12072 if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->name)) {
12073 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->name), ndr_get_array_length(ndr, &r->name));
12075 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t)));
12076 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t), CH_UTF16));
12077 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
12079 if (r->addr) {
12080 _mem_save_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
12081 NDR_PULL_SET_MEM_CTX(ndr, r->addr, 0);
12082 NDR_CHECK(ndr_pull_array_size(ndr, &r->addr));
12083 NDR_PULL_ALLOC_N(ndr, r->addr, ndr_get_array_size(ndr, &r->addr));
12084 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->addr, ndr_get_array_size(ndr, &r->addr)));
12085 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_addr_0, 0);
12087 if (r->net_addr) {
12088 _mem_save_net_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
12089 NDR_PULL_SET_MEM_CTX(ndr, r->net_addr, 0);
12090 NDR_CHECK(ndr_pull_array_size(ndr, &r->net_addr));
12091 NDR_CHECK(ndr_pull_array_length(ndr, &r->net_addr));
12092 if (ndr_get_array_length(ndr, &r->net_addr) > ndr_get_array_size(ndr, &r->net_addr)) {
12093 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->net_addr), ndr_get_array_length(ndr, &r->net_addr));
12095 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->net_addr), sizeof(uint16_t)));
12096 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->net_addr, ndr_get_array_length(ndr, &r->net_addr), sizeof(uint16_t), CH_UTF16));
12097 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_net_addr_0, 0);
12099 if (r->addr) {
12100 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->addr, r->addr_len));
12103 return NDR_ERR_SUCCESS;
12106 _PUBLIC_ void ndr_print_srvsvc_NetTransportInfo0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportInfo0 *r)
12108 ndr_print_struct(ndr, name, "srvsvc_NetTransportInfo0");
12109 ndr->depth++;
12110 ndr_print_uint32(ndr, "vcs", r->vcs);
12111 ndr_print_ptr(ndr, "name", r->name);
12112 ndr->depth++;
12113 if (r->name) {
12114 ndr_print_string(ndr, "name", r->name);
12116 ndr->depth--;
12117 ndr_print_ptr(ndr, "addr", r->addr);
12118 ndr->depth++;
12119 if (r->addr) {
12120 ndr_print_array_uint8(ndr, "addr", r->addr, r->addr_len);
12122 ndr->depth--;
12123 ndr_print_uint32(ndr, "addr_len", r->addr_len);
12124 ndr_print_ptr(ndr, "net_addr", r->net_addr);
12125 ndr->depth++;
12126 if (r->net_addr) {
12127 ndr_print_string(ndr, "net_addr", r->net_addr);
12129 ndr->depth--;
12130 ndr->depth--;
12133 static enum ndr_err_code ndr_push_srvsvc_NetTransportCtr0(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportCtr0 *r)
12135 uint32_t cntr_array_1;
12136 if (ndr_flags & NDR_SCALARS) {
12137 NDR_CHECK(ndr_push_align(ndr, 5));
12138 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
12139 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
12140 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
12142 if (ndr_flags & NDR_BUFFERS) {
12143 if (r->array) {
12144 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
12145 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12146 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
12148 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12149 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
12153 return NDR_ERR_SUCCESS;
12156 static enum ndr_err_code ndr_pull_srvsvc_NetTransportCtr0(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportCtr0 *r)
12158 uint32_t _ptr_array;
12159 uint32_t cntr_array_1;
12160 TALLOC_CTX *_mem_save_array_0;
12161 TALLOC_CTX *_mem_save_array_1;
12162 if (ndr_flags & NDR_SCALARS) {
12163 NDR_CHECK(ndr_pull_align(ndr, 5));
12164 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
12165 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
12166 if (_ptr_array) {
12167 NDR_PULL_ALLOC(ndr, r->array);
12168 } else {
12169 r->array = NULL;
12171 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
12173 if (ndr_flags & NDR_BUFFERS) {
12174 if (r->array) {
12175 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
12176 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
12177 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
12178 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
12179 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
12180 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
12181 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12182 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo0(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
12184 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12185 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo0(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
12187 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
12188 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
12190 if (r->array) {
12191 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
12194 return NDR_ERR_SUCCESS;
12197 _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr0(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportCtr0 *r)
12199 uint32_t cntr_array_1;
12200 ndr_print_struct(ndr, name, "srvsvc_NetTransportCtr0");
12201 ndr->depth++;
12202 ndr_print_uint32(ndr, "count", r->count);
12203 ndr_print_ptr(ndr, "array", r->array);
12204 ndr->depth++;
12205 if (r->array) {
12206 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
12207 ndr->depth++;
12208 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
12209 char *idx_1=NULL;
12210 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
12211 ndr_print_srvsvc_NetTransportInfo0(ndr, "array", &r->array[cntr_array_1]);
12212 free(idx_1);
12215 ndr->depth--;
12217 ndr->depth--;
12218 ndr->depth--;
12221 static enum ndr_err_code ndr_push_srvsvc_NetTransportInfo1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportInfo1 *r)
12223 if (ndr_flags & NDR_SCALARS) {
12224 NDR_CHECK(ndr_push_align(ndr, 5));
12225 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->vcs));
12226 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
12227 NDR_CHECK(ndr_push_unique_ptr(ndr, r->addr));
12228 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->addr_len));
12229 NDR_CHECK(ndr_push_unique_ptr(ndr, r->net_addr));
12230 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
12231 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
12233 if (ndr_flags & NDR_BUFFERS) {
12234 if (r->name) {
12235 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
12236 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12237 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
12238 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12240 if (r->addr) {
12241 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->addr_len));
12242 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->addr, r->addr_len));
12244 if (r->net_addr) {
12245 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
12246 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12247 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
12248 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->net_addr, ndr_charset_length(r->net_addr, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12250 if (r->domain) {
12251 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
12252 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12253 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
12254 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12257 return NDR_ERR_SUCCESS;
12260 static enum ndr_err_code ndr_pull_srvsvc_NetTransportInfo1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportInfo1 *r)
12262 uint32_t _ptr_name;
12263 TALLOC_CTX *_mem_save_name_0;
12264 uint32_t _ptr_addr;
12265 TALLOC_CTX *_mem_save_addr_0;
12266 uint32_t _ptr_net_addr;
12267 TALLOC_CTX *_mem_save_net_addr_0;
12268 uint32_t _ptr_domain;
12269 TALLOC_CTX *_mem_save_domain_0;
12270 if (ndr_flags & NDR_SCALARS) {
12271 NDR_CHECK(ndr_pull_align(ndr, 5));
12272 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->vcs));
12273 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
12274 if (_ptr_name) {
12275 NDR_PULL_ALLOC(ndr, r->name);
12276 } else {
12277 r->name = NULL;
12279 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_addr));
12280 if (_ptr_addr) {
12281 NDR_PULL_ALLOC(ndr, r->addr);
12282 } else {
12283 r->addr = NULL;
12285 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->addr_len));
12286 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_net_addr));
12287 if (_ptr_net_addr) {
12288 NDR_PULL_ALLOC(ndr, r->net_addr);
12289 } else {
12290 r->net_addr = NULL;
12292 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
12293 if (_ptr_domain) {
12294 NDR_PULL_ALLOC(ndr, r->domain);
12295 } else {
12296 r->domain = NULL;
12298 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
12300 if (ndr_flags & NDR_BUFFERS) {
12301 if (r->name) {
12302 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
12303 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
12304 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
12305 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
12306 if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->name)) {
12307 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->name), ndr_get_array_length(ndr, &r->name));
12309 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t)));
12310 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t), CH_UTF16));
12311 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
12313 if (r->addr) {
12314 _mem_save_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
12315 NDR_PULL_SET_MEM_CTX(ndr, r->addr, 0);
12316 NDR_CHECK(ndr_pull_array_size(ndr, &r->addr));
12317 NDR_PULL_ALLOC_N(ndr, r->addr, ndr_get_array_size(ndr, &r->addr));
12318 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->addr, ndr_get_array_size(ndr, &r->addr)));
12319 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_addr_0, 0);
12321 if (r->net_addr) {
12322 _mem_save_net_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
12323 NDR_PULL_SET_MEM_CTX(ndr, r->net_addr, 0);
12324 NDR_CHECK(ndr_pull_array_size(ndr, &r->net_addr));
12325 NDR_CHECK(ndr_pull_array_length(ndr, &r->net_addr));
12326 if (ndr_get_array_length(ndr, &r->net_addr) > ndr_get_array_size(ndr, &r->net_addr)) {
12327 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->net_addr), ndr_get_array_length(ndr, &r->net_addr));
12329 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->net_addr), sizeof(uint16_t)));
12330 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->net_addr, ndr_get_array_length(ndr, &r->net_addr), sizeof(uint16_t), CH_UTF16));
12331 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_net_addr_0, 0);
12333 if (r->domain) {
12334 _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
12335 NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
12336 NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
12337 NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
12338 if (ndr_get_array_length(ndr, &r->domain) > ndr_get_array_size(ndr, &r->domain)) {
12339 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->domain), ndr_get_array_length(ndr, &r->domain));
12341 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t)));
12342 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t), CH_UTF16));
12343 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
12345 if (r->addr) {
12346 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->addr, r->addr_len));
12349 return NDR_ERR_SUCCESS;
12352 _PUBLIC_ void ndr_print_srvsvc_NetTransportInfo1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportInfo1 *r)
12354 ndr_print_struct(ndr, name, "srvsvc_NetTransportInfo1");
12355 ndr->depth++;
12356 ndr_print_uint32(ndr, "vcs", r->vcs);
12357 ndr_print_ptr(ndr, "name", r->name);
12358 ndr->depth++;
12359 if (r->name) {
12360 ndr_print_string(ndr, "name", r->name);
12362 ndr->depth--;
12363 ndr_print_ptr(ndr, "addr", r->addr);
12364 ndr->depth++;
12365 if (r->addr) {
12366 ndr_print_array_uint8(ndr, "addr", r->addr, r->addr_len);
12368 ndr->depth--;
12369 ndr_print_uint32(ndr, "addr_len", r->addr_len);
12370 ndr_print_ptr(ndr, "net_addr", r->net_addr);
12371 ndr->depth++;
12372 if (r->net_addr) {
12373 ndr_print_string(ndr, "net_addr", r->net_addr);
12375 ndr->depth--;
12376 ndr_print_ptr(ndr, "domain", r->domain);
12377 ndr->depth++;
12378 if (r->domain) {
12379 ndr_print_string(ndr, "domain", r->domain);
12381 ndr->depth--;
12382 ndr->depth--;
12385 static enum ndr_err_code ndr_push_srvsvc_NetTransportCtr1(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportCtr1 *r)
12387 uint32_t cntr_array_1;
12388 if (ndr_flags & NDR_SCALARS) {
12389 NDR_CHECK(ndr_push_align(ndr, 5));
12390 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
12391 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
12392 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
12394 if (ndr_flags & NDR_BUFFERS) {
12395 if (r->array) {
12396 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
12397 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12398 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
12400 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12401 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
12405 return NDR_ERR_SUCCESS;
12408 static enum ndr_err_code ndr_pull_srvsvc_NetTransportCtr1(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportCtr1 *r)
12410 uint32_t _ptr_array;
12411 uint32_t cntr_array_1;
12412 TALLOC_CTX *_mem_save_array_0;
12413 TALLOC_CTX *_mem_save_array_1;
12414 if (ndr_flags & NDR_SCALARS) {
12415 NDR_CHECK(ndr_pull_align(ndr, 5));
12416 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
12417 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
12418 if (_ptr_array) {
12419 NDR_PULL_ALLOC(ndr, r->array);
12420 } else {
12421 r->array = NULL;
12423 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
12425 if (ndr_flags & NDR_BUFFERS) {
12426 if (r->array) {
12427 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
12428 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
12429 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
12430 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
12431 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
12432 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
12433 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12434 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo1(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
12436 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12437 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo1(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
12439 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
12440 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
12442 if (r->array) {
12443 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
12446 return NDR_ERR_SUCCESS;
12449 _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr1(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportCtr1 *r)
12451 uint32_t cntr_array_1;
12452 ndr_print_struct(ndr, name, "srvsvc_NetTransportCtr1");
12453 ndr->depth++;
12454 ndr_print_uint32(ndr, "count", r->count);
12455 ndr_print_ptr(ndr, "array", r->array);
12456 ndr->depth++;
12457 if (r->array) {
12458 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
12459 ndr->depth++;
12460 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
12461 char *idx_1=NULL;
12462 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
12463 ndr_print_srvsvc_NetTransportInfo1(ndr, "array", &r->array[cntr_array_1]);
12464 free(idx_1);
12467 ndr->depth--;
12469 ndr->depth--;
12470 ndr->depth--;
12473 static enum ndr_err_code ndr_push_srvsvc_NetTransportInfo2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportInfo2 *r)
12475 if (ndr_flags & NDR_SCALARS) {
12476 NDR_CHECK(ndr_push_align(ndr, 5));
12477 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->vcs));
12478 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
12479 NDR_CHECK(ndr_push_unique_ptr(ndr, r->addr));
12480 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->addr_len));
12481 NDR_CHECK(ndr_push_unique_ptr(ndr, r->net_addr));
12482 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
12483 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown));
12484 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
12486 if (ndr_flags & NDR_BUFFERS) {
12487 if (r->name) {
12488 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
12489 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12490 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
12491 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12493 if (r->addr) {
12494 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->addr_len));
12495 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->addr, r->addr_len));
12497 if (r->net_addr) {
12498 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
12499 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12500 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
12501 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->net_addr, ndr_charset_length(r->net_addr, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12503 if (r->domain) {
12504 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
12505 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12506 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
12507 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12510 return NDR_ERR_SUCCESS;
12513 static enum ndr_err_code ndr_pull_srvsvc_NetTransportInfo2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportInfo2 *r)
12515 uint32_t _ptr_name;
12516 TALLOC_CTX *_mem_save_name_0;
12517 uint32_t _ptr_addr;
12518 TALLOC_CTX *_mem_save_addr_0;
12519 uint32_t _ptr_net_addr;
12520 TALLOC_CTX *_mem_save_net_addr_0;
12521 uint32_t _ptr_domain;
12522 TALLOC_CTX *_mem_save_domain_0;
12523 if (ndr_flags & NDR_SCALARS) {
12524 NDR_CHECK(ndr_pull_align(ndr, 5));
12525 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->vcs));
12526 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
12527 if (_ptr_name) {
12528 NDR_PULL_ALLOC(ndr, r->name);
12529 } else {
12530 r->name = NULL;
12532 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_addr));
12533 if (_ptr_addr) {
12534 NDR_PULL_ALLOC(ndr, r->addr);
12535 } else {
12536 r->addr = NULL;
12538 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->addr_len));
12539 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_net_addr));
12540 if (_ptr_net_addr) {
12541 NDR_PULL_ALLOC(ndr, r->net_addr);
12542 } else {
12543 r->net_addr = NULL;
12545 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
12546 if (_ptr_domain) {
12547 NDR_PULL_ALLOC(ndr, r->domain);
12548 } else {
12549 r->domain = NULL;
12551 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown));
12552 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
12554 if (ndr_flags & NDR_BUFFERS) {
12555 if (r->name) {
12556 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
12557 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
12558 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
12559 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
12560 if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->name)) {
12561 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->name), ndr_get_array_length(ndr, &r->name));
12563 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t)));
12564 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t), CH_UTF16));
12565 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
12567 if (r->addr) {
12568 _mem_save_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
12569 NDR_PULL_SET_MEM_CTX(ndr, r->addr, 0);
12570 NDR_CHECK(ndr_pull_array_size(ndr, &r->addr));
12571 NDR_PULL_ALLOC_N(ndr, r->addr, ndr_get_array_size(ndr, &r->addr));
12572 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->addr, ndr_get_array_size(ndr, &r->addr)));
12573 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_addr_0, 0);
12575 if (r->net_addr) {
12576 _mem_save_net_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
12577 NDR_PULL_SET_MEM_CTX(ndr, r->net_addr, 0);
12578 NDR_CHECK(ndr_pull_array_size(ndr, &r->net_addr));
12579 NDR_CHECK(ndr_pull_array_length(ndr, &r->net_addr));
12580 if (ndr_get_array_length(ndr, &r->net_addr) > ndr_get_array_size(ndr, &r->net_addr)) {
12581 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->net_addr), ndr_get_array_length(ndr, &r->net_addr));
12583 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->net_addr), sizeof(uint16_t)));
12584 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->net_addr, ndr_get_array_length(ndr, &r->net_addr), sizeof(uint16_t), CH_UTF16));
12585 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_net_addr_0, 0);
12587 if (r->domain) {
12588 _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
12589 NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
12590 NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
12591 NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
12592 if (ndr_get_array_length(ndr, &r->domain) > ndr_get_array_size(ndr, &r->domain)) {
12593 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->domain), ndr_get_array_length(ndr, &r->domain));
12595 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t)));
12596 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t), CH_UTF16));
12597 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
12599 if (r->addr) {
12600 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->addr, r->addr_len));
12603 return NDR_ERR_SUCCESS;
12606 _PUBLIC_ void ndr_print_srvsvc_NetTransportInfo2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportInfo2 *r)
12608 ndr_print_struct(ndr, name, "srvsvc_NetTransportInfo2");
12609 ndr->depth++;
12610 ndr_print_uint32(ndr, "vcs", r->vcs);
12611 ndr_print_ptr(ndr, "name", r->name);
12612 ndr->depth++;
12613 if (r->name) {
12614 ndr_print_string(ndr, "name", r->name);
12616 ndr->depth--;
12617 ndr_print_ptr(ndr, "addr", r->addr);
12618 ndr->depth++;
12619 if (r->addr) {
12620 ndr_print_array_uint8(ndr, "addr", r->addr, r->addr_len);
12622 ndr->depth--;
12623 ndr_print_uint32(ndr, "addr_len", r->addr_len);
12624 ndr_print_ptr(ndr, "net_addr", r->net_addr);
12625 ndr->depth++;
12626 if (r->net_addr) {
12627 ndr_print_string(ndr, "net_addr", r->net_addr);
12629 ndr->depth--;
12630 ndr_print_ptr(ndr, "domain", r->domain);
12631 ndr->depth++;
12632 if (r->domain) {
12633 ndr_print_string(ndr, "domain", r->domain);
12635 ndr->depth--;
12636 ndr_print_uint32(ndr, "unknown", r->unknown);
12637 ndr->depth--;
12640 static enum ndr_err_code ndr_push_srvsvc_NetTransportCtr2(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportCtr2 *r)
12642 uint32_t cntr_array_1;
12643 if (ndr_flags & NDR_SCALARS) {
12644 NDR_CHECK(ndr_push_align(ndr, 5));
12645 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
12646 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
12647 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
12649 if (ndr_flags & NDR_BUFFERS) {
12650 if (r->array) {
12651 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
12652 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12653 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
12655 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12656 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo2(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
12660 return NDR_ERR_SUCCESS;
12663 static enum ndr_err_code ndr_pull_srvsvc_NetTransportCtr2(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportCtr2 *r)
12665 uint32_t _ptr_array;
12666 uint32_t cntr_array_1;
12667 TALLOC_CTX *_mem_save_array_0;
12668 TALLOC_CTX *_mem_save_array_1;
12669 if (ndr_flags & NDR_SCALARS) {
12670 NDR_CHECK(ndr_pull_align(ndr, 5));
12671 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
12672 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
12673 if (_ptr_array) {
12674 NDR_PULL_ALLOC(ndr, r->array);
12675 } else {
12676 r->array = NULL;
12678 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
12680 if (ndr_flags & NDR_BUFFERS) {
12681 if (r->array) {
12682 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
12683 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
12684 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
12685 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
12686 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
12687 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
12688 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12689 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo2(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
12691 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12692 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo2(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
12694 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
12695 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
12697 if (r->array) {
12698 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
12701 return NDR_ERR_SUCCESS;
12704 _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr2(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportCtr2 *r)
12706 uint32_t cntr_array_1;
12707 ndr_print_struct(ndr, name, "srvsvc_NetTransportCtr2");
12708 ndr->depth++;
12709 ndr_print_uint32(ndr, "count", r->count);
12710 ndr_print_ptr(ndr, "array", r->array);
12711 ndr->depth++;
12712 if (r->array) {
12713 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
12714 ndr->depth++;
12715 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
12716 char *idx_1=NULL;
12717 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
12718 ndr_print_srvsvc_NetTransportInfo2(ndr, "array", &r->array[cntr_array_1]);
12719 free(idx_1);
12722 ndr->depth--;
12724 ndr->depth--;
12725 ndr->depth--;
12728 static enum ndr_err_code ndr_push_srvsvc_NetTransportInfo3(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportInfo3 *r)
12730 if (ndr_flags & NDR_SCALARS) {
12731 NDR_CHECK(ndr_push_align(ndr, 5));
12732 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->vcs));
12733 NDR_CHECK(ndr_push_unique_ptr(ndr, r->name));
12734 NDR_CHECK(ndr_push_unique_ptr(ndr, r->addr));
12735 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->addr_len));
12736 NDR_CHECK(ndr_push_unique_ptr(ndr, r->net_addr));
12737 NDR_CHECK(ndr_push_unique_ptr(ndr, r->domain));
12738 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
12739 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown2));
12740 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->unknown3, 256));
12741 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
12743 if (ndr_flags & NDR_BUFFERS) {
12744 if (r->name) {
12745 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
12746 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12747 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->name, CH_UTF16)));
12748 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->name, ndr_charset_length(r->name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12750 if (r->addr) {
12751 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->addr_len));
12752 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->addr, r->addr_len));
12754 if (r->net_addr) {
12755 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
12756 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12757 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->net_addr, CH_UTF16)));
12758 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->net_addr, ndr_charset_length(r->net_addr, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12760 if (r->domain) {
12761 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
12762 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
12763 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->domain, CH_UTF16)));
12764 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->domain, ndr_charset_length(r->domain, CH_UTF16), sizeof(uint16_t), CH_UTF16));
12767 return NDR_ERR_SUCCESS;
12770 static enum ndr_err_code ndr_pull_srvsvc_NetTransportInfo3(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportInfo3 *r)
12772 uint32_t _ptr_name;
12773 TALLOC_CTX *_mem_save_name_0;
12774 uint32_t _ptr_addr;
12775 TALLOC_CTX *_mem_save_addr_0;
12776 uint32_t _ptr_net_addr;
12777 TALLOC_CTX *_mem_save_net_addr_0;
12778 uint32_t _ptr_domain;
12779 TALLOC_CTX *_mem_save_domain_0;
12780 if (ndr_flags & NDR_SCALARS) {
12781 NDR_CHECK(ndr_pull_align(ndr, 5));
12782 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->vcs));
12783 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_name));
12784 if (_ptr_name) {
12785 NDR_PULL_ALLOC(ndr, r->name);
12786 } else {
12787 r->name = NULL;
12789 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_addr));
12790 if (_ptr_addr) {
12791 NDR_PULL_ALLOC(ndr, r->addr);
12792 } else {
12793 r->addr = NULL;
12795 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->addr_len));
12796 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_net_addr));
12797 if (_ptr_net_addr) {
12798 NDR_PULL_ALLOC(ndr, r->net_addr);
12799 } else {
12800 r->net_addr = NULL;
12802 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_domain));
12803 if (_ptr_domain) {
12804 NDR_PULL_ALLOC(ndr, r->domain);
12805 } else {
12806 r->domain = NULL;
12808 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
12809 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown2));
12810 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->unknown3, 256));
12811 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
12813 if (ndr_flags & NDR_BUFFERS) {
12814 if (r->name) {
12815 _mem_save_name_0 = NDR_PULL_GET_MEM_CTX(ndr);
12816 NDR_PULL_SET_MEM_CTX(ndr, r->name, 0);
12817 NDR_CHECK(ndr_pull_array_size(ndr, &r->name));
12818 NDR_CHECK(ndr_pull_array_length(ndr, &r->name));
12819 if (ndr_get_array_length(ndr, &r->name) > ndr_get_array_size(ndr, &r->name)) {
12820 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->name), ndr_get_array_length(ndr, &r->name));
12822 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t)));
12823 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->name, ndr_get_array_length(ndr, &r->name), sizeof(uint16_t), CH_UTF16));
12824 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_name_0, 0);
12826 if (r->addr) {
12827 _mem_save_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
12828 NDR_PULL_SET_MEM_CTX(ndr, r->addr, 0);
12829 NDR_CHECK(ndr_pull_array_size(ndr, &r->addr));
12830 NDR_PULL_ALLOC_N(ndr, r->addr, ndr_get_array_size(ndr, &r->addr));
12831 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->addr, ndr_get_array_size(ndr, &r->addr)));
12832 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_addr_0, 0);
12834 if (r->net_addr) {
12835 _mem_save_net_addr_0 = NDR_PULL_GET_MEM_CTX(ndr);
12836 NDR_PULL_SET_MEM_CTX(ndr, r->net_addr, 0);
12837 NDR_CHECK(ndr_pull_array_size(ndr, &r->net_addr));
12838 NDR_CHECK(ndr_pull_array_length(ndr, &r->net_addr));
12839 if (ndr_get_array_length(ndr, &r->net_addr) > ndr_get_array_size(ndr, &r->net_addr)) {
12840 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->net_addr), ndr_get_array_length(ndr, &r->net_addr));
12842 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->net_addr), sizeof(uint16_t)));
12843 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->net_addr, ndr_get_array_length(ndr, &r->net_addr), sizeof(uint16_t), CH_UTF16));
12844 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_net_addr_0, 0);
12846 if (r->domain) {
12847 _mem_save_domain_0 = NDR_PULL_GET_MEM_CTX(ndr);
12848 NDR_PULL_SET_MEM_CTX(ndr, r->domain, 0);
12849 NDR_CHECK(ndr_pull_array_size(ndr, &r->domain));
12850 NDR_CHECK(ndr_pull_array_length(ndr, &r->domain));
12851 if (ndr_get_array_length(ndr, &r->domain) > ndr_get_array_size(ndr, &r->domain)) {
12852 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->domain), ndr_get_array_length(ndr, &r->domain));
12854 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t)));
12855 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->domain, ndr_get_array_length(ndr, &r->domain), sizeof(uint16_t), CH_UTF16));
12856 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_domain_0, 0);
12858 if (r->addr) {
12859 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->addr, r->addr_len));
12862 return NDR_ERR_SUCCESS;
12865 _PUBLIC_ void ndr_print_srvsvc_NetTransportInfo3(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportInfo3 *r)
12867 ndr_print_struct(ndr, name, "srvsvc_NetTransportInfo3");
12868 ndr->depth++;
12869 ndr_print_uint32(ndr, "vcs", r->vcs);
12870 ndr_print_ptr(ndr, "name", r->name);
12871 ndr->depth++;
12872 if (r->name) {
12873 ndr_print_string(ndr, "name", r->name);
12875 ndr->depth--;
12876 ndr_print_ptr(ndr, "addr", r->addr);
12877 ndr->depth++;
12878 if (r->addr) {
12879 ndr_print_array_uint8(ndr, "addr", r->addr, r->addr_len);
12881 ndr->depth--;
12882 ndr_print_uint32(ndr, "addr_len", r->addr_len);
12883 ndr_print_ptr(ndr, "net_addr", r->net_addr);
12884 ndr->depth++;
12885 if (r->net_addr) {
12886 ndr_print_string(ndr, "net_addr", r->net_addr);
12888 ndr->depth--;
12889 ndr_print_ptr(ndr, "domain", r->domain);
12890 ndr->depth++;
12891 if (r->domain) {
12892 ndr_print_string(ndr, "domain", r->domain);
12894 ndr->depth--;
12895 ndr_print_uint32(ndr, "unknown1", r->unknown1);
12896 ndr_print_uint32(ndr, "unknown2", r->unknown2);
12897 ndr_print_array_uint8(ndr, "unknown3", r->unknown3, 256);
12898 ndr->depth--;
12901 static enum ndr_err_code ndr_push_srvsvc_NetTransportCtr3(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportCtr3 *r)
12903 uint32_t cntr_array_1;
12904 if (ndr_flags & NDR_SCALARS) {
12905 NDR_CHECK(ndr_push_align(ndr, 5));
12906 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
12907 NDR_CHECK(ndr_push_unique_ptr(ndr, r->array));
12908 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
12910 if (ndr_flags & NDR_BUFFERS) {
12911 if (r->array) {
12912 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
12913 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12914 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo3(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
12916 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12917 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo3(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
12921 return NDR_ERR_SUCCESS;
12924 static enum ndr_err_code ndr_pull_srvsvc_NetTransportCtr3(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportCtr3 *r)
12926 uint32_t _ptr_array;
12927 uint32_t cntr_array_1;
12928 TALLOC_CTX *_mem_save_array_0;
12929 TALLOC_CTX *_mem_save_array_1;
12930 if (ndr_flags & NDR_SCALARS) {
12931 NDR_CHECK(ndr_pull_align(ndr, 5));
12932 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
12933 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_array));
12934 if (_ptr_array) {
12935 NDR_PULL_ALLOC(ndr, r->array);
12936 } else {
12937 r->array = NULL;
12939 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
12941 if (ndr_flags & NDR_BUFFERS) {
12942 if (r->array) {
12943 _mem_save_array_0 = NDR_PULL_GET_MEM_CTX(ndr);
12944 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
12945 NDR_CHECK(ndr_pull_array_size(ndr, &r->array));
12946 NDR_PULL_ALLOC_N(ndr, r->array, ndr_get_array_size(ndr, &r->array));
12947 _mem_save_array_1 = NDR_PULL_GET_MEM_CTX(ndr);
12948 NDR_PULL_SET_MEM_CTX(ndr, r->array, 0);
12949 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12950 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo3(ndr, NDR_SCALARS, &r->array[cntr_array_1]));
12952 for (cntr_array_1 = 0; cntr_array_1 < r->count; cntr_array_1++) {
12953 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo3(ndr, NDR_BUFFERS, &r->array[cntr_array_1]));
12955 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_1, 0);
12956 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_array_0, 0);
12958 if (r->array) {
12959 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->array, r->count));
12962 return NDR_ERR_SUCCESS;
12965 _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr3(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportCtr3 *r)
12967 uint32_t cntr_array_1;
12968 ndr_print_struct(ndr, name, "srvsvc_NetTransportCtr3");
12969 ndr->depth++;
12970 ndr_print_uint32(ndr, "count", r->count);
12971 ndr_print_ptr(ndr, "array", r->array);
12972 ndr->depth++;
12973 if (r->array) {
12974 ndr->print(ndr, "%s: ARRAY(%d)", "array", (int)r->count);
12975 ndr->depth++;
12976 for (cntr_array_1=0;cntr_array_1<r->count;cntr_array_1++) {
12977 char *idx_1=NULL;
12978 if (asprintf(&idx_1, "[%d]", cntr_array_1) != -1) {
12979 ndr_print_srvsvc_NetTransportInfo3(ndr, "array", &r->array[cntr_array_1]);
12980 free(idx_1);
12983 ndr->depth--;
12985 ndr->depth--;
12986 ndr->depth--;
12989 static enum ndr_err_code ndr_push_srvsvc_NetTransportCtr(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetTransportCtr *r)
12991 if (ndr_flags & NDR_SCALARS) {
12992 int level = ndr_push_get_switch_value(ndr, r);
12993 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
12994 NDR_CHECK(ndr_push_union_align(ndr, 5));
12995 switch (level) {
12996 case 0: {
12997 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr0));
12998 break; }
13000 case 1: {
13001 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr1));
13002 break; }
13004 case 2: {
13005 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr2));
13006 break; }
13008 case 3: {
13009 NDR_CHECK(ndr_push_unique_ptr(ndr, r->ctr3));
13010 break; }
13012 default: {
13013 break; }
13017 if (ndr_flags & NDR_BUFFERS) {
13018 int level = ndr_push_get_switch_value(ndr, r);
13019 switch (level) {
13020 case 0:
13021 if (r->ctr0) {
13022 NDR_CHECK(ndr_push_srvsvc_NetTransportCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
13024 break;
13026 case 1:
13027 if (r->ctr1) {
13028 NDR_CHECK(ndr_push_srvsvc_NetTransportCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
13030 break;
13032 case 2:
13033 if (r->ctr2) {
13034 NDR_CHECK(ndr_push_srvsvc_NetTransportCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
13036 break;
13038 case 3:
13039 if (r->ctr3) {
13040 NDR_CHECK(ndr_push_srvsvc_NetTransportCtr3(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr3));
13042 break;
13044 default:
13045 break;
13049 return NDR_ERR_SUCCESS;
13052 static enum ndr_err_code ndr_pull_srvsvc_NetTransportCtr(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetTransportCtr *r)
13054 int level;
13055 uint32_t _level;
13056 TALLOC_CTX *_mem_save_ctr0_0;
13057 TALLOC_CTX *_mem_save_ctr1_0;
13058 TALLOC_CTX *_mem_save_ctr2_0;
13059 TALLOC_CTX *_mem_save_ctr3_0;
13060 level = ndr_pull_get_switch_value(ndr, r);
13061 if (ndr_flags & NDR_SCALARS) {
13062 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
13063 if (_level != level) {
13064 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
13066 NDR_CHECK(ndr_pull_union_align(ndr, 5));
13067 switch (level) {
13068 case 0: {
13069 uint32_t _ptr_ctr0;
13070 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr0));
13071 if (_ptr_ctr0) {
13072 NDR_PULL_ALLOC(ndr, r->ctr0);
13073 } else {
13074 r->ctr0 = NULL;
13076 break; }
13078 case 1: {
13079 uint32_t _ptr_ctr1;
13080 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr1));
13081 if (_ptr_ctr1) {
13082 NDR_PULL_ALLOC(ndr, r->ctr1);
13083 } else {
13084 r->ctr1 = NULL;
13086 break; }
13088 case 2: {
13089 uint32_t _ptr_ctr2;
13090 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr2));
13091 if (_ptr_ctr2) {
13092 NDR_PULL_ALLOC(ndr, r->ctr2);
13093 } else {
13094 r->ctr2 = NULL;
13096 break; }
13098 case 3: {
13099 uint32_t _ptr_ctr3;
13100 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_ctr3));
13101 if (_ptr_ctr3) {
13102 NDR_PULL_ALLOC(ndr, r->ctr3);
13103 } else {
13104 r->ctr3 = NULL;
13106 break; }
13108 default: {
13109 break; }
13113 if (ndr_flags & NDR_BUFFERS) {
13114 switch (level) {
13115 case 0:
13116 if (r->ctr0) {
13117 _mem_save_ctr0_0 = NDR_PULL_GET_MEM_CTX(ndr);
13118 NDR_PULL_SET_MEM_CTX(ndr, r->ctr0, 0);
13119 NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr0(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr0));
13120 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr0_0, 0);
13122 break;
13124 case 1:
13125 if (r->ctr1) {
13126 _mem_save_ctr1_0 = NDR_PULL_GET_MEM_CTX(ndr);
13127 NDR_PULL_SET_MEM_CTX(ndr, r->ctr1, 0);
13128 NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr1(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr1));
13129 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr1_0, 0);
13131 break;
13133 case 2:
13134 if (r->ctr2) {
13135 _mem_save_ctr2_0 = NDR_PULL_GET_MEM_CTX(ndr);
13136 NDR_PULL_SET_MEM_CTX(ndr, r->ctr2, 0);
13137 NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr2(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr2));
13138 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr2_0, 0);
13140 break;
13142 case 3:
13143 if (r->ctr3) {
13144 _mem_save_ctr3_0 = NDR_PULL_GET_MEM_CTX(ndr);
13145 NDR_PULL_SET_MEM_CTX(ndr, r->ctr3, 0);
13146 NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr3(ndr, NDR_SCALARS|NDR_BUFFERS, r->ctr3));
13147 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ctr3_0, 0);
13149 break;
13151 default:
13152 break;
13156 return NDR_ERR_SUCCESS;
13159 _PUBLIC_ void ndr_print_srvsvc_NetTransportCtr(struct ndr_print *ndr, const char *name, const union srvsvc_NetTransportCtr *r)
13161 int level;
13162 level = ndr_print_get_switch_value(ndr, r);
13163 ndr_print_union(ndr, name, level, "srvsvc_NetTransportCtr");
13164 switch (level) {
13165 case 0:
13166 ndr_print_ptr(ndr, "ctr0", r->ctr0);
13167 ndr->depth++;
13168 if (r->ctr0) {
13169 ndr_print_srvsvc_NetTransportCtr0(ndr, "ctr0", r->ctr0);
13171 ndr->depth--;
13172 break;
13174 case 1:
13175 ndr_print_ptr(ndr, "ctr1", r->ctr1);
13176 ndr->depth++;
13177 if (r->ctr1) {
13178 ndr_print_srvsvc_NetTransportCtr1(ndr, "ctr1", r->ctr1);
13180 ndr->depth--;
13181 break;
13183 case 2:
13184 ndr_print_ptr(ndr, "ctr2", r->ctr2);
13185 ndr->depth++;
13186 if (r->ctr2) {
13187 ndr_print_srvsvc_NetTransportCtr2(ndr, "ctr2", r->ctr2);
13189 ndr->depth--;
13190 break;
13192 case 3:
13193 ndr_print_ptr(ndr, "ctr3", r->ctr3);
13194 ndr->depth++;
13195 if (r->ctr3) {
13196 ndr_print_srvsvc_NetTransportCtr3(ndr, "ctr3", r->ctr3);
13198 ndr->depth--;
13199 break;
13201 default:
13202 break;
13207 static enum ndr_err_code ndr_push_srvsvc_NetTransportInfoCtr(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetTransportInfoCtr *r)
13209 if (ndr_flags & NDR_SCALARS) {
13210 NDR_CHECK(ndr_push_align(ndr, 5));
13211 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
13212 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->ctr, r->level));
13213 NDR_CHECK(ndr_push_srvsvc_NetTransportCtr(ndr, NDR_SCALARS, &r->ctr));
13214 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
13216 if (ndr_flags & NDR_BUFFERS) {
13217 NDR_CHECK(ndr_push_srvsvc_NetTransportCtr(ndr, NDR_BUFFERS, &r->ctr));
13219 return NDR_ERR_SUCCESS;
13222 static enum ndr_err_code ndr_pull_srvsvc_NetTransportInfoCtr(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetTransportInfoCtr *r)
13224 if (ndr_flags & NDR_SCALARS) {
13225 NDR_CHECK(ndr_pull_align(ndr, 5));
13226 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
13227 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->ctr, r->level));
13228 NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr(ndr, NDR_SCALARS, &r->ctr));
13229 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
13231 if (ndr_flags & NDR_BUFFERS) {
13232 NDR_CHECK(ndr_pull_srvsvc_NetTransportCtr(ndr, NDR_BUFFERS, &r->ctr));
13234 return NDR_ERR_SUCCESS;
13237 _PUBLIC_ void ndr_print_srvsvc_NetTransportInfoCtr(struct ndr_print *ndr, const char *name, const struct srvsvc_NetTransportInfoCtr *r)
13239 ndr_print_struct(ndr, name, "srvsvc_NetTransportInfoCtr");
13240 ndr->depth++;
13241 ndr_print_uint32(ndr, "level", r->level);
13242 ndr_print_set_switch_value(ndr, &r->ctr, r->level);
13243 ndr_print_srvsvc_NetTransportCtr(ndr, "ctr", &r->ctr);
13244 ndr->depth--;
13247 static enum ndr_err_code ndr_push_srvsvc_NetRemoteTODInfo(struct ndr_push *ndr, int ndr_flags, const struct srvsvc_NetRemoteTODInfo *r)
13249 if (ndr_flags & NDR_SCALARS) {
13250 NDR_CHECK(ndr_push_align(ndr, 4));
13251 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->elapsed));
13252 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->msecs));
13253 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->hours));
13254 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->mins));
13255 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->secs));
13256 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->hunds));
13257 NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, r->timezone));
13258 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->tinterval));
13259 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->day));
13260 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->month));
13261 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->year));
13262 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->weekday));
13263 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
13265 if (ndr_flags & NDR_BUFFERS) {
13267 return NDR_ERR_SUCCESS;
13270 static enum ndr_err_code ndr_pull_srvsvc_NetRemoteTODInfo(struct ndr_pull *ndr, int ndr_flags, struct srvsvc_NetRemoteTODInfo *r)
13272 if (ndr_flags & NDR_SCALARS) {
13273 NDR_CHECK(ndr_pull_align(ndr, 4));
13274 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->elapsed));
13275 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->msecs));
13276 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->hours));
13277 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->mins));
13278 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->secs));
13279 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->hunds));
13280 NDR_CHECK(ndr_pull_int32(ndr, NDR_SCALARS, &r->timezone));
13281 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->tinterval));
13282 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->day));
13283 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->month));
13284 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->year));
13285 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->weekday));
13286 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
13288 if (ndr_flags & NDR_BUFFERS) {
13290 return NDR_ERR_SUCCESS;
13293 _PUBLIC_ void ndr_print_srvsvc_NetRemoteTODInfo(struct ndr_print *ndr, const char *name, const struct srvsvc_NetRemoteTODInfo *r)
13295 ndr_print_struct(ndr, name, "srvsvc_NetRemoteTODInfo");
13296 ndr->depth++;
13297 ndr_print_uint32(ndr, "elapsed", r->elapsed);
13298 ndr_print_uint32(ndr, "msecs", r->msecs);
13299 ndr_print_uint32(ndr, "hours", r->hours);
13300 ndr_print_uint32(ndr, "mins", r->mins);
13301 ndr_print_uint32(ndr, "secs", r->secs);
13302 ndr_print_uint32(ndr, "hunds", r->hunds);
13303 ndr_print_int32(ndr, "timezone", r->timezone);
13304 ndr_print_uint32(ndr, "tinterval", r->tinterval);
13305 ndr_print_uint32(ndr, "day", r->day);
13306 ndr_print_uint32(ndr, "month", r->month);
13307 ndr_print_uint32(ndr, "year", r->year);
13308 ndr_print_uint32(ndr, "weekday", r->weekday);
13309 ndr->depth--;
13312 static enum ndr_err_code ndr_push_srvsvc_NetTransportInfo(struct ndr_push *ndr, int ndr_flags, const union srvsvc_NetTransportInfo *r)
13314 if (ndr_flags & NDR_SCALARS) {
13315 int level = ndr_push_get_switch_value(ndr, r);
13316 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
13317 NDR_CHECK(ndr_push_union_align(ndr, 5));
13318 switch (level) {
13319 case 0: {
13320 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo0(ndr, NDR_SCALARS, &r->info0));
13321 break; }
13323 case 1: {
13324 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo1(ndr, NDR_SCALARS, &r->info1));
13325 break; }
13327 case 2: {
13328 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo2(ndr, NDR_SCALARS, &r->info2));
13329 break; }
13331 case 3: {
13332 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo3(ndr, NDR_SCALARS, &r->info3));
13333 break; }
13335 default:
13336 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
13339 if (ndr_flags & NDR_BUFFERS) {
13340 int level = ndr_push_get_switch_value(ndr, r);
13341 switch (level) {
13342 case 0:
13343 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo0(ndr, NDR_BUFFERS, &r->info0));
13344 break;
13346 case 1:
13347 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo1(ndr, NDR_BUFFERS, &r->info1));
13348 break;
13350 case 2:
13351 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo2(ndr, NDR_BUFFERS, &r->info2));
13352 break;
13354 case 3:
13355 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo3(ndr, NDR_BUFFERS, &r->info3));
13356 break;
13358 default:
13359 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
13362 return NDR_ERR_SUCCESS;
13365 static enum ndr_err_code ndr_pull_srvsvc_NetTransportInfo(struct ndr_pull *ndr, int ndr_flags, union srvsvc_NetTransportInfo *r)
13367 int level;
13368 uint32_t _level;
13369 level = ndr_pull_get_switch_value(ndr, r);
13370 if (ndr_flags & NDR_SCALARS) {
13371 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
13372 if (_level != level) {
13373 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
13375 NDR_CHECK(ndr_pull_union_align(ndr, 5));
13376 switch (level) {
13377 case 0: {
13378 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo0(ndr, NDR_SCALARS, &r->info0));
13379 break; }
13381 case 1: {
13382 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo1(ndr, NDR_SCALARS, &r->info1));
13383 break; }
13385 case 2: {
13386 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo2(ndr, NDR_SCALARS, &r->info2));
13387 break; }
13389 case 3: {
13390 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo3(ndr, NDR_SCALARS, &r->info3));
13391 break; }
13393 default:
13394 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
13397 if (ndr_flags & NDR_BUFFERS) {
13398 switch (level) {
13399 case 0:
13400 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo0(ndr, NDR_BUFFERS, &r->info0));
13401 break;
13403 case 1:
13404 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo1(ndr, NDR_BUFFERS, &r->info1));
13405 break;
13407 case 2:
13408 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo2(ndr, NDR_BUFFERS, &r->info2));
13409 break;
13411 case 3:
13412 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo3(ndr, NDR_BUFFERS, &r->info3));
13413 break;
13415 default:
13416 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
13419 return NDR_ERR_SUCCESS;
13422 _PUBLIC_ void ndr_print_srvsvc_NetTransportInfo(struct ndr_print *ndr, const char *name, const union srvsvc_NetTransportInfo *r)
13424 int level;
13425 level = ndr_print_get_switch_value(ndr, r);
13426 ndr_print_union(ndr, name, level, "srvsvc_NetTransportInfo");
13427 switch (level) {
13428 case 0:
13429 ndr_print_srvsvc_NetTransportInfo0(ndr, "info0", &r->info0);
13430 break;
13432 case 1:
13433 ndr_print_srvsvc_NetTransportInfo1(ndr, "info1", &r->info1);
13434 break;
13436 case 2:
13437 ndr_print_srvsvc_NetTransportInfo2(ndr, "info2", &r->info2);
13438 break;
13440 case 3:
13441 ndr_print_srvsvc_NetTransportInfo3(ndr, "info3", &r->info3);
13442 break;
13444 default:
13445 ndr_print_bad_level(ndr, name, level);
13449 static enum ndr_err_code ndr_push_srvsvc_NetCharDevEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevEnum *r)
13451 if (flags & NDR_IN) {
13452 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
13453 if (r->in.server_unc) {
13454 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13455 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
13456 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13457 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));
13459 if (r->in.info_ctr == NULL) {
13460 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13462 NDR_CHECK(ndr_push_srvsvc_NetCharDevInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
13463 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
13464 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
13465 if (r->in.resume_handle) {
13466 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
13469 if (flags & NDR_OUT) {
13470 if (r->out.info_ctr == NULL) {
13471 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13473 NDR_CHECK(ndr_push_srvsvc_NetCharDevInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
13474 if (r->out.totalentries == NULL) {
13475 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13477 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
13478 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
13479 if (r->out.resume_handle) {
13480 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
13482 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
13484 return NDR_ERR_SUCCESS;
13487 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevEnum *r)
13489 uint32_t _ptr_server_unc;
13490 uint32_t _ptr_resume_handle;
13491 TALLOC_CTX *_mem_save_server_unc_0;
13492 TALLOC_CTX *_mem_save_info_ctr_0;
13493 TALLOC_CTX *_mem_save_totalentries_0;
13494 TALLOC_CTX *_mem_save_resume_handle_0;
13495 if (flags & NDR_IN) {
13496 ZERO_STRUCT(r->out);
13498 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
13499 if (_ptr_server_unc) {
13500 NDR_PULL_ALLOC(ndr, r->in.server_unc);
13501 } else {
13502 r->in.server_unc = NULL;
13504 if (r->in.server_unc) {
13505 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
13506 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
13507 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
13508 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
13509 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
13510 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
13512 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
13513 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
13514 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
13516 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13517 NDR_PULL_ALLOC(ndr, r->in.info_ctr);
13519 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
13520 NDR_PULL_SET_MEM_CTX(ndr, r->in.info_ctr, LIBNDR_FLAG_REF_ALLOC);
13521 NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
13522 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
13523 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
13524 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
13525 if (_ptr_resume_handle) {
13526 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
13527 } else {
13528 r->in.resume_handle = NULL;
13530 if (r->in.resume_handle) {
13531 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
13532 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
13533 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
13534 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
13536 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
13537 *r->out.info_ctr = *r->in.info_ctr;
13538 NDR_PULL_ALLOC(ndr, r->out.totalentries);
13539 ZERO_STRUCTP(r->out.totalentries);
13541 if (flags & NDR_OUT) {
13542 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13543 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
13545 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
13546 NDR_PULL_SET_MEM_CTX(ndr, r->out.info_ctr, LIBNDR_FLAG_REF_ALLOC);
13547 NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
13548 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
13549 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13550 NDR_PULL_ALLOC(ndr, r->out.totalentries);
13552 _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
13553 NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
13554 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
13555 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
13556 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
13557 if (_ptr_resume_handle) {
13558 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
13559 } else {
13560 r->out.resume_handle = NULL;
13562 if (r->out.resume_handle) {
13563 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
13564 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
13565 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
13566 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
13568 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
13570 return NDR_ERR_SUCCESS;
13573 _PUBLIC_ void ndr_print_srvsvc_NetCharDevEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevEnum *r)
13575 ndr_print_struct(ndr, name, "srvsvc_NetCharDevEnum");
13576 ndr->depth++;
13577 if (flags & NDR_SET_VALUES) {
13578 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
13580 if (flags & NDR_IN) {
13581 ndr_print_struct(ndr, "in", "srvsvc_NetCharDevEnum");
13582 ndr->depth++;
13583 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
13584 ndr->depth++;
13585 if (r->in.server_unc) {
13586 ndr_print_string(ndr, "server_unc", r->in.server_unc);
13588 ndr->depth--;
13589 ndr_print_ptr(ndr, "info_ctr", r->in.info_ctr);
13590 ndr->depth++;
13591 ndr_print_srvsvc_NetCharDevInfoCtr(ndr, "info_ctr", r->in.info_ctr);
13592 ndr->depth--;
13593 ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
13594 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
13595 ndr->depth++;
13596 if (r->in.resume_handle) {
13597 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
13599 ndr->depth--;
13600 ndr->depth--;
13602 if (flags & NDR_OUT) {
13603 ndr_print_struct(ndr, "out", "srvsvc_NetCharDevEnum");
13604 ndr->depth++;
13605 ndr_print_ptr(ndr, "info_ctr", r->out.info_ctr);
13606 ndr->depth++;
13607 ndr_print_srvsvc_NetCharDevInfoCtr(ndr, "info_ctr", r->out.info_ctr);
13608 ndr->depth--;
13609 ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
13610 ndr->depth++;
13611 ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
13612 ndr->depth--;
13613 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
13614 ndr->depth++;
13615 if (r->out.resume_handle) {
13616 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
13618 ndr->depth--;
13619 ndr_print_WERROR(ndr, "result", r->out.result);
13620 ndr->depth--;
13622 ndr->depth--;
13625 static enum ndr_err_code ndr_push_srvsvc_NetCharDevGetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevGetInfo *r)
13627 if (flags & NDR_IN) {
13628 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
13629 if (r->in.server_unc) {
13630 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13631 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
13632 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13633 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));
13635 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.device_name, CH_UTF16)));
13636 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
13637 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.device_name, CH_UTF16)));
13638 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));
13639 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
13641 if (flags & NDR_OUT) {
13642 if (r->out.info == NULL) {
13643 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13645 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
13646 NDR_CHECK(ndr_push_srvsvc_NetCharDevInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
13647 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
13649 return NDR_ERR_SUCCESS;
13652 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevGetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevGetInfo *r)
13654 uint32_t _ptr_server_unc;
13655 TALLOC_CTX *_mem_save_server_unc_0;
13656 TALLOC_CTX *_mem_save_info_0;
13657 if (flags & NDR_IN) {
13658 ZERO_STRUCT(r->out);
13660 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
13661 if (_ptr_server_unc) {
13662 NDR_PULL_ALLOC(ndr, r->in.server_unc);
13663 } else {
13664 r->in.server_unc = NULL;
13666 if (r->in.server_unc) {
13667 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
13668 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
13669 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
13670 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
13671 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
13672 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
13674 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
13675 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
13676 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
13678 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.device_name));
13679 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.device_name));
13680 if (ndr_get_array_length(ndr, &r->in.device_name) > ndr_get_array_size(ndr, &r->in.device_name)) {
13681 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.device_name), ndr_get_array_length(ndr, &r->in.device_name));
13683 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.device_name), sizeof(uint16_t)));
13684 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.device_name, ndr_get_array_length(ndr, &r->in.device_name), sizeof(uint16_t), CH_UTF16));
13685 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
13686 NDR_PULL_ALLOC(ndr, r->out.info);
13687 ZERO_STRUCTP(r->out.info);
13689 if (flags & NDR_OUT) {
13690 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13691 NDR_PULL_ALLOC(ndr, r->out.info);
13693 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
13694 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
13695 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
13696 NDR_CHECK(ndr_pull_srvsvc_NetCharDevInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
13697 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
13698 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
13700 return NDR_ERR_SUCCESS;
13703 _PUBLIC_ void ndr_print_srvsvc_NetCharDevGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevGetInfo *r)
13705 ndr_print_struct(ndr, name, "srvsvc_NetCharDevGetInfo");
13706 ndr->depth++;
13707 if (flags & NDR_SET_VALUES) {
13708 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
13710 if (flags & NDR_IN) {
13711 ndr_print_struct(ndr, "in", "srvsvc_NetCharDevGetInfo");
13712 ndr->depth++;
13713 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
13714 ndr->depth++;
13715 if (r->in.server_unc) {
13716 ndr_print_string(ndr, "server_unc", r->in.server_unc);
13718 ndr->depth--;
13719 ndr_print_string(ndr, "device_name", r->in.device_name);
13720 ndr_print_uint32(ndr, "level", r->in.level);
13721 ndr->depth--;
13723 if (flags & NDR_OUT) {
13724 ndr_print_struct(ndr, "out", "srvsvc_NetCharDevGetInfo");
13725 ndr->depth++;
13726 ndr_print_ptr(ndr, "info", r->out.info);
13727 ndr->depth++;
13728 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
13729 ndr_print_srvsvc_NetCharDevInfo(ndr, "info", r->out.info);
13730 ndr->depth--;
13731 ndr_print_WERROR(ndr, "result", r->out.result);
13732 ndr->depth--;
13734 ndr->depth--;
13737 static enum ndr_err_code ndr_push_srvsvc_NetCharDevControl(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevControl *r)
13739 if (flags & NDR_IN) {
13740 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
13741 if (r->in.server_unc) {
13742 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13743 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
13744 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13745 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));
13747 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.device_name, CH_UTF16)));
13748 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
13749 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.device_name, CH_UTF16)));
13750 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));
13751 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.opcode));
13753 if (flags & NDR_OUT) {
13754 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
13756 return NDR_ERR_SUCCESS;
13759 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevControl(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevControl *r)
13761 uint32_t _ptr_server_unc;
13762 TALLOC_CTX *_mem_save_server_unc_0;
13763 if (flags & NDR_IN) {
13764 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
13765 if (_ptr_server_unc) {
13766 NDR_PULL_ALLOC(ndr, r->in.server_unc);
13767 } else {
13768 r->in.server_unc = NULL;
13770 if (r->in.server_unc) {
13771 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
13772 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
13773 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
13774 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
13775 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
13776 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
13778 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
13779 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
13780 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
13782 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.device_name));
13783 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.device_name));
13784 if (ndr_get_array_length(ndr, &r->in.device_name) > ndr_get_array_size(ndr, &r->in.device_name)) {
13785 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.device_name), ndr_get_array_length(ndr, &r->in.device_name));
13787 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.device_name), sizeof(uint16_t)));
13788 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.device_name, ndr_get_array_length(ndr, &r->in.device_name), sizeof(uint16_t), CH_UTF16));
13789 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.opcode));
13791 if (flags & NDR_OUT) {
13792 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
13794 return NDR_ERR_SUCCESS;
13797 _PUBLIC_ void ndr_print_srvsvc_NetCharDevControl(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevControl *r)
13799 ndr_print_struct(ndr, name, "srvsvc_NetCharDevControl");
13800 ndr->depth++;
13801 if (flags & NDR_SET_VALUES) {
13802 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
13804 if (flags & NDR_IN) {
13805 ndr_print_struct(ndr, "in", "srvsvc_NetCharDevControl");
13806 ndr->depth++;
13807 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
13808 ndr->depth++;
13809 if (r->in.server_unc) {
13810 ndr_print_string(ndr, "server_unc", r->in.server_unc);
13812 ndr->depth--;
13813 ndr_print_string(ndr, "device_name", r->in.device_name);
13814 ndr_print_uint32(ndr, "opcode", r->in.opcode);
13815 ndr->depth--;
13817 if (flags & NDR_OUT) {
13818 ndr_print_struct(ndr, "out", "srvsvc_NetCharDevControl");
13819 ndr->depth++;
13820 ndr_print_WERROR(ndr, "result", r->out.result);
13821 ndr->depth--;
13823 ndr->depth--;
13826 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevQEnum *r)
13828 if (flags & NDR_IN) {
13829 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
13830 if (r->in.server_unc) {
13831 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13832 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
13833 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
13834 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));
13836 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.user));
13837 if (r->in.user) {
13838 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
13839 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
13840 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
13841 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.user, ndr_charset_length(r->in.user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
13843 if (r->in.info_ctr == NULL) {
13844 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13846 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
13847 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
13848 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
13849 if (r->in.resume_handle) {
13850 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
13853 if (flags & NDR_OUT) {
13854 if (r->out.info_ctr == NULL) {
13855 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13857 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
13858 if (r->out.totalentries == NULL) {
13859 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
13861 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
13862 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
13863 if (r->out.resume_handle) {
13864 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
13866 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
13868 return NDR_ERR_SUCCESS;
13871 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevQEnum *r)
13873 uint32_t _ptr_server_unc;
13874 uint32_t _ptr_user;
13875 uint32_t _ptr_resume_handle;
13876 TALLOC_CTX *_mem_save_server_unc_0;
13877 TALLOC_CTX *_mem_save_user_0;
13878 TALLOC_CTX *_mem_save_info_ctr_0;
13879 TALLOC_CTX *_mem_save_totalentries_0;
13880 TALLOC_CTX *_mem_save_resume_handle_0;
13881 if (flags & NDR_IN) {
13882 ZERO_STRUCT(r->out);
13884 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
13885 if (_ptr_server_unc) {
13886 NDR_PULL_ALLOC(ndr, r->in.server_unc);
13887 } else {
13888 r->in.server_unc = NULL;
13890 if (r->in.server_unc) {
13891 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
13892 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
13893 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
13894 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
13895 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
13896 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
13898 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
13899 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
13900 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
13902 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
13903 if (_ptr_user) {
13904 NDR_PULL_ALLOC(ndr, r->in.user);
13905 } else {
13906 r->in.user = NULL;
13908 if (r->in.user) {
13909 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
13910 NDR_PULL_SET_MEM_CTX(ndr, r->in.user, 0);
13911 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.user));
13912 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.user));
13913 if (ndr_get_array_length(ndr, &r->in.user) > ndr_get_array_size(ndr, &r->in.user)) {
13914 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.user), ndr_get_array_length(ndr, &r->in.user));
13916 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.user), sizeof(uint16_t)));
13917 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.user, ndr_get_array_length(ndr, &r->in.user), sizeof(uint16_t), CH_UTF16));
13918 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
13920 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13921 NDR_PULL_ALLOC(ndr, r->in.info_ctr);
13923 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
13924 NDR_PULL_SET_MEM_CTX(ndr, r->in.info_ctr, LIBNDR_FLAG_REF_ALLOC);
13925 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
13926 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
13927 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
13928 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
13929 if (_ptr_resume_handle) {
13930 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
13931 } else {
13932 r->in.resume_handle = NULL;
13934 if (r->in.resume_handle) {
13935 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
13936 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
13937 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
13938 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
13940 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
13941 *r->out.info_ctr = *r->in.info_ctr;
13942 NDR_PULL_ALLOC(ndr, r->out.totalentries);
13943 ZERO_STRUCTP(r->out.totalentries);
13945 if (flags & NDR_OUT) {
13946 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13947 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
13949 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
13950 NDR_PULL_SET_MEM_CTX(ndr, r->out.info_ctr, LIBNDR_FLAG_REF_ALLOC);
13951 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
13952 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
13953 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
13954 NDR_PULL_ALLOC(ndr, r->out.totalentries);
13956 _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
13957 NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
13958 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
13959 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
13960 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
13961 if (_ptr_resume_handle) {
13962 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
13963 } else {
13964 r->out.resume_handle = NULL;
13966 if (r->out.resume_handle) {
13967 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
13968 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
13969 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
13970 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
13972 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
13974 return NDR_ERR_SUCCESS;
13977 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQEnum *r)
13979 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQEnum");
13980 ndr->depth++;
13981 if (flags & NDR_SET_VALUES) {
13982 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
13984 if (flags & NDR_IN) {
13985 ndr_print_struct(ndr, "in", "srvsvc_NetCharDevQEnum");
13986 ndr->depth++;
13987 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
13988 ndr->depth++;
13989 if (r->in.server_unc) {
13990 ndr_print_string(ndr, "server_unc", r->in.server_unc);
13992 ndr->depth--;
13993 ndr_print_ptr(ndr, "user", r->in.user);
13994 ndr->depth++;
13995 if (r->in.user) {
13996 ndr_print_string(ndr, "user", r->in.user);
13998 ndr->depth--;
13999 ndr_print_ptr(ndr, "info_ctr", r->in.info_ctr);
14000 ndr->depth++;
14001 ndr_print_srvsvc_NetCharDevQInfoCtr(ndr, "info_ctr", r->in.info_ctr);
14002 ndr->depth--;
14003 ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
14004 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
14005 ndr->depth++;
14006 if (r->in.resume_handle) {
14007 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
14009 ndr->depth--;
14010 ndr->depth--;
14012 if (flags & NDR_OUT) {
14013 ndr_print_struct(ndr, "out", "srvsvc_NetCharDevQEnum");
14014 ndr->depth++;
14015 ndr_print_ptr(ndr, "info_ctr", r->out.info_ctr);
14016 ndr->depth++;
14017 ndr_print_srvsvc_NetCharDevQInfoCtr(ndr, "info_ctr", r->out.info_ctr);
14018 ndr->depth--;
14019 ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
14020 ndr->depth++;
14021 ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
14022 ndr->depth--;
14023 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
14024 ndr->depth++;
14025 if (r->out.resume_handle) {
14026 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
14028 ndr->depth--;
14029 ndr_print_WERROR(ndr, "result", r->out.result);
14030 ndr->depth--;
14032 ndr->depth--;
14035 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQGetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevQGetInfo *r)
14037 if (flags & NDR_IN) {
14038 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
14039 if (r->in.server_unc) {
14040 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14041 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14042 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14043 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));
14045 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
14046 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14047 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
14048 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));
14049 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
14050 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14051 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
14052 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.user, ndr_charset_length(r->in.user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
14053 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
14055 if (flags & NDR_OUT) {
14056 if (r->out.info == NULL) {
14057 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14059 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
14060 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
14061 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
14063 return NDR_ERR_SUCCESS;
14066 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQGetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevQGetInfo *r)
14068 uint32_t _ptr_server_unc;
14069 TALLOC_CTX *_mem_save_server_unc_0;
14070 TALLOC_CTX *_mem_save_info_0;
14071 if (flags & NDR_IN) {
14072 ZERO_STRUCT(r->out);
14074 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
14075 if (_ptr_server_unc) {
14076 NDR_PULL_ALLOC(ndr, r->in.server_unc);
14077 } else {
14078 r->in.server_unc = NULL;
14080 if (r->in.server_unc) {
14081 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
14082 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
14083 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
14084 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
14085 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
14086 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
14088 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
14089 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
14090 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
14092 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.queue_name));
14093 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.queue_name));
14094 if (ndr_get_array_length(ndr, &r->in.queue_name) > ndr_get_array_size(ndr, &r->in.queue_name)) {
14095 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.queue_name), ndr_get_array_length(ndr, &r->in.queue_name));
14097 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.queue_name), sizeof(uint16_t)));
14098 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.queue_name, ndr_get_array_length(ndr, &r->in.queue_name), sizeof(uint16_t), CH_UTF16));
14099 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.user));
14100 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.user));
14101 if (ndr_get_array_length(ndr, &r->in.user) > ndr_get_array_size(ndr, &r->in.user)) {
14102 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.user), ndr_get_array_length(ndr, &r->in.user));
14104 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.user), sizeof(uint16_t)));
14105 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.user, ndr_get_array_length(ndr, &r->in.user), sizeof(uint16_t), CH_UTF16));
14106 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
14107 NDR_PULL_ALLOC(ndr, r->out.info);
14108 ZERO_STRUCTP(r->out.info);
14110 if (flags & NDR_OUT) {
14111 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14112 NDR_PULL_ALLOC(ndr, r->out.info);
14114 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
14115 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
14116 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
14117 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
14118 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
14119 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
14121 return NDR_ERR_SUCCESS;
14124 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQGetInfo *r)
14126 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQGetInfo");
14127 ndr->depth++;
14128 if (flags & NDR_SET_VALUES) {
14129 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14131 if (flags & NDR_IN) {
14132 ndr_print_struct(ndr, "in", "srvsvc_NetCharDevQGetInfo");
14133 ndr->depth++;
14134 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
14135 ndr->depth++;
14136 if (r->in.server_unc) {
14137 ndr_print_string(ndr, "server_unc", r->in.server_unc);
14139 ndr->depth--;
14140 ndr_print_string(ndr, "queue_name", r->in.queue_name);
14141 ndr_print_string(ndr, "user", r->in.user);
14142 ndr_print_uint32(ndr, "level", r->in.level);
14143 ndr->depth--;
14145 if (flags & NDR_OUT) {
14146 ndr_print_struct(ndr, "out", "srvsvc_NetCharDevQGetInfo");
14147 ndr->depth++;
14148 ndr_print_ptr(ndr, "info", r->out.info);
14149 ndr->depth++;
14150 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
14151 ndr_print_srvsvc_NetCharDevQInfo(ndr, "info", r->out.info);
14152 ndr->depth--;
14153 ndr_print_WERROR(ndr, "result", r->out.result);
14154 ndr->depth--;
14156 ndr->depth--;
14159 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQSetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevQSetInfo *r)
14161 if (flags & NDR_IN) {
14162 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
14163 if (r->in.server_unc) {
14164 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14165 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14166 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14167 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));
14169 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
14170 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14171 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
14172 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));
14173 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
14174 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.info, r->in.level));
14175 NDR_CHECK(ndr_push_srvsvc_NetCharDevQInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
14176 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.parm_error));
14177 if (r->in.parm_error) {
14178 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.parm_error));
14181 if (flags & NDR_OUT) {
14182 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.parm_error));
14183 if (r->out.parm_error) {
14184 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.parm_error));
14186 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
14188 return NDR_ERR_SUCCESS;
14191 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQSetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevQSetInfo *r)
14193 uint32_t _ptr_server_unc;
14194 uint32_t _ptr_parm_error;
14195 TALLOC_CTX *_mem_save_server_unc_0;
14196 TALLOC_CTX *_mem_save_parm_error_0;
14197 if (flags & NDR_IN) {
14198 ZERO_STRUCT(r->out);
14200 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
14201 if (_ptr_server_unc) {
14202 NDR_PULL_ALLOC(ndr, r->in.server_unc);
14203 } else {
14204 r->in.server_unc = NULL;
14206 if (r->in.server_unc) {
14207 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
14208 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
14209 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
14210 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
14211 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
14212 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
14214 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
14215 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
14216 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
14218 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.queue_name));
14219 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.queue_name));
14220 if (ndr_get_array_length(ndr, &r->in.queue_name) > ndr_get_array_size(ndr, &r->in.queue_name)) {
14221 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.queue_name), ndr_get_array_length(ndr, &r->in.queue_name));
14223 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.queue_name), sizeof(uint16_t)));
14224 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.queue_name, ndr_get_array_length(ndr, &r->in.queue_name), sizeof(uint16_t), CH_UTF16));
14225 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
14226 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.info, r->in.level));
14227 NDR_CHECK(ndr_pull_srvsvc_NetCharDevQInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
14228 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
14229 if (_ptr_parm_error) {
14230 NDR_PULL_ALLOC(ndr, r->in.parm_error);
14231 } else {
14232 r->in.parm_error = NULL;
14234 if (r->in.parm_error) {
14235 _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
14236 NDR_PULL_SET_MEM_CTX(ndr, r->in.parm_error, 0);
14237 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.parm_error));
14238 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
14241 if (flags & NDR_OUT) {
14242 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
14243 if (_ptr_parm_error) {
14244 NDR_PULL_ALLOC(ndr, r->out.parm_error);
14245 } else {
14246 r->out.parm_error = NULL;
14248 if (r->out.parm_error) {
14249 _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
14250 NDR_PULL_SET_MEM_CTX(ndr, r->out.parm_error, 0);
14251 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.parm_error));
14252 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
14254 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
14256 return NDR_ERR_SUCCESS;
14259 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQSetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQSetInfo *r)
14261 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQSetInfo");
14262 ndr->depth++;
14263 if (flags & NDR_SET_VALUES) {
14264 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14266 if (flags & NDR_IN) {
14267 ndr_print_struct(ndr, "in", "srvsvc_NetCharDevQSetInfo");
14268 ndr->depth++;
14269 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
14270 ndr->depth++;
14271 if (r->in.server_unc) {
14272 ndr_print_string(ndr, "server_unc", r->in.server_unc);
14274 ndr->depth--;
14275 ndr_print_string(ndr, "queue_name", r->in.queue_name);
14276 ndr_print_uint32(ndr, "level", r->in.level);
14277 ndr_print_set_switch_value(ndr, &r->in.info, r->in.level);
14278 ndr_print_srvsvc_NetCharDevQInfo(ndr, "info", &r->in.info);
14279 ndr_print_ptr(ndr, "parm_error", r->in.parm_error);
14280 ndr->depth++;
14281 if (r->in.parm_error) {
14282 ndr_print_uint32(ndr, "parm_error", *r->in.parm_error);
14284 ndr->depth--;
14285 ndr->depth--;
14287 if (flags & NDR_OUT) {
14288 ndr_print_struct(ndr, "out", "srvsvc_NetCharDevQSetInfo");
14289 ndr->depth++;
14290 ndr_print_ptr(ndr, "parm_error", r->out.parm_error);
14291 ndr->depth++;
14292 if (r->out.parm_error) {
14293 ndr_print_uint32(ndr, "parm_error", *r->out.parm_error);
14295 ndr->depth--;
14296 ndr_print_WERROR(ndr, "result", r->out.result);
14297 ndr->depth--;
14299 ndr->depth--;
14302 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQPurge(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevQPurge *r)
14304 if (flags & NDR_IN) {
14305 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
14306 if (r->in.server_unc) {
14307 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14308 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14309 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14310 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));
14312 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
14313 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14314 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
14315 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));
14317 if (flags & NDR_OUT) {
14318 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
14320 return NDR_ERR_SUCCESS;
14323 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQPurge(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevQPurge *r)
14325 uint32_t _ptr_server_unc;
14326 TALLOC_CTX *_mem_save_server_unc_0;
14327 if (flags & NDR_IN) {
14328 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
14329 if (_ptr_server_unc) {
14330 NDR_PULL_ALLOC(ndr, r->in.server_unc);
14331 } else {
14332 r->in.server_unc = NULL;
14334 if (r->in.server_unc) {
14335 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
14336 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
14337 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
14338 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
14339 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
14340 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
14342 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
14343 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
14344 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
14346 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.queue_name));
14347 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.queue_name));
14348 if (ndr_get_array_length(ndr, &r->in.queue_name) > ndr_get_array_size(ndr, &r->in.queue_name)) {
14349 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.queue_name), ndr_get_array_length(ndr, &r->in.queue_name));
14351 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.queue_name), sizeof(uint16_t)));
14352 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.queue_name, ndr_get_array_length(ndr, &r->in.queue_name), sizeof(uint16_t), CH_UTF16));
14354 if (flags & NDR_OUT) {
14355 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
14357 return NDR_ERR_SUCCESS;
14360 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQPurge(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQPurge *r)
14362 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQPurge");
14363 ndr->depth++;
14364 if (flags & NDR_SET_VALUES) {
14365 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14367 if (flags & NDR_IN) {
14368 ndr_print_struct(ndr, "in", "srvsvc_NetCharDevQPurge");
14369 ndr->depth++;
14370 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
14371 ndr->depth++;
14372 if (r->in.server_unc) {
14373 ndr_print_string(ndr, "server_unc", r->in.server_unc);
14375 ndr->depth--;
14376 ndr_print_string(ndr, "queue_name", r->in.queue_name);
14377 ndr->depth--;
14379 if (flags & NDR_OUT) {
14380 ndr_print_struct(ndr, "out", "srvsvc_NetCharDevQPurge");
14381 ndr->depth++;
14382 ndr_print_WERROR(ndr, "result", r->out.result);
14383 ndr->depth--;
14385 ndr->depth--;
14388 static enum ndr_err_code ndr_push_srvsvc_NetCharDevQPurgeSelf(struct ndr_push *ndr, int flags, const struct srvsvc_NetCharDevQPurgeSelf *r)
14390 if (flags & NDR_IN) {
14391 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
14392 if (r->in.server_unc) {
14393 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14394 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14395 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14396 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));
14398 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
14399 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14400 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.queue_name, CH_UTF16)));
14401 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));
14402 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
14403 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14404 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.computer_name, CH_UTF16)));
14405 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));
14407 if (flags & NDR_OUT) {
14408 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
14410 return NDR_ERR_SUCCESS;
14413 static enum ndr_err_code ndr_pull_srvsvc_NetCharDevQPurgeSelf(struct ndr_pull *ndr, int flags, struct srvsvc_NetCharDevQPurgeSelf *r)
14415 uint32_t _ptr_server_unc;
14416 TALLOC_CTX *_mem_save_server_unc_0;
14417 if (flags & NDR_IN) {
14418 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
14419 if (_ptr_server_unc) {
14420 NDR_PULL_ALLOC(ndr, r->in.server_unc);
14421 } else {
14422 r->in.server_unc = NULL;
14424 if (r->in.server_unc) {
14425 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
14426 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
14427 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
14428 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
14429 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
14430 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
14432 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
14433 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
14434 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
14436 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.queue_name));
14437 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.queue_name));
14438 if (ndr_get_array_length(ndr, &r->in.queue_name) > ndr_get_array_size(ndr, &r->in.queue_name)) {
14439 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.queue_name), ndr_get_array_length(ndr, &r->in.queue_name));
14441 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.queue_name), sizeof(uint16_t)));
14442 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.queue_name, ndr_get_array_length(ndr, &r->in.queue_name), sizeof(uint16_t), CH_UTF16));
14443 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.computer_name));
14444 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.computer_name));
14445 if (ndr_get_array_length(ndr, &r->in.computer_name) > ndr_get_array_size(ndr, &r->in.computer_name)) {
14446 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.computer_name), ndr_get_array_length(ndr, &r->in.computer_name));
14448 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.computer_name), sizeof(uint16_t)));
14449 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.computer_name, ndr_get_array_length(ndr, &r->in.computer_name), sizeof(uint16_t), CH_UTF16));
14451 if (flags & NDR_OUT) {
14452 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
14454 return NDR_ERR_SUCCESS;
14457 _PUBLIC_ void ndr_print_srvsvc_NetCharDevQPurgeSelf(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetCharDevQPurgeSelf *r)
14459 ndr_print_struct(ndr, name, "srvsvc_NetCharDevQPurgeSelf");
14460 ndr->depth++;
14461 if (flags & NDR_SET_VALUES) {
14462 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14464 if (flags & NDR_IN) {
14465 ndr_print_struct(ndr, "in", "srvsvc_NetCharDevQPurgeSelf");
14466 ndr->depth++;
14467 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
14468 ndr->depth++;
14469 if (r->in.server_unc) {
14470 ndr_print_string(ndr, "server_unc", r->in.server_unc);
14472 ndr->depth--;
14473 ndr_print_string(ndr, "queue_name", r->in.queue_name);
14474 ndr_print_string(ndr, "computer_name", r->in.computer_name);
14475 ndr->depth--;
14477 if (flags & NDR_OUT) {
14478 ndr_print_struct(ndr, "out", "srvsvc_NetCharDevQPurgeSelf");
14479 ndr->depth++;
14480 ndr_print_WERROR(ndr, "result", r->out.result);
14481 ndr->depth--;
14483 ndr->depth--;
14486 static enum ndr_err_code ndr_push_srvsvc_NetConnEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetConnEnum *r)
14488 if (flags & NDR_IN) {
14489 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
14490 if (r->in.server_unc) {
14491 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14492 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14493 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14494 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));
14496 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.path));
14497 if (r->in.path) {
14498 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
14499 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14500 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
14501 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path, ndr_charset_length(r->in.path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
14503 if (r->in.info_ctr == NULL) {
14504 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14506 NDR_CHECK(ndr_push_srvsvc_NetConnInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
14507 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
14508 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
14509 if (r->in.resume_handle) {
14510 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
14513 if (flags & NDR_OUT) {
14514 if (r->out.info_ctr == NULL) {
14515 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14517 NDR_CHECK(ndr_push_srvsvc_NetConnInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
14518 if (r->out.totalentries == NULL) {
14519 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14521 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
14522 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
14523 if (r->out.resume_handle) {
14524 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
14526 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
14528 return NDR_ERR_SUCCESS;
14531 static enum ndr_err_code ndr_pull_srvsvc_NetConnEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetConnEnum *r)
14533 uint32_t _ptr_server_unc;
14534 uint32_t _ptr_path;
14535 uint32_t _ptr_resume_handle;
14536 TALLOC_CTX *_mem_save_server_unc_0;
14537 TALLOC_CTX *_mem_save_path_0;
14538 TALLOC_CTX *_mem_save_info_ctr_0;
14539 TALLOC_CTX *_mem_save_totalentries_0;
14540 TALLOC_CTX *_mem_save_resume_handle_0;
14541 if (flags & NDR_IN) {
14542 ZERO_STRUCT(r->out);
14544 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
14545 if (_ptr_server_unc) {
14546 NDR_PULL_ALLOC(ndr, r->in.server_unc);
14547 } else {
14548 r->in.server_unc = NULL;
14550 if (r->in.server_unc) {
14551 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
14552 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
14553 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
14554 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
14555 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
14556 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
14558 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
14559 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
14560 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
14562 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
14563 if (_ptr_path) {
14564 NDR_PULL_ALLOC(ndr, r->in.path);
14565 } else {
14566 r->in.path = NULL;
14568 if (r->in.path) {
14569 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
14570 NDR_PULL_SET_MEM_CTX(ndr, r->in.path, 0);
14571 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path));
14572 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path));
14573 if (ndr_get_array_length(ndr, &r->in.path) > ndr_get_array_size(ndr, &r->in.path)) {
14574 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.path), ndr_get_array_length(ndr, &r->in.path));
14576 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t)));
14577 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t), CH_UTF16));
14578 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
14580 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14581 NDR_PULL_ALLOC(ndr, r->in.info_ctr);
14583 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
14584 NDR_PULL_SET_MEM_CTX(ndr, r->in.info_ctr, LIBNDR_FLAG_REF_ALLOC);
14585 NDR_CHECK(ndr_pull_srvsvc_NetConnInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
14586 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
14587 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
14588 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
14589 if (_ptr_resume_handle) {
14590 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
14591 } else {
14592 r->in.resume_handle = NULL;
14594 if (r->in.resume_handle) {
14595 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
14596 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
14597 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
14598 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
14600 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
14601 *r->out.info_ctr = *r->in.info_ctr;
14602 NDR_PULL_ALLOC(ndr, r->out.totalentries);
14603 ZERO_STRUCTP(r->out.totalentries);
14605 if (flags & NDR_OUT) {
14606 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14607 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
14609 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
14610 NDR_PULL_SET_MEM_CTX(ndr, r->out.info_ctr, LIBNDR_FLAG_REF_ALLOC);
14611 NDR_CHECK(ndr_pull_srvsvc_NetConnInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
14612 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
14613 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14614 NDR_PULL_ALLOC(ndr, r->out.totalentries);
14616 _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
14617 NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
14618 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
14619 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
14620 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
14621 if (_ptr_resume_handle) {
14622 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
14623 } else {
14624 r->out.resume_handle = NULL;
14626 if (r->out.resume_handle) {
14627 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
14628 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
14629 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
14630 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
14632 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
14634 return NDR_ERR_SUCCESS;
14637 _PUBLIC_ void ndr_print_srvsvc_NetConnEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetConnEnum *r)
14639 ndr_print_struct(ndr, name, "srvsvc_NetConnEnum");
14640 ndr->depth++;
14641 if (flags & NDR_SET_VALUES) {
14642 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14644 if (flags & NDR_IN) {
14645 ndr_print_struct(ndr, "in", "srvsvc_NetConnEnum");
14646 ndr->depth++;
14647 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
14648 ndr->depth++;
14649 if (r->in.server_unc) {
14650 ndr_print_string(ndr, "server_unc", r->in.server_unc);
14652 ndr->depth--;
14653 ndr_print_ptr(ndr, "path", r->in.path);
14654 ndr->depth++;
14655 if (r->in.path) {
14656 ndr_print_string(ndr, "path", r->in.path);
14658 ndr->depth--;
14659 ndr_print_ptr(ndr, "info_ctr", r->in.info_ctr);
14660 ndr->depth++;
14661 ndr_print_srvsvc_NetConnInfoCtr(ndr, "info_ctr", r->in.info_ctr);
14662 ndr->depth--;
14663 ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
14664 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
14665 ndr->depth++;
14666 if (r->in.resume_handle) {
14667 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
14669 ndr->depth--;
14670 ndr->depth--;
14672 if (flags & NDR_OUT) {
14673 ndr_print_struct(ndr, "out", "srvsvc_NetConnEnum");
14674 ndr->depth++;
14675 ndr_print_ptr(ndr, "info_ctr", r->out.info_ctr);
14676 ndr->depth++;
14677 ndr_print_srvsvc_NetConnInfoCtr(ndr, "info_ctr", r->out.info_ctr);
14678 ndr->depth--;
14679 ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
14680 ndr->depth++;
14681 ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
14682 ndr->depth--;
14683 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
14684 ndr->depth++;
14685 if (r->out.resume_handle) {
14686 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
14688 ndr->depth--;
14689 ndr_print_WERROR(ndr, "result", r->out.result);
14690 ndr->depth--;
14692 ndr->depth--;
14695 static enum ndr_err_code ndr_push_srvsvc_NetFileEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetFileEnum *r)
14697 if (flags & NDR_IN) {
14698 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
14699 if (r->in.server_unc) {
14700 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14701 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14702 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14703 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));
14705 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.path));
14706 if (r->in.path) {
14707 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
14708 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14709 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
14710 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path, ndr_charset_length(r->in.path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
14712 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.user));
14713 if (r->in.user) {
14714 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
14715 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14716 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
14717 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.user, ndr_charset_length(r->in.user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
14719 if (r->in.info_ctr == NULL) {
14720 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14722 NDR_CHECK(ndr_push_srvsvc_NetFileInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
14723 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
14724 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
14725 if (r->in.resume_handle) {
14726 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
14729 if (flags & NDR_OUT) {
14730 if (r->out.info_ctr == NULL) {
14731 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14733 NDR_CHECK(ndr_push_srvsvc_NetFileInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
14734 if (r->out.totalentries == NULL) {
14735 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14737 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
14738 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
14739 if (r->out.resume_handle) {
14740 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
14742 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
14744 return NDR_ERR_SUCCESS;
14747 static enum ndr_err_code ndr_pull_srvsvc_NetFileEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetFileEnum *r)
14749 uint32_t _ptr_server_unc;
14750 uint32_t _ptr_path;
14751 uint32_t _ptr_user;
14752 uint32_t _ptr_resume_handle;
14753 TALLOC_CTX *_mem_save_server_unc_0;
14754 TALLOC_CTX *_mem_save_path_0;
14755 TALLOC_CTX *_mem_save_user_0;
14756 TALLOC_CTX *_mem_save_info_ctr_0;
14757 TALLOC_CTX *_mem_save_totalentries_0;
14758 TALLOC_CTX *_mem_save_resume_handle_0;
14759 if (flags & NDR_IN) {
14760 ZERO_STRUCT(r->out);
14762 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
14763 if (_ptr_server_unc) {
14764 NDR_PULL_ALLOC(ndr, r->in.server_unc);
14765 } else {
14766 r->in.server_unc = NULL;
14768 if (r->in.server_unc) {
14769 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
14770 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
14771 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
14772 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
14773 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
14774 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
14776 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
14777 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
14778 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
14780 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
14781 if (_ptr_path) {
14782 NDR_PULL_ALLOC(ndr, r->in.path);
14783 } else {
14784 r->in.path = NULL;
14786 if (r->in.path) {
14787 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
14788 NDR_PULL_SET_MEM_CTX(ndr, r->in.path, 0);
14789 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path));
14790 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path));
14791 if (ndr_get_array_length(ndr, &r->in.path) > ndr_get_array_size(ndr, &r->in.path)) {
14792 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.path), ndr_get_array_length(ndr, &r->in.path));
14794 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t)));
14795 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t), CH_UTF16));
14796 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
14798 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
14799 if (_ptr_user) {
14800 NDR_PULL_ALLOC(ndr, r->in.user);
14801 } else {
14802 r->in.user = NULL;
14804 if (r->in.user) {
14805 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
14806 NDR_PULL_SET_MEM_CTX(ndr, r->in.user, 0);
14807 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.user));
14808 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.user));
14809 if (ndr_get_array_length(ndr, &r->in.user) > ndr_get_array_size(ndr, &r->in.user)) {
14810 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.user), ndr_get_array_length(ndr, &r->in.user));
14812 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.user), sizeof(uint16_t)));
14813 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.user, ndr_get_array_length(ndr, &r->in.user), sizeof(uint16_t), CH_UTF16));
14814 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
14816 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14817 NDR_PULL_ALLOC(ndr, r->in.info_ctr);
14819 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
14820 NDR_PULL_SET_MEM_CTX(ndr, r->in.info_ctr, LIBNDR_FLAG_REF_ALLOC);
14821 NDR_CHECK(ndr_pull_srvsvc_NetFileInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
14822 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
14823 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
14824 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
14825 if (_ptr_resume_handle) {
14826 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
14827 } else {
14828 r->in.resume_handle = NULL;
14830 if (r->in.resume_handle) {
14831 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
14832 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
14833 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
14834 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
14836 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
14837 *r->out.info_ctr = *r->in.info_ctr;
14838 NDR_PULL_ALLOC(ndr, r->out.totalentries);
14839 ZERO_STRUCTP(r->out.totalentries);
14841 if (flags & NDR_OUT) {
14842 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14843 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
14845 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
14846 NDR_PULL_SET_MEM_CTX(ndr, r->out.info_ctr, LIBNDR_FLAG_REF_ALLOC);
14847 NDR_CHECK(ndr_pull_srvsvc_NetFileInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
14848 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
14849 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14850 NDR_PULL_ALLOC(ndr, r->out.totalentries);
14852 _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
14853 NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
14854 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
14855 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
14856 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
14857 if (_ptr_resume_handle) {
14858 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
14859 } else {
14860 r->out.resume_handle = NULL;
14862 if (r->out.resume_handle) {
14863 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
14864 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
14865 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
14866 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
14868 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
14870 return NDR_ERR_SUCCESS;
14873 _PUBLIC_ void ndr_print_srvsvc_NetFileEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetFileEnum *r)
14875 ndr_print_struct(ndr, name, "srvsvc_NetFileEnum");
14876 ndr->depth++;
14877 if (flags & NDR_SET_VALUES) {
14878 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
14880 if (flags & NDR_IN) {
14881 ndr_print_struct(ndr, "in", "srvsvc_NetFileEnum");
14882 ndr->depth++;
14883 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
14884 ndr->depth++;
14885 if (r->in.server_unc) {
14886 ndr_print_string(ndr, "server_unc", r->in.server_unc);
14888 ndr->depth--;
14889 ndr_print_ptr(ndr, "path", r->in.path);
14890 ndr->depth++;
14891 if (r->in.path) {
14892 ndr_print_string(ndr, "path", r->in.path);
14894 ndr->depth--;
14895 ndr_print_ptr(ndr, "user", r->in.user);
14896 ndr->depth++;
14897 if (r->in.user) {
14898 ndr_print_string(ndr, "user", r->in.user);
14900 ndr->depth--;
14901 ndr_print_ptr(ndr, "info_ctr", r->in.info_ctr);
14902 ndr->depth++;
14903 ndr_print_srvsvc_NetFileInfoCtr(ndr, "info_ctr", r->in.info_ctr);
14904 ndr->depth--;
14905 ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
14906 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
14907 ndr->depth++;
14908 if (r->in.resume_handle) {
14909 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
14911 ndr->depth--;
14912 ndr->depth--;
14914 if (flags & NDR_OUT) {
14915 ndr_print_struct(ndr, "out", "srvsvc_NetFileEnum");
14916 ndr->depth++;
14917 ndr_print_ptr(ndr, "info_ctr", r->out.info_ctr);
14918 ndr->depth++;
14919 ndr_print_srvsvc_NetFileInfoCtr(ndr, "info_ctr", r->out.info_ctr);
14920 ndr->depth--;
14921 ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
14922 ndr->depth++;
14923 ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
14924 ndr->depth--;
14925 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
14926 ndr->depth++;
14927 if (r->out.resume_handle) {
14928 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
14930 ndr->depth--;
14931 ndr_print_WERROR(ndr, "result", r->out.result);
14932 ndr->depth--;
14934 ndr->depth--;
14937 static enum ndr_err_code ndr_push_srvsvc_NetFileGetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetFileGetInfo *r)
14939 if (flags & NDR_IN) {
14940 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
14941 if (r->in.server_unc) {
14942 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14943 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
14944 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
14945 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));
14947 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.fid));
14948 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
14950 if (flags & NDR_OUT) {
14951 if (r->out.info == NULL) {
14952 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
14954 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
14955 NDR_CHECK(ndr_push_srvsvc_NetFileInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
14956 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
14958 return NDR_ERR_SUCCESS;
14961 static enum ndr_err_code ndr_pull_srvsvc_NetFileGetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetFileGetInfo *r)
14963 uint32_t _ptr_server_unc;
14964 TALLOC_CTX *_mem_save_server_unc_0;
14965 TALLOC_CTX *_mem_save_info_0;
14966 if (flags & NDR_IN) {
14967 ZERO_STRUCT(r->out);
14969 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
14970 if (_ptr_server_unc) {
14971 NDR_PULL_ALLOC(ndr, r->in.server_unc);
14972 } else {
14973 r->in.server_unc = NULL;
14975 if (r->in.server_unc) {
14976 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
14977 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
14978 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
14979 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
14980 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
14981 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
14983 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
14984 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
14985 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
14987 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.fid));
14988 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
14989 NDR_PULL_ALLOC(ndr, r->out.info);
14990 ZERO_STRUCTP(r->out.info);
14992 if (flags & NDR_OUT) {
14993 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
14994 NDR_PULL_ALLOC(ndr, r->out.info);
14996 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
14997 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
14998 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
14999 NDR_CHECK(ndr_pull_srvsvc_NetFileInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
15000 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
15001 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15003 return NDR_ERR_SUCCESS;
15006 _PUBLIC_ void ndr_print_srvsvc_NetFileGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetFileGetInfo *r)
15008 ndr_print_struct(ndr, name, "srvsvc_NetFileGetInfo");
15009 ndr->depth++;
15010 if (flags & NDR_SET_VALUES) {
15011 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15013 if (flags & NDR_IN) {
15014 ndr_print_struct(ndr, "in", "srvsvc_NetFileGetInfo");
15015 ndr->depth++;
15016 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
15017 ndr->depth++;
15018 if (r->in.server_unc) {
15019 ndr_print_string(ndr, "server_unc", r->in.server_unc);
15021 ndr->depth--;
15022 ndr_print_uint32(ndr, "fid", r->in.fid);
15023 ndr_print_uint32(ndr, "level", r->in.level);
15024 ndr->depth--;
15026 if (flags & NDR_OUT) {
15027 ndr_print_struct(ndr, "out", "srvsvc_NetFileGetInfo");
15028 ndr->depth++;
15029 ndr_print_ptr(ndr, "info", r->out.info);
15030 ndr->depth++;
15031 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
15032 ndr_print_srvsvc_NetFileInfo(ndr, "info", r->out.info);
15033 ndr->depth--;
15034 ndr_print_WERROR(ndr, "result", r->out.result);
15035 ndr->depth--;
15037 ndr->depth--;
15040 static enum ndr_err_code ndr_push_srvsvc_NetFileClose(struct ndr_push *ndr, int flags, const struct srvsvc_NetFileClose *r)
15042 if (flags & NDR_IN) {
15043 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
15044 if (r->in.server_unc) {
15045 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15046 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15047 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15048 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));
15050 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.fid));
15052 if (flags & NDR_OUT) {
15053 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15055 return NDR_ERR_SUCCESS;
15058 static enum ndr_err_code ndr_pull_srvsvc_NetFileClose(struct ndr_pull *ndr, int flags, struct srvsvc_NetFileClose *r)
15060 uint32_t _ptr_server_unc;
15061 TALLOC_CTX *_mem_save_server_unc_0;
15062 if (flags & NDR_IN) {
15063 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
15064 if (_ptr_server_unc) {
15065 NDR_PULL_ALLOC(ndr, r->in.server_unc);
15066 } else {
15067 r->in.server_unc = NULL;
15069 if (r->in.server_unc) {
15070 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
15071 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
15072 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
15073 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
15074 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
15075 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
15077 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
15078 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
15079 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
15081 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.fid));
15083 if (flags & NDR_OUT) {
15084 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15086 return NDR_ERR_SUCCESS;
15089 _PUBLIC_ void ndr_print_srvsvc_NetFileClose(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetFileClose *r)
15091 ndr_print_struct(ndr, name, "srvsvc_NetFileClose");
15092 ndr->depth++;
15093 if (flags & NDR_SET_VALUES) {
15094 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15096 if (flags & NDR_IN) {
15097 ndr_print_struct(ndr, "in", "srvsvc_NetFileClose");
15098 ndr->depth++;
15099 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
15100 ndr->depth++;
15101 if (r->in.server_unc) {
15102 ndr_print_string(ndr, "server_unc", r->in.server_unc);
15104 ndr->depth--;
15105 ndr_print_uint32(ndr, "fid", r->in.fid);
15106 ndr->depth--;
15108 if (flags & NDR_OUT) {
15109 ndr_print_struct(ndr, "out", "srvsvc_NetFileClose");
15110 ndr->depth++;
15111 ndr_print_WERROR(ndr, "result", r->out.result);
15112 ndr->depth--;
15114 ndr->depth--;
15117 static enum ndr_err_code ndr_push_srvsvc_NetSessEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetSessEnum *r)
15119 if (flags & NDR_IN) {
15120 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
15121 if (r->in.server_unc) {
15122 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15123 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15124 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15125 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));
15127 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.client));
15128 if (r->in.client) {
15129 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.client, CH_UTF16)));
15130 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15131 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.client, CH_UTF16)));
15132 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.client, ndr_charset_length(r->in.client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
15134 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.user));
15135 if (r->in.user) {
15136 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
15137 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15138 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
15139 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.user, ndr_charset_length(r->in.user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
15141 if (r->in.info_ctr == NULL) {
15142 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15144 NDR_CHECK(ndr_push_srvsvc_NetSessInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
15145 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
15146 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
15147 if (r->in.resume_handle) {
15148 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
15151 if (flags & NDR_OUT) {
15152 if (r->out.info_ctr == NULL) {
15153 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15155 NDR_CHECK(ndr_push_srvsvc_NetSessInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
15156 if (r->out.totalentries == NULL) {
15157 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15159 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
15160 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
15161 if (r->out.resume_handle) {
15162 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
15164 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15166 return NDR_ERR_SUCCESS;
15169 static enum ndr_err_code ndr_pull_srvsvc_NetSessEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetSessEnum *r)
15171 uint32_t _ptr_server_unc;
15172 uint32_t _ptr_client;
15173 uint32_t _ptr_user;
15174 uint32_t _ptr_resume_handle;
15175 TALLOC_CTX *_mem_save_server_unc_0;
15176 TALLOC_CTX *_mem_save_client_0;
15177 TALLOC_CTX *_mem_save_user_0;
15178 TALLOC_CTX *_mem_save_info_ctr_0;
15179 TALLOC_CTX *_mem_save_totalentries_0;
15180 TALLOC_CTX *_mem_save_resume_handle_0;
15181 if (flags & NDR_IN) {
15182 ZERO_STRUCT(r->out);
15184 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
15185 if (_ptr_server_unc) {
15186 NDR_PULL_ALLOC(ndr, r->in.server_unc);
15187 } else {
15188 r->in.server_unc = NULL;
15190 if (r->in.server_unc) {
15191 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
15192 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
15193 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
15194 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
15195 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
15196 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
15198 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
15199 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
15200 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
15202 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
15203 if (_ptr_client) {
15204 NDR_PULL_ALLOC(ndr, r->in.client);
15205 } else {
15206 r->in.client = NULL;
15208 if (r->in.client) {
15209 _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
15210 NDR_PULL_SET_MEM_CTX(ndr, r->in.client, 0);
15211 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.client));
15212 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.client));
15213 if (ndr_get_array_length(ndr, &r->in.client) > ndr_get_array_size(ndr, &r->in.client)) {
15214 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.client), ndr_get_array_length(ndr, &r->in.client));
15216 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.client), sizeof(uint16_t)));
15217 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.client, ndr_get_array_length(ndr, &r->in.client), sizeof(uint16_t), CH_UTF16));
15218 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
15220 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
15221 if (_ptr_user) {
15222 NDR_PULL_ALLOC(ndr, r->in.user);
15223 } else {
15224 r->in.user = NULL;
15226 if (r->in.user) {
15227 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
15228 NDR_PULL_SET_MEM_CTX(ndr, r->in.user, 0);
15229 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.user));
15230 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.user));
15231 if (ndr_get_array_length(ndr, &r->in.user) > ndr_get_array_size(ndr, &r->in.user)) {
15232 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.user), ndr_get_array_length(ndr, &r->in.user));
15234 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.user), sizeof(uint16_t)));
15235 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.user, ndr_get_array_length(ndr, &r->in.user), sizeof(uint16_t), CH_UTF16));
15236 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
15238 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15239 NDR_PULL_ALLOC(ndr, r->in.info_ctr);
15241 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
15242 NDR_PULL_SET_MEM_CTX(ndr, r->in.info_ctr, LIBNDR_FLAG_REF_ALLOC);
15243 NDR_CHECK(ndr_pull_srvsvc_NetSessInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
15244 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
15245 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
15246 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
15247 if (_ptr_resume_handle) {
15248 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
15249 } else {
15250 r->in.resume_handle = NULL;
15252 if (r->in.resume_handle) {
15253 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
15254 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
15255 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
15256 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
15258 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
15259 *r->out.info_ctr = *r->in.info_ctr;
15260 NDR_PULL_ALLOC(ndr, r->out.totalentries);
15261 ZERO_STRUCTP(r->out.totalentries);
15263 if (flags & NDR_OUT) {
15264 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15265 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
15267 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
15268 NDR_PULL_SET_MEM_CTX(ndr, r->out.info_ctr, LIBNDR_FLAG_REF_ALLOC);
15269 NDR_CHECK(ndr_pull_srvsvc_NetSessInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
15270 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
15271 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15272 NDR_PULL_ALLOC(ndr, r->out.totalentries);
15274 _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
15275 NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
15276 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
15277 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
15278 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
15279 if (_ptr_resume_handle) {
15280 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
15281 } else {
15282 r->out.resume_handle = NULL;
15284 if (r->out.resume_handle) {
15285 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
15286 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
15287 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
15288 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
15290 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15292 return NDR_ERR_SUCCESS;
15295 _PUBLIC_ void ndr_print_srvsvc_NetSessEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSessEnum *r)
15297 ndr_print_struct(ndr, name, "srvsvc_NetSessEnum");
15298 ndr->depth++;
15299 if (flags & NDR_SET_VALUES) {
15300 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15302 if (flags & NDR_IN) {
15303 ndr_print_struct(ndr, "in", "srvsvc_NetSessEnum");
15304 ndr->depth++;
15305 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
15306 ndr->depth++;
15307 if (r->in.server_unc) {
15308 ndr_print_string(ndr, "server_unc", r->in.server_unc);
15310 ndr->depth--;
15311 ndr_print_ptr(ndr, "client", r->in.client);
15312 ndr->depth++;
15313 if (r->in.client) {
15314 ndr_print_string(ndr, "client", r->in.client);
15316 ndr->depth--;
15317 ndr_print_ptr(ndr, "user", r->in.user);
15318 ndr->depth++;
15319 if (r->in.user) {
15320 ndr_print_string(ndr, "user", r->in.user);
15322 ndr->depth--;
15323 ndr_print_ptr(ndr, "info_ctr", r->in.info_ctr);
15324 ndr->depth++;
15325 ndr_print_srvsvc_NetSessInfoCtr(ndr, "info_ctr", r->in.info_ctr);
15326 ndr->depth--;
15327 ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
15328 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
15329 ndr->depth++;
15330 if (r->in.resume_handle) {
15331 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
15333 ndr->depth--;
15334 ndr->depth--;
15336 if (flags & NDR_OUT) {
15337 ndr_print_struct(ndr, "out", "srvsvc_NetSessEnum");
15338 ndr->depth++;
15339 ndr_print_ptr(ndr, "info_ctr", r->out.info_ctr);
15340 ndr->depth++;
15341 ndr_print_srvsvc_NetSessInfoCtr(ndr, "info_ctr", r->out.info_ctr);
15342 ndr->depth--;
15343 ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
15344 ndr->depth++;
15345 ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
15346 ndr->depth--;
15347 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
15348 ndr->depth++;
15349 if (r->out.resume_handle) {
15350 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
15352 ndr->depth--;
15353 ndr_print_WERROR(ndr, "result", r->out.result);
15354 ndr->depth--;
15356 ndr->depth--;
15359 static enum ndr_err_code ndr_push_srvsvc_NetSessDel(struct ndr_push *ndr, int flags, const struct srvsvc_NetSessDel *r)
15361 if (flags & NDR_IN) {
15362 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
15363 if (r->in.server_unc) {
15364 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15365 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15366 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15367 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));
15369 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.client));
15370 if (r->in.client) {
15371 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.client, CH_UTF16)));
15372 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15373 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.client, CH_UTF16)));
15374 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.client, ndr_charset_length(r->in.client, CH_UTF16), sizeof(uint16_t), CH_UTF16));
15376 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.user));
15377 if (r->in.user) {
15378 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
15379 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15380 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.user, CH_UTF16)));
15381 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.user, ndr_charset_length(r->in.user, CH_UTF16), sizeof(uint16_t), CH_UTF16));
15384 if (flags & NDR_OUT) {
15385 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15387 return NDR_ERR_SUCCESS;
15390 static enum ndr_err_code ndr_pull_srvsvc_NetSessDel(struct ndr_pull *ndr, int flags, struct srvsvc_NetSessDel *r)
15392 uint32_t _ptr_server_unc;
15393 uint32_t _ptr_client;
15394 uint32_t _ptr_user;
15395 TALLOC_CTX *_mem_save_server_unc_0;
15396 TALLOC_CTX *_mem_save_client_0;
15397 TALLOC_CTX *_mem_save_user_0;
15398 if (flags & NDR_IN) {
15399 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
15400 if (_ptr_server_unc) {
15401 NDR_PULL_ALLOC(ndr, r->in.server_unc);
15402 } else {
15403 r->in.server_unc = NULL;
15405 if (r->in.server_unc) {
15406 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
15407 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
15408 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
15409 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
15410 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
15411 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
15413 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
15414 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
15415 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
15417 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_client));
15418 if (_ptr_client) {
15419 NDR_PULL_ALLOC(ndr, r->in.client);
15420 } else {
15421 r->in.client = NULL;
15423 if (r->in.client) {
15424 _mem_save_client_0 = NDR_PULL_GET_MEM_CTX(ndr);
15425 NDR_PULL_SET_MEM_CTX(ndr, r->in.client, 0);
15426 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.client));
15427 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.client));
15428 if (ndr_get_array_length(ndr, &r->in.client) > ndr_get_array_size(ndr, &r->in.client)) {
15429 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.client), ndr_get_array_length(ndr, &r->in.client));
15431 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.client), sizeof(uint16_t)));
15432 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.client, ndr_get_array_length(ndr, &r->in.client), sizeof(uint16_t), CH_UTF16));
15433 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_client_0, 0);
15435 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_user));
15436 if (_ptr_user) {
15437 NDR_PULL_ALLOC(ndr, r->in.user);
15438 } else {
15439 r->in.user = NULL;
15441 if (r->in.user) {
15442 _mem_save_user_0 = NDR_PULL_GET_MEM_CTX(ndr);
15443 NDR_PULL_SET_MEM_CTX(ndr, r->in.user, 0);
15444 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.user));
15445 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.user));
15446 if (ndr_get_array_length(ndr, &r->in.user) > ndr_get_array_size(ndr, &r->in.user)) {
15447 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.user), ndr_get_array_length(ndr, &r->in.user));
15449 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.user), sizeof(uint16_t)));
15450 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.user, ndr_get_array_length(ndr, &r->in.user), sizeof(uint16_t), CH_UTF16));
15451 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_user_0, 0);
15454 if (flags & NDR_OUT) {
15455 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15457 return NDR_ERR_SUCCESS;
15460 _PUBLIC_ void ndr_print_srvsvc_NetSessDel(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSessDel *r)
15462 ndr_print_struct(ndr, name, "srvsvc_NetSessDel");
15463 ndr->depth++;
15464 if (flags & NDR_SET_VALUES) {
15465 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15467 if (flags & NDR_IN) {
15468 ndr_print_struct(ndr, "in", "srvsvc_NetSessDel");
15469 ndr->depth++;
15470 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
15471 ndr->depth++;
15472 if (r->in.server_unc) {
15473 ndr_print_string(ndr, "server_unc", r->in.server_unc);
15475 ndr->depth--;
15476 ndr_print_ptr(ndr, "client", r->in.client);
15477 ndr->depth++;
15478 if (r->in.client) {
15479 ndr_print_string(ndr, "client", r->in.client);
15481 ndr->depth--;
15482 ndr_print_ptr(ndr, "user", r->in.user);
15483 ndr->depth++;
15484 if (r->in.user) {
15485 ndr_print_string(ndr, "user", r->in.user);
15487 ndr->depth--;
15488 ndr->depth--;
15490 if (flags & NDR_OUT) {
15491 ndr_print_struct(ndr, "out", "srvsvc_NetSessDel");
15492 ndr->depth++;
15493 ndr_print_WERROR(ndr, "result", r->out.result);
15494 ndr->depth--;
15496 ndr->depth--;
15499 static enum ndr_err_code ndr_push_srvsvc_NetShareAdd(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareAdd *r)
15501 if (flags & NDR_IN) {
15502 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
15503 if (r->in.server_unc) {
15504 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15505 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15506 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15507 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));
15509 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
15510 if (r->in.info == NULL) {
15511 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15513 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
15514 NDR_CHECK(ndr_push_srvsvc_NetShareInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
15515 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.parm_error));
15516 if (r->in.parm_error) {
15517 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.parm_error));
15520 if (flags & NDR_OUT) {
15521 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.parm_error));
15522 if (r->out.parm_error) {
15523 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.parm_error));
15525 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15527 return NDR_ERR_SUCCESS;
15530 static enum ndr_err_code ndr_pull_srvsvc_NetShareAdd(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareAdd *r)
15532 uint32_t _ptr_server_unc;
15533 uint32_t _ptr_parm_error;
15534 TALLOC_CTX *_mem_save_server_unc_0;
15535 TALLOC_CTX *_mem_save_info_0;
15536 TALLOC_CTX *_mem_save_parm_error_0;
15537 if (flags & NDR_IN) {
15538 ZERO_STRUCT(r->out);
15540 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
15541 if (_ptr_server_unc) {
15542 NDR_PULL_ALLOC(ndr, r->in.server_unc);
15543 } else {
15544 r->in.server_unc = NULL;
15546 if (r->in.server_unc) {
15547 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
15548 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
15549 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
15550 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
15551 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
15552 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
15554 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
15555 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
15556 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
15558 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
15559 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15560 NDR_PULL_ALLOC(ndr, r->in.info);
15562 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
15563 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
15564 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
15565 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
15566 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
15567 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
15568 if (_ptr_parm_error) {
15569 NDR_PULL_ALLOC(ndr, r->in.parm_error);
15570 } else {
15571 r->in.parm_error = NULL;
15573 if (r->in.parm_error) {
15574 _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
15575 NDR_PULL_SET_MEM_CTX(ndr, r->in.parm_error, 0);
15576 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.parm_error));
15577 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
15580 if (flags & NDR_OUT) {
15581 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
15582 if (_ptr_parm_error) {
15583 NDR_PULL_ALLOC(ndr, r->out.parm_error);
15584 } else {
15585 r->out.parm_error = NULL;
15587 if (r->out.parm_error) {
15588 _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
15589 NDR_PULL_SET_MEM_CTX(ndr, r->out.parm_error, 0);
15590 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.parm_error));
15591 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
15593 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15595 return NDR_ERR_SUCCESS;
15598 _PUBLIC_ void ndr_print_srvsvc_NetShareAdd(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareAdd *r)
15600 ndr_print_struct(ndr, name, "srvsvc_NetShareAdd");
15601 ndr->depth++;
15602 if (flags & NDR_SET_VALUES) {
15603 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15605 if (flags & NDR_IN) {
15606 ndr_print_struct(ndr, "in", "srvsvc_NetShareAdd");
15607 ndr->depth++;
15608 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
15609 ndr->depth++;
15610 if (r->in.server_unc) {
15611 ndr_print_string(ndr, "server_unc", r->in.server_unc);
15613 ndr->depth--;
15614 ndr_print_uint32(ndr, "level", r->in.level);
15615 ndr_print_ptr(ndr, "info", r->in.info);
15616 ndr->depth++;
15617 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
15618 ndr_print_srvsvc_NetShareInfo(ndr, "info", r->in.info);
15619 ndr->depth--;
15620 ndr_print_ptr(ndr, "parm_error", r->in.parm_error);
15621 ndr->depth++;
15622 if (r->in.parm_error) {
15623 ndr_print_uint32(ndr, "parm_error", *r->in.parm_error);
15625 ndr->depth--;
15626 ndr->depth--;
15628 if (flags & NDR_OUT) {
15629 ndr_print_struct(ndr, "out", "srvsvc_NetShareAdd");
15630 ndr->depth++;
15631 ndr_print_ptr(ndr, "parm_error", r->out.parm_error);
15632 ndr->depth++;
15633 if (r->out.parm_error) {
15634 ndr_print_uint32(ndr, "parm_error", *r->out.parm_error);
15636 ndr->depth--;
15637 ndr_print_WERROR(ndr, "result", r->out.result);
15638 ndr->depth--;
15640 ndr->depth--;
15643 static enum ndr_err_code ndr_push_srvsvc_NetShareEnumAll(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareEnumAll *r)
15645 if (flags & NDR_IN) {
15646 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
15647 if (r->in.server_unc) {
15648 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15649 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15650 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15651 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));
15653 if (r->in.info_ctr == NULL) {
15654 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15656 NDR_CHECK(ndr_push_srvsvc_NetShareInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
15657 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
15658 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
15659 if (r->in.resume_handle) {
15660 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
15663 if (flags & NDR_OUT) {
15664 if (r->out.info_ctr == NULL) {
15665 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15667 NDR_CHECK(ndr_push_srvsvc_NetShareInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
15668 if (r->out.totalentries == NULL) {
15669 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15671 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
15672 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
15673 if (r->out.resume_handle) {
15674 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
15676 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15678 return NDR_ERR_SUCCESS;
15681 static enum ndr_err_code ndr_pull_srvsvc_NetShareEnumAll(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareEnumAll *r)
15683 uint32_t _ptr_server_unc;
15684 uint32_t _ptr_resume_handle;
15685 TALLOC_CTX *_mem_save_server_unc_0;
15686 TALLOC_CTX *_mem_save_info_ctr_0;
15687 TALLOC_CTX *_mem_save_totalentries_0;
15688 TALLOC_CTX *_mem_save_resume_handle_0;
15689 if (flags & NDR_IN) {
15690 ZERO_STRUCT(r->out);
15692 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
15693 if (_ptr_server_unc) {
15694 NDR_PULL_ALLOC(ndr, r->in.server_unc);
15695 } else {
15696 r->in.server_unc = NULL;
15698 if (r->in.server_unc) {
15699 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
15700 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
15701 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
15702 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
15703 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
15704 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
15706 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
15707 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
15708 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
15710 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15711 NDR_PULL_ALLOC(ndr, r->in.info_ctr);
15713 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
15714 NDR_PULL_SET_MEM_CTX(ndr, r->in.info_ctr, LIBNDR_FLAG_REF_ALLOC);
15715 NDR_CHECK(ndr_pull_srvsvc_NetShareInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
15716 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
15717 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
15718 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
15719 if (_ptr_resume_handle) {
15720 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
15721 } else {
15722 r->in.resume_handle = NULL;
15724 if (r->in.resume_handle) {
15725 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
15726 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
15727 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
15728 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
15730 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
15731 *r->out.info_ctr = *r->in.info_ctr;
15732 NDR_PULL_ALLOC(ndr, r->out.totalentries);
15733 ZERO_STRUCTP(r->out.totalentries);
15735 if (flags & NDR_OUT) {
15736 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15737 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
15739 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
15740 NDR_PULL_SET_MEM_CTX(ndr, r->out.info_ctr, LIBNDR_FLAG_REF_ALLOC);
15741 NDR_CHECK(ndr_pull_srvsvc_NetShareInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
15742 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
15743 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15744 NDR_PULL_ALLOC(ndr, r->out.totalentries);
15746 _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
15747 NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
15748 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
15749 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
15750 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
15751 if (_ptr_resume_handle) {
15752 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
15753 } else {
15754 r->out.resume_handle = NULL;
15756 if (r->out.resume_handle) {
15757 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
15758 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
15759 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
15760 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
15762 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15764 return NDR_ERR_SUCCESS;
15767 _PUBLIC_ void ndr_print_srvsvc_NetShareEnumAll(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareEnumAll *r)
15769 ndr_print_struct(ndr, name, "srvsvc_NetShareEnumAll");
15770 ndr->depth++;
15771 if (flags & NDR_SET_VALUES) {
15772 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15774 if (flags & NDR_IN) {
15775 ndr_print_struct(ndr, "in", "srvsvc_NetShareEnumAll");
15776 ndr->depth++;
15777 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
15778 ndr->depth++;
15779 if (r->in.server_unc) {
15780 ndr_print_string(ndr, "server_unc", r->in.server_unc);
15782 ndr->depth--;
15783 ndr_print_ptr(ndr, "info_ctr", r->in.info_ctr);
15784 ndr->depth++;
15785 ndr_print_srvsvc_NetShareInfoCtr(ndr, "info_ctr", r->in.info_ctr);
15786 ndr->depth--;
15787 ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
15788 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
15789 ndr->depth++;
15790 if (r->in.resume_handle) {
15791 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
15793 ndr->depth--;
15794 ndr->depth--;
15796 if (flags & NDR_OUT) {
15797 ndr_print_struct(ndr, "out", "srvsvc_NetShareEnumAll");
15798 ndr->depth++;
15799 ndr_print_ptr(ndr, "info_ctr", r->out.info_ctr);
15800 ndr->depth++;
15801 ndr_print_srvsvc_NetShareInfoCtr(ndr, "info_ctr", r->out.info_ctr);
15802 ndr->depth--;
15803 ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
15804 ndr->depth++;
15805 ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
15806 ndr->depth--;
15807 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
15808 ndr->depth++;
15809 if (r->out.resume_handle) {
15810 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
15812 ndr->depth--;
15813 ndr_print_WERROR(ndr, "result", r->out.result);
15814 ndr->depth--;
15816 ndr->depth--;
15819 static enum ndr_err_code ndr_push_srvsvc_NetShareGetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareGetInfo *r)
15821 if (flags & NDR_IN) {
15822 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
15823 if (r->in.server_unc) {
15824 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15825 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15826 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15827 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));
15829 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
15830 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15831 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
15832 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));
15833 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
15835 if (flags & NDR_OUT) {
15836 if (r->out.info == NULL) {
15837 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15839 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
15840 NDR_CHECK(ndr_push_srvsvc_NetShareInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
15841 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15843 return NDR_ERR_SUCCESS;
15846 static enum ndr_err_code ndr_pull_srvsvc_NetShareGetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareGetInfo *r)
15848 uint32_t _ptr_server_unc;
15849 TALLOC_CTX *_mem_save_server_unc_0;
15850 TALLOC_CTX *_mem_save_info_0;
15851 if (flags & NDR_IN) {
15852 ZERO_STRUCT(r->out);
15854 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
15855 if (_ptr_server_unc) {
15856 NDR_PULL_ALLOC(ndr, r->in.server_unc);
15857 } else {
15858 r->in.server_unc = NULL;
15860 if (r->in.server_unc) {
15861 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
15862 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
15863 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
15864 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
15865 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
15866 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
15868 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
15869 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
15870 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
15872 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share_name));
15873 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share_name));
15874 if (ndr_get_array_length(ndr, &r->in.share_name) > ndr_get_array_size(ndr, &r->in.share_name)) {
15875 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.share_name), ndr_get_array_length(ndr, &r->in.share_name));
15877 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.share_name), sizeof(uint16_t)));
15878 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share_name, ndr_get_array_length(ndr, &r->in.share_name), sizeof(uint16_t), CH_UTF16));
15879 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
15880 NDR_PULL_ALLOC(ndr, r->out.info);
15881 ZERO_STRUCTP(r->out.info);
15883 if (flags & NDR_OUT) {
15884 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
15885 NDR_PULL_ALLOC(ndr, r->out.info);
15887 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
15888 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
15889 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
15890 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
15891 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
15892 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
15894 return NDR_ERR_SUCCESS;
15897 _PUBLIC_ void ndr_print_srvsvc_NetShareGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareGetInfo *r)
15899 ndr_print_struct(ndr, name, "srvsvc_NetShareGetInfo");
15900 ndr->depth++;
15901 if (flags & NDR_SET_VALUES) {
15902 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
15904 if (flags & NDR_IN) {
15905 ndr_print_struct(ndr, "in", "srvsvc_NetShareGetInfo");
15906 ndr->depth++;
15907 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
15908 ndr->depth++;
15909 if (r->in.server_unc) {
15910 ndr_print_string(ndr, "server_unc", r->in.server_unc);
15912 ndr->depth--;
15913 ndr_print_string(ndr, "share_name", r->in.share_name);
15914 ndr_print_uint32(ndr, "level", r->in.level);
15915 ndr->depth--;
15917 if (flags & NDR_OUT) {
15918 ndr_print_struct(ndr, "out", "srvsvc_NetShareGetInfo");
15919 ndr->depth++;
15920 ndr_print_ptr(ndr, "info", r->out.info);
15921 ndr->depth++;
15922 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
15923 ndr_print_srvsvc_NetShareInfo(ndr, "info", r->out.info);
15924 ndr->depth--;
15925 ndr_print_WERROR(ndr, "result", r->out.result);
15926 ndr->depth--;
15928 ndr->depth--;
15931 static enum ndr_err_code ndr_push_srvsvc_NetShareSetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareSetInfo *r)
15933 if (flags & NDR_IN) {
15934 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
15935 if (r->in.server_unc) {
15936 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15937 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15938 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
15939 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));
15941 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
15942 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
15943 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
15944 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));
15945 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
15946 if (r->in.info == NULL) {
15947 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
15949 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
15950 NDR_CHECK(ndr_push_srvsvc_NetShareInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
15951 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.parm_error));
15952 if (r->in.parm_error) {
15953 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.parm_error));
15956 if (flags & NDR_OUT) {
15957 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.parm_error));
15958 if (r->out.parm_error) {
15959 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.parm_error));
15961 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
15963 return NDR_ERR_SUCCESS;
15966 static enum ndr_err_code ndr_pull_srvsvc_NetShareSetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareSetInfo *r)
15968 uint32_t _ptr_server_unc;
15969 uint32_t _ptr_parm_error;
15970 TALLOC_CTX *_mem_save_server_unc_0;
15971 TALLOC_CTX *_mem_save_info_0;
15972 TALLOC_CTX *_mem_save_parm_error_0;
15973 if (flags & NDR_IN) {
15974 ZERO_STRUCT(r->out);
15976 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
15977 if (_ptr_server_unc) {
15978 NDR_PULL_ALLOC(ndr, r->in.server_unc);
15979 } else {
15980 r->in.server_unc = NULL;
15982 if (r->in.server_unc) {
15983 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
15984 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
15985 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
15986 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
15987 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
15988 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
15990 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
15991 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
15992 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
15994 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share_name));
15995 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share_name));
15996 if (ndr_get_array_length(ndr, &r->in.share_name) > ndr_get_array_size(ndr, &r->in.share_name)) {
15997 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.share_name), ndr_get_array_length(ndr, &r->in.share_name));
15999 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.share_name), sizeof(uint16_t)));
16000 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share_name, ndr_get_array_length(ndr, &r->in.share_name), sizeof(uint16_t), CH_UTF16));
16001 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
16002 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16003 NDR_PULL_ALLOC(ndr, r->in.info);
16005 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
16006 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
16007 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
16008 NDR_CHECK(ndr_pull_srvsvc_NetShareInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
16009 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
16010 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
16011 if (_ptr_parm_error) {
16012 NDR_PULL_ALLOC(ndr, r->in.parm_error);
16013 } else {
16014 r->in.parm_error = NULL;
16016 if (r->in.parm_error) {
16017 _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
16018 NDR_PULL_SET_MEM_CTX(ndr, r->in.parm_error, 0);
16019 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.parm_error));
16020 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
16023 if (flags & NDR_OUT) {
16024 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
16025 if (_ptr_parm_error) {
16026 NDR_PULL_ALLOC(ndr, r->out.parm_error);
16027 } else {
16028 r->out.parm_error = NULL;
16030 if (r->out.parm_error) {
16031 _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
16032 NDR_PULL_SET_MEM_CTX(ndr, r->out.parm_error, 0);
16033 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.parm_error));
16034 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
16036 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16038 return NDR_ERR_SUCCESS;
16041 _PUBLIC_ void ndr_print_srvsvc_NetShareSetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareSetInfo *r)
16043 ndr_print_struct(ndr, name, "srvsvc_NetShareSetInfo");
16044 ndr->depth++;
16045 if (flags & NDR_SET_VALUES) {
16046 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16048 if (flags & NDR_IN) {
16049 ndr_print_struct(ndr, "in", "srvsvc_NetShareSetInfo");
16050 ndr->depth++;
16051 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
16052 ndr->depth++;
16053 if (r->in.server_unc) {
16054 ndr_print_string(ndr, "server_unc", r->in.server_unc);
16056 ndr->depth--;
16057 ndr_print_string(ndr, "share_name", r->in.share_name);
16058 ndr_print_uint32(ndr, "level", r->in.level);
16059 ndr_print_ptr(ndr, "info", r->in.info);
16060 ndr->depth++;
16061 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
16062 ndr_print_srvsvc_NetShareInfo(ndr, "info", r->in.info);
16063 ndr->depth--;
16064 ndr_print_ptr(ndr, "parm_error", r->in.parm_error);
16065 ndr->depth++;
16066 if (r->in.parm_error) {
16067 ndr_print_uint32(ndr, "parm_error", *r->in.parm_error);
16069 ndr->depth--;
16070 ndr->depth--;
16072 if (flags & NDR_OUT) {
16073 ndr_print_struct(ndr, "out", "srvsvc_NetShareSetInfo");
16074 ndr->depth++;
16075 ndr_print_ptr(ndr, "parm_error", r->out.parm_error);
16076 ndr->depth++;
16077 if (r->out.parm_error) {
16078 ndr_print_uint32(ndr, "parm_error", *r->out.parm_error);
16080 ndr->depth--;
16081 ndr_print_WERROR(ndr, "result", r->out.result);
16082 ndr->depth--;
16084 ndr->depth--;
16087 static enum ndr_err_code ndr_push_srvsvc_NetShareDel(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareDel *r)
16089 if (flags & NDR_IN) {
16090 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
16091 if (r->in.server_unc) {
16092 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16093 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
16094 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16095 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));
16097 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
16098 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
16099 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
16100 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));
16101 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.reserved));
16103 if (flags & NDR_OUT) {
16104 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16106 return NDR_ERR_SUCCESS;
16109 static enum ndr_err_code ndr_pull_srvsvc_NetShareDel(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareDel *r)
16111 uint32_t _ptr_server_unc;
16112 TALLOC_CTX *_mem_save_server_unc_0;
16113 if (flags & NDR_IN) {
16114 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
16115 if (_ptr_server_unc) {
16116 NDR_PULL_ALLOC(ndr, r->in.server_unc);
16117 } else {
16118 r->in.server_unc = NULL;
16120 if (r->in.server_unc) {
16121 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
16122 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
16123 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
16124 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
16125 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
16126 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
16128 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
16129 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
16130 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
16132 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share_name));
16133 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share_name));
16134 if (ndr_get_array_length(ndr, &r->in.share_name) > ndr_get_array_size(ndr, &r->in.share_name)) {
16135 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.share_name), ndr_get_array_length(ndr, &r->in.share_name));
16137 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.share_name), sizeof(uint16_t)));
16138 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share_name, ndr_get_array_length(ndr, &r->in.share_name), sizeof(uint16_t), CH_UTF16));
16139 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.reserved));
16141 if (flags & NDR_OUT) {
16142 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16144 return NDR_ERR_SUCCESS;
16147 _PUBLIC_ void ndr_print_srvsvc_NetShareDel(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareDel *r)
16149 ndr_print_struct(ndr, name, "srvsvc_NetShareDel");
16150 ndr->depth++;
16151 if (flags & NDR_SET_VALUES) {
16152 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16154 if (flags & NDR_IN) {
16155 ndr_print_struct(ndr, "in", "srvsvc_NetShareDel");
16156 ndr->depth++;
16157 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
16158 ndr->depth++;
16159 if (r->in.server_unc) {
16160 ndr_print_string(ndr, "server_unc", r->in.server_unc);
16162 ndr->depth--;
16163 ndr_print_string(ndr, "share_name", r->in.share_name);
16164 ndr_print_uint32(ndr, "reserved", r->in.reserved);
16165 ndr->depth--;
16167 if (flags & NDR_OUT) {
16168 ndr_print_struct(ndr, "out", "srvsvc_NetShareDel");
16169 ndr->depth++;
16170 ndr_print_WERROR(ndr, "result", r->out.result);
16171 ndr->depth--;
16173 ndr->depth--;
16176 static enum ndr_err_code ndr_push_srvsvc_NetShareDelSticky(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareDelSticky *r)
16178 if (flags & NDR_IN) {
16179 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
16180 if (r->in.server_unc) {
16181 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16182 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
16183 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16184 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));
16186 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
16187 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
16188 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.share_name, CH_UTF16)));
16189 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));
16190 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.reserved));
16192 if (flags & NDR_OUT) {
16193 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16195 return NDR_ERR_SUCCESS;
16198 static enum ndr_err_code ndr_pull_srvsvc_NetShareDelSticky(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareDelSticky *r)
16200 uint32_t _ptr_server_unc;
16201 TALLOC_CTX *_mem_save_server_unc_0;
16202 if (flags & NDR_IN) {
16203 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
16204 if (_ptr_server_unc) {
16205 NDR_PULL_ALLOC(ndr, r->in.server_unc);
16206 } else {
16207 r->in.server_unc = NULL;
16209 if (r->in.server_unc) {
16210 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
16211 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
16212 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
16213 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
16214 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
16215 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
16217 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
16218 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
16219 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
16221 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share_name));
16222 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share_name));
16223 if (ndr_get_array_length(ndr, &r->in.share_name) > ndr_get_array_size(ndr, &r->in.share_name)) {
16224 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.share_name), ndr_get_array_length(ndr, &r->in.share_name));
16226 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.share_name), sizeof(uint16_t)));
16227 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share_name, ndr_get_array_length(ndr, &r->in.share_name), sizeof(uint16_t), CH_UTF16));
16228 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.reserved));
16230 if (flags & NDR_OUT) {
16231 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16233 return NDR_ERR_SUCCESS;
16236 _PUBLIC_ void ndr_print_srvsvc_NetShareDelSticky(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareDelSticky *r)
16238 ndr_print_struct(ndr, name, "srvsvc_NetShareDelSticky");
16239 ndr->depth++;
16240 if (flags & NDR_SET_VALUES) {
16241 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16243 if (flags & NDR_IN) {
16244 ndr_print_struct(ndr, "in", "srvsvc_NetShareDelSticky");
16245 ndr->depth++;
16246 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
16247 ndr->depth++;
16248 if (r->in.server_unc) {
16249 ndr_print_string(ndr, "server_unc", r->in.server_unc);
16251 ndr->depth--;
16252 ndr_print_string(ndr, "share_name", r->in.share_name);
16253 ndr_print_uint32(ndr, "reserved", r->in.reserved);
16254 ndr->depth--;
16256 if (flags & NDR_OUT) {
16257 ndr_print_struct(ndr, "out", "srvsvc_NetShareDelSticky");
16258 ndr->depth++;
16259 ndr_print_WERROR(ndr, "result", r->out.result);
16260 ndr->depth--;
16262 ndr->depth--;
16265 static enum ndr_err_code ndr_push_srvsvc_NetShareCheck(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareCheck *r)
16267 if (flags & NDR_IN) {
16268 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
16269 if (r->in.server_unc) {
16270 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16271 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
16272 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16273 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));
16275 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.device_name, CH_UTF16)));
16276 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
16277 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.device_name, CH_UTF16)));
16278 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));
16280 if (flags & NDR_OUT) {
16281 if (r->out.type == NULL) {
16282 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16284 NDR_CHECK(ndr_push_srvsvc_ShareType(ndr, NDR_SCALARS, *r->out.type));
16285 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16287 return NDR_ERR_SUCCESS;
16290 static enum ndr_err_code ndr_pull_srvsvc_NetShareCheck(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareCheck *r)
16292 uint32_t _ptr_server_unc;
16293 TALLOC_CTX *_mem_save_server_unc_0;
16294 TALLOC_CTX *_mem_save_type_0;
16295 if (flags & NDR_IN) {
16296 ZERO_STRUCT(r->out);
16298 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
16299 if (_ptr_server_unc) {
16300 NDR_PULL_ALLOC(ndr, r->in.server_unc);
16301 } else {
16302 r->in.server_unc = NULL;
16304 if (r->in.server_unc) {
16305 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
16306 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
16307 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
16308 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
16309 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
16310 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
16312 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
16313 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
16314 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
16316 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.device_name));
16317 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.device_name));
16318 if (ndr_get_array_length(ndr, &r->in.device_name) > ndr_get_array_size(ndr, &r->in.device_name)) {
16319 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.device_name), ndr_get_array_length(ndr, &r->in.device_name));
16321 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.device_name), sizeof(uint16_t)));
16322 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.device_name, ndr_get_array_length(ndr, &r->in.device_name), sizeof(uint16_t), CH_UTF16));
16323 NDR_PULL_ALLOC(ndr, r->out.type);
16324 ZERO_STRUCTP(r->out.type);
16326 if (flags & NDR_OUT) {
16327 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16328 NDR_PULL_ALLOC(ndr, r->out.type);
16330 _mem_save_type_0 = NDR_PULL_GET_MEM_CTX(ndr);
16331 NDR_PULL_SET_MEM_CTX(ndr, r->out.type, LIBNDR_FLAG_REF_ALLOC);
16332 NDR_CHECK(ndr_pull_srvsvc_ShareType(ndr, NDR_SCALARS, r->out.type));
16333 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_type_0, LIBNDR_FLAG_REF_ALLOC);
16334 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16336 return NDR_ERR_SUCCESS;
16339 _PUBLIC_ void ndr_print_srvsvc_NetShareCheck(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareCheck *r)
16341 ndr_print_struct(ndr, name, "srvsvc_NetShareCheck");
16342 ndr->depth++;
16343 if (flags & NDR_SET_VALUES) {
16344 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16346 if (flags & NDR_IN) {
16347 ndr_print_struct(ndr, "in", "srvsvc_NetShareCheck");
16348 ndr->depth++;
16349 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
16350 ndr->depth++;
16351 if (r->in.server_unc) {
16352 ndr_print_string(ndr, "server_unc", r->in.server_unc);
16354 ndr->depth--;
16355 ndr_print_string(ndr, "device_name", r->in.device_name);
16356 ndr->depth--;
16358 if (flags & NDR_OUT) {
16359 ndr_print_struct(ndr, "out", "srvsvc_NetShareCheck");
16360 ndr->depth++;
16361 ndr_print_ptr(ndr, "type", r->out.type);
16362 ndr->depth++;
16363 ndr_print_srvsvc_ShareType(ndr, "type", *r->out.type);
16364 ndr->depth--;
16365 ndr_print_WERROR(ndr, "result", r->out.result);
16366 ndr->depth--;
16368 ndr->depth--;
16371 static enum ndr_err_code ndr_push_srvsvc_NetSrvGetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetSrvGetInfo *r)
16373 if (flags & NDR_IN) {
16374 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
16375 if (r->in.server_unc) {
16376 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16377 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
16378 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16379 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));
16381 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
16383 if (flags & NDR_OUT) {
16384 if (r->out.info == NULL) {
16385 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16387 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
16388 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
16389 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16391 return NDR_ERR_SUCCESS;
16394 static enum ndr_err_code ndr_pull_srvsvc_NetSrvGetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetSrvGetInfo *r)
16396 uint32_t _ptr_server_unc;
16397 TALLOC_CTX *_mem_save_server_unc_0;
16398 TALLOC_CTX *_mem_save_info_0;
16399 if (flags & NDR_IN) {
16400 ZERO_STRUCT(r->out);
16402 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
16403 if (_ptr_server_unc) {
16404 NDR_PULL_ALLOC(ndr, r->in.server_unc);
16405 } else {
16406 r->in.server_unc = NULL;
16408 if (r->in.server_unc) {
16409 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
16410 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
16411 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
16412 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
16413 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
16414 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
16416 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
16417 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
16418 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
16420 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
16421 NDR_PULL_ALLOC(ndr, r->out.info);
16422 ZERO_STRUCTP(r->out.info);
16424 if (flags & NDR_OUT) {
16425 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16426 NDR_PULL_ALLOC(ndr, r->out.info);
16428 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
16429 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
16430 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
16431 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
16432 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
16433 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16435 return NDR_ERR_SUCCESS;
16438 _PUBLIC_ void ndr_print_srvsvc_NetSrvGetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSrvGetInfo *r)
16440 ndr_print_struct(ndr, name, "srvsvc_NetSrvGetInfo");
16441 ndr->depth++;
16442 if (flags & NDR_SET_VALUES) {
16443 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16445 if (flags & NDR_IN) {
16446 ndr_print_struct(ndr, "in", "srvsvc_NetSrvGetInfo");
16447 ndr->depth++;
16448 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
16449 ndr->depth++;
16450 if (r->in.server_unc) {
16451 ndr_print_string(ndr, "server_unc", r->in.server_unc);
16453 ndr->depth--;
16454 ndr_print_uint32(ndr, "level", r->in.level);
16455 ndr->depth--;
16457 if (flags & NDR_OUT) {
16458 ndr_print_struct(ndr, "out", "srvsvc_NetSrvGetInfo");
16459 ndr->depth++;
16460 ndr_print_ptr(ndr, "info", r->out.info);
16461 ndr->depth++;
16462 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
16463 ndr_print_srvsvc_NetSrvInfo(ndr, "info", r->out.info);
16464 ndr->depth--;
16465 ndr_print_WERROR(ndr, "result", r->out.result);
16466 ndr->depth--;
16468 ndr->depth--;
16471 static enum ndr_err_code ndr_push_srvsvc_NetSrvSetInfo(struct ndr_push *ndr, int flags, const struct srvsvc_NetSrvSetInfo *r)
16473 if (flags & NDR_IN) {
16474 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
16475 if (r->in.server_unc) {
16476 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16477 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
16478 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16479 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));
16481 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
16482 if (r->in.info == NULL) {
16483 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16485 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
16486 NDR_CHECK(ndr_push_srvsvc_NetSrvInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
16487 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.parm_error));
16488 if (r->in.parm_error) {
16489 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.parm_error));
16492 if (flags & NDR_OUT) {
16493 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.parm_error));
16494 if (r->out.parm_error) {
16495 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.parm_error));
16497 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16499 return NDR_ERR_SUCCESS;
16502 static enum ndr_err_code ndr_pull_srvsvc_NetSrvSetInfo(struct ndr_pull *ndr, int flags, struct srvsvc_NetSrvSetInfo *r)
16504 uint32_t _ptr_server_unc;
16505 uint32_t _ptr_parm_error;
16506 TALLOC_CTX *_mem_save_server_unc_0;
16507 TALLOC_CTX *_mem_save_info_0;
16508 TALLOC_CTX *_mem_save_parm_error_0;
16509 if (flags & NDR_IN) {
16510 ZERO_STRUCT(r->out);
16512 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
16513 if (_ptr_server_unc) {
16514 NDR_PULL_ALLOC(ndr, r->in.server_unc);
16515 } else {
16516 r->in.server_unc = NULL;
16518 if (r->in.server_unc) {
16519 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
16520 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
16521 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
16522 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
16523 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
16524 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
16526 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
16527 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
16528 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
16530 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
16531 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16532 NDR_PULL_ALLOC(ndr, r->in.info);
16534 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
16535 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
16536 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
16537 NDR_CHECK(ndr_pull_srvsvc_NetSrvInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
16538 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
16539 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
16540 if (_ptr_parm_error) {
16541 NDR_PULL_ALLOC(ndr, r->in.parm_error);
16542 } else {
16543 r->in.parm_error = NULL;
16545 if (r->in.parm_error) {
16546 _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
16547 NDR_PULL_SET_MEM_CTX(ndr, r->in.parm_error, 0);
16548 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.parm_error));
16549 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
16552 if (flags & NDR_OUT) {
16553 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_parm_error));
16554 if (_ptr_parm_error) {
16555 NDR_PULL_ALLOC(ndr, r->out.parm_error);
16556 } else {
16557 r->out.parm_error = NULL;
16559 if (r->out.parm_error) {
16560 _mem_save_parm_error_0 = NDR_PULL_GET_MEM_CTX(ndr);
16561 NDR_PULL_SET_MEM_CTX(ndr, r->out.parm_error, 0);
16562 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.parm_error));
16563 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_parm_error_0, 0);
16565 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16567 return NDR_ERR_SUCCESS;
16570 _PUBLIC_ void ndr_print_srvsvc_NetSrvSetInfo(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSrvSetInfo *r)
16572 ndr_print_struct(ndr, name, "srvsvc_NetSrvSetInfo");
16573 ndr->depth++;
16574 if (flags & NDR_SET_VALUES) {
16575 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16577 if (flags & NDR_IN) {
16578 ndr_print_struct(ndr, "in", "srvsvc_NetSrvSetInfo");
16579 ndr->depth++;
16580 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
16581 ndr->depth++;
16582 if (r->in.server_unc) {
16583 ndr_print_string(ndr, "server_unc", r->in.server_unc);
16585 ndr->depth--;
16586 ndr_print_uint32(ndr, "level", r->in.level);
16587 ndr_print_ptr(ndr, "info", r->in.info);
16588 ndr->depth++;
16589 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
16590 ndr_print_srvsvc_NetSrvInfo(ndr, "info", r->in.info);
16591 ndr->depth--;
16592 ndr_print_ptr(ndr, "parm_error", r->in.parm_error);
16593 ndr->depth++;
16594 if (r->in.parm_error) {
16595 ndr_print_uint32(ndr, "parm_error", *r->in.parm_error);
16597 ndr->depth--;
16598 ndr->depth--;
16600 if (flags & NDR_OUT) {
16601 ndr_print_struct(ndr, "out", "srvsvc_NetSrvSetInfo");
16602 ndr->depth++;
16603 ndr_print_ptr(ndr, "parm_error", r->out.parm_error);
16604 ndr->depth++;
16605 if (r->out.parm_error) {
16606 ndr_print_uint32(ndr, "parm_error", *r->out.parm_error);
16608 ndr->depth--;
16609 ndr_print_WERROR(ndr, "result", r->out.result);
16610 ndr->depth--;
16612 ndr->depth--;
16615 static enum ndr_err_code ndr_push_srvsvc_NetDiskEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetDiskEnum *r)
16617 if (flags & NDR_IN) {
16618 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
16619 if (r->in.server_unc) {
16620 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16621 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
16622 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16623 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));
16625 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
16626 if (r->in.info == NULL) {
16627 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16629 NDR_CHECK(ndr_push_srvsvc_NetDiskInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
16630 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.maxlen));
16631 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
16632 if (r->in.resume_handle) {
16633 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
16636 if (flags & NDR_OUT) {
16637 if (r->out.info == NULL) {
16638 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16640 NDR_CHECK(ndr_push_srvsvc_NetDiskInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
16641 if (r->out.totalentries == NULL) {
16642 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16644 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
16645 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
16646 if (r->out.resume_handle) {
16647 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
16649 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16651 return NDR_ERR_SUCCESS;
16654 static enum ndr_err_code ndr_pull_srvsvc_NetDiskEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetDiskEnum *r)
16656 uint32_t _ptr_server_unc;
16657 uint32_t _ptr_resume_handle;
16658 TALLOC_CTX *_mem_save_server_unc_0;
16659 TALLOC_CTX *_mem_save_info_0;
16660 TALLOC_CTX *_mem_save_totalentries_0;
16661 TALLOC_CTX *_mem_save_resume_handle_0;
16662 if (flags & NDR_IN) {
16663 ZERO_STRUCT(r->out);
16665 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
16666 if (_ptr_server_unc) {
16667 NDR_PULL_ALLOC(ndr, r->in.server_unc);
16668 } else {
16669 r->in.server_unc = NULL;
16671 if (r->in.server_unc) {
16672 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
16673 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
16674 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
16675 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
16676 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
16677 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
16679 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
16680 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
16681 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
16683 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
16684 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16685 NDR_PULL_ALLOC(ndr, r->in.info);
16687 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
16688 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
16689 NDR_CHECK(ndr_pull_srvsvc_NetDiskInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
16690 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
16691 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.maxlen));
16692 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
16693 if (_ptr_resume_handle) {
16694 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
16695 } else {
16696 r->in.resume_handle = NULL;
16698 if (r->in.resume_handle) {
16699 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
16700 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
16701 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
16702 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
16704 NDR_PULL_ALLOC(ndr, r->out.info);
16705 *r->out.info = *r->in.info;
16706 NDR_PULL_ALLOC(ndr, r->out.totalentries);
16707 ZERO_STRUCTP(r->out.totalentries);
16709 if (flags & NDR_OUT) {
16710 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16711 NDR_PULL_ALLOC(ndr, r->out.info);
16713 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
16714 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
16715 NDR_CHECK(ndr_pull_srvsvc_NetDiskInfo(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
16716 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
16717 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16718 NDR_PULL_ALLOC(ndr, r->out.totalentries);
16720 _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
16721 NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
16722 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
16723 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
16724 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
16725 if (_ptr_resume_handle) {
16726 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
16727 } else {
16728 r->out.resume_handle = NULL;
16730 if (r->out.resume_handle) {
16731 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
16732 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
16733 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
16734 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
16736 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16738 return NDR_ERR_SUCCESS;
16741 _PUBLIC_ void ndr_print_srvsvc_NetDiskEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetDiskEnum *r)
16743 ndr_print_struct(ndr, name, "srvsvc_NetDiskEnum");
16744 ndr->depth++;
16745 if (flags & NDR_SET_VALUES) {
16746 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16748 if (flags & NDR_IN) {
16749 ndr_print_struct(ndr, "in", "srvsvc_NetDiskEnum");
16750 ndr->depth++;
16751 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
16752 ndr->depth++;
16753 if (r->in.server_unc) {
16754 ndr_print_string(ndr, "server_unc", r->in.server_unc);
16756 ndr->depth--;
16757 ndr_print_uint32(ndr, "level", r->in.level);
16758 ndr_print_ptr(ndr, "info", r->in.info);
16759 ndr->depth++;
16760 ndr_print_srvsvc_NetDiskInfo(ndr, "info", r->in.info);
16761 ndr->depth--;
16762 ndr_print_uint32(ndr, "maxlen", r->in.maxlen);
16763 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
16764 ndr->depth++;
16765 if (r->in.resume_handle) {
16766 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
16768 ndr->depth--;
16769 ndr->depth--;
16771 if (flags & NDR_OUT) {
16772 ndr_print_struct(ndr, "out", "srvsvc_NetDiskEnum");
16773 ndr->depth++;
16774 ndr_print_ptr(ndr, "info", r->out.info);
16775 ndr->depth++;
16776 ndr_print_srvsvc_NetDiskInfo(ndr, "info", r->out.info);
16777 ndr->depth--;
16778 ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
16779 ndr->depth++;
16780 ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
16781 ndr->depth--;
16782 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
16783 ndr->depth++;
16784 if (r->out.resume_handle) {
16785 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
16787 ndr->depth--;
16788 ndr_print_WERROR(ndr, "result", r->out.result);
16789 ndr->depth--;
16791 ndr->depth--;
16794 static enum ndr_err_code ndr_push_srvsvc_NetServerStatisticsGet(struct ndr_push *ndr, int flags, const struct srvsvc_NetServerStatisticsGet *r)
16796 if (flags & NDR_IN) {
16797 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
16798 if (r->in.server_unc) {
16799 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16800 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
16801 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16802 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));
16804 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.service));
16805 if (r->in.service) {
16806 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service, CH_UTF16)));
16807 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
16808 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.service, CH_UTF16)));
16809 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.service, ndr_charset_length(r->in.service, CH_UTF16), sizeof(uint16_t), CH_UTF16));
16811 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
16812 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.options));
16814 if (flags & NDR_OUT) {
16815 if (r->out.stats == NULL) {
16816 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
16818 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.stats));
16819 if (*r->out.stats) {
16820 NDR_CHECK(ndr_push_srvsvc_Statistics(ndr, NDR_SCALARS, *r->out.stats));
16822 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16824 return NDR_ERR_SUCCESS;
16827 static enum ndr_err_code ndr_pull_srvsvc_NetServerStatisticsGet(struct ndr_pull *ndr, int flags, struct srvsvc_NetServerStatisticsGet *r)
16829 uint32_t _ptr_server_unc;
16830 uint32_t _ptr_service;
16831 uint32_t _ptr_stats;
16832 TALLOC_CTX *_mem_save_server_unc_0;
16833 TALLOC_CTX *_mem_save_service_0;
16834 TALLOC_CTX *_mem_save_stats_0;
16835 TALLOC_CTX *_mem_save_stats_1;
16836 if (flags & NDR_IN) {
16837 ZERO_STRUCT(r->out);
16839 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
16840 if (_ptr_server_unc) {
16841 NDR_PULL_ALLOC(ndr, r->in.server_unc);
16842 } else {
16843 r->in.server_unc = NULL;
16845 if (r->in.server_unc) {
16846 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
16847 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
16848 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
16849 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
16850 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
16851 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
16853 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
16854 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
16855 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
16857 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_service));
16858 if (_ptr_service) {
16859 NDR_PULL_ALLOC(ndr, r->in.service);
16860 } else {
16861 r->in.service = NULL;
16863 if (r->in.service) {
16864 _mem_save_service_0 = NDR_PULL_GET_MEM_CTX(ndr);
16865 NDR_PULL_SET_MEM_CTX(ndr, r->in.service, 0);
16866 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.service));
16867 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.service));
16868 if (ndr_get_array_length(ndr, &r->in.service) > ndr_get_array_size(ndr, &r->in.service)) {
16869 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.service), ndr_get_array_length(ndr, &r->in.service));
16871 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.service), sizeof(uint16_t)));
16872 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.service, ndr_get_array_length(ndr, &r->in.service), sizeof(uint16_t), CH_UTF16));
16873 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_service_0, 0);
16875 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
16876 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.options));
16877 NDR_PULL_ALLOC(ndr, r->out.stats);
16878 ZERO_STRUCTP(r->out.stats);
16880 if (flags & NDR_OUT) {
16881 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
16882 NDR_PULL_ALLOC(ndr, r->out.stats);
16884 _mem_save_stats_0 = NDR_PULL_GET_MEM_CTX(ndr);
16885 NDR_PULL_SET_MEM_CTX(ndr, r->out.stats, LIBNDR_FLAG_REF_ALLOC);
16886 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_stats));
16887 if (_ptr_stats) {
16888 NDR_PULL_ALLOC(ndr, *r->out.stats);
16889 } else {
16890 *r->out.stats = NULL;
16892 if (*r->out.stats) {
16893 _mem_save_stats_1 = NDR_PULL_GET_MEM_CTX(ndr);
16894 NDR_PULL_SET_MEM_CTX(ndr, *r->out.stats, 0);
16895 NDR_CHECK(ndr_pull_srvsvc_Statistics(ndr, NDR_SCALARS, *r->out.stats));
16896 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stats_1, 0);
16898 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stats_0, LIBNDR_FLAG_REF_ALLOC);
16899 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16901 return NDR_ERR_SUCCESS;
16904 _PUBLIC_ void ndr_print_srvsvc_NetServerStatisticsGet(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetServerStatisticsGet *r)
16906 ndr_print_struct(ndr, name, "srvsvc_NetServerStatisticsGet");
16907 ndr->depth++;
16908 if (flags & NDR_SET_VALUES) {
16909 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
16911 if (flags & NDR_IN) {
16912 ndr_print_struct(ndr, "in", "srvsvc_NetServerStatisticsGet");
16913 ndr->depth++;
16914 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
16915 ndr->depth++;
16916 if (r->in.server_unc) {
16917 ndr_print_string(ndr, "server_unc", r->in.server_unc);
16919 ndr->depth--;
16920 ndr_print_ptr(ndr, "service", r->in.service);
16921 ndr->depth++;
16922 if (r->in.service) {
16923 ndr_print_string(ndr, "service", r->in.service);
16925 ndr->depth--;
16926 ndr_print_uint32(ndr, "level", r->in.level);
16927 ndr_print_uint32(ndr, "options", r->in.options);
16928 ndr->depth--;
16930 if (flags & NDR_OUT) {
16931 ndr_print_struct(ndr, "out", "srvsvc_NetServerStatisticsGet");
16932 ndr->depth++;
16933 ndr_print_ptr(ndr, "stats", r->out.stats);
16934 ndr->depth++;
16935 ndr_print_ptr(ndr, "stats", *r->out.stats);
16936 ndr->depth++;
16937 if (*r->out.stats) {
16938 ndr_print_srvsvc_Statistics(ndr, "stats", *r->out.stats);
16940 ndr->depth--;
16941 ndr->depth--;
16942 ndr_print_WERROR(ndr, "result", r->out.result);
16943 ndr->depth--;
16945 ndr->depth--;
16948 static enum ndr_err_code ndr_push_srvsvc_NetTransportAdd(struct ndr_push *ndr, int flags, const struct srvsvc_NetTransportAdd *r)
16950 if (flags & NDR_IN) {
16951 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
16952 if (r->in.server_unc) {
16953 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16954 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
16955 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
16956 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));
16958 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
16959 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.info, r->in.level));
16960 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
16962 if (flags & NDR_OUT) {
16963 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
16965 return NDR_ERR_SUCCESS;
16968 static enum ndr_err_code ndr_pull_srvsvc_NetTransportAdd(struct ndr_pull *ndr, int flags, struct srvsvc_NetTransportAdd *r)
16970 uint32_t _ptr_server_unc;
16971 TALLOC_CTX *_mem_save_server_unc_0;
16972 if (flags & NDR_IN) {
16973 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
16974 if (_ptr_server_unc) {
16975 NDR_PULL_ALLOC(ndr, r->in.server_unc);
16976 } else {
16977 r->in.server_unc = NULL;
16979 if (r->in.server_unc) {
16980 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
16981 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
16982 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
16983 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
16984 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
16985 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
16987 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
16988 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
16989 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
16991 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
16992 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.info, r->in.level));
16993 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
16995 if (flags & NDR_OUT) {
16996 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
16998 return NDR_ERR_SUCCESS;
17001 _PUBLIC_ void ndr_print_srvsvc_NetTransportAdd(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetTransportAdd *r)
17003 ndr_print_struct(ndr, name, "srvsvc_NetTransportAdd");
17004 ndr->depth++;
17005 if (flags & NDR_SET_VALUES) {
17006 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17008 if (flags & NDR_IN) {
17009 ndr_print_struct(ndr, "in", "srvsvc_NetTransportAdd");
17010 ndr->depth++;
17011 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
17012 ndr->depth++;
17013 if (r->in.server_unc) {
17014 ndr_print_string(ndr, "server_unc", r->in.server_unc);
17016 ndr->depth--;
17017 ndr_print_uint32(ndr, "level", r->in.level);
17018 ndr_print_set_switch_value(ndr, &r->in.info, r->in.level);
17019 ndr_print_srvsvc_NetTransportInfo(ndr, "info", &r->in.info);
17020 ndr->depth--;
17022 if (flags & NDR_OUT) {
17023 ndr_print_struct(ndr, "out", "srvsvc_NetTransportAdd");
17024 ndr->depth++;
17025 ndr_print_WERROR(ndr, "result", r->out.result);
17026 ndr->depth--;
17028 ndr->depth--;
17031 static enum ndr_err_code ndr_push_srvsvc_NetTransportEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetTransportEnum *r)
17033 if (flags & NDR_IN) {
17034 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
17035 if (r->in.server_unc) {
17036 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17037 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17038 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17039 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));
17041 if (r->in.transports == NULL) {
17042 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17044 NDR_CHECK(ndr_push_srvsvc_NetTransportInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.transports));
17045 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
17046 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
17047 if (r->in.resume_handle) {
17048 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
17051 if (flags & NDR_OUT) {
17052 if (r->out.transports == NULL) {
17053 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17055 NDR_CHECK(ndr_push_srvsvc_NetTransportInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.transports));
17056 if (r->out.totalentries == NULL) {
17057 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17059 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
17060 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
17061 if (r->out.resume_handle) {
17062 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
17064 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17066 return NDR_ERR_SUCCESS;
17069 static enum ndr_err_code ndr_pull_srvsvc_NetTransportEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetTransportEnum *r)
17071 uint32_t _ptr_server_unc;
17072 uint32_t _ptr_resume_handle;
17073 TALLOC_CTX *_mem_save_server_unc_0;
17074 TALLOC_CTX *_mem_save_transports_0;
17075 TALLOC_CTX *_mem_save_totalentries_0;
17076 TALLOC_CTX *_mem_save_resume_handle_0;
17077 if (flags & NDR_IN) {
17078 ZERO_STRUCT(r->out);
17080 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
17081 if (_ptr_server_unc) {
17082 NDR_PULL_ALLOC(ndr, r->in.server_unc);
17083 } else {
17084 r->in.server_unc = NULL;
17086 if (r->in.server_unc) {
17087 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
17088 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
17089 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
17090 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
17091 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
17092 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
17094 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
17095 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
17096 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
17098 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17099 NDR_PULL_ALLOC(ndr, r->in.transports);
17101 _mem_save_transports_0 = NDR_PULL_GET_MEM_CTX(ndr);
17102 NDR_PULL_SET_MEM_CTX(ndr, r->in.transports, LIBNDR_FLAG_REF_ALLOC);
17103 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.transports));
17104 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_transports_0, LIBNDR_FLAG_REF_ALLOC);
17105 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
17106 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
17107 if (_ptr_resume_handle) {
17108 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
17109 } else {
17110 r->in.resume_handle = NULL;
17112 if (r->in.resume_handle) {
17113 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
17114 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
17115 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
17116 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
17118 NDR_PULL_ALLOC(ndr, r->out.transports);
17119 *r->out.transports = *r->in.transports;
17120 NDR_PULL_ALLOC(ndr, r->out.totalentries);
17121 ZERO_STRUCTP(r->out.totalentries);
17123 if (flags & NDR_OUT) {
17124 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17125 NDR_PULL_ALLOC(ndr, r->out.transports);
17127 _mem_save_transports_0 = NDR_PULL_GET_MEM_CTX(ndr);
17128 NDR_PULL_SET_MEM_CTX(ndr, r->out.transports, LIBNDR_FLAG_REF_ALLOC);
17129 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.transports));
17130 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_transports_0, LIBNDR_FLAG_REF_ALLOC);
17131 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17132 NDR_PULL_ALLOC(ndr, r->out.totalentries);
17134 _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
17135 NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
17136 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
17137 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
17138 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
17139 if (_ptr_resume_handle) {
17140 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
17141 } else {
17142 r->out.resume_handle = NULL;
17144 if (r->out.resume_handle) {
17145 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
17146 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
17147 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
17148 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
17150 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17152 return NDR_ERR_SUCCESS;
17155 _PUBLIC_ void ndr_print_srvsvc_NetTransportEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetTransportEnum *r)
17157 ndr_print_struct(ndr, name, "srvsvc_NetTransportEnum");
17158 ndr->depth++;
17159 if (flags & NDR_SET_VALUES) {
17160 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17162 if (flags & NDR_IN) {
17163 ndr_print_struct(ndr, "in", "srvsvc_NetTransportEnum");
17164 ndr->depth++;
17165 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
17166 ndr->depth++;
17167 if (r->in.server_unc) {
17168 ndr_print_string(ndr, "server_unc", r->in.server_unc);
17170 ndr->depth--;
17171 ndr_print_ptr(ndr, "transports", r->in.transports);
17172 ndr->depth++;
17173 ndr_print_srvsvc_NetTransportInfoCtr(ndr, "transports", r->in.transports);
17174 ndr->depth--;
17175 ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
17176 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
17177 ndr->depth++;
17178 if (r->in.resume_handle) {
17179 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
17181 ndr->depth--;
17182 ndr->depth--;
17184 if (flags & NDR_OUT) {
17185 ndr_print_struct(ndr, "out", "srvsvc_NetTransportEnum");
17186 ndr->depth++;
17187 ndr_print_ptr(ndr, "transports", r->out.transports);
17188 ndr->depth++;
17189 ndr_print_srvsvc_NetTransportInfoCtr(ndr, "transports", r->out.transports);
17190 ndr->depth--;
17191 ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
17192 ndr->depth++;
17193 ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
17194 ndr->depth--;
17195 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
17196 ndr->depth++;
17197 if (r->out.resume_handle) {
17198 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
17200 ndr->depth--;
17201 ndr_print_WERROR(ndr, "result", r->out.result);
17202 ndr->depth--;
17204 ndr->depth--;
17207 static enum ndr_err_code ndr_push_srvsvc_NetTransportDel(struct ndr_push *ndr, int flags, const struct srvsvc_NetTransportDel *r)
17209 if (flags & NDR_IN) {
17210 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
17211 if (r->in.server_unc) {
17212 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17213 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17214 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17215 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));
17217 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
17218 if (r->in.info0 == NULL) {
17219 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17221 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info0));
17223 if (flags & NDR_OUT) {
17224 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17226 return NDR_ERR_SUCCESS;
17229 static enum ndr_err_code ndr_pull_srvsvc_NetTransportDel(struct ndr_pull *ndr, int flags, struct srvsvc_NetTransportDel *r)
17231 uint32_t _ptr_server_unc;
17232 TALLOC_CTX *_mem_save_server_unc_0;
17233 TALLOC_CTX *_mem_save_info0_0;
17234 if (flags & NDR_IN) {
17235 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
17236 if (_ptr_server_unc) {
17237 NDR_PULL_ALLOC(ndr, r->in.server_unc);
17238 } else {
17239 r->in.server_unc = NULL;
17241 if (r->in.server_unc) {
17242 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
17243 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
17244 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
17245 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
17246 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
17247 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
17249 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
17250 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
17251 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
17253 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
17254 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17255 NDR_PULL_ALLOC(ndr, r->in.info0);
17257 _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
17258 NDR_PULL_SET_MEM_CTX(ndr, r->in.info0, LIBNDR_FLAG_REF_ALLOC);
17259 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo0(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info0));
17260 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, LIBNDR_FLAG_REF_ALLOC);
17262 if (flags & NDR_OUT) {
17263 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17265 return NDR_ERR_SUCCESS;
17268 _PUBLIC_ void ndr_print_srvsvc_NetTransportDel(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetTransportDel *r)
17270 ndr_print_struct(ndr, name, "srvsvc_NetTransportDel");
17271 ndr->depth++;
17272 if (flags & NDR_SET_VALUES) {
17273 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17275 if (flags & NDR_IN) {
17276 ndr_print_struct(ndr, "in", "srvsvc_NetTransportDel");
17277 ndr->depth++;
17278 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
17279 ndr->depth++;
17280 if (r->in.server_unc) {
17281 ndr_print_string(ndr, "server_unc", r->in.server_unc);
17283 ndr->depth--;
17284 ndr_print_uint32(ndr, "level", r->in.level);
17285 ndr_print_ptr(ndr, "info0", r->in.info0);
17286 ndr->depth++;
17287 ndr_print_srvsvc_NetTransportInfo0(ndr, "info0", r->in.info0);
17288 ndr->depth--;
17289 ndr->depth--;
17291 if (flags & NDR_OUT) {
17292 ndr_print_struct(ndr, "out", "srvsvc_NetTransportDel");
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_NetRemoteTOD(struct ndr_push *ndr, int flags, const struct srvsvc_NetRemoteTOD *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));
17311 if (flags & NDR_OUT) {
17312 if (r->out.info == NULL) {
17313 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17315 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.info));
17316 if (*r->out.info) {
17317 NDR_CHECK(ndr_push_srvsvc_NetRemoteTODInfo(ndr, NDR_SCALARS, *r->out.info));
17319 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17321 return NDR_ERR_SUCCESS;
17324 static enum ndr_err_code ndr_pull_srvsvc_NetRemoteTOD(struct ndr_pull *ndr, int flags, struct srvsvc_NetRemoteTOD *r)
17326 uint32_t _ptr_server_unc;
17327 uint32_t _ptr_info;
17328 TALLOC_CTX *_mem_save_server_unc_0;
17329 TALLOC_CTX *_mem_save_info_0;
17330 TALLOC_CTX *_mem_save_info_1;
17331 if (flags & NDR_IN) {
17332 ZERO_STRUCT(r->out);
17334 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
17335 if (_ptr_server_unc) {
17336 NDR_PULL_ALLOC(ndr, r->in.server_unc);
17337 } else {
17338 r->in.server_unc = NULL;
17340 if (r->in.server_unc) {
17341 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
17342 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
17343 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
17344 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
17345 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
17346 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
17348 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
17349 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
17350 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
17352 NDR_PULL_ALLOC(ndr, r->out.info);
17353 ZERO_STRUCTP(r->out.info);
17355 if (flags & NDR_OUT) {
17356 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17357 NDR_PULL_ALLOC(ndr, r->out.info);
17359 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
17360 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
17361 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
17362 if (_ptr_info) {
17363 NDR_PULL_ALLOC(ndr, *r->out.info);
17364 } else {
17365 *r->out.info = NULL;
17367 if (*r->out.info) {
17368 _mem_save_info_1 = NDR_PULL_GET_MEM_CTX(ndr);
17369 NDR_PULL_SET_MEM_CTX(ndr, *r->out.info, 0);
17370 NDR_CHECK(ndr_pull_srvsvc_NetRemoteTODInfo(ndr, NDR_SCALARS, *r->out.info));
17371 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_1, 0);
17373 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
17374 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17376 return NDR_ERR_SUCCESS;
17379 _PUBLIC_ void ndr_print_srvsvc_NetRemoteTOD(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetRemoteTOD *r)
17381 ndr_print_struct(ndr, name, "srvsvc_NetRemoteTOD");
17382 ndr->depth++;
17383 if (flags & NDR_SET_VALUES) {
17384 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17386 if (flags & NDR_IN) {
17387 ndr_print_struct(ndr, "in", "srvsvc_NetRemoteTOD");
17388 ndr->depth++;
17389 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
17390 ndr->depth++;
17391 if (r->in.server_unc) {
17392 ndr_print_string(ndr, "server_unc", r->in.server_unc);
17394 ndr->depth--;
17395 ndr->depth--;
17397 if (flags & NDR_OUT) {
17398 ndr_print_struct(ndr, "out", "srvsvc_NetRemoteTOD");
17399 ndr->depth++;
17400 ndr_print_ptr(ndr, "info", r->out.info);
17401 ndr->depth++;
17402 ndr_print_ptr(ndr, "info", *r->out.info);
17403 ndr->depth++;
17404 if (*r->out.info) {
17405 ndr_print_srvsvc_NetRemoteTODInfo(ndr, "info", *r->out.info);
17407 ndr->depth--;
17408 ndr->depth--;
17409 ndr_print_WERROR(ndr, "result", r->out.result);
17410 ndr->depth--;
17412 ndr->depth--;
17415 static enum ndr_err_code ndr_push_srvsvc_NetSetServiceBits(struct ndr_push *ndr, int flags, const struct srvsvc_NetSetServiceBits *r)
17417 if (flags & NDR_IN) {
17418 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
17419 if (r->in.server_unc) {
17420 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17421 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17422 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17423 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));
17425 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.transport));
17426 if (r->in.transport) {
17427 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.transport, CH_UTF16)));
17428 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17429 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.transport, CH_UTF16)));
17430 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.transport, ndr_charset_length(r->in.transport, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17432 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.servicebits));
17433 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.updateimmediately));
17435 if (flags & NDR_OUT) {
17436 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17438 return NDR_ERR_SUCCESS;
17441 static enum ndr_err_code ndr_pull_srvsvc_NetSetServiceBits(struct ndr_pull *ndr, int flags, struct srvsvc_NetSetServiceBits *r)
17443 uint32_t _ptr_server_unc;
17444 uint32_t _ptr_transport;
17445 TALLOC_CTX *_mem_save_server_unc_0;
17446 TALLOC_CTX *_mem_save_transport_0;
17447 if (flags & NDR_IN) {
17448 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
17449 if (_ptr_server_unc) {
17450 NDR_PULL_ALLOC(ndr, r->in.server_unc);
17451 } else {
17452 r->in.server_unc = NULL;
17454 if (r->in.server_unc) {
17455 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
17456 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
17457 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
17458 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
17459 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
17460 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
17462 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
17463 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
17464 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
17466 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_transport));
17467 if (_ptr_transport) {
17468 NDR_PULL_ALLOC(ndr, r->in.transport);
17469 } else {
17470 r->in.transport = NULL;
17472 if (r->in.transport) {
17473 _mem_save_transport_0 = NDR_PULL_GET_MEM_CTX(ndr);
17474 NDR_PULL_SET_MEM_CTX(ndr, r->in.transport, 0);
17475 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.transport));
17476 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.transport));
17477 if (ndr_get_array_length(ndr, &r->in.transport) > ndr_get_array_size(ndr, &r->in.transport)) {
17478 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.transport), ndr_get_array_length(ndr, &r->in.transport));
17480 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.transport), sizeof(uint16_t)));
17481 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.transport, ndr_get_array_length(ndr, &r->in.transport), sizeof(uint16_t), CH_UTF16));
17482 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_transport_0, 0);
17484 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.servicebits));
17485 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.updateimmediately));
17487 if (flags & NDR_OUT) {
17488 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17490 return NDR_ERR_SUCCESS;
17493 _PUBLIC_ void ndr_print_srvsvc_NetSetServiceBits(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSetServiceBits *r)
17495 ndr_print_struct(ndr, name, "srvsvc_NetSetServiceBits");
17496 ndr->depth++;
17497 if (flags & NDR_SET_VALUES) {
17498 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17500 if (flags & NDR_IN) {
17501 ndr_print_struct(ndr, "in", "srvsvc_NetSetServiceBits");
17502 ndr->depth++;
17503 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
17504 ndr->depth++;
17505 if (r->in.server_unc) {
17506 ndr_print_string(ndr, "server_unc", r->in.server_unc);
17508 ndr->depth--;
17509 ndr_print_ptr(ndr, "transport", r->in.transport);
17510 ndr->depth++;
17511 if (r->in.transport) {
17512 ndr_print_string(ndr, "transport", r->in.transport);
17514 ndr->depth--;
17515 ndr_print_uint32(ndr, "servicebits", r->in.servicebits);
17516 ndr_print_uint32(ndr, "updateimmediately", r->in.updateimmediately);
17517 ndr->depth--;
17519 if (flags & NDR_OUT) {
17520 ndr_print_struct(ndr, "out", "srvsvc_NetSetServiceBits");
17521 ndr->depth++;
17522 ndr_print_WERROR(ndr, "result", r->out.result);
17523 ndr->depth--;
17525 ndr->depth--;
17528 static enum ndr_err_code ndr_push_srvsvc_NetPathType(struct ndr_push *ndr, int flags, const struct srvsvc_NetPathType *r)
17530 if (flags & NDR_IN) {
17531 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
17532 if (r->in.server_unc) {
17533 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17534 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17535 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17536 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));
17538 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
17539 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17540 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
17541 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path, ndr_charset_length(r->in.path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17542 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.pathflags));
17544 if (flags & NDR_OUT) {
17545 if (r->out.pathtype == NULL) {
17546 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17548 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pathtype));
17549 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17551 return NDR_ERR_SUCCESS;
17554 static enum ndr_err_code ndr_pull_srvsvc_NetPathType(struct ndr_pull *ndr, int flags, struct srvsvc_NetPathType *r)
17556 uint32_t _ptr_server_unc;
17557 TALLOC_CTX *_mem_save_server_unc_0;
17558 TALLOC_CTX *_mem_save_pathtype_0;
17559 if (flags & NDR_IN) {
17560 ZERO_STRUCT(r->out);
17562 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
17563 if (_ptr_server_unc) {
17564 NDR_PULL_ALLOC(ndr, r->in.server_unc);
17565 } else {
17566 r->in.server_unc = NULL;
17568 if (r->in.server_unc) {
17569 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
17570 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
17571 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
17572 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
17573 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
17574 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
17576 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
17577 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
17578 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
17580 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path));
17581 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path));
17582 if (ndr_get_array_length(ndr, &r->in.path) > ndr_get_array_size(ndr, &r->in.path)) {
17583 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.path), ndr_get_array_length(ndr, &r->in.path));
17585 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t)));
17586 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t), CH_UTF16));
17587 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.pathflags));
17588 NDR_PULL_ALLOC(ndr, r->out.pathtype);
17589 ZERO_STRUCTP(r->out.pathtype);
17591 if (flags & NDR_OUT) {
17592 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17593 NDR_PULL_ALLOC(ndr, r->out.pathtype);
17595 _mem_save_pathtype_0 = NDR_PULL_GET_MEM_CTX(ndr);
17596 NDR_PULL_SET_MEM_CTX(ndr, r->out.pathtype, LIBNDR_FLAG_REF_ALLOC);
17597 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pathtype));
17598 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pathtype_0, LIBNDR_FLAG_REF_ALLOC);
17599 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17601 return NDR_ERR_SUCCESS;
17604 _PUBLIC_ void ndr_print_srvsvc_NetPathType(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetPathType *r)
17606 ndr_print_struct(ndr, name, "srvsvc_NetPathType");
17607 ndr->depth++;
17608 if (flags & NDR_SET_VALUES) {
17609 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17611 if (flags & NDR_IN) {
17612 ndr_print_struct(ndr, "in", "srvsvc_NetPathType");
17613 ndr->depth++;
17614 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
17615 ndr->depth++;
17616 if (r->in.server_unc) {
17617 ndr_print_string(ndr, "server_unc", r->in.server_unc);
17619 ndr->depth--;
17620 ndr_print_string(ndr, "path", r->in.path);
17621 ndr_print_uint32(ndr, "pathflags", r->in.pathflags);
17622 ndr->depth--;
17624 if (flags & NDR_OUT) {
17625 ndr_print_struct(ndr, "out", "srvsvc_NetPathType");
17626 ndr->depth++;
17627 ndr_print_ptr(ndr, "pathtype", r->out.pathtype);
17628 ndr->depth++;
17629 ndr_print_uint32(ndr, "pathtype", *r->out.pathtype);
17630 ndr->depth--;
17631 ndr_print_WERROR(ndr, "result", r->out.result);
17632 ndr->depth--;
17634 ndr->depth--;
17637 static enum ndr_err_code ndr_push_srvsvc_NetPathCanonicalize(struct ndr_push *ndr, int flags, const struct srvsvc_NetPathCanonicalize *r)
17639 if (flags & NDR_IN) {
17640 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
17641 if (r->in.server_unc) {
17642 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17643 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17644 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17645 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));
17647 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
17648 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17649 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
17650 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path, ndr_charset_length(r->in.path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17651 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.maxbuf));
17652 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.prefix, CH_UTF16)));
17653 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17654 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.prefix, CH_UTF16)));
17655 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.prefix, ndr_charset_length(r->in.prefix, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17656 if (r->in.pathtype == NULL) {
17657 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17659 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.pathtype));
17660 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.pathflags));
17662 if (flags & NDR_OUT) {
17663 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.maxbuf));
17664 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->out.can_path, r->in.maxbuf));
17665 if (r->out.pathtype == NULL) {
17666 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
17668 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.pathtype));
17669 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17671 return NDR_ERR_SUCCESS;
17674 static enum ndr_err_code ndr_pull_srvsvc_NetPathCanonicalize(struct ndr_pull *ndr, int flags, struct srvsvc_NetPathCanonicalize *r)
17676 uint32_t _ptr_server_unc;
17677 TALLOC_CTX *_mem_save_server_unc_0;
17678 TALLOC_CTX *_mem_save_pathtype_0;
17679 if (flags & NDR_IN) {
17680 ZERO_STRUCT(r->out);
17682 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
17683 if (_ptr_server_unc) {
17684 NDR_PULL_ALLOC(ndr, r->in.server_unc);
17685 } else {
17686 r->in.server_unc = NULL;
17688 if (r->in.server_unc) {
17689 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
17690 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
17691 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
17692 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
17693 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
17694 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
17696 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
17697 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
17698 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
17700 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path));
17701 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path));
17702 if (ndr_get_array_length(ndr, &r->in.path) > ndr_get_array_size(ndr, &r->in.path)) {
17703 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.path), ndr_get_array_length(ndr, &r->in.path));
17705 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t)));
17706 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t), CH_UTF16));
17707 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.maxbuf));
17708 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.prefix));
17709 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.prefix));
17710 if (ndr_get_array_length(ndr, &r->in.prefix) > ndr_get_array_size(ndr, &r->in.prefix)) {
17711 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.prefix), ndr_get_array_length(ndr, &r->in.prefix));
17713 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.prefix), sizeof(uint16_t)));
17714 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.prefix, ndr_get_array_length(ndr, &r->in.prefix), sizeof(uint16_t), CH_UTF16));
17715 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17716 NDR_PULL_ALLOC(ndr, r->in.pathtype);
17718 _mem_save_pathtype_0 = NDR_PULL_GET_MEM_CTX(ndr);
17719 NDR_PULL_SET_MEM_CTX(ndr, r->in.pathtype, LIBNDR_FLAG_REF_ALLOC);
17720 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.pathtype));
17721 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pathtype_0, LIBNDR_FLAG_REF_ALLOC);
17722 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.pathflags));
17723 NDR_PULL_ALLOC(ndr, r->out.pathtype);
17724 *r->out.pathtype = *r->in.pathtype;
17726 if (flags & NDR_OUT) {
17727 NDR_CHECK(ndr_pull_array_size(ndr, &r->out.can_path));
17728 NDR_PULL_ALLOC_N(ndr, r->out.can_path, ndr_get_array_size(ndr, &r->out.can_path));
17729 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->out.can_path, ndr_get_array_size(ndr, &r->out.can_path)));
17730 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
17731 NDR_PULL_ALLOC(ndr, r->out.pathtype);
17733 _mem_save_pathtype_0 = NDR_PULL_GET_MEM_CTX(ndr);
17734 NDR_PULL_SET_MEM_CTX(ndr, r->out.pathtype, LIBNDR_FLAG_REF_ALLOC);
17735 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.pathtype));
17736 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_pathtype_0, LIBNDR_FLAG_REF_ALLOC);
17737 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17738 if (r->out.can_path) {
17739 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->out.can_path, r->in.maxbuf));
17742 return NDR_ERR_SUCCESS;
17745 _PUBLIC_ void ndr_print_srvsvc_NetPathCanonicalize(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetPathCanonicalize *r)
17747 ndr_print_struct(ndr, name, "srvsvc_NetPathCanonicalize");
17748 ndr->depth++;
17749 if (flags & NDR_SET_VALUES) {
17750 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17752 if (flags & NDR_IN) {
17753 ndr_print_struct(ndr, "in", "srvsvc_NetPathCanonicalize");
17754 ndr->depth++;
17755 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
17756 ndr->depth++;
17757 if (r->in.server_unc) {
17758 ndr_print_string(ndr, "server_unc", r->in.server_unc);
17760 ndr->depth--;
17761 ndr_print_string(ndr, "path", r->in.path);
17762 ndr_print_uint32(ndr, "maxbuf", r->in.maxbuf);
17763 ndr_print_string(ndr, "prefix", r->in.prefix);
17764 ndr_print_ptr(ndr, "pathtype", r->in.pathtype);
17765 ndr->depth++;
17766 ndr_print_uint32(ndr, "pathtype", *r->in.pathtype);
17767 ndr->depth--;
17768 ndr_print_uint32(ndr, "pathflags", r->in.pathflags);
17769 ndr->depth--;
17771 if (flags & NDR_OUT) {
17772 ndr_print_struct(ndr, "out", "srvsvc_NetPathCanonicalize");
17773 ndr->depth++;
17774 ndr_print_array_uint8(ndr, "can_path", r->out.can_path, r->in.maxbuf);
17775 ndr_print_ptr(ndr, "pathtype", r->out.pathtype);
17776 ndr->depth++;
17777 ndr_print_uint32(ndr, "pathtype", *r->out.pathtype);
17778 ndr->depth--;
17779 ndr_print_WERROR(ndr, "result", r->out.result);
17780 ndr->depth--;
17782 ndr->depth--;
17785 static enum ndr_err_code ndr_push_srvsvc_NetPathCompare(struct ndr_push *ndr, int flags, const struct srvsvc_NetPathCompare *r)
17787 if (flags & NDR_IN) {
17788 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
17789 if (r->in.server_unc) {
17790 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17791 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17792 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17793 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));
17795 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.path1, CH_UTF16)));
17796 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17797 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.path1, CH_UTF16)));
17798 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path1, ndr_charset_length(r->in.path1, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17799 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.path2, CH_UTF16)));
17800 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17801 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.path2, CH_UTF16)));
17802 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path2, ndr_charset_length(r->in.path2, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17803 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.pathtype));
17804 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.pathflags));
17806 if (flags & NDR_OUT) {
17807 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17809 return NDR_ERR_SUCCESS;
17812 static enum ndr_err_code ndr_pull_srvsvc_NetPathCompare(struct ndr_pull *ndr, int flags, struct srvsvc_NetPathCompare *r)
17814 uint32_t _ptr_server_unc;
17815 TALLOC_CTX *_mem_save_server_unc_0;
17816 if (flags & NDR_IN) {
17817 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
17818 if (_ptr_server_unc) {
17819 NDR_PULL_ALLOC(ndr, r->in.server_unc);
17820 } else {
17821 r->in.server_unc = NULL;
17823 if (r->in.server_unc) {
17824 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
17825 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
17826 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
17827 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
17828 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
17829 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
17831 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
17832 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
17833 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
17835 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path1));
17836 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path1));
17837 if (ndr_get_array_length(ndr, &r->in.path1) > ndr_get_array_size(ndr, &r->in.path1)) {
17838 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.path1), ndr_get_array_length(ndr, &r->in.path1));
17840 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.path1), sizeof(uint16_t)));
17841 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path1, ndr_get_array_length(ndr, &r->in.path1), sizeof(uint16_t), CH_UTF16));
17842 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path2));
17843 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path2));
17844 if (ndr_get_array_length(ndr, &r->in.path2) > ndr_get_array_size(ndr, &r->in.path2)) {
17845 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.path2), ndr_get_array_length(ndr, &r->in.path2));
17847 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.path2), sizeof(uint16_t)));
17848 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path2, ndr_get_array_length(ndr, &r->in.path2), sizeof(uint16_t), CH_UTF16));
17849 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.pathtype));
17850 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.pathflags));
17852 if (flags & NDR_OUT) {
17853 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17855 return NDR_ERR_SUCCESS;
17858 _PUBLIC_ void ndr_print_srvsvc_NetPathCompare(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetPathCompare *r)
17860 ndr_print_struct(ndr, name, "srvsvc_NetPathCompare");
17861 ndr->depth++;
17862 if (flags & NDR_SET_VALUES) {
17863 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17865 if (flags & NDR_IN) {
17866 ndr_print_struct(ndr, "in", "srvsvc_NetPathCompare");
17867 ndr->depth++;
17868 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
17869 ndr->depth++;
17870 if (r->in.server_unc) {
17871 ndr_print_string(ndr, "server_unc", r->in.server_unc);
17873 ndr->depth--;
17874 ndr_print_string(ndr, "path1", r->in.path1);
17875 ndr_print_string(ndr, "path2", r->in.path2);
17876 ndr_print_uint32(ndr, "pathtype", r->in.pathtype);
17877 ndr_print_uint32(ndr, "pathflags", r->in.pathflags);
17878 ndr->depth--;
17880 if (flags & NDR_OUT) {
17881 ndr_print_struct(ndr, "out", "srvsvc_NetPathCompare");
17882 ndr->depth++;
17883 ndr_print_WERROR(ndr, "result", r->out.result);
17884 ndr->depth--;
17886 ndr->depth--;
17889 static enum ndr_err_code ndr_push_srvsvc_NetNameValidate(struct ndr_push *ndr, int flags, const struct srvsvc_NetNameValidate *r)
17891 if (flags & NDR_IN) {
17892 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
17893 if (r->in.server_unc) {
17894 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17895 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17896 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
17897 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));
17899 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.name, CH_UTF16)));
17900 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
17901 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.name, CH_UTF16)));
17902 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.name, ndr_charset_length(r->in.name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
17903 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.name_type));
17904 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
17906 if (flags & NDR_OUT) {
17907 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17909 return NDR_ERR_SUCCESS;
17912 static enum ndr_err_code ndr_pull_srvsvc_NetNameValidate(struct ndr_pull *ndr, int flags, struct srvsvc_NetNameValidate *r)
17914 uint32_t _ptr_server_unc;
17915 TALLOC_CTX *_mem_save_server_unc_0;
17916 if (flags & NDR_IN) {
17917 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
17918 if (_ptr_server_unc) {
17919 NDR_PULL_ALLOC(ndr, r->in.server_unc);
17920 } else {
17921 r->in.server_unc = NULL;
17923 if (r->in.server_unc) {
17924 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
17925 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
17926 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
17927 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
17928 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
17929 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
17931 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
17932 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
17933 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
17935 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.name));
17936 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.name));
17937 if (ndr_get_array_length(ndr, &r->in.name) > ndr_get_array_size(ndr, &r->in.name)) {
17938 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.name), ndr_get_array_length(ndr, &r->in.name));
17940 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.name), sizeof(uint16_t)));
17941 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.name, ndr_get_array_length(ndr, &r->in.name), sizeof(uint16_t), CH_UTF16));
17942 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.name_type));
17943 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
17945 if (flags & NDR_OUT) {
17946 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17948 return NDR_ERR_SUCCESS;
17951 _PUBLIC_ void ndr_print_srvsvc_NetNameValidate(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetNameValidate *r)
17953 ndr_print_struct(ndr, name, "srvsvc_NetNameValidate");
17954 ndr->depth++;
17955 if (flags & NDR_SET_VALUES) {
17956 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
17958 if (flags & NDR_IN) {
17959 ndr_print_struct(ndr, "in", "srvsvc_NetNameValidate");
17960 ndr->depth++;
17961 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
17962 ndr->depth++;
17963 if (r->in.server_unc) {
17964 ndr_print_string(ndr, "server_unc", r->in.server_unc);
17966 ndr->depth--;
17967 ndr_print_string(ndr, "name", r->in.name);
17968 ndr_print_uint32(ndr, "name_type", r->in.name_type);
17969 ndr_print_uint32(ndr, "flags", r->in.flags);
17970 ndr->depth--;
17972 if (flags & NDR_OUT) {
17973 ndr_print_struct(ndr, "out", "srvsvc_NetNameValidate");
17974 ndr->depth++;
17975 ndr_print_WERROR(ndr, "result", r->out.result);
17976 ndr->depth--;
17978 ndr->depth--;
17981 static enum ndr_err_code ndr_push_srvsvc_NETRPRNAMECANONICALIZE(struct ndr_push *ndr, int flags, const struct srvsvc_NETRPRNAMECANONICALIZE *r)
17983 if (flags & NDR_IN) {
17985 if (flags & NDR_OUT) {
17986 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
17988 return NDR_ERR_SUCCESS;
17991 static enum ndr_err_code ndr_pull_srvsvc_NETRPRNAMECANONICALIZE(struct ndr_pull *ndr, int flags, struct srvsvc_NETRPRNAMECANONICALIZE *r)
17993 if (flags & NDR_IN) {
17995 if (flags & NDR_OUT) {
17996 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
17998 return NDR_ERR_SUCCESS;
18001 _PUBLIC_ void ndr_print_srvsvc_NETRPRNAMECANONICALIZE(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRPRNAMECANONICALIZE *r)
18003 ndr_print_struct(ndr, name, "srvsvc_NETRPRNAMECANONICALIZE");
18004 ndr->depth++;
18005 if (flags & NDR_SET_VALUES) {
18006 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18008 if (flags & NDR_IN) {
18009 ndr_print_struct(ndr, "in", "srvsvc_NETRPRNAMECANONICALIZE");
18010 ndr->depth++;
18011 ndr->depth--;
18013 if (flags & NDR_OUT) {
18014 ndr_print_struct(ndr, "out", "srvsvc_NETRPRNAMECANONICALIZE");
18015 ndr->depth++;
18016 ndr_print_WERROR(ndr, "result", r->out.result);
18017 ndr->depth--;
18019 ndr->depth--;
18022 static enum ndr_err_code ndr_push_srvsvc_NetPRNameCompare(struct ndr_push *ndr, int flags, const struct srvsvc_NetPRNameCompare *r)
18024 if (flags & NDR_IN) {
18025 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
18026 if (r->in.server_unc) {
18027 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18028 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18029 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18030 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));
18032 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.name1, CH_UTF16)));
18033 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18034 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.name1, CH_UTF16)));
18035 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.name1, ndr_charset_length(r->in.name1, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18036 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.name2, CH_UTF16)));
18037 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18038 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.name2, CH_UTF16)));
18039 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.name2, ndr_charset_length(r->in.name2, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18040 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.name_type));
18041 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
18043 if (flags & NDR_OUT) {
18044 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18046 return NDR_ERR_SUCCESS;
18049 static enum ndr_err_code ndr_pull_srvsvc_NetPRNameCompare(struct ndr_pull *ndr, int flags, struct srvsvc_NetPRNameCompare *r)
18051 uint32_t _ptr_server_unc;
18052 TALLOC_CTX *_mem_save_server_unc_0;
18053 if (flags & NDR_IN) {
18054 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
18055 if (_ptr_server_unc) {
18056 NDR_PULL_ALLOC(ndr, r->in.server_unc);
18057 } else {
18058 r->in.server_unc = NULL;
18060 if (r->in.server_unc) {
18061 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
18062 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
18063 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
18064 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
18065 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
18066 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
18068 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
18069 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
18070 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
18072 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.name1));
18073 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.name1));
18074 if (ndr_get_array_length(ndr, &r->in.name1) > ndr_get_array_size(ndr, &r->in.name1)) {
18075 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.name1), ndr_get_array_length(ndr, &r->in.name1));
18077 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.name1), sizeof(uint16_t)));
18078 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.name1, ndr_get_array_length(ndr, &r->in.name1), sizeof(uint16_t), CH_UTF16));
18079 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.name2));
18080 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.name2));
18081 if (ndr_get_array_length(ndr, &r->in.name2) > ndr_get_array_size(ndr, &r->in.name2)) {
18082 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.name2), ndr_get_array_length(ndr, &r->in.name2));
18084 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.name2), sizeof(uint16_t)));
18085 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.name2, ndr_get_array_length(ndr, &r->in.name2), sizeof(uint16_t), CH_UTF16));
18086 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.name_type));
18087 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
18089 if (flags & NDR_OUT) {
18090 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18092 return NDR_ERR_SUCCESS;
18095 _PUBLIC_ void ndr_print_srvsvc_NetPRNameCompare(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetPRNameCompare *r)
18097 ndr_print_struct(ndr, name, "srvsvc_NetPRNameCompare");
18098 ndr->depth++;
18099 if (flags & NDR_SET_VALUES) {
18100 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18102 if (flags & NDR_IN) {
18103 ndr_print_struct(ndr, "in", "srvsvc_NetPRNameCompare");
18104 ndr->depth++;
18105 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
18106 ndr->depth++;
18107 if (r->in.server_unc) {
18108 ndr_print_string(ndr, "server_unc", r->in.server_unc);
18110 ndr->depth--;
18111 ndr_print_string(ndr, "name1", r->in.name1);
18112 ndr_print_string(ndr, "name2", r->in.name2);
18113 ndr_print_uint32(ndr, "name_type", r->in.name_type);
18114 ndr_print_uint32(ndr, "flags", r->in.flags);
18115 ndr->depth--;
18117 if (flags & NDR_OUT) {
18118 ndr_print_struct(ndr, "out", "srvsvc_NetPRNameCompare");
18119 ndr->depth++;
18120 ndr_print_WERROR(ndr, "result", r->out.result);
18121 ndr->depth--;
18123 ndr->depth--;
18126 static enum ndr_err_code ndr_push_srvsvc_NetShareEnum(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareEnum *r)
18128 if (flags & NDR_IN) {
18129 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
18130 if (r->in.server_unc) {
18131 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18132 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18133 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18134 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));
18136 if (r->in.info_ctr == NULL) {
18137 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18139 NDR_CHECK(ndr_push_srvsvc_NetShareInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
18140 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.max_buffer));
18141 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.resume_handle));
18142 if (r->in.resume_handle) {
18143 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.resume_handle));
18146 if (flags & NDR_OUT) {
18147 if (r->out.info_ctr == NULL) {
18148 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18150 NDR_CHECK(ndr_push_srvsvc_NetShareInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
18151 if (r->out.totalentries == NULL) {
18152 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18154 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.totalentries));
18155 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.resume_handle));
18156 if (r->out.resume_handle) {
18157 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.resume_handle));
18159 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18161 return NDR_ERR_SUCCESS;
18164 static enum ndr_err_code ndr_pull_srvsvc_NetShareEnum(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareEnum *r)
18166 uint32_t _ptr_server_unc;
18167 uint32_t _ptr_resume_handle;
18168 TALLOC_CTX *_mem_save_server_unc_0;
18169 TALLOC_CTX *_mem_save_info_ctr_0;
18170 TALLOC_CTX *_mem_save_totalentries_0;
18171 TALLOC_CTX *_mem_save_resume_handle_0;
18172 if (flags & NDR_IN) {
18173 ZERO_STRUCT(r->out);
18175 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
18176 if (_ptr_server_unc) {
18177 NDR_PULL_ALLOC(ndr, r->in.server_unc);
18178 } else {
18179 r->in.server_unc = NULL;
18181 if (r->in.server_unc) {
18182 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
18183 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
18184 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
18185 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
18186 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
18187 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
18189 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
18190 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
18191 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
18193 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18194 NDR_PULL_ALLOC(ndr, r->in.info_ctr);
18196 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
18197 NDR_PULL_SET_MEM_CTX(ndr, r->in.info_ctr, LIBNDR_FLAG_REF_ALLOC);
18198 NDR_CHECK(ndr_pull_srvsvc_NetShareInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info_ctr));
18199 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
18200 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.max_buffer));
18201 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
18202 if (_ptr_resume_handle) {
18203 NDR_PULL_ALLOC(ndr, r->in.resume_handle);
18204 } else {
18205 r->in.resume_handle = NULL;
18207 if (r->in.resume_handle) {
18208 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
18209 NDR_PULL_SET_MEM_CTX(ndr, r->in.resume_handle, 0);
18210 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.resume_handle));
18211 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
18213 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
18214 *r->out.info_ctr = *r->in.info_ctr;
18215 NDR_PULL_ALLOC(ndr, r->out.totalentries);
18216 ZERO_STRUCTP(r->out.totalentries);
18218 if (flags & NDR_OUT) {
18219 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18220 NDR_PULL_ALLOC(ndr, r->out.info_ctr);
18222 _mem_save_info_ctr_0 = NDR_PULL_GET_MEM_CTX(ndr);
18223 NDR_PULL_SET_MEM_CTX(ndr, r->out.info_ctr, LIBNDR_FLAG_REF_ALLOC);
18224 NDR_CHECK(ndr_pull_srvsvc_NetShareInfoCtr(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info_ctr));
18225 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_ctr_0, LIBNDR_FLAG_REF_ALLOC);
18226 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18227 NDR_PULL_ALLOC(ndr, r->out.totalentries);
18229 _mem_save_totalentries_0 = NDR_PULL_GET_MEM_CTX(ndr);
18230 NDR_PULL_SET_MEM_CTX(ndr, r->out.totalentries, LIBNDR_FLAG_REF_ALLOC);
18231 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.totalentries));
18232 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_totalentries_0, LIBNDR_FLAG_REF_ALLOC);
18233 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_resume_handle));
18234 if (_ptr_resume_handle) {
18235 NDR_PULL_ALLOC(ndr, r->out.resume_handle);
18236 } else {
18237 r->out.resume_handle = NULL;
18239 if (r->out.resume_handle) {
18240 _mem_save_resume_handle_0 = NDR_PULL_GET_MEM_CTX(ndr);
18241 NDR_PULL_SET_MEM_CTX(ndr, r->out.resume_handle, 0);
18242 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.resume_handle));
18243 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_resume_handle_0, 0);
18245 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18247 return NDR_ERR_SUCCESS;
18250 _PUBLIC_ void ndr_print_srvsvc_NetShareEnum(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareEnum *r)
18252 ndr_print_struct(ndr, name, "srvsvc_NetShareEnum");
18253 ndr->depth++;
18254 if (flags & NDR_SET_VALUES) {
18255 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18257 if (flags & NDR_IN) {
18258 ndr_print_struct(ndr, "in", "srvsvc_NetShareEnum");
18259 ndr->depth++;
18260 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
18261 ndr->depth++;
18262 if (r->in.server_unc) {
18263 ndr_print_string(ndr, "server_unc", r->in.server_unc);
18265 ndr->depth--;
18266 ndr_print_ptr(ndr, "info_ctr", r->in.info_ctr);
18267 ndr->depth++;
18268 ndr_print_srvsvc_NetShareInfoCtr(ndr, "info_ctr", r->in.info_ctr);
18269 ndr->depth--;
18270 ndr_print_uint32(ndr, "max_buffer", r->in.max_buffer);
18271 ndr_print_ptr(ndr, "resume_handle", r->in.resume_handle);
18272 ndr->depth++;
18273 if (r->in.resume_handle) {
18274 ndr_print_uint32(ndr, "resume_handle", *r->in.resume_handle);
18276 ndr->depth--;
18277 ndr->depth--;
18279 if (flags & NDR_OUT) {
18280 ndr_print_struct(ndr, "out", "srvsvc_NetShareEnum");
18281 ndr->depth++;
18282 ndr_print_ptr(ndr, "info_ctr", r->out.info_ctr);
18283 ndr->depth++;
18284 ndr_print_srvsvc_NetShareInfoCtr(ndr, "info_ctr", r->out.info_ctr);
18285 ndr->depth--;
18286 ndr_print_ptr(ndr, "totalentries", r->out.totalentries);
18287 ndr->depth++;
18288 ndr_print_uint32(ndr, "totalentries", *r->out.totalentries);
18289 ndr->depth--;
18290 ndr_print_ptr(ndr, "resume_handle", r->out.resume_handle);
18291 ndr->depth++;
18292 if (r->out.resume_handle) {
18293 ndr_print_uint32(ndr, "resume_handle", *r->out.resume_handle);
18295 ndr->depth--;
18296 ndr_print_WERROR(ndr, "result", r->out.result);
18297 ndr->depth--;
18299 ndr->depth--;
18302 static enum ndr_err_code ndr_push_srvsvc_NetShareDelStart(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareDelStart *r)
18304 if (flags & NDR_IN) {
18305 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
18306 if (r->in.server_unc) {
18307 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18308 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18309 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18310 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));
18312 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
18313 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18314 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
18315 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share, ndr_charset_length(r->in.share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18316 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.reserved));
18318 if (flags & NDR_OUT) {
18319 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.hnd));
18320 if (r->out.hnd) {
18321 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.hnd));
18323 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18325 return NDR_ERR_SUCCESS;
18328 static enum ndr_err_code ndr_pull_srvsvc_NetShareDelStart(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareDelStart *r)
18330 uint32_t _ptr_server_unc;
18331 uint32_t _ptr_hnd;
18332 TALLOC_CTX *_mem_save_server_unc_0;
18333 TALLOC_CTX *_mem_save_hnd_0;
18334 if (flags & NDR_IN) {
18335 ZERO_STRUCT(r->out);
18337 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
18338 if (_ptr_server_unc) {
18339 NDR_PULL_ALLOC(ndr, r->in.server_unc);
18340 } else {
18341 r->in.server_unc = NULL;
18343 if (r->in.server_unc) {
18344 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
18345 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
18346 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
18347 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
18348 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
18349 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
18351 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
18352 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
18353 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
18355 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share));
18356 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share));
18357 if (ndr_get_array_length(ndr, &r->in.share) > ndr_get_array_size(ndr, &r->in.share)) {
18358 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.share), ndr_get_array_length(ndr, &r->in.share));
18360 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t)));
18361 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t), CH_UTF16));
18362 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.reserved));
18364 if (flags & NDR_OUT) {
18365 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_hnd));
18366 if (_ptr_hnd) {
18367 NDR_PULL_ALLOC(ndr, r->out.hnd);
18368 } else {
18369 r->out.hnd = NULL;
18371 if (r->out.hnd) {
18372 _mem_save_hnd_0 = NDR_PULL_GET_MEM_CTX(ndr);
18373 NDR_PULL_SET_MEM_CTX(ndr, r->out.hnd, 0);
18374 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.hnd));
18375 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hnd_0, 0);
18377 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18379 return NDR_ERR_SUCCESS;
18382 _PUBLIC_ void ndr_print_srvsvc_NetShareDelStart(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareDelStart *r)
18384 ndr_print_struct(ndr, name, "srvsvc_NetShareDelStart");
18385 ndr->depth++;
18386 if (flags & NDR_SET_VALUES) {
18387 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18389 if (flags & NDR_IN) {
18390 ndr_print_struct(ndr, "in", "srvsvc_NetShareDelStart");
18391 ndr->depth++;
18392 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
18393 ndr->depth++;
18394 if (r->in.server_unc) {
18395 ndr_print_string(ndr, "server_unc", r->in.server_unc);
18397 ndr->depth--;
18398 ndr_print_string(ndr, "share", r->in.share);
18399 ndr_print_uint32(ndr, "reserved", r->in.reserved);
18400 ndr->depth--;
18402 if (flags & NDR_OUT) {
18403 ndr_print_struct(ndr, "out", "srvsvc_NetShareDelStart");
18404 ndr->depth++;
18405 ndr_print_ptr(ndr, "hnd", r->out.hnd);
18406 ndr->depth++;
18407 if (r->out.hnd) {
18408 ndr_print_policy_handle(ndr, "hnd", r->out.hnd);
18410 ndr->depth--;
18411 ndr_print_WERROR(ndr, "result", r->out.result);
18412 ndr->depth--;
18414 ndr->depth--;
18417 static enum ndr_err_code ndr_push_srvsvc_NetShareDelCommit(struct ndr_push *ndr, int flags, const struct srvsvc_NetShareDelCommit *r)
18419 if (flags & NDR_IN) {
18420 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.hnd));
18421 if (r->in.hnd) {
18422 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->in.hnd));
18425 if (flags & NDR_OUT) {
18426 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.hnd));
18427 if (r->out.hnd) {
18428 NDR_CHECK(ndr_push_policy_handle(ndr, NDR_SCALARS, r->out.hnd));
18430 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18432 return NDR_ERR_SUCCESS;
18435 static enum ndr_err_code ndr_pull_srvsvc_NetShareDelCommit(struct ndr_pull *ndr, int flags, struct srvsvc_NetShareDelCommit *r)
18437 uint32_t _ptr_hnd;
18438 TALLOC_CTX *_mem_save_hnd_0;
18439 if (flags & NDR_IN) {
18440 ZERO_STRUCT(r->out);
18442 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_hnd));
18443 if (_ptr_hnd) {
18444 NDR_PULL_ALLOC(ndr, r->in.hnd);
18445 } else {
18446 r->in.hnd = NULL;
18448 if (r->in.hnd) {
18449 _mem_save_hnd_0 = NDR_PULL_GET_MEM_CTX(ndr);
18450 NDR_PULL_SET_MEM_CTX(ndr, r->in.hnd, 0);
18451 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->in.hnd));
18452 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hnd_0, 0);
18455 if (flags & NDR_OUT) {
18456 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_hnd));
18457 if (_ptr_hnd) {
18458 NDR_PULL_ALLOC(ndr, r->out.hnd);
18459 } else {
18460 r->out.hnd = NULL;
18462 if (r->out.hnd) {
18463 _mem_save_hnd_0 = NDR_PULL_GET_MEM_CTX(ndr);
18464 NDR_PULL_SET_MEM_CTX(ndr, r->out.hnd, 0);
18465 NDR_CHECK(ndr_pull_policy_handle(ndr, NDR_SCALARS, r->out.hnd));
18466 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_hnd_0, 0);
18468 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18470 return NDR_ERR_SUCCESS;
18473 _PUBLIC_ void ndr_print_srvsvc_NetShareDelCommit(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetShareDelCommit *r)
18475 ndr_print_struct(ndr, name, "srvsvc_NetShareDelCommit");
18476 ndr->depth++;
18477 if (flags & NDR_SET_VALUES) {
18478 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18480 if (flags & NDR_IN) {
18481 ndr_print_struct(ndr, "in", "srvsvc_NetShareDelCommit");
18482 ndr->depth++;
18483 ndr_print_ptr(ndr, "hnd", r->in.hnd);
18484 ndr->depth++;
18485 if (r->in.hnd) {
18486 ndr_print_policy_handle(ndr, "hnd", r->in.hnd);
18488 ndr->depth--;
18489 ndr->depth--;
18491 if (flags & NDR_OUT) {
18492 ndr_print_struct(ndr, "out", "srvsvc_NetShareDelCommit");
18493 ndr->depth++;
18494 ndr_print_ptr(ndr, "hnd", r->out.hnd);
18495 ndr->depth++;
18496 if (r->out.hnd) {
18497 ndr_print_policy_handle(ndr, "hnd", r->out.hnd);
18499 ndr->depth--;
18500 ndr_print_WERROR(ndr, "result", r->out.result);
18501 ndr->depth--;
18503 ndr->depth--;
18506 static enum ndr_err_code ndr_push_srvsvc_NetGetFileSecurity(struct ndr_push *ndr, int flags, const struct srvsvc_NetGetFileSecurity *r)
18508 if (flags & NDR_IN) {
18509 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
18510 if (r->in.server_unc) {
18511 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18512 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18513 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18514 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));
18516 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.share));
18517 if (r->in.share) {
18518 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
18519 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18520 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
18521 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share, ndr_charset_length(r->in.share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18523 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.file, CH_UTF16)));
18524 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18525 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.file, CH_UTF16)));
18526 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.file, ndr_charset_length(r->in.file, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18527 NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.securityinformation));
18529 if (flags & NDR_OUT) {
18530 if (r->out.sd_buf == NULL) {
18531 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18533 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.sd_buf));
18534 if (*r->out.sd_buf) {
18535 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sd_buf));
18537 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18539 return NDR_ERR_SUCCESS;
18542 static enum ndr_err_code ndr_pull_srvsvc_NetGetFileSecurity(struct ndr_pull *ndr, int flags, struct srvsvc_NetGetFileSecurity *r)
18544 uint32_t _ptr_server_unc;
18545 uint32_t _ptr_share;
18546 uint32_t _ptr_sd_buf;
18547 TALLOC_CTX *_mem_save_server_unc_0;
18548 TALLOC_CTX *_mem_save_share_0;
18549 TALLOC_CTX *_mem_save_sd_buf_0;
18550 TALLOC_CTX *_mem_save_sd_buf_1;
18551 if (flags & NDR_IN) {
18552 ZERO_STRUCT(r->out);
18554 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
18555 if (_ptr_server_unc) {
18556 NDR_PULL_ALLOC(ndr, r->in.server_unc);
18557 } else {
18558 r->in.server_unc = NULL;
18560 if (r->in.server_unc) {
18561 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
18562 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
18563 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
18564 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
18565 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
18566 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
18568 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
18569 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
18570 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
18572 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share));
18573 if (_ptr_share) {
18574 NDR_PULL_ALLOC(ndr, r->in.share);
18575 } else {
18576 r->in.share = NULL;
18578 if (r->in.share) {
18579 _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr);
18580 NDR_PULL_SET_MEM_CTX(ndr, r->in.share, 0);
18581 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share));
18582 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share));
18583 if (ndr_get_array_length(ndr, &r->in.share) > ndr_get_array_size(ndr, &r->in.share)) {
18584 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.share), ndr_get_array_length(ndr, &r->in.share));
18586 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t)));
18587 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t), CH_UTF16));
18588 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0);
18590 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.file));
18591 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.file));
18592 if (ndr_get_array_length(ndr, &r->in.file) > ndr_get_array_size(ndr, &r->in.file)) {
18593 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.file), ndr_get_array_length(ndr, &r->in.file));
18595 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.file), sizeof(uint16_t)));
18596 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.file, ndr_get_array_length(ndr, &r->in.file), sizeof(uint16_t), CH_UTF16));
18597 NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.securityinformation));
18598 NDR_PULL_ALLOC(ndr, r->out.sd_buf);
18599 ZERO_STRUCTP(r->out.sd_buf);
18601 if (flags & NDR_OUT) {
18602 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18603 NDR_PULL_ALLOC(ndr, r->out.sd_buf);
18605 _mem_save_sd_buf_0 = NDR_PULL_GET_MEM_CTX(ndr);
18606 NDR_PULL_SET_MEM_CTX(ndr, r->out.sd_buf, LIBNDR_FLAG_REF_ALLOC);
18607 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sd_buf));
18608 if (_ptr_sd_buf) {
18609 NDR_PULL_ALLOC(ndr, *r->out.sd_buf);
18610 } else {
18611 *r->out.sd_buf = NULL;
18613 if (*r->out.sd_buf) {
18614 _mem_save_sd_buf_1 = NDR_PULL_GET_MEM_CTX(ndr);
18615 NDR_PULL_SET_MEM_CTX(ndr, *r->out.sd_buf, 0);
18616 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.sd_buf));
18617 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sd_buf_1, 0);
18619 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sd_buf_0, LIBNDR_FLAG_REF_ALLOC);
18620 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18622 return NDR_ERR_SUCCESS;
18625 _PUBLIC_ void ndr_print_srvsvc_NetGetFileSecurity(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetGetFileSecurity *r)
18627 ndr_print_struct(ndr, name, "srvsvc_NetGetFileSecurity");
18628 ndr->depth++;
18629 if (flags & NDR_SET_VALUES) {
18630 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18632 if (flags & NDR_IN) {
18633 ndr_print_struct(ndr, "in", "srvsvc_NetGetFileSecurity");
18634 ndr->depth++;
18635 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
18636 ndr->depth++;
18637 if (r->in.server_unc) {
18638 ndr_print_string(ndr, "server_unc", r->in.server_unc);
18640 ndr->depth--;
18641 ndr_print_ptr(ndr, "share", r->in.share);
18642 ndr->depth++;
18643 if (r->in.share) {
18644 ndr_print_string(ndr, "share", r->in.share);
18646 ndr->depth--;
18647 ndr_print_string(ndr, "file", r->in.file);
18648 ndr_print_security_secinfo(ndr, "securityinformation", r->in.securityinformation);
18649 ndr->depth--;
18651 if (flags & NDR_OUT) {
18652 ndr_print_struct(ndr, "out", "srvsvc_NetGetFileSecurity");
18653 ndr->depth++;
18654 ndr_print_ptr(ndr, "sd_buf", r->out.sd_buf);
18655 ndr->depth++;
18656 ndr_print_ptr(ndr, "sd_buf", *r->out.sd_buf);
18657 ndr->depth++;
18658 if (*r->out.sd_buf) {
18659 ndr_print_sec_desc_buf(ndr, "sd_buf", *r->out.sd_buf);
18661 ndr->depth--;
18662 ndr->depth--;
18663 ndr_print_WERROR(ndr, "result", r->out.result);
18664 ndr->depth--;
18666 ndr->depth--;
18669 static enum ndr_err_code ndr_push_srvsvc_NetSetFileSecurity(struct ndr_push *ndr, int flags, const struct srvsvc_NetSetFileSecurity *r)
18671 if (flags & NDR_IN) {
18672 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
18673 if (r->in.server_unc) {
18674 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18675 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18676 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18677 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));
18679 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.share));
18680 if (r->in.share) {
18681 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
18682 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18683 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
18684 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share, ndr_charset_length(r->in.share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18686 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.file, CH_UTF16)));
18687 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18688 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.file, CH_UTF16)));
18689 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.file, ndr_charset_length(r->in.file, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18690 NDR_CHECK(ndr_push_security_secinfo(ndr, NDR_SCALARS, r->in.securityinformation));
18691 if (r->in.sd_buf == NULL) {
18692 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
18694 NDR_CHECK(ndr_push_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sd_buf));
18696 if (flags & NDR_OUT) {
18697 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18699 return NDR_ERR_SUCCESS;
18702 static enum ndr_err_code ndr_pull_srvsvc_NetSetFileSecurity(struct ndr_pull *ndr, int flags, struct srvsvc_NetSetFileSecurity *r)
18704 uint32_t _ptr_server_unc;
18705 uint32_t _ptr_share;
18706 TALLOC_CTX *_mem_save_server_unc_0;
18707 TALLOC_CTX *_mem_save_share_0;
18708 TALLOC_CTX *_mem_save_sd_buf_0;
18709 if (flags & NDR_IN) {
18710 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
18711 if (_ptr_server_unc) {
18712 NDR_PULL_ALLOC(ndr, r->in.server_unc);
18713 } else {
18714 r->in.server_unc = NULL;
18716 if (r->in.server_unc) {
18717 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
18718 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
18719 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
18720 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
18721 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
18722 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
18724 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
18725 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
18726 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
18728 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share));
18729 if (_ptr_share) {
18730 NDR_PULL_ALLOC(ndr, r->in.share);
18731 } else {
18732 r->in.share = NULL;
18734 if (r->in.share) {
18735 _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr);
18736 NDR_PULL_SET_MEM_CTX(ndr, r->in.share, 0);
18737 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share));
18738 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share));
18739 if (ndr_get_array_length(ndr, &r->in.share) > ndr_get_array_size(ndr, &r->in.share)) {
18740 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.share), ndr_get_array_length(ndr, &r->in.share));
18742 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t)));
18743 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t), CH_UTF16));
18744 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0);
18746 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.file));
18747 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.file));
18748 if (ndr_get_array_length(ndr, &r->in.file) > ndr_get_array_size(ndr, &r->in.file)) {
18749 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.file), ndr_get_array_length(ndr, &r->in.file));
18751 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.file), sizeof(uint16_t)));
18752 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.file, ndr_get_array_length(ndr, &r->in.file), sizeof(uint16_t), CH_UTF16));
18753 NDR_CHECK(ndr_pull_security_secinfo(ndr, NDR_SCALARS, &r->in.securityinformation));
18754 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
18755 NDR_PULL_ALLOC(ndr, r->in.sd_buf);
18757 _mem_save_sd_buf_0 = NDR_PULL_GET_MEM_CTX(ndr);
18758 NDR_PULL_SET_MEM_CTX(ndr, r->in.sd_buf, LIBNDR_FLAG_REF_ALLOC);
18759 NDR_CHECK(ndr_pull_sec_desc_buf(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.sd_buf));
18760 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sd_buf_0, LIBNDR_FLAG_REF_ALLOC);
18762 if (flags & NDR_OUT) {
18763 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18765 return NDR_ERR_SUCCESS;
18768 _PUBLIC_ void ndr_print_srvsvc_NetSetFileSecurity(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetSetFileSecurity *r)
18770 ndr_print_struct(ndr, name, "srvsvc_NetSetFileSecurity");
18771 ndr->depth++;
18772 if (flags & NDR_SET_VALUES) {
18773 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18775 if (flags & NDR_IN) {
18776 ndr_print_struct(ndr, "in", "srvsvc_NetSetFileSecurity");
18777 ndr->depth++;
18778 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
18779 ndr->depth++;
18780 if (r->in.server_unc) {
18781 ndr_print_string(ndr, "server_unc", r->in.server_unc);
18783 ndr->depth--;
18784 ndr_print_ptr(ndr, "share", r->in.share);
18785 ndr->depth++;
18786 if (r->in.share) {
18787 ndr_print_string(ndr, "share", r->in.share);
18789 ndr->depth--;
18790 ndr_print_string(ndr, "file", r->in.file);
18791 ndr_print_security_secinfo(ndr, "securityinformation", r->in.securityinformation);
18792 ndr_print_ptr(ndr, "sd_buf", r->in.sd_buf);
18793 ndr->depth++;
18794 ndr_print_sec_desc_buf(ndr, "sd_buf", r->in.sd_buf);
18795 ndr->depth--;
18796 ndr->depth--;
18798 if (flags & NDR_OUT) {
18799 ndr_print_struct(ndr, "out", "srvsvc_NetSetFileSecurity");
18800 ndr->depth++;
18801 ndr_print_WERROR(ndr, "result", r->out.result);
18802 ndr->depth--;
18804 ndr->depth--;
18807 static enum ndr_err_code ndr_push_srvsvc_NetServerTransportAddEx(struct ndr_push *ndr, int flags, const struct srvsvc_NetServerTransportAddEx *r)
18809 if (flags & NDR_IN) {
18810 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
18811 if (r->in.server_unc) {
18812 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18813 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18814 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18815 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));
18817 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
18818 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->in.info, r->in.level));
18819 NDR_CHECK(ndr_push_srvsvc_NetTransportInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
18821 if (flags & NDR_OUT) {
18822 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
18824 return NDR_ERR_SUCCESS;
18827 static enum ndr_err_code ndr_pull_srvsvc_NetServerTransportAddEx(struct ndr_pull *ndr, int flags, struct srvsvc_NetServerTransportAddEx *r)
18829 uint32_t _ptr_server_unc;
18830 TALLOC_CTX *_mem_save_server_unc_0;
18831 if (flags & NDR_IN) {
18832 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
18833 if (_ptr_server_unc) {
18834 NDR_PULL_ALLOC(ndr, r->in.server_unc);
18835 } else {
18836 r->in.server_unc = NULL;
18838 if (r->in.server_unc) {
18839 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
18840 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
18841 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
18842 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
18843 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
18844 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
18846 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
18847 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
18848 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
18850 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
18851 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->in.info, r->in.level));
18852 NDR_CHECK(ndr_pull_srvsvc_NetTransportInfo(ndr, NDR_SCALARS|NDR_BUFFERS, &r->in.info));
18854 if (flags & NDR_OUT) {
18855 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18857 return NDR_ERR_SUCCESS;
18860 _PUBLIC_ void ndr_print_srvsvc_NetServerTransportAddEx(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetServerTransportAddEx *r)
18862 ndr_print_struct(ndr, name, "srvsvc_NetServerTransportAddEx");
18863 ndr->depth++;
18864 if (flags & NDR_SET_VALUES) {
18865 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
18867 if (flags & NDR_IN) {
18868 ndr_print_struct(ndr, "in", "srvsvc_NetServerTransportAddEx");
18869 ndr->depth++;
18870 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
18871 ndr->depth++;
18872 if (r->in.server_unc) {
18873 ndr_print_string(ndr, "server_unc", r->in.server_unc);
18875 ndr->depth--;
18876 ndr_print_uint32(ndr, "level", r->in.level);
18877 ndr_print_set_switch_value(ndr, &r->in.info, r->in.level);
18878 ndr_print_srvsvc_NetTransportInfo(ndr, "info", &r->in.info);
18879 ndr->depth--;
18881 if (flags & NDR_OUT) {
18882 ndr_print_struct(ndr, "out", "srvsvc_NetServerTransportAddEx");
18883 ndr->depth++;
18884 ndr_print_WERROR(ndr, "result", r->out.result);
18885 ndr->depth--;
18887 ndr->depth--;
18890 static enum ndr_err_code ndr_push_srvsvc_NetServerSetServiceBitsEx(struct ndr_push *ndr, int flags, const struct srvsvc_NetServerSetServiceBitsEx *r)
18892 if (flags & NDR_IN) {
18893 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.server_unc));
18894 if (r->in.server_unc) {
18895 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18896 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18897 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_unc, CH_UTF16)));
18898 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));
18900 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.emulated_server_unc));
18901 if (r->in.emulated_server_unc) {
18902 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.emulated_server_unc, CH_UTF16)));
18903 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18904 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.emulated_server_unc, CH_UTF16)));
18905 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));
18907 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.transport));
18908 if (r->in.transport) {
18909 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.transport, CH_UTF16)));
18910 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
18911 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.transport, CH_UTF16)));
18912 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.transport, ndr_charset_length(r->in.transport, CH_UTF16), sizeof(uint16_t), CH_UTF16));
18914 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.servicebitsofinterest));
18915 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.servicebits));
18916 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.updateimmediately));
18918 if (flags & NDR_OUT) {
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_NetServerSetServiceBitsEx(struct ndr_pull *ndr, int flags, struct srvsvc_NetServerSetServiceBitsEx *r)
18926 uint32_t _ptr_server_unc;
18927 uint32_t _ptr_emulated_server_unc;
18928 uint32_t _ptr_transport;
18929 TALLOC_CTX *_mem_save_server_unc_0;
18930 TALLOC_CTX *_mem_save_emulated_server_unc_0;
18931 TALLOC_CTX *_mem_save_transport_0;
18932 if (flags & NDR_IN) {
18933 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_unc));
18934 if (_ptr_server_unc) {
18935 NDR_PULL_ALLOC(ndr, r->in.server_unc);
18936 } else {
18937 r->in.server_unc = NULL;
18939 if (r->in.server_unc) {
18940 _mem_save_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
18941 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_unc, 0);
18942 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_unc));
18943 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_unc));
18944 if (ndr_get_array_length(ndr, &r->in.server_unc) > ndr_get_array_size(ndr, &r->in.server_unc)) {
18945 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_unc), ndr_get_array_length(ndr, &r->in.server_unc));
18947 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t)));
18948 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_unc, ndr_get_array_length(ndr, &r->in.server_unc), sizeof(uint16_t), CH_UTF16));
18949 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_unc_0, 0);
18951 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_emulated_server_unc));
18952 if (_ptr_emulated_server_unc) {
18953 NDR_PULL_ALLOC(ndr, r->in.emulated_server_unc);
18954 } else {
18955 r->in.emulated_server_unc = NULL;
18957 if (r->in.emulated_server_unc) {
18958 _mem_save_emulated_server_unc_0 = NDR_PULL_GET_MEM_CTX(ndr);
18959 NDR_PULL_SET_MEM_CTX(ndr, r->in.emulated_server_unc, 0);
18960 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.emulated_server_unc));
18961 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.emulated_server_unc));
18962 if (ndr_get_array_length(ndr, &r->in.emulated_server_unc) > ndr_get_array_size(ndr, &r->in.emulated_server_unc)) {
18963 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.emulated_server_unc), ndr_get_array_length(ndr, &r->in.emulated_server_unc));
18965 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.emulated_server_unc), sizeof(uint16_t)));
18966 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.emulated_server_unc, ndr_get_array_length(ndr, &r->in.emulated_server_unc), sizeof(uint16_t), CH_UTF16));
18967 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_emulated_server_unc_0, 0);
18969 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_transport));
18970 if (_ptr_transport) {
18971 NDR_PULL_ALLOC(ndr, r->in.transport);
18972 } else {
18973 r->in.transport = NULL;
18975 if (r->in.transport) {
18976 _mem_save_transport_0 = NDR_PULL_GET_MEM_CTX(ndr);
18977 NDR_PULL_SET_MEM_CTX(ndr, r->in.transport, 0);
18978 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.transport));
18979 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.transport));
18980 if (ndr_get_array_length(ndr, &r->in.transport) > ndr_get_array_size(ndr, &r->in.transport)) {
18981 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.transport), ndr_get_array_length(ndr, &r->in.transport));
18983 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.transport), sizeof(uint16_t)));
18984 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.transport, ndr_get_array_length(ndr, &r->in.transport), sizeof(uint16_t), CH_UTF16));
18985 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_transport_0, 0);
18987 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.servicebitsofinterest));
18988 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.servicebits));
18989 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.updateimmediately));
18991 if (flags & NDR_OUT) {
18992 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
18994 return NDR_ERR_SUCCESS;
18997 _PUBLIC_ void ndr_print_srvsvc_NetServerSetServiceBitsEx(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NetServerSetServiceBitsEx *r)
18999 ndr_print_struct(ndr, name, "srvsvc_NetServerSetServiceBitsEx");
19000 ndr->depth++;
19001 if (flags & NDR_SET_VALUES) {
19002 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19004 if (flags & NDR_IN) {
19005 ndr_print_struct(ndr, "in", "srvsvc_NetServerSetServiceBitsEx");
19006 ndr->depth++;
19007 ndr_print_ptr(ndr, "server_unc", r->in.server_unc);
19008 ndr->depth++;
19009 if (r->in.server_unc) {
19010 ndr_print_string(ndr, "server_unc", r->in.server_unc);
19012 ndr->depth--;
19013 ndr_print_ptr(ndr, "emulated_server_unc", r->in.emulated_server_unc);
19014 ndr->depth++;
19015 if (r->in.emulated_server_unc) {
19016 ndr_print_string(ndr, "emulated_server_unc", r->in.emulated_server_unc);
19018 ndr->depth--;
19019 ndr_print_ptr(ndr, "transport", r->in.transport);
19020 ndr->depth++;
19021 if (r->in.transport) {
19022 ndr_print_string(ndr, "transport", r->in.transport);
19024 ndr->depth--;
19025 ndr_print_uint32(ndr, "servicebitsofinterest", r->in.servicebitsofinterest);
19026 ndr_print_uint32(ndr, "servicebits", r->in.servicebits);
19027 ndr_print_uint32(ndr, "updateimmediately", r->in.updateimmediately);
19028 ndr->depth--;
19030 if (flags & NDR_OUT) {
19031 ndr_print_struct(ndr, "out", "srvsvc_NetServerSetServiceBitsEx");
19032 ndr->depth++;
19033 ndr_print_WERROR(ndr, "result", r->out.result);
19034 ndr->depth--;
19036 ndr->depth--;
19039 static enum ndr_err_code ndr_push_srvsvc_NETRDFSGETVERSION(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSGETVERSION *r)
19041 if (flags & NDR_IN) {
19043 if (flags & NDR_OUT) {
19044 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19046 return NDR_ERR_SUCCESS;
19049 static enum ndr_err_code ndr_pull_srvsvc_NETRDFSGETVERSION(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSGETVERSION *r)
19051 if (flags & NDR_IN) {
19053 if (flags & NDR_OUT) {
19054 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19056 return NDR_ERR_SUCCESS;
19059 _PUBLIC_ void ndr_print_srvsvc_NETRDFSGETVERSION(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSGETVERSION *r)
19061 ndr_print_struct(ndr, name, "srvsvc_NETRDFSGETVERSION");
19062 ndr->depth++;
19063 if (flags & NDR_SET_VALUES) {
19064 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19066 if (flags & NDR_IN) {
19067 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSGETVERSION");
19068 ndr->depth++;
19069 ndr->depth--;
19071 if (flags & NDR_OUT) {
19072 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSGETVERSION");
19073 ndr->depth++;
19074 ndr_print_WERROR(ndr, "result", r->out.result);
19075 ndr->depth--;
19077 ndr->depth--;
19080 static enum ndr_err_code ndr_push_srvsvc_NETRDFSCREATELOCALPARTITION(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSCREATELOCALPARTITION *r)
19082 if (flags & NDR_IN) {
19084 if (flags & NDR_OUT) {
19085 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19087 return NDR_ERR_SUCCESS;
19090 static enum ndr_err_code ndr_pull_srvsvc_NETRDFSCREATELOCALPARTITION(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSCREATELOCALPARTITION *r)
19092 if (flags & NDR_IN) {
19094 if (flags & NDR_OUT) {
19095 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19097 return NDR_ERR_SUCCESS;
19100 _PUBLIC_ void ndr_print_srvsvc_NETRDFSCREATELOCALPARTITION(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSCREATELOCALPARTITION *r)
19102 ndr_print_struct(ndr, name, "srvsvc_NETRDFSCREATELOCALPARTITION");
19103 ndr->depth++;
19104 if (flags & NDR_SET_VALUES) {
19105 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19107 if (flags & NDR_IN) {
19108 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSCREATELOCALPARTITION");
19109 ndr->depth++;
19110 ndr->depth--;
19112 if (flags & NDR_OUT) {
19113 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSCREATELOCALPARTITION");
19114 ndr->depth++;
19115 ndr_print_WERROR(ndr, "result", r->out.result);
19116 ndr->depth--;
19118 ndr->depth--;
19121 static enum ndr_err_code ndr_push_srvsvc_NETRDFSDELETELOCALPARTITION(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSDELETELOCALPARTITION *r)
19123 if (flags & NDR_IN) {
19125 if (flags & NDR_OUT) {
19126 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19128 return NDR_ERR_SUCCESS;
19131 static enum ndr_err_code ndr_pull_srvsvc_NETRDFSDELETELOCALPARTITION(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSDELETELOCALPARTITION *r)
19133 if (flags & NDR_IN) {
19135 if (flags & NDR_OUT) {
19136 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19138 return NDR_ERR_SUCCESS;
19141 _PUBLIC_ void ndr_print_srvsvc_NETRDFSDELETELOCALPARTITION(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSDELETELOCALPARTITION *r)
19143 ndr_print_struct(ndr, name, "srvsvc_NETRDFSDELETELOCALPARTITION");
19144 ndr->depth++;
19145 if (flags & NDR_SET_VALUES) {
19146 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19148 if (flags & NDR_IN) {
19149 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSDELETELOCALPARTITION");
19150 ndr->depth++;
19151 ndr->depth--;
19153 if (flags & NDR_OUT) {
19154 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSDELETELOCALPARTITION");
19155 ndr->depth++;
19156 ndr_print_WERROR(ndr, "result", r->out.result);
19157 ndr->depth--;
19159 ndr->depth--;
19162 static enum ndr_err_code ndr_push_srvsvc_NETRDFSSETLOCALVOLUMESTATE(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSSETLOCALVOLUMESTATE *r)
19164 if (flags & NDR_IN) {
19166 if (flags & NDR_OUT) {
19167 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19169 return NDR_ERR_SUCCESS;
19172 static enum ndr_err_code ndr_pull_srvsvc_NETRDFSSETLOCALVOLUMESTATE(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSSETLOCALVOLUMESTATE *r)
19174 if (flags & NDR_IN) {
19176 if (flags & NDR_OUT) {
19177 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19179 return NDR_ERR_SUCCESS;
19182 _PUBLIC_ void ndr_print_srvsvc_NETRDFSSETLOCALVOLUMESTATE(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSSETLOCALVOLUMESTATE *r)
19184 ndr_print_struct(ndr, name, "srvsvc_NETRDFSSETLOCALVOLUMESTATE");
19185 ndr->depth++;
19186 if (flags & NDR_SET_VALUES) {
19187 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19189 if (flags & NDR_IN) {
19190 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSSETLOCALVOLUMESTATE");
19191 ndr->depth++;
19192 ndr->depth--;
19194 if (flags & NDR_OUT) {
19195 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSSETLOCALVOLUMESTATE");
19196 ndr->depth++;
19197 ndr_print_WERROR(ndr, "result", r->out.result);
19198 ndr->depth--;
19200 ndr->depth--;
19203 static enum ndr_err_code ndr_push_srvsvc_NETRDFSSETSERVERINFO(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSSETSERVERINFO *r)
19205 if (flags & NDR_IN) {
19207 if (flags & NDR_OUT) {
19208 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19210 return NDR_ERR_SUCCESS;
19213 static enum ndr_err_code ndr_pull_srvsvc_NETRDFSSETSERVERINFO(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSSETSERVERINFO *r)
19215 if (flags & NDR_IN) {
19217 if (flags & NDR_OUT) {
19218 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19220 return NDR_ERR_SUCCESS;
19223 _PUBLIC_ void ndr_print_srvsvc_NETRDFSSETSERVERINFO(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSSETSERVERINFO *r)
19225 ndr_print_struct(ndr, name, "srvsvc_NETRDFSSETSERVERINFO");
19226 ndr->depth++;
19227 if (flags & NDR_SET_VALUES) {
19228 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19230 if (flags & NDR_IN) {
19231 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSSETSERVERINFO");
19232 ndr->depth++;
19233 ndr->depth--;
19235 if (flags & NDR_OUT) {
19236 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSSETSERVERINFO");
19237 ndr->depth++;
19238 ndr_print_WERROR(ndr, "result", r->out.result);
19239 ndr->depth--;
19241 ndr->depth--;
19244 static enum ndr_err_code ndr_push_srvsvc_NETRDFSCREATEEXITPOINT(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSCREATEEXITPOINT *r)
19246 if (flags & NDR_IN) {
19248 if (flags & NDR_OUT) {
19249 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19251 return NDR_ERR_SUCCESS;
19254 static enum ndr_err_code ndr_pull_srvsvc_NETRDFSCREATEEXITPOINT(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSCREATEEXITPOINT *r)
19256 if (flags & NDR_IN) {
19258 if (flags & NDR_OUT) {
19259 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19261 return NDR_ERR_SUCCESS;
19264 _PUBLIC_ void ndr_print_srvsvc_NETRDFSCREATEEXITPOINT(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSCREATEEXITPOINT *r)
19266 ndr_print_struct(ndr, name, "srvsvc_NETRDFSCREATEEXITPOINT");
19267 ndr->depth++;
19268 if (flags & NDR_SET_VALUES) {
19269 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19271 if (flags & NDR_IN) {
19272 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSCREATEEXITPOINT");
19273 ndr->depth++;
19274 ndr->depth--;
19276 if (flags & NDR_OUT) {
19277 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSCREATEEXITPOINT");
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_NETRDFSDELETEEXITPOINT(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSDELETEEXITPOINT *r)
19287 if (flags & NDR_IN) {
19289 if (flags & NDR_OUT) {
19290 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19292 return NDR_ERR_SUCCESS;
19295 static enum ndr_err_code ndr_pull_srvsvc_NETRDFSDELETEEXITPOINT(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSDELETEEXITPOINT *r)
19297 if (flags & NDR_IN) {
19299 if (flags & NDR_OUT) {
19300 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19302 return NDR_ERR_SUCCESS;
19305 _PUBLIC_ void ndr_print_srvsvc_NETRDFSDELETEEXITPOINT(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSDELETEEXITPOINT *r)
19307 ndr_print_struct(ndr, name, "srvsvc_NETRDFSDELETEEXITPOINT");
19308 ndr->depth++;
19309 if (flags & NDR_SET_VALUES) {
19310 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19312 if (flags & NDR_IN) {
19313 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSDELETEEXITPOINT");
19314 ndr->depth++;
19315 ndr->depth--;
19317 if (flags & NDR_OUT) {
19318 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSDELETEEXITPOINT");
19319 ndr->depth++;
19320 ndr_print_WERROR(ndr, "result", r->out.result);
19321 ndr->depth--;
19323 ndr->depth--;
19326 static enum ndr_err_code ndr_push_srvsvc_NETRDFSMODIFYPREFIX(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSMODIFYPREFIX *r)
19328 if (flags & NDR_IN) {
19330 if (flags & NDR_OUT) {
19331 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19333 return NDR_ERR_SUCCESS;
19336 static enum ndr_err_code ndr_pull_srvsvc_NETRDFSMODIFYPREFIX(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSMODIFYPREFIX *r)
19338 if (flags & NDR_IN) {
19340 if (flags & NDR_OUT) {
19341 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19343 return NDR_ERR_SUCCESS;
19346 _PUBLIC_ void ndr_print_srvsvc_NETRDFSMODIFYPREFIX(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSMODIFYPREFIX *r)
19348 ndr_print_struct(ndr, name, "srvsvc_NETRDFSMODIFYPREFIX");
19349 ndr->depth++;
19350 if (flags & NDR_SET_VALUES) {
19351 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19353 if (flags & NDR_IN) {
19354 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSMODIFYPREFIX");
19355 ndr->depth++;
19356 ndr->depth--;
19358 if (flags & NDR_OUT) {
19359 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSMODIFYPREFIX");
19360 ndr->depth++;
19361 ndr_print_WERROR(ndr, "result", r->out.result);
19362 ndr->depth--;
19364 ndr->depth--;
19367 static enum ndr_err_code ndr_push_srvsvc_NETRDFSFIXLOCALVOLUME(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSFIXLOCALVOLUME *r)
19369 if (flags & NDR_IN) {
19371 if (flags & NDR_OUT) {
19372 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19374 return NDR_ERR_SUCCESS;
19377 static enum ndr_err_code ndr_pull_srvsvc_NETRDFSFIXLOCALVOLUME(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSFIXLOCALVOLUME *r)
19379 if (flags & NDR_IN) {
19381 if (flags & NDR_OUT) {
19382 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19384 return NDR_ERR_SUCCESS;
19387 _PUBLIC_ void ndr_print_srvsvc_NETRDFSFIXLOCALVOLUME(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSFIXLOCALVOLUME *r)
19389 ndr_print_struct(ndr, name, "srvsvc_NETRDFSFIXLOCALVOLUME");
19390 ndr->depth++;
19391 if (flags & NDR_SET_VALUES) {
19392 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19394 if (flags & NDR_IN) {
19395 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSFIXLOCALVOLUME");
19396 ndr->depth++;
19397 ndr->depth--;
19399 if (flags & NDR_OUT) {
19400 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSFIXLOCALVOLUME");
19401 ndr->depth++;
19402 ndr_print_WERROR(ndr, "result", r->out.result);
19403 ndr->depth--;
19405 ndr->depth--;
19408 static enum ndr_err_code ndr_push_srvsvc_NETRDFSMANAGERREPORTSITEINFO(struct ndr_push *ndr, int flags, const struct srvsvc_NETRDFSMANAGERREPORTSITEINFO *r)
19410 if (flags & NDR_IN) {
19412 if (flags & NDR_OUT) {
19413 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19415 return NDR_ERR_SUCCESS;
19418 static enum ndr_err_code ndr_pull_srvsvc_NETRDFSMANAGERREPORTSITEINFO(struct ndr_pull *ndr, int flags, struct srvsvc_NETRDFSMANAGERREPORTSITEINFO *r)
19420 if (flags & NDR_IN) {
19422 if (flags & NDR_OUT) {
19423 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19425 return NDR_ERR_SUCCESS;
19428 _PUBLIC_ void ndr_print_srvsvc_NETRDFSMANAGERREPORTSITEINFO(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRDFSMANAGERREPORTSITEINFO *r)
19430 ndr_print_struct(ndr, name, "srvsvc_NETRDFSMANAGERREPORTSITEINFO");
19431 ndr->depth++;
19432 if (flags & NDR_SET_VALUES) {
19433 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19435 if (flags & NDR_IN) {
19436 ndr_print_struct(ndr, "in", "srvsvc_NETRDFSMANAGERREPORTSITEINFO");
19437 ndr->depth++;
19438 ndr->depth--;
19440 if (flags & NDR_OUT) {
19441 ndr_print_struct(ndr, "out", "srvsvc_NETRDFSMANAGERREPORTSITEINFO");
19442 ndr->depth++;
19443 ndr_print_WERROR(ndr, "result", r->out.result);
19444 ndr->depth--;
19446 ndr->depth--;
19449 static enum ndr_err_code ndr_push_srvsvc_NETRSERVERTRANSPORTDELEX(struct ndr_push *ndr, int flags, const struct srvsvc_NETRSERVERTRANSPORTDELEX *r)
19451 if (flags & NDR_IN) {
19453 if (flags & NDR_OUT) {
19454 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
19456 return NDR_ERR_SUCCESS;
19459 static enum ndr_err_code ndr_pull_srvsvc_NETRSERVERTRANSPORTDELEX(struct ndr_pull *ndr, int flags, struct srvsvc_NETRSERVERTRANSPORTDELEX *r)
19461 if (flags & NDR_IN) {
19463 if (flags & NDR_OUT) {
19464 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
19466 return NDR_ERR_SUCCESS;
19469 _PUBLIC_ void ndr_print_srvsvc_NETRSERVERTRANSPORTDELEX(struct ndr_print *ndr, const char *name, int flags, const struct srvsvc_NETRSERVERTRANSPORTDELEX *r)
19471 ndr_print_struct(ndr, name, "srvsvc_NETRSERVERTRANSPORTDELEX");
19472 ndr->depth++;
19473 if (flags & NDR_SET_VALUES) {
19474 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
19476 if (flags & NDR_IN) {
19477 ndr_print_struct(ndr, "in", "srvsvc_NETRSERVERTRANSPORTDELEX");
19478 ndr->depth++;
19479 ndr->depth--;
19481 if (flags & NDR_OUT) {
19482 ndr_print_struct(ndr, "out", "srvsvc_NETRSERVERTRANSPORTDELEX");
19483 ndr->depth++;
19484 ndr_print_WERROR(ndr, "result", r->out.result);
19485 ndr->depth--;
19487 ndr->depth--;
19490 static const struct ndr_interface_call srvsvc_calls[] = {
19492 "srvsvc_NetCharDevEnum",
19493 sizeof(struct srvsvc_NetCharDevEnum),
19494 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevEnum,
19495 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevEnum,
19496 (ndr_print_function_t) ndr_print_srvsvc_NetCharDevEnum,
19497 false,
19500 "srvsvc_NetCharDevGetInfo",
19501 sizeof(struct srvsvc_NetCharDevGetInfo),
19502 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevGetInfo,
19503 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevGetInfo,
19504 (ndr_print_function_t) ndr_print_srvsvc_NetCharDevGetInfo,
19505 false,
19508 "srvsvc_NetCharDevControl",
19509 sizeof(struct srvsvc_NetCharDevControl),
19510 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevControl,
19511 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevControl,
19512 (ndr_print_function_t) ndr_print_srvsvc_NetCharDevControl,
19513 false,
19516 "srvsvc_NetCharDevQEnum",
19517 sizeof(struct srvsvc_NetCharDevQEnum),
19518 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevQEnum,
19519 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevQEnum,
19520 (ndr_print_function_t) ndr_print_srvsvc_NetCharDevQEnum,
19521 false,
19524 "srvsvc_NetCharDevQGetInfo",
19525 sizeof(struct srvsvc_NetCharDevQGetInfo),
19526 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevQGetInfo,
19527 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevQGetInfo,
19528 (ndr_print_function_t) ndr_print_srvsvc_NetCharDevQGetInfo,
19529 false,
19532 "srvsvc_NetCharDevQSetInfo",
19533 sizeof(struct srvsvc_NetCharDevQSetInfo),
19534 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevQSetInfo,
19535 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevQSetInfo,
19536 (ndr_print_function_t) ndr_print_srvsvc_NetCharDevQSetInfo,
19537 false,
19540 "srvsvc_NetCharDevQPurge",
19541 sizeof(struct srvsvc_NetCharDevQPurge),
19542 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevQPurge,
19543 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevQPurge,
19544 (ndr_print_function_t) ndr_print_srvsvc_NetCharDevQPurge,
19545 false,
19548 "srvsvc_NetCharDevQPurgeSelf",
19549 sizeof(struct srvsvc_NetCharDevQPurgeSelf),
19550 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetCharDevQPurgeSelf,
19551 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetCharDevQPurgeSelf,
19552 (ndr_print_function_t) ndr_print_srvsvc_NetCharDevQPurgeSelf,
19553 false,
19556 "srvsvc_NetConnEnum",
19557 sizeof(struct srvsvc_NetConnEnum),
19558 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetConnEnum,
19559 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetConnEnum,
19560 (ndr_print_function_t) ndr_print_srvsvc_NetConnEnum,
19561 false,
19564 "srvsvc_NetFileEnum",
19565 sizeof(struct srvsvc_NetFileEnum),
19566 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetFileEnum,
19567 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetFileEnum,
19568 (ndr_print_function_t) ndr_print_srvsvc_NetFileEnum,
19569 false,
19572 "srvsvc_NetFileGetInfo",
19573 sizeof(struct srvsvc_NetFileGetInfo),
19574 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetFileGetInfo,
19575 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetFileGetInfo,
19576 (ndr_print_function_t) ndr_print_srvsvc_NetFileGetInfo,
19577 false,
19580 "srvsvc_NetFileClose",
19581 sizeof(struct srvsvc_NetFileClose),
19582 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetFileClose,
19583 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetFileClose,
19584 (ndr_print_function_t) ndr_print_srvsvc_NetFileClose,
19585 false,
19588 "srvsvc_NetSessEnum",
19589 sizeof(struct srvsvc_NetSessEnum),
19590 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetSessEnum,
19591 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetSessEnum,
19592 (ndr_print_function_t) ndr_print_srvsvc_NetSessEnum,
19593 false,
19596 "srvsvc_NetSessDel",
19597 sizeof(struct srvsvc_NetSessDel),
19598 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetSessDel,
19599 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetSessDel,
19600 (ndr_print_function_t) ndr_print_srvsvc_NetSessDel,
19601 false,
19604 "srvsvc_NetShareAdd",
19605 sizeof(struct srvsvc_NetShareAdd),
19606 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareAdd,
19607 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareAdd,
19608 (ndr_print_function_t) ndr_print_srvsvc_NetShareAdd,
19609 false,
19612 "srvsvc_NetShareEnumAll",
19613 sizeof(struct srvsvc_NetShareEnumAll),
19614 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareEnumAll,
19615 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareEnumAll,
19616 (ndr_print_function_t) ndr_print_srvsvc_NetShareEnumAll,
19617 false,
19620 "srvsvc_NetShareGetInfo",
19621 sizeof(struct srvsvc_NetShareGetInfo),
19622 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareGetInfo,
19623 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareGetInfo,
19624 (ndr_print_function_t) ndr_print_srvsvc_NetShareGetInfo,
19625 false,
19628 "srvsvc_NetShareSetInfo",
19629 sizeof(struct srvsvc_NetShareSetInfo),
19630 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareSetInfo,
19631 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareSetInfo,
19632 (ndr_print_function_t) ndr_print_srvsvc_NetShareSetInfo,
19633 false,
19636 "srvsvc_NetShareDel",
19637 sizeof(struct srvsvc_NetShareDel),
19638 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareDel,
19639 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareDel,
19640 (ndr_print_function_t) ndr_print_srvsvc_NetShareDel,
19641 false,
19644 "srvsvc_NetShareDelSticky",
19645 sizeof(struct srvsvc_NetShareDelSticky),
19646 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareDelSticky,
19647 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareDelSticky,
19648 (ndr_print_function_t) ndr_print_srvsvc_NetShareDelSticky,
19649 false,
19652 "srvsvc_NetShareCheck",
19653 sizeof(struct srvsvc_NetShareCheck),
19654 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareCheck,
19655 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareCheck,
19656 (ndr_print_function_t) ndr_print_srvsvc_NetShareCheck,
19657 false,
19660 "srvsvc_NetSrvGetInfo",
19661 sizeof(struct srvsvc_NetSrvGetInfo),
19662 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetSrvGetInfo,
19663 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetSrvGetInfo,
19664 (ndr_print_function_t) ndr_print_srvsvc_NetSrvGetInfo,
19665 false,
19668 "srvsvc_NetSrvSetInfo",
19669 sizeof(struct srvsvc_NetSrvSetInfo),
19670 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetSrvSetInfo,
19671 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetSrvSetInfo,
19672 (ndr_print_function_t) ndr_print_srvsvc_NetSrvSetInfo,
19673 false,
19676 "srvsvc_NetDiskEnum",
19677 sizeof(struct srvsvc_NetDiskEnum),
19678 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetDiskEnum,
19679 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetDiskEnum,
19680 (ndr_print_function_t) ndr_print_srvsvc_NetDiskEnum,
19681 false,
19684 "srvsvc_NetServerStatisticsGet",
19685 sizeof(struct srvsvc_NetServerStatisticsGet),
19686 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetServerStatisticsGet,
19687 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetServerStatisticsGet,
19688 (ndr_print_function_t) ndr_print_srvsvc_NetServerStatisticsGet,
19689 false,
19692 "srvsvc_NetTransportAdd",
19693 sizeof(struct srvsvc_NetTransportAdd),
19694 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetTransportAdd,
19695 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetTransportAdd,
19696 (ndr_print_function_t) ndr_print_srvsvc_NetTransportAdd,
19697 false,
19700 "srvsvc_NetTransportEnum",
19701 sizeof(struct srvsvc_NetTransportEnum),
19702 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetTransportEnum,
19703 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetTransportEnum,
19704 (ndr_print_function_t) ndr_print_srvsvc_NetTransportEnum,
19705 false,
19708 "srvsvc_NetTransportDel",
19709 sizeof(struct srvsvc_NetTransportDel),
19710 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetTransportDel,
19711 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetTransportDel,
19712 (ndr_print_function_t) ndr_print_srvsvc_NetTransportDel,
19713 false,
19716 "srvsvc_NetRemoteTOD",
19717 sizeof(struct srvsvc_NetRemoteTOD),
19718 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetRemoteTOD,
19719 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetRemoteTOD,
19720 (ndr_print_function_t) ndr_print_srvsvc_NetRemoteTOD,
19721 false,
19724 "srvsvc_NetSetServiceBits",
19725 sizeof(struct srvsvc_NetSetServiceBits),
19726 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetSetServiceBits,
19727 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetSetServiceBits,
19728 (ndr_print_function_t) ndr_print_srvsvc_NetSetServiceBits,
19729 false,
19732 "srvsvc_NetPathType",
19733 sizeof(struct srvsvc_NetPathType),
19734 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetPathType,
19735 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetPathType,
19736 (ndr_print_function_t) ndr_print_srvsvc_NetPathType,
19737 false,
19740 "srvsvc_NetPathCanonicalize",
19741 sizeof(struct srvsvc_NetPathCanonicalize),
19742 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetPathCanonicalize,
19743 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetPathCanonicalize,
19744 (ndr_print_function_t) ndr_print_srvsvc_NetPathCanonicalize,
19745 false,
19748 "srvsvc_NetPathCompare",
19749 sizeof(struct srvsvc_NetPathCompare),
19750 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetPathCompare,
19751 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetPathCompare,
19752 (ndr_print_function_t) ndr_print_srvsvc_NetPathCompare,
19753 false,
19756 "srvsvc_NetNameValidate",
19757 sizeof(struct srvsvc_NetNameValidate),
19758 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetNameValidate,
19759 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetNameValidate,
19760 (ndr_print_function_t) ndr_print_srvsvc_NetNameValidate,
19761 false,
19764 "srvsvc_NETRPRNAMECANONICALIZE",
19765 sizeof(struct srvsvc_NETRPRNAMECANONICALIZE),
19766 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRPRNAMECANONICALIZE,
19767 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRPRNAMECANONICALIZE,
19768 (ndr_print_function_t) ndr_print_srvsvc_NETRPRNAMECANONICALIZE,
19769 false,
19772 "srvsvc_NetPRNameCompare",
19773 sizeof(struct srvsvc_NetPRNameCompare),
19774 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetPRNameCompare,
19775 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetPRNameCompare,
19776 (ndr_print_function_t) ndr_print_srvsvc_NetPRNameCompare,
19777 false,
19780 "srvsvc_NetShareEnum",
19781 sizeof(struct srvsvc_NetShareEnum),
19782 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareEnum,
19783 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareEnum,
19784 (ndr_print_function_t) ndr_print_srvsvc_NetShareEnum,
19785 false,
19788 "srvsvc_NetShareDelStart",
19789 sizeof(struct srvsvc_NetShareDelStart),
19790 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareDelStart,
19791 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareDelStart,
19792 (ndr_print_function_t) ndr_print_srvsvc_NetShareDelStart,
19793 false,
19796 "srvsvc_NetShareDelCommit",
19797 sizeof(struct srvsvc_NetShareDelCommit),
19798 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetShareDelCommit,
19799 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetShareDelCommit,
19800 (ndr_print_function_t) ndr_print_srvsvc_NetShareDelCommit,
19801 false,
19804 "srvsvc_NetGetFileSecurity",
19805 sizeof(struct srvsvc_NetGetFileSecurity),
19806 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetGetFileSecurity,
19807 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetGetFileSecurity,
19808 (ndr_print_function_t) ndr_print_srvsvc_NetGetFileSecurity,
19809 false,
19812 "srvsvc_NetSetFileSecurity",
19813 sizeof(struct srvsvc_NetSetFileSecurity),
19814 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetSetFileSecurity,
19815 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetSetFileSecurity,
19816 (ndr_print_function_t) ndr_print_srvsvc_NetSetFileSecurity,
19817 false,
19820 "srvsvc_NetServerTransportAddEx",
19821 sizeof(struct srvsvc_NetServerTransportAddEx),
19822 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetServerTransportAddEx,
19823 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetServerTransportAddEx,
19824 (ndr_print_function_t) ndr_print_srvsvc_NetServerTransportAddEx,
19825 false,
19828 "srvsvc_NetServerSetServiceBitsEx",
19829 sizeof(struct srvsvc_NetServerSetServiceBitsEx),
19830 (ndr_push_flags_fn_t) ndr_push_srvsvc_NetServerSetServiceBitsEx,
19831 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NetServerSetServiceBitsEx,
19832 (ndr_print_function_t) ndr_print_srvsvc_NetServerSetServiceBitsEx,
19833 false,
19836 "srvsvc_NETRDFSGETVERSION",
19837 sizeof(struct srvsvc_NETRDFSGETVERSION),
19838 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSGETVERSION,
19839 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSGETVERSION,
19840 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSGETVERSION,
19841 false,
19844 "srvsvc_NETRDFSCREATELOCALPARTITION",
19845 sizeof(struct srvsvc_NETRDFSCREATELOCALPARTITION),
19846 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSCREATELOCALPARTITION,
19847 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSCREATELOCALPARTITION,
19848 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSCREATELOCALPARTITION,
19849 false,
19852 "srvsvc_NETRDFSDELETELOCALPARTITION",
19853 sizeof(struct srvsvc_NETRDFSDELETELOCALPARTITION),
19854 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSDELETELOCALPARTITION,
19855 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSDELETELOCALPARTITION,
19856 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSDELETELOCALPARTITION,
19857 false,
19860 "srvsvc_NETRDFSSETLOCALVOLUMESTATE",
19861 sizeof(struct srvsvc_NETRDFSSETLOCALVOLUMESTATE),
19862 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSSETLOCALVOLUMESTATE,
19863 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSSETLOCALVOLUMESTATE,
19864 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSSETLOCALVOLUMESTATE,
19865 false,
19868 "srvsvc_NETRDFSSETSERVERINFO",
19869 sizeof(struct srvsvc_NETRDFSSETSERVERINFO),
19870 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSSETSERVERINFO,
19871 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSSETSERVERINFO,
19872 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSSETSERVERINFO,
19873 false,
19876 "srvsvc_NETRDFSCREATEEXITPOINT",
19877 sizeof(struct srvsvc_NETRDFSCREATEEXITPOINT),
19878 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSCREATEEXITPOINT,
19879 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSCREATEEXITPOINT,
19880 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSCREATEEXITPOINT,
19881 false,
19884 "srvsvc_NETRDFSDELETEEXITPOINT",
19885 sizeof(struct srvsvc_NETRDFSDELETEEXITPOINT),
19886 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSDELETEEXITPOINT,
19887 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSDELETEEXITPOINT,
19888 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSDELETEEXITPOINT,
19889 false,
19892 "srvsvc_NETRDFSMODIFYPREFIX",
19893 sizeof(struct srvsvc_NETRDFSMODIFYPREFIX),
19894 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSMODIFYPREFIX,
19895 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSMODIFYPREFIX,
19896 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSMODIFYPREFIX,
19897 false,
19900 "srvsvc_NETRDFSFIXLOCALVOLUME",
19901 sizeof(struct srvsvc_NETRDFSFIXLOCALVOLUME),
19902 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSFIXLOCALVOLUME,
19903 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSFIXLOCALVOLUME,
19904 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSFIXLOCALVOLUME,
19905 false,
19908 "srvsvc_NETRDFSMANAGERREPORTSITEINFO",
19909 sizeof(struct srvsvc_NETRDFSMANAGERREPORTSITEINFO),
19910 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRDFSMANAGERREPORTSITEINFO,
19911 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRDFSMANAGERREPORTSITEINFO,
19912 (ndr_print_function_t) ndr_print_srvsvc_NETRDFSMANAGERREPORTSITEINFO,
19913 false,
19916 "srvsvc_NETRSERVERTRANSPORTDELEX",
19917 sizeof(struct srvsvc_NETRSERVERTRANSPORTDELEX),
19918 (ndr_push_flags_fn_t) ndr_push_srvsvc_NETRSERVERTRANSPORTDELEX,
19919 (ndr_pull_flags_fn_t) ndr_pull_srvsvc_NETRSERVERTRANSPORTDELEX,
19920 (ndr_print_function_t) ndr_print_srvsvc_NETRSERVERTRANSPORTDELEX,
19921 false,
19923 { NULL, 0, NULL, NULL, NULL, false }
19926 static const char * const srvsvc_endpoint_strings[] = {
19927 "ncacn_np:[\\pipe\\srvsvc]",
19928 "ncacn_ip_tcp:",
19929 "ncalrpc:",
19932 static const struct ndr_interface_string_array srvsvc_endpoints = {
19933 .count = 3,
19934 .names = srvsvc_endpoint_strings
19937 static const char * const srvsvc_authservice_strings[] = {
19938 "host",
19941 static const struct ndr_interface_string_array srvsvc_authservices = {
19942 .count = 1,
19943 .names = srvsvc_authservice_strings
19947 const struct ndr_interface_table ndr_table_srvsvc = {
19948 .name = "srvsvc",
19949 .syntax_id = {
19950 {0x4b324fc8,0x1670,0x01d3,{0x12,0x78},{0x5a,0x47,0xbf,0x6e,0xe1,0x88}},
19951 NDR_SRVSVC_VERSION
19953 .helpstring = NDR_SRVSVC_HELPSTRING,
19954 .num_calls = 54,
19955 .calls = srvsvc_calls,
19956 .endpoints = &srvsvc_endpoints,
19957 .authservices = &srvsvc_authservices