s3: re-run make idl.
[Samba.git] / source / librpc / gen_ndr / ndr_dfs.c
blob05f6fcc0ed5dec17c284efa716d396cfb2a2d088
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;
28 case DFS_MANAGER_VERSION_W2K8: val = "DFS_MANAGER_VERSION_W2K8"; break;
30 ndr_print_enum(ndr, name, "ENUM", val, r);
33 static enum ndr_err_code ndr_push_dfs_Info0(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info0 *r)
35 if (ndr_flags & NDR_SCALARS) {
36 NDR_CHECK(ndr_push_align(ndr, 1));
38 if (ndr_flags & NDR_BUFFERS) {
40 return NDR_ERR_SUCCESS;
43 static enum ndr_err_code ndr_pull_dfs_Info0(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info0 *r)
45 if (ndr_flags & NDR_SCALARS) {
46 NDR_CHECK(ndr_pull_align(ndr, 1));
48 if (ndr_flags & NDR_BUFFERS) {
50 return NDR_ERR_SUCCESS;
53 _PUBLIC_ void ndr_print_dfs_Info0(struct ndr_print *ndr, const char *name, const struct dfs_Info0 *r)
55 ndr_print_struct(ndr, name, "dfs_Info0");
56 ndr->depth++;
57 ndr->depth--;
60 static enum ndr_err_code ndr_push_dfs_Info1(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info1 *r)
62 if (ndr_flags & NDR_SCALARS) {
63 NDR_CHECK(ndr_push_align(ndr, 4));
64 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
66 if (ndr_flags & NDR_BUFFERS) {
67 if (r->path) {
68 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
69 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
70 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
71 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
74 return NDR_ERR_SUCCESS;
77 static enum ndr_err_code ndr_pull_dfs_Info1(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info1 *r)
79 uint32_t _ptr_path;
80 TALLOC_CTX *_mem_save_path_0;
81 if (ndr_flags & NDR_SCALARS) {
82 NDR_CHECK(ndr_pull_align(ndr, 4));
83 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
84 if (_ptr_path) {
85 NDR_PULL_ALLOC(ndr, r->path);
86 } else {
87 r->path = NULL;
90 if (ndr_flags & NDR_BUFFERS) {
91 if (r->path) {
92 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
93 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
94 NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
95 NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
96 if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) {
97 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));
99 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t)));
100 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16));
101 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
104 return NDR_ERR_SUCCESS;
107 _PUBLIC_ void ndr_print_dfs_Info1(struct ndr_print *ndr, const char *name, const struct dfs_Info1 *r)
109 ndr_print_struct(ndr, name, "dfs_Info1");
110 ndr->depth++;
111 ndr_print_ptr(ndr, "path", r->path);
112 ndr->depth++;
113 if (r->path) {
114 ndr_print_string(ndr, "path", r->path);
116 ndr->depth--;
117 ndr->depth--;
120 _PUBLIC_ enum ndr_err_code ndr_push_dfs_VolumeState(struct ndr_push *ndr, int ndr_flags, uint32_t r)
122 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
123 return NDR_ERR_SUCCESS;
126 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_VolumeState(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
128 uint32_t v;
129 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
130 *r = v;
131 return NDR_ERR_SUCCESS;
134 _PUBLIC_ void ndr_print_dfs_VolumeState(struct ndr_print *ndr, const char *name, uint32_t r)
136 ndr_print_uint32(ndr, name, r);
137 ndr->depth++;
138 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_OK", DFS_VOLUME_STATE_OK, r);
139 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_INCONSISTENT", DFS_VOLUME_STATE_INCONSISTENT, r);
140 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_OFFLINE", DFS_VOLUME_STATE_OFFLINE, r);
141 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_ONLINE", DFS_VOLUME_STATE_ONLINE, r);
142 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_STANDALONE", DFS_VOLUME_STATE_STANDALONE, r);
143 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_VOLUME_STATE_AD_BLOB", DFS_VOLUME_STATE_AD_BLOB, r);
144 ndr->depth--;
147 static enum ndr_err_code ndr_push_dfs_Info2(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info2 *r)
149 if (ndr_flags & NDR_SCALARS) {
150 NDR_CHECK(ndr_push_align(ndr, 4));
151 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
152 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
153 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
154 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
156 if (ndr_flags & NDR_BUFFERS) {
157 if (r->path) {
158 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
159 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
160 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
161 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
163 if (r->comment) {
164 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
165 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
166 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
167 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
170 return NDR_ERR_SUCCESS;
173 static enum ndr_err_code ndr_pull_dfs_Info2(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info2 *r)
175 uint32_t _ptr_path;
176 TALLOC_CTX *_mem_save_path_0;
177 uint32_t _ptr_comment;
178 TALLOC_CTX *_mem_save_comment_0;
179 if (ndr_flags & NDR_SCALARS) {
180 NDR_CHECK(ndr_pull_align(ndr, 4));
181 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
182 if (_ptr_path) {
183 NDR_PULL_ALLOC(ndr, r->path);
184 } else {
185 r->path = NULL;
187 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
188 if (_ptr_comment) {
189 NDR_PULL_ALLOC(ndr, r->comment);
190 } else {
191 r->comment = NULL;
193 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
194 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores));
196 if (ndr_flags & NDR_BUFFERS) {
197 if (r->path) {
198 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
199 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
200 NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
201 NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
202 if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) {
203 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));
205 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t)));
206 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16));
207 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
209 if (r->comment) {
210 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
211 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
212 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
213 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
214 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
215 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));
217 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
218 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
219 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
222 return NDR_ERR_SUCCESS;
225 _PUBLIC_ void ndr_print_dfs_Info2(struct ndr_print *ndr, const char *name, const struct dfs_Info2 *r)
227 ndr_print_struct(ndr, name, "dfs_Info2");
228 ndr->depth++;
229 ndr_print_ptr(ndr, "path", r->path);
230 ndr->depth++;
231 if (r->path) {
232 ndr_print_string(ndr, "path", r->path);
234 ndr->depth--;
235 ndr_print_ptr(ndr, "comment", r->comment);
236 ndr->depth++;
237 if (r->comment) {
238 ndr_print_string(ndr, "comment", r->comment);
240 ndr->depth--;
241 ndr_print_dfs_VolumeState(ndr, "state", r->state);
242 ndr_print_uint32(ndr, "num_stores", r->num_stores);
243 ndr->depth--;
246 _PUBLIC_ enum ndr_err_code ndr_push_dfs_StorageState(struct ndr_push *ndr, int ndr_flags, uint32_t r)
248 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
249 return NDR_ERR_SUCCESS;
252 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_StorageState(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
254 uint32_t v;
255 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
256 *r = v;
257 return NDR_ERR_SUCCESS;
260 _PUBLIC_ void ndr_print_dfs_StorageState(struct ndr_print *ndr, const char *name, uint32_t r)
262 ndr_print_uint32(ndr, name, r);
263 ndr->depth++;
264 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_STORAGE_STATE_OFFLINE", DFS_STORAGE_STATE_OFFLINE, r);
265 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_STORAGE_STATE_ONLINE", DFS_STORAGE_STATE_ONLINE, r);
266 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_STORAGE_STATE_ACTIVE", DFS_STORAGE_STATE_ACTIVE, r);
267 ndr->depth--;
270 static enum ndr_err_code ndr_push_dfs_StorageInfo(struct ndr_push *ndr, int ndr_flags, const struct dfs_StorageInfo *r)
272 if (ndr_flags & NDR_SCALARS) {
273 NDR_CHECK(ndr_push_align(ndr, 4));
274 NDR_CHECK(ndr_push_dfs_StorageState(ndr, NDR_SCALARS, r->state));
275 NDR_CHECK(ndr_push_unique_ptr(ndr, r->server));
276 NDR_CHECK(ndr_push_unique_ptr(ndr, r->share));
278 if (ndr_flags & NDR_BUFFERS) {
279 if (r->server) {
280 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->server, CH_UTF16)));
281 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
282 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->server, CH_UTF16)));
283 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->server, ndr_charset_length(r->server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
285 if (r->share) {
286 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->share, CH_UTF16)));
287 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
288 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->share, CH_UTF16)));
289 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->share, ndr_charset_length(r->share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
292 return NDR_ERR_SUCCESS;
295 static enum ndr_err_code ndr_pull_dfs_StorageInfo(struct ndr_pull *ndr, int ndr_flags, struct dfs_StorageInfo *r)
297 uint32_t _ptr_server;
298 TALLOC_CTX *_mem_save_server_0;
299 uint32_t _ptr_share;
300 TALLOC_CTX *_mem_save_share_0;
301 if (ndr_flags & NDR_SCALARS) {
302 NDR_CHECK(ndr_pull_align(ndr, 4));
303 NDR_CHECK(ndr_pull_dfs_StorageState(ndr, NDR_SCALARS, &r->state));
304 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server));
305 if (_ptr_server) {
306 NDR_PULL_ALLOC(ndr, r->server);
307 } else {
308 r->server = NULL;
310 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share));
311 if (_ptr_share) {
312 NDR_PULL_ALLOC(ndr, r->share);
313 } else {
314 r->share = NULL;
317 if (ndr_flags & NDR_BUFFERS) {
318 if (r->server) {
319 _mem_save_server_0 = NDR_PULL_GET_MEM_CTX(ndr);
320 NDR_PULL_SET_MEM_CTX(ndr, r->server, 0);
321 NDR_CHECK(ndr_pull_array_size(ndr, &r->server));
322 NDR_CHECK(ndr_pull_array_length(ndr, &r->server));
323 if (ndr_get_array_length(ndr, &r->server) > ndr_get_array_size(ndr, &r->server)) {
324 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));
326 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->server), sizeof(uint16_t)));
327 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->server, ndr_get_array_length(ndr, &r->server), sizeof(uint16_t), CH_UTF16));
328 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_0, 0);
330 if (r->share) {
331 _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr);
332 NDR_PULL_SET_MEM_CTX(ndr, r->share, 0);
333 NDR_CHECK(ndr_pull_array_size(ndr, &r->share));
334 NDR_CHECK(ndr_pull_array_length(ndr, &r->share));
335 if (ndr_get_array_length(ndr, &r->share) > ndr_get_array_size(ndr, &r->share)) {
336 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));
338 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->share), sizeof(uint16_t)));
339 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->share, ndr_get_array_length(ndr, &r->share), sizeof(uint16_t), CH_UTF16));
340 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0);
343 return NDR_ERR_SUCCESS;
346 _PUBLIC_ void ndr_print_dfs_StorageInfo(struct ndr_print *ndr, const char *name, const struct dfs_StorageInfo *r)
348 ndr_print_struct(ndr, name, "dfs_StorageInfo");
349 ndr->depth++;
350 ndr_print_dfs_StorageState(ndr, "state", r->state);
351 ndr_print_ptr(ndr, "server", r->server);
352 ndr->depth++;
353 if (r->server) {
354 ndr_print_string(ndr, "server", r->server);
356 ndr->depth--;
357 ndr_print_ptr(ndr, "share", r->share);
358 ndr->depth++;
359 if (r->share) {
360 ndr_print_string(ndr, "share", r->share);
362 ndr->depth--;
363 ndr->depth--;
366 static enum ndr_err_code ndr_push_dfs_Info3(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info3 *r)
368 uint32_t cntr_stores_1;
369 if (ndr_flags & NDR_SCALARS) {
370 NDR_CHECK(ndr_push_align(ndr, 4));
371 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
372 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
373 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
374 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
375 NDR_CHECK(ndr_push_unique_ptr(ndr, r->stores));
377 if (ndr_flags & NDR_BUFFERS) {
378 if (r->path) {
379 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
380 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
381 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
382 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
384 if (r->comment) {
385 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
386 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
387 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
388 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
390 if (r->stores) {
391 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
392 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
393 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
395 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
396 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
400 return NDR_ERR_SUCCESS;
403 static enum ndr_err_code ndr_pull_dfs_Info3(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info3 *r)
405 uint32_t _ptr_path;
406 TALLOC_CTX *_mem_save_path_0;
407 uint32_t _ptr_comment;
408 TALLOC_CTX *_mem_save_comment_0;
409 uint32_t _ptr_stores;
410 uint32_t cntr_stores_1;
411 TALLOC_CTX *_mem_save_stores_0;
412 TALLOC_CTX *_mem_save_stores_1;
413 if (ndr_flags & NDR_SCALARS) {
414 NDR_CHECK(ndr_pull_align(ndr, 4));
415 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
416 if (_ptr_path) {
417 NDR_PULL_ALLOC(ndr, r->path);
418 } else {
419 r->path = NULL;
421 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
422 if (_ptr_comment) {
423 NDR_PULL_ALLOC(ndr, r->comment);
424 } else {
425 r->comment = NULL;
427 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
428 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores));
429 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_stores));
430 if (_ptr_stores) {
431 NDR_PULL_ALLOC(ndr, r->stores);
432 } else {
433 r->stores = NULL;
436 if (ndr_flags & NDR_BUFFERS) {
437 if (r->path) {
438 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
439 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
440 NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
441 NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
442 if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) {
443 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));
445 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t)));
446 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16));
447 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
449 if (r->comment) {
450 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
451 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
452 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
453 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
454 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
455 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));
457 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
458 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
459 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
461 if (r->stores) {
462 _mem_save_stores_0 = NDR_PULL_GET_MEM_CTX(ndr);
463 NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
464 NDR_CHECK(ndr_pull_array_size(ndr, &r->stores));
465 NDR_PULL_ALLOC_N(ndr, r->stores, ndr_get_array_size(ndr, &r->stores));
466 _mem_save_stores_1 = NDR_PULL_GET_MEM_CTX(ndr);
467 NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
468 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
469 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
471 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
472 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
474 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_1, 0);
475 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_0, 0);
477 if (r->stores) {
478 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->stores, r->num_stores));
481 return NDR_ERR_SUCCESS;
484 _PUBLIC_ void ndr_print_dfs_Info3(struct ndr_print *ndr, const char *name, const struct dfs_Info3 *r)
486 uint32_t cntr_stores_1;
487 ndr_print_struct(ndr, name, "dfs_Info3");
488 ndr->depth++;
489 ndr_print_ptr(ndr, "path", r->path);
490 ndr->depth++;
491 if (r->path) {
492 ndr_print_string(ndr, "path", r->path);
494 ndr->depth--;
495 ndr_print_ptr(ndr, "comment", r->comment);
496 ndr->depth++;
497 if (r->comment) {
498 ndr_print_string(ndr, "comment", r->comment);
500 ndr->depth--;
501 ndr_print_dfs_VolumeState(ndr, "state", r->state);
502 ndr_print_uint32(ndr, "num_stores", r->num_stores);
503 ndr_print_ptr(ndr, "stores", r->stores);
504 ndr->depth++;
505 if (r->stores) {
506 ndr->print(ndr, "%s: ARRAY(%d)", "stores", (int)r->num_stores);
507 ndr->depth++;
508 for (cntr_stores_1=0;cntr_stores_1<r->num_stores;cntr_stores_1++) {
509 char *idx_1=NULL;
510 if (asprintf(&idx_1, "[%d]", cntr_stores_1) != -1) {
511 ndr_print_dfs_StorageInfo(ndr, "stores", &r->stores[cntr_stores_1]);
512 free(idx_1);
515 ndr->depth--;
517 ndr->depth--;
518 ndr->depth--;
521 static enum ndr_err_code ndr_push_dfs_Info4(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info4 *r)
523 uint32_t cntr_stores_1;
524 if (ndr_flags & NDR_SCALARS) {
525 NDR_CHECK(ndr_push_align(ndr, 4));
526 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
527 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
528 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
529 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
530 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
531 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
532 NDR_CHECK(ndr_push_unique_ptr(ndr, r->stores));
534 if (ndr_flags & NDR_BUFFERS) {
535 if (r->path) {
536 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
537 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
538 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
539 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
541 if (r->comment) {
542 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
543 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
544 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
545 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
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 if (r->stores) {
621 _mem_save_stores_0 = NDR_PULL_GET_MEM_CTX(ndr);
622 NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
623 NDR_CHECK(ndr_pull_array_size(ndr, &r->stores));
624 NDR_PULL_ALLOC_N(ndr, r->stores, ndr_get_array_size(ndr, &r->stores));
625 _mem_save_stores_1 = NDR_PULL_GET_MEM_CTX(ndr);
626 NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
627 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
628 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
630 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
631 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
633 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_1, 0);
634 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_0, 0);
636 if (r->stores) {
637 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->stores, r->num_stores));
640 return NDR_ERR_SUCCESS;
643 _PUBLIC_ void ndr_print_dfs_Info4(struct ndr_print *ndr, const char *name, const struct dfs_Info4 *r)
645 uint32_t cntr_stores_1;
646 ndr_print_struct(ndr, name, "dfs_Info4");
647 ndr->depth++;
648 ndr_print_ptr(ndr, "path", r->path);
649 ndr->depth++;
650 if (r->path) {
651 ndr_print_string(ndr, "path", r->path);
653 ndr->depth--;
654 ndr_print_ptr(ndr, "comment", r->comment);
655 ndr->depth++;
656 if (r->comment) {
657 ndr_print_string(ndr, "comment", r->comment);
659 ndr->depth--;
660 ndr_print_dfs_VolumeState(ndr, "state", r->state);
661 ndr_print_uint32(ndr, "timeout", r->timeout);
662 ndr_print_GUID(ndr, "guid", &r->guid);
663 ndr_print_uint32(ndr, "num_stores", r->num_stores);
664 ndr_print_ptr(ndr, "stores", r->stores);
665 ndr->depth++;
666 if (r->stores) {
667 ndr->print(ndr, "%s: ARRAY(%d)", "stores", (int)r->num_stores);
668 ndr->depth++;
669 for (cntr_stores_1=0;cntr_stores_1<r->num_stores;cntr_stores_1++) {
670 char *idx_1=NULL;
671 if (asprintf(&idx_1, "[%d]", cntr_stores_1) != -1) {
672 ndr_print_dfs_StorageInfo(ndr, "stores", &r->stores[cntr_stores_1]);
673 free(idx_1);
676 ndr->depth--;
678 ndr->depth--;
679 ndr->depth--;
682 _PUBLIC_ enum ndr_err_code ndr_push_dfs_PropertyFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
684 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
685 return NDR_ERR_SUCCESS;
688 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_PropertyFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
690 uint32_t v;
691 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
692 *r = v;
693 return NDR_ERR_SUCCESS;
696 _PUBLIC_ void ndr_print_dfs_PropertyFlags(struct ndr_print *ndr, const char *name, uint32_t r)
698 ndr_print_uint32(ndr, name, r);
699 ndr->depth++;
700 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_INSITE_REFERRALS", DFS_PROPERTY_FLAG_INSITE_REFERRALS, r);
701 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_ROOT_SCALABILITY", DFS_PROPERTY_FLAG_ROOT_SCALABILITY, r);
702 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_SITE_COSTING", DFS_PROPERTY_FLAG_SITE_COSTING, r);
703 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_TARGET_FAILBACK", DFS_PROPERTY_FLAG_TARGET_FAILBACK, r);
704 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_CLUSTER_ENABLED", DFS_PROPERTY_FLAG_CLUSTER_ENABLED, r);
705 ndr->depth--;
708 static enum ndr_err_code ndr_push_dfs_Info5(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info5 *r)
710 if (ndr_flags & NDR_SCALARS) {
711 NDR_CHECK(ndr_push_align(ndr, 4));
712 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
713 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
714 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
715 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
716 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
717 NDR_CHECK(ndr_push_dfs_PropertyFlags(ndr, NDR_SCALARS, r->flags));
718 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pktsize));
719 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
721 if (ndr_flags & NDR_BUFFERS) {
722 if (r->path) {
723 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
724 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
725 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
726 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
728 if (r->comment) {
729 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
730 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
731 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
732 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
735 return NDR_ERR_SUCCESS;
738 static enum ndr_err_code ndr_pull_dfs_Info5(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info5 *r)
740 uint32_t _ptr_path;
741 TALLOC_CTX *_mem_save_path_0;
742 uint32_t _ptr_comment;
743 TALLOC_CTX *_mem_save_comment_0;
744 if (ndr_flags & NDR_SCALARS) {
745 NDR_CHECK(ndr_pull_align(ndr, 4));
746 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
747 if (_ptr_path) {
748 NDR_PULL_ALLOC(ndr, r->path);
749 } else {
750 r->path = NULL;
752 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
753 if (_ptr_comment) {
754 NDR_PULL_ALLOC(ndr, r->comment);
755 } else {
756 r->comment = NULL;
758 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
759 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
760 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
761 NDR_CHECK(ndr_pull_dfs_PropertyFlags(ndr, NDR_SCALARS, &r->flags));
762 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pktsize));
763 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores));
765 if (ndr_flags & NDR_BUFFERS) {
766 if (r->path) {
767 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
768 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
769 NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
770 NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
771 if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) {
772 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));
774 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t)));
775 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16));
776 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
778 if (r->comment) {
779 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
780 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
781 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
782 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
783 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
784 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));
786 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
787 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
788 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
791 return NDR_ERR_SUCCESS;
794 _PUBLIC_ void ndr_print_dfs_Info5(struct ndr_print *ndr, const char *name, const struct dfs_Info5 *r)
796 ndr_print_struct(ndr, name, "dfs_Info5");
797 ndr->depth++;
798 ndr_print_ptr(ndr, "path", r->path);
799 ndr->depth++;
800 if (r->path) {
801 ndr_print_string(ndr, "path", r->path);
803 ndr->depth--;
804 ndr_print_ptr(ndr, "comment", r->comment);
805 ndr->depth++;
806 if (r->comment) {
807 ndr_print_string(ndr, "comment", r->comment);
809 ndr->depth--;
810 ndr_print_dfs_VolumeState(ndr, "state", r->state);
811 ndr_print_uint32(ndr, "timeout", r->timeout);
812 ndr_print_GUID(ndr, "guid", &r->guid);
813 ndr_print_dfs_PropertyFlags(ndr, "flags", r->flags);
814 ndr_print_uint32(ndr, "pktsize", r->pktsize);
815 ndr_print_uint32(ndr, "num_stores", r->num_stores);
816 ndr->depth--;
819 static enum ndr_err_code ndr_push_dfs_Target_PriorityClass(struct ndr_push *ndr, int ndr_flags, enum dfs_Target_PriorityClass r)
821 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
822 return NDR_ERR_SUCCESS;
825 static enum ndr_err_code ndr_pull_dfs_Target_PriorityClass(struct ndr_pull *ndr, int ndr_flags, enum dfs_Target_PriorityClass *r)
827 uint32_t v;
828 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
829 *r = v;
830 return NDR_ERR_SUCCESS;
833 _PUBLIC_ void ndr_print_dfs_Target_PriorityClass(struct ndr_print *ndr, const char *name, enum dfs_Target_PriorityClass r)
835 const char *val = NULL;
837 switch (r) {
838 case DFS_INVALID_PRIORITY_CLASS: val = "DFS_INVALID_PRIORITY_CLASS"; break;
839 case DFS_SITE_COST_NORMAL_PRIORITY_CLASS: val = "DFS_SITE_COST_NORMAL_PRIORITY_CLASS"; break;
840 case DFS_GLOBAL_HIGH_PRIORITY_CLASS: val = "DFS_GLOBAL_HIGH_PRIORITY_CLASS"; break;
841 case DFS_SITE_COST_HIGH_PRIORITY_CLASS: val = "DFS_SITE_COST_HIGH_PRIORITY_CLASS"; break;
842 case DFS_SITE_COST_LOW_PRIORITY_CLASS: val = "DFS_SITE_COST_LOW_PRIORITY_CLASS"; break;
843 case DFS_GLOBAL_LOW_PRIORITY_CLASS: val = "DFS_GLOBAL_LOW_PRIORITY_CLASS"; break;
845 ndr_print_enum(ndr, name, "ENUM", val, r);
848 static enum ndr_err_code ndr_push_dfs_Target_Priority(struct ndr_push *ndr, int ndr_flags, const struct dfs_Target_Priority *r)
850 if (ndr_flags & NDR_SCALARS) {
851 NDR_CHECK(ndr_push_align(ndr, 4));
852 NDR_CHECK(ndr_push_dfs_Target_PriorityClass(ndr, NDR_SCALARS, r->target_priority_class));
853 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->target_priority_rank));
854 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->reserved));
856 if (ndr_flags & NDR_BUFFERS) {
858 return NDR_ERR_SUCCESS;
861 static enum ndr_err_code ndr_pull_dfs_Target_Priority(struct ndr_pull *ndr, int ndr_flags, struct dfs_Target_Priority *r)
863 if (ndr_flags & NDR_SCALARS) {
864 NDR_CHECK(ndr_pull_align(ndr, 4));
865 NDR_CHECK(ndr_pull_dfs_Target_PriorityClass(ndr, NDR_SCALARS, &r->target_priority_class));
866 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->target_priority_rank));
867 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved));
869 if (ndr_flags & NDR_BUFFERS) {
871 return NDR_ERR_SUCCESS;
874 _PUBLIC_ void ndr_print_dfs_Target_Priority(struct ndr_print *ndr, const char *name, const struct dfs_Target_Priority *r)
876 ndr_print_struct(ndr, name, "dfs_Target_Priority");
877 ndr->depth++;
878 ndr_print_dfs_Target_PriorityClass(ndr, "target_priority_class", r->target_priority_class);
879 ndr_print_uint16(ndr, "target_priority_rank", r->target_priority_rank);
880 ndr_print_uint16(ndr, "reserved", r->reserved);
881 ndr->depth--;
884 static enum ndr_err_code ndr_push_dfs_StorageInfo2(struct ndr_push *ndr, int ndr_flags, const struct dfs_StorageInfo2 *r)
886 if (ndr_flags & NDR_SCALARS) {
887 NDR_CHECK(ndr_push_align(ndr, 4));
888 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_SCALARS, &r->info));
889 NDR_CHECK(ndr_push_dfs_Target_Priority(ndr, NDR_SCALARS, &r->target_priority));
891 if (ndr_flags & NDR_BUFFERS) {
892 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->info));
894 return NDR_ERR_SUCCESS;
897 static enum ndr_err_code ndr_pull_dfs_StorageInfo2(struct ndr_pull *ndr, int ndr_flags, struct dfs_StorageInfo2 *r)
899 if (ndr_flags & NDR_SCALARS) {
900 NDR_CHECK(ndr_pull_align(ndr, 4));
901 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_SCALARS, &r->info));
902 NDR_CHECK(ndr_pull_dfs_Target_Priority(ndr, NDR_SCALARS, &r->target_priority));
904 if (ndr_flags & NDR_BUFFERS) {
905 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->info));
907 return NDR_ERR_SUCCESS;
910 _PUBLIC_ void ndr_print_dfs_StorageInfo2(struct ndr_print *ndr, const char *name, const struct dfs_StorageInfo2 *r)
912 ndr_print_struct(ndr, name, "dfs_StorageInfo2");
913 ndr->depth++;
914 ndr_print_dfs_StorageInfo(ndr, "info", &r->info);
915 ndr_print_dfs_Target_Priority(ndr, "target_priority", &r->target_priority);
916 ndr->depth--;
919 static enum ndr_err_code ndr_push_dfs_Info6(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info6 *r)
921 uint32_t cntr_stores_1;
922 if (ndr_flags & NDR_SCALARS) {
923 NDR_CHECK(ndr_push_align(ndr, 4));
924 NDR_CHECK(ndr_push_unique_ptr(ndr, r->entry_path));
925 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
926 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
927 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
928 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
929 NDR_CHECK(ndr_push_dfs_PropertyFlags(ndr, NDR_SCALARS, r->flags));
930 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pktsize));
931 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_stores));
932 NDR_CHECK(ndr_push_unique_ptr(ndr, r->stores));
934 if (ndr_flags & NDR_BUFFERS) {
935 if (r->entry_path) {
936 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->entry_path, CH_UTF16)));
937 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
938 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->entry_path, CH_UTF16)));
939 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->entry_path, ndr_charset_length(r->entry_path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
941 if (r->comment) {
942 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
943 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
944 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
945 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
947 if (r->stores) {
948 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
949 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
950 NDR_CHECK(ndr_push_dfs_StorageInfo2(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
952 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
953 NDR_CHECK(ndr_push_dfs_StorageInfo2(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
957 return NDR_ERR_SUCCESS;
960 static enum ndr_err_code ndr_pull_dfs_Info6(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info6 *r)
962 uint32_t _ptr_entry_path;
963 TALLOC_CTX *_mem_save_entry_path_0;
964 uint32_t _ptr_comment;
965 TALLOC_CTX *_mem_save_comment_0;
966 uint32_t _ptr_stores;
967 uint32_t cntr_stores_1;
968 TALLOC_CTX *_mem_save_stores_0;
969 TALLOC_CTX *_mem_save_stores_1;
970 if (ndr_flags & NDR_SCALARS) {
971 NDR_CHECK(ndr_pull_align(ndr, 4));
972 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entry_path));
973 if (_ptr_entry_path) {
974 NDR_PULL_ALLOC(ndr, r->entry_path);
975 } else {
976 r->entry_path = NULL;
978 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
979 if (_ptr_comment) {
980 NDR_PULL_ALLOC(ndr, r->comment);
981 } else {
982 r->comment = NULL;
984 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
985 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
986 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
987 NDR_CHECK(ndr_pull_dfs_PropertyFlags(ndr, NDR_SCALARS, &r->flags));
988 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pktsize));
989 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_stores));
990 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_stores));
991 if (_ptr_stores) {
992 NDR_PULL_ALLOC(ndr, r->stores);
993 } else {
994 r->stores = NULL;
997 if (ndr_flags & NDR_BUFFERS) {
998 if (r->entry_path) {
999 _mem_save_entry_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
1000 NDR_PULL_SET_MEM_CTX(ndr, r->entry_path, 0);
1001 NDR_CHECK(ndr_pull_array_size(ndr, &r->entry_path));
1002 NDR_CHECK(ndr_pull_array_length(ndr, &r->entry_path));
1003 if (ndr_get_array_length(ndr, &r->entry_path) > ndr_get_array_size(ndr, &r->entry_path)) {
1004 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));
1006 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->entry_path), sizeof(uint16_t)));
1007 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->entry_path, ndr_get_array_length(ndr, &r->entry_path), sizeof(uint16_t), CH_UTF16));
1008 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entry_path_0, 0);
1010 if (r->comment) {
1011 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
1012 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
1013 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
1014 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
1015 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
1016 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));
1018 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
1019 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
1020 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
1022 if (r->stores) {
1023 _mem_save_stores_0 = NDR_PULL_GET_MEM_CTX(ndr);
1024 NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
1025 NDR_CHECK(ndr_pull_array_size(ndr, &r->stores));
1026 NDR_PULL_ALLOC_N(ndr, r->stores, ndr_get_array_size(ndr, &r->stores));
1027 _mem_save_stores_1 = NDR_PULL_GET_MEM_CTX(ndr);
1028 NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
1029 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
1030 NDR_CHECK(ndr_pull_dfs_StorageInfo2(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
1032 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
1033 NDR_CHECK(ndr_pull_dfs_StorageInfo2(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
1035 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_1, 0);
1036 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_0, 0);
1038 if (r->stores) {
1039 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->stores, r->num_stores));
1042 return NDR_ERR_SUCCESS;
1045 _PUBLIC_ void ndr_print_dfs_Info6(struct ndr_print *ndr, const char *name, const struct dfs_Info6 *r)
1047 uint32_t cntr_stores_1;
1048 ndr_print_struct(ndr, name, "dfs_Info6");
1049 ndr->depth++;
1050 ndr_print_ptr(ndr, "entry_path", r->entry_path);
1051 ndr->depth++;
1052 if (r->entry_path) {
1053 ndr_print_string(ndr, "entry_path", r->entry_path);
1055 ndr->depth--;
1056 ndr_print_ptr(ndr, "comment", r->comment);
1057 ndr->depth++;
1058 if (r->comment) {
1059 ndr_print_string(ndr, "comment", r->comment);
1061 ndr->depth--;
1062 ndr_print_dfs_VolumeState(ndr, "state", r->state);
1063 ndr_print_uint32(ndr, "timeout", r->timeout);
1064 ndr_print_GUID(ndr, "guid", &r->guid);
1065 ndr_print_dfs_PropertyFlags(ndr, "flags", r->flags);
1066 ndr_print_uint32(ndr, "pktsize", r->pktsize);
1067 ndr_print_uint16(ndr, "num_stores", r->num_stores);
1068 ndr_print_ptr(ndr, "stores", r->stores);
1069 ndr->depth++;
1070 if (r->stores) {
1071 ndr->print(ndr, "%s: ARRAY(%d)", "stores", (int)r->num_stores);
1072 ndr->depth++;
1073 for (cntr_stores_1=0;cntr_stores_1<r->num_stores;cntr_stores_1++) {
1074 char *idx_1=NULL;
1075 if (asprintf(&idx_1, "[%d]", cntr_stores_1) != -1) {
1076 ndr_print_dfs_StorageInfo2(ndr, "stores", &r->stores[cntr_stores_1]);
1077 free(idx_1);
1080 ndr->depth--;
1082 ndr->depth--;
1083 ndr->depth--;
1086 static enum ndr_err_code ndr_push_dfs_Info7(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info7 *r)
1088 if (ndr_flags & NDR_SCALARS) {
1089 NDR_CHECK(ndr_push_align(ndr, 4));
1090 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->generation_guid));
1092 if (ndr_flags & NDR_BUFFERS) {
1094 return NDR_ERR_SUCCESS;
1097 static enum ndr_err_code ndr_pull_dfs_Info7(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info7 *r)
1099 if (ndr_flags & NDR_SCALARS) {
1100 NDR_CHECK(ndr_pull_align(ndr, 4));
1101 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->generation_guid));
1103 if (ndr_flags & NDR_BUFFERS) {
1105 return NDR_ERR_SUCCESS;
1108 _PUBLIC_ void ndr_print_dfs_Info7(struct ndr_print *ndr, const char *name, const struct dfs_Info7 *r)
1110 ndr_print_struct(ndr, name, "dfs_Info7");
1111 ndr->depth++;
1112 ndr_print_GUID(ndr, "generation_guid", &r->generation_guid);
1113 ndr->depth--;
1116 static enum ndr_err_code ndr_push_dfs_Info100(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info100 *r)
1118 if (ndr_flags & NDR_SCALARS) {
1119 NDR_CHECK(ndr_push_align(ndr, 4));
1120 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
1122 if (ndr_flags & NDR_BUFFERS) {
1123 if (r->comment) {
1124 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
1125 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1126 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
1127 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1130 return NDR_ERR_SUCCESS;
1133 static enum ndr_err_code ndr_pull_dfs_Info100(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info100 *r)
1135 uint32_t _ptr_comment;
1136 TALLOC_CTX *_mem_save_comment_0;
1137 if (ndr_flags & NDR_SCALARS) {
1138 NDR_CHECK(ndr_pull_align(ndr, 4));
1139 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
1140 if (_ptr_comment) {
1141 NDR_PULL_ALLOC(ndr, r->comment);
1142 } else {
1143 r->comment = NULL;
1146 if (ndr_flags & NDR_BUFFERS) {
1147 if (r->comment) {
1148 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
1149 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
1150 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
1151 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
1152 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
1153 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));
1155 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
1156 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
1157 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
1160 return NDR_ERR_SUCCESS;
1163 _PUBLIC_ void ndr_print_dfs_Info100(struct ndr_print *ndr, const char *name, const struct dfs_Info100 *r)
1165 ndr_print_struct(ndr, name, "dfs_Info100");
1166 ndr->depth++;
1167 ndr_print_ptr(ndr, "comment", r->comment);
1168 ndr->depth++;
1169 if (r->comment) {
1170 ndr_print_string(ndr, "comment", r->comment);
1172 ndr->depth--;
1173 ndr->depth--;
1176 static enum ndr_err_code ndr_push_dfs_Info101(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info101 *r)
1178 if (ndr_flags & NDR_SCALARS) {
1179 NDR_CHECK(ndr_push_align(ndr, 4));
1180 NDR_CHECK(ndr_push_dfs_StorageState(ndr, NDR_SCALARS, r->state));
1182 if (ndr_flags & NDR_BUFFERS) {
1184 return NDR_ERR_SUCCESS;
1187 static enum ndr_err_code ndr_pull_dfs_Info101(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info101 *r)
1189 if (ndr_flags & NDR_SCALARS) {
1190 NDR_CHECK(ndr_pull_align(ndr, 4));
1191 NDR_CHECK(ndr_pull_dfs_StorageState(ndr, NDR_SCALARS, &r->state));
1193 if (ndr_flags & NDR_BUFFERS) {
1195 return NDR_ERR_SUCCESS;
1198 _PUBLIC_ void ndr_print_dfs_Info101(struct ndr_print *ndr, const char *name, const struct dfs_Info101 *r)
1200 ndr_print_struct(ndr, name, "dfs_Info101");
1201 ndr->depth++;
1202 ndr_print_dfs_StorageState(ndr, "state", r->state);
1203 ndr->depth--;
1206 static enum ndr_err_code ndr_push_dfs_Info102(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info102 *r)
1208 if (ndr_flags & NDR_SCALARS) {
1209 NDR_CHECK(ndr_push_align(ndr, 4));
1210 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
1212 if (ndr_flags & NDR_BUFFERS) {
1214 return NDR_ERR_SUCCESS;
1217 static enum ndr_err_code ndr_pull_dfs_Info102(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info102 *r)
1219 if (ndr_flags & NDR_SCALARS) {
1220 NDR_CHECK(ndr_pull_align(ndr, 4));
1221 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
1223 if (ndr_flags & NDR_BUFFERS) {
1225 return NDR_ERR_SUCCESS;
1228 _PUBLIC_ void ndr_print_dfs_Info102(struct ndr_print *ndr, const char *name, const struct dfs_Info102 *r)
1230 ndr_print_struct(ndr, name, "dfs_Info102");
1231 ndr->depth++;
1232 ndr_print_uint32(ndr, "timeout", r->timeout);
1233 ndr->depth--;
1236 static enum ndr_err_code ndr_push_dfs_Info103(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info103 *r)
1238 if (ndr_flags & NDR_SCALARS) {
1239 NDR_CHECK(ndr_push_align(ndr, 4));
1240 NDR_CHECK(ndr_push_dfs_PropertyFlags(ndr, NDR_SCALARS, r->flags));
1242 if (ndr_flags & NDR_BUFFERS) {
1244 return NDR_ERR_SUCCESS;
1247 static enum ndr_err_code ndr_pull_dfs_Info103(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info103 *r)
1249 if (ndr_flags & NDR_SCALARS) {
1250 NDR_CHECK(ndr_pull_align(ndr, 4));
1251 NDR_CHECK(ndr_pull_dfs_PropertyFlags(ndr, NDR_SCALARS, &r->flags));
1253 if (ndr_flags & NDR_BUFFERS) {
1255 return NDR_ERR_SUCCESS;
1258 _PUBLIC_ void ndr_print_dfs_Info103(struct ndr_print *ndr, const char *name, const struct dfs_Info103 *r)
1260 ndr_print_struct(ndr, name, "dfs_Info103");
1261 ndr->depth++;
1262 ndr_print_dfs_PropertyFlags(ndr, "flags", r->flags);
1263 ndr->depth--;
1266 static enum ndr_err_code ndr_push_dfs_Info104(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info104 *r)
1268 if (ndr_flags & NDR_SCALARS) {
1269 NDR_CHECK(ndr_push_align(ndr, 4));
1270 NDR_CHECK(ndr_push_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority));
1272 if (ndr_flags & NDR_BUFFERS) {
1274 return NDR_ERR_SUCCESS;
1277 static enum ndr_err_code ndr_pull_dfs_Info104(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info104 *r)
1279 if (ndr_flags & NDR_SCALARS) {
1280 NDR_CHECK(ndr_pull_align(ndr, 4));
1281 NDR_CHECK(ndr_pull_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority));
1283 if (ndr_flags & NDR_BUFFERS) {
1285 return NDR_ERR_SUCCESS;
1288 _PUBLIC_ void ndr_print_dfs_Info104(struct ndr_print *ndr, const char *name, const struct dfs_Info104 *r)
1290 ndr_print_struct(ndr, name, "dfs_Info104");
1291 ndr->depth++;
1292 ndr_print_dfs_Target_Priority(ndr, "priority", &r->priority);
1293 ndr->depth--;
1296 static enum ndr_err_code ndr_push_dfs_Info105(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info105 *r)
1298 if (ndr_flags & NDR_SCALARS) {
1299 NDR_CHECK(ndr_push_align(ndr, 4));
1300 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
1301 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
1302 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
1303 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->property_flag_mask));
1304 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->property_flags));
1306 if (ndr_flags & NDR_BUFFERS) {
1307 if (r->comment) {
1308 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
1309 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1310 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
1311 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1314 return NDR_ERR_SUCCESS;
1317 static enum ndr_err_code ndr_pull_dfs_Info105(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info105 *r)
1319 uint32_t _ptr_comment;
1320 TALLOC_CTX *_mem_save_comment_0;
1321 if (ndr_flags & NDR_SCALARS) {
1322 NDR_CHECK(ndr_pull_align(ndr, 4));
1323 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
1324 if (_ptr_comment) {
1325 NDR_PULL_ALLOC(ndr, r->comment);
1326 } else {
1327 r->comment = NULL;
1329 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
1330 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
1331 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->property_flag_mask));
1332 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->property_flags));
1334 if (ndr_flags & NDR_BUFFERS) {
1335 if (r->comment) {
1336 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
1337 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
1338 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
1339 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
1340 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
1341 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));
1343 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
1344 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
1345 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
1348 return NDR_ERR_SUCCESS;
1351 _PUBLIC_ void ndr_print_dfs_Info105(struct ndr_print *ndr, const char *name, const struct dfs_Info105 *r)
1353 ndr_print_struct(ndr, name, "dfs_Info105");
1354 ndr->depth++;
1355 ndr_print_ptr(ndr, "comment", r->comment);
1356 ndr->depth++;
1357 if (r->comment) {
1358 ndr_print_string(ndr, "comment", r->comment);
1360 ndr->depth--;
1361 ndr_print_dfs_VolumeState(ndr, "state", r->state);
1362 ndr_print_uint32(ndr, "timeout", r->timeout);
1363 ndr_print_uint32(ndr, "property_flag_mask", r->property_flag_mask);
1364 ndr_print_uint32(ndr, "property_flags", r->property_flags);
1365 ndr->depth--;
1368 static enum ndr_err_code ndr_push_dfs_Info106(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info106 *r)
1370 if (ndr_flags & NDR_SCALARS) {
1371 NDR_CHECK(ndr_push_align(ndr, 4));
1372 NDR_CHECK(ndr_push_dfs_StorageState(ndr, NDR_SCALARS, r->state));
1373 NDR_CHECK(ndr_push_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority));
1375 if (ndr_flags & NDR_BUFFERS) {
1377 return NDR_ERR_SUCCESS;
1380 static enum ndr_err_code ndr_pull_dfs_Info106(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info106 *r)
1382 if (ndr_flags & NDR_SCALARS) {
1383 NDR_CHECK(ndr_pull_align(ndr, 4));
1384 NDR_CHECK(ndr_pull_dfs_StorageState(ndr, NDR_SCALARS, &r->state));
1385 NDR_CHECK(ndr_pull_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority));
1387 if (ndr_flags & NDR_BUFFERS) {
1389 return NDR_ERR_SUCCESS;
1392 _PUBLIC_ void ndr_print_dfs_Info106(struct ndr_print *ndr, const char *name, const struct dfs_Info106 *r)
1394 ndr_print_struct(ndr, name, "dfs_Info106");
1395 ndr->depth++;
1396 ndr_print_dfs_StorageState(ndr, "state", r->state);
1397 ndr_print_dfs_Target_Priority(ndr, "priority", &r->priority);
1398 ndr->depth--;
1401 static enum ndr_err_code ndr_push_dfs_Info200(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info200 *r)
1403 if (ndr_flags & NDR_SCALARS) {
1404 NDR_CHECK(ndr_push_align(ndr, 4));
1405 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dom_root));
1407 if (ndr_flags & NDR_BUFFERS) {
1408 if (r->dom_root) {
1409 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16)));
1410 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1411 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16)));
1412 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dom_root, ndr_charset_length(r->dom_root, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1415 return NDR_ERR_SUCCESS;
1418 static enum ndr_err_code ndr_pull_dfs_Info200(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info200 *r)
1420 uint32_t _ptr_dom_root;
1421 TALLOC_CTX *_mem_save_dom_root_0;
1422 if (ndr_flags & NDR_SCALARS) {
1423 NDR_CHECK(ndr_pull_align(ndr, 4));
1424 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dom_root));
1425 if (_ptr_dom_root) {
1426 NDR_PULL_ALLOC(ndr, r->dom_root);
1427 } else {
1428 r->dom_root = NULL;
1431 if (ndr_flags & NDR_BUFFERS) {
1432 if (r->dom_root) {
1433 _mem_save_dom_root_0 = NDR_PULL_GET_MEM_CTX(ndr);
1434 NDR_PULL_SET_MEM_CTX(ndr, r->dom_root, 0);
1435 NDR_CHECK(ndr_pull_array_size(ndr, &r->dom_root));
1436 NDR_CHECK(ndr_pull_array_length(ndr, &r->dom_root));
1437 if (ndr_get_array_length(ndr, &r->dom_root) > ndr_get_array_size(ndr, &r->dom_root)) {
1438 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));
1440 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->dom_root), sizeof(uint16_t)));
1441 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dom_root, ndr_get_array_length(ndr, &r->dom_root), sizeof(uint16_t), CH_UTF16));
1442 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_root_0, 0);
1445 return NDR_ERR_SUCCESS;
1448 _PUBLIC_ void ndr_print_dfs_Info200(struct ndr_print *ndr, const char *name, const struct dfs_Info200 *r)
1450 ndr_print_struct(ndr, name, "dfs_Info200");
1451 ndr->depth++;
1452 ndr_print_ptr(ndr, "dom_root", r->dom_root);
1453 ndr->depth++;
1454 if (r->dom_root) {
1455 ndr_print_string(ndr, "dom_root", r->dom_root);
1457 ndr->depth--;
1458 ndr->depth--;
1461 static enum ndr_err_code ndr_push_dfs_VolumeFlavor(struct ndr_push *ndr, int ndr_flags, enum dfs_VolumeFlavor r)
1463 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
1464 return NDR_ERR_SUCCESS;
1467 static enum ndr_err_code ndr_pull_dfs_VolumeFlavor(struct ndr_pull *ndr, int ndr_flags, enum dfs_VolumeFlavor *r)
1469 uint16_t v;
1470 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
1471 *r = v;
1472 return NDR_ERR_SUCCESS;
1475 _PUBLIC_ void ndr_print_dfs_VolumeFlavor(struct ndr_print *ndr, const char *name, enum dfs_VolumeFlavor r)
1477 const char *val = NULL;
1479 switch (r) {
1480 case DFS_VOLUME_FLAVOR_STANDALONE: val = "DFS_VOLUME_FLAVOR_STANDALONE"; break;
1481 case DFS_VOLUME_FLAVOR_AD_BLOB: val = "DFS_VOLUME_FLAVOR_AD_BLOB"; break;
1483 ndr_print_enum(ndr, name, "ENUM", val, r);
1486 static enum ndr_err_code ndr_push_dfs_Info300(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info300 *r)
1488 if (ndr_flags & NDR_SCALARS) {
1489 NDR_CHECK(ndr_push_align(ndr, 4));
1490 NDR_CHECK(ndr_push_dfs_VolumeFlavor(ndr, NDR_SCALARS, r->flavor));
1491 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dom_root));
1493 if (ndr_flags & NDR_BUFFERS) {
1494 if (r->dom_root) {
1495 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16)));
1496 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1497 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16)));
1498 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dom_root, ndr_charset_length(r->dom_root, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1501 return NDR_ERR_SUCCESS;
1504 static enum ndr_err_code ndr_pull_dfs_Info300(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info300 *r)
1506 uint32_t _ptr_dom_root;
1507 TALLOC_CTX *_mem_save_dom_root_0;
1508 if (ndr_flags & NDR_SCALARS) {
1509 NDR_CHECK(ndr_pull_align(ndr, 4));
1510 NDR_CHECK(ndr_pull_dfs_VolumeFlavor(ndr, NDR_SCALARS, &r->flavor));
1511 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dom_root));
1512 if (_ptr_dom_root) {
1513 NDR_PULL_ALLOC(ndr, r->dom_root);
1514 } else {
1515 r->dom_root = NULL;
1518 if (ndr_flags & NDR_BUFFERS) {
1519 if (r->dom_root) {
1520 _mem_save_dom_root_0 = NDR_PULL_GET_MEM_CTX(ndr);
1521 NDR_PULL_SET_MEM_CTX(ndr, r->dom_root, 0);
1522 NDR_CHECK(ndr_pull_array_size(ndr, &r->dom_root));
1523 NDR_CHECK(ndr_pull_array_length(ndr, &r->dom_root));
1524 if (ndr_get_array_length(ndr, &r->dom_root) > ndr_get_array_size(ndr, &r->dom_root)) {
1525 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));
1527 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->dom_root), sizeof(uint16_t)));
1528 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dom_root, ndr_get_array_length(ndr, &r->dom_root), sizeof(uint16_t), CH_UTF16));
1529 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_root_0, 0);
1532 return NDR_ERR_SUCCESS;
1535 _PUBLIC_ void ndr_print_dfs_Info300(struct ndr_print *ndr, const char *name, const struct dfs_Info300 *r)
1537 ndr_print_struct(ndr, name, "dfs_Info300");
1538 ndr->depth++;
1539 ndr_print_dfs_VolumeFlavor(ndr, "flavor", r->flavor);
1540 ndr_print_ptr(ndr, "dom_root", r->dom_root);
1541 ndr->depth++;
1542 if (r->dom_root) {
1543 ndr_print_string(ndr, "dom_root", r->dom_root);
1545 ndr->depth--;
1546 ndr->depth--;
1549 static enum ndr_err_code ndr_push_dfs_Info(struct ndr_push *ndr, int ndr_flags, const union dfs_Info *r)
1551 if (ndr_flags & NDR_SCALARS) {
1552 int level = ndr_push_get_switch_value(ndr, r);
1553 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
1554 switch (level) {
1555 case 0: {
1556 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
1557 break; }
1559 case 1: {
1560 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
1561 break; }
1563 case 2: {
1564 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
1565 break; }
1567 case 3: {
1568 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3));
1569 break; }
1571 case 4: {
1572 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info4));
1573 break; }
1575 case 5: {
1576 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info5));
1577 break; }
1579 case 6: {
1580 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info6));
1581 break; }
1583 case 7: {
1584 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info7));
1585 break; }
1587 case 100: {
1588 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info100));
1589 break; }
1591 case 101: {
1592 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info101));
1593 break; }
1595 case 102: {
1596 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info102));
1597 break; }
1599 case 103: {
1600 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info103));
1601 break; }
1603 case 104: {
1604 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info104));
1605 break; }
1607 case 105: {
1608 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info105));
1609 break; }
1611 case 106: {
1612 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info106));
1613 break; }
1615 default:
1616 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1619 if (ndr_flags & NDR_BUFFERS) {
1620 int level = ndr_push_get_switch_value(ndr, r);
1621 switch (level) {
1622 case 0:
1623 if (r->info0) {
1624 NDR_CHECK(ndr_push_dfs_Info0(ndr, NDR_SCALARS, r->info0));
1626 break;
1628 case 1:
1629 if (r->info1) {
1630 NDR_CHECK(ndr_push_dfs_Info1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
1632 break;
1634 case 2:
1635 if (r->info2) {
1636 NDR_CHECK(ndr_push_dfs_Info2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
1638 break;
1640 case 3:
1641 if (r->info3) {
1642 NDR_CHECK(ndr_push_dfs_Info3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
1644 break;
1646 case 4:
1647 if (r->info4) {
1648 NDR_CHECK(ndr_push_dfs_Info4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
1650 break;
1652 case 5:
1653 if (r->info5) {
1654 NDR_CHECK(ndr_push_dfs_Info5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5));
1656 break;
1658 case 6:
1659 if (r->info6) {
1660 NDR_CHECK(ndr_push_dfs_Info6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6));
1662 break;
1664 case 7:
1665 if (r->info7) {
1666 NDR_CHECK(ndr_push_dfs_Info7(ndr, NDR_SCALARS, r->info7));
1668 break;
1670 case 100:
1671 if (r->info100) {
1672 NDR_CHECK(ndr_push_dfs_Info100(ndr, NDR_SCALARS|NDR_BUFFERS, r->info100));
1674 break;
1676 case 101:
1677 if (r->info101) {
1678 NDR_CHECK(ndr_push_dfs_Info101(ndr, NDR_SCALARS, r->info101));
1680 break;
1682 case 102:
1683 if (r->info102) {
1684 NDR_CHECK(ndr_push_dfs_Info102(ndr, NDR_SCALARS, r->info102));
1686 break;
1688 case 103:
1689 if (r->info103) {
1690 NDR_CHECK(ndr_push_dfs_Info103(ndr, NDR_SCALARS, r->info103));
1692 break;
1694 case 104:
1695 if (r->info104) {
1696 NDR_CHECK(ndr_push_dfs_Info104(ndr, NDR_SCALARS, r->info104));
1698 break;
1700 case 105:
1701 if (r->info105) {
1702 NDR_CHECK(ndr_push_dfs_Info105(ndr, NDR_SCALARS|NDR_BUFFERS, r->info105));
1704 break;
1706 case 106:
1707 if (r->info106) {
1708 NDR_CHECK(ndr_push_dfs_Info106(ndr, NDR_SCALARS, r->info106));
1710 break;
1712 default:
1713 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1716 return NDR_ERR_SUCCESS;
1719 static enum ndr_err_code ndr_pull_dfs_Info(struct ndr_pull *ndr, int ndr_flags, union dfs_Info *r)
1721 int level;
1722 uint32_t _level;
1723 TALLOC_CTX *_mem_save_info0_0;
1724 TALLOC_CTX *_mem_save_info1_0;
1725 TALLOC_CTX *_mem_save_info2_0;
1726 TALLOC_CTX *_mem_save_info3_0;
1727 TALLOC_CTX *_mem_save_info4_0;
1728 TALLOC_CTX *_mem_save_info5_0;
1729 TALLOC_CTX *_mem_save_info6_0;
1730 TALLOC_CTX *_mem_save_info7_0;
1731 TALLOC_CTX *_mem_save_info100_0;
1732 TALLOC_CTX *_mem_save_info101_0;
1733 TALLOC_CTX *_mem_save_info102_0;
1734 TALLOC_CTX *_mem_save_info103_0;
1735 TALLOC_CTX *_mem_save_info104_0;
1736 TALLOC_CTX *_mem_save_info105_0;
1737 TALLOC_CTX *_mem_save_info106_0;
1738 level = ndr_pull_get_switch_value(ndr, r);
1739 if (ndr_flags & NDR_SCALARS) {
1740 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
1741 if (_level != level) {
1742 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
1744 switch (level) {
1745 case 0: {
1746 uint32_t _ptr_info0;
1747 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
1748 if (_ptr_info0) {
1749 NDR_PULL_ALLOC(ndr, r->info0);
1750 } else {
1751 r->info0 = NULL;
1753 break; }
1755 case 1: {
1756 uint32_t _ptr_info1;
1757 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
1758 if (_ptr_info1) {
1759 NDR_PULL_ALLOC(ndr, r->info1);
1760 } else {
1761 r->info1 = NULL;
1763 break; }
1765 case 2: {
1766 uint32_t _ptr_info2;
1767 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
1768 if (_ptr_info2) {
1769 NDR_PULL_ALLOC(ndr, r->info2);
1770 } else {
1771 r->info2 = NULL;
1773 break; }
1775 case 3: {
1776 uint32_t _ptr_info3;
1777 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info3));
1778 if (_ptr_info3) {
1779 NDR_PULL_ALLOC(ndr, r->info3);
1780 } else {
1781 r->info3 = NULL;
1783 break; }
1785 case 4: {
1786 uint32_t _ptr_info4;
1787 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info4));
1788 if (_ptr_info4) {
1789 NDR_PULL_ALLOC(ndr, r->info4);
1790 } else {
1791 r->info4 = NULL;
1793 break; }
1795 case 5: {
1796 uint32_t _ptr_info5;
1797 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info5));
1798 if (_ptr_info5) {
1799 NDR_PULL_ALLOC(ndr, r->info5);
1800 } else {
1801 r->info5 = NULL;
1803 break; }
1805 case 6: {
1806 uint32_t _ptr_info6;
1807 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info6));
1808 if (_ptr_info6) {
1809 NDR_PULL_ALLOC(ndr, r->info6);
1810 } else {
1811 r->info6 = NULL;
1813 break; }
1815 case 7: {
1816 uint32_t _ptr_info7;
1817 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info7));
1818 if (_ptr_info7) {
1819 NDR_PULL_ALLOC(ndr, r->info7);
1820 } else {
1821 r->info7 = NULL;
1823 break; }
1825 case 100: {
1826 uint32_t _ptr_info100;
1827 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info100));
1828 if (_ptr_info100) {
1829 NDR_PULL_ALLOC(ndr, r->info100);
1830 } else {
1831 r->info100 = NULL;
1833 break; }
1835 case 101: {
1836 uint32_t _ptr_info101;
1837 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info101));
1838 if (_ptr_info101) {
1839 NDR_PULL_ALLOC(ndr, r->info101);
1840 } else {
1841 r->info101 = NULL;
1843 break; }
1845 case 102: {
1846 uint32_t _ptr_info102;
1847 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info102));
1848 if (_ptr_info102) {
1849 NDR_PULL_ALLOC(ndr, r->info102);
1850 } else {
1851 r->info102 = NULL;
1853 break; }
1855 case 103: {
1856 uint32_t _ptr_info103;
1857 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info103));
1858 if (_ptr_info103) {
1859 NDR_PULL_ALLOC(ndr, r->info103);
1860 } else {
1861 r->info103 = NULL;
1863 break; }
1865 case 104: {
1866 uint32_t _ptr_info104;
1867 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info104));
1868 if (_ptr_info104) {
1869 NDR_PULL_ALLOC(ndr, r->info104);
1870 } else {
1871 r->info104 = NULL;
1873 break; }
1875 case 105: {
1876 uint32_t _ptr_info105;
1877 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info105));
1878 if (_ptr_info105) {
1879 NDR_PULL_ALLOC(ndr, r->info105);
1880 } else {
1881 r->info105 = NULL;
1883 break; }
1885 case 106: {
1886 uint32_t _ptr_info106;
1887 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info106));
1888 if (_ptr_info106) {
1889 NDR_PULL_ALLOC(ndr, r->info106);
1890 } else {
1891 r->info106 = NULL;
1893 break; }
1895 default:
1896 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1899 if (ndr_flags & NDR_BUFFERS) {
1900 switch (level) {
1901 case 0:
1902 if (r->info0) {
1903 _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
1904 NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
1905 NDR_CHECK(ndr_pull_dfs_Info0(ndr, NDR_SCALARS, r->info0));
1906 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
1908 break;
1910 case 1:
1911 if (r->info1) {
1912 _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
1913 NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
1914 NDR_CHECK(ndr_pull_dfs_Info1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
1915 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
1917 break;
1919 case 2:
1920 if (r->info2) {
1921 _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
1922 NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
1923 NDR_CHECK(ndr_pull_dfs_Info2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
1924 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
1926 break;
1928 case 3:
1929 if (r->info3) {
1930 _mem_save_info3_0 = NDR_PULL_GET_MEM_CTX(ndr);
1931 NDR_PULL_SET_MEM_CTX(ndr, r->info3, 0);
1932 NDR_CHECK(ndr_pull_dfs_Info3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
1933 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info3_0, 0);
1935 break;
1937 case 4:
1938 if (r->info4) {
1939 _mem_save_info4_0 = NDR_PULL_GET_MEM_CTX(ndr);
1940 NDR_PULL_SET_MEM_CTX(ndr, r->info4, 0);
1941 NDR_CHECK(ndr_pull_dfs_Info4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
1942 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info4_0, 0);
1944 break;
1946 case 5:
1947 if (r->info5) {
1948 _mem_save_info5_0 = NDR_PULL_GET_MEM_CTX(ndr);
1949 NDR_PULL_SET_MEM_CTX(ndr, r->info5, 0);
1950 NDR_CHECK(ndr_pull_dfs_Info5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5));
1951 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info5_0, 0);
1953 break;
1955 case 6:
1956 if (r->info6) {
1957 _mem_save_info6_0 = NDR_PULL_GET_MEM_CTX(ndr);
1958 NDR_PULL_SET_MEM_CTX(ndr, r->info6, 0);
1959 NDR_CHECK(ndr_pull_dfs_Info6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6));
1960 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info6_0, 0);
1962 break;
1964 case 7:
1965 if (r->info7) {
1966 _mem_save_info7_0 = NDR_PULL_GET_MEM_CTX(ndr);
1967 NDR_PULL_SET_MEM_CTX(ndr, r->info7, 0);
1968 NDR_CHECK(ndr_pull_dfs_Info7(ndr, NDR_SCALARS, r->info7));
1969 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info7_0, 0);
1971 break;
1973 case 100:
1974 if (r->info100) {
1975 _mem_save_info100_0 = NDR_PULL_GET_MEM_CTX(ndr);
1976 NDR_PULL_SET_MEM_CTX(ndr, r->info100, 0);
1977 NDR_CHECK(ndr_pull_dfs_Info100(ndr, NDR_SCALARS|NDR_BUFFERS, r->info100));
1978 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info100_0, 0);
1980 break;
1982 case 101:
1983 if (r->info101) {
1984 _mem_save_info101_0 = NDR_PULL_GET_MEM_CTX(ndr);
1985 NDR_PULL_SET_MEM_CTX(ndr, r->info101, 0);
1986 NDR_CHECK(ndr_pull_dfs_Info101(ndr, NDR_SCALARS, r->info101));
1987 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info101_0, 0);
1989 break;
1991 case 102:
1992 if (r->info102) {
1993 _mem_save_info102_0 = NDR_PULL_GET_MEM_CTX(ndr);
1994 NDR_PULL_SET_MEM_CTX(ndr, r->info102, 0);
1995 NDR_CHECK(ndr_pull_dfs_Info102(ndr, NDR_SCALARS, r->info102));
1996 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info102_0, 0);
1998 break;
2000 case 103:
2001 if (r->info103) {
2002 _mem_save_info103_0 = NDR_PULL_GET_MEM_CTX(ndr);
2003 NDR_PULL_SET_MEM_CTX(ndr, r->info103, 0);
2004 NDR_CHECK(ndr_pull_dfs_Info103(ndr, NDR_SCALARS, r->info103));
2005 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info103_0, 0);
2007 break;
2009 case 104:
2010 if (r->info104) {
2011 _mem_save_info104_0 = NDR_PULL_GET_MEM_CTX(ndr);
2012 NDR_PULL_SET_MEM_CTX(ndr, r->info104, 0);
2013 NDR_CHECK(ndr_pull_dfs_Info104(ndr, NDR_SCALARS, r->info104));
2014 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info104_0, 0);
2016 break;
2018 case 105:
2019 if (r->info105) {
2020 _mem_save_info105_0 = NDR_PULL_GET_MEM_CTX(ndr);
2021 NDR_PULL_SET_MEM_CTX(ndr, r->info105, 0);
2022 NDR_CHECK(ndr_pull_dfs_Info105(ndr, NDR_SCALARS|NDR_BUFFERS, r->info105));
2023 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info105_0, 0);
2025 break;
2027 case 106:
2028 if (r->info106) {
2029 _mem_save_info106_0 = NDR_PULL_GET_MEM_CTX(ndr);
2030 NDR_PULL_SET_MEM_CTX(ndr, r->info106, 0);
2031 NDR_CHECK(ndr_pull_dfs_Info106(ndr, NDR_SCALARS, r->info106));
2032 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info106_0, 0);
2034 break;
2036 default:
2037 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2040 return NDR_ERR_SUCCESS;
2043 _PUBLIC_ void ndr_print_dfs_Info(struct ndr_print *ndr, const char *name, const union dfs_Info *r)
2045 int level;
2046 level = ndr_print_get_switch_value(ndr, r);
2047 ndr_print_union(ndr, name, level, "dfs_Info");
2048 switch (level) {
2049 case 0:
2050 ndr_print_ptr(ndr, "info0", r->info0);
2051 ndr->depth++;
2052 if (r->info0) {
2053 ndr_print_dfs_Info0(ndr, "info0", r->info0);
2055 ndr->depth--;
2056 break;
2058 case 1:
2059 ndr_print_ptr(ndr, "info1", r->info1);
2060 ndr->depth++;
2061 if (r->info1) {
2062 ndr_print_dfs_Info1(ndr, "info1", r->info1);
2064 ndr->depth--;
2065 break;
2067 case 2:
2068 ndr_print_ptr(ndr, "info2", r->info2);
2069 ndr->depth++;
2070 if (r->info2) {
2071 ndr_print_dfs_Info2(ndr, "info2", r->info2);
2073 ndr->depth--;
2074 break;
2076 case 3:
2077 ndr_print_ptr(ndr, "info3", r->info3);
2078 ndr->depth++;
2079 if (r->info3) {
2080 ndr_print_dfs_Info3(ndr, "info3", r->info3);
2082 ndr->depth--;
2083 break;
2085 case 4:
2086 ndr_print_ptr(ndr, "info4", r->info4);
2087 ndr->depth++;
2088 if (r->info4) {
2089 ndr_print_dfs_Info4(ndr, "info4", r->info4);
2091 ndr->depth--;
2092 break;
2094 case 5:
2095 ndr_print_ptr(ndr, "info5", r->info5);
2096 ndr->depth++;
2097 if (r->info5) {
2098 ndr_print_dfs_Info5(ndr, "info5", r->info5);
2100 ndr->depth--;
2101 break;
2103 case 6:
2104 ndr_print_ptr(ndr, "info6", r->info6);
2105 ndr->depth++;
2106 if (r->info6) {
2107 ndr_print_dfs_Info6(ndr, "info6", r->info6);
2109 ndr->depth--;
2110 break;
2112 case 7:
2113 ndr_print_ptr(ndr, "info7", r->info7);
2114 ndr->depth++;
2115 if (r->info7) {
2116 ndr_print_dfs_Info7(ndr, "info7", r->info7);
2118 ndr->depth--;
2119 break;
2121 case 100:
2122 ndr_print_ptr(ndr, "info100", r->info100);
2123 ndr->depth++;
2124 if (r->info100) {
2125 ndr_print_dfs_Info100(ndr, "info100", r->info100);
2127 ndr->depth--;
2128 break;
2130 case 101:
2131 ndr_print_ptr(ndr, "info101", r->info101);
2132 ndr->depth++;
2133 if (r->info101) {
2134 ndr_print_dfs_Info101(ndr, "info101", r->info101);
2136 ndr->depth--;
2137 break;
2139 case 102:
2140 ndr_print_ptr(ndr, "info102", r->info102);
2141 ndr->depth++;
2142 if (r->info102) {
2143 ndr_print_dfs_Info102(ndr, "info102", r->info102);
2145 ndr->depth--;
2146 break;
2148 case 103:
2149 ndr_print_ptr(ndr, "info103", r->info103);
2150 ndr->depth++;
2151 if (r->info103) {
2152 ndr_print_dfs_Info103(ndr, "info103", r->info103);
2154 ndr->depth--;
2155 break;
2157 case 104:
2158 ndr_print_ptr(ndr, "info104", r->info104);
2159 ndr->depth++;
2160 if (r->info104) {
2161 ndr_print_dfs_Info104(ndr, "info104", r->info104);
2163 ndr->depth--;
2164 break;
2166 case 105:
2167 ndr_print_ptr(ndr, "info105", r->info105);
2168 ndr->depth++;
2169 if (r->info105) {
2170 ndr_print_dfs_Info105(ndr, "info105", r->info105);
2172 ndr->depth--;
2173 break;
2175 case 106:
2176 ndr_print_ptr(ndr, "info106", r->info106);
2177 ndr->depth++;
2178 if (r->info106) {
2179 ndr_print_dfs_Info106(ndr, "info106", r->info106);
2181 ndr->depth--;
2182 break;
2184 default:
2185 ndr_print_bad_level(ndr, name, level);
2189 static enum ndr_err_code ndr_push_dfs_EnumArray1(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray1 *r)
2191 uint32_t cntr_s_1;
2192 if (ndr_flags & NDR_SCALARS) {
2193 NDR_CHECK(ndr_push_align(ndr, 4));
2194 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2195 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2197 if (ndr_flags & NDR_BUFFERS) {
2198 if (r->s) {
2199 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2200 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2201 NDR_CHECK(ndr_push_dfs_Info1(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2203 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2204 NDR_CHECK(ndr_push_dfs_Info1(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2208 return NDR_ERR_SUCCESS;
2211 static enum ndr_err_code ndr_pull_dfs_EnumArray1(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray1 *r)
2213 uint32_t _ptr_s;
2214 uint32_t cntr_s_1;
2215 TALLOC_CTX *_mem_save_s_0;
2216 TALLOC_CTX *_mem_save_s_1;
2217 if (ndr_flags & NDR_SCALARS) {
2218 NDR_CHECK(ndr_pull_align(ndr, 4));
2219 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2220 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2221 if (_ptr_s) {
2222 NDR_PULL_ALLOC(ndr, r->s);
2223 } else {
2224 r->s = NULL;
2227 if (ndr_flags & NDR_BUFFERS) {
2228 if (r->s) {
2229 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2230 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2231 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2232 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
2233 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2234 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2235 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2236 NDR_CHECK(ndr_pull_dfs_Info1(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2238 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2239 NDR_CHECK(ndr_pull_dfs_Info1(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2241 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2242 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2244 if (r->s) {
2245 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2248 return NDR_ERR_SUCCESS;
2251 _PUBLIC_ void ndr_print_dfs_EnumArray1(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray1 *r)
2253 uint32_t cntr_s_1;
2254 ndr_print_struct(ndr, name, "dfs_EnumArray1");
2255 ndr->depth++;
2256 ndr_print_uint32(ndr, "count", r->count);
2257 ndr_print_ptr(ndr, "s", r->s);
2258 ndr->depth++;
2259 if (r->s) {
2260 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
2261 ndr->depth++;
2262 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2263 char *idx_1=NULL;
2264 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2265 ndr_print_dfs_Info1(ndr, "s", &r->s[cntr_s_1]);
2266 free(idx_1);
2269 ndr->depth--;
2271 ndr->depth--;
2272 ndr->depth--;
2275 static enum ndr_err_code ndr_push_dfs_EnumArray2(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray2 *r)
2277 uint32_t cntr_s_1;
2278 if (ndr_flags & NDR_SCALARS) {
2279 NDR_CHECK(ndr_push_align(ndr, 4));
2280 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2281 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2283 if (ndr_flags & NDR_BUFFERS) {
2284 if (r->s) {
2285 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2286 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2287 NDR_CHECK(ndr_push_dfs_Info2(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2289 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2290 NDR_CHECK(ndr_push_dfs_Info2(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2294 return NDR_ERR_SUCCESS;
2297 static enum ndr_err_code ndr_pull_dfs_EnumArray2(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray2 *r)
2299 uint32_t _ptr_s;
2300 uint32_t cntr_s_1;
2301 TALLOC_CTX *_mem_save_s_0;
2302 TALLOC_CTX *_mem_save_s_1;
2303 if (ndr_flags & NDR_SCALARS) {
2304 NDR_CHECK(ndr_pull_align(ndr, 4));
2305 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2306 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2307 if (_ptr_s) {
2308 NDR_PULL_ALLOC(ndr, r->s);
2309 } else {
2310 r->s = NULL;
2313 if (ndr_flags & NDR_BUFFERS) {
2314 if (r->s) {
2315 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2316 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2317 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2318 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
2319 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2320 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2321 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2322 NDR_CHECK(ndr_pull_dfs_Info2(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2324 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2325 NDR_CHECK(ndr_pull_dfs_Info2(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2327 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2328 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2330 if (r->s) {
2331 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2334 return NDR_ERR_SUCCESS;
2337 _PUBLIC_ void ndr_print_dfs_EnumArray2(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray2 *r)
2339 uint32_t cntr_s_1;
2340 ndr_print_struct(ndr, name, "dfs_EnumArray2");
2341 ndr->depth++;
2342 ndr_print_uint32(ndr, "count", r->count);
2343 ndr_print_ptr(ndr, "s", r->s);
2344 ndr->depth++;
2345 if (r->s) {
2346 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
2347 ndr->depth++;
2348 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2349 char *idx_1=NULL;
2350 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2351 ndr_print_dfs_Info2(ndr, "s", &r->s[cntr_s_1]);
2352 free(idx_1);
2355 ndr->depth--;
2357 ndr->depth--;
2358 ndr->depth--;
2361 static enum ndr_err_code ndr_push_dfs_EnumArray3(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray3 *r)
2363 uint32_t cntr_s_1;
2364 if (ndr_flags & NDR_SCALARS) {
2365 NDR_CHECK(ndr_push_align(ndr, 4));
2366 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2367 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2369 if (ndr_flags & NDR_BUFFERS) {
2370 if (r->s) {
2371 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2372 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2373 NDR_CHECK(ndr_push_dfs_Info3(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2375 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2376 NDR_CHECK(ndr_push_dfs_Info3(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2380 return NDR_ERR_SUCCESS;
2383 static enum ndr_err_code ndr_pull_dfs_EnumArray3(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray3 *r)
2385 uint32_t _ptr_s;
2386 uint32_t cntr_s_1;
2387 TALLOC_CTX *_mem_save_s_0;
2388 TALLOC_CTX *_mem_save_s_1;
2389 if (ndr_flags & NDR_SCALARS) {
2390 NDR_CHECK(ndr_pull_align(ndr, 4));
2391 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2392 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2393 if (_ptr_s) {
2394 NDR_PULL_ALLOC(ndr, r->s);
2395 } else {
2396 r->s = NULL;
2399 if (ndr_flags & NDR_BUFFERS) {
2400 if (r->s) {
2401 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2402 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2403 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2404 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
2405 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2406 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2407 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2408 NDR_CHECK(ndr_pull_dfs_Info3(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2410 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2411 NDR_CHECK(ndr_pull_dfs_Info3(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2413 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2414 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2416 if (r->s) {
2417 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2420 return NDR_ERR_SUCCESS;
2423 _PUBLIC_ void ndr_print_dfs_EnumArray3(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray3 *r)
2425 uint32_t cntr_s_1;
2426 ndr_print_struct(ndr, name, "dfs_EnumArray3");
2427 ndr->depth++;
2428 ndr_print_uint32(ndr, "count", r->count);
2429 ndr_print_ptr(ndr, "s", r->s);
2430 ndr->depth++;
2431 if (r->s) {
2432 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
2433 ndr->depth++;
2434 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2435 char *idx_1=NULL;
2436 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2437 ndr_print_dfs_Info3(ndr, "s", &r->s[cntr_s_1]);
2438 free(idx_1);
2441 ndr->depth--;
2443 ndr->depth--;
2444 ndr->depth--;
2447 static enum ndr_err_code ndr_push_dfs_EnumArray4(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray4 *r)
2449 uint32_t cntr_s_1;
2450 if (ndr_flags & NDR_SCALARS) {
2451 NDR_CHECK(ndr_push_align(ndr, 4));
2452 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2453 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2455 if (ndr_flags & NDR_BUFFERS) {
2456 if (r->s) {
2457 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2458 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2459 NDR_CHECK(ndr_push_dfs_Info4(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2461 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2462 NDR_CHECK(ndr_push_dfs_Info4(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2466 return NDR_ERR_SUCCESS;
2469 static enum ndr_err_code ndr_pull_dfs_EnumArray4(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray4 *r)
2471 uint32_t _ptr_s;
2472 uint32_t cntr_s_1;
2473 TALLOC_CTX *_mem_save_s_0;
2474 TALLOC_CTX *_mem_save_s_1;
2475 if (ndr_flags & NDR_SCALARS) {
2476 NDR_CHECK(ndr_pull_align(ndr, 4));
2477 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2478 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2479 if (_ptr_s) {
2480 NDR_PULL_ALLOC(ndr, r->s);
2481 } else {
2482 r->s = NULL;
2485 if (ndr_flags & NDR_BUFFERS) {
2486 if (r->s) {
2487 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2488 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2489 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2490 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
2491 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2492 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2493 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2494 NDR_CHECK(ndr_pull_dfs_Info4(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2496 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2497 NDR_CHECK(ndr_pull_dfs_Info4(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2499 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2500 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2502 if (r->s) {
2503 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2506 return NDR_ERR_SUCCESS;
2509 _PUBLIC_ void ndr_print_dfs_EnumArray4(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray4 *r)
2511 uint32_t cntr_s_1;
2512 ndr_print_struct(ndr, name, "dfs_EnumArray4");
2513 ndr->depth++;
2514 ndr_print_uint32(ndr, "count", r->count);
2515 ndr_print_ptr(ndr, "s", r->s);
2516 ndr->depth++;
2517 if (r->s) {
2518 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
2519 ndr->depth++;
2520 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2521 char *idx_1=NULL;
2522 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2523 ndr_print_dfs_Info4(ndr, "s", &r->s[cntr_s_1]);
2524 free(idx_1);
2527 ndr->depth--;
2529 ndr->depth--;
2530 ndr->depth--;
2533 static enum ndr_err_code ndr_push_dfs_EnumArray5(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray5 *r)
2535 uint32_t cntr_s_1;
2536 if (ndr_flags & NDR_SCALARS) {
2537 NDR_CHECK(ndr_push_align(ndr, 4));
2538 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2539 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2541 if (ndr_flags & NDR_BUFFERS) {
2542 if (r->s) {
2543 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2544 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2545 NDR_CHECK(ndr_push_dfs_Info5(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2547 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2548 NDR_CHECK(ndr_push_dfs_Info5(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2552 return NDR_ERR_SUCCESS;
2555 static enum ndr_err_code ndr_pull_dfs_EnumArray5(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray5 *r)
2557 uint32_t _ptr_s;
2558 uint32_t cntr_s_1;
2559 TALLOC_CTX *_mem_save_s_0;
2560 TALLOC_CTX *_mem_save_s_1;
2561 if (ndr_flags & NDR_SCALARS) {
2562 NDR_CHECK(ndr_pull_align(ndr, 4));
2563 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2564 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2565 if (_ptr_s) {
2566 NDR_PULL_ALLOC(ndr, r->s);
2567 } else {
2568 r->s = NULL;
2571 if (ndr_flags & NDR_BUFFERS) {
2572 if (r->s) {
2573 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2574 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2575 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2576 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
2577 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2578 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2579 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2580 NDR_CHECK(ndr_pull_dfs_Info5(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2582 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2583 NDR_CHECK(ndr_pull_dfs_Info5(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2585 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2586 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2588 if (r->s) {
2589 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2592 return NDR_ERR_SUCCESS;
2595 _PUBLIC_ void ndr_print_dfs_EnumArray5(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray5 *r)
2597 uint32_t cntr_s_1;
2598 ndr_print_struct(ndr, name, "dfs_EnumArray5");
2599 ndr->depth++;
2600 ndr_print_uint32(ndr, "count", r->count);
2601 ndr_print_ptr(ndr, "s", r->s);
2602 ndr->depth++;
2603 if (r->s) {
2604 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
2605 ndr->depth++;
2606 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2607 char *idx_1=NULL;
2608 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2609 ndr_print_dfs_Info5(ndr, "s", &r->s[cntr_s_1]);
2610 free(idx_1);
2613 ndr->depth--;
2615 ndr->depth--;
2616 ndr->depth--;
2619 static enum ndr_err_code ndr_push_dfs_EnumArray6(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray6 *r)
2621 uint32_t cntr_s_1;
2622 if (ndr_flags & NDR_SCALARS) {
2623 NDR_CHECK(ndr_push_align(ndr, 4));
2624 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2625 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2627 if (ndr_flags & NDR_BUFFERS) {
2628 if (r->s) {
2629 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2630 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2631 NDR_CHECK(ndr_push_dfs_Info6(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2633 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2634 NDR_CHECK(ndr_push_dfs_Info6(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2638 return NDR_ERR_SUCCESS;
2641 static enum ndr_err_code ndr_pull_dfs_EnumArray6(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray6 *r)
2643 uint32_t _ptr_s;
2644 uint32_t cntr_s_1;
2645 TALLOC_CTX *_mem_save_s_0;
2646 TALLOC_CTX *_mem_save_s_1;
2647 if (ndr_flags & NDR_SCALARS) {
2648 NDR_CHECK(ndr_pull_align(ndr, 4));
2649 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2650 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2651 if (_ptr_s) {
2652 NDR_PULL_ALLOC(ndr, r->s);
2653 } else {
2654 r->s = NULL;
2657 if (ndr_flags & NDR_BUFFERS) {
2658 if (r->s) {
2659 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2660 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2661 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2662 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
2663 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2664 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2665 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2666 NDR_CHECK(ndr_pull_dfs_Info6(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2668 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2669 NDR_CHECK(ndr_pull_dfs_Info6(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2671 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2672 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2674 if (r->s) {
2675 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2678 return NDR_ERR_SUCCESS;
2681 _PUBLIC_ void ndr_print_dfs_EnumArray6(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray6 *r)
2683 uint32_t cntr_s_1;
2684 ndr_print_struct(ndr, name, "dfs_EnumArray6");
2685 ndr->depth++;
2686 ndr_print_uint32(ndr, "count", r->count);
2687 ndr_print_ptr(ndr, "s", r->s);
2688 ndr->depth++;
2689 if (r->s) {
2690 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
2691 ndr->depth++;
2692 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2693 char *idx_1=NULL;
2694 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2695 ndr_print_dfs_Info6(ndr, "s", &r->s[cntr_s_1]);
2696 free(idx_1);
2699 ndr->depth--;
2701 ndr->depth--;
2702 ndr->depth--;
2705 static enum ndr_err_code ndr_push_dfs_EnumArray200(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray200 *r)
2707 uint32_t cntr_s_1;
2708 if (ndr_flags & NDR_SCALARS) {
2709 NDR_CHECK(ndr_push_align(ndr, 4));
2710 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2711 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2713 if (ndr_flags & NDR_BUFFERS) {
2714 if (r->s) {
2715 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2716 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2717 NDR_CHECK(ndr_push_dfs_Info200(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2719 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2720 NDR_CHECK(ndr_push_dfs_Info200(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2724 return NDR_ERR_SUCCESS;
2727 static enum ndr_err_code ndr_pull_dfs_EnumArray200(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray200 *r)
2729 uint32_t _ptr_s;
2730 uint32_t cntr_s_1;
2731 TALLOC_CTX *_mem_save_s_0;
2732 TALLOC_CTX *_mem_save_s_1;
2733 if (ndr_flags & NDR_SCALARS) {
2734 NDR_CHECK(ndr_pull_align(ndr, 4));
2735 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2736 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2737 if (_ptr_s) {
2738 NDR_PULL_ALLOC(ndr, r->s);
2739 } else {
2740 r->s = NULL;
2743 if (ndr_flags & NDR_BUFFERS) {
2744 if (r->s) {
2745 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2746 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2747 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2748 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
2749 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2750 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2751 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2752 NDR_CHECK(ndr_pull_dfs_Info200(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2754 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2755 NDR_CHECK(ndr_pull_dfs_Info200(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2757 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2758 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2760 if (r->s) {
2761 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2764 return NDR_ERR_SUCCESS;
2767 _PUBLIC_ void ndr_print_dfs_EnumArray200(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray200 *r)
2769 uint32_t cntr_s_1;
2770 ndr_print_struct(ndr, name, "dfs_EnumArray200");
2771 ndr->depth++;
2772 ndr_print_uint32(ndr, "count", r->count);
2773 ndr_print_ptr(ndr, "s", r->s);
2774 ndr->depth++;
2775 if (r->s) {
2776 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
2777 ndr->depth++;
2778 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2779 char *idx_1=NULL;
2780 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2781 ndr_print_dfs_Info200(ndr, "s", &r->s[cntr_s_1]);
2782 free(idx_1);
2785 ndr->depth--;
2787 ndr->depth--;
2788 ndr->depth--;
2791 static enum ndr_err_code ndr_push_dfs_EnumArray300(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray300 *r)
2793 uint32_t cntr_s_1;
2794 if (ndr_flags & NDR_SCALARS) {
2795 NDR_CHECK(ndr_push_align(ndr, 4));
2796 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2797 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2799 if (ndr_flags & NDR_BUFFERS) {
2800 if (r->s) {
2801 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2802 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2803 NDR_CHECK(ndr_push_dfs_Info300(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2805 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2806 NDR_CHECK(ndr_push_dfs_Info300(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2810 return NDR_ERR_SUCCESS;
2813 static enum ndr_err_code ndr_pull_dfs_EnumArray300(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray300 *r)
2815 uint32_t _ptr_s;
2816 uint32_t cntr_s_1;
2817 TALLOC_CTX *_mem_save_s_0;
2818 TALLOC_CTX *_mem_save_s_1;
2819 if (ndr_flags & NDR_SCALARS) {
2820 NDR_CHECK(ndr_pull_align(ndr, 4));
2821 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2822 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2823 if (_ptr_s) {
2824 NDR_PULL_ALLOC(ndr, r->s);
2825 } else {
2826 r->s = NULL;
2829 if (ndr_flags & NDR_BUFFERS) {
2830 if (r->s) {
2831 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2832 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2833 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2834 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
2835 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2836 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2837 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2838 NDR_CHECK(ndr_pull_dfs_Info300(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2840 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2841 NDR_CHECK(ndr_pull_dfs_Info300(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2843 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2844 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2846 if (r->s) {
2847 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2850 return NDR_ERR_SUCCESS;
2853 _PUBLIC_ void ndr_print_dfs_EnumArray300(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray300 *r)
2855 uint32_t cntr_s_1;
2856 ndr_print_struct(ndr, name, "dfs_EnumArray300");
2857 ndr->depth++;
2858 ndr_print_uint32(ndr, "count", r->count);
2859 ndr_print_ptr(ndr, "s", r->s);
2860 ndr->depth++;
2861 if (r->s) {
2862 ndr->print(ndr, "%s: ARRAY(%d)", "s", (int)r->count);
2863 ndr->depth++;
2864 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2865 char *idx_1=NULL;
2866 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2867 ndr_print_dfs_Info300(ndr, "s", &r->s[cntr_s_1]);
2868 free(idx_1);
2871 ndr->depth--;
2873 ndr->depth--;
2874 ndr->depth--;
2877 static enum ndr_err_code ndr_push_dfs_EnumInfo(struct ndr_push *ndr, int ndr_flags, const union dfs_EnumInfo *r)
2879 if (ndr_flags & NDR_SCALARS) {
2880 int level = ndr_push_get_switch_value(ndr, r);
2881 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
2882 switch (level) {
2883 case 1: {
2884 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
2885 break; }
2887 case 2: {
2888 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
2889 break; }
2891 case 3: {
2892 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3));
2893 break; }
2895 case 4: {
2896 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info4));
2897 break; }
2899 case 5: {
2900 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info5));
2901 break; }
2903 case 6: {
2904 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info6));
2905 break; }
2907 case 200: {
2908 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info200));
2909 break; }
2911 case 300: {
2912 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info300));
2913 break; }
2915 default:
2916 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2919 if (ndr_flags & NDR_BUFFERS) {
2920 int level = ndr_push_get_switch_value(ndr, r);
2921 switch (level) {
2922 case 1:
2923 if (r->info1) {
2924 NDR_CHECK(ndr_push_dfs_EnumArray1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
2926 break;
2928 case 2:
2929 if (r->info2) {
2930 NDR_CHECK(ndr_push_dfs_EnumArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
2932 break;
2934 case 3:
2935 if (r->info3) {
2936 NDR_CHECK(ndr_push_dfs_EnumArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
2938 break;
2940 case 4:
2941 if (r->info4) {
2942 NDR_CHECK(ndr_push_dfs_EnumArray4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
2944 break;
2946 case 5:
2947 if (r->info5) {
2948 NDR_CHECK(ndr_push_dfs_EnumArray5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5));
2950 break;
2952 case 6:
2953 if (r->info6) {
2954 NDR_CHECK(ndr_push_dfs_EnumArray6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6));
2956 break;
2958 case 200:
2959 if (r->info200) {
2960 NDR_CHECK(ndr_push_dfs_EnumArray200(ndr, NDR_SCALARS|NDR_BUFFERS, r->info200));
2962 break;
2964 case 300:
2965 if (r->info300) {
2966 NDR_CHECK(ndr_push_dfs_EnumArray300(ndr, NDR_SCALARS|NDR_BUFFERS, r->info300));
2968 break;
2970 default:
2971 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2974 return NDR_ERR_SUCCESS;
2977 static enum ndr_err_code ndr_pull_dfs_EnumInfo(struct ndr_pull *ndr, int ndr_flags, union dfs_EnumInfo *r)
2979 int level;
2980 uint32_t _level;
2981 TALLOC_CTX *_mem_save_info1_0;
2982 TALLOC_CTX *_mem_save_info2_0;
2983 TALLOC_CTX *_mem_save_info3_0;
2984 TALLOC_CTX *_mem_save_info4_0;
2985 TALLOC_CTX *_mem_save_info5_0;
2986 TALLOC_CTX *_mem_save_info6_0;
2987 TALLOC_CTX *_mem_save_info200_0;
2988 TALLOC_CTX *_mem_save_info300_0;
2989 level = ndr_pull_get_switch_value(ndr, r);
2990 if (ndr_flags & NDR_SCALARS) {
2991 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
2992 if (_level != level) {
2993 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
2995 switch (level) {
2996 case 1: {
2997 uint32_t _ptr_info1;
2998 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
2999 if (_ptr_info1) {
3000 NDR_PULL_ALLOC(ndr, r->info1);
3001 } else {
3002 r->info1 = NULL;
3004 break; }
3006 case 2: {
3007 uint32_t _ptr_info2;
3008 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
3009 if (_ptr_info2) {
3010 NDR_PULL_ALLOC(ndr, r->info2);
3011 } else {
3012 r->info2 = NULL;
3014 break; }
3016 case 3: {
3017 uint32_t _ptr_info3;
3018 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info3));
3019 if (_ptr_info3) {
3020 NDR_PULL_ALLOC(ndr, r->info3);
3021 } else {
3022 r->info3 = NULL;
3024 break; }
3026 case 4: {
3027 uint32_t _ptr_info4;
3028 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info4));
3029 if (_ptr_info4) {
3030 NDR_PULL_ALLOC(ndr, r->info4);
3031 } else {
3032 r->info4 = NULL;
3034 break; }
3036 case 5: {
3037 uint32_t _ptr_info5;
3038 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info5));
3039 if (_ptr_info5) {
3040 NDR_PULL_ALLOC(ndr, r->info5);
3041 } else {
3042 r->info5 = NULL;
3044 break; }
3046 case 6: {
3047 uint32_t _ptr_info6;
3048 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info6));
3049 if (_ptr_info6) {
3050 NDR_PULL_ALLOC(ndr, r->info6);
3051 } else {
3052 r->info6 = NULL;
3054 break; }
3056 case 200: {
3057 uint32_t _ptr_info200;
3058 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info200));
3059 if (_ptr_info200) {
3060 NDR_PULL_ALLOC(ndr, r->info200);
3061 } else {
3062 r->info200 = NULL;
3064 break; }
3066 case 300: {
3067 uint32_t _ptr_info300;
3068 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info300));
3069 if (_ptr_info300) {
3070 NDR_PULL_ALLOC(ndr, r->info300);
3071 } else {
3072 r->info300 = NULL;
3074 break; }
3076 default:
3077 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
3080 if (ndr_flags & NDR_BUFFERS) {
3081 switch (level) {
3082 case 1:
3083 if (r->info1) {
3084 _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
3085 NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
3086 NDR_CHECK(ndr_pull_dfs_EnumArray1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
3087 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
3089 break;
3091 case 2:
3092 if (r->info2) {
3093 _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
3094 NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
3095 NDR_CHECK(ndr_pull_dfs_EnumArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
3096 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
3098 break;
3100 case 3:
3101 if (r->info3) {
3102 _mem_save_info3_0 = NDR_PULL_GET_MEM_CTX(ndr);
3103 NDR_PULL_SET_MEM_CTX(ndr, r->info3, 0);
3104 NDR_CHECK(ndr_pull_dfs_EnumArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
3105 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info3_0, 0);
3107 break;
3109 case 4:
3110 if (r->info4) {
3111 _mem_save_info4_0 = NDR_PULL_GET_MEM_CTX(ndr);
3112 NDR_PULL_SET_MEM_CTX(ndr, r->info4, 0);
3113 NDR_CHECK(ndr_pull_dfs_EnumArray4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
3114 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info4_0, 0);
3116 break;
3118 case 5:
3119 if (r->info5) {
3120 _mem_save_info5_0 = NDR_PULL_GET_MEM_CTX(ndr);
3121 NDR_PULL_SET_MEM_CTX(ndr, r->info5, 0);
3122 NDR_CHECK(ndr_pull_dfs_EnumArray5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5));
3123 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info5_0, 0);
3125 break;
3127 case 6:
3128 if (r->info6) {
3129 _mem_save_info6_0 = NDR_PULL_GET_MEM_CTX(ndr);
3130 NDR_PULL_SET_MEM_CTX(ndr, r->info6, 0);
3131 NDR_CHECK(ndr_pull_dfs_EnumArray6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6));
3132 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info6_0, 0);
3134 break;
3136 case 200:
3137 if (r->info200) {
3138 _mem_save_info200_0 = NDR_PULL_GET_MEM_CTX(ndr);
3139 NDR_PULL_SET_MEM_CTX(ndr, r->info200, 0);
3140 NDR_CHECK(ndr_pull_dfs_EnumArray200(ndr, NDR_SCALARS|NDR_BUFFERS, r->info200));
3141 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info200_0, 0);
3143 break;
3145 case 300:
3146 if (r->info300) {
3147 _mem_save_info300_0 = NDR_PULL_GET_MEM_CTX(ndr);
3148 NDR_PULL_SET_MEM_CTX(ndr, r->info300, 0);
3149 NDR_CHECK(ndr_pull_dfs_EnumArray300(ndr, NDR_SCALARS|NDR_BUFFERS, r->info300));
3150 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info300_0, 0);
3152 break;
3154 default:
3155 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
3158 return NDR_ERR_SUCCESS;
3161 _PUBLIC_ void ndr_print_dfs_EnumInfo(struct ndr_print *ndr, const char *name, const union dfs_EnumInfo *r)
3163 int level;
3164 level = ndr_print_get_switch_value(ndr, r);
3165 ndr_print_union(ndr, name, level, "dfs_EnumInfo");
3166 switch (level) {
3167 case 1:
3168 ndr_print_ptr(ndr, "info1", r->info1);
3169 ndr->depth++;
3170 if (r->info1) {
3171 ndr_print_dfs_EnumArray1(ndr, "info1", r->info1);
3173 ndr->depth--;
3174 break;
3176 case 2:
3177 ndr_print_ptr(ndr, "info2", r->info2);
3178 ndr->depth++;
3179 if (r->info2) {
3180 ndr_print_dfs_EnumArray2(ndr, "info2", r->info2);
3182 ndr->depth--;
3183 break;
3185 case 3:
3186 ndr_print_ptr(ndr, "info3", r->info3);
3187 ndr->depth++;
3188 if (r->info3) {
3189 ndr_print_dfs_EnumArray3(ndr, "info3", r->info3);
3191 ndr->depth--;
3192 break;
3194 case 4:
3195 ndr_print_ptr(ndr, "info4", r->info4);
3196 ndr->depth++;
3197 if (r->info4) {
3198 ndr_print_dfs_EnumArray4(ndr, "info4", r->info4);
3200 ndr->depth--;
3201 break;
3203 case 5:
3204 ndr_print_ptr(ndr, "info5", r->info5);
3205 ndr->depth++;
3206 if (r->info5) {
3207 ndr_print_dfs_EnumArray5(ndr, "info5", r->info5);
3209 ndr->depth--;
3210 break;
3212 case 6:
3213 ndr_print_ptr(ndr, "info6", r->info6);
3214 ndr->depth++;
3215 if (r->info6) {
3216 ndr_print_dfs_EnumArray6(ndr, "info6", r->info6);
3218 ndr->depth--;
3219 break;
3221 case 200:
3222 ndr_print_ptr(ndr, "info200", r->info200);
3223 ndr->depth++;
3224 if (r->info200) {
3225 ndr_print_dfs_EnumArray200(ndr, "info200", r->info200);
3227 ndr->depth--;
3228 break;
3230 case 300:
3231 ndr_print_ptr(ndr, "info300", r->info300);
3232 ndr->depth++;
3233 if (r->info300) {
3234 ndr_print_dfs_EnumArray300(ndr, "info300", r->info300);
3236 ndr->depth--;
3237 break;
3239 default:
3240 ndr_print_bad_level(ndr, name, level);
3244 static enum ndr_err_code ndr_push_dfs_EnumStruct(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumStruct *r)
3246 if (ndr_flags & NDR_SCALARS) {
3247 NDR_CHECK(ndr_push_align(ndr, 4));
3248 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
3249 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->e, r->level));
3250 NDR_CHECK(ndr_push_dfs_EnumInfo(ndr, NDR_SCALARS, &r->e));
3252 if (ndr_flags & NDR_BUFFERS) {
3253 NDR_CHECK(ndr_push_dfs_EnumInfo(ndr, NDR_BUFFERS, &r->e));
3255 return NDR_ERR_SUCCESS;
3258 static enum ndr_err_code ndr_pull_dfs_EnumStruct(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumStruct *r)
3260 if (ndr_flags & NDR_SCALARS) {
3261 NDR_CHECK(ndr_pull_align(ndr, 4));
3262 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
3263 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->e, r->level));
3264 NDR_CHECK(ndr_pull_dfs_EnumInfo(ndr, NDR_SCALARS, &r->e));
3266 if (ndr_flags & NDR_BUFFERS) {
3267 NDR_CHECK(ndr_pull_dfs_EnumInfo(ndr, NDR_BUFFERS, &r->e));
3269 return NDR_ERR_SUCCESS;
3272 _PUBLIC_ void ndr_print_dfs_EnumStruct(struct ndr_print *ndr, const char *name, const struct dfs_EnumStruct *r)
3274 ndr_print_struct(ndr, name, "dfs_EnumStruct");
3275 ndr->depth++;
3276 ndr_print_uint32(ndr, "level", r->level);
3277 ndr_print_set_switch_value(ndr, &r->e, r->level);
3278 ndr_print_dfs_EnumInfo(ndr, "e", &r->e);
3279 ndr->depth--;
3282 static enum ndr_err_code ndr_push_dfs_UnknownStruct(struct ndr_push *ndr, int ndr_flags, const struct dfs_UnknownStruct *r)
3284 if (ndr_flags & NDR_SCALARS) {
3285 NDR_CHECK(ndr_push_align(ndr, 4));
3286 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
3287 NDR_CHECK(ndr_push_unique_ptr(ndr, r->unknown2));
3289 if (ndr_flags & NDR_BUFFERS) {
3290 if (r->unknown2) {
3291 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->unknown2, CH_UTF16)));
3292 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3293 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->unknown2, CH_UTF16)));
3294 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->unknown2, ndr_charset_length(r->unknown2, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3297 return NDR_ERR_SUCCESS;
3300 static enum ndr_err_code ndr_pull_dfs_UnknownStruct(struct ndr_pull *ndr, int ndr_flags, struct dfs_UnknownStruct *r)
3302 uint32_t _ptr_unknown2;
3303 TALLOC_CTX *_mem_save_unknown2_0;
3304 if (ndr_flags & NDR_SCALARS) {
3305 NDR_CHECK(ndr_pull_align(ndr, 4));
3306 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
3307 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
3308 if (_ptr_unknown2) {
3309 NDR_PULL_ALLOC(ndr, r->unknown2);
3310 } else {
3311 r->unknown2 = NULL;
3314 if (ndr_flags & NDR_BUFFERS) {
3315 if (r->unknown2) {
3316 _mem_save_unknown2_0 = NDR_PULL_GET_MEM_CTX(ndr);
3317 NDR_PULL_SET_MEM_CTX(ndr, r->unknown2, 0);
3318 NDR_CHECK(ndr_pull_array_size(ndr, &r->unknown2));
3319 NDR_CHECK(ndr_pull_array_length(ndr, &r->unknown2));
3320 if (ndr_get_array_length(ndr, &r->unknown2) > ndr_get_array_size(ndr, &r->unknown2)) {
3321 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));
3323 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->unknown2), sizeof(uint16_t)));
3324 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->unknown2, ndr_get_array_length(ndr, &r->unknown2), sizeof(uint16_t), CH_UTF16));
3325 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_0, 0);
3328 return NDR_ERR_SUCCESS;
3331 _PUBLIC_ void ndr_print_dfs_UnknownStruct(struct ndr_print *ndr, const char *name, const struct dfs_UnknownStruct *r)
3333 ndr_print_struct(ndr, name, "dfs_UnknownStruct");
3334 ndr->depth++;
3335 ndr_print_uint32(ndr, "unknown1", r->unknown1);
3336 ndr_print_ptr(ndr, "unknown2", r->unknown2);
3337 ndr->depth++;
3338 if (r->unknown2) {
3339 ndr_print_string(ndr, "unknown2", r->unknown2);
3341 ndr->depth--;
3342 ndr->depth--;
3345 _PUBLIC_ enum ndr_err_code ndr_push_dfs_GetManagerVersion(struct ndr_push *ndr, int flags, const struct dfs_GetManagerVersion *r)
3347 if (flags & NDR_IN) {
3349 if (flags & NDR_OUT) {
3350 if (r->out.version == NULL) {
3351 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3353 NDR_CHECK(ndr_push_dfs_ManagerVersion(ndr, NDR_SCALARS, *r->out.version));
3355 return NDR_ERR_SUCCESS;
3358 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_GetManagerVersion(struct ndr_pull *ndr, int flags, struct dfs_GetManagerVersion *r)
3360 TALLOC_CTX *_mem_save_version_0;
3361 if (flags & NDR_IN) {
3362 ZERO_STRUCT(r->out);
3364 NDR_PULL_ALLOC(ndr, r->out.version);
3365 ZERO_STRUCTP(r->out.version);
3367 if (flags & NDR_OUT) {
3368 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3369 NDR_PULL_ALLOC(ndr, r->out.version);
3371 _mem_save_version_0 = NDR_PULL_GET_MEM_CTX(ndr);
3372 NDR_PULL_SET_MEM_CTX(ndr, r->out.version, LIBNDR_FLAG_REF_ALLOC);
3373 NDR_CHECK(ndr_pull_dfs_ManagerVersion(ndr, NDR_SCALARS, r->out.version));
3374 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_version_0, LIBNDR_FLAG_REF_ALLOC);
3376 return NDR_ERR_SUCCESS;
3379 _PUBLIC_ void ndr_print_dfs_GetManagerVersion(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetManagerVersion *r)
3381 ndr_print_struct(ndr, name, "dfs_GetManagerVersion");
3382 ndr->depth++;
3383 if (flags & NDR_SET_VALUES) {
3384 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3386 if (flags & NDR_IN) {
3387 ndr_print_struct(ndr, "in", "dfs_GetManagerVersion");
3388 ndr->depth++;
3389 ndr->depth--;
3391 if (flags & NDR_OUT) {
3392 ndr_print_struct(ndr, "out", "dfs_GetManagerVersion");
3393 ndr->depth++;
3394 ndr_print_ptr(ndr, "version", r->out.version);
3395 ndr->depth++;
3396 ndr_print_dfs_ManagerVersion(ndr, "version", *r->out.version);
3397 ndr->depth--;
3398 ndr->depth--;
3400 ndr->depth--;
3403 static enum ndr_err_code ndr_push_dfs_Add(struct ndr_push *ndr, int flags, const struct dfs_Add *r)
3405 if (flags & NDR_IN) {
3406 if (r->in.path == NULL) {
3407 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3409 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
3410 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3411 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
3412 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path, ndr_charset_length(r->in.path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3413 if (r->in.server == 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.server, 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.server, CH_UTF16)));
3419 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server, ndr_charset_length(r->in.server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3420 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.share));
3421 if (r->in.share) {
3422 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
3423 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3424 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
3425 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share, ndr_charset_length(r->in.share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3427 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.comment));
3428 if (r->in.comment) {
3429 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, 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.comment, CH_UTF16)));
3432 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.comment, ndr_charset_length(r->in.comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3434 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
3436 if (flags & NDR_OUT) {
3437 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3439 return NDR_ERR_SUCCESS;
3442 static enum ndr_err_code ndr_pull_dfs_Add(struct ndr_pull *ndr, int flags, struct dfs_Add *r)
3444 uint32_t _ptr_share;
3445 uint32_t _ptr_comment;
3446 TALLOC_CTX *_mem_save_share_0;
3447 TALLOC_CTX *_mem_save_comment_0;
3448 if (flags & NDR_IN) {
3449 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path));
3450 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path));
3451 if (ndr_get_array_length(ndr, &r->in.path) > ndr_get_array_size(ndr, &r->in.path)) {
3452 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));
3454 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t)));
3455 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t), CH_UTF16));
3456 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server));
3457 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server));
3458 if (ndr_get_array_length(ndr, &r->in.server) > ndr_get_array_size(ndr, &r->in.server)) {
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.server), ndr_get_array_length(ndr, &r->in.server));
3461 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t)));
3462 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t), CH_UTF16));
3463 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share));
3464 if (_ptr_share) {
3465 NDR_PULL_ALLOC(ndr, r->in.share);
3466 } else {
3467 r->in.share = NULL;
3469 if (r->in.share) {
3470 _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr);
3471 NDR_PULL_SET_MEM_CTX(ndr, r->in.share, 0);
3472 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share));
3473 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share));
3474 if (ndr_get_array_length(ndr, &r->in.share) > ndr_get_array_size(ndr, &r->in.share)) {
3475 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));
3477 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t)));
3478 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t), CH_UTF16));
3479 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0);
3481 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
3482 if (_ptr_comment) {
3483 NDR_PULL_ALLOC(ndr, r->in.comment);
3484 } else {
3485 r->in.comment = NULL;
3487 if (r->in.comment) {
3488 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
3489 NDR_PULL_SET_MEM_CTX(ndr, r->in.comment, 0);
3490 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.comment));
3491 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.comment));
3492 if (ndr_get_array_length(ndr, &r->in.comment) > ndr_get_array_size(ndr, &r->in.comment)) {
3493 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));
3495 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t)));
3496 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.comment, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t), CH_UTF16));
3497 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
3499 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
3501 if (flags & NDR_OUT) {
3502 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3504 return NDR_ERR_SUCCESS;
3507 _PUBLIC_ void ndr_print_dfs_Add(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Add *r)
3509 ndr_print_struct(ndr, name, "dfs_Add");
3510 ndr->depth++;
3511 if (flags & NDR_SET_VALUES) {
3512 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3514 if (flags & NDR_IN) {
3515 ndr_print_struct(ndr, "in", "dfs_Add");
3516 ndr->depth++;
3517 ndr_print_ptr(ndr, "path", r->in.path);
3518 ndr->depth++;
3519 ndr_print_string(ndr, "path", r->in.path);
3520 ndr->depth--;
3521 ndr_print_ptr(ndr, "server", r->in.server);
3522 ndr->depth++;
3523 ndr_print_string(ndr, "server", r->in.server);
3524 ndr->depth--;
3525 ndr_print_ptr(ndr, "share", r->in.share);
3526 ndr->depth++;
3527 if (r->in.share) {
3528 ndr_print_string(ndr, "share", r->in.share);
3530 ndr->depth--;
3531 ndr_print_ptr(ndr, "comment", r->in.comment);
3532 ndr->depth++;
3533 if (r->in.comment) {
3534 ndr_print_string(ndr, "comment", r->in.comment);
3536 ndr->depth--;
3537 ndr_print_uint32(ndr, "flags", r->in.flags);
3538 ndr->depth--;
3540 if (flags & NDR_OUT) {
3541 ndr_print_struct(ndr, "out", "dfs_Add");
3542 ndr->depth++;
3543 ndr_print_WERROR(ndr, "result", r->out.result);
3544 ndr->depth--;
3546 ndr->depth--;
3549 static enum ndr_err_code ndr_push_dfs_Remove(struct ndr_push *ndr, int flags, const struct dfs_Remove *r)
3551 if (flags & NDR_IN) {
3552 if (r->in.dfs_entry_path == NULL) {
3553 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3555 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
3556 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3557 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
3558 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));
3559 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
3560 if (r->in.servername) {
3561 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
3562 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3563 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
3564 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3566 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.sharename));
3567 if (r->in.sharename) {
3568 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, 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.sharename, CH_UTF16)));
3571 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.sharename, ndr_charset_length(r->in.sharename, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3574 if (flags & NDR_OUT) {
3575 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3577 return NDR_ERR_SUCCESS;
3580 static enum ndr_err_code ndr_pull_dfs_Remove(struct ndr_pull *ndr, int flags, struct dfs_Remove *r)
3582 uint32_t _ptr_servername;
3583 uint32_t _ptr_sharename;
3584 TALLOC_CTX *_mem_save_servername_0;
3585 TALLOC_CTX *_mem_save_sharename_0;
3586 if (flags & NDR_IN) {
3587 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_entry_path));
3588 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_entry_path));
3589 if (ndr_get_array_length(ndr, &r->in.dfs_entry_path) > ndr_get_array_size(ndr, &r->in.dfs_entry_path)) {
3590 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));
3592 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfs_entry_path), sizeof(uint16_t)));
3593 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));
3594 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
3595 if (_ptr_servername) {
3596 NDR_PULL_ALLOC(ndr, r->in.servername);
3597 } else {
3598 r->in.servername = NULL;
3600 if (r->in.servername) {
3601 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
3602 NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
3603 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
3604 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
3605 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
3606 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));
3608 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
3609 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
3610 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
3612 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sharename));
3613 if (_ptr_sharename) {
3614 NDR_PULL_ALLOC(ndr, r->in.sharename);
3615 } else {
3616 r->in.sharename = NULL;
3618 if (r->in.sharename) {
3619 _mem_save_sharename_0 = NDR_PULL_GET_MEM_CTX(ndr);
3620 NDR_PULL_SET_MEM_CTX(ndr, r->in.sharename, 0);
3621 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.sharename));
3622 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.sharename));
3623 if (ndr_get_array_length(ndr, &r->in.sharename) > ndr_get_array_size(ndr, &r->in.sharename)) {
3624 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));
3626 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t)));
3627 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.sharename, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t), CH_UTF16));
3628 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sharename_0, 0);
3631 if (flags & NDR_OUT) {
3632 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3634 return NDR_ERR_SUCCESS;
3637 _PUBLIC_ void ndr_print_dfs_Remove(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Remove *r)
3639 ndr_print_struct(ndr, name, "dfs_Remove");
3640 ndr->depth++;
3641 if (flags & NDR_SET_VALUES) {
3642 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3644 if (flags & NDR_IN) {
3645 ndr_print_struct(ndr, "in", "dfs_Remove");
3646 ndr->depth++;
3647 ndr_print_ptr(ndr, "dfs_entry_path", r->in.dfs_entry_path);
3648 ndr->depth++;
3649 ndr_print_string(ndr, "dfs_entry_path", r->in.dfs_entry_path);
3650 ndr->depth--;
3651 ndr_print_ptr(ndr, "servername", r->in.servername);
3652 ndr->depth++;
3653 if (r->in.servername) {
3654 ndr_print_string(ndr, "servername", r->in.servername);
3656 ndr->depth--;
3657 ndr_print_ptr(ndr, "sharename", r->in.sharename);
3658 ndr->depth++;
3659 if (r->in.sharename) {
3660 ndr_print_string(ndr, "sharename", r->in.sharename);
3662 ndr->depth--;
3663 ndr->depth--;
3665 if (flags & NDR_OUT) {
3666 ndr_print_struct(ndr, "out", "dfs_Remove");
3667 ndr->depth++;
3668 ndr_print_WERROR(ndr, "result", r->out.result);
3669 ndr->depth--;
3671 ndr->depth--;
3674 static enum ndr_err_code ndr_push_dfs_SetInfo(struct ndr_push *ndr, int flags, const struct dfs_SetInfo *r)
3676 if (flags & NDR_IN) {
3677 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
3678 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3679 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
3680 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));
3681 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
3682 if (r->in.servername) {
3683 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
3684 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3685 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
3686 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3688 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.sharename));
3689 if (r->in.sharename) {
3690 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, 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.sharename, CH_UTF16)));
3693 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.sharename, ndr_charset_length(r->in.sharename, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3695 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
3696 if (r->in.info == NULL) {
3697 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3699 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
3700 NDR_CHECK(ndr_push_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
3702 if (flags & NDR_OUT) {
3703 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3705 return NDR_ERR_SUCCESS;
3708 static enum ndr_err_code ndr_pull_dfs_SetInfo(struct ndr_pull *ndr, int flags, struct dfs_SetInfo *r)
3710 uint32_t _ptr_servername;
3711 uint32_t _ptr_sharename;
3712 TALLOC_CTX *_mem_save_servername_0;
3713 TALLOC_CTX *_mem_save_sharename_0;
3714 TALLOC_CTX *_mem_save_info_0;
3715 if (flags & NDR_IN) {
3716 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_entry_path));
3717 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_entry_path));
3718 if (ndr_get_array_length(ndr, &r->in.dfs_entry_path) > ndr_get_array_size(ndr, &r->in.dfs_entry_path)) {
3719 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));
3721 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfs_entry_path), sizeof(uint16_t)));
3722 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));
3723 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
3724 if (_ptr_servername) {
3725 NDR_PULL_ALLOC(ndr, r->in.servername);
3726 } else {
3727 r->in.servername = NULL;
3729 if (r->in.servername) {
3730 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
3731 NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
3732 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
3733 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
3734 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
3735 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));
3737 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
3738 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
3739 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
3741 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sharename));
3742 if (_ptr_sharename) {
3743 NDR_PULL_ALLOC(ndr, r->in.sharename);
3744 } else {
3745 r->in.sharename = NULL;
3747 if (r->in.sharename) {
3748 _mem_save_sharename_0 = NDR_PULL_GET_MEM_CTX(ndr);
3749 NDR_PULL_SET_MEM_CTX(ndr, r->in.sharename, 0);
3750 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.sharename));
3751 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.sharename));
3752 if (ndr_get_array_length(ndr, &r->in.sharename) > ndr_get_array_size(ndr, &r->in.sharename)) {
3753 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));
3755 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t)));
3756 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.sharename, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t), CH_UTF16));
3757 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sharename_0, 0);
3759 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
3760 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3761 NDR_PULL_ALLOC(ndr, r->in.info);
3763 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
3764 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
3765 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
3766 NDR_CHECK(ndr_pull_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
3767 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
3769 if (flags & NDR_OUT) {
3770 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3772 return NDR_ERR_SUCCESS;
3775 _PUBLIC_ void ndr_print_dfs_SetInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetInfo *r)
3777 ndr_print_struct(ndr, name, "dfs_SetInfo");
3778 ndr->depth++;
3779 if (flags & NDR_SET_VALUES) {
3780 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3782 if (flags & NDR_IN) {
3783 ndr_print_struct(ndr, "in", "dfs_SetInfo");
3784 ndr->depth++;
3785 ndr_print_string(ndr, "dfs_entry_path", r->in.dfs_entry_path);
3786 ndr_print_ptr(ndr, "servername", r->in.servername);
3787 ndr->depth++;
3788 if (r->in.servername) {
3789 ndr_print_string(ndr, "servername", r->in.servername);
3791 ndr->depth--;
3792 ndr_print_ptr(ndr, "sharename", r->in.sharename);
3793 ndr->depth++;
3794 if (r->in.sharename) {
3795 ndr_print_string(ndr, "sharename", r->in.sharename);
3797 ndr->depth--;
3798 ndr_print_uint32(ndr, "level", r->in.level);
3799 ndr_print_ptr(ndr, "info", r->in.info);
3800 ndr->depth++;
3801 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
3802 ndr_print_dfs_Info(ndr, "info", r->in.info);
3803 ndr->depth--;
3804 ndr->depth--;
3806 if (flags & NDR_OUT) {
3807 ndr_print_struct(ndr, "out", "dfs_SetInfo");
3808 ndr->depth++;
3809 ndr_print_WERROR(ndr, "result", r->out.result);
3810 ndr->depth--;
3812 ndr->depth--;
3815 static enum ndr_err_code ndr_push_dfs_GetInfo(struct ndr_push *ndr, int flags, const struct dfs_GetInfo *r)
3817 if (flags & NDR_IN) {
3818 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
3819 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3820 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
3821 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));
3822 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
3823 if (r->in.servername) {
3824 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
3825 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3826 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
3827 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3829 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.sharename));
3830 if (r->in.sharename) {
3831 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, 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.sharename, CH_UTF16)));
3834 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.sharename, ndr_charset_length(r->in.sharename, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3836 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
3838 if (flags & NDR_OUT) {
3839 if (r->out.info == NULL) {
3840 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3842 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
3843 NDR_CHECK(ndr_push_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
3844 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3846 return NDR_ERR_SUCCESS;
3849 static enum ndr_err_code ndr_pull_dfs_GetInfo(struct ndr_pull *ndr, int flags, struct dfs_GetInfo *r)
3851 uint32_t _ptr_servername;
3852 uint32_t _ptr_sharename;
3853 TALLOC_CTX *_mem_save_servername_0;
3854 TALLOC_CTX *_mem_save_sharename_0;
3855 TALLOC_CTX *_mem_save_info_0;
3856 if (flags & NDR_IN) {
3857 ZERO_STRUCT(r->out);
3859 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_entry_path));
3860 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_entry_path));
3861 if (ndr_get_array_length(ndr, &r->in.dfs_entry_path) > ndr_get_array_size(ndr, &r->in.dfs_entry_path)) {
3862 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));
3864 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfs_entry_path), sizeof(uint16_t)));
3865 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));
3866 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
3867 if (_ptr_servername) {
3868 NDR_PULL_ALLOC(ndr, r->in.servername);
3869 } else {
3870 r->in.servername = NULL;
3872 if (r->in.servername) {
3873 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
3874 NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
3875 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
3876 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
3877 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
3878 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));
3880 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
3881 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
3882 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
3884 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sharename));
3885 if (_ptr_sharename) {
3886 NDR_PULL_ALLOC(ndr, r->in.sharename);
3887 } else {
3888 r->in.sharename = NULL;
3890 if (r->in.sharename) {
3891 _mem_save_sharename_0 = NDR_PULL_GET_MEM_CTX(ndr);
3892 NDR_PULL_SET_MEM_CTX(ndr, r->in.sharename, 0);
3893 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.sharename));
3894 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.sharename));
3895 if (ndr_get_array_length(ndr, &r->in.sharename) > ndr_get_array_size(ndr, &r->in.sharename)) {
3896 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));
3898 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t)));
3899 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.sharename, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t), CH_UTF16));
3900 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sharename_0, 0);
3902 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
3903 NDR_PULL_ALLOC(ndr, r->out.info);
3904 ZERO_STRUCTP(r->out.info);
3906 if (flags & NDR_OUT) {
3907 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3908 NDR_PULL_ALLOC(ndr, r->out.info);
3910 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
3911 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
3912 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
3913 NDR_CHECK(ndr_pull_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
3914 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
3915 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3917 return NDR_ERR_SUCCESS;
3920 _PUBLIC_ void ndr_print_dfs_GetInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetInfo *r)
3922 ndr_print_struct(ndr, name, "dfs_GetInfo");
3923 ndr->depth++;
3924 if (flags & NDR_SET_VALUES) {
3925 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3927 if (flags & NDR_IN) {
3928 ndr_print_struct(ndr, "in", "dfs_GetInfo");
3929 ndr->depth++;
3930 ndr_print_string(ndr, "dfs_entry_path", r->in.dfs_entry_path);
3931 ndr_print_ptr(ndr, "servername", r->in.servername);
3932 ndr->depth++;
3933 if (r->in.servername) {
3934 ndr_print_string(ndr, "servername", r->in.servername);
3936 ndr->depth--;
3937 ndr_print_ptr(ndr, "sharename", r->in.sharename);
3938 ndr->depth++;
3939 if (r->in.sharename) {
3940 ndr_print_string(ndr, "sharename", r->in.sharename);
3942 ndr->depth--;
3943 ndr_print_uint32(ndr, "level", r->in.level);
3944 ndr->depth--;
3946 if (flags & NDR_OUT) {
3947 ndr_print_struct(ndr, "out", "dfs_GetInfo");
3948 ndr->depth++;
3949 ndr_print_ptr(ndr, "info", r->out.info);
3950 ndr->depth++;
3951 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
3952 ndr_print_dfs_Info(ndr, "info", r->out.info);
3953 ndr->depth--;
3954 ndr_print_WERROR(ndr, "result", r->out.result);
3955 ndr->depth--;
3957 ndr->depth--;
3960 static enum ndr_err_code ndr_push_dfs_Enum(struct ndr_push *ndr, int flags, const struct dfs_Enum *r)
3962 if (flags & NDR_IN) {
3963 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
3964 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bufsize));
3965 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info));
3966 if (r->in.info) {
3967 NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
3969 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.total));
3970 if (r->in.total) {
3971 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.total));
3974 if (flags & NDR_OUT) {
3975 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
3976 if (r->out.info) {
3977 NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
3979 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.total));
3980 if (r->out.total) {
3981 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.total));
3983 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3985 return NDR_ERR_SUCCESS;
3988 static enum ndr_err_code ndr_pull_dfs_Enum(struct ndr_pull *ndr, int flags, struct dfs_Enum *r)
3990 uint32_t _ptr_info;
3991 uint32_t _ptr_total;
3992 TALLOC_CTX *_mem_save_info_0;
3993 TALLOC_CTX *_mem_save_total_0;
3994 if (flags & NDR_IN) {
3995 ZERO_STRUCT(r->out);
3997 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
3998 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bufsize));
3999 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
4000 if (_ptr_info) {
4001 NDR_PULL_ALLOC(ndr, r->in.info);
4002 } else {
4003 r->in.info = NULL;
4005 if (r->in.info) {
4006 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
4007 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0);
4008 NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
4009 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
4011 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total));
4012 if (_ptr_total) {
4013 NDR_PULL_ALLOC(ndr, r->in.total);
4014 } else {
4015 r->in.total = NULL;
4017 if (r->in.total) {
4018 _mem_save_total_0 = NDR_PULL_GET_MEM_CTX(ndr);
4019 NDR_PULL_SET_MEM_CTX(ndr, r->in.total, 0);
4020 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.total));
4021 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_0, 0);
4024 if (flags & NDR_OUT) {
4025 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
4026 if (_ptr_info) {
4027 NDR_PULL_ALLOC(ndr, r->out.info);
4028 } else {
4029 r->out.info = NULL;
4031 if (r->out.info) {
4032 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
4033 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
4034 NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
4035 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
4037 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total));
4038 if (_ptr_total) {
4039 NDR_PULL_ALLOC(ndr, r->out.total);
4040 } else {
4041 r->out.total = NULL;
4043 if (r->out.total) {
4044 _mem_save_total_0 = NDR_PULL_GET_MEM_CTX(ndr);
4045 NDR_PULL_SET_MEM_CTX(ndr, r->out.total, 0);
4046 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.total));
4047 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_0, 0);
4049 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4051 return NDR_ERR_SUCCESS;
4054 _PUBLIC_ void ndr_print_dfs_Enum(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Enum *r)
4056 ndr_print_struct(ndr, name, "dfs_Enum");
4057 ndr->depth++;
4058 if (flags & NDR_SET_VALUES) {
4059 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4061 if (flags & NDR_IN) {
4062 ndr_print_struct(ndr, "in", "dfs_Enum");
4063 ndr->depth++;
4064 ndr_print_uint32(ndr, "level", r->in.level);
4065 ndr_print_uint32(ndr, "bufsize", r->in.bufsize);
4066 ndr_print_ptr(ndr, "info", r->in.info);
4067 ndr->depth++;
4068 if (r->in.info) {
4069 ndr_print_dfs_EnumStruct(ndr, "info", r->in.info);
4071 ndr->depth--;
4072 ndr_print_ptr(ndr, "total", r->in.total);
4073 ndr->depth++;
4074 if (r->in.total) {
4075 ndr_print_uint32(ndr, "total", *r->in.total);
4077 ndr->depth--;
4078 ndr->depth--;
4080 if (flags & NDR_OUT) {
4081 ndr_print_struct(ndr, "out", "dfs_Enum");
4082 ndr->depth++;
4083 ndr_print_ptr(ndr, "info", r->out.info);
4084 ndr->depth++;
4085 if (r->out.info) {
4086 ndr_print_dfs_EnumStruct(ndr, "info", r->out.info);
4088 ndr->depth--;
4089 ndr_print_ptr(ndr, "total", r->out.total);
4090 ndr->depth++;
4091 if (r->out.total) {
4092 ndr_print_uint32(ndr, "total", *r->out.total);
4094 ndr->depth--;
4095 ndr_print_WERROR(ndr, "result", r->out.result);
4096 ndr->depth--;
4098 ndr->depth--;
4101 static enum ndr_err_code ndr_push_dfs_Rename(struct ndr_push *ndr, int flags, const struct dfs_Rename *r)
4103 if (flags & NDR_IN) {
4105 if (flags & NDR_OUT) {
4106 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4108 return NDR_ERR_SUCCESS;
4111 static enum ndr_err_code ndr_pull_dfs_Rename(struct ndr_pull *ndr, int flags, struct dfs_Rename *r)
4113 if (flags & NDR_IN) {
4115 if (flags & NDR_OUT) {
4116 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4118 return NDR_ERR_SUCCESS;
4121 _PUBLIC_ void ndr_print_dfs_Rename(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Rename *r)
4123 ndr_print_struct(ndr, name, "dfs_Rename");
4124 ndr->depth++;
4125 if (flags & NDR_SET_VALUES) {
4126 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4128 if (flags & NDR_IN) {
4129 ndr_print_struct(ndr, "in", "dfs_Rename");
4130 ndr->depth++;
4131 ndr->depth--;
4133 if (flags & NDR_OUT) {
4134 ndr_print_struct(ndr, "out", "dfs_Rename");
4135 ndr->depth++;
4136 ndr_print_WERROR(ndr, "result", r->out.result);
4137 ndr->depth--;
4139 ndr->depth--;
4142 static enum ndr_err_code ndr_push_dfs_Move(struct ndr_push *ndr, int flags, const struct dfs_Move *r)
4144 if (flags & NDR_IN) {
4146 if (flags & NDR_OUT) {
4147 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4149 return NDR_ERR_SUCCESS;
4152 static enum ndr_err_code ndr_pull_dfs_Move(struct ndr_pull *ndr, int flags, struct dfs_Move *r)
4154 if (flags & NDR_IN) {
4156 if (flags & NDR_OUT) {
4157 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4159 return NDR_ERR_SUCCESS;
4162 _PUBLIC_ void ndr_print_dfs_Move(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Move *r)
4164 ndr_print_struct(ndr, name, "dfs_Move");
4165 ndr->depth++;
4166 if (flags & NDR_SET_VALUES) {
4167 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4169 if (flags & NDR_IN) {
4170 ndr_print_struct(ndr, "in", "dfs_Move");
4171 ndr->depth++;
4172 ndr->depth--;
4174 if (flags & NDR_OUT) {
4175 ndr_print_struct(ndr, "out", "dfs_Move");
4176 ndr->depth++;
4177 ndr_print_WERROR(ndr, "result", r->out.result);
4178 ndr->depth--;
4180 ndr->depth--;
4183 static enum ndr_err_code ndr_push_dfs_ManagerGetConfigInfo(struct ndr_push *ndr, int flags, const struct dfs_ManagerGetConfigInfo *r)
4185 if (flags & NDR_IN) {
4187 if (flags & NDR_OUT) {
4188 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4190 return NDR_ERR_SUCCESS;
4193 static enum ndr_err_code ndr_pull_dfs_ManagerGetConfigInfo(struct ndr_pull *ndr, int flags, struct dfs_ManagerGetConfigInfo *r)
4195 if (flags & NDR_IN) {
4197 if (flags & NDR_OUT) {
4198 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4200 return NDR_ERR_SUCCESS;
4203 _PUBLIC_ void ndr_print_dfs_ManagerGetConfigInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerGetConfigInfo *r)
4205 ndr_print_struct(ndr, name, "dfs_ManagerGetConfigInfo");
4206 ndr->depth++;
4207 if (flags & NDR_SET_VALUES) {
4208 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4210 if (flags & NDR_IN) {
4211 ndr_print_struct(ndr, "in", "dfs_ManagerGetConfigInfo");
4212 ndr->depth++;
4213 ndr->depth--;
4215 if (flags & NDR_OUT) {
4216 ndr_print_struct(ndr, "out", "dfs_ManagerGetConfigInfo");
4217 ndr->depth++;
4218 ndr_print_WERROR(ndr, "result", r->out.result);
4219 ndr->depth--;
4221 ndr->depth--;
4224 static enum ndr_err_code ndr_push_dfs_ManagerSendSiteInfo(struct ndr_push *ndr, int flags, const struct dfs_ManagerSendSiteInfo *r)
4226 if (flags & NDR_IN) {
4228 if (flags & NDR_OUT) {
4229 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4231 return NDR_ERR_SUCCESS;
4234 static enum ndr_err_code ndr_pull_dfs_ManagerSendSiteInfo(struct ndr_pull *ndr, int flags, struct dfs_ManagerSendSiteInfo *r)
4236 if (flags & NDR_IN) {
4238 if (flags & NDR_OUT) {
4239 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4241 return NDR_ERR_SUCCESS;
4244 _PUBLIC_ void ndr_print_dfs_ManagerSendSiteInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerSendSiteInfo *r)
4246 ndr_print_struct(ndr, name, "dfs_ManagerSendSiteInfo");
4247 ndr->depth++;
4248 if (flags & NDR_SET_VALUES) {
4249 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4251 if (flags & NDR_IN) {
4252 ndr_print_struct(ndr, "in", "dfs_ManagerSendSiteInfo");
4253 ndr->depth++;
4254 ndr->depth--;
4256 if (flags & NDR_OUT) {
4257 ndr_print_struct(ndr, "out", "dfs_ManagerSendSiteInfo");
4258 ndr->depth++;
4259 ndr_print_WERROR(ndr, "result", r->out.result);
4260 ndr->depth--;
4262 ndr->depth--;
4265 static enum ndr_err_code ndr_push_dfs_AddFtRoot(struct ndr_push *ndr, int flags, const struct dfs_AddFtRoot *r)
4267 if (flags & NDR_IN) {
4268 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4269 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4270 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4271 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4272 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_servername, CH_UTF16)));
4273 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4274 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_servername, CH_UTF16)));
4275 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));
4276 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfsname, CH_UTF16)));
4277 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4278 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfsname, CH_UTF16)));
4279 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dfsname, ndr_charset_length(r->in.dfsname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4280 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4281 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4282 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4283 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4284 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
4285 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4286 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
4287 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.comment, ndr_charset_length(r->in.comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4288 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_config_dn, CH_UTF16)));
4289 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4290 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_config_dn, CH_UTF16)));
4291 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));
4292 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.unknown1));
4293 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
4294 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown2));
4295 if (r->in.unknown2) {
4296 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.unknown2));
4297 if (*r->in.unknown2) {
4298 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.unknown2));
4302 if (flags & NDR_OUT) {
4303 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.unknown2));
4304 if (r->out.unknown2) {
4305 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.unknown2));
4306 if (*r->out.unknown2) {
4307 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.unknown2));
4310 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4312 return NDR_ERR_SUCCESS;
4315 static enum ndr_err_code ndr_pull_dfs_AddFtRoot(struct ndr_pull *ndr, int flags, struct dfs_AddFtRoot *r)
4317 uint32_t _ptr_unknown2;
4318 TALLOC_CTX *_mem_save_unknown2_0;
4319 TALLOC_CTX *_mem_save_unknown2_1;
4320 if (flags & NDR_IN) {
4321 ZERO_STRUCT(r->out);
4323 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
4324 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
4325 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
4326 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));
4328 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
4329 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
4330 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dns_servername));
4331 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dns_servername));
4332 if (ndr_get_array_length(ndr, &r->in.dns_servername) > ndr_get_array_size(ndr, &r->in.dns_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.dns_servername), ndr_get_array_length(ndr, &r->in.dns_servername));
4335 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dns_servername), sizeof(uint16_t)));
4336 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));
4337 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfsname));
4338 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfsname));
4339 if (ndr_get_array_length(ndr, &r->in.dfsname) > ndr_get_array_size(ndr, &r->in.dfsname)) {
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.dfsname), ndr_get_array_length(ndr, &r->in.dfsname));
4342 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfsname), sizeof(uint16_t)));
4343 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfsname, ndr_get_array_length(ndr, &r->in.dfsname), sizeof(uint16_t), CH_UTF16));
4344 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
4345 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
4346 if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) {
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.rootshare), ndr_get_array_length(ndr, &r->in.rootshare));
4349 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t)));
4350 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16));
4351 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.comment));
4352 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.comment));
4353 if (ndr_get_array_length(ndr, &r->in.comment) > ndr_get_array_size(ndr, &r->in.comment)) {
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.comment), ndr_get_array_length(ndr, &r->in.comment));
4356 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t)));
4357 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.comment, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t), CH_UTF16));
4358 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_config_dn));
4359 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_config_dn));
4360 if (ndr_get_array_length(ndr, &r->in.dfs_config_dn) > ndr_get_array_size(ndr, &r->in.dfs_config_dn)) {
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.dfs_config_dn), ndr_get_array_length(ndr, &r->in.dfs_config_dn));
4363 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfs_config_dn), sizeof(uint16_t)));
4364 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));
4365 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.unknown1));
4366 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
4367 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
4368 if (_ptr_unknown2) {
4369 NDR_PULL_ALLOC(ndr, r->in.unknown2);
4370 } else {
4371 r->in.unknown2 = NULL;
4373 if (r->in.unknown2) {
4374 _mem_save_unknown2_0 = NDR_PULL_GET_MEM_CTX(ndr);
4375 NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown2, 0);
4376 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
4377 if (_ptr_unknown2) {
4378 NDR_PULL_ALLOC(ndr, *r->in.unknown2);
4379 } else {
4380 *r->in.unknown2 = NULL;
4382 if (*r->in.unknown2) {
4383 _mem_save_unknown2_1 = NDR_PULL_GET_MEM_CTX(ndr);
4384 NDR_PULL_SET_MEM_CTX(ndr, *r->in.unknown2, 0);
4385 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.unknown2));
4386 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_1, 0);
4388 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_0, 0);
4391 if (flags & NDR_OUT) {
4392 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
4393 if (_ptr_unknown2) {
4394 NDR_PULL_ALLOC(ndr, r->out.unknown2);
4395 } else {
4396 r->out.unknown2 = NULL;
4398 if (r->out.unknown2) {
4399 _mem_save_unknown2_0 = NDR_PULL_GET_MEM_CTX(ndr);
4400 NDR_PULL_SET_MEM_CTX(ndr, r->out.unknown2, 0);
4401 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
4402 if (_ptr_unknown2) {
4403 NDR_PULL_ALLOC(ndr, *r->out.unknown2);
4404 } else {
4405 *r->out.unknown2 = NULL;
4407 if (*r->out.unknown2) {
4408 _mem_save_unknown2_1 = NDR_PULL_GET_MEM_CTX(ndr);
4409 NDR_PULL_SET_MEM_CTX(ndr, *r->out.unknown2, 0);
4410 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.unknown2));
4411 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_1, 0);
4413 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_0, 0);
4415 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4417 return NDR_ERR_SUCCESS;
4420 _PUBLIC_ void ndr_print_dfs_AddFtRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddFtRoot *r)
4422 ndr_print_struct(ndr, name, "dfs_AddFtRoot");
4423 ndr->depth++;
4424 if (flags & NDR_SET_VALUES) {
4425 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4427 if (flags & NDR_IN) {
4428 ndr_print_struct(ndr, "in", "dfs_AddFtRoot");
4429 ndr->depth++;
4430 ndr_print_string(ndr, "servername", r->in.servername);
4431 ndr_print_string(ndr, "dns_servername", r->in.dns_servername);
4432 ndr_print_string(ndr, "dfsname", r->in.dfsname);
4433 ndr_print_string(ndr, "rootshare", r->in.rootshare);
4434 ndr_print_string(ndr, "comment", r->in.comment);
4435 ndr_print_string(ndr, "dfs_config_dn", r->in.dfs_config_dn);
4436 ndr_print_uint8(ndr, "unknown1", r->in.unknown1);
4437 ndr_print_uint32(ndr, "flags", r->in.flags);
4438 ndr_print_ptr(ndr, "unknown2", r->in.unknown2);
4439 ndr->depth++;
4440 if (r->in.unknown2) {
4441 ndr_print_ptr(ndr, "unknown2", *r->in.unknown2);
4442 ndr->depth++;
4443 if (*r->in.unknown2) {
4444 ndr_print_dfs_UnknownStruct(ndr, "unknown2", *r->in.unknown2);
4446 ndr->depth--;
4448 ndr->depth--;
4449 ndr->depth--;
4451 if (flags & NDR_OUT) {
4452 ndr_print_struct(ndr, "out", "dfs_AddFtRoot");
4453 ndr->depth++;
4454 ndr_print_ptr(ndr, "unknown2", r->out.unknown2);
4455 ndr->depth++;
4456 if (r->out.unknown2) {
4457 ndr_print_ptr(ndr, "unknown2", *r->out.unknown2);
4458 ndr->depth++;
4459 if (*r->out.unknown2) {
4460 ndr_print_dfs_UnknownStruct(ndr, "unknown2", *r->out.unknown2);
4462 ndr->depth--;
4464 ndr->depth--;
4465 ndr_print_WERROR(ndr, "result", r->out.result);
4466 ndr->depth--;
4468 ndr->depth--;
4471 static enum ndr_err_code ndr_push_dfs_RemoveFtRoot(struct ndr_push *ndr, int flags, const struct dfs_RemoveFtRoot *r)
4473 if (flags & NDR_IN) {
4474 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4475 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4476 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4477 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4478 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_servername, CH_UTF16)));
4479 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4480 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_servername, CH_UTF16)));
4481 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));
4482 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfsname, CH_UTF16)));
4483 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4484 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfsname, CH_UTF16)));
4485 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dfsname, ndr_charset_length(r->in.dfsname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4486 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4487 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4488 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4489 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4490 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
4491 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown));
4492 if (r->in.unknown) {
4493 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.unknown));
4494 if (*r->in.unknown) {
4495 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.unknown));
4499 if (flags & NDR_OUT) {
4500 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.unknown));
4501 if (r->out.unknown) {
4502 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.unknown));
4503 if (*r->out.unknown) {
4504 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.unknown));
4507 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4509 return NDR_ERR_SUCCESS;
4512 static enum ndr_err_code ndr_pull_dfs_RemoveFtRoot(struct ndr_pull *ndr, int flags, struct dfs_RemoveFtRoot *r)
4514 uint32_t _ptr_unknown;
4515 TALLOC_CTX *_mem_save_unknown_0;
4516 TALLOC_CTX *_mem_save_unknown_1;
4517 if (flags & NDR_IN) {
4518 ZERO_STRUCT(r->out);
4520 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
4521 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
4522 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
4523 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));
4525 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
4526 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
4527 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dns_servername));
4528 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dns_servername));
4529 if (ndr_get_array_length(ndr, &r->in.dns_servername) > ndr_get_array_size(ndr, &r->in.dns_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.dns_servername), ndr_get_array_length(ndr, &r->in.dns_servername));
4532 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dns_servername), sizeof(uint16_t)));
4533 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));
4534 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfsname));
4535 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfsname));
4536 if (ndr_get_array_length(ndr, &r->in.dfsname) > ndr_get_array_size(ndr, &r->in.dfsname)) {
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.dfsname), ndr_get_array_length(ndr, &r->in.dfsname));
4539 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfsname), sizeof(uint16_t)));
4540 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfsname, ndr_get_array_length(ndr, &r->in.dfsname), sizeof(uint16_t), CH_UTF16));
4541 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
4542 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
4543 if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) {
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.rootshare), ndr_get_array_length(ndr, &r->in.rootshare));
4546 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t)));
4547 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16));
4548 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
4549 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown));
4550 if (_ptr_unknown) {
4551 NDR_PULL_ALLOC(ndr, r->in.unknown);
4552 } else {
4553 r->in.unknown = NULL;
4555 if (r->in.unknown) {
4556 _mem_save_unknown_0 = NDR_PULL_GET_MEM_CTX(ndr);
4557 NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown, 0);
4558 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown));
4559 if (_ptr_unknown) {
4560 NDR_PULL_ALLOC(ndr, *r->in.unknown);
4561 } else {
4562 *r->in.unknown = NULL;
4564 if (*r->in.unknown) {
4565 _mem_save_unknown_1 = NDR_PULL_GET_MEM_CTX(ndr);
4566 NDR_PULL_SET_MEM_CTX(ndr, *r->in.unknown, 0);
4567 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.unknown));
4568 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_1, 0);
4570 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_0, 0);
4573 if (flags & NDR_OUT) {
4574 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown));
4575 if (_ptr_unknown) {
4576 NDR_PULL_ALLOC(ndr, r->out.unknown);
4577 } else {
4578 r->out.unknown = NULL;
4580 if (r->out.unknown) {
4581 _mem_save_unknown_0 = NDR_PULL_GET_MEM_CTX(ndr);
4582 NDR_PULL_SET_MEM_CTX(ndr, r->out.unknown, 0);
4583 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown));
4584 if (_ptr_unknown) {
4585 NDR_PULL_ALLOC(ndr, *r->out.unknown);
4586 } else {
4587 *r->out.unknown = NULL;
4589 if (*r->out.unknown) {
4590 _mem_save_unknown_1 = NDR_PULL_GET_MEM_CTX(ndr);
4591 NDR_PULL_SET_MEM_CTX(ndr, *r->out.unknown, 0);
4592 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.unknown));
4593 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_1, 0);
4595 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_0, 0);
4597 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4599 return NDR_ERR_SUCCESS;
4602 _PUBLIC_ void ndr_print_dfs_RemoveFtRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_RemoveFtRoot *r)
4604 ndr_print_struct(ndr, name, "dfs_RemoveFtRoot");
4605 ndr->depth++;
4606 if (flags & NDR_SET_VALUES) {
4607 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4609 if (flags & NDR_IN) {
4610 ndr_print_struct(ndr, "in", "dfs_RemoveFtRoot");
4611 ndr->depth++;
4612 ndr_print_string(ndr, "servername", r->in.servername);
4613 ndr_print_string(ndr, "dns_servername", r->in.dns_servername);
4614 ndr_print_string(ndr, "dfsname", r->in.dfsname);
4615 ndr_print_string(ndr, "rootshare", r->in.rootshare);
4616 ndr_print_uint32(ndr, "flags", r->in.flags);
4617 ndr_print_ptr(ndr, "unknown", r->in.unknown);
4618 ndr->depth++;
4619 if (r->in.unknown) {
4620 ndr_print_ptr(ndr, "unknown", *r->in.unknown);
4621 ndr->depth++;
4622 if (*r->in.unknown) {
4623 ndr_print_dfs_UnknownStruct(ndr, "unknown", *r->in.unknown);
4625 ndr->depth--;
4627 ndr->depth--;
4628 ndr->depth--;
4630 if (flags & NDR_OUT) {
4631 ndr_print_struct(ndr, "out", "dfs_RemoveFtRoot");
4632 ndr->depth++;
4633 ndr_print_ptr(ndr, "unknown", r->out.unknown);
4634 ndr->depth++;
4635 if (r->out.unknown) {
4636 ndr_print_ptr(ndr, "unknown", *r->out.unknown);
4637 ndr->depth++;
4638 if (*r->out.unknown) {
4639 ndr_print_dfs_UnknownStruct(ndr, "unknown", *r->out.unknown);
4641 ndr->depth--;
4643 ndr->depth--;
4644 ndr_print_WERROR(ndr, "result", r->out.result);
4645 ndr->depth--;
4647 ndr->depth--;
4650 static enum ndr_err_code ndr_push_dfs_AddStdRoot(struct ndr_push *ndr, int flags, const struct dfs_AddStdRoot *r)
4652 if (flags & NDR_IN) {
4653 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4654 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4655 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4656 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4657 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4658 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4659 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4660 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4661 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
4662 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4663 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
4664 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.comment, ndr_charset_length(r->in.comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4665 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
4667 if (flags & NDR_OUT) {
4668 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4670 return NDR_ERR_SUCCESS;
4673 static enum ndr_err_code ndr_pull_dfs_AddStdRoot(struct ndr_pull *ndr, int flags, struct dfs_AddStdRoot *r)
4675 if (flags & NDR_IN) {
4676 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
4677 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
4678 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
4679 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));
4681 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
4682 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
4683 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
4684 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
4685 if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) {
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.rootshare), ndr_get_array_length(ndr, &r->in.rootshare));
4688 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t)));
4689 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16));
4690 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.comment));
4691 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.comment));
4692 if (ndr_get_array_length(ndr, &r->in.comment) > ndr_get_array_size(ndr, &r->in.comment)) {
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.comment), ndr_get_array_length(ndr, &r->in.comment));
4695 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t)));
4696 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.comment, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t), CH_UTF16));
4697 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
4699 if (flags & NDR_OUT) {
4700 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4702 return NDR_ERR_SUCCESS;
4705 _PUBLIC_ void ndr_print_dfs_AddStdRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddStdRoot *r)
4707 ndr_print_struct(ndr, name, "dfs_AddStdRoot");
4708 ndr->depth++;
4709 if (flags & NDR_SET_VALUES) {
4710 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4712 if (flags & NDR_IN) {
4713 ndr_print_struct(ndr, "in", "dfs_AddStdRoot");
4714 ndr->depth++;
4715 ndr_print_string(ndr, "servername", r->in.servername);
4716 ndr_print_string(ndr, "rootshare", r->in.rootshare);
4717 ndr_print_string(ndr, "comment", r->in.comment);
4718 ndr_print_uint32(ndr, "flags", r->in.flags);
4719 ndr->depth--;
4721 if (flags & NDR_OUT) {
4722 ndr_print_struct(ndr, "out", "dfs_AddStdRoot");
4723 ndr->depth++;
4724 ndr_print_WERROR(ndr, "result", r->out.result);
4725 ndr->depth--;
4727 ndr->depth--;
4730 static enum ndr_err_code ndr_push_dfs_RemoveStdRoot(struct ndr_push *ndr, int flags, const struct dfs_RemoveStdRoot *r)
4732 if (flags & NDR_IN) {
4733 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4734 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4735 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4736 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4737 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4738 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4739 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4740 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4741 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
4743 if (flags & NDR_OUT) {
4744 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4746 return NDR_ERR_SUCCESS;
4749 static enum ndr_err_code ndr_pull_dfs_RemoveStdRoot(struct ndr_pull *ndr, int flags, struct dfs_RemoveStdRoot *r)
4751 if (flags & NDR_IN) {
4752 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
4753 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
4754 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
4755 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));
4757 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
4758 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
4759 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
4760 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
4761 if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) {
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.rootshare), ndr_get_array_length(ndr, &r->in.rootshare));
4764 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t)));
4765 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16));
4766 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
4768 if (flags & NDR_OUT) {
4769 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4771 return NDR_ERR_SUCCESS;
4774 _PUBLIC_ void ndr_print_dfs_RemoveStdRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_RemoveStdRoot *r)
4776 ndr_print_struct(ndr, name, "dfs_RemoveStdRoot");
4777 ndr->depth++;
4778 if (flags & NDR_SET_VALUES) {
4779 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4781 if (flags & NDR_IN) {
4782 ndr_print_struct(ndr, "in", "dfs_RemoveStdRoot");
4783 ndr->depth++;
4784 ndr_print_string(ndr, "servername", r->in.servername);
4785 ndr_print_string(ndr, "rootshare", r->in.rootshare);
4786 ndr_print_uint32(ndr, "flags", r->in.flags);
4787 ndr->depth--;
4789 if (flags & NDR_OUT) {
4790 ndr_print_struct(ndr, "out", "dfs_RemoveStdRoot");
4791 ndr->depth++;
4792 ndr_print_WERROR(ndr, "result", r->out.result);
4793 ndr->depth--;
4795 ndr->depth--;
4798 static enum ndr_err_code ndr_push_dfs_ManagerInitialize(struct ndr_push *ndr, int flags, const struct dfs_ManagerInitialize *r)
4800 if (flags & NDR_IN) {
4801 if (r->in.servername == NULL) {
4802 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4804 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4805 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4806 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4807 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4808 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
4810 if (flags & NDR_OUT) {
4811 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4813 return NDR_ERR_SUCCESS;
4816 static enum ndr_err_code ndr_pull_dfs_ManagerInitialize(struct ndr_pull *ndr, int flags, struct dfs_ManagerInitialize *r)
4818 if (flags & NDR_IN) {
4819 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
4820 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
4821 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
4822 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));
4824 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
4825 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
4826 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
4828 if (flags & NDR_OUT) {
4829 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4831 return NDR_ERR_SUCCESS;
4834 _PUBLIC_ void ndr_print_dfs_ManagerInitialize(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerInitialize *r)
4836 ndr_print_struct(ndr, name, "dfs_ManagerInitialize");
4837 ndr->depth++;
4838 if (flags & NDR_SET_VALUES) {
4839 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4841 if (flags & NDR_IN) {
4842 ndr_print_struct(ndr, "in", "dfs_ManagerInitialize");
4843 ndr->depth++;
4844 ndr_print_ptr(ndr, "servername", r->in.servername);
4845 ndr->depth++;
4846 ndr_print_string(ndr, "servername", r->in.servername);
4847 ndr->depth--;
4848 ndr_print_uint32(ndr, "flags", r->in.flags);
4849 ndr->depth--;
4851 if (flags & NDR_OUT) {
4852 ndr_print_struct(ndr, "out", "dfs_ManagerInitialize");
4853 ndr->depth++;
4854 ndr_print_WERROR(ndr, "result", r->out.result);
4855 ndr->depth--;
4857 ndr->depth--;
4860 static enum ndr_err_code ndr_push_dfs_AddStdRootForced(struct ndr_push *ndr, int flags, const struct dfs_AddStdRootForced *r)
4862 if (flags & NDR_IN) {
4863 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4864 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4865 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4866 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4867 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4868 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4869 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4870 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4871 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
4872 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4873 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
4874 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.comment, ndr_charset_length(r->in.comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4875 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.store, CH_UTF16)));
4876 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4877 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.store, CH_UTF16)));
4878 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.store, ndr_charset_length(r->in.store, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4880 if (flags & NDR_OUT) {
4881 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4883 return NDR_ERR_SUCCESS;
4886 static enum ndr_err_code ndr_pull_dfs_AddStdRootForced(struct ndr_pull *ndr, int flags, struct dfs_AddStdRootForced *r)
4888 if (flags & NDR_IN) {
4889 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
4890 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
4891 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
4892 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));
4894 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
4895 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
4896 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
4897 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
4898 if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) {
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.rootshare), ndr_get_array_length(ndr, &r->in.rootshare));
4901 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t)));
4902 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16));
4903 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.comment));
4904 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.comment));
4905 if (ndr_get_array_length(ndr, &r->in.comment) > ndr_get_array_size(ndr, &r->in.comment)) {
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.comment), ndr_get_array_length(ndr, &r->in.comment));
4908 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t)));
4909 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.comment, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t), CH_UTF16));
4910 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.store));
4911 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.store));
4912 if (ndr_get_array_length(ndr, &r->in.store) > ndr_get_array_size(ndr, &r->in.store)) {
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.store), ndr_get_array_length(ndr, &r->in.store));
4915 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.store), sizeof(uint16_t)));
4916 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.store, ndr_get_array_length(ndr, &r->in.store), sizeof(uint16_t), CH_UTF16));
4918 if (flags & NDR_OUT) {
4919 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4921 return NDR_ERR_SUCCESS;
4924 _PUBLIC_ void ndr_print_dfs_AddStdRootForced(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddStdRootForced *r)
4926 ndr_print_struct(ndr, name, "dfs_AddStdRootForced");
4927 ndr->depth++;
4928 if (flags & NDR_SET_VALUES) {
4929 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4931 if (flags & NDR_IN) {
4932 ndr_print_struct(ndr, "in", "dfs_AddStdRootForced");
4933 ndr->depth++;
4934 ndr_print_string(ndr, "servername", r->in.servername);
4935 ndr_print_string(ndr, "rootshare", r->in.rootshare);
4936 ndr_print_string(ndr, "comment", r->in.comment);
4937 ndr_print_string(ndr, "store", r->in.store);
4938 ndr->depth--;
4940 if (flags & NDR_OUT) {
4941 ndr_print_struct(ndr, "out", "dfs_AddStdRootForced");
4942 ndr->depth++;
4943 ndr_print_WERROR(ndr, "result", r->out.result);
4944 ndr->depth--;
4946 ndr->depth--;
4949 static enum ndr_err_code ndr_push_dfs_GetDcAddress(struct ndr_push *ndr, int flags, const struct dfs_GetDcAddress *r)
4951 if (flags & NDR_IN) {
4952 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4953 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4954 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4955 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4956 if (r->in.server_fullname == NULL) {
4957 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4959 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.server_fullname));
4960 if (*r->in.server_fullname) {
4961 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->in.server_fullname, CH_UTF16)));
4962 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4963 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->in.server_fullname, CH_UTF16)));
4964 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));
4966 if (r->in.is_root == NULL) {
4967 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4969 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->in.is_root));
4970 if (r->in.ttl == NULL) {
4971 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4973 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.ttl));
4975 if (flags & NDR_OUT) {
4976 if (r->out.server_fullname == NULL) {
4977 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4979 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.server_fullname));
4980 if (*r->out.server_fullname) {
4981 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.server_fullname, CH_UTF16)));
4982 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4983 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.server_fullname, CH_UTF16)));
4984 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));
4986 if (r->out.is_root == NULL) {
4987 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4989 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->out.is_root));
4990 if (r->out.ttl == NULL) {
4991 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4993 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.ttl));
4994 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4996 return NDR_ERR_SUCCESS;
4999 static enum ndr_err_code ndr_pull_dfs_GetDcAddress(struct ndr_pull *ndr, int flags, struct dfs_GetDcAddress *r)
5001 uint32_t _ptr_server_fullname;
5002 TALLOC_CTX *_mem_save_server_fullname_0;
5003 TALLOC_CTX *_mem_save_server_fullname_1;
5004 TALLOC_CTX *_mem_save_is_root_0;
5005 TALLOC_CTX *_mem_save_ttl_0;
5006 if (flags & NDR_IN) {
5007 ZERO_STRUCT(r->out);
5009 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
5010 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
5011 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
5012 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));
5014 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
5015 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
5016 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5017 NDR_PULL_ALLOC(ndr, r->in.server_fullname);
5019 _mem_save_server_fullname_0 = NDR_PULL_GET_MEM_CTX(ndr);
5020 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_fullname, LIBNDR_FLAG_REF_ALLOC);
5021 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_fullname));
5022 if (_ptr_server_fullname) {
5023 NDR_PULL_ALLOC(ndr, *r->in.server_fullname);
5024 } else {
5025 *r->in.server_fullname = NULL;
5027 if (*r->in.server_fullname) {
5028 _mem_save_server_fullname_1 = NDR_PULL_GET_MEM_CTX(ndr);
5029 NDR_PULL_SET_MEM_CTX(ndr, *r->in.server_fullname, 0);
5030 NDR_CHECK(ndr_pull_array_size(ndr, r->in.server_fullname));
5031 NDR_CHECK(ndr_pull_array_length(ndr, r->in.server_fullname));
5032 if (ndr_get_array_length(ndr, r->in.server_fullname) > ndr_get_array_size(ndr, r->in.server_fullname)) {
5033 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));
5035 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->in.server_fullname), sizeof(uint16_t)));
5036 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));
5037 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_1, 0);
5039 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_0, LIBNDR_FLAG_REF_ALLOC);
5040 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5041 NDR_PULL_ALLOC(ndr, r->in.is_root);
5043 _mem_save_is_root_0 = NDR_PULL_GET_MEM_CTX(ndr);
5044 NDR_PULL_SET_MEM_CTX(ndr, r->in.is_root, LIBNDR_FLAG_REF_ALLOC);
5045 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->in.is_root));
5046 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_is_root_0, LIBNDR_FLAG_REF_ALLOC);
5047 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5048 NDR_PULL_ALLOC(ndr, r->in.ttl);
5050 _mem_save_ttl_0 = NDR_PULL_GET_MEM_CTX(ndr);
5051 NDR_PULL_SET_MEM_CTX(ndr, r->in.ttl, LIBNDR_FLAG_REF_ALLOC);
5052 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.ttl));
5053 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ttl_0, LIBNDR_FLAG_REF_ALLOC);
5054 NDR_PULL_ALLOC(ndr, r->out.server_fullname);
5055 *r->out.server_fullname = *r->in.server_fullname;
5056 NDR_PULL_ALLOC(ndr, r->out.is_root);
5057 *r->out.is_root = *r->in.is_root;
5058 NDR_PULL_ALLOC(ndr, r->out.ttl);
5059 *r->out.ttl = *r->in.ttl;
5061 if (flags & NDR_OUT) {
5062 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5063 NDR_PULL_ALLOC(ndr, r->out.server_fullname);
5065 _mem_save_server_fullname_0 = NDR_PULL_GET_MEM_CTX(ndr);
5066 NDR_PULL_SET_MEM_CTX(ndr, r->out.server_fullname, LIBNDR_FLAG_REF_ALLOC);
5067 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_fullname));
5068 if (_ptr_server_fullname) {
5069 NDR_PULL_ALLOC(ndr, *r->out.server_fullname);
5070 } else {
5071 *r->out.server_fullname = NULL;
5073 if (*r->out.server_fullname) {
5074 _mem_save_server_fullname_1 = NDR_PULL_GET_MEM_CTX(ndr);
5075 NDR_PULL_SET_MEM_CTX(ndr, *r->out.server_fullname, 0);
5076 NDR_CHECK(ndr_pull_array_size(ndr, r->out.server_fullname));
5077 NDR_CHECK(ndr_pull_array_length(ndr, r->out.server_fullname));
5078 if (ndr_get_array_length(ndr, r->out.server_fullname) > ndr_get_array_size(ndr, r->out.server_fullname)) {
5079 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));
5081 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.server_fullname), sizeof(uint16_t)));
5082 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));
5083 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_1, 0);
5085 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_0, LIBNDR_FLAG_REF_ALLOC);
5086 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5087 NDR_PULL_ALLOC(ndr, r->out.is_root);
5089 _mem_save_is_root_0 = NDR_PULL_GET_MEM_CTX(ndr);
5090 NDR_PULL_SET_MEM_CTX(ndr, r->out.is_root, LIBNDR_FLAG_REF_ALLOC);
5091 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->out.is_root));
5092 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_is_root_0, LIBNDR_FLAG_REF_ALLOC);
5093 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5094 NDR_PULL_ALLOC(ndr, r->out.ttl);
5096 _mem_save_ttl_0 = NDR_PULL_GET_MEM_CTX(ndr);
5097 NDR_PULL_SET_MEM_CTX(ndr, r->out.ttl, LIBNDR_FLAG_REF_ALLOC);
5098 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.ttl));
5099 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ttl_0, LIBNDR_FLAG_REF_ALLOC);
5100 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5102 return NDR_ERR_SUCCESS;
5105 _PUBLIC_ void ndr_print_dfs_GetDcAddress(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetDcAddress *r)
5107 ndr_print_struct(ndr, name, "dfs_GetDcAddress");
5108 ndr->depth++;
5109 if (flags & NDR_SET_VALUES) {
5110 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5112 if (flags & NDR_IN) {
5113 ndr_print_struct(ndr, "in", "dfs_GetDcAddress");
5114 ndr->depth++;
5115 ndr_print_string(ndr, "servername", r->in.servername);
5116 ndr_print_ptr(ndr, "server_fullname", r->in.server_fullname);
5117 ndr->depth++;
5118 ndr_print_ptr(ndr, "server_fullname", *r->in.server_fullname);
5119 ndr->depth++;
5120 if (*r->in.server_fullname) {
5121 ndr_print_string(ndr, "server_fullname", *r->in.server_fullname);
5123 ndr->depth--;
5124 ndr->depth--;
5125 ndr_print_ptr(ndr, "is_root", r->in.is_root);
5126 ndr->depth++;
5127 ndr_print_uint8(ndr, "is_root", *r->in.is_root);
5128 ndr->depth--;
5129 ndr_print_ptr(ndr, "ttl", r->in.ttl);
5130 ndr->depth++;
5131 ndr_print_uint32(ndr, "ttl", *r->in.ttl);
5132 ndr->depth--;
5133 ndr->depth--;
5135 if (flags & NDR_OUT) {
5136 ndr_print_struct(ndr, "out", "dfs_GetDcAddress");
5137 ndr->depth++;
5138 ndr_print_ptr(ndr, "server_fullname", r->out.server_fullname);
5139 ndr->depth++;
5140 ndr_print_ptr(ndr, "server_fullname", *r->out.server_fullname);
5141 ndr->depth++;
5142 if (*r->out.server_fullname) {
5143 ndr_print_string(ndr, "server_fullname", *r->out.server_fullname);
5145 ndr->depth--;
5146 ndr->depth--;
5147 ndr_print_ptr(ndr, "is_root", r->out.is_root);
5148 ndr->depth++;
5149 ndr_print_uint8(ndr, "is_root", *r->out.is_root);
5150 ndr->depth--;
5151 ndr_print_ptr(ndr, "ttl", r->out.ttl);
5152 ndr->depth++;
5153 ndr_print_uint32(ndr, "ttl", *r->out.ttl);
5154 ndr->depth--;
5155 ndr_print_WERROR(ndr, "result", r->out.result);
5156 ndr->depth--;
5158 ndr->depth--;
5161 static enum ndr_err_code ndr_push_dfs_SetDcAddress(struct ndr_push *ndr, int flags, const struct dfs_SetDcAddress *r)
5163 if (flags & NDR_IN) {
5164 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
5165 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5166 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
5167 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5168 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_fullname, CH_UTF16)));
5169 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5170 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_fullname, CH_UTF16)));
5171 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));
5172 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
5173 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.ttl));
5175 if (flags & NDR_OUT) {
5176 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5178 return NDR_ERR_SUCCESS;
5181 static enum ndr_err_code ndr_pull_dfs_SetDcAddress(struct ndr_pull *ndr, int flags, struct dfs_SetDcAddress *r)
5183 if (flags & NDR_IN) {
5184 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
5185 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
5186 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
5187 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));
5189 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
5190 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
5191 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_fullname));
5192 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_fullname));
5193 if (ndr_get_array_length(ndr, &r->in.server_fullname) > ndr_get_array_size(ndr, &r->in.server_fullname)) {
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.server_fullname), ndr_get_array_length(ndr, &r->in.server_fullname));
5196 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_fullname), sizeof(uint16_t)));
5197 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));
5198 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
5199 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.ttl));
5201 if (flags & NDR_OUT) {
5202 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5204 return NDR_ERR_SUCCESS;
5207 _PUBLIC_ void ndr_print_dfs_SetDcAddress(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetDcAddress *r)
5209 ndr_print_struct(ndr, name, "dfs_SetDcAddress");
5210 ndr->depth++;
5211 if (flags & NDR_SET_VALUES) {
5212 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5214 if (flags & NDR_IN) {
5215 ndr_print_struct(ndr, "in", "dfs_SetDcAddress");
5216 ndr->depth++;
5217 ndr_print_string(ndr, "servername", r->in.servername);
5218 ndr_print_string(ndr, "server_fullname", r->in.server_fullname);
5219 ndr_print_uint32(ndr, "flags", r->in.flags);
5220 ndr_print_uint32(ndr, "ttl", r->in.ttl);
5221 ndr->depth--;
5223 if (flags & NDR_OUT) {
5224 ndr_print_struct(ndr, "out", "dfs_SetDcAddress");
5225 ndr->depth++;
5226 ndr_print_WERROR(ndr, "result", r->out.result);
5227 ndr->depth--;
5229 ndr->depth--;
5232 static enum ndr_err_code ndr_push_dfs_FlushFtTable(struct ndr_push *ndr, int flags, const struct dfs_FlushFtTable *r)
5234 if (flags & NDR_IN) {
5235 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
5236 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5237 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
5238 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5239 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
5240 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5241 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
5242 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5244 if (flags & NDR_OUT) {
5245 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5247 return NDR_ERR_SUCCESS;
5250 static enum ndr_err_code ndr_pull_dfs_FlushFtTable(struct ndr_pull *ndr, int flags, struct dfs_FlushFtTable *r)
5252 if (flags & NDR_IN) {
5253 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
5254 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
5255 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
5256 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));
5258 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
5259 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
5260 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
5261 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
5262 if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) {
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.rootshare), ndr_get_array_length(ndr, &r->in.rootshare));
5265 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t)));
5266 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16));
5268 if (flags & NDR_OUT) {
5269 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5271 return NDR_ERR_SUCCESS;
5274 _PUBLIC_ void ndr_print_dfs_FlushFtTable(struct ndr_print *ndr, const char *name, int flags, const struct dfs_FlushFtTable *r)
5276 ndr_print_struct(ndr, name, "dfs_FlushFtTable");
5277 ndr->depth++;
5278 if (flags & NDR_SET_VALUES) {
5279 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5281 if (flags & NDR_IN) {
5282 ndr_print_struct(ndr, "in", "dfs_FlushFtTable");
5283 ndr->depth++;
5284 ndr_print_string(ndr, "servername", r->in.servername);
5285 ndr_print_string(ndr, "rootshare", r->in.rootshare);
5286 ndr->depth--;
5288 if (flags & NDR_OUT) {
5289 ndr_print_struct(ndr, "out", "dfs_FlushFtTable");
5290 ndr->depth++;
5291 ndr_print_WERROR(ndr, "result", r->out.result);
5292 ndr->depth--;
5294 ndr->depth--;
5297 static enum ndr_err_code ndr_push_dfs_Add2(struct ndr_push *ndr, int flags, const struct dfs_Add2 *r)
5299 if (flags & NDR_IN) {
5301 if (flags & NDR_OUT) {
5302 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5304 return NDR_ERR_SUCCESS;
5307 static enum ndr_err_code ndr_pull_dfs_Add2(struct ndr_pull *ndr, int flags, struct dfs_Add2 *r)
5309 if (flags & NDR_IN) {
5311 if (flags & NDR_OUT) {
5312 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5314 return NDR_ERR_SUCCESS;
5317 _PUBLIC_ void ndr_print_dfs_Add2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Add2 *r)
5319 ndr_print_struct(ndr, name, "dfs_Add2");
5320 ndr->depth++;
5321 if (flags & NDR_SET_VALUES) {
5322 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5324 if (flags & NDR_IN) {
5325 ndr_print_struct(ndr, "in", "dfs_Add2");
5326 ndr->depth++;
5327 ndr->depth--;
5329 if (flags & NDR_OUT) {
5330 ndr_print_struct(ndr, "out", "dfs_Add2");
5331 ndr->depth++;
5332 ndr_print_WERROR(ndr, "result", r->out.result);
5333 ndr->depth--;
5335 ndr->depth--;
5338 static enum ndr_err_code ndr_push_dfs_Remove2(struct ndr_push *ndr, int flags, const struct dfs_Remove2 *r)
5340 if (flags & NDR_IN) {
5342 if (flags & NDR_OUT) {
5343 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5345 return NDR_ERR_SUCCESS;
5348 static enum ndr_err_code ndr_pull_dfs_Remove2(struct ndr_pull *ndr, int flags, struct dfs_Remove2 *r)
5350 if (flags & NDR_IN) {
5352 if (flags & NDR_OUT) {
5353 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5355 return NDR_ERR_SUCCESS;
5358 _PUBLIC_ void ndr_print_dfs_Remove2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Remove2 *r)
5360 ndr_print_struct(ndr, name, "dfs_Remove2");
5361 ndr->depth++;
5362 if (flags & NDR_SET_VALUES) {
5363 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5365 if (flags & NDR_IN) {
5366 ndr_print_struct(ndr, "in", "dfs_Remove2");
5367 ndr->depth++;
5368 ndr->depth--;
5370 if (flags & NDR_OUT) {
5371 ndr_print_struct(ndr, "out", "dfs_Remove2");
5372 ndr->depth++;
5373 ndr_print_WERROR(ndr, "result", r->out.result);
5374 ndr->depth--;
5376 ndr->depth--;
5379 _PUBLIC_ enum ndr_err_code ndr_push_dfs_EnumEx(struct ndr_push *ndr, int flags, const struct dfs_EnumEx *r)
5381 if (flags & NDR_IN) {
5382 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_name, CH_UTF16)));
5383 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5384 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_name, CH_UTF16)));
5385 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));
5386 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
5387 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bufsize));
5388 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info));
5389 if (r->in.info) {
5390 NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
5392 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.total));
5393 if (r->in.total) {
5394 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.total));
5397 if (flags & NDR_OUT) {
5398 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
5399 if (r->out.info) {
5400 NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
5402 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.total));
5403 if (r->out.total) {
5404 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.total));
5406 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5408 return NDR_ERR_SUCCESS;
5411 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_EnumEx(struct ndr_pull *ndr, int flags, struct dfs_EnumEx *r)
5413 uint32_t _ptr_info;
5414 uint32_t _ptr_total;
5415 TALLOC_CTX *_mem_save_info_0;
5416 TALLOC_CTX *_mem_save_total_0;
5417 if (flags & NDR_IN) {
5418 ZERO_STRUCT(r->out);
5420 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_name));
5421 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_name));
5422 if (ndr_get_array_length(ndr, &r->in.dfs_name) > ndr_get_array_size(ndr, &r->in.dfs_name)) {
5423 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));
5425 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfs_name), sizeof(uint16_t)));
5426 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));
5427 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
5428 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bufsize));
5429 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
5430 if (_ptr_info) {
5431 NDR_PULL_ALLOC(ndr, r->in.info);
5432 } else {
5433 r->in.info = NULL;
5435 if (r->in.info) {
5436 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
5437 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0);
5438 NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
5439 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
5441 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total));
5442 if (_ptr_total) {
5443 NDR_PULL_ALLOC(ndr, r->in.total);
5444 } else {
5445 r->in.total = NULL;
5447 if (r->in.total) {
5448 _mem_save_total_0 = NDR_PULL_GET_MEM_CTX(ndr);
5449 NDR_PULL_SET_MEM_CTX(ndr, r->in.total, 0);
5450 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.total));
5451 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_0, 0);
5454 if (flags & NDR_OUT) {
5455 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
5456 if (_ptr_info) {
5457 NDR_PULL_ALLOC(ndr, r->out.info);
5458 } else {
5459 r->out.info = NULL;
5461 if (r->out.info) {
5462 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
5463 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
5464 NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
5465 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
5467 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total));
5468 if (_ptr_total) {
5469 NDR_PULL_ALLOC(ndr, r->out.total);
5470 } else {
5471 r->out.total = NULL;
5473 if (r->out.total) {
5474 _mem_save_total_0 = NDR_PULL_GET_MEM_CTX(ndr);
5475 NDR_PULL_SET_MEM_CTX(ndr, r->out.total, 0);
5476 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.total));
5477 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_0, 0);
5479 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5481 return NDR_ERR_SUCCESS;
5484 _PUBLIC_ void ndr_print_dfs_EnumEx(struct ndr_print *ndr, const char *name, int flags, const struct dfs_EnumEx *r)
5486 ndr_print_struct(ndr, name, "dfs_EnumEx");
5487 ndr->depth++;
5488 if (flags & NDR_SET_VALUES) {
5489 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5491 if (flags & NDR_IN) {
5492 ndr_print_struct(ndr, "in", "dfs_EnumEx");
5493 ndr->depth++;
5494 ndr_print_string(ndr, "dfs_name", r->in.dfs_name);
5495 ndr_print_uint32(ndr, "level", r->in.level);
5496 ndr_print_uint32(ndr, "bufsize", r->in.bufsize);
5497 ndr_print_ptr(ndr, "info", r->in.info);
5498 ndr->depth++;
5499 if (r->in.info) {
5500 ndr_print_dfs_EnumStruct(ndr, "info", r->in.info);
5502 ndr->depth--;
5503 ndr_print_ptr(ndr, "total", r->in.total);
5504 ndr->depth++;
5505 if (r->in.total) {
5506 ndr_print_uint32(ndr, "total", *r->in.total);
5508 ndr->depth--;
5509 ndr->depth--;
5511 if (flags & NDR_OUT) {
5512 ndr_print_struct(ndr, "out", "dfs_EnumEx");
5513 ndr->depth++;
5514 ndr_print_ptr(ndr, "info", r->out.info);
5515 ndr->depth++;
5516 if (r->out.info) {
5517 ndr_print_dfs_EnumStruct(ndr, "info", r->out.info);
5519 ndr->depth--;
5520 ndr_print_ptr(ndr, "total", r->out.total);
5521 ndr->depth++;
5522 if (r->out.total) {
5523 ndr_print_uint32(ndr, "total", *r->out.total);
5525 ndr->depth--;
5526 ndr_print_WERROR(ndr, "result", r->out.result);
5527 ndr->depth--;
5529 ndr->depth--;
5532 static enum ndr_err_code ndr_push_dfs_SetInfo2(struct ndr_push *ndr, int flags, const struct dfs_SetInfo2 *r)
5534 if (flags & NDR_IN) {
5536 if (flags & NDR_OUT) {
5537 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5539 return NDR_ERR_SUCCESS;
5542 static enum ndr_err_code ndr_pull_dfs_SetInfo2(struct ndr_pull *ndr, int flags, struct dfs_SetInfo2 *r)
5544 if (flags & NDR_IN) {
5546 if (flags & NDR_OUT) {
5547 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5549 return NDR_ERR_SUCCESS;
5552 _PUBLIC_ void ndr_print_dfs_SetInfo2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetInfo2 *r)
5554 ndr_print_struct(ndr, name, "dfs_SetInfo2");
5555 ndr->depth++;
5556 if (flags & NDR_SET_VALUES) {
5557 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5559 if (flags & NDR_IN) {
5560 ndr_print_struct(ndr, "in", "dfs_SetInfo2");
5561 ndr->depth++;
5562 ndr->depth--;
5564 if (flags & NDR_OUT) {
5565 ndr_print_struct(ndr, "out", "dfs_SetInfo2");
5566 ndr->depth++;
5567 ndr_print_WERROR(ndr, "result", r->out.result);
5568 ndr->depth--;
5570 ndr->depth--;
5573 static const struct ndr_interface_call netdfs_calls[] = {
5575 "dfs_GetManagerVersion",
5576 sizeof(struct dfs_GetManagerVersion),
5577 (ndr_push_flags_fn_t) ndr_push_dfs_GetManagerVersion,
5578 (ndr_pull_flags_fn_t) ndr_pull_dfs_GetManagerVersion,
5579 (ndr_print_function_t) ndr_print_dfs_GetManagerVersion,
5580 false,
5583 "dfs_Add",
5584 sizeof(struct dfs_Add),
5585 (ndr_push_flags_fn_t) ndr_push_dfs_Add,
5586 (ndr_pull_flags_fn_t) ndr_pull_dfs_Add,
5587 (ndr_print_function_t) ndr_print_dfs_Add,
5588 false,
5591 "dfs_Remove",
5592 sizeof(struct dfs_Remove),
5593 (ndr_push_flags_fn_t) ndr_push_dfs_Remove,
5594 (ndr_pull_flags_fn_t) ndr_pull_dfs_Remove,
5595 (ndr_print_function_t) ndr_print_dfs_Remove,
5596 false,
5599 "dfs_SetInfo",
5600 sizeof(struct dfs_SetInfo),
5601 (ndr_push_flags_fn_t) ndr_push_dfs_SetInfo,
5602 (ndr_pull_flags_fn_t) ndr_pull_dfs_SetInfo,
5603 (ndr_print_function_t) ndr_print_dfs_SetInfo,
5604 false,
5607 "dfs_GetInfo",
5608 sizeof(struct dfs_GetInfo),
5609 (ndr_push_flags_fn_t) ndr_push_dfs_GetInfo,
5610 (ndr_pull_flags_fn_t) ndr_pull_dfs_GetInfo,
5611 (ndr_print_function_t) ndr_print_dfs_GetInfo,
5612 false,
5615 "dfs_Enum",
5616 sizeof(struct dfs_Enum),
5617 (ndr_push_flags_fn_t) ndr_push_dfs_Enum,
5618 (ndr_pull_flags_fn_t) ndr_pull_dfs_Enum,
5619 (ndr_print_function_t) ndr_print_dfs_Enum,
5620 false,
5623 "dfs_Rename",
5624 sizeof(struct dfs_Rename),
5625 (ndr_push_flags_fn_t) ndr_push_dfs_Rename,
5626 (ndr_pull_flags_fn_t) ndr_pull_dfs_Rename,
5627 (ndr_print_function_t) ndr_print_dfs_Rename,
5628 false,
5631 "dfs_Move",
5632 sizeof(struct dfs_Move),
5633 (ndr_push_flags_fn_t) ndr_push_dfs_Move,
5634 (ndr_pull_flags_fn_t) ndr_pull_dfs_Move,
5635 (ndr_print_function_t) ndr_print_dfs_Move,
5636 false,
5639 "dfs_ManagerGetConfigInfo",
5640 sizeof(struct dfs_ManagerGetConfigInfo),
5641 (ndr_push_flags_fn_t) ndr_push_dfs_ManagerGetConfigInfo,
5642 (ndr_pull_flags_fn_t) ndr_pull_dfs_ManagerGetConfigInfo,
5643 (ndr_print_function_t) ndr_print_dfs_ManagerGetConfigInfo,
5644 false,
5647 "dfs_ManagerSendSiteInfo",
5648 sizeof(struct dfs_ManagerSendSiteInfo),
5649 (ndr_push_flags_fn_t) ndr_push_dfs_ManagerSendSiteInfo,
5650 (ndr_pull_flags_fn_t) ndr_pull_dfs_ManagerSendSiteInfo,
5651 (ndr_print_function_t) ndr_print_dfs_ManagerSendSiteInfo,
5652 false,
5655 "dfs_AddFtRoot",
5656 sizeof(struct dfs_AddFtRoot),
5657 (ndr_push_flags_fn_t) ndr_push_dfs_AddFtRoot,
5658 (ndr_pull_flags_fn_t) ndr_pull_dfs_AddFtRoot,
5659 (ndr_print_function_t) ndr_print_dfs_AddFtRoot,
5660 false,
5663 "dfs_RemoveFtRoot",
5664 sizeof(struct dfs_RemoveFtRoot),
5665 (ndr_push_flags_fn_t) ndr_push_dfs_RemoveFtRoot,
5666 (ndr_pull_flags_fn_t) ndr_pull_dfs_RemoveFtRoot,
5667 (ndr_print_function_t) ndr_print_dfs_RemoveFtRoot,
5668 false,
5671 "dfs_AddStdRoot",
5672 sizeof(struct dfs_AddStdRoot),
5673 (ndr_push_flags_fn_t) ndr_push_dfs_AddStdRoot,
5674 (ndr_pull_flags_fn_t) ndr_pull_dfs_AddStdRoot,
5675 (ndr_print_function_t) ndr_print_dfs_AddStdRoot,
5676 false,
5679 "dfs_RemoveStdRoot",
5680 sizeof(struct dfs_RemoveStdRoot),
5681 (ndr_push_flags_fn_t) ndr_push_dfs_RemoveStdRoot,
5682 (ndr_pull_flags_fn_t) ndr_pull_dfs_RemoveStdRoot,
5683 (ndr_print_function_t) ndr_print_dfs_RemoveStdRoot,
5684 false,
5687 "dfs_ManagerInitialize",
5688 sizeof(struct dfs_ManagerInitialize),
5689 (ndr_push_flags_fn_t) ndr_push_dfs_ManagerInitialize,
5690 (ndr_pull_flags_fn_t) ndr_pull_dfs_ManagerInitialize,
5691 (ndr_print_function_t) ndr_print_dfs_ManagerInitialize,
5692 false,
5695 "dfs_AddStdRootForced",
5696 sizeof(struct dfs_AddStdRootForced),
5697 (ndr_push_flags_fn_t) ndr_push_dfs_AddStdRootForced,
5698 (ndr_pull_flags_fn_t) ndr_pull_dfs_AddStdRootForced,
5699 (ndr_print_function_t) ndr_print_dfs_AddStdRootForced,
5700 false,
5703 "dfs_GetDcAddress",
5704 sizeof(struct dfs_GetDcAddress),
5705 (ndr_push_flags_fn_t) ndr_push_dfs_GetDcAddress,
5706 (ndr_pull_flags_fn_t) ndr_pull_dfs_GetDcAddress,
5707 (ndr_print_function_t) ndr_print_dfs_GetDcAddress,
5708 false,
5711 "dfs_SetDcAddress",
5712 sizeof(struct dfs_SetDcAddress),
5713 (ndr_push_flags_fn_t) ndr_push_dfs_SetDcAddress,
5714 (ndr_pull_flags_fn_t) ndr_pull_dfs_SetDcAddress,
5715 (ndr_print_function_t) ndr_print_dfs_SetDcAddress,
5716 false,
5719 "dfs_FlushFtTable",
5720 sizeof(struct dfs_FlushFtTable),
5721 (ndr_push_flags_fn_t) ndr_push_dfs_FlushFtTable,
5722 (ndr_pull_flags_fn_t) ndr_pull_dfs_FlushFtTable,
5723 (ndr_print_function_t) ndr_print_dfs_FlushFtTable,
5724 false,
5727 "dfs_Add2",
5728 sizeof(struct dfs_Add2),
5729 (ndr_push_flags_fn_t) ndr_push_dfs_Add2,
5730 (ndr_pull_flags_fn_t) ndr_pull_dfs_Add2,
5731 (ndr_print_function_t) ndr_print_dfs_Add2,
5732 false,
5735 "dfs_Remove2",
5736 sizeof(struct dfs_Remove2),
5737 (ndr_push_flags_fn_t) ndr_push_dfs_Remove2,
5738 (ndr_pull_flags_fn_t) ndr_pull_dfs_Remove2,
5739 (ndr_print_function_t) ndr_print_dfs_Remove2,
5740 false,
5743 "dfs_EnumEx",
5744 sizeof(struct dfs_EnumEx),
5745 (ndr_push_flags_fn_t) ndr_push_dfs_EnumEx,
5746 (ndr_pull_flags_fn_t) ndr_pull_dfs_EnumEx,
5747 (ndr_print_function_t) ndr_print_dfs_EnumEx,
5748 false,
5751 "dfs_SetInfo2",
5752 sizeof(struct dfs_SetInfo2),
5753 (ndr_push_flags_fn_t) ndr_push_dfs_SetInfo2,
5754 (ndr_pull_flags_fn_t) ndr_pull_dfs_SetInfo2,
5755 (ndr_print_function_t) ndr_print_dfs_SetInfo2,
5756 false,
5758 { NULL, 0, NULL, NULL, NULL, false }
5761 static const char * const netdfs_endpoint_strings[] = {
5762 "ncacn_np:[\\pipe\\netdfs]",
5763 "ncacn_ip_tcp:",
5764 "ncalrpc:",
5767 static const struct ndr_interface_string_array netdfs_endpoints = {
5768 .count = 3,
5769 .names = netdfs_endpoint_strings
5772 static const char * const netdfs_authservice_strings[] = {
5773 "host",
5776 static const struct ndr_interface_string_array netdfs_authservices = {
5777 .count = 1,
5778 .names = netdfs_authservice_strings
5782 const struct ndr_interface_table ndr_table_netdfs = {
5783 .name = "netdfs",
5784 .syntax_id = {
5785 {0x4fc742e0,0x4a10,0x11cf,{0x82,0x73},{0x00,0xaa,0x00,0x4a,0xe6,0x73}},
5786 NDR_NETDFS_VERSION
5788 .helpstring = NDR_NETDFS_HELPSTRING,
5789 .num_calls = 23,
5790 .calls = netdfs_calls,
5791 .endpoints = &netdfs_endpoints,
5792 .authservices = &netdfs_authservices