sesssetup.c: Add debug message.
[Samba.git] / source / librpc / gen_ndr / ndr_dfs.c
blob4ac009642481c5db83a3b57e97ac6ce9baa98183
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", 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 NDR_CHECK(ndr_push_GUID(ndr, NDR_BUFFERS, &r->guid));
548 if (r->stores) {
549 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
550 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
551 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
553 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
554 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
558 return NDR_ERR_SUCCESS;
561 static enum ndr_err_code ndr_pull_dfs_Info4(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info4 *r)
563 uint32_t _ptr_path;
564 TALLOC_CTX *_mem_save_path_0;
565 uint32_t _ptr_comment;
566 TALLOC_CTX *_mem_save_comment_0;
567 uint32_t _ptr_stores;
568 uint32_t cntr_stores_1;
569 TALLOC_CTX *_mem_save_stores_0;
570 TALLOC_CTX *_mem_save_stores_1;
571 if (ndr_flags & NDR_SCALARS) {
572 NDR_CHECK(ndr_pull_align(ndr, 4));
573 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
574 if (_ptr_path) {
575 NDR_PULL_ALLOC(ndr, r->path);
576 } else {
577 r->path = NULL;
579 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
580 if (_ptr_comment) {
581 NDR_PULL_ALLOC(ndr, r->comment);
582 } else {
583 r->comment = NULL;
585 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
586 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
587 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
588 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores));
589 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_stores));
590 if (_ptr_stores) {
591 NDR_PULL_ALLOC(ndr, r->stores);
592 } else {
593 r->stores = NULL;
596 if (ndr_flags & NDR_BUFFERS) {
597 if (r->path) {
598 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
599 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
600 NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
601 NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
602 if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) {
603 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));
605 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t)));
606 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16));
607 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
609 if (r->comment) {
610 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
611 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
612 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
613 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
614 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
615 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
617 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
618 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
619 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
621 NDR_CHECK(ndr_pull_GUID(ndr, NDR_BUFFERS, &r->guid));
622 if (r->stores) {
623 _mem_save_stores_0 = NDR_PULL_GET_MEM_CTX(ndr);
624 NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
625 NDR_CHECK(ndr_pull_array_size(ndr, &r->stores));
626 NDR_PULL_ALLOC_N(ndr, r->stores, ndr_get_array_size(ndr, &r->stores));
627 _mem_save_stores_1 = NDR_PULL_GET_MEM_CTX(ndr);
628 NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
629 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
630 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
632 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
633 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
635 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_1, 0);
636 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_0, 0);
638 if (r->stores) {
639 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->stores, r->num_stores));
642 return NDR_ERR_SUCCESS;
645 _PUBLIC_ void ndr_print_dfs_Info4(struct ndr_print *ndr, const char *name, const struct dfs_Info4 *r)
647 uint32_t cntr_stores_1;
648 ndr_print_struct(ndr, name, "dfs_Info4");
649 ndr->depth++;
650 ndr_print_ptr(ndr, "path", r->path);
651 ndr->depth++;
652 if (r->path) {
653 ndr_print_string(ndr, "path", r->path);
655 ndr->depth--;
656 ndr_print_ptr(ndr, "comment", r->comment);
657 ndr->depth++;
658 if (r->comment) {
659 ndr_print_string(ndr, "comment", r->comment);
661 ndr->depth--;
662 ndr_print_dfs_VolumeState(ndr, "state", r->state);
663 ndr_print_uint32(ndr, "timeout", r->timeout);
664 ndr_print_GUID(ndr, "guid", &r->guid);
665 ndr_print_uint32(ndr, "num_stores", r->num_stores);
666 ndr_print_ptr(ndr, "stores", r->stores);
667 ndr->depth++;
668 if (r->stores) {
669 ndr->print(ndr, "%s: ARRAY(%d)", "stores", r->num_stores);
670 ndr->depth++;
671 for (cntr_stores_1=0;cntr_stores_1<r->num_stores;cntr_stores_1++) {
672 char *idx_1=NULL;
673 if (asprintf(&idx_1, "[%d]", cntr_stores_1) != -1) {
674 ndr_print_dfs_StorageInfo(ndr, "stores", &r->stores[cntr_stores_1]);
675 free(idx_1);
678 ndr->depth--;
680 ndr->depth--;
681 ndr->depth--;
684 _PUBLIC_ enum ndr_err_code ndr_push_dfs_PropertyFlags(struct ndr_push *ndr, int ndr_flags, uint32_t r)
686 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
687 return NDR_ERR_SUCCESS;
690 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_PropertyFlags(struct ndr_pull *ndr, int ndr_flags, uint32_t *r)
692 uint32_t v;
693 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
694 *r = v;
695 return NDR_ERR_SUCCESS;
698 _PUBLIC_ void ndr_print_dfs_PropertyFlags(struct ndr_print *ndr, const char *name, uint32_t r)
700 ndr_print_uint32(ndr, name, r);
701 ndr->depth++;
702 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_INSITE_REFERRALS", DFS_PROPERTY_FLAG_INSITE_REFERRALS, r);
703 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_ROOT_SCALABILITY", DFS_PROPERTY_FLAG_ROOT_SCALABILITY, r);
704 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_SITE_COSTING", DFS_PROPERTY_FLAG_SITE_COSTING, r);
705 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_TARGET_FAILBACK", DFS_PROPERTY_FLAG_TARGET_FAILBACK, r);
706 ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "DFS_PROPERTY_FLAG_CLUSTER_ENABLED", DFS_PROPERTY_FLAG_CLUSTER_ENABLED, r);
707 ndr->depth--;
710 static enum ndr_err_code ndr_push_dfs_Info5(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info5 *r)
712 if (ndr_flags & NDR_SCALARS) {
713 NDR_CHECK(ndr_push_align(ndr, 4));
714 NDR_CHECK(ndr_push_unique_ptr(ndr, r->path));
715 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
716 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
717 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
718 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
719 NDR_CHECK(ndr_push_dfs_PropertyFlags(ndr, NDR_SCALARS, r->flags));
720 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pktsize));
721 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
723 if (ndr_flags & NDR_BUFFERS) {
724 if (r->path) {
725 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
726 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
727 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->path, CH_UTF16)));
728 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->path, ndr_charset_length(r->path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
730 if (r->comment) {
731 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
732 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
733 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
734 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
736 NDR_CHECK(ndr_push_GUID(ndr, NDR_BUFFERS, &r->guid));
738 return NDR_ERR_SUCCESS;
741 static enum ndr_err_code ndr_pull_dfs_Info5(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info5 *r)
743 uint32_t _ptr_path;
744 TALLOC_CTX *_mem_save_path_0;
745 uint32_t _ptr_comment;
746 TALLOC_CTX *_mem_save_comment_0;
747 if (ndr_flags & NDR_SCALARS) {
748 NDR_CHECK(ndr_pull_align(ndr, 4));
749 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_path));
750 if (_ptr_path) {
751 NDR_PULL_ALLOC(ndr, r->path);
752 } else {
753 r->path = NULL;
755 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
756 if (_ptr_comment) {
757 NDR_PULL_ALLOC(ndr, r->comment);
758 } else {
759 r->comment = NULL;
761 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
762 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
763 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
764 NDR_CHECK(ndr_pull_dfs_PropertyFlags(ndr, NDR_SCALARS, &r->flags));
765 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pktsize));
766 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->num_stores));
768 if (ndr_flags & NDR_BUFFERS) {
769 if (r->path) {
770 _mem_save_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
771 NDR_PULL_SET_MEM_CTX(ndr, r->path, 0);
772 NDR_CHECK(ndr_pull_array_size(ndr, &r->path));
773 NDR_CHECK(ndr_pull_array_length(ndr, &r->path));
774 if (ndr_get_array_length(ndr, &r->path) > ndr_get_array_size(ndr, &r->path)) {
775 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));
777 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t)));
778 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->path, ndr_get_array_length(ndr, &r->path), sizeof(uint16_t), CH_UTF16));
779 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_path_0, 0);
781 if (r->comment) {
782 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
783 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
784 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
785 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
786 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
787 return ndr_pull_error(ndr, NDR_ERR_ARRAY_SIZE, "Bad array size %u should exceed array length %u", ndr_get_array_size(ndr, &r->comment), ndr_get_array_length(ndr, &r->comment));
789 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
790 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
791 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
793 NDR_CHECK(ndr_pull_GUID(ndr, NDR_BUFFERS, &r->guid));
795 return NDR_ERR_SUCCESS;
798 _PUBLIC_ void ndr_print_dfs_Info5(struct ndr_print *ndr, const char *name, const struct dfs_Info5 *r)
800 ndr_print_struct(ndr, name, "dfs_Info5");
801 ndr->depth++;
802 ndr_print_ptr(ndr, "path", r->path);
803 ndr->depth++;
804 if (r->path) {
805 ndr_print_string(ndr, "path", r->path);
807 ndr->depth--;
808 ndr_print_ptr(ndr, "comment", r->comment);
809 ndr->depth++;
810 if (r->comment) {
811 ndr_print_string(ndr, "comment", r->comment);
813 ndr->depth--;
814 ndr_print_dfs_VolumeState(ndr, "state", r->state);
815 ndr_print_uint32(ndr, "timeout", r->timeout);
816 ndr_print_GUID(ndr, "guid", &r->guid);
817 ndr_print_dfs_PropertyFlags(ndr, "flags", r->flags);
818 ndr_print_uint32(ndr, "pktsize", r->pktsize);
819 ndr_print_uint32(ndr, "num_stores", r->num_stores);
820 ndr->depth--;
823 static enum ndr_err_code ndr_push_dfs_Target_PriorityClass(struct ndr_push *ndr, int ndr_flags, enum dfs_Target_PriorityClass r)
825 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
826 return NDR_ERR_SUCCESS;
829 static enum ndr_err_code ndr_pull_dfs_Target_PriorityClass(struct ndr_pull *ndr, int ndr_flags, enum dfs_Target_PriorityClass *r)
831 uint32_t v;
832 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
833 *r = v;
834 return NDR_ERR_SUCCESS;
837 _PUBLIC_ void ndr_print_dfs_Target_PriorityClass(struct ndr_print *ndr, const char *name, enum dfs_Target_PriorityClass r)
839 const char *val = NULL;
841 switch (r) {
842 case DFS_INVALID_PRIORITY_CLASS: val = "DFS_INVALID_PRIORITY_CLASS"; break;
843 case DFS_SITE_COST_NORMAL_PRIORITY_CLASS: val = "DFS_SITE_COST_NORMAL_PRIORITY_CLASS"; break;
844 case DFS_GLOBAL_HIGH_PRIORITY_CLASS: val = "DFS_GLOBAL_HIGH_PRIORITY_CLASS"; break;
845 case DFS_SITE_COST_HIGH_PRIORITY_CLASS: val = "DFS_SITE_COST_HIGH_PRIORITY_CLASS"; break;
846 case DFS_SITE_COST_LOW_PRIORITY_CLASS: val = "DFS_SITE_COST_LOW_PRIORITY_CLASS"; break;
847 case DFS_GLOBAL_LOW_PRIORITY_CLASS: val = "DFS_GLOBAL_LOW_PRIORITY_CLASS"; break;
849 ndr_print_enum(ndr, name, "ENUM", val, r);
852 static enum ndr_err_code ndr_push_dfs_Target_Priority(struct ndr_push *ndr, int ndr_flags, const struct dfs_Target_Priority *r)
854 if (ndr_flags & NDR_SCALARS) {
855 NDR_CHECK(ndr_push_align(ndr, 4));
856 NDR_CHECK(ndr_push_dfs_Target_PriorityClass(ndr, NDR_SCALARS, r->target_priority_class));
857 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->target_priority_rank));
858 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->reserved));
860 if (ndr_flags & NDR_BUFFERS) {
862 return NDR_ERR_SUCCESS;
865 static enum ndr_err_code ndr_pull_dfs_Target_Priority(struct ndr_pull *ndr, int ndr_flags, struct dfs_Target_Priority *r)
867 if (ndr_flags & NDR_SCALARS) {
868 NDR_CHECK(ndr_pull_align(ndr, 4));
869 NDR_CHECK(ndr_pull_dfs_Target_PriorityClass(ndr, NDR_SCALARS, &r->target_priority_class));
870 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->target_priority_rank));
871 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->reserved));
873 if (ndr_flags & NDR_BUFFERS) {
875 return NDR_ERR_SUCCESS;
878 _PUBLIC_ void ndr_print_dfs_Target_Priority(struct ndr_print *ndr, const char *name, const struct dfs_Target_Priority *r)
880 ndr_print_struct(ndr, name, "dfs_Target_Priority");
881 ndr->depth++;
882 ndr_print_dfs_Target_PriorityClass(ndr, "target_priority_class", r->target_priority_class);
883 ndr_print_uint16(ndr, "target_priority_rank", r->target_priority_rank);
884 ndr_print_uint16(ndr, "reserved", r->reserved);
885 ndr->depth--;
888 static enum ndr_err_code ndr_push_dfs_StorageInfo2(struct ndr_push *ndr, int ndr_flags, const struct dfs_StorageInfo2 *r)
890 if (ndr_flags & NDR_SCALARS) {
891 NDR_CHECK(ndr_push_align(ndr, 4));
892 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_SCALARS, &r->info));
893 NDR_CHECK(ndr_push_dfs_Target_Priority(ndr, NDR_SCALARS, &r->target_priority));
895 if (ndr_flags & NDR_BUFFERS) {
896 NDR_CHECK(ndr_push_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->info));
898 return NDR_ERR_SUCCESS;
901 static enum ndr_err_code ndr_pull_dfs_StorageInfo2(struct ndr_pull *ndr, int ndr_flags, struct dfs_StorageInfo2 *r)
903 if (ndr_flags & NDR_SCALARS) {
904 NDR_CHECK(ndr_pull_align(ndr, 4));
905 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_SCALARS, &r->info));
906 NDR_CHECK(ndr_pull_dfs_Target_Priority(ndr, NDR_SCALARS, &r->target_priority));
908 if (ndr_flags & NDR_BUFFERS) {
909 NDR_CHECK(ndr_pull_dfs_StorageInfo(ndr, NDR_BUFFERS, &r->info));
911 return NDR_ERR_SUCCESS;
914 _PUBLIC_ void ndr_print_dfs_StorageInfo2(struct ndr_print *ndr, const char *name, const struct dfs_StorageInfo2 *r)
916 ndr_print_struct(ndr, name, "dfs_StorageInfo2");
917 ndr->depth++;
918 ndr_print_dfs_StorageInfo(ndr, "info", &r->info);
919 ndr_print_dfs_Target_Priority(ndr, "target_priority", &r->target_priority);
920 ndr->depth--;
923 static enum ndr_err_code ndr_push_dfs_Info6(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info6 *r)
925 uint32_t cntr_stores_1;
926 if (ndr_flags & NDR_SCALARS) {
927 NDR_CHECK(ndr_push_align(ndr, 4));
928 NDR_CHECK(ndr_push_unique_ptr(ndr, r->entry_path));
929 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
930 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
931 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
932 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
933 NDR_CHECK(ndr_push_dfs_PropertyFlags(ndr, NDR_SCALARS, r->flags));
934 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->pktsize));
935 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r->num_stores));
936 NDR_CHECK(ndr_push_unique_ptr(ndr, r->stores));
938 if (ndr_flags & NDR_BUFFERS) {
939 if (r->entry_path) {
940 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->entry_path, CH_UTF16)));
941 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
942 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->entry_path, CH_UTF16)));
943 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->entry_path, ndr_charset_length(r->entry_path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
945 if (r->comment) {
946 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
947 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
948 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
949 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
951 NDR_CHECK(ndr_push_GUID(ndr, NDR_BUFFERS, &r->guid));
952 if (r->stores) {
953 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->num_stores));
954 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
955 NDR_CHECK(ndr_push_dfs_StorageInfo2(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
957 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
958 NDR_CHECK(ndr_push_dfs_StorageInfo2(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
962 return NDR_ERR_SUCCESS;
965 static enum ndr_err_code ndr_pull_dfs_Info6(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info6 *r)
967 uint32_t _ptr_entry_path;
968 TALLOC_CTX *_mem_save_entry_path_0;
969 uint32_t _ptr_comment;
970 TALLOC_CTX *_mem_save_comment_0;
971 uint32_t _ptr_stores;
972 uint32_t cntr_stores_1;
973 TALLOC_CTX *_mem_save_stores_0;
974 TALLOC_CTX *_mem_save_stores_1;
975 if (ndr_flags & NDR_SCALARS) {
976 NDR_CHECK(ndr_pull_align(ndr, 4));
977 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_entry_path));
978 if (_ptr_entry_path) {
979 NDR_PULL_ALLOC(ndr, r->entry_path);
980 } else {
981 r->entry_path = NULL;
983 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
984 if (_ptr_comment) {
985 NDR_PULL_ALLOC(ndr, r->comment);
986 } else {
987 r->comment = NULL;
989 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
990 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
991 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
992 NDR_CHECK(ndr_pull_dfs_PropertyFlags(ndr, NDR_SCALARS, &r->flags));
993 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->pktsize));
994 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &r->num_stores));
995 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_stores));
996 if (_ptr_stores) {
997 NDR_PULL_ALLOC(ndr, r->stores);
998 } else {
999 r->stores = NULL;
1002 if (ndr_flags & NDR_BUFFERS) {
1003 if (r->entry_path) {
1004 _mem_save_entry_path_0 = NDR_PULL_GET_MEM_CTX(ndr);
1005 NDR_PULL_SET_MEM_CTX(ndr, r->entry_path, 0);
1006 NDR_CHECK(ndr_pull_array_size(ndr, &r->entry_path));
1007 NDR_CHECK(ndr_pull_array_length(ndr, &r->entry_path));
1008 if (ndr_get_array_length(ndr, &r->entry_path) > ndr_get_array_size(ndr, &r->entry_path)) {
1009 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));
1011 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->entry_path), sizeof(uint16_t)));
1012 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->entry_path, ndr_get_array_length(ndr, &r->entry_path), sizeof(uint16_t), CH_UTF16));
1013 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_entry_path_0, 0);
1015 if (r->comment) {
1016 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
1017 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
1018 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
1019 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
1020 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
1021 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));
1023 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
1024 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
1025 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
1027 NDR_CHECK(ndr_pull_GUID(ndr, NDR_BUFFERS, &r->guid));
1028 if (r->stores) {
1029 _mem_save_stores_0 = NDR_PULL_GET_MEM_CTX(ndr);
1030 NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
1031 NDR_CHECK(ndr_pull_array_size(ndr, &r->stores));
1032 NDR_PULL_ALLOC_N(ndr, r->stores, ndr_get_array_size(ndr, &r->stores));
1033 _mem_save_stores_1 = NDR_PULL_GET_MEM_CTX(ndr);
1034 NDR_PULL_SET_MEM_CTX(ndr, r->stores, 0);
1035 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
1036 NDR_CHECK(ndr_pull_dfs_StorageInfo2(ndr, NDR_SCALARS, &r->stores[cntr_stores_1]));
1038 for (cntr_stores_1 = 0; cntr_stores_1 < r->num_stores; cntr_stores_1++) {
1039 NDR_CHECK(ndr_pull_dfs_StorageInfo2(ndr, NDR_BUFFERS, &r->stores[cntr_stores_1]));
1041 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_1, 0);
1042 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_stores_0, 0);
1044 if (r->stores) {
1045 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->stores, r->num_stores));
1048 return NDR_ERR_SUCCESS;
1051 _PUBLIC_ void ndr_print_dfs_Info6(struct ndr_print *ndr, const char *name, const struct dfs_Info6 *r)
1053 uint32_t cntr_stores_1;
1054 ndr_print_struct(ndr, name, "dfs_Info6");
1055 ndr->depth++;
1056 ndr_print_ptr(ndr, "entry_path", r->entry_path);
1057 ndr->depth++;
1058 if (r->entry_path) {
1059 ndr_print_string(ndr, "entry_path", r->entry_path);
1061 ndr->depth--;
1062 ndr_print_ptr(ndr, "comment", r->comment);
1063 ndr->depth++;
1064 if (r->comment) {
1065 ndr_print_string(ndr, "comment", r->comment);
1067 ndr->depth--;
1068 ndr_print_dfs_VolumeState(ndr, "state", r->state);
1069 ndr_print_uint32(ndr, "timeout", r->timeout);
1070 ndr_print_GUID(ndr, "guid", &r->guid);
1071 ndr_print_dfs_PropertyFlags(ndr, "flags", r->flags);
1072 ndr_print_uint32(ndr, "pktsize", r->pktsize);
1073 ndr_print_uint16(ndr, "num_stores", r->num_stores);
1074 ndr_print_ptr(ndr, "stores", r->stores);
1075 ndr->depth++;
1076 if (r->stores) {
1077 ndr->print(ndr, "%s: ARRAY(%d)", "stores", r->num_stores);
1078 ndr->depth++;
1079 for (cntr_stores_1=0;cntr_stores_1<r->num_stores;cntr_stores_1++) {
1080 char *idx_1=NULL;
1081 if (asprintf(&idx_1, "[%d]", cntr_stores_1) != -1) {
1082 ndr_print_dfs_StorageInfo2(ndr, "stores", &r->stores[cntr_stores_1]);
1083 free(idx_1);
1086 ndr->depth--;
1088 ndr->depth--;
1089 ndr->depth--;
1092 static enum ndr_err_code ndr_push_dfs_Info7(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info7 *r)
1094 if (ndr_flags & NDR_SCALARS) {
1095 NDR_CHECK(ndr_push_align(ndr, 4));
1096 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->generation_guid));
1098 if (ndr_flags & NDR_BUFFERS) {
1099 NDR_CHECK(ndr_push_GUID(ndr, NDR_BUFFERS, &r->generation_guid));
1101 return NDR_ERR_SUCCESS;
1104 static enum ndr_err_code ndr_pull_dfs_Info7(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info7 *r)
1106 if (ndr_flags & NDR_SCALARS) {
1107 NDR_CHECK(ndr_pull_align(ndr, 4));
1108 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->generation_guid));
1110 if (ndr_flags & NDR_BUFFERS) {
1111 NDR_CHECK(ndr_pull_GUID(ndr, NDR_BUFFERS, &r->generation_guid));
1113 return NDR_ERR_SUCCESS;
1116 _PUBLIC_ void ndr_print_dfs_Info7(struct ndr_print *ndr, const char *name, const struct dfs_Info7 *r)
1118 ndr_print_struct(ndr, name, "dfs_Info7");
1119 ndr->depth++;
1120 ndr_print_GUID(ndr, "generation_guid", &r->generation_guid);
1121 ndr->depth--;
1124 static enum ndr_err_code ndr_push_dfs_Info100(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info100 *r)
1126 if (ndr_flags & NDR_SCALARS) {
1127 NDR_CHECK(ndr_push_align(ndr, 4));
1128 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
1130 if (ndr_flags & NDR_BUFFERS) {
1131 if (r->comment) {
1132 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
1133 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1134 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
1135 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1138 return NDR_ERR_SUCCESS;
1141 static enum ndr_err_code ndr_pull_dfs_Info100(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info100 *r)
1143 uint32_t _ptr_comment;
1144 TALLOC_CTX *_mem_save_comment_0;
1145 if (ndr_flags & NDR_SCALARS) {
1146 NDR_CHECK(ndr_pull_align(ndr, 4));
1147 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
1148 if (_ptr_comment) {
1149 NDR_PULL_ALLOC(ndr, r->comment);
1150 } else {
1151 r->comment = NULL;
1154 if (ndr_flags & NDR_BUFFERS) {
1155 if (r->comment) {
1156 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
1157 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
1158 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
1159 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
1160 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
1161 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));
1163 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
1164 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
1165 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
1168 return NDR_ERR_SUCCESS;
1171 _PUBLIC_ void ndr_print_dfs_Info100(struct ndr_print *ndr, const char *name, const struct dfs_Info100 *r)
1173 ndr_print_struct(ndr, name, "dfs_Info100");
1174 ndr->depth++;
1175 ndr_print_ptr(ndr, "comment", r->comment);
1176 ndr->depth++;
1177 if (r->comment) {
1178 ndr_print_string(ndr, "comment", r->comment);
1180 ndr->depth--;
1181 ndr->depth--;
1184 static enum ndr_err_code ndr_push_dfs_Info101(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info101 *r)
1186 if (ndr_flags & NDR_SCALARS) {
1187 NDR_CHECK(ndr_push_align(ndr, 4));
1188 NDR_CHECK(ndr_push_dfs_StorageState(ndr, NDR_SCALARS, r->state));
1190 if (ndr_flags & NDR_BUFFERS) {
1192 return NDR_ERR_SUCCESS;
1195 static enum ndr_err_code ndr_pull_dfs_Info101(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info101 *r)
1197 if (ndr_flags & NDR_SCALARS) {
1198 NDR_CHECK(ndr_pull_align(ndr, 4));
1199 NDR_CHECK(ndr_pull_dfs_StorageState(ndr, NDR_SCALARS, &r->state));
1201 if (ndr_flags & NDR_BUFFERS) {
1203 return NDR_ERR_SUCCESS;
1206 _PUBLIC_ void ndr_print_dfs_Info101(struct ndr_print *ndr, const char *name, const struct dfs_Info101 *r)
1208 ndr_print_struct(ndr, name, "dfs_Info101");
1209 ndr->depth++;
1210 ndr_print_dfs_StorageState(ndr, "state", r->state);
1211 ndr->depth--;
1214 static enum ndr_err_code ndr_push_dfs_Info102(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info102 *r)
1216 if (ndr_flags & NDR_SCALARS) {
1217 NDR_CHECK(ndr_push_align(ndr, 4));
1218 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
1220 if (ndr_flags & NDR_BUFFERS) {
1222 return NDR_ERR_SUCCESS;
1225 static enum ndr_err_code ndr_pull_dfs_Info102(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info102 *r)
1227 if (ndr_flags & NDR_SCALARS) {
1228 NDR_CHECK(ndr_pull_align(ndr, 4));
1229 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
1231 if (ndr_flags & NDR_BUFFERS) {
1233 return NDR_ERR_SUCCESS;
1236 _PUBLIC_ void ndr_print_dfs_Info102(struct ndr_print *ndr, const char *name, const struct dfs_Info102 *r)
1238 ndr_print_struct(ndr, name, "dfs_Info102");
1239 ndr->depth++;
1240 ndr_print_uint32(ndr, "timeout", r->timeout);
1241 ndr->depth--;
1244 static enum ndr_err_code ndr_push_dfs_Info103(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info103 *r)
1246 if (ndr_flags & NDR_SCALARS) {
1247 NDR_CHECK(ndr_push_align(ndr, 4));
1248 NDR_CHECK(ndr_push_dfs_PropertyFlags(ndr, NDR_SCALARS, r->flags));
1250 if (ndr_flags & NDR_BUFFERS) {
1252 return NDR_ERR_SUCCESS;
1255 static enum ndr_err_code ndr_pull_dfs_Info103(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info103 *r)
1257 if (ndr_flags & NDR_SCALARS) {
1258 NDR_CHECK(ndr_pull_align(ndr, 4));
1259 NDR_CHECK(ndr_pull_dfs_PropertyFlags(ndr, NDR_SCALARS, &r->flags));
1261 if (ndr_flags & NDR_BUFFERS) {
1263 return NDR_ERR_SUCCESS;
1266 _PUBLIC_ void ndr_print_dfs_Info103(struct ndr_print *ndr, const char *name, const struct dfs_Info103 *r)
1268 ndr_print_struct(ndr, name, "dfs_Info103");
1269 ndr->depth++;
1270 ndr_print_dfs_PropertyFlags(ndr, "flags", r->flags);
1271 ndr->depth--;
1274 static enum ndr_err_code ndr_push_dfs_Info104(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info104 *r)
1276 if (ndr_flags & NDR_SCALARS) {
1277 NDR_CHECK(ndr_push_align(ndr, 4));
1278 NDR_CHECK(ndr_push_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority));
1280 if (ndr_flags & NDR_BUFFERS) {
1282 return NDR_ERR_SUCCESS;
1285 static enum ndr_err_code ndr_pull_dfs_Info104(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info104 *r)
1287 if (ndr_flags & NDR_SCALARS) {
1288 NDR_CHECK(ndr_pull_align(ndr, 4));
1289 NDR_CHECK(ndr_pull_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority));
1291 if (ndr_flags & NDR_BUFFERS) {
1293 return NDR_ERR_SUCCESS;
1296 _PUBLIC_ void ndr_print_dfs_Info104(struct ndr_print *ndr, const char *name, const struct dfs_Info104 *r)
1298 ndr_print_struct(ndr, name, "dfs_Info104");
1299 ndr->depth++;
1300 ndr_print_dfs_Target_Priority(ndr, "priority", &r->priority);
1301 ndr->depth--;
1304 static enum ndr_err_code ndr_push_dfs_Info105(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info105 *r)
1306 if (ndr_flags & NDR_SCALARS) {
1307 NDR_CHECK(ndr_push_align(ndr, 4));
1308 NDR_CHECK(ndr_push_unique_ptr(ndr, r->comment));
1309 NDR_CHECK(ndr_push_dfs_VolumeState(ndr, NDR_SCALARS, r->state));
1310 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->timeout));
1311 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->property_flag_mask));
1312 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->property_flags));
1314 if (ndr_flags & NDR_BUFFERS) {
1315 if (r->comment) {
1316 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
1317 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1318 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->comment, CH_UTF16)));
1319 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->comment, ndr_charset_length(r->comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1322 return NDR_ERR_SUCCESS;
1325 static enum ndr_err_code ndr_pull_dfs_Info105(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info105 *r)
1327 uint32_t _ptr_comment;
1328 TALLOC_CTX *_mem_save_comment_0;
1329 if (ndr_flags & NDR_SCALARS) {
1330 NDR_CHECK(ndr_pull_align(ndr, 4));
1331 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
1332 if (_ptr_comment) {
1333 NDR_PULL_ALLOC(ndr, r->comment);
1334 } else {
1335 r->comment = NULL;
1337 NDR_CHECK(ndr_pull_dfs_VolumeState(ndr, NDR_SCALARS, &r->state));
1338 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->timeout));
1339 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->property_flag_mask));
1340 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->property_flags));
1342 if (ndr_flags & NDR_BUFFERS) {
1343 if (r->comment) {
1344 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
1345 NDR_PULL_SET_MEM_CTX(ndr, r->comment, 0);
1346 NDR_CHECK(ndr_pull_array_size(ndr, &r->comment));
1347 NDR_CHECK(ndr_pull_array_length(ndr, &r->comment));
1348 if (ndr_get_array_length(ndr, &r->comment) > ndr_get_array_size(ndr, &r->comment)) {
1349 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));
1351 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t)));
1352 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->comment, ndr_get_array_length(ndr, &r->comment), sizeof(uint16_t), CH_UTF16));
1353 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
1356 return NDR_ERR_SUCCESS;
1359 _PUBLIC_ void ndr_print_dfs_Info105(struct ndr_print *ndr, const char *name, const struct dfs_Info105 *r)
1361 ndr_print_struct(ndr, name, "dfs_Info105");
1362 ndr->depth++;
1363 ndr_print_ptr(ndr, "comment", r->comment);
1364 ndr->depth++;
1365 if (r->comment) {
1366 ndr_print_string(ndr, "comment", r->comment);
1368 ndr->depth--;
1369 ndr_print_dfs_VolumeState(ndr, "state", r->state);
1370 ndr_print_uint32(ndr, "timeout", r->timeout);
1371 ndr_print_uint32(ndr, "property_flag_mask", r->property_flag_mask);
1372 ndr_print_uint32(ndr, "property_flags", r->property_flags);
1373 ndr->depth--;
1376 static enum ndr_err_code ndr_push_dfs_Info106(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info106 *r)
1378 if (ndr_flags & NDR_SCALARS) {
1379 NDR_CHECK(ndr_push_align(ndr, 4));
1380 NDR_CHECK(ndr_push_dfs_StorageState(ndr, NDR_SCALARS, r->state));
1381 NDR_CHECK(ndr_push_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority));
1383 if (ndr_flags & NDR_BUFFERS) {
1385 return NDR_ERR_SUCCESS;
1388 static enum ndr_err_code ndr_pull_dfs_Info106(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info106 *r)
1390 if (ndr_flags & NDR_SCALARS) {
1391 NDR_CHECK(ndr_pull_align(ndr, 4));
1392 NDR_CHECK(ndr_pull_dfs_StorageState(ndr, NDR_SCALARS, &r->state));
1393 NDR_CHECK(ndr_pull_dfs_Target_Priority(ndr, NDR_SCALARS, &r->priority));
1395 if (ndr_flags & NDR_BUFFERS) {
1397 return NDR_ERR_SUCCESS;
1400 _PUBLIC_ void ndr_print_dfs_Info106(struct ndr_print *ndr, const char *name, const struct dfs_Info106 *r)
1402 ndr_print_struct(ndr, name, "dfs_Info106");
1403 ndr->depth++;
1404 ndr_print_dfs_StorageState(ndr, "state", r->state);
1405 ndr_print_dfs_Target_Priority(ndr, "priority", &r->priority);
1406 ndr->depth--;
1409 static enum ndr_err_code ndr_push_dfs_Info200(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info200 *r)
1411 if (ndr_flags & NDR_SCALARS) {
1412 NDR_CHECK(ndr_push_align(ndr, 4));
1413 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dom_root));
1415 if (ndr_flags & NDR_BUFFERS) {
1416 if (r->dom_root) {
1417 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16)));
1418 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1419 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16)));
1420 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dom_root, ndr_charset_length(r->dom_root, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1423 return NDR_ERR_SUCCESS;
1426 static enum ndr_err_code ndr_pull_dfs_Info200(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info200 *r)
1428 uint32_t _ptr_dom_root;
1429 TALLOC_CTX *_mem_save_dom_root_0;
1430 if (ndr_flags & NDR_SCALARS) {
1431 NDR_CHECK(ndr_pull_align(ndr, 4));
1432 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dom_root));
1433 if (_ptr_dom_root) {
1434 NDR_PULL_ALLOC(ndr, r->dom_root);
1435 } else {
1436 r->dom_root = NULL;
1439 if (ndr_flags & NDR_BUFFERS) {
1440 if (r->dom_root) {
1441 _mem_save_dom_root_0 = NDR_PULL_GET_MEM_CTX(ndr);
1442 NDR_PULL_SET_MEM_CTX(ndr, r->dom_root, 0);
1443 NDR_CHECK(ndr_pull_array_size(ndr, &r->dom_root));
1444 NDR_CHECK(ndr_pull_array_length(ndr, &r->dom_root));
1445 if (ndr_get_array_length(ndr, &r->dom_root) > ndr_get_array_size(ndr, &r->dom_root)) {
1446 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));
1448 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->dom_root), sizeof(uint16_t)));
1449 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dom_root, ndr_get_array_length(ndr, &r->dom_root), sizeof(uint16_t), CH_UTF16));
1450 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_root_0, 0);
1453 return NDR_ERR_SUCCESS;
1456 _PUBLIC_ void ndr_print_dfs_Info200(struct ndr_print *ndr, const char *name, const struct dfs_Info200 *r)
1458 ndr_print_struct(ndr, name, "dfs_Info200");
1459 ndr->depth++;
1460 ndr_print_ptr(ndr, "dom_root", r->dom_root);
1461 ndr->depth++;
1462 if (r->dom_root) {
1463 ndr_print_string(ndr, "dom_root", r->dom_root);
1465 ndr->depth--;
1466 ndr->depth--;
1469 static enum ndr_err_code ndr_push_dfs_VolumeFlavor(struct ndr_push *ndr, int ndr_flags, enum dfs_VolumeFlavor r)
1471 NDR_CHECK(ndr_push_uint16(ndr, NDR_SCALARS, r));
1472 return NDR_ERR_SUCCESS;
1475 static enum ndr_err_code ndr_pull_dfs_VolumeFlavor(struct ndr_pull *ndr, int ndr_flags, enum dfs_VolumeFlavor *r)
1477 uint16_t v;
1478 NDR_CHECK(ndr_pull_uint16(ndr, NDR_SCALARS, &v));
1479 *r = v;
1480 return NDR_ERR_SUCCESS;
1483 _PUBLIC_ void ndr_print_dfs_VolumeFlavor(struct ndr_print *ndr, const char *name, enum dfs_VolumeFlavor r)
1485 const char *val = NULL;
1487 switch (r) {
1488 case DFS_VOLUME_FLAVOR_STANDALONE: val = "DFS_VOLUME_FLAVOR_STANDALONE"; break;
1489 case DFS_VOLUME_FLAVOR_AD_BLOB: val = "DFS_VOLUME_FLAVOR_AD_BLOB"; break;
1491 ndr_print_enum(ndr, name, "ENUM", val, r);
1494 static enum ndr_err_code ndr_push_dfs_Info300(struct ndr_push *ndr, int ndr_flags, const struct dfs_Info300 *r)
1496 if (ndr_flags & NDR_SCALARS) {
1497 NDR_CHECK(ndr_push_align(ndr, 4));
1498 NDR_CHECK(ndr_push_dfs_VolumeFlavor(ndr, NDR_SCALARS, r->flavor));
1499 NDR_CHECK(ndr_push_unique_ptr(ndr, r->dom_root));
1501 if (ndr_flags & NDR_BUFFERS) {
1502 if (r->dom_root) {
1503 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16)));
1504 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
1505 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->dom_root, CH_UTF16)));
1506 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->dom_root, ndr_charset_length(r->dom_root, CH_UTF16), sizeof(uint16_t), CH_UTF16));
1509 return NDR_ERR_SUCCESS;
1512 static enum ndr_err_code ndr_pull_dfs_Info300(struct ndr_pull *ndr, int ndr_flags, struct dfs_Info300 *r)
1514 uint32_t _ptr_dom_root;
1515 TALLOC_CTX *_mem_save_dom_root_0;
1516 if (ndr_flags & NDR_SCALARS) {
1517 NDR_CHECK(ndr_pull_align(ndr, 4));
1518 NDR_CHECK(ndr_pull_dfs_VolumeFlavor(ndr, NDR_SCALARS, &r->flavor));
1519 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_dom_root));
1520 if (_ptr_dom_root) {
1521 NDR_PULL_ALLOC(ndr, r->dom_root);
1522 } else {
1523 r->dom_root = NULL;
1526 if (ndr_flags & NDR_BUFFERS) {
1527 if (r->dom_root) {
1528 _mem_save_dom_root_0 = NDR_PULL_GET_MEM_CTX(ndr);
1529 NDR_PULL_SET_MEM_CTX(ndr, r->dom_root, 0);
1530 NDR_CHECK(ndr_pull_array_size(ndr, &r->dom_root));
1531 NDR_CHECK(ndr_pull_array_length(ndr, &r->dom_root));
1532 if (ndr_get_array_length(ndr, &r->dom_root) > ndr_get_array_size(ndr, &r->dom_root)) {
1533 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));
1535 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->dom_root), sizeof(uint16_t)));
1536 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->dom_root, ndr_get_array_length(ndr, &r->dom_root), sizeof(uint16_t), CH_UTF16));
1537 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_dom_root_0, 0);
1540 return NDR_ERR_SUCCESS;
1543 _PUBLIC_ void ndr_print_dfs_Info300(struct ndr_print *ndr, const char *name, const struct dfs_Info300 *r)
1545 ndr_print_struct(ndr, name, "dfs_Info300");
1546 ndr->depth++;
1547 ndr_print_dfs_VolumeFlavor(ndr, "flavor", r->flavor);
1548 ndr_print_ptr(ndr, "dom_root", r->dom_root);
1549 ndr->depth++;
1550 if (r->dom_root) {
1551 ndr_print_string(ndr, "dom_root", r->dom_root);
1553 ndr->depth--;
1554 ndr->depth--;
1557 static enum ndr_err_code ndr_push_dfs_Info(struct ndr_push *ndr, int ndr_flags, const union dfs_Info *r)
1559 if (ndr_flags & NDR_SCALARS) {
1560 int level = ndr_push_get_switch_value(ndr, r);
1561 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
1562 switch (level) {
1563 case 0: {
1564 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info0));
1565 break; }
1567 case 1: {
1568 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
1569 break; }
1571 case 2: {
1572 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
1573 break; }
1575 case 3: {
1576 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3));
1577 break; }
1579 case 4: {
1580 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info4));
1581 break; }
1583 case 5: {
1584 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info5));
1585 break; }
1587 case 6: {
1588 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info6));
1589 break; }
1591 case 7: {
1592 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info7));
1593 break; }
1595 case 100: {
1596 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info100));
1597 break; }
1599 case 101: {
1600 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info101));
1601 break; }
1603 case 102: {
1604 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info102));
1605 break; }
1607 case 103: {
1608 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info103));
1609 break; }
1611 case 104: {
1612 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info104));
1613 break; }
1615 case 105: {
1616 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info105));
1617 break; }
1619 case 106: {
1620 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info106));
1621 break; }
1623 default:
1624 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1627 if (ndr_flags & NDR_BUFFERS) {
1628 int level = ndr_push_get_switch_value(ndr, r);
1629 switch (level) {
1630 case 0:
1631 if (r->info0) {
1632 NDR_CHECK(ndr_push_dfs_Info0(ndr, NDR_SCALARS, r->info0));
1634 break;
1636 case 1:
1637 if (r->info1) {
1638 NDR_CHECK(ndr_push_dfs_Info1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
1640 break;
1642 case 2:
1643 if (r->info2) {
1644 NDR_CHECK(ndr_push_dfs_Info2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
1646 break;
1648 case 3:
1649 if (r->info3) {
1650 NDR_CHECK(ndr_push_dfs_Info3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
1652 break;
1654 case 4:
1655 if (r->info4) {
1656 NDR_CHECK(ndr_push_dfs_Info4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
1658 break;
1660 case 5:
1661 if (r->info5) {
1662 NDR_CHECK(ndr_push_dfs_Info5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5));
1664 break;
1666 case 6:
1667 if (r->info6) {
1668 NDR_CHECK(ndr_push_dfs_Info6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6));
1670 break;
1672 case 7:
1673 if (r->info7) {
1674 NDR_CHECK(ndr_push_dfs_Info7(ndr, NDR_SCALARS|NDR_BUFFERS, r->info7));
1676 break;
1678 case 100:
1679 if (r->info100) {
1680 NDR_CHECK(ndr_push_dfs_Info100(ndr, NDR_SCALARS|NDR_BUFFERS, r->info100));
1682 break;
1684 case 101:
1685 if (r->info101) {
1686 NDR_CHECK(ndr_push_dfs_Info101(ndr, NDR_SCALARS, r->info101));
1688 break;
1690 case 102:
1691 if (r->info102) {
1692 NDR_CHECK(ndr_push_dfs_Info102(ndr, NDR_SCALARS, r->info102));
1694 break;
1696 case 103:
1697 if (r->info103) {
1698 NDR_CHECK(ndr_push_dfs_Info103(ndr, NDR_SCALARS, r->info103));
1700 break;
1702 case 104:
1703 if (r->info104) {
1704 NDR_CHECK(ndr_push_dfs_Info104(ndr, NDR_SCALARS, r->info104));
1706 break;
1708 case 105:
1709 if (r->info105) {
1710 NDR_CHECK(ndr_push_dfs_Info105(ndr, NDR_SCALARS|NDR_BUFFERS, r->info105));
1712 break;
1714 case 106:
1715 if (r->info106) {
1716 NDR_CHECK(ndr_push_dfs_Info106(ndr, NDR_SCALARS, r->info106));
1718 break;
1720 default:
1721 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1724 return NDR_ERR_SUCCESS;
1727 static enum ndr_err_code ndr_pull_dfs_Info(struct ndr_pull *ndr, int ndr_flags, union dfs_Info *r)
1729 int level;
1730 uint32_t _level;
1731 TALLOC_CTX *_mem_save_info0_0;
1732 TALLOC_CTX *_mem_save_info1_0;
1733 TALLOC_CTX *_mem_save_info2_0;
1734 TALLOC_CTX *_mem_save_info3_0;
1735 TALLOC_CTX *_mem_save_info4_0;
1736 TALLOC_CTX *_mem_save_info5_0;
1737 TALLOC_CTX *_mem_save_info6_0;
1738 TALLOC_CTX *_mem_save_info7_0;
1739 TALLOC_CTX *_mem_save_info100_0;
1740 TALLOC_CTX *_mem_save_info101_0;
1741 TALLOC_CTX *_mem_save_info102_0;
1742 TALLOC_CTX *_mem_save_info103_0;
1743 TALLOC_CTX *_mem_save_info104_0;
1744 TALLOC_CTX *_mem_save_info105_0;
1745 TALLOC_CTX *_mem_save_info106_0;
1746 level = ndr_pull_get_switch_value(ndr, r);
1747 if (ndr_flags & NDR_SCALARS) {
1748 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
1749 if (_level != level) {
1750 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
1752 switch (level) {
1753 case 0: {
1754 uint32_t _ptr_info0;
1755 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info0));
1756 if (_ptr_info0) {
1757 NDR_PULL_ALLOC(ndr, r->info0);
1758 } else {
1759 r->info0 = NULL;
1761 break; }
1763 case 1: {
1764 uint32_t _ptr_info1;
1765 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
1766 if (_ptr_info1) {
1767 NDR_PULL_ALLOC(ndr, r->info1);
1768 } else {
1769 r->info1 = NULL;
1771 break; }
1773 case 2: {
1774 uint32_t _ptr_info2;
1775 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
1776 if (_ptr_info2) {
1777 NDR_PULL_ALLOC(ndr, r->info2);
1778 } else {
1779 r->info2 = NULL;
1781 break; }
1783 case 3: {
1784 uint32_t _ptr_info3;
1785 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info3));
1786 if (_ptr_info3) {
1787 NDR_PULL_ALLOC(ndr, r->info3);
1788 } else {
1789 r->info3 = NULL;
1791 break; }
1793 case 4: {
1794 uint32_t _ptr_info4;
1795 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info4));
1796 if (_ptr_info4) {
1797 NDR_PULL_ALLOC(ndr, r->info4);
1798 } else {
1799 r->info4 = NULL;
1801 break; }
1803 case 5: {
1804 uint32_t _ptr_info5;
1805 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info5));
1806 if (_ptr_info5) {
1807 NDR_PULL_ALLOC(ndr, r->info5);
1808 } else {
1809 r->info5 = NULL;
1811 break; }
1813 case 6: {
1814 uint32_t _ptr_info6;
1815 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info6));
1816 if (_ptr_info6) {
1817 NDR_PULL_ALLOC(ndr, r->info6);
1818 } else {
1819 r->info6 = NULL;
1821 break; }
1823 case 7: {
1824 uint32_t _ptr_info7;
1825 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info7));
1826 if (_ptr_info7) {
1827 NDR_PULL_ALLOC(ndr, r->info7);
1828 } else {
1829 r->info7 = NULL;
1831 break; }
1833 case 100: {
1834 uint32_t _ptr_info100;
1835 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info100));
1836 if (_ptr_info100) {
1837 NDR_PULL_ALLOC(ndr, r->info100);
1838 } else {
1839 r->info100 = NULL;
1841 break; }
1843 case 101: {
1844 uint32_t _ptr_info101;
1845 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info101));
1846 if (_ptr_info101) {
1847 NDR_PULL_ALLOC(ndr, r->info101);
1848 } else {
1849 r->info101 = NULL;
1851 break; }
1853 case 102: {
1854 uint32_t _ptr_info102;
1855 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info102));
1856 if (_ptr_info102) {
1857 NDR_PULL_ALLOC(ndr, r->info102);
1858 } else {
1859 r->info102 = NULL;
1861 break; }
1863 case 103: {
1864 uint32_t _ptr_info103;
1865 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info103));
1866 if (_ptr_info103) {
1867 NDR_PULL_ALLOC(ndr, r->info103);
1868 } else {
1869 r->info103 = NULL;
1871 break; }
1873 case 104: {
1874 uint32_t _ptr_info104;
1875 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info104));
1876 if (_ptr_info104) {
1877 NDR_PULL_ALLOC(ndr, r->info104);
1878 } else {
1879 r->info104 = NULL;
1881 break; }
1883 case 105: {
1884 uint32_t _ptr_info105;
1885 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info105));
1886 if (_ptr_info105) {
1887 NDR_PULL_ALLOC(ndr, r->info105);
1888 } else {
1889 r->info105 = NULL;
1891 break; }
1893 case 106: {
1894 uint32_t _ptr_info106;
1895 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info106));
1896 if (_ptr_info106) {
1897 NDR_PULL_ALLOC(ndr, r->info106);
1898 } else {
1899 r->info106 = NULL;
1901 break; }
1903 default:
1904 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
1907 if (ndr_flags & NDR_BUFFERS) {
1908 switch (level) {
1909 case 0:
1910 if (r->info0) {
1911 _mem_save_info0_0 = NDR_PULL_GET_MEM_CTX(ndr);
1912 NDR_PULL_SET_MEM_CTX(ndr, r->info0, 0);
1913 NDR_CHECK(ndr_pull_dfs_Info0(ndr, NDR_SCALARS, r->info0));
1914 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info0_0, 0);
1916 break;
1918 case 1:
1919 if (r->info1) {
1920 _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
1921 NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
1922 NDR_CHECK(ndr_pull_dfs_Info1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
1923 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
1925 break;
1927 case 2:
1928 if (r->info2) {
1929 _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
1930 NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
1931 NDR_CHECK(ndr_pull_dfs_Info2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
1932 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
1934 break;
1936 case 3:
1937 if (r->info3) {
1938 _mem_save_info3_0 = NDR_PULL_GET_MEM_CTX(ndr);
1939 NDR_PULL_SET_MEM_CTX(ndr, r->info3, 0);
1940 NDR_CHECK(ndr_pull_dfs_Info3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
1941 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info3_0, 0);
1943 break;
1945 case 4:
1946 if (r->info4) {
1947 _mem_save_info4_0 = NDR_PULL_GET_MEM_CTX(ndr);
1948 NDR_PULL_SET_MEM_CTX(ndr, r->info4, 0);
1949 NDR_CHECK(ndr_pull_dfs_Info4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
1950 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info4_0, 0);
1952 break;
1954 case 5:
1955 if (r->info5) {
1956 _mem_save_info5_0 = NDR_PULL_GET_MEM_CTX(ndr);
1957 NDR_PULL_SET_MEM_CTX(ndr, r->info5, 0);
1958 NDR_CHECK(ndr_pull_dfs_Info5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5));
1959 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info5_0, 0);
1961 break;
1963 case 6:
1964 if (r->info6) {
1965 _mem_save_info6_0 = NDR_PULL_GET_MEM_CTX(ndr);
1966 NDR_PULL_SET_MEM_CTX(ndr, r->info6, 0);
1967 NDR_CHECK(ndr_pull_dfs_Info6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6));
1968 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info6_0, 0);
1970 break;
1972 case 7:
1973 if (r->info7) {
1974 _mem_save_info7_0 = NDR_PULL_GET_MEM_CTX(ndr);
1975 NDR_PULL_SET_MEM_CTX(ndr, r->info7, 0);
1976 NDR_CHECK(ndr_pull_dfs_Info7(ndr, NDR_SCALARS|NDR_BUFFERS, r->info7));
1977 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info7_0, 0);
1979 break;
1981 case 100:
1982 if (r->info100) {
1983 _mem_save_info100_0 = NDR_PULL_GET_MEM_CTX(ndr);
1984 NDR_PULL_SET_MEM_CTX(ndr, r->info100, 0);
1985 NDR_CHECK(ndr_pull_dfs_Info100(ndr, NDR_SCALARS|NDR_BUFFERS, r->info100));
1986 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info100_0, 0);
1988 break;
1990 case 101:
1991 if (r->info101) {
1992 _mem_save_info101_0 = NDR_PULL_GET_MEM_CTX(ndr);
1993 NDR_PULL_SET_MEM_CTX(ndr, r->info101, 0);
1994 NDR_CHECK(ndr_pull_dfs_Info101(ndr, NDR_SCALARS, r->info101));
1995 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info101_0, 0);
1997 break;
1999 case 102:
2000 if (r->info102) {
2001 _mem_save_info102_0 = NDR_PULL_GET_MEM_CTX(ndr);
2002 NDR_PULL_SET_MEM_CTX(ndr, r->info102, 0);
2003 NDR_CHECK(ndr_pull_dfs_Info102(ndr, NDR_SCALARS, r->info102));
2004 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info102_0, 0);
2006 break;
2008 case 103:
2009 if (r->info103) {
2010 _mem_save_info103_0 = NDR_PULL_GET_MEM_CTX(ndr);
2011 NDR_PULL_SET_MEM_CTX(ndr, r->info103, 0);
2012 NDR_CHECK(ndr_pull_dfs_Info103(ndr, NDR_SCALARS, r->info103));
2013 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info103_0, 0);
2015 break;
2017 case 104:
2018 if (r->info104) {
2019 _mem_save_info104_0 = NDR_PULL_GET_MEM_CTX(ndr);
2020 NDR_PULL_SET_MEM_CTX(ndr, r->info104, 0);
2021 NDR_CHECK(ndr_pull_dfs_Info104(ndr, NDR_SCALARS, r->info104));
2022 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info104_0, 0);
2024 break;
2026 case 105:
2027 if (r->info105) {
2028 _mem_save_info105_0 = NDR_PULL_GET_MEM_CTX(ndr);
2029 NDR_PULL_SET_MEM_CTX(ndr, r->info105, 0);
2030 NDR_CHECK(ndr_pull_dfs_Info105(ndr, NDR_SCALARS|NDR_BUFFERS, r->info105));
2031 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info105_0, 0);
2033 break;
2035 case 106:
2036 if (r->info106) {
2037 _mem_save_info106_0 = NDR_PULL_GET_MEM_CTX(ndr);
2038 NDR_PULL_SET_MEM_CTX(ndr, r->info106, 0);
2039 NDR_CHECK(ndr_pull_dfs_Info106(ndr, NDR_SCALARS, r->info106));
2040 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info106_0, 0);
2042 break;
2044 default:
2045 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2048 return NDR_ERR_SUCCESS;
2051 _PUBLIC_ void ndr_print_dfs_Info(struct ndr_print *ndr, const char *name, const union dfs_Info *r)
2053 int level;
2054 level = ndr_print_get_switch_value(ndr, r);
2055 ndr_print_union(ndr, name, level, "dfs_Info");
2056 switch (level) {
2057 case 0:
2058 ndr_print_ptr(ndr, "info0", r->info0);
2059 ndr->depth++;
2060 if (r->info0) {
2061 ndr_print_dfs_Info0(ndr, "info0", r->info0);
2063 ndr->depth--;
2064 break;
2066 case 1:
2067 ndr_print_ptr(ndr, "info1", r->info1);
2068 ndr->depth++;
2069 if (r->info1) {
2070 ndr_print_dfs_Info1(ndr, "info1", r->info1);
2072 ndr->depth--;
2073 break;
2075 case 2:
2076 ndr_print_ptr(ndr, "info2", r->info2);
2077 ndr->depth++;
2078 if (r->info2) {
2079 ndr_print_dfs_Info2(ndr, "info2", r->info2);
2081 ndr->depth--;
2082 break;
2084 case 3:
2085 ndr_print_ptr(ndr, "info3", r->info3);
2086 ndr->depth++;
2087 if (r->info3) {
2088 ndr_print_dfs_Info3(ndr, "info3", r->info3);
2090 ndr->depth--;
2091 break;
2093 case 4:
2094 ndr_print_ptr(ndr, "info4", r->info4);
2095 ndr->depth++;
2096 if (r->info4) {
2097 ndr_print_dfs_Info4(ndr, "info4", r->info4);
2099 ndr->depth--;
2100 break;
2102 case 5:
2103 ndr_print_ptr(ndr, "info5", r->info5);
2104 ndr->depth++;
2105 if (r->info5) {
2106 ndr_print_dfs_Info5(ndr, "info5", r->info5);
2108 ndr->depth--;
2109 break;
2111 case 6:
2112 ndr_print_ptr(ndr, "info6", r->info6);
2113 ndr->depth++;
2114 if (r->info6) {
2115 ndr_print_dfs_Info6(ndr, "info6", r->info6);
2117 ndr->depth--;
2118 break;
2120 case 7:
2121 ndr_print_ptr(ndr, "info7", r->info7);
2122 ndr->depth++;
2123 if (r->info7) {
2124 ndr_print_dfs_Info7(ndr, "info7", r->info7);
2126 ndr->depth--;
2127 break;
2129 case 100:
2130 ndr_print_ptr(ndr, "info100", r->info100);
2131 ndr->depth++;
2132 if (r->info100) {
2133 ndr_print_dfs_Info100(ndr, "info100", r->info100);
2135 ndr->depth--;
2136 break;
2138 case 101:
2139 ndr_print_ptr(ndr, "info101", r->info101);
2140 ndr->depth++;
2141 if (r->info101) {
2142 ndr_print_dfs_Info101(ndr, "info101", r->info101);
2144 ndr->depth--;
2145 break;
2147 case 102:
2148 ndr_print_ptr(ndr, "info102", r->info102);
2149 ndr->depth++;
2150 if (r->info102) {
2151 ndr_print_dfs_Info102(ndr, "info102", r->info102);
2153 ndr->depth--;
2154 break;
2156 case 103:
2157 ndr_print_ptr(ndr, "info103", r->info103);
2158 ndr->depth++;
2159 if (r->info103) {
2160 ndr_print_dfs_Info103(ndr, "info103", r->info103);
2162 ndr->depth--;
2163 break;
2165 case 104:
2166 ndr_print_ptr(ndr, "info104", r->info104);
2167 ndr->depth++;
2168 if (r->info104) {
2169 ndr_print_dfs_Info104(ndr, "info104", r->info104);
2171 ndr->depth--;
2172 break;
2174 case 105:
2175 ndr_print_ptr(ndr, "info105", r->info105);
2176 ndr->depth++;
2177 if (r->info105) {
2178 ndr_print_dfs_Info105(ndr, "info105", r->info105);
2180 ndr->depth--;
2181 break;
2183 case 106:
2184 ndr_print_ptr(ndr, "info106", r->info106);
2185 ndr->depth++;
2186 if (r->info106) {
2187 ndr_print_dfs_Info106(ndr, "info106", r->info106);
2189 ndr->depth--;
2190 break;
2192 default:
2193 ndr_print_bad_level(ndr, name, level);
2197 static enum ndr_err_code ndr_push_dfs_EnumArray1(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray1 *r)
2199 uint32_t cntr_s_1;
2200 if (ndr_flags & NDR_SCALARS) {
2201 NDR_CHECK(ndr_push_align(ndr, 4));
2202 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2203 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2205 if (ndr_flags & NDR_BUFFERS) {
2206 if (r->s) {
2207 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2208 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2209 NDR_CHECK(ndr_push_dfs_Info1(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2211 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2212 NDR_CHECK(ndr_push_dfs_Info1(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2216 return NDR_ERR_SUCCESS;
2219 static enum ndr_err_code ndr_pull_dfs_EnumArray1(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray1 *r)
2221 uint32_t _ptr_s;
2222 uint32_t cntr_s_1;
2223 TALLOC_CTX *_mem_save_s_0;
2224 TALLOC_CTX *_mem_save_s_1;
2225 if (ndr_flags & NDR_SCALARS) {
2226 NDR_CHECK(ndr_pull_align(ndr, 4));
2227 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2228 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2229 if (_ptr_s) {
2230 NDR_PULL_ALLOC(ndr, r->s);
2231 } else {
2232 r->s = NULL;
2235 if (ndr_flags & NDR_BUFFERS) {
2236 if (r->s) {
2237 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2238 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2239 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2240 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
2241 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2242 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2243 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2244 NDR_CHECK(ndr_pull_dfs_Info1(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2246 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2247 NDR_CHECK(ndr_pull_dfs_Info1(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2249 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2250 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2252 if (r->s) {
2253 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2256 return NDR_ERR_SUCCESS;
2259 _PUBLIC_ void ndr_print_dfs_EnumArray1(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray1 *r)
2261 uint32_t cntr_s_1;
2262 ndr_print_struct(ndr, name, "dfs_EnumArray1");
2263 ndr->depth++;
2264 ndr_print_uint32(ndr, "count", r->count);
2265 ndr_print_ptr(ndr, "s", r->s);
2266 ndr->depth++;
2267 if (r->s) {
2268 ndr->print(ndr, "%s: ARRAY(%d)", "s", r->count);
2269 ndr->depth++;
2270 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2271 char *idx_1=NULL;
2272 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2273 ndr_print_dfs_Info1(ndr, "s", &r->s[cntr_s_1]);
2274 free(idx_1);
2277 ndr->depth--;
2279 ndr->depth--;
2280 ndr->depth--;
2283 static enum ndr_err_code ndr_push_dfs_EnumArray2(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray2 *r)
2285 uint32_t cntr_s_1;
2286 if (ndr_flags & NDR_SCALARS) {
2287 NDR_CHECK(ndr_push_align(ndr, 4));
2288 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2289 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2291 if (ndr_flags & NDR_BUFFERS) {
2292 if (r->s) {
2293 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2294 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2295 NDR_CHECK(ndr_push_dfs_Info2(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2297 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2298 NDR_CHECK(ndr_push_dfs_Info2(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2302 return NDR_ERR_SUCCESS;
2305 static enum ndr_err_code ndr_pull_dfs_EnumArray2(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray2 *r)
2307 uint32_t _ptr_s;
2308 uint32_t cntr_s_1;
2309 TALLOC_CTX *_mem_save_s_0;
2310 TALLOC_CTX *_mem_save_s_1;
2311 if (ndr_flags & NDR_SCALARS) {
2312 NDR_CHECK(ndr_pull_align(ndr, 4));
2313 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2314 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2315 if (_ptr_s) {
2316 NDR_PULL_ALLOC(ndr, r->s);
2317 } else {
2318 r->s = NULL;
2321 if (ndr_flags & NDR_BUFFERS) {
2322 if (r->s) {
2323 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2324 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2325 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2326 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
2327 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2328 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2329 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2330 NDR_CHECK(ndr_pull_dfs_Info2(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2332 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2333 NDR_CHECK(ndr_pull_dfs_Info2(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2335 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2336 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2338 if (r->s) {
2339 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2342 return NDR_ERR_SUCCESS;
2345 _PUBLIC_ void ndr_print_dfs_EnumArray2(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray2 *r)
2347 uint32_t cntr_s_1;
2348 ndr_print_struct(ndr, name, "dfs_EnumArray2");
2349 ndr->depth++;
2350 ndr_print_uint32(ndr, "count", r->count);
2351 ndr_print_ptr(ndr, "s", r->s);
2352 ndr->depth++;
2353 if (r->s) {
2354 ndr->print(ndr, "%s: ARRAY(%d)", "s", r->count);
2355 ndr->depth++;
2356 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2357 char *idx_1=NULL;
2358 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2359 ndr_print_dfs_Info2(ndr, "s", &r->s[cntr_s_1]);
2360 free(idx_1);
2363 ndr->depth--;
2365 ndr->depth--;
2366 ndr->depth--;
2369 static enum ndr_err_code ndr_push_dfs_EnumArray3(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray3 *r)
2371 uint32_t cntr_s_1;
2372 if (ndr_flags & NDR_SCALARS) {
2373 NDR_CHECK(ndr_push_align(ndr, 4));
2374 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2375 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2377 if (ndr_flags & NDR_BUFFERS) {
2378 if (r->s) {
2379 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2380 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2381 NDR_CHECK(ndr_push_dfs_Info3(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2383 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2384 NDR_CHECK(ndr_push_dfs_Info3(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2388 return NDR_ERR_SUCCESS;
2391 static enum ndr_err_code ndr_pull_dfs_EnumArray3(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray3 *r)
2393 uint32_t _ptr_s;
2394 uint32_t cntr_s_1;
2395 TALLOC_CTX *_mem_save_s_0;
2396 TALLOC_CTX *_mem_save_s_1;
2397 if (ndr_flags & NDR_SCALARS) {
2398 NDR_CHECK(ndr_pull_align(ndr, 4));
2399 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2400 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2401 if (_ptr_s) {
2402 NDR_PULL_ALLOC(ndr, r->s);
2403 } else {
2404 r->s = NULL;
2407 if (ndr_flags & NDR_BUFFERS) {
2408 if (r->s) {
2409 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2410 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2411 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2412 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
2413 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2414 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2415 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2416 NDR_CHECK(ndr_pull_dfs_Info3(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2418 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2419 NDR_CHECK(ndr_pull_dfs_Info3(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2421 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2422 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2424 if (r->s) {
2425 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2428 return NDR_ERR_SUCCESS;
2431 _PUBLIC_ void ndr_print_dfs_EnumArray3(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray3 *r)
2433 uint32_t cntr_s_1;
2434 ndr_print_struct(ndr, name, "dfs_EnumArray3");
2435 ndr->depth++;
2436 ndr_print_uint32(ndr, "count", r->count);
2437 ndr_print_ptr(ndr, "s", r->s);
2438 ndr->depth++;
2439 if (r->s) {
2440 ndr->print(ndr, "%s: ARRAY(%d)", "s", r->count);
2441 ndr->depth++;
2442 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2443 char *idx_1=NULL;
2444 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2445 ndr_print_dfs_Info3(ndr, "s", &r->s[cntr_s_1]);
2446 free(idx_1);
2449 ndr->depth--;
2451 ndr->depth--;
2452 ndr->depth--;
2455 static enum ndr_err_code ndr_push_dfs_EnumArray4(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray4 *r)
2457 uint32_t cntr_s_1;
2458 if (ndr_flags & NDR_SCALARS) {
2459 NDR_CHECK(ndr_push_align(ndr, 4));
2460 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2461 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2463 if (ndr_flags & NDR_BUFFERS) {
2464 if (r->s) {
2465 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2466 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2467 NDR_CHECK(ndr_push_dfs_Info4(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2469 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2470 NDR_CHECK(ndr_push_dfs_Info4(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2474 return NDR_ERR_SUCCESS;
2477 static enum ndr_err_code ndr_pull_dfs_EnumArray4(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray4 *r)
2479 uint32_t _ptr_s;
2480 uint32_t cntr_s_1;
2481 TALLOC_CTX *_mem_save_s_0;
2482 TALLOC_CTX *_mem_save_s_1;
2483 if (ndr_flags & NDR_SCALARS) {
2484 NDR_CHECK(ndr_pull_align(ndr, 4));
2485 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2486 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2487 if (_ptr_s) {
2488 NDR_PULL_ALLOC(ndr, r->s);
2489 } else {
2490 r->s = NULL;
2493 if (ndr_flags & NDR_BUFFERS) {
2494 if (r->s) {
2495 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2496 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2497 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2498 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
2499 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2500 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2501 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2502 NDR_CHECK(ndr_pull_dfs_Info4(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2504 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2505 NDR_CHECK(ndr_pull_dfs_Info4(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2507 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2508 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2510 if (r->s) {
2511 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2514 return NDR_ERR_SUCCESS;
2517 _PUBLIC_ void ndr_print_dfs_EnumArray4(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray4 *r)
2519 uint32_t cntr_s_1;
2520 ndr_print_struct(ndr, name, "dfs_EnumArray4");
2521 ndr->depth++;
2522 ndr_print_uint32(ndr, "count", r->count);
2523 ndr_print_ptr(ndr, "s", r->s);
2524 ndr->depth++;
2525 if (r->s) {
2526 ndr->print(ndr, "%s: ARRAY(%d)", "s", r->count);
2527 ndr->depth++;
2528 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2529 char *idx_1=NULL;
2530 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2531 ndr_print_dfs_Info4(ndr, "s", &r->s[cntr_s_1]);
2532 free(idx_1);
2535 ndr->depth--;
2537 ndr->depth--;
2538 ndr->depth--;
2541 static enum ndr_err_code ndr_push_dfs_EnumArray5(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray5 *r)
2543 uint32_t cntr_s_1;
2544 if (ndr_flags & NDR_SCALARS) {
2545 NDR_CHECK(ndr_push_align(ndr, 4));
2546 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2547 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2549 if (ndr_flags & NDR_BUFFERS) {
2550 if (r->s) {
2551 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2552 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2553 NDR_CHECK(ndr_push_dfs_Info5(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2555 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2556 NDR_CHECK(ndr_push_dfs_Info5(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2560 return NDR_ERR_SUCCESS;
2563 static enum ndr_err_code ndr_pull_dfs_EnumArray5(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray5 *r)
2565 uint32_t _ptr_s;
2566 uint32_t cntr_s_1;
2567 TALLOC_CTX *_mem_save_s_0;
2568 TALLOC_CTX *_mem_save_s_1;
2569 if (ndr_flags & NDR_SCALARS) {
2570 NDR_CHECK(ndr_pull_align(ndr, 4));
2571 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2572 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2573 if (_ptr_s) {
2574 NDR_PULL_ALLOC(ndr, r->s);
2575 } else {
2576 r->s = NULL;
2579 if (ndr_flags & NDR_BUFFERS) {
2580 if (r->s) {
2581 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2582 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2583 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2584 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
2585 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2586 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2587 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2588 NDR_CHECK(ndr_pull_dfs_Info5(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2590 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2591 NDR_CHECK(ndr_pull_dfs_Info5(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2593 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2594 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2596 if (r->s) {
2597 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2600 return NDR_ERR_SUCCESS;
2603 _PUBLIC_ void ndr_print_dfs_EnumArray5(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray5 *r)
2605 uint32_t cntr_s_1;
2606 ndr_print_struct(ndr, name, "dfs_EnumArray5");
2607 ndr->depth++;
2608 ndr_print_uint32(ndr, "count", r->count);
2609 ndr_print_ptr(ndr, "s", r->s);
2610 ndr->depth++;
2611 if (r->s) {
2612 ndr->print(ndr, "%s: ARRAY(%d)", "s", r->count);
2613 ndr->depth++;
2614 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2615 char *idx_1=NULL;
2616 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2617 ndr_print_dfs_Info5(ndr, "s", &r->s[cntr_s_1]);
2618 free(idx_1);
2621 ndr->depth--;
2623 ndr->depth--;
2624 ndr->depth--;
2627 static enum ndr_err_code ndr_push_dfs_EnumArray6(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray6 *r)
2629 uint32_t cntr_s_1;
2630 if (ndr_flags & NDR_SCALARS) {
2631 NDR_CHECK(ndr_push_align(ndr, 4));
2632 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2633 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2635 if (ndr_flags & NDR_BUFFERS) {
2636 if (r->s) {
2637 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2638 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2639 NDR_CHECK(ndr_push_dfs_Info6(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2641 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2642 NDR_CHECK(ndr_push_dfs_Info6(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2646 return NDR_ERR_SUCCESS;
2649 static enum ndr_err_code ndr_pull_dfs_EnumArray6(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray6 *r)
2651 uint32_t _ptr_s;
2652 uint32_t cntr_s_1;
2653 TALLOC_CTX *_mem_save_s_0;
2654 TALLOC_CTX *_mem_save_s_1;
2655 if (ndr_flags & NDR_SCALARS) {
2656 NDR_CHECK(ndr_pull_align(ndr, 4));
2657 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2658 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2659 if (_ptr_s) {
2660 NDR_PULL_ALLOC(ndr, r->s);
2661 } else {
2662 r->s = NULL;
2665 if (ndr_flags & NDR_BUFFERS) {
2666 if (r->s) {
2667 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2668 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2669 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2670 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
2671 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2672 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2673 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2674 NDR_CHECK(ndr_pull_dfs_Info6(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2676 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2677 NDR_CHECK(ndr_pull_dfs_Info6(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2679 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2680 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2682 if (r->s) {
2683 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2686 return NDR_ERR_SUCCESS;
2689 _PUBLIC_ void ndr_print_dfs_EnumArray6(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray6 *r)
2691 uint32_t cntr_s_1;
2692 ndr_print_struct(ndr, name, "dfs_EnumArray6");
2693 ndr->depth++;
2694 ndr_print_uint32(ndr, "count", r->count);
2695 ndr_print_ptr(ndr, "s", r->s);
2696 ndr->depth++;
2697 if (r->s) {
2698 ndr->print(ndr, "%s: ARRAY(%d)", "s", r->count);
2699 ndr->depth++;
2700 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2701 char *idx_1=NULL;
2702 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2703 ndr_print_dfs_Info6(ndr, "s", &r->s[cntr_s_1]);
2704 free(idx_1);
2707 ndr->depth--;
2709 ndr->depth--;
2710 ndr->depth--;
2713 static enum ndr_err_code ndr_push_dfs_EnumArray200(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray200 *r)
2715 uint32_t cntr_s_1;
2716 if (ndr_flags & NDR_SCALARS) {
2717 NDR_CHECK(ndr_push_align(ndr, 4));
2718 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2719 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2721 if (ndr_flags & NDR_BUFFERS) {
2722 if (r->s) {
2723 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2724 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2725 NDR_CHECK(ndr_push_dfs_Info200(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2727 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2728 NDR_CHECK(ndr_push_dfs_Info200(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2732 return NDR_ERR_SUCCESS;
2735 static enum ndr_err_code ndr_pull_dfs_EnumArray200(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray200 *r)
2737 uint32_t _ptr_s;
2738 uint32_t cntr_s_1;
2739 TALLOC_CTX *_mem_save_s_0;
2740 TALLOC_CTX *_mem_save_s_1;
2741 if (ndr_flags & NDR_SCALARS) {
2742 NDR_CHECK(ndr_pull_align(ndr, 4));
2743 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2744 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2745 if (_ptr_s) {
2746 NDR_PULL_ALLOC(ndr, r->s);
2747 } else {
2748 r->s = NULL;
2751 if (ndr_flags & NDR_BUFFERS) {
2752 if (r->s) {
2753 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2754 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2755 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2756 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
2757 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2758 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2759 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2760 NDR_CHECK(ndr_pull_dfs_Info200(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2762 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2763 NDR_CHECK(ndr_pull_dfs_Info200(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2765 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2766 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2768 if (r->s) {
2769 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2772 return NDR_ERR_SUCCESS;
2775 _PUBLIC_ void ndr_print_dfs_EnumArray200(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray200 *r)
2777 uint32_t cntr_s_1;
2778 ndr_print_struct(ndr, name, "dfs_EnumArray200");
2779 ndr->depth++;
2780 ndr_print_uint32(ndr, "count", r->count);
2781 ndr_print_ptr(ndr, "s", r->s);
2782 ndr->depth++;
2783 if (r->s) {
2784 ndr->print(ndr, "%s: ARRAY(%d)", "s", r->count);
2785 ndr->depth++;
2786 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2787 char *idx_1=NULL;
2788 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2789 ndr_print_dfs_Info200(ndr, "s", &r->s[cntr_s_1]);
2790 free(idx_1);
2793 ndr->depth--;
2795 ndr->depth--;
2796 ndr->depth--;
2799 static enum ndr_err_code ndr_push_dfs_EnumArray300(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumArray300 *r)
2801 uint32_t cntr_s_1;
2802 if (ndr_flags & NDR_SCALARS) {
2803 NDR_CHECK(ndr_push_align(ndr, 4));
2804 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2805 NDR_CHECK(ndr_push_unique_ptr(ndr, r->s));
2807 if (ndr_flags & NDR_BUFFERS) {
2808 if (r->s) {
2809 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->count));
2810 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2811 NDR_CHECK(ndr_push_dfs_Info300(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2813 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2814 NDR_CHECK(ndr_push_dfs_Info300(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2818 return NDR_ERR_SUCCESS;
2821 static enum ndr_err_code ndr_pull_dfs_EnumArray300(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumArray300 *r)
2823 uint32_t _ptr_s;
2824 uint32_t cntr_s_1;
2825 TALLOC_CTX *_mem_save_s_0;
2826 TALLOC_CTX *_mem_save_s_1;
2827 if (ndr_flags & NDR_SCALARS) {
2828 NDR_CHECK(ndr_pull_align(ndr, 4));
2829 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->count));
2830 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_s));
2831 if (_ptr_s) {
2832 NDR_PULL_ALLOC(ndr, r->s);
2833 } else {
2834 r->s = NULL;
2837 if (ndr_flags & NDR_BUFFERS) {
2838 if (r->s) {
2839 _mem_save_s_0 = NDR_PULL_GET_MEM_CTX(ndr);
2840 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2841 NDR_CHECK(ndr_pull_array_size(ndr, &r->s));
2842 NDR_PULL_ALLOC_N(ndr, r->s, ndr_get_array_size(ndr, &r->s));
2843 _mem_save_s_1 = NDR_PULL_GET_MEM_CTX(ndr);
2844 NDR_PULL_SET_MEM_CTX(ndr, r->s, 0);
2845 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2846 NDR_CHECK(ndr_pull_dfs_Info300(ndr, NDR_SCALARS, &r->s[cntr_s_1]));
2848 for (cntr_s_1 = 0; cntr_s_1 < r->count; cntr_s_1++) {
2849 NDR_CHECK(ndr_pull_dfs_Info300(ndr, NDR_BUFFERS, &r->s[cntr_s_1]));
2851 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_1, 0);
2852 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_s_0, 0);
2854 if (r->s) {
2855 NDR_CHECK(ndr_check_array_size(ndr, (void*)&r->s, r->count));
2858 return NDR_ERR_SUCCESS;
2861 _PUBLIC_ void ndr_print_dfs_EnumArray300(struct ndr_print *ndr, const char *name, const struct dfs_EnumArray300 *r)
2863 uint32_t cntr_s_1;
2864 ndr_print_struct(ndr, name, "dfs_EnumArray300");
2865 ndr->depth++;
2866 ndr_print_uint32(ndr, "count", r->count);
2867 ndr_print_ptr(ndr, "s", r->s);
2868 ndr->depth++;
2869 if (r->s) {
2870 ndr->print(ndr, "%s: ARRAY(%d)", "s", r->count);
2871 ndr->depth++;
2872 for (cntr_s_1=0;cntr_s_1<r->count;cntr_s_1++) {
2873 char *idx_1=NULL;
2874 if (asprintf(&idx_1, "[%d]", cntr_s_1) != -1) {
2875 ndr_print_dfs_Info300(ndr, "s", &r->s[cntr_s_1]);
2876 free(idx_1);
2879 ndr->depth--;
2881 ndr->depth--;
2882 ndr->depth--;
2885 static enum ndr_err_code ndr_push_dfs_EnumInfo(struct ndr_push *ndr, int ndr_flags, const union dfs_EnumInfo *r)
2887 if (ndr_flags & NDR_SCALARS) {
2888 int level = ndr_push_get_switch_value(ndr, r);
2889 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, level));
2890 switch (level) {
2891 case 1: {
2892 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info1));
2893 break; }
2895 case 2: {
2896 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info2));
2897 break; }
2899 case 3: {
2900 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info3));
2901 break; }
2903 case 4: {
2904 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info4));
2905 break; }
2907 case 5: {
2908 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info5));
2909 break; }
2911 case 6: {
2912 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info6));
2913 break; }
2915 case 200: {
2916 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info200));
2917 break; }
2919 case 300: {
2920 NDR_CHECK(ndr_push_unique_ptr(ndr, r->info300));
2921 break; }
2923 default:
2924 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2927 if (ndr_flags & NDR_BUFFERS) {
2928 int level = ndr_push_get_switch_value(ndr, r);
2929 switch (level) {
2930 case 1:
2931 if (r->info1) {
2932 NDR_CHECK(ndr_push_dfs_EnumArray1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
2934 break;
2936 case 2:
2937 if (r->info2) {
2938 NDR_CHECK(ndr_push_dfs_EnumArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
2940 break;
2942 case 3:
2943 if (r->info3) {
2944 NDR_CHECK(ndr_push_dfs_EnumArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
2946 break;
2948 case 4:
2949 if (r->info4) {
2950 NDR_CHECK(ndr_push_dfs_EnumArray4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
2952 break;
2954 case 5:
2955 if (r->info5) {
2956 NDR_CHECK(ndr_push_dfs_EnumArray5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5));
2958 break;
2960 case 6:
2961 if (r->info6) {
2962 NDR_CHECK(ndr_push_dfs_EnumArray6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6));
2964 break;
2966 case 200:
2967 if (r->info200) {
2968 NDR_CHECK(ndr_push_dfs_EnumArray200(ndr, NDR_SCALARS|NDR_BUFFERS, r->info200));
2970 break;
2972 case 300:
2973 if (r->info300) {
2974 NDR_CHECK(ndr_push_dfs_EnumArray300(ndr, NDR_SCALARS|NDR_BUFFERS, r->info300));
2976 break;
2978 default:
2979 return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
2982 return NDR_ERR_SUCCESS;
2985 static enum ndr_err_code ndr_pull_dfs_EnumInfo(struct ndr_pull *ndr, int ndr_flags, union dfs_EnumInfo *r)
2987 int level;
2988 uint32_t _level;
2989 TALLOC_CTX *_mem_save_info1_0;
2990 TALLOC_CTX *_mem_save_info2_0;
2991 TALLOC_CTX *_mem_save_info3_0;
2992 TALLOC_CTX *_mem_save_info4_0;
2993 TALLOC_CTX *_mem_save_info5_0;
2994 TALLOC_CTX *_mem_save_info6_0;
2995 TALLOC_CTX *_mem_save_info200_0;
2996 TALLOC_CTX *_mem_save_info300_0;
2997 level = ndr_pull_get_switch_value(ndr, r);
2998 if (ndr_flags & NDR_SCALARS) {
2999 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &_level));
3000 if (_level != level) {
3001 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u for r", _level);
3003 switch (level) {
3004 case 1: {
3005 uint32_t _ptr_info1;
3006 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info1));
3007 if (_ptr_info1) {
3008 NDR_PULL_ALLOC(ndr, r->info1);
3009 } else {
3010 r->info1 = NULL;
3012 break; }
3014 case 2: {
3015 uint32_t _ptr_info2;
3016 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info2));
3017 if (_ptr_info2) {
3018 NDR_PULL_ALLOC(ndr, r->info2);
3019 } else {
3020 r->info2 = NULL;
3022 break; }
3024 case 3: {
3025 uint32_t _ptr_info3;
3026 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info3));
3027 if (_ptr_info3) {
3028 NDR_PULL_ALLOC(ndr, r->info3);
3029 } else {
3030 r->info3 = NULL;
3032 break; }
3034 case 4: {
3035 uint32_t _ptr_info4;
3036 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info4));
3037 if (_ptr_info4) {
3038 NDR_PULL_ALLOC(ndr, r->info4);
3039 } else {
3040 r->info4 = NULL;
3042 break; }
3044 case 5: {
3045 uint32_t _ptr_info5;
3046 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info5));
3047 if (_ptr_info5) {
3048 NDR_PULL_ALLOC(ndr, r->info5);
3049 } else {
3050 r->info5 = NULL;
3052 break; }
3054 case 6: {
3055 uint32_t _ptr_info6;
3056 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info6));
3057 if (_ptr_info6) {
3058 NDR_PULL_ALLOC(ndr, r->info6);
3059 } else {
3060 r->info6 = NULL;
3062 break; }
3064 case 200: {
3065 uint32_t _ptr_info200;
3066 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info200));
3067 if (_ptr_info200) {
3068 NDR_PULL_ALLOC(ndr, r->info200);
3069 } else {
3070 r->info200 = NULL;
3072 break; }
3074 case 300: {
3075 uint32_t _ptr_info300;
3076 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info300));
3077 if (_ptr_info300) {
3078 NDR_PULL_ALLOC(ndr, r->info300);
3079 } else {
3080 r->info300 = NULL;
3082 break; }
3084 default:
3085 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
3088 if (ndr_flags & NDR_BUFFERS) {
3089 switch (level) {
3090 case 1:
3091 if (r->info1) {
3092 _mem_save_info1_0 = NDR_PULL_GET_MEM_CTX(ndr);
3093 NDR_PULL_SET_MEM_CTX(ndr, r->info1, 0);
3094 NDR_CHECK(ndr_pull_dfs_EnumArray1(ndr, NDR_SCALARS|NDR_BUFFERS, r->info1));
3095 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info1_0, 0);
3097 break;
3099 case 2:
3100 if (r->info2) {
3101 _mem_save_info2_0 = NDR_PULL_GET_MEM_CTX(ndr);
3102 NDR_PULL_SET_MEM_CTX(ndr, r->info2, 0);
3103 NDR_CHECK(ndr_pull_dfs_EnumArray2(ndr, NDR_SCALARS|NDR_BUFFERS, r->info2));
3104 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info2_0, 0);
3106 break;
3108 case 3:
3109 if (r->info3) {
3110 _mem_save_info3_0 = NDR_PULL_GET_MEM_CTX(ndr);
3111 NDR_PULL_SET_MEM_CTX(ndr, r->info3, 0);
3112 NDR_CHECK(ndr_pull_dfs_EnumArray3(ndr, NDR_SCALARS|NDR_BUFFERS, r->info3));
3113 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info3_0, 0);
3115 break;
3117 case 4:
3118 if (r->info4) {
3119 _mem_save_info4_0 = NDR_PULL_GET_MEM_CTX(ndr);
3120 NDR_PULL_SET_MEM_CTX(ndr, r->info4, 0);
3121 NDR_CHECK(ndr_pull_dfs_EnumArray4(ndr, NDR_SCALARS|NDR_BUFFERS, r->info4));
3122 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info4_0, 0);
3124 break;
3126 case 5:
3127 if (r->info5) {
3128 _mem_save_info5_0 = NDR_PULL_GET_MEM_CTX(ndr);
3129 NDR_PULL_SET_MEM_CTX(ndr, r->info5, 0);
3130 NDR_CHECK(ndr_pull_dfs_EnumArray5(ndr, NDR_SCALARS|NDR_BUFFERS, r->info5));
3131 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info5_0, 0);
3133 break;
3135 case 6:
3136 if (r->info6) {
3137 _mem_save_info6_0 = NDR_PULL_GET_MEM_CTX(ndr);
3138 NDR_PULL_SET_MEM_CTX(ndr, r->info6, 0);
3139 NDR_CHECK(ndr_pull_dfs_EnumArray6(ndr, NDR_SCALARS|NDR_BUFFERS, r->info6));
3140 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info6_0, 0);
3142 break;
3144 case 200:
3145 if (r->info200) {
3146 _mem_save_info200_0 = NDR_PULL_GET_MEM_CTX(ndr);
3147 NDR_PULL_SET_MEM_CTX(ndr, r->info200, 0);
3148 NDR_CHECK(ndr_pull_dfs_EnumArray200(ndr, NDR_SCALARS|NDR_BUFFERS, r->info200));
3149 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info200_0, 0);
3151 break;
3153 case 300:
3154 if (r->info300) {
3155 _mem_save_info300_0 = NDR_PULL_GET_MEM_CTX(ndr);
3156 NDR_PULL_SET_MEM_CTX(ndr, r->info300, 0);
3157 NDR_CHECK(ndr_pull_dfs_EnumArray300(ndr, NDR_SCALARS|NDR_BUFFERS, r->info300));
3158 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info300_0, 0);
3160 break;
3162 default:
3163 return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %u", level);
3166 return NDR_ERR_SUCCESS;
3169 _PUBLIC_ void ndr_print_dfs_EnumInfo(struct ndr_print *ndr, const char *name, const union dfs_EnumInfo *r)
3171 int level;
3172 level = ndr_print_get_switch_value(ndr, r);
3173 ndr_print_union(ndr, name, level, "dfs_EnumInfo");
3174 switch (level) {
3175 case 1:
3176 ndr_print_ptr(ndr, "info1", r->info1);
3177 ndr->depth++;
3178 if (r->info1) {
3179 ndr_print_dfs_EnumArray1(ndr, "info1", r->info1);
3181 ndr->depth--;
3182 break;
3184 case 2:
3185 ndr_print_ptr(ndr, "info2", r->info2);
3186 ndr->depth++;
3187 if (r->info2) {
3188 ndr_print_dfs_EnumArray2(ndr, "info2", r->info2);
3190 ndr->depth--;
3191 break;
3193 case 3:
3194 ndr_print_ptr(ndr, "info3", r->info3);
3195 ndr->depth++;
3196 if (r->info3) {
3197 ndr_print_dfs_EnumArray3(ndr, "info3", r->info3);
3199 ndr->depth--;
3200 break;
3202 case 4:
3203 ndr_print_ptr(ndr, "info4", r->info4);
3204 ndr->depth++;
3205 if (r->info4) {
3206 ndr_print_dfs_EnumArray4(ndr, "info4", r->info4);
3208 ndr->depth--;
3209 break;
3211 case 5:
3212 ndr_print_ptr(ndr, "info5", r->info5);
3213 ndr->depth++;
3214 if (r->info5) {
3215 ndr_print_dfs_EnumArray5(ndr, "info5", r->info5);
3217 ndr->depth--;
3218 break;
3220 case 6:
3221 ndr_print_ptr(ndr, "info6", r->info6);
3222 ndr->depth++;
3223 if (r->info6) {
3224 ndr_print_dfs_EnumArray6(ndr, "info6", r->info6);
3226 ndr->depth--;
3227 break;
3229 case 200:
3230 ndr_print_ptr(ndr, "info200", r->info200);
3231 ndr->depth++;
3232 if (r->info200) {
3233 ndr_print_dfs_EnumArray200(ndr, "info200", r->info200);
3235 ndr->depth--;
3236 break;
3238 case 300:
3239 ndr_print_ptr(ndr, "info300", r->info300);
3240 ndr->depth++;
3241 if (r->info300) {
3242 ndr_print_dfs_EnumArray300(ndr, "info300", r->info300);
3244 ndr->depth--;
3245 break;
3247 default:
3248 ndr_print_bad_level(ndr, name, level);
3252 static enum ndr_err_code ndr_push_dfs_EnumStruct(struct ndr_push *ndr, int ndr_flags, const struct dfs_EnumStruct *r)
3254 if (ndr_flags & NDR_SCALARS) {
3255 NDR_CHECK(ndr_push_align(ndr, 4));
3256 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->level));
3257 NDR_CHECK(ndr_push_set_switch_value(ndr, &r->e, r->level));
3258 NDR_CHECK(ndr_push_dfs_EnumInfo(ndr, NDR_SCALARS, &r->e));
3260 if (ndr_flags & NDR_BUFFERS) {
3261 NDR_CHECK(ndr_push_dfs_EnumInfo(ndr, NDR_BUFFERS, &r->e));
3263 return NDR_ERR_SUCCESS;
3266 static enum ndr_err_code ndr_pull_dfs_EnumStruct(struct ndr_pull *ndr, int ndr_flags, struct dfs_EnumStruct *r)
3268 if (ndr_flags & NDR_SCALARS) {
3269 NDR_CHECK(ndr_pull_align(ndr, 4));
3270 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->level));
3271 NDR_CHECK(ndr_pull_set_switch_value(ndr, &r->e, r->level));
3272 NDR_CHECK(ndr_pull_dfs_EnumInfo(ndr, NDR_SCALARS, &r->e));
3274 if (ndr_flags & NDR_BUFFERS) {
3275 NDR_CHECK(ndr_pull_dfs_EnumInfo(ndr, NDR_BUFFERS, &r->e));
3277 return NDR_ERR_SUCCESS;
3280 _PUBLIC_ void ndr_print_dfs_EnumStruct(struct ndr_print *ndr, const char *name, const struct dfs_EnumStruct *r)
3282 ndr_print_struct(ndr, name, "dfs_EnumStruct");
3283 ndr->depth++;
3284 ndr_print_uint32(ndr, "level", r->level);
3285 ndr_print_set_switch_value(ndr, &r->e, r->level);
3286 ndr_print_dfs_EnumInfo(ndr, "e", &r->e);
3287 ndr->depth--;
3290 static enum ndr_err_code ndr_push_dfs_UnknownStruct(struct ndr_push *ndr, int ndr_flags, const struct dfs_UnknownStruct *r)
3292 if (ndr_flags & NDR_SCALARS) {
3293 NDR_CHECK(ndr_push_align(ndr, 4));
3294 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->unknown1));
3295 NDR_CHECK(ndr_push_unique_ptr(ndr, r->unknown2));
3297 if (ndr_flags & NDR_BUFFERS) {
3298 if (r->unknown2) {
3299 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->unknown2, CH_UTF16)));
3300 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3301 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->unknown2, CH_UTF16)));
3302 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->unknown2, ndr_charset_length(r->unknown2, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3305 return NDR_ERR_SUCCESS;
3308 static enum ndr_err_code ndr_pull_dfs_UnknownStruct(struct ndr_pull *ndr, int ndr_flags, struct dfs_UnknownStruct *r)
3310 uint32_t _ptr_unknown2;
3311 TALLOC_CTX *_mem_save_unknown2_0;
3312 if (ndr_flags & NDR_SCALARS) {
3313 NDR_CHECK(ndr_pull_align(ndr, 4));
3314 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->unknown1));
3315 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
3316 if (_ptr_unknown2) {
3317 NDR_PULL_ALLOC(ndr, r->unknown2);
3318 } else {
3319 r->unknown2 = NULL;
3322 if (ndr_flags & NDR_BUFFERS) {
3323 if (r->unknown2) {
3324 _mem_save_unknown2_0 = NDR_PULL_GET_MEM_CTX(ndr);
3325 NDR_PULL_SET_MEM_CTX(ndr, r->unknown2, 0);
3326 NDR_CHECK(ndr_pull_array_size(ndr, &r->unknown2));
3327 NDR_CHECK(ndr_pull_array_length(ndr, &r->unknown2));
3328 if (ndr_get_array_length(ndr, &r->unknown2) > ndr_get_array_size(ndr, &r->unknown2)) {
3329 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));
3331 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->unknown2), sizeof(uint16_t)));
3332 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->unknown2, ndr_get_array_length(ndr, &r->unknown2), sizeof(uint16_t), CH_UTF16));
3333 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_0, 0);
3336 return NDR_ERR_SUCCESS;
3339 _PUBLIC_ void ndr_print_dfs_UnknownStruct(struct ndr_print *ndr, const char *name, const struct dfs_UnknownStruct *r)
3341 ndr_print_struct(ndr, name, "dfs_UnknownStruct");
3342 ndr->depth++;
3343 ndr_print_uint32(ndr, "unknown1", r->unknown1);
3344 ndr_print_ptr(ndr, "unknown2", r->unknown2);
3345 ndr->depth++;
3346 if (r->unknown2) {
3347 ndr_print_string(ndr, "unknown2", r->unknown2);
3349 ndr->depth--;
3350 ndr->depth--;
3353 _PUBLIC_ enum ndr_err_code ndr_push_dfs_GetManagerVersion(struct ndr_push *ndr, int flags, const struct dfs_GetManagerVersion *r)
3355 if (flags & NDR_IN) {
3357 if (flags & NDR_OUT) {
3358 if (r->out.version == NULL) {
3359 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3361 NDR_CHECK(ndr_push_dfs_ManagerVersion(ndr, NDR_SCALARS, *r->out.version));
3363 return NDR_ERR_SUCCESS;
3366 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_GetManagerVersion(struct ndr_pull *ndr, int flags, struct dfs_GetManagerVersion *r)
3368 TALLOC_CTX *_mem_save_version_0;
3369 if (flags & NDR_IN) {
3370 ZERO_STRUCT(r->out);
3372 NDR_PULL_ALLOC(ndr, r->out.version);
3373 ZERO_STRUCTP(r->out.version);
3375 if (flags & NDR_OUT) {
3376 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3377 NDR_PULL_ALLOC(ndr, r->out.version);
3379 _mem_save_version_0 = NDR_PULL_GET_MEM_CTX(ndr);
3380 NDR_PULL_SET_MEM_CTX(ndr, r->out.version, LIBNDR_FLAG_REF_ALLOC);
3381 NDR_CHECK(ndr_pull_dfs_ManagerVersion(ndr, NDR_SCALARS, r->out.version));
3382 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_version_0, LIBNDR_FLAG_REF_ALLOC);
3384 return NDR_ERR_SUCCESS;
3387 _PUBLIC_ void ndr_print_dfs_GetManagerVersion(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetManagerVersion *r)
3389 ndr_print_struct(ndr, name, "dfs_GetManagerVersion");
3390 ndr->depth++;
3391 if (flags & NDR_SET_VALUES) {
3392 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3394 if (flags & NDR_IN) {
3395 ndr_print_struct(ndr, "in", "dfs_GetManagerVersion");
3396 ndr->depth++;
3397 ndr->depth--;
3399 if (flags & NDR_OUT) {
3400 ndr_print_struct(ndr, "out", "dfs_GetManagerVersion");
3401 ndr->depth++;
3402 ndr_print_ptr(ndr, "version", r->out.version);
3403 ndr->depth++;
3404 ndr_print_dfs_ManagerVersion(ndr, "version", *r->out.version);
3405 ndr->depth--;
3406 ndr->depth--;
3408 ndr->depth--;
3411 static enum ndr_err_code ndr_push_dfs_Add(struct ndr_push *ndr, int flags, const struct dfs_Add *r)
3413 if (flags & NDR_IN) {
3414 if (r->in.path == NULL) {
3415 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3417 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
3418 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3419 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.path, CH_UTF16)));
3420 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.path, ndr_charset_length(r->in.path, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3421 if (r->in.server == NULL) {
3422 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3424 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
3425 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3426 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server, CH_UTF16)));
3427 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.server, ndr_charset_length(r->in.server, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3428 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.share));
3429 if (r->in.share) {
3430 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
3431 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3432 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.share, CH_UTF16)));
3433 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.share, ndr_charset_length(r->in.share, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3435 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.comment));
3436 if (r->in.comment) {
3437 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
3438 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3439 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
3440 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.comment, ndr_charset_length(r->in.comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3442 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
3444 if (flags & NDR_OUT) {
3445 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3447 return NDR_ERR_SUCCESS;
3450 static enum ndr_err_code ndr_pull_dfs_Add(struct ndr_pull *ndr, int flags, struct dfs_Add *r)
3452 uint32_t _ptr_share;
3453 uint32_t _ptr_comment;
3454 TALLOC_CTX *_mem_save_share_0;
3455 TALLOC_CTX *_mem_save_comment_0;
3456 if (flags & NDR_IN) {
3457 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.path));
3458 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.path));
3459 if (ndr_get_array_length(ndr, &r->in.path) > ndr_get_array_size(ndr, &r->in.path)) {
3460 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));
3462 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t)));
3463 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.path, ndr_get_array_length(ndr, &r->in.path), sizeof(uint16_t), CH_UTF16));
3464 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server));
3465 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server));
3466 if (ndr_get_array_length(ndr, &r->in.server) > ndr_get_array_size(ndr, &r->in.server)) {
3467 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));
3469 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t)));
3470 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.server, ndr_get_array_length(ndr, &r->in.server), sizeof(uint16_t), CH_UTF16));
3471 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_share));
3472 if (_ptr_share) {
3473 NDR_PULL_ALLOC(ndr, r->in.share);
3474 } else {
3475 r->in.share = NULL;
3477 if (r->in.share) {
3478 _mem_save_share_0 = NDR_PULL_GET_MEM_CTX(ndr);
3479 NDR_PULL_SET_MEM_CTX(ndr, r->in.share, 0);
3480 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.share));
3481 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.share));
3482 if (ndr_get_array_length(ndr, &r->in.share) > ndr_get_array_size(ndr, &r->in.share)) {
3483 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));
3485 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t)));
3486 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.share, ndr_get_array_length(ndr, &r->in.share), sizeof(uint16_t), CH_UTF16));
3487 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_share_0, 0);
3489 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_comment));
3490 if (_ptr_comment) {
3491 NDR_PULL_ALLOC(ndr, r->in.comment);
3492 } else {
3493 r->in.comment = NULL;
3495 if (r->in.comment) {
3496 _mem_save_comment_0 = NDR_PULL_GET_MEM_CTX(ndr);
3497 NDR_PULL_SET_MEM_CTX(ndr, r->in.comment, 0);
3498 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.comment));
3499 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.comment));
3500 if (ndr_get_array_length(ndr, &r->in.comment) > ndr_get_array_size(ndr, &r->in.comment)) {
3501 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));
3503 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t)));
3504 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.comment, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t), CH_UTF16));
3505 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_comment_0, 0);
3507 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
3509 if (flags & NDR_OUT) {
3510 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3512 return NDR_ERR_SUCCESS;
3515 _PUBLIC_ void ndr_print_dfs_Add(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Add *r)
3517 ndr_print_struct(ndr, name, "dfs_Add");
3518 ndr->depth++;
3519 if (flags & NDR_SET_VALUES) {
3520 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3522 if (flags & NDR_IN) {
3523 ndr_print_struct(ndr, "in", "dfs_Add");
3524 ndr->depth++;
3525 ndr_print_ptr(ndr, "path", r->in.path);
3526 ndr->depth++;
3527 ndr_print_string(ndr, "path", r->in.path);
3528 ndr->depth--;
3529 ndr_print_ptr(ndr, "server", r->in.server);
3530 ndr->depth++;
3531 ndr_print_string(ndr, "server", r->in.server);
3532 ndr->depth--;
3533 ndr_print_ptr(ndr, "share", r->in.share);
3534 ndr->depth++;
3535 if (r->in.share) {
3536 ndr_print_string(ndr, "share", r->in.share);
3538 ndr->depth--;
3539 ndr_print_ptr(ndr, "comment", r->in.comment);
3540 ndr->depth++;
3541 if (r->in.comment) {
3542 ndr_print_string(ndr, "comment", r->in.comment);
3544 ndr->depth--;
3545 ndr_print_uint32(ndr, "flags", r->in.flags);
3546 ndr->depth--;
3548 if (flags & NDR_OUT) {
3549 ndr_print_struct(ndr, "out", "dfs_Add");
3550 ndr->depth++;
3551 ndr_print_WERROR(ndr, "result", r->out.result);
3552 ndr->depth--;
3554 ndr->depth--;
3557 static enum ndr_err_code ndr_push_dfs_Remove(struct ndr_push *ndr, int flags, const struct dfs_Remove *r)
3559 if (flags & NDR_IN) {
3560 if (r->in.dfs_entry_path == NULL) {
3561 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3563 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
3564 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3565 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
3566 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));
3567 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
3568 if (r->in.servername) {
3569 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
3570 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3571 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
3572 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3574 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.sharename));
3575 if (r->in.sharename) {
3576 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16)));
3577 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3578 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16)));
3579 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.sharename, ndr_charset_length(r->in.sharename, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3582 if (flags & NDR_OUT) {
3583 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3585 return NDR_ERR_SUCCESS;
3588 static enum ndr_err_code ndr_pull_dfs_Remove(struct ndr_pull *ndr, int flags, struct dfs_Remove *r)
3590 uint32_t _ptr_servername;
3591 uint32_t _ptr_sharename;
3592 TALLOC_CTX *_mem_save_servername_0;
3593 TALLOC_CTX *_mem_save_sharename_0;
3594 if (flags & NDR_IN) {
3595 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_entry_path));
3596 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_entry_path));
3597 if (ndr_get_array_length(ndr, &r->in.dfs_entry_path) > ndr_get_array_size(ndr, &r->in.dfs_entry_path)) {
3598 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));
3600 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfs_entry_path), sizeof(uint16_t)));
3601 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));
3602 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
3603 if (_ptr_servername) {
3604 NDR_PULL_ALLOC(ndr, r->in.servername);
3605 } else {
3606 r->in.servername = NULL;
3608 if (r->in.servername) {
3609 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
3610 NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
3611 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
3612 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
3613 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
3614 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));
3616 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
3617 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
3618 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
3620 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sharename));
3621 if (_ptr_sharename) {
3622 NDR_PULL_ALLOC(ndr, r->in.sharename);
3623 } else {
3624 r->in.sharename = NULL;
3626 if (r->in.sharename) {
3627 _mem_save_sharename_0 = NDR_PULL_GET_MEM_CTX(ndr);
3628 NDR_PULL_SET_MEM_CTX(ndr, r->in.sharename, 0);
3629 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.sharename));
3630 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.sharename));
3631 if (ndr_get_array_length(ndr, &r->in.sharename) > ndr_get_array_size(ndr, &r->in.sharename)) {
3632 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));
3634 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t)));
3635 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.sharename, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t), CH_UTF16));
3636 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sharename_0, 0);
3639 if (flags & NDR_OUT) {
3640 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3642 return NDR_ERR_SUCCESS;
3645 _PUBLIC_ void ndr_print_dfs_Remove(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Remove *r)
3647 ndr_print_struct(ndr, name, "dfs_Remove");
3648 ndr->depth++;
3649 if (flags & NDR_SET_VALUES) {
3650 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3652 if (flags & NDR_IN) {
3653 ndr_print_struct(ndr, "in", "dfs_Remove");
3654 ndr->depth++;
3655 ndr_print_ptr(ndr, "dfs_entry_path", r->in.dfs_entry_path);
3656 ndr->depth++;
3657 ndr_print_string(ndr, "dfs_entry_path", r->in.dfs_entry_path);
3658 ndr->depth--;
3659 ndr_print_ptr(ndr, "servername", r->in.servername);
3660 ndr->depth++;
3661 if (r->in.servername) {
3662 ndr_print_string(ndr, "servername", r->in.servername);
3664 ndr->depth--;
3665 ndr_print_ptr(ndr, "sharename", r->in.sharename);
3666 ndr->depth++;
3667 if (r->in.sharename) {
3668 ndr_print_string(ndr, "sharename", r->in.sharename);
3670 ndr->depth--;
3671 ndr->depth--;
3673 if (flags & NDR_OUT) {
3674 ndr_print_struct(ndr, "out", "dfs_Remove");
3675 ndr->depth++;
3676 ndr_print_WERROR(ndr, "result", r->out.result);
3677 ndr->depth--;
3679 ndr->depth--;
3682 static enum ndr_err_code ndr_push_dfs_SetInfo(struct ndr_push *ndr, int flags, const struct dfs_SetInfo *r)
3684 if (flags & NDR_IN) {
3685 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
3686 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3687 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
3688 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));
3689 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
3690 if (r->in.servername) {
3691 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
3692 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3693 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
3694 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3696 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.sharename));
3697 if (r->in.sharename) {
3698 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16)));
3699 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3700 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16)));
3701 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.sharename, ndr_charset_length(r->in.sharename, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3703 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
3704 if (r->in.info == NULL) {
3705 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3707 NDR_CHECK(ndr_push_set_switch_value(ndr, r->in.info, r->in.level));
3708 NDR_CHECK(ndr_push_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
3710 if (flags & NDR_OUT) {
3711 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3713 return NDR_ERR_SUCCESS;
3716 static enum ndr_err_code ndr_pull_dfs_SetInfo(struct ndr_pull *ndr, int flags, struct dfs_SetInfo *r)
3718 uint32_t _ptr_servername;
3719 uint32_t _ptr_sharename;
3720 TALLOC_CTX *_mem_save_servername_0;
3721 TALLOC_CTX *_mem_save_sharename_0;
3722 TALLOC_CTX *_mem_save_info_0;
3723 if (flags & NDR_IN) {
3724 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_entry_path));
3725 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_entry_path));
3726 if (ndr_get_array_length(ndr, &r->in.dfs_entry_path) > ndr_get_array_size(ndr, &r->in.dfs_entry_path)) {
3727 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));
3729 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfs_entry_path), sizeof(uint16_t)));
3730 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));
3731 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
3732 if (_ptr_servername) {
3733 NDR_PULL_ALLOC(ndr, r->in.servername);
3734 } else {
3735 r->in.servername = NULL;
3737 if (r->in.servername) {
3738 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
3739 NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
3740 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
3741 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
3742 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
3743 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));
3745 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
3746 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
3747 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
3749 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sharename));
3750 if (_ptr_sharename) {
3751 NDR_PULL_ALLOC(ndr, r->in.sharename);
3752 } else {
3753 r->in.sharename = NULL;
3755 if (r->in.sharename) {
3756 _mem_save_sharename_0 = NDR_PULL_GET_MEM_CTX(ndr);
3757 NDR_PULL_SET_MEM_CTX(ndr, r->in.sharename, 0);
3758 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.sharename));
3759 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.sharename));
3760 if (ndr_get_array_length(ndr, &r->in.sharename) > ndr_get_array_size(ndr, &r->in.sharename)) {
3761 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));
3763 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t)));
3764 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.sharename, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t), CH_UTF16));
3765 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sharename_0, 0);
3767 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
3768 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3769 NDR_PULL_ALLOC(ndr, r->in.info);
3771 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
3772 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, LIBNDR_FLAG_REF_ALLOC);
3773 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->in.info, r->in.level));
3774 NDR_CHECK(ndr_pull_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
3775 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
3777 if (flags & NDR_OUT) {
3778 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3780 return NDR_ERR_SUCCESS;
3783 _PUBLIC_ void ndr_print_dfs_SetInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetInfo *r)
3785 ndr_print_struct(ndr, name, "dfs_SetInfo");
3786 ndr->depth++;
3787 if (flags & NDR_SET_VALUES) {
3788 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3790 if (flags & NDR_IN) {
3791 ndr_print_struct(ndr, "in", "dfs_SetInfo");
3792 ndr->depth++;
3793 ndr_print_string(ndr, "dfs_entry_path", r->in.dfs_entry_path);
3794 ndr_print_ptr(ndr, "servername", r->in.servername);
3795 ndr->depth++;
3796 if (r->in.servername) {
3797 ndr_print_string(ndr, "servername", r->in.servername);
3799 ndr->depth--;
3800 ndr_print_ptr(ndr, "sharename", r->in.sharename);
3801 ndr->depth++;
3802 if (r->in.sharename) {
3803 ndr_print_string(ndr, "sharename", r->in.sharename);
3805 ndr->depth--;
3806 ndr_print_uint32(ndr, "level", r->in.level);
3807 ndr_print_ptr(ndr, "info", r->in.info);
3808 ndr->depth++;
3809 ndr_print_set_switch_value(ndr, r->in.info, r->in.level);
3810 ndr_print_dfs_Info(ndr, "info", r->in.info);
3811 ndr->depth--;
3812 ndr->depth--;
3814 if (flags & NDR_OUT) {
3815 ndr_print_struct(ndr, "out", "dfs_SetInfo");
3816 ndr->depth++;
3817 ndr_print_WERROR(ndr, "result", r->out.result);
3818 ndr->depth--;
3820 ndr->depth--;
3823 static enum ndr_err_code ndr_push_dfs_GetInfo(struct ndr_push *ndr, int flags, const struct dfs_GetInfo *r)
3825 if (flags & NDR_IN) {
3826 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
3827 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3828 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_entry_path, CH_UTF16)));
3829 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));
3830 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.servername));
3831 if (r->in.servername) {
3832 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
3833 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3834 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
3835 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3837 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.sharename));
3838 if (r->in.sharename) {
3839 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16)));
3840 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
3841 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.sharename, CH_UTF16)));
3842 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.sharename, ndr_charset_length(r->in.sharename, CH_UTF16), sizeof(uint16_t), CH_UTF16));
3844 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
3846 if (flags & NDR_OUT) {
3847 if (r->out.info == NULL) {
3848 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
3850 NDR_CHECK(ndr_push_set_switch_value(ndr, r->out.info, r->in.level));
3851 NDR_CHECK(ndr_push_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
3852 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3854 return NDR_ERR_SUCCESS;
3857 static enum ndr_err_code ndr_pull_dfs_GetInfo(struct ndr_pull *ndr, int flags, struct dfs_GetInfo *r)
3859 uint32_t _ptr_servername;
3860 uint32_t _ptr_sharename;
3861 TALLOC_CTX *_mem_save_servername_0;
3862 TALLOC_CTX *_mem_save_sharename_0;
3863 TALLOC_CTX *_mem_save_info_0;
3864 if (flags & NDR_IN) {
3865 ZERO_STRUCT(r->out);
3867 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_entry_path));
3868 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_entry_path));
3869 if (ndr_get_array_length(ndr, &r->in.dfs_entry_path) > ndr_get_array_size(ndr, &r->in.dfs_entry_path)) {
3870 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));
3872 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfs_entry_path), sizeof(uint16_t)));
3873 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));
3874 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_servername));
3875 if (_ptr_servername) {
3876 NDR_PULL_ALLOC(ndr, r->in.servername);
3877 } else {
3878 r->in.servername = NULL;
3880 if (r->in.servername) {
3881 _mem_save_servername_0 = NDR_PULL_GET_MEM_CTX(ndr);
3882 NDR_PULL_SET_MEM_CTX(ndr, r->in.servername, 0);
3883 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
3884 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
3885 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
3886 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));
3888 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
3889 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
3890 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_servername_0, 0);
3892 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_sharename));
3893 if (_ptr_sharename) {
3894 NDR_PULL_ALLOC(ndr, r->in.sharename);
3895 } else {
3896 r->in.sharename = NULL;
3898 if (r->in.sharename) {
3899 _mem_save_sharename_0 = NDR_PULL_GET_MEM_CTX(ndr);
3900 NDR_PULL_SET_MEM_CTX(ndr, r->in.sharename, 0);
3901 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.sharename));
3902 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.sharename));
3903 if (ndr_get_array_length(ndr, &r->in.sharename) > ndr_get_array_size(ndr, &r->in.sharename)) {
3904 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));
3906 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t)));
3907 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.sharename, ndr_get_array_length(ndr, &r->in.sharename), sizeof(uint16_t), CH_UTF16));
3908 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_sharename_0, 0);
3910 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
3911 NDR_PULL_ALLOC(ndr, r->out.info);
3912 ZERO_STRUCTP(r->out.info);
3914 if (flags & NDR_OUT) {
3915 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
3916 NDR_PULL_ALLOC(ndr, r->out.info);
3918 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
3919 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, LIBNDR_FLAG_REF_ALLOC);
3920 NDR_CHECK(ndr_pull_set_switch_value(ndr, r->out.info, r->in.level));
3921 NDR_CHECK(ndr_pull_dfs_Info(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
3922 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, LIBNDR_FLAG_REF_ALLOC);
3923 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
3925 return NDR_ERR_SUCCESS;
3928 _PUBLIC_ void ndr_print_dfs_GetInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetInfo *r)
3930 ndr_print_struct(ndr, name, "dfs_GetInfo");
3931 ndr->depth++;
3932 if (flags & NDR_SET_VALUES) {
3933 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
3935 if (flags & NDR_IN) {
3936 ndr_print_struct(ndr, "in", "dfs_GetInfo");
3937 ndr->depth++;
3938 ndr_print_string(ndr, "dfs_entry_path", r->in.dfs_entry_path);
3939 ndr_print_ptr(ndr, "servername", r->in.servername);
3940 ndr->depth++;
3941 if (r->in.servername) {
3942 ndr_print_string(ndr, "servername", r->in.servername);
3944 ndr->depth--;
3945 ndr_print_ptr(ndr, "sharename", r->in.sharename);
3946 ndr->depth++;
3947 if (r->in.sharename) {
3948 ndr_print_string(ndr, "sharename", r->in.sharename);
3950 ndr->depth--;
3951 ndr_print_uint32(ndr, "level", r->in.level);
3952 ndr->depth--;
3954 if (flags & NDR_OUT) {
3955 ndr_print_struct(ndr, "out", "dfs_GetInfo");
3956 ndr->depth++;
3957 ndr_print_ptr(ndr, "info", r->out.info);
3958 ndr->depth++;
3959 ndr_print_set_switch_value(ndr, r->out.info, r->in.level);
3960 ndr_print_dfs_Info(ndr, "info", r->out.info);
3961 ndr->depth--;
3962 ndr_print_WERROR(ndr, "result", r->out.result);
3963 ndr->depth--;
3965 ndr->depth--;
3968 static enum ndr_err_code ndr_push_dfs_Enum(struct ndr_push *ndr, int flags, const struct dfs_Enum *r)
3970 if (flags & NDR_IN) {
3971 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
3972 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bufsize));
3973 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info));
3974 if (r->in.info) {
3975 NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
3977 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.total));
3978 if (r->in.total) {
3979 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.total));
3982 if (flags & NDR_OUT) {
3983 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
3984 if (r->out.info) {
3985 NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
3987 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.total));
3988 if (r->out.total) {
3989 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.total));
3991 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
3993 return NDR_ERR_SUCCESS;
3996 static enum ndr_err_code ndr_pull_dfs_Enum(struct ndr_pull *ndr, int flags, struct dfs_Enum *r)
3998 uint32_t _ptr_info;
3999 uint32_t _ptr_total;
4000 TALLOC_CTX *_mem_save_info_0;
4001 TALLOC_CTX *_mem_save_total_0;
4002 if (flags & NDR_IN) {
4003 ZERO_STRUCT(r->out);
4005 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
4006 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bufsize));
4007 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
4008 if (_ptr_info) {
4009 NDR_PULL_ALLOC(ndr, r->in.info);
4010 } else {
4011 r->in.info = NULL;
4013 if (r->in.info) {
4014 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
4015 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0);
4016 NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
4017 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
4019 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total));
4020 if (_ptr_total) {
4021 NDR_PULL_ALLOC(ndr, r->in.total);
4022 } else {
4023 r->in.total = NULL;
4025 if (r->in.total) {
4026 _mem_save_total_0 = NDR_PULL_GET_MEM_CTX(ndr);
4027 NDR_PULL_SET_MEM_CTX(ndr, r->in.total, 0);
4028 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.total));
4029 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_0, 0);
4032 if (flags & NDR_OUT) {
4033 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
4034 if (_ptr_info) {
4035 NDR_PULL_ALLOC(ndr, r->out.info);
4036 } else {
4037 r->out.info = NULL;
4039 if (r->out.info) {
4040 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
4041 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
4042 NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
4043 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
4045 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total));
4046 if (_ptr_total) {
4047 NDR_PULL_ALLOC(ndr, r->out.total);
4048 } else {
4049 r->out.total = NULL;
4051 if (r->out.total) {
4052 _mem_save_total_0 = NDR_PULL_GET_MEM_CTX(ndr);
4053 NDR_PULL_SET_MEM_CTX(ndr, r->out.total, 0);
4054 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.total));
4055 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_0, 0);
4057 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4059 return NDR_ERR_SUCCESS;
4062 _PUBLIC_ void ndr_print_dfs_Enum(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Enum *r)
4064 ndr_print_struct(ndr, name, "dfs_Enum");
4065 ndr->depth++;
4066 if (flags & NDR_SET_VALUES) {
4067 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4069 if (flags & NDR_IN) {
4070 ndr_print_struct(ndr, "in", "dfs_Enum");
4071 ndr->depth++;
4072 ndr_print_uint32(ndr, "level", r->in.level);
4073 ndr_print_uint32(ndr, "bufsize", r->in.bufsize);
4074 ndr_print_ptr(ndr, "info", r->in.info);
4075 ndr->depth++;
4076 if (r->in.info) {
4077 ndr_print_dfs_EnumStruct(ndr, "info", r->in.info);
4079 ndr->depth--;
4080 ndr_print_ptr(ndr, "total", r->in.total);
4081 ndr->depth++;
4082 if (r->in.total) {
4083 ndr_print_uint32(ndr, "total", *r->in.total);
4085 ndr->depth--;
4086 ndr->depth--;
4088 if (flags & NDR_OUT) {
4089 ndr_print_struct(ndr, "out", "dfs_Enum");
4090 ndr->depth++;
4091 ndr_print_ptr(ndr, "info", r->out.info);
4092 ndr->depth++;
4093 if (r->out.info) {
4094 ndr_print_dfs_EnumStruct(ndr, "info", r->out.info);
4096 ndr->depth--;
4097 ndr_print_ptr(ndr, "total", r->out.total);
4098 ndr->depth++;
4099 if (r->out.total) {
4100 ndr_print_uint32(ndr, "total", *r->out.total);
4102 ndr->depth--;
4103 ndr_print_WERROR(ndr, "result", r->out.result);
4104 ndr->depth--;
4106 ndr->depth--;
4109 static enum ndr_err_code ndr_push_dfs_Rename(struct ndr_push *ndr, int flags, const struct dfs_Rename *r)
4111 if (flags & NDR_IN) {
4113 if (flags & NDR_OUT) {
4114 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4116 return NDR_ERR_SUCCESS;
4119 static enum ndr_err_code ndr_pull_dfs_Rename(struct ndr_pull *ndr, int flags, struct dfs_Rename *r)
4121 if (flags & NDR_IN) {
4123 if (flags & NDR_OUT) {
4124 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4126 return NDR_ERR_SUCCESS;
4129 _PUBLIC_ void ndr_print_dfs_Rename(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Rename *r)
4131 ndr_print_struct(ndr, name, "dfs_Rename");
4132 ndr->depth++;
4133 if (flags & NDR_SET_VALUES) {
4134 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4136 if (flags & NDR_IN) {
4137 ndr_print_struct(ndr, "in", "dfs_Rename");
4138 ndr->depth++;
4139 ndr->depth--;
4141 if (flags & NDR_OUT) {
4142 ndr_print_struct(ndr, "out", "dfs_Rename");
4143 ndr->depth++;
4144 ndr_print_WERROR(ndr, "result", r->out.result);
4145 ndr->depth--;
4147 ndr->depth--;
4150 static enum ndr_err_code ndr_push_dfs_Move(struct ndr_push *ndr, int flags, const struct dfs_Move *r)
4152 if (flags & NDR_IN) {
4154 if (flags & NDR_OUT) {
4155 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4157 return NDR_ERR_SUCCESS;
4160 static enum ndr_err_code ndr_pull_dfs_Move(struct ndr_pull *ndr, int flags, struct dfs_Move *r)
4162 if (flags & NDR_IN) {
4164 if (flags & NDR_OUT) {
4165 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4167 return NDR_ERR_SUCCESS;
4170 _PUBLIC_ void ndr_print_dfs_Move(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Move *r)
4172 ndr_print_struct(ndr, name, "dfs_Move");
4173 ndr->depth++;
4174 if (flags & NDR_SET_VALUES) {
4175 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4177 if (flags & NDR_IN) {
4178 ndr_print_struct(ndr, "in", "dfs_Move");
4179 ndr->depth++;
4180 ndr->depth--;
4182 if (flags & NDR_OUT) {
4183 ndr_print_struct(ndr, "out", "dfs_Move");
4184 ndr->depth++;
4185 ndr_print_WERROR(ndr, "result", r->out.result);
4186 ndr->depth--;
4188 ndr->depth--;
4191 static enum ndr_err_code ndr_push_dfs_ManagerGetConfigInfo(struct ndr_push *ndr, int flags, const struct dfs_ManagerGetConfigInfo *r)
4193 if (flags & NDR_IN) {
4195 if (flags & NDR_OUT) {
4196 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4198 return NDR_ERR_SUCCESS;
4201 static enum ndr_err_code ndr_pull_dfs_ManagerGetConfigInfo(struct ndr_pull *ndr, int flags, struct dfs_ManagerGetConfigInfo *r)
4203 if (flags & NDR_IN) {
4205 if (flags & NDR_OUT) {
4206 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4208 return NDR_ERR_SUCCESS;
4211 _PUBLIC_ void ndr_print_dfs_ManagerGetConfigInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerGetConfigInfo *r)
4213 ndr_print_struct(ndr, name, "dfs_ManagerGetConfigInfo");
4214 ndr->depth++;
4215 if (flags & NDR_SET_VALUES) {
4216 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4218 if (flags & NDR_IN) {
4219 ndr_print_struct(ndr, "in", "dfs_ManagerGetConfigInfo");
4220 ndr->depth++;
4221 ndr->depth--;
4223 if (flags & NDR_OUT) {
4224 ndr_print_struct(ndr, "out", "dfs_ManagerGetConfigInfo");
4225 ndr->depth++;
4226 ndr_print_WERROR(ndr, "result", r->out.result);
4227 ndr->depth--;
4229 ndr->depth--;
4232 static enum ndr_err_code ndr_push_dfs_ManagerSendSiteInfo(struct ndr_push *ndr, int flags, const struct dfs_ManagerSendSiteInfo *r)
4234 if (flags & NDR_IN) {
4236 if (flags & NDR_OUT) {
4237 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4239 return NDR_ERR_SUCCESS;
4242 static enum ndr_err_code ndr_pull_dfs_ManagerSendSiteInfo(struct ndr_pull *ndr, int flags, struct dfs_ManagerSendSiteInfo *r)
4244 if (flags & NDR_IN) {
4246 if (flags & NDR_OUT) {
4247 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4249 return NDR_ERR_SUCCESS;
4252 _PUBLIC_ void ndr_print_dfs_ManagerSendSiteInfo(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerSendSiteInfo *r)
4254 ndr_print_struct(ndr, name, "dfs_ManagerSendSiteInfo");
4255 ndr->depth++;
4256 if (flags & NDR_SET_VALUES) {
4257 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4259 if (flags & NDR_IN) {
4260 ndr_print_struct(ndr, "in", "dfs_ManagerSendSiteInfo");
4261 ndr->depth++;
4262 ndr->depth--;
4264 if (flags & NDR_OUT) {
4265 ndr_print_struct(ndr, "out", "dfs_ManagerSendSiteInfo");
4266 ndr->depth++;
4267 ndr_print_WERROR(ndr, "result", r->out.result);
4268 ndr->depth--;
4270 ndr->depth--;
4273 static enum ndr_err_code ndr_push_dfs_AddFtRoot(struct ndr_push *ndr, int flags, const struct dfs_AddFtRoot *r)
4275 if (flags & NDR_IN) {
4276 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, 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.servername, CH_UTF16)));
4279 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4280 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_servername, 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.dns_servername, CH_UTF16)));
4283 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));
4284 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfsname, 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.dfsname, CH_UTF16)));
4287 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dfsname, ndr_charset_length(r->in.dfsname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4288 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, 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.rootshare, CH_UTF16)));
4291 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4292 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
4293 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4294 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
4295 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.comment, ndr_charset_length(r->in.comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4296 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_config_dn, CH_UTF16)));
4297 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4298 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_config_dn, CH_UTF16)));
4299 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));
4300 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, r->in.unknown1));
4301 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
4302 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown2));
4303 if (r->in.unknown2) {
4304 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.unknown2));
4305 if (*r->in.unknown2) {
4306 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.unknown2));
4310 if (flags & NDR_OUT) {
4311 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.unknown2));
4312 if (r->out.unknown2) {
4313 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.unknown2));
4314 if (*r->out.unknown2) {
4315 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.unknown2));
4318 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4320 return NDR_ERR_SUCCESS;
4323 static enum ndr_err_code ndr_pull_dfs_AddFtRoot(struct ndr_pull *ndr, int flags, struct dfs_AddFtRoot *r)
4325 uint32_t _ptr_unknown2;
4326 TALLOC_CTX *_mem_save_unknown2_0;
4327 TALLOC_CTX *_mem_save_unknown2_1;
4328 if (flags & NDR_IN) {
4329 ZERO_STRUCT(r->out);
4331 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
4332 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
4333 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
4334 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));
4336 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
4337 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
4338 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dns_servername));
4339 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dns_servername));
4340 if (ndr_get_array_length(ndr, &r->in.dns_servername) > ndr_get_array_size(ndr, &r->in.dns_servername)) {
4341 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));
4343 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dns_servername), sizeof(uint16_t)));
4344 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));
4345 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfsname));
4346 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfsname));
4347 if (ndr_get_array_length(ndr, &r->in.dfsname) > ndr_get_array_size(ndr, &r->in.dfsname)) {
4348 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));
4350 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfsname), sizeof(uint16_t)));
4351 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfsname, ndr_get_array_length(ndr, &r->in.dfsname), sizeof(uint16_t), CH_UTF16));
4352 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
4353 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
4354 if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) {
4355 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));
4357 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t)));
4358 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16));
4359 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.comment));
4360 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.comment));
4361 if (ndr_get_array_length(ndr, &r->in.comment) > ndr_get_array_size(ndr, &r->in.comment)) {
4362 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));
4364 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t)));
4365 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.comment, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t), CH_UTF16));
4366 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_config_dn));
4367 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_config_dn));
4368 if (ndr_get_array_length(ndr, &r->in.dfs_config_dn) > ndr_get_array_size(ndr, &r->in.dfs_config_dn)) {
4369 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));
4371 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfs_config_dn), sizeof(uint16_t)));
4372 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));
4373 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, &r->in.unknown1));
4374 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
4375 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
4376 if (_ptr_unknown2) {
4377 NDR_PULL_ALLOC(ndr, r->in.unknown2);
4378 } else {
4379 r->in.unknown2 = NULL;
4381 if (r->in.unknown2) {
4382 _mem_save_unknown2_0 = NDR_PULL_GET_MEM_CTX(ndr);
4383 NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown2, 0);
4384 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
4385 if (_ptr_unknown2) {
4386 NDR_PULL_ALLOC(ndr, *r->in.unknown2);
4387 } else {
4388 *r->in.unknown2 = NULL;
4390 if (*r->in.unknown2) {
4391 _mem_save_unknown2_1 = NDR_PULL_GET_MEM_CTX(ndr);
4392 NDR_PULL_SET_MEM_CTX(ndr, *r->in.unknown2, 0);
4393 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.unknown2));
4394 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_1, 0);
4396 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_0, 0);
4399 if (flags & NDR_OUT) {
4400 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
4401 if (_ptr_unknown2) {
4402 NDR_PULL_ALLOC(ndr, r->out.unknown2);
4403 } else {
4404 r->out.unknown2 = NULL;
4406 if (r->out.unknown2) {
4407 _mem_save_unknown2_0 = NDR_PULL_GET_MEM_CTX(ndr);
4408 NDR_PULL_SET_MEM_CTX(ndr, r->out.unknown2, 0);
4409 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown2));
4410 if (_ptr_unknown2) {
4411 NDR_PULL_ALLOC(ndr, *r->out.unknown2);
4412 } else {
4413 *r->out.unknown2 = NULL;
4415 if (*r->out.unknown2) {
4416 _mem_save_unknown2_1 = NDR_PULL_GET_MEM_CTX(ndr);
4417 NDR_PULL_SET_MEM_CTX(ndr, *r->out.unknown2, 0);
4418 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.unknown2));
4419 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_1, 0);
4421 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown2_0, 0);
4423 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4425 return NDR_ERR_SUCCESS;
4428 _PUBLIC_ void ndr_print_dfs_AddFtRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddFtRoot *r)
4430 ndr_print_struct(ndr, name, "dfs_AddFtRoot");
4431 ndr->depth++;
4432 if (flags & NDR_SET_VALUES) {
4433 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4435 if (flags & NDR_IN) {
4436 ndr_print_struct(ndr, "in", "dfs_AddFtRoot");
4437 ndr->depth++;
4438 ndr_print_string(ndr, "servername", r->in.servername);
4439 ndr_print_string(ndr, "dns_servername", r->in.dns_servername);
4440 ndr_print_string(ndr, "dfsname", r->in.dfsname);
4441 ndr_print_string(ndr, "rootshare", r->in.rootshare);
4442 ndr_print_string(ndr, "comment", r->in.comment);
4443 ndr_print_string(ndr, "dfs_config_dn", r->in.dfs_config_dn);
4444 ndr_print_uint8(ndr, "unknown1", r->in.unknown1);
4445 ndr_print_uint32(ndr, "flags", r->in.flags);
4446 ndr_print_ptr(ndr, "unknown2", r->in.unknown2);
4447 ndr->depth++;
4448 if (r->in.unknown2) {
4449 ndr_print_ptr(ndr, "unknown2", *r->in.unknown2);
4450 ndr->depth++;
4451 if (*r->in.unknown2) {
4452 ndr_print_dfs_UnknownStruct(ndr, "unknown2", *r->in.unknown2);
4454 ndr->depth--;
4456 ndr->depth--;
4457 ndr->depth--;
4459 if (flags & NDR_OUT) {
4460 ndr_print_struct(ndr, "out", "dfs_AddFtRoot");
4461 ndr->depth++;
4462 ndr_print_ptr(ndr, "unknown2", r->out.unknown2);
4463 ndr->depth++;
4464 if (r->out.unknown2) {
4465 ndr_print_ptr(ndr, "unknown2", *r->out.unknown2);
4466 ndr->depth++;
4467 if (*r->out.unknown2) {
4468 ndr_print_dfs_UnknownStruct(ndr, "unknown2", *r->out.unknown2);
4470 ndr->depth--;
4472 ndr->depth--;
4473 ndr_print_WERROR(ndr, "result", r->out.result);
4474 ndr->depth--;
4476 ndr->depth--;
4479 static enum ndr_err_code ndr_push_dfs_RemoveFtRoot(struct ndr_push *ndr, int flags, const struct dfs_RemoveFtRoot *r)
4481 if (flags & NDR_IN) {
4482 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, 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.servername, CH_UTF16)));
4485 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4486 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dns_servername, 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.dns_servername, CH_UTF16)));
4489 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));
4490 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfsname, CH_UTF16)));
4491 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4492 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfsname, CH_UTF16)));
4493 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.dfsname, ndr_charset_length(r->in.dfsname, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4494 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4495 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4496 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4497 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4498 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
4499 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.unknown));
4500 if (r->in.unknown) {
4501 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.unknown));
4502 if (*r->in.unknown) {
4503 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.unknown));
4507 if (flags & NDR_OUT) {
4508 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.unknown));
4509 if (r->out.unknown) {
4510 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.unknown));
4511 if (*r->out.unknown) {
4512 NDR_CHECK(ndr_push_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.unknown));
4515 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4517 return NDR_ERR_SUCCESS;
4520 static enum ndr_err_code ndr_pull_dfs_RemoveFtRoot(struct ndr_pull *ndr, int flags, struct dfs_RemoveFtRoot *r)
4522 uint32_t _ptr_unknown;
4523 TALLOC_CTX *_mem_save_unknown_0;
4524 TALLOC_CTX *_mem_save_unknown_1;
4525 if (flags & NDR_IN) {
4526 ZERO_STRUCT(r->out);
4528 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
4529 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
4530 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
4531 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));
4533 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
4534 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
4535 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dns_servername));
4536 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dns_servername));
4537 if (ndr_get_array_length(ndr, &r->in.dns_servername) > ndr_get_array_size(ndr, &r->in.dns_servername)) {
4538 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));
4540 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dns_servername), sizeof(uint16_t)));
4541 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));
4542 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfsname));
4543 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfsname));
4544 if (ndr_get_array_length(ndr, &r->in.dfsname) > ndr_get_array_size(ndr, &r->in.dfsname)) {
4545 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));
4547 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfsname), sizeof(uint16_t)));
4548 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.dfsname, ndr_get_array_length(ndr, &r->in.dfsname), sizeof(uint16_t), CH_UTF16));
4549 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
4550 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
4551 if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) {
4552 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));
4554 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t)));
4555 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16));
4556 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
4557 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown));
4558 if (_ptr_unknown) {
4559 NDR_PULL_ALLOC(ndr, r->in.unknown);
4560 } else {
4561 r->in.unknown = NULL;
4563 if (r->in.unknown) {
4564 _mem_save_unknown_0 = NDR_PULL_GET_MEM_CTX(ndr);
4565 NDR_PULL_SET_MEM_CTX(ndr, r->in.unknown, 0);
4566 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown));
4567 if (_ptr_unknown) {
4568 NDR_PULL_ALLOC(ndr, *r->in.unknown);
4569 } else {
4570 *r->in.unknown = NULL;
4572 if (*r->in.unknown) {
4573 _mem_save_unknown_1 = NDR_PULL_GET_MEM_CTX(ndr);
4574 NDR_PULL_SET_MEM_CTX(ndr, *r->in.unknown, 0);
4575 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->in.unknown));
4576 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_1, 0);
4578 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_0, 0);
4581 if (flags & NDR_OUT) {
4582 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown));
4583 if (_ptr_unknown) {
4584 NDR_PULL_ALLOC(ndr, r->out.unknown);
4585 } else {
4586 r->out.unknown = NULL;
4588 if (r->out.unknown) {
4589 _mem_save_unknown_0 = NDR_PULL_GET_MEM_CTX(ndr);
4590 NDR_PULL_SET_MEM_CTX(ndr, r->out.unknown, 0);
4591 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_unknown));
4592 if (_ptr_unknown) {
4593 NDR_PULL_ALLOC(ndr, *r->out.unknown);
4594 } else {
4595 *r->out.unknown = NULL;
4597 if (*r->out.unknown) {
4598 _mem_save_unknown_1 = NDR_PULL_GET_MEM_CTX(ndr);
4599 NDR_PULL_SET_MEM_CTX(ndr, *r->out.unknown, 0);
4600 NDR_CHECK(ndr_pull_dfs_UnknownStruct(ndr, NDR_SCALARS|NDR_BUFFERS, *r->out.unknown));
4601 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_1, 0);
4603 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_unknown_0, 0);
4605 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4607 return NDR_ERR_SUCCESS;
4610 _PUBLIC_ void ndr_print_dfs_RemoveFtRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_RemoveFtRoot *r)
4612 ndr_print_struct(ndr, name, "dfs_RemoveFtRoot");
4613 ndr->depth++;
4614 if (flags & NDR_SET_VALUES) {
4615 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4617 if (flags & NDR_IN) {
4618 ndr_print_struct(ndr, "in", "dfs_RemoveFtRoot");
4619 ndr->depth++;
4620 ndr_print_string(ndr, "servername", r->in.servername);
4621 ndr_print_string(ndr, "dns_servername", r->in.dns_servername);
4622 ndr_print_string(ndr, "dfsname", r->in.dfsname);
4623 ndr_print_string(ndr, "rootshare", r->in.rootshare);
4624 ndr_print_uint32(ndr, "flags", r->in.flags);
4625 ndr_print_ptr(ndr, "unknown", r->in.unknown);
4626 ndr->depth++;
4627 if (r->in.unknown) {
4628 ndr_print_ptr(ndr, "unknown", *r->in.unknown);
4629 ndr->depth++;
4630 if (*r->in.unknown) {
4631 ndr_print_dfs_UnknownStruct(ndr, "unknown", *r->in.unknown);
4633 ndr->depth--;
4635 ndr->depth--;
4636 ndr->depth--;
4638 if (flags & NDR_OUT) {
4639 ndr_print_struct(ndr, "out", "dfs_RemoveFtRoot");
4640 ndr->depth++;
4641 ndr_print_ptr(ndr, "unknown", r->out.unknown);
4642 ndr->depth++;
4643 if (r->out.unknown) {
4644 ndr_print_ptr(ndr, "unknown", *r->out.unknown);
4645 ndr->depth++;
4646 if (*r->out.unknown) {
4647 ndr_print_dfs_UnknownStruct(ndr, "unknown", *r->out.unknown);
4649 ndr->depth--;
4651 ndr->depth--;
4652 ndr_print_WERROR(ndr, "result", r->out.result);
4653 ndr->depth--;
4655 ndr->depth--;
4658 static enum ndr_err_code ndr_push_dfs_AddStdRoot(struct ndr_push *ndr, int flags, const struct dfs_AddStdRoot *r)
4660 if (flags & NDR_IN) {
4661 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, 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.servername, CH_UTF16)));
4664 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4665 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4666 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4667 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4668 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4669 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
4670 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4671 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
4672 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.comment, ndr_charset_length(r->in.comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4673 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
4675 if (flags & NDR_OUT) {
4676 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4678 return NDR_ERR_SUCCESS;
4681 static enum ndr_err_code ndr_pull_dfs_AddStdRoot(struct ndr_pull *ndr, int flags, struct dfs_AddStdRoot *r)
4683 if (flags & NDR_IN) {
4684 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
4685 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
4686 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
4687 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));
4689 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
4690 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
4691 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
4692 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
4693 if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) {
4694 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));
4696 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t)));
4697 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16));
4698 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.comment));
4699 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.comment));
4700 if (ndr_get_array_length(ndr, &r->in.comment) > ndr_get_array_size(ndr, &r->in.comment)) {
4701 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));
4703 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t)));
4704 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.comment, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t), CH_UTF16));
4705 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
4707 if (flags & NDR_OUT) {
4708 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4710 return NDR_ERR_SUCCESS;
4713 _PUBLIC_ void ndr_print_dfs_AddStdRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddStdRoot *r)
4715 ndr_print_struct(ndr, name, "dfs_AddStdRoot");
4716 ndr->depth++;
4717 if (flags & NDR_SET_VALUES) {
4718 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4720 if (flags & NDR_IN) {
4721 ndr_print_struct(ndr, "in", "dfs_AddStdRoot");
4722 ndr->depth++;
4723 ndr_print_string(ndr, "servername", r->in.servername);
4724 ndr_print_string(ndr, "rootshare", r->in.rootshare);
4725 ndr_print_string(ndr, "comment", r->in.comment);
4726 ndr_print_uint32(ndr, "flags", r->in.flags);
4727 ndr->depth--;
4729 if (flags & NDR_OUT) {
4730 ndr_print_struct(ndr, "out", "dfs_AddStdRoot");
4731 ndr->depth++;
4732 ndr_print_WERROR(ndr, "result", r->out.result);
4733 ndr->depth--;
4735 ndr->depth--;
4738 static enum ndr_err_code ndr_push_dfs_RemoveStdRoot(struct ndr_push *ndr, int flags, const struct dfs_RemoveStdRoot *r)
4740 if (flags & NDR_IN) {
4741 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4742 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4743 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4744 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4745 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4746 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4747 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
4748 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4749 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
4751 if (flags & NDR_OUT) {
4752 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4754 return NDR_ERR_SUCCESS;
4757 static enum ndr_err_code ndr_pull_dfs_RemoveStdRoot(struct ndr_pull *ndr, int flags, struct dfs_RemoveStdRoot *r)
4759 if (flags & NDR_IN) {
4760 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
4761 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
4762 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
4763 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));
4765 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
4766 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
4767 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
4768 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
4769 if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) {
4770 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));
4772 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t)));
4773 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16));
4774 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
4776 if (flags & NDR_OUT) {
4777 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4779 return NDR_ERR_SUCCESS;
4782 _PUBLIC_ void ndr_print_dfs_RemoveStdRoot(struct ndr_print *ndr, const char *name, int flags, const struct dfs_RemoveStdRoot *r)
4784 ndr_print_struct(ndr, name, "dfs_RemoveStdRoot");
4785 ndr->depth++;
4786 if (flags & NDR_SET_VALUES) {
4787 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4789 if (flags & NDR_IN) {
4790 ndr_print_struct(ndr, "in", "dfs_RemoveStdRoot");
4791 ndr->depth++;
4792 ndr_print_string(ndr, "servername", r->in.servername);
4793 ndr_print_string(ndr, "rootshare", r->in.rootshare);
4794 ndr_print_uint32(ndr, "flags", r->in.flags);
4795 ndr->depth--;
4797 if (flags & NDR_OUT) {
4798 ndr_print_struct(ndr, "out", "dfs_RemoveStdRoot");
4799 ndr->depth++;
4800 ndr_print_WERROR(ndr, "result", r->out.result);
4801 ndr->depth--;
4803 ndr->depth--;
4806 static enum ndr_err_code ndr_push_dfs_ManagerInitialize(struct ndr_push *ndr, int flags, const struct dfs_ManagerInitialize *r)
4808 if (flags & NDR_IN) {
4809 if (r->in.servername == NULL) {
4810 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4812 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4813 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4814 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4815 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4816 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
4818 if (flags & NDR_OUT) {
4819 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4821 return NDR_ERR_SUCCESS;
4824 static enum ndr_err_code ndr_pull_dfs_ManagerInitialize(struct ndr_pull *ndr, int flags, struct dfs_ManagerInitialize *r)
4826 if (flags & NDR_IN) {
4827 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
4828 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
4829 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
4830 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));
4832 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
4833 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
4834 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
4836 if (flags & NDR_OUT) {
4837 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4839 return NDR_ERR_SUCCESS;
4842 _PUBLIC_ void ndr_print_dfs_ManagerInitialize(struct ndr_print *ndr, const char *name, int flags, const struct dfs_ManagerInitialize *r)
4844 ndr_print_struct(ndr, name, "dfs_ManagerInitialize");
4845 ndr->depth++;
4846 if (flags & NDR_SET_VALUES) {
4847 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4849 if (flags & NDR_IN) {
4850 ndr_print_struct(ndr, "in", "dfs_ManagerInitialize");
4851 ndr->depth++;
4852 ndr_print_ptr(ndr, "servername", r->in.servername);
4853 ndr->depth++;
4854 ndr_print_string(ndr, "servername", r->in.servername);
4855 ndr->depth--;
4856 ndr_print_uint32(ndr, "flags", r->in.flags);
4857 ndr->depth--;
4859 if (flags & NDR_OUT) {
4860 ndr_print_struct(ndr, "out", "dfs_ManagerInitialize");
4861 ndr->depth++;
4862 ndr_print_WERROR(ndr, "result", r->out.result);
4863 ndr->depth--;
4865 ndr->depth--;
4868 static enum ndr_err_code ndr_push_dfs_AddStdRootForced(struct ndr_push *ndr, int flags, const struct dfs_AddStdRootForced *r)
4870 if (flags & NDR_IN) {
4871 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, 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.servername, CH_UTF16)));
4874 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4875 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, 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.rootshare, CH_UTF16)));
4878 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4879 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
4880 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4881 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.comment, CH_UTF16)));
4882 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.comment, ndr_charset_length(r->in.comment, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4883 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.store, CH_UTF16)));
4884 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4885 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.store, CH_UTF16)));
4886 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.store, ndr_charset_length(r->in.store, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4888 if (flags & NDR_OUT) {
4889 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
4891 return NDR_ERR_SUCCESS;
4894 static enum ndr_err_code ndr_pull_dfs_AddStdRootForced(struct ndr_pull *ndr, int flags, struct dfs_AddStdRootForced *r)
4896 if (flags & NDR_IN) {
4897 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
4898 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
4899 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
4900 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));
4902 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
4903 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
4904 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
4905 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
4906 if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) {
4907 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));
4909 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t)));
4910 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16));
4911 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.comment));
4912 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.comment));
4913 if (ndr_get_array_length(ndr, &r->in.comment) > ndr_get_array_size(ndr, &r->in.comment)) {
4914 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));
4916 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t)));
4917 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.comment, ndr_get_array_length(ndr, &r->in.comment), sizeof(uint16_t), CH_UTF16));
4918 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.store));
4919 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.store));
4920 if (ndr_get_array_length(ndr, &r->in.store) > ndr_get_array_size(ndr, &r->in.store)) {
4921 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));
4923 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.store), sizeof(uint16_t)));
4924 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.store, ndr_get_array_length(ndr, &r->in.store), sizeof(uint16_t), CH_UTF16));
4926 if (flags & NDR_OUT) {
4927 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
4929 return NDR_ERR_SUCCESS;
4932 _PUBLIC_ void ndr_print_dfs_AddStdRootForced(struct ndr_print *ndr, const char *name, int flags, const struct dfs_AddStdRootForced *r)
4934 ndr_print_struct(ndr, name, "dfs_AddStdRootForced");
4935 ndr->depth++;
4936 if (flags & NDR_SET_VALUES) {
4937 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
4939 if (flags & NDR_IN) {
4940 ndr_print_struct(ndr, "in", "dfs_AddStdRootForced");
4941 ndr->depth++;
4942 ndr_print_string(ndr, "servername", r->in.servername);
4943 ndr_print_string(ndr, "rootshare", r->in.rootshare);
4944 ndr_print_string(ndr, "comment", r->in.comment);
4945 ndr_print_string(ndr, "store", r->in.store);
4946 ndr->depth--;
4948 if (flags & NDR_OUT) {
4949 ndr_print_struct(ndr, "out", "dfs_AddStdRootForced");
4950 ndr->depth++;
4951 ndr_print_WERROR(ndr, "result", r->out.result);
4952 ndr->depth--;
4954 ndr->depth--;
4957 static enum ndr_err_code ndr_push_dfs_GetDcAddress(struct ndr_push *ndr, int flags, const struct dfs_GetDcAddress *r)
4959 if (flags & NDR_IN) {
4960 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4961 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4962 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
4963 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
4964 if (r->in.server_fullname == NULL) {
4965 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4967 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->in.server_fullname));
4968 if (*r->in.server_fullname) {
4969 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->in.server_fullname, CH_UTF16)));
4970 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4971 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->in.server_fullname, CH_UTF16)));
4972 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));
4974 if (r->in.is_root == NULL) {
4975 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4977 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->in.is_root));
4978 if (r->in.ttl == NULL) {
4979 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4981 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.ttl));
4983 if (flags & NDR_OUT) {
4984 if (r->out.server_fullname == NULL) {
4985 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4987 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.server_fullname));
4988 if (*r->out.server_fullname) {
4989 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.server_fullname, CH_UTF16)));
4990 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
4991 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(*r->out.server_fullname, CH_UTF16)));
4992 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));
4994 if (r->out.is_root == NULL) {
4995 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
4997 NDR_CHECK(ndr_push_uint8(ndr, NDR_SCALARS, *r->out.is_root));
4998 if (r->out.ttl == NULL) {
4999 return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
5001 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.ttl));
5002 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5004 return NDR_ERR_SUCCESS;
5007 static enum ndr_err_code ndr_pull_dfs_GetDcAddress(struct ndr_pull *ndr, int flags, struct dfs_GetDcAddress *r)
5009 uint32_t _ptr_server_fullname;
5010 TALLOC_CTX *_mem_save_server_fullname_0;
5011 TALLOC_CTX *_mem_save_server_fullname_1;
5012 TALLOC_CTX *_mem_save_is_root_0;
5013 TALLOC_CTX *_mem_save_ttl_0;
5014 if (flags & NDR_IN) {
5015 ZERO_STRUCT(r->out);
5017 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
5018 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
5019 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
5020 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));
5022 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
5023 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
5024 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5025 NDR_PULL_ALLOC(ndr, r->in.server_fullname);
5027 _mem_save_server_fullname_0 = NDR_PULL_GET_MEM_CTX(ndr);
5028 NDR_PULL_SET_MEM_CTX(ndr, r->in.server_fullname, LIBNDR_FLAG_REF_ALLOC);
5029 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_fullname));
5030 if (_ptr_server_fullname) {
5031 NDR_PULL_ALLOC(ndr, *r->in.server_fullname);
5032 } else {
5033 *r->in.server_fullname = NULL;
5035 if (*r->in.server_fullname) {
5036 _mem_save_server_fullname_1 = NDR_PULL_GET_MEM_CTX(ndr);
5037 NDR_PULL_SET_MEM_CTX(ndr, *r->in.server_fullname, 0);
5038 NDR_CHECK(ndr_pull_array_size(ndr, r->in.server_fullname));
5039 NDR_CHECK(ndr_pull_array_length(ndr, r->in.server_fullname));
5040 if (ndr_get_array_length(ndr, r->in.server_fullname) > ndr_get_array_size(ndr, r->in.server_fullname)) {
5041 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));
5043 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->in.server_fullname), sizeof(uint16_t)));
5044 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));
5045 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_1, 0);
5047 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_0, LIBNDR_FLAG_REF_ALLOC);
5048 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5049 NDR_PULL_ALLOC(ndr, r->in.is_root);
5051 _mem_save_is_root_0 = NDR_PULL_GET_MEM_CTX(ndr);
5052 NDR_PULL_SET_MEM_CTX(ndr, r->in.is_root, LIBNDR_FLAG_REF_ALLOC);
5053 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->in.is_root));
5054 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_is_root_0, LIBNDR_FLAG_REF_ALLOC);
5055 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5056 NDR_PULL_ALLOC(ndr, r->in.ttl);
5058 _mem_save_ttl_0 = NDR_PULL_GET_MEM_CTX(ndr);
5059 NDR_PULL_SET_MEM_CTX(ndr, r->in.ttl, LIBNDR_FLAG_REF_ALLOC);
5060 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.ttl));
5061 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ttl_0, LIBNDR_FLAG_REF_ALLOC);
5062 NDR_PULL_ALLOC(ndr, r->out.server_fullname);
5063 *r->out.server_fullname = *r->in.server_fullname;
5064 NDR_PULL_ALLOC(ndr, r->out.is_root);
5065 *r->out.is_root = *r->in.is_root;
5066 NDR_PULL_ALLOC(ndr, r->out.ttl);
5067 *r->out.ttl = *r->in.ttl;
5069 if (flags & NDR_OUT) {
5070 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5071 NDR_PULL_ALLOC(ndr, r->out.server_fullname);
5073 _mem_save_server_fullname_0 = NDR_PULL_GET_MEM_CTX(ndr);
5074 NDR_PULL_SET_MEM_CTX(ndr, r->out.server_fullname, LIBNDR_FLAG_REF_ALLOC);
5075 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_server_fullname));
5076 if (_ptr_server_fullname) {
5077 NDR_PULL_ALLOC(ndr, *r->out.server_fullname);
5078 } else {
5079 *r->out.server_fullname = NULL;
5081 if (*r->out.server_fullname) {
5082 _mem_save_server_fullname_1 = NDR_PULL_GET_MEM_CTX(ndr);
5083 NDR_PULL_SET_MEM_CTX(ndr, *r->out.server_fullname, 0);
5084 NDR_CHECK(ndr_pull_array_size(ndr, r->out.server_fullname));
5085 NDR_CHECK(ndr_pull_array_length(ndr, r->out.server_fullname));
5086 if (ndr_get_array_length(ndr, r->out.server_fullname) > ndr_get_array_size(ndr, r->out.server_fullname)) {
5087 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));
5089 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, r->out.server_fullname), sizeof(uint16_t)));
5090 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));
5091 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_1, 0);
5093 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_server_fullname_0, LIBNDR_FLAG_REF_ALLOC);
5094 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5095 NDR_PULL_ALLOC(ndr, r->out.is_root);
5097 _mem_save_is_root_0 = NDR_PULL_GET_MEM_CTX(ndr);
5098 NDR_PULL_SET_MEM_CTX(ndr, r->out.is_root, LIBNDR_FLAG_REF_ALLOC);
5099 NDR_CHECK(ndr_pull_uint8(ndr, NDR_SCALARS, r->out.is_root));
5100 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_is_root_0, LIBNDR_FLAG_REF_ALLOC);
5101 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
5102 NDR_PULL_ALLOC(ndr, r->out.ttl);
5104 _mem_save_ttl_0 = NDR_PULL_GET_MEM_CTX(ndr);
5105 NDR_PULL_SET_MEM_CTX(ndr, r->out.ttl, LIBNDR_FLAG_REF_ALLOC);
5106 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.ttl));
5107 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_ttl_0, LIBNDR_FLAG_REF_ALLOC);
5108 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5110 return NDR_ERR_SUCCESS;
5113 _PUBLIC_ void ndr_print_dfs_GetDcAddress(struct ndr_print *ndr, const char *name, int flags, const struct dfs_GetDcAddress *r)
5115 ndr_print_struct(ndr, name, "dfs_GetDcAddress");
5116 ndr->depth++;
5117 if (flags & NDR_SET_VALUES) {
5118 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5120 if (flags & NDR_IN) {
5121 ndr_print_struct(ndr, "in", "dfs_GetDcAddress");
5122 ndr->depth++;
5123 ndr_print_string(ndr, "servername", r->in.servername);
5124 ndr_print_ptr(ndr, "server_fullname", r->in.server_fullname);
5125 ndr->depth++;
5126 ndr_print_ptr(ndr, "server_fullname", *r->in.server_fullname);
5127 ndr->depth++;
5128 if (*r->in.server_fullname) {
5129 ndr_print_string(ndr, "server_fullname", *r->in.server_fullname);
5131 ndr->depth--;
5132 ndr->depth--;
5133 ndr_print_ptr(ndr, "is_root", r->in.is_root);
5134 ndr->depth++;
5135 ndr_print_uint8(ndr, "is_root", *r->in.is_root);
5136 ndr->depth--;
5137 ndr_print_ptr(ndr, "ttl", r->in.ttl);
5138 ndr->depth++;
5139 ndr_print_uint32(ndr, "ttl", *r->in.ttl);
5140 ndr->depth--;
5141 ndr->depth--;
5143 if (flags & NDR_OUT) {
5144 ndr_print_struct(ndr, "out", "dfs_GetDcAddress");
5145 ndr->depth++;
5146 ndr_print_ptr(ndr, "server_fullname", r->out.server_fullname);
5147 ndr->depth++;
5148 ndr_print_ptr(ndr, "server_fullname", *r->out.server_fullname);
5149 ndr->depth++;
5150 if (*r->out.server_fullname) {
5151 ndr_print_string(ndr, "server_fullname", *r->out.server_fullname);
5153 ndr->depth--;
5154 ndr->depth--;
5155 ndr_print_ptr(ndr, "is_root", r->out.is_root);
5156 ndr->depth++;
5157 ndr_print_uint8(ndr, "is_root", *r->out.is_root);
5158 ndr->depth--;
5159 ndr_print_ptr(ndr, "ttl", r->out.ttl);
5160 ndr->depth++;
5161 ndr_print_uint32(ndr, "ttl", *r->out.ttl);
5162 ndr->depth--;
5163 ndr_print_WERROR(ndr, "result", r->out.result);
5164 ndr->depth--;
5166 ndr->depth--;
5169 static enum ndr_err_code ndr_push_dfs_SetDcAddress(struct ndr_push *ndr, int flags, const struct dfs_SetDcAddress *r)
5171 if (flags & NDR_IN) {
5172 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
5173 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5174 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
5175 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5176 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_fullname, CH_UTF16)));
5177 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5178 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.server_fullname, CH_UTF16)));
5179 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));
5180 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.flags));
5181 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.ttl));
5183 if (flags & NDR_OUT) {
5184 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5186 return NDR_ERR_SUCCESS;
5189 static enum ndr_err_code ndr_pull_dfs_SetDcAddress(struct ndr_pull *ndr, int flags, struct dfs_SetDcAddress *r)
5191 if (flags & NDR_IN) {
5192 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
5193 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
5194 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
5195 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));
5197 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
5198 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
5199 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.server_fullname));
5200 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.server_fullname));
5201 if (ndr_get_array_length(ndr, &r->in.server_fullname) > ndr_get_array_size(ndr, &r->in.server_fullname)) {
5202 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));
5204 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.server_fullname), sizeof(uint16_t)));
5205 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));
5206 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.flags));
5207 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.ttl));
5209 if (flags & NDR_OUT) {
5210 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5212 return NDR_ERR_SUCCESS;
5215 _PUBLIC_ void ndr_print_dfs_SetDcAddress(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetDcAddress *r)
5217 ndr_print_struct(ndr, name, "dfs_SetDcAddress");
5218 ndr->depth++;
5219 if (flags & NDR_SET_VALUES) {
5220 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5222 if (flags & NDR_IN) {
5223 ndr_print_struct(ndr, "in", "dfs_SetDcAddress");
5224 ndr->depth++;
5225 ndr_print_string(ndr, "servername", r->in.servername);
5226 ndr_print_string(ndr, "server_fullname", r->in.server_fullname);
5227 ndr_print_uint32(ndr, "flags", r->in.flags);
5228 ndr_print_uint32(ndr, "ttl", r->in.ttl);
5229 ndr->depth--;
5231 if (flags & NDR_OUT) {
5232 ndr_print_struct(ndr, "out", "dfs_SetDcAddress");
5233 ndr->depth++;
5234 ndr_print_WERROR(ndr, "result", r->out.result);
5235 ndr->depth--;
5237 ndr->depth--;
5240 static enum ndr_err_code ndr_push_dfs_FlushFtTable(struct ndr_push *ndr, int flags, const struct dfs_FlushFtTable *r)
5242 if (flags & NDR_IN) {
5243 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
5244 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5245 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.servername, CH_UTF16)));
5246 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.servername, ndr_charset_length(r->in.servername, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5247 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
5248 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5249 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.rootshare, CH_UTF16)));
5250 NDR_CHECK(ndr_push_charset(ndr, NDR_SCALARS, r->in.rootshare, ndr_charset_length(r->in.rootshare, CH_UTF16), sizeof(uint16_t), CH_UTF16));
5252 if (flags & NDR_OUT) {
5253 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5255 return NDR_ERR_SUCCESS;
5258 static enum ndr_err_code ndr_pull_dfs_FlushFtTable(struct ndr_pull *ndr, int flags, struct dfs_FlushFtTable *r)
5260 if (flags & NDR_IN) {
5261 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.servername));
5262 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.servername));
5263 if (ndr_get_array_length(ndr, &r->in.servername) > ndr_get_array_size(ndr, &r->in.servername)) {
5264 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));
5266 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t)));
5267 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.servername, ndr_get_array_length(ndr, &r->in.servername), sizeof(uint16_t), CH_UTF16));
5268 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.rootshare));
5269 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.rootshare));
5270 if (ndr_get_array_length(ndr, &r->in.rootshare) > ndr_get_array_size(ndr, &r->in.rootshare)) {
5271 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));
5273 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t)));
5274 NDR_CHECK(ndr_pull_charset(ndr, NDR_SCALARS, &r->in.rootshare, ndr_get_array_length(ndr, &r->in.rootshare), sizeof(uint16_t), CH_UTF16));
5276 if (flags & NDR_OUT) {
5277 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5279 return NDR_ERR_SUCCESS;
5282 _PUBLIC_ void ndr_print_dfs_FlushFtTable(struct ndr_print *ndr, const char *name, int flags, const struct dfs_FlushFtTable *r)
5284 ndr_print_struct(ndr, name, "dfs_FlushFtTable");
5285 ndr->depth++;
5286 if (flags & NDR_SET_VALUES) {
5287 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5289 if (flags & NDR_IN) {
5290 ndr_print_struct(ndr, "in", "dfs_FlushFtTable");
5291 ndr->depth++;
5292 ndr_print_string(ndr, "servername", r->in.servername);
5293 ndr_print_string(ndr, "rootshare", r->in.rootshare);
5294 ndr->depth--;
5296 if (flags & NDR_OUT) {
5297 ndr_print_struct(ndr, "out", "dfs_FlushFtTable");
5298 ndr->depth++;
5299 ndr_print_WERROR(ndr, "result", r->out.result);
5300 ndr->depth--;
5302 ndr->depth--;
5305 static enum ndr_err_code ndr_push_dfs_Add2(struct ndr_push *ndr, int flags, const struct dfs_Add2 *r)
5307 if (flags & NDR_IN) {
5309 if (flags & NDR_OUT) {
5310 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5312 return NDR_ERR_SUCCESS;
5315 static enum ndr_err_code ndr_pull_dfs_Add2(struct ndr_pull *ndr, int flags, struct dfs_Add2 *r)
5317 if (flags & NDR_IN) {
5319 if (flags & NDR_OUT) {
5320 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5322 return NDR_ERR_SUCCESS;
5325 _PUBLIC_ void ndr_print_dfs_Add2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Add2 *r)
5327 ndr_print_struct(ndr, name, "dfs_Add2");
5328 ndr->depth++;
5329 if (flags & NDR_SET_VALUES) {
5330 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5332 if (flags & NDR_IN) {
5333 ndr_print_struct(ndr, "in", "dfs_Add2");
5334 ndr->depth++;
5335 ndr->depth--;
5337 if (flags & NDR_OUT) {
5338 ndr_print_struct(ndr, "out", "dfs_Add2");
5339 ndr->depth++;
5340 ndr_print_WERROR(ndr, "result", r->out.result);
5341 ndr->depth--;
5343 ndr->depth--;
5346 static enum ndr_err_code ndr_push_dfs_Remove2(struct ndr_push *ndr, int flags, const struct dfs_Remove2 *r)
5348 if (flags & NDR_IN) {
5350 if (flags & NDR_OUT) {
5351 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5353 return NDR_ERR_SUCCESS;
5356 static enum ndr_err_code ndr_pull_dfs_Remove2(struct ndr_pull *ndr, int flags, struct dfs_Remove2 *r)
5358 if (flags & NDR_IN) {
5360 if (flags & NDR_OUT) {
5361 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5363 return NDR_ERR_SUCCESS;
5366 _PUBLIC_ void ndr_print_dfs_Remove2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_Remove2 *r)
5368 ndr_print_struct(ndr, name, "dfs_Remove2");
5369 ndr->depth++;
5370 if (flags & NDR_SET_VALUES) {
5371 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5373 if (flags & NDR_IN) {
5374 ndr_print_struct(ndr, "in", "dfs_Remove2");
5375 ndr->depth++;
5376 ndr->depth--;
5378 if (flags & NDR_OUT) {
5379 ndr_print_struct(ndr, "out", "dfs_Remove2");
5380 ndr->depth++;
5381 ndr_print_WERROR(ndr, "result", r->out.result);
5382 ndr->depth--;
5384 ndr->depth--;
5387 _PUBLIC_ enum ndr_err_code ndr_push_dfs_EnumEx(struct ndr_push *ndr, int flags, const struct dfs_EnumEx *r)
5389 if (flags & NDR_IN) {
5390 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_name, CH_UTF16)));
5391 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
5392 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, ndr_charset_length(r->in.dfs_name, CH_UTF16)));
5393 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));
5394 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.level));
5395 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.bufsize));
5396 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.info));
5397 if (r->in.info) {
5398 NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
5400 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.total));
5401 if (r->in.total) {
5402 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->in.total));
5405 if (flags & NDR_OUT) {
5406 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.info));
5407 if (r->out.info) {
5408 NDR_CHECK(ndr_push_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
5410 NDR_CHECK(ndr_push_unique_ptr(ndr, r->out.total));
5411 if (r->out.total) {
5412 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.total));
5414 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5416 return NDR_ERR_SUCCESS;
5419 _PUBLIC_ enum ndr_err_code ndr_pull_dfs_EnumEx(struct ndr_pull *ndr, int flags, struct dfs_EnumEx *r)
5421 uint32_t _ptr_info;
5422 uint32_t _ptr_total;
5423 TALLOC_CTX *_mem_save_info_0;
5424 TALLOC_CTX *_mem_save_total_0;
5425 if (flags & NDR_IN) {
5426 ZERO_STRUCT(r->out);
5428 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.dfs_name));
5429 NDR_CHECK(ndr_pull_array_length(ndr, &r->in.dfs_name));
5430 if (ndr_get_array_length(ndr, &r->in.dfs_name) > ndr_get_array_size(ndr, &r->in.dfs_name)) {
5431 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));
5433 NDR_CHECK(ndr_check_string_terminator(ndr, ndr_get_array_length(ndr, &r->in.dfs_name), sizeof(uint16_t)));
5434 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));
5435 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.level));
5436 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.bufsize));
5437 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
5438 if (_ptr_info) {
5439 NDR_PULL_ALLOC(ndr, r->in.info);
5440 } else {
5441 r->in.info = NULL;
5443 if (r->in.info) {
5444 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
5445 NDR_PULL_SET_MEM_CTX(ndr, r->in.info, 0);
5446 NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->in.info));
5447 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
5449 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total));
5450 if (_ptr_total) {
5451 NDR_PULL_ALLOC(ndr, r->in.total);
5452 } else {
5453 r->in.total = NULL;
5455 if (r->in.total) {
5456 _mem_save_total_0 = NDR_PULL_GET_MEM_CTX(ndr);
5457 NDR_PULL_SET_MEM_CTX(ndr, r->in.total, 0);
5458 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->in.total));
5459 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_0, 0);
5462 if (flags & NDR_OUT) {
5463 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_info));
5464 if (_ptr_info) {
5465 NDR_PULL_ALLOC(ndr, r->out.info);
5466 } else {
5467 r->out.info = NULL;
5469 if (r->out.info) {
5470 _mem_save_info_0 = NDR_PULL_GET_MEM_CTX(ndr);
5471 NDR_PULL_SET_MEM_CTX(ndr, r->out.info, 0);
5472 NDR_CHECK(ndr_pull_dfs_EnumStruct(ndr, NDR_SCALARS|NDR_BUFFERS, r->out.info));
5473 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_info_0, 0);
5475 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_total));
5476 if (_ptr_total) {
5477 NDR_PULL_ALLOC(ndr, r->out.total);
5478 } else {
5479 r->out.total = NULL;
5481 if (r->out.total) {
5482 _mem_save_total_0 = NDR_PULL_GET_MEM_CTX(ndr);
5483 NDR_PULL_SET_MEM_CTX(ndr, r->out.total, 0);
5484 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.total));
5485 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_total_0, 0);
5487 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5489 return NDR_ERR_SUCCESS;
5492 _PUBLIC_ void ndr_print_dfs_EnumEx(struct ndr_print *ndr, const char *name, int flags, const struct dfs_EnumEx *r)
5494 ndr_print_struct(ndr, name, "dfs_EnumEx");
5495 ndr->depth++;
5496 if (flags & NDR_SET_VALUES) {
5497 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5499 if (flags & NDR_IN) {
5500 ndr_print_struct(ndr, "in", "dfs_EnumEx");
5501 ndr->depth++;
5502 ndr_print_string(ndr, "dfs_name", r->in.dfs_name);
5503 ndr_print_uint32(ndr, "level", r->in.level);
5504 ndr_print_uint32(ndr, "bufsize", r->in.bufsize);
5505 ndr_print_ptr(ndr, "info", r->in.info);
5506 ndr->depth++;
5507 if (r->in.info) {
5508 ndr_print_dfs_EnumStruct(ndr, "info", r->in.info);
5510 ndr->depth--;
5511 ndr_print_ptr(ndr, "total", r->in.total);
5512 ndr->depth++;
5513 if (r->in.total) {
5514 ndr_print_uint32(ndr, "total", *r->in.total);
5516 ndr->depth--;
5517 ndr->depth--;
5519 if (flags & NDR_OUT) {
5520 ndr_print_struct(ndr, "out", "dfs_EnumEx");
5521 ndr->depth++;
5522 ndr_print_ptr(ndr, "info", r->out.info);
5523 ndr->depth++;
5524 if (r->out.info) {
5525 ndr_print_dfs_EnumStruct(ndr, "info", r->out.info);
5527 ndr->depth--;
5528 ndr_print_ptr(ndr, "total", r->out.total);
5529 ndr->depth++;
5530 if (r->out.total) {
5531 ndr_print_uint32(ndr, "total", *r->out.total);
5533 ndr->depth--;
5534 ndr_print_WERROR(ndr, "result", r->out.result);
5535 ndr->depth--;
5537 ndr->depth--;
5540 static enum ndr_err_code ndr_push_dfs_SetInfo2(struct ndr_push *ndr, int flags, const struct dfs_SetInfo2 *r)
5542 if (flags & NDR_IN) {
5544 if (flags & NDR_OUT) {
5545 NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
5547 return NDR_ERR_SUCCESS;
5550 static enum ndr_err_code ndr_pull_dfs_SetInfo2(struct ndr_pull *ndr, int flags, struct dfs_SetInfo2 *r)
5552 if (flags & NDR_IN) {
5554 if (flags & NDR_OUT) {
5555 NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
5557 return NDR_ERR_SUCCESS;
5560 _PUBLIC_ void ndr_print_dfs_SetInfo2(struct ndr_print *ndr, const char *name, int flags, const struct dfs_SetInfo2 *r)
5562 ndr_print_struct(ndr, name, "dfs_SetInfo2");
5563 ndr->depth++;
5564 if (flags & NDR_SET_VALUES) {
5565 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
5567 if (flags & NDR_IN) {
5568 ndr_print_struct(ndr, "in", "dfs_SetInfo2");
5569 ndr->depth++;
5570 ndr->depth--;
5572 if (flags & NDR_OUT) {
5573 ndr_print_struct(ndr, "out", "dfs_SetInfo2");
5574 ndr->depth++;
5575 ndr_print_WERROR(ndr, "result", r->out.result);
5576 ndr->depth--;
5578 ndr->depth--;
5581 static const struct ndr_interface_call netdfs_calls[] = {
5583 "dfs_GetManagerVersion",
5584 sizeof(struct dfs_GetManagerVersion),
5585 (ndr_push_flags_fn_t) ndr_push_dfs_GetManagerVersion,
5586 (ndr_pull_flags_fn_t) ndr_pull_dfs_GetManagerVersion,
5587 (ndr_print_function_t) ndr_print_dfs_GetManagerVersion,
5588 false,
5591 "dfs_Add",
5592 sizeof(struct dfs_Add),
5593 (ndr_push_flags_fn_t) ndr_push_dfs_Add,
5594 (ndr_pull_flags_fn_t) ndr_pull_dfs_Add,
5595 (ndr_print_function_t) ndr_print_dfs_Add,
5596 false,
5599 "dfs_Remove",
5600 sizeof(struct dfs_Remove),
5601 (ndr_push_flags_fn_t) ndr_push_dfs_Remove,
5602 (ndr_pull_flags_fn_t) ndr_pull_dfs_Remove,
5603 (ndr_print_function_t) ndr_print_dfs_Remove,
5604 false,
5607 "dfs_SetInfo",
5608 sizeof(struct dfs_SetInfo),
5609 (ndr_push_flags_fn_t) ndr_push_dfs_SetInfo,
5610 (ndr_pull_flags_fn_t) ndr_pull_dfs_SetInfo,
5611 (ndr_print_function_t) ndr_print_dfs_SetInfo,
5612 false,
5615 "dfs_GetInfo",
5616 sizeof(struct dfs_GetInfo),
5617 (ndr_push_flags_fn_t) ndr_push_dfs_GetInfo,
5618 (ndr_pull_flags_fn_t) ndr_pull_dfs_GetInfo,
5619 (ndr_print_function_t) ndr_print_dfs_GetInfo,
5620 false,
5623 "dfs_Enum",
5624 sizeof(struct dfs_Enum),
5625 (ndr_push_flags_fn_t) ndr_push_dfs_Enum,
5626 (ndr_pull_flags_fn_t) ndr_pull_dfs_Enum,
5627 (ndr_print_function_t) ndr_print_dfs_Enum,
5628 false,
5631 "dfs_Rename",
5632 sizeof(struct dfs_Rename),
5633 (ndr_push_flags_fn_t) ndr_push_dfs_Rename,
5634 (ndr_pull_flags_fn_t) ndr_pull_dfs_Rename,
5635 (ndr_print_function_t) ndr_print_dfs_Rename,
5636 false,
5639 "dfs_Move",
5640 sizeof(struct dfs_Move),
5641 (ndr_push_flags_fn_t) ndr_push_dfs_Move,
5642 (ndr_pull_flags_fn_t) ndr_pull_dfs_Move,
5643 (ndr_print_function_t) ndr_print_dfs_Move,
5644 false,
5647 "dfs_ManagerGetConfigInfo",
5648 sizeof(struct dfs_ManagerGetConfigInfo),
5649 (ndr_push_flags_fn_t) ndr_push_dfs_ManagerGetConfigInfo,
5650 (ndr_pull_flags_fn_t) ndr_pull_dfs_ManagerGetConfigInfo,
5651 (ndr_print_function_t) ndr_print_dfs_ManagerGetConfigInfo,
5652 false,
5655 "dfs_ManagerSendSiteInfo",
5656 sizeof(struct dfs_ManagerSendSiteInfo),
5657 (ndr_push_flags_fn_t) ndr_push_dfs_ManagerSendSiteInfo,
5658 (ndr_pull_flags_fn_t) ndr_pull_dfs_ManagerSendSiteInfo,
5659 (ndr_print_function_t) ndr_print_dfs_ManagerSendSiteInfo,
5660 false,
5663 "dfs_AddFtRoot",
5664 sizeof(struct dfs_AddFtRoot),
5665 (ndr_push_flags_fn_t) ndr_push_dfs_AddFtRoot,
5666 (ndr_pull_flags_fn_t) ndr_pull_dfs_AddFtRoot,
5667 (ndr_print_function_t) ndr_print_dfs_AddFtRoot,
5668 false,
5671 "dfs_RemoveFtRoot",
5672 sizeof(struct dfs_RemoveFtRoot),
5673 (ndr_push_flags_fn_t) ndr_push_dfs_RemoveFtRoot,
5674 (ndr_pull_flags_fn_t) ndr_pull_dfs_RemoveFtRoot,
5675 (ndr_print_function_t) ndr_print_dfs_RemoveFtRoot,
5676 false,
5679 "dfs_AddStdRoot",
5680 sizeof(struct dfs_AddStdRoot),
5681 (ndr_push_flags_fn_t) ndr_push_dfs_AddStdRoot,
5682 (ndr_pull_flags_fn_t) ndr_pull_dfs_AddStdRoot,
5683 (ndr_print_function_t) ndr_print_dfs_AddStdRoot,
5684 false,
5687 "dfs_RemoveStdRoot",
5688 sizeof(struct dfs_RemoveStdRoot),
5689 (ndr_push_flags_fn_t) ndr_push_dfs_RemoveStdRoot,
5690 (ndr_pull_flags_fn_t) ndr_pull_dfs_RemoveStdRoot,
5691 (ndr_print_function_t) ndr_print_dfs_RemoveStdRoot,
5692 false,
5695 "dfs_ManagerInitialize",
5696 sizeof(struct dfs_ManagerInitialize),
5697 (ndr_push_flags_fn_t) ndr_push_dfs_ManagerInitialize,
5698 (ndr_pull_flags_fn_t) ndr_pull_dfs_ManagerInitialize,
5699 (ndr_print_function_t) ndr_print_dfs_ManagerInitialize,
5700 false,
5703 "dfs_AddStdRootForced",
5704 sizeof(struct dfs_AddStdRootForced),
5705 (ndr_push_flags_fn_t) ndr_push_dfs_AddStdRootForced,
5706 (ndr_pull_flags_fn_t) ndr_pull_dfs_AddStdRootForced,
5707 (ndr_print_function_t) ndr_print_dfs_AddStdRootForced,
5708 false,
5711 "dfs_GetDcAddress",
5712 sizeof(struct dfs_GetDcAddress),
5713 (ndr_push_flags_fn_t) ndr_push_dfs_GetDcAddress,
5714 (ndr_pull_flags_fn_t) ndr_pull_dfs_GetDcAddress,
5715 (ndr_print_function_t) ndr_print_dfs_GetDcAddress,
5716 false,
5719 "dfs_SetDcAddress",
5720 sizeof(struct dfs_SetDcAddress),
5721 (ndr_push_flags_fn_t) ndr_push_dfs_SetDcAddress,
5722 (ndr_pull_flags_fn_t) ndr_pull_dfs_SetDcAddress,
5723 (ndr_print_function_t) ndr_print_dfs_SetDcAddress,
5724 false,
5727 "dfs_FlushFtTable",
5728 sizeof(struct dfs_FlushFtTable),
5729 (ndr_push_flags_fn_t) ndr_push_dfs_FlushFtTable,
5730 (ndr_pull_flags_fn_t) ndr_pull_dfs_FlushFtTable,
5731 (ndr_print_function_t) ndr_print_dfs_FlushFtTable,
5732 false,
5735 "dfs_Add2",
5736 sizeof(struct dfs_Add2),
5737 (ndr_push_flags_fn_t) ndr_push_dfs_Add2,
5738 (ndr_pull_flags_fn_t) ndr_pull_dfs_Add2,
5739 (ndr_print_function_t) ndr_print_dfs_Add2,
5740 false,
5743 "dfs_Remove2",
5744 sizeof(struct dfs_Remove2),
5745 (ndr_push_flags_fn_t) ndr_push_dfs_Remove2,
5746 (ndr_pull_flags_fn_t) ndr_pull_dfs_Remove2,
5747 (ndr_print_function_t) ndr_print_dfs_Remove2,
5748 false,
5751 "dfs_EnumEx",
5752 sizeof(struct dfs_EnumEx),
5753 (ndr_push_flags_fn_t) ndr_push_dfs_EnumEx,
5754 (ndr_pull_flags_fn_t) ndr_pull_dfs_EnumEx,
5755 (ndr_print_function_t) ndr_print_dfs_EnumEx,
5756 false,
5759 "dfs_SetInfo2",
5760 sizeof(struct dfs_SetInfo2),
5761 (ndr_push_flags_fn_t) ndr_push_dfs_SetInfo2,
5762 (ndr_pull_flags_fn_t) ndr_pull_dfs_SetInfo2,
5763 (ndr_print_function_t) ndr_print_dfs_SetInfo2,
5764 false,
5766 { NULL, 0, NULL, NULL, NULL, false }
5769 static const char * const netdfs_endpoint_strings[] = {
5770 "ncacn_np:[\\pipe\\netdfs]",
5771 "ncacn_ip_tcp:",
5772 "ncalrpc:",
5775 static const struct ndr_interface_string_array netdfs_endpoints = {
5776 .count = 3,
5777 .names = netdfs_endpoint_strings
5780 static const char * const netdfs_authservice_strings[] = {
5781 "host",
5784 static const struct ndr_interface_string_array netdfs_authservices = {
5785 .count = 1,
5786 .names = netdfs_authservice_strings
5790 const struct ndr_interface_table ndr_table_netdfs = {
5791 .name = "netdfs",
5792 .syntax_id = {
5793 {0x4fc742e0,0x4a10,0x11cf,{0x82,0x73},{0x00,0xaa,0x00,0x4a,0xe6,0x73}},
5794 NDR_NETDFS_VERSION
5796 .helpstring = NDR_NETDFS_HELPSTRING,
5797 .num_calls = 23,
5798 .calls = netdfs_calls,
5799 .endpoints = &netdfs_endpoints,
5800 .authservices = &netdfs_authservices