WHATSNEW: Start release notes for Samba 3.5.21.
[Samba.git] / librpc / gen_ndr / ndr_dfs.c
blobbbadbeb4398f87b4a795c6dc0e8ef717899a5257
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_enum_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_enum_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));
38 NDR_CHECK(ndr_push_trailer_align(ndr, 1));
40 if (ndr_flags & NDR_BUFFERS) {
42 return NDR_ERR_SUCCESS;
45 static enum ndr_err_code ndr_pull_dfs_Info0(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info0 *r)
47 if (ndr_flags & NDR_SCALARS) {
48 NDR_CHECK(ndr_pull_align(ndr, 1));
49 NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
51 if (ndr_flags & NDR_BUFFERS) {
53 return NDR_ERR_SUCCESS;
56 _PUBLIC_ void ndr_print_dfs_Info0(struct ndr_print *ndr, const char *name, const struct dfs_Info0 *r)
58 ndr_print_struct(ndr, name, "dfs_Info0");
59 ndr->depth++;
60 ndr->depth--;
63 static enum ndr_err_code ndr_push_dfs_Info1(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info1 *r)
65 if (ndr_flags & NDR_SCALARS) {
66 NDR_CHECK(ndr_push_align(ndr, 5));
67 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
68 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
70 if (ndr_flags & NDR_BUFFERS) {
71 if (r->path) {
72 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
73 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
74 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
75 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
78 return NDR_ERR_SUCCESS;
81 static enum ndr_err_code ndr_pull_dfs_Info1(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info1 *r)
83 uint32_t _ptr_path;
84 uint32_t size_path_1 = 0;
85 uint32_t length_path_1 = 0;
86 TALLOC_CTX *_mem_save_path_0;
87 if (ndr_flags & NDR_SCALARS) {
88 NDR_CHECK(ndr_pull_align(ndr, 5));
89 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
90 if (_ptr_path) {
91 NDR_PULL_ALLOC(ndr, r->path);
92 } else {
93 r->path = NULL;
95 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
97 if (ndr_flags & NDR_BUFFERS) {
98 if (r->path) {
99 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
100 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
101 NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
102 NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
103 size_path_1 = ndr_get_array_size(ndr, &r->path);
104 length_path_1 = ndr_get_array_length(ndr, &r->path);
105 if (length_path_1 > size_path_1) {
106 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_path_1, length_path_1);
108 NDR_CHECK(ndr_check_string_terminator(ndr, length_path_1, sizeof(uint16_t)));
109 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, length_path_1, sizeof(uint16_t), CH_UTF16));
110 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
113 return NDR_ERR_SUCCESS;
116 _PUBLIC_ void ndr_print_dfs_Info1(struct ndr_print *ndr, const char *name, const struct dfs_Info1 *r)
118 ndr_print_struct(ndr, name, "dfs_Info1");
119 ndr->depth++;
120 ndr_print_ptr(ndr, "path", r->path);
121 ndr->depth++;
122 if (r->path) {
123 ndr_print_string(ndr, "path", r->path);
125 ndr->depth--;
126 ndr->depth--;
129 _PUBLIC_ enum ndr_err_code ndr_push_dfs_VolumeState(struct ndr_push *ndr, int ndr_flags, uint32_t r)
131 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
132 return NDR_ERR_SUCCESS;
135 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_VolumeState(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
137 uint32_t v;
138 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
139 *r = v;
140 return NDR_ERR_SUCCESS;
143 _PUBLIC_ void ndr_print_dfs_VolumeState(struct ndr_print *ndr, const char *name, uint32_t r)
145 ndr_print_uint32(ndr, name, r);
146 ndr->depth++;
147 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_OK", DFS_VOLUME_STATE_OK, r);
148 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_INCONSISTENT", DFS_VOLUME_STATE_INCONSISTENT, r);
149 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_OFFLINE", DFS_VOLUME_STATE_OFFLINE, r);
150 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_ONLINE", DFS_VOLUME_STATE_ONLINE, r);
151 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_STANDALONE", DFS_VOLUME_STATE_STANDALONE, r);
152 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_AD_BLOB", DFS_VOLUME_STATE_AD_BLOB, r);
153 ndr->depth--;
156 static enum ndr_err_code ndr_push_dfs_Info2(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info2 *r)
158 if (ndr_flags & NDR_SCALARS) {
159 NDR_CHECK(ndr_push_align(ndr, 5));
160 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
161 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
162 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
163 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
164 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
166 if (ndr_flags & NDR_BUFFERS) {
167 if (r->path) {
168 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
169 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
170 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
171 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
173 if (r->comment) {
174 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
175 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
176 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
177 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
180 return NDR_ERR_SUCCESS;
183 static enum ndr_err_code ndr_pull_dfs_Info2(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info2 *r)
185 uint32_t _ptr_path;
186 uint32_t size_path_1 = 0;
187 uint32_t length_path_1 = 0;
188 TALLOC_CTX *_mem_save_path_0;
189 uint32_t _ptr_comment;
190 uint32_t size_comment_1 = 0;
191 uint32_t length_comment_1 = 0;
192 TALLOC_CTX *_mem_save_comment_0;
193 if (ndr_flags & NDR_SCALARS) {
194 NDR_CHECK(ndr_pull_align(ndr, 5));
195 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
196 if (_ptr_path) {
197 NDR_PULL_ALLOC(ndr, r->path);
198 } else {
199 r->path = NULL;
201 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
202 if (_ptr_comment) {
203 NDR_PULL_ALLOC(ndr, r->comment);
204 } else {
205 r->comment = NULL;
207 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
208 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores));
209 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
211 if (ndr_flags & NDR_BUFFERS) {
212 if (r->path) {
213 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
214 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
215 NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
216 NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
217 size_path_1 = ndr_get_array_size(ndr, &r->path);
218 length_path_1 = ndr_get_array_length(ndr, &r->path);
219 if (length_path_1 > size_path_1) {
220 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_path_1, length_path_1);
222 NDR_CHECK(ndr_check_string_terminator(ndr, length_path_1, sizeof(uint16_t)));
223 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, length_path_1, sizeof(uint16_t), CH_UTF16));
224 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
226 if (r->comment) {
227 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
228 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
229 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
230 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
231 size_comment_1 = ndr_get_array_size(ndr, &r->comment);
232 length_comment_1 = ndr_get_array_length(ndr, &r->comment);
233 if (length_comment_1 > size_comment_1) {
234 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_comment_1, length_comment_1);
236 NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_1, sizeof(uint16_t)));
237 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, length_comment_1, sizeof(uint16_t), CH_UTF16));
238 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
241 return NDR_ERR_SUCCESS;
244 _PUBLIC_ void ndr_print_dfs_Info2(struct ndr_print *ndr, const char *name, const struct dfs_Info2 *r)
246 ndr_print_struct(ndr, name, "dfs_Info2");
247 ndr->depth++;
248 ndr_print_ptr(ndr, "path", r->path);
249 ndr->depth++;
250 if (r->path) {
251 ndr_print_string(ndr, "path", r->path);
253 ndr->depth--;
254 ndr_print_ptr(ndr, "comment", r->comment);
255 ndr->depth++;
256 if (r->comment) {
257 ndr_print_string(ndr, "comment", r->comment);
259 ndr->depth--;
260 ndr_print_dfs_VolumeState(ndr, "state", r->state);
261 ndr_print_uint32(ndr, "num_stores", r->num_stores);
262 ndr->depth--;
265 _PUBLIC_ enum ndr_err_code ndr_push_dfs_StorageState(struct ndr_push *ndr, int ndr_flags, uint32_t r)
267 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
268 return NDR_ERR_SUCCESS;
271 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_StorageState(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
273 uint32_t v;
274 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
275 *r = v;
276 return NDR_ERR_SUCCESS;
279 _PUBLIC_ void ndr_print_dfs_StorageState(struct ndr_print *ndr, const char *name, uint32_t r)
281 ndr_print_uint32(ndr, name, r);
282 ndr->depth++;
283 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_STORAGE_STATE_OFFLINE", DFS_STORAGE_STATE_OFFLINE, r);
284 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_STORAGE_STATE_ONLINE", DFS_STORAGE_STATE_ONLINE, r);
285 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_STORAGE_STATE_ACTIVE", DFS_STORAGE_STATE_ACTIVE, r);
286 ndr->depth--;
289 static enum ndr_err_code ndr_push_dfs_StorageInfo(struct ndr_push *ndr, int ndr_flags, const struct dfs_StorageInfo *r)
291 if (ndr_flags & NDR_SCALARS) {
292 NDR_CHECK(ndr_push_align(ndr, 5));
293 NDR_CHECK(ndr_push_dfs_StorageState(ndr, NDR_SCALARS, r->state));
294 NDR_CHECK(ndr_push_unique_ptr(ndr, r->server));
295 NDR_CHECK(ndr_push_unique_ptr(ndr, r->share));
296 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
298 if (ndr_flags & NDR_BUFFERS) {
299 if (r->server) {
300 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server, CH_UTF16)));
301 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
302 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server, CH_UTF16)));
303 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server, ndr_charset_length(r->server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
305 if (r->share) {
306 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->share, CH_UTF16)));
307 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
308 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->share, CH_UTF16)));
309 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->share, ndr_charset_length(r->share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
312 return NDR_ERR_SUCCESS;
315 static enum ndr_err_code ndr_pull_dfs_StorageInfo(struct ndr_pull *ndr, int ndr_flags, struct dfs_StorageInfo *r)
317 uint32_t _ptr_server;
318 uint32_t size_server_1 = 0;
319 uint32_t length_server_1 = 0;
320 TALLOC_CTX *_mem_save_server_0;
321 uint32_t _ptr_share;
322 uint32_t size_share_1 = 0;
323 uint32_t length_share_1 = 0;
324 TALLOC_CTX *_mem_save_share_0;
325 if (ndr_flags & NDR_SCALARS) {
326 NDR_CHECK(ndr_pull_align(ndr, 5));
327 NDR_CHECK(ndr_pull_dfs_StorageState(ndr, NDR_SCALARS, &r->state));
328 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
329 if (_ptr_server) {
330 NDR_PULL_ALLOC(ndr, r->server);
331 } else {
332 r->server = NULL;
334 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share));
335 if (_ptr_share) {
336 NDR_PULL_ALLOC(ndr, r->share);
337 } else {
338 r->share = NULL;
340 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
342 if (ndr_flags & NDR_BUFFERS) {
343 if (r->server) {
344 _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
345 NDR_PULL_SET_MEM_CTX(ndr, r->server, 0);
346 NDR_CHECK(ndr_pull_array_size(ndr, &r->server));
347 NDR_CHECK(ndr_pull_array_length(ndr, &r->server));
348 size_server_1 = ndr_get_array_size(ndr, &r->server);
349 length_server_1 = ndr_get_array_length(ndr, &r->server);
350 if (length_server_1 > size_server_1) {
351 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_1, length_server_1);
353 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_1, sizeof(uint16_t)));
354 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server, length_server_1, sizeof(uint16_t), CH_UTF16));
355 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
357 if (r->share) {
358 _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr);
359 NDR_PULL_SET_MEM_CTX(ndr, r->share, 0);
360 NDR_CHECK(ndr_pull_array_size(ndr, &r->share));
361 NDR_CHECK(ndr_pull_array_length(ndr, &r->share));
362 size_share_1 = ndr_get_array_size(ndr, &r->share);
363 length_share_1 = ndr_get_array_length(ndr, &r->share);
364 if (length_share_1 > size_share_1) {
365 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_share_1, length_share_1);
367 NDR_CHECK(ndr_check_string_terminator(ndr, length_share_1, sizeof(uint16_t)));
368 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->share, length_share_1, sizeof(uint16_t), CH_UTF16));
369 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0);
372 return NDR_ERR_SUCCESS;
375 _PUBLIC_ void ndr_print_dfs_StorageInfo(struct ndr_print *ndr, const char *name, const struct dfs_StorageInfo *r)
377 ndr_print_struct(ndr, name, "dfs_StorageInfo");
378 ndr->depth++;
379 ndr_print_dfs_StorageState(ndr, "state", r->state);
380 ndr_print_ptr(ndr, "server", r->server);
381 ndr->depth++;
382 if (r->server) {
383 ndr_print_string(ndr, "server", r->server);
385 ndr->depth--;
386 ndr_print_ptr(ndr, "share", r->share);
387 ndr->depth++;
388 if (r->share) {
389 ndr_print_string(ndr, "share", r->share);
391 ndr->depth--;
392 ndr->depth--;
395 static enum ndr_err_code ndr_push_dfs_Info3(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info3 *r)
397 uint32_t cntr_stores_1;
398 if (ndr_flags & NDR_SCALARS) {
399 NDR_CHECK(ndr_push_align(ndr, 5));
400 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
401 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
402 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
403 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
404 NDR_CHECK(ndr_push_unique_ptr(ndr, r->stores));
405 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
407 if (ndr_flags & NDR_BUFFERS) {
408 if (r->path) {
409 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
410 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
411 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
412 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
414 if (r->comment) {
415 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
416 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
417 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
418 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
420 if (r->stores) {
421 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_stores));
422 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
423 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
425 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
426 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
430 return NDR_ERR_SUCCESS;
433 static enum ndr_err_code ndr_pull_dfs_Info3(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info3 *r)
435 uint32_t _ptr_path;
436 uint32_t size_path_1 = 0;
437 uint32_t length_path_1 = 0;
438 TALLOC_CTX *_mem_save_path_0;
439 uint32_t _ptr_comment;
440 uint32_t size_comment_1 = 0;
441 uint32_t length_comment_1 = 0;
442 TALLOC_CTX *_mem_save_comment_0;
443 uint32_t _ptr_stores;
444 uint32_t size_stores_1 = 0;
445 uint32_t cntr_stores_1;
446 TALLOC_CTX *_mem_save_stores_0;
447 TALLOC_CTX *_mem_save_stores_1;
448 if (ndr_flags & NDR_SCALARS) {
449 NDR_CHECK(ndr_pull_align(ndr, 5));
450 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
451 if (_ptr_path) {
452 NDR_PULL_ALLOC(ndr, r->path);
453 } else {
454 r->path = NULL;
456 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
457 if (_ptr_comment) {
458 NDR_PULL_ALLOC(ndr, r->comment);
459 } else {
460 r->comment = NULL;
462 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
463 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores));
464 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_stores));
465 if (_ptr_stores) {
466 NDR_PULL_ALLOC(ndr, r->stores);
467 } else {
468 r->stores = NULL;
470 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
472 if (ndr_flags & NDR_BUFFERS) {
473 if (r->path) {
474 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
475 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
476 NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
477 NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
478 size_path_1 = ndr_get_array_size(ndr, &r->path);
479 length_path_1 = ndr_get_array_length(ndr, &r->path);
480 if (length_path_1 > size_path_1) {
481 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_path_1, length_path_1);
483 NDR_CHECK(ndr_check_string_terminator(ndr, length_path_1, sizeof(uint16_t)));
484 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, length_path_1, sizeof(uint16_t), CH_UTF16));
485 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
487 if (r->comment) {
488 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
489 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
490 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
491 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
492 size_comment_1 = ndr_get_array_size(ndr, &r->comment);
493 length_comment_1 = ndr_get_array_length(ndr, &r->comment);
494 if (length_comment_1 > size_comment_1) {
495 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_comment_1, length_comment_1);
497 NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_1, sizeof(uint16_t)));
498 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, length_comment_1, sizeof(uint16_t), CH_UTF16));
499 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
501 if (r->stores) {
502 _mem_save_stores_0 = NDR_PULL_GET_MEM_CTX(ndr);
503 NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
504 NDR_CHECK(ndr_pull_array_size(ndr, &r->stores));
505 size_stores_1 = ndr_get_array_size(ndr, &r->stores);
506 NDR_PULL_ALLOC_N(ndr, r->stores, size_stores_1);
507 _mem_save_stores_1 = NDR_PULL_GET_MEM_CTX(ndr);
508 NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
509 for (cntr_stores_1 = 0; cntr_stores_1 < size_stores_1; cntr_stores_1++) {
510 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
512 for (cntr_stores_1 = 0; cntr_stores_1 < size_stores_1; cntr_stores_1++) {
513 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
515 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_1, 0);
516 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_0, 0);
518 if (r->stores) {
519 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->stores, r->num_stores));
522 return NDR_ERR_SUCCESS;
525 _PUBLIC_ void ndr_print_dfs_Info3(struct ndr_print *ndr, const char *name, const struct dfs_Info3 *r)
527 uint32_t cntr_stores_1;
528 ndr_print_struct(ndr, name, "dfs_Info3");
529 ndr->depth++;
530 ndr_print_ptr(ndr, "path", r->path);
531 ndr->depth++;
532 if (r->path) {
533 ndr_print_string(ndr, "path", r->path);
535 ndr->depth--;
536 ndr_print_ptr(ndr, "comment", r->comment);
537 ndr->depth++;
538 if (r->comment) {
539 ndr_print_string(ndr, "comment", r->comment);
541 ndr->depth--;
542 ndr_print_dfs_VolumeState(ndr, "state", r->state);
543 ndr_print_uint32(ndr, "num_stores", r->num_stores);
544 ndr_print_ptr(ndr, "stores", r->stores);
545 ndr->depth++;
546 if (r->stores) {
547 ndr->print(ndr, "%s: ARRAY(%d)", "stores", (int)r->num_stores);
548 ndr->depth++;
549 for (cntr_stores_1=0;cntr_stores_1<r->num_stores;cntr_stores_1++) {
550 char *idx_1=NULL;
551 if (asprintf(&idx_1, "[%d]", cntr_stores_1) != -1) {
552 ndr_print_dfs_StorageInfo(ndr, "stores", &r->stores[cntr_stores_1]);
553 free(idx_1);
556 ndr->depth--;
558 ndr->depth--;
559 ndr->depth--;
562 static enum ndr_err_code ndr_push_dfs_Info4(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info4 *r)
564 uint32_t cntr_stores_1;
565 if (ndr_flags & NDR_SCALARS) {
566 NDR_CHECK(ndr_push_align(ndr, 5));
567 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
568 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
569 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
570 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
571 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
572 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
573 NDR_CHECK(ndr_push_unique_ptr(ndr, r->stores));
574 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
576 if (ndr_flags & NDR_BUFFERS) {
577 if (r->path) {
578 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
579 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
580 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
581 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
583 if (r->comment) {
584 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
585 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
586 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
587 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
589 if (r->stores) {
590 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_stores));
591 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
592 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
594 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
595 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
599 return NDR_ERR_SUCCESS;
602 static enum ndr_err_code ndr_pull_dfs_Info4(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info4 *r)
604 uint32_t _ptr_path;
605 uint32_t size_path_1 = 0;
606 uint32_t length_path_1 = 0;
607 TALLOC_CTX *_mem_save_path_0;
608 uint32_t _ptr_comment;
609 uint32_t size_comment_1 = 0;
610 uint32_t length_comment_1 = 0;
611 TALLOC_CTX *_mem_save_comment_0;
612 uint32_t _ptr_stores;
613 uint32_t size_stores_1 = 0;
614 uint32_t cntr_stores_1;
615 TALLOC_CTX *_mem_save_stores_0;
616 TALLOC_CTX *_mem_save_stores_1;
617 if (ndr_flags & NDR_SCALARS) {
618 NDR_CHECK(ndr_pull_align(ndr, 5));
619 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
620 if (_ptr_path) {
621 NDR_PULL_ALLOC(ndr, r->path);
622 } else {
623 r->path = NULL;
625 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
626 if (_ptr_comment) {
627 NDR_PULL_ALLOC(ndr, r->comment);
628 } else {
629 r->comment = NULL;
631 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
632 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
633 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
634 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores));
635 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_stores));
636 if (_ptr_stores) {
637 NDR_PULL_ALLOC(ndr, r->stores);
638 } else {
639 r->stores = NULL;
641 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
643 if (ndr_flags & NDR_BUFFERS) {
644 if (r->path) {
645 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
646 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
647 NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
648 NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
649 size_path_1 = ndr_get_array_size(ndr, &r->path);
650 length_path_1 = ndr_get_array_length(ndr, &r->path);
651 if (length_path_1 > size_path_1) {
652 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_path_1, length_path_1);
654 NDR_CHECK(ndr_check_string_terminator(ndr, length_path_1, sizeof(uint16_t)));
655 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, length_path_1, sizeof(uint16_t), CH_UTF16));
656 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
658 if (r->comment) {
659 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
660 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
661 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
662 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
663 size_comment_1 = ndr_get_array_size(ndr, &r->comment);
664 length_comment_1 = ndr_get_array_length(ndr, &r->comment);
665 if (length_comment_1 > size_comment_1) {
666 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_comment_1, length_comment_1);
668 NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_1, sizeof(uint16_t)));
669 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, length_comment_1, sizeof(uint16_t), CH_UTF16));
670 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
672 if (r->stores) {
673 _mem_save_stores_0 = NDR_PULL_GET_MEM_CTX(ndr);
674 NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
675 NDR_CHECK(ndr_pull_array_size(ndr, &r->stores));
676 size_stores_1 = ndr_get_array_size(ndr, &r->stores);
677 NDR_PULL_ALLOC_N(ndr, r->stores, size_stores_1);
678 _mem_save_stores_1 = NDR_PULL_GET_MEM_CTX(ndr);
679 NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
680 for (cntr_stores_1 = 0; cntr_stores_1 < size_stores_1; cntr_stores_1++) {
681 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
683 for (cntr_stores_1 = 0; cntr_stores_1 < size_stores_1; cntr_stores_1++) {
684 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
686 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_1, 0);
687 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_0, 0);
689 if (r->stores) {
690 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->stores, r->num_stores));
693 return NDR_ERR_SUCCESS;
696 _PUBLIC_ void ndr_print_dfs_Info4(struct ndr_print *ndr, const char *name, const struct dfs_Info4 *r)
698 uint32_t cntr_stores_1;
699 ndr_print_struct(ndr, name, "dfs_Info4");
700 ndr->depth++;
701 ndr_print_ptr(ndr, "path", r->path);
702 ndr->depth++;
703 if (r->path) {
704 ndr_print_string(ndr, "path", r->path);
706 ndr->depth--;
707 ndr_print_ptr(ndr, "comment", r->comment);
708 ndr->depth++;
709 if (r->comment) {
710 ndr_print_string(ndr, "comment", r->comment);
712 ndr->depth--;
713 ndr_print_dfs_VolumeState(ndr, "state", r->state);
714 ndr_print_uint32(ndr, "timeout", r->timeout);
715 ndr_print_GUID(ndr, "guid", &r->guid);
716 ndr_print_uint32(ndr, "num_stores", r->num_stores);
717 ndr_print_ptr(ndr, "stores", r->stores);
718 ndr->depth++;
719 if (r->stores) {
720 ndr->print(ndr, "%s: ARRAY(%d)", "stores", (int)r->num_stores);
721 ndr->depth++;
722 for (cntr_stores_1=0;cntr_stores_1<r->num_stores;cntr_stores_1++) {
723 char *idx_1=NULL;
724 if (asprintf(&idx_1, "[%d]", cntr_stores_1) != -1) {
725 ndr_print_dfs_StorageInfo(ndr, "stores", &r->stores[cntr_stores_1]);
726 free(idx_1);
729 ndr->depth--;
731 ndr->depth--;
732 ndr->depth--;
735 _PUBLIC_ enum ndr_err_code ndr_push_dfs_PropertyFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
737 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
738 return NDR_ERR_SUCCESS;
741 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_PropertyFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
743 uint32_t v;
744 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
745 *r = v;
746 return NDR_ERR_SUCCESS;
749 _PUBLIC_ void ndr_print_dfs_PropertyFlags(struct ndr_print *ndr, const char *name, uint32_t r)
751 ndr_print_uint32(ndr, name, r);
752 ndr->depth++;
753 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_INSITE_REFERRALS", DFS_PROPERTY_FLAG_INSITE_REFERRALS, r);
754 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_ROOT_SCALABILITY", DFS_PROPERTY_FLAG_ROOT_SCALABILITY, r);
755 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_SITE_COSTING", DFS_PROPERTY_FLAG_SITE_COSTING, r);
756 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_TARGET_FAILBACK", DFS_PROPERTY_FLAG_TARGET_FAILBACK, r);
757 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_CLUSTER_ENABLED", DFS_PROPERTY_FLAG_CLUSTER_ENABLED, r);
758 ndr->depth--;
761 static enum ndr_err_code ndr_push_dfs_Info5(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info5 *r)
763 if (ndr_flags & NDR_SCALARS) {
764 NDR_CHECK(ndr_push_align(ndr, 5));
765 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
766 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
767 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
768 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
769 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
770 NDR_CHECK(ndr_push_dfs_PropertyFlags(ndr, NDR_SCALARS, r->flags));
771 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pktsize));
772 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
773 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
775 if (ndr_flags & NDR_BUFFERS) {
776 if (r->path) {
777 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
778 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
779 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
780 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
782 if (r->comment) {
783 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
784 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
785 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
786 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
789 return NDR_ERR_SUCCESS;
792 static enum ndr_err_code ndr_pull_dfs_Info5(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info5 *r)
794 uint32_t _ptr_path;
795 uint32_t size_path_1 = 0;
796 uint32_t length_path_1 = 0;
797 TALLOC_CTX *_mem_save_path_0;
798 uint32_t _ptr_comment;
799 uint32_t size_comment_1 = 0;
800 uint32_t length_comment_1 = 0;
801 TALLOC_CTX *_mem_save_comment_0;
802 if (ndr_flags & NDR_SCALARS) {
803 NDR_CHECK(ndr_pull_align(ndr, 5));
804 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
805 if (_ptr_path) {
806 NDR_PULL_ALLOC(ndr, r->path);
807 } else {
808 r->path = NULL;
810 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
811 if (_ptr_comment) {
812 NDR_PULL_ALLOC(ndr, r->comment);
813 } else {
814 r->comment = NULL;
816 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
817 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
818 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
819 NDR_CHECK(ndr_pull_dfs_PropertyFlags(ndr, NDR_SCALARS, &r->flags));
820 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pktsize));
821 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores));
822 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
824 if (ndr_flags & NDR_BUFFERS) {
825 if (r->path) {
826 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
827 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
828 NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
829 NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
830 size_path_1 = ndr_get_array_size(ndr, &r->path);
831 length_path_1 = ndr_get_array_length(ndr, &r->path);
832 if (length_path_1 > size_path_1) {
833 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_path_1, length_path_1);
835 NDR_CHECK(ndr_check_string_terminator(ndr, length_path_1, sizeof(uint16_t)));
836 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, length_path_1, sizeof(uint16_t), CH_UTF16));
837 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
839 if (r->comment) {
840 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
841 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
842 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
843 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
844 size_comment_1 = ndr_get_array_size(ndr, &r->comment);
845 length_comment_1 = ndr_get_array_length(ndr, &r->comment);
846 if (length_comment_1 > size_comment_1) {
847 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_comment_1, length_comment_1);
849 NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_1, sizeof(uint16_t)));
850 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, length_comment_1, sizeof(uint16_t), CH_UTF16));
851 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
854 return NDR_ERR_SUCCESS;
857 _PUBLIC_ void ndr_print_dfs_Info5(struct ndr_print *ndr, const char *name, const struct dfs_Info5 *r)
859 ndr_print_struct(ndr, name, "dfs_Info5");
860 ndr->depth++;
861 ndr_print_ptr(ndr, "path", r->path);
862 ndr->depth++;
863 if (r->path) {
864 ndr_print_string(ndr, "path", r->path);
866 ndr->depth--;
867 ndr_print_ptr(ndr, "comment", r->comment);
868 ndr->depth++;
869 if (r->comment) {
870 ndr_print_string(ndr, "comment", r->comment);
872 ndr->depth--;
873 ndr_print_dfs_VolumeState(ndr, "state", r->state);
874 ndr_print_uint32(ndr, "timeout", r->timeout);
875 ndr_print_GUID(ndr, "guid", &r->guid);
876 ndr_print_dfs_PropertyFlags(ndr, "flags", r->flags);
877 ndr_print_uint32(ndr, "pktsize", r->pktsize);
878 ndr_print_uint32(ndr, "num_stores", r->num_stores);
879 ndr->depth--;
882 static enum ndr_err_code ndr_push_dfs_Target_PriorityClass(struct ndr_push *ndr, int ndr_flags, enum dfs_Target_PriorityClass r)
884 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
885 return NDR_ERR_SUCCESS;
888 static enum ndr_err_code ndr_pull_dfs_Target_PriorityClass(struct ndr_pull *ndr, int ndr_flags, enum dfs_Target_PriorityClass *r)
890 uint32_t v;
891 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
892 *r = v;
893 return NDR_ERR_SUCCESS;
896 _PUBLIC_ void ndr_print_dfs_Target_PriorityClass(struct ndr_print *ndr, const char *name, enum dfs_Target_PriorityClass r)
898 const char *val = NULL;
900 switch (r) {
901 case DFS_INVALID_PRIORITY_CLASS: val = "DFS_INVALID_PRIORITY_CLASS"; break;
902 case DFS_SITE_COST_NORMAL_PRIORITY_CLASS: val = "DFS_SITE_COST_NORMAL_PRIORITY_CLASS"; break;
903 case DFS_GLOBAL_HIGH_PRIORITY_CLASS: val = "DFS_GLOBAL_HIGH_PRIORITY_CLASS"; break;
904 case DFS_SITE_COST_HIGH_PRIORITY_CLASS: val = "DFS_SITE_COST_HIGH_PRIORITY_CLASS"; break;
905 case DFS_SITE_COST_LOW_PRIORITY_CLASS: val = "DFS_SITE_COST_LOW_PRIORITY_CLASS"; break;
906 case DFS_GLOBAL_LOW_PRIORITY_CLASS: val = "DFS_GLOBAL_LOW_PRIORITY_CLASS"; break;
908 ndr_print_enum(ndr, name, "ENUM", val, r);
911 static enum ndr_err_code ndr_push_dfs_Target_Priority(struct ndr_push *ndr, int ndr_flags, const struct dfs_Target_Priority *r)
913 if (ndr_flags & NDR_SCALARS) {
914 NDR_CHECK(ndr_push_align(ndr, 4));
915 NDR_CHECK(ndr_push_dfs_Target_PriorityClass(ndr, NDR_SCALARS, r->target_priority_class));
916 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->target_priority_rank));
917 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->reserved));
918 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
920 if (ndr_flags & NDR_BUFFERS) {
922 return NDR_ERR_SUCCESS;
925 static enum ndr_err_code ndr_pull_dfs_Target_Priority(struct ndr_pull *ndr, int ndr_flags, struct dfs_Target_Priority *r)
927 if (ndr_flags & NDR_SCALARS) {
928 NDR_CHECK(ndr_pull_align(ndr, 4));
929 NDR_CHECK(ndr_pull_dfs_Target_PriorityClass(ndr, NDR_SCALARS, &r->target_priority_class));
930 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->target_priority_rank));
931 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved));
932 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
934 if (ndr_flags & NDR_BUFFERS) {
936 return NDR_ERR_SUCCESS;
939 _PUBLIC_ void ndr_print_dfs_Target_Priority(struct ndr_print *ndr, const char *name, const struct dfs_Target_Priority *r)
941 ndr_print_struct(ndr, name, "dfs_Target_Priority");
942 ndr->depth++;
943 ndr_print_dfs_Target_PriorityClass(ndr, "target_priority_class", r->target_priority_class);
944 ndr_print_uint16(ndr, "target_priority_rank", r->target_priority_rank);
945 ndr_print_uint16(ndr, "reserved", r->reserved);
946 ndr->depth--;
949 static enum ndr_err_code ndr_push_dfs_StorageInfo2(struct ndr_push *ndr, int ndr_flags, const struct dfs_StorageInfo2 *r)
951 if (ndr_flags & NDR_SCALARS) {
952 NDR_CHECK(ndr_push_align(ndr, 5));
953 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_SCALARS, &r->info));
954 NDR_CHECK(ndr_push_dfs_Target_Priority(ndr, NDR_SCALARS, &r->target_priority));
955 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
957 if (ndr_flags & NDR_BUFFERS) {
958 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->info));
960 return NDR_ERR_SUCCESS;
963 static enum ndr_err_code ndr_pull_dfs_StorageInfo2(struct ndr_pull *ndr, int ndr_flags, struct dfs_StorageInfo2 *r)
965 if (ndr_flags & NDR_SCALARS) {
966 NDR_CHECK(ndr_pull_align(ndr, 5));
967 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_SCALARS, &r->info));
968 NDR_CHECK(ndr_pull_dfs_Target_Priority(ndr, NDR_SCALARS, &r->target_priority));
969 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
971 if (ndr_flags & NDR_BUFFERS) {
972 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->info));
974 return NDR_ERR_SUCCESS;
977 _PUBLIC_ void ndr_print_dfs_StorageInfo2(struct ndr_print *ndr, const char *name, const struct dfs_StorageInfo2 *r)
979 ndr_print_struct(ndr, name, "dfs_StorageInfo2");
980 ndr->depth++;
981 ndr_print_dfs_StorageInfo(ndr, "info", &r->info);
982 ndr_print_dfs_Target_Priority(ndr, "target_priority", &r->target_priority);
983 ndr->depth--;
986 static enum ndr_err_code ndr_push_dfs_Info6(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info6 *r)
988 uint32_t cntr_stores_1;
989 if (ndr_flags & NDR_SCALARS) {
990 NDR_CHECK(ndr_push_align(ndr, 5));
991 NDR_CHECK(ndr_push_unique_ptr(ndr, r->entry_path));
992 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
993 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
994 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
995 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
996 NDR_CHECK(ndr_push_dfs_PropertyFlags(ndr, NDR_SCALARS, r->flags));
997 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pktsize));
998 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_stores));
999 NDR_CHECK(ndr_push_unique_ptr(ndr, r->stores));
1000 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1002 if (ndr_flags & NDR_BUFFERS) {
1003 if (r->entry_path) {
1004 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->entry_path, CH_UTF16)));
1005 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1006 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->entry_path, CH_UTF16)));
1007 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->entry_path, ndr_charset_length(r->entry_path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1009 if (r->comment) {
1010 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
1011 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1012 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
1013 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1015 if (r->stores) {
1016 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_stores));
1017 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
1018 NDR_CHECK(ndr_push_dfs_StorageInfo2(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
1020 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
1021 NDR_CHECK(ndr_push_dfs_StorageInfo2(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
1025 return NDR_ERR_SUCCESS;
1028 static enum ndr_err_code ndr_pull_dfs_Info6(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info6 *r)
1030 uint32_t _ptr_entry_path;
1031 uint32_t size_entry_path_1 = 0;
1032 uint32_t length_entry_path_1 = 0;
1033 TALLOC_CTX *_mem_save_entry_path_0;
1034 uint32_t _ptr_comment;
1035 uint32_t size_comment_1 = 0;
1036 uint32_t length_comment_1 = 0;
1037 TALLOC_CTX *_mem_save_comment_0;
1038 uint32_t _ptr_stores;
1039 uint32_t size_stores_1 = 0;
1040 uint32_t cntr_stores_1;
1041 TALLOC_CTX *_mem_save_stores_0;
1042 TALLOC_CTX *_mem_save_stores_1;
1043 if (ndr_flags & NDR_SCALARS) {
1044 NDR_CHECK(ndr_pull_align(ndr, 5));
1045 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entry_path));
1046 if (_ptr_entry_path) {
1047 NDR_PULL_ALLOC(ndr, r->entry_path);
1048 } else {
1049 r->entry_path = NULL;
1051 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
1052 if (_ptr_comment) {
1053 NDR_PULL_ALLOC(ndr, r->comment);
1054 } else {
1055 r->comment = NULL;
1057 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
1058 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
1059 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
1060 NDR_CHECK(ndr_pull_dfs_PropertyFlags(ndr, NDR_SCALARS, &r->flags));
1061 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pktsize));
1062 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_stores));
1063 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_stores));
1064 if (_ptr_stores) {
1065 NDR_PULL_ALLOC(ndr, r->stores);
1066 } else {
1067 r->stores = NULL;
1069 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1071 if (ndr_flags & NDR_BUFFERS) {
1072 if (r->entry_path) {
1073 _mem_save_entry_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
1074 NDR_PULL_SET_MEM_CTX(ndr, r->entry_path, 0);
1075 NDR_CHECK(ndr_pull_array_size(ndr, &r->entry_path));
1076 NDR_CHECK(ndr_pull_array_length(ndr, &r->entry_path));
1077 size_entry_path_1 = ndr_get_array_size(ndr, &r->entry_path);
1078 length_entry_path_1 = ndr_get_array_length(ndr, &r->entry_path);
1079 if (length_entry_path_1 > size_entry_path_1) {
1080 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);
1082 NDR_CHECK(ndr_check_string_terminator(ndr, length_entry_path_1, sizeof(uint16_t)));
1083 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->entry_path, length_entry_path_1, sizeof(uint16_t), CH_UTF16));
1084 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entry_path_0, 0);
1086 if (r->comment) {
1087 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
1088 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
1089 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
1090 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
1091 size_comment_1 = ndr_get_array_size(ndr, &r->comment);
1092 length_comment_1 = ndr_get_array_length(ndr, &r->comment);
1093 if (length_comment_1 > size_comment_1) {
1094 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_comment_1, length_comment_1);
1096 NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_1, sizeof(uint16_t)));
1097 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, length_comment_1, sizeof(uint16_t), CH_UTF16));
1098 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
1100 if (r->stores) {
1101 _mem_save_stores_0 = NDR_PULL_GET_MEM_CTX(ndr);
1102 NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
1103 NDR_CHECK(ndr_pull_array_size(ndr, &r->stores));
1104 size_stores_1 = ndr_get_array_size(ndr, &r->stores);
1105 NDR_PULL_ALLOC_N(ndr, r->stores, size_stores_1);
1106 _mem_save_stores_1 = NDR_PULL_GET_MEM_CTX(ndr);
1107 NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
1108 for (cntr_stores_1 = 0; cntr_stores_1 < size_stores_1; cntr_stores_1++) {
1109 NDR_CHECK(ndr_pull_dfs_StorageInfo2(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
1111 for (cntr_stores_1 = 0; cntr_stores_1 < size_stores_1; cntr_stores_1++) {
1112 NDR_CHECK(ndr_pull_dfs_StorageInfo2(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
1114 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_1, 0);
1115 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_0, 0);
1117 if (r->stores) {
1118 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->stores, r->num_stores));
1121 return NDR_ERR_SUCCESS;
1124 _PUBLIC_ void ndr_print_dfs_Info6(struct ndr_print *ndr, const char *name, const struct dfs_Info6 *r)
1126 uint32_t cntr_stores_1;
1127 ndr_print_struct(ndr, name, "dfs_Info6");
1128 ndr->depth++;
1129 ndr_print_ptr(ndr, "entry_path", r->entry_path);
1130 ndr->depth++;
1131 if (r->entry_path) {
1132 ndr_print_string(ndr, "entry_path", r->entry_path);
1134 ndr->depth--;
1135 ndr_print_ptr(ndr, "comment", r->comment);
1136 ndr->depth++;
1137 if (r->comment) {
1138 ndr_print_string(ndr, "comment", r->comment);
1140 ndr->depth--;
1141 ndr_print_dfs_VolumeState(ndr, "state", r->state);
1142 ndr_print_uint32(ndr, "timeout", r->timeout);
1143 ndr_print_GUID(ndr, "guid", &r->guid);
1144 ndr_print_dfs_PropertyFlags(ndr, "flags", r->flags);
1145 ndr_print_uint32(ndr, "pktsize", r->pktsize);
1146 ndr_print_uint16(ndr, "num_stores", r->num_stores);
1147 ndr_print_ptr(ndr, "stores", r->stores);
1148 ndr->depth++;
1149 if (r->stores) {
1150 ndr->print(ndr, "%s: ARRAY(%d)", "stores", (int)r->num_stores);
1151 ndr->depth++;
1152 for (cntr_stores_1=0;cntr_stores_1<r->num_stores;cntr_stores_1++) {
1153 char *idx_1=NULL;
1154 if (asprintf(&idx_1, "[%d]", cntr_stores_1) != -1) {
1155 ndr_print_dfs_StorageInfo2(ndr, "stores", &r->stores[cntr_stores_1]);
1156 free(idx_1);
1159 ndr->depth--;
1161 ndr->depth--;
1162 ndr->depth--;
1165 static enum ndr_err_code ndr_push_dfs_Info7(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info7 *r)
1167 if (ndr_flags & NDR_SCALARS) {
1168 NDR_CHECK(ndr_push_align(ndr, 4));
1169 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->generation_guid));
1170 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1172 if (ndr_flags & NDR_BUFFERS) {
1174 return NDR_ERR_SUCCESS;
1177 static enum ndr_err_code ndr_pull_dfs_Info7(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info7 *r)
1179 if (ndr_flags & NDR_SCALARS) {
1180 NDR_CHECK(ndr_pull_align(ndr, 4));
1181 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->generation_guid));
1182 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1184 if (ndr_flags & NDR_BUFFERS) {
1186 return NDR_ERR_SUCCESS;
1189 _PUBLIC_ void ndr_print_dfs_Info7(struct ndr_print *ndr, const char *name, const struct dfs_Info7 *r)
1191 ndr_print_struct(ndr, name, "dfs_Info7");
1192 ndr->depth++;
1193 ndr_print_GUID(ndr, "generation_guid", &r->generation_guid);
1194 ndr->depth--;
1197 static enum ndr_err_code ndr_push_dfs_Info100(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info100 *r)
1199 if (ndr_flags & NDR_SCALARS) {
1200 NDR_CHECK(ndr_push_align(ndr, 5));
1201 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
1202 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1204 if (ndr_flags & NDR_BUFFERS) {
1205 if (r->comment) {
1206 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
1207 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1208 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
1209 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1212 return NDR_ERR_SUCCESS;
1215 static enum ndr_err_code ndr_pull_dfs_Info100(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info100 *r)
1217 uint32_t _ptr_comment;
1218 uint32_t size_comment_1 = 0;
1219 uint32_t length_comment_1 = 0;
1220 TALLOC_CTX *_mem_save_comment_0;
1221 if (ndr_flags & NDR_SCALARS) {
1222 NDR_CHECK(ndr_pull_align(ndr, 5));
1223 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
1224 if (_ptr_comment) {
1225 NDR_PULL_ALLOC(ndr, r->comment);
1226 } else {
1227 r->comment = NULL;
1229 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1231 if (ndr_flags & NDR_BUFFERS) {
1232 if (r->comment) {
1233 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
1234 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
1235 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
1236 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
1237 size_comment_1 = ndr_get_array_size(ndr, &r->comment);
1238 length_comment_1 = ndr_get_array_length(ndr, &r->comment);
1239 if (length_comment_1 > size_comment_1) {
1240 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_comment_1, length_comment_1);
1242 NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_1, sizeof(uint16_t)));
1243 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, length_comment_1, sizeof(uint16_t), CH_UTF16));
1244 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
1247 return NDR_ERR_SUCCESS;
1250 _PUBLIC_ void ndr_print_dfs_Info100(struct ndr_print *ndr, const char *name, const struct dfs_Info100 *r)
1252 ndr_print_struct(ndr, name, "dfs_Info100");
1253 ndr->depth++;
1254 ndr_print_ptr(ndr, "comment", r->comment);
1255 ndr->depth++;
1256 if (r->comment) {
1257 ndr_print_string(ndr, "comment", r->comment);
1259 ndr->depth--;
1260 ndr->depth--;
1263 static enum ndr_err_code ndr_push_dfs_Info101(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info101 *r)
1265 if (ndr_flags & NDR_SCALARS) {
1266 NDR_CHECK(ndr_push_align(ndr, 4));
1267 NDR_CHECK(ndr_push_dfs_StorageState(ndr, NDR_SCALARS, r->state));
1268 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1270 if (ndr_flags & NDR_BUFFERS) {
1272 return NDR_ERR_SUCCESS;
1275 static enum ndr_err_code ndr_pull_dfs_Info101(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info101 *r)
1277 if (ndr_flags & NDR_SCALARS) {
1278 NDR_CHECK(ndr_pull_align(ndr, 4));
1279 NDR_CHECK(ndr_pull_dfs_StorageState(ndr, NDR_SCALARS, &r->state));
1280 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1282 if (ndr_flags & NDR_BUFFERS) {
1284 return NDR_ERR_SUCCESS;
1287 _PUBLIC_ void ndr_print_dfs_Info101(struct ndr_print *ndr, const char *name, const struct dfs_Info101 *r)
1289 ndr_print_struct(ndr, name, "dfs_Info101");
1290 ndr->depth++;
1291 ndr_print_dfs_StorageState(ndr, "state", r->state);
1292 ndr->depth--;
1295 static enum ndr_err_code ndr_push_dfs_Info102(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info102 *r)
1297 if (ndr_flags & NDR_SCALARS) {
1298 NDR_CHECK(ndr_push_align(ndr, 4));
1299 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
1300 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1302 if (ndr_flags & NDR_BUFFERS) {
1304 return NDR_ERR_SUCCESS;
1307 static enum ndr_err_code ndr_pull_dfs_Info102(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info102 *r)
1309 if (ndr_flags & NDR_SCALARS) {
1310 NDR_CHECK(ndr_pull_align(ndr, 4));
1311 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
1312 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1314 if (ndr_flags & NDR_BUFFERS) {
1316 return NDR_ERR_SUCCESS;
1319 _PUBLIC_ void ndr_print_dfs_Info102(struct ndr_print *ndr, const char *name, const struct dfs_Info102 *r)
1321 ndr_print_struct(ndr, name, "dfs_Info102");
1322 ndr->depth++;
1323 ndr_print_uint32(ndr, "timeout", r->timeout);
1324 ndr->depth--;
1327 static enum ndr_err_code ndr_push_dfs_Info103(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info103 *r)
1329 if (ndr_flags & NDR_SCALARS) {
1330 NDR_CHECK(ndr_push_align(ndr, 4));
1331 NDR_CHECK(ndr_push_dfs_PropertyFlags(ndr, NDR_SCALARS, r->flags));
1332 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1334 if (ndr_flags & NDR_BUFFERS) {
1336 return NDR_ERR_SUCCESS;
1339 static enum ndr_err_code ndr_pull_dfs_Info103(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info103 *r)
1341 if (ndr_flags & NDR_SCALARS) {
1342 NDR_CHECK(ndr_pull_align(ndr, 4));
1343 NDR_CHECK(ndr_pull_dfs_PropertyFlags(ndr, NDR_SCALARS, &r->flags));
1344 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1346 if (ndr_flags & NDR_BUFFERS) {
1348 return NDR_ERR_SUCCESS;
1351 _PUBLIC_ void ndr_print_dfs_Info103(struct ndr_print *ndr, const char *name, const struct dfs_Info103 *r)
1353 ndr_print_struct(ndr, name, "dfs_Info103");
1354 ndr->depth++;
1355 ndr_print_dfs_PropertyFlags(ndr, "flags", r->flags);
1356 ndr->depth--;
1359 static enum ndr_err_code ndr_push_dfs_Info104(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info104 *r)
1361 if (ndr_flags & NDR_SCALARS) {
1362 NDR_CHECK(ndr_push_align(ndr, 4));
1363 NDR_CHECK(ndr_push_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority));
1364 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1366 if (ndr_flags & NDR_BUFFERS) {
1368 return NDR_ERR_SUCCESS;
1371 static enum ndr_err_code ndr_pull_dfs_Info104(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info104 *r)
1373 if (ndr_flags & NDR_SCALARS) {
1374 NDR_CHECK(ndr_pull_align(ndr, 4));
1375 NDR_CHECK(ndr_pull_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority));
1376 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1378 if (ndr_flags & NDR_BUFFERS) {
1380 return NDR_ERR_SUCCESS;
1383 _PUBLIC_ void ndr_print_dfs_Info104(struct ndr_print *ndr, const char *name, const struct dfs_Info104 *r)
1385 ndr_print_struct(ndr, name, "dfs_Info104");
1386 ndr->depth++;
1387 ndr_print_dfs_Target_Priority(ndr, "priority", &r->priority);
1388 ndr->depth--;
1391 static enum ndr_err_code ndr_push_dfs_Info105(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info105 *r)
1393 if (ndr_flags & NDR_SCALARS) {
1394 NDR_CHECK(ndr_push_align(ndr, 5));
1395 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
1396 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
1397 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
1398 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->property_flag_mask));
1399 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->property_flags));
1400 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1402 if (ndr_flags & NDR_BUFFERS) {
1403 if (r->comment) {
1404 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
1405 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1406 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
1407 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1410 return NDR_ERR_SUCCESS;
1413 static enum ndr_err_code ndr_pull_dfs_Info105(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info105 *r)
1415 uint32_t _ptr_comment;
1416 uint32_t size_comment_1 = 0;
1417 uint32_t length_comment_1 = 0;
1418 TALLOC_CTX *_mem_save_comment_0;
1419 if (ndr_flags & NDR_SCALARS) {
1420 NDR_CHECK(ndr_pull_align(ndr, 5));
1421 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
1422 if (_ptr_comment) {
1423 NDR_PULL_ALLOC(ndr, r->comment);
1424 } else {
1425 r->comment = NULL;
1427 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
1428 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
1429 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->property_flag_mask));
1430 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->property_flags));
1431 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1433 if (ndr_flags & NDR_BUFFERS) {
1434 if (r->comment) {
1435 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
1436 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
1437 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
1438 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
1439 size_comment_1 = ndr_get_array_size(ndr, &r->comment);
1440 length_comment_1 = ndr_get_array_length(ndr, &r->comment);
1441 if (length_comment_1 > size_comment_1) {
1442 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_comment_1, length_comment_1);
1444 NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_1, sizeof(uint16_t)));
1445 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, length_comment_1, sizeof(uint16_t), CH_UTF16));
1446 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
1449 return NDR_ERR_SUCCESS;
1452 _PUBLIC_ void ndr_print_dfs_Info105(struct ndr_print *ndr, const char *name, const struct dfs_Info105 *r)
1454 ndr_print_struct(ndr, name, "dfs_Info105");
1455 ndr->depth++;
1456 ndr_print_ptr(ndr, "comment", r->comment);
1457 ndr->depth++;
1458 if (r->comment) {
1459 ndr_print_string(ndr, "comment", r->comment);
1461 ndr->depth--;
1462 ndr_print_dfs_VolumeState(ndr, "state", r->state);
1463 ndr_print_uint32(ndr, "timeout", r->timeout);
1464 ndr_print_uint32(ndr, "property_flag_mask", r->property_flag_mask);
1465 ndr_print_uint32(ndr, "property_flags", r->property_flags);
1466 ndr->depth--;
1469 static enum ndr_err_code ndr_push_dfs_Info106(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info106 *r)
1471 if (ndr_flags & NDR_SCALARS) {
1472 NDR_CHECK(ndr_push_align(ndr, 4));
1473 NDR_CHECK(ndr_push_dfs_StorageState(ndr, NDR_SCALARS, r->state));
1474 NDR_CHECK(ndr_push_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority));
1475 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1477 if (ndr_flags & NDR_BUFFERS) {
1479 return NDR_ERR_SUCCESS;
1482 static enum ndr_err_code ndr_pull_dfs_Info106(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info106 *r)
1484 if (ndr_flags & NDR_SCALARS) {
1485 NDR_CHECK(ndr_pull_align(ndr, 4));
1486 NDR_CHECK(ndr_pull_dfs_StorageState(ndr, NDR_SCALARS, &r->state));
1487 NDR_CHECK(ndr_pull_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority));
1488 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1490 if (ndr_flags & NDR_BUFFERS) {
1492 return NDR_ERR_SUCCESS;
1495 _PUBLIC_ void ndr_print_dfs_Info106(struct ndr_print *ndr, const char *name, const struct dfs_Info106 *r)
1497 ndr_print_struct(ndr, name, "dfs_Info106");
1498 ndr->depth++;
1499 ndr_print_dfs_StorageState(ndr, "state", r->state);
1500 ndr_print_dfs_Target_Priority(ndr, "priority", &r->priority);
1501 ndr->depth--;
1504 static enum ndr_err_code ndr_push_dfs_Info200(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info200 *r)
1506 if (ndr_flags & NDR_SCALARS) {
1507 NDR_CHECK(ndr_push_align(ndr, 5));
1508 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dom_root));
1509 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1511 if (ndr_flags & NDR_BUFFERS) {
1512 if (r->dom_root) {
1513 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16)));
1514 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1515 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16)));
1516 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dom_root, ndr_charset_length(r->dom_root, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1519 return NDR_ERR_SUCCESS;
1522 static enum ndr_err_code ndr_pull_dfs_Info200(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info200 *r)
1524 uint32_t _ptr_dom_root;
1525 uint32_t size_dom_root_1 = 0;
1526 uint32_t length_dom_root_1 = 0;
1527 TALLOC_CTX *_mem_save_dom_root_0;
1528 if (ndr_flags & NDR_SCALARS) {
1529 NDR_CHECK(ndr_pull_align(ndr, 5));
1530 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dom_root));
1531 if (_ptr_dom_root) {
1532 NDR_PULL_ALLOC(ndr, r->dom_root);
1533 } else {
1534 r->dom_root = NULL;
1536 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1538 if (ndr_flags & NDR_BUFFERS) {
1539 if (r->dom_root) {
1540 _mem_save_dom_root_0 = NDR_PULL_GET_MEM_CTX(ndr);
1541 NDR_PULL_SET_MEM_CTX(ndr, r->dom_root, 0);
1542 NDR_CHECK(ndr_pull_array_size(ndr, &r->dom_root));
1543 NDR_CHECK(ndr_pull_array_length(ndr, &r->dom_root));
1544 size_dom_root_1 = ndr_get_array_size(ndr, &r->dom_root);
1545 length_dom_root_1 = ndr_get_array_length(ndr, &r->dom_root);
1546 if (length_dom_root_1 > size_dom_root_1) {
1547 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);
1549 NDR_CHECK(ndr_check_string_terminator(ndr, length_dom_root_1, sizeof(uint16_t)));
1550 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dom_root, length_dom_root_1, sizeof(uint16_t), CH_UTF16));
1551 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_root_0, 0);
1554 return NDR_ERR_SUCCESS;
1557 _PUBLIC_ void ndr_print_dfs_Info200(struct ndr_print *ndr, const char *name, const struct dfs_Info200 *r)
1559 ndr_print_struct(ndr, name, "dfs_Info200");
1560 ndr->depth++;
1561 ndr_print_ptr(ndr, "dom_root", r->dom_root);
1562 ndr->depth++;
1563 if (r->dom_root) {
1564 ndr_print_string(ndr, "dom_root", r->dom_root);
1566 ndr->depth--;
1567 ndr->depth--;
1570 static enum ndr_err_code ndr_push_dfs_VolumeFlavor(struct ndr_push *ndr, int ndr_flags, enum dfs_VolumeFlavor r)
1572 NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
1573 return NDR_ERR_SUCCESS;
1576 static enum ndr_err_code ndr_pull_dfs_VolumeFlavor(struct ndr_pull *ndr, int ndr_flags, enum dfs_VolumeFlavor *r)
1578 uint16_t v;
1579 NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
1580 *r = v;
1581 return NDR_ERR_SUCCESS;
1584 _PUBLIC_ void ndr_print_dfs_VolumeFlavor(struct ndr_print *ndr, const char *name, enum dfs_VolumeFlavor r)
1586 const char *val = NULL;
1588 switch (r) {
1589 case DFS_VOLUME_FLAVOR_STANDALONE: val = "DFS_VOLUME_FLAVOR_STANDALONE"; break;
1590 case DFS_VOLUME_FLAVOR_AD_BLOB: val = "DFS_VOLUME_FLAVOR_AD_BLOB"; break;
1592 ndr_print_enum(ndr, name, "ENUM", val, r);
1595 static enum ndr_err_code ndr_push_dfs_Info300(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info300 *r)
1597 if (ndr_flags & NDR_SCALARS) {
1598 NDR_CHECK(ndr_push_align(ndr, 5));
1599 NDR_CHECK(ndr_push_dfs_VolumeFlavor(ndr, NDR_SCALARS, r->flavor));
1600 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dom_root));
1601 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1603 if (ndr_flags & NDR_BUFFERS) {
1604 if (r->dom_root) {
1605 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16)));
1606 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1607 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16)));
1608 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dom_root, ndr_charset_length(r->dom_root, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1611 return NDR_ERR_SUCCESS;
1614 static enum ndr_err_code ndr_pull_dfs_Info300(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info300 *r)
1616 uint32_t _ptr_dom_root;
1617 uint32_t size_dom_root_1 = 0;
1618 uint32_t length_dom_root_1 = 0;
1619 TALLOC_CTX *_mem_save_dom_root_0;
1620 if (ndr_flags & NDR_SCALARS) {
1621 NDR_CHECK(ndr_pull_align(ndr, 5));
1622 NDR_CHECK(ndr_pull_dfs_VolumeFlavor(ndr, NDR_SCALARS, &r->flavor));
1623 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dom_root));
1624 if (_ptr_dom_root) {
1625 NDR_PULL_ALLOC(ndr, r->dom_root);
1626 } else {
1627 r->dom_root = NULL;
1629 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1631 if (ndr_flags & NDR_BUFFERS) {
1632 if (r->dom_root) {
1633 _mem_save_dom_root_0 = NDR_PULL_GET_MEM_CTX(ndr);
1634 NDR_PULL_SET_MEM_CTX(ndr, r->dom_root, 0);
1635 NDR_CHECK(ndr_pull_array_size(ndr, &r->dom_root));
1636 NDR_CHECK(ndr_pull_array_length(ndr, &r->dom_root));
1637 size_dom_root_1 = ndr_get_array_size(ndr, &r->dom_root);
1638 length_dom_root_1 = ndr_get_array_length(ndr, &r->dom_root);
1639 if (length_dom_root_1 > size_dom_root_1) {
1640 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);
1642 NDR_CHECK(ndr_check_string_terminator(ndr, length_dom_root_1, sizeof(uint16_t)));
1643 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dom_root, length_dom_root_1, sizeof(uint16_t), CH_UTF16));
1644 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_root_0, 0);
1647 return NDR_ERR_SUCCESS;
1650 _PUBLIC_ void ndr_print_dfs_Info300(struct ndr_print *ndr, const char *name, const struct dfs_Info300 *r)
1652 ndr_print_struct(ndr, name, "dfs_Info300");
1653 ndr->depth++;
1654 ndr_print_dfs_VolumeFlavor(ndr, "flavor", r->flavor);
1655 ndr_print_ptr(ndr, "dom_root", r->dom_root);
1656 ndr->depth++;
1657 if (r->dom_root) {
1658 ndr_print_string(ndr, "dom_root", r->dom_root);
1660 ndr->depth--;
1661 ndr->depth--;
1664 static enum ndr_err_code ndr_push_dfs_Info(struct ndr_push *ndr, int ndr_flags, const union dfs_Info *r)
1666 if (ndr_flags & NDR_SCALARS) {
1667 int level = ndr_push_get_switch_value(ndr, r);
1668 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
1669 NDR_CHECK(ndr_push_union_align(ndr, 5));
1670 switch (level) {
1671 case 0: {
1672 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
1673 break; }
1675 case 1: {
1676 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
1677 break; }
1679 case 2: {
1680 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
1681 break; }
1683 case 3: {
1684 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3));
1685 break; }
1687 case 4: {
1688 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info4));
1689 break; }
1691 case 5: {
1692 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info5));
1693 break; }
1695 case 6: {
1696 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info6));
1697 break; }
1699 case 7: {
1700 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info7));
1701 break; }
1703 case 100: {
1704 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info100));
1705 break; }
1707 case 101: {
1708 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info101));
1709 break; }
1711 case 102: {
1712 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info102));
1713 break; }
1715 case 103: {
1716 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info103));
1717 break; }
1719 case 104: {
1720 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info104));
1721 break; }
1723 case 105: {
1724 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info105));
1725 break; }
1727 case 106: {
1728 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info106));
1729 break; }
1731 default:
1732 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1735 if (ndr_flags & NDR_BUFFERS) {
1736 int level = ndr_push_get_switch_value(ndr, r);
1737 switch (level) {
1738 case 0:
1739 if (r->info0) {
1740 NDR_CHECK(ndr_push_dfs_Info0(ndr, NDR_SCALARS, r->info0));
1742 break;
1744 case 1:
1745 if (r->info1) {
1746 NDR_CHECK(ndr_push_dfs_Info1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
1748 break;
1750 case 2:
1751 if (r->info2) {
1752 NDR_CHECK(ndr_push_dfs_Info2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
1754 break;
1756 case 3:
1757 if (r->info3) {
1758 NDR_CHECK(ndr_push_dfs_Info3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
1760 break;
1762 case 4:
1763 if (r->info4) {
1764 NDR_CHECK(ndr_push_dfs_Info4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
1766 break;
1768 case 5:
1769 if (r->info5) {
1770 NDR_CHECK(ndr_push_dfs_Info5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5));
1772 break;
1774 case 6:
1775 if (r->info6) {
1776 NDR_CHECK(ndr_push_dfs_Info6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6));
1778 break;
1780 case 7:
1781 if (r->info7) {
1782 NDR_CHECK(ndr_push_dfs_Info7(ndr, NDR_SCALARS, r->info7));
1784 break;
1786 case 100:
1787 if (r->info100) {
1788 NDR_CHECK(ndr_push_dfs_Info100(ndr, NDR_SCALARS|NDR_BUFFERS, r->info100));
1790 break;
1792 case 101:
1793 if (r->info101) {
1794 NDR_CHECK(ndr_push_dfs_Info101(ndr, NDR_SCALARS, r->info101));
1796 break;
1798 case 102:
1799 if (r->info102) {
1800 NDR_CHECK(ndr_push_dfs_Info102(ndr, NDR_SCALARS, r->info102));
1802 break;
1804 case 103:
1805 if (r->info103) {
1806 NDR_CHECK(ndr_push_dfs_Info103(ndr, NDR_SCALARS, r->info103));
1808 break;
1810 case 104:
1811 if (r->info104) {
1812 NDR_CHECK(ndr_push_dfs_Info104(ndr, NDR_SCALARS, r->info104));
1814 break;
1816 case 105:
1817 if (r->info105) {
1818 NDR_CHECK(ndr_push_dfs_Info105(ndr, NDR_SCALARS|NDR_BUFFERS, r->info105));
1820 break;
1822 case 106:
1823 if (r->info106) {
1824 NDR_CHECK(ndr_push_dfs_Info106(ndr, NDR_SCALARS, r->info106));
1826 break;
1828 default:
1829 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1832 return NDR_ERR_SUCCESS;
1835 static enum ndr_err_code ndr_pull_dfs_Info(struct ndr_pull *ndr, int ndr_flags, union dfs_Info *r)
1837 int level;
1838 uint32_t _level;
1839 TALLOC_CTX *_mem_save_info0_0;
1840 uint32_t _ptr_info0;
1841 TALLOC_CTX *_mem_save_info1_0;
1842 uint32_t _ptr_info1;
1843 TALLOC_CTX *_mem_save_info2_0;
1844 uint32_t _ptr_info2;
1845 TALLOC_CTX *_mem_save_info3_0;
1846 uint32_t _ptr_info3;
1847 TALLOC_CTX *_mem_save_info4_0;
1848 uint32_t _ptr_info4;
1849 TALLOC_CTX *_mem_save_info5_0;
1850 uint32_t _ptr_info5;
1851 TALLOC_CTX *_mem_save_info6_0;
1852 uint32_t _ptr_info6;
1853 TALLOC_CTX *_mem_save_info7_0;
1854 uint32_t _ptr_info7;
1855 TALLOC_CTX *_mem_save_info100_0;
1856 uint32_t _ptr_info100;
1857 TALLOC_CTX *_mem_save_info101_0;
1858 uint32_t _ptr_info101;
1859 TALLOC_CTX *_mem_save_info102_0;
1860 uint32_t _ptr_info102;
1861 TALLOC_CTX *_mem_save_info103_0;
1862 uint32_t _ptr_info103;
1863 TALLOC_CTX *_mem_save_info104_0;
1864 uint32_t _ptr_info104;
1865 TALLOC_CTX *_mem_save_info105_0;
1866 uint32_t _ptr_info105;
1867 TALLOC_CTX *_mem_save_info106_0;
1868 uint32_t _ptr_info106;
1869 level = ndr_pull_get_switch_value(ndr, r);
1870 if (ndr_flags & NDR_SCALARS) {
1871 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
1872 if (_level != level) {
1873 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
1875 NDR_CHECK(ndr_pull_union_align(ndr, 5));
1876 switch (level) {
1877 case 0: {
1878 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
1879 if (_ptr_info0) {
1880 NDR_PULL_ALLOC(ndr, r->info0);
1881 } else {
1882 r->info0 = NULL;
1884 break; }
1886 case 1: {
1887 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
1888 if (_ptr_info1) {
1889 NDR_PULL_ALLOC(ndr, r->info1);
1890 } else {
1891 r->info1 = NULL;
1893 break; }
1895 case 2: {
1896 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
1897 if (_ptr_info2) {
1898 NDR_PULL_ALLOC(ndr, r->info2);
1899 } else {
1900 r->info2 = NULL;
1902 break; }
1904 case 3: {
1905 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info3));
1906 if (_ptr_info3) {
1907 NDR_PULL_ALLOC(ndr, r->info3);
1908 } else {
1909 r->info3 = NULL;
1911 break; }
1913 case 4: {
1914 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info4));
1915 if (_ptr_info4) {
1916 NDR_PULL_ALLOC(ndr, r->info4);
1917 } else {
1918 r->info4 = NULL;
1920 break; }
1922 case 5: {
1923 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info5));
1924 if (_ptr_info5) {
1925 NDR_PULL_ALLOC(ndr, r->info5);
1926 } else {
1927 r->info5 = NULL;
1929 break; }
1931 case 6: {
1932 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info6));
1933 if (_ptr_info6) {
1934 NDR_PULL_ALLOC(ndr, r->info6);
1935 } else {
1936 r->info6 = NULL;
1938 break; }
1940 case 7: {
1941 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info7));
1942 if (_ptr_info7) {
1943 NDR_PULL_ALLOC(ndr, r->info7);
1944 } else {
1945 r->info7 = NULL;
1947 break; }
1949 case 100: {
1950 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info100));
1951 if (_ptr_info100) {
1952 NDR_PULL_ALLOC(ndr, r->info100);
1953 } else {
1954 r->info100 = NULL;
1956 break; }
1958 case 101: {
1959 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info101));
1960 if (_ptr_info101) {
1961 NDR_PULL_ALLOC(ndr, r->info101);
1962 } else {
1963 r->info101 = NULL;
1965 break; }
1967 case 102: {
1968 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info102));
1969 if (_ptr_info102) {
1970 NDR_PULL_ALLOC(ndr, r->info102);
1971 } else {
1972 r->info102 = NULL;
1974 break; }
1976 case 103: {
1977 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info103));
1978 if (_ptr_info103) {
1979 NDR_PULL_ALLOC(ndr, r->info103);
1980 } else {
1981 r->info103 = NULL;
1983 break; }
1985 case 104: {
1986 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info104));
1987 if (_ptr_info104) {
1988 NDR_PULL_ALLOC(ndr, r->info104);
1989 } else {
1990 r->info104 = NULL;
1992 break; }
1994 case 105: {
1995 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info105));
1996 if (_ptr_info105) {
1997 NDR_PULL_ALLOC(ndr, r->info105);
1998 } else {
1999 r->info105 = NULL;
2001 break; }
2003 case 106: {
2004 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info106));
2005 if (_ptr_info106) {
2006 NDR_PULL_ALLOC(ndr, r->info106);
2007 } else {
2008 r->info106 = NULL;
2010 break; }
2012 default:
2013 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
2016 if (ndr_flags & NDR_BUFFERS) {
2017 switch (level) {
2018 case 0:
2019 if (r->info0) {
2020 _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
2021 NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
2022 NDR_CHECK(ndr_pull_dfs_Info0(ndr, NDR_SCALARS, r->info0));
2023 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
2025 break;
2027 case 1:
2028 if (r->info1) {
2029 _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
2030 NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
2031 NDR_CHECK(ndr_pull_dfs_Info1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
2032 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
2034 break;
2036 case 2:
2037 if (r->info2) {
2038 _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
2039 NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
2040 NDR_CHECK(ndr_pull_dfs_Info2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
2041 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
2043 break;
2045 case 3:
2046 if (r->info3) {
2047 _mem_save_info3_0 = NDR_PULL_GET_MEM_CTX(ndr);
2048 NDR_PULL_SET_MEM_CTX(ndr, r->info3, 0);
2049 NDR_CHECK(ndr_pull_dfs_Info3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
2050 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info3_0, 0);
2052 break;
2054 case 4:
2055 if (r->info4) {
2056 _mem_save_info4_0 = NDR_PULL_GET_MEM_CTX(ndr);
2057 NDR_PULL_SET_MEM_CTX(ndr, r->info4, 0);
2058 NDR_CHECK(ndr_pull_dfs_Info4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
2059 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info4_0, 0);
2061 break;
2063 case 5:
2064 if (r->info5) {
2065 _mem_save_info5_0 = NDR_PULL_GET_MEM_CTX(ndr);
2066 NDR_PULL_SET_MEM_CTX(ndr, r->info5, 0);
2067 NDR_CHECK(ndr_pull_dfs_Info5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5));
2068 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info5_0, 0);
2070 break;
2072 case 6:
2073 if (r->info6) {
2074 _mem_save_info6_0 = NDR_PULL_GET_MEM_CTX(ndr);
2075 NDR_PULL_SET_MEM_CTX(ndr, r->info6, 0);
2076 NDR_CHECK(ndr_pull_dfs_Info6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6));
2077 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info6_0, 0);
2079 break;
2081 case 7:
2082 if (r->info7) {
2083 _mem_save_info7_0 = NDR_PULL_GET_MEM_CTX(ndr);
2084 NDR_PULL_SET_MEM_CTX(ndr, r->info7, 0);
2085 NDR_CHECK(ndr_pull_dfs_Info7(ndr, NDR_SCALARS, r->info7));
2086 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info7_0, 0);
2088 break;
2090 case 100:
2091 if (r->info100) {
2092 _mem_save_info100_0 = NDR_PULL_GET_MEM_CTX(ndr);
2093 NDR_PULL_SET_MEM_CTX(ndr, r->info100, 0);
2094 NDR_CHECK(ndr_pull_dfs_Info100(ndr, NDR_SCALARS|NDR_BUFFERS, r->info100));
2095 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info100_0, 0);
2097 break;
2099 case 101:
2100 if (r->info101) {
2101 _mem_save_info101_0 = NDR_PULL_GET_MEM_CTX(ndr);
2102 NDR_PULL_SET_MEM_CTX(ndr, r->info101, 0);
2103 NDR_CHECK(ndr_pull_dfs_Info101(ndr, NDR_SCALARS, r->info101));
2104 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info101_0, 0);
2106 break;
2108 case 102:
2109 if (r->info102) {
2110 _mem_save_info102_0 = NDR_PULL_GET_MEM_CTX(ndr);
2111 NDR_PULL_SET_MEM_CTX(ndr, r->info102, 0);
2112 NDR_CHECK(ndr_pull_dfs_Info102(ndr, NDR_SCALARS, r->info102));
2113 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info102_0, 0);
2115 break;
2117 case 103:
2118 if (r->info103) {
2119 _mem_save_info103_0 = NDR_PULL_GET_MEM_CTX(ndr);
2120 NDR_PULL_SET_MEM_CTX(ndr, r->info103, 0);
2121 NDR_CHECK(ndr_pull_dfs_Info103(ndr, NDR_SCALARS, r->info103));
2122 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info103_0, 0);
2124 break;
2126 case 104:
2127 if (r->info104) {
2128 _mem_save_info104_0 = NDR_PULL_GET_MEM_CTX(ndr);
2129 NDR_PULL_SET_MEM_CTX(ndr, r->info104, 0);
2130 NDR_CHECK(ndr_pull_dfs_Info104(ndr, NDR_SCALARS, r->info104));
2131 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info104_0, 0);
2133 break;
2135 case 105:
2136 if (r->info105) {
2137 _mem_save_info105_0 = NDR_PULL_GET_MEM_CTX(ndr);
2138 NDR_PULL_SET_MEM_CTX(ndr, r->info105, 0);
2139 NDR_CHECK(ndr_pull_dfs_Info105(ndr, NDR_SCALARS|NDR_BUFFERS, r->info105));
2140 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info105_0, 0);
2142 break;
2144 case 106:
2145 if (r->info106) {
2146 _mem_save_info106_0 = NDR_PULL_GET_MEM_CTX(ndr);
2147 NDR_PULL_SET_MEM_CTX(ndr, r->info106, 0);
2148 NDR_CHECK(ndr_pull_dfs_Info106(ndr, NDR_SCALARS, r->info106));
2149 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info106_0, 0);
2151 break;
2153 default:
2154 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
2157 return NDR_ERR_SUCCESS;
2160 _PUBLIC_ void ndr_print_dfs_Info(struct ndr_print *ndr, const char *name, const union dfs_Info *r)
2162 int level;
2163 level = ndr_print_get_switch_value(ndr, r);
2164 ndr_print_union(ndr, name, level, "dfs_Info");
2165 switch (level) {
2166 case 0:
2167 ndr_print_ptr(ndr, "info0", r->info0);
2168 ndr->depth++;
2169 if (r->info0) {
2170 ndr_print_dfs_Info0(ndr, "info0", r->info0);
2172 ndr->depth--;
2173 break;
2175 case 1:
2176 ndr_print_ptr(ndr, "info1", r->info1);
2177 ndr->depth++;
2178 if (r->info1) {
2179 ndr_print_dfs_Info1(ndr, "info1", r->info1);
2181 ndr->depth--;
2182 break;
2184 case 2:
2185 ndr_print_ptr(ndr, "info2", r->info2);
2186 ndr->depth++;
2187 if (r->info2) {
2188 ndr_print_dfs_Info2(ndr, "info2", r->info2);
2190 ndr->depth--;
2191 break;
2193 case 3:
2194 ndr_print_ptr(ndr, "info3", r->info3);
2195 ndr->depth++;
2196 if (r->info3) {
2197 ndr_print_dfs_Info3(ndr, "info3", r->info3);
2199 ndr->depth--;
2200 break;
2202 case 4:
2203 ndr_print_ptr(ndr, "info4", r->info4);
2204 ndr->depth++;
2205 if (r->info4) {
2206 ndr_print_dfs_Info4(ndr, "info4", r->info4);
2208 ndr->depth--;
2209 break;
2211 case 5:
2212 ndr_print_ptr(ndr, "info5", r->info5);
2213 ndr->depth++;
2214 if (r->info5) {
2215 ndr_print_dfs_Info5(ndr, "info5", r->info5);
2217 ndr->depth--;
2218 break;
2220 case 6:
2221 ndr_print_ptr(ndr, "info6", r->info6);
2222 ndr->depth++;
2223 if (r->info6) {
2224 ndr_print_dfs_Info6(ndr, "info6", r->info6);
2226 ndr->depth--;
2227 break;
2229 case 7:
2230 ndr_print_ptr(ndr, "info7", r->info7);
2231 ndr->depth++;
2232 if (r->info7) {
2233 ndr_print_dfs_Info7(ndr, "info7", r->info7);
2235 ndr->depth--;
2236 break;
2238 case 100:
2239 ndr_print_ptr(ndr, "info100", r->info100);
2240 ndr->depth++;
2241 if (r->info100) {
2242 ndr_print_dfs_Info100(ndr, "info100", r->info100);
2244 ndr->depth--;
2245 break;
2247 case 101:
2248 ndr_print_ptr(ndr, "info101", r->info101);
2249 ndr->depth++;
2250 if (r->info101) {
2251 ndr_print_dfs_Info101(ndr, "info101", r->info101);
2253 ndr->depth--;
2254 break;
2256 case 102:
2257 ndr_print_ptr(ndr, "info102", r->info102);
2258 ndr->depth++;
2259 if (r->info102) {
2260 ndr_print_dfs_Info102(ndr, "info102", r->info102);
2262 ndr->depth--;
2263 break;
2265 case 103:
2266 ndr_print_ptr(ndr, "info103", r->info103);
2267 ndr->depth++;
2268 if (r->info103) {
2269 ndr_print_dfs_Info103(ndr, "info103", r->info103);
2271 ndr->depth--;
2272 break;
2274 case 104:
2275 ndr_print_ptr(ndr, "info104", r->info104);
2276 ndr->depth++;
2277 if (r->info104) {
2278 ndr_print_dfs_Info104(ndr, "info104", r->info104);
2280 ndr->depth--;
2281 break;
2283 case 105:
2284 ndr_print_ptr(ndr, "info105", r->info105);
2285 ndr->depth++;
2286 if (r->info105) {
2287 ndr_print_dfs_Info105(ndr, "info105", r->info105);
2289 ndr->depth--;
2290 break;
2292 case 106:
2293 ndr_print_ptr(ndr, "info106", r->info106);
2294 ndr->depth++;
2295 if (r->info106) {
2296 ndr_print_dfs_Info106(ndr, "info106", r->info106);
2298 ndr->depth--;
2299 break;
2301 default:
2302 ndr_print_bad_level(ndr, name, level);
2306 static enum ndr_err_code ndr_push_dfs_EnumArray1(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray1 *r)
2308 uint32_t cntr_s_1;
2309 if (ndr_flags & NDR_SCALARS) {
2310 NDR_CHECK(ndr_push_align(ndr, 5));
2311 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2312 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2313 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2315 if (ndr_flags & NDR_BUFFERS) {
2316 if (r->s) {
2317 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
2318 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2319 NDR_CHECK(ndr_push_dfs_Info1(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2321 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2322 NDR_CHECK(ndr_push_dfs_Info1(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2326 return NDR_ERR_SUCCESS;
2329 static enum ndr_err_code ndr_pull_dfs_EnumArray1(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray1 *r)
2331 uint32_t _ptr_s;
2332 uint32_t size_s_1 = 0;
2333 uint32_t cntr_s_1;
2334 TALLOC_CTX *_mem_save_s_0;
2335 TALLOC_CTX *_mem_save_s_1;
2336 if (ndr_flags & NDR_SCALARS) {
2337 NDR_CHECK(ndr_pull_align(ndr, 5));
2338 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2339 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2340 if (_ptr_s) {
2341 NDR_PULL_ALLOC(ndr, r->s);
2342 } else {
2343 r->s = NULL;
2345 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2347 if (ndr_flags & NDR_BUFFERS) {
2348 if (r->s) {
2349 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2350 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2351 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2352 size_s_1 = ndr_get_array_size(ndr, &r->s);
2353 NDR_PULL_ALLOC_N(ndr, r->s, size_s_1);
2354 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2355 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2356 for (cntr_s_1 = 0; cntr_s_1 < size_s_1; cntr_s_1++) {
2357 NDR_CHECK(ndr_pull_dfs_Info1(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2359 for (cntr_s_1 = 0; cntr_s_1 < size_s_1; cntr_s_1++) {
2360 NDR_CHECK(ndr_pull_dfs_Info1(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2362 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2363 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2365 if (r->s) {
2366 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2369 return NDR_ERR_SUCCESS;
2372 _PUBLIC_ void ndr_print_dfs_EnumArray1(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray1 *r)
2374 uint32_t cntr_s_1;
2375 ndr_print_struct(ndr, name, "dfs_EnumArray1");
2376 ndr->depth++;
2377 ndr_print_uint32(ndr, "count", r->count);
2378 ndr_print_ptr(ndr, "s", r->s);
2379 ndr->depth++;
2380 if (r->s) {
2381 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
2382 ndr->depth++;
2383 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2384 char *idx_1=NULL;
2385 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2386 ndr_print_dfs_Info1(ndr, "s", &r->s[cntr_s_1]);
2387 free(idx_1);
2390 ndr->depth--;
2392 ndr->depth--;
2393 ndr->depth--;
2396 static enum ndr_err_code ndr_push_dfs_EnumArray2(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray2 *r)
2398 uint32_t cntr_s_1;
2399 if (ndr_flags & NDR_SCALARS) {
2400 NDR_CHECK(ndr_push_align(ndr, 5));
2401 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2402 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2403 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2405 if (ndr_flags & NDR_BUFFERS) {
2406 if (r->s) {
2407 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
2408 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2409 NDR_CHECK(ndr_push_dfs_Info2(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2411 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2412 NDR_CHECK(ndr_push_dfs_Info2(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2416 return NDR_ERR_SUCCESS;
2419 static enum ndr_err_code ndr_pull_dfs_EnumArray2(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray2 *r)
2421 uint32_t _ptr_s;
2422 uint32_t size_s_1 = 0;
2423 uint32_t cntr_s_1;
2424 TALLOC_CTX *_mem_save_s_0;
2425 TALLOC_CTX *_mem_save_s_1;
2426 if (ndr_flags & NDR_SCALARS) {
2427 NDR_CHECK(ndr_pull_align(ndr, 5));
2428 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2429 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2430 if (_ptr_s) {
2431 NDR_PULL_ALLOC(ndr, r->s);
2432 } else {
2433 r->s = NULL;
2435 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2437 if (ndr_flags & NDR_BUFFERS) {
2438 if (r->s) {
2439 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2440 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2441 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2442 size_s_1 = ndr_get_array_size(ndr, &r->s);
2443 NDR_PULL_ALLOC_N(ndr, r->s, size_s_1);
2444 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2445 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2446 for (cntr_s_1 = 0; cntr_s_1 < size_s_1; cntr_s_1++) {
2447 NDR_CHECK(ndr_pull_dfs_Info2(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2449 for (cntr_s_1 = 0; cntr_s_1 < size_s_1; cntr_s_1++) {
2450 NDR_CHECK(ndr_pull_dfs_Info2(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2452 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2453 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2455 if (r->s) {
2456 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2459 return NDR_ERR_SUCCESS;
2462 _PUBLIC_ void ndr_print_dfs_EnumArray2(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray2 *r)
2464 uint32_t cntr_s_1;
2465 ndr_print_struct(ndr, name, "dfs_EnumArray2");
2466 ndr->depth++;
2467 ndr_print_uint32(ndr, "count", r->count);
2468 ndr_print_ptr(ndr, "s", r->s);
2469 ndr->depth++;
2470 if (r->s) {
2471 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
2472 ndr->depth++;
2473 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2474 char *idx_1=NULL;
2475 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2476 ndr_print_dfs_Info2(ndr, "s", &r->s[cntr_s_1]);
2477 free(idx_1);
2480 ndr->depth--;
2482 ndr->depth--;
2483 ndr->depth--;
2486 static enum ndr_err_code ndr_push_dfs_EnumArray3(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray3 *r)
2488 uint32_t cntr_s_1;
2489 if (ndr_flags & NDR_SCALARS) {
2490 NDR_CHECK(ndr_push_align(ndr, 5));
2491 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2492 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2493 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2495 if (ndr_flags & NDR_BUFFERS) {
2496 if (r->s) {
2497 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
2498 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2499 NDR_CHECK(ndr_push_dfs_Info3(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2501 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2502 NDR_CHECK(ndr_push_dfs_Info3(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2506 return NDR_ERR_SUCCESS;
2509 static enum ndr_err_code ndr_pull_dfs_EnumArray3(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray3 *r)
2511 uint32_t _ptr_s;
2512 uint32_t size_s_1 = 0;
2513 uint32_t cntr_s_1;
2514 TALLOC_CTX *_mem_save_s_0;
2515 TALLOC_CTX *_mem_save_s_1;
2516 if (ndr_flags & NDR_SCALARS) {
2517 NDR_CHECK(ndr_pull_align(ndr, 5));
2518 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2519 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2520 if (_ptr_s) {
2521 NDR_PULL_ALLOC(ndr, r->s);
2522 } else {
2523 r->s = NULL;
2525 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2527 if (ndr_flags & NDR_BUFFERS) {
2528 if (r->s) {
2529 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2530 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2531 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2532 size_s_1 = ndr_get_array_size(ndr, &r->s);
2533 NDR_PULL_ALLOC_N(ndr, r->s, size_s_1);
2534 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2535 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2536 for (cntr_s_1 = 0; cntr_s_1 < size_s_1; cntr_s_1++) {
2537 NDR_CHECK(ndr_pull_dfs_Info3(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2539 for (cntr_s_1 = 0; cntr_s_1 < size_s_1; cntr_s_1++) {
2540 NDR_CHECK(ndr_pull_dfs_Info3(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2542 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2543 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2545 if (r->s) {
2546 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2549 return NDR_ERR_SUCCESS;
2552 _PUBLIC_ void ndr_print_dfs_EnumArray3(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray3 *r)
2554 uint32_t cntr_s_1;
2555 ndr_print_struct(ndr, name, "dfs_EnumArray3");
2556 ndr->depth++;
2557 ndr_print_uint32(ndr, "count", r->count);
2558 ndr_print_ptr(ndr, "s", r->s);
2559 ndr->depth++;
2560 if (r->s) {
2561 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
2562 ndr->depth++;
2563 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2564 char *idx_1=NULL;
2565 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2566 ndr_print_dfs_Info3(ndr, "s", &r->s[cntr_s_1]);
2567 free(idx_1);
2570 ndr->depth--;
2572 ndr->depth--;
2573 ndr->depth--;
2576 static enum ndr_err_code ndr_push_dfs_EnumArray4(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray4 *r)
2578 uint32_t cntr_s_1;
2579 if (ndr_flags & NDR_SCALARS) {
2580 NDR_CHECK(ndr_push_align(ndr, 5));
2581 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2582 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2583 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2585 if (ndr_flags & NDR_BUFFERS) {
2586 if (r->s) {
2587 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
2588 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2589 NDR_CHECK(ndr_push_dfs_Info4(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2591 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2592 NDR_CHECK(ndr_push_dfs_Info4(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2596 return NDR_ERR_SUCCESS;
2599 static enum ndr_err_code ndr_pull_dfs_EnumArray4(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray4 *r)
2601 uint32_t _ptr_s;
2602 uint32_t size_s_1 = 0;
2603 uint32_t cntr_s_1;
2604 TALLOC_CTX *_mem_save_s_0;
2605 TALLOC_CTX *_mem_save_s_1;
2606 if (ndr_flags & NDR_SCALARS) {
2607 NDR_CHECK(ndr_pull_align(ndr, 5));
2608 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2609 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2610 if (_ptr_s) {
2611 NDR_PULL_ALLOC(ndr, r->s);
2612 } else {
2613 r->s = NULL;
2615 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2617 if (ndr_flags & NDR_BUFFERS) {
2618 if (r->s) {
2619 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2620 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2621 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2622 size_s_1 = ndr_get_array_size(ndr, &r->s);
2623 NDR_PULL_ALLOC_N(ndr, r->s, size_s_1);
2624 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2625 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2626 for (cntr_s_1 = 0; cntr_s_1 < size_s_1; cntr_s_1++) {
2627 NDR_CHECK(ndr_pull_dfs_Info4(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2629 for (cntr_s_1 = 0; cntr_s_1 < size_s_1; cntr_s_1++) {
2630 NDR_CHECK(ndr_pull_dfs_Info4(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2632 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2633 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2635 if (r->s) {
2636 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2639 return NDR_ERR_SUCCESS;
2642 _PUBLIC_ void ndr_print_dfs_EnumArray4(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray4 *r)
2644 uint32_t cntr_s_1;
2645 ndr_print_struct(ndr, name, "dfs_EnumArray4");
2646 ndr->depth++;
2647 ndr_print_uint32(ndr, "count", r->count);
2648 ndr_print_ptr(ndr, "s", r->s);
2649 ndr->depth++;
2650 if (r->s) {
2651 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
2652 ndr->depth++;
2653 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2654 char *idx_1=NULL;
2655 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2656 ndr_print_dfs_Info4(ndr, "s", &r->s[cntr_s_1]);
2657 free(idx_1);
2660 ndr->depth--;
2662 ndr->depth--;
2663 ndr->depth--;
2666 static enum ndr_err_code ndr_push_dfs_EnumArray5(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray5 *r)
2668 uint32_t cntr_s_1;
2669 if (ndr_flags & NDR_SCALARS) {
2670 NDR_CHECK(ndr_push_align(ndr, 5));
2671 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2672 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2673 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2675 if (ndr_flags & NDR_BUFFERS) {
2676 if (r->s) {
2677 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
2678 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2679 NDR_CHECK(ndr_push_dfs_Info5(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2681 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2682 NDR_CHECK(ndr_push_dfs_Info5(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2686 return NDR_ERR_SUCCESS;
2689 static enum ndr_err_code ndr_pull_dfs_EnumArray5(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray5 *r)
2691 uint32_t _ptr_s;
2692 uint32_t size_s_1 = 0;
2693 uint32_t cntr_s_1;
2694 TALLOC_CTX *_mem_save_s_0;
2695 TALLOC_CTX *_mem_save_s_1;
2696 if (ndr_flags & NDR_SCALARS) {
2697 NDR_CHECK(ndr_pull_align(ndr, 5));
2698 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2699 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2700 if (_ptr_s) {
2701 NDR_PULL_ALLOC(ndr, r->s);
2702 } else {
2703 r->s = NULL;
2705 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2707 if (ndr_flags & NDR_BUFFERS) {
2708 if (r->s) {
2709 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2710 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2711 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2712 size_s_1 = ndr_get_array_size(ndr, &r->s);
2713 NDR_PULL_ALLOC_N(ndr, r->s, size_s_1);
2714 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2715 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2716 for (cntr_s_1 = 0; cntr_s_1 < size_s_1; cntr_s_1++) {
2717 NDR_CHECK(ndr_pull_dfs_Info5(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2719 for (cntr_s_1 = 0; cntr_s_1 < size_s_1; cntr_s_1++) {
2720 NDR_CHECK(ndr_pull_dfs_Info5(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2722 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2723 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2725 if (r->s) {
2726 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2729 return NDR_ERR_SUCCESS;
2732 _PUBLIC_ void ndr_print_dfs_EnumArray5(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray5 *r)
2734 uint32_t cntr_s_1;
2735 ndr_print_struct(ndr, name, "dfs_EnumArray5");
2736 ndr->depth++;
2737 ndr_print_uint32(ndr, "count", r->count);
2738 ndr_print_ptr(ndr, "s", r->s);
2739 ndr->depth++;
2740 if (r->s) {
2741 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
2742 ndr->depth++;
2743 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2744 char *idx_1=NULL;
2745 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2746 ndr_print_dfs_Info5(ndr, "s", &r->s[cntr_s_1]);
2747 free(idx_1);
2750 ndr->depth--;
2752 ndr->depth--;
2753 ndr->depth--;
2756 static enum ndr_err_code ndr_push_dfs_EnumArray6(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray6 *r)
2758 uint32_t cntr_s_1;
2759 if (ndr_flags & NDR_SCALARS) {
2760 NDR_CHECK(ndr_push_align(ndr, 5));
2761 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2762 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2763 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2765 if (ndr_flags & NDR_BUFFERS) {
2766 if (r->s) {
2767 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
2768 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2769 NDR_CHECK(ndr_push_dfs_Info6(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2771 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2772 NDR_CHECK(ndr_push_dfs_Info6(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2776 return NDR_ERR_SUCCESS;
2779 static enum ndr_err_code ndr_pull_dfs_EnumArray6(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray6 *r)
2781 uint32_t _ptr_s;
2782 uint32_t size_s_1 = 0;
2783 uint32_t cntr_s_1;
2784 TALLOC_CTX *_mem_save_s_0;
2785 TALLOC_CTX *_mem_save_s_1;
2786 if (ndr_flags & NDR_SCALARS) {
2787 NDR_CHECK(ndr_pull_align(ndr, 5));
2788 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2789 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2790 if (_ptr_s) {
2791 NDR_PULL_ALLOC(ndr, r->s);
2792 } else {
2793 r->s = NULL;
2795 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2797 if (ndr_flags & NDR_BUFFERS) {
2798 if (r->s) {
2799 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2800 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2801 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2802 size_s_1 = ndr_get_array_size(ndr, &r->s);
2803 NDR_PULL_ALLOC_N(ndr, r->s, size_s_1);
2804 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2805 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2806 for (cntr_s_1 = 0; cntr_s_1 < size_s_1; cntr_s_1++) {
2807 NDR_CHECK(ndr_pull_dfs_Info6(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2809 for (cntr_s_1 = 0; cntr_s_1 < size_s_1; cntr_s_1++) {
2810 NDR_CHECK(ndr_pull_dfs_Info6(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2812 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2813 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2815 if (r->s) {
2816 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2819 return NDR_ERR_SUCCESS;
2822 _PUBLIC_ void ndr_print_dfs_EnumArray6(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray6 *r)
2824 uint32_t cntr_s_1;
2825 ndr_print_struct(ndr, name, "dfs_EnumArray6");
2826 ndr->depth++;
2827 ndr_print_uint32(ndr, "count", r->count);
2828 ndr_print_ptr(ndr, "s", r->s);
2829 ndr->depth++;
2830 if (r->s) {
2831 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
2832 ndr->depth++;
2833 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2834 char *idx_1=NULL;
2835 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2836 ndr_print_dfs_Info6(ndr, "s", &r->s[cntr_s_1]);
2837 free(idx_1);
2840 ndr->depth--;
2842 ndr->depth--;
2843 ndr->depth--;
2846 static enum ndr_err_code ndr_push_dfs_EnumArray200(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray200 *r)
2848 uint32_t cntr_s_1;
2849 if (ndr_flags & NDR_SCALARS) {
2850 NDR_CHECK(ndr_push_align(ndr, 5));
2851 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2852 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2853 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2855 if (ndr_flags & NDR_BUFFERS) {
2856 if (r->s) {
2857 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
2858 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2859 NDR_CHECK(ndr_push_dfs_Info200(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2861 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2862 NDR_CHECK(ndr_push_dfs_Info200(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2866 return NDR_ERR_SUCCESS;
2869 static enum ndr_err_code ndr_pull_dfs_EnumArray200(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray200 *r)
2871 uint32_t _ptr_s;
2872 uint32_t size_s_1 = 0;
2873 uint32_t cntr_s_1;
2874 TALLOC_CTX *_mem_save_s_0;
2875 TALLOC_CTX *_mem_save_s_1;
2876 if (ndr_flags & NDR_SCALARS) {
2877 NDR_CHECK(ndr_pull_align(ndr, 5));
2878 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2879 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2880 if (_ptr_s) {
2881 NDR_PULL_ALLOC(ndr, r->s);
2882 } else {
2883 r->s = NULL;
2885 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2887 if (ndr_flags & NDR_BUFFERS) {
2888 if (r->s) {
2889 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2890 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2891 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2892 size_s_1 = ndr_get_array_size(ndr, &r->s);
2893 NDR_PULL_ALLOC_N(ndr, r->s, size_s_1);
2894 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2895 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2896 for (cntr_s_1 = 0; cntr_s_1 < size_s_1; cntr_s_1++) {
2897 NDR_CHECK(ndr_pull_dfs_Info200(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2899 for (cntr_s_1 = 0; cntr_s_1 < size_s_1; cntr_s_1++) {
2900 NDR_CHECK(ndr_pull_dfs_Info200(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2902 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2903 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2905 if (r->s) {
2906 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2909 return NDR_ERR_SUCCESS;
2912 _PUBLIC_ void ndr_print_dfs_EnumArray200(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray200 *r)
2914 uint32_t cntr_s_1;
2915 ndr_print_struct(ndr, name, "dfs_EnumArray200");
2916 ndr->depth++;
2917 ndr_print_uint32(ndr, "count", r->count);
2918 ndr_print_ptr(ndr, "s", r->s);
2919 ndr->depth++;
2920 if (r->s) {
2921 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
2922 ndr->depth++;
2923 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2924 char *idx_1=NULL;
2925 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2926 ndr_print_dfs_Info200(ndr, "s", &r->s[cntr_s_1]);
2927 free(idx_1);
2930 ndr->depth--;
2932 ndr->depth--;
2933 ndr->depth--;
2936 static enum ndr_err_code ndr_push_dfs_EnumArray300(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray300 *r)
2938 uint32_t cntr_s_1;
2939 if (ndr_flags & NDR_SCALARS) {
2940 NDR_CHECK(ndr_push_align(ndr, 5));
2941 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2942 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2943 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2945 if (ndr_flags & NDR_BUFFERS) {
2946 if (r->s) {
2947 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
2948 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2949 NDR_CHECK(ndr_push_dfs_Info300(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2951 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2952 NDR_CHECK(ndr_push_dfs_Info300(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2956 return NDR_ERR_SUCCESS;
2959 static enum ndr_err_code ndr_pull_dfs_EnumArray300(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray300 *r)
2961 uint32_t _ptr_s;
2962 uint32_t size_s_1 = 0;
2963 uint32_t cntr_s_1;
2964 TALLOC_CTX *_mem_save_s_0;
2965 TALLOC_CTX *_mem_save_s_1;
2966 if (ndr_flags & NDR_SCALARS) {
2967 NDR_CHECK(ndr_pull_align(ndr, 5));
2968 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2969 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2970 if (_ptr_s) {
2971 NDR_PULL_ALLOC(ndr, r->s);
2972 } else {
2973 r->s = NULL;
2975 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2977 if (ndr_flags & NDR_BUFFERS) {
2978 if (r->s) {
2979 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2980 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2981 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2982 size_s_1 = ndr_get_array_size(ndr, &r->s);
2983 NDR_PULL_ALLOC_N(ndr, r->s, size_s_1);
2984 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2985 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2986 for (cntr_s_1 = 0; cntr_s_1 < size_s_1; cntr_s_1++) {
2987 NDR_CHECK(ndr_pull_dfs_Info300(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2989 for (cntr_s_1 = 0; cntr_s_1 < size_s_1; cntr_s_1++) {
2990 NDR_CHECK(ndr_pull_dfs_Info300(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2992 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2993 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2995 if (r->s) {
2996 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2999 return NDR_ERR_SUCCESS;
3002 _PUBLIC_ void ndr_print_dfs_EnumArray300(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray300 *r)
3004 uint32_t cntr_s_1;
3005 ndr_print_struct(ndr, name, "dfs_EnumArray300");
3006 ndr->depth++;
3007 ndr_print_uint32(ndr, "count", r->count);
3008 ndr_print_ptr(ndr, "s", r->s);
3009 ndr->depth++;
3010 if (r->s) {
3011 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
3012 ndr->depth++;
3013 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
3014 char *idx_1=NULL;
3015 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
3016 ndr_print_dfs_Info300(ndr, "s", &r->s[cntr_s_1]);
3017 free(idx_1);
3020 ndr->depth--;
3022 ndr->depth--;
3023 ndr->depth--;
3026 static enum ndr_err_code ndr_push_dfs_EnumInfo(struct ndr_push *ndr, int ndr_flags, const union dfs_EnumInfo *r)
3028 if (ndr_flags & NDR_SCALARS) {
3029 int level = ndr_push_get_switch_value(ndr, r);
3030 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
3031 NDR_CHECK(ndr_push_union_align(ndr, 5));
3032 switch (level) {
3033 case 1: {
3034 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
3035 break; }
3037 case 2: {
3038 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
3039 break; }
3041 case 3: {
3042 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3));
3043 break; }
3045 case 4: {
3046 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info4));
3047 break; }
3049 case 5: {
3050 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info5));
3051 break; }
3053 case 6: {
3054 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info6));
3055 break; }
3057 case 200: {
3058 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info200));
3059 break; }
3061 case 300: {
3062 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info300));
3063 break; }
3065 default:
3066 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3069 if (ndr_flags & NDR_BUFFERS) {
3070 int level = ndr_push_get_switch_value(ndr, r);
3071 switch (level) {
3072 case 1:
3073 if (r->info1) {
3074 NDR_CHECK(ndr_push_dfs_EnumArray1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
3076 break;
3078 case 2:
3079 if (r->info2) {
3080 NDR_CHECK(ndr_push_dfs_EnumArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
3082 break;
3084 case 3:
3085 if (r->info3) {
3086 NDR_CHECK(ndr_push_dfs_EnumArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
3088 break;
3090 case 4:
3091 if (r->info4) {
3092 NDR_CHECK(ndr_push_dfs_EnumArray4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
3094 break;
3096 case 5:
3097 if (r->info5) {
3098 NDR_CHECK(ndr_push_dfs_EnumArray5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5));
3100 break;
3102 case 6:
3103 if (r->info6) {
3104 NDR_CHECK(ndr_push_dfs_EnumArray6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6));
3106 break;
3108 case 200:
3109 if (r->info200) {
3110 NDR_CHECK(ndr_push_dfs_EnumArray200(ndr, NDR_SCALARS|NDR_BUFFERS, r->info200));
3112 break;
3114 case 300:
3115 if (r->info300) {
3116 NDR_CHECK(ndr_push_dfs_EnumArray300(ndr, NDR_SCALARS|NDR_BUFFERS, r->info300));
3118 break;
3120 default:
3121 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3124 return NDR_ERR_SUCCESS;
3127 static enum ndr_err_code ndr_pull_dfs_EnumInfo(struct ndr_pull *ndr, int ndr_flags, union dfs_EnumInfo *r)
3129 int level;
3130 uint32_t _level;
3131 TALLOC_CTX *_mem_save_info1_0;
3132 uint32_t _ptr_info1;
3133 TALLOC_CTX *_mem_save_info2_0;
3134 uint32_t _ptr_info2;
3135 TALLOC_CTX *_mem_save_info3_0;
3136 uint32_t _ptr_info3;
3137 TALLOC_CTX *_mem_save_info4_0;
3138 uint32_t _ptr_info4;
3139 TALLOC_CTX *_mem_save_info5_0;
3140 uint32_t _ptr_info5;
3141 TALLOC_CTX *_mem_save_info6_0;
3142 uint32_t _ptr_info6;
3143 TALLOC_CTX *_mem_save_info200_0;
3144 uint32_t _ptr_info200;
3145 TALLOC_CTX *_mem_save_info300_0;
3146 uint32_t _ptr_info300;
3147 level = ndr_pull_get_switch_value(ndr, r);
3148 if (ndr_flags & NDR_SCALARS) {
3149 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
3150 if (_level != level) {
3151 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
3153 NDR_CHECK(ndr_pull_union_align(ndr, 5));
3154 switch (level) {
3155 case 1: {
3156 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
3157 if (_ptr_info1) {
3158 NDR_PULL_ALLOC(ndr, r->info1);
3159 } else {
3160 r->info1 = NULL;
3162 break; }
3164 case 2: {
3165 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
3166 if (_ptr_info2) {
3167 NDR_PULL_ALLOC(ndr, r->info2);
3168 } else {
3169 r->info2 = NULL;
3171 break; }
3173 case 3: {
3174 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info3));
3175 if (_ptr_info3) {
3176 NDR_PULL_ALLOC(ndr, r->info3);
3177 } else {
3178 r->info3 = NULL;
3180 break; }
3182 case 4: {
3183 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info4));
3184 if (_ptr_info4) {
3185 NDR_PULL_ALLOC(ndr, r->info4);
3186 } else {
3187 r->info4 = NULL;
3189 break; }
3191 case 5: {
3192 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info5));
3193 if (_ptr_info5) {
3194 NDR_PULL_ALLOC(ndr, r->info5);
3195 } else {
3196 r->info5 = NULL;
3198 break; }
3200 case 6: {
3201 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info6));
3202 if (_ptr_info6) {
3203 NDR_PULL_ALLOC(ndr, r->info6);
3204 } else {
3205 r->info6 = NULL;
3207 break; }
3209 case 200: {
3210 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info200));
3211 if (_ptr_info200) {
3212 NDR_PULL_ALLOC(ndr, r->info200);
3213 } else {
3214 r->info200 = NULL;
3216 break; }
3218 case 300: {
3219 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info300));
3220 if (_ptr_info300) {
3221 NDR_PULL_ALLOC(ndr, r->info300);
3222 } else {
3223 r->info300 = NULL;
3225 break; }
3227 default:
3228 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3231 if (ndr_flags & NDR_BUFFERS) {
3232 switch (level) {
3233 case 1:
3234 if (r->info1) {
3235 _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
3236 NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
3237 NDR_CHECK(ndr_pull_dfs_EnumArray1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
3238 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
3240 break;
3242 case 2:
3243 if (r->info2) {
3244 _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
3245 NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
3246 NDR_CHECK(ndr_pull_dfs_EnumArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
3247 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
3249 break;
3251 case 3:
3252 if (r->info3) {
3253 _mem_save_info3_0 = NDR_PULL_GET_MEM_CTX(ndr);
3254 NDR_PULL_SET_MEM_CTX(ndr, r->info3, 0);
3255 NDR_CHECK(ndr_pull_dfs_EnumArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
3256 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info3_0, 0);
3258 break;
3260 case 4:
3261 if (r->info4) {
3262 _mem_save_info4_0 = NDR_PULL_GET_MEM_CTX(ndr);
3263 NDR_PULL_SET_MEM_CTX(ndr, r->info4, 0);
3264 NDR_CHECK(ndr_pull_dfs_EnumArray4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
3265 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info4_0, 0);
3267 break;
3269 case 5:
3270 if (r->info5) {
3271 _mem_save_info5_0 = NDR_PULL_GET_MEM_CTX(ndr);
3272 NDR_PULL_SET_MEM_CTX(ndr, r->info5, 0);
3273 NDR_CHECK(ndr_pull_dfs_EnumArray5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5));
3274 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info5_0, 0);
3276 break;
3278 case 6:
3279 if (r->info6) {
3280 _mem_save_info6_0 = NDR_PULL_GET_MEM_CTX(ndr);
3281 NDR_PULL_SET_MEM_CTX(ndr, r->info6, 0);
3282 NDR_CHECK(ndr_pull_dfs_EnumArray6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6));
3283 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info6_0, 0);
3285 break;
3287 case 200:
3288 if (r->info200) {
3289 _mem_save_info200_0 = NDR_PULL_GET_MEM_CTX(ndr);
3290 NDR_PULL_SET_MEM_CTX(ndr, r->info200, 0);
3291 NDR_CHECK(ndr_pull_dfs_EnumArray200(ndr, NDR_SCALARS|NDR_BUFFERS, r->info200));
3292 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info200_0, 0);
3294 break;
3296 case 300:
3297 if (r->info300) {
3298 _mem_save_info300_0 = NDR_PULL_GET_MEM_CTX(ndr);
3299 NDR_PULL_SET_MEM_CTX(ndr, r->info300, 0);
3300 NDR_CHECK(ndr_pull_dfs_EnumArray300(ndr, NDR_SCALARS|NDR_BUFFERS, r->info300));
3301 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info300_0, 0);
3303 break;
3305 default:
3306 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3309 return NDR_ERR_SUCCESS;
3312 _PUBLIC_ void ndr_print_dfs_EnumInfo(struct ndr_print *ndr, const char *name, const union dfs_EnumInfo *r)
3314 int level;
3315 level = ndr_print_get_switch_value(ndr, r);
3316 ndr_print_union(ndr, name, level, "dfs_EnumInfo");
3317 switch (level) {
3318 case 1:
3319 ndr_print_ptr(ndr, "info1", r->info1);
3320 ndr->depth++;
3321 if (r->info1) {
3322 ndr_print_dfs_EnumArray1(ndr, "info1", r->info1);
3324 ndr->depth--;
3325 break;
3327 case 2:
3328 ndr_print_ptr(ndr, "info2", r->info2);
3329 ndr->depth++;
3330 if (r->info2) {
3331 ndr_print_dfs_EnumArray2(ndr, "info2", r->info2);
3333 ndr->depth--;
3334 break;
3336 case 3:
3337 ndr_print_ptr(ndr, "info3", r->info3);
3338 ndr->depth++;
3339 if (r->info3) {
3340 ndr_print_dfs_EnumArray3(ndr, "info3", r->info3);
3342 ndr->depth--;
3343 break;
3345 case 4:
3346 ndr_print_ptr(ndr, "info4", r->info4);
3347 ndr->depth++;
3348 if (r->info4) {
3349 ndr_print_dfs_EnumArray4(ndr, "info4", r->info4);
3351 ndr->depth--;
3352 break;
3354 case 5:
3355 ndr_print_ptr(ndr, "info5", r->info5);
3356 ndr->depth++;
3357 if (r->info5) {
3358 ndr_print_dfs_EnumArray5(ndr, "info5", r->info5);
3360 ndr->depth--;
3361 break;
3363 case 6:
3364 ndr_print_ptr(ndr, "info6", r->info6);
3365 ndr->depth++;
3366 if (r->info6) {
3367 ndr_print_dfs_EnumArray6(ndr, "info6", r->info6);
3369 ndr->depth--;
3370 break;
3372 case 200:
3373 ndr_print_ptr(ndr, "info200", r->info200);
3374 ndr->depth++;
3375 if (r->info200) {
3376 ndr_print_dfs_EnumArray200(ndr, "info200", r->info200);
3378 ndr->depth--;
3379 break;
3381 case 300:
3382 ndr_print_ptr(ndr, "info300", r->info300);
3383 ndr->depth++;
3384 if (r->info300) {
3385 ndr_print_dfs_EnumArray300(ndr, "info300", r->info300);
3387 ndr->depth--;
3388 break;
3390 default:
3391 ndr_print_bad_level(ndr, name, level);
3395 static enum ndr_err_code ndr_push_dfs_EnumStruct(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumStruct *r)
3397 if (ndr_flags & NDR_SCALARS) {
3398 NDR_CHECK(ndr_push_align(ndr, 5));
3399 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
3400 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->e, r->level));
3401 NDR_CHECK(ndr_push_dfs_EnumInfo(ndr, NDR_SCALARS, &r->e));
3402 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3404 if (ndr_flags & NDR_BUFFERS) {
3405 NDR_CHECK(ndr_push_dfs_EnumInfo(ndr, NDR_BUFFERS, &r->e));
3407 return NDR_ERR_SUCCESS;
3410 static enum ndr_err_code ndr_pull_dfs_EnumStruct(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumStruct *r)
3412 if (ndr_flags & NDR_SCALARS) {
3413 NDR_CHECK(ndr_pull_align(ndr, 5));
3414 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
3415 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->e, r->level));
3416 NDR_CHECK(ndr_pull_dfs_EnumInfo(ndr, NDR_SCALARS, &r->e));
3417 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3419 if (ndr_flags & NDR_BUFFERS) {
3420 NDR_CHECK(ndr_pull_dfs_EnumInfo(ndr, NDR_BUFFERS, &r->e));
3422 return NDR_ERR_SUCCESS;
3425 _PUBLIC_ void ndr_print_dfs_EnumStruct(struct ndr_print *ndr, const char *name, const struct dfs_EnumStruct *r)
3427 ndr_print_struct(ndr, name, "dfs_EnumStruct");
3428 ndr->depth++;
3429 ndr_print_uint32(ndr, "level", r->level);
3430 ndr_print_set_switch_value(ndr, &r->e, r->level);
3431 ndr_print_dfs_EnumInfo(ndr, "e", &r->e);
3432 ndr->depth--;
3435 static enum ndr_err_code ndr_push_dfs_UnknownStruct(struct ndr_push *ndr, int ndr_flags, const struct dfs_UnknownStruct *r)
3437 if (ndr_flags & NDR_SCALARS) {
3438 NDR_CHECK(ndr_push_align(ndr, 5));
3439 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
3440 NDR_CHECK(ndr_push_unique_ptr(ndr, r->unknown2));
3441 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3443 if (ndr_flags & NDR_BUFFERS) {
3444 if (r->unknown2) {
3445 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->unknown2, CH_UTF16)));
3446 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3447 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->unknown2, CH_UTF16)));
3448 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->unknown2, ndr_charset_length(r->unknown2, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3451 return NDR_ERR_SUCCESS;
3454 static enum ndr_err_code ndr_pull_dfs_UnknownStruct(struct ndr_pull *ndr, int ndr_flags, struct dfs_UnknownStruct *r)
3456 uint32_t _ptr_unknown2;
3457 uint32_t size_unknown2_1 = 0;
3458 uint32_t length_unknown2_1 = 0;
3459 TALLOC_CTX *_mem_save_unknown2_0;
3460 if (ndr_flags & NDR_SCALARS) {
3461 NDR_CHECK(ndr_pull_align(ndr, 5));
3462 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
3463 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
3464 if (_ptr_unknown2) {
3465 NDR_PULL_ALLOC(ndr, r->unknown2);
3466 } else {
3467 r->unknown2 = NULL;
3469 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3471 if (ndr_flags & NDR_BUFFERS) {
3472 if (r->unknown2) {
3473 _mem_save_unknown2_0 = NDR_PULL_GET_MEM_CTX(ndr);
3474 NDR_PULL_SET_MEM_CTX(ndr, r->unknown2, 0);
3475 NDR_CHECK(ndr_pull_array_size(ndr, &r->unknown2));
3476 NDR_CHECK(ndr_pull_array_length(ndr, &r->unknown2));
3477 size_unknown2_1 = ndr_get_array_size(ndr, &r->unknown2);
3478 length_unknown2_1 = ndr_get_array_length(ndr, &r->unknown2);
3479 if (length_unknown2_1 > size_unknown2_1) {
3480 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_unknown2_1, length_unknown2_1);
3482 NDR_CHECK(ndr_check_string_terminator(ndr, length_unknown2_1, sizeof(uint16_t)));
3483 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->unknown2, length_unknown2_1, sizeof(uint16_t), CH_UTF16));
3484 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_0, 0);
3487 return NDR_ERR_SUCCESS;
3490 _PUBLIC_ void ndr_print_dfs_UnknownStruct(struct ndr_print *ndr, const char *name, const struct dfs_UnknownStruct *r)
3492 ndr_print_struct(ndr, name, "dfs_UnknownStruct");
3493 ndr->depth++;
3494 ndr_print_uint32(ndr, "unknown1", r->unknown1);
3495 ndr_print_ptr(ndr, "unknown2", r->unknown2);
3496 ndr->depth++;
3497 if (r->unknown2) {
3498 ndr_print_string(ndr, "unknown2", r->unknown2);
3500 ndr->depth--;
3501 ndr->depth--;
3504 _PUBLIC_ enum ndr_err_code ndr_push_dfs_GetManagerVersion(struct ndr_push *ndr, int flags, const struct dfs_GetManagerVersion *r)
3506 if (flags & NDR_IN) {
3508 if (flags & NDR_OUT) {
3509 if (r->out.version == NULL) {
3510 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3512 NDR_CHECK(ndr_push_dfs_ManagerVersion(ndr, NDR_SCALARS, *r->out.version));
3514 return NDR_ERR_SUCCESS;
3517 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_GetManagerVersion(struct ndr_pull *ndr, int flags, struct dfs_GetManagerVersion *r)
3519 TALLOC_CTX *_mem_save_version_0;
3520 if (flags & NDR_IN) {
3521 ZERO_STRUCT(r->out);
3523 NDR_PULL_ALLOC(ndr, r->out.version);
3524 ZERO_STRUCTP(r->out.version);
3526 if (flags & NDR_OUT) {
3527 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3528 NDR_PULL_ALLOC(ndr, r->out.version);
3530 _mem_save_version_0 = NDR_PULL_GET_MEM_CTX(ndr);
3531 NDR_PULL_SET_MEM_CTX(ndr, r->out.version, LIBNDR_FLAG_REF_ALLOC);
3532 NDR_CHECK(ndr_pull_dfs_ManagerVersion(ndr, NDR_SCALARS, r->out.version));
3533 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_version_0, LIBNDR_FLAG_REF_ALLOC);
3535 return NDR_ERR_SUCCESS;
3538 _PUBLIC_ void ndr_print_dfs_GetManagerVersion(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetManagerVersion *r)
3540 ndr_print_struct(ndr, name, "dfs_GetManagerVersion");
3541 ndr->depth++;
3542 if (flags & NDR_SET_VALUES) {
3543 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3545 if (flags & NDR_IN) {
3546 ndr_print_struct(ndr, "in", "dfs_GetManagerVersion");
3547 ndr->depth++;
3548 ndr->depth--;
3550 if (flags & NDR_OUT) {
3551 ndr_print_struct(ndr, "out", "dfs_GetManagerVersion");
3552 ndr->depth++;
3553 ndr_print_ptr(ndr, "version", r->out.version);
3554 ndr->depth++;
3555 ndr_print_dfs_ManagerVersion(ndr, "version", *r->out.version);
3556 ndr->depth--;
3557 ndr->depth--;
3559 ndr->depth--;
3562 static enum ndr_err_code ndr_push_dfs_Add(struct ndr_push *ndr, int flags, const struct dfs_Add *r)
3564 if (flags & NDR_IN) {
3565 if (r->in.path == NULL) {
3566 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3568 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
3569 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3570 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
3571 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path, ndr_charset_length(r->in.path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3572 if (r->in.server == NULL) {
3573 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3575 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
3576 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3577 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
3578 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server, ndr_charset_length(r->in.server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3579 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.share));
3580 if (r->in.share) {
3581 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
3582 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3583 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
3584 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share, ndr_charset_length(r->in.share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3586 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.comment));
3587 if (r->in.comment) {
3588 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
3589 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3590 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
3591 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.comment, ndr_charset_length(r->in.comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3593 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
3595 if (flags & NDR_OUT) {
3596 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3598 return NDR_ERR_SUCCESS;
3601 static enum ndr_err_code ndr_pull_dfs_Add(struct ndr_pull *ndr, int flags, struct dfs_Add *r)
3603 uint32_t size_path_1 = 0;
3604 uint32_t length_path_1 = 0;
3605 uint32_t size_server_1 = 0;
3606 uint32_t length_server_1 = 0;
3607 uint32_t _ptr_share;
3608 uint32_t size_share_1 = 0;
3609 uint32_t length_share_1 = 0;
3610 uint32_t _ptr_comment;
3611 uint32_t size_comment_1 = 0;
3612 uint32_t length_comment_1 = 0;
3613 TALLOC_CTX *_mem_save_share_0;
3614 TALLOC_CTX *_mem_save_comment_0;
3615 if (flags & NDR_IN) {
3616 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path));
3617 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path));
3618 size_path_1 = ndr_get_array_size(ndr, &r->in.path);
3619 length_path_1 = ndr_get_array_length(ndr, &r->in.path);
3620 if (length_path_1 > size_path_1) {
3621 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_path_1, length_path_1);
3623 NDR_CHECK(ndr_check_string_terminator(ndr, length_path_1, sizeof(uint16_t)));
3624 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path, length_path_1, sizeof(uint16_t), CH_UTF16));
3625 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server));
3626 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server));
3627 size_server_1 = ndr_get_array_size(ndr, &r->in.server);
3628 length_server_1 = ndr_get_array_length(ndr, &r->in.server);
3629 if (length_server_1 > size_server_1) {
3630 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_server_1, length_server_1);
3632 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_1, sizeof(uint16_t)));
3633 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server, length_server_1, sizeof(uint16_t), CH_UTF16));
3634 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share));
3635 if (_ptr_share) {
3636 NDR_PULL_ALLOC(ndr, r->in.share);
3637 } else {
3638 r->in.share = NULL;
3640 if (r->in.share) {
3641 _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr);
3642 NDR_PULL_SET_MEM_CTX(ndr, r->in.share, 0);
3643 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share));
3644 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share));
3645 size_share_1 = ndr_get_array_size(ndr, &r->in.share);
3646 length_share_1 = ndr_get_array_length(ndr, &r->in.share);
3647 if (length_share_1 > size_share_1) {
3648 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_share_1, length_share_1);
3650 NDR_CHECK(ndr_check_string_terminator(ndr, length_share_1, sizeof(uint16_t)));
3651 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share, length_share_1, sizeof(uint16_t), CH_UTF16));
3652 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0);
3654 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
3655 if (_ptr_comment) {
3656 NDR_PULL_ALLOC(ndr, r->in.comment);
3657 } else {
3658 r->in.comment = NULL;
3660 if (r->in.comment) {
3661 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
3662 NDR_PULL_SET_MEM_CTX(ndr, r->in.comment, 0);
3663 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.comment));
3664 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.comment));
3665 size_comment_1 = ndr_get_array_size(ndr, &r->in.comment);
3666 length_comment_1 = ndr_get_array_length(ndr, &r->in.comment);
3667 if (length_comment_1 > size_comment_1) {
3668 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_comment_1, length_comment_1);
3670 NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_1, sizeof(uint16_t)));
3671 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.comment, length_comment_1, sizeof(uint16_t), CH_UTF16));
3672 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
3674 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
3676 if (flags & NDR_OUT) {
3677 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3679 return NDR_ERR_SUCCESS;
3682 _PUBLIC_ void ndr_print_dfs_Add(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Add *r)
3684 ndr_print_struct(ndr, name, "dfs_Add");
3685 ndr->depth++;
3686 if (flags & NDR_SET_VALUES) {
3687 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3689 if (flags & NDR_IN) {
3690 ndr_print_struct(ndr, "in", "dfs_Add");
3691 ndr->depth++;
3692 ndr_print_ptr(ndr, "path", r->in.path);
3693 ndr->depth++;
3694 ndr_print_string(ndr, "path", r->in.path);
3695 ndr->depth--;
3696 ndr_print_ptr(ndr, "server", r->in.server);
3697 ndr->depth++;
3698 ndr_print_string(ndr, "server", r->in.server);
3699 ndr->depth--;
3700 ndr_print_ptr(ndr, "share", r->in.share);
3701 ndr->depth++;
3702 if (r->in.share) {
3703 ndr_print_string(ndr, "share", r->in.share);
3705 ndr->depth--;
3706 ndr_print_ptr(ndr, "comment", r->in.comment);
3707 ndr->depth++;
3708 if (r->in.comment) {
3709 ndr_print_string(ndr, "comment", r->in.comment);
3711 ndr->depth--;
3712 ndr_print_uint32(ndr, "flags", r->in.flags);
3713 ndr->depth--;
3715 if (flags & NDR_OUT) {
3716 ndr_print_struct(ndr, "out", "dfs_Add");
3717 ndr->depth++;
3718 ndr_print_WERROR(ndr, "result", r->out.result);
3719 ndr->depth--;
3721 ndr->depth--;
3724 static enum ndr_err_code ndr_push_dfs_Remove(struct ndr_push *ndr, int flags, const struct dfs_Remove *r)
3726 if (flags & NDR_IN) {
3727 if (r->in.dfs_entry_path == NULL) {
3728 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3730 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
3731 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3732 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
3733 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));
3734 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
3735 if (r->in.servername) {
3736 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
3737 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3738 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
3739 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3741 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.sharename));
3742 if (r->in.sharename) {
3743 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16)));
3744 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3745 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16)));
3746 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.sharename, ndr_charset_length(r->in.sharename, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3749 if (flags & NDR_OUT) {
3750 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3752 return NDR_ERR_SUCCESS;
3755 static enum ndr_err_code ndr_pull_dfs_Remove(struct ndr_pull *ndr, int flags, struct dfs_Remove *r)
3757 uint32_t size_dfs_entry_path_1 = 0;
3758 uint32_t length_dfs_entry_path_1 = 0;
3759 uint32_t _ptr_servername;
3760 uint32_t size_servername_1 = 0;
3761 uint32_t length_servername_1 = 0;
3762 uint32_t _ptr_sharename;
3763 uint32_t size_sharename_1 = 0;
3764 uint32_t length_sharename_1 = 0;
3765 TALLOC_CTX *_mem_save_servername_0;
3766 TALLOC_CTX *_mem_save_sharename_0;
3767 if (flags & NDR_IN) {
3768 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_entry_path));
3769 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_entry_path));
3770 size_dfs_entry_path_1 = ndr_get_array_size(ndr, &r->in.dfs_entry_path);
3771 length_dfs_entry_path_1 = ndr_get_array_length(ndr, &r->in.dfs_entry_path);
3772 if (length_dfs_entry_path_1 > size_dfs_entry_path_1) {
3773 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);
3775 NDR_CHECK(ndr_check_string_terminator(ndr, length_dfs_entry_path_1, sizeof(uint16_t)));
3776 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfs_entry_path, length_dfs_entry_path_1, sizeof(uint16_t), CH_UTF16));
3777 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
3778 if (_ptr_servername) {
3779 NDR_PULL_ALLOC(ndr, r->in.servername);
3780 } else {
3781 r->in.servername = NULL;
3783 if (r->in.servername) {
3784 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
3785 NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
3786 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
3787 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
3788 size_servername_1 = ndr_get_array_size(ndr, &r->in.servername);
3789 length_servername_1 = ndr_get_array_length(ndr, &r->in.servername);
3790 if (length_servername_1 > size_servername_1) {
3791 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_servername_1, length_servername_1);
3793 NDR_CHECK(ndr_check_string_terminator(ndr, length_servername_1, sizeof(uint16_t)));
3794 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, length_servername_1, sizeof(uint16_t), CH_UTF16));
3795 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
3797 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sharename));
3798 if (_ptr_sharename) {
3799 NDR_PULL_ALLOC(ndr, r->in.sharename);
3800 } else {
3801 r->in.sharename = NULL;
3803 if (r->in.sharename) {
3804 _mem_save_sharename_0 = NDR_PULL_GET_MEM_CTX(ndr);
3805 NDR_PULL_SET_MEM_CTX(ndr, r->in.sharename, 0);
3806 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.sharename));
3807 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.sharename));
3808 size_sharename_1 = ndr_get_array_size(ndr, &r->in.sharename);
3809 length_sharename_1 = ndr_get_array_length(ndr, &r->in.sharename);
3810 if (length_sharename_1 > size_sharename_1) {
3811 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_sharename_1, length_sharename_1);
3813 NDR_CHECK(ndr_check_string_terminator(ndr, length_sharename_1, sizeof(uint16_t)));
3814 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.sharename, length_sharename_1, sizeof(uint16_t), CH_UTF16));
3815 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sharename_0, 0);
3818 if (flags & NDR_OUT) {
3819 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3821 return NDR_ERR_SUCCESS;
3824 _PUBLIC_ void ndr_print_dfs_Remove(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Remove *r)
3826 ndr_print_struct(ndr, name, "dfs_Remove");
3827 ndr->depth++;
3828 if (flags & NDR_SET_VALUES) {
3829 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3831 if (flags & NDR_IN) {
3832 ndr_print_struct(ndr, "in", "dfs_Remove");
3833 ndr->depth++;
3834 ndr_print_ptr(ndr, "dfs_entry_path", r->in.dfs_entry_path);
3835 ndr->depth++;
3836 ndr_print_string(ndr, "dfs_entry_path", r->in.dfs_entry_path);
3837 ndr->depth--;
3838 ndr_print_ptr(ndr, "servername", r->in.servername);
3839 ndr->depth++;
3840 if (r->in.servername) {
3841 ndr_print_string(ndr, "servername", r->in.servername);
3843 ndr->depth--;
3844 ndr_print_ptr(ndr, "sharename", r->in.sharename);
3845 ndr->depth++;
3846 if (r->in.sharename) {
3847 ndr_print_string(ndr, "sharename", r->in.sharename);
3849 ndr->depth--;
3850 ndr->depth--;
3852 if (flags & NDR_OUT) {
3853 ndr_print_struct(ndr, "out", "dfs_Remove");
3854 ndr->depth++;
3855 ndr_print_WERROR(ndr, "result", r->out.result);
3856 ndr->depth--;
3858 ndr->depth--;
3861 static enum ndr_err_code ndr_push_dfs_SetInfo(struct ndr_push *ndr, int flags, const struct dfs_SetInfo *r)
3863 if (flags & NDR_IN) {
3864 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
3865 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3866 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
3867 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));
3868 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
3869 if (r->in.servername) {
3870 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
3871 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3872 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
3873 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3875 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.sharename));
3876 if (r->in.sharename) {
3877 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16)));
3878 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3879 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16)));
3880 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.sharename, ndr_charset_length(r->in.sharename, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3882 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
3883 if (r->in.info == NULL) {
3884 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3886 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
3887 NDR_CHECK(ndr_push_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
3889 if (flags & NDR_OUT) {
3890 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3892 return NDR_ERR_SUCCESS;
3895 static enum ndr_err_code ndr_pull_dfs_SetInfo(struct ndr_pull *ndr, int flags, struct dfs_SetInfo *r)
3897 uint32_t size_dfs_entry_path_0 = 0;
3898 uint32_t length_dfs_entry_path_0 = 0;
3899 uint32_t _ptr_servername;
3900 uint32_t size_servername_1 = 0;
3901 uint32_t length_servername_1 = 0;
3902 uint32_t _ptr_sharename;
3903 uint32_t size_sharename_1 = 0;
3904 uint32_t length_sharename_1 = 0;
3905 TALLOC_CTX *_mem_save_servername_0;
3906 TALLOC_CTX *_mem_save_sharename_0;
3907 TALLOC_CTX *_mem_save_info_0;
3908 if (flags & NDR_IN) {
3909 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_entry_path));
3910 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_entry_path));
3911 size_dfs_entry_path_0 = ndr_get_array_size(ndr, &r->in.dfs_entry_path);
3912 length_dfs_entry_path_0 = ndr_get_array_length(ndr, &r->in.dfs_entry_path);
3913 if (length_dfs_entry_path_0 > size_dfs_entry_path_0) {
3914 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);
3916 NDR_CHECK(ndr_check_string_terminator(ndr, length_dfs_entry_path_0, sizeof(uint16_t)));
3917 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfs_entry_path, length_dfs_entry_path_0, sizeof(uint16_t), CH_UTF16));
3918 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
3919 if (_ptr_servername) {
3920 NDR_PULL_ALLOC(ndr, r->in.servername);
3921 } else {
3922 r->in.servername = NULL;
3924 if (r->in.servername) {
3925 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
3926 NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
3927 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
3928 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
3929 size_servername_1 = ndr_get_array_size(ndr, &r->in.servername);
3930 length_servername_1 = ndr_get_array_length(ndr, &r->in.servername);
3931 if (length_servername_1 > size_servername_1) {
3932 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_servername_1, length_servername_1);
3934 NDR_CHECK(ndr_check_string_terminator(ndr, length_servername_1, sizeof(uint16_t)));
3935 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, length_servername_1, sizeof(uint16_t), CH_UTF16));
3936 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
3938 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sharename));
3939 if (_ptr_sharename) {
3940 NDR_PULL_ALLOC(ndr, r->in.sharename);
3941 } else {
3942 r->in.sharename = NULL;
3944 if (r->in.sharename) {
3945 _mem_save_sharename_0 = NDR_PULL_GET_MEM_CTX(ndr);
3946 NDR_PULL_SET_MEM_CTX(ndr, r->in.sharename, 0);
3947 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.sharename));
3948 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.sharename));
3949 size_sharename_1 = ndr_get_array_size(ndr, &r->in.sharename);
3950 length_sharename_1 = ndr_get_array_length(ndr, &r->in.sharename);
3951 if (length_sharename_1 > size_sharename_1) {
3952 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_sharename_1, length_sharename_1);
3954 NDR_CHECK(ndr_check_string_terminator(ndr, length_sharename_1, sizeof(uint16_t)));
3955 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.sharename, length_sharename_1, sizeof(uint16_t), CH_UTF16));
3956 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sharename_0, 0);
3958 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
3959 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3960 NDR_PULL_ALLOC(ndr, r->in.info);
3962 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
3963 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
3964 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
3965 NDR_CHECK(ndr_pull_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
3966 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
3968 if (flags & NDR_OUT) {
3969 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3971 return NDR_ERR_SUCCESS;
3974 _PUBLIC_ void ndr_print_dfs_SetInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetInfo *r)
3976 ndr_print_struct(ndr, name, "dfs_SetInfo");
3977 ndr->depth++;
3978 if (flags & NDR_SET_VALUES) {
3979 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3981 if (flags & NDR_IN) {
3982 ndr_print_struct(ndr, "in", "dfs_SetInfo");
3983 ndr->depth++;
3984 ndr_print_string(ndr, "dfs_entry_path", r->in.dfs_entry_path);
3985 ndr_print_ptr(ndr, "servername", r->in.servername);
3986 ndr->depth++;
3987 if (r->in.servername) {
3988 ndr_print_string(ndr, "servername", r->in.servername);
3990 ndr->depth--;
3991 ndr_print_ptr(ndr, "sharename", r->in.sharename);
3992 ndr->depth++;
3993 if (r->in.sharename) {
3994 ndr_print_string(ndr, "sharename", r->in.sharename);
3996 ndr->depth--;
3997 ndr_print_uint32(ndr, "level", r->in.level);
3998 ndr_print_ptr(ndr, "info", r->in.info);
3999 ndr->depth++;
4000 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
4001 ndr_print_dfs_Info(ndr, "info", r->in.info);
4002 ndr->depth--;
4003 ndr->depth--;
4005 if (flags & NDR_OUT) {
4006 ndr_print_struct(ndr, "out", "dfs_SetInfo");
4007 ndr->depth++;
4008 ndr_print_WERROR(ndr, "result", r->out.result);
4009 ndr->depth--;
4011 ndr->depth--;
4014 static enum ndr_err_code ndr_push_dfs_GetInfo(struct ndr_push *ndr, int flags, const struct dfs_GetInfo *r)
4016 if (flags & NDR_IN) {
4017 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
4018 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4019 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
4020 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));
4021 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
4022 if (r->in.servername) {
4023 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4024 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4025 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4026 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4028 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.sharename));
4029 if (r->in.sharename) {
4030 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16)));
4031 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4032 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16)));
4033 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.sharename, ndr_charset_length(r->in.sharename, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4035 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
4037 if (flags & NDR_OUT) {
4038 if (r->out.info == NULL) {
4039 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4041 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
4042 NDR_CHECK(ndr_push_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
4043 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4045 return NDR_ERR_SUCCESS;
4048 static enum ndr_err_code ndr_pull_dfs_GetInfo(struct ndr_pull *ndr, int flags, struct dfs_GetInfo *r)
4050 uint32_t size_dfs_entry_path_0 = 0;
4051 uint32_t length_dfs_entry_path_0 = 0;
4052 uint32_t _ptr_servername;
4053 uint32_t size_servername_1 = 0;
4054 uint32_t length_servername_1 = 0;
4055 uint32_t _ptr_sharename;
4056 uint32_t size_sharename_1 = 0;
4057 uint32_t length_sharename_1 = 0;
4058 TALLOC_CTX *_mem_save_servername_0;
4059 TALLOC_CTX *_mem_save_sharename_0;
4060 TALLOC_CTX *_mem_save_info_0;
4061 if (flags & NDR_IN) {
4062 ZERO_STRUCT(r->out);
4064 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_entry_path));
4065 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_entry_path));
4066 size_dfs_entry_path_0 = ndr_get_array_size(ndr, &r->in.dfs_entry_path);
4067 length_dfs_entry_path_0 = ndr_get_array_length(ndr, &r->in.dfs_entry_path);
4068 if (length_dfs_entry_path_0 > size_dfs_entry_path_0) {
4069 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);
4071 NDR_CHECK(ndr_check_string_terminator(ndr, length_dfs_entry_path_0, sizeof(uint16_t)));
4072 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfs_entry_path, length_dfs_entry_path_0, sizeof(uint16_t), CH_UTF16));
4073 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
4074 if (_ptr_servername) {
4075 NDR_PULL_ALLOC(ndr, r->in.servername);
4076 } else {
4077 r->in.servername = NULL;
4079 if (r->in.servername) {
4080 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
4081 NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
4082 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
4083 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
4084 size_servername_1 = ndr_get_array_size(ndr, &r->in.servername);
4085 length_servername_1 = ndr_get_array_length(ndr, &r->in.servername);
4086 if (length_servername_1 > size_servername_1) {
4087 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_servername_1, length_servername_1);
4089 NDR_CHECK(ndr_check_string_terminator(ndr, length_servername_1, sizeof(uint16_t)));
4090 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, length_servername_1, sizeof(uint16_t), CH_UTF16));
4091 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
4093 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sharename));
4094 if (_ptr_sharename) {
4095 NDR_PULL_ALLOC(ndr, r->in.sharename);
4096 } else {
4097 r->in.sharename = NULL;
4099 if (r->in.sharename) {
4100 _mem_save_sharename_0 = NDR_PULL_GET_MEM_CTX(ndr);
4101 NDR_PULL_SET_MEM_CTX(ndr, r->in.sharename, 0);
4102 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.sharename));
4103 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.sharename));
4104 size_sharename_1 = ndr_get_array_size(ndr, &r->in.sharename);
4105 length_sharename_1 = ndr_get_array_length(ndr, &r->in.sharename);
4106 if (length_sharename_1 > size_sharename_1) {
4107 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_sharename_1, length_sharename_1);
4109 NDR_CHECK(ndr_check_string_terminator(ndr, length_sharename_1, sizeof(uint16_t)));
4110 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.sharename, length_sharename_1, sizeof(uint16_t), CH_UTF16));
4111 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sharename_0, 0);
4113 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
4114 NDR_PULL_ALLOC(ndr, r->out.info);
4115 ZERO_STRUCTP(r->out.info);
4117 if (flags & NDR_OUT) {
4118 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
4119 NDR_PULL_ALLOC(ndr, r->out.info);
4121 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
4122 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
4123 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
4124 NDR_CHECK(ndr_pull_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
4125 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
4126 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4128 return NDR_ERR_SUCCESS;
4131 _PUBLIC_ void ndr_print_dfs_GetInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetInfo *r)
4133 ndr_print_struct(ndr, name, "dfs_GetInfo");
4134 ndr->depth++;
4135 if (flags & NDR_SET_VALUES) {
4136 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4138 if (flags & NDR_IN) {
4139 ndr_print_struct(ndr, "in", "dfs_GetInfo");
4140 ndr->depth++;
4141 ndr_print_string(ndr, "dfs_entry_path", r->in.dfs_entry_path);
4142 ndr_print_ptr(ndr, "servername", r->in.servername);
4143 ndr->depth++;
4144 if (r->in.servername) {
4145 ndr_print_string(ndr, "servername", r->in.servername);
4147 ndr->depth--;
4148 ndr_print_ptr(ndr, "sharename", r->in.sharename);
4149 ndr->depth++;
4150 if (r->in.sharename) {
4151 ndr_print_string(ndr, "sharename", r->in.sharename);
4153 ndr->depth--;
4154 ndr_print_uint32(ndr, "level", r->in.level);
4155 ndr->depth--;
4157 if (flags & NDR_OUT) {
4158 ndr_print_struct(ndr, "out", "dfs_GetInfo");
4159 ndr->depth++;
4160 ndr_print_ptr(ndr, "info", r->out.info);
4161 ndr->depth++;
4162 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
4163 ndr_print_dfs_Info(ndr, "info", r->out.info);
4164 ndr->depth--;
4165 ndr_print_WERROR(ndr, "result", r->out.result);
4166 ndr->depth--;
4168 ndr->depth--;
4171 static enum ndr_err_code ndr_push_dfs_Enum(struct ndr_push *ndr, int flags, const struct dfs_Enum *r)
4173 if (flags & NDR_IN) {
4174 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
4175 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bufsize));
4176 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info));
4177 if (r->in.info) {
4178 NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
4180 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.total));
4181 if (r->in.total) {
4182 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.total));
4185 if (flags & NDR_OUT) {
4186 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
4187 if (r->out.info) {
4188 NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
4190 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.total));
4191 if (r->out.total) {
4192 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.total));
4194 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4196 return NDR_ERR_SUCCESS;
4199 static enum ndr_err_code ndr_pull_dfs_Enum(struct ndr_pull *ndr, int flags, struct dfs_Enum *r)
4201 uint32_t _ptr_info;
4202 uint32_t _ptr_total;
4203 TALLOC_CTX *_mem_save_info_0;
4204 TALLOC_CTX *_mem_save_total_0;
4205 if (flags & NDR_IN) {
4206 ZERO_STRUCT(r->out);
4208 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
4209 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bufsize));
4210 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
4211 if (_ptr_info) {
4212 NDR_PULL_ALLOC(ndr, r->in.info);
4213 } else {
4214 r->in.info = NULL;
4216 if (r->in.info) {
4217 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
4218 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0);
4219 NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
4220 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
4222 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total));
4223 if (_ptr_total) {
4224 NDR_PULL_ALLOC(ndr, r->in.total);
4225 } else {
4226 r->in.total = NULL;
4228 if (r->in.total) {
4229 _mem_save_total_0 = NDR_PULL_GET_MEM_CTX(ndr);
4230 NDR_PULL_SET_MEM_CTX(ndr, r->in.total, 0);
4231 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.total));
4232 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_0, 0);
4235 if (flags & NDR_OUT) {
4236 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
4237 if (_ptr_info) {
4238 NDR_PULL_ALLOC(ndr, r->out.info);
4239 } else {
4240 r->out.info = NULL;
4242 if (r->out.info) {
4243 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
4244 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
4245 NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
4246 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
4248 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total));
4249 if (_ptr_total) {
4250 NDR_PULL_ALLOC(ndr, r->out.total);
4251 } else {
4252 r->out.total = NULL;
4254 if (r->out.total) {
4255 _mem_save_total_0 = NDR_PULL_GET_MEM_CTX(ndr);
4256 NDR_PULL_SET_MEM_CTX(ndr, r->out.total, 0);
4257 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.total));
4258 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_0, 0);
4260 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4262 return NDR_ERR_SUCCESS;
4265 _PUBLIC_ void ndr_print_dfs_Enum(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Enum *r)
4267 ndr_print_struct(ndr, name, "dfs_Enum");
4268 ndr->depth++;
4269 if (flags & NDR_SET_VALUES) {
4270 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4272 if (flags & NDR_IN) {
4273 ndr_print_struct(ndr, "in", "dfs_Enum");
4274 ndr->depth++;
4275 ndr_print_uint32(ndr, "level", r->in.level);
4276 ndr_print_uint32(ndr, "bufsize", r->in.bufsize);
4277 ndr_print_ptr(ndr, "info", r->in.info);
4278 ndr->depth++;
4279 if (r->in.info) {
4280 ndr_print_dfs_EnumStruct(ndr, "info", r->in.info);
4282 ndr->depth--;
4283 ndr_print_ptr(ndr, "total", r->in.total);
4284 ndr->depth++;
4285 if (r->in.total) {
4286 ndr_print_uint32(ndr, "total", *r->in.total);
4288 ndr->depth--;
4289 ndr->depth--;
4291 if (flags & NDR_OUT) {
4292 ndr_print_struct(ndr, "out", "dfs_Enum");
4293 ndr->depth++;
4294 ndr_print_ptr(ndr, "info", r->out.info);
4295 ndr->depth++;
4296 if (r->out.info) {
4297 ndr_print_dfs_EnumStruct(ndr, "info", r->out.info);
4299 ndr->depth--;
4300 ndr_print_ptr(ndr, "total", r->out.total);
4301 ndr->depth++;
4302 if (r->out.total) {
4303 ndr_print_uint32(ndr, "total", *r->out.total);
4305 ndr->depth--;
4306 ndr_print_WERROR(ndr, "result", r->out.result);
4307 ndr->depth--;
4309 ndr->depth--;
4312 static enum ndr_err_code ndr_push_dfs_Rename(struct ndr_push *ndr, int flags, const struct dfs_Rename *r)
4314 if (flags & NDR_IN) {
4316 if (flags & NDR_OUT) {
4317 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4319 return NDR_ERR_SUCCESS;
4322 static enum ndr_err_code ndr_pull_dfs_Rename(struct ndr_pull *ndr, int flags, struct dfs_Rename *r)
4324 if (flags & NDR_IN) {
4326 if (flags & NDR_OUT) {
4327 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4329 return NDR_ERR_SUCCESS;
4332 _PUBLIC_ void ndr_print_dfs_Rename(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Rename *r)
4334 ndr_print_struct(ndr, name, "dfs_Rename");
4335 ndr->depth++;
4336 if (flags & NDR_SET_VALUES) {
4337 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4339 if (flags & NDR_IN) {
4340 ndr_print_struct(ndr, "in", "dfs_Rename");
4341 ndr->depth++;
4342 ndr->depth--;
4344 if (flags & NDR_OUT) {
4345 ndr_print_struct(ndr, "out", "dfs_Rename");
4346 ndr->depth++;
4347 ndr_print_WERROR(ndr, "result", r->out.result);
4348 ndr->depth--;
4350 ndr->depth--;
4353 static enum ndr_err_code ndr_push_dfs_Move(struct ndr_push *ndr, int flags, const struct dfs_Move *r)
4355 if (flags & NDR_IN) {
4357 if (flags & NDR_OUT) {
4358 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4360 return NDR_ERR_SUCCESS;
4363 static enum ndr_err_code ndr_pull_dfs_Move(struct ndr_pull *ndr, int flags, struct dfs_Move *r)
4365 if (flags & NDR_IN) {
4367 if (flags & NDR_OUT) {
4368 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4370 return NDR_ERR_SUCCESS;
4373 _PUBLIC_ void ndr_print_dfs_Move(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Move *r)
4375 ndr_print_struct(ndr, name, "dfs_Move");
4376 ndr->depth++;
4377 if (flags & NDR_SET_VALUES) {
4378 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4380 if (flags & NDR_IN) {
4381 ndr_print_struct(ndr, "in", "dfs_Move");
4382 ndr->depth++;
4383 ndr->depth--;
4385 if (flags & NDR_OUT) {
4386 ndr_print_struct(ndr, "out", "dfs_Move");
4387 ndr->depth++;
4388 ndr_print_WERROR(ndr, "result", r->out.result);
4389 ndr->depth--;
4391 ndr->depth--;
4394 static enum ndr_err_code ndr_push_dfs_ManagerGetConfigInfo(struct ndr_push *ndr, int flags, const struct dfs_ManagerGetConfigInfo *r)
4396 if (flags & NDR_IN) {
4398 if (flags & NDR_OUT) {
4399 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4401 return NDR_ERR_SUCCESS;
4404 static enum ndr_err_code ndr_pull_dfs_ManagerGetConfigInfo(struct ndr_pull *ndr, int flags, struct dfs_ManagerGetConfigInfo *r)
4406 if (flags & NDR_IN) {
4408 if (flags & NDR_OUT) {
4409 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4411 return NDR_ERR_SUCCESS;
4414 _PUBLIC_ void ndr_print_dfs_ManagerGetConfigInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerGetConfigInfo *r)
4416 ndr_print_struct(ndr, name, "dfs_ManagerGetConfigInfo");
4417 ndr->depth++;
4418 if (flags & NDR_SET_VALUES) {
4419 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4421 if (flags & NDR_IN) {
4422 ndr_print_struct(ndr, "in", "dfs_ManagerGetConfigInfo");
4423 ndr->depth++;
4424 ndr->depth--;
4426 if (flags & NDR_OUT) {
4427 ndr_print_struct(ndr, "out", "dfs_ManagerGetConfigInfo");
4428 ndr->depth++;
4429 ndr_print_WERROR(ndr, "result", r->out.result);
4430 ndr->depth--;
4432 ndr->depth--;
4435 static enum ndr_err_code ndr_push_dfs_ManagerSendSiteInfo(struct ndr_push *ndr, int flags, const struct dfs_ManagerSendSiteInfo *r)
4437 if (flags & NDR_IN) {
4439 if (flags & NDR_OUT) {
4440 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4442 return NDR_ERR_SUCCESS;
4445 static enum ndr_err_code ndr_pull_dfs_ManagerSendSiteInfo(struct ndr_pull *ndr, int flags, struct dfs_ManagerSendSiteInfo *r)
4447 if (flags & NDR_IN) {
4449 if (flags & NDR_OUT) {
4450 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4452 return NDR_ERR_SUCCESS;
4455 _PUBLIC_ void ndr_print_dfs_ManagerSendSiteInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerSendSiteInfo *r)
4457 ndr_print_struct(ndr, name, "dfs_ManagerSendSiteInfo");
4458 ndr->depth++;
4459 if (flags & NDR_SET_VALUES) {
4460 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4462 if (flags & NDR_IN) {
4463 ndr_print_struct(ndr, "in", "dfs_ManagerSendSiteInfo");
4464 ndr->depth++;
4465 ndr->depth--;
4467 if (flags & NDR_OUT) {
4468 ndr_print_struct(ndr, "out", "dfs_ManagerSendSiteInfo");
4469 ndr->depth++;
4470 ndr_print_WERROR(ndr, "result", r->out.result);
4471 ndr->depth--;
4473 ndr->depth--;
4476 static enum ndr_err_code ndr_push_dfs_AddFtRoot(struct ndr_push *ndr, int flags, const struct dfs_AddFtRoot *r)
4478 if (flags & NDR_IN) {
4479 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4480 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4481 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4482 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4483 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_servername, CH_UTF16)));
4484 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4485 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_servername, CH_UTF16)));
4486 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));
4487 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfsname, CH_UTF16)));
4488 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4489 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfsname, CH_UTF16)));
4490 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dfsname, ndr_charset_length(r->in.dfsname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4491 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4492 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4493 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4494 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4495 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
4496 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4497 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
4498 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.comment, ndr_charset_length(r->in.comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4499 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_config_dn, CH_UTF16)));
4500 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4501 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_config_dn, CH_UTF16)));
4502 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));
4503 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.unknown1));
4504 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
4505 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown2));
4506 if (r->in.unknown2) {
4507 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.unknown2));
4508 if (*r->in.unknown2) {
4509 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.unknown2));
4513 if (flags & NDR_OUT) {
4514 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.unknown2));
4515 if (r->out.unknown2) {
4516 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.unknown2));
4517 if (*r->out.unknown2) {
4518 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.unknown2));
4521 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4523 return NDR_ERR_SUCCESS;
4526 static enum ndr_err_code ndr_pull_dfs_AddFtRoot(struct ndr_pull *ndr, int flags, struct dfs_AddFtRoot *r)
4528 uint32_t size_servername_0 = 0;
4529 uint32_t length_servername_0 = 0;
4530 uint32_t size_dns_servername_0 = 0;
4531 uint32_t length_dns_servername_0 = 0;
4532 uint32_t size_dfsname_0 = 0;
4533 uint32_t length_dfsname_0 = 0;
4534 uint32_t size_rootshare_0 = 0;
4535 uint32_t length_rootshare_0 = 0;
4536 uint32_t size_comment_0 = 0;
4537 uint32_t length_comment_0 = 0;
4538 uint32_t size_dfs_config_dn_0 = 0;
4539 uint32_t length_dfs_config_dn_0 = 0;
4540 uint32_t _ptr_unknown2;
4541 TALLOC_CTX *_mem_save_unknown2_0;
4542 TALLOC_CTX *_mem_save_unknown2_1;
4543 if (flags & NDR_IN) {
4544 ZERO_STRUCT(r->out);
4546 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
4547 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
4548 size_servername_0 = ndr_get_array_size(ndr, &r->in.servername);
4549 length_servername_0 = ndr_get_array_length(ndr, &r->in.servername);
4550 if (length_servername_0 > size_servername_0) {
4551 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_servername_0, length_servername_0);
4553 NDR_CHECK(ndr_check_string_terminator(ndr, length_servername_0, sizeof(uint16_t)));
4554 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, length_servername_0, sizeof(uint16_t), CH_UTF16));
4555 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dns_servername));
4556 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dns_servername));
4557 size_dns_servername_0 = ndr_get_array_size(ndr, &r->in.dns_servername);
4558 length_dns_servername_0 = ndr_get_array_length(ndr, &r->in.dns_servername);
4559 if (length_dns_servername_0 > size_dns_servername_0) {
4560 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);
4562 NDR_CHECK(ndr_check_string_terminator(ndr, length_dns_servername_0, sizeof(uint16_t)));
4563 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dns_servername, length_dns_servername_0, sizeof(uint16_t), CH_UTF16));
4564 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfsname));
4565 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfsname));
4566 size_dfsname_0 = ndr_get_array_size(ndr, &r->in.dfsname);
4567 length_dfsname_0 = ndr_get_array_length(ndr, &r->in.dfsname);
4568 if (length_dfsname_0 > size_dfsname_0) {
4569 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_dfsname_0, length_dfsname_0);
4571 NDR_CHECK(ndr_check_string_terminator(ndr, length_dfsname_0, sizeof(uint16_t)));
4572 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfsname, length_dfsname_0, sizeof(uint16_t), CH_UTF16));
4573 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
4574 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
4575 size_rootshare_0 = ndr_get_array_size(ndr, &r->in.rootshare);
4576 length_rootshare_0 = ndr_get_array_length(ndr, &r->in.rootshare);
4577 if (length_rootshare_0 > size_rootshare_0) {
4578 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_rootshare_0, length_rootshare_0);
4580 NDR_CHECK(ndr_check_string_terminator(ndr, length_rootshare_0, sizeof(uint16_t)));
4581 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, length_rootshare_0, sizeof(uint16_t), CH_UTF16));
4582 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.comment));
4583 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.comment));
4584 size_comment_0 = ndr_get_array_size(ndr, &r->in.comment);
4585 length_comment_0 = ndr_get_array_length(ndr, &r->in.comment);
4586 if (length_comment_0 > size_comment_0) {
4587 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_comment_0, length_comment_0);
4589 NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_0, sizeof(uint16_t)));
4590 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.comment, length_comment_0, sizeof(uint16_t), CH_UTF16));
4591 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_config_dn));
4592 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_config_dn));
4593 size_dfs_config_dn_0 = ndr_get_array_size(ndr, &r->in.dfs_config_dn);
4594 length_dfs_config_dn_0 = ndr_get_array_length(ndr, &r->in.dfs_config_dn);
4595 if (length_dfs_config_dn_0 > size_dfs_config_dn_0) {
4596 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);
4598 NDR_CHECK(ndr_check_string_terminator(ndr, length_dfs_config_dn_0, sizeof(uint16_t)));
4599 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfs_config_dn, length_dfs_config_dn_0, sizeof(uint16_t), CH_UTF16));
4600 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.unknown1));
4601 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
4602 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
4603 if (_ptr_unknown2) {
4604 NDR_PULL_ALLOC(ndr, r->in.unknown2);
4605 } else {
4606 r->in.unknown2 = NULL;
4608 if (r->in.unknown2) {
4609 _mem_save_unknown2_0 = NDR_PULL_GET_MEM_CTX(ndr);
4610 NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown2, 0);
4611 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
4612 if (_ptr_unknown2) {
4613 NDR_PULL_ALLOC(ndr, *r->in.unknown2);
4614 } else {
4615 *r->in.unknown2 = NULL;
4617 if (*r->in.unknown2) {
4618 _mem_save_unknown2_1 = NDR_PULL_GET_MEM_CTX(ndr);
4619 NDR_PULL_SET_MEM_CTX(ndr, *r->in.unknown2, 0);
4620 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.unknown2));
4621 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_1, 0);
4623 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_0, 0);
4626 if (flags & NDR_OUT) {
4627 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
4628 if (_ptr_unknown2) {
4629 NDR_PULL_ALLOC(ndr, r->out.unknown2);
4630 } else {
4631 r->out.unknown2 = NULL;
4633 if (r->out.unknown2) {
4634 _mem_save_unknown2_0 = NDR_PULL_GET_MEM_CTX(ndr);
4635 NDR_PULL_SET_MEM_CTX(ndr, r->out.unknown2, 0);
4636 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
4637 if (_ptr_unknown2) {
4638 NDR_PULL_ALLOC(ndr, *r->out.unknown2);
4639 } else {
4640 *r->out.unknown2 = NULL;
4642 if (*r->out.unknown2) {
4643 _mem_save_unknown2_1 = NDR_PULL_GET_MEM_CTX(ndr);
4644 NDR_PULL_SET_MEM_CTX(ndr, *r->out.unknown2, 0);
4645 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.unknown2));
4646 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_1, 0);
4648 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_0, 0);
4650 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4652 return NDR_ERR_SUCCESS;
4655 _PUBLIC_ void ndr_print_dfs_AddFtRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddFtRoot *r)
4657 ndr_print_struct(ndr, name, "dfs_AddFtRoot");
4658 ndr->depth++;
4659 if (flags & NDR_SET_VALUES) {
4660 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4662 if (flags & NDR_IN) {
4663 ndr_print_struct(ndr, "in", "dfs_AddFtRoot");
4664 ndr->depth++;
4665 ndr_print_string(ndr, "servername", r->in.servername);
4666 ndr_print_string(ndr, "dns_servername", r->in.dns_servername);
4667 ndr_print_string(ndr, "dfsname", r->in.dfsname);
4668 ndr_print_string(ndr, "rootshare", r->in.rootshare);
4669 ndr_print_string(ndr, "comment", r->in.comment);
4670 ndr_print_string(ndr, "dfs_config_dn", r->in.dfs_config_dn);
4671 ndr_print_uint8(ndr, "unknown1", r->in.unknown1);
4672 ndr_print_uint32(ndr, "flags", r->in.flags);
4673 ndr_print_ptr(ndr, "unknown2", r->in.unknown2);
4674 ndr->depth++;
4675 if (r->in.unknown2) {
4676 ndr_print_ptr(ndr, "unknown2", *r->in.unknown2);
4677 ndr->depth++;
4678 if (*r->in.unknown2) {
4679 ndr_print_dfs_UnknownStruct(ndr, "unknown2", *r->in.unknown2);
4681 ndr->depth--;
4683 ndr->depth--;
4684 ndr->depth--;
4686 if (flags & NDR_OUT) {
4687 ndr_print_struct(ndr, "out", "dfs_AddFtRoot");
4688 ndr->depth++;
4689 ndr_print_ptr(ndr, "unknown2", r->out.unknown2);
4690 ndr->depth++;
4691 if (r->out.unknown2) {
4692 ndr_print_ptr(ndr, "unknown2", *r->out.unknown2);
4693 ndr->depth++;
4694 if (*r->out.unknown2) {
4695 ndr_print_dfs_UnknownStruct(ndr, "unknown2", *r->out.unknown2);
4697 ndr->depth--;
4699 ndr->depth--;
4700 ndr_print_WERROR(ndr, "result", r->out.result);
4701 ndr->depth--;
4703 ndr->depth--;
4706 static enum ndr_err_code ndr_push_dfs_RemoveFtRoot(struct ndr_push *ndr, int flags, const struct dfs_RemoveFtRoot *r)
4708 if (flags & NDR_IN) {
4709 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4710 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4711 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4712 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4713 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_servername, CH_UTF16)));
4714 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4715 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_servername, CH_UTF16)));
4716 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));
4717 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfsname, CH_UTF16)));
4718 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4719 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfsname, CH_UTF16)));
4720 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dfsname, ndr_charset_length(r->in.dfsname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4721 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4722 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4723 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4724 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4725 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
4726 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown));
4727 if (r->in.unknown) {
4728 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.unknown));
4729 if (*r->in.unknown) {
4730 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.unknown));
4734 if (flags & NDR_OUT) {
4735 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.unknown));
4736 if (r->out.unknown) {
4737 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.unknown));
4738 if (*r->out.unknown) {
4739 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.unknown));
4742 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4744 return NDR_ERR_SUCCESS;
4747 static enum ndr_err_code ndr_pull_dfs_RemoveFtRoot(struct ndr_pull *ndr, int flags, struct dfs_RemoveFtRoot *r)
4749 uint32_t size_servername_0 = 0;
4750 uint32_t length_servername_0 = 0;
4751 uint32_t size_dns_servername_0 = 0;
4752 uint32_t length_dns_servername_0 = 0;
4753 uint32_t size_dfsname_0 = 0;
4754 uint32_t length_dfsname_0 = 0;
4755 uint32_t size_rootshare_0 = 0;
4756 uint32_t length_rootshare_0 = 0;
4757 uint32_t _ptr_unknown;
4758 TALLOC_CTX *_mem_save_unknown_0;
4759 TALLOC_CTX *_mem_save_unknown_1;
4760 if (flags & NDR_IN) {
4761 ZERO_STRUCT(r->out);
4763 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
4764 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
4765 size_servername_0 = ndr_get_array_size(ndr, &r->in.servername);
4766 length_servername_0 = ndr_get_array_length(ndr, &r->in.servername);
4767 if (length_servername_0 > size_servername_0) {
4768 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_servername_0, length_servername_0);
4770 NDR_CHECK(ndr_check_string_terminator(ndr, length_servername_0, sizeof(uint16_t)));
4771 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, length_servername_0, sizeof(uint16_t), CH_UTF16));
4772 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dns_servername));
4773 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dns_servername));
4774 size_dns_servername_0 = ndr_get_array_size(ndr, &r->in.dns_servername);
4775 length_dns_servername_0 = ndr_get_array_length(ndr, &r->in.dns_servername);
4776 if (length_dns_servername_0 > size_dns_servername_0) {
4777 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);
4779 NDR_CHECK(ndr_check_string_terminator(ndr, length_dns_servername_0, sizeof(uint16_t)));
4780 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dns_servername, length_dns_servername_0, sizeof(uint16_t), CH_UTF16));
4781 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfsname));
4782 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfsname));
4783 size_dfsname_0 = ndr_get_array_size(ndr, &r->in.dfsname);
4784 length_dfsname_0 = ndr_get_array_length(ndr, &r->in.dfsname);
4785 if (length_dfsname_0 > size_dfsname_0) {
4786 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_dfsname_0, length_dfsname_0);
4788 NDR_CHECK(ndr_check_string_terminator(ndr, length_dfsname_0, sizeof(uint16_t)));
4789 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfsname, length_dfsname_0, sizeof(uint16_t), CH_UTF16));
4790 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
4791 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
4792 size_rootshare_0 = ndr_get_array_size(ndr, &r->in.rootshare);
4793 length_rootshare_0 = ndr_get_array_length(ndr, &r->in.rootshare);
4794 if (length_rootshare_0 > size_rootshare_0) {
4795 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_rootshare_0, length_rootshare_0);
4797 NDR_CHECK(ndr_check_string_terminator(ndr, length_rootshare_0, sizeof(uint16_t)));
4798 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, length_rootshare_0, sizeof(uint16_t), CH_UTF16));
4799 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
4800 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown));
4801 if (_ptr_unknown) {
4802 NDR_PULL_ALLOC(ndr, r->in.unknown);
4803 } else {
4804 r->in.unknown = NULL;
4806 if (r->in.unknown) {
4807 _mem_save_unknown_0 = NDR_PULL_GET_MEM_CTX(ndr);
4808 NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown, 0);
4809 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown));
4810 if (_ptr_unknown) {
4811 NDR_PULL_ALLOC(ndr, *r->in.unknown);
4812 } else {
4813 *r->in.unknown = NULL;
4815 if (*r->in.unknown) {
4816 _mem_save_unknown_1 = NDR_PULL_GET_MEM_CTX(ndr);
4817 NDR_PULL_SET_MEM_CTX(ndr, *r->in.unknown, 0);
4818 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.unknown));
4819 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_1, 0);
4821 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_0, 0);
4824 if (flags & NDR_OUT) {
4825 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown));
4826 if (_ptr_unknown) {
4827 NDR_PULL_ALLOC(ndr, r->out.unknown);
4828 } else {
4829 r->out.unknown = NULL;
4831 if (r->out.unknown) {
4832 _mem_save_unknown_0 = NDR_PULL_GET_MEM_CTX(ndr);
4833 NDR_PULL_SET_MEM_CTX(ndr, r->out.unknown, 0);
4834 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown));
4835 if (_ptr_unknown) {
4836 NDR_PULL_ALLOC(ndr, *r->out.unknown);
4837 } else {
4838 *r->out.unknown = NULL;
4840 if (*r->out.unknown) {
4841 _mem_save_unknown_1 = NDR_PULL_GET_MEM_CTX(ndr);
4842 NDR_PULL_SET_MEM_CTX(ndr, *r->out.unknown, 0);
4843 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.unknown));
4844 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_1, 0);
4846 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_0, 0);
4848 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4850 return NDR_ERR_SUCCESS;
4853 _PUBLIC_ void ndr_print_dfs_RemoveFtRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_RemoveFtRoot *r)
4855 ndr_print_struct(ndr, name, "dfs_RemoveFtRoot");
4856 ndr->depth++;
4857 if (flags & NDR_SET_VALUES) {
4858 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4860 if (flags & NDR_IN) {
4861 ndr_print_struct(ndr, "in", "dfs_RemoveFtRoot");
4862 ndr->depth++;
4863 ndr_print_string(ndr, "servername", r->in.servername);
4864 ndr_print_string(ndr, "dns_servername", r->in.dns_servername);
4865 ndr_print_string(ndr, "dfsname", r->in.dfsname);
4866 ndr_print_string(ndr, "rootshare", r->in.rootshare);
4867 ndr_print_uint32(ndr, "flags", r->in.flags);
4868 ndr_print_ptr(ndr, "unknown", r->in.unknown);
4869 ndr->depth++;
4870 if (r->in.unknown) {
4871 ndr_print_ptr(ndr, "unknown", *r->in.unknown);
4872 ndr->depth++;
4873 if (*r->in.unknown) {
4874 ndr_print_dfs_UnknownStruct(ndr, "unknown", *r->in.unknown);
4876 ndr->depth--;
4878 ndr->depth--;
4879 ndr->depth--;
4881 if (flags & NDR_OUT) {
4882 ndr_print_struct(ndr, "out", "dfs_RemoveFtRoot");
4883 ndr->depth++;
4884 ndr_print_ptr(ndr, "unknown", r->out.unknown);
4885 ndr->depth++;
4886 if (r->out.unknown) {
4887 ndr_print_ptr(ndr, "unknown", *r->out.unknown);
4888 ndr->depth++;
4889 if (*r->out.unknown) {
4890 ndr_print_dfs_UnknownStruct(ndr, "unknown", *r->out.unknown);
4892 ndr->depth--;
4894 ndr->depth--;
4895 ndr_print_WERROR(ndr, "result", r->out.result);
4896 ndr->depth--;
4898 ndr->depth--;
4901 static enum ndr_err_code ndr_push_dfs_AddStdRoot(struct ndr_push *ndr, int flags, const struct dfs_AddStdRoot *r)
4903 if (flags & NDR_IN) {
4904 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4905 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4906 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4907 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4908 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4909 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4910 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4911 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4912 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
4913 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4914 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
4915 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.comment, ndr_charset_length(r->in.comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4916 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
4918 if (flags & NDR_OUT) {
4919 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4921 return NDR_ERR_SUCCESS;
4924 static enum ndr_err_code ndr_pull_dfs_AddStdRoot(struct ndr_pull *ndr, int flags, struct dfs_AddStdRoot *r)
4926 uint32_t size_servername_0 = 0;
4927 uint32_t length_servername_0 = 0;
4928 uint32_t size_rootshare_0 = 0;
4929 uint32_t length_rootshare_0 = 0;
4930 uint32_t size_comment_0 = 0;
4931 uint32_t length_comment_0 = 0;
4932 if (flags & NDR_IN) {
4933 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
4934 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
4935 size_servername_0 = ndr_get_array_size(ndr, &r->in.servername);
4936 length_servername_0 = ndr_get_array_length(ndr, &r->in.servername);
4937 if (length_servername_0 > size_servername_0) {
4938 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_servername_0, length_servername_0);
4940 NDR_CHECK(ndr_check_string_terminator(ndr, length_servername_0, sizeof(uint16_t)));
4941 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, length_servername_0, sizeof(uint16_t), CH_UTF16));
4942 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
4943 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
4944 size_rootshare_0 = ndr_get_array_size(ndr, &r->in.rootshare);
4945 length_rootshare_0 = ndr_get_array_length(ndr, &r->in.rootshare);
4946 if (length_rootshare_0 > size_rootshare_0) {
4947 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_rootshare_0, length_rootshare_0);
4949 NDR_CHECK(ndr_check_string_terminator(ndr, length_rootshare_0, sizeof(uint16_t)));
4950 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, length_rootshare_0, sizeof(uint16_t), CH_UTF16));
4951 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.comment));
4952 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.comment));
4953 size_comment_0 = ndr_get_array_size(ndr, &r->in.comment);
4954 length_comment_0 = ndr_get_array_length(ndr, &r->in.comment);
4955 if (length_comment_0 > size_comment_0) {
4956 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_comment_0, length_comment_0);
4958 NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_0, sizeof(uint16_t)));
4959 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.comment, length_comment_0, sizeof(uint16_t), CH_UTF16));
4960 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
4962 if (flags & NDR_OUT) {
4963 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4965 return NDR_ERR_SUCCESS;
4968 _PUBLIC_ void ndr_print_dfs_AddStdRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddStdRoot *r)
4970 ndr_print_struct(ndr, name, "dfs_AddStdRoot");
4971 ndr->depth++;
4972 if (flags & NDR_SET_VALUES) {
4973 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4975 if (flags & NDR_IN) {
4976 ndr_print_struct(ndr, "in", "dfs_AddStdRoot");
4977 ndr->depth++;
4978 ndr_print_string(ndr, "servername", r->in.servername);
4979 ndr_print_string(ndr, "rootshare", r->in.rootshare);
4980 ndr_print_string(ndr, "comment", r->in.comment);
4981 ndr_print_uint32(ndr, "flags", r->in.flags);
4982 ndr->depth--;
4984 if (flags & NDR_OUT) {
4985 ndr_print_struct(ndr, "out", "dfs_AddStdRoot");
4986 ndr->depth++;
4987 ndr_print_WERROR(ndr, "result", r->out.result);
4988 ndr->depth--;
4990 ndr->depth--;
4993 static enum ndr_err_code ndr_push_dfs_RemoveStdRoot(struct ndr_push *ndr, int flags, const struct dfs_RemoveStdRoot *r)
4995 if (flags & NDR_IN) {
4996 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4997 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4998 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4999 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5000 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
5001 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5002 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
5003 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5004 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
5006 if (flags & NDR_OUT) {
5007 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5009 return NDR_ERR_SUCCESS;
5012 static enum ndr_err_code ndr_pull_dfs_RemoveStdRoot(struct ndr_pull *ndr, int flags, struct dfs_RemoveStdRoot *r)
5014 uint32_t size_servername_0 = 0;
5015 uint32_t length_servername_0 = 0;
5016 uint32_t size_rootshare_0 = 0;
5017 uint32_t length_rootshare_0 = 0;
5018 if (flags & NDR_IN) {
5019 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
5020 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
5021 size_servername_0 = ndr_get_array_size(ndr, &r->in.servername);
5022 length_servername_0 = ndr_get_array_length(ndr, &r->in.servername);
5023 if (length_servername_0 > size_servername_0) {
5024 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_servername_0, length_servername_0);
5026 NDR_CHECK(ndr_check_string_terminator(ndr, length_servername_0, sizeof(uint16_t)));
5027 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, length_servername_0, sizeof(uint16_t), CH_UTF16));
5028 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
5029 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
5030 size_rootshare_0 = ndr_get_array_size(ndr, &r->in.rootshare);
5031 length_rootshare_0 = ndr_get_array_length(ndr, &r->in.rootshare);
5032 if (length_rootshare_0 > size_rootshare_0) {
5033 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_rootshare_0, length_rootshare_0);
5035 NDR_CHECK(ndr_check_string_terminator(ndr, length_rootshare_0, sizeof(uint16_t)));
5036 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, length_rootshare_0, 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_RemoveStdRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_RemoveStdRoot *r)
5047 ndr_print_struct(ndr, name, "dfs_RemoveStdRoot");
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_RemoveStdRoot");
5054 ndr->depth++;
5055 ndr_print_string(ndr, "servername", r->in.servername);
5056 ndr_print_string(ndr, "rootshare", r->in.rootshare);
5057 ndr_print_uint32(ndr, "flags", r->in.flags);
5058 ndr->depth--;
5060 if (flags & NDR_OUT) {
5061 ndr_print_struct(ndr, "out", "dfs_RemoveStdRoot");
5062 ndr->depth++;
5063 ndr_print_WERROR(ndr, "result", r->out.result);
5064 ndr->depth--;
5066 ndr->depth--;
5069 static enum ndr_err_code ndr_push_dfs_ManagerInitialize(struct ndr_push *ndr, int flags, const struct dfs_ManagerInitialize *r)
5071 if (flags & NDR_IN) {
5072 if (r->in.servername == NULL) {
5073 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5075 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
5076 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5077 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
5078 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5079 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
5081 if (flags & NDR_OUT) {
5082 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5084 return NDR_ERR_SUCCESS;
5087 static enum ndr_err_code ndr_pull_dfs_ManagerInitialize(struct ndr_pull *ndr, int flags, struct dfs_ManagerInitialize *r)
5089 uint32_t size_servername_1 = 0;
5090 uint32_t length_servername_1 = 0;
5091 if (flags & NDR_IN) {
5092 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
5093 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
5094 size_servername_1 = ndr_get_array_size(ndr, &r->in.servername);
5095 length_servername_1 = ndr_get_array_length(ndr, &r->in.servername);
5096 if (length_servername_1 > size_servername_1) {
5097 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_servername_1, length_servername_1);
5099 NDR_CHECK(ndr_check_string_terminator(ndr, length_servername_1, sizeof(uint16_t)));
5100 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, length_servername_1, sizeof(uint16_t), CH_UTF16));
5101 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
5103 if (flags & NDR_OUT) {
5104 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5106 return NDR_ERR_SUCCESS;
5109 _PUBLIC_ void ndr_print_dfs_ManagerInitialize(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerInitialize *r)
5111 ndr_print_struct(ndr, name, "dfs_ManagerInitialize");
5112 ndr->depth++;
5113 if (flags & NDR_SET_VALUES) {
5114 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5116 if (flags & NDR_IN) {
5117 ndr_print_struct(ndr, "in", "dfs_ManagerInitialize");
5118 ndr->depth++;
5119 ndr_print_ptr(ndr, "servername", r->in.servername);
5120 ndr->depth++;
5121 ndr_print_string(ndr, "servername", r->in.servername);
5122 ndr->depth--;
5123 ndr_print_uint32(ndr, "flags", r->in.flags);
5124 ndr->depth--;
5126 if (flags & NDR_OUT) {
5127 ndr_print_struct(ndr, "out", "dfs_ManagerInitialize");
5128 ndr->depth++;
5129 ndr_print_WERROR(ndr, "result", r->out.result);
5130 ndr->depth--;
5132 ndr->depth--;
5135 static enum ndr_err_code ndr_push_dfs_AddStdRootForced(struct ndr_push *ndr, int flags, const struct dfs_AddStdRootForced *r)
5137 if (flags & NDR_IN) {
5138 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
5139 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5140 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
5141 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5142 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
5143 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5144 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
5145 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5146 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
5147 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5148 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
5149 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.comment, ndr_charset_length(r->in.comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5150 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.store, CH_UTF16)));
5151 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5152 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.store, CH_UTF16)));
5153 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.store, ndr_charset_length(r->in.store, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5155 if (flags & NDR_OUT) {
5156 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5158 return NDR_ERR_SUCCESS;
5161 static enum ndr_err_code ndr_pull_dfs_AddStdRootForced(struct ndr_pull *ndr, int flags, struct dfs_AddStdRootForced *r)
5163 uint32_t size_servername_0 = 0;
5164 uint32_t length_servername_0 = 0;
5165 uint32_t size_rootshare_0 = 0;
5166 uint32_t length_rootshare_0 = 0;
5167 uint32_t size_comment_0 = 0;
5168 uint32_t length_comment_0 = 0;
5169 uint32_t size_store_0 = 0;
5170 uint32_t length_store_0 = 0;
5171 if (flags & NDR_IN) {
5172 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
5173 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
5174 size_servername_0 = ndr_get_array_size(ndr, &r->in.servername);
5175 length_servername_0 = ndr_get_array_length(ndr, &r->in.servername);
5176 if (length_servername_0 > size_servername_0) {
5177 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_servername_0, length_servername_0);
5179 NDR_CHECK(ndr_check_string_terminator(ndr, length_servername_0, sizeof(uint16_t)));
5180 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, length_servername_0, sizeof(uint16_t), CH_UTF16));
5181 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
5182 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
5183 size_rootshare_0 = ndr_get_array_size(ndr, &r->in.rootshare);
5184 length_rootshare_0 = ndr_get_array_length(ndr, &r->in.rootshare);
5185 if (length_rootshare_0 > size_rootshare_0) {
5186 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_rootshare_0, length_rootshare_0);
5188 NDR_CHECK(ndr_check_string_terminator(ndr, length_rootshare_0, sizeof(uint16_t)));
5189 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, length_rootshare_0, sizeof(uint16_t), CH_UTF16));
5190 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.comment));
5191 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.comment));
5192 size_comment_0 = ndr_get_array_size(ndr, &r->in.comment);
5193 length_comment_0 = ndr_get_array_length(ndr, &r->in.comment);
5194 if (length_comment_0 > size_comment_0) {
5195 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_comment_0, length_comment_0);
5197 NDR_CHECK(ndr_check_string_terminator(ndr, length_comment_0, sizeof(uint16_t)));
5198 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.comment, length_comment_0, sizeof(uint16_t), CH_UTF16));
5199 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.store));
5200 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.store));
5201 size_store_0 = ndr_get_array_size(ndr, &r->in.store);
5202 length_store_0 = ndr_get_array_length(ndr, &r->in.store);
5203 if (length_store_0 > size_store_0) {
5204 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_store_0, length_store_0);
5206 NDR_CHECK(ndr_check_string_terminator(ndr, length_store_0, sizeof(uint16_t)));
5207 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.store, length_store_0, sizeof(uint16_t), CH_UTF16));
5209 if (flags & NDR_OUT) {
5210 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5212 return NDR_ERR_SUCCESS;
5215 _PUBLIC_ void ndr_print_dfs_AddStdRootForced(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddStdRootForced *r)
5217 ndr_print_struct(ndr, name, "dfs_AddStdRootForced");
5218 ndr->depth++;
5219 if (flags & NDR_SET_VALUES) {
5220 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5222 if (flags & NDR_IN) {
5223 ndr_print_struct(ndr, "in", "dfs_AddStdRootForced");
5224 ndr->depth++;
5225 ndr_print_string(ndr, "servername", r->in.servername);
5226 ndr_print_string(ndr, "rootshare", r->in.rootshare);
5227 ndr_print_string(ndr, "comment", r->in.comment);
5228 ndr_print_string(ndr, "store", r->in.store);
5229 ndr->depth--;
5231 if (flags & NDR_OUT) {
5232 ndr_print_struct(ndr, "out", "dfs_AddStdRootForced");
5233 ndr->depth++;
5234 ndr_print_WERROR(ndr, "result", r->out.result);
5235 ndr->depth--;
5237 ndr->depth--;
5240 static enum ndr_err_code ndr_push_dfs_GetDcAddress(struct ndr_push *ndr, int flags, const struct dfs_GetDcAddress *r)
5242 if (flags & NDR_IN) {
5243 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
5244 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5245 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
5246 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5247 if (r->in.server_fullname == NULL) {
5248 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5250 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.server_fullname));
5251 if (*r->in.server_fullname) {
5252 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->in.server_fullname, CH_UTF16)));
5253 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5254 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->in.server_fullname, CH_UTF16)));
5255 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));
5257 if (r->in.is_root == NULL) {
5258 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5260 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->in.is_root));
5261 if (r->in.ttl == NULL) {
5262 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5264 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.ttl));
5266 if (flags & NDR_OUT) {
5267 if (r->out.server_fullname == NULL) {
5268 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5270 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.server_fullname));
5271 if (*r->out.server_fullname) {
5272 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.server_fullname, CH_UTF16)));
5273 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5274 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.server_fullname, CH_UTF16)));
5275 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));
5277 if (r->out.is_root == NULL) {
5278 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5280 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->out.is_root));
5281 if (r->out.ttl == NULL) {
5282 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5284 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.ttl));
5285 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5287 return NDR_ERR_SUCCESS;
5290 static enum ndr_err_code ndr_pull_dfs_GetDcAddress(struct ndr_pull *ndr, int flags, struct dfs_GetDcAddress *r)
5292 uint32_t size_servername_0 = 0;
5293 uint32_t length_servername_0 = 0;
5294 uint32_t _ptr_server_fullname;
5295 uint32_t size_server_fullname_2 = 0;
5296 uint32_t length_server_fullname_2 = 0;
5297 TALLOC_CTX *_mem_save_server_fullname_0;
5298 TALLOC_CTX *_mem_save_server_fullname_1;
5299 TALLOC_CTX *_mem_save_is_root_0;
5300 TALLOC_CTX *_mem_save_ttl_0;
5301 if (flags & NDR_IN) {
5302 ZERO_STRUCT(r->out);
5304 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
5305 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
5306 size_servername_0 = ndr_get_array_size(ndr, &r->in.servername);
5307 length_servername_0 = ndr_get_array_length(ndr, &r->in.servername);
5308 if (length_servername_0 > size_servername_0) {
5309 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_servername_0, length_servername_0);
5311 NDR_CHECK(ndr_check_string_terminator(ndr, length_servername_0, sizeof(uint16_t)));
5312 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, length_servername_0, sizeof(uint16_t), CH_UTF16));
5313 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5314 NDR_PULL_ALLOC(ndr, r->in.server_fullname);
5316 _mem_save_server_fullname_0 = NDR_PULL_GET_MEM_CTX(ndr);
5317 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_fullname, LIBNDR_FLAG_REF_ALLOC);
5318 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_fullname));
5319 if (_ptr_server_fullname) {
5320 NDR_PULL_ALLOC(ndr, *r->in.server_fullname);
5321 } else {
5322 *r->in.server_fullname = NULL;
5324 if (*r->in.server_fullname) {
5325 _mem_save_server_fullname_1 = NDR_PULL_GET_MEM_CTX(ndr);
5326 NDR_PULL_SET_MEM_CTX(ndr, *r->in.server_fullname, 0);
5327 NDR_CHECK(ndr_pull_array_size(ndr, r->in.server_fullname));
5328 NDR_CHECK(ndr_pull_array_length(ndr, r->in.server_fullname));
5329 size_server_fullname_2 = ndr_get_array_size(ndr, r->in.server_fullname);
5330 length_server_fullname_2 = ndr_get_array_length(ndr, r->in.server_fullname);
5331 if (length_server_fullname_2 > size_server_fullname_2) {
5332 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);
5334 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_fullname_2, sizeof(uint16_t)));
5335 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->in.server_fullname, length_server_fullname_2, sizeof(uint16_t), CH_UTF16));
5336 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_1, 0);
5338 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_0, LIBNDR_FLAG_REF_ALLOC);
5339 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5340 NDR_PULL_ALLOC(ndr, r->in.is_root);
5342 _mem_save_is_root_0 = NDR_PULL_GET_MEM_CTX(ndr);
5343 NDR_PULL_SET_MEM_CTX(ndr, r->in.is_root, LIBNDR_FLAG_REF_ALLOC);
5344 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->in.is_root));
5345 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_is_root_0, LIBNDR_FLAG_REF_ALLOC);
5346 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5347 NDR_PULL_ALLOC(ndr, r->in.ttl);
5349 _mem_save_ttl_0 = NDR_PULL_GET_MEM_CTX(ndr);
5350 NDR_PULL_SET_MEM_CTX(ndr, r->in.ttl, LIBNDR_FLAG_REF_ALLOC);
5351 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.ttl));
5352 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ttl_0, LIBNDR_FLAG_REF_ALLOC);
5353 NDR_PULL_ALLOC(ndr, r->out.server_fullname);
5354 *r->out.server_fullname = *r->in.server_fullname;
5355 NDR_PULL_ALLOC(ndr, r->out.is_root);
5356 *r->out.is_root = *r->in.is_root;
5357 NDR_PULL_ALLOC(ndr, r->out.ttl);
5358 *r->out.ttl = *r->in.ttl;
5360 if (flags & NDR_OUT) {
5361 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5362 NDR_PULL_ALLOC(ndr, r->out.server_fullname);
5364 _mem_save_server_fullname_0 = NDR_PULL_GET_MEM_CTX(ndr);
5365 NDR_PULL_SET_MEM_CTX(ndr, r->out.server_fullname, LIBNDR_FLAG_REF_ALLOC);
5366 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_fullname));
5367 if (_ptr_server_fullname) {
5368 NDR_PULL_ALLOC(ndr, *r->out.server_fullname);
5369 } else {
5370 *r->out.server_fullname = NULL;
5372 if (*r->out.server_fullname) {
5373 _mem_save_server_fullname_1 = NDR_PULL_GET_MEM_CTX(ndr);
5374 NDR_PULL_SET_MEM_CTX(ndr, *r->out.server_fullname, 0);
5375 NDR_CHECK(ndr_pull_array_size(ndr, r->out.server_fullname));
5376 NDR_CHECK(ndr_pull_array_length(ndr, r->out.server_fullname));
5377 size_server_fullname_2 = ndr_get_array_size(ndr, r->out.server_fullname);
5378 length_server_fullname_2 = ndr_get_array_length(ndr, r->out.server_fullname);
5379 if (length_server_fullname_2 > size_server_fullname_2) {
5380 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);
5382 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_fullname_2, sizeof(uint16_t)));
5383 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.server_fullname, length_server_fullname_2, sizeof(uint16_t), CH_UTF16));
5384 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_1, 0);
5386 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_0, LIBNDR_FLAG_REF_ALLOC);
5387 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5388 NDR_PULL_ALLOC(ndr, r->out.is_root);
5390 _mem_save_is_root_0 = NDR_PULL_GET_MEM_CTX(ndr);
5391 NDR_PULL_SET_MEM_CTX(ndr, r->out.is_root, LIBNDR_FLAG_REF_ALLOC);
5392 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->out.is_root));
5393 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_is_root_0, LIBNDR_FLAG_REF_ALLOC);
5394 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5395 NDR_PULL_ALLOC(ndr, r->out.ttl);
5397 _mem_save_ttl_0 = NDR_PULL_GET_MEM_CTX(ndr);
5398 NDR_PULL_SET_MEM_CTX(ndr, r->out.ttl, LIBNDR_FLAG_REF_ALLOC);
5399 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.ttl));
5400 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ttl_0, LIBNDR_FLAG_REF_ALLOC);
5401 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5403 return NDR_ERR_SUCCESS;
5406 _PUBLIC_ void ndr_print_dfs_GetDcAddress(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetDcAddress *r)
5408 ndr_print_struct(ndr, name, "dfs_GetDcAddress");
5409 ndr->depth++;
5410 if (flags & NDR_SET_VALUES) {
5411 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5413 if (flags & NDR_IN) {
5414 ndr_print_struct(ndr, "in", "dfs_GetDcAddress");
5415 ndr->depth++;
5416 ndr_print_string(ndr, "servername", r->in.servername);
5417 ndr_print_ptr(ndr, "server_fullname", r->in.server_fullname);
5418 ndr->depth++;
5419 ndr_print_ptr(ndr, "server_fullname", *r->in.server_fullname);
5420 ndr->depth++;
5421 if (*r->in.server_fullname) {
5422 ndr_print_string(ndr, "server_fullname", *r->in.server_fullname);
5424 ndr->depth--;
5425 ndr->depth--;
5426 ndr_print_ptr(ndr, "is_root", r->in.is_root);
5427 ndr->depth++;
5428 ndr_print_uint8(ndr, "is_root", *r->in.is_root);
5429 ndr->depth--;
5430 ndr_print_ptr(ndr, "ttl", r->in.ttl);
5431 ndr->depth++;
5432 ndr_print_uint32(ndr, "ttl", *r->in.ttl);
5433 ndr->depth--;
5434 ndr->depth--;
5436 if (flags & NDR_OUT) {
5437 ndr_print_struct(ndr, "out", "dfs_GetDcAddress");
5438 ndr->depth++;
5439 ndr_print_ptr(ndr, "server_fullname", r->out.server_fullname);
5440 ndr->depth++;
5441 ndr_print_ptr(ndr, "server_fullname", *r->out.server_fullname);
5442 ndr->depth++;
5443 if (*r->out.server_fullname) {
5444 ndr_print_string(ndr, "server_fullname", *r->out.server_fullname);
5446 ndr->depth--;
5447 ndr->depth--;
5448 ndr_print_ptr(ndr, "is_root", r->out.is_root);
5449 ndr->depth++;
5450 ndr_print_uint8(ndr, "is_root", *r->out.is_root);
5451 ndr->depth--;
5452 ndr_print_ptr(ndr, "ttl", r->out.ttl);
5453 ndr->depth++;
5454 ndr_print_uint32(ndr, "ttl", *r->out.ttl);
5455 ndr->depth--;
5456 ndr_print_WERROR(ndr, "result", r->out.result);
5457 ndr->depth--;
5459 ndr->depth--;
5462 static enum ndr_err_code ndr_push_dfs_SetDcAddress(struct ndr_push *ndr, int flags, const struct dfs_SetDcAddress *r)
5464 if (flags & NDR_IN) {
5465 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
5466 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5467 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
5468 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5469 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_fullname, CH_UTF16)));
5470 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5471 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_fullname, CH_UTF16)));
5472 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));
5473 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
5474 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.ttl));
5476 if (flags & NDR_OUT) {
5477 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5479 return NDR_ERR_SUCCESS;
5482 static enum ndr_err_code ndr_pull_dfs_SetDcAddress(struct ndr_pull *ndr, int flags, struct dfs_SetDcAddress *r)
5484 uint32_t size_servername_0 = 0;
5485 uint32_t length_servername_0 = 0;
5486 uint32_t size_server_fullname_0 = 0;
5487 uint32_t length_server_fullname_0 = 0;
5488 if (flags & NDR_IN) {
5489 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
5490 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
5491 size_servername_0 = ndr_get_array_size(ndr, &r->in.servername);
5492 length_servername_0 = ndr_get_array_length(ndr, &r->in.servername);
5493 if (length_servername_0 > size_servername_0) {
5494 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_servername_0, length_servername_0);
5496 NDR_CHECK(ndr_check_string_terminator(ndr, length_servername_0, sizeof(uint16_t)));
5497 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, length_servername_0, sizeof(uint16_t), CH_UTF16));
5498 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_fullname));
5499 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_fullname));
5500 size_server_fullname_0 = ndr_get_array_size(ndr, &r->in.server_fullname);
5501 length_server_fullname_0 = ndr_get_array_length(ndr, &r->in.server_fullname);
5502 if (length_server_fullname_0 > size_server_fullname_0) {
5503 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);
5505 NDR_CHECK(ndr_check_string_terminator(ndr, length_server_fullname_0, sizeof(uint16_t)));
5506 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_fullname, length_server_fullname_0, sizeof(uint16_t), CH_UTF16));
5507 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
5508 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.ttl));
5510 if (flags & NDR_OUT) {
5511 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5513 return NDR_ERR_SUCCESS;
5516 _PUBLIC_ void ndr_print_dfs_SetDcAddress(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetDcAddress *r)
5518 ndr_print_struct(ndr, name, "dfs_SetDcAddress");
5519 ndr->depth++;
5520 if (flags & NDR_SET_VALUES) {
5521 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5523 if (flags & NDR_IN) {
5524 ndr_print_struct(ndr, "in", "dfs_SetDcAddress");
5525 ndr->depth++;
5526 ndr_print_string(ndr, "servername", r->in.servername);
5527 ndr_print_string(ndr, "server_fullname", r->in.server_fullname);
5528 ndr_print_uint32(ndr, "flags", r->in.flags);
5529 ndr_print_uint32(ndr, "ttl", r->in.ttl);
5530 ndr->depth--;
5532 if (flags & NDR_OUT) {
5533 ndr_print_struct(ndr, "out", "dfs_SetDcAddress");
5534 ndr->depth++;
5535 ndr_print_WERROR(ndr, "result", r->out.result);
5536 ndr->depth--;
5538 ndr->depth--;
5541 static enum ndr_err_code ndr_push_dfs_FlushFtTable(struct ndr_push *ndr, int flags, const struct dfs_FlushFtTable *r)
5543 if (flags & NDR_IN) {
5544 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
5545 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5546 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
5547 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5548 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
5549 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5550 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
5551 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5553 if (flags & NDR_OUT) {
5554 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5556 return NDR_ERR_SUCCESS;
5559 static enum ndr_err_code ndr_pull_dfs_FlushFtTable(struct ndr_pull *ndr, int flags, struct dfs_FlushFtTable *r)
5561 uint32_t size_servername_0 = 0;
5562 uint32_t length_servername_0 = 0;
5563 uint32_t size_rootshare_0 = 0;
5564 uint32_t length_rootshare_0 = 0;
5565 if (flags & NDR_IN) {
5566 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
5567 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
5568 size_servername_0 = ndr_get_array_size(ndr, &r->in.servername);
5569 length_servername_0 = ndr_get_array_length(ndr, &r->in.servername);
5570 if (length_servername_0 > size_servername_0) {
5571 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_servername_0, length_servername_0);
5573 NDR_CHECK(ndr_check_string_terminator(ndr, length_servername_0, sizeof(uint16_t)));
5574 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, length_servername_0, sizeof(uint16_t), CH_UTF16));
5575 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
5576 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
5577 size_rootshare_0 = ndr_get_array_size(ndr, &r->in.rootshare);
5578 length_rootshare_0 = ndr_get_array_length(ndr, &r->in.rootshare);
5579 if (length_rootshare_0 > size_rootshare_0) {
5580 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", size_rootshare_0, length_rootshare_0);
5582 NDR_CHECK(ndr_check_string_terminator(ndr, length_rootshare_0, sizeof(uint16_t)));
5583 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, length_rootshare_0, sizeof(uint16_t), CH_UTF16));
5585 if (flags & NDR_OUT) {
5586 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5588 return NDR_ERR_SUCCESS;
5591 _PUBLIC_ void ndr_print_dfs_FlushFtTable(struct ndr_print *ndr, const char *name, int flags, const struct dfs_FlushFtTable *r)
5593 ndr_print_struct(ndr, name, "dfs_FlushFtTable");
5594 ndr->depth++;
5595 if (flags & NDR_SET_VALUES) {
5596 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5598 if (flags & NDR_IN) {
5599 ndr_print_struct(ndr, "in", "dfs_FlushFtTable");
5600 ndr->depth++;
5601 ndr_print_string(ndr, "servername", r->in.servername);
5602 ndr_print_string(ndr, "rootshare", r->in.rootshare);
5603 ndr->depth--;
5605 if (flags & NDR_OUT) {
5606 ndr_print_struct(ndr, "out", "dfs_FlushFtTable");
5607 ndr->depth++;
5608 ndr_print_WERROR(ndr, "result", r->out.result);
5609 ndr->depth--;
5611 ndr->depth--;
5614 static enum ndr_err_code ndr_push_dfs_Add2(struct ndr_push *ndr, int flags, const struct dfs_Add2 *r)
5616 if (flags & NDR_IN) {
5618 if (flags & NDR_OUT) {
5619 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5621 return NDR_ERR_SUCCESS;
5624 static enum ndr_err_code ndr_pull_dfs_Add2(struct ndr_pull *ndr, int flags, struct dfs_Add2 *r)
5626 if (flags & NDR_IN) {
5628 if (flags & NDR_OUT) {
5629 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5631 return NDR_ERR_SUCCESS;
5634 _PUBLIC_ void ndr_print_dfs_Add2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Add2 *r)
5636 ndr_print_struct(ndr, name, "dfs_Add2");
5637 ndr->depth++;
5638 if (flags & NDR_SET_VALUES) {
5639 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5641 if (flags & NDR_IN) {
5642 ndr_print_struct(ndr, "in", "dfs_Add2");
5643 ndr->depth++;
5644 ndr->depth--;
5646 if (flags & NDR_OUT) {
5647 ndr_print_struct(ndr, "out", "dfs_Add2");
5648 ndr->depth++;
5649 ndr_print_WERROR(ndr, "result", r->out.result);
5650 ndr->depth--;
5652 ndr->depth--;
5655 static enum ndr_err_code ndr_push_dfs_Remove2(struct ndr_push *ndr, int flags, const struct dfs_Remove2 *r)
5657 if (flags & NDR_IN) {
5659 if (flags & NDR_OUT) {
5660 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5662 return NDR_ERR_SUCCESS;
5665 static enum ndr_err_code ndr_pull_dfs_Remove2(struct ndr_pull *ndr, int flags, struct dfs_Remove2 *r)
5667 if (flags & NDR_IN) {
5669 if (flags & NDR_OUT) {
5670 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5672 return NDR_ERR_SUCCESS;
5675 _PUBLIC_ void ndr_print_dfs_Remove2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Remove2 *r)
5677 ndr_print_struct(ndr, name, "dfs_Remove2");
5678 ndr->depth++;
5679 if (flags & NDR_SET_VALUES) {
5680 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5682 if (flags & NDR_IN) {
5683 ndr_print_struct(ndr, "in", "dfs_Remove2");
5684 ndr->depth++;
5685 ndr->depth--;
5687 if (flags & NDR_OUT) {
5688 ndr_print_struct(ndr, "out", "dfs_Remove2");
5689 ndr->depth++;
5690 ndr_print_WERROR(ndr, "result", r->out.result);
5691 ndr->depth--;
5693 ndr->depth--;
5696 _PUBLIC_ enum ndr_err_code ndr_push_dfs_EnumEx(struct ndr_push *ndr, int flags, const struct dfs_EnumEx *r)
5698 if (flags & NDR_IN) {
5699 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_name, CH_UTF16)));
5700 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5701 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_name, CH_UTF16)));
5702 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));
5703 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
5704 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bufsize));
5705 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info));
5706 if (r->in.info) {
5707 NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
5709 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.total));
5710 if (r->in.total) {
5711 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.total));
5714 if (flags & NDR_OUT) {
5715 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
5716 if (r->out.info) {
5717 NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
5719 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.total));
5720 if (r->out.total) {
5721 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.total));
5723 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5725 return NDR_ERR_SUCCESS;
5728 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_EnumEx(struct ndr_pull *ndr, int flags, struct dfs_EnumEx *r)
5730 uint32_t size_dfs_name_0 = 0;
5731 uint32_t length_dfs_name_0 = 0;
5732 uint32_t _ptr_info;
5733 uint32_t _ptr_total;
5734 TALLOC_CTX *_mem_save_info_0;
5735 TALLOC_CTX *_mem_save_total_0;
5736 if (flags & NDR_IN) {
5737 ZERO_STRUCT(r->out);
5739 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_name));
5740 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_name));
5741 size_dfs_name_0 = ndr_get_array_size(ndr, &r->in.dfs_name);
5742 length_dfs_name_0 = ndr_get_array_length(ndr, &r->in.dfs_name);
5743 if (length_dfs_name_0 > size_dfs_name_0) {
5744 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);
5746 NDR_CHECK(ndr_check_string_terminator(ndr, length_dfs_name_0, sizeof(uint16_t)));
5747 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfs_name, length_dfs_name_0, sizeof(uint16_t), CH_UTF16));
5748 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
5749 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bufsize));
5750 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
5751 if (_ptr_info) {
5752 NDR_PULL_ALLOC(ndr, r->in.info);
5753 } else {
5754 r->in.info = NULL;
5756 if (r->in.info) {
5757 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
5758 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0);
5759 NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
5760 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
5762 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total));
5763 if (_ptr_total) {
5764 NDR_PULL_ALLOC(ndr, r->in.total);
5765 } else {
5766 r->in.total = NULL;
5768 if (r->in.total) {
5769 _mem_save_total_0 = NDR_PULL_GET_MEM_CTX(ndr);
5770 NDR_PULL_SET_MEM_CTX(ndr, r->in.total, 0);
5771 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.total));
5772 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_0, 0);
5775 if (flags & NDR_OUT) {
5776 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
5777 if (_ptr_info) {
5778 NDR_PULL_ALLOC(ndr, r->out.info);
5779 } else {
5780 r->out.info = NULL;
5782 if (r->out.info) {
5783 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
5784 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
5785 NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
5786 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
5788 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total));
5789 if (_ptr_total) {
5790 NDR_PULL_ALLOC(ndr, r->out.total);
5791 } else {
5792 r->out.total = NULL;
5794 if (r->out.total) {
5795 _mem_save_total_0 = NDR_PULL_GET_MEM_CTX(ndr);
5796 NDR_PULL_SET_MEM_CTX(ndr, r->out.total, 0);
5797 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.total));
5798 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_0, 0);
5800 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5802 return NDR_ERR_SUCCESS;
5805 _PUBLIC_ void ndr_print_dfs_EnumEx(struct ndr_print *ndr, const char *name, int flags, const struct dfs_EnumEx *r)
5807 ndr_print_struct(ndr, name, "dfs_EnumEx");
5808 ndr->depth++;
5809 if (flags & NDR_SET_VALUES) {
5810 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5812 if (flags & NDR_IN) {
5813 ndr_print_struct(ndr, "in", "dfs_EnumEx");
5814 ndr->depth++;
5815 ndr_print_string(ndr, "dfs_name", r->in.dfs_name);
5816 ndr_print_uint32(ndr, "level", r->in.level);
5817 ndr_print_uint32(ndr, "bufsize", r->in.bufsize);
5818 ndr_print_ptr(ndr, "info", r->in.info);
5819 ndr->depth++;
5820 if (r->in.info) {
5821 ndr_print_dfs_EnumStruct(ndr, "info", r->in.info);
5823 ndr->depth--;
5824 ndr_print_ptr(ndr, "total", r->in.total);
5825 ndr->depth++;
5826 if (r->in.total) {
5827 ndr_print_uint32(ndr, "total", *r->in.total);
5829 ndr->depth--;
5830 ndr->depth--;
5832 if (flags & NDR_OUT) {
5833 ndr_print_struct(ndr, "out", "dfs_EnumEx");
5834 ndr->depth++;
5835 ndr_print_ptr(ndr, "info", r->out.info);
5836 ndr->depth++;
5837 if (r->out.info) {
5838 ndr_print_dfs_EnumStruct(ndr, "info", r->out.info);
5840 ndr->depth--;
5841 ndr_print_ptr(ndr, "total", r->out.total);
5842 ndr->depth++;
5843 if (r->out.total) {
5844 ndr_print_uint32(ndr, "total", *r->out.total);
5846 ndr->depth--;
5847 ndr_print_WERROR(ndr, "result", r->out.result);
5848 ndr->depth--;
5850 ndr->depth--;
5853 static enum ndr_err_code ndr_push_dfs_SetInfo2(struct ndr_push *ndr, int flags, const struct dfs_SetInfo2 *r)
5855 if (flags & NDR_IN) {
5857 if (flags & NDR_OUT) {
5858 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5860 return NDR_ERR_SUCCESS;
5863 static enum ndr_err_code ndr_pull_dfs_SetInfo2(struct ndr_pull *ndr, int flags, struct dfs_SetInfo2 *r)
5865 if (flags & NDR_IN) {
5867 if (flags & NDR_OUT) {
5868 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5870 return NDR_ERR_SUCCESS;
5873 _PUBLIC_ void ndr_print_dfs_SetInfo2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetInfo2 *r)
5875 ndr_print_struct(ndr, name, "dfs_SetInfo2");
5876 ndr->depth++;
5877 if (flags & NDR_SET_VALUES) {
5878 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5880 if (flags & NDR_IN) {
5881 ndr_print_struct(ndr, "in", "dfs_SetInfo2");
5882 ndr->depth++;
5883 ndr->depth--;
5885 if (flags & NDR_OUT) {
5886 ndr_print_struct(ndr, "out", "dfs_SetInfo2");
5887 ndr->depth++;
5888 ndr_print_WERROR(ndr, "result", r->out.result);
5889 ndr->depth--;
5891 ndr->depth--;
5894 static const struct ndr_interface_call netdfs_calls[] = {
5896 "dfs_GetManagerVersion",
5897 sizeof(struct dfs_GetManagerVersion),
5898 (ndr_push_flags_fn_t) ndr_push_dfs_GetManagerVersion,
5899 (ndr_pull_flags_fn_t) ndr_pull_dfs_GetManagerVersion,
5900 (ndr_print_function_t) ndr_print_dfs_GetManagerVersion,
5901 false,
5904 "dfs_Add",
5905 sizeof(struct dfs_Add),
5906 (ndr_push_flags_fn_t) ndr_push_dfs_Add,
5907 (ndr_pull_flags_fn_t) ndr_pull_dfs_Add,
5908 (ndr_print_function_t) ndr_print_dfs_Add,
5909 false,
5912 "dfs_Remove",
5913 sizeof(struct dfs_Remove),
5914 (ndr_push_flags_fn_t) ndr_push_dfs_Remove,
5915 (ndr_pull_flags_fn_t) ndr_pull_dfs_Remove,
5916 (ndr_print_function_t) ndr_print_dfs_Remove,
5917 false,
5920 "dfs_SetInfo",
5921 sizeof(struct dfs_SetInfo),
5922 (ndr_push_flags_fn_t) ndr_push_dfs_SetInfo,
5923 (ndr_pull_flags_fn_t) ndr_pull_dfs_SetInfo,
5924 (ndr_print_function_t) ndr_print_dfs_SetInfo,
5925 false,
5928 "dfs_GetInfo",
5929 sizeof(struct dfs_GetInfo),
5930 (ndr_push_flags_fn_t) ndr_push_dfs_GetInfo,
5931 (ndr_pull_flags_fn_t) ndr_pull_dfs_GetInfo,
5932 (ndr_print_function_t) ndr_print_dfs_GetInfo,
5933 false,
5936 "dfs_Enum",
5937 sizeof(struct dfs_Enum),
5938 (ndr_push_flags_fn_t) ndr_push_dfs_Enum,
5939 (ndr_pull_flags_fn_t) ndr_pull_dfs_Enum,
5940 (ndr_print_function_t) ndr_print_dfs_Enum,
5941 false,
5944 "dfs_Rename",
5945 sizeof(struct dfs_Rename),
5946 (ndr_push_flags_fn_t) ndr_push_dfs_Rename,
5947 (ndr_pull_flags_fn_t) ndr_pull_dfs_Rename,
5948 (ndr_print_function_t) ndr_print_dfs_Rename,
5949 false,
5952 "dfs_Move",
5953 sizeof(struct dfs_Move),
5954 (ndr_push_flags_fn_t) ndr_push_dfs_Move,
5955 (ndr_pull_flags_fn_t) ndr_pull_dfs_Move,
5956 (ndr_print_function_t) ndr_print_dfs_Move,
5957 false,
5960 "dfs_ManagerGetConfigInfo",
5961 sizeof(struct dfs_ManagerGetConfigInfo),
5962 (ndr_push_flags_fn_t) ndr_push_dfs_ManagerGetConfigInfo,
5963 (ndr_pull_flags_fn_t) ndr_pull_dfs_ManagerGetConfigInfo,
5964 (ndr_print_function_t) ndr_print_dfs_ManagerGetConfigInfo,
5965 false,
5968 "dfs_ManagerSendSiteInfo",
5969 sizeof(struct dfs_ManagerSendSiteInfo),
5970 (ndr_push_flags_fn_t) ndr_push_dfs_ManagerSendSiteInfo,
5971 (ndr_pull_flags_fn_t) ndr_pull_dfs_ManagerSendSiteInfo,
5972 (ndr_print_function_t) ndr_print_dfs_ManagerSendSiteInfo,
5973 false,
5976 "dfs_AddFtRoot",
5977 sizeof(struct dfs_AddFtRoot),
5978 (ndr_push_flags_fn_t) ndr_push_dfs_AddFtRoot,
5979 (ndr_pull_flags_fn_t) ndr_pull_dfs_AddFtRoot,
5980 (ndr_print_function_t) ndr_print_dfs_AddFtRoot,
5981 false,
5984 "dfs_RemoveFtRoot",
5985 sizeof(struct dfs_RemoveFtRoot),
5986 (ndr_push_flags_fn_t) ndr_push_dfs_RemoveFtRoot,
5987 (ndr_pull_flags_fn_t) ndr_pull_dfs_RemoveFtRoot,
5988 (ndr_print_function_t) ndr_print_dfs_RemoveFtRoot,
5989 false,
5992 "dfs_AddStdRoot",
5993 sizeof(struct dfs_AddStdRoot),
5994 (ndr_push_flags_fn_t) ndr_push_dfs_AddStdRoot,
5995 (ndr_pull_flags_fn_t) ndr_pull_dfs_AddStdRoot,
5996 (ndr_print_function_t) ndr_print_dfs_AddStdRoot,
5997 false,
6000 "dfs_RemoveStdRoot",
6001 sizeof(struct dfs_RemoveStdRoot),
6002 (ndr_push_flags_fn_t) ndr_push_dfs_RemoveStdRoot,
6003 (ndr_pull_flags_fn_t) ndr_pull_dfs_RemoveStdRoot,
6004 (ndr_print_function_t) ndr_print_dfs_RemoveStdRoot,
6005 false,
6008 "dfs_ManagerInitialize",
6009 sizeof(struct dfs_ManagerInitialize),
6010 (ndr_push_flags_fn_t) ndr_push_dfs_ManagerInitialize,
6011 (ndr_pull_flags_fn_t) ndr_pull_dfs_ManagerInitialize,
6012 (ndr_print_function_t) ndr_print_dfs_ManagerInitialize,
6013 false,
6016 "dfs_AddStdRootForced",
6017 sizeof(struct dfs_AddStdRootForced),
6018 (ndr_push_flags_fn_t) ndr_push_dfs_AddStdRootForced,
6019 (ndr_pull_flags_fn_t) ndr_pull_dfs_AddStdRootForced,
6020 (ndr_print_function_t) ndr_print_dfs_AddStdRootForced,
6021 false,
6024 "dfs_GetDcAddress",
6025 sizeof(struct dfs_GetDcAddress),
6026 (ndr_push_flags_fn_t) ndr_push_dfs_GetDcAddress,
6027 (ndr_pull_flags_fn_t) ndr_pull_dfs_GetDcAddress,
6028 (ndr_print_function_t) ndr_print_dfs_GetDcAddress,
6029 false,
6032 "dfs_SetDcAddress",
6033 sizeof(struct dfs_SetDcAddress),
6034 (ndr_push_flags_fn_t) ndr_push_dfs_SetDcAddress,
6035 (ndr_pull_flags_fn_t) ndr_pull_dfs_SetDcAddress,
6036 (ndr_print_function_t) ndr_print_dfs_SetDcAddress,
6037 false,
6040 "dfs_FlushFtTable",
6041 sizeof(struct dfs_FlushFtTable),
6042 (ndr_push_flags_fn_t) ndr_push_dfs_FlushFtTable,
6043 (ndr_pull_flags_fn_t) ndr_pull_dfs_FlushFtTable,
6044 (ndr_print_function_t) ndr_print_dfs_FlushFtTable,
6045 false,
6048 "dfs_Add2",
6049 sizeof(struct dfs_Add2),
6050 (ndr_push_flags_fn_t) ndr_push_dfs_Add2,
6051 (ndr_pull_flags_fn_t) ndr_pull_dfs_Add2,
6052 (ndr_print_function_t) ndr_print_dfs_Add2,
6053 false,
6056 "dfs_Remove2",
6057 sizeof(struct dfs_Remove2),
6058 (ndr_push_flags_fn_t) ndr_push_dfs_Remove2,
6059 (ndr_pull_flags_fn_t) ndr_pull_dfs_Remove2,
6060 (ndr_print_function_t) ndr_print_dfs_Remove2,
6061 false,
6064 "dfs_EnumEx",
6065 sizeof(struct dfs_EnumEx),
6066 (ndr_push_flags_fn_t) ndr_push_dfs_EnumEx,
6067 (ndr_pull_flags_fn_t) ndr_pull_dfs_EnumEx,
6068 (ndr_print_function_t) ndr_print_dfs_EnumEx,
6069 false,
6072 "dfs_SetInfo2",
6073 sizeof(struct dfs_SetInfo2),
6074 (ndr_push_flags_fn_t) ndr_push_dfs_SetInfo2,
6075 (ndr_pull_flags_fn_t) ndr_pull_dfs_SetInfo2,
6076 (ndr_print_function_t) ndr_print_dfs_SetInfo2,
6077 false,
6079 { NULL, 0, NULL, NULL, NULL, false }
6082 static const char * const netdfs_endpoint_strings[] = {
6083 "ncacn_np:[\\pipe\\netdfs]",
6084 "ncacn_ip_tcp:",
6085 "ncalrpc:",
6088 static const struct ndr_interface_string_array netdfs_endpoints = {
6089 .count = 3,
6090 .names = netdfs_endpoint_strings
6093 static const char * const netdfs_authservice_strings[] = {
6094 "host",
6097 static const struct ndr_interface_string_array netdfs_authservices = {
6098 .count = 1,
6099 .names = netdfs_authservice_strings
6103 const struct ndr_interface_table ndr_table_netdfs = {
6104 .name = "netdfs",
6105 .syntax_id = {
6106 {0x4fc742e0,0x4a10,0x11cf,{0x82,0x73},{0x00,0xaa,0x00,0x4a,0xe6,0x73}},
6107 NDR_NETDFS_VERSION
6109 .helpstring = NDR_NETDFS_HELPSTRING,
6110 .num_calls = 23,
6111 .calls = netdfs_calls,
6112 .endpoints = &netdfs_endpoints,
6113 .authservices = &netdfs_authservices