build: Add an always parameter to CHECK_DECLS
[Samba/gebeck_regimport.git] / librpc / gen_ndr / ndr_dfs.c
blob62f42bad155500396b6b6ef970a7c3774459b539
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 TALLOC_CTX *_mem_save_path_0;
85 if (ndr_flags & NDR_SCALARS) {
86 NDR_CHECK(ndr_pull_align(ndr, 5));
87 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
88 if (_ptr_path) {
89 NDR_PULL_ALLOC(ndr, r->path);
90 } else {
91 r->path = NULL;
93 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
95 if (ndr_flags & NDR_BUFFERS) {
96 if (r->path) {
97 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
98 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
99 NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
100 NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
101 if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) {
102 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->path), ndr_get_array_length(ndr, &r->path));
104 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t)));
105 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16));
106 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
109 return NDR_ERR_SUCCESS;
112 _PUBLIC_ void ndr_print_dfs_Info1(struct ndr_print *ndr, const char *name, const struct dfs_Info1 *r)
114 ndr_print_struct(ndr, name, "dfs_Info1");
115 ndr->depth++;
116 ndr_print_ptr(ndr, "path", r->path);
117 ndr->depth++;
118 if (r->path) {
119 ndr_print_string(ndr, "path", r->path);
121 ndr->depth--;
122 ndr->depth--;
125 _PUBLIC_ enum ndr_err_code ndr_push_dfs_VolumeState(struct ndr_push *ndr, int ndr_flags, uint32_t r)
127 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
128 return NDR_ERR_SUCCESS;
131 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_VolumeState(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
133 uint32_t v;
134 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
135 *r = v;
136 return NDR_ERR_SUCCESS;
139 _PUBLIC_ void ndr_print_dfs_VolumeState(struct ndr_print *ndr, const char *name, uint32_t r)
141 ndr_print_uint32(ndr, name, r);
142 ndr->depth++;
143 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_OK", DFS_VOLUME_STATE_OK, r);
144 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_INCONSISTENT", DFS_VOLUME_STATE_INCONSISTENT, r);
145 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_OFFLINE", DFS_VOLUME_STATE_OFFLINE, r);
146 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_ONLINE", DFS_VOLUME_STATE_ONLINE, r);
147 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_STANDALONE", DFS_VOLUME_STATE_STANDALONE, r);
148 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_AD_BLOB", DFS_VOLUME_STATE_AD_BLOB, r);
149 ndr->depth--;
152 static enum ndr_err_code ndr_push_dfs_Info2(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info2 *r)
154 if (ndr_flags & NDR_SCALARS) {
155 NDR_CHECK(ndr_push_align(ndr, 5));
156 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
157 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
158 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
159 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
160 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
162 if (ndr_flags & NDR_BUFFERS) {
163 if (r->path) {
164 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
165 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
166 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
167 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
169 if (r->comment) {
170 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
171 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
172 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
173 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
176 return NDR_ERR_SUCCESS;
179 static enum ndr_err_code ndr_pull_dfs_Info2(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info2 *r)
181 uint32_t _ptr_path;
182 TALLOC_CTX *_mem_save_path_0;
183 uint32_t _ptr_comment;
184 TALLOC_CTX *_mem_save_comment_0;
185 if (ndr_flags & NDR_SCALARS) {
186 NDR_CHECK(ndr_pull_align(ndr, 5));
187 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
188 if (_ptr_path) {
189 NDR_PULL_ALLOC(ndr, r->path);
190 } else {
191 r->path = NULL;
193 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
194 if (_ptr_comment) {
195 NDR_PULL_ALLOC(ndr, r->comment);
196 } else {
197 r->comment = NULL;
199 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
200 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores));
201 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
203 if (ndr_flags & NDR_BUFFERS) {
204 if (r->path) {
205 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
206 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
207 NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
208 NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
209 if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) {
210 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->path), ndr_get_array_length(ndr, &r->path));
212 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t)));
213 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16));
214 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
216 if (r->comment) {
217 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
218 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
219 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
220 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
221 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
222 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
224 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
225 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
226 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
229 return NDR_ERR_SUCCESS;
232 _PUBLIC_ void ndr_print_dfs_Info2(struct ndr_print *ndr, const char *name, const struct dfs_Info2 *r)
234 ndr_print_struct(ndr, name, "dfs_Info2");
235 ndr->depth++;
236 ndr_print_ptr(ndr, "path", r->path);
237 ndr->depth++;
238 if (r->path) {
239 ndr_print_string(ndr, "path", r->path);
241 ndr->depth--;
242 ndr_print_ptr(ndr, "comment", r->comment);
243 ndr->depth++;
244 if (r->comment) {
245 ndr_print_string(ndr, "comment", r->comment);
247 ndr->depth--;
248 ndr_print_dfs_VolumeState(ndr, "state", r->state);
249 ndr_print_uint32(ndr, "num_stores", r->num_stores);
250 ndr->depth--;
253 _PUBLIC_ enum ndr_err_code ndr_push_dfs_StorageState(struct ndr_push *ndr, int ndr_flags, uint32_t r)
255 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
256 return NDR_ERR_SUCCESS;
259 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_StorageState(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
261 uint32_t v;
262 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
263 *r = v;
264 return NDR_ERR_SUCCESS;
267 _PUBLIC_ void ndr_print_dfs_StorageState(struct ndr_print *ndr, const char *name, uint32_t r)
269 ndr_print_uint32(ndr, name, r);
270 ndr->depth++;
271 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_STORAGE_STATE_OFFLINE", DFS_STORAGE_STATE_OFFLINE, r);
272 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_STORAGE_STATE_ONLINE", DFS_STORAGE_STATE_ONLINE, r);
273 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_STORAGE_STATE_ACTIVE", DFS_STORAGE_STATE_ACTIVE, r);
274 ndr->depth--;
277 static enum ndr_err_code ndr_push_dfs_StorageInfo(struct ndr_push *ndr, int ndr_flags, const struct dfs_StorageInfo *r)
279 if (ndr_flags & NDR_SCALARS) {
280 NDR_CHECK(ndr_push_align(ndr, 5));
281 NDR_CHECK(ndr_push_dfs_StorageState(ndr, NDR_SCALARS, r->state));
282 NDR_CHECK(ndr_push_unique_ptr(ndr, r->server));
283 NDR_CHECK(ndr_push_unique_ptr(ndr, r->share));
284 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
286 if (ndr_flags & NDR_BUFFERS) {
287 if (r->server) {
288 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server, CH_UTF16)));
289 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
290 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->server, CH_UTF16)));
291 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server, ndr_charset_length(r->server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
293 if (r->share) {
294 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->share, CH_UTF16)));
295 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
296 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->share, CH_UTF16)));
297 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->share, ndr_charset_length(r->share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
300 return NDR_ERR_SUCCESS;
303 static enum ndr_err_code ndr_pull_dfs_StorageInfo(struct ndr_pull *ndr, int ndr_flags, struct dfs_StorageInfo *r)
305 uint32_t _ptr_server;
306 TALLOC_CTX *_mem_save_server_0;
307 uint32_t _ptr_share;
308 TALLOC_CTX *_mem_save_share_0;
309 if (ndr_flags & NDR_SCALARS) {
310 NDR_CHECK(ndr_pull_align(ndr, 5));
311 NDR_CHECK(ndr_pull_dfs_StorageState(ndr, NDR_SCALARS, &r->state));
312 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
313 if (_ptr_server) {
314 NDR_PULL_ALLOC(ndr, r->server);
315 } else {
316 r->server = NULL;
318 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share));
319 if (_ptr_share) {
320 NDR_PULL_ALLOC(ndr, r->share);
321 } else {
322 r->share = NULL;
324 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
326 if (ndr_flags & NDR_BUFFERS) {
327 if (r->server) {
328 _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
329 NDR_PULL_SET_MEM_CTX(ndr, r->server, 0);
330 NDR_CHECK(ndr_pull_array_size(ndr, &r->server));
331 NDR_CHECK(ndr_pull_array_length(ndr, &r->server));
332 if (ndr_get_array_length(ndr, &r->server) > ndr_get_array_size(ndr, &r->server)) {
333 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->server), ndr_get_array_length(ndr, &r->server));
335 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->server), sizeof(uint16_t)));
336 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server, ndr_get_array_length(ndr, &r->server), sizeof(uint16_t), CH_UTF16));
337 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
339 if (r->share) {
340 _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr);
341 NDR_PULL_SET_MEM_CTX(ndr, r->share, 0);
342 NDR_CHECK(ndr_pull_array_size(ndr, &r->share));
343 NDR_CHECK(ndr_pull_array_length(ndr, &r->share));
344 if (ndr_get_array_length(ndr, &r->share) > ndr_get_array_size(ndr, &r->share)) {
345 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->share), ndr_get_array_length(ndr, &r->share));
347 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->share), sizeof(uint16_t)));
348 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->share, ndr_get_array_length(ndr, &r->share), sizeof(uint16_t), CH_UTF16));
349 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0);
352 return NDR_ERR_SUCCESS;
355 _PUBLIC_ void ndr_print_dfs_StorageInfo(struct ndr_print *ndr, const char *name, const struct dfs_StorageInfo *r)
357 ndr_print_struct(ndr, name, "dfs_StorageInfo");
358 ndr->depth++;
359 ndr_print_dfs_StorageState(ndr, "state", r->state);
360 ndr_print_ptr(ndr, "server", r->server);
361 ndr->depth++;
362 if (r->server) {
363 ndr_print_string(ndr, "server", r->server);
365 ndr->depth--;
366 ndr_print_ptr(ndr, "share", r->share);
367 ndr->depth++;
368 if (r->share) {
369 ndr_print_string(ndr, "share", r->share);
371 ndr->depth--;
372 ndr->depth--;
375 static enum ndr_err_code ndr_push_dfs_Info3(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info3 *r)
377 uint32_t cntr_stores_1;
378 if (ndr_flags & NDR_SCALARS) {
379 NDR_CHECK(ndr_push_align(ndr, 5));
380 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
381 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
382 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
383 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
384 NDR_CHECK(ndr_push_unique_ptr(ndr, r->stores));
385 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
387 if (ndr_flags & NDR_BUFFERS) {
388 if (r->path) {
389 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
390 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
391 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
392 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
394 if (r->comment) {
395 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
396 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
397 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
398 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
400 if (r->stores) {
401 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_stores));
402 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
403 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
405 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
406 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
410 return NDR_ERR_SUCCESS;
413 static enum ndr_err_code ndr_pull_dfs_Info3(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info3 *r)
415 uint32_t _ptr_path;
416 TALLOC_CTX *_mem_save_path_0;
417 uint32_t _ptr_comment;
418 TALLOC_CTX *_mem_save_comment_0;
419 uint32_t _ptr_stores;
420 uint32_t cntr_stores_1;
421 TALLOC_CTX *_mem_save_stores_0;
422 TALLOC_CTX *_mem_save_stores_1;
423 if (ndr_flags & NDR_SCALARS) {
424 NDR_CHECK(ndr_pull_align(ndr, 5));
425 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
426 if (_ptr_path) {
427 NDR_PULL_ALLOC(ndr, r->path);
428 } else {
429 r->path = NULL;
431 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
432 if (_ptr_comment) {
433 NDR_PULL_ALLOC(ndr, r->comment);
434 } else {
435 r->comment = NULL;
437 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
438 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores));
439 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_stores));
440 if (_ptr_stores) {
441 NDR_PULL_ALLOC(ndr, r->stores);
442 } else {
443 r->stores = NULL;
445 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
447 if (ndr_flags & NDR_BUFFERS) {
448 if (r->path) {
449 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
450 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
451 NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
452 NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
453 if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) {
454 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->path), ndr_get_array_length(ndr, &r->path));
456 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t)));
457 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16));
458 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
460 if (r->comment) {
461 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
462 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
463 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
464 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
465 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
466 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
468 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
469 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
470 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
472 if (r->stores) {
473 _mem_save_stores_0 = NDR_PULL_GET_MEM_CTX(ndr);
474 NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
475 NDR_CHECK(ndr_pull_array_size(ndr, &r->stores));
476 NDR_PULL_ALLOC_N(ndr, r->stores, ndr_get_array_size(ndr, &r->stores));
477 _mem_save_stores_1 = NDR_PULL_GET_MEM_CTX(ndr);
478 NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
479 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
480 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
482 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
483 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
485 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_1, 0);
486 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_0, 0);
488 if (r->stores) {
489 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->stores, r->num_stores));
492 return NDR_ERR_SUCCESS;
495 _PUBLIC_ void ndr_print_dfs_Info3(struct ndr_print *ndr, const char *name, const struct dfs_Info3 *r)
497 uint32_t cntr_stores_1;
498 ndr_print_struct(ndr, name, "dfs_Info3");
499 ndr->depth++;
500 ndr_print_ptr(ndr, "path", r->path);
501 ndr->depth++;
502 if (r->path) {
503 ndr_print_string(ndr, "path", r->path);
505 ndr->depth--;
506 ndr_print_ptr(ndr, "comment", r->comment);
507 ndr->depth++;
508 if (r->comment) {
509 ndr_print_string(ndr, "comment", r->comment);
511 ndr->depth--;
512 ndr_print_dfs_VolumeState(ndr, "state", r->state);
513 ndr_print_uint32(ndr, "num_stores", r->num_stores);
514 ndr_print_ptr(ndr, "stores", r->stores);
515 ndr->depth++;
516 if (r->stores) {
517 ndr->print(ndr, "%s: ARRAY(%d)", "stores", (int)r->num_stores);
518 ndr->depth++;
519 for (cntr_stores_1=0;cntr_stores_1<r->num_stores;cntr_stores_1++) {
520 char *idx_1=NULL;
521 if (asprintf(&idx_1, "[%d]", cntr_stores_1) != -1) {
522 ndr_print_dfs_StorageInfo(ndr, "stores", &r->stores[cntr_stores_1]);
523 free(idx_1);
526 ndr->depth--;
528 ndr->depth--;
529 ndr->depth--;
532 static enum ndr_err_code ndr_push_dfs_Info4(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info4 *r)
534 uint32_t cntr_stores_1;
535 if (ndr_flags & NDR_SCALARS) {
536 NDR_CHECK(ndr_push_align(ndr, 5));
537 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
538 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
539 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
540 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
541 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
542 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
543 NDR_CHECK(ndr_push_unique_ptr(ndr, r->stores));
544 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
546 if (ndr_flags & NDR_BUFFERS) {
547 if (r->path) {
548 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
549 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
550 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
551 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
553 if (r->comment) {
554 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
555 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
556 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
557 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
559 if (r->stores) {
560 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_stores));
561 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
562 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
564 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
565 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
569 return NDR_ERR_SUCCESS;
572 static enum ndr_err_code ndr_pull_dfs_Info4(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info4 *r)
574 uint32_t _ptr_path;
575 TALLOC_CTX *_mem_save_path_0;
576 uint32_t _ptr_comment;
577 TALLOC_CTX *_mem_save_comment_0;
578 uint32_t _ptr_stores;
579 uint32_t cntr_stores_1;
580 TALLOC_CTX *_mem_save_stores_0;
581 TALLOC_CTX *_mem_save_stores_1;
582 if (ndr_flags & NDR_SCALARS) {
583 NDR_CHECK(ndr_pull_align(ndr, 5));
584 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
585 if (_ptr_path) {
586 NDR_PULL_ALLOC(ndr, r->path);
587 } else {
588 r->path = NULL;
590 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
591 if (_ptr_comment) {
592 NDR_PULL_ALLOC(ndr, r->comment);
593 } else {
594 r->comment = NULL;
596 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
597 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
598 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
599 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores));
600 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_stores));
601 if (_ptr_stores) {
602 NDR_PULL_ALLOC(ndr, r->stores);
603 } else {
604 r->stores = NULL;
606 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
608 if (ndr_flags & NDR_BUFFERS) {
609 if (r->path) {
610 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
611 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
612 NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
613 NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
614 if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) {
615 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->path), ndr_get_array_length(ndr, &r->path));
617 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t)));
618 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16));
619 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
621 if (r->comment) {
622 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
623 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
624 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
625 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
626 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
627 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
629 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
630 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
631 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
633 if (r->stores) {
634 _mem_save_stores_0 = NDR_PULL_GET_MEM_CTX(ndr);
635 NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
636 NDR_CHECK(ndr_pull_array_size(ndr, &r->stores));
637 NDR_PULL_ALLOC_N(ndr, r->stores, ndr_get_array_size(ndr, &r->stores));
638 _mem_save_stores_1 = NDR_PULL_GET_MEM_CTX(ndr);
639 NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
640 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
641 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
643 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
644 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
646 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_1, 0);
647 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_0, 0);
649 if (r->stores) {
650 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->stores, r->num_stores));
653 return NDR_ERR_SUCCESS;
656 _PUBLIC_ void ndr_print_dfs_Info4(struct ndr_print *ndr, const char *name, const struct dfs_Info4 *r)
658 uint32_t cntr_stores_1;
659 ndr_print_struct(ndr, name, "dfs_Info4");
660 ndr->depth++;
661 ndr_print_ptr(ndr, "path", r->path);
662 ndr->depth++;
663 if (r->path) {
664 ndr_print_string(ndr, "path", r->path);
666 ndr->depth--;
667 ndr_print_ptr(ndr, "comment", r->comment);
668 ndr->depth++;
669 if (r->comment) {
670 ndr_print_string(ndr, "comment", r->comment);
672 ndr->depth--;
673 ndr_print_dfs_VolumeState(ndr, "state", r->state);
674 ndr_print_uint32(ndr, "timeout", r->timeout);
675 ndr_print_GUID(ndr, "guid", &r->guid);
676 ndr_print_uint32(ndr, "num_stores", r->num_stores);
677 ndr_print_ptr(ndr, "stores", r->stores);
678 ndr->depth++;
679 if (r->stores) {
680 ndr->print(ndr, "%s: ARRAY(%d)", "stores", (int)r->num_stores);
681 ndr->depth++;
682 for (cntr_stores_1=0;cntr_stores_1<r->num_stores;cntr_stores_1++) {
683 char *idx_1=NULL;
684 if (asprintf(&idx_1, "[%d]", cntr_stores_1) != -1) {
685 ndr_print_dfs_StorageInfo(ndr, "stores", &r->stores[cntr_stores_1]);
686 free(idx_1);
689 ndr->depth--;
691 ndr->depth--;
692 ndr->depth--;
695 _PUBLIC_ enum ndr_err_code ndr_push_dfs_PropertyFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
697 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
698 return NDR_ERR_SUCCESS;
701 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_PropertyFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
703 uint32_t v;
704 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
705 *r = v;
706 return NDR_ERR_SUCCESS;
709 _PUBLIC_ void ndr_print_dfs_PropertyFlags(struct ndr_print *ndr, const char *name, uint32_t r)
711 ndr_print_uint32(ndr, name, r);
712 ndr->depth++;
713 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_INSITE_REFERRALS", DFS_PROPERTY_FLAG_INSITE_REFERRALS, r);
714 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_ROOT_SCALABILITY", DFS_PROPERTY_FLAG_ROOT_SCALABILITY, r);
715 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_SITE_COSTING", DFS_PROPERTY_FLAG_SITE_COSTING, r);
716 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_TARGET_FAILBACK", DFS_PROPERTY_FLAG_TARGET_FAILBACK, r);
717 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_CLUSTER_ENABLED", DFS_PROPERTY_FLAG_CLUSTER_ENABLED, r);
718 ndr->depth--;
721 static enum ndr_err_code ndr_push_dfs_Info5(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info5 *r)
723 if (ndr_flags & NDR_SCALARS) {
724 NDR_CHECK(ndr_push_align(ndr, 5));
725 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
726 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
727 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
728 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
729 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
730 NDR_CHECK(ndr_push_dfs_PropertyFlags(ndr, NDR_SCALARS, r->flags));
731 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pktsize));
732 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
733 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
735 if (ndr_flags & NDR_BUFFERS) {
736 if (r->path) {
737 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
738 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
739 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
740 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
742 if (r->comment) {
743 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
744 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
745 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
746 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
749 return NDR_ERR_SUCCESS;
752 static enum ndr_err_code ndr_pull_dfs_Info5(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info5 *r)
754 uint32_t _ptr_path;
755 TALLOC_CTX *_mem_save_path_0;
756 uint32_t _ptr_comment;
757 TALLOC_CTX *_mem_save_comment_0;
758 if (ndr_flags & NDR_SCALARS) {
759 NDR_CHECK(ndr_pull_align(ndr, 5));
760 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
761 if (_ptr_path) {
762 NDR_PULL_ALLOC(ndr, r->path);
763 } else {
764 r->path = NULL;
766 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
767 if (_ptr_comment) {
768 NDR_PULL_ALLOC(ndr, r->comment);
769 } else {
770 r->comment = NULL;
772 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
773 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
774 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
775 NDR_CHECK(ndr_pull_dfs_PropertyFlags(ndr, NDR_SCALARS, &r->flags));
776 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pktsize));
777 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores));
778 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
780 if (ndr_flags & NDR_BUFFERS) {
781 if (r->path) {
782 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
783 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
784 NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
785 NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
786 if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) {
787 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->path), ndr_get_array_length(ndr, &r->path));
789 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t)));
790 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16));
791 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
793 if (r->comment) {
794 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
795 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
796 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
797 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
798 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
799 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
801 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
802 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
803 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
806 return NDR_ERR_SUCCESS;
809 _PUBLIC_ void ndr_print_dfs_Info5(struct ndr_print *ndr, const char *name, const struct dfs_Info5 *r)
811 ndr_print_struct(ndr, name, "dfs_Info5");
812 ndr->depth++;
813 ndr_print_ptr(ndr, "path", r->path);
814 ndr->depth++;
815 if (r->path) {
816 ndr_print_string(ndr, "path", r->path);
818 ndr->depth--;
819 ndr_print_ptr(ndr, "comment", r->comment);
820 ndr->depth++;
821 if (r->comment) {
822 ndr_print_string(ndr, "comment", r->comment);
824 ndr->depth--;
825 ndr_print_dfs_VolumeState(ndr, "state", r->state);
826 ndr_print_uint32(ndr, "timeout", r->timeout);
827 ndr_print_GUID(ndr, "guid", &r->guid);
828 ndr_print_dfs_PropertyFlags(ndr, "flags", r->flags);
829 ndr_print_uint32(ndr, "pktsize", r->pktsize);
830 ndr_print_uint32(ndr, "num_stores", r->num_stores);
831 ndr->depth--;
834 static enum ndr_err_code ndr_push_dfs_Target_PriorityClass(struct ndr_push *ndr, int ndr_flags, enum dfs_Target_PriorityClass r)
836 NDR_CHECK(ndr_push_enum_uint32(ndr, NDR_SCALARS, r));
837 return NDR_ERR_SUCCESS;
840 static enum ndr_err_code ndr_pull_dfs_Target_PriorityClass(struct ndr_pull *ndr, int ndr_flags, enum dfs_Target_PriorityClass *r)
842 uint32_t v;
843 NDR_CHECK(ndr_pull_enum_uint32(ndr, NDR_SCALARS, &v));
844 *r = v;
845 return NDR_ERR_SUCCESS;
848 _PUBLIC_ void ndr_print_dfs_Target_PriorityClass(struct ndr_print *ndr, const char *name, enum dfs_Target_PriorityClass r)
850 const char *val = NULL;
852 switch (r) {
853 case DFS_INVALID_PRIORITY_CLASS: val = "DFS_INVALID_PRIORITY_CLASS"; break;
854 case DFS_SITE_COST_NORMAL_PRIORITY_CLASS: val = "DFS_SITE_COST_NORMAL_PRIORITY_CLASS"; break;
855 case DFS_GLOBAL_HIGH_PRIORITY_CLASS: val = "DFS_GLOBAL_HIGH_PRIORITY_CLASS"; break;
856 case DFS_SITE_COST_HIGH_PRIORITY_CLASS: val = "DFS_SITE_COST_HIGH_PRIORITY_CLASS"; break;
857 case DFS_SITE_COST_LOW_PRIORITY_CLASS: val = "DFS_SITE_COST_LOW_PRIORITY_CLASS"; break;
858 case DFS_GLOBAL_LOW_PRIORITY_CLASS: val = "DFS_GLOBAL_LOW_PRIORITY_CLASS"; break;
860 ndr_print_enum(ndr, name, "ENUM", val, r);
863 static enum ndr_err_code ndr_push_dfs_Target_Priority(struct ndr_push *ndr, int ndr_flags, const struct dfs_Target_Priority *r)
865 if (ndr_flags & NDR_SCALARS) {
866 NDR_CHECK(ndr_push_align(ndr, 4));
867 NDR_CHECK(ndr_push_dfs_Target_PriorityClass(ndr, NDR_SCALARS, r->target_priority_class));
868 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->target_priority_rank));
869 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->reserved));
870 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
872 if (ndr_flags & NDR_BUFFERS) {
874 return NDR_ERR_SUCCESS;
877 static enum ndr_err_code ndr_pull_dfs_Target_Priority(struct ndr_pull *ndr, int ndr_flags, struct dfs_Target_Priority *r)
879 if (ndr_flags & NDR_SCALARS) {
880 NDR_CHECK(ndr_pull_align(ndr, 4));
881 NDR_CHECK(ndr_pull_dfs_Target_PriorityClass(ndr, NDR_SCALARS, &r->target_priority_class));
882 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->target_priority_rank));
883 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved));
884 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
886 if (ndr_flags & NDR_BUFFERS) {
888 return NDR_ERR_SUCCESS;
891 _PUBLIC_ void ndr_print_dfs_Target_Priority(struct ndr_print *ndr, const char *name, const struct dfs_Target_Priority *r)
893 ndr_print_struct(ndr, name, "dfs_Target_Priority");
894 ndr->depth++;
895 ndr_print_dfs_Target_PriorityClass(ndr, "target_priority_class", r->target_priority_class);
896 ndr_print_uint16(ndr, "target_priority_rank", r->target_priority_rank);
897 ndr_print_uint16(ndr, "reserved", r->reserved);
898 ndr->depth--;
901 static enum ndr_err_code ndr_push_dfs_StorageInfo2(struct ndr_push *ndr, int ndr_flags, const struct dfs_StorageInfo2 *r)
903 if (ndr_flags & NDR_SCALARS) {
904 NDR_CHECK(ndr_push_align(ndr, 5));
905 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_SCALARS, &r->info));
906 NDR_CHECK(ndr_push_dfs_Target_Priority(ndr, NDR_SCALARS, &r->target_priority));
907 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
909 if (ndr_flags & NDR_BUFFERS) {
910 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->info));
912 return NDR_ERR_SUCCESS;
915 static enum ndr_err_code ndr_pull_dfs_StorageInfo2(struct ndr_pull *ndr, int ndr_flags, struct dfs_StorageInfo2 *r)
917 if (ndr_flags & NDR_SCALARS) {
918 NDR_CHECK(ndr_pull_align(ndr, 5));
919 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_SCALARS, &r->info));
920 NDR_CHECK(ndr_pull_dfs_Target_Priority(ndr, NDR_SCALARS, &r->target_priority));
921 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
923 if (ndr_flags & NDR_BUFFERS) {
924 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->info));
926 return NDR_ERR_SUCCESS;
929 _PUBLIC_ void ndr_print_dfs_StorageInfo2(struct ndr_print *ndr, const char *name, const struct dfs_StorageInfo2 *r)
931 ndr_print_struct(ndr, name, "dfs_StorageInfo2");
932 ndr->depth++;
933 ndr_print_dfs_StorageInfo(ndr, "info", &r->info);
934 ndr_print_dfs_Target_Priority(ndr, "target_priority", &r->target_priority);
935 ndr->depth--;
938 static enum ndr_err_code ndr_push_dfs_Info6(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info6 *r)
940 uint32_t cntr_stores_1;
941 if (ndr_flags & NDR_SCALARS) {
942 NDR_CHECK(ndr_push_align(ndr, 5));
943 NDR_CHECK(ndr_push_unique_ptr(ndr, r->entry_path));
944 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
945 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
946 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
947 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
948 NDR_CHECK(ndr_push_dfs_PropertyFlags(ndr, NDR_SCALARS, r->flags));
949 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pktsize));
950 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_stores));
951 NDR_CHECK(ndr_push_unique_ptr(ndr, r->stores));
952 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
954 if (ndr_flags & NDR_BUFFERS) {
955 if (r->entry_path) {
956 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->entry_path, CH_UTF16)));
957 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
958 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->entry_path, CH_UTF16)));
959 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->entry_path, ndr_charset_length(r->entry_path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
961 if (r->comment) {
962 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
963 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
964 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
965 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
967 if (r->stores) {
968 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->num_stores));
969 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
970 NDR_CHECK(ndr_push_dfs_StorageInfo2(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
972 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
973 NDR_CHECK(ndr_push_dfs_StorageInfo2(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
977 return NDR_ERR_SUCCESS;
980 static enum ndr_err_code ndr_pull_dfs_Info6(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info6 *r)
982 uint32_t _ptr_entry_path;
983 TALLOC_CTX *_mem_save_entry_path_0;
984 uint32_t _ptr_comment;
985 TALLOC_CTX *_mem_save_comment_0;
986 uint32_t _ptr_stores;
987 uint32_t cntr_stores_1;
988 TALLOC_CTX *_mem_save_stores_0;
989 TALLOC_CTX *_mem_save_stores_1;
990 if (ndr_flags & NDR_SCALARS) {
991 NDR_CHECK(ndr_pull_align(ndr, 5));
992 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entry_path));
993 if (_ptr_entry_path) {
994 NDR_PULL_ALLOC(ndr, r->entry_path);
995 } else {
996 r->entry_path = NULL;
998 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
999 if (_ptr_comment) {
1000 NDR_PULL_ALLOC(ndr, r->comment);
1001 } else {
1002 r->comment = NULL;
1004 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
1005 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
1006 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
1007 NDR_CHECK(ndr_pull_dfs_PropertyFlags(ndr, NDR_SCALARS, &r->flags));
1008 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pktsize));
1009 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_stores));
1010 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_stores));
1011 if (_ptr_stores) {
1012 NDR_PULL_ALLOC(ndr, r->stores);
1013 } else {
1014 r->stores = NULL;
1016 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1018 if (ndr_flags & NDR_BUFFERS) {
1019 if (r->entry_path) {
1020 _mem_save_entry_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
1021 NDR_PULL_SET_MEM_CTX(ndr, r->entry_path, 0);
1022 NDR_CHECK(ndr_pull_array_size(ndr, &r->entry_path));
1023 NDR_CHECK(ndr_pull_array_length(ndr, &r->entry_path));
1024 if (ndr_get_array_length(ndr, &r->entry_path) > ndr_get_array_size(ndr, &r->entry_path)) {
1025 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->entry_path), ndr_get_array_length(ndr, &r->entry_path));
1027 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->entry_path), sizeof(uint16_t)));
1028 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->entry_path, ndr_get_array_length(ndr, &r->entry_path), sizeof(uint16_t), CH_UTF16));
1029 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entry_path_0, 0);
1031 if (r->comment) {
1032 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
1033 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
1034 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
1035 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
1036 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
1037 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
1039 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
1040 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
1041 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
1043 if (r->stores) {
1044 _mem_save_stores_0 = NDR_PULL_GET_MEM_CTX(ndr);
1045 NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
1046 NDR_CHECK(ndr_pull_array_size(ndr, &r->stores));
1047 NDR_PULL_ALLOC_N(ndr, r->stores, ndr_get_array_size(ndr, &r->stores));
1048 _mem_save_stores_1 = NDR_PULL_GET_MEM_CTX(ndr);
1049 NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
1050 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
1051 NDR_CHECK(ndr_pull_dfs_StorageInfo2(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
1053 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
1054 NDR_CHECK(ndr_pull_dfs_StorageInfo2(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
1056 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_1, 0);
1057 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_0, 0);
1059 if (r->stores) {
1060 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->stores, r->num_stores));
1063 return NDR_ERR_SUCCESS;
1066 _PUBLIC_ void ndr_print_dfs_Info6(struct ndr_print *ndr, const char *name, const struct dfs_Info6 *r)
1068 uint32_t cntr_stores_1;
1069 ndr_print_struct(ndr, name, "dfs_Info6");
1070 ndr->depth++;
1071 ndr_print_ptr(ndr, "entry_path", r->entry_path);
1072 ndr->depth++;
1073 if (r->entry_path) {
1074 ndr_print_string(ndr, "entry_path", r->entry_path);
1076 ndr->depth--;
1077 ndr_print_ptr(ndr, "comment", r->comment);
1078 ndr->depth++;
1079 if (r->comment) {
1080 ndr_print_string(ndr, "comment", r->comment);
1082 ndr->depth--;
1083 ndr_print_dfs_VolumeState(ndr, "state", r->state);
1084 ndr_print_uint32(ndr, "timeout", r->timeout);
1085 ndr_print_GUID(ndr, "guid", &r->guid);
1086 ndr_print_dfs_PropertyFlags(ndr, "flags", r->flags);
1087 ndr_print_uint32(ndr, "pktsize", r->pktsize);
1088 ndr_print_uint16(ndr, "num_stores", r->num_stores);
1089 ndr_print_ptr(ndr, "stores", r->stores);
1090 ndr->depth++;
1091 if (r->stores) {
1092 ndr->print(ndr, "%s: ARRAY(%d)", "stores", (int)r->num_stores);
1093 ndr->depth++;
1094 for (cntr_stores_1=0;cntr_stores_1<r->num_stores;cntr_stores_1++) {
1095 char *idx_1=NULL;
1096 if (asprintf(&idx_1, "[%d]", cntr_stores_1) != -1) {
1097 ndr_print_dfs_StorageInfo2(ndr, "stores", &r->stores[cntr_stores_1]);
1098 free(idx_1);
1101 ndr->depth--;
1103 ndr->depth--;
1104 ndr->depth--;
1107 static enum ndr_err_code ndr_push_dfs_Info7(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info7 *r)
1109 if (ndr_flags & NDR_SCALARS) {
1110 NDR_CHECK(ndr_push_align(ndr, 4));
1111 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->generation_guid));
1112 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1114 if (ndr_flags & NDR_BUFFERS) {
1116 return NDR_ERR_SUCCESS;
1119 static enum ndr_err_code ndr_pull_dfs_Info7(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info7 *r)
1121 if (ndr_flags & NDR_SCALARS) {
1122 NDR_CHECK(ndr_pull_align(ndr, 4));
1123 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->generation_guid));
1124 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1126 if (ndr_flags & NDR_BUFFERS) {
1128 return NDR_ERR_SUCCESS;
1131 _PUBLIC_ void ndr_print_dfs_Info7(struct ndr_print *ndr, const char *name, const struct dfs_Info7 *r)
1133 ndr_print_struct(ndr, name, "dfs_Info7");
1134 ndr->depth++;
1135 ndr_print_GUID(ndr, "generation_guid", &r->generation_guid);
1136 ndr->depth--;
1139 static enum ndr_err_code ndr_push_dfs_Info100(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info100 *r)
1141 if (ndr_flags & NDR_SCALARS) {
1142 NDR_CHECK(ndr_push_align(ndr, 5));
1143 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
1144 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1146 if (ndr_flags & NDR_BUFFERS) {
1147 if (r->comment) {
1148 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
1149 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1150 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
1151 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1154 return NDR_ERR_SUCCESS;
1157 static enum ndr_err_code ndr_pull_dfs_Info100(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info100 *r)
1159 uint32_t _ptr_comment;
1160 TALLOC_CTX *_mem_save_comment_0;
1161 if (ndr_flags & NDR_SCALARS) {
1162 NDR_CHECK(ndr_pull_align(ndr, 5));
1163 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
1164 if (_ptr_comment) {
1165 NDR_PULL_ALLOC(ndr, r->comment);
1166 } else {
1167 r->comment = NULL;
1169 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1171 if (ndr_flags & NDR_BUFFERS) {
1172 if (r->comment) {
1173 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
1174 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
1175 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
1176 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
1177 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
1178 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
1180 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
1181 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
1182 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
1185 return NDR_ERR_SUCCESS;
1188 _PUBLIC_ void ndr_print_dfs_Info100(struct ndr_print *ndr, const char *name, const struct dfs_Info100 *r)
1190 ndr_print_struct(ndr, name, "dfs_Info100");
1191 ndr->depth++;
1192 ndr_print_ptr(ndr, "comment", r->comment);
1193 ndr->depth++;
1194 if (r->comment) {
1195 ndr_print_string(ndr, "comment", r->comment);
1197 ndr->depth--;
1198 ndr->depth--;
1201 static enum ndr_err_code ndr_push_dfs_Info101(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info101 *r)
1203 if (ndr_flags & NDR_SCALARS) {
1204 NDR_CHECK(ndr_push_align(ndr, 4));
1205 NDR_CHECK(ndr_push_dfs_StorageState(ndr, NDR_SCALARS, r->state));
1206 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1208 if (ndr_flags & NDR_BUFFERS) {
1210 return NDR_ERR_SUCCESS;
1213 static enum ndr_err_code ndr_pull_dfs_Info101(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info101 *r)
1215 if (ndr_flags & NDR_SCALARS) {
1216 NDR_CHECK(ndr_pull_align(ndr, 4));
1217 NDR_CHECK(ndr_pull_dfs_StorageState(ndr, NDR_SCALARS, &r->state));
1218 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1220 if (ndr_flags & NDR_BUFFERS) {
1222 return NDR_ERR_SUCCESS;
1225 _PUBLIC_ void ndr_print_dfs_Info101(struct ndr_print *ndr, const char *name, const struct dfs_Info101 *r)
1227 ndr_print_struct(ndr, name, "dfs_Info101");
1228 ndr->depth++;
1229 ndr_print_dfs_StorageState(ndr, "state", r->state);
1230 ndr->depth--;
1233 static enum ndr_err_code ndr_push_dfs_Info102(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info102 *r)
1235 if (ndr_flags & NDR_SCALARS) {
1236 NDR_CHECK(ndr_push_align(ndr, 4));
1237 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
1238 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1240 if (ndr_flags & NDR_BUFFERS) {
1242 return NDR_ERR_SUCCESS;
1245 static enum ndr_err_code ndr_pull_dfs_Info102(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info102 *r)
1247 if (ndr_flags & NDR_SCALARS) {
1248 NDR_CHECK(ndr_pull_align(ndr, 4));
1249 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
1250 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1252 if (ndr_flags & NDR_BUFFERS) {
1254 return NDR_ERR_SUCCESS;
1257 _PUBLIC_ void ndr_print_dfs_Info102(struct ndr_print *ndr, const char *name, const struct dfs_Info102 *r)
1259 ndr_print_struct(ndr, name, "dfs_Info102");
1260 ndr->depth++;
1261 ndr_print_uint32(ndr, "timeout", r->timeout);
1262 ndr->depth--;
1265 static enum ndr_err_code ndr_push_dfs_Info103(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info103 *r)
1267 if (ndr_flags & NDR_SCALARS) {
1268 NDR_CHECK(ndr_push_align(ndr, 4));
1269 NDR_CHECK(ndr_push_dfs_PropertyFlags(ndr, NDR_SCALARS, r->flags));
1270 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1272 if (ndr_flags & NDR_BUFFERS) {
1274 return NDR_ERR_SUCCESS;
1277 static enum ndr_err_code ndr_pull_dfs_Info103(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info103 *r)
1279 if (ndr_flags & NDR_SCALARS) {
1280 NDR_CHECK(ndr_pull_align(ndr, 4));
1281 NDR_CHECK(ndr_pull_dfs_PropertyFlags(ndr, NDR_SCALARS, &r->flags));
1282 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1284 if (ndr_flags & NDR_BUFFERS) {
1286 return NDR_ERR_SUCCESS;
1289 _PUBLIC_ void ndr_print_dfs_Info103(struct ndr_print *ndr, const char *name, const struct dfs_Info103 *r)
1291 ndr_print_struct(ndr, name, "dfs_Info103");
1292 ndr->depth++;
1293 ndr_print_dfs_PropertyFlags(ndr, "flags", r->flags);
1294 ndr->depth--;
1297 static enum ndr_err_code ndr_push_dfs_Info104(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info104 *r)
1299 if (ndr_flags & NDR_SCALARS) {
1300 NDR_CHECK(ndr_push_align(ndr, 4));
1301 NDR_CHECK(ndr_push_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority));
1302 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1304 if (ndr_flags & NDR_BUFFERS) {
1306 return NDR_ERR_SUCCESS;
1309 static enum ndr_err_code ndr_pull_dfs_Info104(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info104 *r)
1311 if (ndr_flags & NDR_SCALARS) {
1312 NDR_CHECK(ndr_pull_align(ndr, 4));
1313 NDR_CHECK(ndr_pull_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority));
1314 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1316 if (ndr_flags & NDR_BUFFERS) {
1318 return NDR_ERR_SUCCESS;
1321 _PUBLIC_ void ndr_print_dfs_Info104(struct ndr_print *ndr, const char *name, const struct dfs_Info104 *r)
1323 ndr_print_struct(ndr, name, "dfs_Info104");
1324 ndr->depth++;
1325 ndr_print_dfs_Target_Priority(ndr, "priority", &r->priority);
1326 ndr->depth--;
1329 static enum ndr_err_code ndr_push_dfs_Info105(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info105 *r)
1331 if (ndr_flags & NDR_SCALARS) {
1332 NDR_CHECK(ndr_push_align(ndr, 5));
1333 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
1334 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
1335 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
1336 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->property_flag_mask));
1337 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->property_flags));
1338 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1340 if (ndr_flags & NDR_BUFFERS) {
1341 if (r->comment) {
1342 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
1343 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1344 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
1345 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1348 return NDR_ERR_SUCCESS;
1351 static enum ndr_err_code ndr_pull_dfs_Info105(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info105 *r)
1353 uint32_t _ptr_comment;
1354 TALLOC_CTX *_mem_save_comment_0;
1355 if (ndr_flags & NDR_SCALARS) {
1356 NDR_CHECK(ndr_pull_align(ndr, 5));
1357 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
1358 if (_ptr_comment) {
1359 NDR_PULL_ALLOC(ndr, r->comment);
1360 } else {
1361 r->comment = NULL;
1363 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
1364 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
1365 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->property_flag_mask));
1366 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->property_flags));
1367 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1369 if (ndr_flags & NDR_BUFFERS) {
1370 if (r->comment) {
1371 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
1372 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
1373 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
1374 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
1375 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
1376 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
1378 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
1379 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
1380 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
1383 return NDR_ERR_SUCCESS;
1386 _PUBLIC_ void ndr_print_dfs_Info105(struct ndr_print *ndr, const char *name, const struct dfs_Info105 *r)
1388 ndr_print_struct(ndr, name, "dfs_Info105");
1389 ndr->depth++;
1390 ndr_print_ptr(ndr, "comment", r->comment);
1391 ndr->depth++;
1392 if (r->comment) {
1393 ndr_print_string(ndr, "comment", r->comment);
1395 ndr->depth--;
1396 ndr_print_dfs_VolumeState(ndr, "state", r->state);
1397 ndr_print_uint32(ndr, "timeout", r->timeout);
1398 ndr_print_uint32(ndr, "property_flag_mask", r->property_flag_mask);
1399 ndr_print_uint32(ndr, "property_flags", r->property_flags);
1400 ndr->depth--;
1403 static enum ndr_err_code ndr_push_dfs_Info106(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info106 *r)
1405 if (ndr_flags & NDR_SCALARS) {
1406 NDR_CHECK(ndr_push_align(ndr, 4));
1407 NDR_CHECK(ndr_push_dfs_StorageState(ndr, NDR_SCALARS, r->state));
1408 NDR_CHECK(ndr_push_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority));
1409 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
1411 if (ndr_flags & NDR_BUFFERS) {
1413 return NDR_ERR_SUCCESS;
1416 static enum ndr_err_code ndr_pull_dfs_Info106(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info106 *r)
1418 if (ndr_flags & NDR_SCALARS) {
1419 NDR_CHECK(ndr_pull_align(ndr, 4));
1420 NDR_CHECK(ndr_pull_dfs_StorageState(ndr, NDR_SCALARS, &r->state));
1421 NDR_CHECK(ndr_pull_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority));
1422 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
1424 if (ndr_flags & NDR_BUFFERS) {
1426 return NDR_ERR_SUCCESS;
1429 _PUBLIC_ void ndr_print_dfs_Info106(struct ndr_print *ndr, const char *name, const struct dfs_Info106 *r)
1431 ndr_print_struct(ndr, name, "dfs_Info106");
1432 ndr->depth++;
1433 ndr_print_dfs_StorageState(ndr, "state", r->state);
1434 ndr_print_dfs_Target_Priority(ndr, "priority", &r->priority);
1435 ndr->depth--;
1438 static enum ndr_err_code ndr_push_dfs_Info200(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info200 *r)
1440 if (ndr_flags & NDR_SCALARS) {
1441 NDR_CHECK(ndr_push_align(ndr, 5));
1442 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dom_root));
1443 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1445 if (ndr_flags & NDR_BUFFERS) {
1446 if (r->dom_root) {
1447 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16)));
1448 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1449 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16)));
1450 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dom_root, ndr_charset_length(r->dom_root, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1453 return NDR_ERR_SUCCESS;
1456 static enum ndr_err_code ndr_pull_dfs_Info200(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info200 *r)
1458 uint32_t _ptr_dom_root;
1459 TALLOC_CTX *_mem_save_dom_root_0;
1460 if (ndr_flags & NDR_SCALARS) {
1461 NDR_CHECK(ndr_pull_align(ndr, 5));
1462 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dom_root));
1463 if (_ptr_dom_root) {
1464 NDR_PULL_ALLOC(ndr, r->dom_root);
1465 } else {
1466 r->dom_root = NULL;
1468 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1470 if (ndr_flags & NDR_BUFFERS) {
1471 if (r->dom_root) {
1472 _mem_save_dom_root_0 = NDR_PULL_GET_MEM_CTX(ndr);
1473 NDR_PULL_SET_MEM_CTX(ndr, r->dom_root, 0);
1474 NDR_CHECK(ndr_pull_array_size(ndr, &r->dom_root));
1475 NDR_CHECK(ndr_pull_array_length(ndr, &r->dom_root));
1476 if (ndr_get_array_length(ndr, &r->dom_root) > ndr_get_array_size(ndr, &r->dom_root)) {
1477 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->dom_root), ndr_get_array_length(ndr, &r->dom_root));
1479 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->dom_root), sizeof(uint16_t)));
1480 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dom_root, ndr_get_array_length(ndr, &r->dom_root), sizeof(uint16_t), CH_UTF16));
1481 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_root_0, 0);
1484 return NDR_ERR_SUCCESS;
1487 _PUBLIC_ void ndr_print_dfs_Info200(struct ndr_print *ndr, const char *name, const struct dfs_Info200 *r)
1489 ndr_print_struct(ndr, name, "dfs_Info200");
1490 ndr->depth++;
1491 ndr_print_ptr(ndr, "dom_root", r->dom_root);
1492 ndr->depth++;
1493 if (r->dom_root) {
1494 ndr_print_string(ndr, "dom_root", r->dom_root);
1496 ndr->depth--;
1497 ndr->depth--;
1500 static enum ndr_err_code ndr_push_dfs_VolumeFlavor(struct ndr_push *ndr, int ndr_flags, enum dfs_VolumeFlavor r)
1502 NDR_CHECK(ndr_push_enum_uint1632(ndr, NDR_SCALARS, r));
1503 return NDR_ERR_SUCCESS;
1506 static enum ndr_err_code ndr_pull_dfs_VolumeFlavor(struct ndr_pull *ndr, int ndr_flags, enum dfs_VolumeFlavor *r)
1508 uint16_t v;
1509 NDR_CHECK(ndr_pull_enum_uint1632(ndr, NDR_SCALARS, &v));
1510 *r = v;
1511 return NDR_ERR_SUCCESS;
1514 _PUBLIC_ void ndr_print_dfs_VolumeFlavor(struct ndr_print *ndr, const char *name, enum dfs_VolumeFlavor r)
1516 const char *val = NULL;
1518 switch (r) {
1519 case DFS_VOLUME_FLAVOR_STANDALONE: val = "DFS_VOLUME_FLAVOR_STANDALONE"; break;
1520 case DFS_VOLUME_FLAVOR_AD_BLOB: val = "DFS_VOLUME_FLAVOR_AD_BLOB"; break;
1522 ndr_print_enum(ndr, name, "ENUM", val, r);
1525 static enum ndr_err_code ndr_push_dfs_Info300(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info300 *r)
1527 if (ndr_flags & NDR_SCALARS) {
1528 NDR_CHECK(ndr_push_align(ndr, 5));
1529 NDR_CHECK(ndr_push_dfs_VolumeFlavor(ndr, NDR_SCALARS, r->flavor));
1530 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dom_root));
1531 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
1533 if (ndr_flags & NDR_BUFFERS) {
1534 if (r->dom_root) {
1535 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16)));
1536 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
1537 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16)));
1538 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dom_root, ndr_charset_length(r->dom_root, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1541 return NDR_ERR_SUCCESS;
1544 static enum ndr_err_code ndr_pull_dfs_Info300(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info300 *r)
1546 uint32_t _ptr_dom_root;
1547 TALLOC_CTX *_mem_save_dom_root_0;
1548 if (ndr_flags & NDR_SCALARS) {
1549 NDR_CHECK(ndr_pull_align(ndr, 5));
1550 NDR_CHECK(ndr_pull_dfs_VolumeFlavor(ndr, NDR_SCALARS, &r->flavor));
1551 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dom_root));
1552 if (_ptr_dom_root) {
1553 NDR_PULL_ALLOC(ndr, r->dom_root);
1554 } else {
1555 r->dom_root = NULL;
1557 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
1559 if (ndr_flags & NDR_BUFFERS) {
1560 if (r->dom_root) {
1561 _mem_save_dom_root_0 = NDR_PULL_GET_MEM_CTX(ndr);
1562 NDR_PULL_SET_MEM_CTX(ndr, r->dom_root, 0);
1563 NDR_CHECK(ndr_pull_array_size(ndr, &r->dom_root));
1564 NDR_CHECK(ndr_pull_array_length(ndr, &r->dom_root));
1565 if (ndr_get_array_length(ndr, &r->dom_root) > ndr_get_array_size(ndr, &r->dom_root)) {
1566 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->dom_root), ndr_get_array_length(ndr, &r->dom_root));
1568 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->dom_root), sizeof(uint16_t)));
1569 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dom_root, ndr_get_array_length(ndr, &r->dom_root), sizeof(uint16_t), CH_UTF16));
1570 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_root_0, 0);
1573 return NDR_ERR_SUCCESS;
1576 _PUBLIC_ void ndr_print_dfs_Info300(struct ndr_print *ndr, const char *name, const struct dfs_Info300 *r)
1578 ndr_print_struct(ndr, name, "dfs_Info300");
1579 ndr->depth++;
1580 ndr_print_dfs_VolumeFlavor(ndr, "flavor", r->flavor);
1581 ndr_print_ptr(ndr, "dom_root", r->dom_root);
1582 ndr->depth++;
1583 if (r->dom_root) {
1584 ndr_print_string(ndr, "dom_root", r->dom_root);
1586 ndr->depth--;
1587 ndr->depth--;
1590 static enum ndr_err_code ndr_push_dfs_Info(struct ndr_push *ndr, int ndr_flags, const union dfs_Info *r)
1592 if (ndr_flags & NDR_SCALARS) {
1593 int level = ndr_push_get_switch_value(ndr, r);
1594 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
1595 NDR_CHECK(ndr_push_union_align(ndr, 5));
1596 switch (level) {
1597 case 0: {
1598 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
1599 break; }
1601 case 1: {
1602 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
1603 break; }
1605 case 2: {
1606 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
1607 break; }
1609 case 3: {
1610 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3));
1611 break; }
1613 case 4: {
1614 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info4));
1615 break; }
1617 case 5: {
1618 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info5));
1619 break; }
1621 case 6: {
1622 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info6));
1623 break; }
1625 case 7: {
1626 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info7));
1627 break; }
1629 case 100: {
1630 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info100));
1631 break; }
1633 case 101: {
1634 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info101));
1635 break; }
1637 case 102: {
1638 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info102));
1639 break; }
1641 case 103: {
1642 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info103));
1643 break; }
1645 case 104: {
1646 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info104));
1647 break; }
1649 case 105: {
1650 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info105));
1651 break; }
1653 case 106: {
1654 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info106));
1655 break; }
1657 default:
1658 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1661 if (ndr_flags & NDR_BUFFERS) {
1662 int level = ndr_push_get_switch_value(ndr, r);
1663 switch (level) {
1664 case 0:
1665 if (r->info0) {
1666 NDR_CHECK(ndr_push_dfs_Info0(ndr, NDR_SCALARS, r->info0));
1668 break;
1670 case 1:
1671 if (r->info1) {
1672 NDR_CHECK(ndr_push_dfs_Info1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
1674 break;
1676 case 2:
1677 if (r->info2) {
1678 NDR_CHECK(ndr_push_dfs_Info2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
1680 break;
1682 case 3:
1683 if (r->info3) {
1684 NDR_CHECK(ndr_push_dfs_Info3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
1686 break;
1688 case 4:
1689 if (r->info4) {
1690 NDR_CHECK(ndr_push_dfs_Info4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
1692 break;
1694 case 5:
1695 if (r->info5) {
1696 NDR_CHECK(ndr_push_dfs_Info5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5));
1698 break;
1700 case 6:
1701 if (r->info6) {
1702 NDR_CHECK(ndr_push_dfs_Info6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6));
1704 break;
1706 case 7:
1707 if (r->info7) {
1708 NDR_CHECK(ndr_push_dfs_Info7(ndr, NDR_SCALARS, r->info7));
1710 break;
1712 case 100:
1713 if (r->info100) {
1714 NDR_CHECK(ndr_push_dfs_Info100(ndr, NDR_SCALARS|NDR_BUFFERS, r->info100));
1716 break;
1718 case 101:
1719 if (r->info101) {
1720 NDR_CHECK(ndr_push_dfs_Info101(ndr, NDR_SCALARS, r->info101));
1722 break;
1724 case 102:
1725 if (r->info102) {
1726 NDR_CHECK(ndr_push_dfs_Info102(ndr, NDR_SCALARS, r->info102));
1728 break;
1730 case 103:
1731 if (r->info103) {
1732 NDR_CHECK(ndr_push_dfs_Info103(ndr, NDR_SCALARS, r->info103));
1734 break;
1736 case 104:
1737 if (r->info104) {
1738 NDR_CHECK(ndr_push_dfs_Info104(ndr, NDR_SCALARS, r->info104));
1740 break;
1742 case 105:
1743 if (r->info105) {
1744 NDR_CHECK(ndr_push_dfs_Info105(ndr, NDR_SCALARS|NDR_BUFFERS, r->info105));
1746 break;
1748 case 106:
1749 if (r->info106) {
1750 NDR_CHECK(ndr_push_dfs_Info106(ndr, NDR_SCALARS, r->info106));
1752 break;
1754 default:
1755 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1758 return NDR_ERR_SUCCESS;
1761 static enum ndr_err_code ndr_pull_dfs_Info(struct ndr_pull *ndr, int ndr_flags, union dfs_Info *r)
1763 int level;
1764 uint32_t _level;
1765 TALLOC_CTX *_mem_save_info0_0;
1766 TALLOC_CTX *_mem_save_info1_0;
1767 TALLOC_CTX *_mem_save_info2_0;
1768 TALLOC_CTX *_mem_save_info3_0;
1769 TALLOC_CTX *_mem_save_info4_0;
1770 TALLOC_CTX *_mem_save_info5_0;
1771 TALLOC_CTX *_mem_save_info6_0;
1772 TALLOC_CTX *_mem_save_info7_0;
1773 TALLOC_CTX *_mem_save_info100_0;
1774 TALLOC_CTX *_mem_save_info101_0;
1775 TALLOC_CTX *_mem_save_info102_0;
1776 TALLOC_CTX *_mem_save_info103_0;
1777 TALLOC_CTX *_mem_save_info104_0;
1778 TALLOC_CTX *_mem_save_info105_0;
1779 TALLOC_CTX *_mem_save_info106_0;
1780 level = ndr_pull_get_switch_value(ndr, r);
1781 if (ndr_flags & NDR_SCALARS) {
1782 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
1783 if (_level != level) {
1784 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
1786 NDR_CHECK(ndr_pull_union_align(ndr, 5));
1787 switch (level) {
1788 case 0: {
1789 uint32_t _ptr_info0;
1790 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
1791 if (_ptr_info0) {
1792 NDR_PULL_ALLOC(ndr, r->info0);
1793 } else {
1794 r->info0 = NULL;
1796 break; }
1798 case 1: {
1799 uint32_t _ptr_info1;
1800 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
1801 if (_ptr_info1) {
1802 NDR_PULL_ALLOC(ndr, r->info1);
1803 } else {
1804 r->info1 = NULL;
1806 break; }
1808 case 2: {
1809 uint32_t _ptr_info2;
1810 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
1811 if (_ptr_info2) {
1812 NDR_PULL_ALLOC(ndr, r->info2);
1813 } else {
1814 r->info2 = NULL;
1816 break; }
1818 case 3: {
1819 uint32_t _ptr_info3;
1820 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info3));
1821 if (_ptr_info3) {
1822 NDR_PULL_ALLOC(ndr, r->info3);
1823 } else {
1824 r->info3 = NULL;
1826 break; }
1828 case 4: {
1829 uint32_t _ptr_info4;
1830 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info4));
1831 if (_ptr_info4) {
1832 NDR_PULL_ALLOC(ndr, r->info4);
1833 } else {
1834 r->info4 = NULL;
1836 break; }
1838 case 5: {
1839 uint32_t _ptr_info5;
1840 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info5));
1841 if (_ptr_info5) {
1842 NDR_PULL_ALLOC(ndr, r->info5);
1843 } else {
1844 r->info5 = NULL;
1846 break; }
1848 case 6: {
1849 uint32_t _ptr_info6;
1850 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info6));
1851 if (_ptr_info6) {
1852 NDR_PULL_ALLOC(ndr, r->info6);
1853 } else {
1854 r->info6 = NULL;
1856 break; }
1858 case 7: {
1859 uint32_t _ptr_info7;
1860 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info7));
1861 if (_ptr_info7) {
1862 NDR_PULL_ALLOC(ndr, r->info7);
1863 } else {
1864 r->info7 = NULL;
1866 break; }
1868 case 100: {
1869 uint32_t _ptr_info100;
1870 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info100));
1871 if (_ptr_info100) {
1872 NDR_PULL_ALLOC(ndr, r->info100);
1873 } else {
1874 r->info100 = NULL;
1876 break; }
1878 case 101: {
1879 uint32_t _ptr_info101;
1880 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info101));
1881 if (_ptr_info101) {
1882 NDR_PULL_ALLOC(ndr, r->info101);
1883 } else {
1884 r->info101 = NULL;
1886 break; }
1888 case 102: {
1889 uint32_t _ptr_info102;
1890 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info102));
1891 if (_ptr_info102) {
1892 NDR_PULL_ALLOC(ndr, r->info102);
1893 } else {
1894 r->info102 = NULL;
1896 break; }
1898 case 103: {
1899 uint32_t _ptr_info103;
1900 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info103));
1901 if (_ptr_info103) {
1902 NDR_PULL_ALLOC(ndr, r->info103);
1903 } else {
1904 r->info103 = NULL;
1906 break; }
1908 case 104: {
1909 uint32_t _ptr_info104;
1910 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info104));
1911 if (_ptr_info104) {
1912 NDR_PULL_ALLOC(ndr, r->info104);
1913 } else {
1914 r->info104 = NULL;
1916 break; }
1918 case 105: {
1919 uint32_t _ptr_info105;
1920 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info105));
1921 if (_ptr_info105) {
1922 NDR_PULL_ALLOC(ndr, r->info105);
1923 } else {
1924 r->info105 = NULL;
1926 break; }
1928 case 106: {
1929 uint32_t _ptr_info106;
1930 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info106));
1931 if (_ptr_info106) {
1932 NDR_PULL_ALLOC(ndr, r->info106);
1933 } else {
1934 r->info106 = NULL;
1936 break; }
1938 default:
1939 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
1942 if (ndr_flags & NDR_BUFFERS) {
1943 switch (level) {
1944 case 0:
1945 if (r->info0) {
1946 _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
1947 NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
1948 NDR_CHECK(ndr_pull_dfs_Info0(ndr, NDR_SCALARS, r->info0));
1949 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
1951 break;
1953 case 1:
1954 if (r->info1) {
1955 _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
1956 NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
1957 NDR_CHECK(ndr_pull_dfs_Info1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
1958 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
1960 break;
1962 case 2:
1963 if (r->info2) {
1964 _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
1965 NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
1966 NDR_CHECK(ndr_pull_dfs_Info2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
1967 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
1969 break;
1971 case 3:
1972 if (r->info3) {
1973 _mem_save_info3_0 = NDR_PULL_GET_MEM_CTX(ndr);
1974 NDR_PULL_SET_MEM_CTX(ndr, r->info3, 0);
1975 NDR_CHECK(ndr_pull_dfs_Info3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
1976 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info3_0, 0);
1978 break;
1980 case 4:
1981 if (r->info4) {
1982 _mem_save_info4_0 = NDR_PULL_GET_MEM_CTX(ndr);
1983 NDR_PULL_SET_MEM_CTX(ndr, r->info4, 0);
1984 NDR_CHECK(ndr_pull_dfs_Info4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
1985 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info4_0, 0);
1987 break;
1989 case 5:
1990 if (r->info5) {
1991 _mem_save_info5_0 = NDR_PULL_GET_MEM_CTX(ndr);
1992 NDR_PULL_SET_MEM_CTX(ndr, r->info5, 0);
1993 NDR_CHECK(ndr_pull_dfs_Info5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5));
1994 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info5_0, 0);
1996 break;
1998 case 6:
1999 if (r->info6) {
2000 _mem_save_info6_0 = NDR_PULL_GET_MEM_CTX(ndr);
2001 NDR_PULL_SET_MEM_CTX(ndr, r->info6, 0);
2002 NDR_CHECK(ndr_pull_dfs_Info6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6));
2003 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info6_0, 0);
2005 break;
2007 case 7:
2008 if (r->info7) {
2009 _mem_save_info7_0 = NDR_PULL_GET_MEM_CTX(ndr);
2010 NDR_PULL_SET_MEM_CTX(ndr, r->info7, 0);
2011 NDR_CHECK(ndr_pull_dfs_Info7(ndr, NDR_SCALARS, r->info7));
2012 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info7_0, 0);
2014 break;
2016 case 100:
2017 if (r->info100) {
2018 _mem_save_info100_0 = NDR_PULL_GET_MEM_CTX(ndr);
2019 NDR_PULL_SET_MEM_CTX(ndr, r->info100, 0);
2020 NDR_CHECK(ndr_pull_dfs_Info100(ndr, NDR_SCALARS|NDR_BUFFERS, r->info100));
2021 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info100_0, 0);
2023 break;
2025 case 101:
2026 if (r->info101) {
2027 _mem_save_info101_0 = NDR_PULL_GET_MEM_CTX(ndr);
2028 NDR_PULL_SET_MEM_CTX(ndr, r->info101, 0);
2029 NDR_CHECK(ndr_pull_dfs_Info101(ndr, NDR_SCALARS, r->info101));
2030 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info101_0, 0);
2032 break;
2034 case 102:
2035 if (r->info102) {
2036 _mem_save_info102_0 = NDR_PULL_GET_MEM_CTX(ndr);
2037 NDR_PULL_SET_MEM_CTX(ndr, r->info102, 0);
2038 NDR_CHECK(ndr_pull_dfs_Info102(ndr, NDR_SCALARS, r->info102));
2039 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info102_0, 0);
2041 break;
2043 case 103:
2044 if (r->info103) {
2045 _mem_save_info103_0 = NDR_PULL_GET_MEM_CTX(ndr);
2046 NDR_PULL_SET_MEM_CTX(ndr, r->info103, 0);
2047 NDR_CHECK(ndr_pull_dfs_Info103(ndr, NDR_SCALARS, r->info103));
2048 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info103_0, 0);
2050 break;
2052 case 104:
2053 if (r->info104) {
2054 _mem_save_info104_0 = NDR_PULL_GET_MEM_CTX(ndr);
2055 NDR_PULL_SET_MEM_CTX(ndr, r->info104, 0);
2056 NDR_CHECK(ndr_pull_dfs_Info104(ndr, NDR_SCALARS, r->info104));
2057 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info104_0, 0);
2059 break;
2061 case 105:
2062 if (r->info105) {
2063 _mem_save_info105_0 = NDR_PULL_GET_MEM_CTX(ndr);
2064 NDR_PULL_SET_MEM_CTX(ndr, r->info105, 0);
2065 NDR_CHECK(ndr_pull_dfs_Info105(ndr, NDR_SCALARS|NDR_BUFFERS, r->info105));
2066 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info105_0, 0);
2068 break;
2070 case 106:
2071 if (r->info106) {
2072 _mem_save_info106_0 = NDR_PULL_GET_MEM_CTX(ndr);
2073 NDR_PULL_SET_MEM_CTX(ndr, r->info106, 0);
2074 NDR_CHECK(ndr_pull_dfs_Info106(ndr, NDR_SCALARS, r->info106));
2075 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info106_0, 0);
2077 break;
2079 default:
2080 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
2083 return NDR_ERR_SUCCESS;
2086 _PUBLIC_ void ndr_print_dfs_Info(struct ndr_print *ndr, const char *name, const union dfs_Info *r)
2088 int level;
2089 level = ndr_print_get_switch_value(ndr, r);
2090 ndr_print_union(ndr, name, level, "dfs_Info");
2091 switch (level) {
2092 case 0:
2093 ndr_print_ptr(ndr, "info0", r->info0);
2094 ndr->depth++;
2095 if (r->info0) {
2096 ndr_print_dfs_Info0(ndr, "info0", r->info0);
2098 ndr->depth--;
2099 break;
2101 case 1:
2102 ndr_print_ptr(ndr, "info1", r->info1);
2103 ndr->depth++;
2104 if (r->info1) {
2105 ndr_print_dfs_Info1(ndr, "info1", r->info1);
2107 ndr->depth--;
2108 break;
2110 case 2:
2111 ndr_print_ptr(ndr, "info2", r->info2);
2112 ndr->depth++;
2113 if (r->info2) {
2114 ndr_print_dfs_Info2(ndr, "info2", r->info2);
2116 ndr->depth--;
2117 break;
2119 case 3:
2120 ndr_print_ptr(ndr, "info3", r->info3);
2121 ndr->depth++;
2122 if (r->info3) {
2123 ndr_print_dfs_Info3(ndr, "info3", r->info3);
2125 ndr->depth--;
2126 break;
2128 case 4:
2129 ndr_print_ptr(ndr, "info4", r->info4);
2130 ndr->depth++;
2131 if (r->info4) {
2132 ndr_print_dfs_Info4(ndr, "info4", r->info4);
2134 ndr->depth--;
2135 break;
2137 case 5:
2138 ndr_print_ptr(ndr, "info5", r->info5);
2139 ndr->depth++;
2140 if (r->info5) {
2141 ndr_print_dfs_Info5(ndr, "info5", r->info5);
2143 ndr->depth--;
2144 break;
2146 case 6:
2147 ndr_print_ptr(ndr, "info6", r->info6);
2148 ndr->depth++;
2149 if (r->info6) {
2150 ndr_print_dfs_Info6(ndr, "info6", r->info6);
2152 ndr->depth--;
2153 break;
2155 case 7:
2156 ndr_print_ptr(ndr, "info7", r->info7);
2157 ndr->depth++;
2158 if (r->info7) {
2159 ndr_print_dfs_Info7(ndr, "info7", r->info7);
2161 ndr->depth--;
2162 break;
2164 case 100:
2165 ndr_print_ptr(ndr, "info100", r->info100);
2166 ndr->depth++;
2167 if (r->info100) {
2168 ndr_print_dfs_Info100(ndr, "info100", r->info100);
2170 ndr->depth--;
2171 break;
2173 case 101:
2174 ndr_print_ptr(ndr, "info101", r->info101);
2175 ndr->depth++;
2176 if (r->info101) {
2177 ndr_print_dfs_Info101(ndr, "info101", r->info101);
2179 ndr->depth--;
2180 break;
2182 case 102:
2183 ndr_print_ptr(ndr, "info102", r->info102);
2184 ndr->depth++;
2185 if (r->info102) {
2186 ndr_print_dfs_Info102(ndr, "info102", r->info102);
2188 ndr->depth--;
2189 break;
2191 case 103:
2192 ndr_print_ptr(ndr, "info103", r->info103);
2193 ndr->depth++;
2194 if (r->info103) {
2195 ndr_print_dfs_Info103(ndr, "info103", r->info103);
2197 ndr->depth--;
2198 break;
2200 case 104:
2201 ndr_print_ptr(ndr, "info104", r->info104);
2202 ndr->depth++;
2203 if (r->info104) {
2204 ndr_print_dfs_Info104(ndr, "info104", r->info104);
2206 ndr->depth--;
2207 break;
2209 case 105:
2210 ndr_print_ptr(ndr, "info105", r->info105);
2211 ndr->depth++;
2212 if (r->info105) {
2213 ndr_print_dfs_Info105(ndr, "info105", r->info105);
2215 ndr->depth--;
2216 break;
2218 case 106:
2219 ndr_print_ptr(ndr, "info106", r->info106);
2220 ndr->depth++;
2221 if (r->info106) {
2222 ndr_print_dfs_Info106(ndr, "info106", r->info106);
2224 ndr->depth--;
2225 break;
2227 default:
2228 ndr_print_bad_level(ndr, name, level);
2232 static enum ndr_err_code ndr_push_dfs_EnumArray1(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray1 *r)
2234 uint32_t cntr_s_1;
2235 if (ndr_flags & NDR_SCALARS) {
2236 NDR_CHECK(ndr_push_align(ndr, 5));
2237 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2238 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2239 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2241 if (ndr_flags & NDR_BUFFERS) {
2242 if (r->s) {
2243 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
2244 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2245 NDR_CHECK(ndr_push_dfs_Info1(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2247 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2248 NDR_CHECK(ndr_push_dfs_Info1(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2252 return NDR_ERR_SUCCESS;
2255 static enum ndr_err_code ndr_pull_dfs_EnumArray1(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray1 *r)
2257 uint32_t _ptr_s;
2258 uint32_t cntr_s_1;
2259 TALLOC_CTX *_mem_save_s_0;
2260 TALLOC_CTX *_mem_save_s_1;
2261 if (ndr_flags & NDR_SCALARS) {
2262 NDR_CHECK(ndr_pull_align(ndr, 5));
2263 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2264 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2265 if (_ptr_s) {
2266 NDR_PULL_ALLOC(ndr, r->s);
2267 } else {
2268 r->s = NULL;
2270 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2272 if (ndr_flags & NDR_BUFFERS) {
2273 if (r->s) {
2274 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2275 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2276 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2277 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
2278 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2279 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2280 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2281 NDR_CHECK(ndr_pull_dfs_Info1(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2283 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2284 NDR_CHECK(ndr_pull_dfs_Info1(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2286 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2287 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2289 if (r->s) {
2290 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2293 return NDR_ERR_SUCCESS;
2296 _PUBLIC_ void ndr_print_dfs_EnumArray1(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray1 *r)
2298 uint32_t cntr_s_1;
2299 ndr_print_struct(ndr, name, "dfs_EnumArray1");
2300 ndr->depth++;
2301 ndr_print_uint32(ndr, "count", r->count);
2302 ndr_print_ptr(ndr, "s", r->s);
2303 ndr->depth++;
2304 if (r->s) {
2305 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
2306 ndr->depth++;
2307 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2308 char *idx_1=NULL;
2309 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2310 ndr_print_dfs_Info1(ndr, "s", &r->s[cntr_s_1]);
2311 free(idx_1);
2314 ndr->depth--;
2316 ndr->depth--;
2317 ndr->depth--;
2320 static enum ndr_err_code ndr_push_dfs_EnumArray2(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray2 *r)
2322 uint32_t cntr_s_1;
2323 if (ndr_flags & NDR_SCALARS) {
2324 NDR_CHECK(ndr_push_align(ndr, 5));
2325 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2326 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2327 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2329 if (ndr_flags & NDR_BUFFERS) {
2330 if (r->s) {
2331 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
2332 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2333 NDR_CHECK(ndr_push_dfs_Info2(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2335 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2336 NDR_CHECK(ndr_push_dfs_Info2(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2340 return NDR_ERR_SUCCESS;
2343 static enum ndr_err_code ndr_pull_dfs_EnumArray2(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray2 *r)
2345 uint32_t _ptr_s;
2346 uint32_t cntr_s_1;
2347 TALLOC_CTX *_mem_save_s_0;
2348 TALLOC_CTX *_mem_save_s_1;
2349 if (ndr_flags & NDR_SCALARS) {
2350 NDR_CHECK(ndr_pull_align(ndr, 5));
2351 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2352 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2353 if (_ptr_s) {
2354 NDR_PULL_ALLOC(ndr, r->s);
2355 } else {
2356 r->s = NULL;
2358 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2360 if (ndr_flags & NDR_BUFFERS) {
2361 if (r->s) {
2362 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2363 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2364 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2365 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
2366 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2367 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2368 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2369 NDR_CHECK(ndr_pull_dfs_Info2(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2371 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2372 NDR_CHECK(ndr_pull_dfs_Info2(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2374 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2375 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2377 if (r->s) {
2378 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2381 return NDR_ERR_SUCCESS;
2384 _PUBLIC_ void ndr_print_dfs_EnumArray2(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray2 *r)
2386 uint32_t cntr_s_1;
2387 ndr_print_struct(ndr, name, "dfs_EnumArray2");
2388 ndr->depth++;
2389 ndr_print_uint32(ndr, "count", r->count);
2390 ndr_print_ptr(ndr, "s", r->s);
2391 ndr->depth++;
2392 if (r->s) {
2393 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
2394 ndr->depth++;
2395 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2396 char *idx_1=NULL;
2397 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2398 ndr_print_dfs_Info2(ndr, "s", &r->s[cntr_s_1]);
2399 free(idx_1);
2402 ndr->depth--;
2404 ndr->depth--;
2405 ndr->depth--;
2408 static enum ndr_err_code ndr_push_dfs_EnumArray3(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray3 *r)
2410 uint32_t cntr_s_1;
2411 if (ndr_flags & NDR_SCALARS) {
2412 NDR_CHECK(ndr_push_align(ndr, 5));
2413 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2414 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2415 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2417 if (ndr_flags & NDR_BUFFERS) {
2418 if (r->s) {
2419 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
2420 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2421 NDR_CHECK(ndr_push_dfs_Info3(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2423 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2424 NDR_CHECK(ndr_push_dfs_Info3(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2428 return NDR_ERR_SUCCESS;
2431 static enum ndr_err_code ndr_pull_dfs_EnumArray3(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray3 *r)
2433 uint32_t _ptr_s;
2434 uint32_t cntr_s_1;
2435 TALLOC_CTX *_mem_save_s_0;
2436 TALLOC_CTX *_mem_save_s_1;
2437 if (ndr_flags & NDR_SCALARS) {
2438 NDR_CHECK(ndr_pull_align(ndr, 5));
2439 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2440 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2441 if (_ptr_s) {
2442 NDR_PULL_ALLOC(ndr, r->s);
2443 } else {
2444 r->s = NULL;
2446 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2448 if (ndr_flags & NDR_BUFFERS) {
2449 if (r->s) {
2450 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2451 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2452 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2453 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
2454 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2455 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2456 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2457 NDR_CHECK(ndr_pull_dfs_Info3(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2459 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2460 NDR_CHECK(ndr_pull_dfs_Info3(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2462 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2463 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2465 if (r->s) {
2466 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2469 return NDR_ERR_SUCCESS;
2472 _PUBLIC_ void ndr_print_dfs_EnumArray3(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray3 *r)
2474 uint32_t cntr_s_1;
2475 ndr_print_struct(ndr, name, "dfs_EnumArray3");
2476 ndr->depth++;
2477 ndr_print_uint32(ndr, "count", r->count);
2478 ndr_print_ptr(ndr, "s", r->s);
2479 ndr->depth++;
2480 if (r->s) {
2481 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
2482 ndr->depth++;
2483 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2484 char *idx_1=NULL;
2485 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2486 ndr_print_dfs_Info3(ndr, "s", &r->s[cntr_s_1]);
2487 free(idx_1);
2490 ndr->depth--;
2492 ndr->depth--;
2493 ndr->depth--;
2496 static enum ndr_err_code ndr_push_dfs_EnumArray4(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray4 *r)
2498 uint32_t cntr_s_1;
2499 if (ndr_flags & NDR_SCALARS) {
2500 NDR_CHECK(ndr_push_align(ndr, 5));
2501 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2502 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2503 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2505 if (ndr_flags & NDR_BUFFERS) {
2506 if (r->s) {
2507 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
2508 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2509 NDR_CHECK(ndr_push_dfs_Info4(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2511 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2512 NDR_CHECK(ndr_push_dfs_Info4(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2516 return NDR_ERR_SUCCESS;
2519 static enum ndr_err_code ndr_pull_dfs_EnumArray4(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray4 *r)
2521 uint32_t _ptr_s;
2522 uint32_t cntr_s_1;
2523 TALLOC_CTX *_mem_save_s_0;
2524 TALLOC_CTX *_mem_save_s_1;
2525 if (ndr_flags & NDR_SCALARS) {
2526 NDR_CHECK(ndr_pull_align(ndr, 5));
2527 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2528 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2529 if (_ptr_s) {
2530 NDR_PULL_ALLOC(ndr, r->s);
2531 } else {
2532 r->s = NULL;
2534 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2536 if (ndr_flags & NDR_BUFFERS) {
2537 if (r->s) {
2538 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2539 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2540 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2541 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
2542 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2543 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2544 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2545 NDR_CHECK(ndr_pull_dfs_Info4(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2547 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2548 NDR_CHECK(ndr_pull_dfs_Info4(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2550 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2551 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2553 if (r->s) {
2554 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2557 return NDR_ERR_SUCCESS;
2560 _PUBLIC_ void ndr_print_dfs_EnumArray4(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray4 *r)
2562 uint32_t cntr_s_1;
2563 ndr_print_struct(ndr, name, "dfs_EnumArray4");
2564 ndr->depth++;
2565 ndr_print_uint32(ndr, "count", r->count);
2566 ndr_print_ptr(ndr, "s", r->s);
2567 ndr->depth++;
2568 if (r->s) {
2569 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
2570 ndr->depth++;
2571 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2572 char *idx_1=NULL;
2573 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2574 ndr_print_dfs_Info4(ndr, "s", &r->s[cntr_s_1]);
2575 free(idx_1);
2578 ndr->depth--;
2580 ndr->depth--;
2581 ndr->depth--;
2584 static enum ndr_err_code ndr_push_dfs_EnumArray5(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray5 *r)
2586 uint32_t cntr_s_1;
2587 if (ndr_flags & NDR_SCALARS) {
2588 NDR_CHECK(ndr_push_align(ndr, 5));
2589 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2590 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2591 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2593 if (ndr_flags & NDR_BUFFERS) {
2594 if (r->s) {
2595 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
2596 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2597 NDR_CHECK(ndr_push_dfs_Info5(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2599 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2600 NDR_CHECK(ndr_push_dfs_Info5(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2604 return NDR_ERR_SUCCESS;
2607 static enum ndr_err_code ndr_pull_dfs_EnumArray5(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray5 *r)
2609 uint32_t _ptr_s;
2610 uint32_t cntr_s_1;
2611 TALLOC_CTX *_mem_save_s_0;
2612 TALLOC_CTX *_mem_save_s_1;
2613 if (ndr_flags & NDR_SCALARS) {
2614 NDR_CHECK(ndr_pull_align(ndr, 5));
2615 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2616 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2617 if (_ptr_s) {
2618 NDR_PULL_ALLOC(ndr, r->s);
2619 } else {
2620 r->s = NULL;
2622 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2624 if (ndr_flags & NDR_BUFFERS) {
2625 if (r->s) {
2626 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2627 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2628 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2629 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
2630 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2631 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2632 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2633 NDR_CHECK(ndr_pull_dfs_Info5(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2635 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2636 NDR_CHECK(ndr_pull_dfs_Info5(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2638 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2639 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2641 if (r->s) {
2642 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2645 return NDR_ERR_SUCCESS;
2648 _PUBLIC_ void ndr_print_dfs_EnumArray5(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray5 *r)
2650 uint32_t cntr_s_1;
2651 ndr_print_struct(ndr, name, "dfs_EnumArray5");
2652 ndr->depth++;
2653 ndr_print_uint32(ndr, "count", r->count);
2654 ndr_print_ptr(ndr, "s", r->s);
2655 ndr->depth++;
2656 if (r->s) {
2657 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
2658 ndr->depth++;
2659 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2660 char *idx_1=NULL;
2661 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2662 ndr_print_dfs_Info5(ndr, "s", &r->s[cntr_s_1]);
2663 free(idx_1);
2666 ndr->depth--;
2668 ndr->depth--;
2669 ndr->depth--;
2672 static enum ndr_err_code ndr_push_dfs_EnumArray6(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray6 *r)
2674 uint32_t cntr_s_1;
2675 if (ndr_flags & NDR_SCALARS) {
2676 NDR_CHECK(ndr_push_align(ndr, 5));
2677 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2678 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2679 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2681 if (ndr_flags & NDR_BUFFERS) {
2682 if (r->s) {
2683 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
2684 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2685 NDR_CHECK(ndr_push_dfs_Info6(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2687 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2688 NDR_CHECK(ndr_push_dfs_Info6(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2692 return NDR_ERR_SUCCESS;
2695 static enum ndr_err_code ndr_pull_dfs_EnumArray6(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray6 *r)
2697 uint32_t _ptr_s;
2698 uint32_t cntr_s_1;
2699 TALLOC_CTX *_mem_save_s_0;
2700 TALLOC_CTX *_mem_save_s_1;
2701 if (ndr_flags & NDR_SCALARS) {
2702 NDR_CHECK(ndr_pull_align(ndr, 5));
2703 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2704 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2705 if (_ptr_s) {
2706 NDR_PULL_ALLOC(ndr, r->s);
2707 } else {
2708 r->s = NULL;
2710 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2712 if (ndr_flags & NDR_BUFFERS) {
2713 if (r->s) {
2714 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2715 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2716 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2717 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
2718 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2719 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2720 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2721 NDR_CHECK(ndr_pull_dfs_Info6(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2723 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2724 NDR_CHECK(ndr_pull_dfs_Info6(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2726 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2727 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2729 if (r->s) {
2730 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2733 return NDR_ERR_SUCCESS;
2736 _PUBLIC_ void ndr_print_dfs_EnumArray6(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray6 *r)
2738 uint32_t cntr_s_1;
2739 ndr_print_struct(ndr, name, "dfs_EnumArray6");
2740 ndr->depth++;
2741 ndr_print_uint32(ndr, "count", r->count);
2742 ndr_print_ptr(ndr, "s", r->s);
2743 ndr->depth++;
2744 if (r->s) {
2745 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
2746 ndr->depth++;
2747 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2748 char *idx_1=NULL;
2749 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2750 ndr_print_dfs_Info6(ndr, "s", &r->s[cntr_s_1]);
2751 free(idx_1);
2754 ndr->depth--;
2756 ndr->depth--;
2757 ndr->depth--;
2760 static enum ndr_err_code ndr_push_dfs_EnumArray200(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray200 *r)
2762 uint32_t cntr_s_1;
2763 if (ndr_flags & NDR_SCALARS) {
2764 NDR_CHECK(ndr_push_align(ndr, 5));
2765 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2766 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2767 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2769 if (ndr_flags & NDR_BUFFERS) {
2770 if (r->s) {
2771 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
2772 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2773 NDR_CHECK(ndr_push_dfs_Info200(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2775 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2776 NDR_CHECK(ndr_push_dfs_Info200(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2780 return NDR_ERR_SUCCESS;
2783 static enum ndr_err_code ndr_pull_dfs_EnumArray200(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray200 *r)
2785 uint32_t _ptr_s;
2786 uint32_t cntr_s_1;
2787 TALLOC_CTX *_mem_save_s_0;
2788 TALLOC_CTX *_mem_save_s_1;
2789 if (ndr_flags & NDR_SCALARS) {
2790 NDR_CHECK(ndr_pull_align(ndr, 5));
2791 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2792 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2793 if (_ptr_s) {
2794 NDR_PULL_ALLOC(ndr, r->s);
2795 } else {
2796 r->s = NULL;
2798 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2800 if (ndr_flags & NDR_BUFFERS) {
2801 if (r->s) {
2802 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2803 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2804 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2805 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
2806 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2807 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2808 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2809 NDR_CHECK(ndr_pull_dfs_Info200(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2811 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2812 NDR_CHECK(ndr_pull_dfs_Info200(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2814 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2815 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2817 if (r->s) {
2818 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2821 return NDR_ERR_SUCCESS;
2824 _PUBLIC_ void ndr_print_dfs_EnumArray200(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray200 *r)
2826 uint32_t cntr_s_1;
2827 ndr_print_struct(ndr, name, "dfs_EnumArray200");
2828 ndr->depth++;
2829 ndr_print_uint32(ndr, "count", r->count);
2830 ndr_print_ptr(ndr, "s", r->s);
2831 ndr->depth++;
2832 if (r->s) {
2833 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
2834 ndr->depth++;
2835 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2836 char *idx_1=NULL;
2837 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2838 ndr_print_dfs_Info200(ndr, "s", &r->s[cntr_s_1]);
2839 free(idx_1);
2842 ndr->depth--;
2844 ndr->depth--;
2845 ndr->depth--;
2848 static enum ndr_err_code ndr_push_dfs_EnumArray300(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray300 *r)
2850 uint32_t cntr_s_1;
2851 if (ndr_flags & NDR_SCALARS) {
2852 NDR_CHECK(ndr_push_align(ndr, 5));
2853 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2854 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2855 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
2857 if (ndr_flags & NDR_BUFFERS) {
2858 if (r->s) {
2859 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->count));
2860 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2861 NDR_CHECK(ndr_push_dfs_Info300(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2863 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2864 NDR_CHECK(ndr_push_dfs_Info300(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2868 return NDR_ERR_SUCCESS;
2871 static enum ndr_err_code ndr_pull_dfs_EnumArray300(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray300 *r)
2873 uint32_t _ptr_s;
2874 uint32_t cntr_s_1;
2875 TALLOC_CTX *_mem_save_s_0;
2876 TALLOC_CTX *_mem_save_s_1;
2877 if (ndr_flags & NDR_SCALARS) {
2878 NDR_CHECK(ndr_pull_align(ndr, 5));
2879 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2880 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2881 if (_ptr_s) {
2882 NDR_PULL_ALLOC(ndr, r->s);
2883 } else {
2884 r->s = NULL;
2886 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
2888 if (ndr_flags & NDR_BUFFERS) {
2889 if (r->s) {
2890 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2891 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2892 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2893 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
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 < r->count; cntr_s_1++) {
2897 NDR_CHECK(ndr_pull_dfs_Info300(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2899 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2900 NDR_CHECK(ndr_pull_dfs_Info300(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_EnumArray300(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray300 *r)
2914 uint32_t cntr_s_1;
2915 ndr_print_struct(ndr, name, "dfs_EnumArray300");
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_Info300(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_EnumInfo(struct ndr_push *ndr, int ndr_flags, const union dfs_EnumInfo *r)
2938 if (ndr_flags & NDR_SCALARS) {
2939 int level = ndr_push_get_switch_value(ndr, r);
2940 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
2941 NDR_CHECK(ndr_push_union_align(ndr, 5));
2942 switch (level) {
2943 case 1: {
2944 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
2945 break; }
2947 case 2: {
2948 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
2949 break; }
2951 case 3: {
2952 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3));
2953 break; }
2955 case 4: {
2956 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info4));
2957 break; }
2959 case 5: {
2960 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info5));
2961 break; }
2963 case 6: {
2964 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info6));
2965 break; }
2967 case 200: {
2968 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info200));
2969 break; }
2971 case 300: {
2972 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info300));
2973 break; }
2975 default:
2976 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
2979 if (ndr_flags & NDR_BUFFERS) {
2980 int level = ndr_push_get_switch_value(ndr, r);
2981 switch (level) {
2982 case 1:
2983 if (r->info1) {
2984 NDR_CHECK(ndr_push_dfs_EnumArray1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
2986 break;
2988 case 2:
2989 if (r->info2) {
2990 NDR_CHECK(ndr_push_dfs_EnumArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
2992 break;
2994 case 3:
2995 if (r->info3) {
2996 NDR_CHECK(ndr_push_dfs_EnumArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
2998 break;
3000 case 4:
3001 if (r->info4) {
3002 NDR_CHECK(ndr_push_dfs_EnumArray4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
3004 break;
3006 case 5:
3007 if (r->info5) {
3008 NDR_CHECK(ndr_push_dfs_EnumArray5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5));
3010 break;
3012 case 6:
3013 if (r->info6) {
3014 NDR_CHECK(ndr_push_dfs_EnumArray6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6));
3016 break;
3018 case 200:
3019 if (r->info200) {
3020 NDR_CHECK(ndr_push_dfs_EnumArray200(ndr, NDR_SCALARS|NDR_BUFFERS, r->info200));
3022 break;
3024 case 300:
3025 if (r->info300) {
3026 NDR_CHECK(ndr_push_dfs_EnumArray300(ndr, NDR_SCALARS|NDR_BUFFERS, r->info300));
3028 break;
3030 default:
3031 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3034 return NDR_ERR_SUCCESS;
3037 static enum ndr_err_code ndr_pull_dfs_EnumInfo(struct ndr_pull *ndr, int ndr_flags, union dfs_EnumInfo *r)
3039 int level;
3040 uint32_t _level;
3041 TALLOC_CTX *_mem_save_info1_0;
3042 TALLOC_CTX *_mem_save_info2_0;
3043 TALLOC_CTX *_mem_save_info3_0;
3044 TALLOC_CTX *_mem_save_info4_0;
3045 TALLOC_CTX *_mem_save_info5_0;
3046 TALLOC_CTX *_mem_save_info6_0;
3047 TALLOC_CTX *_mem_save_info200_0;
3048 TALLOC_CTX *_mem_save_info300_0;
3049 level = ndr_pull_get_switch_value(ndr, r);
3050 if (ndr_flags & NDR_SCALARS) {
3051 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
3052 if (_level != level) {
3053 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r at %s", _level, __location__);
3055 NDR_CHECK(ndr_pull_union_align(ndr, 5));
3056 switch (level) {
3057 case 1: {
3058 uint32_t _ptr_info1;
3059 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
3060 if (_ptr_info1) {
3061 NDR_PULL_ALLOC(ndr, r->info1);
3062 } else {
3063 r->info1 = NULL;
3065 break; }
3067 case 2: {
3068 uint32_t _ptr_info2;
3069 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
3070 if (_ptr_info2) {
3071 NDR_PULL_ALLOC(ndr, r->info2);
3072 } else {
3073 r->info2 = NULL;
3075 break; }
3077 case 3: {
3078 uint32_t _ptr_info3;
3079 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info3));
3080 if (_ptr_info3) {
3081 NDR_PULL_ALLOC(ndr, r->info3);
3082 } else {
3083 r->info3 = NULL;
3085 break; }
3087 case 4: {
3088 uint32_t _ptr_info4;
3089 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info4));
3090 if (_ptr_info4) {
3091 NDR_PULL_ALLOC(ndr, r->info4);
3092 } else {
3093 r->info4 = NULL;
3095 break; }
3097 case 5: {
3098 uint32_t _ptr_info5;
3099 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info5));
3100 if (_ptr_info5) {
3101 NDR_PULL_ALLOC(ndr, r->info5);
3102 } else {
3103 r->info5 = NULL;
3105 break; }
3107 case 6: {
3108 uint32_t _ptr_info6;
3109 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info6));
3110 if (_ptr_info6) {
3111 NDR_PULL_ALLOC(ndr, r->info6);
3112 } else {
3113 r->info6 = NULL;
3115 break; }
3117 case 200: {
3118 uint32_t _ptr_info200;
3119 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info200));
3120 if (_ptr_info200) {
3121 NDR_PULL_ALLOC(ndr, r->info200);
3122 } else {
3123 r->info200 = NULL;
3125 break; }
3127 case 300: {
3128 uint32_t _ptr_info300;
3129 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info300));
3130 if (_ptr_info300) {
3131 NDR_PULL_ALLOC(ndr, r->info300);
3132 } else {
3133 r->info300 = NULL;
3135 break; }
3137 default:
3138 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3141 if (ndr_flags & NDR_BUFFERS) {
3142 switch (level) {
3143 case 1:
3144 if (r->info1) {
3145 _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
3146 NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
3147 NDR_CHECK(ndr_pull_dfs_EnumArray1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
3148 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
3150 break;
3152 case 2:
3153 if (r->info2) {
3154 _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
3155 NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
3156 NDR_CHECK(ndr_pull_dfs_EnumArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
3157 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
3159 break;
3161 case 3:
3162 if (r->info3) {
3163 _mem_save_info3_0 = NDR_PULL_GET_MEM_CTX(ndr);
3164 NDR_PULL_SET_MEM_CTX(ndr, r->info3, 0);
3165 NDR_CHECK(ndr_pull_dfs_EnumArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
3166 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info3_0, 0);
3168 break;
3170 case 4:
3171 if (r->info4) {
3172 _mem_save_info4_0 = NDR_PULL_GET_MEM_CTX(ndr);
3173 NDR_PULL_SET_MEM_CTX(ndr, r->info4, 0);
3174 NDR_CHECK(ndr_pull_dfs_EnumArray4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
3175 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info4_0, 0);
3177 break;
3179 case 5:
3180 if (r->info5) {
3181 _mem_save_info5_0 = NDR_PULL_GET_MEM_CTX(ndr);
3182 NDR_PULL_SET_MEM_CTX(ndr, r->info5, 0);
3183 NDR_CHECK(ndr_pull_dfs_EnumArray5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5));
3184 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info5_0, 0);
3186 break;
3188 case 6:
3189 if (r->info6) {
3190 _mem_save_info6_0 = NDR_PULL_GET_MEM_CTX(ndr);
3191 NDR_PULL_SET_MEM_CTX(ndr, r->info6, 0);
3192 NDR_CHECK(ndr_pull_dfs_EnumArray6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6));
3193 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info6_0, 0);
3195 break;
3197 case 200:
3198 if (r->info200) {
3199 _mem_save_info200_0 = NDR_PULL_GET_MEM_CTX(ndr);
3200 NDR_PULL_SET_MEM_CTX(ndr, r->info200, 0);
3201 NDR_CHECK(ndr_pull_dfs_EnumArray200(ndr, NDR_SCALARS|NDR_BUFFERS, r->info200));
3202 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info200_0, 0);
3204 break;
3206 case 300:
3207 if (r->info300) {
3208 _mem_save_info300_0 = NDR_PULL_GET_MEM_CTX(ndr);
3209 NDR_PULL_SET_MEM_CTX(ndr, r->info300, 0);
3210 NDR_CHECK(ndr_pull_dfs_EnumArray300(ndr, NDR_SCALARS|NDR_BUFFERS, r->info300));
3211 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info300_0, 0);
3213 break;
3215 default:
3216 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u at %s", level, __location__);
3219 return NDR_ERR_SUCCESS;
3222 _PUBLIC_ void ndr_print_dfs_EnumInfo(struct ndr_print *ndr, const char *name, const union dfs_EnumInfo *r)
3224 int level;
3225 level = ndr_print_get_switch_value(ndr, r);
3226 ndr_print_union(ndr, name, level, "dfs_EnumInfo");
3227 switch (level) {
3228 case 1:
3229 ndr_print_ptr(ndr, "info1", r->info1);
3230 ndr->depth++;
3231 if (r->info1) {
3232 ndr_print_dfs_EnumArray1(ndr, "info1", r->info1);
3234 ndr->depth--;
3235 break;
3237 case 2:
3238 ndr_print_ptr(ndr, "info2", r->info2);
3239 ndr->depth++;
3240 if (r->info2) {
3241 ndr_print_dfs_EnumArray2(ndr, "info2", r->info2);
3243 ndr->depth--;
3244 break;
3246 case 3:
3247 ndr_print_ptr(ndr, "info3", r->info3);
3248 ndr->depth++;
3249 if (r->info3) {
3250 ndr_print_dfs_EnumArray3(ndr, "info3", r->info3);
3252 ndr->depth--;
3253 break;
3255 case 4:
3256 ndr_print_ptr(ndr, "info4", r->info4);
3257 ndr->depth++;
3258 if (r->info4) {
3259 ndr_print_dfs_EnumArray4(ndr, "info4", r->info4);
3261 ndr->depth--;
3262 break;
3264 case 5:
3265 ndr_print_ptr(ndr, "info5", r->info5);
3266 ndr->depth++;
3267 if (r->info5) {
3268 ndr_print_dfs_EnumArray5(ndr, "info5", r->info5);
3270 ndr->depth--;
3271 break;
3273 case 6:
3274 ndr_print_ptr(ndr, "info6", r->info6);
3275 ndr->depth++;
3276 if (r->info6) {
3277 ndr_print_dfs_EnumArray6(ndr, "info6", r->info6);
3279 ndr->depth--;
3280 break;
3282 case 200:
3283 ndr_print_ptr(ndr, "info200", r->info200);
3284 ndr->depth++;
3285 if (r->info200) {
3286 ndr_print_dfs_EnumArray200(ndr, "info200", r->info200);
3288 ndr->depth--;
3289 break;
3291 case 300:
3292 ndr_print_ptr(ndr, "info300", r->info300);
3293 ndr->depth++;
3294 if (r->info300) {
3295 ndr_print_dfs_EnumArray300(ndr, "info300", r->info300);
3297 ndr->depth--;
3298 break;
3300 default:
3301 ndr_print_bad_level(ndr, name, level);
3305 static enum ndr_err_code ndr_push_dfs_EnumStruct(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumStruct *r)
3307 if (ndr_flags & NDR_SCALARS) {
3308 NDR_CHECK(ndr_push_align(ndr, 5));
3309 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
3310 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->e, r->level));
3311 NDR_CHECK(ndr_push_dfs_EnumInfo(ndr, NDR_SCALARS, &r->e));
3312 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3314 if (ndr_flags & NDR_BUFFERS) {
3315 NDR_CHECK(ndr_push_dfs_EnumInfo(ndr, NDR_BUFFERS, &r->e));
3317 return NDR_ERR_SUCCESS;
3320 static enum ndr_err_code ndr_pull_dfs_EnumStruct(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumStruct *r)
3322 if (ndr_flags & NDR_SCALARS) {
3323 NDR_CHECK(ndr_pull_align(ndr, 5));
3324 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
3325 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->e, r->level));
3326 NDR_CHECK(ndr_pull_dfs_EnumInfo(ndr, NDR_SCALARS, &r->e));
3327 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3329 if (ndr_flags & NDR_BUFFERS) {
3330 NDR_CHECK(ndr_pull_dfs_EnumInfo(ndr, NDR_BUFFERS, &r->e));
3332 return NDR_ERR_SUCCESS;
3335 _PUBLIC_ void ndr_print_dfs_EnumStruct(struct ndr_print *ndr, const char *name, const struct dfs_EnumStruct *r)
3337 ndr_print_struct(ndr, name, "dfs_EnumStruct");
3338 ndr->depth++;
3339 ndr_print_uint32(ndr, "level", r->level);
3340 ndr_print_set_switch_value(ndr, &r->e, r->level);
3341 ndr_print_dfs_EnumInfo(ndr, "e", &r->e);
3342 ndr->depth--;
3345 static enum ndr_err_code ndr_push_dfs_UnknownStruct(struct ndr_push *ndr, int ndr_flags, const struct dfs_UnknownStruct *r)
3347 if (ndr_flags & NDR_SCALARS) {
3348 NDR_CHECK(ndr_push_align(ndr, 5));
3349 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
3350 NDR_CHECK(ndr_push_unique_ptr(ndr, r->unknown2));
3351 NDR_CHECK(ndr_push_trailer_align(ndr, 5));
3353 if (ndr_flags & NDR_BUFFERS) {
3354 if (r->unknown2) {
3355 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->unknown2, CH_UTF16)));
3356 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3357 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->unknown2, CH_UTF16)));
3358 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->unknown2, ndr_charset_length(r->unknown2, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3361 return NDR_ERR_SUCCESS;
3364 static enum ndr_err_code ndr_pull_dfs_UnknownStruct(struct ndr_pull *ndr, int ndr_flags, struct dfs_UnknownStruct *r)
3366 uint32_t _ptr_unknown2;
3367 TALLOC_CTX *_mem_save_unknown2_0;
3368 if (ndr_flags & NDR_SCALARS) {
3369 NDR_CHECK(ndr_pull_align(ndr, 5));
3370 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
3371 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
3372 if (_ptr_unknown2) {
3373 NDR_PULL_ALLOC(ndr, r->unknown2);
3374 } else {
3375 r->unknown2 = NULL;
3377 NDR_CHECK(ndr_pull_trailer_align(ndr, 5));
3379 if (ndr_flags & NDR_BUFFERS) {
3380 if (r->unknown2) {
3381 _mem_save_unknown2_0 = NDR_PULL_GET_MEM_CTX(ndr);
3382 NDR_PULL_SET_MEM_CTX(ndr, r->unknown2, 0);
3383 NDR_CHECK(ndr_pull_array_size(ndr, &r->unknown2));
3384 NDR_CHECK(ndr_pull_array_length(ndr, &r->unknown2));
3385 if (ndr_get_array_length(ndr, &r->unknown2) > ndr_get_array_size(ndr, &r->unknown2)) {
3386 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->unknown2), ndr_get_array_length(ndr, &r->unknown2));
3388 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->unknown2), sizeof(uint16_t)));
3389 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->unknown2, ndr_get_array_length(ndr, &r->unknown2), sizeof(uint16_t), CH_UTF16));
3390 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_0, 0);
3393 return NDR_ERR_SUCCESS;
3396 _PUBLIC_ void ndr_print_dfs_UnknownStruct(struct ndr_print *ndr, const char *name, const struct dfs_UnknownStruct *r)
3398 ndr_print_struct(ndr, name, "dfs_UnknownStruct");
3399 ndr->depth++;
3400 ndr_print_uint32(ndr, "unknown1", r->unknown1);
3401 ndr_print_ptr(ndr, "unknown2", r->unknown2);
3402 ndr->depth++;
3403 if (r->unknown2) {
3404 ndr_print_string(ndr, "unknown2", r->unknown2);
3406 ndr->depth--;
3407 ndr->depth--;
3410 _PUBLIC_ enum ndr_err_code ndr_push_dfs_GetManagerVersion(struct ndr_push *ndr, int flags, const struct dfs_GetManagerVersion *r)
3412 if (flags & NDR_IN) {
3414 if (flags & NDR_OUT) {
3415 if (r->out.version == NULL) {
3416 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3418 NDR_CHECK(ndr_push_dfs_ManagerVersion(ndr, NDR_SCALARS, *r->out.version));
3420 return NDR_ERR_SUCCESS;
3423 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_GetManagerVersion(struct ndr_pull *ndr, int flags, struct dfs_GetManagerVersion *r)
3425 TALLOC_CTX *_mem_save_version_0;
3426 if (flags & NDR_IN) {
3427 ZERO_STRUCT(r->out);
3429 NDR_PULL_ALLOC(ndr, r->out.version);
3430 ZERO_STRUCTP(r->out.version);
3432 if (flags & NDR_OUT) {
3433 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3434 NDR_PULL_ALLOC(ndr, r->out.version);
3436 _mem_save_version_0 = NDR_PULL_GET_MEM_CTX(ndr);
3437 NDR_PULL_SET_MEM_CTX(ndr, r->out.version, LIBNDR_FLAG_REF_ALLOC);
3438 NDR_CHECK(ndr_pull_dfs_ManagerVersion(ndr, NDR_SCALARS, r->out.version));
3439 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_version_0, LIBNDR_FLAG_REF_ALLOC);
3441 return NDR_ERR_SUCCESS;
3444 _PUBLIC_ void ndr_print_dfs_GetManagerVersion(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetManagerVersion *r)
3446 ndr_print_struct(ndr, name, "dfs_GetManagerVersion");
3447 ndr->depth++;
3448 if (flags & NDR_SET_VALUES) {
3449 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3451 if (flags & NDR_IN) {
3452 ndr_print_struct(ndr, "in", "dfs_GetManagerVersion");
3453 ndr->depth++;
3454 ndr->depth--;
3456 if (flags & NDR_OUT) {
3457 ndr_print_struct(ndr, "out", "dfs_GetManagerVersion");
3458 ndr->depth++;
3459 ndr_print_ptr(ndr, "version", r->out.version);
3460 ndr->depth++;
3461 ndr_print_dfs_ManagerVersion(ndr, "version", *r->out.version);
3462 ndr->depth--;
3463 ndr->depth--;
3465 ndr->depth--;
3468 static enum ndr_err_code ndr_push_dfs_Add(struct ndr_push *ndr, int flags, const struct dfs_Add *r)
3470 if (flags & NDR_IN) {
3471 if (r->in.path == NULL) {
3472 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3474 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
3475 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3476 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
3477 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path, ndr_charset_length(r->in.path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3478 if (r->in.server == NULL) {
3479 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3481 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
3482 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3483 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
3484 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server, ndr_charset_length(r->in.server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3485 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.share));
3486 if (r->in.share) {
3487 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
3488 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3489 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
3490 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share, ndr_charset_length(r->in.share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3492 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.comment));
3493 if (r->in.comment) {
3494 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
3495 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3496 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
3497 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.comment, ndr_charset_length(r->in.comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3499 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
3501 if (flags & NDR_OUT) {
3502 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3504 return NDR_ERR_SUCCESS;
3507 static enum ndr_err_code ndr_pull_dfs_Add(struct ndr_pull *ndr, int flags, struct dfs_Add *r)
3509 uint32_t _ptr_share;
3510 uint32_t _ptr_comment;
3511 TALLOC_CTX *_mem_save_share_0;
3512 TALLOC_CTX *_mem_save_comment_0;
3513 if (flags & NDR_IN) {
3514 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path));
3515 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path));
3516 if (ndr_get_array_length(ndr, &r->in.path) > ndr_get_array_size(ndr, &r->in.path)) {
3517 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.path), ndr_get_array_length(ndr, &r->in.path));
3519 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t)));
3520 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t), CH_UTF16));
3521 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server));
3522 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server));
3523 if (ndr_get_array_length(ndr, &r->in.server) > ndr_get_array_size(ndr, &r->in.server)) {
3524 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server), ndr_get_array_length(ndr, &r->in.server));
3526 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t)));
3527 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t), CH_UTF16));
3528 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share));
3529 if (_ptr_share) {
3530 NDR_PULL_ALLOC(ndr, r->in.share);
3531 } else {
3532 r->in.share = NULL;
3534 if (r->in.share) {
3535 _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr);
3536 NDR_PULL_SET_MEM_CTX(ndr, r->in.share, 0);
3537 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share));
3538 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share));
3539 if (ndr_get_array_length(ndr, &r->in.share) > ndr_get_array_size(ndr, &r->in.share)) {
3540 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.share), ndr_get_array_length(ndr, &r->in.share));
3542 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t)));
3543 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t), CH_UTF16));
3544 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0);
3546 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
3547 if (_ptr_comment) {
3548 NDR_PULL_ALLOC(ndr, r->in.comment);
3549 } else {
3550 r->in.comment = NULL;
3552 if (r->in.comment) {
3553 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
3554 NDR_PULL_SET_MEM_CTX(ndr, r->in.comment, 0);
3555 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.comment));
3556 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.comment));
3557 if (ndr_get_array_length(ndr, &r->in.comment) > ndr_get_array_size(ndr, &r->in.comment)) {
3558 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.comment), ndr_get_array_length(ndr, &r->in.comment));
3560 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t)));
3561 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.comment, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t), CH_UTF16));
3562 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
3564 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
3566 if (flags & NDR_OUT) {
3567 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3569 return NDR_ERR_SUCCESS;
3572 _PUBLIC_ void ndr_print_dfs_Add(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Add *r)
3574 ndr_print_struct(ndr, name, "dfs_Add");
3575 ndr->depth++;
3576 if (flags & NDR_SET_VALUES) {
3577 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3579 if (flags & NDR_IN) {
3580 ndr_print_struct(ndr, "in", "dfs_Add");
3581 ndr->depth++;
3582 ndr_print_ptr(ndr, "path", r->in.path);
3583 ndr->depth++;
3584 ndr_print_string(ndr, "path", r->in.path);
3585 ndr->depth--;
3586 ndr_print_ptr(ndr, "server", r->in.server);
3587 ndr->depth++;
3588 ndr_print_string(ndr, "server", r->in.server);
3589 ndr->depth--;
3590 ndr_print_ptr(ndr, "share", r->in.share);
3591 ndr->depth++;
3592 if (r->in.share) {
3593 ndr_print_string(ndr, "share", r->in.share);
3595 ndr->depth--;
3596 ndr_print_ptr(ndr, "comment", r->in.comment);
3597 ndr->depth++;
3598 if (r->in.comment) {
3599 ndr_print_string(ndr, "comment", r->in.comment);
3601 ndr->depth--;
3602 ndr_print_uint32(ndr, "flags", r->in.flags);
3603 ndr->depth--;
3605 if (flags & NDR_OUT) {
3606 ndr_print_struct(ndr, "out", "dfs_Add");
3607 ndr->depth++;
3608 ndr_print_WERROR(ndr, "result", r->out.result);
3609 ndr->depth--;
3611 ndr->depth--;
3614 static enum ndr_err_code ndr_push_dfs_Remove(struct ndr_push *ndr, int flags, const struct dfs_Remove *r)
3616 if (flags & NDR_IN) {
3617 if (r->in.dfs_entry_path == NULL) {
3618 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3620 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
3621 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3622 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
3623 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));
3624 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
3625 if (r->in.servername) {
3626 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
3627 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3628 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
3629 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3631 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.sharename));
3632 if (r->in.sharename) {
3633 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16)));
3634 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3635 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16)));
3636 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.sharename, ndr_charset_length(r->in.sharename, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3639 if (flags & NDR_OUT) {
3640 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3642 return NDR_ERR_SUCCESS;
3645 static enum ndr_err_code ndr_pull_dfs_Remove(struct ndr_pull *ndr, int flags, struct dfs_Remove *r)
3647 uint32_t _ptr_servername;
3648 uint32_t _ptr_sharename;
3649 TALLOC_CTX *_mem_save_servername_0;
3650 TALLOC_CTX *_mem_save_sharename_0;
3651 if (flags & NDR_IN) {
3652 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_entry_path));
3653 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_entry_path));
3654 if (ndr_get_array_length(ndr, &r->in.dfs_entry_path) > ndr_get_array_size(ndr, &r->in.dfs_entry_path)) {
3655 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.dfs_entry_path), ndr_get_array_length(ndr, &r->in.dfs_entry_path));
3657 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfs_entry_path), sizeof(uint16_t)));
3658 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfs_entry_path, ndr_get_array_length(ndr, &r->in.dfs_entry_path), sizeof(uint16_t), CH_UTF16));
3659 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
3660 if (_ptr_servername) {
3661 NDR_PULL_ALLOC(ndr, r->in.servername);
3662 } else {
3663 r->in.servername = NULL;
3665 if (r->in.servername) {
3666 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
3667 NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
3668 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
3669 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
3670 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
3671 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername));
3673 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
3674 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
3675 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
3677 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sharename));
3678 if (_ptr_sharename) {
3679 NDR_PULL_ALLOC(ndr, r->in.sharename);
3680 } else {
3681 r->in.sharename = NULL;
3683 if (r->in.sharename) {
3684 _mem_save_sharename_0 = NDR_PULL_GET_MEM_CTX(ndr);
3685 NDR_PULL_SET_MEM_CTX(ndr, r->in.sharename, 0);
3686 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.sharename));
3687 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.sharename));
3688 if (ndr_get_array_length(ndr, &r->in.sharename) > ndr_get_array_size(ndr, &r->in.sharename)) {
3689 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.sharename), ndr_get_array_length(ndr, &r->in.sharename));
3691 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t)));
3692 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.sharename, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t), CH_UTF16));
3693 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sharename_0, 0);
3696 if (flags & NDR_OUT) {
3697 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3699 return NDR_ERR_SUCCESS;
3702 _PUBLIC_ void ndr_print_dfs_Remove(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Remove *r)
3704 ndr_print_struct(ndr, name, "dfs_Remove");
3705 ndr->depth++;
3706 if (flags & NDR_SET_VALUES) {
3707 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3709 if (flags & NDR_IN) {
3710 ndr_print_struct(ndr, "in", "dfs_Remove");
3711 ndr->depth++;
3712 ndr_print_ptr(ndr, "dfs_entry_path", r->in.dfs_entry_path);
3713 ndr->depth++;
3714 ndr_print_string(ndr, "dfs_entry_path", r->in.dfs_entry_path);
3715 ndr->depth--;
3716 ndr_print_ptr(ndr, "servername", r->in.servername);
3717 ndr->depth++;
3718 if (r->in.servername) {
3719 ndr_print_string(ndr, "servername", r->in.servername);
3721 ndr->depth--;
3722 ndr_print_ptr(ndr, "sharename", r->in.sharename);
3723 ndr->depth++;
3724 if (r->in.sharename) {
3725 ndr_print_string(ndr, "sharename", r->in.sharename);
3727 ndr->depth--;
3728 ndr->depth--;
3730 if (flags & NDR_OUT) {
3731 ndr_print_struct(ndr, "out", "dfs_Remove");
3732 ndr->depth++;
3733 ndr_print_WERROR(ndr, "result", r->out.result);
3734 ndr->depth--;
3736 ndr->depth--;
3739 static enum ndr_err_code ndr_push_dfs_SetInfo(struct ndr_push *ndr, int flags, const struct dfs_SetInfo *r)
3741 if (flags & NDR_IN) {
3742 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
3743 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3744 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
3745 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));
3746 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
3747 if (r->in.servername) {
3748 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
3749 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3750 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
3751 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3753 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.sharename));
3754 if (r->in.sharename) {
3755 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16)));
3756 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3757 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16)));
3758 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.sharename, ndr_charset_length(r->in.sharename, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3760 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
3761 if (r->in.info == NULL) {
3762 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3764 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
3765 NDR_CHECK(ndr_push_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
3767 if (flags & NDR_OUT) {
3768 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3770 return NDR_ERR_SUCCESS;
3773 static enum ndr_err_code ndr_pull_dfs_SetInfo(struct ndr_pull *ndr, int flags, struct dfs_SetInfo *r)
3775 uint32_t _ptr_servername;
3776 uint32_t _ptr_sharename;
3777 TALLOC_CTX *_mem_save_servername_0;
3778 TALLOC_CTX *_mem_save_sharename_0;
3779 TALLOC_CTX *_mem_save_info_0;
3780 if (flags & NDR_IN) {
3781 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_entry_path));
3782 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_entry_path));
3783 if (ndr_get_array_length(ndr, &r->in.dfs_entry_path) > ndr_get_array_size(ndr, &r->in.dfs_entry_path)) {
3784 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.dfs_entry_path), ndr_get_array_length(ndr, &r->in.dfs_entry_path));
3786 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfs_entry_path), sizeof(uint16_t)));
3787 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfs_entry_path, ndr_get_array_length(ndr, &r->in.dfs_entry_path), sizeof(uint16_t), CH_UTF16));
3788 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
3789 if (_ptr_servername) {
3790 NDR_PULL_ALLOC(ndr, r->in.servername);
3791 } else {
3792 r->in.servername = NULL;
3794 if (r->in.servername) {
3795 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
3796 NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
3797 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
3798 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
3799 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
3800 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername));
3802 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
3803 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
3804 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
3806 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sharename));
3807 if (_ptr_sharename) {
3808 NDR_PULL_ALLOC(ndr, r->in.sharename);
3809 } else {
3810 r->in.sharename = NULL;
3812 if (r->in.sharename) {
3813 _mem_save_sharename_0 = NDR_PULL_GET_MEM_CTX(ndr);
3814 NDR_PULL_SET_MEM_CTX(ndr, r->in.sharename, 0);
3815 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.sharename));
3816 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.sharename));
3817 if (ndr_get_array_length(ndr, &r->in.sharename) > ndr_get_array_size(ndr, &r->in.sharename)) {
3818 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.sharename), ndr_get_array_length(ndr, &r->in.sharename));
3820 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t)));
3821 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.sharename, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t), CH_UTF16));
3822 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sharename_0, 0);
3824 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
3825 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3826 NDR_PULL_ALLOC(ndr, r->in.info);
3828 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
3829 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
3830 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
3831 NDR_CHECK(ndr_pull_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
3832 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
3834 if (flags & NDR_OUT) {
3835 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3837 return NDR_ERR_SUCCESS;
3840 _PUBLIC_ void ndr_print_dfs_SetInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetInfo *r)
3842 ndr_print_struct(ndr, name, "dfs_SetInfo");
3843 ndr->depth++;
3844 if (flags & NDR_SET_VALUES) {
3845 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3847 if (flags & NDR_IN) {
3848 ndr_print_struct(ndr, "in", "dfs_SetInfo");
3849 ndr->depth++;
3850 ndr_print_string(ndr, "dfs_entry_path", r->in.dfs_entry_path);
3851 ndr_print_ptr(ndr, "servername", r->in.servername);
3852 ndr->depth++;
3853 if (r->in.servername) {
3854 ndr_print_string(ndr, "servername", r->in.servername);
3856 ndr->depth--;
3857 ndr_print_ptr(ndr, "sharename", r->in.sharename);
3858 ndr->depth++;
3859 if (r->in.sharename) {
3860 ndr_print_string(ndr, "sharename", r->in.sharename);
3862 ndr->depth--;
3863 ndr_print_uint32(ndr, "level", r->in.level);
3864 ndr_print_ptr(ndr, "info", r->in.info);
3865 ndr->depth++;
3866 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
3867 ndr_print_dfs_Info(ndr, "info", r->in.info);
3868 ndr->depth--;
3869 ndr->depth--;
3871 if (flags & NDR_OUT) {
3872 ndr_print_struct(ndr, "out", "dfs_SetInfo");
3873 ndr->depth++;
3874 ndr_print_WERROR(ndr, "result", r->out.result);
3875 ndr->depth--;
3877 ndr->depth--;
3880 static enum ndr_err_code ndr_push_dfs_GetInfo(struct ndr_push *ndr, int flags, const struct dfs_GetInfo *r)
3882 if (flags & NDR_IN) {
3883 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
3884 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3885 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
3886 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));
3887 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
3888 if (r->in.servername) {
3889 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
3890 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3891 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
3892 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3894 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.sharename));
3895 if (r->in.sharename) {
3896 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16)));
3897 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
3898 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16)));
3899 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.sharename, ndr_charset_length(r->in.sharename, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3901 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
3903 if (flags & NDR_OUT) {
3904 if (r->out.info == NULL) {
3905 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3907 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
3908 NDR_CHECK(ndr_push_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
3909 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3911 return NDR_ERR_SUCCESS;
3914 static enum ndr_err_code ndr_pull_dfs_GetInfo(struct ndr_pull *ndr, int flags, struct dfs_GetInfo *r)
3916 uint32_t _ptr_servername;
3917 uint32_t _ptr_sharename;
3918 TALLOC_CTX *_mem_save_servername_0;
3919 TALLOC_CTX *_mem_save_sharename_0;
3920 TALLOC_CTX *_mem_save_info_0;
3921 if (flags & NDR_IN) {
3922 ZERO_STRUCT(r->out);
3924 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_entry_path));
3925 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_entry_path));
3926 if (ndr_get_array_length(ndr, &r->in.dfs_entry_path) > ndr_get_array_size(ndr, &r->in.dfs_entry_path)) {
3927 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.dfs_entry_path), ndr_get_array_length(ndr, &r->in.dfs_entry_path));
3929 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfs_entry_path), sizeof(uint16_t)));
3930 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfs_entry_path, ndr_get_array_length(ndr, &r->in.dfs_entry_path), sizeof(uint16_t), CH_UTF16));
3931 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
3932 if (_ptr_servername) {
3933 NDR_PULL_ALLOC(ndr, r->in.servername);
3934 } else {
3935 r->in.servername = NULL;
3937 if (r->in.servername) {
3938 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
3939 NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
3940 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
3941 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
3942 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
3943 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername));
3945 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
3946 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
3947 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
3949 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sharename));
3950 if (_ptr_sharename) {
3951 NDR_PULL_ALLOC(ndr, r->in.sharename);
3952 } else {
3953 r->in.sharename = NULL;
3955 if (r->in.sharename) {
3956 _mem_save_sharename_0 = NDR_PULL_GET_MEM_CTX(ndr);
3957 NDR_PULL_SET_MEM_CTX(ndr, r->in.sharename, 0);
3958 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.sharename));
3959 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.sharename));
3960 if (ndr_get_array_length(ndr, &r->in.sharename) > ndr_get_array_size(ndr, &r->in.sharename)) {
3961 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.sharename), ndr_get_array_length(ndr, &r->in.sharename));
3963 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t)));
3964 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.sharename, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t), CH_UTF16));
3965 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sharename_0, 0);
3967 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
3968 NDR_PULL_ALLOC(ndr, r->out.info);
3969 ZERO_STRUCTP(r->out.info);
3971 if (flags & NDR_OUT) {
3972 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3973 NDR_PULL_ALLOC(ndr, r->out.info);
3975 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
3976 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
3977 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
3978 NDR_CHECK(ndr_pull_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
3979 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
3980 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3982 return NDR_ERR_SUCCESS;
3985 _PUBLIC_ void ndr_print_dfs_GetInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetInfo *r)
3987 ndr_print_struct(ndr, name, "dfs_GetInfo");
3988 ndr->depth++;
3989 if (flags & NDR_SET_VALUES) {
3990 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3992 if (flags & NDR_IN) {
3993 ndr_print_struct(ndr, "in", "dfs_GetInfo");
3994 ndr->depth++;
3995 ndr_print_string(ndr, "dfs_entry_path", r->in.dfs_entry_path);
3996 ndr_print_ptr(ndr, "servername", r->in.servername);
3997 ndr->depth++;
3998 if (r->in.servername) {
3999 ndr_print_string(ndr, "servername", r->in.servername);
4001 ndr->depth--;
4002 ndr_print_ptr(ndr, "sharename", r->in.sharename);
4003 ndr->depth++;
4004 if (r->in.sharename) {
4005 ndr_print_string(ndr, "sharename", r->in.sharename);
4007 ndr->depth--;
4008 ndr_print_uint32(ndr, "level", r->in.level);
4009 ndr->depth--;
4011 if (flags & NDR_OUT) {
4012 ndr_print_struct(ndr, "out", "dfs_GetInfo");
4013 ndr->depth++;
4014 ndr_print_ptr(ndr, "info", r->out.info);
4015 ndr->depth++;
4016 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
4017 ndr_print_dfs_Info(ndr, "info", r->out.info);
4018 ndr->depth--;
4019 ndr_print_WERROR(ndr, "result", r->out.result);
4020 ndr->depth--;
4022 ndr->depth--;
4025 static enum ndr_err_code ndr_push_dfs_Enum(struct ndr_push *ndr, int flags, const struct dfs_Enum *r)
4027 if (flags & NDR_IN) {
4028 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
4029 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bufsize));
4030 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info));
4031 if (r->in.info) {
4032 NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
4034 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.total));
4035 if (r->in.total) {
4036 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.total));
4039 if (flags & NDR_OUT) {
4040 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
4041 if (r->out.info) {
4042 NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
4044 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.total));
4045 if (r->out.total) {
4046 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.total));
4048 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4050 return NDR_ERR_SUCCESS;
4053 static enum ndr_err_code ndr_pull_dfs_Enum(struct ndr_pull *ndr, int flags, struct dfs_Enum *r)
4055 uint32_t _ptr_info;
4056 uint32_t _ptr_total;
4057 TALLOC_CTX *_mem_save_info_0;
4058 TALLOC_CTX *_mem_save_total_0;
4059 if (flags & NDR_IN) {
4060 ZERO_STRUCT(r->out);
4062 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
4063 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bufsize));
4064 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
4065 if (_ptr_info) {
4066 NDR_PULL_ALLOC(ndr, r->in.info);
4067 } else {
4068 r->in.info = NULL;
4070 if (r->in.info) {
4071 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
4072 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0);
4073 NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
4074 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
4076 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total));
4077 if (_ptr_total) {
4078 NDR_PULL_ALLOC(ndr, r->in.total);
4079 } else {
4080 r->in.total = NULL;
4082 if (r->in.total) {
4083 _mem_save_total_0 = NDR_PULL_GET_MEM_CTX(ndr);
4084 NDR_PULL_SET_MEM_CTX(ndr, r->in.total, 0);
4085 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.total));
4086 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_0, 0);
4089 if (flags & NDR_OUT) {
4090 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
4091 if (_ptr_info) {
4092 NDR_PULL_ALLOC(ndr, r->out.info);
4093 } else {
4094 r->out.info = NULL;
4096 if (r->out.info) {
4097 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
4098 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
4099 NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
4100 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
4102 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total));
4103 if (_ptr_total) {
4104 NDR_PULL_ALLOC(ndr, r->out.total);
4105 } else {
4106 r->out.total = NULL;
4108 if (r->out.total) {
4109 _mem_save_total_0 = NDR_PULL_GET_MEM_CTX(ndr);
4110 NDR_PULL_SET_MEM_CTX(ndr, r->out.total, 0);
4111 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.total));
4112 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_0, 0);
4114 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4116 return NDR_ERR_SUCCESS;
4119 _PUBLIC_ void ndr_print_dfs_Enum(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Enum *r)
4121 ndr_print_struct(ndr, name, "dfs_Enum");
4122 ndr->depth++;
4123 if (flags & NDR_SET_VALUES) {
4124 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4126 if (flags & NDR_IN) {
4127 ndr_print_struct(ndr, "in", "dfs_Enum");
4128 ndr->depth++;
4129 ndr_print_uint32(ndr, "level", r->in.level);
4130 ndr_print_uint32(ndr, "bufsize", r->in.bufsize);
4131 ndr_print_ptr(ndr, "info", r->in.info);
4132 ndr->depth++;
4133 if (r->in.info) {
4134 ndr_print_dfs_EnumStruct(ndr, "info", r->in.info);
4136 ndr->depth--;
4137 ndr_print_ptr(ndr, "total", r->in.total);
4138 ndr->depth++;
4139 if (r->in.total) {
4140 ndr_print_uint32(ndr, "total", *r->in.total);
4142 ndr->depth--;
4143 ndr->depth--;
4145 if (flags & NDR_OUT) {
4146 ndr_print_struct(ndr, "out", "dfs_Enum");
4147 ndr->depth++;
4148 ndr_print_ptr(ndr, "info", r->out.info);
4149 ndr->depth++;
4150 if (r->out.info) {
4151 ndr_print_dfs_EnumStruct(ndr, "info", r->out.info);
4153 ndr->depth--;
4154 ndr_print_ptr(ndr, "total", r->out.total);
4155 ndr->depth++;
4156 if (r->out.total) {
4157 ndr_print_uint32(ndr, "total", *r->out.total);
4159 ndr->depth--;
4160 ndr_print_WERROR(ndr, "result", r->out.result);
4161 ndr->depth--;
4163 ndr->depth--;
4166 static enum ndr_err_code ndr_push_dfs_Rename(struct ndr_push *ndr, int flags, const struct dfs_Rename *r)
4168 if (flags & NDR_IN) {
4170 if (flags & NDR_OUT) {
4171 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4173 return NDR_ERR_SUCCESS;
4176 static enum ndr_err_code ndr_pull_dfs_Rename(struct ndr_pull *ndr, int flags, struct dfs_Rename *r)
4178 if (flags & NDR_IN) {
4180 if (flags & NDR_OUT) {
4181 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4183 return NDR_ERR_SUCCESS;
4186 _PUBLIC_ void ndr_print_dfs_Rename(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Rename *r)
4188 ndr_print_struct(ndr, name, "dfs_Rename");
4189 ndr->depth++;
4190 if (flags & NDR_SET_VALUES) {
4191 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4193 if (flags & NDR_IN) {
4194 ndr_print_struct(ndr, "in", "dfs_Rename");
4195 ndr->depth++;
4196 ndr->depth--;
4198 if (flags & NDR_OUT) {
4199 ndr_print_struct(ndr, "out", "dfs_Rename");
4200 ndr->depth++;
4201 ndr_print_WERROR(ndr, "result", r->out.result);
4202 ndr->depth--;
4204 ndr->depth--;
4207 static enum ndr_err_code ndr_push_dfs_Move(struct ndr_push *ndr, int flags, const struct dfs_Move *r)
4209 if (flags & NDR_IN) {
4211 if (flags & NDR_OUT) {
4212 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4214 return NDR_ERR_SUCCESS;
4217 static enum ndr_err_code ndr_pull_dfs_Move(struct ndr_pull *ndr, int flags, struct dfs_Move *r)
4219 if (flags & NDR_IN) {
4221 if (flags & NDR_OUT) {
4222 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4224 return NDR_ERR_SUCCESS;
4227 _PUBLIC_ void ndr_print_dfs_Move(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Move *r)
4229 ndr_print_struct(ndr, name, "dfs_Move");
4230 ndr->depth++;
4231 if (flags & NDR_SET_VALUES) {
4232 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4234 if (flags & NDR_IN) {
4235 ndr_print_struct(ndr, "in", "dfs_Move");
4236 ndr->depth++;
4237 ndr->depth--;
4239 if (flags & NDR_OUT) {
4240 ndr_print_struct(ndr, "out", "dfs_Move");
4241 ndr->depth++;
4242 ndr_print_WERROR(ndr, "result", r->out.result);
4243 ndr->depth--;
4245 ndr->depth--;
4248 static enum ndr_err_code ndr_push_dfs_ManagerGetConfigInfo(struct ndr_push *ndr, int flags, const struct dfs_ManagerGetConfigInfo *r)
4250 if (flags & NDR_IN) {
4252 if (flags & NDR_OUT) {
4253 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4255 return NDR_ERR_SUCCESS;
4258 static enum ndr_err_code ndr_pull_dfs_ManagerGetConfigInfo(struct ndr_pull *ndr, int flags, struct dfs_ManagerGetConfigInfo *r)
4260 if (flags & NDR_IN) {
4262 if (flags & NDR_OUT) {
4263 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4265 return NDR_ERR_SUCCESS;
4268 _PUBLIC_ void ndr_print_dfs_ManagerGetConfigInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerGetConfigInfo *r)
4270 ndr_print_struct(ndr, name, "dfs_ManagerGetConfigInfo");
4271 ndr->depth++;
4272 if (flags & NDR_SET_VALUES) {
4273 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4275 if (flags & NDR_IN) {
4276 ndr_print_struct(ndr, "in", "dfs_ManagerGetConfigInfo");
4277 ndr->depth++;
4278 ndr->depth--;
4280 if (flags & NDR_OUT) {
4281 ndr_print_struct(ndr, "out", "dfs_ManagerGetConfigInfo");
4282 ndr->depth++;
4283 ndr_print_WERROR(ndr, "result", r->out.result);
4284 ndr->depth--;
4286 ndr->depth--;
4289 static enum ndr_err_code ndr_push_dfs_ManagerSendSiteInfo(struct ndr_push *ndr, int flags, const struct dfs_ManagerSendSiteInfo *r)
4291 if (flags & NDR_IN) {
4293 if (flags & NDR_OUT) {
4294 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4296 return NDR_ERR_SUCCESS;
4299 static enum ndr_err_code ndr_pull_dfs_ManagerSendSiteInfo(struct ndr_pull *ndr, int flags, struct dfs_ManagerSendSiteInfo *r)
4301 if (flags & NDR_IN) {
4303 if (flags & NDR_OUT) {
4304 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4306 return NDR_ERR_SUCCESS;
4309 _PUBLIC_ void ndr_print_dfs_ManagerSendSiteInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerSendSiteInfo *r)
4311 ndr_print_struct(ndr, name, "dfs_ManagerSendSiteInfo");
4312 ndr->depth++;
4313 if (flags & NDR_SET_VALUES) {
4314 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4316 if (flags & NDR_IN) {
4317 ndr_print_struct(ndr, "in", "dfs_ManagerSendSiteInfo");
4318 ndr->depth++;
4319 ndr->depth--;
4321 if (flags & NDR_OUT) {
4322 ndr_print_struct(ndr, "out", "dfs_ManagerSendSiteInfo");
4323 ndr->depth++;
4324 ndr_print_WERROR(ndr, "result", r->out.result);
4325 ndr->depth--;
4327 ndr->depth--;
4330 static enum ndr_err_code ndr_push_dfs_AddFtRoot(struct ndr_push *ndr, int flags, const struct dfs_AddFtRoot *r)
4332 if (flags & NDR_IN) {
4333 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4334 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4335 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4336 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4337 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_servername, CH_UTF16)));
4338 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4339 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_servername, CH_UTF16)));
4340 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));
4341 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfsname, CH_UTF16)));
4342 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4343 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfsname, CH_UTF16)));
4344 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dfsname, ndr_charset_length(r->in.dfsname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4345 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4346 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4347 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4348 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4349 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
4350 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4351 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
4352 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.comment, ndr_charset_length(r->in.comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4353 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_config_dn, CH_UTF16)));
4354 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4355 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_config_dn, CH_UTF16)));
4356 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));
4357 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.unknown1));
4358 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
4359 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown2));
4360 if (r->in.unknown2) {
4361 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.unknown2));
4362 if (*r->in.unknown2) {
4363 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.unknown2));
4367 if (flags & NDR_OUT) {
4368 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.unknown2));
4369 if (r->out.unknown2) {
4370 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.unknown2));
4371 if (*r->out.unknown2) {
4372 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.unknown2));
4375 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4377 return NDR_ERR_SUCCESS;
4380 static enum ndr_err_code ndr_pull_dfs_AddFtRoot(struct ndr_pull *ndr, int flags, struct dfs_AddFtRoot *r)
4382 uint32_t _ptr_unknown2;
4383 TALLOC_CTX *_mem_save_unknown2_0;
4384 TALLOC_CTX *_mem_save_unknown2_1;
4385 if (flags & NDR_IN) {
4386 ZERO_STRUCT(r->out);
4388 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
4389 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
4390 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
4391 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername));
4393 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
4394 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
4395 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dns_servername));
4396 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dns_servername));
4397 if (ndr_get_array_length(ndr, &r->in.dns_servername) > ndr_get_array_size(ndr, &r->in.dns_servername)) {
4398 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.dns_servername), ndr_get_array_length(ndr, &r->in.dns_servername));
4400 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dns_servername), sizeof(uint16_t)));
4401 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dns_servername, ndr_get_array_length(ndr, &r->in.dns_servername), sizeof(uint16_t), CH_UTF16));
4402 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfsname));
4403 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfsname));
4404 if (ndr_get_array_length(ndr, &r->in.dfsname) > ndr_get_array_size(ndr, &r->in.dfsname)) {
4405 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.dfsname), ndr_get_array_length(ndr, &r->in.dfsname));
4407 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfsname), sizeof(uint16_t)));
4408 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfsname, ndr_get_array_length(ndr, &r->in.dfsname), sizeof(uint16_t), CH_UTF16));
4409 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
4410 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
4411 if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) {
4412 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.rootshare), ndr_get_array_length(ndr, &r->in.rootshare));
4414 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t)));
4415 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16));
4416 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.comment));
4417 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.comment));
4418 if (ndr_get_array_length(ndr, &r->in.comment) > ndr_get_array_size(ndr, &r->in.comment)) {
4419 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.comment), ndr_get_array_length(ndr, &r->in.comment));
4421 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t)));
4422 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.comment, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t), CH_UTF16));
4423 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_config_dn));
4424 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_config_dn));
4425 if (ndr_get_array_length(ndr, &r->in.dfs_config_dn) > ndr_get_array_size(ndr, &r->in.dfs_config_dn)) {
4426 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.dfs_config_dn), ndr_get_array_length(ndr, &r->in.dfs_config_dn));
4428 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfs_config_dn), sizeof(uint16_t)));
4429 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfs_config_dn, ndr_get_array_length(ndr, &r->in.dfs_config_dn), sizeof(uint16_t), CH_UTF16));
4430 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.unknown1));
4431 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
4432 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
4433 if (_ptr_unknown2) {
4434 NDR_PULL_ALLOC(ndr, r->in.unknown2);
4435 } else {
4436 r->in.unknown2 = NULL;
4438 if (r->in.unknown2) {
4439 _mem_save_unknown2_0 = NDR_PULL_GET_MEM_CTX(ndr);
4440 NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown2, 0);
4441 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
4442 if (_ptr_unknown2) {
4443 NDR_PULL_ALLOC(ndr, *r->in.unknown2);
4444 } else {
4445 *r->in.unknown2 = NULL;
4447 if (*r->in.unknown2) {
4448 _mem_save_unknown2_1 = NDR_PULL_GET_MEM_CTX(ndr);
4449 NDR_PULL_SET_MEM_CTX(ndr, *r->in.unknown2, 0);
4450 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.unknown2));
4451 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_1, 0);
4453 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_0, 0);
4456 if (flags & NDR_OUT) {
4457 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
4458 if (_ptr_unknown2) {
4459 NDR_PULL_ALLOC(ndr, r->out.unknown2);
4460 } else {
4461 r->out.unknown2 = NULL;
4463 if (r->out.unknown2) {
4464 _mem_save_unknown2_0 = NDR_PULL_GET_MEM_CTX(ndr);
4465 NDR_PULL_SET_MEM_CTX(ndr, r->out.unknown2, 0);
4466 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
4467 if (_ptr_unknown2) {
4468 NDR_PULL_ALLOC(ndr, *r->out.unknown2);
4469 } else {
4470 *r->out.unknown2 = NULL;
4472 if (*r->out.unknown2) {
4473 _mem_save_unknown2_1 = NDR_PULL_GET_MEM_CTX(ndr);
4474 NDR_PULL_SET_MEM_CTX(ndr, *r->out.unknown2, 0);
4475 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.unknown2));
4476 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_1, 0);
4478 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_0, 0);
4480 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4482 return NDR_ERR_SUCCESS;
4485 _PUBLIC_ void ndr_print_dfs_AddFtRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddFtRoot *r)
4487 ndr_print_struct(ndr, name, "dfs_AddFtRoot");
4488 ndr->depth++;
4489 if (flags & NDR_SET_VALUES) {
4490 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4492 if (flags & NDR_IN) {
4493 ndr_print_struct(ndr, "in", "dfs_AddFtRoot");
4494 ndr->depth++;
4495 ndr_print_string(ndr, "servername", r->in.servername);
4496 ndr_print_string(ndr, "dns_servername", r->in.dns_servername);
4497 ndr_print_string(ndr, "dfsname", r->in.dfsname);
4498 ndr_print_string(ndr, "rootshare", r->in.rootshare);
4499 ndr_print_string(ndr, "comment", r->in.comment);
4500 ndr_print_string(ndr, "dfs_config_dn", r->in.dfs_config_dn);
4501 ndr_print_uint8(ndr, "unknown1", r->in.unknown1);
4502 ndr_print_uint32(ndr, "flags", r->in.flags);
4503 ndr_print_ptr(ndr, "unknown2", r->in.unknown2);
4504 ndr->depth++;
4505 if (r->in.unknown2) {
4506 ndr_print_ptr(ndr, "unknown2", *r->in.unknown2);
4507 ndr->depth++;
4508 if (*r->in.unknown2) {
4509 ndr_print_dfs_UnknownStruct(ndr, "unknown2", *r->in.unknown2);
4511 ndr->depth--;
4513 ndr->depth--;
4514 ndr->depth--;
4516 if (flags & NDR_OUT) {
4517 ndr_print_struct(ndr, "out", "dfs_AddFtRoot");
4518 ndr->depth++;
4519 ndr_print_ptr(ndr, "unknown2", r->out.unknown2);
4520 ndr->depth++;
4521 if (r->out.unknown2) {
4522 ndr_print_ptr(ndr, "unknown2", *r->out.unknown2);
4523 ndr->depth++;
4524 if (*r->out.unknown2) {
4525 ndr_print_dfs_UnknownStruct(ndr, "unknown2", *r->out.unknown2);
4527 ndr->depth--;
4529 ndr->depth--;
4530 ndr_print_WERROR(ndr, "result", r->out.result);
4531 ndr->depth--;
4533 ndr->depth--;
4536 static enum ndr_err_code ndr_push_dfs_RemoveFtRoot(struct ndr_push *ndr, int flags, const struct dfs_RemoveFtRoot *r)
4538 if (flags & NDR_IN) {
4539 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4540 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4541 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4542 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4543 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_servername, CH_UTF16)));
4544 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4545 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_servername, CH_UTF16)));
4546 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));
4547 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfsname, CH_UTF16)));
4548 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4549 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfsname, CH_UTF16)));
4550 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dfsname, ndr_charset_length(r->in.dfsname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4551 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4552 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4553 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4554 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4555 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
4556 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown));
4557 if (r->in.unknown) {
4558 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.unknown));
4559 if (*r->in.unknown) {
4560 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.unknown));
4564 if (flags & NDR_OUT) {
4565 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.unknown));
4566 if (r->out.unknown) {
4567 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.unknown));
4568 if (*r->out.unknown) {
4569 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.unknown));
4572 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4574 return NDR_ERR_SUCCESS;
4577 static enum ndr_err_code ndr_pull_dfs_RemoveFtRoot(struct ndr_pull *ndr, int flags, struct dfs_RemoveFtRoot *r)
4579 uint32_t _ptr_unknown;
4580 TALLOC_CTX *_mem_save_unknown_0;
4581 TALLOC_CTX *_mem_save_unknown_1;
4582 if (flags & NDR_IN) {
4583 ZERO_STRUCT(r->out);
4585 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
4586 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
4587 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
4588 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername));
4590 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
4591 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
4592 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dns_servername));
4593 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dns_servername));
4594 if (ndr_get_array_length(ndr, &r->in.dns_servername) > ndr_get_array_size(ndr, &r->in.dns_servername)) {
4595 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.dns_servername), ndr_get_array_length(ndr, &r->in.dns_servername));
4597 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dns_servername), sizeof(uint16_t)));
4598 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dns_servername, ndr_get_array_length(ndr, &r->in.dns_servername), sizeof(uint16_t), CH_UTF16));
4599 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfsname));
4600 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfsname));
4601 if (ndr_get_array_length(ndr, &r->in.dfsname) > ndr_get_array_size(ndr, &r->in.dfsname)) {
4602 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.dfsname), ndr_get_array_length(ndr, &r->in.dfsname));
4604 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfsname), sizeof(uint16_t)));
4605 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfsname, ndr_get_array_length(ndr, &r->in.dfsname), sizeof(uint16_t), CH_UTF16));
4606 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
4607 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
4608 if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) {
4609 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.rootshare), ndr_get_array_length(ndr, &r->in.rootshare));
4611 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t)));
4612 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16));
4613 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
4614 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown));
4615 if (_ptr_unknown) {
4616 NDR_PULL_ALLOC(ndr, r->in.unknown);
4617 } else {
4618 r->in.unknown = NULL;
4620 if (r->in.unknown) {
4621 _mem_save_unknown_0 = NDR_PULL_GET_MEM_CTX(ndr);
4622 NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown, 0);
4623 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown));
4624 if (_ptr_unknown) {
4625 NDR_PULL_ALLOC(ndr, *r->in.unknown);
4626 } else {
4627 *r->in.unknown = NULL;
4629 if (*r->in.unknown) {
4630 _mem_save_unknown_1 = NDR_PULL_GET_MEM_CTX(ndr);
4631 NDR_PULL_SET_MEM_CTX(ndr, *r->in.unknown, 0);
4632 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.unknown));
4633 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_1, 0);
4635 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_0, 0);
4638 if (flags & NDR_OUT) {
4639 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown));
4640 if (_ptr_unknown) {
4641 NDR_PULL_ALLOC(ndr, r->out.unknown);
4642 } else {
4643 r->out.unknown = NULL;
4645 if (r->out.unknown) {
4646 _mem_save_unknown_0 = NDR_PULL_GET_MEM_CTX(ndr);
4647 NDR_PULL_SET_MEM_CTX(ndr, r->out.unknown, 0);
4648 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown));
4649 if (_ptr_unknown) {
4650 NDR_PULL_ALLOC(ndr, *r->out.unknown);
4651 } else {
4652 *r->out.unknown = NULL;
4654 if (*r->out.unknown) {
4655 _mem_save_unknown_1 = NDR_PULL_GET_MEM_CTX(ndr);
4656 NDR_PULL_SET_MEM_CTX(ndr, *r->out.unknown, 0);
4657 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.unknown));
4658 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_1, 0);
4660 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_0, 0);
4662 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4664 return NDR_ERR_SUCCESS;
4667 _PUBLIC_ void ndr_print_dfs_RemoveFtRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_RemoveFtRoot *r)
4669 ndr_print_struct(ndr, name, "dfs_RemoveFtRoot");
4670 ndr->depth++;
4671 if (flags & NDR_SET_VALUES) {
4672 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4674 if (flags & NDR_IN) {
4675 ndr_print_struct(ndr, "in", "dfs_RemoveFtRoot");
4676 ndr->depth++;
4677 ndr_print_string(ndr, "servername", r->in.servername);
4678 ndr_print_string(ndr, "dns_servername", r->in.dns_servername);
4679 ndr_print_string(ndr, "dfsname", r->in.dfsname);
4680 ndr_print_string(ndr, "rootshare", r->in.rootshare);
4681 ndr_print_uint32(ndr, "flags", r->in.flags);
4682 ndr_print_ptr(ndr, "unknown", r->in.unknown);
4683 ndr->depth++;
4684 if (r->in.unknown) {
4685 ndr_print_ptr(ndr, "unknown", *r->in.unknown);
4686 ndr->depth++;
4687 if (*r->in.unknown) {
4688 ndr_print_dfs_UnknownStruct(ndr, "unknown", *r->in.unknown);
4690 ndr->depth--;
4692 ndr->depth--;
4693 ndr->depth--;
4695 if (flags & NDR_OUT) {
4696 ndr_print_struct(ndr, "out", "dfs_RemoveFtRoot");
4697 ndr->depth++;
4698 ndr_print_ptr(ndr, "unknown", r->out.unknown);
4699 ndr->depth++;
4700 if (r->out.unknown) {
4701 ndr_print_ptr(ndr, "unknown", *r->out.unknown);
4702 ndr->depth++;
4703 if (*r->out.unknown) {
4704 ndr_print_dfs_UnknownStruct(ndr, "unknown", *r->out.unknown);
4706 ndr->depth--;
4708 ndr->depth--;
4709 ndr_print_WERROR(ndr, "result", r->out.result);
4710 ndr->depth--;
4712 ndr->depth--;
4715 static enum ndr_err_code ndr_push_dfs_AddStdRoot(struct ndr_push *ndr, int flags, const struct dfs_AddStdRoot *r)
4717 if (flags & NDR_IN) {
4718 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4719 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4720 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4721 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4722 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4723 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4724 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4725 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4726 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
4727 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4728 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
4729 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.comment, ndr_charset_length(r->in.comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4730 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
4732 if (flags & NDR_OUT) {
4733 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4735 return NDR_ERR_SUCCESS;
4738 static enum ndr_err_code ndr_pull_dfs_AddStdRoot(struct ndr_pull *ndr, int flags, struct dfs_AddStdRoot *r)
4740 if (flags & NDR_IN) {
4741 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
4742 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
4743 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
4744 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername));
4746 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
4747 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
4748 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
4749 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
4750 if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) {
4751 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.rootshare), ndr_get_array_length(ndr, &r->in.rootshare));
4753 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t)));
4754 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16));
4755 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.comment));
4756 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.comment));
4757 if (ndr_get_array_length(ndr, &r->in.comment) > ndr_get_array_size(ndr, &r->in.comment)) {
4758 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.comment), ndr_get_array_length(ndr, &r->in.comment));
4760 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t)));
4761 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.comment, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t), CH_UTF16));
4762 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
4764 if (flags & NDR_OUT) {
4765 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4767 return NDR_ERR_SUCCESS;
4770 _PUBLIC_ void ndr_print_dfs_AddStdRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddStdRoot *r)
4772 ndr_print_struct(ndr, name, "dfs_AddStdRoot");
4773 ndr->depth++;
4774 if (flags & NDR_SET_VALUES) {
4775 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4777 if (flags & NDR_IN) {
4778 ndr_print_struct(ndr, "in", "dfs_AddStdRoot");
4779 ndr->depth++;
4780 ndr_print_string(ndr, "servername", r->in.servername);
4781 ndr_print_string(ndr, "rootshare", r->in.rootshare);
4782 ndr_print_string(ndr, "comment", r->in.comment);
4783 ndr_print_uint32(ndr, "flags", r->in.flags);
4784 ndr->depth--;
4786 if (flags & NDR_OUT) {
4787 ndr_print_struct(ndr, "out", "dfs_AddStdRoot");
4788 ndr->depth++;
4789 ndr_print_WERROR(ndr, "result", r->out.result);
4790 ndr->depth--;
4792 ndr->depth--;
4795 static enum ndr_err_code ndr_push_dfs_RemoveStdRoot(struct ndr_push *ndr, int flags, const struct dfs_RemoveStdRoot *r)
4797 if (flags & NDR_IN) {
4798 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4799 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4800 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4801 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4802 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4803 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4804 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4805 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4806 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
4808 if (flags & NDR_OUT) {
4809 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4811 return NDR_ERR_SUCCESS;
4814 static enum ndr_err_code ndr_pull_dfs_RemoveStdRoot(struct ndr_pull *ndr, int flags, struct dfs_RemoveStdRoot *r)
4816 if (flags & NDR_IN) {
4817 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
4818 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
4819 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
4820 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername));
4822 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
4823 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
4824 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
4825 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
4826 if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) {
4827 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.rootshare), ndr_get_array_length(ndr, &r->in.rootshare));
4829 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t)));
4830 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16));
4831 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
4833 if (flags & NDR_OUT) {
4834 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4836 return NDR_ERR_SUCCESS;
4839 _PUBLIC_ void ndr_print_dfs_RemoveStdRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_RemoveStdRoot *r)
4841 ndr_print_struct(ndr, name, "dfs_RemoveStdRoot");
4842 ndr->depth++;
4843 if (flags & NDR_SET_VALUES) {
4844 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4846 if (flags & NDR_IN) {
4847 ndr_print_struct(ndr, "in", "dfs_RemoveStdRoot");
4848 ndr->depth++;
4849 ndr_print_string(ndr, "servername", r->in.servername);
4850 ndr_print_string(ndr, "rootshare", r->in.rootshare);
4851 ndr_print_uint32(ndr, "flags", r->in.flags);
4852 ndr->depth--;
4854 if (flags & NDR_OUT) {
4855 ndr_print_struct(ndr, "out", "dfs_RemoveStdRoot");
4856 ndr->depth++;
4857 ndr_print_WERROR(ndr, "result", r->out.result);
4858 ndr->depth--;
4860 ndr->depth--;
4863 static enum ndr_err_code ndr_push_dfs_ManagerInitialize(struct ndr_push *ndr, int flags, const struct dfs_ManagerInitialize *r)
4865 if (flags & NDR_IN) {
4866 if (r->in.servername == NULL) {
4867 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4869 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4870 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4871 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4872 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4873 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
4875 if (flags & NDR_OUT) {
4876 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4878 return NDR_ERR_SUCCESS;
4881 static enum ndr_err_code ndr_pull_dfs_ManagerInitialize(struct ndr_pull *ndr, int flags, struct dfs_ManagerInitialize *r)
4883 if (flags & NDR_IN) {
4884 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
4885 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
4886 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
4887 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername));
4889 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
4890 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
4891 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
4893 if (flags & NDR_OUT) {
4894 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4896 return NDR_ERR_SUCCESS;
4899 _PUBLIC_ void ndr_print_dfs_ManagerInitialize(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerInitialize *r)
4901 ndr_print_struct(ndr, name, "dfs_ManagerInitialize");
4902 ndr->depth++;
4903 if (flags & NDR_SET_VALUES) {
4904 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4906 if (flags & NDR_IN) {
4907 ndr_print_struct(ndr, "in", "dfs_ManagerInitialize");
4908 ndr->depth++;
4909 ndr_print_ptr(ndr, "servername", r->in.servername);
4910 ndr->depth++;
4911 ndr_print_string(ndr, "servername", r->in.servername);
4912 ndr->depth--;
4913 ndr_print_uint32(ndr, "flags", r->in.flags);
4914 ndr->depth--;
4916 if (flags & NDR_OUT) {
4917 ndr_print_struct(ndr, "out", "dfs_ManagerInitialize");
4918 ndr->depth++;
4919 ndr_print_WERROR(ndr, "result", r->out.result);
4920 ndr->depth--;
4922 ndr->depth--;
4925 static enum ndr_err_code ndr_push_dfs_AddStdRootForced(struct ndr_push *ndr, int flags, const struct dfs_AddStdRootForced *r)
4927 if (flags & NDR_IN) {
4928 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4929 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4930 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4931 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4932 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4933 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4934 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4935 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4936 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
4937 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4938 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
4939 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.comment, ndr_charset_length(r->in.comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4940 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.store, CH_UTF16)));
4941 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
4942 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.store, CH_UTF16)));
4943 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.store, ndr_charset_length(r->in.store, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4945 if (flags & NDR_OUT) {
4946 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4948 return NDR_ERR_SUCCESS;
4951 static enum ndr_err_code ndr_pull_dfs_AddStdRootForced(struct ndr_pull *ndr, int flags, struct dfs_AddStdRootForced *r)
4953 if (flags & NDR_IN) {
4954 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
4955 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
4956 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
4957 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername));
4959 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
4960 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
4961 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
4962 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
4963 if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) {
4964 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.rootshare), ndr_get_array_length(ndr, &r->in.rootshare));
4966 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t)));
4967 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16));
4968 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.comment));
4969 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.comment));
4970 if (ndr_get_array_length(ndr, &r->in.comment) > ndr_get_array_size(ndr, &r->in.comment)) {
4971 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.comment), ndr_get_array_length(ndr, &r->in.comment));
4973 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t)));
4974 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.comment, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t), CH_UTF16));
4975 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.store));
4976 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.store));
4977 if (ndr_get_array_length(ndr, &r->in.store) > ndr_get_array_size(ndr, &r->in.store)) {
4978 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.store), ndr_get_array_length(ndr, &r->in.store));
4980 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.store), sizeof(uint16_t)));
4981 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.store, ndr_get_array_length(ndr, &r->in.store), sizeof(uint16_t), CH_UTF16));
4983 if (flags & NDR_OUT) {
4984 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4986 return NDR_ERR_SUCCESS;
4989 _PUBLIC_ void ndr_print_dfs_AddStdRootForced(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddStdRootForced *r)
4991 ndr_print_struct(ndr, name, "dfs_AddStdRootForced");
4992 ndr->depth++;
4993 if (flags & NDR_SET_VALUES) {
4994 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4996 if (flags & NDR_IN) {
4997 ndr_print_struct(ndr, "in", "dfs_AddStdRootForced");
4998 ndr->depth++;
4999 ndr_print_string(ndr, "servername", r->in.servername);
5000 ndr_print_string(ndr, "rootshare", r->in.rootshare);
5001 ndr_print_string(ndr, "comment", r->in.comment);
5002 ndr_print_string(ndr, "store", r->in.store);
5003 ndr->depth--;
5005 if (flags & NDR_OUT) {
5006 ndr_print_struct(ndr, "out", "dfs_AddStdRootForced");
5007 ndr->depth++;
5008 ndr_print_WERROR(ndr, "result", r->out.result);
5009 ndr->depth--;
5011 ndr->depth--;
5014 static enum ndr_err_code ndr_push_dfs_GetDcAddress(struct ndr_push *ndr, int flags, const struct dfs_GetDcAddress *r)
5016 if (flags & NDR_IN) {
5017 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
5018 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5019 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
5020 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5021 if (r->in.server_fullname == NULL) {
5022 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5024 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.server_fullname));
5025 if (*r->in.server_fullname) {
5026 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->in.server_fullname, CH_UTF16)));
5027 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5028 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->in.server_fullname, CH_UTF16)));
5029 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));
5031 if (r->in.is_root == NULL) {
5032 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5034 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->in.is_root));
5035 if (r->in.ttl == NULL) {
5036 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5038 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.ttl));
5040 if (flags & NDR_OUT) {
5041 if (r->out.server_fullname == NULL) {
5042 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5044 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.server_fullname));
5045 if (*r->out.server_fullname) {
5046 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.server_fullname, CH_UTF16)));
5047 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5048 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(*r->out.server_fullname, CH_UTF16)));
5049 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));
5051 if (r->out.is_root == NULL) {
5052 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5054 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->out.is_root));
5055 if (r->out.ttl == NULL) {
5056 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5058 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.ttl));
5059 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5061 return NDR_ERR_SUCCESS;
5064 static enum ndr_err_code ndr_pull_dfs_GetDcAddress(struct ndr_pull *ndr, int flags, struct dfs_GetDcAddress *r)
5066 uint32_t _ptr_server_fullname;
5067 TALLOC_CTX *_mem_save_server_fullname_0;
5068 TALLOC_CTX *_mem_save_server_fullname_1;
5069 TALLOC_CTX *_mem_save_is_root_0;
5070 TALLOC_CTX *_mem_save_ttl_0;
5071 if (flags & NDR_IN) {
5072 ZERO_STRUCT(r->out);
5074 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
5075 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
5076 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
5077 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername));
5079 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
5080 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
5081 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5082 NDR_PULL_ALLOC(ndr, r->in.server_fullname);
5084 _mem_save_server_fullname_0 = NDR_PULL_GET_MEM_CTX(ndr);
5085 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_fullname, LIBNDR_FLAG_REF_ALLOC);
5086 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_fullname));
5087 if (_ptr_server_fullname) {
5088 NDR_PULL_ALLOC(ndr, *r->in.server_fullname);
5089 } else {
5090 *r->in.server_fullname = NULL;
5092 if (*r->in.server_fullname) {
5093 _mem_save_server_fullname_1 = NDR_PULL_GET_MEM_CTX(ndr);
5094 NDR_PULL_SET_MEM_CTX(ndr, *r->in.server_fullname, 0);
5095 NDR_CHECK(ndr_pull_array_size(ndr, r->in.server_fullname));
5096 NDR_CHECK(ndr_pull_array_length(ndr, r->in.server_fullname));
5097 if (ndr_get_array_length(ndr, r->in.server_fullname) > ndr_get_array_size(ndr, r->in.server_fullname)) {
5098 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->in.server_fullname), ndr_get_array_length(ndr, r->in.server_fullname));
5100 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->in.server_fullname), sizeof(uint16_t)));
5101 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->in.server_fullname, ndr_get_array_length(ndr, r->in.server_fullname), sizeof(uint16_t), CH_UTF16));
5102 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_1, 0);
5104 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_0, LIBNDR_FLAG_REF_ALLOC);
5105 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5106 NDR_PULL_ALLOC(ndr, r->in.is_root);
5108 _mem_save_is_root_0 = NDR_PULL_GET_MEM_CTX(ndr);
5109 NDR_PULL_SET_MEM_CTX(ndr, r->in.is_root, LIBNDR_FLAG_REF_ALLOC);
5110 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->in.is_root));
5111 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_is_root_0, LIBNDR_FLAG_REF_ALLOC);
5112 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5113 NDR_PULL_ALLOC(ndr, r->in.ttl);
5115 _mem_save_ttl_0 = NDR_PULL_GET_MEM_CTX(ndr);
5116 NDR_PULL_SET_MEM_CTX(ndr, r->in.ttl, LIBNDR_FLAG_REF_ALLOC);
5117 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.ttl));
5118 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ttl_0, LIBNDR_FLAG_REF_ALLOC);
5119 NDR_PULL_ALLOC(ndr, r->out.server_fullname);
5120 *r->out.server_fullname = *r->in.server_fullname;
5121 NDR_PULL_ALLOC(ndr, r->out.is_root);
5122 *r->out.is_root = *r->in.is_root;
5123 NDR_PULL_ALLOC(ndr, r->out.ttl);
5124 *r->out.ttl = *r->in.ttl;
5126 if (flags & NDR_OUT) {
5127 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5128 NDR_PULL_ALLOC(ndr, r->out.server_fullname);
5130 _mem_save_server_fullname_0 = NDR_PULL_GET_MEM_CTX(ndr);
5131 NDR_PULL_SET_MEM_CTX(ndr, r->out.server_fullname, LIBNDR_FLAG_REF_ALLOC);
5132 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_fullname));
5133 if (_ptr_server_fullname) {
5134 NDR_PULL_ALLOC(ndr, *r->out.server_fullname);
5135 } else {
5136 *r->out.server_fullname = NULL;
5138 if (*r->out.server_fullname) {
5139 _mem_save_server_fullname_1 = NDR_PULL_GET_MEM_CTX(ndr);
5140 NDR_PULL_SET_MEM_CTX(ndr, *r->out.server_fullname, 0);
5141 NDR_CHECK(ndr_pull_array_size(ndr, r->out.server_fullname));
5142 NDR_CHECK(ndr_pull_array_length(ndr, r->out.server_fullname));
5143 if (ndr_get_array_length(ndr, r->out.server_fullname) > ndr_get_array_size(ndr, r->out.server_fullname)) {
5144 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, r->out.server_fullname), ndr_get_array_length(ndr, r->out.server_fullname));
5146 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.server_fullname), sizeof(uint16_t)));
5147 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, r->out.server_fullname, ndr_get_array_length(ndr, r->out.server_fullname), sizeof(uint16_t), CH_UTF16));
5148 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_1, 0);
5150 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_0, LIBNDR_FLAG_REF_ALLOC);
5151 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5152 NDR_PULL_ALLOC(ndr, r->out.is_root);
5154 _mem_save_is_root_0 = NDR_PULL_GET_MEM_CTX(ndr);
5155 NDR_PULL_SET_MEM_CTX(ndr, r->out.is_root, LIBNDR_FLAG_REF_ALLOC);
5156 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->out.is_root));
5157 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_is_root_0, LIBNDR_FLAG_REF_ALLOC);
5158 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5159 NDR_PULL_ALLOC(ndr, r->out.ttl);
5161 _mem_save_ttl_0 = NDR_PULL_GET_MEM_CTX(ndr);
5162 NDR_PULL_SET_MEM_CTX(ndr, r->out.ttl, LIBNDR_FLAG_REF_ALLOC);
5163 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.ttl));
5164 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ttl_0, LIBNDR_FLAG_REF_ALLOC);
5165 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5167 return NDR_ERR_SUCCESS;
5170 _PUBLIC_ void ndr_print_dfs_GetDcAddress(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetDcAddress *r)
5172 ndr_print_struct(ndr, name, "dfs_GetDcAddress");
5173 ndr->depth++;
5174 if (flags & NDR_SET_VALUES) {
5175 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5177 if (flags & NDR_IN) {
5178 ndr_print_struct(ndr, "in", "dfs_GetDcAddress");
5179 ndr->depth++;
5180 ndr_print_string(ndr, "servername", r->in.servername);
5181 ndr_print_ptr(ndr, "server_fullname", r->in.server_fullname);
5182 ndr->depth++;
5183 ndr_print_ptr(ndr, "server_fullname", *r->in.server_fullname);
5184 ndr->depth++;
5185 if (*r->in.server_fullname) {
5186 ndr_print_string(ndr, "server_fullname", *r->in.server_fullname);
5188 ndr->depth--;
5189 ndr->depth--;
5190 ndr_print_ptr(ndr, "is_root", r->in.is_root);
5191 ndr->depth++;
5192 ndr_print_uint8(ndr, "is_root", *r->in.is_root);
5193 ndr->depth--;
5194 ndr_print_ptr(ndr, "ttl", r->in.ttl);
5195 ndr->depth++;
5196 ndr_print_uint32(ndr, "ttl", *r->in.ttl);
5197 ndr->depth--;
5198 ndr->depth--;
5200 if (flags & NDR_OUT) {
5201 ndr_print_struct(ndr, "out", "dfs_GetDcAddress");
5202 ndr->depth++;
5203 ndr_print_ptr(ndr, "server_fullname", r->out.server_fullname);
5204 ndr->depth++;
5205 ndr_print_ptr(ndr, "server_fullname", *r->out.server_fullname);
5206 ndr->depth++;
5207 if (*r->out.server_fullname) {
5208 ndr_print_string(ndr, "server_fullname", *r->out.server_fullname);
5210 ndr->depth--;
5211 ndr->depth--;
5212 ndr_print_ptr(ndr, "is_root", r->out.is_root);
5213 ndr->depth++;
5214 ndr_print_uint8(ndr, "is_root", *r->out.is_root);
5215 ndr->depth--;
5216 ndr_print_ptr(ndr, "ttl", r->out.ttl);
5217 ndr->depth++;
5218 ndr_print_uint32(ndr, "ttl", *r->out.ttl);
5219 ndr->depth--;
5220 ndr_print_WERROR(ndr, "result", r->out.result);
5221 ndr->depth--;
5223 ndr->depth--;
5226 static enum ndr_err_code ndr_push_dfs_SetDcAddress(struct ndr_push *ndr, int flags, const struct dfs_SetDcAddress *r)
5228 if (flags & NDR_IN) {
5229 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
5230 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5231 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
5232 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5233 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_fullname, CH_UTF16)));
5234 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5235 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_fullname, CH_UTF16)));
5236 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));
5237 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
5238 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.ttl));
5240 if (flags & NDR_OUT) {
5241 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5243 return NDR_ERR_SUCCESS;
5246 static enum ndr_err_code ndr_pull_dfs_SetDcAddress(struct ndr_pull *ndr, int flags, struct dfs_SetDcAddress *r)
5248 if (flags & NDR_IN) {
5249 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
5250 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
5251 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
5252 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername));
5254 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
5255 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
5256 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_fullname));
5257 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_fullname));
5258 if (ndr_get_array_length(ndr, &r->in.server_fullname) > ndr_get_array_size(ndr, &r->in.server_fullname)) {
5259 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.server_fullname), ndr_get_array_length(ndr, &r->in.server_fullname));
5261 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_fullname), sizeof(uint16_t)));
5262 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server_fullname, ndr_get_array_length(ndr, &r->in.server_fullname), sizeof(uint16_t), CH_UTF16));
5263 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
5264 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.ttl));
5266 if (flags & NDR_OUT) {
5267 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5269 return NDR_ERR_SUCCESS;
5272 _PUBLIC_ void ndr_print_dfs_SetDcAddress(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetDcAddress *r)
5274 ndr_print_struct(ndr, name, "dfs_SetDcAddress");
5275 ndr->depth++;
5276 if (flags & NDR_SET_VALUES) {
5277 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5279 if (flags & NDR_IN) {
5280 ndr_print_struct(ndr, "in", "dfs_SetDcAddress");
5281 ndr->depth++;
5282 ndr_print_string(ndr, "servername", r->in.servername);
5283 ndr_print_string(ndr, "server_fullname", r->in.server_fullname);
5284 ndr_print_uint32(ndr, "flags", r->in.flags);
5285 ndr_print_uint32(ndr, "ttl", r->in.ttl);
5286 ndr->depth--;
5288 if (flags & NDR_OUT) {
5289 ndr_print_struct(ndr, "out", "dfs_SetDcAddress");
5290 ndr->depth++;
5291 ndr_print_WERROR(ndr, "result", r->out.result);
5292 ndr->depth--;
5294 ndr->depth--;
5297 static enum ndr_err_code ndr_push_dfs_FlushFtTable(struct ndr_push *ndr, int flags, const struct dfs_FlushFtTable *r)
5299 if (flags & NDR_IN) {
5300 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
5301 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5302 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
5303 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5304 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
5305 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5306 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
5307 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5309 if (flags & NDR_OUT) {
5310 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5312 return NDR_ERR_SUCCESS;
5315 static enum ndr_err_code ndr_pull_dfs_FlushFtTable(struct ndr_pull *ndr, int flags, struct dfs_FlushFtTable *r)
5317 if (flags & NDR_IN) {
5318 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
5319 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
5320 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
5321 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.servername), ndr_get_array_length(ndr, &r->in.servername));
5323 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
5324 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
5325 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
5326 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
5327 if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) {
5328 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.rootshare), ndr_get_array_length(ndr, &r->in.rootshare));
5330 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t)));
5331 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16));
5333 if (flags & NDR_OUT) {
5334 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5336 return NDR_ERR_SUCCESS;
5339 _PUBLIC_ void ndr_print_dfs_FlushFtTable(struct ndr_print *ndr, const char *name, int flags, const struct dfs_FlushFtTable *r)
5341 ndr_print_struct(ndr, name, "dfs_FlushFtTable");
5342 ndr->depth++;
5343 if (flags & NDR_SET_VALUES) {
5344 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5346 if (flags & NDR_IN) {
5347 ndr_print_struct(ndr, "in", "dfs_FlushFtTable");
5348 ndr->depth++;
5349 ndr_print_string(ndr, "servername", r->in.servername);
5350 ndr_print_string(ndr, "rootshare", r->in.rootshare);
5351 ndr->depth--;
5353 if (flags & NDR_OUT) {
5354 ndr_print_struct(ndr, "out", "dfs_FlushFtTable");
5355 ndr->depth++;
5356 ndr_print_WERROR(ndr, "result", r->out.result);
5357 ndr->depth--;
5359 ndr->depth--;
5362 static enum ndr_err_code ndr_push_dfs_Add2(struct ndr_push *ndr, int flags, const struct dfs_Add2 *r)
5364 if (flags & NDR_IN) {
5366 if (flags & NDR_OUT) {
5367 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5369 return NDR_ERR_SUCCESS;
5372 static enum ndr_err_code ndr_pull_dfs_Add2(struct ndr_pull *ndr, int flags, struct dfs_Add2 *r)
5374 if (flags & NDR_IN) {
5376 if (flags & NDR_OUT) {
5377 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5379 return NDR_ERR_SUCCESS;
5382 _PUBLIC_ void ndr_print_dfs_Add2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Add2 *r)
5384 ndr_print_struct(ndr, name, "dfs_Add2");
5385 ndr->depth++;
5386 if (flags & NDR_SET_VALUES) {
5387 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5389 if (flags & NDR_IN) {
5390 ndr_print_struct(ndr, "in", "dfs_Add2");
5391 ndr->depth++;
5392 ndr->depth--;
5394 if (flags & NDR_OUT) {
5395 ndr_print_struct(ndr, "out", "dfs_Add2");
5396 ndr->depth++;
5397 ndr_print_WERROR(ndr, "result", r->out.result);
5398 ndr->depth--;
5400 ndr->depth--;
5403 static enum ndr_err_code ndr_push_dfs_Remove2(struct ndr_push *ndr, int flags, const struct dfs_Remove2 *r)
5405 if (flags & NDR_IN) {
5407 if (flags & NDR_OUT) {
5408 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5410 return NDR_ERR_SUCCESS;
5413 static enum ndr_err_code ndr_pull_dfs_Remove2(struct ndr_pull *ndr, int flags, struct dfs_Remove2 *r)
5415 if (flags & NDR_IN) {
5417 if (flags & NDR_OUT) {
5418 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5420 return NDR_ERR_SUCCESS;
5423 _PUBLIC_ void ndr_print_dfs_Remove2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Remove2 *r)
5425 ndr_print_struct(ndr, name, "dfs_Remove2");
5426 ndr->depth++;
5427 if (flags & NDR_SET_VALUES) {
5428 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5430 if (flags & NDR_IN) {
5431 ndr_print_struct(ndr, "in", "dfs_Remove2");
5432 ndr->depth++;
5433 ndr->depth--;
5435 if (flags & NDR_OUT) {
5436 ndr_print_struct(ndr, "out", "dfs_Remove2");
5437 ndr->depth++;
5438 ndr_print_WERROR(ndr, "result", r->out.result);
5439 ndr->depth--;
5441 ndr->depth--;
5444 _PUBLIC_ enum ndr_err_code ndr_push_dfs_EnumEx(struct ndr_push *ndr, int flags, const struct dfs_EnumEx *r)
5446 if (flags & NDR_IN) {
5447 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_name, CH_UTF16)));
5448 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, 0));
5449 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_name, CH_UTF16)));
5450 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));
5451 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
5452 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bufsize));
5453 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info));
5454 if (r->in.info) {
5455 NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
5457 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.total));
5458 if (r->in.total) {
5459 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.total));
5462 if (flags & NDR_OUT) {
5463 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
5464 if (r->out.info) {
5465 NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
5467 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.total));
5468 if (r->out.total) {
5469 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.total));
5471 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5473 return NDR_ERR_SUCCESS;
5476 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_EnumEx(struct ndr_pull *ndr, int flags, struct dfs_EnumEx *r)
5478 uint32_t _ptr_info;
5479 uint32_t _ptr_total;
5480 TALLOC_CTX *_mem_save_info_0;
5481 TALLOC_CTX *_mem_save_total_0;
5482 if (flags & NDR_IN) {
5483 ZERO_STRUCT(r->out);
5485 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_name));
5486 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_name));
5487 if (ndr_get_array_length(ndr, &r->in.dfs_name) > ndr_get_array_size(ndr, &r->in.dfs_name)) {
5488 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->in.dfs_name), ndr_get_array_length(ndr, &r->in.dfs_name));
5490 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfs_name), sizeof(uint16_t)));
5491 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfs_name, ndr_get_array_length(ndr, &r->in.dfs_name), sizeof(uint16_t), CH_UTF16));
5492 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
5493 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bufsize));
5494 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
5495 if (_ptr_info) {
5496 NDR_PULL_ALLOC(ndr, r->in.info);
5497 } else {
5498 r->in.info = NULL;
5500 if (r->in.info) {
5501 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
5502 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0);
5503 NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
5504 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
5506 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total));
5507 if (_ptr_total) {
5508 NDR_PULL_ALLOC(ndr, r->in.total);
5509 } else {
5510 r->in.total = NULL;
5512 if (r->in.total) {
5513 _mem_save_total_0 = NDR_PULL_GET_MEM_CTX(ndr);
5514 NDR_PULL_SET_MEM_CTX(ndr, r->in.total, 0);
5515 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.total));
5516 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_0, 0);
5519 if (flags & NDR_OUT) {
5520 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
5521 if (_ptr_info) {
5522 NDR_PULL_ALLOC(ndr, r->out.info);
5523 } else {
5524 r->out.info = NULL;
5526 if (r->out.info) {
5527 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
5528 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
5529 NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
5530 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
5532 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total));
5533 if (_ptr_total) {
5534 NDR_PULL_ALLOC(ndr, r->out.total);
5535 } else {
5536 r->out.total = NULL;
5538 if (r->out.total) {
5539 _mem_save_total_0 = NDR_PULL_GET_MEM_CTX(ndr);
5540 NDR_PULL_SET_MEM_CTX(ndr, r->out.total, 0);
5541 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.total));
5542 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_0, 0);
5544 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5546 return NDR_ERR_SUCCESS;
5549 _PUBLIC_ void ndr_print_dfs_EnumEx(struct ndr_print *ndr, const char *name, int flags, const struct dfs_EnumEx *r)
5551 ndr_print_struct(ndr, name, "dfs_EnumEx");
5552 ndr->depth++;
5553 if (flags & NDR_SET_VALUES) {
5554 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5556 if (flags & NDR_IN) {
5557 ndr_print_struct(ndr, "in", "dfs_EnumEx");
5558 ndr->depth++;
5559 ndr_print_string(ndr, "dfs_name", r->in.dfs_name);
5560 ndr_print_uint32(ndr, "level", r->in.level);
5561 ndr_print_uint32(ndr, "bufsize", r->in.bufsize);
5562 ndr_print_ptr(ndr, "info", r->in.info);
5563 ndr->depth++;
5564 if (r->in.info) {
5565 ndr_print_dfs_EnumStruct(ndr, "info", r->in.info);
5567 ndr->depth--;
5568 ndr_print_ptr(ndr, "total", r->in.total);
5569 ndr->depth++;
5570 if (r->in.total) {
5571 ndr_print_uint32(ndr, "total", *r->in.total);
5573 ndr->depth--;
5574 ndr->depth--;
5576 if (flags & NDR_OUT) {
5577 ndr_print_struct(ndr, "out", "dfs_EnumEx");
5578 ndr->depth++;
5579 ndr_print_ptr(ndr, "info", r->out.info);
5580 ndr->depth++;
5581 if (r->out.info) {
5582 ndr_print_dfs_EnumStruct(ndr, "info", r->out.info);
5584 ndr->depth--;
5585 ndr_print_ptr(ndr, "total", r->out.total);
5586 ndr->depth++;
5587 if (r->out.total) {
5588 ndr_print_uint32(ndr, "total", *r->out.total);
5590 ndr->depth--;
5591 ndr_print_WERROR(ndr, "result", r->out.result);
5592 ndr->depth--;
5594 ndr->depth--;
5597 static enum ndr_err_code ndr_push_dfs_SetInfo2(struct ndr_push *ndr, int flags, const struct dfs_SetInfo2 *r)
5599 if (flags & NDR_IN) {
5601 if (flags & NDR_OUT) {
5602 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5604 return NDR_ERR_SUCCESS;
5607 static enum ndr_err_code ndr_pull_dfs_SetInfo2(struct ndr_pull *ndr, int flags, struct dfs_SetInfo2 *r)
5609 if (flags & NDR_IN) {
5611 if (flags & NDR_OUT) {
5612 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5614 return NDR_ERR_SUCCESS;
5617 _PUBLIC_ void ndr_print_dfs_SetInfo2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetInfo2 *r)
5619 ndr_print_struct(ndr, name, "dfs_SetInfo2");
5620 ndr->depth++;
5621 if (flags & NDR_SET_VALUES) {
5622 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5624 if (flags & NDR_IN) {
5625 ndr_print_struct(ndr, "in", "dfs_SetInfo2");
5626 ndr->depth++;
5627 ndr->depth--;
5629 if (flags & NDR_OUT) {
5630 ndr_print_struct(ndr, "out", "dfs_SetInfo2");
5631 ndr->depth++;
5632 ndr_print_WERROR(ndr, "result", r->out.result);
5633 ndr->depth--;
5635 ndr->depth--;
5638 static const struct ndr_interface_call netdfs_calls[] = {
5640 "dfs_GetManagerVersion",
5641 sizeof(struct dfs_GetManagerVersion),
5642 (ndr_push_flags_fn_t) ndr_push_dfs_GetManagerVersion,
5643 (ndr_pull_flags_fn_t) ndr_pull_dfs_GetManagerVersion,
5644 (ndr_print_function_t) ndr_print_dfs_GetManagerVersion,
5645 false,
5648 "dfs_Add",
5649 sizeof(struct dfs_Add),
5650 (ndr_push_flags_fn_t) ndr_push_dfs_Add,
5651 (ndr_pull_flags_fn_t) ndr_pull_dfs_Add,
5652 (ndr_print_function_t) ndr_print_dfs_Add,
5653 false,
5656 "dfs_Remove",
5657 sizeof(struct dfs_Remove),
5658 (ndr_push_flags_fn_t) ndr_push_dfs_Remove,
5659 (ndr_pull_flags_fn_t) ndr_pull_dfs_Remove,
5660 (ndr_print_function_t) ndr_print_dfs_Remove,
5661 false,
5664 "dfs_SetInfo",
5665 sizeof(struct dfs_SetInfo),
5666 (ndr_push_flags_fn_t) ndr_push_dfs_SetInfo,
5667 (ndr_pull_flags_fn_t) ndr_pull_dfs_SetInfo,
5668 (ndr_print_function_t) ndr_print_dfs_SetInfo,
5669 false,
5672 "dfs_GetInfo",
5673 sizeof(struct dfs_GetInfo),
5674 (ndr_push_flags_fn_t) ndr_push_dfs_GetInfo,
5675 (ndr_pull_flags_fn_t) ndr_pull_dfs_GetInfo,
5676 (ndr_print_function_t) ndr_print_dfs_GetInfo,
5677 false,
5680 "dfs_Enum",
5681 sizeof(struct dfs_Enum),
5682 (ndr_push_flags_fn_t) ndr_push_dfs_Enum,
5683 (ndr_pull_flags_fn_t) ndr_pull_dfs_Enum,
5684 (ndr_print_function_t) ndr_print_dfs_Enum,
5685 false,
5688 "dfs_Rename",
5689 sizeof(struct dfs_Rename),
5690 (ndr_push_flags_fn_t) ndr_push_dfs_Rename,
5691 (ndr_pull_flags_fn_t) ndr_pull_dfs_Rename,
5692 (ndr_print_function_t) ndr_print_dfs_Rename,
5693 false,
5696 "dfs_Move",
5697 sizeof(struct dfs_Move),
5698 (ndr_push_flags_fn_t) ndr_push_dfs_Move,
5699 (ndr_pull_flags_fn_t) ndr_pull_dfs_Move,
5700 (ndr_print_function_t) ndr_print_dfs_Move,
5701 false,
5704 "dfs_ManagerGetConfigInfo",
5705 sizeof(struct dfs_ManagerGetConfigInfo),
5706 (ndr_push_flags_fn_t) ndr_push_dfs_ManagerGetConfigInfo,
5707 (ndr_pull_flags_fn_t) ndr_pull_dfs_ManagerGetConfigInfo,
5708 (ndr_print_function_t) ndr_print_dfs_ManagerGetConfigInfo,
5709 false,
5712 "dfs_ManagerSendSiteInfo",
5713 sizeof(struct dfs_ManagerSendSiteInfo),
5714 (ndr_push_flags_fn_t) ndr_push_dfs_ManagerSendSiteInfo,
5715 (ndr_pull_flags_fn_t) ndr_pull_dfs_ManagerSendSiteInfo,
5716 (ndr_print_function_t) ndr_print_dfs_ManagerSendSiteInfo,
5717 false,
5720 "dfs_AddFtRoot",
5721 sizeof(struct dfs_AddFtRoot),
5722 (ndr_push_flags_fn_t) ndr_push_dfs_AddFtRoot,
5723 (ndr_pull_flags_fn_t) ndr_pull_dfs_AddFtRoot,
5724 (ndr_print_function_t) ndr_print_dfs_AddFtRoot,
5725 false,
5728 "dfs_RemoveFtRoot",
5729 sizeof(struct dfs_RemoveFtRoot),
5730 (ndr_push_flags_fn_t) ndr_push_dfs_RemoveFtRoot,
5731 (ndr_pull_flags_fn_t) ndr_pull_dfs_RemoveFtRoot,
5732 (ndr_print_function_t) ndr_print_dfs_RemoveFtRoot,
5733 false,
5736 "dfs_AddStdRoot",
5737 sizeof(struct dfs_AddStdRoot),
5738 (ndr_push_flags_fn_t) ndr_push_dfs_AddStdRoot,
5739 (ndr_pull_flags_fn_t) ndr_pull_dfs_AddStdRoot,
5740 (ndr_print_function_t) ndr_print_dfs_AddStdRoot,
5741 false,
5744 "dfs_RemoveStdRoot",
5745 sizeof(struct dfs_RemoveStdRoot),
5746 (ndr_push_flags_fn_t) ndr_push_dfs_RemoveStdRoot,
5747 (ndr_pull_flags_fn_t) ndr_pull_dfs_RemoveStdRoot,
5748 (ndr_print_function_t) ndr_print_dfs_RemoveStdRoot,
5749 false,
5752 "dfs_ManagerInitialize",
5753 sizeof(struct dfs_ManagerInitialize),
5754 (ndr_push_flags_fn_t) ndr_push_dfs_ManagerInitialize,
5755 (ndr_pull_flags_fn_t) ndr_pull_dfs_ManagerInitialize,
5756 (ndr_print_function_t) ndr_print_dfs_ManagerInitialize,
5757 false,
5760 "dfs_AddStdRootForced",
5761 sizeof(struct dfs_AddStdRootForced),
5762 (ndr_push_flags_fn_t) ndr_push_dfs_AddStdRootForced,
5763 (ndr_pull_flags_fn_t) ndr_pull_dfs_AddStdRootForced,
5764 (ndr_print_function_t) ndr_print_dfs_AddStdRootForced,
5765 false,
5768 "dfs_GetDcAddress",
5769 sizeof(struct dfs_GetDcAddress),
5770 (ndr_push_flags_fn_t) ndr_push_dfs_GetDcAddress,
5771 (ndr_pull_flags_fn_t) ndr_pull_dfs_GetDcAddress,
5772 (ndr_print_function_t) ndr_print_dfs_GetDcAddress,
5773 false,
5776 "dfs_SetDcAddress",
5777 sizeof(struct dfs_SetDcAddress),
5778 (ndr_push_flags_fn_t) ndr_push_dfs_SetDcAddress,
5779 (ndr_pull_flags_fn_t) ndr_pull_dfs_SetDcAddress,
5780 (ndr_print_function_t) ndr_print_dfs_SetDcAddress,
5781 false,
5784 "dfs_FlushFtTable",
5785 sizeof(struct dfs_FlushFtTable),
5786 (ndr_push_flags_fn_t) ndr_push_dfs_FlushFtTable,
5787 (ndr_pull_flags_fn_t) ndr_pull_dfs_FlushFtTable,
5788 (ndr_print_function_t) ndr_print_dfs_FlushFtTable,
5789 false,
5792 "dfs_Add2",
5793 sizeof(struct dfs_Add2),
5794 (ndr_push_flags_fn_t) ndr_push_dfs_Add2,
5795 (ndr_pull_flags_fn_t) ndr_pull_dfs_Add2,
5796 (ndr_print_function_t) ndr_print_dfs_Add2,
5797 false,
5800 "dfs_Remove2",
5801 sizeof(struct dfs_Remove2),
5802 (ndr_push_flags_fn_t) ndr_push_dfs_Remove2,
5803 (ndr_pull_flags_fn_t) ndr_pull_dfs_Remove2,
5804 (ndr_print_function_t) ndr_print_dfs_Remove2,
5805 false,
5808 "dfs_EnumEx",
5809 sizeof(struct dfs_EnumEx),
5810 (ndr_push_flags_fn_t) ndr_push_dfs_EnumEx,
5811 (ndr_pull_flags_fn_t) ndr_pull_dfs_EnumEx,
5812 (ndr_print_function_t) ndr_print_dfs_EnumEx,
5813 false,
5816 "dfs_SetInfo2",
5817 sizeof(struct dfs_SetInfo2),
5818 (ndr_push_flags_fn_t) ndr_push_dfs_SetInfo2,
5819 (ndr_pull_flags_fn_t) ndr_pull_dfs_SetInfo2,
5820 (ndr_print_function_t) ndr_print_dfs_SetInfo2,
5821 false,
5823 { NULL, 0, NULL, NULL, NULL, false }
5826 static const char * const netdfs_endpoint_strings[] = {
5827 "ncacn_np:[\\pipe\\netdfs]",
5828 "ncacn_ip_tcp:",
5829 "ncalrpc:",
5832 static const struct ndr_interface_string_array netdfs_endpoints = {
5833 .count = 3,
5834 .names = netdfs_endpoint_strings
5837 static const char * const netdfs_authservice_strings[] = {
5838 "host",
5841 static const struct ndr_interface_string_array netdfs_authservices = {
5842 .count = 1,
5843 .names = netdfs_authservice_strings
5847 const struct ndr_interface_table ndr_table_netdfs = {
5848 .name = "netdfs",
5849 .syntax_id = {
5850 {0x4fc742e0,0x4a10,0x11cf,{0x82,0x73},{0x00,0xaa,0x00,0x4a,0xe6,0x73}},
5851 NDR_NETDFS_VERSION
5853 .helpstring = NDR_NETDFS_HELPSTRING,
5854 .num_calls = 23,
5855 .calls = netdfs_calls,
5856 .endpoints = &netdfs_endpoints,
5857 .authservices = &netdfs_authservices