Rerun pidl after fixing array copying in client code and authservice array sizes.
[Samba.git] / source / librpc / gen_ndr / ndr_dfs.c
blob18975507c7c59359753f93004b61a099e2a4c849
1 /* parser auto-generated by pidl */
3 #include "includes.h"
4 #include "librpc/gen_ndr/ndr_dfs.h"
6 static enum ndr_err_code ndr_push_dfs_ManagerVersion(struct ndr_push *ndr, int ndr_flags, enum dfs_ManagerVersion r)
8 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
9 return NDR_ERR_SUCCESS;
12 static enum ndr_err_code ndr_pull_dfs_ManagerVersion(struct ndr_pull *ndr, int ndr_flags, enum dfs_ManagerVersion *r)
14 uint32_t v;
15 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
16 *r = v;
17 return NDR_ERR_SUCCESS;
20 _PUBLIC_ void ndr_print_dfs_ManagerVersion(struct ndr_print *ndr, const char *name, enum dfs_ManagerVersion r)
22 const char *val = NULL;
24 switch (r) {
25 case DFS_MANAGER_VERSION_NT4: val = "DFS_MANAGER_VERSION_NT4"; break;
26 case DFS_MANAGER_VERSION_W2K: val = "DFS_MANAGER_VERSION_W2K"; break;
27 case DFS_MANAGER_VERSION_W2K3: val = "DFS_MANAGER_VERSION_W2K3"; break;
29 ndr_print_enum(ndr, name, "ENUM", val, r);
32 static enum ndr_err_code ndr_push_dfs_Info0(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info0 *r)
34 if (ndr_flags & NDR_SCALARS) {
35 NDR_CHECK(ndr_push_align(ndr, 1));
37 if (ndr_flags & NDR_BUFFERS) {
39 return NDR_ERR_SUCCESS;
42 static enum ndr_err_code ndr_pull_dfs_Info0(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info0 *r)
44 if (ndr_flags & NDR_SCALARS) {
45 NDR_CHECK(ndr_pull_align(ndr, 1));
47 if (ndr_flags & NDR_BUFFERS) {
49 return NDR_ERR_SUCCESS;
52 _PUBLIC_ void ndr_print_dfs_Info0(struct ndr_print *ndr, const char *name, const struct dfs_Info0 *r)
54 ndr_print_struct(ndr, name, "dfs_Info0");
55 ndr->depth++;
56 ndr->depth--;
59 static enum ndr_err_code ndr_push_dfs_Info1(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info1 *r)
61 if (ndr_flags & NDR_SCALARS) {
62 NDR_CHECK(ndr_push_align(ndr, 4));
63 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
65 if (ndr_flags & NDR_BUFFERS) {
66 if (r->path) {
67 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
68 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
69 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
70 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
73 return NDR_ERR_SUCCESS;
76 static enum ndr_err_code ndr_pull_dfs_Info1(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info1 *r)
78 uint32_t _ptr_path;
79 TALLOC_CTX *_mem_save_path_0;
80 if (ndr_flags & NDR_SCALARS) {
81 NDR_CHECK(ndr_pull_align(ndr, 4));
82 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
83 if (_ptr_path) {
84 NDR_PULL_ALLOC(ndr, r->path);
85 } else {
86 r->path = NULL;
89 if (ndr_flags & NDR_BUFFERS) {
90 if (r->path) {
91 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
92 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
93 NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
94 NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
95 if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) {
96 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));
98 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t)));
99 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16));
100 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
103 return NDR_ERR_SUCCESS;
106 _PUBLIC_ void ndr_print_dfs_Info1(struct ndr_print *ndr, const char *name, const struct dfs_Info1 *r)
108 ndr_print_struct(ndr, name, "dfs_Info1");
109 ndr->depth++;
110 ndr_print_ptr(ndr, "path", r->path);
111 ndr->depth++;
112 if (r->path) {
113 ndr_print_string(ndr, "path", r->path);
115 ndr->depth--;
116 ndr->depth--;
119 _PUBLIC_ enum ndr_err_code ndr_push_dfs_VolumeState(struct ndr_push *ndr, int ndr_flags, uint32_t r)
121 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
122 return NDR_ERR_SUCCESS;
125 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_VolumeState(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
127 uint32_t v;
128 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
129 *r = v;
130 return NDR_ERR_SUCCESS;
133 _PUBLIC_ void ndr_print_dfs_VolumeState(struct ndr_print *ndr, const char *name, uint32_t r)
135 ndr_print_uint32(ndr, name, r);
136 ndr->depth++;
137 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_OK", DFS_VOLUME_STATE_OK, r);
138 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_INCONSISTENT", DFS_VOLUME_STATE_INCONSISTENT, r);
139 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_OFFLINE", DFS_VOLUME_STATE_OFFLINE, r);
140 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_ONLINE", DFS_VOLUME_STATE_ONLINE, r);
141 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_STANDALONE", DFS_VOLUME_STATE_STANDALONE, r);
142 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_AD_BLOB", DFS_VOLUME_STATE_AD_BLOB, r);
143 ndr->depth--;
146 static enum ndr_err_code ndr_push_dfs_Info2(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info2 *r)
148 if (ndr_flags & NDR_SCALARS) {
149 NDR_CHECK(ndr_push_align(ndr, 4));
150 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
151 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
152 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
153 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
155 if (ndr_flags & NDR_BUFFERS) {
156 if (r->path) {
157 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
158 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
159 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
160 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
162 if (r->comment) {
163 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
164 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
165 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
166 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
169 return NDR_ERR_SUCCESS;
172 static enum ndr_err_code ndr_pull_dfs_Info2(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info2 *r)
174 uint32_t _ptr_path;
175 TALLOC_CTX *_mem_save_path_0;
176 uint32_t _ptr_comment;
177 TALLOC_CTX *_mem_save_comment_0;
178 if (ndr_flags & NDR_SCALARS) {
179 NDR_CHECK(ndr_pull_align(ndr, 4));
180 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
181 if (_ptr_path) {
182 NDR_PULL_ALLOC(ndr, r->path);
183 } else {
184 r->path = NULL;
186 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
187 if (_ptr_comment) {
188 NDR_PULL_ALLOC(ndr, r->comment);
189 } else {
190 r->comment = NULL;
192 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
193 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores));
195 if (ndr_flags & NDR_BUFFERS) {
196 if (r->path) {
197 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
198 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
199 NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
200 NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
201 if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) {
202 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));
204 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t)));
205 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16));
206 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
208 if (r->comment) {
209 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
210 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
211 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
212 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
213 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
214 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));
216 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
217 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
218 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
221 return NDR_ERR_SUCCESS;
224 _PUBLIC_ void ndr_print_dfs_Info2(struct ndr_print *ndr, const char *name, const struct dfs_Info2 *r)
226 ndr_print_struct(ndr, name, "dfs_Info2");
227 ndr->depth++;
228 ndr_print_ptr(ndr, "path", r->path);
229 ndr->depth++;
230 if (r->path) {
231 ndr_print_string(ndr, "path", r->path);
233 ndr->depth--;
234 ndr_print_ptr(ndr, "comment", r->comment);
235 ndr->depth++;
236 if (r->comment) {
237 ndr_print_string(ndr, "comment", r->comment);
239 ndr->depth--;
240 ndr_print_dfs_VolumeState(ndr, "state", r->state);
241 ndr_print_uint32(ndr, "num_stores", r->num_stores);
242 ndr->depth--;
245 _PUBLIC_ enum ndr_err_code ndr_push_dfs_StorageState(struct ndr_push *ndr, int ndr_flags, uint32_t r)
247 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
248 return NDR_ERR_SUCCESS;
251 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_StorageState(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
253 uint32_t v;
254 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
255 *r = v;
256 return NDR_ERR_SUCCESS;
259 _PUBLIC_ void ndr_print_dfs_StorageState(struct ndr_print *ndr, const char *name, uint32_t r)
261 ndr_print_uint32(ndr, name, r);
262 ndr->depth++;
263 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_STORAGE_STATE_OFFLINE", DFS_STORAGE_STATE_OFFLINE, r);
264 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_STORAGE_STATE_ONLINE", DFS_STORAGE_STATE_ONLINE, r);
265 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_STORAGE_STATE_ACTIVE", DFS_STORAGE_STATE_ACTIVE, r);
266 ndr->depth--;
269 static enum ndr_err_code ndr_push_dfs_StorageInfo(struct ndr_push *ndr, int ndr_flags, const struct dfs_StorageInfo *r)
271 if (ndr_flags & NDR_SCALARS) {
272 NDR_CHECK(ndr_push_align(ndr, 4));
273 NDR_CHECK(ndr_push_dfs_StorageState(ndr, NDR_SCALARS, r->state));
274 NDR_CHECK(ndr_push_unique_ptr(ndr, r->server));
275 NDR_CHECK(ndr_push_unique_ptr(ndr, r->share));
277 if (ndr_flags & NDR_BUFFERS) {
278 if (r->server) {
279 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->server, CH_UTF16)));
280 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
281 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->server, CH_UTF16)));
282 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server, ndr_charset_length(r->server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
284 if (r->share) {
285 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->share, CH_UTF16)));
286 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
287 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->share, CH_UTF16)));
288 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->share, ndr_charset_length(r->share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
291 return NDR_ERR_SUCCESS;
294 static enum ndr_err_code ndr_pull_dfs_StorageInfo(struct ndr_pull *ndr, int ndr_flags, struct dfs_StorageInfo *r)
296 uint32_t _ptr_server;
297 TALLOC_CTX *_mem_save_server_0;
298 uint32_t _ptr_share;
299 TALLOC_CTX *_mem_save_share_0;
300 if (ndr_flags & NDR_SCALARS) {
301 NDR_CHECK(ndr_pull_align(ndr, 4));
302 NDR_CHECK(ndr_pull_dfs_StorageState(ndr, NDR_SCALARS, &r->state));
303 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
304 if (_ptr_server) {
305 NDR_PULL_ALLOC(ndr, r->server);
306 } else {
307 r->server = NULL;
309 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share));
310 if (_ptr_share) {
311 NDR_PULL_ALLOC(ndr, r->share);
312 } else {
313 r->share = NULL;
316 if (ndr_flags & NDR_BUFFERS) {
317 if (r->server) {
318 _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
319 NDR_PULL_SET_MEM_CTX(ndr, r->server, 0);
320 NDR_CHECK(ndr_pull_array_size(ndr, &r->server));
321 NDR_CHECK(ndr_pull_array_length(ndr, &r->server));
322 if (ndr_get_array_length(ndr, &r->server) > ndr_get_array_size(ndr, &r->server)) {
323 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));
325 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->server), sizeof(uint16_t)));
326 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server, ndr_get_array_length(ndr, &r->server), sizeof(uint16_t), CH_UTF16));
327 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
329 if (r->share) {
330 _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr);
331 NDR_PULL_SET_MEM_CTX(ndr, r->share, 0);
332 NDR_CHECK(ndr_pull_array_size(ndr, &r->share));
333 NDR_CHECK(ndr_pull_array_length(ndr, &r->share));
334 if (ndr_get_array_length(ndr, &r->share) > ndr_get_array_size(ndr, &r->share)) {
335 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));
337 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->share), sizeof(uint16_t)));
338 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->share, ndr_get_array_length(ndr, &r->share), sizeof(uint16_t), CH_UTF16));
339 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0);
342 return NDR_ERR_SUCCESS;
345 _PUBLIC_ void ndr_print_dfs_StorageInfo(struct ndr_print *ndr, const char *name, const struct dfs_StorageInfo *r)
347 ndr_print_struct(ndr, name, "dfs_StorageInfo");
348 ndr->depth++;
349 ndr_print_dfs_StorageState(ndr, "state", r->state);
350 ndr_print_ptr(ndr, "server", r->server);
351 ndr->depth++;
352 if (r->server) {
353 ndr_print_string(ndr, "server", r->server);
355 ndr->depth--;
356 ndr_print_ptr(ndr, "share", r->share);
357 ndr->depth++;
358 if (r->share) {
359 ndr_print_string(ndr, "share", r->share);
361 ndr->depth--;
362 ndr->depth--;
365 static enum ndr_err_code ndr_push_dfs_Info3(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info3 *r)
367 uint32_t cntr_stores_1;
368 if (ndr_flags & NDR_SCALARS) {
369 NDR_CHECK(ndr_push_align(ndr, 4));
370 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
371 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
372 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
373 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
374 NDR_CHECK(ndr_push_unique_ptr(ndr, r->stores));
376 if (ndr_flags & NDR_BUFFERS) {
377 if (r->path) {
378 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
379 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
380 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
381 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
383 if (r->comment) {
384 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
385 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
386 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
387 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
389 if (r->stores) {
390 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
391 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
392 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
394 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
395 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
399 return NDR_ERR_SUCCESS;
402 static enum ndr_err_code ndr_pull_dfs_Info3(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info3 *r)
404 uint32_t _ptr_path;
405 TALLOC_CTX *_mem_save_path_0;
406 uint32_t _ptr_comment;
407 TALLOC_CTX *_mem_save_comment_0;
408 uint32_t _ptr_stores;
409 uint32_t cntr_stores_1;
410 TALLOC_CTX *_mem_save_stores_0;
411 TALLOC_CTX *_mem_save_stores_1;
412 if (ndr_flags & NDR_SCALARS) {
413 NDR_CHECK(ndr_pull_align(ndr, 4));
414 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
415 if (_ptr_path) {
416 NDR_PULL_ALLOC(ndr, r->path);
417 } else {
418 r->path = NULL;
420 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
421 if (_ptr_comment) {
422 NDR_PULL_ALLOC(ndr, r->comment);
423 } else {
424 r->comment = NULL;
426 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
427 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores));
428 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_stores));
429 if (_ptr_stores) {
430 NDR_PULL_ALLOC(ndr, r->stores);
431 } else {
432 r->stores = NULL;
435 if (ndr_flags & NDR_BUFFERS) {
436 if (r->path) {
437 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
438 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
439 NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
440 NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
441 if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) {
442 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));
444 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t)));
445 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16));
446 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
448 if (r->comment) {
449 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
450 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
451 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
452 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
453 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
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->comment), ndr_get_array_length(ndr, &r->comment));
456 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
457 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
458 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
460 if (r->stores) {
461 _mem_save_stores_0 = NDR_PULL_GET_MEM_CTX(ndr);
462 NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
463 NDR_CHECK(ndr_pull_array_size(ndr, &r->stores));
464 NDR_PULL_ALLOC_N(ndr, r->stores, ndr_get_array_size(ndr, &r->stores));
465 _mem_save_stores_1 = NDR_PULL_GET_MEM_CTX(ndr);
466 NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
467 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
468 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
470 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
471 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
473 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_1, 0);
474 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_0, 0);
476 if (r->stores) {
477 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->stores, r->num_stores));
480 return NDR_ERR_SUCCESS;
483 _PUBLIC_ void ndr_print_dfs_Info3(struct ndr_print *ndr, const char *name, const struct dfs_Info3 *r)
485 uint32_t cntr_stores_1;
486 ndr_print_struct(ndr, name, "dfs_Info3");
487 ndr->depth++;
488 ndr_print_ptr(ndr, "path", r->path);
489 ndr->depth++;
490 if (r->path) {
491 ndr_print_string(ndr, "path", r->path);
493 ndr->depth--;
494 ndr_print_ptr(ndr, "comment", r->comment);
495 ndr->depth++;
496 if (r->comment) {
497 ndr_print_string(ndr, "comment", r->comment);
499 ndr->depth--;
500 ndr_print_dfs_VolumeState(ndr, "state", r->state);
501 ndr_print_uint32(ndr, "num_stores", r->num_stores);
502 ndr_print_ptr(ndr, "stores", r->stores);
503 ndr->depth++;
504 if (r->stores) {
505 ndr->print(ndr, "%s: ARRAY(%d)", "stores", r->num_stores);
506 ndr->depth++;
507 for (cntr_stores_1=0;cntr_stores_1<r->num_stores;cntr_stores_1++) {
508 char *idx_1=NULL;
509 if (asprintf(&idx_1, "[%d]", cntr_stores_1) != -1) {
510 ndr_print_dfs_StorageInfo(ndr, "stores", &r->stores[cntr_stores_1]);
511 free(idx_1);
514 ndr->depth--;
516 ndr->depth--;
517 ndr->depth--;
520 static enum ndr_err_code ndr_push_dfs_Info4(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info4 *r)
522 uint32_t cntr_stores_1;
523 if (ndr_flags & NDR_SCALARS) {
524 NDR_CHECK(ndr_push_align(ndr, 4));
525 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
526 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
527 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
528 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
529 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
530 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
531 NDR_CHECK(ndr_push_unique_ptr(ndr, r->stores));
533 if (ndr_flags & NDR_BUFFERS) {
534 if (r->path) {
535 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
536 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
537 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
538 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
540 if (r->comment) {
541 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
542 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
543 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
544 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
546 NDR_CHECK(ndr_push_GUID(ndr, NDR_BUFFERS, &r->guid));
547 if (r->stores) {
548 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
549 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
550 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
552 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
553 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
557 return NDR_ERR_SUCCESS;
560 static enum ndr_err_code ndr_pull_dfs_Info4(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info4 *r)
562 uint32_t _ptr_path;
563 TALLOC_CTX *_mem_save_path_0;
564 uint32_t _ptr_comment;
565 TALLOC_CTX *_mem_save_comment_0;
566 uint32_t _ptr_stores;
567 uint32_t cntr_stores_1;
568 TALLOC_CTX *_mem_save_stores_0;
569 TALLOC_CTX *_mem_save_stores_1;
570 if (ndr_flags & NDR_SCALARS) {
571 NDR_CHECK(ndr_pull_align(ndr, 4));
572 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
573 if (_ptr_path) {
574 NDR_PULL_ALLOC(ndr, r->path);
575 } else {
576 r->path = NULL;
578 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
579 if (_ptr_comment) {
580 NDR_PULL_ALLOC(ndr, r->comment);
581 } else {
582 r->comment = NULL;
584 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
585 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
586 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
587 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores));
588 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_stores));
589 if (_ptr_stores) {
590 NDR_PULL_ALLOC(ndr, r->stores);
591 } else {
592 r->stores = NULL;
595 if (ndr_flags & NDR_BUFFERS) {
596 if (r->path) {
597 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
598 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
599 NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
600 NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
601 if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) {
602 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));
604 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t)));
605 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16));
606 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
608 if (r->comment) {
609 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
610 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
611 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
612 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
613 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
614 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));
616 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
617 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
618 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
620 NDR_CHECK(ndr_pull_GUID(ndr, NDR_BUFFERS, &r->guid));
621 if (r->stores) {
622 _mem_save_stores_0 = NDR_PULL_GET_MEM_CTX(ndr);
623 NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
624 NDR_CHECK(ndr_pull_array_size(ndr, &r->stores));
625 NDR_PULL_ALLOC_N(ndr, r->stores, ndr_get_array_size(ndr, &r->stores));
626 _mem_save_stores_1 = NDR_PULL_GET_MEM_CTX(ndr);
627 NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
628 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
629 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
631 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
632 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
634 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_1, 0);
635 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_0, 0);
637 if (r->stores) {
638 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->stores, r->num_stores));
641 return NDR_ERR_SUCCESS;
644 _PUBLIC_ void ndr_print_dfs_Info4(struct ndr_print *ndr, const char *name, const struct dfs_Info4 *r)
646 uint32_t cntr_stores_1;
647 ndr_print_struct(ndr, name, "dfs_Info4");
648 ndr->depth++;
649 ndr_print_ptr(ndr, "path", r->path);
650 ndr->depth++;
651 if (r->path) {
652 ndr_print_string(ndr, "path", r->path);
654 ndr->depth--;
655 ndr_print_ptr(ndr, "comment", r->comment);
656 ndr->depth++;
657 if (r->comment) {
658 ndr_print_string(ndr, "comment", r->comment);
660 ndr->depth--;
661 ndr_print_dfs_VolumeState(ndr, "state", r->state);
662 ndr_print_uint32(ndr, "timeout", r->timeout);
663 ndr_print_GUID(ndr, "guid", &r->guid);
664 ndr_print_uint32(ndr, "num_stores", r->num_stores);
665 ndr_print_ptr(ndr, "stores", r->stores);
666 ndr->depth++;
667 if (r->stores) {
668 ndr->print(ndr, "%s: ARRAY(%d)", "stores", r->num_stores);
669 ndr->depth++;
670 for (cntr_stores_1=0;cntr_stores_1<r->num_stores;cntr_stores_1++) {
671 char *idx_1=NULL;
672 if (asprintf(&idx_1, "[%d]", cntr_stores_1) != -1) {
673 ndr_print_dfs_StorageInfo(ndr, "stores", &r->stores[cntr_stores_1]);
674 free(idx_1);
677 ndr->depth--;
679 ndr->depth--;
680 ndr->depth--;
683 _PUBLIC_ enum ndr_err_code ndr_push_dfs_PropertyFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
685 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
686 return NDR_ERR_SUCCESS;
689 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_PropertyFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
691 uint32_t v;
692 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
693 *r = v;
694 return NDR_ERR_SUCCESS;
697 _PUBLIC_ void ndr_print_dfs_PropertyFlags(struct ndr_print *ndr, const char *name, uint32_t r)
699 ndr_print_uint32(ndr, name, r);
700 ndr->depth++;
701 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_INSITE_REFERRALS", DFS_PROPERTY_FLAG_INSITE_REFERRALS, r);
702 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_ROOT_SCALABILITY", DFS_PROPERTY_FLAG_ROOT_SCALABILITY, r);
703 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_SITE_COSTING", DFS_PROPERTY_FLAG_SITE_COSTING, r);
704 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_TARGET_FAILBACK", DFS_PROPERTY_FLAG_TARGET_FAILBACK, r);
705 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_CLUSTER_ENABLED", DFS_PROPERTY_FLAG_CLUSTER_ENABLED, r);
706 ndr->depth--;
709 static enum ndr_err_code ndr_push_dfs_Info5(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info5 *r)
711 if (ndr_flags & NDR_SCALARS) {
712 NDR_CHECK(ndr_push_align(ndr, 4));
713 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
714 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
715 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
716 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
717 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
718 NDR_CHECK(ndr_push_dfs_PropertyFlags(ndr, NDR_SCALARS, r->flags));
719 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pktsize));
720 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
722 if (ndr_flags & NDR_BUFFERS) {
723 if (r->path) {
724 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
725 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
726 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
727 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
729 if (r->comment) {
730 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
731 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
732 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
733 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
735 NDR_CHECK(ndr_push_GUID(ndr, NDR_BUFFERS, &r->guid));
737 return NDR_ERR_SUCCESS;
740 static enum ndr_err_code ndr_pull_dfs_Info5(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info5 *r)
742 uint32_t _ptr_path;
743 TALLOC_CTX *_mem_save_path_0;
744 uint32_t _ptr_comment;
745 TALLOC_CTX *_mem_save_comment_0;
746 if (ndr_flags & NDR_SCALARS) {
747 NDR_CHECK(ndr_pull_align(ndr, 4));
748 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
749 if (_ptr_path) {
750 NDR_PULL_ALLOC(ndr, r->path);
751 } else {
752 r->path = NULL;
754 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
755 if (_ptr_comment) {
756 NDR_PULL_ALLOC(ndr, r->comment);
757 } else {
758 r->comment = NULL;
760 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
761 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
762 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
763 NDR_CHECK(ndr_pull_dfs_PropertyFlags(ndr, NDR_SCALARS, &r->flags));
764 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pktsize));
765 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores));
767 if (ndr_flags & NDR_BUFFERS) {
768 if (r->path) {
769 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
770 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
771 NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
772 NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
773 if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) {
774 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));
776 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t)));
777 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16));
778 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
780 if (r->comment) {
781 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
782 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
783 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
784 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
785 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
786 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));
788 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
789 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
790 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
792 NDR_CHECK(ndr_pull_GUID(ndr, NDR_BUFFERS, &r->guid));
794 return NDR_ERR_SUCCESS;
797 _PUBLIC_ void ndr_print_dfs_Info5(struct ndr_print *ndr, const char *name, const struct dfs_Info5 *r)
799 ndr_print_struct(ndr, name, "dfs_Info5");
800 ndr->depth++;
801 ndr_print_ptr(ndr, "path", r->path);
802 ndr->depth++;
803 if (r->path) {
804 ndr_print_string(ndr, "path", r->path);
806 ndr->depth--;
807 ndr_print_ptr(ndr, "comment", r->comment);
808 ndr->depth++;
809 if (r->comment) {
810 ndr_print_string(ndr, "comment", r->comment);
812 ndr->depth--;
813 ndr_print_dfs_VolumeState(ndr, "state", r->state);
814 ndr_print_uint32(ndr, "timeout", r->timeout);
815 ndr_print_GUID(ndr, "guid", &r->guid);
816 ndr_print_dfs_PropertyFlags(ndr, "flags", r->flags);
817 ndr_print_uint32(ndr, "pktsize", r->pktsize);
818 ndr_print_uint32(ndr, "num_stores", r->num_stores);
819 ndr->depth--;
822 static enum ndr_err_code ndr_push_dfs_Target_PriorityClass(struct ndr_push *ndr, int ndr_flags, enum dfs_Target_PriorityClass r)
824 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
825 return NDR_ERR_SUCCESS;
828 static enum ndr_err_code ndr_pull_dfs_Target_PriorityClass(struct ndr_pull *ndr, int ndr_flags, enum dfs_Target_PriorityClass *r)
830 uint32_t v;
831 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
832 *r = v;
833 return NDR_ERR_SUCCESS;
836 _PUBLIC_ void ndr_print_dfs_Target_PriorityClass(struct ndr_print *ndr, const char *name, enum dfs_Target_PriorityClass r)
838 const char *val = NULL;
840 switch (r) {
841 case DFS_INVALID_PRIORITY_CLASS: val = "DFS_INVALID_PRIORITY_CLASS"; break;
842 case DFS_SITE_COST_NORMAL_PRIORITY_CLASS: val = "DFS_SITE_COST_NORMAL_PRIORITY_CLASS"; break;
843 case DFS_GLOBAL_HIGH_PRIORITY_CLASS: val = "DFS_GLOBAL_HIGH_PRIORITY_CLASS"; break;
844 case DFS_SITE_COST_HIGH_PRIORITY_CLASS: val = "DFS_SITE_COST_HIGH_PRIORITY_CLASS"; break;
845 case DFS_SITE_COST_LOW_PRIORITY_CLASS: val = "DFS_SITE_COST_LOW_PRIORITY_CLASS"; break;
846 case DFS_GLOBAL_LOW_PRIORITY_CLASS: val = "DFS_GLOBAL_LOW_PRIORITY_CLASS"; break;
848 ndr_print_enum(ndr, name, "ENUM", val, r);
851 static enum ndr_err_code ndr_push_dfs_Target_Priority(struct ndr_push *ndr, int ndr_flags, const struct dfs_Target_Priority *r)
853 if (ndr_flags & NDR_SCALARS) {
854 NDR_CHECK(ndr_push_align(ndr, 4));
855 NDR_CHECK(ndr_push_dfs_Target_PriorityClass(ndr, NDR_SCALARS, r->target_priority_class));
856 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->target_priority_rank));
857 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->reserved));
859 if (ndr_flags & NDR_BUFFERS) {
861 return NDR_ERR_SUCCESS;
864 static enum ndr_err_code ndr_pull_dfs_Target_Priority(struct ndr_pull *ndr, int ndr_flags, struct dfs_Target_Priority *r)
866 if (ndr_flags & NDR_SCALARS) {
867 NDR_CHECK(ndr_pull_align(ndr, 4));
868 NDR_CHECK(ndr_pull_dfs_Target_PriorityClass(ndr, NDR_SCALARS, &r->target_priority_class));
869 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->target_priority_rank));
870 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved));
872 if (ndr_flags & NDR_BUFFERS) {
874 return NDR_ERR_SUCCESS;
877 _PUBLIC_ void ndr_print_dfs_Target_Priority(struct ndr_print *ndr, const char *name, const struct dfs_Target_Priority *r)
879 ndr_print_struct(ndr, name, "dfs_Target_Priority");
880 ndr->depth++;
881 ndr_print_dfs_Target_PriorityClass(ndr, "target_priority_class", r->target_priority_class);
882 ndr_print_uint16(ndr, "target_priority_rank", r->target_priority_rank);
883 ndr_print_uint16(ndr, "reserved", r->reserved);
884 ndr->depth--;
887 static enum ndr_err_code ndr_push_dfs_StorageInfo2(struct ndr_push *ndr, int ndr_flags, const struct dfs_StorageInfo2 *r)
889 if (ndr_flags & NDR_SCALARS) {
890 NDR_CHECK(ndr_push_align(ndr, 4));
891 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_SCALARS, &r->info));
892 NDR_CHECK(ndr_push_dfs_Target_Priority(ndr, NDR_SCALARS, &r->target_priority));
894 if (ndr_flags & NDR_BUFFERS) {
895 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->info));
897 return NDR_ERR_SUCCESS;
900 static enum ndr_err_code ndr_pull_dfs_StorageInfo2(struct ndr_pull *ndr, int ndr_flags, struct dfs_StorageInfo2 *r)
902 if (ndr_flags & NDR_SCALARS) {
903 NDR_CHECK(ndr_pull_align(ndr, 4));
904 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_SCALARS, &r->info));
905 NDR_CHECK(ndr_pull_dfs_Target_Priority(ndr, NDR_SCALARS, &r->target_priority));
907 if (ndr_flags & NDR_BUFFERS) {
908 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->info));
910 return NDR_ERR_SUCCESS;
913 _PUBLIC_ void ndr_print_dfs_StorageInfo2(struct ndr_print *ndr, const char *name, const struct dfs_StorageInfo2 *r)
915 ndr_print_struct(ndr, name, "dfs_StorageInfo2");
916 ndr->depth++;
917 ndr_print_dfs_StorageInfo(ndr, "info", &r->info);
918 ndr_print_dfs_Target_Priority(ndr, "target_priority", &r->target_priority);
919 ndr->depth--;
922 static enum ndr_err_code ndr_push_dfs_Info6(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info6 *r)
924 uint32_t cntr_stores_1;
925 if (ndr_flags & NDR_SCALARS) {
926 NDR_CHECK(ndr_push_align(ndr, 4));
927 NDR_CHECK(ndr_push_unique_ptr(ndr, r->entry_path));
928 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
929 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
930 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
931 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
932 NDR_CHECK(ndr_push_dfs_PropertyFlags(ndr, NDR_SCALARS, r->flags));
933 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pktsize));
934 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_stores));
935 NDR_CHECK(ndr_push_unique_ptr(ndr, r->stores));
937 if (ndr_flags & NDR_BUFFERS) {
938 if (r->entry_path) {
939 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->entry_path, CH_UTF16)));
940 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
941 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->entry_path, CH_UTF16)));
942 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->entry_path, ndr_charset_length(r->entry_path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
944 if (r->comment) {
945 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
946 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
947 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
948 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
950 NDR_CHECK(ndr_push_GUID(ndr, NDR_BUFFERS, &r->guid));
951 if (r->stores) {
952 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
953 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
954 NDR_CHECK(ndr_push_dfs_StorageInfo2(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
956 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
957 NDR_CHECK(ndr_push_dfs_StorageInfo2(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
961 return NDR_ERR_SUCCESS;
964 static enum ndr_err_code ndr_pull_dfs_Info6(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info6 *r)
966 uint32_t _ptr_entry_path;
967 TALLOC_CTX *_mem_save_entry_path_0;
968 uint32_t _ptr_comment;
969 TALLOC_CTX *_mem_save_comment_0;
970 uint32_t _ptr_stores;
971 uint32_t cntr_stores_1;
972 TALLOC_CTX *_mem_save_stores_0;
973 TALLOC_CTX *_mem_save_stores_1;
974 if (ndr_flags & NDR_SCALARS) {
975 NDR_CHECK(ndr_pull_align(ndr, 4));
976 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entry_path));
977 if (_ptr_entry_path) {
978 NDR_PULL_ALLOC(ndr, r->entry_path);
979 } else {
980 r->entry_path = NULL;
982 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
983 if (_ptr_comment) {
984 NDR_PULL_ALLOC(ndr, r->comment);
985 } else {
986 r->comment = NULL;
988 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
989 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
990 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
991 NDR_CHECK(ndr_pull_dfs_PropertyFlags(ndr, NDR_SCALARS, &r->flags));
992 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pktsize));
993 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_stores));
994 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_stores));
995 if (_ptr_stores) {
996 NDR_PULL_ALLOC(ndr, r->stores);
997 } else {
998 r->stores = NULL;
1001 if (ndr_flags & NDR_BUFFERS) {
1002 if (r->entry_path) {
1003 _mem_save_entry_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
1004 NDR_PULL_SET_MEM_CTX(ndr, r->entry_path, 0);
1005 NDR_CHECK(ndr_pull_array_size(ndr, &r->entry_path));
1006 NDR_CHECK(ndr_pull_array_length(ndr, &r->entry_path));
1007 if (ndr_get_array_length(ndr, &r->entry_path) > ndr_get_array_size(ndr, &r->entry_path)) {
1008 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));
1010 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->entry_path), sizeof(uint16_t)));
1011 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->entry_path, ndr_get_array_length(ndr, &r->entry_path), sizeof(uint16_t), CH_UTF16));
1012 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entry_path_0, 0);
1014 if (r->comment) {
1015 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
1016 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
1017 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
1018 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
1019 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
1020 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));
1022 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
1023 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
1024 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
1026 NDR_CHECK(ndr_pull_GUID(ndr, NDR_BUFFERS, &r->guid));
1027 if (r->stores) {
1028 _mem_save_stores_0 = NDR_PULL_GET_MEM_CTX(ndr);
1029 NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
1030 NDR_CHECK(ndr_pull_array_size(ndr, &r->stores));
1031 NDR_PULL_ALLOC_N(ndr, r->stores, ndr_get_array_size(ndr, &r->stores));
1032 _mem_save_stores_1 = NDR_PULL_GET_MEM_CTX(ndr);
1033 NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
1034 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
1035 NDR_CHECK(ndr_pull_dfs_StorageInfo2(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
1037 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
1038 NDR_CHECK(ndr_pull_dfs_StorageInfo2(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
1040 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_1, 0);
1041 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_0, 0);
1043 if (r->stores) {
1044 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->stores, r->num_stores));
1047 return NDR_ERR_SUCCESS;
1050 _PUBLIC_ void ndr_print_dfs_Info6(struct ndr_print *ndr, const char *name, const struct dfs_Info6 *r)
1052 uint32_t cntr_stores_1;
1053 ndr_print_struct(ndr, name, "dfs_Info6");
1054 ndr->depth++;
1055 ndr_print_ptr(ndr, "entry_path", r->entry_path);
1056 ndr->depth++;
1057 if (r->entry_path) {
1058 ndr_print_string(ndr, "entry_path", r->entry_path);
1060 ndr->depth--;
1061 ndr_print_ptr(ndr, "comment", r->comment);
1062 ndr->depth++;
1063 if (r->comment) {
1064 ndr_print_string(ndr, "comment", r->comment);
1066 ndr->depth--;
1067 ndr_print_dfs_VolumeState(ndr, "state", r->state);
1068 ndr_print_uint32(ndr, "timeout", r->timeout);
1069 ndr_print_GUID(ndr, "guid", &r->guid);
1070 ndr_print_dfs_PropertyFlags(ndr, "flags", r->flags);
1071 ndr_print_uint32(ndr, "pktsize", r->pktsize);
1072 ndr_print_uint16(ndr, "num_stores", r->num_stores);
1073 ndr_print_ptr(ndr, "stores", r->stores);
1074 ndr->depth++;
1075 if (r->stores) {
1076 ndr->print(ndr, "%s: ARRAY(%d)", "stores", r->num_stores);
1077 ndr->depth++;
1078 for (cntr_stores_1=0;cntr_stores_1<r->num_stores;cntr_stores_1++) {
1079 char *idx_1=NULL;
1080 if (asprintf(&idx_1, "[%d]", cntr_stores_1) != -1) {
1081 ndr_print_dfs_StorageInfo2(ndr, "stores", &r->stores[cntr_stores_1]);
1082 free(idx_1);
1085 ndr->depth--;
1087 ndr->depth--;
1088 ndr->depth--;
1091 static enum ndr_err_code ndr_push_dfs_Info7(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info7 *r)
1093 if (ndr_flags & NDR_SCALARS) {
1094 NDR_CHECK(ndr_push_align(ndr, 4));
1095 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->generation_guid));
1097 if (ndr_flags & NDR_BUFFERS) {
1098 NDR_CHECK(ndr_push_GUID(ndr, NDR_BUFFERS, &r->generation_guid));
1100 return NDR_ERR_SUCCESS;
1103 static enum ndr_err_code ndr_pull_dfs_Info7(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info7 *r)
1105 if (ndr_flags & NDR_SCALARS) {
1106 NDR_CHECK(ndr_pull_align(ndr, 4));
1107 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->generation_guid));
1109 if (ndr_flags & NDR_BUFFERS) {
1110 NDR_CHECK(ndr_pull_GUID(ndr, NDR_BUFFERS, &r->generation_guid));
1112 return NDR_ERR_SUCCESS;
1115 _PUBLIC_ void ndr_print_dfs_Info7(struct ndr_print *ndr, const char *name, const struct dfs_Info7 *r)
1117 ndr_print_struct(ndr, name, "dfs_Info7");
1118 ndr->depth++;
1119 ndr_print_GUID(ndr, "generation_guid", &r->generation_guid);
1120 ndr->depth--;
1123 static enum ndr_err_code ndr_push_dfs_Info100(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info100 *r)
1125 if (ndr_flags & NDR_SCALARS) {
1126 NDR_CHECK(ndr_push_align(ndr, 4));
1127 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
1129 if (ndr_flags & NDR_BUFFERS) {
1130 if (r->comment) {
1131 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
1132 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1133 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
1134 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1137 return NDR_ERR_SUCCESS;
1140 static enum ndr_err_code ndr_pull_dfs_Info100(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info100 *r)
1142 uint32_t _ptr_comment;
1143 TALLOC_CTX *_mem_save_comment_0;
1144 if (ndr_flags & NDR_SCALARS) {
1145 NDR_CHECK(ndr_pull_align(ndr, 4));
1146 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
1147 if (_ptr_comment) {
1148 NDR_PULL_ALLOC(ndr, r->comment);
1149 } else {
1150 r->comment = NULL;
1153 if (ndr_flags & NDR_BUFFERS) {
1154 if (r->comment) {
1155 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
1156 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
1157 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
1158 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
1159 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
1160 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));
1162 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
1163 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
1164 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
1167 return NDR_ERR_SUCCESS;
1170 _PUBLIC_ void ndr_print_dfs_Info100(struct ndr_print *ndr, const char *name, const struct dfs_Info100 *r)
1172 ndr_print_struct(ndr, name, "dfs_Info100");
1173 ndr->depth++;
1174 ndr_print_ptr(ndr, "comment", r->comment);
1175 ndr->depth++;
1176 if (r->comment) {
1177 ndr_print_string(ndr, "comment", r->comment);
1179 ndr->depth--;
1180 ndr->depth--;
1183 static enum ndr_err_code ndr_push_dfs_Info101(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info101 *r)
1185 if (ndr_flags & NDR_SCALARS) {
1186 NDR_CHECK(ndr_push_align(ndr, 4));
1187 NDR_CHECK(ndr_push_dfs_StorageState(ndr, NDR_SCALARS, r->state));
1189 if (ndr_flags & NDR_BUFFERS) {
1191 return NDR_ERR_SUCCESS;
1194 static enum ndr_err_code ndr_pull_dfs_Info101(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info101 *r)
1196 if (ndr_flags & NDR_SCALARS) {
1197 NDR_CHECK(ndr_pull_align(ndr, 4));
1198 NDR_CHECK(ndr_pull_dfs_StorageState(ndr, NDR_SCALARS, &r->state));
1200 if (ndr_flags & NDR_BUFFERS) {
1202 return NDR_ERR_SUCCESS;
1205 _PUBLIC_ void ndr_print_dfs_Info101(struct ndr_print *ndr, const char *name, const struct dfs_Info101 *r)
1207 ndr_print_struct(ndr, name, "dfs_Info101");
1208 ndr->depth++;
1209 ndr_print_dfs_StorageState(ndr, "state", r->state);
1210 ndr->depth--;
1213 static enum ndr_err_code ndr_push_dfs_Info102(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info102 *r)
1215 if (ndr_flags & NDR_SCALARS) {
1216 NDR_CHECK(ndr_push_align(ndr, 4));
1217 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
1219 if (ndr_flags & NDR_BUFFERS) {
1221 return NDR_ERR_SUCCESS;
1224 static enum ndr_err_code ndr_pull_dfs_Info102(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info102 *r)
1226 if (ndr_flags & NDR_SCALARS) {
1227 NDR_CHECK(ndr_pull_align(ndr, 4));
1228 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
1230 if (ndr_flags & NDR_BUFFERS) {
1232 return NDR_ERR_SUCCESS;
1235 _PUBLIC_ void ndr_print_dfs_Info102(struct ndr_print *ndr, const char *name, const struct dfs_Info102 *r)
1237 ndr_print_struct(ndr, name, "dfs_Info102");
1238 ndr->depth++;
1239 ndr_print_uint32(ndr, "timeout", r->timeout);
1240 ndr->depth--;
1243 static enum ndr_err_code ndr_push_dfs_Info103(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info103 *r)
1245 if (ndr_flags & NDR_SCALARS) {
1246 NDR_CHECK(ndr_push_align(ndr, 4));
1247 NDR_CHECK(ndr_push_dfs_PropertyFlags(ndr, NDR_SCALARS, r->flags));
1249 if (ndr_flags & NDR_BUFFERS) {
1251 return NDR_ERR_SUCCESS;
1254 static enum ndr_err_code ndr_pull_dfs_Info103(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info103 *r)
1256 if (ndr_flags & NDR_SCALARS) {
1257 NDR_CHECK(ndr_pull_align(ndr, 4));
1258 NDR_CHECK(ndr_pull_dfs_PropertyFlags(ndr, NDR_SCALARS, &r->flags));
1260 if (ndr_flags & NDR_BUFFERS) {
1262 return NDR_ERR_SUCCESS;
1265 _PUBLIC_ void ndr_print_dfs_Info103(struct ndr_print *ndr, const char *name, const struct dfs_Info103 *r)
1267 ndr_print_struct(ndr, name, "dfs_Info103");
1268 ndr->depth++;
1269 ndr_print_dfs_PropertyFlags(ndr, "flags", r->flags);
1270 ndr->depth--;
1273 static enum ndr_err_code ndr_push_dfs_Info104(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info104 *r)
1275 if (ndr_flags & NDR_SCALARS) {
1276 NDR_CHECK(ndr_push_align(ndr, 4));
1277 NDR_CHECK(ndr_push_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority));
1279 if (ndr_flags & NDR_BUFFERS) {
1281 return NDR_ERR_SUCCESS;
1284 static enum ndr_err_code ndr_pull_dfs_Info104(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info104 *r)
1286 if (ndr_flags & NDR_SCALARS) {
1287 NDR_CHECK(ndr_pull_align(ndr, 4));
1288 NDR_CHECK(ndr_pull_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority));
1290 if (ndr_flags & NDR_BUFFERS) {
1292 return NDR_ERR_SUCCESS;
1295 _PUBLIC_ void ndr_print_dfs_Info104(struct ndr_print *ndr, const char *name, const struct dfs_Info104 *r)
1297 ndr_print_struct(ndr, name, "dfs_Info104");
1298 ndr->depth++;
1299 ndr_print_dfs_Target_Priority(ndr, "priority", &r->priority);
1300 ndr->depth--;
1303 static enum ndr_err_code ndr_push_dfs_Info105(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info105 *r)
1305 if (ndr_flags & NDR_SCALARS) {
1306 NDR_CHECK(ndr_push_align(ndr, 4));
1307 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
1308 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
1309 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
1310 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->property_flag_mask));
1311 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->property_flags));
1313 if (ndr_flags & NDR_BUFFERS) {
1314 if (r->comment) {
1315 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
1316 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1317 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
1318 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1321 return NDR_ERR_SUCCESS;
1324 static enum ndr_err_code ndr_pull_dfs_Info105(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info105 *r)
1326 uint32_t _ptr_comment;
1327 TALLOC_CTX *_mem_save_comment_0;
1328 if (ndr_flags & NDR_SCALARS) {
1329 NDR_CHECK(ndr_pull_align(ndr, 4));
1330 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
1331 if (_ptr_comment) {
1332 NDR_PULL_ALLOC(ndr, r->comment);
1333 } else {
1334 r->comment = NULL;
1336 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
1337 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
1338 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->property_flag_mask));
1339 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->property_flags));
1341 if (ndr_flags & NDR_BUFFERS) {
1342 if (r->comment) {
1343 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
1344 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
1345 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
1346 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
1347 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
1348 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));
1350 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
1351 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
1352 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
1355 return NDR_ERR_SUCCESS;
1358 _PUBLIC_ void ndr_print_dfs_Info105(struct ndr_print *ndr, const char *name, const struct dfs_Info105 *r)
1360 ndr_print_struct(ndr, name, "dfs_Info105");
1361 ndr->depth++;
1362 ndr_print_ptr(ndr, "comment", r->comment);
1363 ndr->depth++;
1364 if (r->comment) {
1365 ndr_print_string(ndr, "comment", r->comment);
1367 ndr->depth--;
1368 ndr_print_dfs_VolumeState(ndr, "state", r->state);
1369 ndr_print_uint32(ndr, "timeout", r->timeout);
1370 ndr_print_uint32(ndr, "property_flag_mask", r->property_flag_mask);
1371 ndr_print_uint32(ndr, "property_flags", r->property_flags);
1372 ndr->depth--;
1375 static enum ndr_err_code ndr_push_dfs_Info106(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info106 *r)
1377 if (ndr_flags & NDR_SCALARS) {
1378 NDR_CHECK(ndr_push_align(ndr, 4));
1379 NDR_CHECK(ndr_push_dfs_StorageState(ndr, NDR_SCALARS, r->state));
1380 NDR_CHECK(ndr_push_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority));
1382 if (ndr_flags & NDR_BUFFERS) {
1384 return NDR_ERR_SUCCESS;
1387 static enum ndr_err_code ndr_pull_dfs_Info106(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info106 *r)
1389 if (ndr_flags & NDR_SCALARS) {
1390 NDR_CHECK(ndr_pull_align(ndr, 4));
1391 NDR_CHECK(ndr_pull_dfs_StorageState(ndr, NDR_SCALARS, &r->state));
1392 NDR_CHECK(ndr_pull_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority));
1394 if (ndr_flags & NDR_BUFFERS) {
1396 return NDR_ERR_SUCCESS;
1399 _PUBLIC_ void ndr_print_dfs_Info106(struct ndr_print *ndr, const char *name, const struct dfs_Info106 *r)
1401 ndr_print_struct(ndr, name, "dfs_Info106");
1402 ndr->depth++;
1403 ndr_print_dfs_StorageState(ndr, "state", r->state);
1404 ndr_print_dfs_Target_Priority(ndr, "priority", &r->priority);
1405 ndr->depth--;
1408 static enum ndr_err_code ndr_push_dfs_Info200(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info200 *r)
1410 if (ndr_flags & NDR_SCALARS) {
1411 NDR_CHECK(ndr_push_align(ndr, 4));
1412 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dom_root));
1414 if (ndr_flags & NDR_BUFFERS) {
1415 if (r->dom_root) {
1416 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16)));
1417 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1418 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16)));
1419 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dom_root, ndr_charset_length(r->dom_root, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1422 return NDR_ERR_SUCCESS;
1425 static enum ndr_err_code ndr_pull_dfs_Info200(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info200 *r)
1427 uint32_t _ptr_dom_root;
1428 TALLOC_CTX *_mem_save_dom_root_0;
1429 if (ndr_flags & NDR_SCALARS) {
1430 NDR_CHECK(ndr_pull_align(ndr, 4));
1431 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dom_root));
1432 if (_ptr_dom_root) {
1433 NDR_PULL_ALLOC(ndr, r->dom_root);
1434 } else {
1435 r->dom_root = NULL;
1438 if (ndr_flags & NDR_BUFFERS) {
1439 if (r->dom_root) {
1440 _mem_save_dom_root_0 = NDR_PULL_GET_MEM_CTX(ndr);
1441 NDR_PULL_SET_MEM_CTX(ndr, r->dom_root, 0);
1442 NDR_CHECK(ndr_pull_array_size(ndr, &r->dom_root));
1443 NDR_CHECK(ndr_pull_array_length(ndr, &r->dom_root));
1444 if (ndr_get_array_length(ndr, &r->dom_root) > ndr_get_array_size(ndr, &r->dom_root)) {
1445 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));
1447 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->dom_root), sizeof(uint16_t)));
1448 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dom_root, ndr_get_array_length(ndr, &r->dom_root), sizeof(uint16_t), CH_UTF16));
1449 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_root_0, 0);
1452 return NDR_ERR_SUCCESS;
1455 _PUBLIC_ void ndr_print_dfs_Info200(struct ndr_print *ndr, const char *name, const struct dfs_Info200 *r)
1457 ndr_print_struct(ndr, name, "dfs_Info200");
1458 ndr->depth++;
1459 ndr_print_ptr(ndr, "dom_root", r->dom_root);
1460 ndr->depth++;
1461 if (r->dom_root) {
1462 ndr_print_string(ndr, "dom_root", r->dom_root);
1464 ndr->depth--;
1465 ndr->depth--;
1468 static enum ndr_err_code ndr_push_dfs_VolumeFlavor(struct ndr_push *ndr, int ndr_flags, enum dfs_VolumeFlavor r)
1470 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
1471 return NDR_ERR_SUCCESS;
1474 static enum ndr_err_code ndr_pull_dfs_VolumeFlavor(struct ndr_pull *ndr, int ndr_flags, enum dfs_VolumeFlavor *r)
1476 uint16_t v;
1477 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
1478 *r = v;
1479 return NDR_ERR_SUCCESS;
1482 _PUBLIC_ void ndr_print_dfs_VolumeFlavor(struct ndr_print *ndr, const char *name, enum dfs_VolumeFlavor r)
1484 const char *val = NULL;
1486 switch (r) {
1487 case DFS_VOLUME_FLAVOR_STANDALONE: val = "DFS_VOLUME_FLAVOR_STANDALONE"; break;
1488 case DFS_VOLUME_FLAVOR_AD_BLOB: val = "DFS_VOLUME_FLAVOR_AD_BLOB"; break;
1490 ndr_print_enum(ndr, name, "ENUM", val, r);
1493 static enum ndr_err_code ndr_push_dfs_Info300(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info300 *r)
1495 if (ndr_flags & NDR_SCALARS) {
1496 NDR_CHECK(ndr_push_align(ndr, 4));
1497 NDR_CHECK(ndr_push_dfs_VolumeFlavor(ndr, NDR_SCALARS, r->flavor));
1498 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dom_root));
1500 if (ndr_flags & NDR_BUFFERS) {
1501 if (r->dom_root) {
1502 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16)));
1503 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1504 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16)));
1505 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dom_root, ndr_charset_length(r->dom_root, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1508 return NDR_ERR_SUCCESS;
1511 static enum ndr_err_code ndr_pull_dfs_Info300(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info300 *r)
1513 uint32_t _ptr_dom_root;
1514 TALLOC_CTX *_mem_save_dom_root_0;
1515 if (ndr_flags & NDR_SCALARS) {
1516 NDR_CHECK(ndr_pull_align(ndr, 4));
1517 NDR_CHECK(ndr_pull_dfs_VolumeFlavor(ndr, NDR_SCALARS, &r->flavor));
1518 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dom_root));
1519 if (_ptr_dom_root) {
1520 NDR_PULL_ALLOC(ndr, r->dom_root);
1521 } else {
1522 r->dom_root = NULL;
1525 if (ndr_flags & NDR_BUFFERS) {
1526 if (r->dom_root) {
1527 _mem_save_dom_root_0 = NDR_PULL_GET_MEM_CTX(ndr);
1528 NDR_PULL_SET_MEM_CTX(ndr, r->dom_root, 0);
1529 NDR_CHECK(ndr_pull_array_size(ndr, &r->dom_root));
1530 NDR_CHECK(ndr_pull_array_length(ndr, &r->dom_root));
1531 if (ndr_get_array_length(ndr, &r->dom_root) > ndr_get_array_size(ndr, &r->dom_root)) {
1532 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));
1534 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->dom_root), sizeof(uint16_t)));
1535 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dom_root, ndr_get_array_length(ndr, &r->dom_root), sizeof(uint16_t), CH_UTF16));
1536 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_root_0, 0);
1539 return NDR_ERR_SUCCESS;
1542 _PUBLIC_ void ndr_print_dfs_Info300(struct ndr_print *ndr, const char *name, const struct dfs_Info300 *r)
1544 ndr_print_struct(ndr, name, "dfs_Info300");
1545 ndr->depth++;
1546 ndr_print_dfs_VolumeFlavor(ndr, "flavor", r->flavor);
1547 ndr_print_ptr(ndr, "dom_root", r->dom_root);
1548 ndr->depth++;
1549 if (r->dom_root) {
1550 ndr_print_string(ndr, "dom_root", r->dom_root);
1552 ndr->depth--;
1553 ndr->depth--;
1556 static enum ndr_err_code ndr_push_dfs_Info(struct ndr_push *ndr, int ndr_flags, const union dfs_Info *r)
1558 if (ndr_flags & NDR_SCALARS) {
1559 int level = ndr_push_get_switch_value(ndr, r);
1560 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
1561 switch (level) {
1562 case 0: {
1563 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
1564 break; }
1566 case 1: {
1567 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
1568 break; }
1570 case 2: {
1571 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
1572 break; }
1574 case 3: {
1575 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3));
1576 break; }
1578 case 4: {
1579 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info4));
1580 break; }
1582 case 5: {
1583 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info5));
1584 break; }
1586 case 6: {
1587 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info6));
1588 break; }
1590 case 7: {
1591 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info7));
1592 break; }
1594 case 100: {
1595 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info100));
1596 break; }
1598 case 101: {
1599 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info101));
1600 break; }
1602 case 102: {
1603 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info102));
1604 break; }
1606 case 103: {
1607 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info103));
1608 break; }
1610 case 104: {
1611 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info104));
1612 break; }
1614 case 105: {
1615 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info105));
1616 break; }
1618 case 106: {
1619 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info106));
1620 break; }
1622 default:
1623 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1626 if (ndr_flags & NDR_BUFFERS) {
1627 int level = ndr_push_get_switch_value(ndr, r);
1628 switch (level) {
1629 case 0:
1630 if (r->info0) {
1631 NDR_CHECK(ndr_push_dfs_Info0(ndr, NDR_SCALARS, r->info0));
1633 break;
1635 case 1:
1636 if (r->info1) {
1637 NDR_CHECK(ndr_push_dfs_Info1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
1639 break;
1641 case 2:
1642 if (r->info2) {
1643 NDR_CHECK(ndr_push_dfs_Info2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
1645 break;
1647 case 3:
1648 if (r->info3) {
1649 NDR_CHECK(ndr_push_dfs_Info3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
1651 break;
1653 case 4:
1654 if (r->info4) {
1655 NDR_CHECK(ndr_push_dfs_Info4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
1657 break;
1659 case 5:
1660 if (r->info5) {
1661 NDR_CHECK(ndr_push_dfs_Info5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5));
1663 break;
1665 case 6:
1666 if (r->info6) {
1667 NDR_CHECK(ndr_push_dfs_Info6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6));
1669 break;
1671 case 7:
1672 if (r->info7) {
1673 NDR_CHECK(ndr_push_dfs_Info7(ndr, NDR_SCALARS|NDR_BUFFERS, r->info7));
1675 break;
1677 case 100:
1678 if (r->info100) {
1679 NDR_CHECK(ndr_push_dfs_Info100(ndr, NDR_SCALARS|NDR_BUFFERS, r->info100));
1681 break;
1683 case 101:
1684 if (r->info101) {
1685 NDR_CHECK(ndr_push_dfs_Info101(ndr, NDR_SCALARS, r->info101));
1687 break;
1689 case 102:
1690 if (r->info102) {
1691 NDR_CHECK(ndr_push_dfs_Info102(ndr, NDR_SCALARS, r->info102));
1693 break;
1695 case 103:
1696 if (r->info103) {
1697 NDR_CHECK(ndr_push_dfs_Info103(ndr, NDR_SCALARS, r->info103));
1699 break;
1701 case 104:
1702 if (r->info104) {
1703 NDR_CHECK(ndr_push_dfs_Info104(ndr, NDR_SCALARS, r->info104));
1705 break;
1707 case 105:
1708 if (r->info105) {
1709 NDR_CHECK(ndr_push_dfs_Info105(ndr, NDR_SCALARS|NDR_BUFFERS, r->info105));
1711 break;
1713 case 106:
1714 if (r->info106) {
1715 NDR_CHECK(ndr_push_dfs_Info106(ndr, NDR_SCALARS, r->info106));
1717 break;
1719 default:
1720 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1723 return NDR_ERR_SUCCESS;
1726 static enum ndr_err_code ndr_pull_dfs_Info(struct ndr_pull *ndr, int ndr_flags, union dfs_Info *r)
1728 int level;
1729 uint32_t _level;
1730 TALLOC_CTX *_mem_save_info0_0;
1731 TALLOC_CTX *_mem_save_info1_0;
1732 TALLOC_CTX *_mem_save_info2_0;
1733 TALLOC_CTX *_mem_save_info3_0;
1734 TALLOC_CTX *_mem_save_info4_0;
1735 TALLOC_CTX *_mem_save_info5_0;
1736 TALLOC_CTX *_mem_save_info6_0;
1737 TALLOC_CTX *_mem_save_info7_0;
1738 TALLOC_CTX *_mem_save_info100_0;
1739 TALLOC_CTX *_mem_save_info101_0;
1740 TALLOC_CTX *_mem_save_info102_0;
1741 TALLOC_CTX *_mem_save_info103_0;
1742 TALLOC_CTX *_mem_save_info104_0;
1743 TALLOC_CTX *_mem_save_info105_0;
1744 TALLOC_CTX *_mem_save_info106_0;
1745 level = ndr_pull_get_switch_value(ndr, r);
1746 if (ndr_flags & NDR_SCALARS) {
1747 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
1748 if (_level != level) {
1749 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
1751 switch (level) {
1752 case 0: {
1753 uint32_t _ptr_info0;
1754 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
1755 if (_ptr_info0) {
1756 NDR_PULL_ALLOC(ndr, r->info0);
1757 } else {
1758 r->info0 = NULL;
1760 break; }
1762 case 1: {
1763 uint32_t _ptr_info1;
1764 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
1765 if (_ptr_info1) {
1766 NDR_PULL_ALLOC(ndr, r->info1);
1767 } else {
1768 r->info1 = NULL;
1770 break; }
1772 case 2: {
1773 uint32_t _ptr_info2;
1774 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
1775 if (_ptr_info2) {
1776 NDR_PULL_ALLOC(ndr, r->info2);
1777 } else {
1778 r->info2 = NULL;
1780 break; }
1782 case 3: {
1783 uint32_t _ptr_info3;
1784 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info3));
1785 if (_ptr_info3) {
1786 NDR_PULL_ALLOC(ndr, r->info3);
1787 } else {
1788 r->info3 = NULL;
1790 break; }
1792 case 4: {
1793 uint32_t _ptr_info4;
1794 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info4));
1795 if (_ptr_info4) {
1796 NDR_PULL_ALLOC(ndr, r->info4);
1797 } else {
1798 r->info4 = NULL;
1800 break; }
1802 case 5: {
1803 uint32_t _ptr_info5;
1804 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info5));
1805 if (_ptr_info5) {
1806 NDR_PULL_ALLOC(ndr, r->info5);
1807 } else {
1808 r->info5 = NULL;
1810 break; }
1812 case 6: {
1813 uint32_t _ptr_info6;
1814 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info6));
1815 if (_ptr_info6) {
1816 NDR_PULL_ALLOC(ndr, r->info6);
1817 } else {
1818 r->info6 = NULL;
1820 break; }
1822 case 7: {
1823 uint32_t _ptr_info7;
1824 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info7));
1825 if (_ptr_info7) {
1826 NDR_PULL_ALLOC(ndr, r->info7);
1827 } else {
1828 r->info7 = NULL;
1830 break; }
1832 case 100: {
1833 uint32_t _ptr_info100;
1834 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info100));
1835 if (_ptr_info100) {
1836 NDR_PULL_ALLOC(ndr, r->info100);
1837 } else {
1838 r->info100 = NULL;
1840 break; }
1842 case 101: {
1843 uint32_t _ptr_info101;
1844 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info101));
1845 if (_ptr_info101) {
1846 NDR_PULL_ALLOC(ndr, r->info101);
1847 } else {
1848 r->info101 = NULL;
1850 break; }
1852 case 102: {
1853 uint32_t _ptr_info102;
1854 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info102));
1855 if (_ptr_info102) {
1856 NDR_PULL_ALLOC(ndr, r->info102);
1857 } else {
1858 r->info102 = NULL;
1860 break; }
1862 case 103: {
1863 uint32_t _ptr_info103;
1864 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info103));
1865 if (_ptr_info103) {
1866 NDR_PULL_ALLOC(ndr, r->info103);
1867 } else {
1868 r->info103 = NULL;
1870 break; }
1872 case 104: {
1873 uint32_t _ptr_info104;
1874 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info104));
1875 if (_ptr_info104) {
1876 NDR_PULL_ALLOC(ndr, r->info104);
1877 } else {
1878 r->info104 = NULL;
1880 break; }
1882 case 105: {
1883 uint32_t _ptr_info105;
1884 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info105));
1885 if (_ptr_info105) {
1886 NDR_PULL_ALLOC(ndr, r->info105);
1887 } else {
1888 r->info105 = NULL;
1890 break; }
1892 case 106: {
1893 uint32_t _ptr_info106;
1894 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info106));
1895 if (_ptr_info106) {
1896 NDR_PULL_ALLOC(ndr, r->info106);
1897 } else {
1898 r->info106 = NULL;
1900 break; }
1902 default:
1903 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1906 if (ndr_flags & NDR_BUFFERS) {
1907 switch (level) {
1908 case 0:
1909 if (r->info0) {
1910 _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
1911 NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
1912 NDR_CHECK(ndr_pull_dfs_Info0(ndr, NDR_SCALARS, r->info0));
1913 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
1915 break;
1917 case 1:
1918 if (r->info1) {
1919 _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
1920 NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
1921 NDR_CHECK(ndr_pull_dfs_Info1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
1922 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
1924 break;
1926 case 2:
1927 if (r->info2) {
1928 _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
1929 NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
1930 NDR_CHECK(ndr_pull_dfs_Info2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
1931 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
1933 break;
1935 case 3:
1936 if (r->info3) {
1937 _mem_save_info3_0 = NDR_PULL_GET_MEM_CTX(ndr);
1938 NDR_PULL_SET_MEM_CTX(ndr, r->info3, 0);
1939 NDR_CHECK(ndr_pull_dfs_Info3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
1940 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info3_0, 0);
1942 break;
1944 case 4:
1945 if (r->info4) {
1946 _mem_save_info4_0 = NDR_PULL_GET_MEM_CTX(ndr);
1947 NDR_PULL_SET_MEM_CTX(ndr, r->info4, 0);
1948 NDR_CHECK(ndr_pull_dfs_Info4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
1949 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info4_0, 0);
1951 break;
1953 case 5:
1954 if (r->info5) {
1955 _mem_save_info5_0 = NDR_PULL_GET_MEM_CTX(ndr);
1956 NDR_PULL_SET_MEM_CTX(ndr, r->info5, 0);
1957 NDR_CHECK(ndr_pull_dfs_Info5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5));
1958 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info5_0, 0);
1960 break;
1962 case 6:
1963 if (r->info6) {
1964 _mem_save_info6_0 = NDR_PULL_GET_MEM_CTX(ndr);
1965 NDR_PULL_SET_MEM_CTX(ndr, r->info6, 0);
1966 NDR_CHECK(ndr_pull_dfs_Info6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6));
1967 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info6_0, 0);
1969 break;
1971 case 7:
1972 if (r->info7) {
1973 _mem_save_info7_0 = NDR_PULL_GET_MEM_CTX(ndr);
1974 NDR_PULL_SET_MEM_CTX(ndr, r->info7, 0);
1975 NDR_CHECK(ndr_pull_dfs_Info7(ndr, NDR_SCALARS|NDR_BUFFERS, r->info7));
1976 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info7_0, 0);
1978 break;
1980 case 100:
1981 if (r->info100) {
1982 _mem_save_info100_0 = NDR_PULL_GET_MEM_CTX(ndr);
1983 NDR_PULL_SET_MEM_CTX(ndr, r->info100, 0);
1984 NDR_CHECK(ndr_pull_dfs_Info100(ndr, NDR_SCALARS|NDR_BUFFERS, r->info100));
1985 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info100_0, 0);
1987 break;
1989 case 101:
1990 if (r->info101) {
1991 _mem_save_info101_0 = NDR_PULL_GET_MEM_CTX(ndr);
1992 NDR_PULL_SET_MEM_CTX(ndr, r->info101, 0);
1993 NDR_CHECK(ndr_pull_dfs_Info101(ndr, NDR_SCALARS, r->info101));
1994 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info101_0, 0);
1996 break;
1998 case 102:
1999 if (r->info102) {
2000 _mem_save_info102_0 = NDR_PULL_GET_MEM_CTX(ndr);
2001 NDR_PULL_SET_MEM_CTX(ndr, r->info102, 0);
2002 NDR_CHECK(ndr_pull_dfs_Info102(ndr, NDR_SCALARS, r->info102));
2003 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info102_0, 0);
2005 break;
2007 case 103:
2008 if (r->info103) {
2009 _mem_save_info103_0 = NDR_PULL_GET_MEM_CTX(ndr);
2010 NDR_PULL_SET_MEM_CTX(ndr, r->info103, 0);
2011 NDR_CHECK(ndr_pull_dfs_Info103(ndr, NDR_SCALARS, r->info103));
2012 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info103_0, 0);
2014 break;
2016 case 104:
2017 if (r->info104) {
2018 _mem_save_info104_0 = NDR_PULL_GET_MEM_CTX(ndr);
2019 NDR_PULL_SET_MEM_CTX(ndr, r->info104, 0);
2020 NDR_CHECK(ndr_pull_dfs_Info104(ndr, NDR_SCALARS, r->info104));
2021 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info104_0, 0);
2023 break;
2025 case 105:
2026 if (r->info105) {
2027 _mem_save_info105_0 = NDR_PULL_GET_MEM_CTX(ndr);
2028 NDR_PULL_SET_MEM_CTX(ndr, r->info105, 0);
2029 NDR_CHECK(ndr_pull_dfs_Info105(ndr, NDR_SCALARS|NDR_BUFFERS, r->info105));
2030 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info105_0, 0);
2032 break;
2034 case 106:
2035 if (r->info106) {
2036 _mem_save_info106_0 = NDR_PULL_GET_MEM_CTX(ndr);
2037 NDR_PULL_SET_MEM_CTX(ndr, r->info106, 0);
2038 NDR_CHECK(ndr_pull_dfs_Info106(ndr, NDR_SCALARS, r->info106));
2039 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info106_0, 0);
2041 break;
2043 default:
2044 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2047 return NDR_ERR_SUCCESS;
2050 _PUBLIC_ void ndr_print_dfs_Info(struct ndr_print *ndr, const char *name, const union dfs_Info *r)
2052 int level;
2053 level = ndr_print_get_switch_value(ndr, r);
2054 ndr_print_union(ndr, name, level, "dfs_Info");
2055 switch (level) {
2056 case 0:
2057 ndr_print_ptr(ndr, "info0", r->info0);
2058 ndr->depth++;
2059 if (r->info0) {
2060 ndr_print_dfs_Info0(ndr, "info0", r->info0);
2062 ndr->depth--;
2063 break;
2065 case 1:
2066 ndr_print_ptr(ndr, "info1", r->info1);
2067 ndr->depth++;
2068 if (r->info1) {
2069 ndr_print_dfs_Info1(ndr, "info1", r->info1);
2071 ndr->depth--;
2072 break;
2074 case 2:
2075 ndr_print_ptr(ndr, "info2", r->info2);
2076 ndr->depth++;
2077 if (r->info2) {
2078 ndr_print_dfs_Info2(ndr, "info2", r->info2);
2080 ndr->depth--;
2081 break;
2083 case 3:
2084 ndr_print_ptr(ndr, "info3", r->info3);
2085 ndr->depth++;
2086 if (r->info3) {
2087 ndr_print_dfs_Info3(ndr, "info3", r->info3);
2089 ndr->depth--;
2090 break;
2092 case 4:
2093 ndr_print_ptr(ndr, "info4", r->info4);
2094 ndr->depth++;
2095 if (r->info4) {
2096 ndr_print_dfs_Info4(ndr, "info4", r->info4);
2098 ndr->depth--;
2099 break;
2101 case 5:
2102 ndr_print_ptr(ndr, "info5", r->info5);
2103 ndr->depth++;
2104 if (r->info5) {
2105 ndr_print_dfs_Info5(ndr, "info5", r->info5);
2107 ndr->depth--;
2108 break;
2110 case 6:
2111 ndr_print_ptr(ndr, "info6", r->info6);
2112 ndr->depth++;
2113 if (r->info6) {
2114 ndr_print_dfs_Info6(ndr, "info6", r->info6);
2116 ndr->depth--;
2117 break;
2119 case 7:
2120 ndr_print_ptr(ndr, "info7", r->info7);
2121 ndr->depth++;
2122 if (r->info7) {
2123 ndr_print_dfs_Info7(ndr, "info7", r->info7);
2125 ndr->depth--;
2126 break;
2128 case 100:
2129 ndr_print_ptr(ndr, "info100", r->info100);
2130 ndr->depth++;
2131 if (r->info100) {
2132 ndr_print_dfs_Info100(ndr, "info100", r->info100);
2134 ndr->depth--;
2135 break;
2137 case 101:
2138 ndr_print_ptr(ndr, "info101", r->info101);
2139 ndr->depth++;
2140 if (r->info101) {
2141 ndr_print_dfs_Info101(ndr, "info101", r->info101);
2143 ndr->depth--;
2144 break;
2146 case 102:
2147 ndr_print_ptr(ndr, "info102", r->info102);
2148 ndr->depth++;
2149 if (r->info102) {
2150 ndr_print_dfs_Info102(ndr, "info102", r->info102);
2152 ndr->depth--;
2153 break;
2155 case 103:
2156 ndr_print_ptr(ndr, "info103", r->info103);
2157 ndr->depth++;
2158 if (r->info103) {
2159 ndr_print_dfs_Info103(ndr, "info103", r->info103);
2161 ndr->depth--;
2162 break;
2164 case 104:
2165 ndr_print_ptr(ndr, "info104", r->info104);
2166 ndr->depth++;
2167 if (r->info104) {
2168 ndr_print_dfs_Info104(ndr, "info104", r->info104);
2170 ndr->depth--;
2171 break;
2173 case 105:
2174 ndr_print_ptr(ndr, "info105", r->info105);
2175 ndr->depth++;
2176 if (r->info105) {
2177 ndr_print_dfs_Info105(ndr, "info105", r->info105);
2179 ndr->depth--;
2180 break;
2182 case 106:
2183 ndr_print_ptr(ndr, "info106", r->info106);
2184 ndr->depth++;
2185 if (r->info106) {
2186 ndr_print_dfs_Info106(ndr, "info106", r->info106);
2188 ndr->depth--;
2189 break;
2191 default:
2192 ndr_print_bad_level(ndr, name, level);
2196 static enum ndr_err_code ndr_push_dfs_EnumArray1(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray1 *r)
2198 uint32_t cntr_s_1;
2199 if (ndr_flags & NDR_SCALARS) {
2200 NDR_CHECK(ndr_push_align(ndr, 4));
2201 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2202 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2204 if (ndr_flags & NDR_BUFFERS) {
2205 if (r->s) {
2206 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2207 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2208 NDR_CHECK(ndr_push_dfs_Info1(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2210 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2211 NDR_CHECK(ndr_push_dfs_Info1(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2215 return NDR_ERR_SUCCESS;
2218 static enum ndr_err_code ndr_pull_dfs_EnumArray1(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray1 *r)
2220 uint32_t _ptr_s;
2221 uint32_t cntr_s_1;
2222 TALLOC_CTX *_mem_save_s_0;
2223 TALLOC_CTX *_mem_save_s_1;
2224 if (ndr_flags & NDR_SCALARS) {
2225 NDR_CHECK(ndr_pull_align(ndr, 4));
2226 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2227 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2228 if (_ptr_s) {
2229 NDR_PULL_ALLOC(ndr, r->s);
2230 } else {
2231 r->s = NULL;
2234 if (ndr_flags & NDR_BUFFERS) {
2235 if (r->s) {
2236 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2237 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2238 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2239 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
2240 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2241 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2242 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2243 NDR_CHECK(ndr_pull_dfs_Info1(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2245 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2246 NDR_CHECK(ndr_pull_dfs_Info1(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2248 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2249 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2251 if (r->s) {
2252 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2255 return NDR_ERR_SUCCESS;
2258 _PUBLIC_ void ndr_print_dfs_EnumArray1(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray1 *r)
2260 uint32_t cntr_s_1;
2261 ndr_print_struct(ndr, name, "dfs_EnumArray1");
2262 ndr->depth++;
2263 ndr_print_uint32(ndr, "count", r->count);
2264 ndr_print_ptr(ndr, "s", r->s);
2265 ndr->depth++;
2266 if (r->s) {
2267 ndr->print(ndr, "%s: ARRAY(%d)", "s", r->count);
2268 ndr->depth++;
2269 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2270 char *idx_1=NULL;
2271 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2272 ndr_print_dfs_Info1(ndr, "s", &r->s[cntr_s_1]);
2273 free(idx_1);
2276 ndr->depth--;
2278 ndr->depth--;
2279 ndr->depth--;
2282 static enum ndr_err_code ndr_push_dfs_EnumArray2(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray2 *r)
2284 uint32_t cntr_s_1;
2285 if (ndr_flags & NDR_SCALARS) {
2286 NDR_CHECK(ndr_push_align(ndr, 4));
2287 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2288 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2290 if (ndr_flags & NDR_BUFFERS) {
2291 if (r->s) {
2292 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2293 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2294 NDR_CHECK(ndr_push_dfs_Info2(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2296 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2297 NDR_CHECK(ndr_push_dfs_Info2(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2301 return NDR_ERR_SUCCESS;
2304 static enum ndr_err_code ndr_pull_dfs_EnumArray2(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray2 *r)
2306 uint32_t _ptr_s;
2307 uint32_t cntr_s_1;
2308 TALLOC_CTX *_mem_save_s_0;
2309 TALLOC_CTX *_mem_save_s_1;
2310 if (ndr_flags & NDR_SCALARS) {
2311 NDR_CHECK(ndr_pull_align(ndr, 4));
2312 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2313 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2314 if (_ptr_s) {
2315 NDR_PULL_ALLOC(ndr, r->s);
2316 } else {
2317 r->s = NULL;
2320 if (ndr_flags & NDR_BUFFERS) {
2321 if (r->s) {
2322 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2323 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2324 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2325 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
2326 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2327 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2328 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2329 NDR_CHECK(ndr_pull_dfs_Info2(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2331 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2332 NDR_CHECK(ndr_pull_dfs_Info2(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2334 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2335 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2337 if (r->s) {
2338 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2341 return NDR_ERR_SUCCESS;
2344 _PUBLIC_ void ndr_print_dfs_EnumArray2(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray2 *r)
2346 uint32_t cntr_s_1;
2347 ndr_print_struct(ndr, name, "dfs_EnumArray2");
2348 ndr->depth++;
2349 ndr_print_uint32(ndr, "count", r->count);
2350 ndr_print_ptr(ndr, "s", r->s);
2351 ndr->depth++;
2352 if (r->s) {
2353 ndr->print(ndr, "%s: ARRAY(%d)", "s", r->count);
2354 ndr->depth++;
2355 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2356 char *idx_1=NULL;
2357 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2358 ndr_print_dfs_Info2(ndr, "s", &r->s[cntr_s_1]);
2359 free(idx_1);
2362 ndr->depth--;
2364 ndr->depth--;
2365 ndr->depth--;
2368 static enum ndr_err_code ndr_push_dfs_EnumArray3(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray3 *r)
2370 uint32_t cntr_s_1;
2371 if (ndr_flags & NDR_SCALARS) {
2372 NDR_CHECK(ndr_push_align(ndr, 4));
2373 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2374 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2376 if (ndr_flags & NDR_BUFFERS) {
2377 if (r->s) {
2378 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2379 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2380 NDR_CHECK(ndr_push_dfs_Info3(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2382 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2383 NDR_CHECK(ndr_push_dfs_Info3(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2387 return NDR_ERR_SUCCESS;
2390 static enum ndr_err_code ndr_pull_dfs_EnumArray3(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray3 *r)
2392 uint32_t _ptr_s;
2393 uint32_t cntr_s_1;
2394 TALLOC_CTX *_mem_save_s_0;
2395 TALLOC_CTX *_mem_save_s_1;
2396 if (ndr_flags & NDR_SCALARS) {
2397 NDR_CHECK(ndr_pull_align(ndr, 4));
2398 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2399 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2400 if (_ptr_s) {
2401 NDR_PULL_ALLOC(ndr, r->s);
2402 } else {
2403 r->s = NULL;
2406 if (ndr_flags & NDR_BUFFERS) {
2407 if (r->s) {
2408 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2409 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2410 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2411 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
2412 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2413 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2414 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2415 NDR_CHECK(ndr_pull_dfs_Info3(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2417 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2418 NDR_CHECK(ndr_pull_dfs_Info3(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2420 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2421 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2423 if (r->s) {
2424 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2427 return NDR_ERR_SUCCESS;
2430 _PUBLIC_ void ndr_print_dfs_EnumArray3(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray3 *r)
2432 uint32_t cntr_s_1;
2433 ndr_print_struct(ndr, name, "dfs_EnumArray3");
2434 ndr->depth++;
2435 ndr_print_uint32(ndr, "count", r->count);
2436 ndr_print_ptr(ndr, "s", r->s);
2437 ndr->depth++;
2438 if (r->s) {
2439 ndr->print(ndr, "%s: ARRAY(%d)", "s", r->count);
2440 ndr->depth++;
2441 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2442 char *idx_1=NULL;
2443 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2444 ndr_print_dfs_Info3(ndr, "s", &r->s[cntr_s_1]);
2445 free(idx_1);
2448 ndr->depth--;
2450 ndr->depth--;
2451 ndr->depth--;
2454 static enum ndr_err_code ndr_push_dfs_EnumArray4(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray4 *r)
2456 uint32_t cntr_s_1;
2457 if (ndr_flags & NDR_SCALARS) {
2458 NDR_CHECK(ndr_push_align(ndr, 4));
2459 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2460 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2462 if (ndr_flags & NDR_BUFFERS) {
2463 if (r->s) {
2464 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2465 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2466 NDR_CHECK(ndr_push_dfs_Info4(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2468 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2469 NDR_CHECK(ndr_push_dfs_Info4(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2473 return NDR_ERR_SUCCESS;
2476 static enum ndr_err_code ndr_pull_dfs_EnumArray4(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray4 *r)
2478 uint32_t _ptr_s;
2479 uint32_t cntr_s_1;
2480 TALLOC_CTX *_mem_save_s_0;
2481 TALLOC_CTX *_mem_save_s_1;
2482 if (ndr_flags & NDR_SCALARS) {
2483 NDR_CHECK(ndr_pull_align(ndr, 4));
2484 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2485 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2486 if (_ptr_s) {
2487 NDR_PULL_ALLOC(ndr, r->s);
2488 } else {
2489 r->s = NULL;
2492 if (ndr_flags & NDR_BUFFERS) {
2493 if (r->s) {
2494 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2495 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2496 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2497 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
2498 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2499 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2500 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2501 NDR_CHECK(ndr_pull_dfs_Info4(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2503 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2504 NDR_CHECK(ndr_pull_dfs_Info4(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2506 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2507 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2509 if (r->s) {
2510 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2513 return NDR_ERR_SUCCESS;
2516 _PUBLIC_ void ndr_print_dfs_EnumArray4(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray4 *r)
2518 uint32_t cntr_s_1;
2519 ndr_print_struct(ndr, name, "dfs_EnumArray4");
2520 ndr->depth++;
2521 ndr_print_uint32(ndr, "count", r->count);
2522 ndr_print_ptr(ndr, "s", r->s);
2523 ndr->depth++;
2524 if (r->s) {
2525 ndr->print(ndr, "%s: ARRAY(%d)", "s", r->count);
2526 ndr->depth++;
2527 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2528 char *idx_1=NULL;
2529 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2530 ndr_print_dfs_Info4(ndr, "s", &r->s[cntr_s_1]);
2531 free(idx_1);
2534 ndr->depth--;
2536 ndr->depth--;
2537 ndr->depth--;
2540 static enum ndr_err_code ndr_push_dfs_EnumArray5(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray5 *r)
2542 uint32_t cntr_s_1;
2543 if (ndr_flags & NDR_SCALARS) {
2544 NDR_CHECK(ndr_push_align(ndr, 4));
2545 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2546 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2548 if (ndr_flags & NDR_BUFFERS) {
2549 if (r->s) {
2550 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2551 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2552 NDR_CHECK(ndr_push_dfs_Info5(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2554 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2555 NDR_CHECK(ndr_push_dfs_Info5(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2559 return NDR_ERR_SUCCESS;
2562 static enum ndr_err_code ndr_pull_dfs_EnumArray5(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray5 *r)
2564 uint32_t _ptr_s;
2565 uint32_t cntr_s_1;
2566 TALLOC_CTX *_mem_save_s_0;
2567 TALLOC_CTX *_mem_save_s_1;
2568 if (ndr_flags & NDR_SCALARS) {
2569 NDR_CHECK(ndr_pull_align(ndr, 4));
2570 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2571 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2572 if (_ptr_s) {
2573 NDR_PULL_ALLOC(ndr, r->s);
2574 } else {
2575 r->s = NULL;
2578 if (ndr_flags & NDR_BUFFERS) {
2579 if (r->s) {
2580 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2581 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2582 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2583 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
2584 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2585 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2586 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2587 NDR_CHECK(ndr_pull_dfs_Info5(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2589 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2590 NDR_CHECK(ndr_pull_dfs_Info5(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2592 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2593 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2595 if (r->s) {
2596 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2599 return NDR_ERR_SUCCESS;
2602 _PUBLIC_ void ndr_print_dfs_EnumArray5(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray5 *r)
2604 uint32_t cntr_s_1;
2605 ndr_print_struct(ndr, name, "dfs_EnumArray5");
2606 ndr->depth++;
2607 ndr_print_uint32(ndr, "count", r->count);
2608 ndr_print_ptr(ndr, "s", r->s);
2609 ndr->depth++;
2610 if (r->s) {
2611 ndr->print(ndr, "%s: ARRAY(%d)", "s", r->count);
2612 ndr->depth++;
2613 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2614 char *idx_1=NULL;
2615 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2616 ndr_print_dfs_Info5(ndr, "s", &r->s[cntr_s_1]);
2617 free(idx_1);
2620 ndr->depth--;
2622 ndr->depth--;
2623 ndr->depth--;
2626 static enum ndr_err_code ndr_push_dfs_EnumArray6(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray6 *r)
2628 uint32_t cntr_s_1;
2629 if (ndr_flags & NDR_SCALARS) {
2630 NDR_CHECK(ndr_push_align(ndr, 4));
2631 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2632 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2634 if (ndr_flags & NDR_BUFFERS) {
2635 if (r->s) {
2636 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2637 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2638 NDR_CHECK(ndr_push_dfs_Info6(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2640 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2641 NDR_CHECK(ndr_push_dfs_Info6(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2645 return NDR_ERR_SUCCESS;
2648 static enum ndr_err_code ndr_pull_dfs_EnumArray6(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray6 *r)
2650 uint32_t _ptr_s;
2651 uint32_t cntr_s_1;
2652 TALLOC_CTX *_mem_save_s_0;
2653 TALLOC_CTX *_mem_save_s_1;
2654 if (ndr_flags & NDR_SCALARS) {
2655 NDR_CHECK(ndr_pull_align(ndr, 4));
2656 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2657 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2658 if (_ptr_s) {
2659 NDR_PULL_ALLOC(ndr, r->s);
2660 } else {
2661 r->s = NULL;
2664 if (ndr_flags & NDR_BUFFERS) {
2665 if (r->s) {
2666 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2667 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2668 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2669 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
2670 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2671 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2672 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2673 NDR_CHECK(ndr_pull_dfs_Info6(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2675 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2676 NDR_CHECK(ndr_pull_dfs_Info6(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2678 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2679 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2681 if (r->s) {
2682 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2685 return NDR_ERR_SUCCESS;
2688 _PUBLIC_ void ndr_print_dfs_EnumArray6(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray6 *r)
2690 uint32_t cntr_s_1;
2691 ndr_print_struct(ndr, name, "dfs_EnumArray6");
2692 ndr->depth++;
2693 ndr_print_uint32(ndr, "count", r->count);
2694 ndr_print_ptr(ndr, "s", r->s);
2695 ndr->depth++;
2696 if (r->s) {
2697 ndr->print(ndr, "%s: ARRAY(%d)", "s", r->count);
2698 ndr->depth++;
2699 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2700 char *idx_1=NULL;
2701 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2702 ndr_print_dfs_Info6(ndr, "s", &r->s[cntr_s_1]);
2703 free(idx_1);
2706 ndr->depth--;
2708 ndr->depth--;
2709 ndr->depth--;
2712 static enum ndr_err_code ndr_push_dfs_EnumArray200(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray200 *r)
2714 uint32_t cntr_s_1;
2715 if (ndr_flags & NDR_SCALARS) {
2716 NDR_CHECK(ndr_push_align(ndr, 4));
2717 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2718 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2720 if (ndr_flags & NDR_BUFFERS) {
2721 if (r->s) {
2722 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2723 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2724 NDR_CHECK(ndr_push_dfs_Info200(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2726 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2727 NDR_CHECK(ndr_push_dfs_Info200(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2731 return NDR_ERR_SUCCESS;
2734 static enum ndr_err_code ndr_pull_dfs_EnumArray200(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray200 *r)
2736 uint32_t _ptr_s;
2737 uint32_t cntr_s_1;
2738 TALLOC_CTX *_mem_save_s_0;
2739 TALLOC_CTX *_mem_save_s_1;
2740 if (ndr_flags & NDR_SCALARS) {
2741 NDR_CHECK(ndr_pull_align(ndr, 4));
2742 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2743 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2744 if (_ptr_s) {
2745 NDR_PULL_ALLOC(ndr, r->s);
2746 } else {
2747 r->s = NULL;
2750 if (ndr_flags & NDR_BUFFERS) {
2751 if (r->s) {
2752 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2753 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2754 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2755 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
2756 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2757 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2758 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2759 NDR_CHECK(ndr_pull_dfs_Info200(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2761 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2762 NDR_CHECK(ndr_pull_dfs_Info200(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2764 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2765 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2767 if (r->s) {
2768 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2771 return NDR_ERR_SUCCESS;
2774 _PUBLIC_ void ndr_print_dfs_EnumArray200(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray200 *r)
2776 uint32_t cntr_s_1;
2777 ndr_print_struct(ndr, name, "dfs_EnumArray200");
2778 ndr->depth++;
2779 ndr_print_uint32(ndr, "count", r->count);
2780 ndr_print_ptr(ndr, "s", r->s);
2781 ndr->depth++;
2782 if (r->s) {
2783 ndr->print(ndr, "%s: ARRAY(%d)", "s", r->count);
2784 ndr->depth++;
2785 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2786 char *idx_1=NULL;
2787 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2788 ndr_print_dfs_Info200(ndr, "s", &r->s[cntr_s_1]);
2789 free(idx_1);
2792 ndr->depth--;
2794 ndr->depth--;
2795 ndr->depth--;
2798 static enum ndr_err_code ndr_push_dfs_EnumArray300(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray300 *r)
2800 uint32_t cntr_s_1;
2801 if (ndr_flags & NDR_SCALARS) {
2802 NDR_CHECK(ndr_push_align(ndr, 4));
2803 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2804 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2806 if (ndr_flags & NDR_BUFFERS) {
2807 if (r->s) {
2808 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2809 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2810 NDR_CHECK(ndr_push_dfs_Info300(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2812 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2813 NDR_CHECK(ndr_push_dfs_Info300(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2817 return NDR_ERR_SUCCESS;
2820 static enum ndr_err_code ndr_pull_dfs_EnumArray300(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray300 *r)
2822 uint32_t _ptr_s;
2823 uint32_t cntr_s_1;
2824 TALLOC_CTX *_mem_save_s_0;
2825 TALLOC_CTX *_mem_save_s_1;
2826 if (ndr_flags & NDR_SCALARS) {
2827 NDR_CHECK(ndr_pull_align(ndr, 4));
2828 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2829 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2830 if (_ptr_s) {
2831 NDR_PULL_ALLOC(ndr, r->s);
2832 } else {
2833 r->s = NULL;
2836 if (ndr_flags & NDR_BUFFERS) {
2837 if (r->s) {
2838 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2839 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2840 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2841 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
2842 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2843 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2844 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2845 NDR_CHECK(ndr_pull_dfs_Info300(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2847 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2848 NDR_CHECK(ndr_pull_dfs_Info300(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2850 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2851 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2853 if (r->s) {
2854 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2857 return NDR_ERR_SUCCESS;
2860 _PUBLIC_ void ndr_print_dfs_EnumArray300(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray300 *r)
2862 uint32_t cntr_s_1;
2863 ndr_print_struct(ndr, name, "dfs_EnumArray300");
2864 ndr->depth++;
2865 ndr_print_uint32(ndr, "count", r->count);
2866 ndr_print_ptr(ndr, "s", r->s);
2867 ndr->depth++;
2868 if (r->s) {
2869 ndr->print(ndr, "%s: ARRAY(%d)", "s", r->count);
2870 ndr->depth++;
2871 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2872 char *idx_1=NULL;
2873 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2874 ndr_print_dfs_Info300(ndr, "s", &r->s[cntr_s_1]);
2875 free(idx_1);
2878 ndr->depth--;
2880 ndr->depth--;
2881 ndr->depth--;
2884 static enum ndr_err_code ndr_push_dfs_EnumInfo(struct ndr_push *ndr, int ndr_flags, const union dfs_EnumInfo *r)
2886 if (ndr_flags & NDR_SCALARS) {
2887 int level = ndr_push_get_switch_value(ndr, r);
2888 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
2889 switch (level) {
2890 case 1: {
2891 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
2892 break; }
2894 case 2: {
2895 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
2896 break; }
2898 case 3: {
2899 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3));
2900 break; }
2902 case 4: {
2903 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info4));
2904 break; }
2906 case 5: {
2907 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info5));
2908 break; }
2910 case 6: {
2911 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info6));
2912 break; }
2914 case 200: {
2915 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info200));
2916 break; }
2918 case 300: {
2919 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info300));
2920 break; }
2922 default:
2923 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2926 if (ndr_flags & NDR_BUFFERS) {
2927 int level = ndr_push_get_switch_value(ndr, r);
2928 switch (level) {
2929 case 1:
2930 if (r->info1) {
2931 NDR_CHECK(ndr_push_dfs_EnumArray1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
2933 break;
2935 case 2:
2936 if (r->info2) {
2937 NDR_CHECK(ndr_push_dfs_EnumArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
2939 break;
2941 case 3:
2942 if (r->info3) {
2943 NDR_CHECK(ndr_push_dfs_EnumArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
2945 break;
2947 case 4:
2948 if (r->info4) {
2949 NDR_CHECK(ndr_push_dfs_EnumArray4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
2951 break;
2953 case 5:
2954 if (r->info5) {
2955 NDR_CHECK(ndr_push_dfs_EnumArray5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5));
2957 break;
2959 case 6:
2960 if (r->info6) {
2961 NDR_CHECK(ndr_push_dfs_EnumArray6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6));
2963 break;
2965 case 200:
2966 if (r->info200) {
2967 NDR_CHECK(ndr_push_dfs_EnumArray200(ndr, NDR_SCALARS|NDR_BUFFERS, r->info200));
2969 break;
2971 case 300:
2972 if (r->info300) {
2973 NDR_CHECK(ndr_push_dfs_EnumArray300(ndr, NDR_SCALARS|NDR_BUFFERS, r->info300));
2975 break;
2977 default:
2978 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2981 return NDR_ERR_SUCCESS;
2984 static enum ndr_err_code ndr_pull_dfs_EnumInfo(struct ndr_pull *ndr, int ndr_flags, union dfs_EnumInfo *r)
2986 int level;
2987 uint32_t _level;
2988 TALLOC_CTX *_mem_save_info1_0;
2989 TALLOC_CTX *_mem_save_info2_0;
2990 TALLOC_CTX *_mem_save_info3_0;
2991 TALLOC_CTX *_mem_save_info4_0;
2992 TALLOC_CTX *_mem_save_info5_0;
2993 TALLOC_CTX *_mem_save_info6_0;
2994 TALLOC_CTX *_mem_save_info200_0;
2995 TALLOC_CTX *_mem_save_info300_0;
2996 level = ndr_pull_get_switch_value(ndr, r);
2997 if (ndr_flags & NDR_SCALARS) {
2998 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
2999 if (_level != level) {
3000 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
3002 switch (level) {
3003 case 1: {
3004 uint32_t _ptr_info1;
3005 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
3006 if (_ptr_info1) {
3007 NDR_PULL_ALLOC(ndr, r->info1);
3008 } else {
3009 r->info1 = NULL;
3011 break; }
3013 case 2: {
3014 uint32_t _ptr_info2;
3015 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
3016 if (_ptr_info2) {
3017 NDR_PULL_ALLOC(ndr, r->info2);
3018 } else {
3019 r->info2 = NULL;
3021 break; }
3023 case 3: {
3024 uint32_t _ptr_info3;
3025 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info3));
3026 if (_ptr_info3) {
3027 NDR_PULL_ALLOC(ndr, r->info3);
3028 } else {
3029 r->info3 = NULL;
3031 break; }
3033 case 4: {
3034 uint32_t _ptr_info4;
3035 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info4));
3036 if (_ptr_info4) {
3037 NDR_PULL_ALLOC(ndr, r->info4);
3038 } else {
3039 r->info4 = NULL;
3041 break; }
3043 case 5: {
3044 uint32_t _ptr_info5;
3045 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info5));
3046 if (_ptr_info5) {
3047 NDR_PULL_ALLOC(ndr, r->info5);
3048 } else {
3049 r->info5 = NULL;
3051 break; }
3053 case 6: {
3054 uint32_t _ptr_info6;
3055 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info6));
3056 if (_ptr_info6) {
3057 NDR_PULL_ALLOC(ndr, r->info6);
3058 } else {
3059 r->info6 = NULL;
3061 break; }
3063 case 200: {
3064 uint32_t _ptr_info200;
3065 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info200));
3066 if (_ptr_info200) {
3067 NDR_PULL_ALLOC(ndr, r->info200);
3068 } else {
3069 r->info200 = NULL;
3071 break; }
3073 case 300: {
3074 uint32_t _ptr_info300;
3075 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info300));
3076 if (_ptr_info300) {
3077 NDR_PULL_ALLOC(ndr, r->info300);
3078 } else {
3079 r->info300 = NULL;
3081 break; }
3083 default:
3084 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
3087 if (ndr_flags & NDR_BUFFERS) {
3088 switch (level) {
3089 case 1:
3090 if (r->info1) {
3091 _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
3092 NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
3093 NDR_CHECK(ndr_pull_dfs_EnumArray1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
3094 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
3096 break;
3098 case 2:
3099 if (r->info2) {
3100 _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
3101 NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
3102 NDR_CHECK(ndr_pull_dfs_EnumArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
3103 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
3105 break;
3107 case 3:
3108 if (r->info3) {
3109 _mem_save_info3_0 = NDR_PULL_GET_MEM_CTX(ndr);
3110 NDR_PULL_SET_MEM_CTX(ndr, r->info3, 0);
3111 NDR_CHECK(ndr_pull_dfs_EnumArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
3112 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info3_0, 0);
3114 break;
3116 case 4:
3117 if (r->info4) {
3118 _mem_save_info4_0 = NDR_PULL_GET_MEM_CTX(ndr);
3119 NDR_PULL_SET_MEM_CTX(ndr, r->info4, 0);
3120 NDR_CHECK(ndr_pull_dfs_EnumArray4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
3121 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info4_0, 0);
3123 break;
3125 case 5:
3126 if (r->info5) {
3127 _mem_save_info5_0 = NDR_PULL_GET_MEM_CTX(ndr);
3128 NDR_PULL_SET_MEM_CTX(ndr, r->info5, 0);
3129 NDR_CHECK(ndr_pull_dfs_EnumArray5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5));
3130 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info5_0, 0);
3132 break;
3134 case 6:
3135 if (r->info6) {
3136 _mem_save_info6_0 = NDR_PULL_GET_MEM_CTX(ndr);
3137 NDR_PULL_SET_MEM_CTX(ndr, r->info6, 0);
3138 NDR_CHECK(ndr_pull_dfs_EnumArray6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6));
3139 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info6_0, 0);
3141 break;
3143 case 200:
3144 if (r->info200) {
3145 _mem_save_info200_0 = NDR_PULL_GET_MEM_CTX(ndr);
3146 NDR_PULL_SET_MEM_CTX(ndr, r->info200, 0);
3147 NDR_CHECK(ndr_pull_dfs_EnumArray200(ndr, NDR_SCALARS|NDR_BUFFERS, r->info200));
3148 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info200_0, 0);
3150 break;
3152 case 300:
3153 if (r->info300) {
3154 _mem_save_info300_0 = NDR_PULL_GET_MEM_CTX(ndr);
3155 NDR_PULL_SET_MEM_CTX(ndr, r->info300, 0);
3156 NDR_CHECK(ndr_pull_dfs_EnumArray300(ndr, NDR_SCALARS|NDR_BUFFERS, r->info300));
3157 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info300_0, 0);
3159 break;
3161 default:
3162 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
3165 return NDR_ERR_SUCCESS;
3168 _PUBLIC_ void ndr_print_dfs_EnumInfo(struct ndr_print *ndr, const char *name, const union dfs_EnumInfo *r)
3170 int level;
3171 level = ndr_print_get_switch_value(ndr, r);
3172 ndr_print_union(ndr, name, level, "dfs_EnumInfo");
3173 switch (level) {
3174 case 1:
3175 ndr_print_ptr(ndr, "info1", r->info1);
3176 ndr->depth++;
3177 if (r->info1) {
3178 ndr_print_dfs_EnumArray1(ndr, "info1", r->info1);
3180 ndr->depth--;
3181 break;
3183 case 2:
3184 ndr_print_ptr(ndr, "info2", r->info2);
3185 ndr->depth++;
3186 if (r->info2) {
3187 ndr_print_dfs_EnumArray2(ndr, "info2", r->info2);
3189 ndr->depth--;
3190 break;
3192 case 3:
3193 ndr_print_ptr(ndr, "info3", r->info3);
3194 ndr->depth++;
3195 if (r->info3) {
3196 ndr_print_dfs_EnumArray3(ndr, "info3", r->info3);
3198 ndr->depth--;
3199 break;
3201 case 4:
3202 ndr_print_ptr(ndr, "info4", r->info4);
3203 ndr->depth++;
3204 if (r->info4) {
3205 ndr_print_dfs_EnumArray4(ndr, "info4", r->info4);
3207 ndr->depth--;
3208 break;
3210 case 5:
3211 ndr_print_ptr(ndr, "info5", r->info5);
3212 ndr->depth++;
3213 if (r->info5) {
3214 ndr_print_dfs_EnumArray5(ndr, "info5", r->info5);
3216 ndr->depth--;
3217 break;
3219 case 6:
3220 ndr_print_ptr(ndr, "info6", r->info6);
3221 ndr->depth++;
3222 if (r->info6) {
3223 ndr_print_dfs_EnumArray6(ndr, "info6", r->info6);
3225 ndr->depth--;
3226 break;
3228 case 200:
3229 ndr_print_ptr(ndr, "info200", r->info200);
3230 ndr->depth++;
3231 if (r->info200) {
3232 ndr_print_dfs_EnumArray200(ndr, "info200", r->info200);
3234 ndr->depth--;
3235 break;
3237 case 300:
3238 ndr_print_ptr(ndr, "info300", r->info300);
3239 ndr->depth++;
3240 if (r->info300) {
3241 ndr_print_dfs_EnumArray300(ndr, "info300", r->info300);
3243 ndr->depth--;
3244 break;
3246 default:
3247 ndr_print_bad_level(ndr, name, level);
3251 static enum ndr_err_code ndr_push_dfs_EnumStruct(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumStruct *r)
3253 if (ndr_flags & NDR_SCALARS) {
3254 NDR_CHECK(ndr_push_align(ndr, 4));
3255 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
3256 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->e, r->level));
3257 NDR_CHECK(ndr_push_dfs_EnumInfo(ndr, NDR_SCALARS, &r->e));
3259 if (ndr_flags & NDR_BUFFERS) {
3260 NDR_CHECK(ndr_push_dfs_EnumInfo(ndr, NDR_BUFFERS, &r->e));
3262 return NDR_ERR_SUCCESS;
3265 static enum ndr_err_code ndr_pull_dfs_EnumStruct(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumStruct *r)
3267 if (ndr_flags & NDR_SCALARS) {
3268 NDR_CHECK(ndr_pull_align(ndr, 4));
3269 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
3270 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->e, r->level));
3271 NDR_CHECK(ndr_pull_dfs_EnumInfo(ndr, NDR_SCALARS, &r->e));
3273 if (ndr_flags & NDR_BUFFERS) {
3274 NDR_CHECK(ndr_pull_dfs_EnumInfo(ndr, NDR_BUFFERS, &r->e));
3276 return NDR_ERR_SUCCESS;
3279 _PUBLIC_ void ndr_print_dfs_EnumStruct(struct ndr_print *ndr, const char *name, const struct dfs_EnumStruct *r)
3281 ndr_print_struct(ndr, name, "dfs_EnumStruct");
3282 ndr->depth++;
3283 ndr_print_uint32(ndr, "level", r->level);
3284 ndr_print_set_switch_value(ndr, &r->e, r->level);
3285 ndr_print_dfs_EnumInfo(ndr, "e", &r->e);
3286 ndr->depth--;
3289 static enum ndr_err_code ndr_push_dfs_UnknownStruct(struct ndr_push *ndr, int ndr_flags, const struct dfs_UnknownStruct *r)
3291 if (ndr_flags & NDR_SCALARS) {
3292 NDR_CHECK(ndr_push_align(ndr, 4));
3293 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
3294 NDR_CHECK(ndr_push_unique_ptr(ndr, r->unknown2));
3296 if (ndr_flags & NDR_BUFFERS) {
3297 if (r->unknown2) {
3298 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->unknown2, CH_UTF16)));
3299 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3300 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->unknown2, CH_UTF16)));
3301 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->unknown2, ndr_charset_length(r->unknown2, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3304 return NDR_ERR_SUCCESS;
3307 static enum ndr_err_code ndr_pull_dfs_UnknownStruct(struct ndr_pull *ndr, int ndr_flags, struct dfs_UnknownStruct *r)
3309 uint32_t _ptr_unknown2;
3310 TALLOC_CTX *_mem_save_unknown2_0;
3311 if (ndr_flags & NDR_SCALARS) {
3312 NDR_CHECK(ndr_pull_align(ndr, 4));
3313 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
3314 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
3315 if (_ptr_unknown2) {
3316 NDR_PULL_ALLOC(ndr, r->unknown2);
3317 } else {
3318 r->unknown2 = NULL;
3321 if (ndr_flags & NDR_BUFFERS) {
3322 if (r->unknown2) {
3323 _mem_save_unknown2_0 = NDR_PULL_GET_MEM_CTX(ndr);
3324 NDR_PULL_SET_MEM_CTX(ndr, r->unknown2, 0);
3325 NDR_CHECK(ndr_pull_array_size(ndr, &r->unknown2));
3326 NDR_CHECK(ndr_pull_array_length(ndr, &r->unknown2));
3327 if (ndr_get_array_length(ndr, &r->unknown2) > ndr_get_array_size(ndr, &r->unknown2)) {
3328 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));
3330 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->unknown2), sizeof(uint16_t)));
3331 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->unknown2, ndr_get_array_length(ndr, &r->unknown2), sizeof(uint16_t), CH_UTF16));
3332 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_0, 0);
3335 return NDR_ERR_SUCCESS;
3338 _PUBLIC_ void ndr_print_dfs_UnknownStruct(struct ndr_print *ndr, const char *name, const struct dfs_UnknownStruct *r)
3340 ndr_print_struct(ndr, name, "dfs_UnknownStruct");
3341 ndr->depth++;
3342 ndr_print_uint32(ndr, "unknown1", r->unknown1);
3343 ndr_print_ptr(ndr, "unknown2", r->unknown2);
3344 ndr->depth++;
3345 if (r->unknown2) {
3346 ndr_print_string(ndr, "unknown2", r->unknown2);
3348 ndr->depth--;
3349 ndr->depth--;
3352 _PUBLIC_ enum ndr_err_code ndr_push_dfs_GetManagerVersion(struct ndr_push *ndr, int flags, const struct dfs_GetManagerVersion *r)
3354 if (flags & NDR_IN) {
3356 if (flags & NDR_OUT) {
3357 if (r->out.version == NULL) {
3358 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3360 NDR_CHECK(ndr_push_dfs_ManagerVersion(ndr, NDR_SCALARS, *r->out.version));
3362 return NDR_ERR_SUCCESS;
3365 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_GetManagerVersion(struct ndr_pull *ndr, int flags, struct dfs_GetManagerVersion *r)
3367 TALLOC_CTX *_mem_save_version_0;
3368 if (flags & NDR_IN) {
3369 ZERO_STRUCT(r->out);
3371 NDR_PULL_ALLOC(ndr, r->out.version);
3372 ZERO_STRUCTP(r->out.version);
3374 if (flags & NDR_OUT) {
3375 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3376 NDR_PULL_ALLOC(ndr, r->out.version);
3378 _mem_save_version_0 = NDR_PULL_GET_MEM_CTX(ndr);
3379 NDR_PULL_SET_MEM_CTX(ndr, r->out.version, LIBNDR_FLAG_REF_ALLOC);
3380 NDR_CHECK(ndr_pull_dfs_ManagerVersion(ndr, NDR_SCALARS, r->out.version));
3381 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_version_0, LIBNDR_FLAG_REF_ALLOC);
3383 return NDR_ERR_SUCCESS;
3386 _PUBLIC_ void ndr_print_dfs_GetManagerVersion(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetManagerVersion *r)
3388 ndr_print_struct(ndr, name, "dfs_GetManagerVersion");
3389 ndr->depth++;
3390 if (flags & NDR_SET_VALUES) {
3391 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3393 if (flags & NDR_IN) {
3394 ndr_print_struct(ndr, "in", "dfs_GetManagerVersion");
3395 ndr->depth++;
3396 ndr->depth--;
3398 if (flags & NDR_OUT) {
3399 ndr_print_struct(ndr, "out", "dfs_GetManagerVersion");
3400 ndr->depth++;
3401 ndr_print_ptr(ndr, "version", r->out.version);
3402 ndr->depth++;
3403 ndr_print_dfs_ManagerVersion(ndr, "version", *r->out.version);
3404 ndr->depth--;
3405 ndr->depth--;
3407 ndr->depth--;
3410 static enum ndr_err_code ndr_push_dfs_Add(struct ndr_push *ndr, int flags, const struct dfs_Add *r)
3412 if (flags & NDR_IN) {
3413 if (r->in.path == NULL) {
3414 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3416 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
3417 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3418 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
3419 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path, ndr_charset_length(r->in.path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3420 if (r->in.server == NULL) {
3421 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3423 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
3424 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3425 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
3426 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server, ndr_charset_length(r->in.server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3427 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.share));
3428 if (r->in.share) {
3429 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
3430 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3431 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
3432 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share, ndr_charset_length(r->in.share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3434 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.comment));
3435 if (r->in.comment) {
3436 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
3437 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3438 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
3439 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.comment, ndr_charset_length(r->in.comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3441 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
3443 if (flags & NDR_OUT) {
3444 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3446 return NDR_ERR_SUCCESS;
3449 static enum ndr_err_code ndr_pull_dfs_Add(struct ndr_pull *ndr, int flags, struct dfs_Add *r)
3451 uint32_t _ptr_share;
3452 uint32_t _ptr_comment;
3453 TALLOC_CTX *_mem_save_share_0;
3454 TALLOC_CTX *_mem_save_comment_0;
3455 if (flags & NDR_IN) {
3456 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path));
3457 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path));
3458 if (ndr_get_array_length(ndr, &r->in.path) > ndr_get_array_size(ndr, &r->in.path)) {
3459 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));
3461 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t)));
3462 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t), CH_UTF16));
3463 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server));
3464 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server));
3465 if (ndr_get_array_length(ndr, &r->in.server) > ndr_get_array_size(ndr, &r->in.server)) {
3466 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));
3468 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t)));
3469 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t), CH_UTF16));
3470 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share));
3471 if (_ptr_share) {
3472 NDR_PULL_ALLOC(ndr, r->in.share);
3473 } else {
3474 r->in.share = NULL;
3476 if (r->in.share) {
3477 _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr);
3478 NDR_PULL_SET_MEM_CTX(ndr, r->in.share, 0);
3479 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share));
3480 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share));
3481 if (ndr_get_array_length(ndr, &r->in.share) > ndr_get_array_size(ndr, &r->in.share)) {
3482 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));
3484 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t)));
3485 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t), CH_UTF16));
3486 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0);
3488 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
3489 if (_ptr_comment) {
3490 NDR_PULL_ALLOC(ndr, r->in.comment);
3491 } else {
3492 r->in.comment = NULL;
3494 if (r->in.comment) {
3495 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
3496 NDR_PULL_SET_MEM_CTX(ndr, r->in.comment, 0);
3497 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.comment));
3498 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.comment));
3499 if (ndr_get_array_length(ndr, &r->in.comment) > ndr_get_array_size(ndr, &r->in.comment)) {
3500 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));
3502 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t)));
3503 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.comment, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t), CH_UTF16));
3504 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
3506 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
3508 if (flags & NDR_OUT) {
3509 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3511 return NDR_ERR_SUCCESS;
3514 _PUBLIC_ void ndr_print_dfs_Add(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Add *r)
3516 ndr_print_struct(ndr, name, "dfs_Add");
3517 ndr->depth++;
3518 if (flags & NDR_SET_VALUES) {
3519 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3521 if (flags & NDR_IN) {
3522 ndr_print_struct(ndr, "in", "dfs_Add");
3523 ndr->depth++;
3524 ndr_print_ptr(ndr, "path", r->in.path);
3525 ndr->depth++;
3526 ndr_print_string(ndr, "path", r->in.path);
3527 ndr->depth--;
3528 ndr_print_ptr(ndr, "server", r->in.server);
3529 ndr->depth++;
3530 ndr_print_string(ndr, "server", r->in.server);
3531 ndr->depth--;
3532 ndr_print_ptr(ndr, "share", r->in.share);
3533 ndr->depth++;
3534 if (r->in.share) {
3535 ndr_print_string(ndr, "share", r->in.share);
3537 ndr->depth--;
3538 ndr_print_ptr(ndr, "comment", r->in.comment);
3539 ndr->depth++;
3540 if (r->in.comment) {
3541 ndr_print_string(ndr, "comment", r->in.comment);
3543 ndr->depth--;
3544 ndr_print_uint32(ndr, "flags", r->in.flags);
3545 ndr->depth--;
3547 if (flags & NDR_OUT) {
3548 ndr_print_struct(ndr, "out", "dfs_Add");
3549 ndr->depth++;
3550 ndr_print_WERROR(ndr, "result", r->out.result);
3551 ndr->depth--;
3553 ndr->depth--;
3556 static enum ndr_err_code ndr_push_dfs_Remove(struct ndr_push *ndr, int flags, const struct dfs_Remove *r)
3558 if (flags & NDR_IN) {
3559 if (r->in.dfs_entry_path == NULL) {
3560 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3562 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
3563 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3564 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
3565 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));
3566 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
3567 if (r->in.servername) {
3568 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
3569 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3570 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
3571 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3573 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.sharename));
3574 if (r->in.sharename) {
3575 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16)));
3576 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3577 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16)));
3578 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.sharename, ndr_charset_length(r->in.sharename, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3581 if (flags & NDR_OUT) {
3582 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3584 return NDR_ERR_SUCCESS;
3587 static enum ndr_err_code ndr_pull_dfs_Remove(struct ndr_pull *ndr, int flags, struct dfs_Remove *r)
3589 uint32_t _ptr_servername;
3590 uint32_t _ptr_sharename;
3591 TALLOC_CTX *_mem_save_servername_0;
3592 TALLOC_CTX *_mem_save_sharename_0;
3593 if (flags & NDR_IN) {
3594 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_entry_path));
3595 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_entry_path));
3596 if (ndr_get_array_length(ndr, &r->in.dfs_entry_path) > ndr_get_array_size(ndr, &r->in.dfs_entry_path)) {
3597 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));
3599 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfs_entry_path), sizeof(uint16_t)));
3600 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));
3601 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
3602 if (_ptr_servername) {
3603 NDR_PULL_ALLOC(ndr, r->in.servername);
3604 } else {
3605 r->in.servername = NULL;
3607 if (r->in.servername) {
3608 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
3609 NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
3610 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
3611 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
3612 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
3613 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));
3615 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
3616 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
3617 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
3619 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sharename));
3620 if (_ptr_sharename) {
3621 NDR_PULL_ALLOC(ndr, r->in.sharename);
3622 } else {
3623 r->in.sharename = NULL;
3625 if (r->in.sharename) {
3626 _mem_save_sharename_0 = NDR_PULL_GET_MEM_CTX(ndr);
3627 NDR_PULL_SET_MEM_CTX(ndr, r->in.sharename, 0);
3628 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.sharename));
3629 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.sharename));
3630 if (ndr_get_array_length(ndr, &r->in.sharename) > ndr_get_array_size(ndr, &r->in.sharename)) {
3631 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));
3633 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t)));
3634 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.sharename, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t), CH_UTF16));
3635 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sharename_0, 0);
3638 if (flags & NDR_OUT) {
3639 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3641 return NDR_ERR_SUCCESS;
3644 _PUBLIC_ void ndr_print_dfs_Remove(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Remove *r)
3646 ndr_print_struct(ndr, name, "dfs_Remove");
3647 ndr->depth++;
3648 if (flags & NDR_SET_VALUES) {
3649 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3651 if (flags & NDR_IN) {
3652 ndr_print_struct(ndr, "in", "dfs_Remove");
3653 ndr->depth++;
3654 ndr_print_ptr(ndr, "dfs_entry_path", r->in.dfs_entry_path);
3655 ndr->depth++;
3656 ndr_print_string(ndr, "dfs_entry_path", r->in.dfs_entry_path);
3657 ndr->depth--;
3658 ndr_print_ptr(ndr, "servername", r->in.servername);
3659 ndr->depth++;
3660 if (r->in.servername) {
3661 ndr_print_string(ndr, "servername", r->in.servername);
3663 ndr->depth--;
3664 ndr_print_ptr(ndr, "sharename", r->in.sharename);
3665 ndr->depth++;
3666 if (r->in.sharename) {
3667 ndr_print_string(ndr, "sharename", r->in.sharename);
3669 ndr->depth--;
3670 ndr->depth--;
3672 if (flags & NDR_OUT) {
3673 ndr_print_struct(ndr, "out", "dfs_Remove");
3674 ndr->depth++;
3675 ndr_print_WERROR(ndr, "result", r->out.result);
3676 ndr->depth--;
3678 ndr->depth--;
3681 static enum ndr_err_code ndr_push_dfs_SetInfo(struct ndr_push *ndr, int flags, const struct dfs_SetInfo *r)
3683 if (flags & NDR_IN) {
3684 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
3685 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3686 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
3687 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));
3688 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
3689 if (r->in.servername) {
3690 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
3691 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3692 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
3693 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3695 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.sharename));
3696 if (r->in.sharename) {
3697 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16)));
3698 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3699 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16)));
3700 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.sharename, ndr_charset_length(r->in.sharename, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3702 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
3703 if (r->in.info == NULL) {
3704 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3706 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
3707 NDR_CHECK(ndr_push_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
3709 if (flags & NDR_OUT) {
3710 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3712 return NDR_ERR_SUCCESS;
3715 static enum ndr_err_code ndr_pull_dfs_SetInfo(struct ndr_pull *ndr, int flags, struct dfs_SetInfo *r)
3717 uint32_t _ptr_servername;
3718 uint32_t _ptr_sharename;
3719 TALLOC_CTX *_mem_save_servername_0;
3720 TALLOC_CTX *_mem_save_sharename_0;
3721 TALLOC_CTX *_mem_save_info_0;
3722 if (flags & NDR_IN) {
3723 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_entry_path));
3724 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_entry_path));
3725 if (ndr_get_array_length(ndr, &r->in.dfs_entry_path) > ndr_get_array_size(ndr, &r->in.dfs_entry_path)) {
3726 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));
3728 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfs_entry_path), sizeof(uint16_t)));
3729 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));
3730 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
3731 if (_ptr_servername) {
3732 NDR_PULL_ALLOC(ndr, r->in.servername);
3733 } else {
3734 r->in.servername = NULL;
3736 if (r->in.servername) {
3737 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
3738 NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
3739 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
3740 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
3741 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
3742 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));
3744 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
3745 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
3746 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
3748 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sharename));
3749 if (_ptr_sharename) {
3750 NDR_PULL_ALLOC(ndr, r->in.sharename);
3751 } else {
3752 r->in.sharename = NULL;
3754 if (r->in.sharename) {
3755 _mem_save_sharename_0 = NDR_PULL_GET_MEM_CTX(ndr);
3756 NDR_PULL_SET_MEM_CTX(ndr, r->in.sharename, 0);
3757 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.sharename));
3758 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.sharename));
3759 if (ndr_get_array_length(ndr, &r->in.sharename) > ndr_get_array_size(ndr, &r->in.sharename)) {
3760 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));
3762 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t)));
3763 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.sharename, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t), CH_UTF16));
3764 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sharename_0, 0);
3766 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
3767 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3768 NDR_PULL_ALLOC(ndr, r->in.info);
3770 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
3771 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
3772 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
3773 NDR_CHECK(ndr_pull_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
3774 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
3776 if (flags & NDR_OUT) {
3777 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3779 return NDR_ERR_SUCCESS;
3782 _PUBLIC_ void ndr_print_dfs_SetInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetInfo *r)
3784 ndr_print_struct(ndr, name, "dfs_SetInfo");
3785 ndr->depth++;
3786 if (flags & NDR_SET_VALUES) {
3787 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3789 if (flags & NDR_IN) {
3790 ndr_print_struct(ndr, "in", "dfs_SetInfo");
3791 ndr->depth++;
3792 ndr_print_string(ndr, "dfs_entry_path", r->in.dfs_entry_path);
3793 ndr_print_ptr(ndr, "servername", r->in.servername);
3794 ndr->depth++;
3795 if (r->in.servername) {
3796 ndr_print_string(ndr, "servername", r->in.servername);
3798 ndr->depth--;
3799 ndr_print_ptr(ndr, "sharename", r->in.sharename);
3800 ndr->depth++;
3801 if (r->in.sharename) {
3802 ndr_print_string(ndr, "sharename", r->in.sharename);
3804 ndr->depth--;
3805 ndr_print_uint32(ndr, "level", r->in.level);
3806 ndr_print_ptr(ndr, "info", r->in.info);
3807 ndr->depth++;
3808 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
3809 ndr_print_dfs_Info(ndr, "info", r->in.info);
3810 ndr->depth--;
3811 ndr->depth--;
3813 if (flags & NDR_OUT) {
3814 ndr_print_struct(ndr, "out", "dfs_SetInfo");
3815 ndr->depth++;
3816 ndr_print_WERROR(ndr, "result", r->out.result);
3817 ndr->depth--;
3819 ndr->depth--;
3822 static enum ndr_err_code ndr_push_dfs_GetInfo(struct ndr_push *ndr, int flags, const struct dfs_GetInfo *r)
3824 if (flags & NDR_IN) {
3825 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
3826 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3827 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
3828 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));
3829 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
3830 if (r->in.servername) {
3831 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
3832 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3833 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
3834 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3836 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.sharename));
3837 if (r->in.sharename) {
3838 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16)));
3839 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3840 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16)));
3841 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.sharename, ndr_charset_length(r->in.sharename, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3843 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
3845 if (flags & NDR_OUT) {
3846 if (r->out.info == NULL) {
3847 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3849 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
3850 NDR_CHECK(ndr_push_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
3851 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3853 return NDR_ERR_SUCCESS;
3856 static enum ndr_err_code ndr_pull_dfs_GetInfo(struct ndr_pull *ndr, int flags, struct dfs_GetInfo *r)
3858 uint32_t _ptr_servername;
3859 uint32_t _ptr_sharename;
3860 TALLOC_CTX *_mem_save_servername_0;
3861 TALLOC_CTX *_mem_save_sharename_0;
3862 TALLOC_CTX *_mem_save_info_0;
3863 if (flags & NDR_IN) {
3864 ZERO_STRUCT(r->out);
3866 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_entry_path));
3867 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_entry_path));
3868 if (ndr_get_array_length(ndr, &r->in.dfs_entry_path) > ndr_get_array_size(ndr, &r->in.dfs_entry_path)) {
3869 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));
3871 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfs_entry_path), sizeof(uint16_t)));
3872 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));
3873 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
3874 if (_ptr_servername) {
3875 NDR_PULL_ALLOC(ndr, r->in.servername);
3876 } else {
3877 r->in.servername = NULL;
3879 if (r->in.servername) {
3880 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
3881 NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
3882 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
3883 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
3884 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
3885 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));
3887 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
3888 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
3889 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
3891 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sharename));
3892 if (_ptr_sharename) {
3893 NDR_PULL_ALLOC(ndr, r->in.sharename);
3894 } else {
3895 r->in.sharename = NULL;
3897 if (r->in.sharename) {
3898 _mem_save_sharename_0 = NDR_PULL_GET_MEM_CTX(ndr);
3899 NDR_PULL_SET_MEM_CTX(ndr, r->in.sharename, 0);
3900 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.sharename));
3901 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.sharename));
3902 if (ndr_get_array_length(ndr, &r->in.sharename) > ndr_get_array_size(ndr, &r->in.sharename)) {
3903 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));
3905 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t)));
3906 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.sharename, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t), CH_UTF16));
3907 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sharename_0, 0);
3909 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
3910 NDR_PULL_ALLOC(ndr, r->out.info);
3911 ZERO_STRUCTP(r->out.info);
3913 if (flags & NDR_OUT) {
3914 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3915 NDR_PULL_ALLOC(ndr, r->out.info);
3917 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
3918 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
3919 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
3920 NDR_CHECK(ndr_pull_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
3921 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
3922 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3924 return NDR_ERR_SUCCESS;
3927 _PUBLIC_ void ndr_print_dfs_GetInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetInfo *r)
3929 ndr_print_struct(ndr, name, "dfs_GetInfo");
3930 ndr->depth++;
3931 if (flags & NDR_SET_VALUES) {
3932 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3934 if (flags & NDR_IN) {
3935 ndr_print_struct(ndr, "in", "dfs_GetInfo");
3936 ndr->depth++;
3937 ndr_print_string(ndr, "dfs_entry_path", r->in.dfs_entry_path);
3938 ndr_print_ptr(ndr, "servername", r->in.servername);
3939 ndr->depth++;
3940 if (r->in.servername) {
3941 ndr_print_string(ndr, "servername", r->in.servername);
3943 ndr->depth--;
3944 ndr_print_ptr(ndr, "sharename", r->in.sharename);
3945 ndr->depth++;
3946 if (r->in.sharename) {
3947 ndr_print_string(ndr, "sharename", r->in.sharename);
3949 ndr->depth--;
3950 ndr_print_uint32(ndr, "level", r->in.level);
3951 ndr->depth--;
3953 if (flags & NDR_OUT) {
3954 ndr_print_struct(ndr, "out", "dfs_GetInfo");
3955 ndr->depth++;
3956 ndr_print_ptr(ndr, "info", r->out.info);
3957 ndr->depth++;
3958 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
3959 ndr_print_dfs_Info(ndr, "info", r->out.info);
3960 ndr->depth--;
3961 ndr_print_WERROR(ndr, "result", r->out.result);
3962 ndr->depth--;
3964 ndr->depth--;
3967 static enum ndr_err_code ndr_push_dfs_Enum(struct ndr_push *ndr, int flags, const struct dfs_Enum *r)
3969 if (flags & NDR_IN) {
3970 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
3971 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bufsize));
3972 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info));
3973 if (r->in.info) {
3974 NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
3976 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.total));
3977 if (r->in.total) {
3978 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.total));
3981 if (flags & NDR_OUT) {
3982 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
3983 if (r->out.info) {
3984 NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
3986 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.total));
3987 if (r->out.total) {
3988 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.total));
3990 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3992 return NDR_ERR_SUCCESS;
3995 static enum ndr_err_code ndr_pull_dfs_Enum(struct ndr_pull *ndr, int flags, struct dfs_Enum *r)
3997 uint32_t _ptr_info;
3998 uint32_t _ptr_total;
3999 TALLOC_CTX *_mem_save_info_0;
4000 TALLOC_CTX *_mem_save_total_0;
4001 if (flags & NDR_IN) {
4002 ZERO_STRUCT(r->out);
4004 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
4005 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bufsize));
4006 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
4007 if (_ptr_info) {
4008 NDR_PULL_ALLOC(ndr, r->in.info);
4009 } else {
4010 r->in.info = NULL;
4012 if (r->in.info) {
4013 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
4014 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0);
4015 NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
4016 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
4018 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total));
4019 if (_ptr_total) {
4020 NDR_PULL_ALLOC(ndr, r->in.total);
4021 } else {
4022 r->in.total = NULL;
4024 if (r->in.total) {
4025 _mem_save_total_0 = NDR_PULL_GET_MEM_CTX(ndr);
4026 NDR_PULL_SET_MEM_CTX(ndr, r->in.total, 0);
4027 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.total));
4028 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_0, 0);
4031 if (flags & NDR_OUT) {
4032 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
4033 if (_ptr_info) {
4034 NDR_PULL_ALLOC(ndr, r->out.info);
4035 } else {
4036 r->out.info = NULL;
4038 if (r->out.info) {
4039 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
4040 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
4041 NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
4042 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
4044 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total));
4045 if (_ptr_total) {
4046 NDR_PULL_ALLOC(ndr, r->out.total);
4047 } else {
4048 r->out.total = NULL;
4050 if (r->out.total) {
4051 _mem_save_total_0 = NDR_PULL_GET_MEM_CTX(ndr);
4052 NDR_PULL_SET_MEM_CTX(ndr, r->out.total, 0);
4053 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.total));
4054 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_0, 0);
4056 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4058 return NDR_ERR_SUCCESS;
4061 _PUBLIC_ void ndr_print_dfs_Enum(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Enum *r)
4063 ndr_print_struct(ndr, name, "dfs_Enum");
4064 ndr->depth++;
4065 if (flags & NDR_SET_VALUES) {
4066 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4068 if (flags & NDR_IN) {
4069 ndr_print_struct(ndr, "in", "dfs_Enum");
4070 ndr->depth++;
4071 ndr_print_uint32(ndr, "level", r->in.level);
4072 ndr_print_uint32(ndr, "bufsize", r->in.bufsize);
4073 ndr_print_ptr(ndr, "info", r->in.info);
4074 ndr->depth++;
4075 if (r->in.info) {
4076 ndr_print_dfs_EnumStruct(ndr, "info", r->in.info);
4078 ndr->depth--;
4079 ndr_print_ptr(ndr, "total", r->in.total);
4080 ndr->depth++;
4081 if (r->in.total) {
4082 ndr_print_uint32(ndr, "total", *r->in.total);
4084 ndr->depth--;
4085 ndr->depth--;
4087 if (flags & NDR_OUT) {
4088 ndr_print_struct(ndr, "out", "dfs_Enum");
4089 ndr->depth++;
4090 ndr_print_ptr(ndr, "info", r->out.info);
4091 ndr->depth++;
4092 if (r->out.info) {
4093 ndr_print_dfs_EnumStruct(ndr, "info", r->out.info);
4095 ndr->depth--;
4096 ndr_print_ptr(ndr, "total", r->out.total);
4097 ndr->depth++;
4098 if (r->out.total) {
4099 ndr_print_uint32(ndr, "total", *r->out.total);
4101 ndr->depth--;
4102 ndr_print_WERROR(ndr, "result", r->out.result);
4103 ndr->depth--;
4105 ndr->depth--;
4108 static enum ndr_err_code ndr_push_dfs_Rename(struct ndr_push *ndr, int flags, const struct dfs_Rename *r)
4110 if (flags & NDR_IN) {
4112 if (flags & NDR_OUT) {
4113 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4115 return NDR_ERR_SUCCESS;
4118 static enum ndr_err_code ndr_pull_dfs_Rename(struct ndr_pull *ndr, int flags, struct dfs_Rename *r)
4120 if (flags & NDR_IN) {
4122 if (flags & NDR_OUT) {
4123 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4125 return NDR_ERR_SUCCESS;
4128 _PUBLIC_ void ndr_print_dfs_Rename(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Rename *r)
4130 ndr_print_struct(ndr, name, "dfs_Rename");
4131 ndr->depth++;
4132 if (flags & NDR_SET_VALUES) {
4133 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4135 if (flags & NDR_IN) {
4136 ndr_print_struct(ndr, "in", "dfs_Rename");
4137 ndr->depth++;
4138 ndr->depth--;
4140 if (flags & NDR_OUT) {
4141 ndr_print_struct(ndr, "out", "dfs_Rename");
4142 ndr->depth++;
4143 ndr_print_WERROR(ndr, "result", r->out.result);
4144 ndr->depth--;
4146 ndr->depth--;
4149 static enum ndr_err_code ndr_push_dfs_Move(struct ndr_push *ndr, int flags, const struct dfs_Move *r)
4151 if (flags & NDR_IN) {
4153 if (flags & NDR_OUT) {
4154 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4156 return NDR_ERR_SUCCESS;
4159 static enum ndr_err_code ndr_pull_dfs_Move(struct ndr_pull *ndr, int flags, struct dfs_Move *r)
4161 if (flags & NDR_IN) {
4163 if (flags & NDR_OUT) {
4164 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4166 return NDR_ERR_SUCCESS;
4169 _PUBLIC_ void ndr_print_dfs_Move(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Move *r)
4171 ndr_print_struct(ndr, name, "dfs_Move");
4172 ndr->depth++;
4173 if (flags & NDR_SET_VALUES) {
4174 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4176 if (flags & NDR_IN) {
4177 ndr_print_struct(ndr, "in", "dfs_Move");
4178 ndr->depth++;
4179 ndr->depth--;
4181 if (flags & NDR_OUT) {
4182 ndr_print_struct(ndr, "out", "dfs_Move");
4183 ndr->depth++;
4184 ndr_print_WERROR(ndr, "result", r->out.result);
4185 ndr->depth--;
4187 ndr->depth--;
4190 static enum ndr_err_code ndr_push_dfs_ManagerGetConfigInfo(struct ndr_push *ndr, int flags, const struct dfs_ManagerGetConfigInfo *r)
4192 if (flags & NDR_IN) {
4194 if (flags & NDR_OUT) {
4195 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4197 return NDR_ERR_SUCCESS;
4200 static enum ndr_err_code ndr_pull_dfs_ManagerGetConfigInfo(struct ndr_pull *ndr, int flags, struct dfs_ManagerGetConfigInfo *r)
4202 if (flags & NDR_IN) {
4204 if (flags & NDR_OUT) {
4205 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4207 return NDR_ERR_SUCCESS;
4210 _PUBLIC_ void ndr_print_dfs_ManagerGetConfigInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerGetConfigInfo *r)
4212 ndr_print_struct(ndr, name, "dfs_ManagerGetConfigInfo");
4213 ndr->depth++;
4214 if (flags & NDR_SET_VALUES) {
4215 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4217 if (flags & NDR_IN) {
4218 ndr_print_struct(ndr, "in", "dfs_ManagerGetConfigInfo");
4219 ndr->depth++;
4220 ndr->depth--;
4222 if (flags & NDR_OUT) {
4223 ndr_print_struct(ndr, "out", "dfs_ManagerGetConfigInfo");
4224 ndr->depth++;
4225 ndr_print_WERROR(ndr, "result", r->out.result);
4226 ndr->depth--;
4228 ndr->depth--;
4231 static enum ndr_err_code ndr_push_dfs_ManagerSendSiteInfo(struct ndr_push *ndr, int flags, const struct dfs_ManagerSendSiteInfo *r)
4233 if (flags & NDR_IN) {
4235 if (flags & NDR_OUT) {
4236 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4238 return NDR_ERR_SUCCESS;
4241 static enum ndr_err_code ndr_pull_dfs_ManagerSendSiteInfo(struct ndr_pull *ndr, int flags, struct dfs_ManagerSendSiteInfo *r)
4243 if (flags & NDR_IN) {
4245 if (flags & NDR_OUT) {
4246 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4248 return NDR_ERR_SUCCESS;
4251 _PUBLIC_ void ndr_print_dfs_ManagerSendSiteInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerSendSiteInfo *r)
4253 ndr_print_struct(ndr, name, "dfs_ManagerSendSiteInfo");
4254 ndr->depth++;
4255 if (flags & NDR_SET_VALUES) {
4256 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4258 if (flags & NDR_IN) {
4259 ndr_print_struct(ndr, "in", "dfs_ManagerSendSiteInfo");
4260 ndr->depth++;
4261 ndr->depth--;
4263 if (flags & NDR_OUT) {
4264 ndr_print_struct(ndr, "out", "dfs_ManagerSendSiteInfo");
4265 ndr->depth++;
4266 ndr_print_WERROR(ndr, "result", r->out.result);
4267 ndr->depth--;
4269 ndr->depth--;
4272 static enum ndr_err_code ndr_push_dfs_AddFtRoot(struct ndr_push *ndr, int flags, const struct dfs_AddFtRoot *r)
4274 if (flags & NDR_IN) {
4275 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4276 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4277 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4278 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4279 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_servername, CH_UTF16)));
4280 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4281 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_servername, CH_UTF16)));
4282 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));
4283 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfsname, CH_UTF16)));
4284 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4285 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfsname, CH_UTF16)));
4286 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dfsname, ndr_charset_length(r->in.dfsname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4287 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4288 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4289 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4290 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4291 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
4292 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4293 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
4294 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.comment, ndr_charset_length(r->in.comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4295 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_config_dn, CH_UTF16)));
4296 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4297 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_config_dn, CH_UTF16)));
4298 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));
4299 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.unknown1));
4300 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
4301 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown2));
4302 if (r->in.unknown2) {
4303 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.unknown2));
4304 if (*r->in.unknown2) {
4305 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.unknown2));
4309 if (flags & NDR_OUT) {
4310 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.unknown2));
4311 if (r->out.unknown2) {
4312 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.unknown2));
4313 if (*r->out.unknown2) {
4314 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.unknown2));
4317 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4319 return NDR_ERR_SUCCESS;
4322 static enum ndr_err_code ndr_pull_dfs_AddFtRoot(struct ndr_pull *ndr, int flags, struct dfs_AddFtRoot *r)
4324 uint32_t _ptr_unknown2;
4325 TALLOC_CTX *_mem_save_unknown2_0;
4326 TALLOC_CTX *_mem_save_unknown2_1;
4327 if (flags & NDR_IN) {
4328 ZERO_STRUCT(r->out);
4330 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
4331 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
4332 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
4333 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));
4335 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
4336 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
4337 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dns_servername));
4338 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dns_servername));
4339 if (ndr_get_array_length(ndr, &r->in.dns_servername) > ndr_get_array_size(ndr, &r->in.dns_servername)) {
4340 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));
4342 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dns_servername), sizeof(uint16_t)));
4343 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));
4344 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfsname));
4345 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfsname));
4346 if (ndr_get_array_length(ndr, &r->in.dfsname) > ndr_get_array_size(ndr, &r->in.dfsname)) {
4347 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));
4349 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfsname), sizeof(uint16_t)));
4350 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfsname, ndr_get_array_length(ndr, &r->in.dfsname), sizeof(uint16_t), CH_UTF16));
4351 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
4352 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
4353 if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) {
4354 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));
4356 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t)));
4357 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16));
4358 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.comment));
4359 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.comment));
4360 if (ndr_get_array_length(ndr, &r->in.comment) > ndr_get_array_size(ndr, &r->in.comment)) {
4361 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));
4363 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t)));
4364 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.comment, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t), CH_UTF16));
4365 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_config_dn));
4366 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_config_dn));
4367 if (ndr_get_array_length(ndr, &r->in.dfs_config_dn) > ndr_get_array_size(ndr, &r->in.dfs_config_dn)) {
4368 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));
4370 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfs_config_dn), sizeof(uint16_t)));
4371 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));
4372 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.unknown1));
4373 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
4374 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
4375 if (_ptr_unknown2) {
4376 NDR_PULL_ALLOC(ndr, r->in.unknown2);
4377 } else {
4378 r->in.unknown2 = NULL;
4380 if (r->in.unknown2) {
4381 _mem_save_unknown2_0 = NDR_PULL_GET_MEM_CTX(ndr);
4382 NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown2, 0);
4383 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
4384 if (_ptr_unknown2) {
4385 NDR_PULL_ALLOC(ndr, *r->in.unknown2);
4386 } else {
4387 *r->in.unknown2 = NULL;
4389 if (*r->in.unknown2) {
4390 _mem_save_unknown2_1 = NDR_PULL_GET_MEM_CTX(ndr);
4391 NDR_PULL_SET_MEM_CTX(ndr, *r->in.unknown2, 0);
4392 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.unknown2));
4393 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_1, 0);
4395 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_0, 0);
4398 if (flags & NDR_OUT) {
4399 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
4400 if (_ptr_unknown2) {
4401 NDR_PULL_ALLOC(ndr, r->out.unknown2);
4402 } else {
4403 r->out.unknown2 = NULL;
4405 if (r->out.unknown2) {
4406 _mem_save_unknown2_0 = NDR_PULL_GET_MEM_CTX(ndr);
4407 NDR_PULL_SET_MEM_CTX(ndr, r->out.unknown2, 0);
4408 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
4409 if (_ptr_unknown2) {
4410 NDR_PULL_ALLOC(ndr, *r->out.unknown2);
4411 } else {
4412 *r->out.unknown2 = NULL;
4414 if (*r->out.unknown2) {
4415 _mem_save_unknown2_1 = NDR_PULL_GET_MEM_CTX(ndr);
4416 NDR_PULL_SET_MEM_CTX(ndr, *r->out.unknown2, 0);
4417 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.unknown2));
4418 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_1, 0);
4420 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_0, 0);
4422 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4424 return NDR_ERR_SUCCESS;
4427 _PUBLIC_ void ndr_print_dfs_AddFtRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddFtRoot *r)
4429 ndr_print_struct(ndr, name, "dfs_AddFtRoot");
4430 ndr->depth++;
4431 if (flags & NDR_SET_VALUES) {
4432 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4434 if (flags & NDR_IN) {
4435 ndr_print_struct(ndr, "in", "dfs_AddFtRoot");
4436 ndr->depth++;
4437 ndr_print_string(ndr, "servername", r->in.servername);
4438 ndr_print_string(ndr, "dns_servername", r->in.dns_servername);
4439 ndr_print_string(ndr, "dfsname", r->in.dfsname);
4440 ndr_print_string(ndr, "rootshare", r->in.rootshare);
4441 ndr_print_string(ndr, "comment", r->in.comment);
4442 ndr_print_string(ndr, "dfs_config_dn", r->in.dfs_config_dn);
4443 ndr_print_uint8(ndr, "unknown1", r->in.unknown1);
4444 ndr_print_uint32(ndr, "flags", r->in.flags);
4445 ndr_print_ptr(ndr, "unknown2", r->in.unknown2);
4446 ndr->depth++;
4447 if (r->in.unknown2) {
4448 ndr_print_ptr(ndr, "unknown2", *r->in.unknown2);
4449 ndr->depth++;
4450 if (*r->in.unknown2) {
4451 ndr_print_dfs_UnknownStruct(ndr, "unknown2", *r->in.unknown2);
4453 ndr->depth--;
4455 ndr->depth--;
4456 ndr->depth--;
4458 if (flags & NDR_OUT) {
4459 ndr_print_struct(ndr, "out", "dfs_AddFtRoot");
4460 ndr->depth++;
4461 ndr_print_ptr(ndr, "unknown2", r->out.unknown2);
4462 ndr->depth++;
4463 if (r->out.unknown2) {
4464 ndr_print_ptr(ndr, "unknown2", *r->out.unknown2);
4465 ndr->depth++;
4466 if (*r->out.unknown2) {
4467 ndr_print_dfs_UnknownStruct(ndr, "unknown2", *r->out.unknown2);
4469 ndr->depth--;
4471 ndr->depth--;
4472 ndr_print_WERROR(ndr, "result", r->out.result);
4473 ndr->depth--;
4475 ndr->depth--;
4478 static enum ndr_err_code ndr_push_dfs_RemoveFtRoot(struct ndr_push *ndr, int flags, const struct dfs_RemoveFtRoot *r)
4480 if (flags & NDR_IN) {
4481 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4482 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4483 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4484 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4485 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_servername, CH_UTF16)));
4486 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4487 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_servername, CH_UTF16)));
4488 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));
4489 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfsname, CH_UTF16)));
4490 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4491 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfsname, CH_UTF16)));
4492 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dfsname, ndr_charset_length(r->in.dfsname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4493 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4494 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4495 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4496 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4497 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
4498 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown));
4499 if (r->in.unknown) {
4500 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.unknown));
4501 if (*r->in.unknown) {
4502 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.unknown));
4506 if (flags & NDR_OUT) {
4507 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.unknown));
4508 if (r->out.unknown) {
4509 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.unknown));
4510 if (*r->out.unknown) {
4511 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.unknown));
4514 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4516 return NDR_ERR_SUCCESS;
4519 static enum ndr_err_code ndr_pull_dfs_RemoveFtRoot(struct ndr_pull *ndr, int flags, struct dfs_RemoveFtRoot *r)
4521 uint32_t _ptr_unknown;
4522 TALLOC_CTX *_mem_save_unknown_0;
4523 TALLOC_CTX *_mem_save_unknown_1;
4524 if (flags & NDR_IN) {
4525 ZERO_STRUCT(r->out);
4527 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
4528 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
4529 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
4530 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));
4532 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
4533 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
4534 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dns_servername));
4535 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dns_servername));
4536 if (ndr_get_array_length(ndr, &r->in.dns_servername) > ndr_get_array_size(ndr, &r->in.dns_servername)) {
4537 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));
4539 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dns_servername), sizeof(uint16_t)));
4540 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));
4541 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfsname));
4542 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfsname));
4543 if (ndr_get_array_length(ndr, &r->in.dfsname) > ndr_get_array_size(ndr, &r->in.dfsname)) {
4544 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));
4546 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfsname), sizeof(uint16_t)));
4547 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfsname, ndr_get_array_length(ndr, &r->in.dfsname), sizeof(uint16_t), CH_UTF16));
4548 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
4549 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
4550 if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) {
4551 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));
4553 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t)));
4554 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16));
4555 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
4556 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown));
4557 if (_ptr_unknown) {
4558 NDR_PULL_ALLOC(ndr, r->in.unknown);
4559 } else {
4560 r->in.unknown = NULL;
4562 if (r->in.unknown) {
4563 _mem_save_unknown_0 = NDR_PULL_GET_MEM_CTX(ndr);
4564 NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown, 0);
4565 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown));
4566 if (_ptr_unknown) {
4567 NDR_PULL_ALLOC(ndr, *r->in.unknown);
4568 } else {
4569 *r->in.unknown = NULL;
4571 if (*r->in.unknown) {
4572 _mem_save_unknown_1 = NDR_PULL_GET_MEM_CTX(ndr);
4573 NDR_PULL_SET_MEM_CTX(ndr, *r->in.unknown, 0);
4574 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.unknown));
4575 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_1, 0);
4577 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_0, 0);
4580 if (flags & NDR_OUT) {
4581 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown));
4582 if (_ptr_unknown) {
4583 NDR_PULL_ALLOC(ndr, r->out.unknown);
4584 } else {
4585 r->out.unknown = NULL;
4587 if (r->out.unknown) {
4588 _mem_save_unknown_0 = NDR_PULL_GET_MEM_CTX(ndr);
4589 NDR_PULL_SET_MEM_CTX(ndr, r->out.unknown, 0);
4590 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown));
4591 if (_ptr_unknown) {
4592 NDR_PULL_ALLOC(ndr, *r->out.unknown);
4593 } else {
4594 *r->out.unknown = NULL;
4596 if (*r->out.unknown) {
4597 _mem_save_unknown_1 = NDR_PULL_GET_MEM_CTX(ndr);
4598 NDR_PULL_SET_MEM_CTX(ndr, *r->out.unknown, 0);
4599 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.unknown));
4600 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_1, 0);
4602 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_0, 0);
4604 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4606 return NDR_ERR_SUCCESS;
4609 _PUBLIC_ void ndr_print_dfs_RemoveFtRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_RemoveFtRoot *r)
4611 ndr_print_struct(ndr, name, "dfs_RemoveFtRoot");
4612 ndr->depth++;
4613 if (flags & NDR_SET_VALUES) {
4614 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4616 if (flags & NDR_IN) {
4617 ndr_print_struct(ndr, "in", "dfs_RemoveFtRoot");
4618 ndr->depth++;
4619 ndr_print_string(ndr, "servername", r->in.servername);
4620 ndr_print_string(ndr, "dns_servername", r->in.dns_servername);
4621 ndr_print_string(ndr, "dfsname", r->in.dfsname);
4622 ndr_print_string(ndr, "rootshare", r->in.rootshare);
4623 ndr_print_uint32(ndr, "flags", r->in.flags);
4624 ndr_print_ptr(ndr, "unknown", r->in.unknown);
4625 ndr->depth++;
4626 if (r->in.unknown) {
4627 ndr_print_ptr(ndr, "unknown", *r->in.unknown);
4628 ndr->depth++;
4629 if (*r->in.unknown) {
4630 ndr_print_dfs_UnknownStruct(ndr, "unknown", *r->in.unknown);
4632 ndr->depth--;
4634 ndr->depth--;
4635 ndr->depth--;
4637 if (flags & NDR_OUT) {
4638 ndr_print_struct(ndr, "out", "dfs_RemoveFtRoot");
4639 ndr->depth++;
4640 ndr_print_ptr(ndr, "unknown", r->out.unknown);
4641 ndr->depth++;
4642 if (r->out.unknown) {
4643 ndr_print_ptr(ndr, "unknown", *r->out.unknown);
4644 ndr->depth++;
4645 if (*r->out.unknown) {
4646 ndr_print_dfs_UnknownStruct(ndr, "unknown", *r->out.unknown);
4648 ndr->depth--;
4650 ndr->depth--;
4651 ndr_print_WERROR(ndr, "result", r->out.result);
4652 ndr->depth--;
4654 ndr->depth--;
4657 static enum ndr_err_code ndr_push_dfs_AddStdRoot(struct ndr_push *ndr, int flags, const struct dfs_AddStdRoot *r)
4659 if (flags & NDR_IN) {
4660 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4661 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4662 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4663 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4664 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4665 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4666 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4667 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4668 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
4669 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4670 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
4671 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.comment, ndr_charset_length(r->in.comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4672 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
4674 if (flags & NDR_OUT) {
4675 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4677 return NDR_ERR_SUCCESS;
4680 static enum ndr_err_code ndr_pull_dfs_AddStdRoot(struct ndr_pull *ndr, int flags, struct dfs_AddStdRoot *r)
4682 if (flags & NDR_IN) {
4683 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
4684 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
4685 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
4686 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));
4688 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
4689 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
4690 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
4691 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
4692 if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) {
4693 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));
4695 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t)));
4696 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16));
4697 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.comment));
4698 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.comment));
4699 if (ndr_get_array_length(ndr, &r->in.comment) > ndr_get_array_size(ndr, &r->in.comment)) {
4700 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));
4702 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t)));
4703 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.comment, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t), CH_UTF16));
4704 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
4706 if (flags & NDR_OUT) {
4707 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4709 return NDR_ERR_SUCCESS;
4712 _PUBLIC_ void ndr_print_dfs_AddStdRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddStdRoot *r)
4714 ndr_print_struct(ndr, name, "dfs_AddStdRoot");
4715 ndr->depth++;
4716 if (flags & NDR_SET_VALUES) {
4717 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4719 if (flags & NDR_IN) {
4720 ndr_print_struct(ndr, "in", "dfs_AddStdRoot");
4721 ndr->depth++;
4722 ndr_print_string(ndr, "servername", r->in.servername);
4723 ndr_print_string(ndr, "rootshare", r->in.rootshare);
4724 ndr_print_string(ndr, "comment", r->in.comment);
4725 ndr_print_uint32(ndr, "flags", r->in.flags);
4726 ndr->depth--;
4728 if (flags & NDR_OUT) {
4729 ndr_print_struct(ndr, "out", "dfs_AddStdRoot");
4730 ndr->depth++;
4731 ndr_print_WERROR(ndr, "result", r->out.result);
4732 ndr->depth--;
4734 ndr->depth--;
4737 static enum ndr_err_code ndr_push_dfs_RemoveStdRoot(struct ndr_push *ndr, int flags, const struct dfs_RemoveStdRoot *r)
4739 if (flags & NDR_IN) {
4740 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4741 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4742 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4743 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4744 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4745 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4746 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4747 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4748 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
4750 if (flags & NDR_OUT) {
4751 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4753 return NDR_ERR_SUCCESS;
4756 static enum ndr_err_code ndr_pull_dfs_RemoveStdRoot(struct ndr_pull *ndr, int flags, struct dfs_RemoveStdRoot *r)
4758 if (flags & NDR_IN) {
4759 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
4760 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
4761 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
4762 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));
4764 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
4765 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
4766 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
4767 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
4768 if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) {
4769 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));
4771 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t)));
4772 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16));
4773 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
4775 if (flags & NDR_OUT) {
4776 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4778 return NDR_ERR_SUCCESS;
4781 _PUBLIC_ void ndr_print_dfs_RemoveStdRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_RemoveStdRoot *r)
4783 ndr_print_struct(ndr, name, "dfs_RemoveStdRoot");
4784 ndr->depth++;
4785 if (flags & NDR_SET_VALUES) {
4786 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4788 if (flags & NDR_IN) {
4789 ndr_print_struct(ndr, "in", "dfs_RemoveStdRoot");
4790 ndr->depth++;
4791 ndr_print_string(ndr, "servername", r->in.servername);
4792 ndr_print_string(ndr, "rootshare", r->in.rootshare);
4793 ndr_print_uint32(ndr, "flags", r->in.flags);
4794 ndr->depth--;
4796 if (flags & NDR_OUT) {
4797 ndr_print_struct(ndr, "out", "dfs_RemoveStdRoot");
4798 ndr->depth++;
4799 ndr_print_WERROR(ndr, "result", r->out.result);
4800 ndr->depth--;
4802 ndr->depth--;
4805 static enum ndr_err_code ndr_push_dfs_ManagerInitialize(struct ndr_push *ndr, int flags, const struct dfs_ManagerInitialize *r)
4807 if (flags & NDR_IN) {
4808 if (r->in.servername == NULL) {
4809 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4811 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4812 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4813 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4814 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4815 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
4817 if (flags & NDR_OUT) {
4818 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4820 return NDR_ERR_SUCCESS;
4823 static enum ndr_err_code ndr_pull_dfs_ManagerInitialize(struct ndr_pull *ndr, int flags, struct dfs_ManagerInitialize *r)
4825 if (flags & NDR_IN) {
4826 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
4827 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
4828 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
4829 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));
4831 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
4832 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
4833 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
4835 if (flags & NDR_OUT) {
4836 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4838 return NDR_ERR_SUCCESS;
4841 _PUBLIC_ void ndr_print_dfs_ManagerInitialize(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerInitialize *r)
4843 ndr_print_struct(ndr, name, "dfs_ManagerInitialize");
4844 ndr->depth++;
4845 if (flags & NDR_SET_VALUES) {
4846 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4848 if (flags & NDR_IN) {
4849 ndr_print_struct(ndr, "in", "dfs_ManagerInitialize");
4850 ndr->depth++;
4851 ndr_print_ptr(ndr, "servername", r->in.servername);
4852 ndr->depth++;
4853 ndr_print_string(ndr, "servername", r->in.servername);
4854 ndr->depth--;
4855 ndr_print_uint32(ndr, "flags", r->in.flags);
4856 ndr->depth--;
4858 if (flags & NDR_OUT) {
4859 ndr_print_struct(ndr, "out", "dfs_ManagerInitialize");
4860 ndr->depth++;
4861 ndr_print_WERROR(ndr, "result", r->out.result);
4862 ndr->depth--;
4864 ndr->depth--;
4867 static enum ndr_err_code ndr_push_dfs_AddStdRootForced(struct ndr_push *ndr, int flags, const struct dfs_AddStdRootForced *r)
4869 if (flags & NDR_IN) {
4870 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4871 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4872 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4873 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4874 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4875 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4876 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4877 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4878 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
4879 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4880 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
4881 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.comment, ndr_charset_length(r->in.comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4882 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.store, CH_UTF16)));
4883 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4884 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.store, CH_UTF16)));
4885 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.store, ndr_charset_length(r->in.store, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4887 if (flags & NDR_OUT) {
4888 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4890 return NDR_ERR_SUCCESS;
4893 static enum ndr_err_code ndr_pull_dfs_AddStdRootForced(struct ndr_pull *ndr, int flags, struct dfs_AddStdRootForced *r)
4895 if (flags & NDR_IN) {
4896 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
4897 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
4898 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
4899 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));
4901 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
4902 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
4903 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
4904 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
4905 if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) {
4906 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));
4908 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t)));
4909 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16));
4910 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.comment));
4911 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.comment));
4912 if (ndr_get_array_length(ndr, &r->in.comment) > ndr_get_array_size(ndr, &r->in.comment)) {
4913 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));
4915 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t)));
4916 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.comment, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t), CH_UTF16));
4917 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.store));
4918 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.store));
4919 if (ndr_get_array_length(ndr, &r->in.store) > ndr_get_array_size(ndr, &r->in.store)) {
4920 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));
4922 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.store), sizeof(uint16_t)));
4923 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.store, ndr_get_array_length(ndr, &r->in.store), sizeof(uint16_t), CH_UTF16));
4925 if (flags & NDR_OUT) {
4926 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4928 return NDR_ERR_SUCCESS;
4931 _PUBLIC_ void ndr_print_dfs_AddStdRootForced(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddStdRootForced *r)
4933 ndr_print_struct(ndr, name, "dfs_AddStdRootForced");
4934 ndr->depth++;
4935 if (flags & NDR_SET_VALUES) {
4936 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4938 if (flags & NDR_IN) {
4939 ndr_print_struct(ndr, "in", "dfs_AddStdRootForced");
4940 ndr->depth++;
4941 ndr_print_string(ndr, "servername", r->in.servername);
4942 ndr_print_string(ndr, "rootshare", r->in.rootshare);
4943 ndr_print_string(ndr, "comment", r->in.comment);
4944 ndr_print_string(ndr, "store", r->in.store);
4945 ndr->depth--;
4947 if (flags & NDR_OUT) {
4948 ndr_print_struct(ndr, "out", "dfs_AddStdRootForced");
4949 ndr->depth++;
4950 ndr_print_WERROR(ndr, "result", r->out.result);
4951 ndr->depth--;
4953 ndr->depth--;
4956 static enum ndr_err_code ndr_push_dfs_GetDcAddress(struct ndr_push *ndr, int flags, const struct dfs_GetDcAddress *r)
4958 if (flags & NDR_IN) {
4959 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4960 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4961 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4962 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4963 if (r->in.server_fullname == NULL) {
4964 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4966 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.server_fullname));
4967 if (*r->in.server_fullname) {
4968 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->in.server_fullname, CH_UTF16)));
4969 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4970 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->in.server_fullname, CH_UTF16)));
4971 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));
4973 if (r->in.is_root == NULL) {
4974 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4976 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->in.is_root));
4977 if (r->in.ttl == NULL) {
4978 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4980 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.ttl));
4982 if (flags & NDR_OUT) {
4983 if (r->out.server_fullname == NULL) {
4984 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4986 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.server_fullname));
4987 if (*r->out.server_fullname) {
4988 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.server_fullname, CH_UTF16)));
4989 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4990 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.server_fullname, CH_UTF16)));
4991 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));
4993 if (r->out.is_root == NULL) {
4994 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4996 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->out.is_root));
4997 if (r->out.ttl == NULL) {
4998 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5000 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.ttl));
5001 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5003 return NDR_ERR_SUCCESS;
5006 static enum ndr_err_code ndr_pull_dfs_GetDcAddress(struct ndr_pull *ndr, int flags, struct dfs_GetDcAddress *r)
5008 uint32_t _ptr_server_fullname;
5009 TALLOC_CTX *_mem_save_server_fullname_0;
5010 TALLOC_CTX *_mem_save_server_fullname_1;
5011 TALLOC_CTX *_mem_save_is_root_0;
5012 TALLOC_CTX *_mem_save_ttl_0;
5013 if (flags & NDR_IN) {
5014 ZERO_STRUCT(r->out);
5016 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
5017 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
5018 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
5019 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));
5021 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
5022 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
5023 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5024 NDR_PULL_ALLOC(ndr, r->in.server_fullname);
5026 _mem_save_server_fullname_0 = NDR_PULL_GET_MEM_CTX(ndr);
5027 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_fullname, LIBNDR_FLAG_REF_ALLOC);
5028 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_fullname));
5029 if (_ptr_server_fullname) {
5030 NDR_PULL_ALLOC(ndr, *r->in.server_fullname);
5031 } else {
5032 *r->in.server_fullname = NULL;
5034 if (*r->in.server_fullname) {
5035 _mem_save_server_fullname_1 = NDR_PULL_GET_MEM_CTX(ndr);
5036 NDR_PULL_SET_MEM_CTX(ndr, *r->in.server_fullname, 0);
5037 NDR_CHECK(ndr_pull_array_size(ndr, r->in.server_fullname));
5038 NDR_CHECK(ndr_pull_array_length(ndr, r->in.server_fullname));
5039 if (ndr_get_array_length(ndr, r->in.server_fullname) > ndr_get_array_size(ndr, r->in.server_fullname)) {
5040 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));
5042 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->in.server_fullname), sizeof(uint16_t)));
5043 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));
5044 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_1, 0);
5046 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_0, LIBNDR_FLAG_REF_ALLOC);
5047 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5048 NDR_PULL_ALLOC(ndr, r->in.is_root);
5050 _mem_save_is_root_0 = NDR_PULL_GET_MEM_CTX(ndr);
5051 NDR_PULL_SET_MEM_CTX(ndr, r->in.is_root, LIBNDR_FLAG_REF_ALLOC);
5052 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->in.is_root));
5053 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_is_root_0, LIBNDR_FLAG_REF_ALLOC);
5054 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5055 NDR_PULL_ALLOC(ndr, r->in.ttl);
5057 _mem_save_ttl_0 = NDR_PULL_GET_MEM_CTX(ndr);
5058 NDR_PULL_SET_MEM_CTX(ndr, r->in.ttl, LIBNDR_FLAG_REF_ALLOC);
5059 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.ttl));
5060 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ttl_0, LIBNDR_FLAG_REF_ALLOC);
5061 NDR_PULL_ALLOC(ndr, r->out.server_fullname);
5062 *r->out.server_fullname = *r->in.server_fullname;
5063 NDR_PULL_ALLOC(ndr, r->out.is_root);
5064 *r->out.is_root = *r->in.is_root;
5065 NDR_PULL_ALLOC(ndr, r->out.ttl);
5066 *r->out.ttl = *r->in.ttl;
5068 if (flags & NDR_OUT) {
5069 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5070 NDR_PULL_ALLOC(ndr, r->out.server_fullname);
5072 _mem_save_server_fullname_0 = NDR_PULL_GET_MEM_CTX(ndr);
5073 NDR_PULL_SET_MEM_CTX(ndr, r->out.server_fullname, LIBNDR_FLAG_REF_ALLOC);
5074 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_fullname));
5075 if (_ptr_server_fullname) {
5076 NDR_PULL_ALLOC(ndr, *r->out.server_fullname);
5077 } else {
5078 *r->out.server_fullname = NULL;
5080 if (*r->out.server_fullname) {
5081 _mem_save_server_fullname_1 = NDR_PULL_GET_MEM_CTX(ndr);
5082 NDR_PULL_SET_MEM_CTX(ndr, *r->out.server_fullname, 0);
5083 NDR_CHECK(ndr_pull_array_size(ndr, r->out.server_fullname));
5084 NDR_CHECK(ndr_pull_array_length(ndr, r->out.server_fullname));
5085 if (ndr_get_array_length(ndr, r->out.server_fullname) > ndr_get_array_size(ndr, r->out.server_fullname)) {
5086 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));
5088 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.server_fullname), sizeof(uint16_t)));
5089 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));
5090 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_1, 0);
5092 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_0, LIBNDR_FLAG_REF_ALLOC);
5093 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5094 NDR_PULL_ALLOC(ndr, r->out.is_root);
5096 _mem_save_is_root_0 = NDR_PULL_GET_MEM_CTX(ndr);
5097 NDR_PULL_SET_MEM_CTX(ndr, r->out.is_root, LIBNDR_FLAG_REF_ALLOC);
5098 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->out.is_root));
5099 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_is_root_0, LIBNDR_FLAG_REF_ALLOC);
5100 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5101 NDR_PULL_ALLOC(ndr, r->out.ttl);
5103 _mem_save_ttl_0 = NDR_PULL_GET_MEM_CTX(ndr);
5104 NDR_PULL_SET_MEM_CTX(ndr, r->out.ttl, LIBNDR_FLAG_REF_ALLOC);
5105 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.ttl));
5106 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ttl_0, LIBNDR_FLAG_REF_ALLOC);
5107 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5109 return NDR_ERR_SUCCESS;
5112 _PUBLIC_ void ndr_print_dfs_GetDcAddress(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetDcAddress *r)
5114 ndr_print_struct(ndr, name, "dfs_GetDcAddress");
5115 ndr->depth++;
5116 if (flags & NDR_SET_VALUES) {
5117 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5119 if (flags & NDR_IN) {
5120 ndr_print_struct(ndr, "in", "dfs_GetDcAddress");
5121 ndr->depth++;
5122 ndr_print_string(ndr, "servername", r->in.servername);
5123 ndr_print_ptr(ndr, "server_fullname", r->in.server_fullname);
5124 ndr->depth++;
5125 ndr_print_ptr(ndr, "server_fullname", *r->in.server_fullname);
5126 ndr->depth++;
5127 if (*r->in.server_fullname) {
5128 ndr_print_string(ndr, "server_fullname", *r->in.server_fullname);
5130 ndr->depth--;
5131 ndr->depth--;
5132 ndr_print_ptr(ndr, "is_root", r->in.is_root);
5133 ndr->depth++;
5134 ndr_print_uint8(ndr, "is_root", *r->in.is_root);
5135 ndr->depth--;
5136 ndr_print_ptr(ndr, "ttl", r->in.ttl);
5137 ndr->depth++;
5138 ndr_print_uint32(ndr, "ttl", *r->in.ttl);
5139 ndr->depth--;
5140 ndr->depth--;
5142 if (flags & NDR_OUT) {
5143 ndr_print_struct(ndr, "out", "dfs_GetDcAddress");
5144 ndr->depth++;
5145 ndr_print_ptr(ndr, "server_fullname", r->out.server_fullname);
5146 ndr->depth++;
5147 ndr_print_ptr(ndr, "server_fullname", *r->out.server_fullname);
5148 ndr->depth++;
5149 if (*r->out.server_fullname) {
5150 ndr_print_string(ndr, "server_fullname", *r->out.server_fullname);
5152 ndr->depth--;
5153 ndr->depth--;
5154 ndr_print_ptr(ndr, "is_root", r->out.is_root);
5155 ndr->depth++;
5156 ndr_print_uint8(ndr, "is_root", *r->out.is_root);
5157 ndr->depth--;
5158 ndr_print_ptr(ndr, "ttl", r->out.ttl);
5159 ndr->depth++;
5160 ndr_print_uint32(ndr, "ttl", *r->out.ttl);
5161 ndr->depth--;
5162 ndr_print_WERROR(ndr, "result", r->out.result);
5163 ndr->depth--;
5165 ndr->depth--;
5168 static enum ndr_err_code ndr_push_dfs_SetDcAddress(struct ndr_push *ndr, int flags, const struct dfs_SetDcAddress *r)
5170 if (flags & NDR_IN) {
5171 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
5172 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5173 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
5174 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5175 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_fullname, CH_UTF16)));
5176 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5177 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_fullname, CH_UTF16)));
5178 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));
5179 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
5180 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.ttl));
5182 if (flags & NDR_OUT) {
5183 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5185 return NDR_ERR_SUCCESS;
5188 static enum ndr_err_code ndr_pull_dfs_SetDcAddress(struct ndr_pull *ndr, int flags, struct dfs_SetDcAddress *r)
5190 if (flags & NDR_IN) {
5191 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
5192 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
5193 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
5194 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));
5196 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
5197 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
5198 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_fullname));
5199 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_fullname));
5200 if (ndr_get_array_length(ndr, &r->in.server_fullname) > ndr_get_array_size(ndr, &r->in.server_fullname)) {
5201 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));
5203 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_fullname), sizeof(uint16_t)));
5204 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));
5205 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
5206 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.ttl));
5208 if (flags & NDR_OUT) {
5209 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5211 return NDR_ERR_SUCCESS;
5214 _PUBLIC_ void ndr_print_dfs_SetDcAddress(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetDcAddress *r)
5216 ndr_print_struct(ndr, name, "dfs_SetDcAddress");
5217 ndr->depth++;
5218 if (flags & NDR_SET_VALUES) {
5219 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5221 if (flags & NDR_IN) {
5222 ndr_print_struct(ndr, "in", "dfs_SetDcAddress");
5223 ndr->depth++;
5224 ndr_print_string(ndr, "servername", r->in.servername);
5225 ndr_print_string(ndr, "server_fullname", r->in.server_fullname);
5226 ndr_print_uint32(ndr, "flags", r->in.flags);
5227 ndr_print_uint32(ndr, "ttl", r->in.ttl);
5228 ndr->depth--;
5230 if (flags & NDR_OUT) {
5231 ndr_print_struct(ndr, "out", "dfs_SetDcAddress");
5232 ndr->depth++;
5233 ndr_print_WERROR(ndr, "result", r->out.result);
5234 ndr->depth--;
5236 ndr->depth--;
5239 static enum ndr_err_code ndr_push_dfs_FlushFtTable(struct ndr_push *ndr, int flags, const struct dfs_FlushFtTable *r)
5241 if (flags & NDR_IN) {
5242 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
5243 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5244 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
5245 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5246 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
5247 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5248 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
5249 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5251 if (flags & NDR_OUT) {
5252 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5254 return NDR_ERR_SUCCESS;
5257 static enum ndr_err_code ndr_pull_dfs_FlushFtTable(struct ndr_pull *ndr, int flags, struct dfs_FlushFtTable *r)
5259 if (flags & NDR_IN) {
5260 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
5261 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
5262 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
5263 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));
5265 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
5266 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
5267 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
5268 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
5269 if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) {
5270 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));
5272 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t)));
5273 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16));
5275 if (flags & NDR_OUT) {
5276 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5278 return NDR_ERR_SUCCESS;
5281 _PUBLIC_ void ndr_print_dfs_FlushFtTable(struct ndr_print *ndr, const char *name, int flags, const struct dfs_FlushFtTable *r)
5283 ndr_print_struct(ndr, name, "dfs_FlushFtTable");
5284 ndr->depth++;
5285 if (flags & NDR_SET_VALUES) {
5286 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5288 if (flags & NDR_IN) {
5289 ndr_print_struct(ndr, "in", "dfs_FlushFtTable");
5290 ndr->depth++;
5291 ndr_print_string(ndr, "servername", r->in.servername);
5292 ndr_print_string(ndr, "rootshare", r->in.rootshare);
5293 ndr->depth--;
5295 if (flags & NDR_OUT) {
5296 ndr_print_struct(ndr, "out", "dfs_FlushFtTable");
5297 ndr->depth++;
5298 ndr_print_WERROR(ndr, "result", r->out.result);
5299 ndr->depth--;
5301 ndr->depth--;
5304 static enum ndr_err_code ndr_push_dfs_Add2(struct ndr_push *ndr, int flags, const struct dfs_Add2 *r)
5306 if (flags & NDR_IN) {
5308 if (flags & NDR_OUT) {
5309 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5311 return NDR_ERR_SUCCESS;
5314 static enum ndr_err_code ndr_pull_dfs_Add2(struct ndr_pull *ndr, int flags, struct dfs_Add2 *r)
5316 if (flags & NDR_IN) {
5318 if (flags & NDR_OUT) {
5319 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5321 return NDR_ERR_SUCCESS;
5324 _PUBLIC_ void ndr_print_dfs_Add2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Add2 *r)
5326 ndr_print_struct(ndr, name, "dfs_Add2");
5327 ndr->depth++;
5328 if (flags & NDR_SET_VALUES) {
5329 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5331 if (flags & NDR_IN) {
5332 ndr_print_struct(ndr, "in", "dfs_Add2");
5333 ndr->depth++;
5334 ndr->depth--;
5336 if (flags & NDR_OUT) {
5337 ndr_print_struct(ndr, "out", "dfs_Add2");
5338 ndr->depth++;
5339 ndr_print_WERROR(ndr, "result", r->out.result);
5340 ndr->depth--;
5342 ndr->depth--;
5345 static enum ndr_err_code ndr_push_dfs_Remove2(struct ndr_push *ndr, int flags, const struct dfs_Remove2 *r)
5347 if (flags & NDR_IN) {
5349 if (flags & NDR_OUT) {
5350 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5352 return NDR_ERR_SUCCESS;
5355 static enum ndr_err_code ndr_pull_dfs_Remove2(struct ndr_pull *ndr, int flags, struct dfs_Remove2 *r)
5357 if (flags & NDR_IN) {
5359 if (flags & NDR_OUT) {
5360 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5362 return NDR_ERR_SUCCESS;
5365 _PUBLIC_ void ndr_print_dfs_Remove2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Remove2 *r)
5367 ndr_print_struct(ndr, name, "dfs_Remove2");
5368 ndr->depth++;
5369 if (flags & NDR_SET_VALUES) {
5370 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5372 if (flags & NDR_IN) {
5373 ndr_print_struct(ndr, "in", "dfs_Remove2");
5374 ndr->depth++;
5375 ndr->depth--;
5377 if (flags & NDR_OUT) {
5378 ndr_print_struct(ndr, "out", "dfs_Remove2");
5379 ndr->depth++;
5380 ndr_print_WERROR(ndr, "result", r->out.result);
5381 ndr->depth--;
5383 ndr->depth--;
5386 _PUBLIC_ enum ndr_err_code ndr_push_dfs_EnumEx(struct ndr_push *ndr, int flags, const struct dfs_EnumEx *r)
5388 if (flags & NDR_IN) {
5389 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_name, CH_UTF16)));
5390 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5391 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_name, CH_UTF16)));
5392 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));
5393 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
5394 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bufsize));
5395 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info));
5396 if (r->in.info) {
5397 NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
5399 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.total));
5400 if (r->in.total) {
5401 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.total));
5404 if (flags & NDR_OUT) {
5405 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
5406 if (r->out.info) {
5407 NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
5409 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.total));
5410 if (r->out.total) {
5411 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.total));
5413 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5415 return NDR_ERR_SUCCESS;
5418 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_EnumEx(struct ndr_pull *ndr, int flags, struct dfs_EnumEx *r)
5420 uint32_t _ptr_info;
5421 uint32_t _ptr_total;
5422 TALLOC_CTX *_mem_save_info_0;
5423 TALLOC_CTX *_mem_save_total_0;
5424 if (flags & NDR_IN) {
5425 ZERO_STRUCT(r->out);
5427 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_name));
5428 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_name));
5429 if (ndr_get_array_length(ndr, &r->in.dfs_name) > ndr_get_array_size(ndr, &r->in.dfs_name)) {
5430 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));
5432 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfs_name), sizeof(uint16_t)));
5433 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));
5434 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
5435 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bufsize));
5436 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
5437 if (_ptr_info) {
5438 NDR_PULL_ALLOC(ndr, r->in.info);
5439 } else {
5440 r->in.info = NULL;
5442 if (r->in.info) {
5443 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
5444 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0);
5445 NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
5446 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
5448 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total));
5449 if (_ptr_total) {
5450 NDR_PULL_ALLOC(ndr, r->in.total);
5451 } else {
5452 r->in.total = NULL;
5454 if (r->in.total) {
5455 _mem_save_total_0 = NDR_PULL_GET_MEM_CTX(ndr);
5456 NDR_PULL_SET_MEM_CTX(ndr, r->in.total, 0);
5457 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.total));
5458 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_0, 0);
5461 if (flags & NDR_OUT) {
5462 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
5463 if (_ptr_info) {
5464 NDR_PULL_ALLOC(ndr, r->out.info);
5465 } else {
5466 r->out.info = NULL;
5468 if (r->out.info) {
5469 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
5470 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
5471 NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
5472 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
5474 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total));
5475 if (_ptr_total) {
5476 NDR_PULL_ALLOC(ndr, r->out.total);
5477 } else {
5478 r->out.total = NULL;
5480 if (r->out.total) {
5481 _mem_save_total_0 = NDR_PULL_GET_MEM_CTX(ndr);
5482 NDR_PULL_SET_MEM_CTX(ndr, r->out.total, 0);
5483 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.total));
5484 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_0, 0);
5486 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5488 return NDR_ERR_SUCCESS;
5491 _PUBLIC_ void ndr_print_dfs_EnumEx(struct ndr_print *ndr, const char *name, int flags, const struct dfs_EnumEx *r)
5493 ndr_print_struct(ndr, name, "dfs_EnumEx");
5494 ndr->depth++;
5495 if (flags & NDR_SET_VALUES) {
5496 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5498 if (flags & NDR_IN) {
5499 ndr_print_struct(ndr, "in", "dfs_EnumEx");
5500 ndr->depth++;
5501 ndr_print_string(ndr, "dfs_name", r->in.dfs_name);
5502 ndr_print_uint32(ndr, "level", r->in.level);
5503 ndr_print_uint32(ndr, "bufsize", r->in.bufsize);
5504 ndr_print_ptr(ndr, "info", r->in.info);
5505 ndr->depth++;
5506 if (r->in.info) {
5507 ndr_print_dfs_EnumStruct(ndr, "info", r->in.info);
5509 ndr->depth--;
5510 ndr_print_ptr(ndr, "total", r->in.total);
5511 ndr->depth++;
5512 if (r->in.total) {
5513 ndr_print_uint32(ndr, "total", *r->in.total);
5515 ndr->depth--;
5516 ndr->depth--;
5518 if (flags & NDR_OUT) {
5519 ndr_print_struct(ndr, "out", "dfs_EnumEx");
5520 ndr->depth++;
5521 ndr_print_ptr(ndr, "info", r->out.info);
5522 ndr->depth++;
5523 if (r->out.info) {
5524 ndr_print_dfs_EnumStruct(ndr, "info", r->out.info);
5526 ndr->depth--;
5527 ndr_print_ptr(ndr, "total", r->out.total);
5528 ndr->depth++;
5529 if (r->out.total) {
5530 ndr_print_uint32(ndr, "total", *r->out.total);
5532 ndr->depth--;
5533 ndr_print_WERROR(ndr, "result", r->out.result);
5534 ndr->depth--;
5536 ndr->depth--;
5539 static enum ndr_err_code ndr_push_dfs_SetInfo2(struct ndr_push *ndr, int flags, const struct dfs_SetInfo2 *r)
5541 if (flags & NDR_IN) {
5543 if (flags & NDR_OUT) {
5544 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5546 return NDR_ERR_SUCCESS;
5549 static enum ndr_err_code ndr_pull_dfs_SetInfo2(struct ndr_pull *ndr, int flags, struct dfs_SetInfo2 *r)
5551 if (flags & NDR_IN) {
5553 if (flags & NDR_OUT) {
5554 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5556 return NDR_ERR_SUCCESS;
5559 _PUBLIC_ void ndr_print_dfs_SetInfo2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetInfo2 *r)
5561 ndr_print_struct(ndr, name, "dfs_SetInfo2");
5562 ndr->depth++;
5563 if (flags & NDR_SET_VALUES) {
5564 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5566 if (flags & NDR_IN) {
5567 ndr_print_struct(ndr, "in", "dfs_SetInfo2");
5568 ndr->depth++;
5569 ndr->depth--;
5571 if (flags & NDR_OUT) {
5572 ndr_print_struct(ndr, "out", "dfs_SetInfo2");
5573 ndr->depth++;
5574 ndr_print_WERROR(ndr, "result", r->out.result);
5575 ndr->depth--;
5577 ndr->depth--;
5580 static const struct ndr_interface_call netdfs_calls[] = {
5582 "dfs_GetManagerVersion",
5583 sizeof(struct dfs_GetManagerVersion),
5584 (ndr_push_flags_fn_t) ndr_push_dfs_GetManagerVersion,
5585 (ndr_pull_flags_fn_t) ndr_pull_dfs_GetManagerVersion,
5586 (ndr_print_function_t) ndr_print_dfs_GetManagerVersion,
5587 false,
5590 "dfs_Add",
5591 sizeof(struct dfs_Add),
5592 (ndr_push_flags_fn_t) ndr_push_dfs_Add,
5593 (ndr_pull_flags_fn_t) ndr_pull_dfs_Add,
5594 (ndr_print_function_t) ndr_print_dfs_Add,
5595 false,
5598 "dfs_Remove",
5599 sizeof(struct dfs_Remove),
5600 (ndr_push_flags_fn_t) ndr_push_dfs_Remove,
5601 (ndr_pull_flags_fn_t) ndr_pull_dfs_Remove,
5602 (ndr_print_function_t) ndr_print_dfs_Remove,
5603 false,
5606 "dfs_SetInfo",
5607 sizeof(struct dfs_SetInfo),
5608 (ndr_push_flags_fn_t) ndr_push_dfs_SetInfo,
5609 (ndr_pull_flags_fn_t) ndr_pull_dfs_SetInfo,
5610 (ndr_print_function_t) ndr_print_dfs_SetInfo,
5611 false,
5614 "dfs_GetInfo",
5615 sizeof(struct dfs_GetInfo),
5616 (ndr_push_flags_fn_t) ndr_push_dfs_GetInfo,
5617 (ndr_pull_flags_fn_t) ndr_pull_dfs_GetInfo,
5618 (ndr_print_function_t) ndr_print_dfs_GetInfo,
5619 false,
5622 "dfs_Enum",
5623 sizeof(struct dfs_Enum),
5624 (ndr_push_flags_fn_t) ndr_push_dfs_Enum,
5625 (ndr_pull_flags_fn_t) ndr_pull_dfs_Enum,
5626 (ndr_print_function_t) ndr_print_dfs_Enum,
5627 false,
5630 "dfs_Rename",
5631 sizeof(struct dfs_Rename),
5632 (ndr_push_flags_fn_t) ndr_push_dfs_Rename,
5633 (ndr_pull_flags_fn_t) ndr_pull_dfs_Rename,
5634 (ndr_print_function_t) ndr_print_dfs_Rename,
5635 false,
5638 "dfs_Move",
5639 sizeof(struct dfs_Move),
5640 (ndr_push_flags_fn_t) ndr_push_dfs_Move,
5641 (ndr_pull_flags_fn_t) ndr_pull_dfs_Move,
5642 (ndr_print_function_t) ndr_print_dfs_Move,
5643 false,
5646 "dfs_ManagerGetConfigInfo",
5647 sizeof(struct dfs_ManagerGetConfigInfo),
5648 (ndr_push_flags_fn_t) ndr_push_dfs_ManagerGetConfigInfo,
5649 (ndr_pull_flags_fn_t) ndr_pull_dfs_ManagerGetConfigInfo,
5650 (ndr_print_function_t) ndr_print_dfs_ManagerGetConfigInfo,
5651 false,
5654 "dfs_ManagerSendSiteInfo",
5655 sizeof(struct dfs_ManagerSendSiteInfo),
5656 (ndr_push_flags_fn_t) ndr_push_dfs_ManagerSendSiteInfo,
5657 (ndr_pull_flags_fn_t) ndr_pull_dfs_ManagerSendSiteInfo,
5658 (ndr_print_function_t) ndr_print_dfs_ManagerSendSiteInfo,
5659 false,
5662 "dfs_AddFtRoot",
5663 sizeof(struct dfs_AddFtRoot),
5664 (ndr_push_flags_fn_t) ndr_push_dfs_AddFtRoot,
5665 (ndr_pull_flags_fn_t) ndr_pull_dfs_AddFtRoot,
5666 (ndr_print_function_t) ndr_print_dfs_AddFtRoot,
5667 false,
5670 "dfs_RemoveFtRoot",
5671 sizeof(struct dfs_RemoveFtRoot),
5672 (ndr_push_flags_fn_t) ndr_push_dfs_RemoveFtRoot,
5673 (ndr_pull_flags_fn_t) ndr_pull_dfs_RemoveFtRoot,
5674 (ndr_print_function_t) ndr_print_dfs_RemoveFtRoot,
5675 false,
5678 "dfs_AddStdRoot",
5679 sizeof(struct dfs_AddStdRoot),
5680 (ndr_push_flags_fn_t) ndr_push_dfs_AddStdRoot,
5681 (ndr_pull_flags_fn_t) ndr_pull_dfs_AddStdRoot,
5682 (ndr_print_function_t) ndr_print_dfs_AddStdRoot,
5683 false,
5686 "dfs_RemoveStdRoot",
5687 sizeof(struct dfs_RemoveStdRoot),
5688 (ndr_push_flags_fn_t) ndr_push_dfs_RemoveStdRoot,
5689 (ndr_pull_flags_fn_t) ndr_pull_dfs_RemoveStdRoot,
5690 (ndr_print_function_t) ndr_print_dfs_RemoveStdRoot,
5691 false,
5694 "dfs_ManagerInitialize",
5695 sizeof(struct dfs_ManagerInitialize),
5696 (ndr_push_flags_fn_t) ndr_push_dfs_ManagerInitialize,
5697 (ndr_pull_flags_fn_t) ndr_pull_dfs_ManagerInitialize,
5698 (ndr_print_function_t) ndr_print_dfs_ManagerInitialize,
5699 false,
5702 "dfs_AddStdRootForced",
5703 sizeof(struct dfs_AddStdRootForced),
5704 (ndr_push_flags_fn_t) ndr_push_dfs_AddStdRootForced,
5705 (ndr_pull_flags_fn_t) ndr_pull_dfs_AddStdRootForced,
5706 (ndr_print_function_t) ndr_print_dfs_AddStdRootForced,
5707 false,
5710 "dfs_GetDcAddress",
5711 sizeof(struct dfs_GetDcAddress),
5712 (ndr_push_flags_fn_t) ndr_push_dfs_GetDcAddress,
5713 (ndr_pull_flags_fn_t) ndr_pull_dfs_GetDcAddress,
5714 (ndr_print_function_t) ndr_print_dfs_GetDcAddress,
5715 false,
5718 "dfs_SetDcAddress",
5719 sizeof(struct dfs_SetDcAddress),
5720 (ndr_push_flags_fn_t) ndr_push_dfs_SetDcAddress,
5721 (ndr_pull_flags_fn_t) ndr_pull_dfs_SetDcAddress,
5722 (ndr_print_function_t) ndr_print_dfs_SetDcAddress,
5723 false,
5726 "dfs_FlushFtTable",
5727 sizeof(struct dfs_FlushFtTable),
5728 (ndr_push_flags_fn_t) ndr_push_dfs_FlushFtTable,
5729 (ndr_pull_flags_fn_t) ndr_pull_dfs_FlushFtTable,
5730 (ndr_print_function_t) ndr_print_dfs_FlushFtTable,
5731 false,
5734 "dfs_Add2",
5735 sizeof(struct dfs_Add2),
5736 (ndr_push_flags_fn_t) ndr_push_dfs_Add2,
5737 (ndr_pull_flags_fn_t) ndr_pull_dfs_Add2,
5738 (ndr_print_function_t) ndr_print_dfs_Add2,
5739 false,
5742 "dfs_Remove2",
5743 sizeof(struct dfs_Remove2),
5744 (ndr_push_flags_fn_t) ndr_push_dfs_Remove2,
5745 (ndr_pull_flags_fn_t) ndr_pull_dfs_Remove2,
5746 (ndr_print_function_t) ndr_print_dfs_Remove2,
5747 false,
5750 "dfs_EnumEx",
5751 sizeof(struct dfs_EnumEx),
5752 (ndr_push_flags_fn_t) ndr_push_dfs_EnumEx,
5753 (ndr_pull_flags_fn_t) ndr_pull_dfs_EnumEx,
5754 (ndr_print_function_t) ndr_print_dfs_EnumEx,
5755 false,
5758 "dfs_SetInfo2",
5759 sizeof(struct dfs_SetInfo2),
5760 (ndr_push_flags_fn_t) ndr_push_dfs_SetInfo2,
5761 (ndr_pull_flags_fn_t) ndr_pull_dfs_SetInfo2,
5762 (ndr_print_function_t) ndr_print_dfs_SetInfo2,
5763 false,
5765 { NULL, 0, NULL, NULL, NULL, false }
5768 static const char * const netdfs_endpoint_strings[] = {
5769 "ncacn_np:[\\pipe\\netdfs]",
5770 "ncacn_ip_tcp:",
5771 "ncalrpc:",
5774 static const struct ndr_interface_string_array netdfs_endpoints = {
5775 .count = 3,
5776 .names = netdfs_endpoint_strings
5779 static const char * const netdfs_authservice_strings[] = {
5780 "host",
5783 static const struct ndr_interface_string_array netdfs_authservices = {
5784 .count = 1,
5785 .names = netdfs_authservice_strings
5789 const struct ndr_interface_table ndr_table_netdfs = {
5790 .name = "netdfs",
5791 .syntax_id = {
5792 {0x4fc742e0,0x4a10,0x11cf,{0x82,0x73},{0x00,0xaa,0x00,0x4a,0xe6,0x73}},
5793 NDR_NETDFS_VERSION
5795 .helpstring = NDR_NETDFS_HELPSTRING,
5796 .num_calls = 23,
5797 .calls = netdfs_calls,
5798 .endpoints = &netdfs_endpoints,
5799 .authservices = &netdfs_authservices