rerun 'make samba3-idl'
[Samba.git] / librpc / gen_ndr / ndr_dfs.c
blob87130ccbfdbfddd28ca73758f215403ddfd27486
1 /* parser auto-generated by pidl */
3 #include "includes.h"
4 #include "../librpc/gen_ndr/ndr_dfs.h"
6 #include "librpc/gen_ndr/ndr_misc.h"
7 static enum ndr_err_code ndr_push_dfs_ManagerVersion(struct ndr_push *ndr, int ndr_flags, enum dfs_ManagerVersion r)
9 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
10 return NDR_ERR_SUCCESS;
13 static enum ndr_err_code ndr_pull_dfs_ManagerVersion(struct ndr_pull *ndr, int ndr_flags, enum dfs_ManagerVersion *r)
15 uint32_t v;
16 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
17 *r = v;
18 return NDR_ERR_SUCCESS;
21 _PUBLIC_ void ndr_print_dfs_ManagerVersion(struct ndr_print *ndr, const char *name, enum dfs_ManagerVersion r)
23 const char *val = NULL;
25 switch (r) {
26 case DFS_MANAGER_VERSION_NT4: val = "DFS_MANAGER_VERSION_NT4"; break;
27 case DFS_MANAGER_VERSION_W2K: val = "DFS_MANAGER_VERSION_W2K"; break;
28 case DFS_MANAGER_VERSION_W2K3: val = "DFS_MANAGER_VERSION_W2K3"; break;
29 case DFS_MANAGER_VERSION_W2K8: val = "DFS_MANAGER_VERSION_W2K8"; break;
31 ndr_print_enum(ndr, name, "ENUM", val, r);
34 static enum ndr_err_code ndr_push_dfs_Info0(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info0 *r)
36 if (ndr_flags & NDR_SCALARS) {
37 NDR_CHECK(ndr_push_align(ndr, 1));
39 if (ndr_flags & NDR_BUFFERS) {
41 return NDR_ERR_SUCCESS;
44 static enum ndr_err_code ndr_pull_dfs_Info0(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info0 *r)
46 if (ndr_flags & NDR_SCALARS) {
47 NDR_CHECK(ndr_pull_align(ndr, 1));
49 if (ndr_flags & NDR_BUFFERS) {
51 return NDR_ERR_SUCCESS;
54 _PUBLIC_ void ndr_print_dfs_Info0(struct ndr_print *ndr, const char *name, const struct dfs_Info0 *r)
56 ndr_print_struct(ndr, name, "dfs_Info0");
57 ndr->depth++;
58 ndr->depth--;
61 static enum ndr_err_code ndr_push_dfs_Info1(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info1 *r)
63 if (ndr_flags & NDR_SCALARS) {
64 NDR_CHECK(ndr_push_align(ndr, 4));
65 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
67 if (ndr_flags & NDR_BUFFERS) {
68 if (r->path) {
69 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
70 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
71 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
72 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
75 return NDR_ERR_SUCCESS;
78 static enum ndr_err_code ndr_pull_dfs_Info1(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info1 *r)
80 uint32_t _ptr_path;
81 uint32_t size_path_1 = 0;
82 uint32_t length_path_1 = 0;
83 TALLOC_CTX *_mem_save_path_0;
84 if (ndr_flags & NDR_SCALARS) {
85 NDR_CHECK(ndr_pull_align(ndr, 4));
86 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
87 if (_ptr_path) {
88 NDR_PULL_ALLOC(ndr, r->path);
89 } else {
90 r->path = NULL;
93 if (ndr_flags & NDR_BUFFERS) {
94 if (r->path) {
95 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
96 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
97 NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
98 NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
99 size_path_1 = ndr_get_array_size(ndr, &r->path);
100 length_path_1 = ndr_get_array_length(ndr, &r->path);
101 if (length_path_1 > size_path_1) {
102 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_path_1, length_path_1);
104 NDR_CHECK(ndr_check_string_terminator(ndr, length_path_1, sizeof(uint16_t)));
105 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, length_path_1, sizeof(uint16_t), CH_UTF16));
106 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
109 return NDR_ERR_SUCCESS;
112 _PUBLIC_ void ndr_print_dfs_Info1(struct ndr_print *ndr, const char *name, const struct dfs_Info1 *r)
114 ndr_print_struct(ndr, name, "dfs_Info1");
115 ndr->depth++;
116 ndr_print_ptr(ndr, "path", r->path);
117 ndr->depth++;
118 if (r->path) {
119 ndr_print_string(ndr, "path", r->path);
121 ndr->depth--;
122 ndr->depth--;
125 _PUBLIC_ enum ndr_err_code ndr_push_dfs_VolumeState(struct ndr_push *ndr, int ndr_flags, uint32_t r)
127 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
128 return NDR_ERR_SUCCESS;
131 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_VolumeState(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
133 uint32_t v;
134 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
135 *r = v;
136 return NDR_ERR_SUCCESS;
139 _PUBLIC_ void ndr_print_dfs_VolumeState(struct ndr_print *ndr, const char *name, uint32_t r)
141 ndr_print_uint32(ndr, name, r);
142 ndr->depth++;
143 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_OK", DFS_VOLUME_STATE_OK, r);
144 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_INCONSISTENT", DFS_VOLUME_STATE_INCONSISTENT, r);
145 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_OFFLINE", DFS_VOLUME_STATE_OFFLINE, r);
146 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_ONLINE", DFS_VOLUME_STATE_ONLINE, r);
147 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_STANDALONE", DFS_VOLUME_STATE_STANDALONE, r);
148 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_AD_BLOB", DFS_VOLUME_STATE_AD_BLOB, r);
149 ndr->depth--;
152 static enum ndr_err_code ndr_push_dfs_Info2(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info2 *r)
154 if (ndr_flags & NDR_SCALARS) {
155 NDR_CHECK(ndr_push_align(ndr, 4));
156 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
157 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
158 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
159 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
161 if (ndr_flags & NDR_BUFFERS) {
162 if (r->path) {
163 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
164 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
165 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
166 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
168 if (r->comment) {
169 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
170 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
171 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
172 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
175 return NDR_ERR_SUCCESS;
178 static enum ndr_err_code ndr_pull_dfs_Info2(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info2 *r)
180 uint32_t _ptr_path;
181 uint32_t size_path_1 = 0;
182 uint32_t length_path_1 = 0;
183 TALLOC_CTX *_mem_save_path_0;
184 uint32_t _ptr_comment;
185 uint32_t size_comment_1 = 0;
186 uint32_t length_comment_1 = 0;
187 TALLOC_CTX *_mem_save_comment_0;
188 if (ndr_flags & NDR_SCALARS) {
189 NDR_CHECK(ndr_pull_align(ndr, 4));
190 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
191 if (_ptr_path) {
192 NDR_PULL_ALLOC(ndr, r->path);
193 } else {
194 r->path = NULL;
196 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
197 if (_ptr_comment) {
198 NDR_PULL_ALLOC(ndr, r->comment);
199 } else {
200 r->comment = NULL;
202 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
203 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores));
205 if (ndr_flags & NDR_BUFFERS) {
206 if (r->path) {
207 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
208 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
209 NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
210 NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
211 size_path_1 = ndr_get_array_size(ndr, &r->path);
212 length_path_1 = ndr_get_array_length(ndr, &r->path);
213 if (length_path_1 > size_path_1) {
214 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_path_1, length_path_1);
216 NDR_CHECK(ndr_check_string_terminator(ndr, length_path_1, sizeof(uint16_t)));
217 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, length_path_1, sizeof(uint16_t), CH_UTF16));
218 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
220 if (r->comment) {
221 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
222 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
223 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
224 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
225 size_comment_1 = ndr_get_array_size(ndr, &r->comment);
226 length_comment_1 = ndr_get_array_length(ndr, &r->comment);
227 if (length_comment_1 > size_comment_1) {
228 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_comment_1, length_comment_1);
230 NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_1, sizeof(uint16_t)));
231 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, length_comment_1, sizeof(uint16_t), CH_UTF16));
232 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
235 return NDR_ERR_SUCCESS;
238 _PUBLIC_ void ndr_print_dfs_Info2(struct ndr_print *ndr, const char *name, const struct dfs_Info2 *r)
240 ndr_print_struct(ndr, name, "dfs_Info2");
241 ndr->depth++;
242 ndr_print_ptr(ndr, "path", r->path);
243 ndr->depth++;
244 if (r->path) {
245 ndr_print_string(ndr, "path", r->path);
247 ndr->depth--;
248 ndr_print_ptr(ndr, "comment", r->comment);
249 ndr->depth++;
250 if (r->comment) {
251 ndr_print_string(ndr, "comment", r->comment);
253 ndr->depth--;
254 ndr_print_dfs_VolumeState(ndr, "state", r->state);
255 ndr_print_uint32(ndr, "num_stores", r->num_stores);
256 ndr->depth--;
259 _PUBLIC_ enum ndr_err_code ndr_push_dfs_StorageState(struct ndr_push *ndr, int ndr_flags, uint32_t r)
261 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
262 return NDR_ERR_SUCCESS;
265 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_StorageState(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
267 uint32_t v;
268 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
269 *r = v;
270 return NDR_ERR_SUCCESS;
273 _PUBLIC_ void ndr_print_dfs_StorageState(struct ndr_print *ndr, const char *name, uint32_t r)
275 ndr_print_uint32(ndr, name, r);
276 ndr->depth++;
277 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_STORAGE_STATE_OFFLINE", DFS_STORAGE_STATE_OFFLINE, r);
278 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_STORAGE_STATE_ONLINE", DFS_STORAGE_STATE_ONLINE, r);
279 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_STORAGE_STATE_ACTIVE", DFS_STORAGE_STATE_ACTIVE, r);
280 ndr->depth--;
283 static enum ndr_err_code ndr_push_dfs_StorageInfo(struct ndr_push *ndr, int ndr_flags, const struct dfs_StorageInfo *r)
285 if (ndr_flags & NDR_SCALARS) {
286 NDR_CHECK(ndr_push_align(ndr, 4));
287 NDR_CHECK(ndr_push_dfs_StorageState(ndr, NDR_SCALARS, r->state));
288 NDR_CHECK(ndr_push_unique_ptr(ndr, r->server));
289 NDR_CHECK(ndr_push_unique_ptr(ndr, r->share));
291 if (ndr_flags & NDR_BUFFERS) {
292 if (r->server) {
293 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->server, CH_UTF16)));
294 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
295 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->server, CH_UTF16)));
296 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server, ndr_charset_length(r->server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
298 if (r->share) {
299 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->share, CH_UTF16)));
300 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
301 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->share, CH_UTF16)));
302 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->share, ndr_charset_length(r->share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
305 return NDR_ERR_SUCCESS;
308 static enum ndr_err_code ndr_pull_dfs_StorageInfo(struct ndr_pull *ndr, int ndr_flags, struct dfs_StorageInfo *r)
310 uint32_t _ptr_server;
311 uint32_t size_server_1 = 0;
312 uint32_t length_server_1 = 0;
313 TALLOC_CTX *_mem_save_server_0;
314 uint32_t _ptr_share;
315 uint32_t size_share_1 = 0;
316 uint32_t length_share_1 = 0;
317 TALLOC_CTX *_mem_save_share_0;
318 if (ndr_flags & NDR_SCALARS) {
319 NDR_CHECK(ndr_pull_align(ndr, 4));
320 NDR_CHECK(ndr_pull_dfs_StorageState(ndr, NDR_SCALARS, &r->state));
321 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
322 if (_ptr_server) {
323 NDR_PULL_ALLOC(ndr, r->server);
324 } else {
325 r->server = NULL;
327 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share));
328 if (_ptr_share) {
329 NDR_PULL_ALLOC(ndr, r->share);
330 } else {
331 r->share = NULL;
334 if (ndr_flags & NDR_BUFFERS) {
335 if (r->server) {
336 _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
337 NDR_PULL_SET_MEM_CTX(ndr, r->server, 0);
338 NDR_CHECK(ndr_pull_array_size(ndr, &r->server));
339 NDR_CHECK(ndr_pull_array_length(ndr, &r->server));
340 size_server_1 = ndr_get_array_size(ndr, &r->server);
341 length_server_1 = ndr_get_array_length(ndr, &r->server);
342 if (length_server_1 > size_server_1) {
343 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_1, length_server_1);
345 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_1, sizeof(uint16_t)));
346 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server, length_server_1, sizeof(uint16_t), CH_UTF16));
347 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
349 if (r->share) {
350 _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr);
351 NDR_PULL_SET_MEM_CTX(ndr, r->share, 0);
352 NDR_CHECK(ndr_pull_array_size(ndr, &r->share));
353 NDR_CHECK(ndr_pull_array_length(ndr, &r->share));
354 size_share_1 = ndr_get_array_size(ndr, &r->share);
355 length_share_1 = ndr_get_array_length(ndr, &r->share);
356 if (length_share_1 > size_share_1) {
357 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_share_1, length_share_1);
359 NDR_CHECK(ndr_check_string_terminator(ndr, length_share_1, sizeof(uint16_t)));
360 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->share, length_share_1, sizeof(uint16_t), CH_UTF16));
361 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0);
364 return NDR_ERR_SUCCESS;
367 _PUBLIC_ void ndr_print_dfs_StorageInfo(struct ndr_print *ndr, const char *name, const struct dfs_StorageInfo *r)
369 ndr_print_struct(ndr, name, "dfs_StorageInfo");
370 ndr->depth++;
371 ndr_print_dfs_StorageState(ndr, "state", r->state);
372 ndr_print_ptr(ndr, "server", r->server);
373 ndr->depth++;
374 if (r->server) {
375 ndr_print_string(ndr, "server", r->server);
377 ndr->depth--;
378 ndr_print_ptr(ndr, "share", r->share);
379 ndr->depth++;
380 if (r->share) {
381 ndr_print_string(ndr, "share", r->share);
383 ndr->depth--;
384 ndr->depth--;
387 static enum ndr_err_code ndr_push_dfs_Info3(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info3 *r)
389 uint32_t cntr_stores_1;
390 if (ndr_flags & NDR_SCALARS) {
391 NDR_CHECK(ndr_push_align(ndr, 4));
392 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
393 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
394 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
395 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
396 NDR_CHECK(ndr_push_unique_ptr(ndr, r->stores));
398 if (ndr_flags & NDR_BUFFERS) {
399 if (r->path) {
400 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
401 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
402 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
403 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
405 if (r->comment) {
406 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
407 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
408 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
409 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
411 if (r->stores) {
412 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
413 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
414 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
416 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
417 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
421 return NDR_ERR_SUCCESS;
424 static enum ndr_err_code ndr_pull_dfs_Info3(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info3 *r)
426 uint32_t _ptr_path;
427 uint32_t size_path_1 = 0;
428 uint32_t length_path_1 = 0;
429 TALLOC_CTX *_mem_save_path_0;
430 uint32_t _ptr_comment;
431 uint32_t size_comment_1 = 0;
432 uint32_t length_comment_1 = 0;
433 TALLOC_CTX *_mem_save_comment_0;
434 uint32_t _ptr_stores;
435 uint32_t size_stores_1 = 0;
436 uint32_t cntr_stores_1;
437 TALLOC_CTX *_mem_save_stores_0;
438 TALLOC_CTX *_mem_save_stores_1;
439 if (ndr_flags & NDR_SCALARS) {
440 NDR_CHECK(ndr_pull_align(ndr, 4));
441 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
442 if (_ptr_path) {
443 NDR_PULL_ALLOC(ndr, r->path);
444 } else {
445 r->path = NULL;
447 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
448 if (_ptr_comment) {
449 NDR_PULL_ALLOC(ndr, r->comment);
450 } else {
451 r->comment = NULL;
453 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
454 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores));
455 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_stores));
456 if (_ptr_stores) {
457 NDR_PULL_ALLOC(ndr, r->stores);
458 } else {
459 r->stores = NULL;
462 if (ndr_flags & NDR_BUFFERS) {
463 if (r->path) {
464 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
465 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
466 NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
467 NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
468 size_path_1 = ndr_get_array_size(ndr, &r->path);
469 length_path_1 = ndr_get_array_length(ndr, &r->path);
470 if (length_path_1 > size_path_1) {
471 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_path_1, length_path_1);
473 NDR_CHECK(ndr_check_string_terminator(ndr, length_path_1, sizeof(uint16_t)));
474 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, length_path_1, sizeof(uint16_t), CH_UTF16));
475 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
477 if (r->comment) {
478 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
479 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
480 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
481 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
482 size_comment_1 = ndr_get_array_size(ndr, &r->comment);
483 length_comment_1 = ndr_get_array_length(ndr, &r->comment);
484 if (length_comment_1 > size_comment_1) {
485 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_comment_1, length_comment_1);
487 NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_1, sizeof(uint16_t)));
488 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, length_comment_1, sizeof(uint16_t), CH_UTF16));
489 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
491 if (r->stores) {
492 _mem_save_stores_0 = NDR_PULL_GET_MEM_CTX(ndr);
493 NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
494 NDR_CHECK(ndr_pull_array_size(ndr, &r->stores));
495 size_stores_1 = ndr_get_array_size(ndr, &r->stores);
496 NDR_PULL_ALLOC_N(ndr, r->stores, size_stores_1);
497 _mem_save_stores_1 = NDR_PULL_GET_MEM_CTX(ndr);
498 NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
499 for (cntr_stores_1 = 0; cntr_stores_1 < size_stores_1; cntr_stores_1++) {
500 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
502 for (cntr_stores_1 = 0; cntr_stores_1 < size_stores_1; cntr_stores_1++) {
503 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
505 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_1, 0);
506 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_0, 0);
508 if (r->stores) {
509 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->stores, r->num_stores));
512 return NDR_ERR_SUCCESS;
515 _PUBLIC_ void ndr_print_dfs_Info3(struct ndr_print *ndr, const char *name, const struct dfs_Info3 *r)
517 uint32_t cntr_stores_1;
518 ndr_print_struct(ndr, name, "dfs_Info3");
519 ndr->depth++;
520 ndr_print_ptr(ndr, "path", r->path);
521 ndr->depth++;
522 if (r->path) {
523 ndr_print_string(ndr, "path", r->path);
525 ndr->depth--;
526 ndr_print_ptr(ndr, "comment", r->comment);
527 ndr->depth++;
528 if (r->comment) {
529 ndr_print_string(ndr, "comment", r->comment);
531 ndr->depth--;
532 ndr_print_dfs_VolumeState(ndr, "state", r->state);
533 ndr_print_uint32(ndr, "num_stores", r->num_stores);
534 ndr_print_ptr(ndr, "stores", r->stores);
535 ndr->depth++;
536 if (r->stores) {
537 ndr->print(ndr, "%s: ARRAY(%d)", "stores", (int)r->num_stores);
538 ndr->depth++;
539 for (cntr_stores_1=0;cntr_stores_1<r->num_stores;cntr_stores_1++) {
540 char *idx_1=NULL;
541 if (asprintf(&idx_1, "[%d]", cntr_stores_1) != -1) {
542 ndr_print_dfs_StorageInfo(ndr, "stores", &r->stores[cntr_stores_1]);
543 free(idx_1);
546 ndr->depth--;
548 ndr->depth--;
549 ndr->depth--;
552 static enum ndr_err_code ndr_push_dfs_Info4(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info4 *r)
554 uint32_t cntr_stores_1;
555 if (ndr_flags & NDR_SCALARS) {
556 NDR_CHECK(ndr_push_align(ndr, 4));
557 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
558 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
559 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
560 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
561 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
562 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
563 NDR_CHECK(ndr_push_unique_ptr(ndr, r->stores));
565 if (ndr_flags & NDR_BUFFERS) {
566 if (r->path) {
567 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
568 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
569 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
570 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
572 if (r->comment) {
573 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
574 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
575 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
576 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
578 if (r->stores) {
579 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
580 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
581 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
583 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
584 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
588 return NDR_ERR_SUCCESS;
591 static enum ndr_err_code ndr_pull_dfs_Info4(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info4 *r)
593 uint32_t _ptr_path;
594 uint32_t size_path_1 = 0;
595 uint32_t length_path_1 = 0;
596 TALLOC_CTX *_mem_save_path_0;
597 uint32_t _ptr_comment;
598 uint32_t size_comment_1 = 0;
599 uint32_t length_comment_1 = 0;
600 TALLOC_CTX *_mem_save_comment_0;
601 uint32_t _ptr_stores;
602 uint32_t size_stores_1 = 0;
603 uint32_t cntr_stores_1;
604 TALLOC_CTX *_mem_save_stores_0;
605 TALLOC_CTX *_mem_save_stores_1;
606 if (ndr_flags & NDR_SCALARS) {
607 NDR_CHECK(ndr_pull_align(ndr, 4));
608 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
609 if (_ptr_path) {
610 NDR_PULL_ALLOC(ndr, r->path);
611 } else {
612 r->path = NULL;
614 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
615 if (_ptr_comment) {
616 NDR_PULL_ALLOC(ndr, r->comment);
617 } else {
618 r->comment = NULL;
620 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
621 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
622 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
623 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores));
624 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_stores));
625 if (_ptr_stores) {
626 NDR_PULL_ALLOC(ndr, r->stores);
627 } else {
628 r->stores = NULL;
631 if (ndr_flags & NDR_BUFFERS) {
632 if (r->path) {
633 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
634 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
635 NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
636 NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
637 size_path_1 = ndr_get_array_size(ndr, &r->path);
638 length_path_1 = ndr_get_array_length(ndr, &r->path);
639 if (length_path_1 > size_path_1) {
640 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_path_1, length_path_1);
642 NDR_CHECK(ndr_check_string_terminator(ndr, length_path_1, sizeof(uint16_t)));
643 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, length_path_1, sizeof(uint16_t), CH_UTF16));
644 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
646 if (r->comment) {
647 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
648 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
649 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
650 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
651 size_comment_1 = ndr_get_array_size(ndr, &r->comment);
652 length_comment_1 = ndr_get_array_length(ndr, &r->comment);
653 if (length_comment_1 > size_comment_1) {
654 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_comment_1, length_comment_1);
656 NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_1, sizeof(uint16_t)));
657 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, length_comment_1, sizeof(uint16_t), CH_UTF16));
658 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
660 if (r->stores) {
661 _mem_save_stores_0 = NDR_PULL_GET_MEM_CTX(ndr);
662 NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
663 NDR_CHECK(ndr_pull_array_size(ndr, &r->stores));
664 size_stores_1 = ndr_get_array_size(ndr, &r->stores);
665 NDR_PULL_ALLOC_N(ndr, r->stores, size_stores_1);
666 _mem_save_stores_1 = NDR_PULL_GET_MEM_CTX(ndr);
667 NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
668 for (cntr_stores_1 = 0; cntr_stores_1 < size_stores_1; cntr_stores_1++) {
669 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
671 for (cntr_stores_1 = 0; cntr_stores_1 < size_stores_1; cntr_stores_1++) {
672 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
674 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_1, 0);
675 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_0, 0);
677 if (r->stores) {
678 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->stores, r->num_stores));
681 return NDR_ERR_SUCCESS;
684 _PUBLIC_ void ndr_print_dfs_Info4(struct ndr_print *ndr, const char *name, const struct dfs_Info4 *r)
686 uint32_t cntr_stores_1;
687 ndr_print_struct(ndr, name, "dfs_Info4");
688 ndr->depth++;
689 ndr_print_ptr(ndr, "path", r->path);
690 ndr->depth++;
691 if (r->path) {
692 ndr_print_string(ndr, "path", r->path);
694 ndr->depth--;
695 ndr_print_ptr(ndr, "comment", r->comment);
696 ndr->depth++;
697 if (r->comment) {
698 ndr_print_string(ndr, "comment", r->comment);
700 ndr->depth--;
701 ndr_print_dfs_VolumeState(ndr, "state", r->state);
702 ndr_print_uint32(ndr, "timeout", r->timeout);
703 ndr_print_GUID(ndr, "guid", &r->guid);
704 ndr_print_uint32(ndr, "num_stores", r->num_stores);
705 ndr_print_ptr(ndr, "stores", r->stores);
706 ndr->depth++;
707 if (r->stores) {
708 ndr->print(ndr, "%s: ARRAY(%d)", "stores", (int)r->num_stores);
709 ndr->depth++;
710 for (cntr_stores_1=0;cntr_stores_1<r->num_stores;cntr_stores_1++) {
711 char *idx_1=NULL;
712 if (asprintf(&idx_1, "[%d]", cntr_stores_1) != -1) {
713 ndr_print_dfs_StorageInfo(ndr, "stores", &r->stores[cntr_stores_1]);
714 free(idx_1);
717 ndr->depth--;
719 ndr->depth--;
720 ndr->depth--;
723 _PUBLIC_ enum ndr_err_code ndr_push_dfs_PropertyFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
725 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
726 return NDR_ERR_SUCCESS;
729 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_PropertyFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
731 uint32_t v;
732 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
733 *r = v;
734 return NDR_ERR_SUCCESS;
737 _PUBLIC_ void ndr_print_dfs_PropertyFlags(struct ndr_print *ndr, const char *name, uint32_t r)
739 ndr_print_uint32(ndr, name, r);
740 ndr->depth++;
741 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_INSITE_REFERRALS", DFS_PROPERTY_FLAG_INSITE_REFERRALS, r);
742 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_ROOT_SCALABILITY", DFS_PROPERTY_FLAG_ROOT_SCALABILITY, r);
743 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_SITE_COSTING", DFS_PROPERTY_FLAG_SITE_COSTING, r);
744 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_TARGET_FAILBACK", DFS_PROPERTY_FLAG_TARGET_FAILBACK, r);
745 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_CLUSTER_ENABLED", DFS_PROPERTY_FLAG_CLUSTER_ENABLED, r);
746 ndr->depth--;
749 static enum ndr_err_code ndr_push_dfs_Info5(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info5 *r)
751 if (ndr_flags & NDR_SCALARS) {
752 NDR_CHECK(ndr_push_align(ndr, 4));
753 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
754 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
755 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
756 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
757 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
758 NDR_CHECK(ndr_push_dfs_PropertyFlags(ndr, NDR_SCALARS, r->flags));
759 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pktsize));
760 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
762 if (ndr_flags & NDR_BUFFERS) {
763 if (r->path) {
764 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
765 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
766 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
767 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
769 if (r->comment) {
770 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
771 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
772 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
773 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
776 return NDR_ERR_SUCCESS;
779 static enum ndr_err_code ndr_pull_dfs_Info5(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info5 *r)
781 uint32_t _ptr_path;
782 uint32_t size_path_1 = 0;
783 uint32_t length_path_1 = 0;
784 TALLOC_CTX *_mem_save_path_0;
785 uint32_t _ptr_comment;
786 uint32_t size_comment_1 = 0;
787 uint32_t length_comment_1 = 0;
788 TALLOC_CTX *_mem_save_comment_0;
789 if (ndr_flags & NDR_SCALARS) {
790 NDR_CHECK(ndr_pull_align(ndr, 4));
791 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
792 if (_ptr_path) {
793 NDR_PULL_ALLOC(ndr, r->path);
794 } else {
795 r->path = NULL;
797 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
798 if (_ptr_comment) {
799 NDR_PULL_ALLOC(ndr, r->comment);
800 } else {
801 r->comment = NULL;
803 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
804 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
805 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
806 NDR_CHECK(ndr_pull_dfs_PropertyFlags(ndr, NDR_SCALARS, &r->flags));
807 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pktsize));
808 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores));
810 if (ndr_flags & NDR_BUFFERS) {
811 if (r->path) {
812 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
813 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
814 NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
815 NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
816 size_path_1 = ndr_get_array_size(ndr, &r->path);
817 length_path_1 = ndr_get_array_length(ndr, &r->path);
818 if (length_path_1 > size_path_1) {
819 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_path_1, length_path_1);
821 NDR_CHECK(ndr_check_string_terminator(ndr, length_path_1, sizeof(uint16_t)));
822 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, length_path_1, sizeof(uint16_t), CH_UTF16));
823 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
825 if (r->comment) {
826 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
827 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
828 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
829 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
830 size_comment_1 = ndr_get_array_size(ndr, &r->comment);
831 length_comment_1 = ndr_get_array_length(ndr, &r->comment);
832 if (length_comment_1 > size_comment_1) {
833 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_comment_1, length_comment_1);
835 NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_1, sizeof(uint16_t)));
836 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, length_comment_1, sizeof(uint16_t), CH_UTF16));
837 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
840 return NDR_ERR_SUCCESS;
843 _PUBLIC_ void ndr_print_dfs_Info5(struct ndr_print *ndr, const char *name, const struct dfs_Info5 *r)
845 ndr_print_struct(ndr, name, "dfs_Info5");
846 ndr->depth++;
847 ndr_print_ptr(ndr, "path", r->path);
848 ndr->depth++;
849 if (r->path) {
850 ndr_print_string(ndr, "path", r->path);
852 ndr->depth--;
853 ndr_print_ptr(ndr, "comment", r->comment);
854 ndr->depth++;
855 if (r->comment) {
856 ndr_print_string(ndr, "comment", r->comment);
858 ndr->depth--;
859 ndr_print_dfs_VolumeState(ndr, "state", r->state);
860 ndr_print_uint32(ndr, "timeout", r->timeout);
861 ndr_print_GUID(ndr, "guid", &r->guid);
862 ndr_print_dfs_PropertyFlags(ndr, "flags", r->flags);
863 ndr_print_uint32(ndr, "pktsize", r->pktsize);
864 ndr_print_uint32(ndr, "num_stores", r->num_stores);
865 ndr->depth--;
868 static enum ndr_err_code ndr_push_dfs_Target_PriorityClass(struct ndr_push *ndr, int ndr_flags, enum dfs_Target_PriorityClass r)
870 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
871 return NDR_ERR_SUCCESS;
874 static enum ndr_err_code ndr_pull_dfs_Target_PriorityClass(struct ndr_pull *ndr, int ndr_flags, enum dfs_Target_PriorityClass *r)
876 uint32_t v;
877 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
878 *r = v;
879 return NDR_ERR_SUCCESS;
882 _PUBLIC_ void ndr_print_dfs_Target_PriorityClass(struct ndr_print *ndr, const char *name, enum dfs_Target_PriorityClass r)
884 const char *val = NULL;
886 switch (r) {
887 case DFS_INVALID_PRIORITY_CLASS: val = "DFS_INVALID_PRIORITY_CLASS"; break;
888 case DFS_SITE_COST_NORMAL_PRIORITY_CLASS: val = "DFS_SITE_COST_NORMAL_PRIORITY_CLASS"; break;
889 case DFS_GLOBAL_HIGH_PRIORITY_CLASS: val = "DFS_GLOBAL_HIGH_PRIORITY_CLASS"; break;
890 case DFS_SITE_COST_HIGH_PRIORITY_CLASS: val = "DFS_SITE_COST_HIGH_PRIORITY_CLASS"; break;
891 case DFS_SITE_COST_LOW_PRIORITY_CLASS: val = "DFS_SITE_COST_LOW_PRIORITY_CLASS"; break;
892 case DFS_GLOBAL_LOW_PRIORITY_CLASS: val = "DFS_GLOBAL_LOW_PRIORITY_CLASS"; break;
894 ndr_print_enum(ndr, name, "ENUM", val, r);
897 static enum ndr_err_code ndr_push_dfs_Target_Priority(struct ndr_push *ndr, int ndr_flags, const struct dfs_Target_Priority *r)
899 if (ndr_flags & NDR_SCALARS) {
900 NDR_CHECK(ndr_push_align(ndr, 4));
901 NDR_CHECK(ndr_push_dfs_Target_PriorityClass(ndr, NDR_SCALARS, r->target_priority_class));
902 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->target_priority_rank));
903 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->reserved));
905 if (ndr_flags & NDR_BUFFERS) {
907 return NDR_ERR_SUCCESS;
910 static enum ndr_err_code ndr_pull_dfs_Target_Priority(struct ndr_pull *ndr, int ndr_flags, struct dfs_Target_Priority *r)
912 if (ndr_flags & NDR_SCALARS) {
913 NDR_CHECK(ndr_pull_align(ndr, 4));
914 NDR_CHECK(ndr_pull_dfs_Target_PriorityClass(ndr, NDR_SCALARS, &r->target_priority_class));
915 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->target_priority_rank));
916 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved));
918 if (ndr_flags & NDR_BUFFERS) {
920 return NDR_ERR_SUCCESS;
923 _PUBLIC_ void ndr_print_dfs_Target_Priority(struct ndr_print *ndr, const char *name, const struct dfs_Target_Priority *r)
925 ndr_print_struct(ndr, name, "dfs_Target_Priority");
926 ndr->depth++;
927 ndr_print_dfs_Target_PriorityClass(ndr, "target_priority_class", r->target_priority_class);
928 ndr_print_uint16(ndr, "target_priority_rank", r->target_priority_rank);
929 ndr_print_uint16(ndr, "reserved", r->reserved);
930 ndr->depth--;
933 static enum ndr_err_code ndr_push_dfs_StorageInfo2(struct ndr_push *ndr, int ndr_flags, const struct dfs_StorageInfo2 *r)
935 if (ndr_flags & NDR_SCALARS) {
936 NDR_CHECK(ndr_push_align(ndr, 4));
937 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_SCALARS, &r->info));
938 NDR_CHECK(ndr_push_dfs_Target_Priority(ndr, NDR_SCALARS, &r->target_priority));
940 if (ndr_flags & NDR_BUFFERS) {
941 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->info));
943 return NDR_ERR_SUCCESS;
946 static enum ndr_err_code ndr_pull_dfs_StorageInfo2(struct ndr_pull *ndr, int ndr_flags, struct dfs_StorageInfo2 *r)
948 if (ndr_flags & NDR_SCALARS) {
949 NDR_CHECK(ndr_pull_align(ndr, 4));
950 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_SCALARS, &r->info));
951 NDR_CHECK(ndr_pull_dfs_Target_Priority(ndr, NDR_SCALARS, &r->target_priority));
953 if (ndr_flags & NDR_BUFFERS) {
954 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->info));
956 return NDR_ERR_SUCCESS;
959 _PUBLIC_ void ndr_print_dfs_StorageInfo2(struct ndr_print *ndr, const char *name, const struct dfs_StorageInfo2 *r)
961 ndr_print_struct(ndr, name, "dfs_StorageInfo2");
962 ndr->depth++;
963 ndr_print_dfs_StorageInfo(ndr, "info", &r->info);
964 ndr_print_dfs_Target_Priority(ndr, "target_priority", &r->target_priority);
965 ndr->depth--;
968 static enum ndr_err_code ndr_push_dfs_Info6(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info6 *r)
970 uint32_t cntr_stores_1;
971 if (ndr_flags & NDR_SCALARS) {
972 NDR_CHECK(ndr_push_align(ndr, 4));
973 NDR_CHECK(ndr_push_unique_ptr(ndr, r->entry_path));
974 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
975 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
976 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
977 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
978 NDR_CHECK(ndr_push_dfs_PropertyFlags(ndr, NDR_SCALARS, r->flags));
979 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pktsize));
980 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_stores));
981 NDR_CHECK(ndr_push_unique_ptr(ndr, r->stores));
983 if (ndr_flags & NDR_BUFFERS) {
984 if (r->entry_path) {
985 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->entry_path, CH_UTF16)));
986 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
987 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->entry_path, CH_UTF16)));
988 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->entry_path, ndr_charset_length(r->entry_path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
990 if (r->comment) {
991 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
992 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
993 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
994 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
996 if (r->stores) {
997 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
998 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
999 NDR_CHECK(ndr_push_dfs_StorageInfo2(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
1001 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
1002 NDR_CHECK(ndr_push_dfs_StorageInfo2(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
1006 return NDR_ERR_SUCCESS;
1009 static enum ndr_err_code ndr_pull_dfs_Info6(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info6 *r)
1011 uint32_t _ptr_entry_path;
1012 uint32_t size_entry_path_1 = 0;
1013 uint32_t length_entry_path_1 = 0;
1014 TALLOC_CTX *_mem_save_entry_path_0;
1015 uint32_t _ptr_comment;
1016 uint32_t size_comment_1 = 0;
1017 uint32_t length_comment_1 = 0;
1018 TALLOC_CTX *_mem_save_comment_0;
1019 uint32_t _ptr_stores;
1020 uint32_t size_stores_1 = 0;
1021 uint32_t cntr_stores_1;
1022 TALLOC_CTX *_mem_save_stores_0;
1023 TALLOC_CTX *_mem_save_stores_1;
1024 if (ndr_flags & NDR_SCALARS) {
1025 NDR_CHECK(ndr_pull_align(ndr, 4));
1026 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entry_path));
1027 if (_ptr_entry_path) {
1028 NDR_PULL_ALLOC(ndr, r->entry_path);
1029 } else {
1030 r->entry_path = NULL;
1032 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
1033 if (_ptr_comment) {
1034 NDR_PULL_ALLOC(ndr, r->comment);
1035 } else {
1036 r->comment = NULL;
1038 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
1039 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
1040 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
1041 NDR_CHECK(ndr_pull_dfs_PropertyFlags(ndr, NDR_SCALARS, &r->flags));
1042 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pktsize));
1043 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_stores));
1044 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_stores));
1045 if (_ptr_stores) {
1046 NDR_PULL_ALLOC(ndr, r->stores);
1047 } else {
1048 r->stores = NULL;
1051 if (ndr_flags & NDR_BUFFERS) {
1052 if (r->entry_path) {
1053 _mem_save_entry_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
1054 NDR_PULL_SET_MEM_CTX(ndr, r->entry_path, 0);
1055 NDR_CHECK(ndr_pull_array_size(ndr, &r->entry_path));
1056 NDR_CHECK(ndr_pull_array_length(ndr, &r->entry_path));
1057 size_entry_path_1 = ndr_get_array_size(ndr, &r->entry_path);
1058 length_entry_path_1 = ndr_get_array_length(ndr, &r->entry_path);
1059 if (length_entry_path_1 > size_entry_path_1) {
1060 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_entry_path_1, length_entry_path_1);
1062 NDR_CHECK(ndr_check_string_terminator(ndr, length_entry_path_1, sizeof(uint16_t)));
1063 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->entry_path, length_entry_path_1, sizeof(uint16_t), CH_UTF16));
1064 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entry_path_0, 0);
1066 if (r->comment) {
1067 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
1068 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
1069 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
1070 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
1071 size_comment_1 = ndr_get_array_size(ndr, &r->comment);
1072 length_comment_1 = ndr_get_array_length(ndr, &r->comment);
1073 if (length_comment_1 > size_comment_1) {
1074 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_comment_1, length_comment_1);
1076 NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_1, sizeof(uint16_t)));
1077 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, length_comment_1, sizeof(uint16_t), CH_UTF16));
1078 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
1080 if (r->stores) {
1081 _mem_save_stores_0 = NDR_PULL_GET_MEM_CTX(ndr);
1082 NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
1083 NDR_CHECK(ndr_pull_array_size(ndr, &r->stores));
1084 size_stores_1 = ndr_get_array_size(ndr, &r->stores);
1085 NDR_PULL_ALLOC_N(ndr, r->stores, size_stores_1);
1086 _mem_save_stores_1 = NDR_PULL_GET_MEM_CTX(ndr);
1087 NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
1088 for (cntr_stores_1 = 0; cntr_stores_1 < size_stores_1; cntr_stores_1++) {
1089 NDR_CHECK(ndr_pull_dfs_StorageInfo2(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
1091 for (cntr_stores_1 = 0; cntr_stores_1 < size_stores_1; cntr_stores_1++) {
1092 NDR_CHECK(ndr_pull_dfs_StorageInfo2(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
1094 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_1, 0);
1095 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_0, 0);
1097 if (r->stores) {
1098 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->stores, r->num_stores));
1101 return NDR_ERR_SUCCESS;
1104 _PUBLIC_ void ndr_print_dfs_Info6(struct ndr_print *ndr, const char *name, const struct dfs_Info6 *r)
1106 uint32_t cntr_stores_1;
1107 ndr_print_struct(ndr, name, "dfs_Info6");
1108 ndr->depth++;
1109 ndr_print_ptr(ndr, "entry_path", r->entry_path);
1110 ndr->depth++;
1111 if (r->entry_path) {
1112 ndr_print_string(ndr, "entry_path", r->entry_path);
1114 ndr->depth--;
1115 ndr_print_ptr(ndr, "comment", r->comment);
1116 ndr->depth++;
1117 if (r->comment) {
1118 ndr_print_string(ndr, "comment", r->comment);
1120 ndr->depth--;
1121 ndr_print_dfs_VolumeState(ndr, "state", r->state);
1122 ndr_print_uint32(ndr, "timeout", r->timeout);
1123 ndr_print_GUID(ndr, "guid", &r->guid);
1124 ndr_print_dfs_PropertyFlags(ndr, "flags", r->flags);
1125 ndr_print_uint32(ndr, "pktsize", r->pktsize);
1126 ndr_print_uint16(ndr, "num_stores", r->num_stores);
1127 ndr_print_ptr(ndr, "stores", r->stores);
1128 ndr->depth++;
1129 if (r->stores) {
1130 ndr->print(ndr, "%s: ARRAY(%d)", "stores", (int)r->num_stores);
1131 ndr->depth++;
1132 for (cntr_stores_1=0;cntr_stores_1<r->num_stores;cntr_stores_1++) {
1133 char *idx_1=NULL;
1134 if (asprintf(&idx_1, "[%d]", cntr_stores_1) != -1) {
1135 ndr_print_dfs_StorageInfo2(ndr, "stores", &r->stores[cntr_stores_1]);
1136 free(idx_1);
1139 ndr->depth--;
1141 ndr->depth--;
1142 ndr->depth--;
1145 static enum ndr_err_code ndr_push_dfs_Info7(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info7 *r)
1147 if (ndr_flags & NDR_SCALARS) {
1148 NDR_CHECK(ndr_push_align(ndr, 4));
1149 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->generation_guid));
1151 if (ndr_flags & NDR_BUFFERS) {
1153 return NDR_ERR_SUCCESS;
1156 static enum ndr_err_code ndr_pull_dfs_Info7(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info7 *r)
1158 if (ndr_flags & NDR_SCALARS) {
1159 NDR_CHECK(ndr_pull_align(ndr, 4));
1160 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->generation_guid));
1162 if (ndr_flags & NDR_BUFFERS) {
1164 return NDR_ERR_SUCCESS;
1167 _PUBLIC_ void ndr_print_dfs_Info7(struct ndr_print *ndr, const char *name, const struct dfs_Info7 *r)
1169 ndr_print_struct(ndr, name, "dfs_Info7");
1170 ndr->depth++;
1171 ndr_print_GUID(ndr, "generation_guid", &r->generation_guid);
1172 ndr->depth--;
1175 static enum ndr_err_code ndr_push_dfs_Info100(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info100 *r)
1177 if (ndr_flags & NDR_SCALARS) {
1178 NDR_CHECK(ndr_push_align(ndr, 4));
1179 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
1181 if (ndr_flags & NDR_BUFFERS) {
1182 if (r->comment) {
1183 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
1184 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1185 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
1186 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1189 return NDR_ERR_SUCCESS;
1192 static enum ndr_err_code ndr_pull_dfs_Info100(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info100 *r)
1194 uint32_t _ptr_comment;
1195 uint32_t size_comment_1 = 0;
1196 uint32_t length_comment_1 = 0;
1197 TALLOC_CTX *_mem_save_comment_0;
1198 if (ndr_flags & NDR_SCALARS) {
1199 NDR_CHECK(ndr_pull_align(ndr, 4));
1200 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
1201 if (_ptr_comment) {
1202 NDR_PULL_ALLOC(ndr, r->comment);
1203 } else {
1204 r->comment = NULL;
1207 if (ndr_flags & NDR_BUFFERS) {
1208 if (r->comment) {
1209 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
1210 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
1211 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
1212 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
1213 size_comment_1 = ndr_get_array_size(ndr, &r->comment);
1214 length_comment_1 = ndr_get_array_length(ndr, &r->comment);
1215 if (length_comment_1 > size_comment_1) {
1216 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_comment_1, length_comment_1);
1218 NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_1, sizeof(uint16_t)));
1219 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, length_comment_1, sizeof(uint16_t), CH_UTF16));
1220 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
1223 return NDR_ERR_SUCCESS;
1226 _PUBLIC_ void ndr_print_dfs_Info100(struct ndr_print *ndr, const char *name, const struct dfs_Info100 *r)
1228 ndr_print_struct(ndr, name, "dfs_Info100");
1229 ndr->depth++;
1230 ndr_print_ptr(ndr, "comment", r->comment);
1231 ndr->depth++;
1232 if (r->comment) {
1233 ndr_print_string(ndr, "comment", r->comment);
1235 ndr->depth--;
1236 ndr->depth--;
1239 static enum ndr_err_code ndr_push_dfs_Info101(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info101 *r)
1241 if (ndr_flags & NDR_SCALARS) {
1242 NDR_CHECK(ndr_push_align(ndr, 4));
1243 NDR_CHECK(ndr_push_dfs_StorageState(ndr, NDR_SCALARS, r->state));
1245 if (ndr_flags & NDR_BUFFERS) {
1247 return NDR_ERR_SUCCESS;
1250 static enum ndr_err_code ndr_pull_dfs_Info101(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info101 *r)
1252 if (ndr_flags & NDR_SCALARS) {
1253 NDR_CHECK(ndr_pull_align(ndr, 4));
1254 NDR_CHECK(ndr_pull_dfs_StorageState(ndr, NDR_SCALARS, &r->state));
1256 if (ndr_flags & NDR_BUFFERS) {
1258 return NDR_ERR_SUCCESS;
1261 _PUBLIC_ void ndr_print_dfs_Info101(struct ndr_print *ndr, const char *name, const struct dfs_Info101 *r)
1263 ndr_print_struct(ndr, name, "dfs_Info101");
1264 ndr->depth++;
1265 ndr_print_dfs_StorageState(ndr, "state", r->state);
1266 ndr->depth--;
1269 static enum ndr_err_code ndr_push_dfs_Info102(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info102 *r)
1271 if (ndr_flags & NDR_SCALARS) {
1272 NDR_CHECK(ndr_push_align(ndr, 4));
1273 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
1275 if (ndr_flags & NDR_BUFFERS) {
1277 return NDR_ERR_SUCCESS;
1280 static enum ndr_err_code ndr_pull_dfs_Info102(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info102 *r)
1282 if (ndr_flags & NDR_SCALARS) {
1283 NDR_CHECK(ndr_pull_align(ndr, 4));
1284 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
1286 if (ndr_flags & NDR_BUFFERS) {
1288 return NDR_ERR_SUCCESS;
1291 _PUBLIC_ void ndr_print_dfs_Info102(struct ndr_print *ndr, const char *name, const struct dfs_Info102 *r)
1293 ndr_print_struct(ndr, name, "dfs_Info102");
1294 ndr->depth++;
1295 ndr_print_uint32(ndr, "timeout", r->timeout);
1296 ndr->depth--;
1299 static enum ndr_err_code ndr_push_dfs_Info103(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info103 *r)
1301 if (ndr_flags & NDR_SCALARS) {
1302 NDR_CHECK(ndr_push_align(ndr, 4));
1303 NDR_CHECK(ndr_push_dfs_PropertyFlags(ndr, NDR_SCALARS, r->flags));
1305 if (ndr_flags & NDR_BUFFERS) {
1307 return NDR_ERR_SUCCESS;
1310 static enum ndr_err_code ndr_pull_dfs_Info103(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info103 *r)
1312 if (ndr_flags & NDR_SCALARS) {
1313 NDR_CHECK(ndr_pull_align(ndr, 4));
1314 NDR_CHECK(ndr_pull_dfs_PropertyFlags(ndr, NDR_SCALARS, &r->flags));
1316 if (ndr_flags & NDR_BUFFERS) {
1318 return NDR_ERR_SUCCESS;
1321 _PUBLIC_ void ndr_print_dfs_Info103(struct ndr_print *ndr, const char *name, const struct dfs_Info103 *r)
1323 ndr_print_struct(ndr, name, "dfs_Info103");
1324 ndr->depth++;
1325 ndr_print_dfs_PropertyFlags(ndr, "flags", r->flags);
1326 ndr->depth--;
1329 static enum ndr_err_code ndr_push_dfs_Info104(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info104 *r)
1331 if (ndr_flags & NDR_SCALARS) {
1332 NDR_CHECK(ndr_push_align(ndr, 4));
1333 NDR_CHECK(ndr_push_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority));
1335 if (ndr_flags & NDR_BUFFERS) {
1337 return NDR_ERR_SUCCESS;
1340 static enum ndr_err_code ndr_pull_dfs_Info104(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info104 *r)
1342 if (ndr_flags & NDR_SCALARS) {
1343 NDR_CHECK(ndr_pull_align(ndr, 4));
1344 NDR_CHECK(ndr_pull_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority));
1346 if (ndr_flags & NDR_BUFFERS) {
1348 return NDR_ERR_SUCCESS;
1351 _PUBLIC_ void ndr_print_dfs_Info104(struct ndr_print *ndr, const char *name, const struct dfs_Info104 *r)
1353 ndr_print_struct(ndr, name, "dfs_Info104");
1354 ndr->depth++;
1355 ndr_print_dfs_Target_Priority(ndr, "priority", &r->priority);
1356 ndr->depth--;
1359 static enum ndr_err_code ndr_push_dfs_Info105(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info105 *r)
1361 if (ndr_flags & NDR_SCALARS) {
1362 NDR_CHECK(ndr_push_align(ndr, 4));
1363 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
1364 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
1365 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
1366 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->property_flag_mask));
1367 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->property_flags));
1369 if (ndr_flags & NDR_BUFFERS) {
1370 if (r->comment) {
1371 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
1372 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1373 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
1374 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1377 return NDR_ERR_SUCCESS;
1380 static enum ndr_err_code ndr_pull_dfs_Info105(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info105 *r)
1382 uint32_t _ptr_comment;
1383 uint32_t size_comment_1 = 0;
1384 uint32_t length_comment_1 = 0;
1385 TALLOC_CTX *_mem_save_comment_0;
1386 if (ndr_flags & NDR_SCALARS) {
1387 NDR_CHECK(ndr_pull_align(ndr, 4));
1388 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
1389 if (_ptr_comment) {
1390 NDR_PULL_ALLOC(ndr, r->comment);
1391 } else {
1392 r->comment = NULL;
1394 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
1395 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
1396 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->property_flag_mask));
1397 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->property_flags));
1399 if (ndr_flags & NDR_BUFFERS) {
1400 if (r->comment) {
1401 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
1402 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
1403 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
1404 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
1405 size_comment_1 = ndr_get_array_size(ndr, &r->comment);
1406 length_comment_1 = ndr_get_array_length(ndr, &r->comment);
1407 if (length_comment_1 > size_comment_1) {
1408 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_comment_1, length_comment_1);
1410 NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_1, sizeof(uint16_t)));
1411 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, length_comment_1, sizeof(uint16_t), CH_UTF16));
1412 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
1415 return NDR_ERR_SUCCESS;
1418 _PUBLIC_ void ndr_print_dfs_Info105(struct ndr_print *ndr, const char *name, const struct dfs_Info105 *r)
1420 ndr_print_struct(ndr, name, "dfs_Info105");
1421 ndr->depth++;
1422 ndr_print_ptr(ndr, "comment", r->comment);
1423 ndr->depth++;
1424 if (r->comment) {
1425 ndr_print_string(ndr, "comment", r->comment);
1427 ndr->depth--;
1428 ndr_print_dfs_VolumeState(ndr, "state", r->state);
1429 ndr_print_uint32(ndr, "timeout", r->timeout);
1430 ndr_print_uint32(ndr, "property_flag_mask", r->property_flag_mask);
1431 ndr_print_uint32(ndr, "property_flags", r->property_flags);
1432 ndr->depth--;
1435 static enum ndr_err_code ndr_push_dfs_Info106(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info106 *r)
1437 if (ndr_flags & NDR_SCALARS) {
1438 NDR_CHECK(ndr_push_align(ndr, 4));
1439 NDR_CHECK(ndr_push_dfs_StorageState(ndr, NDR_SCALARS, r->state));
1440 NDR_CHECK(ndr_push_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority));
1442 if (ndr_flags & NDR_BUFFERS) {
1444 return NDR_ERR_SUCCESS;
1447 static enum ndr_err_code ndr_pull_dfs_Info106(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info106 *r)
1449 if (ndr_flags & NDR_SCALARS) {
1450 NDR_CHECK(ndr_pull_align(ndr, 4));
1451 NDR_CHECK(ndr_pull_dfs_StorageState(ndr, NDR_SCALARS, &r->state));
1452 NDR_CHECK(ndr_pull_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority));
1454 if (ndr_flags & NDR_BUFFERS) {
1456 return NDR_ERR_SUCCESS;
1459 _PUBLIC_ void ndr_print_dfs_Info106(struct ndr_print *ndr, const char *name, const struct dfs_Info106 *r)
1461 ndr_print_struct(ndr, name, "dfs_Info106");
1462 ndr->depth++;
1463 ndr_print_dfs_StorageState(ndr, "state", r->state);
1464 ndr_print_dfs_Target_Priority(ndr, "priority", &r->priority);
1465 ndr->depth--;
1468 static enum ndr_err_code ndr_push_dfs_Info200(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info200 *r)
1470 if (ndr_flags & NDR_SCALARS) {
1471 NDR_CHECK(ndr_push_align(ndr, 4));
1472 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dom_root));
1474 if (ndr_flags & NDR_BUFFERS) {
1475 if (r->dom_root) {
1476 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16)));
1477 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1478 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16)));
1479 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dom_root, ndr_charset_length(r->dom_root, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1482 return NDR_ERR_SUCCESS;
1485 static enum ndr_err_code ndr_pull_dfs_Info200(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info200 *r)
1487 uint32_t _ptr_dom_root;
1488 uint32_t size_dom_root_1 = 0;
1489 uint32_t length_dom_root_1 = 0;
1490 TALLOC_CTX *_mem_save_dom_root_0;
1491 if (ndr_flags & NDR_SCALARS) {
1492 NDR_CHECK(ndr_pull_align(ndr, 4));
1493 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dom_root));
1494 if (_ptr_dom_root) {
1495 NDR_PULL_ALLOC(ndr, r->dom_root);
1496 } else {
1497 r->dom_root = NULL;
1500 if (ndr_flags & NDR_BUFFERS) {
1501 if (r->dom_root) {
1502 _mem_save_dom_root_0 = NDR_PULL_GET_MEM_CTX(ndr);
1503 NDR_PULL_SET_MEM_CTX(ndr, r->dom_root, 0);
1504 NDR_CHECK(ndr_pull_array_size(ndr, &r->dom_root));
1505 NDR_CHECK(ndr_pull_array_length(ndr, &r->dom_root));
1506 size_dom_root_1 = ndr_get_array_size(ndr, &r->dom_root);
1507 length_dom_root_1 = ndr_get_array_length(ndr, &r->dom_root);
1508 if (length_dom_root_1 > size_dom_root_1) {
1509 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_dom_root_1, length_dom_root_1);
1511 NDR_CHECK(ndr_check_string_terminator(ndr, length_dom_root_1, sizeof(uint16_t)));
1512 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dom_root, length_dom_root_1, sizeof(uint16_t), CH_UTF16));
1513 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_root_0, 0);
1516 return NDR_ERR_SUCCESS;
1519 _PUBLIC_ void ndr_print_dfs_Info200(struct ndr_print *ndr, const char *name, const struct dfs_Info200 *r)
1521 ndr_print_struct(ndr, name, "dfs_Info200");
1522 ndr->depth++;
1523 ndr_print_ptr(ndr, "dom_root", r->dom_root);
1524 ndr->depth++;
1525 if (r->dom_root) {
1526 ndr_print_string(ndr, "dom_root", r->dom_root);
1528 ndr->depth--;
1529 ndr->depth--;
1532 static enum ndr_err_code ndr_push_dfs_VolumeFlavor(struct ndr_push *ndr, int ndr_flags, enum dfs_VolumeFlavor r)
1534 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
1535 return NDR_ERR_SUCCESS;
1538 static enum ndr_err_code ndr_pull_dfs_VolumeFlavor(struct ndr_pull *ndr, int ndr_flags, enum dfs_VolumeFlavor *r)
1540 uint16_t v;
1541 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
1542 *r = v;
1543 return NDR_ERR_SUCCESS;
1546 _PUBLIC_ void ndr_print_dfs_VolumeFlavor(struct ndr_print *ndr, const char *name, enum dfs_VolumeFlavor r)
1548 const char *val = NULL;
1550 switch (r) {
1551 case DFS_VOLUME_FLAVOR_STANDALONE: val = "DFS_VOLUME_FLAVOR_STANDALONE"; break;
1552 case DFS_VOLUME_FLAVOR_AD_BLOB: val = "DFS_VOLUME_FLAVOR_AD_BLOB"; break;
1554 ndr_print_enum(ndr, name, "ENUM", val, r);
1557 static enum ndr_err_code ndr_push_dfs_Info300(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info300 *r)
1559 if (ndr_flags & NDR_SCALARS) {
1560 NDR_CHECK(ndr_push_align(ndr, 4));
1561 NDR_CHECK(ndr_push_dfs_VolumeFlavor(ndr, NDR_SCALARS, r->flavor));
1562 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dom_root));
1564 if (ndr_flags & NDR_BUFFERS) {
1565 if (r->dom_root) {
1566 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16)));
1567 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1568 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16)));
1569 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dom_root, ndr_charset_length(r->dom_root, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1572 return NDR_ERR_SUCCESS;
1575 static enum ndr_err_code ndr_pull_dfs_Info300(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info300 *r)
1577 uint32_t _ptr_dom_root;
1578 uint32_t size_dom_root_1 = 0;
1579 uint32_t length_dom_root_1 = 0;
1580 TALLOC_CTX *_mem_save_dom_root_0;
1581 if (ndr_flags & NDR_SCALARS) {
1582 NDR_CHECK(ndr_pull_align(ndr, 4));
1583 NDR_CHECK(ndr_pull_dfs_VolumeFlavor(ndr, NDR_SCALARS, &r->flavor));
1584 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dom_root));
1585 if (_ptr_dom_root) {
1586 NDR_PULL_ALLOC(ndr, r->dom_root);
1587 } else {
1588 r->dom_root = NULL;
1591 if (ndr_flags & NDR_BUFFERS) {
1592 if (r->dom_root) {
1593 _mem_save_dom_root_0 = NDR_PULL_GET_MEM_CTX(ndr);
1594 NDR_PULL_SET_MEM_CTX(ndr, r->dom_root, 0);
1595 NDR_CHECK(ndr_pull_array_size(ndr, &r->dom_root));
1596 NDR_CHECK(ndr_pull_array_length(ndr, &r->dom_root));
1597 size_dom_root_1 = ndr_get_array_size(ndr, &r->dom_root);
1598 length_dom_root_1 = ndr_get_array_length(ndr, &r->dom_root);
1599 if (length_dom_root_1 > size_dom_root_1) {
1600 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_dom_root_1, length_dom_root_1);
1602 NDR_CHECK(ndr_check_string_terminator(ndr, length_dom_root_1, sizeof(uint16_t)));
1603 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dom_root, length_dom_root_1, sizeof(uint16_t), CH_UTF16));
1604 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_root_0, 0);
1607 return NDR_ERR_SUCCESS;
1610 _PUBLIC_ void ndr_print_dfs_Info300(struct ndr_print *ndr, const char *name, const struct dfs_Info300 *r)
1612 ndr_print_struct(ndr, name, "dfs_Info300");
1613 ndr->depth++;
1614 ndr_print_dfs_VolumeFlavor(ndr, "flavor", r->flavor);
1615 ndr_print_ptr(ndr, "dom_root", r->dom_root);
1616 ndr->depth++;
1617 if (r->dom_root) {
1618 ndr_print_string(ndr, "dom_root", r->dom_root);
1620 ndr->depth--;
1621 ndr->depth--;
1624 static enum ndr_err_code ndr_push_dfs_Info(struct ndr_push *ndr, int ndr_flags, const union dfs_Info *r)
1626 if (ndr_flags & NDR_SCALARS) {
1627 int level = ndr_push_get_switch_value(ndr, r);
1628 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
1629 switch (level) {
1630 case 0: {
1631 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
1632 break; }
1634 case 1: {
1635 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
1636 break; }
1638 case 2: {
1639 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
1640 break; }
1642 case 3: {
1643 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3));
1644 break; }
1646 case 4: {
1647 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info4));
1648 break; }
1650 case 5: {
1651 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info5));
1652 break; }
1654 case 6: {
1655 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info6));
1656 break; }
1658 case 7: {
1659 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info7));
1660 break; }
1662 case 100: {
1663 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info100));
1664 break; }
1666 case 101: {
1667 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info101));
1668 break; }
1670 case 102: {
1671 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info102));
1672 break; }
1674 case 103: {
1675 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info103));
1676 break; }
1678 case 104: {
1679 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info104));
1680 break; }
1682 case 105: {
1683 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info105));
1684 break; }
1686 case 106: {
1687 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info106));
1688 break; }
1690 default:
1691 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1694 if (ndr_flags & NDR_BUFFERS) {
1695 int level = ndr_push_get_switch_value(ndr, r);
1696 switch (level) {
1697 case 0:
1698 if (r->info0) {
1699 NDR_CHECK(ndr_push_dfs_Info0(ndr, NDR_SCALARS, r->info0));
1701 break;
1703 case 1:
1704 if (r->info1) {
1705 NDR_CHECK(ndr_push_dfs_Info1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
1707 break;
1709 case 2:
1710 if (r->info2) {
1711 NDR_CHECK(ndr_push_dfs_Info2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
1713 break;
1715 case 3:
1716 if (r->info3) {
1717 NDR_CHECK(ndr_push_dfs_Info3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
1719 break;
1721 case 4:
1722 if (r->info4) {
1723 NDR_CHECK(ndr_push_dfs_Info4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
1725 break;
1727 case 5:
1728 if (r->info5) {
1729 NDR_CHECK(ndr_push_dfs_Info5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5));
1731 break;
1733 case 6:
1734 if (r->info6) {
1735 NDR_CHECK(ndr_push_dfs_Info6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6));
1737 break;
1739 case 7:
1740 if (r->info7) {
1741 NDR_CHECK(ndr_push_dfs_Info7(ndr, NDR_SCALARS, r->info7));
1743 break;
1745 case 100:
1746 if (r->info100) {
1747 NDR_CHECK(ndr_push_dfs_Info100(ndr, NDR_SCALARS|NDR_BUFFERS, r->info100));
1749 break;
1751 case 101:
1752 if (r->info101) {
1753 NDR_CHECK(ndr_push_dfs_Info101(ndr, NDR_SCALARS, r->info101));
1755 break;
1757 case 102:
1758 if (r->info102) {
1759 NDR_CHECK(ndr_push_dfs_Info102(ndr, NDR_SCALARS, r->info102));
1761 break;
1763 case 103:
1764 if (r->info103) {
1765 NDR_CHECK(ndr_push_dfs_Info103(ndr, NDR_SCALARS, r->info103));
1767 break;
1769 case 104:
1770 if (r->info104) {
1771 NDR_CHECK(ndr_push_dfs_Info104(ndr, NDR_SCALARS, r->info104));
1773 break;
1775 case 105:
1776 if (r->info105) {
1777 NDR_CHECK(ndr_push_dfs_Info105(ndr, NDR_SCALARS|NDR_BUFFERS, r->info105));
1779 break;
1781 case 106:
1782 if (r->info106) {
1783 NDR_CHECK(ndr_push_dfs_Info106(ndr, NDR_SCALARS, r->info106));
1785 break;
1787 default:
1788 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1791 return NDR_ERR_SUCCESS;
1794 static enum ndr_err_code ndr_pull_dfs_Info(struct ndr_pull *ndr, int ndr_flags, union dfs_Info *r)
1796 int level;
1797 uint32_t _level;
1798 TALLOC_CTX *_mem_save_info0_0;
1799 uint32_t _ptr_info0;
1800 TALLOC_CTX *_mem_save_info1_0;
1801 uint32_t _ptr_info1;
1802 TALLOC_CTX *_mem_save_info2_0;
1803 uint32_t _ptr_info2;
1804 TALLOC_CTX *_mem_save_info3_0;
1805 uint32_t _ptr_info3;
1806 TALLOC_CTX *_mem_save_info4_0;
1807 uint32_t _ptr_info4;
1808 TALLOC_CTX *_mem_save_info5_0;
1809 uint32_t _ptr_info5;
1810 TALLOC_CTX *_mem_save_info6_0;
1811 uint32_t _ptr_info6;
1812 TALLOC_CTX *_mem_save_info7_0;
1813 uint32_t _ptr_info7;
1814 TALLOC_CTX *_mem_save_info100_0;
1815 uint32_t _ptr_info100;
1816 TALLOC_CTX *_mem_save_info101_0;
1817 uint32_t _ptr_info101;
1818 TALLOC_CTX *_mem_save_info102_0;
1819 uint32_t _ptr_info102;
1820 TALLOC_CTX *_mem_save_info103_0;
1821 uint32_t _ptr_info103;
1822 TALLOC_CTX *_mem_save_info104_0;
1823 uint32_t _ptr_info104;
1824 TALLOC_CTX *_mem_save_info105_0;
1825 uint32_t _ptr_info105;
1826 TALLOC_CTX *_mem_save_info106_0;
1827 uint32_t _ptr_info106;
1828 level = ndr_pull_get_switch_value(ndr, r);
1829 if (ndr_flags & NDR_SCALARS) {
1830 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
1831 if (_level != level) {
1832 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
1834 switch (level) {
1835 case 0: {
1836 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
1837 if (_ptr_info0) {
1838 NDR_PULL_ALLOC(ndr, r->info0);
1839 } else {
1840 r->info0 = NULL;
1842 break; }
1844 case 1: {
1845 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
1846 if (_ptr_info1) {
1847 NDR_PULL_ALLOC(ndr, r->info1);
1848 } else {
1849 r->info1 = NULL;
1851 break; }
1853 case 2: {
1854 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
1855 if (_ptr_info2) {
1856 NDR_PULL_ALLOC(ndr, r->info2);
1857 } else {
1858 r->info2 = NULL;
1860 break; }
1862 case 3: {
1863 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info3));
1864 if (_ptr_info3) {
1865 NDR_PULL_ALLOC(ndr, r->info3);
1866 } else {
1867 r->info3 = NULL;
1869 break; }
1871 case 4: {
1872 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info4));
1873 if (_ptr_info4) {
1874 NDR_PULL_ALLOC(ndr, r->info4);
1875 } else {
1876 r->info4 = NULL;
1878 break; }
1880 case 5: {
1881 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info5));
1882 if (_ptr_info5) {
1883 NDR_PULL_ALLOC(ndr, r->info5);
1884 } else {
1885 r->info5 = NULL;
1887 break; }
1889 case 6: {
1890 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info6));
1891 if (_ptr_info6) {
1892 NDR_PULL_ALLOC(ndr, r->info6);
1893 } else {
1894 r->info6 = NULL;
1896 break; }
1898 case 7: {
1899 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info7));
1900 if (_ptr_info7) {
1901 NDR_PULL_ALLOC(ndr, r->info7);
1902 } else {
1903 r->info7 = NULL;
1905 break; }
1907 case 100: {
1908 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info100));
1909 if (_ptr_info100) {
1910 NDR_PULL_ALLOC(ndr, r->info100);
1911 } else {
1912 r->info100 = NULL;
1914 break; }
1916 case 101: {
1917 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info101));
1918 if (_ptr_info101) {
1919 NDR_PULL_ALLOC(ndr, r->info101);
1920 } else {
1921 r->info101 = NULL;
1923 break; }
1925 case 102: {
1926 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info102));
1927 if (_ptr_info102) {
1928 NDR_PULL_ALLOC(ndr, r->info102);
1929 } else {
1930 r->info102 = NULL;
1932 break; }
1934 case 103: {
1935 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info103));
1936 if (_ptr_info103) {
1937 NDR_PULL_ALLOC(ndr, r->info103);
1938 } else {
1939 r->info103 = NULL;
1941 break; }
1943 case 104: {
1944 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info104));
1945 if (_ptr_info104) {
1946 NDR_PULL_ALLOC(ndr, r->info104);
1947 } else {
1948 r->info104 = NULL;
1950 break; }
1952 case 105: {
1953 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info105));
1954 if (_ptr_info105) {
1955 NDR_PULL_ALLOC(ndr, r->info105);
1956 } else {
1957 r->info105 = NULL;
1959 break; }
1961 case 106: {
1962 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info106));
1963 if (_ptr_info106) {
1964 NDR_PULL_ALLOC(ndr, r->info106);
1965 } else {
1966 r->info106 = NULL;
1968 break; }
1970 default:
1971 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1974 if (ndr_flags & NDR_BUFFERS) {
1975 switch (level) {
1976 case 0:
1977 if (r->info0) {
1978 _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
1979 NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
1980 NDR_CHECK(ndr_pull_dfs_Info0(ndr, NDR_SCALARS, r->info0));
1981 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
1983 break;
1985 case 1:
1986 if (r->info1) {
1987 _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
1988 NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
1989 NDR_CHECK(ndr_pull_dfs_Info1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
1990 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
1992 break;
1994 case 2:
1995 if (r->info2) {
1996 _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
1997 NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
1998 NDR_CHECK(ndr_pull_dfs_Info2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
1999 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
2001 break;
2003 case 3:
2004 if (r->info3) {
2005 _mem_save_info3_0 = NDR_PULL_GET_MEM_CTX(ndr);
2006 NDR_PULL_SET_MEM_CTX(ndr, r->info3, 0);
2007 NDR_CHECK(ndr_pull_dfs_Info3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
2008 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info3_0, 0);
2010 break;
2012 case 4:
2013 if (r->info4) {
2014 _mem_save_info4_0 = NDR_PULL_GET_MEM_CTX(ndr);
2015 NDR_PULL_SET_MEM_CTX(ndr, r->info4, 0);
2016 NDR_CHECK(ndr_pull_dfs_Info4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
2017 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info4_0, 0);
2019 break;
2021 case 5:
2022 if (r->info5) {
2023 _mem_save_info5_0 = NDR_PULL_GET_MEM_CTX(ndr);
2024 NDR_PULL_SET_MEM_CTX(ndr, r->info5, 0);
2025 NDR_CHECK(ndr_pull_dfs_Info5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5));
2026 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info5_0, 0);
2028 break;
2030 case 6:
2031 if (r->info6) {
2032 _mem_save_info6_0 = NDR_PULL_GET_MEM_CTX(ndr);
2033 NDR_PULL_SET_MEM_CTX(ndr, r->info6, 0);
2034 NDR_CHECK(ndr_pull_dfs_Info6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6));
2035 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info6_0, 0);
2037 break;
2039 case 7:
2040 if (r->info7) {
2041 _mem_save_info7_0 = NDR_PULL_GET_MEM_CTX(ndr);
2042 NDR_PULL_SET_MEM_CTX(ndr, r->info7, 0);
2043 NDR_CHECK(ndr_pull_dfs_Info7(ndr, NDR_SCALARS, r->info7));
2044 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info7_0, 0);
2046 break;
2048 case 100:
2049 if (r->info100) {
2050 _mem_save_info100_0 = NDR_PULL_GET_MEM_CTX(ndr);
2051 NDR_PULL_SET_MEM_CTX(ndr, r->info100, 0);
2052 NDR_CHECK(ndr_pull_dfs_Info100(ndr, NDR_SCALARS|NDR_BUFFERS, r->info100));
2053 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info100_0, 0);
2055 break;
2057 case 101:
2058 if (r->info101) {
2059 _mem_save_info101_0 = NDR_PULL_GET_MEM_CTX(ndr);
2060 NDR_PULL_SET_MEM_CTX(ndr, r->info101, 0);
2061 NDR_CHECK(ndr_pull_dfs_Info101(ndr, NDR_SCALARS, r->info101));
2062 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info101_0, 0);
2064 break;
2066 case 102:
2067 if (r->info102) {
2068 _mem_save_info102_0 = NDR_PULL_GET_MEM_CTX(ndr);
2069 NDR_PULL_SET_MEM_CTX(ndr, r->info102, 0);
2070 NDR_CHECK(ndr_pull_dfs_Info102(ndr, NDR_SCALARS, r->info102));
2071 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info102_0, 0);
2073 break;
2075 case 103:
2076 if (r->info103) {
2077 _mem_save_info103_0 = NDR_PULL_GET_MEM_CTX(ndr);
2078 NDR_PULL_SET_MEM_CTX(ndr, r->info103, 0);
2079 NDR_CHECK(ndr_pull_dfs_Info103(ndr, NDR_SCALARS, r->info103));
2080 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info103_0, 0);
2082 break;
2084 case 104:
2085 if (r->info104) {
2086 _mem_save_info104_0 = NDR_PULL_GET_MEM_CTX(ndr);
2087 NDR_PULL_SET_MEM_CTX(ndr, r->info104, 0);
2088 NDR_CHECK(ndr_pull_dfs_Info104(ndr, NDR_SCALARS, r->info104));
2089 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info104_0, 0);
2091 break;
2093 case 105:
2094 if (r->info105) {
2095 _mem_save_info105_0 = NDR_PULL_GET_MEM_CTX(ndr);
2096 NDR_PULL_SET_MEM_CTX(ndr, r->info105, 0);
2097 NDR_CHECK(ndr_pull_dfs_Info105(ndr, NDR_SCALARS|NDR_BUFFERS, r->info105));
2098 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info105_0, 0);
2100 break;
2102 case 106:
2103 if (r->info106) {
2104 _mem_save_info106_0 = NDR_PULL_GET_MEM_CTX(ndr);
2105 NDR_PULL_SET_MEM_CTX(ndr, r->info106, 0);
2106 NDR_CHECK(ndr_pull_dfs_Info106(ndr, NDR_SCALARS, r->info106));
2107 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info106_0, 0);
2109 break;
2111 default:
2112 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2115 return NDR_ERR_SUCCESS;
2118 _PUBLIC_ void ndr_print_dfs_Info(struct ndr_print *ndr, const char *name, const union dfs_Info *r)
2120 int level;
2121 level = ndr_print_get_switch_value(ndr, r);
2122 ndr_print_union(ndr, name, level, "dfs_Info");
2123 switch (level) {
2124 case 0:
2125 ndr_print_ptr(ndr, "info0", r->info0);
2126 ndr->depth++;
2127 if (r->info0) {
2128 ndr_print_dfs_Info0(ndr, "info0", r->info0);
2130 ndr->depth--;
2131 break;
2133 case 1:
2134 ndr_print_ptr(ndr, "info1", r->info1);
2135 ndr->depth++;
2136 if (r->info1) {
2137 ndr_print_dfs_Info1(ndr, "info1", r->info1);
2139 ndr->depth--;
2140 break;
2142 case 2:
2143 ndr_print_ptr(ndr, "info2", r->info2);
2144 ndr->depth++;
2145 if (r->info2) {
2146 ndr_print_dfs_Info2(ndr, "info2", r->info2);
2148 ndr->depth--;
2149 break;
2151 case 3:
2152 ndr_print_ptr(ndr, "info3", r->info3);
2153 ndr->depth++;
2154 if (r->info3) {
2155 ndr_print_dfs_Info3(ndr, "info3", r->info3);
2157 ndr->depth--;
2158 break;
2160 case 4:
2161 ndr_print_ptr(ndr, "info4", r->info4);
2162 ndr->depth++;
2163 if (r->info4) {
2164 ndr_print_dfs_Info4(ndr, "info4", r->info4);
2166 ndr->depth--;
2167 break;
2169 case 5:
2170 ndr_print_ptr(ndr, "info5", r->info5);
2171 ndr->depth++;
2172 if (r->info5) {
2173 ndr_print_dfs_Info5(ndr, "info5", r->info5);
2175 ndr->depth--;
2176 break;
2178 case 6:
2179 ndr_print_ptr(ndr, "info6", r->info6);
2180 ndr->depth++;
2181 if (r->info6) {
2182 ndr_print_dfs_Info6(ndr, "info6", r->info6);
2184 ndr->depth--;
2185 break;
2187 case 7:
2188 ndr_print_ptr(ndr, "info7", r->info7);
2189 ndr->depth++;
2190 if (r->info7) {
2191 ndr_print_dfs_Info7(ndr, "info7", r->info7);
2193 ndr->depth--;
2194 break;
2196 case 100:
2197 ndr_print_ptr(ndr, "info100", r->info100);
2198 ndr->depth++;
2199 if (r->info100) {
2200 ndr_print_dfs_Info100(ndr, "info100", r->info100);
2202 ndr->depth--;
2203 break;
2205 case 101:
2206 ndr_print_ptr(ndr, "info101", r->info101);
2207 ndr->depth++;
2208 if (r->info101) {
2209 ndr_print_dfs_Info101(ndr, "info101", r->info101);
2211 ndr->depth--;
2212 break;
2214 case 102:
2215 ndr_print_ptr(ndr, "info102", r->info102);
2216 ndr->depth++;
2217 if (r->info102) {
2218 ndr_print_dfs_Info102(ndr, "info102", r->info102);
2220 ndr->depth--;
2221 break;
2223 case 103:
2224 ndr_print_ptr(ndr, "info103", r->info103);
2225 ndr->depth++;
2226 if (r->info103) {
2227 ndr_print_dfs_Info103(ndr, "info103", r->info103);
2229 ndr->depth--;
2230 break;
2232 case 104:
2233 ndr_print_ptr(ndr, "info104", r->info104);
2234 ndr->depth++;
2235 if (r->info104) {
2236 ndr_print_dfs_Info104(ndr, "info104", r->info104);
2238 ndr->depth--;
2239 break;
2241 case 105:
2242 ndr_print_ptr(ndr, "info105", r->info105);
2243 ndr->depth++;
2244 if (r->info105) {
2245 ndr_print_dfs_Info105(ndr, "info105", r->info105);
2247 ndr->depth--;
2248 break;
2250 case 106:
2251 ndr_print_ptr(ndr, "info106", r->info106);
2252 ndr->depth++;
2253 if (r->info106) {
2254 ndr_print_dfs_Info106(ndr, "info106", r->info106);
2256 ndr->depth--;
2257 break;
2259 default:
2260 ndr_print_bad_level(ndr, name, level);
2264 static enum ndr_err_code ndr_push_dfs_EnumArray1(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray1 *r)
2266 uint32_t cntr_s_1;
2267 if (ndr_flags & NDR_SCALARS) {
2268 NDR_CHECK(ndr_push_align(ndr, 4));
2269 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2270 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2272 if (ndr_flags & NDR_BUFFERS) {
2273 if (r->s) {
2274 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2275 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2276 NDR_CHECK(ndr_push_dfs_Info1(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2278 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2279 NDR_CHECK(ndr_push_dfs_Info1(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2283 return NDR_ERR_SUCCESS;
2286 static enum ndr_err_code ndr_pull_dfs_EnumArray1(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray1 *r)
2288 uint32_t _ptr_s;
2289 uint32_t size_s_1 = 0;
2290 uint32_t cntr_s_1;
2291 TALLOC_CTX *_mem_save_s_0;
2292 TALLOC_CTX *_mem_save_s_1;
2293 if (ndr_flags & NDR_SCALARS) {
2294 NDR_CHECK(ndr_pull_align(ndr, 4));
2295 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2296 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2297 if (_ptr_s) {
2298 NDR_PULL_ALLOC(ndr, r->s);
2299 } else {
2300 r->s = NULL;
2303 if (ndr_flags & NDR_BUFFERS) {
2304 if (r->s) {
2305 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2306 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2307 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2308 size_s_1 = ndr_get_array_size(ndr, &r->s);
2309 NDR_PULL_ALLOC_N(ndr, r->s, size_s_1);
2310 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2311 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2312 for (cntr_s_1 = 0; cntr_s_1 < size_s_1; cntr_s_1++) {
2313 NDR_CHECK(ndr_pull_dfs_Info1(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2315 for (cntr_s_1 = 0; cntr_s_1 < size_s_1; cntr_s_1++) {
2316 NDR_CHECK(ndr_pull_dfs_Info1(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2318 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2319 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2321 if (r->s) {
2322 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2325 return NDR_ERR_SUCCESS;
2328 _PUBLIC_ void ndr_print_dfs_EnumArray1(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray1 *r)
2330 uint32_t cntr_s_1;
2331 ndr_print_struct(ndr, name, "dfs_EnumArray1");
2332 ndr->depth++;
2333 ndr_print_uint32(ndr, "count", r->count);
2334 ndr_print_ptr(ndr, "s", r->s);
2335 ndr->depth++;
2336 if (r->s) {
2337 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
2338 ndr->depth++;
2339 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2340 char *idx_1=NULL;
2341 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2342 ndr_print_dfs_Info1(ndr, "s", &r->s[cntr_s_1]);
2343 free(idx_1);
2346 ndr->depth--;
2348 ndr->depth--;
2349 ndr->depth--;
2352 static enum ndr_err_code ndr_push_dfs_EnumArray2(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray2 *r)
2354 uint32_t cntr_s_1;
2355 if (ndr_flags & NDR_SCALARS) {
2356 NDR_CHECK(ndr_push_align(ndr, 4));
2357 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2358 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2360 if (ndr_flags & NDR_BUFFERS) {
2361 if (r->s) {
2362 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2363 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2364 NDR_CHECK(ndr_push_dfs_Info2(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2366 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2367 NDR_CHECK(ndr_push_dfs_Info2(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2371 return NDR_ERR_SUCCESS;
2374 static enum ndr_err_code ndr_pull_dfs_EnumArray2(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray2 *r)
2376 uint32_t _ptr_s;
2377 uint32_t size_s_1 = 0;
2378 uint32_t cntr_s_1;
2379 TALLOC_CTX *_mem_save_s_0;
2380 TALLOC_CTX *_mem_save_s_1;
2381 if (ndr_flags & NDR_SCALARS) {
2382 NDR_CHECK(ndr_pull_align(ndr, 4));
2383 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2384 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2385 if (_ptr_s) {
2386 NDR_PULL_ALLOC(ndr, r->s);
2387 } else {
2388 r->s = NULL;
2391 if (ndr_flags & NDR_BUFFERS) {
2392 if (r->s) {
2393 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2394 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2395 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2396 size_s_1 = ndr_get_array_size(ndr, &r->s);
2397 NDR_PULL_ALLOC_N(ndr, r->s, size_s_1);
2398 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2399 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2400 for (cntr_s_1 = 0; cntr_s_1 < size_s_1; cntr_s_1++) {
2401 NDR_CHECK(ndr_pull_dfs_Info2(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2403 for (cntr_s_1 = 0; cntr_s_1 < size_s_1; cntr_s_1++) {
2404 NDR_CHECK(ndr_pull_dfs_Info2(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2406 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2407 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2409 if (r->s) {
2410 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2413 return NDR_ERR_SUCCESS;
2416 _PUBLIC_ void ndr_print_dfs_EnumArray2(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray2 *r)
2418 uint32_t cntr_s_1;
2419 ndr_print_struct(ndr, name, "dfs_EnumArray2");
2420 ndr->depth++;
2421 ndr_print_uint32(ndr, "count", r->count);
2422 ndr_print_ptr(ndr, "s", r->s);
2423 ndr->depth++;
2424 if (r->s) {
2425 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
2426 ndr->depth++;
2427 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2428 char *idx_1=NULL;
2429 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2430 ndr_print_dfs_Info2(ndr, "s", &r->s[cntr_s_1]);
2431 free(idx_1);
2434 ndr->depth--;
2436 ndr->depth--;
2437 ndr->depth--;
2440 static enum ndr_err_code ndr_push_dfs_EnumArray3(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray3 *r)
2442 uint32_t cntr_s_1;
2443 if (ndr_flags & NDR_SCALARS) {
2444 NDR_CHECK(ndr_push_align(ndr, 4));
2445 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2446 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2448 if (ndr_flags & NDR_BUFFERS) {
2449 if (r->s) {
2450 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2451 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2452 NDR_CHECK(ndr_push_dfs_Info3(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2454 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2455 NDR_CHECK(ndr_push_dfs_Info3(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2459 return NDR_ERR_SUCCESS;
2462 static enum ndr_err_code ndr_pull_dfs_EnumArray3(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray3 *r)
2464 uint32_t _ptr_s;
2465 uint32_t size_s_1 = 0;
2466 uint32_t cntr_s_1;
2467 TALLOC_CTX *_mem_save_s_0;
2468 TALLOC_CTX *_mem_save_s_1;
2469 if (ndr_flags & NDR_SCALARS) {
2470 NDR_CHECK(ndr_pull_align(ndr, 4));
2471 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2472 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2473 if (_ptr_s) {
2474 NDR_PULL_ALLOC(ndr, r->s);
2475 } else {
2476 r->s = NULL;
2479 if (ndr_flags & NDR_BUFFERS) {
2480 if (r->s) {
2481 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2482 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2483 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2484 size_s_1 = ndr_get_array_size(ndr, &r->s);
2485 NDR_PULL_ALLOC_N(ndr, r->s, size_s_1);
2486 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2487 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2488 for (cntr_s_1 = 0; cntr_s_1 < size_s_1; cntr_s_1++) {
2489 NDR_CHECK(ndr_pull_dfs_Info3(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2491 for (cntr_s_1 = 0; cntr_s_1 < size_s_1; cntr_s_1++) {
2492 NDR_CHECK(ndr_pull_dfs_Info3(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2494 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2495 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2497 if (r->s) {
2498 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2501 return NDR_ERR_SUCCESS;
2504 _PUBLIC_ void ndr_print_dfs_EnumArray3(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray3 *r)
2506 uint32_t cntr_s_1;
2507 ndr_print_struct(ndr, name, "dfs_EnumArray3");
2508 ndr->depth++;
2509 ndr_print_uint32(ndr, "count", r->count);
2510 ndr_print_ptr(ndr, "s", r->s);
2511 ndr->depth++;
2512 if (r->s) {
2513 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
2514 ndr->depth++;
2515 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2516 char *idx_1=NULL;
2517 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2518 ndr_print_dfs_Info3(ndr, "s", &r->s[cntr_s_1]);
2519 free(idx_1);
2522 ndr->depth--;
2524 ndr->depth--;
2525 ndr->depth--;
2528 static enum ndr_err_code ndr_push_dfs_EnumArray4(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray4 *r)
2530 uint32_t cntr_s_1;
2531 if (ndr_flags & NDR_SCALARS) {
2532 NDR_CHECK(ndr_push_align(ndr, 4));
2533 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2534 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2536 if (ndr_flags & NDR_BUFFERS) {
2537 if (r->s) {
2538 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2539 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2540 NDR_CHECK(ndr_push_dfs_Info4(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2542 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2543 NDR_CHECK(ndr_push_dfs_Info4(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2547 return NDR_ERR_SUCCESS;
2550 static enum ndr_err_code ndr_pull_dfs_EnumArray4(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray4 *r)
2552 uint32_t _ptr_s;
2553 uint32_t size_s_1 = 0;
2554 uint32_t cntr_s_1;
2555 TALLOC_CTX *_mem_save_s_0;
2556 TALLOC_CTX *_mem_save_s_1;
2557 if (ndr_flags & NDR_SCALARS) {
2558 NDR_CHECK(ndr_pull_align(ndr, 4));
2559 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2560 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2561 if (_ptr_s) {
2562 NDR_PULL_ALLOC(ndr, r->s);
2563 } else {
2564 r->s = NULL;
2567 if (ndr_flags & NDR_BUFFERS) {
2568 if (r->s) {
2569 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2570 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2571 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2572 size_s_1 = ndr_get_array_size(ndr, &r->s);
2573 NDR_PULL_ALLOC_N(ndr, r->s, size_s_1);
2574 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2575 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2576 for (cntr_s_1 = 0; cntr_s_1 < size_s_1; cntr_s_1++) {
2577 NDR_CHECK(ndr_pull_dfs_Info4(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2579 for (cntr_s_1 = 0; cntr_s_1 < size_s_1; cntr_s_1++) {
2580 NDR_CHECK(ndr_pull_dfs_Info4(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2582 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2583 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2585 if (r->s) {
2586 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2589 return NDR_ERR_SUCCESS;
2592 _PUBLIC_ void ndr_print_dfs_EnumArray4(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray4 *r)
2594 uint32_t cntr_s_1;
2595 ndr_print_struct(ndr, name, "dfs_EnumArray4");
2596 ndr->depth++;
2597 ndr_print_uint32(ndr, "count", r->count);
2598 ndr_print_ptr(ndr, "s", r->s);
2599 ndr->depth++;
2600 if (r->s) {
2601 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
2602 ndr->depth++;
2603 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2604 char *idx_1=NULL;
2605 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2606 ndr_print_dfs_Info4(ndr, "s", &r->s[cntr_s_1]);
2607 free(idx_1);
2610 ndr->depth--;
2612 ndr->depth--;
2613 ndr->depth--;
2616 static enum ndr_err_code ndr_push_dfs_EnumArray5(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray5 *r)
2618 uint32_t cntr_s_1;
2619 if (ndr_flags & NDR_SCALARS) {
2620 NDR_CHECK(ndr_push_align(ndr, 4));
2621 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2622 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2624 if (ndr_flags & NDR_BUFFERS) {
2625 if (r->s) {
2626 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2627 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2628 NDR_CHECK(ndr_push_dfs_Info5(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2630 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2631 NDR_CHECK(ndr_push_dfs_Info5(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2635 return NDR_ERR_SUCCESS;
2638 static enum ndr_err_code ndr_pull_dfs_EnumArray5(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray5 *r)
2640 uint32_t _ptr_s;
2641 uint32_t size_s_1 = 0;
2642 uint32_t cntr_s_1;
2643 TALLOC_CTX *_mem_save_s_0;
2644 TALLOC_CTX *_mem_save_s_1;
2645 if (ndr_flags & NDR_SCALARS) {
2646 NDR_CHECK(ndr_pull_align(ndr, 4));
2647 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2648 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2649 if (_ptr_s) {
2650 NDR_PULL_ALLOC(ndr, r->s);
2651 } else {
2652 r->s = NULL;
2655 if (ndr_flags & NDR_BUFFERS) {
2656 if (r->s) {
2657 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2658 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2659 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2660 size_s_1 = ndr_get_array_size(ndr, &r->s);
2661 NDR_PULL_ALLOC_N(ndr, r->s, size_s_1);
2662 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2663 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2664 for (cntr_s_1 = 0; cntr_s_1 < size_s_1; cntr_s_1++) {
2665 NDR_CHECK(ndr_pull_dfs_Info5(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2667 for (cntr_s_1 = 0; cntr_s_1 < size_s_1; cntr_s_1++) {
2668 NDR_CHECK(ndr_pull_dfs_Info5(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2670 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2671 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2673 if (r->s) {
2674 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2677 return NDR_ERR_SUCCESS;
2680 _PUBLIC_ void ndr_print_dfs_EnumArray5(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray5 *r)
2682 uint32_t cntr_s_1;
2683 ndr_print_struct(ndr, name, "dfs_EnumArray5");
2684 ndr->depth++;
2685 ndr_print_uint32(ndr, "count", r->count);
2686 ndr_print_ptr(ndr, "s", r->s);
2687 ndr->depth++;
2688 if (r->s) {
2689 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
2690 ndr->depth++;
2691 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2692 char *idx_1=NULL;
2693 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2694 ndr_print_dfs_Info5(ndr, "s", &r->s[cntr_s_1]);
2695 free(idx_1);
2698 ndr->depth--;
2700 ndr->depth--;
2701 ndr->depth--;
2704 static enum ndr_err_code ndr_push_dfs_EnumArray6(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray6 *r)
2706 uint32_t cntr_s_1;
2707 if (ndr_flags & NDR_SCALARS) {
2708 NDR_CHECK(ndr_push_align(ndr, 4));
2709 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2710 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2712 if (ndr_flags & NDR_BUFFERS) {
2713 if (r->s) {
2714 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2715 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2716 NDR_CHECK(ndr_push_dfs_Info6(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2718 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2719 NDR_CHECK(ndr_push_dfs_Info6(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2723 return NDR_ERR_SUCCESS;
2726 static enum ndr_err_code ndr_pull_dfs_EnumArray6(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray6 *r)
2728 uint32_t _ptr_s;
2729 uint32_t size_s_1 = 0;
2730 uint32_t cntr_s_1;
2731 TALLOC_CTX *_mem_save_s_0;
2732 TALLOC_CTX *_mem_save_s_1;
2733 if (ndr_flags & NDR_SCALARS) {
2734 NDR_CHECK(ndr_pull_align(ndr, 4));
2735 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2736 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2737 if (_ptr_s) {
2738 NDR_PULL_ALLOC(ndr, r->s);
2739 } else {
2740 r->s = NULL;
2743 if (ndr_flags & NDR_BUFFERS) {
2744 if (r->s) {
2745 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2746 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2747 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2748 size_s_1 = ndr_get_array_size(ndr, &r->s);
2749 NDR_PULL_ALLOC_N(ndr, r->s, size_s_1);
2750 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2751 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2752 for (cntr_s_1 = 0; cntr_s_1 < size_s_1; cntr_s_1++) {
2753 NDR_CHECK(ndr_pull_dfs_Info6(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2755 for (cntr_s_1 = 0; cntr_s_1 < size_s_1; cntr_s_1++) {
2756 NDR_CHECK(ndr_pull_dfs_Info6(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2758 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2759 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2761 if (r->s) {
2762 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2765 return NDR_ERR_SUCCESS;
2768 _PUBLIC_ void ndr_print_dfs_EnumArray6(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray6 *r)
2770 uint32_t cntr_s_1;
2771 ndr_print_struct(ndr, name, "dfs_EnumArray6");
2772 ndr->depth++;
2773 ndr_print_uint32(ndr, "count", r->count);
2774 ndr_print_ptr(ndr, "s", r->s);
2775 ndr->depth++;
2776 if (r->s) {
2777 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
2778 ndr->depth++;
2779 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2780 char *idx_1=NULL;
2781 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2782 ndr_print_dfs_Info6(ndr, "s", &r->s[cntr_s_1]);
2783 free(idx_1);
2786 ndr->depth--;
2788 ndr->depth--;
2789 ndr->depth--;
2792 static enum ndr_err_code ndr_push_dfs_EnumArray200(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray200 *r)
2794 uint32_t cntr_s_1;
2795 if (ndr_flags & NDR_SCALARS) {
2796 NDR_CHECK(ndr_push_align(ndr, 4));
2797 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2798 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2800 if (ndr_flags & NDR_BUFFERS) {
2801 if (r->s) {
2802 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2803 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2804 NDR_CHECK(ndr_push_dfs_Info200(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2806 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2807 NDR_CHECK(ndr_push_dfs_Info200(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2811 return NDR_ERR_SUCCESS;
2814 static enum ndr_err_code ndr_pull_dfs_EnumArray200(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray200 *r)
2816 uint32_t _ptr_s;
2817 uint32_t size_s_1 = 0;
2818 uint32_t cntr_s_1;
2819 TALLOC_CTX *_mem_save_s_0;
2820 TALLOC_CTX *_mem_save_s_1;
2821 if (ndr_flags & NDR_SCALARS) {
2822 NDR_CHECK(ndr_pull_align(ndr, 4));
2823 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2824 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2825 if (_ptr_s) {
2826 NDR_PULL_ALLOC(ndr, r->s);
2827 } else {
2828 r->s = NULL;
2831 if (ndr_flags & NDR_BUFFERS) {
2832 if (r->s) {
2833 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2834 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2835 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2836 size_s_1 = ndr_get_array_size(ndr, &r->s);
2837 NDR_PULL_ALLOC_N(ndr, r->s, size_s_1);
2838 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2839 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2840 for (cntr_s_1 = 0; cntr_s_1 < size_s_1; cntr_s_1++) {
2841 NDR_CHECK(ndr_pull_dfs_Info200(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2843 for (cntr_s_1 = 0; cntr_s_1 < size_s_1; cntr_s_1++) {
2844 NDR_CHECK(ndr_pull_dfs_Info200(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2846 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2847 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2849 if (r->s) {
2850 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2853 return NDR_ERR_SUCCESS;
2856 _PUBLIC_ void ndr_print_dfs_EnumArray200(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray200 *r)
2858 uint32_t cntr_s_1;
2859 ndr_print_struct(ndr, name, "dfs_EnumArray200");
2860 ndr->depth++;
2861 ndr_print_uint32(ndr, "count", r->count);
2862 ndr_print_ptr(ndr, "s", r->s);
2863 ndr->depth++;
2864 if (r->s) {
2865 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
2866 ndr->depth++;
2867 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2868 char *idx_1=NULL;
2869 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2870 ndr_print_dfs_Info200(ndr, "s", &r->s[cntr_s_1]);
2871 free(idx_1);
2874 ndr->depth--;
2876 ndr->depth--;
2877 ndr->depth--;
2880 static enum ndr_err_code ndr_push_dfs_EnumArray300(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray300 *r)
2882 uint32_t cntr_s_1;
2883 if (ndr_flags & NDR_SCALARS) {
2884 NDR_CHECK(ndr_push_align(ndr, 4));
2885 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2886 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2888 if (ndr_flags & NDR_BUFFERS) {
2889 if (r->s) {
2890 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2891 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2892 NDR_CHECK(ndr_push_dfs_Info300(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2894 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2895 NDR_CHECK(ndr_push_dfs_Info300(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2899 return NDR_ERR_SUCCESS;
2902 static enum ndr_err_code ndr_pull_dfs_EnumArray300(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray300 *r)
2904 uint32_t _ptr_s;
2905 uint32_t size_s_1 = 0;
2906 uint32_t cntr_s_1;
2907 TALLOC_CTX *_mem_save_s_0;
2908 TALLOC_CTX *_mem_save_s_1;
2909 if (ndr_flags & NDR_SCALARS) {
2910 NDR_CHECK(ndr_pull_align(ndr, 4));
2911 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2912 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2913 if (_ptr_s) {
2914 NDR_PULL_ALLOC(ndr, r->s);
2915 } else {
2916 r->s = NULL;
2919 if (ndr_flags & NDR_BUFFERS) {
2920 if (r->s) {
2921 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2922 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2923 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2924 size_s_1 = ndr_get_array_size(ndr, &r->s);
2925 NDR_PULL_ALLOC_N(ndr, r->s, size_s_1);
2926 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2927 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2928 for (cntr_s_1 = 0; cntr_s_1 < size_s_1; cntr_s_1++) {
2929 NDR_CHECK(ndr_pull_dfs_Info300(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2931 for (cntr_s_1 = 0; cntr_s_1 < size_s_1; cntr_s_1++) {
2932 NDR_CHECK(ndr_pull_dfs_Info300(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2934 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2935 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2937 if (r->s) {
2938 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2941 return NDR_ERR_SUCCESS;
2944 _PUBLIC_ void ndr_print_dfs_EnumArray300(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray300 *r)
2946 uint32_t cntr_s_1;
2947 ndr_print_struct(ndr, name, "dfs_EnumArray300");
2948 ndr->depth++;
2949 ndr_print_uint32(ndr, "count", r->count);
2950 ndr_print_ptr(ndr, "s", r->s);
2951 ndr->depth++;
2952 if (r->s) {
2953 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
2954 ndr->depth++;
2955 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2956 char *idx_1=NULL;
2957 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2958 ndr_print_dfs_Info300(ndr, "s", &r->s[cntr_s_1]);
2959 free(idx_1);
2962 ndr->depth--;
2964 ndr->depth--;
2965 ndr->depth--;
2968 static enum ndr_err_code ndr_push_dfs_EnumInfo(struct ndr_push *ndr, int ndr_flags, const union dfs_EnumInfo *r)
2970 if (ndr_flags & NDR_SCALARS) {
2971 int level = ndr_push_get_switch_value(ndr, r);
2972 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
2973 switch (level) {
2974 case 1: {
2975 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
2976 break; }
2978 case 2: {
2979 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
2980 break; }
2982 case 3: {
2983 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3));
2984 break; }
2986 case 4: {
2987 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info4));
2988 break; }
2990 case 5: {
2991 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info5));
2992 break; }
2994 case 6: {
2995 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info6));
2996 break; }
2998 case 200: {
2999 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info200));
3000 break; }
3002 case 300: {
3003 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info300));
3004 break; }
3006 default:
3007 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
3010 if (ndr_flags & NDR_BUFFERS) {
3011 int level = ndr_push_get_switch_value(ndr, r);
3012 switch (level) {
3013 case 1:
3014 if (r->info1) {
3015 NDR_CHECK(ndr_push_dfs_EnumArray1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
3017 break;
3019 case 2:
3020 if (r->info2) {
3021 NDR_CHECK(ndr_push_dfs_EnumArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
3023 break;
3025 case 3:
3026 if (r->info3) {
3027 NDR_CHECK(ndr_push_dfs_EnumArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
3029 break;
3031 case 4:
3032 if (r->info4) {
3033 NDR_CHECK(ndr_push_dfs_EnumArray4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
3035 break;
3037 case 5:
3038 if (r->info5) {
3039 NDR_CHECK(ndr_push_dfs_EnumArray5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5));
3041 break;
3043 case 6:
3044 if (r->info6) {
3045 NDR_CHECK(ndr_push_dfs_EnumArray6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6));
3047 break;
3049 case 200:
3050 if (r->info200) {
3051 NDR_CHECK(ndr_push_dfs_EnumArray200(ndr, NDR_SCALARS|NDR_BUFFERS, r->info200));
3053 break;
3055 case 300:
3056 if (r->info300) {
3057 NDR_CHECK(ndr_push_dfs_EnumArray300(ndr, NDR_SCALARS|NDR_BUFFERS, r->info300));
3059 break;
3061 default:
3062 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
3065 return NDR_ERR_SUCCESS;
3068 static enum ndr_err_code ndr_pull_dfs_EnumInfo(struct ndr_pull *ndr, int ndr_flags, union dfs_EnumInfo *r)
3070 int level;
3071 uint32_t _level;
3072 TALLOC_CTX *_mem_save_info1_0;
3073 uint32_t _ptr_info1;
3074 TALLOC_CTX *_mem_save_info2_0;
3075 uint32_t _ptr_info2;
3076 TALLOC_CTX *_mem_save_info3_0;
3077 uint32_t _ptr_info3;
3078 TALLOC_CTX *_mem_save_info4_0;
3079 uint32_t _ptr_info4;
3080 TALLOC_CTX *_mem_save_info5_0;
3081 uint32_t _ptr_info5;
3082 TALLOC_CTX *_mem_save_info6_0;
3083 uint32_t _ptr_info6;
3084 TALLOC_CTX *_mem_save_info200_0;
3085 uint32_t _ptr_info200;
3086 TALLOC_CTX *_mem_save_info300_0;
3087 uint32_t _ptr_info300;
3088 level = ndr_pull_get_switch_value(ndr, r);
3089 if (ndr_flags & NDR_SCALARS) {
3090 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
3091 if (_level != level) {
3092 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
3094 switch (level) {
3095 case 1: {
3096 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
3097 if (_ptr_info1) {
3098 NDR_PULL_ALLOC(ndr, r->info1);
3099 } else {
3100 r->info1 = NULL;
3102 break; }
3104 case 2: {
3105 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
3106 if (_ptr_info2) {
3107 NDR_PULL_ALLOC(ndr, r->info2);
3108 } else {
3109 r->info2 = NULL;
3111 break; }
3113 case 3: {
3114 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info3));
3115 if (_ptr_info3) {
3116 NDR_PULL_ALLOC(ndr, r->info3);
3117 } else {
3118 r->info3 = NULL;
3120 break; }
3122 case 4: {
3123 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info4));
3124 if (_ptr_info4) {
3125 NDR_PULL_ALLOC(ndr, r->info4);
3126 } else {
3127 r->info4 = NULL;
3129 break; }
3131 case 5: {
3132 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info5));
3133 if (_ptr_info5) {
3134 NDR_PULL_ALLOC(ndr, r->info5);
3135 } else {
3136 r->info5 = NULL;
3138 break; }
3140 case 6: {
3141 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info6));
3142 if (_ptr_info6) {
3143 NDR_PULL_ALLOC(ndr, r->info6);
3144 } else {
3145 r->info6 = NULL;
3147 break; }
3149 case 200: {
3150 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info200));
3151 if (_ptr_info200) {
3152 NDR_PULL_ALLOC(ndr, r->info200);
3153 } else {
3154 r->info200 = NULL;
3156 break; }
3158 case 300: {
3159 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info300));
3160 if (_ptr_info300) {
3161 NDR_PULL_ALLOC(ndr, r->info300);
3162 } else {
3163 r->info300 = NULL;
3165 break; }
3167 default:
3168 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
3171 if (ndr_flags & NDR_BUFFERS) {
3172 switch (level) {
3173 case 1:
3174 if (r->info1) {
3175 _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
3176 NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
3177 NDR_CHECK(ndr_pull_dfs_EnumArray1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
3178 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
3180 break;
3182 case 2:
3183 if (r->info2) {
3184 _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
3185 NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
3186 NDR_CHECK(ndr_pull_dfs_EnumArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
3187 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
3189 break;
3191 case 3:
3192 if (r->info3) {
3193 _mem_save_info3_0 = NDR_PULL_GET_MEM_CTX(ndr);
3194 NDR_PULL_SET_MEM_CTX(ndr, r->info3, 0);
3195 NDR_CHECK(ndr_pull_dfs_EnumArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
3196 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info3_0, 0);
3198 break;
3200 case 4:
3201 if (r->info4) {
3202 _mem_save_info4_0 = NDR_PULL_GET_MEM_CTX(ndr);
3203 NDR_PULL_SET_MEM_CTX(ndr, r->info4, 0);
3204 NDR_CHECK(ndr_pull_dfs_EnumArray4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
3205 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info4_0, 0);
3207 break;
3209 case 5:
3210 if (r->info5) {
3211 _mem_save_info5_0 = NDR_PULL_GET_MEM_CTX(ndr);
3212 NDR_PULL_SET_MEM_CTX(ndr, r->info5, 0);
3213 NDR_CHECK(ndr_pull_dfs_EnumArray5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5));
3214 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info5_0, 0);
3216 break;
3218 case 6:
3219 if (r->info6) {
3220 _mem_save_info6_0 = NDR_PULL_GET_MEM_CTX(ndr);
3221 NDR_PULL_SET_MEM_CTX(ndr, r->info6, 0);
3222 NDR_CHECK(ndr_pull_dfs_EnumArray6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6));
3223 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info6_0, 0);
3225 break;
3227 case 200:
3228 if (r->info200) {
3229 _mem_save_info200_0 = NDR_PULL_GET_MEM_CTX(ndr);
3230 NDR_PULL_SET_MEM_CTX(ndr, r->info200, 0);
3231 NDR_CHECK(ndr_pull_dfs_EnumArray200(ndr, NDR_SCALARS|NDR_BUFFERS, r->info200));
3232 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info200_0, 0);
3234 break;
3236 case 300:
3237 if (r->info300) {
3238 _mem_save_info300_0 = NDR_PULL_GET_MEM_CTX(ndr);
3239 NDR_PULL_SET_MEM_CTX(ndr, r->info300, 0);
3240 NDR_CHECK(ndr_pull_dfs_EnumArray300(ndr, NDR_SCALARS|NDR_BUFFERS, r->info300));
3241 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info300_0, 0);
3243 break;
3245 default:
3246 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
3249 return NDR_ERR_SUCCESS;
3252 _PUBLIC_ void ndr_print_dfs_EnumInfo(struct ndr_print *ndr, const char *name, const union dfs_EnumInfo *r)
3254 int level;
3255 level = ndr_print_get_switch_value(ndr, r);
3256 ndr_print_union(ndr, name, level, "dfs_EnumInfo");
3257 switch (level) {
3258 case 1:
3259 ndr_print_ptr(ndr, "info1", r->info1);
3260 ndr->depth++;
3261 if (r->info1) {
3262 ndr_print_dfs_EnumArray1(ndr, "info1", r->info1);
3264 ndr->depth--;
3265 break;
3267 case 2:
3268 ndr_print_ptr(ndr, "info2", r->info2);
3269 ndr->depth++;
3270 if (r->info2) {
3271 ndr_print_dfs_EnumArray2(ndr, "info2", r->info2);
3273 ndr->depth--;
3274 break;
3276 case 3:
3277 ndr_print_ptr(ndr, "info3", r->info3);
3278 ndr->depth++;
3279 if (r->info3) {
3280 ndr_print_dfs_EnumArray3(ndr, "info3", r->info3);
3282 ndr->depth--;
3283 break;
3285 case 4:
3286 ndr_print_ptr(ndr, "info4", r->info4);
3287 ndr->depth++;
3288 if (r->info4) {
3289 ndr_print_dfs_EnumArray4(ndr, "info4", r->info4);
3291 ndr->depth--;
3292 break;
3294 case 5:
3295 ndr_print_ptr(ndr, "info5", r->info5);
3296 ndr->depth++;
3297 if (r->info5) {
3298 ndr_print_dfs_EnumArray5(ndr, "info5", r->info5);
3300 ndr->depth--;
3301 break;
3303 case 6:
3304 ndr_print_ptr(ndr, "info6", r->info6);
3305 ndr->depth++;
3306 if (r->info6) {
3307 ndr_print_dfs_EnumArray6(ndr, "info6", r->info6);
3309 ndr->depth--;
3310 break;
3312 case 200:
3313 ndr_print_ptr(ndr, "info200", r->info200);
3314 ndr->depth++;
3315 if (r->info200) {
3316 ndr_print_dfs_EnumArray200(ndr, "info200", r->info200);
3318 ndr->depth--;
3319 break;
3321 case 300:
3322 ndr_print_ptr(ndr, "info300", r->info300);
3323 ndr->depth++;
3324 if (r->info300) {
3325 ndr_print_dfs_EnumArray300(ndr, "info300", r->info300);
3327 ndr->depth--;
3328 break;
3330 default:
3331 ndr_print_bad_level(ndr, name, level);
3335 static enum ndr_err_code ndr_push_dfs_EnumStruct(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumStruct *r)
3337 if (ndr_flags & NDR_SCALARS) {
3338 NDR_CHECK(ndr_push_align(ndr, 4));
3339 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
3340 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->e, r->level));
3341 NDR_CHECK(ndr_push_dfs_EnumInfo(ndr, NDR_SCALARS, &r->e));
3343 if (ndr_flags & NDR_BUFFERS) {
3344 NDR_CHECK(ndr_push_dfs_EnumInfo(ndr, NDR_BUFFERS, &r->e));
3346 return NDR_ERR_SUCCESS;
3349 static enum ndr_err_code ndr_pull_dfs_EnumStruct(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumStruct *r)
3351 if (ndr_flags & NDR_SCALARS) {
3352 NDR_CHECK(ndr_pull_align(ndr, 4));
3353 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
3354 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->e, r->level));
3355 NDR_CHECK(ndr_pull_dfs_EnumInfo(ndr, NDR_SCALARS, &r->e));
3357 if (ndr_flags & NDR_BUFFERS) {
3358 NDR_CHECK(ndr_pull_dfs_EnumInfo(ndr, NDR_BUFFERS, &r->e));
3360 return NDR_ERR_SUCCESS;
3363 _PUBLIC_ void ndr_print_dfs_EnumStruct(struct ndr_print *ndr, const char *name, const struct dfs_EnumStruct *r)
3365 ndr_print_struct(ndr, name, "dfs_EnumStruct");
3366 ndr->depth++;
3367 ndr_print_uint32(ndr, "level", r->level);
3368 ndr_print_set_switch_value(ndr, &r->e, r->level);
3369 ndr_print_dfs_EnumInfo(ndr, "e", &r->e);
3370 ndr->depth--;
3373 static enum ndr_err_code ndr_push_dfs_UnknownStruct(struct ndr_push *ndr, int ndr_flags, const struct dfs_UnknownStruct *r)
3375 if (ndr_flags & NDR_SCALARS) {
3376 NDR_CHECK(ndr_push_align(ndr, 4));
3377 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
3378 NDR_CHECK(ndr_push_unique_ptr(ndr, r->unknown2));
3380 if (ndr_flags & NDR_BUFFERS) {
3381 if (r->unknown2) {
3382 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->unknown2, CH_UTF16)));
3383 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3384 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->unknown2, CH_UTF16)));
3385 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->unknown2, ndr_charset_length(r->unknown2, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3388 return NDR_ERR_SUCCESS;
3391 static enum ndr_err_code ndr_pull_dfs_UnknownStruct(struct ndr_pull *ndr, int ndr_flags, struct dfs_UnknownStruct *r)
3393 uint32_t _ptr_unknown2;
3394 uint32_t size_unknown2_1 = 0;
3395 uint32_t length_unknown2_1 = 0;
3396 TALLOC_CTX *_mem_save_unknown2_0;
3397 if (ndr_flags & NDR_SCALARS) {
3398 NDR_CHECK(ndr_pull_align(ndr, 4));
3399 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
3400 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
3401 if (_ptr_unknown2) {
3402 NDR_PULL_ALLOC(ndr, r->unknown2);
3403 } else {
3404 r->unknown2 = NULL;
3407 if (ndr_flags & NDR_BUFFERS) {
3408 if (r->unknown2) {
3409 _mem_save_unknown2_0 = NDR_PULL_GET_MEM_CTX(ndr);
3410 NDR_PULL_SET_MEM_CTX(ndr, r->unknown2, 0);
3411 NDR_CHECK(ndr_pull_array_size(ndr, &r->unknown2));
3412 NDR_CHECK(ndr_pull_array_length(ndr, &r->unknown2));
3413 size_unknown2_1 = ndr_get_array_size(ndr, &r->unknown2);
3414 length_unknown2_1 = ndr_get_array_length(ndr, &r->unknown2);
3415 if (length_unknown2_1 > size_unknown2_1) {
3416 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_unknown2_1, length_unknown2_1);
3418 NDR_CHECK(ndr_check_string_terminator(ndr, length_unknown2_1, sizeof(uint16_t)));
3419 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->unknown2, length_unknown2_1, sizeof(uint16_t), CH_UTF16));
3420 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_0, 0);
3423 return NDR_ERR_SUCCESS;
3426 _PUBLIC_ void ndr_print_dfs_UnknownStruct(struct ndr_print *ndr, const char *name, const struct dfs_UnknownStruct *r)
3428 ndr_print_struct(ndr, name, "dfs_UnknownStruct");
3429 ndr->depth++;
3430 ndr_print_uint32(ndr, "unknown1", r->unknown1);
3431 ndr_print_ptr(ndr, "unknown2", r->unknown2);
3432 ndr->depth++;
3433 if (r->unknown2) {
3434 ndr_print_string(ndr, "unknown2", r->unknown2);
3436 ndr->depth--;
3437 ndr->depth--;
3440 _PUBLIC_ enum ndr_err_code ndr_push_dfs_GetManagerVersion(struct ndr_push *ndr, int flags, const struct dfs_GetManagerVersion *r)
3442 if (flags & NDR_IN) {
3444 if (flags & NDR_OUT) {
3445 if (r->out.version == NULL) {
3446 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3448 NDR_CHECK(ndr_push_dfs_ManagerVersion(ndr, NDR_SCALARS, *r->out.version));
3450 return NDR_ERR_SUCCESS;
3453 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_GetManagerVersion(struct ndr_pull *ndr, int flags, struct dfs_GetManagerVersion *r)
3455 TALLOC_CTX *_mem_save_version_0;
3456 if (flags & NDR_IN) {
3457 ZERO_STRUCT(r->out);
3459 NDR_PULL_ALLOC(ndr, r->out.version);
3460 ZERO_STRUCTP(r->out.version);
3462 if (flags & NDR_OUT) {
3463 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3464 NDR_PULL_ALLOC(ndr, r->out.version);
3466 _mem_save_version_0 = NDR_PULL_GET_MEM_CTX(ndr);
3467 NDR_PULL_SET_MEM_CTX(ndr, r->out.version, LIBNDR_FLAG_REF_ALLOC);
3468 NDR_CHECK(ndr_pull_dfs_ManagerVersion(ndr, NDR_SCALARS, r->out.version));
3469 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_version_0, LIBNDR_FLAG_REF_ALLOC);
3471 return NDR_ERR_SUCCESS;
3474 _PUBLIC_ void ndr_print_dfs_GetManagerVersion(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetManagerVersion *r)
3476 ndr_print_struct(ndr, name, "dfs_GetManagerVersion");
3477 ndr->depth++;
3478 if (flags & NDR_SET_VALUES) {
3479 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3481 if (flags & NDR_IN) {
3482 ndr_print_struct(ndr, "in", "dfs_GetManagerVersion");
3483 ndr->depth++;
3484 ndr->depth--;
3486 if (flags & NDR_OUT) {
3487 ndr_print_struct(ndr, "out", "dfs_GetManagerVersion");
3488 ndr->depth++;
3489 ndr_print_ptr(ndr, "version", r->out.version);
3490 ndr->depth++;
3491 ndr_print_dfs_ManagerVersion(ndr, "version", *r->out.version);
3492 ndr->depth--;
3493 ndr->depth--;
3495 ndr->depth--;
3498 static enum ndr_err_code ndr_push_dfs_Add(struct ndr_push *ndr, int flags, const struct dfs_Add *r)
3500 if (flags & NDR_IN) {
3501 if (r->in.path == NULL) {
3502 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3504 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
3505 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3506 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
3507 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path, ndr_charset_length(r->in.path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3508 if (r->in.server == NULL) {
3509 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3511 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
3512 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3513 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
3514 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server, ndr_charset_length(r->in.server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3515 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.share));
3516 if (r->in.share) {
3517 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
3518 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3519 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
3520 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share, ndr_charset_length(r->in.share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3522 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.comment));
3523 if (r->in.comment) {
3524 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
3525 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3526 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
3527 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.comment, ndr_charset_length(r->in.comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3529 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
3531 if (flags & NDR_OUT) {
3532 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3534 return NDR_ERR_SUCCESS;
3537 static enum ndr_err_code ndr_pull_dfs_Add(struct ndr_pull *ndr, int flags, struct dfs_Add *r)
3539 uint32_t size_path_1 = 0;
3540 uint32_t length_path_1 = 0;
3541 uint32_t size_server_1 = 0;
3542 uint32_t length_server_1 = 0;
3543 uint32_t _ptr_share;
3544 uint32_t size_share_1 = 0;
3545 uint32_t length_share_1 = 0;
3546 uint32_t _ptr_comment;
3547 uint32_t size_comment_1 = 0;
3548 uint32_t length_comment_1 = 0;
3549 TALLOC_CTX *_mem_save_share_0;
3550 TALLOC_CTX *_mem_save_comment_0;
3551 if (flags & NDR_IN) {
3552 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path));
3553 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path));
3554 size_path_1 = ndr_get_array_size(ndr, &r->in.path);
3555 length_path_1 = ndr_get_array_length(ndr, &r->in.path);
3556 if (length_path_1 > size_path_1) {
3557 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_path_1, length_path_1);
3559 NDR_CHECK(ndr_check_string_terminator(ndr, length_path_1, sizeof(uint16_t)));
3560 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path, length_path_1, sizeof(uint16_t), CH_UTF16));
3561 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server));
3562 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server));
3563 size_server_1 = ndr_get_array_size(ndr, &r->in.server);
3564 length_server_1 = ndr_get_array_length(ndr, &r->in.server);
3565 if (length_server_1 > size_server_1) {
3566 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_1, length_server_1);
3568 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_1, sizeof(uint16_t)));
3569 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server, length_server_1, sizeof(uint16_t), CH_UTF16));
3570 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share));
3571 if (_ptr_share) {
3572 NDR_PULL_ALLOC(ndr, r->in.share);
3573 } else {
3574 r->in.share = NULL;
3576 if (r->in.share) {
3577 _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr);
3578 NDR_PULL_SET_MEM_CTX(ndr, r->in.share, 0);
3579 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share));
3580 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share));
3581 size_share_1 = ndr_get_array_size(ndr, &r->in.share);
3582 length_share_1 = ndr_get_array_length(ndr, &r->in.share);
3583 if (length_share_1 > size_share_1) {
3584 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_share_1, length_share_1);
3586 NDR_CHECK(ndr_check_string_terminator(ndr, length_share_1, sizeof(uint16_t)));
3587 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share, length_share_1, sizeof(uint16_t), CH_UTF16));
3588 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0);
3590 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
3591 if (_ptr_comment) {
3592 NDR_PULL_ALLOC(ndr, r->in.comment);
3593 } else {
3594 r->in.comment = NULL;
3596 if (r->in.comment) {
3597 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
3598 NDR_PULL_SET_MEM_CTX(ndr, r->in.comment, 0);
3599 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.comment));
3600 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.comment));
3601 size_comment_1 = ndr_get_array_size(ndr, &r->in.comment);
3602 length_comment_1 = ndr_get_array_length(ndr, &r->in.comment);
3603 if (length_comment_1 > size_comment_1) {
3604 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_comment_1, length_comment_1);
3606 NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_1, sizeof(uint16_t)));
3607 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.comment, length_comment_1, sizeof(uint16_t), CH_UTF16));
3608 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
3610 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
3612 if (flags & NDR_OUT) {
3613 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3615 return NDR_ERR_SUCCESS;
3618 _PUBLIC_ void ndr_print_dfs_Add(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Add *r)
3620 ndr_print_struct(ndr, name, "dfs_Add");
3621 ndr->depth++;
3622 if (flags & NDR_SET_VALUES) {
3623 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3625 if (flags & NDR_IN) {
3626 ndr_print_struct(ndr, "in", "dfs_Add");
3627 ndr->depth++;
3628 ndr_print_ptr(ndr, "path", r->in.path);
3629 ndr->depth++;
3630 ndr_print_string(ndr, "path", r->in.path);
3631 ndr->depth--;
3632 ndr_print_ptr(ndr, "server", r->in.server);
3633 ndr->depth++;
3634 ndr_print_string(ndr, "server", r->in.server);
3635 ndr->depth--;
3636 ndr_print_ptr(ndr, "share", r->in.share);
3637 ndr->depth++;
3638 if (r->in.share) {
3639 ndr_print_string(ndr, "share", r->in.share);
3641 ndr->depth--;
3642 ndr_print_ptr(ndr, "comment", r->in.comment);
3643 ndr->depth++;
3644 if (r->in.comment) {
3645 ndr_print_string(ndr, "comment", r->in.comment);
3647 ndr->depth--;
3648 ndr_print_uint32(ndr, "flags", r->in.flags);
3649 ndr->depth--;
3651 if (flags & NDR_OUT) {
3652 ndr_print_struct(ndr, "out", "dfs_Add");
3653 ndr->depth++;
3654 ndr_print_WERROR(ndr, "result", r->out.result);
3655 ndr->depth--;
3657 ndr->depth--;
3660 static enum ndr_err_code ndr_push_dfs_Remove(struct ndr_push *ndr, int flags, const struct dfs_Remove *r)
3662 if (flags & NDR_IN) {
3663 if (r->in.dfs_entry_path == NULL) {
3664 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3666 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
3667 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3668 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
3669 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dfs_entry_path, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3670 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
3671 if (r->in.servername) {
3672 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
3673 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3674 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
3675 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3677 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.sharename));
3678 if (r->in.sharename) {
3679 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16)));
3680 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3681 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16)));
3682 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.sharename, ndr_charset_length(r->in.sharename, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3685 if (flags & NDR_OUT) {
3686 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3688 return NDR_ERR_SUCCESS;
3691 static enum ndr_err_code ndr_pull_dfs_Remove(struct ndr_pull *ndr, int flags, struct dfs_Remove *r)
3693 uint32_t size_dfs_entry_path_1 = 0;
3694 uint32_t length_dfs_entry_path_1 = 0;
3695 uint32_t _ptr_servername;
3696 uint32_t size_servername_1 = 0;
3697 uint32_t length_servername_1 = 0;
3698 uint32_t _ptr_sharename;
3699 uint32_t size_sharename_1 = 0;
3700 uint32_t length_sharename_1 = 0;
3701 TALLOC_CTX *_mem_save_servername_0;
3702 TALLOC_CTX *_mem_save_sharename_0;
3703 if (flags & NDR_IN) {
3704 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_entry_path));
3705 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_entry_path));
3706 size_dfs_entry_path_1 = ndr_get_array_size(ndr, &r->in.dfs_entry_path);
3707 length_dfs_entry_path_1 = ndr_get_array_length(ndr, &r->in.dfs_entry_path);
3708 if (length_dfs_entry_path_1 > size_dfs_entry_path_1) {
3709 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_dfs_entry_path_1, length_dfs_entry_path_1);
3711 NDR_CHECK(ndr_check_string_terminator(ndr, length_dfs_entry_path_1, sizeof(uint16_t)));
3712 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfs_entry_path, length_dfs_entry_path_1, sizeof(uint16_t), CH_UTF16));
3713 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
3714 if (_ptr_servername) {
3715 NDR_PULL_ALLOC(ndr, r->in.servername);
3716 } else {
3717 r->in.servername = NULL;
3719 if (r->in.servername) {
3720 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
3721 NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
3722 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
3723 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
3724 size_servername_1 = ndr_get_array_size(ndr, &r->in.servername);
3725 length_servername_1 = ndr_get_array_length(ndr, &r->in.servername);
3726 if (length_servername_1 > size_servername_1) {
3727 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_servername_1, length_servername_1);
3729 NDR_CHECK(ndr_check_string_terminator(ndr, length_servername_1, sizeof(uint16_t)));
3730 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, length_servername_1, sizeof(uint16_t), CH_UTF16));
3731 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
3733 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sharename));
3734 if (_ptr_sharename) {
3735 NDR_PULL_ALLOC(ndr, r->in.sharename);
3736 } else {
3737 r->in.sharename = NULL;
3739 if (r->in.sharename) {
3740 _mem_save_sharename_0 = NDR_PULL_GET_MEM_CTX(ndr);
3741 NDR_PULL_SET_MEM_CTX(ndr, r->in.sharename, 0);
3742 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.sharename));
3743 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.sharename));
3744 size_sharename_1 = ndr_get_array_size(ndr, &r->in.sharename);
3745 length_sharename_1 = ndr_get_array_length(ndr, &r->in.sharename);
3746 if (length_sharename_1 > size_sharename_1) {
3747 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_sharename_1, length_sharename_1);
3749 NDR_CHECK(ndr_check_string_terminator(ndr, length_sharename_1, sizeof(uint16_t)));
3750 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.sharename, length_sharename_1, sizeof(uint16_t), CH_UTF16));
3751 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sharename_0, 0);
3754 if (flags & NDR_OUT) {
3755 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3757 return NDR_ERR_SUCCESS;
3760 _PUBLIC_ void ndr_print_dfs_Remove(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Remove *r)
3762 ndr_print_struct(ndr, name, "dfs_Remove");
3763 ndr->depth++;
3764 if (flags & NDR_SET_VALUES) {
3765 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3767 if (flags & NDR_IN) {
3768 ndr_print_struct(ndr, "in", "dfs_Remove");
3769 ndr->depth++;
3770 ndr_print_ptr(ndr, "dfs_entry_path", r->in.dfs_entry_path);
3771 ndr->depth++;
3772 ndr_print_string(ndr, "dfs_entry_path", r->in.dfs_entry_path);
3773 ndr->depth--;
3774 ndr_print_ptr(ndr, "servername", r->in.servername);
3775 ndr->depth++;
3776 if (r->in.servername) {
3777 ndr_print_string(ndr, "servername", r->in.servername);
3779 ndr->depth--;
3780 ndr_print_ptr(ndr, "sharename", r->in.sharename);
3781 ndr->depth++;
3782 if (r->in.sharename) {
3783 ndr_print_string(ndr, "sharename", r->in.sharename);
3785 ndr->depth--;
3786 ndr->depth--;
3788 if (flags & NDR_OUT) {
3789 ndr_print_struct(ndr, "out", "dfs_Remove");
3790 ndr->depth++;
3791 ndr_print_WERROR(ndr, "result", r->out.result);
3792 ndr->depth--;
3794 ndr->depth--;
3797 static enum ndr_err_code ndr_push_dfs_SetInfo(struct ndr_push *ndr, int flags, const struct dfs_SetInfo *r)
3799 if (flags & NDR_IN) {
3800 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
3801 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3802 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
3803 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dfs_entry_path, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3804 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
3805 if (r->in.servername) {
3806 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
3807 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3808 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
3809 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3811 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.sharename));
3812 if (r->in.sharename) {
3813 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16)));
3814 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3815 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16)));
3816 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.sharename, ndr_charset_length(r->in.sharename, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3818 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
3819 if (r->in.info == NULL) {
3820 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3822 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
3823 NDR_CHECK(ndr_push_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
3825 if (flags & NDR_OUT) {
3826 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3828 return NDR_ERR_SUCCESS;
3831 static enum ndr_err_code ndr_pull_dfs_SetInfo(struct ndr_pull *ndr, int flags, struct dfs_SetInfo *r)
3833 uint32_t size_dfs_entry_path_0 = 0;
3834 uint32_t length_dfs_entry_path_0 = 0;
3835 uint32_t _ptr_servername;
3836 uint32_t size_servername_1 = 0;
3837 uint32_t length_servername_1 = 0;
3838 uint32_t _ptr_sharename;
3839 uint32_t size_sharename_1 = 0;
3840 uint32_t length_sharename_1 = 0;
3841 TALLOC_CTX *_mem_save_servername_0;
3842 TALLOC_CTX *_mem_save_sharename_0;
3843 TALLOC_CTX *_mem_save_info_0;
3844 if (flags & NDR_IN) {
3845 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_entry_path));
3846 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_entry_path));
3847 size_dfs_entry_path_0 = ndr_get_array_size(ndr, &r->in.dfs_entry_path);
3848 length_dfs_entry_path_0 = ndr_get_array_length(ndr, &r->in.dfs_entry_path);
3849 if (length_dfs_entry_path_0 > size_dfs_entry_path_0) {
3850 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_dfs_entry_path_0, length_dfs_entry_path_0);
3852 NDR_CHECK(ndr_check_string_terminator(ndr, length_dfs_entry_path_0, sizeof(uint16_t)));
3853 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfs_entry_path, length_dfs_entry_path_0, sizeof(uint16_t), CH_UTF16));
3854 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
3855 if (_ptr_servername) {
3856 NDR_PULL_ALLOC(ndr, r->in.servername);
3857 } else {
3858 r->in.servername = NULL;
3860 if (r->in.servername) {
3861 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
3862 NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
3863 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
3864 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
3865 size_servername_1 = ndr_get_array_size(ndr, &r->in.servername);
3866 length_servername_1 = ndr_get_array_length(ndr, &r->in.servername);
3867 if (length_servername_1 > size_servername_1) {
3868 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_servername_1, length_servername_1);
3870 NDR_CHECK(ndr_check_string_terminator(ndr, length_servername_1, sizeof(uint16_t)));
3871 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, length_servername_1, sizeof(uint16_t), CH_UTF16));
3872 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
3874 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sharename));
3875 if (_ptr_sharename) {
3876 NDR_PULL_ALLOC(ndr, r->in.sharename);
3877 } else {
3878 r->in.sharename = NULL;
3880 if (r->in.sharename) {
3881 _mem_save_sharename_0 = NDR_PULL_GET_MEM_CTX(ndr);
3882 NDR_PULL_SET_MEM_CTX(ndr, r->in.sharename, 0);
3883 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.sharename));
3884 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.sharename));
3885 size_sharename_1 = ndr_get_array_size(ndr, &r->in.sharename);
3886 length_sharename_1 = ndr_get_array_length(ndr, &r->in.sharename);
3887 if (length_sharename_1 > size_sharename_1) {
3888 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_sharename_1, length_sharename_1);
3890 NDR_CHECK(ndr_check_string_terminator(ndr, length_sharename_1, sizeof(uint16_t)));
3891 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.sharename, length_sharename_1, sizeof(uint16_t), CH_UTF16));
3892 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sharename_0, 0);
3894 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
3895 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3896 NDR_PULL_ALLOC(ndr, r->in.info);
3898 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
3899 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
3900 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
3901 NDR_CHECK(ndr_pull_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
3902 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
3904 if (flags & NDR_OUT) {
3905 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3907 return NDR_ERR_SUCCESS;
3910 _PUBLIC_ void ndr_print_dfs_SetInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetInfo *r)
3912 ndr_print_struct(ndr, name, "dfs_SetInfo");
3913 ndr->depth++;
3914 if (flags & NDR_SET_VALUES) {
3915 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3917 if (flags & NDR_IN) {
3918 ndr_print_struct(ndr, "in", "dfs_SetInfo");
3919 ndr->depth++;
3920 ndr_print_string(ndr, "dfs_entry_path", r->in.dfs_entry_path);
3921 ndr_print_ptr(ndr, "servername", r->in.servername);
3922 ndr->depth++;
3923 if (r->in.servername) {
3924 ndr_print_string(ndr, "servername", r->in.servername);
3926 ndr->depth--;
3927 ndr_print_ptr(ndr, "sharename", r->in.sharename);
3928 ndr->depth++;
3929 if (r->in.sharename) {
3930 ndr_print_string(ndr, "sharename", r->in.sharename);
3932 ndr->depth--;
3933 ndr_print_uint32(ndr, "level", r->in.level);
3934 ndr_print_ptr(ndr, "info", r->in.info);
3935 ndr->depth++;
3936 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
3937 ndr_print_dfs_Info(ndr, "info", r->in.info);
3938 ndr->depth--;
3939 ndr->depth--;
3941 if (flags & NDR_OUT) {
3942 ndr_print_struct(ndr, "out", "dfs_SetInfo");
3943 ndr->depth++;
3944 ndr_print_WERROR(ndr, "result", r->out.result);
3945 ndr->depth--;
3947 ndr->depth--;
3950 static enum ndr_err_code ndr_push_dfs_GetInfo(struct ndr_push *ndr, int flags, const struct dfs_GetInfo *r)
3952 if (flags & NDR_IN) {
3953 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
3954 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3955 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
3956 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dfs_entry_path, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3957 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
3958 if (r->in.servername) {
3959 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
3960 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3961 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
3962 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3964 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.sharename));
3965 if (r->in.sharename) {
3966 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16)));
3967 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3968 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16)));
3969 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.sharename, ndr_charset_length(r->in.sharename, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3971 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
3973 if (flags & NDR_OUT) {
3974 if (r->out.info == NULL) {
3975 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3977 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
3978 NDR_CHECK(ndr_push_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
3979 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3981 return NDR_ERR_SUCCESS;
3984 static enum ndr_err_code ndr_pull_dfs_GetInfo(struct ndr_pull *ndr, int flags, struct dfs_GetInfo *r)
3986 uint32_t size_dfs_entry_path_0 = 0;
3987 uint32_t length_dfs_entry_path_0 = 0;
3988 uint32_t _ptr_servername;
3989 uint32_t size_servername_1 = 0;
3990 uint32_t length_servername_1 = 0;
3991 uint32_t _ptr_sharename;
3992 uint32_t size_sharename_1 = 0;
3993 uint32_t length_sharename_1 = 0;
3994 TALLOC_CTX *_mem_save_servername_0;
3995 TALLOC_CTX *_mem_save_sharename_0;
3996 TALLOC_CTX *_mem_save_info_0;
3997 if (flags & NDR_IN) {
3998 ZERO_STRUCT(r->out);
4000 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_entry_path));
4001 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_entry_path));
4002 size_dfs_entry_path_0 = ndr_get_array_size(ndr, &r->in.dfs_entry_path);
4003 length_dfs_entry_path_0 = ndr_get_array_length(ndr, &r->in.dfs_entry_path);
4004 if (length_dfs_entry_path_0 > size_dfs_entry_path_0) {
4005 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_dfs_entry_path_0, length_dfs_entry_path_0);
4007 NDR_CHECK(ndr_check_string_terminator(ndr, length_dfs_entry_path_0, sizeof(uint16_t)));
4008 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfs_entry_path, length_dfs_entry_path_0, sizeof(uint16_t), CH_UTF16));
4009 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
4010 if (_ptr_servername) {
4011 NDR_PULL_ALLOC(ndr, r->in.servername);
4012 } else {
4013 r->in.servername = NULL;
4015 if (r->in.servername) {
4016 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
4017 NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
4018 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
4019 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
4020 size_servername_1 = ndr_get_array_size(ndr, &r->in.servername);
4021 length_servername_1 = ndr_get_array_length(ndr, &r->in.servername);
4022 if (length_servername_1 > size_servername_1) {
4023 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_servername_1, length_servername_1);
4025 NDR_CHECK(ndr_check_string_terminator(ndr, length_servername_1, sizeof(uint16_t)));
4026 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, length_servername_1, sizeof(uint16_t), CH_UTF16));
4027 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
4029 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sharename));
4030 if (_ptr_sharename) {
4031 NDR_PULL_ALLOC(ndr, r->in.sharename);
4032 } else {
4033 r->in.sharename = NULL;
4035 if (r->in.sharename) {
4036 _mem_save_sharename_0 = NDR_PULL_GET_MEM_CTX(ndr);
4037 NDR_PULL_SET_MEM_CTX(ndr, r->in.sharename, 0);
4038 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.sharename));
4039 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.sharename));
4040 size_sharename_1 = ndr_get_array_size(ndr, &r->in.sharename);
4041 length_sharename_1 = ndr_get_array_length(ndr, &r->in.sharename);
4042 if (length_sharename_1 > size_sharename_1) {
4043 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_sharename_1, length_sharename_1);
4045 NDR_CHECK(ndr_check_string_terminator(ndr, length_sharename_1, sizeof(uint16_t)));
4046 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.sharename, length_sharename_1, sizeof(uint16_t), CH_UTF16));
4047 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sharename_0, 0);
4049 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
4050 NDR_PULL_ALLOC(ndr, r->out.info);
4051 ZERO_STRUCTP(r->out.info);
4053 if (flags & NDR_OUT) {
4054 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4055 NDR_PULL_ALLOC(ndr, r->out.info);
4057 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
4058 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
4059 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
4060 NDR_CHECK(ndr_pull_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
4061 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
4062 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4064 return NDR_ERR_SUCCESS;
4067 _PUBLIC_ void ndr_print_dfs_GetInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetInfo *r)
4069 ndr_print_struct(ndr, name, "dfs_GetInfo");
4070 ndr->depth++;
4071 if (flags & NDR_SET_VALUES) {
4072 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4074 if (flags & NDR_IN) {
4075 ndr_print_struct(ndr, "in", "dfs_GetInfo");
4076 ndr->depth++;
4077 ndr_print_string(ndr, "dfs_entry_path", r->in.dfs_entry_path);
4078 ndr_print_ptr(ndr, "servername", r->in.servername);
4079 ndr->depth++;
4080 if (r->in.servername) {
4081 ndr_print_string(ndr, "servername", r->in.servername);
4083 ndr->depth--;
4084 ndr_print_ptr(ndr, "sharename", r->in.sharename);
4085 ndr->depth++;
4086 if (r->in.sharename) {
4087 ndr_print_string(ndr, "sharename", r->in.sharename);
4089 ndr->depth--;
4090 ndr_print_uint32(ndr, "level", r->in.level);
4091 ndr->depth--;
4093 if (flags & NDR_OUT) {
4094 ndr_print_struct(ndr, "out", "dfs_GetInfo");
4095 ndr->depth++;
4096 ndr_print_ptr(ndr, "info", r->out.info);
4097 ndr->depth++;
4098 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
4099 ndr_print_dfs_Info(ndr, "info", r->out.info);
4100 ndr->depth--;
4101 ndr_print_WERROR(ndr, "result", r->out.result);
4102 ndr->depth--;
4104 ndr->depth--;
4107 static enum ndr_err_code ndr_push_dfs_Enum(struct ndr_push *ndr, int flags, const struct dfs_Enum *r)
4109 if (flags & NDR_IN) {
4110 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
4111 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bufsize));
4112 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info));
4113 if (r->in.info) {
4114 NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
4116 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.total));
4117 if (r->in.total) {
4118 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.total));
4121 if (flags & NDR_OUT) {
4122 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
4123 if (r->out.info) {
4124 NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
4126 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.total));
4127 if (r->out.total) {
4128 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.total));
4130 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4132 return NDR_ERR_SUCCESS;
4135 static enum ndr_err_code ndr_pull_dfs_Enum(struct ndr_pull *ndr, int flags, struct dfs_Enum *r)
4137 uint32_t _ptr_info;
4138 uint32_t _ptr_total;
4139 TALLOC_CTX *_mem_save_info_0;
4140 TALLOC_CTX *_mem_save_total_0;
4141 if (flags & NDR_IN) {
4142 ZERO_STRUCT(r->out);
4144 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
4145 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bufsize));
4146 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
4147 if (_ptr_info) {
4148 NDR_PULL_ALLOC(ndr, r->in.info);
4149 } else {
4150 r->in.info = NULL;
4152 if (r->in.info) {
4153 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
4154 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0);
4155 NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
4156 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
4158 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total));
4159 if (_ptr_total) {
4160 NDR_PULL_ALLOC(ndr, r->in.total);
4161 } else {
4162 r->in.total = NULL;
4164 if (r->in.total) {
4165 _mem_save_total_0 = NDR_PULL_GET_MEM_CTX(ndr);
4166 NDR_PULL_SET_MEM_CTX(ndr, r->in.total, 0);
4167 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.total));
4168 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_0, 0);
4171 if (flags & NDR_OUT) {
4172 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
4173 if (_ptr_info) {
4174 NDR_PULL_ALLOC(ndr, r->out.info);
4175 } else {
4176 r->out.info = NULL;
4178 if (r->out.info) {
4179 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
4180 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
4181 NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
4182 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
4184 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total));
4185 if (_ptr_total) {
4186 NDR_PULL_ALLOC(ndr, r->out.total);
4187 } else {
4188 r->out.total = NULL;
4190 if (r->out.total) {
4191 _mem_save_total_0 = NDR_PULL_GET_MEM_CTX(ndr);
4192 NDR_PULL_SET_MEM_CTX(ndr, r->out.total, 0);
4193 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.total));
4194 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_0, 0);
4196 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4198 return NDR_ERR_SUCCESS;
4201 _PUBLIC_ void ndr_print_dfs_Enum(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Enum *r)
4203 ndr_print_struct(ndr, name, "dfs_Enum");
4204 ndr->depth++;
4205 if (flags & NDR_SET_VALUES) {
4206 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4208 if (flags & NDR_IN) {
4209 ndr_print_struct(ndr, "in", "dfs_Enum");
4210 ndr->depth++;
4211 ndr_print_uint32(ndr, "level", r->in.level);
4212 ndr_print_uint32(ndr, "bufsize", r->in.bufsize);
4213 ndr_print_ptr(ndr, "info", r->in.info);
4214 ndr->depth++;
4215 if (r->in.info) {
4216 ndr_print_dfs_EnumStruct(ndr, "info", r->in.info);
4218 ndr->depth--;
4219 ndr_print_ptr(ndr, "total", r->in.total);
4220 ndr->depth++;
4221 if (r->in.total) {
4222 ndr_print_uint32(ndr, "total", *r->in.total);
4224 ndr->depth--;
4225 ndr->depth--;
4227 if (flags & NDR_OUT) {
4228 ndr_print_struct(ndr, "out", "dfs_Enum");
4229 ndr->depth++;
4230 ndr_print_ptr(ndr, "info", r->out.info);
4231 ndr->depth++;
4232 if (r->out.info) {
4233 ndr_print_dfs_EnumStruct(ndr, "info", r->out.info);
4235 ndr->depth--;
4236 ndr_print_ptr(ndr, "total", r->out.total);
4237 ndr->depth++;
4238 if (r->out.total) {
4239 ndr_print_uint32(ndr, "total", *r->out.total);
4241 ndr->depth--;
4242 ndr_print_WERROR(ndr, "result", r->out.result);
4243 ndr->depth--;
4245 ndr->depth--;
4248 static enum ndr_err_code ndr_push_dfs_Rename(struct ndr_push *ndr, int flags, const struct dfs_Rename *r)
4250 if (flags & NDR_IN) {
4252 if (flags & NDR_OUT) {
4253 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4255 return NDR_ERR_SUCCESS;
4258 static enum ndr_err_code ndr_pull_dfs_Rename(struct ndr_pull *ndr, int flags, struct dfs_Rename *r)
4260 if (flags & NDR_IN) {
4262 if (flags & NDR_OUT) {
4263 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4265 return NDR_ERR_SUCCESS;
4268 _PUBLIC_ void ndr_print_dfs_Rename(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Rename *r)
4270 ndr_print_struct(ndr, name, "dfs_Rename");
4271 ndr->depth++;
4272 if (flags & NDR_SET_VALUES) {
4273 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4275 if (flags & NDR_IN) {
4276 ndr_print_struct(ndr, "in", "dfs_Rename");
4277 ndr->depth++;
4278 ndr->depth--;
4280 if (flags & NDR_OUT) {
4281 ndr_print_struct(ndr, "out", "dfs_Rename");
4282 ndr->depth++;
4283 ndr_print_WERROR(ndr, "result", r->out.result);
4284 ndr->depth--;
4286 ndr->depth--;
4289 static enum ndr_err_code ndr_push_dfs_Move(struct ndr_push *ndr, int flags, const struct dfs_Move *r)
4291 if (flags & NDR_IN) {
4293 if (flags & NDR_OUT) {
4294 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4296 return NDR_ERR_SUCCESS;
4299 static enum ndr_err_code ndr_pull_dfs_Move(struct ndr_pull *ndr, int flags, struct dfs_Move *r)
4301 if (flags & NDR_IN) {
4303 if (flags & NDR_OUT) {
4304 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4306 return NDR_ERR_SUCCESS;
4309 _PUBLIC_ void ndr_print_dfs_Move(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Move *r)
4311 ndr_print_struct(ndr, name, "dfs_Move");
4312 ndr->depth++;
4313 if (flags & NDR_SET_VALUES) {
4314 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4316 if (flags & NDR_IN) {
4317 ndr_print_struct(ndr, "in", "dfs_Move");
4318 ndr->depth++;
4319 ndr->depth--;
4321 if (flags & NDR_OUT) {
4322 ndr_print_struct(ndr, "out", "dfs_Move");
4323 ndr->depth++;
4324 ndr_print_WERROR(ndr, "result", r->out.result);
4325 ndr->depth--;
4327 ndr->depth--;
4330 static enum ndr_err_code ndr_push_dfs_ManagerGetConfigInfo(struct ndr_push *ndr, int flags, const struct dfs_ManagerGetConfigInfo *r)
4332 if (flags & NDR_IN) {
4334 if (flags & NDR_OUT) {
4335 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4337 return NDR_ERR_SUCCESS;
4340 static enum ndr_err_code ndr_pull_dfs_ManagerGetConfigInfo(struct ndr_pull *ndr, int flags, struct dfs_ManagerGetConfigInfo *r)
4342 if (flags & NDR_IN) {
4344 if (flags & NDR_OUT) {
4345 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4347 return NDR_ERR_SUCCESS;
4350 _PUBLIC_ void ndr_print_dfs_ManagerGetConfigInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerGetConfigInfo *r)
4352 ndr_print_struct(ndr, name, "dfs_ManagerGetConfigInfo");
4353 ndr->depth++;
4354 if (flags & NDR_SET_VALUES) {
4355 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4357 if (flags & NDR_IN) {
4358 ndr_print_struct(ndr, "in", "dfs_ManagerGetConfigInfo");
4359 ndr->depth++;
4360 ndr->depth--;
4362 if (flags & NDR_OUT) {
4363 ndr_print_struct(ndr, "out", "dfs_ManagerGetConfigInfo");
4364 ndr->depth++;
4365 ndr_print_WERROR(ndr, "result", r->out.result);
4366 ndr->depth--;
4368 ndr->depth--;
4371 static enum ndr_err_code ndr_push_dfs_ManagerSendSiteInfo(struct ndr_push *ndr, int flags, const struct dfs_ManagerSendSiteInfo *r)
4373 if (flags & NDR_IN) {
4375 if (flags & NDR_OUT) {
4376 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4378 return NDR_ERR_SUCCESS;
4381 static enum ndr_err_code ndr_pull_dfs_ManagerSendSiteInfo(struct ndr_pull *ndr, int flags, struct dfs_ManagerSendSiteInfo *r)
4383 if (flags & NDR_IN) {
4385 if (flags & NDR_OUT) {
4386 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4388 return NDR_ERR_SUCCESS;
4391 _PUBLIC_ void ndr_print_dfs_ManagerSendSiteInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerSendSiteInfo *r)
4393 ndr_print_struct(ndr, name, "dfs_ManagerSendSiteInfo");
4394 ndr->depth++;
4395 if (flags & NDR_SET_VALUES) {
4396 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4398 if (flags & NDR_IN) {
4399 ndr_print_struct(ndr, "in", "dfs_ManagerSendSiteInfo");
4400 ndr->depth++;
4401 ndr->depth--;
4403 if (flags & NDR_OUT) {
4404 ndr_print_struct(ndr, "out", "dfs_ManagerSendSiteInfo");
4405 ndr->depth++;
4406 ndr_print_WERROR(ndr, "result", r->out.result);
4407 ndr->depth--;
4409 ndr->depth--;
4412 static enum ndr_err_code ndr_push_dfs_AddFtRoot(struct ndr_push *ndr, int flags, const struct dfs_AddFtRoot *r)
4414 if (flags & NDR_IN) {
4415 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4416 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4417 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4418 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4419 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_servername, CH_UTF16)));
4420 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4421 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_servername, CH_UTF16)));
4422 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dns_servername, ndr_charset_length(r->in.dns_servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4423 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfsname, CH_UTF16)));
4424 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4425 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfsname, CH_UTF16)));
4426 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dfsname, ndr_charset_length(r->in.dfsname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4427 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4428 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4429 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4430 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4431 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
4432 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4433 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
4434 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.comment, ndr_charset_length(r->in.comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4435 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_config_dn, CH_UTF16)));
4436 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4437 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_config_dn, CH_UTF16)));
4438 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dfs_config_dn, ndr_charset_length(r->in.dfs_config_dn, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4439 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.unknown1));
4440 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
4441 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown2));
4442 if (r->in.unknown2) {
4443 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.unknown2));
4444 if (*r->in.unknown2) {
4445 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.unknown2));
4449 if (flags & NDR_OUT) {
4450 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.unknown2));
4451 if (r->out.unknown2) {
4452 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.unknown2));
4453 if (*r->out.unknown2) {
4454 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.unknown2));
4457 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4459 return NDR_ERR_SUCCESS;
4462 static enum ndr_err_code ndr_pull_dfs_AddFtRoot(struct ndr_pull *ndr, int flags, struct dfs_AddFtRoot *r)
4464 uint32_t size_servername_0 = 0;
4465 uint32_t length_servername_0 = 0;
4466 uint32_t size_dns_servername_0 = 0;
4467 uint32_t length_dns_servername_0 = 0;
4468 uint32_t size_dfsname_0 = 0;
4469 uint32_t length_dfsname_0 = 0;
4470 uint32_t size_rootshare_0 = 0;
4471 uint32_t length_rootshare_0 = 0;
4472 uint32_t size_comment_0 = 0;
4473 uint32_t length_comment_0 = 0;
4474 uint32_t size_dfs_config_dn_0 = 0;
4475 uint32_t length_dfs_config_dn_0 = 0;
4476 uint32_t _ptr_unknown2;
4477 TALLOC_CTX *_mem_save_unknown2_0;
4478 TALLOC_CTX *_mem_save_unknown2_1;
4479 if (flags & NDR_IN) {
4480 ZERO_STRUCT(r->out);
4482 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
4483 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
4484 size_servername_0 = ndr_get_array_size(ndr, &r->in.servername);
4485 length_servername_0 = ndr_get_array_length(ndr, &r->in.servername);
4486 if (length_servername_0 > size_servername_0) {
4487 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_servername_0, length_servername_0);
4489 NDR_CHECK(ndr_check_string_terminator(ndr, length_servername_0, sizeof(uint16_t)));
4490 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, length_servername_0, sizeof(uint16_t), CH_UTF16));
4491 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dns_servername));
4492 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dns_servername));
4493 size_dns_servername_0 = ndr_get_array_size(ndr, &r->in.dns_servername);
4494 length_dns_servername_0 = ndr_get_array_length(ndr, &r->in.dns_servername);
4495 if (length_dns_servername_0 > size_dns_servername_0) {
4496 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_dns_servername_0, length_dns_servername_0);
4498 NDR_CHECK(ndr_check_string_terminator(ndr, length_dns_servername_0, sizeof(uint16_t)));
4499 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dns_servername, length_dns_servername_0, sizeof(uint16_t), CH_UTF16));
4500 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfsname));
4501 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfsname));
4502 size_dfsname_0 = ndr_get_array_size(ndr, &r->in.dfsname);
4503 length_dfsname_0 = ndr_get_array_length(ndr, &r->in.dfsname);
4504 if (length_dfsname_0 > size_dfsname_0) {
4505 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_dfsname_0, length_dfsname_0);
4507 NDR_CHECK(ndr_check_string_terminator(ndr, length_dfsname_0, sizeof(uint16_t)));
4508 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfsname, length_dfsname_0, sizeof(uint16_t), CH_UTF16));
4509 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
4510 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
4511 size_rootshare_0 = ndr_get_array_size(ndr, &r->in.rootshare);
4512 length_rootshare_0 = ndr_get_array_length(ndr, &r->in.rootshare);
4513 if (length_rootshare_0 > size_rootshare_0) {
4514 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_rootshare_0, length_rootshare_0);
4516 NDR_CHECK(ndr_check_string_terminator(ndr, length_rootshare_0, sizeof(uint16_t)));
4517 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, length_rootshare_0, sizeof(uint16_t), CH_UTF16));
4518 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.comment));
4519 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.comment));
4520 size_comment_0 = ndr_get_array_size(ndr, &r->in.comment);
4521 length_comment_0 = ndr_get_array_length(ndr, &r->in.comment);
4522 if (length_comment_0 > size_comment_0) {
4523 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_comment_0, length_comment_0);
4525 NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_0, sizeof(uint16_t)));
4526 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.comment, length_comment_0, sizeof(uint16_t), CH_UTF16));
4527 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_config_dn));
4528 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_config_dn));
4529 size_dfs_config_dn_0 = ndr_get_array_size(ndr, &r->in.dfs_config_dn);
4530 length_dfs_config_dn_0 = ndr_get_array_length(ndr, &r->in.dfs_config_dn);
4531 if (length_dfs_config_dn_0 > size_dfs_config_dn_0) {
4532 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_dfs_config_dn_0, length_dfs_config_dn_0);
4534 NDR_CHECK(ndr_check_string_terminator(ndr, length_dfs_config_dn_0, sizeof(uint16_t)));
4535 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfs_config_dn, length_dfs_config_dn_0, sizeof(uint16_t), CH_UTF16));
4536 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.unknown1));
4537 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
4538 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
4539 if (_ptr_unknown2) {
4540 NDR_PULL_ALLOC(ndr, r->in.unknown2);
4541 } else {
4542 r->in.unknown2 = NULL;
4544 if (r->in.unknown2) {
4545 _mem_save_unknown2_0 = NDR_PULL_GET_MEM_CTX(ndr);
4546 NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown2, 0);
4547 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
4548 if (_ptr_unknown2) {
4549 NDR_PULL_ALLOC(ndr, *r->in.unknown2);
4550 } else {
4551 *r->in.unknown2 = NULL;
4553 if (*r->in.unknown2) {
4554 _mem_save_unknown2_1 = NDR_PULL_GET_MEM_CTX(ndr);
4555 NDR_PULL_SET_MEM_CTX(ndr, *r->in.unknown2, 0);
4556 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.unknown2));
4557 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_1, 0);
4559 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_0, 0);
4562 if (flags & NDR_OUT) {
4563 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
4564 if (_ptr_unknown2) {
4565 NDR_PULL_ALLOC(ndr, r->out.unknown2);
4566 } else {
4567 r->out.unknown2 = NULL;
4569 if (r->out.unknown2) {
4570 _mem_save_unknown2_0 = NDR_PULL_GET_MEM_CTX(ndr);
4571 NDR_PULL_SET_MEM_CTX(ndr, r->out.unknown2, 0);
4572 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
4573 if (_ptr_unknown2) {
4574 NDR_PULL_ALLOC(ndr, *r->out.unknown2);
4575 } else {
4576 *r->out.unknown2 = NULL;
4578 if (*r->out.unknown2) {
4579 _mem_save_unknown2_1 = NDR_PULL_GET_MEM_CTX(ndr);
4580 NDR_PULL_SET_MEM_CTX(ndr, *r->out.unknown2, 0);
4581 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.unknown2));
4582 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_1, 0);
4584 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_0, 0);
4586 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4588 return NDR_ERR_SUCCESS;
4591 _PUBLIC_ void ndr_print_dfs_AddFtRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddFtRoot *r)
4593 ndr_print_struct(ndr, name, "dfs_AddFtRoot");
4594 ndr->depth++;
4595 if (flags & NDR_SET_VALUES) {
4596 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4598 if (flags & NDR_IN) {
4599 ndr_print_struct(ndr, "in", "dfs_AddFtRoot");
4600 ndr->depth++;
4601 ndr_print_string(ndr, "servername", r->in.servername);
4602 ndr_print_string(ndr, "dns_servername", r->in.dns_servername);
4603 ndr_print_string(ndr, "dfsname", r->in.dfsname);
4604 ndr_print_string(ndr, "rootshare", r->in.rootshare);
4605 ndr_print_string(ndr, "comment", r->in.comment);
4606 ndr_print_string(ndr, "dfs_config_dn", r->in.dfs_config_dn);
4607 ndr_print_uint8(ndr, "unknown1", r->in.unknown1);
4608 ndr_print_uint32(ndr, "flags", r->in.flags);
4609 ndr_print_ptr(ndr, "unknown2", r->in.unknown2);
4610 ndr->depth++;
4611 if (r->in.unknown2) {
4612 ndr_print_ptr(ndr, "unknown2", *r->in.unknown2);
4613 ndr->depth++;
4614 if (*r->in.unknown2) {
4615 ndr_print_dfs_UnknownStruct(ndr, "unknown2", *r->in.unknown2);
4617 ndr->depth--;
4619 ndr->depth--;
4620 ndr->depth--;
4622 if (flags & NDR_OUT) {
4623 ndr_print_struct(ndr, "out", "dfs_AddFtRoot");
4624 ndr->depth++;
4625 ndr_print_ptr(ndr, "unknown2", r->out.unknown2);
4626 ndr->depth++;
4627 if (r->out.unknown2) {
4628 ndr_print_ptr(ndr, "unknown2", *r->out.unknown2);
4629 ndr->depth++;
4630 if (*r->out.unknown2) {
4631 ndr_print_dfs_UnknownStruct(ndr, "unknown2", *r->out.unknown2);
4633 ndr->depth--;
4635 ndr->depth--;
4636 ndr_print_WERROR(ndr, "result", r->out.result);
4637 ndr->depth--;
4639 ndr->depth--;
4642 static enum ndr_err_code ndr_push_dfs_RemoveFtRoot(struct ndr_push *ndr, int flags, const struct dfs_RemoveFtRoot *r)
4644 if (flags & NDR_IN) {
4645 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4646 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4647 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4648 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4649 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_servername, CH_UTF16)));
4650 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4651 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_servername, CH_UTF16)));
4652 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dns_servername, ndr_charset_length(r->in.dns_servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4653 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfsname, CH_UTF16)));
4654 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4655 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfsname, CH_UTF16)));
4656 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dfsname, ndr_charset_length(r->in.dfsname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4657 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4658 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4659 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4660 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4661 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
4662 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown));
4663 if (r->in.unknown) {
4664 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.unknown));
4665 if (*r->in.unknown) {
4666 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.unknown));
4670 if (flags & NDR_OUT) {
4671 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.unknown));
4672 if (r->out.unknown) {
4673 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.unknown));
4674 if (*r->out.unknown) {
4675 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.unknown));
4678 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4680 return NDR_ERR_SUCCESS;
4683 static enum ndr_err_code ndr_pull_dfs_RemoveFtRoot(struct ndr_pull *ndr, int flags, struct dfs_RemoveFtRoot *r)
4685 uint32_t size_servername_0 = 0;
4686 uint32_t length_servername_0 = 0;
4687 uint32_t size_dns_servername_0 = 0;
4688 uint32_t length_dns_servername_0 = 0;
4689 uint32_t size_dfsname_0 = 0;
4690 uint32_t length_dfsname_0 = 0;
4691 uint32_t size_rootshare_0 = 0;
4692 uint32_t length_rootshare_0 = 0;
4693 uint32_t _ptr_unknown;
4694 TALLOC_CTX *_mem_save_unknown_0;
4695 TALLOC_CTX *_mem_save_unknown_1;
4696 if (flags & NDR_IN) {
4697 ZERO_STRUCT(r->out);
4699 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
4700 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
4701 size_servername_0 = ndr_get_array_size(ndr, &r->in.servername);
4702 length_servername_0 = ndr_get_array_length(ndr, &r->in.servername);
4703 if (length_servername_0 > size_servername_0) {
4704 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_servername_0, length_servername_0);
4706 NDR_CHECK(ndr_check_string_terminator(ndr, length_servername_0, sizeof(uint16_t)));
4707 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, length_servername_0, sizeof(uint16_t), CH_UTF16));
4708 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dns_servername));
4709 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dns_servername));
4710 size_dns_servername_0 = ndr_get_array_size(ndr, &r->in.dns_servername);
4711 length_dns_servername_0 = ndr_get_array_length(ndr, &r->in.dns_servername);
4712 if (length_dns_servername_0 > size_dns_servername_0) {
4713 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_dns_servername_0, length_dns_servername_0);
4715 NDR_CHECK(ndr_check_string_terminator(ndr, length_dns_servername_0, sizeof(uint16_t)));
4716 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dns_servername, length_dns_servername_0, sizeof(uint16_t), CH_UTF16));
4717 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfsname));
4718 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfsname));
4719 size_dfsname_0 = ndr_get_array_size(ndr, &r->in.dfsname);
4720 length_dfsname_0 = ndr_get_array_length(ndr, &r->in.dfsname);
4721 if (length_dfsname_0 > size_dfsname_0) {
4722 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_dfsname_0, length_dfsname_0);
4724 NDR_CHECK(ndr_check_string_terminator(ndr, length_dfsname_0, sizeof(uint16_t)));
4725 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfsname, length_dfsname_0, sizeof(uint16_t), CH_UTF16));
4726 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
4727 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
4728 size_rootshare_0 = ndr_get_array_size(ndr, &r->in.rootshare);
4729 length_rootshare_0 = ndr_get_array_length(ndr, &r->in.rootshare);
4730 if (length_rootshare_0 > size_rootshare_0) {
4731 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_rootshare_0, length_rootshare_0);
4733 NDR_CHECK(ndr_check_string_terminator(ndr, length_rootshare_0, sizeof(uint16_t)));
4734 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, length_rootshare_0, sizeof(uint16_t), CH_UTF16));
4735 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
4736 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown));
4737 if (_ptr_unknown) {
4738 NDR_PULL_ALLOC(ndr, r->in.unknown);
4739 } else {
4740 r->in.unknown = NULL;
4742 if (r->in.unknown) {
4743 _mem_save_unknown_0 = NDR_PULL_GET_MEM_CTX(ndr);
4744 NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown, 0);
4745 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown));
4746 if (_ptr_unknown) {
4747 NDR_PULL_ALLOC(ndr, *r->in.unknown);
4748 } else {
4749 *r->in.unknown = NULL;
4751 if (*r->in.unknown) {
4752 _mem_save_unknown_1 = NDR_PULL_GET_MEM_CTX(ndr);
4753 NDR_PULL_SET_MEM_CTX(ndr, *r->in.unknown, 0);
4754 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.unknown));
4755 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_1, 0);
4757 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_0, 0);
4760 if (flags & NDR_OUT) {
4761 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown));
4762 if (_ptr_unknown) {
4763 NDR_PULL_ALLOC(ndr, r->out.unknown);
4764 } else {
4765 r->out.unknown = NULL;
4767 if (r->out.unknown) {
4768 _mem_save_unknown_0 = NDR_PULL_GET_MEM_CTX(ndr);
4769 NDR_PULL_SET_MEM_CTX(ndr, r->out.unknown, 0);
4770 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown));
4771 if (_ptr_unknown) {
4772 NDR_PULL_ALLOC(ndr, *r->out.unknown);
4773 } else {
4774 *r->out.unknown = NULL;
4776 if (*r->out.unknown) {
4777 _mem_save_unknown_1 = NDR_PULL_GET_MEM_CTX(ndr);
4778 NDR_PULL_SET_MEM_CTX(ndr, *r->out.unknown, 0);
4779 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.unknown));
4780 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_1, 0);
4782 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_0, 0);
4784 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4786 return NDR_ERR_SUCCESS;
4789 _PUBLIC_ void ndr_print_dfs_RemoveFtRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_RemoveFtRoot *r)
4791 ndr_print_struct(ndr, name, "dfs_RemoveFtRoot");
4792 ndr->depth++;
4793 if (flags & NDR_SET_VALUES) {
4794 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4796 if (flags & NDR_IN) {
4797 ndr_print_struct(ndr, "in", "dfs_RemoveFtRoot");
4798 ndr->depth++;
4799 ndr_print_string(ndr, "servername", r->in.servername);
4800 ndr_print_string(ndr, "dns_servername", r->in.dns_servername);
4801 ndr_print_string(ndr, "dfsname", r->in.dfsname);
4802 ndr_print_string(ndr, "rootshare", r->in.rootshare);
4803 ndr_print_uint32(ndr, "flags", r->in.flags);
4804 ndr_print_ptr(ndr, "unknown", r->in.unknown);
4805 ndr->depth++;
4806 if (r->in.unknown) {
4807 ndr_print_ptr(ndr, "unknown", *r->in.unknown);
4808 ndr->depth++;
4809 if (*r->in.unknown) {
4810 ndr_print_dfs_UnknownStruct(ndr, "unknown", *r->in.unknown);
4812 ndr->depth--;
4814 ndr->depth--;
4815 ndr->depth--;
4817 if (flags & NDR_OUT) {
4818 ndr_print_struct(ndr, "out", "dfs_RemoveFtRoot");
4819 ndr->depth++;
4820 ndr_print_ptr(ndr, "unknown", r->out.unknown);
4821 ndr->depth++;
4822 if (r->out.unknown) {
4823 ndr_print_ptr(ndr, "unknown", *r->out.unknown);
4824 ndr->depth++;
4825 if (*r->out.unknown) {
4826 ndr_print_dfs_UnknownStruct(ndr, "unknown", *r->out.unknown);
4828 ndr->depth--;
4830 ndr->depth--;
4831 ndr_print_WERROR(ndr, "result", r->out.result);
4832 ndr->depth--;
4834 ndr->depth--;
4837 static enum ndr_err_code ndr_push_dfs_AddStdRoot(struct ndr_push *ndr, int flags, const struct dfs_AddStdRoot *r)
4839 if (flags & NDR_IN) {
4840 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4841 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4842 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4843 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4844 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4845 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4846 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4847 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4848 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
4849 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4850 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
4851 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.comment, ndr_charset_length(r->in.comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4852 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
4854 if (flags & NDR_OUT) {
4855 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4857 return NDR_ERR_SUCCESS;
4860 static enum ndr_err_code ndr_pull_dfs_AddStdRoot(struct ndr_pull *ndr, int flags, struct dfs_AddStdRoot *r)
4862 uint32_t size_servername_0 = 0;
4863 uint32_t length_servername_0 = 0;
4864 uint32_t size_rootshare_0 = 0;
4865 uint32_t length_rootshare_0 = 0;
4866 uint32_t size_comment_0 = 0;
4867 uint32_t length_comment_0 = 0;
4868 if (flags & NDR_IN) {
4869 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
4870 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
4871 size_servername_0 = ndr_get_array_size(ndr, &r->in.servername);
4872 length_servername_0 = ndr_get_array_length(ndr, &r->in.servername);
4873 if (length_servername_0 > size_servername_0) {
4874 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_servername_0, length_servername_0);
4876 NDR_CHECK(ndr_check_string_terminator(ndr, length_servername_0, sizeof(uint16_t)));
4877 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, length_servername_0, sizeof(uint16_t), CH_UTF16));
4878 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
4879 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
4880 size_rootshare_0 = ndr_get_array_size(ndr, &r->in.rootshare);
4881 length_rootshare_0 = ndr_get_array_length(ndr, &r->in.rootshare);
4882 if (length_rootshare_0 > size_rootshare_0) {
4883 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_rootshare_0, length_rootshare_0);
4885 NDR_CHECK(ndr_check_string_terminator(ndr, length_rootshare_0, sizeof(uint16_t)));
4886 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, length_rootshare_0, sizeof(uint16_t), CH_UTF16));
4887 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.comment));
4888 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.comment));
4889 size_comment_0 = ndr_get_array_size(ndr, &r->in.comment);
4890 length_comment_0 = ndr_get_array_length(ndr, &r->in.comment);
4891 if (length_comment_0 > size_comment_0) {
4892 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_comment_0, length_comment_0);
4894 NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_0, sizeof(uint16_t)));
4895 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.comment, length_comment_0, sizeof(uint16_t), CH_UTF16));
4896 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
4898 if (flags & NDR_OUT) {
4899 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4901 return NDR_ERR_SUCCESS;
4904 _PUBLIC_ void ndr_print_dfs_AddStdRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddStdRoot *r)
4906 ndr_print_struct(ndr, name, "dfs_AddStdRoot");
4907 ndr->depth++;
4908 if (flags & NDR_SET_VALUES) {
4909 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4911 if (flags & NDR_IN) {
4912 ndr_print_struct(ndr, "in", "dfs_AddStdRoot");
4913 ndr->depth++;
4914 ndr_print_string(ndr, "servername", r->in.servername);
4915 ndr_print_string(ndr, "rootshare", r->in.rootshare);
4916 ndr_print_string(ndr, "comment", r->in.comment);
4917 ndr_print_uint32(ndr, "flags", r->in.flags);
4918 ndr->depth--;
4920 if (flags & NDR_OUT) {
4921 ndr_print_struct(ndr, "out", "dfs_AddStdRoot");
4922 ndr->depth++;
4923 ndr_print_WERROR(ndr, "result", r->out.result);
4924 ndr->depth--;
4926 ndr->depth--;
4929 static enum ndr_err_code ndr_push_dfs_RemoveStdRoot(struct ndr_push *ndr, int flags, const struct dfs_RemoveStdRoot *r)
4931 if (flags & NDR_IN) {
4932 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4933 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4934 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4935 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4936 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4937 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4938 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4939 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4940 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
4942 if (flags & NDR_OUT) {
4943 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4945 return NDR_ERR_SUCCESS;
4948 static enum ndr_err_code ndr_pull_dfs_RemoveStdRoot(struct ndr_pull *ndr, int flags, struct dfs_RemoveStdRoot *r)
4950 uint32_t size_servername_0 = 0;
4951 uint32_t length_servername_0 = 0;
4952 uint32_t size_rootshare_0 = 0;
4953 uint32_t length_rootshare_0 = 0;
4954 if (flags & NDR_IN) {
4955 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
4956 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
4957 size_servername_0 = ndr_get_array_size(ndr, &r->in.servername);
4958 length_servername_0 = ndr_get_array_length(ndr, &r->in.servername);
4959 if (length_servername_0 > size_servername_0) {
4960 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_servername_0, length_servername_0);
4962 NDR_CHECK(ndr_check_string_terminator(ndr, length_servername_0, sizeof(uint16_t)));
4963 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, length_servername_0, sizeof(uint16_t), CH_UTF16));
4964 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
4965 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
4966 size_rootshare_0 = ndr_get_array_size(ndr, &r->in.rootshare);
4967 length_rootshare_0 = ndr_get_array_length(ndr, &r->in.rootshare);
4968 if (length_rootshare_0 > size_rootshare_0) {
4969 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_rootshare_0, length_rootshare_0);
4971 NDR_CHECK(ndr_check_string_terminator(ndr, length_rootshare_0, sizeof(uint16_t)));
4972 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, length_rootshare_0, sizeof(uint16_t), CH_UTF16));
4973 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
4975 if (flags & NDR_OUT) {
4976 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4978 return NDR_ERR_SUCCESS;
4981 _PUBLIC_ void ndr_print_dfs_RemoveStdRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_RemoveStdRoot *r)
4983 ndr_print_struct(ndr, name, "dfs_RemoveStdRoot");
4984 ndr->depth++;
4985 if (flags & NDR_SET_VALUES) {
4986 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4988 if (flags & NDR_IN) {
4989 ndr_print_struct(ndr, "in", "dfs_RemoveStdRoot");
4990 ndr->depth++;
4991 ndr_print_string(ndr, "servername", r->in.servername);
4992 ndr_print_string(ndr, "rootshare", r->in.rootshare);
4993 ndr_print_uint32(ndr, "flags", r->in.flags);
4994 ndr->depth--;
4996 if (flags & NDR_OUT) {
4997 ndr_print_struct(ndr, "out", "dfs_RemoveStdRoot");
4998 ndr->depth++;
4999 ndr_print_WERROR(ndr, "result", r->out.result);
5000 ndr->depth--;
5002 ndr->depth--;
5005 static enum ndr_err_code ndr_push_dfs_ManagerInitialize(struct ndr_push *ndr, int flags, const struct dfs_ManagerInitialize *r)
5007 if (flags & NDR_IN) {
5008 if (r->in.servername == NULL) {
5009 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5011 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
5012 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5013 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
5014 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5015 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
5017 if (flags & NDR_OUT) {
5018 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5020 return NDR_ERR_SUCCESS;
5023 static enum ndr_err_code ndr_pull_dfs_ManagerInitialize(struct ndr_pull *ndr, int flags, struct dfs_ManagerInitialize *r)
5025 uint32_t size_servername_1 = 0;
5026 uint32_t length_servername_1 = 0;
5027 if (flags & NDR_IN) {
5028 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
5029 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
5030 size_servername_1 = ndr_get_array_size(ndr, &r->in.servername);
5031 length_servername_1 = ndr_get_array_length(ndr, &r->in.servername);
5032 if (length_servername_1 > size_servername_1) {
5033 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_servername_1, length_servername_1);
5035 NDR_CHECK(ndr_check_string_terminator(ndr, length_servername_1, sizeof(uint16_t)));
5036 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, length_servername_1, sizeof(uint16_t), CH_UTF16));
5037 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
5039 if (flags & NDR_OUT) {
5040 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5042 return NDR_ERR_SUCCESS;
5045 _PUBLIC_ void ndr_print_dfs_ManagerInitialize(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerInitialize *r)
5047 ndr_print_struct(ndr, name, "dfs_ManagerInitialize");
5048 ndr->depth++;
5049 if (flags & NDR_SET_VALUES) {
5050 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5052 if (flags & NDR_IN) {
5053 ndr_print_struct(ndr, "in", "dfs_ManagerInitialize");
5054 ndr->depth++;
5055 ndr_print_ptr(ndr, "servername", r->in.servername);
5056 ndr->depth++;
5057 ndr_print_string(ndr, "servername", r->in.servername);
5058 ndr->depth--;
5059 ndr_print_uint32(ndr, "flags", r->in.flags);
5060 ndr->depth--;
5062 if (flags & NDR_OUT) {
5063 ndr_print_struct(ndr, "out", "dfs_ManagerInitialize");
5064 ndr->depth++;
5065 ndr_print_WERROR(ndr, "result", r->out.result);
5066 ndr->depth--;
5068 ndr->depth--;
5071 static enum ndr_err_code ndr_push_dfs_AddStdRootForced(struct ndr_push *ndr, int flags, const struct dfs_AddStdRootForced *r)
5073 if (flags & NDR_IN) {
5074 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
5075 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5076 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
5077 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5078 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
5079 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5080 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
5081 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5082 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
5083 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5084 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
5085 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.comment, ndr_charset_length(r->in.comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5086 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.store, CH_UTF16)));
5087 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5088 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.store, CH_UTF16)));
5089 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.store, ndr_charset_length(r->in.store, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5091 if (flags & NDR_OUT) {
5092 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5094 return NDR_ERR_SUCCESS;
5097 static enum ndr_err_code ndr_pull_dfs_AddStdRootForced(struct ndr_pull *ndr, int flags, struct dfs_AddStdRootForced *r)
5099 uint32_t size_servername_0 = 0;
5100 uint32_t length_servername_0 = 0;
5101 uint32_t size_rootshare_0 = 0;
5102 uint32_t length_rootshare_0 = 0;
5103 uint32_t size_comment_0 = 0;
5104 uint32_t length_comment_0 = 0;
5105 uint32_t size_store_0 = 0;
5106 uint32_t length_store_0 = 0;
5107 if (flags & NDR_IN) {
5108 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
5109 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
5110 size_servername_0 = ndr_get_array_size(ndr, &r->in.servername);
5111 length_servername_0 = ndr_get_array_length(ndr, &r->in.servername);
5112 if (length_servername_0 > size_servername_0) {
5113 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_servername_0, length_servername_0);
5115 NDR_CHECK(ndr_check_string_terminator(ndr, length_servername_0, sizeof(uint16_t)));
5116 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, length_servername_0, sizeof(uint16_t), CH_UTF16));
5117 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
5118 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
5119 size_rootshare_0 = ndr_get_array_size(ndr, &r->in.rootshare);
5120 length_rootshare_0 = ndr_get_array_length(ndr, &r->in.rootshare);
5121 if (length_rootshare_0 > size_rootshare_0) {
5122 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_rootshare_0, length_rootshare_0);
5124 NDR_CHECK(ndr_check_string_terminator(ndr, length_rootshare_0, sizeof(uint16_t)));
5125 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, length_rootshare_0, sizeof(uint16_t), CH_UTF16));
5126 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.comment));
5127 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.comment));
5128 size_comment_0 = ndr_get_array_size(ndr, &r->in.comment);
5129 length_comment_0 = ndr_get_array_length(ndr, &r->in.comment);
5130 if (length_comment_0 > size_comment_0) {
5131 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_comment_0, length_comment_0);
5133 NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_0, sizeof(uint16_t)));
5134 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.comment, length_comment_0, sizeof(uint16_t), CH_UTF16));
5135 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.store));
5136 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.store));
5137 size_store_0 = ndr_get_array_size(ndr, &r->in.store);
5138 length_store_0 = ndr_get_array_length(ndr, &r->in.store);
5139 if (length_store_0 > size_store_0) {
5140 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_store_0, length_store_0);
5142 NDR_CHECK(ndr_check_string_terminator(ndr, length_store_0, sizeof(uint16_t)));
5143 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.store, length_store_0, sizeof(uint16_t), CH_UTF16));
5145 if (flags & NDR_OUT) {
5146 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5148 return NDR_ERR_SUCCESS;
5151 _PUBLIC_ void ndr_print_dfs_AddStdRootForced(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddStdRootForced *r)
5153 ndr_print_struct(ndr, name, "dfs_AddStdRootForced");
5154 ndr->depth++;
5155 if (flags & NDR_SET_VALUES) {
5156 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5158 if (flags & NDR_IN) {
5159 ndr_print_struct(ndr, "in", "dfs_AddStdRootForced");
5160 ndr->depth++;
5161 ndr_print_string(ndr, "servername", r->in.servername);
5162 ndr_print_string(ndr, "rootshare", r->in.rootshare);
5163 ndr_print_string(ndr, "comment", r->in.comment);
5164 ndr_print_string(ndr, "store", r->in.store);
5165 ndr->depth--;
5167 if (flags & NDR_OUT) {
5168 ndr_print_struct(ndr, "out", "dfs_AddStdRootForced");
5169 ndr->depth++;
5170 ndr_print_WERROR(ndr, "result", r->out.result);
5171 ndr->depth--;
5173 ndr->depth--;
5176 static enum ndr_err_code ndr_push_dfs_GetDcAddress(struct ndr_push *ndr, int flags, const struct dfs_GetDcAddress *r)
5178 if (flags & NDR_IN) {
5179 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
5180 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5181 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
5182 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5183 if (r->in.server_fullname == NULL) {
5184 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5186 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.server_fullname));
5187 if (*r->in.server_fullname) {
5188 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->in.server_fullname, CH_UTF16)));
5189 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5190 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->in.server_fullname, CH_UTF16)));
5191 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->in.server_fullname, ndr_charset_length(*r->in.server_fullname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5193 if (r->in.is_root == NULL) {
5194 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5196 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->in.is_root));
5197 if (r->in.ttl == NULL) {
5198 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5200 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.ttl));
5202 if (flags & NDR_OUT) {
5203 if (r->out.server_fullname == NULL) {
5204 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5206 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.server_fullname));
5207 if (*r->out.server_fullname) {
5208 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.server_fullname, CH_UTF16)));
5209 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5210 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.server_fullname, CH_UTF16)));
5211 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, *r->out.server_fullname, ndr_charset_length(*r->out.server_fullname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5213 if (r->out.is_root == NULL) {
5214 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5216 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->out.is_root));
5217 if (r->out.ttl == NULL) {
5218 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5220 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.ttl));
5221 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5223 return NDR_ERR_SUCCESS;
5226 static enum ndr_err_code ndr_pull_dfs_GetDcAddress(struct ndr_pull *ndr, int flags, struct dfs_GetDcAddress *r)
5228 uint32_t size_servername_0 = 0;
5229 uint32_t length_servername_0 = 0;
5230 uint32_t _ptr_server_fullname;
5231 uint32_t size_server_fullname_2 = 0;
5232 uint32_t length_server_fullname_2 = 0;
5233 TALLOC_CTX *_mem_save_server_fullname_0;
5234 TALLOC_CTX *_mem_save_server_fullname_1;
5235 TALLOC_CTX *_mem_save_is_root_0;
5236 TALLOC_CTX *_mem_save_ttl_0;
5237 if (flags & NDR_IN) {
5238 ZERO_STRUCT(r->out);
5240 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
5241 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
5242 size_servername_0 = ndr_get_array_size(ndr, &r->in.servername);
5243 length_servername_0 = ndr_get_array_length(ndr, &r->in.servername);
5244 if (length_servername_0 > size_servername_0) {
5245 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_servername_0, length_servername_0);
5247 NDR_CHECK(ndr_check_string_terminator(ndr, length_servername_0, sizeof(uint16_t)));
5248 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, length_servername_0, sizeof(uint16_t), CH_UTF16));
5249 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5250 NDR_PULL_ALLOC(ndr, r->in.server_fullname);
5252 _mem_save_server_fullname_0 = NDR_PULL_GET_MEM_CTX(ndr);
5253 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_fullname, LIBNDR_FLAG_REF_ALLOC);
5254 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_fullname));
5255 if (_ptr_server_fullname) {
5256 NDR_PULL_ALLOC(ndr, *r->in.server_fullname);
5257 } else {
5258 *r->in.server_fullname = NULL;
5260 if (*r->in.server_fullname) {
5261 _mem_save_server_fullname_1 = NDR_PULL_GET_MEM_CTX(ndr);
5262 NDR_PULL_SET_MEM_CTX(ndr, *r->in.server_fullname, 0);
5263 NDR_CHECK(ndr_pull_array_size(ndr, r->in.server_fullname));
5264 NDR_CHECK(ndr_pull_array_length(ndr, r->in.server_fullname));
5265 size_server_fullname_2 = ndr_get_array_size(ndr, r->in.server_fullname);
5266 length_server_fullname_2 = ndr_get_array_length(ndr, r->in.server_fullname);
5267 if (length_server_fullname_2 > size_server_fullname_2) {
5268 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_fullname_2, length_server_fullname_2);
5270 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_fullname_2, sizeof(uint16_t)));
5271 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->in.server_fullname, length_server_fullname_2, sizeof(uint16_t), CH_UTF16));
5272 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_1, 0);
5274 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_0, LIBNDR_FLAG_REF_ALLOC);
5275 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5276 NDR_PULL_ALLOC(ndr, r->in.is_root);
5278 _mem_save_is_root_0 = NDR_PULL_GET_MEM_CTX(ndr);
5279 NDR_PULL_SET_MEM_CTX(ndr, r->in.is_root, LIBNDR_FLAG_REF_ALLOC);
5280 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->in.is_root));
5281 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_is_root_0, LIBNDR_FLAG_REF_ALLOC);
5282 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5283 NDR_PULL_ALLOC(ndr, r->in.ttl);
5285 _mem_save_ttl_0 = NDR_PULL_GET_MEM_CTX(ndr);
5286 NDR_PULL_SET_MEM_CTX(ndr, r->in.ttl, LIBNDR_FLAG_REF_ALLOC);
5287 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.ttl));
5288 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ttl_0, LIBNDR_FLAG_REF_ALLOC);
5289 NDR_PULL_ALLOC(ndr, r->out.server_fullname);
5290 *r->out.server_fullname = *r->in.server_fullname;
5291 NDR_PULL_ALLOC(ndr, r->out.is_root);
5292 *r->out.is_root = *r->in.is_root;
5293 NDR_PULL_ALLOC(ndr, r->out.ttl);
5294 *r->out.ttl = *r->in.ttl;
5296 if (flags & NDR_OUT) {
5297 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5298 NDR_PULL_ALLOC(ndr, r->out.server_fullname);
5300 _mem_save_server_fullname_0 = NDR_PULL_GET_MEM_CTX(ndr);
5301 NDR_PULL_SET_MEM_CTX(ndr, r->out.server_fullname, LIBNDR_FLAG_REF_ALLOC);
5302 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_fullname));
5303 if (_ptr_server_fullname) {
5304 NDR_PULL_ALLOC(ndr, *r->out.server_fullname);
5305 } else {
5306 *r->out.server_fullname = NULL;
5308 if (*r->out.server_fullname) {
5309 _mem_save_server_fullname_1 = NDR_PULL_GET_MEM_CTX(ndr);
5310 NDR_PULL_SET_MEM_CTX(ndr, *r->out.server_fullname, 0);
5311 NDR_CHECK(ndr_pull_array_size(ndr, r->out.server_fullname));
5312 NDR_CHECK(ndr_pull_array_length(ndr, r->out.server_fullname));
5313 size_server_fullname_2 = ndr_get_array_size(ndr, r->out.server_fullname);
5314 length_server_fullname_2 = ndr_get_array_length(ndr, r->out.server_fullname);
5315 if (length_server_fullname_2 > size_server_fullname_2) {
5316 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_fullname_2, length_server_fullname_2);
5318 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_fullname_2, sizeof(uint16_t)));
5319 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.server_fullname, length_server_fullname_2, sizeof(uint16_t), CH_UTF16));
5320 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_1, 0);
5322 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_0, LIBNDR_FLAG_REF_ALLOC);
5323 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5324 NDR_PULL_ALLOC(ndr, r->out.is_root);
5326 _mem_save_is_root_0 = NDR_PULL_GET_MEM_CTX(ndr);
5327 NDR_PULL_SET_MEM_CTX(ndr, r->out.is_root, LIBNDR_FLAG_REF_ALLOC);
5328 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->out.is_root));
5329 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_is_root_0, LIBNDR_FLAG_REF_ALLOC);
5330 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5331 NDR_PULL_ALLOC(ndr, r->out.ttl);
5333 _mem_save_ttl_0 = NDR_PULL_GET_MEM_CTX(ndr);
5334 NDR_PULL_SET_MEM_CTX(ndr, r->out.ttl, LIBNDR_FLAG_REF_ALLOC);
5335 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.ttl));
5336 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ttl_0, LIBNDR_FLAG_REF_ALLOC);
5337 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5339 return NDR_ERR_SUCCESS;
5342 _PUBLIC_ void ndr_print_dfs_GetDcAddress(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetDcAddress *r)
5344 ndr_print_struct(ndr, name, "dfs_GetDcAddress");
5345 ndr->depth++;
5346 if (flags & NDR_SET_VALUES) {
5347 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5349 if (flags & NDR_IN) {
5350 ndr_print_struct(ndr, "in", "dfs_GetDcAddress");
5351 ndr->depth++;
5352 ndr_print_string(ndr, "servername", r->in.servername);
5353 ndr_print_ptr(ndr, "server_fullname", r->in.server_fullname);
5354 ndr->depth++;
5355 ndr_print_ptr(ndr, "server_fullname", *r->in.server_fullname);
5356 ndr->depth++;
5357 if (*r->in.server_fullname) {
5358 ndr_print_string(ndr, "server_fullname", *r->in.server_fullname);
5360 ndr->depth--;
5361 ndr->depth--;
5362 ndr_print_ptr(ndr, "is_root", r->in.is_root);
5363 ndr->depth++;
5364 ndr_print_uint8(ndr, "is_root", *r->in.is_root);
5365 ndr->depth--;
5366 ndr_print_ptr(ndr, "ttl", r->in.ttl);
5367 ndr->depth++;
5368 ndr_print_uint32(ndr, "ttl", *r->in.ttl);
5369 ndr->depth--;
5370 ndr->depth--;
5372 if (flags & NDR_OUT) {
5373 ndr_print_struct(ndr, "out", "dfs_GetDcAddress");
5374 ndr->depth++;
5375 ndr_print_ptr(ndr, "server_fullname", r->out.server_fullname);
5376 ndr->depth++;
5377 ndr_print_ptr(ndr, "server_fullname", *r->out.server_fullname);
5378 ndr->depth++;
5379 if (*r->out.server_fullname) {
5380 ndr_print_string(ndr, "server_fullname", *r->out.server_fullname);
5382 ndr->depth--;
5383 ndr->depth--;
5384 ndr_print_ptr(ndr, "is_root", r->out.is_root);
5385 ndr->depth++;
5386 ndr_print_uint8(ndr, "is_root", *r->out.is_root);
5387 ndr->depth--;
5388 ndr_print_ptr(ndr, "ttl", r->out.ttl);
5389 ndr->depth++;
5390 ndr_print_uint32(ndr, "ttl", *r->out.ttl);
5391 ndr->depth--;
5392 ndr_print_WERROR(ndr, "result", r->out.result);
5393 ndr->depth--;
5395 ndr->depth--;
5398 static enum ndr_err_code ndr_push_dfs_SetDcAddress(struct ndr_push *ndr, int flags, const struct dfs_SetDcAddress *r)
5400 if (flags & NDR_IN) {
5401 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
5402 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5403 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
5404 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5405 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_fullname, CH_UTF16)));
5406 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5407 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_fullname, CH_UTF16)));
5408 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server_fullname, ndr_charset_length(r->in.server_fullname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5409 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
5410 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.ttl));
5412 if (flags & NDR_OUT) {
5413 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5415 return NDR_ERR_SUCCESS;
5418 static enum ndr_err_code ndr_pull_dfs_SetDcAddress(struct ndr_pull *ndr, int flags, struct dfs_SetDcAddress *r)
5420 uint32_t size_servername_0 = 0;
5421 uint32_t length_servername_0 = 0;
5422 uint32_t size_server_fullname_0 = 0;
5423 uint32_t length_server_fullname_0 = 0;
5424 if (flags & NDR_IN) {
5425 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
5426 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
5427 size_servername_0 = ndr_get_array_size(ndr, &r->in.servername);
5428 length_servername_0 = ndr_get_array_length(ndr, &r->in.servername);
5429 if (length_servername_0 > size_servername_0) {
5430 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_servername_0, length_servername_0);
5432 NDR_CHECK(ndr_check_string_terminator(ndr, length_servername_0, sizeof(uint16_t)));
5433 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, length_servername_0, sizeof(uint16_t), CH_UTF16));
5434 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_fullname));
5435 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_fullname));
5436 size_server_fullname_0 = ndr_get_array_size(ndr, &r->in.server_fullname);
5437 length_server_fullname_0 = ndr_get_array_length(ndr, &r->in.server_fullname);
5438 if (length_server_fullname_0 > size_server_fullname_0) {
5439 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_fullname_0, length_server_fullname_0);
5441 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_fullname_0, sizeof(uint16_t)));
5442 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_fullname, length_server_fullname_0, sizeof(uint16_t), CH_UTF16));
5443 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
5444 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.ttl));
5446 if (flags & NDR_OUT) {
5447 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5449 return NDR_ERR_SUCCESS;
5452 _PUBLIC_ void ndr_print_dfs_SetDcAddress(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetDcAddress *r)
5454 ndr_print_struct(ndr, name, "dfs_SetDcAddress");
5455 ndr->depth++;
5456 if (flags & NDR_SET_VALUES) {
5457 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5459 if (flags & NDR_IN) {
5460 ndr_print_struct(ndr, "in", "dfs_SetDcAddress");
5461 ndr->depth++;
5462 ndr_print_string(ndr, "servername", r->in.servername);
5463 ndr_print_string(ndr, "server_fullname", r->in.server_fullname);
5464 ndr_print_uint32(ndr, "flags", r->in.flags);
5465 ndr_print_uint32(ndr, "ttl", r->in.ttl);
5466 ndr->depth--;
5468 if (flags & NDR_OUT) {
5469 ndr_print_struct(ndr, "out", "dfs_SetDcAddress");
5470 ndr->depth++;
5471 ndr_print_WERROR(ndr, "result", r->out.result);
5472 ndr->depth--;
5474 ndr->depth--;
5477 static enum ndr_err_code ndr_push_dfs_FlushFtTable(struct ndr_push *ndr, int flags, const struct dfs_FlushFtTable *r)
5479 if (flags & NDR_IN) {
5480 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
5481 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5482 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
5483 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5484 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
5485 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5486 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
5487 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5489 if (flags & NDR_OUT) {
5490 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5492 return NDR_ERR_SUCCESS;
5495 static enum ndr_err_code ndr_pull_dfs_FlushFtTable(struct ndr_pull *ndr, int flags, struct dfs_FlushFtTable *r)
5497 uint32_t size_servername_0 = 0;
5498 uint32_t length_servername_0 = 0;
5499 uint32_t size_rootshare_0 = 0;
5500 uint32_t length_rootshare_0 = 0;
5501 if (flags & NDR_IN) {
5502 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
5503 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
5504 size_servername_0 = ndr_get_array_size(ndr, &r->in.servername);
5505 length_servername_0 = ndr_get_array_length(ndr, &r->in.servername);
5506 if (length_servername_0 > size_servername_0) {
5507 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_servername_0, length_servername_0);
5509 NDR_CHECK(ndr_check_string_terminator(ndr, length_servername_0, sizeof(uint16_t)));
5510 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, length_servername_0, sizeof(uint16_t), CH_UTF16));
5511 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
5512 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
5513 size_rootshare_0 = ndr_get_array_size(ndr, &r->in.rootshare);
5514 length_rootshare_0 = ndr_get_array_length(ndr, &r->in.rootshare);
5515 if (length_rootshare_0 > size_rootshare_0) {
5516 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_rootshare_0, length_rootshare_0);
5518 NDR_CHECK(ndr_check_string_terminator(ndr, length_rootshare_0, sizeof(uint16_t)));
5519 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, length_rootshare_0, sizeof(uint16_t), CH_UTF16));
5521 if (flags & NDR_OUT) {
5522 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5524 return NDR_ERR_SUCCESS;
5527 _PUBLIC_ void ndr_print_dfs_FlushFtTable(struct ndr_print *ndr, const char *name, int flags, const struct dfs_FlushFtTable *r)
5529 ndr_print_struct(ndr, name, "dfs_FlushFtTable");
5530 ndr->depth++;
5531 if (flags & NDR_SET_VALUES) {
5532 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5534 if (flags & NDR_IN) {
5535 ndr_print_struct(ndr, "in", "dfs_FlushFtTable");
5536 ndr->depth++;
5537 ndr_print_string(ndr, "servername", r->in.servername);
5538 ndr_print_string(ndr, "rootshare", r->in.rootshare);
5539 ndr->depth--;
5541 if (flags & NDR_OUT) {
5542 ndr_print_struct(ndr, "out", "dfs_FlushFtTable");
5543 ndr->depth++;
5544 ndr_print_WERROR(ndr, "result", r->out.result);
5545 ndr->depth--;
5547 ndr->depth--;
5550 static enum ndr_err_code ndr_push_dfs_Add2(struct ndr_push *ndr, int flags, const struct dfs_Add2 *r)
5552 if (flags & NDR_IN) {
5554 if (flags & NDR_OUT) {
5555 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5557 return NDR_ERR_SUCCESS;
5560 static enum ndr_err_code ndr_pull_dfs_Add2(struct ndr_pull *ndr, int flags, struct dfs_Add2 *r)
5562 if (flags & NDR_IN) {
5564 if (flags & NDR_OUT) {
5565 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5567 return NDR_ERR_SUCCESS;
5570 _PUBLIC_ void ndr_print_dfs_Add2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Add2 *r)
5572 ndr_print_struct(ndr, name, "dfs_Add2");
5573 ndr->depth++;
5574 if (flags & NDR_SET_VALUES) {
5575 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5577 if (flags & NDR_IN) {
5578 ndr_print_struct(ndr, "in", "dfs_Add2");
5579 ndr->depth++;
5580 ndr->depth--;
5582 if (flags & NDR_OUT) {
5583 ndr_print_struct(ndr, "out", "dfs_Add2");
5584 ndr->depth++;
5585 ndr_print_WERROR(ndr, "result", r->out.result);
5586 ndr->depth--;
5588 ndr->depth--;
5591 static enum ndr_err_code ndr_push_dfs_Remove2(struct ndr_push *ndr, int flags, const struct dfs_Remove2 *r)
5593 if (flags & NDR_IN) {
5595 if (flags & NDR_OUT) {
5596 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5598 return NDR_ERR_SUCCESS;
5601 static enum ndr_err_code ndr_pull_dfs_Remove2(struct ndr_pull *ndr, int flags, struct dfs_Remove2 *r)
5603 if (flags & NDR_IN) {
5605 if (flags & NDR_OUT) {
5606 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5608 return NDR_ERR_SUCCESS;
5611 _PUBLIC_ void ndr_print_dfs_Remove2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Remove2 *r)
5613 ndr_print_struct(ndr, name, "dfs_Remove2");
5614 ndr->depth++;
5615 if (flags & NDR_SET_VALUES) {
5616 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5618 if (flags & NDR_IN) {
5619 ndr_print_struct(ndr, "in", "dfs_Remove2");
5620 ndr->depth++;
5621 ndr->depth--;
5623 if (flags & NDR_OUT) {
5624 ndr_print_struct(ndr, "out", "dfs_Remove2");
5625 ndr->depth++;
5626 ndr_print_WERROR(ndr, "result", r->out.result);
5627 ndr->depth--;
5629 ndr->depth--;
5632 _PUBLIC_ enum ndr_err_code ndr_push_dfs_EnumEx(struct ndr_push *ndr, int flags, const struct dfs_EnumEx *r)
5634 if (flags & NDR_IN) {
5635 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_name, CH_UTF16)));
5636 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5637 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_name, CH_UTF16)));
5638 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dfs_name, ndr_charset_length(r->in.dfs_name, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5639 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
5640 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bufsize));
5641 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info));
5642 if (r->in.info) {
5643 NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
5645 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.total));
5646 if (r->in.total) {
5647 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.total));
5650 if (flags & NDR_OUT) {
5651 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
5652 if (r->out.info) {
5653 NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
5655 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.total));
5656 if (r->out.total) {
5657 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.total));
5659 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5661 return NDR_ERR_SUCCESS;
5664 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_EnumEx(struct ndr_pull *ndr, int flags, struct dfs_EnumEx *r)
5666 uint32_t size_dfs_name_0 = 0;
5667 uint32_t length_dfs_name_0 = 0;
5668 uint32_t _ptr_info;
5669 uint32_t _ptr_total;
5670 TALLOC_CTX *_mem_save_info_0;
5671 TALLOC_CTX *_mem_save_total_0;
5672 if (flags & NDR_IN) {
5673 ZERO_STRUCT(r->out);
5675 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_name));
5676 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_name));
5677 size_dfs_name_0 = ndr_get_array_size(ndr, &r->in.dfs_name);
5678 length_dfs_name_0 = ndr_get_array_length(ndr, &r->in.dfs_name);
5679 if (length_dfs_name_0 > size_dfs_name_0) {
5680 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_dfs_name_0, length_dfs_name_0);
5682 NDR_CHECK(ndr_check_string_terminator(ndr, length_dfs_name_0, sizeof(uint16_t)));
5683 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfs_name, length_dfs_name_0, sizeof(uint16_t), CH_UTF16));
5684 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
5685 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bufsize));
5686 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
5687 if (_ptr_info) {
5688 NDR_PULL_ALLOC(ndr, r->in.info);
5689 } else {
5690 r->in.info = NULL;
5692 if (r->in.info) {
5693 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
5694 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0);
5695 NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
5696 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
5698 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total));
5699 if (_ptr_total) {
5700 NDR_PULL_ALLOC(ndr, r->in.total);
5701 } else {
5702 r->in.total = NULL;
5704 if (r->in.total) {
5705 _mem_save_total_0 = NDR_PULL_GET_MEM_CTX(ndr);
5706 NDR_PULL_SET_MEM_CTX(ndr, r->in.total, 0);
5707 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.total));
5708 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_0, 0);
5711 if (flags & NDR_OUT) {
5712 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
5713 if (_ptr_info) {
5714 NDR_PULL_ALLOC(ndr, r->out.info);
5715 } else {
5716 r->out.info = NULL;
5718 if (r->out.info) {
5719 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
5720 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
5721 NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
5722 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
5724 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total));
5725 if (_ptr_total) {
5726 NDR_PULL_ALLOC(ndr, r->out.total);
5727 } else {
5728 r->out.total = NULL;
5730 if (r->out.total) {
5731 _mem_save_total_0 = NDR_PULL_GET_MEM_CTX(ndr);
5732 NDR_PULL_SET_MEM_CTX(ndr, r->out.total, 0);
5733 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.total));
5734 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_0, 0);
5736 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5738 return NDR_ERR_SUCCESS;
5741 _PUBLIC_ void ndr_print_dfs_EnumEx(struct ndr_print *ndr, const char *name, int flags, const struct dfs_EnumEx *r)
5743 ndr_print_struct(ndr, name, "dfs_EnumEx");
5744 ndr->depth++;
5745 if (flags & NDR_SET_VALUES) {
5746 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5748 if (flags & NDR_IN) {
5749 ndr_print_struct(ndr, "in", "dfs_EnumEx");
5750 ndr->depth++;
5751 ndr_print_string(ndr, "dfs_name", r->in.dfs_name);
5752 ndr_print_uint32(ndr, "level", r->in.level);
5753 ndr_print_uint32(ndr, "bufsize", r->in.bufsize);
5754 ndr_print_ptr(ndr, "info", r->in.info);
5755 ndr->depth++;
5756 if (r->in.info) {
5757 ndr_print_dfs_EnumStruct(ndr, "info", r->in.info);
5759 ndr->depth--;
5760 ndr_print_ptr(ndr, "total", r->in.total);
5761 ndr->depth++;
5762 if (r->in.total) {
5763 ndr_print_uint32(ndr, "total", *r->in.total);
5765 ndr->depth--;
5766 ndr->depth--;
5768 if (flags & NDR_OUT) {
5769 ndr_print_struct(ndr, "out", "dfs_EnumEx");
5770 ndr->depth++;
5771 ndr_print_ptr(ndr, "info", r->out.info);
5772 ndr->depth++;
5773 if (r->out.info) {
5774 ndr_print_dfs_EnumStruct(ndr, "info", r->out.info);
5776 ndr->depth--;
5777 ndr_print_ptr(ndr, "total", r->out.total);
5778 ndr->depth++;
5779 if (r->out.total) {
5780 ndr_print_uint32(ndr, "total", *r->out.total);
5782 ndr->depth--;
5783 ndr_print_WERROR(ndr, "result", r->out.result);
5784 ndr->depth--;
5786 ndr->depth--;
5789 static enum ndr_err_code ndr_push_dfs_SetInfo2(struct ndr_push *ndr, int flags, const struct dfs_SetInfo2 *r)
5791 if (flags & NDR_IN) {
5793 if (flags & NDR_OUT) {
5794 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5796 return NDR_ERR_SUCCESS;
5799 static enum ndr_err_code ndr_pull_dfs_SetInfo2(struct ndr_pull *ndr, int flags, struct dfs_SetInfo2 *r)
5801 if (flags & NDR_IN) {
5803 if (flags & NDR_OUT) {
5804 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5806 return NDR_ERR_SUCCESS;
5809 _PUBLIC_ void ndr_print_dfs_SetInfo2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetInfo2 *r)
5811 ndr_print_struct(ndr, name, "dfs_SetInfo2");
5812 ndr->depth++;
5813 if (flags & NDR_SET_VALUES) {
5814 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5816 if (flags & NDR_IN) {
5817 ndr_print_struct(ndr, "in", "dfs_SetInfo2");
5818 ndr->depth++;
5819 ndr->depth--;
5821 if (flags & NDR_OUT) {
5822 ndr_print_struct(ndr, "out", "dfs_SetInfo2");
5823 ndr->depth++;
5824 ndr_print_WERROR(ndr, "result", r->out.result);
5825 ndr->depth--;
5827 ndr->depth--;
5830 static const struct ndr_interface_call netdfs_calls[] = {
5832 "dfs_GetManagerVersion",
5833 sizeof(struct dfs_GetManagerVersion),
5834 (ndr_push_flags_fn_t) ndr_push_dfs_GetManagerVersion,
5835 (ndr_pull_flags_fn_t) ndr_pull_dfs_GetManagerVersion,
5836 (ndr_print_function_t) ndr_print_dfs_GetManagerVersion,
5837 false,
5840 "dfs_Add",
5841 sizeof(struct dfs_Add),
5842 (ndr_push_flags_fn_t) ndr_push_dfs_Add,
5843 (ndr_pull_flags_fn_t) ndr_pull_dfs_Add,
5844 (ndr_print_function_t) ndr_print_dfs_Add,
5845 false,
5848 "dfs_Remove",
5849 sizeof(struct dfs_Remove),
5850 (ndr_push_flags_fn_t) ndr_push_dfs_Remove,
5851 (ndr_pull_flags_fn_t) ndr_pull_dfs_Remove,
5852 (ndr_print_function_t) ndr_print_dfs_Remove,
5853 false,
5856 "dfs_SetInfo",
5857 sizeof(struct dfs_SetInfo),
5858 (ndr_push_flags_fn_t) ndr_push_dfs_SetInfo,
5859 (ndr_pull_flags_fn_t) ndr_pull_dfs_SetInfo,
5860 (ndr_print_function_t) ndr_print_dfs_SetInfo,
5861 false,
5864 "dfs_GetInfo",
5865 sizeof(struct dfs_GetInfo),
5866 (ndr_push_flags_fn_t) ndr_push_dfs_GetInfo,
5867 (ndr_pull_flags_fn_t) ndr_pull_dfs_GetInfo,
5868 (ndr_print_function_t) ndr_print_dfs_GetInfo,
5869 false,
5872 "dfs_Enum",
5873 sizeof(struct dfs_Enum),
5874 (ndr_push_flags_fn_t) ndr_push_dfs_Enum,
5875 (ndr_pull_flags_fn_t) ndr_pull_dfs_Enum,
5876 (ndr_print_function_t) ndr_print_dfs_Enum,
5877 false,
5880 "dfs_Rename",
5881 sizeof(struct dfs_Rename),
5882 (ndr_push_flags_fn_t) ndr_push_dfs_Rename,
5883 (ndr_pull_flags_fn_t) ndr_pull_dfs_Rename,
5884 (ndr_print_function_t) ndr_print_dfs_Rename,
5885 false,
5888 "dfs_Move",
5889 sizeof(struct dfs_Move),
5890 (ndr_push_flags_fn_t) ndr_push_dfs_Move,
5891 (ndr_pull_flags_fn_t) ndr_pull_dfs_Move,
5892 (ndr_print_function_t) ndr_print_dfs_Move,
5893 false,
5896 "dfs_ManagerGetConfigInfo",
5897 sizeof(struct dfs_ManagerGetConfigInfo),
5898 (ndr_push_flags_fn_t) ndr_push_dfs_ManagerGetConfigInfo,
5899 (ndr_pull_flags_fn_t) ndr_pull_dfs_ManagerGetConfigInfo,
5900 (ndr_print_function_t) ndr_print_dfs_ManagerGetConfigInfo,
5901 false,
5904 "dfs_ManagerSendSiteInfo",
5905 sizeof(struct dfs_ManagerSendSiteInfo),
5906 (ndr_push_flags_fn_t) ndr_push_dfs_ManagerSendSiteInfo,
5907 (ndr_pull_flags_fn_t) ndr_pull_dfs_ManagerSendSiteInfo,
5908 (ndr_print_function_t) ndr_print_dfs_ManagerSendSiteInfo,
5909 false,
5912 "dfs_AddFtRoot",
5913 sizeof(struct dfs_AddFtRoot),
5914 (ndr_push_flags_fn_t) ndr_push_dfs_AddFtRoot,
5915 (ndr_pull_flags_fn_t) ndr_pull_dfs_AddFtRoot,
5916 (ndr_print_function_t) ndr_print_dfs_AddFtRoot,
5917 false,
5920 "dfs_RemoveFtRoot",
5921 sizeof(struct dfs_RemoveFtRoot),
5922 (ndr_push_flags_fn_t) ndr_push_dfs_RemoveFtRoot,
5923 (ndr_pull_flags_fn_t) ndr_pull_dfs_RemoveFtRoot,
5924 (ndr_print_function_t) ndr_print_dfs_RemoveFtRoot,
5925 false,
5928 "dfs_AddStdRoot",
5929 sizeof(struct dfs_AddStdRoot),
5930 (ndr_push_flags_fn_t) ndr_push_dfs_AddStdRoot,
5931 (ndr_pull_flags_fn_t) ndr_pull_dfs_AddStdRoot,
5932 (ndr_print_function_t) ndr_print_dfs_AddStdRoot,
5933 false,
5936 "dfs_RemoveStdRoot",
5937 sizeof(struct dfs_RemoveStdRoot),
5938 (ndr_push_flags_fn_t) ndr_push_dfs_RemoveStdRoot,
5939 (ndr_pull_flags_fn_t) ndr_pull_dfs_RemoveStdRoot,
5940 (ndr_print_function_t) ndr_print_dfs_RemoveStdRoot,
5941 false,
5944 "dfs_ManagerInitialize",
5945 sizeof(struct dfs_ManagerInitialize),
5946 (ndr_push_flags_fn_t) ndr_push_dfs_ManagerInitialize,
5947 (ndr_pull_flags_fn_t) ndr_pull_dfs_ManagerInitialize,
5948 (ndr_print_function_t) ndr_print_dfs_ManagerInitialize,
5949 false,
5952 "dfs_AddStdRootForced",
5953 sizeof(struct dfs_AddStdRootForced),
5954 (ndr_push_flags_fn_t) ndr_push_dfs_AddStdRootForced,
5955 (ndr_pull_flags_fn_t) ndr_pull_dfs_AddStdRootForced,
5956 (ndr_print_function_t) ndr_print_dfs_AddStdRootForced,
5957 false,
5960 "dfs_GetDcAddress",
5961 sizeof(struct dfs_GetDcAddress),
5962 (ndr_push_flags_fn_t) ndr_push_dfs_GetDcAddress,
5963 (ndr_pull_flags_fn_t) ndr_pull_dfs_GetDcAddress,
5964 (ndr_print_function_t) ndr_print_dfs_GetDcAddress,
5965 false,
5968 "dfs_SetDcAddress",
5969 sizeof(struct dfs_SetDcAddress),
5970 (ndr_push_flags_fn_t) ndr_push_dfs_SetDcAddress,
5971 (ndr_pull_flags_fn_t) ndr_pull_dfs_SetDcAddress,
5972 (ndr_print_function_t) ndr_print_dfs_SetDcAddress,
5973 false,
5976 "dfs_FlushFtTable",
5977 sizeof(struct dfs_FlushFtTable),
5978 (ndr_push_flags_fn_t) ndr_push_dfs_FlushFtTable,
5979 (ndr_pull_flags_fn_t) ndr_pull_dfs_FlushFtTable,
5980 (ndr_print_function_t) ndr_print_dfs_FlushFtTable,
5981 false,
5984 "dfs_Add2",
5985 sizeof(struct dfs_Add2),
5986 (ndr_push_flags_fn_t) ndr_push_dfs_Add2,
5987 (ndr_pull_flags_fn_t) ndr_pull_dfs_Add2,
5988 (ndr_print_function_t) ndr_print_dfs_Add2,
5989 false,
5992 "dfs_Remove2",
5993 sizeof(struct dfs_Remove2),
5994 (ndr_push_flags_fn_t) ndr_push_dfs_Remove2,
5995 (ndr_pull_flags_fn_t) ndr_pull_dfs_Remove2,
5996 (ndr_print_function_t) ndr_print_dfs_Remove2,
5997 false,
6000 "dfs_EnumEx",
6001 sizeof(struct dfs_EnumEx),
6002 (ndr_push_flags_fn_t) ndr_push_dfs_EnumEx,
6003 (ndr_pull_flags_fn_t) ndr_pull_dfs_EnumEx,
6004 (ndr_print_function_t) ndr_print_dfs_EnumEx,
6005 false,
6008 "dfs_SetInfo2",
6009 sizeof(struct dfs_SetInfo2),
6010 (ndr_push_flags_fn_t) ndr_push_dfs_SetInfo2,
6011 (ndr_pull_flags_fn_t) ndr_pull_dfs_SetInfo2,
6012 (ndr_print_function_t) ndr_print_dfs_SetInfo2,
6013 false,
6015 { NULL, 0, NULL, NULL, NULL, false }
6018 static const char * const netdfs_endpoint_strings[] = {
6019 "ncacn_np:[\\pipe\\netdfs]",
6020 "ncacn_ip_tcp:",
6021 "ncalrpc:",
6024 static const struct ndr_interface_string_array netdfs_endpoints = {
6025 .count = 3,
6026 .names = netdfs_endpoint_strings
6029 static const char * const netdfs_authservice_strings[] = {
6030 "host",
6033 static const struct ndr_interface_string_array netdfs_authservices = {
6034 .count = 1,
6035 .names = netdfs_authservice_strings
6039 const struct ndr_interface_table ndr_table_netdfs = {
6040 .name = "netdfs",
6041 .syntax_id = {
6042 {0x4fc742e0,0x4a10,0x11cf,{0x82,0x73},{0x00,0xaa,0x00,0x4a,0xe6,0x73}},
6043 NDR_NETDFS_VERSION
6045 .helpstring = NDR_NETDFS_HELPSTRING,
6046 .num_calls = 23,
6047 .calls = netdfs_calls,
6048 .endpoints = &netdfs_endpoints,
6049 .authservices = &netdfs_authservices